GULP DIST
This commit is contained in:
20
dist/assets/vendor/imask/esm/controls/input.js
vendored
20
dist/assets/vendor/imask/esm/controls/input.js
vendored
@@ -1,19 +1,20 @@
|
||||
import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../_rollupPluginBabelHelpers-a0b34764.js';
|
||||
import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../_rollupPluginBabelHelpers-b054ecd2.js';
|
||||
import { objectIncludes, DIRECTION } from '../core/utils.js';
|
||||
import ActionDetails from '../core/action-details.js';
|
||||
import MaskedDate from '../masked/date.js';
|
||||
import '../masked/date.js';
|
||||
import createMask, { maskedClass } from '../masked/factory.js';
|
||||
import MaskElement from './mask-element.js';
|
||||
import HTMLMaskElement from './html-mask-element.js';
|
||||
import HTMLContenteditableMaskElement from './html-contenteditable-mask-element.js';
|
||||
import IMask from '../core/holder.js';
|
||||
import '../masked/pattern.js';
|
||||
import '../core/change-details.js';
|
||||
import '../masked/pattern.js';
|
||||
import '../masked/base.js';
|
||||
import '../core/continuous-tail-details.js';
|
||||
import '../masked/pattern/input-definition.js';
|
||||
import '../masked/pattern/fixed-definition.js';
|
||||
import '../masked/pattern/chunk-tail-details.js';
|
||||
import '../masked/pattern/cursor.js';
|
||||
import '../masked/regexp.js';
|
||||
import '../masked/range.js';
|
||||
|
||||
@@ -68,7 +69,7 @@ var InputMask = /*#__PURE__*/function () {
|
||||
return this.masked.mask;
|
||||
},
|
||||
set: function set(mask) {
|
||||
if (this.maskEquals(mask)) return;
|
||||
if (this.maskEquals(mask)) return; // $FlowFixMe No ideas ... after update
|
||||
|
||||
if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) {
|
||||
this.masked.updateOptions({
|
||||
@@ -88,7 +89,9 @@ var InputMask = /*#__PURE__*/function () {
|
||||
}, {
|
||||
key: "maskEquals",
|
||||
value: function maskEquals(mask) {
|
||||
return mask == null || mask === this.masked.mask || mask === Date && this.masked instanceof MaskedDate;
|
||||
var _this$masked;
|
||||
|
||||
return mask == null || ((_this$masked = this.masked) === null || _this$masked === void 0 ? void 0 : _this$masked.maskEquals(mask));
|
||||
}
|
||||
}, {
|
||||
key: "value",
|
||||
@@ -199,7 +202,9 @@ var InputMask = /*#__PURE__*/function () {
|
||||
|
||||
}, {
|
||||
key: "_saveSelection",
|
||||
value: function _saveSelection() {
|
||||
value: function
|
||||
/* ev */
|
||||
_saveSelection() {
|
||||
if (this.value !== this.el.value) {
|
||||
console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console
|
||||
}
|
||||
@@ -305,7 +310,7 @@ var InputMask = /*#__PURE__*/function () {
|
||||
}, {
|
||||
key: "alignCursor",
|
||||
value: function alignCursor() {
|
||||
this.cursorPos = this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT);
|
||||
this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));
|
||||
}
|
||||
/** Aligns cursor only if selection is empty */
|
||||
|
||||
@@ -364,6 +369,7 @@ var InputMask = /*#__PURE__*/function () {
|
||||
|
||||
var removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;
|
||||
var cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);
|
||||
if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);
|
||||
this.updateControl();
|
||||
this.updateCursor(cursorPos);
|
||||
delete this._inputEvent;
|
||||
|
||||
Reference in New Issue
Block a user