@orangelogic/design-system 2.70.0 → 2.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{button.CAAJPQFu.js → button.D6S0sAOO.js} +1 -1
- package/library/chunks/{color-swatch-group.CKHyWM8K.js → color-swatch-group.CSctShAT.js} +3 -3
- package/library/chunks/{color-swatch.BkpPCXd6.js → color-swatch.9fo7Prlq.js} +1 -1
- package/library/chunks/{confirm-popover.ZD74yDWw.js → confirm-popover.DR2_O9i_.js} +3 -3
- package/library/chunks/{dialog.qSV5AjOE.js → dialog.n5g61iHs.js} +106 -92
- package/library/chunks/{dot-pagination.BN_0ljfc.js → dot-pagination.CqpDMHMz.js} +1 -1
- package/library/chunks/{file-on-demand.CXE4zf0J.js → file-on-demand.DyPdfxfM.js} +8 -8
- package/library/chunks/{folder-select.CPALQK22.js → folder-select.B4PPWsoq.js} +3 -3
- package/library/chunks/{header.DXZ_5gLY.js → header.tbXKX2yv.js} +1 -1
- package/library/chunks/{i18n.C0iakJkV.js → i18n.BU7mYVLM.js} +2 -2
- package/library/chunks/icon-button.Dxz2J4cg.js +683 -0
- package/library/chunks/{iframe.BlzVfeBc.js → iframe.Dx7QScC8.js} +1 -1
- package/library/chunks/{image.B3WjaCXP.js → image.Q7doiTcu.js} +1 -1
- package/library/chunks/{index.CmVKj_wl.js → index.xnuklZH8.js} +1 -1
- package/library/chunks/{list-editor.CIAAFPco.js → list-editor.rlWs0RYN.js} +7 -7
- package/library/chunks/{option.ByVbmxUQ.js → option.CgM5bwtt.js} +1 -1
- package/library/chunks/pagination.I2BZVSB2.js +430 -0
- package/library/chunks/{tab-group.1h51o_Ly.js → tab-group.euL1exrl.js} +3 -3
- package/library/chunks/{table.wVHv1Xze.js → table.DNwNmw8a.js} +366 -351
- package/library/chunks/{tree.Bx0IGsWm.js → tree.ClkS3oAg.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +12 -12
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +2 -2
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +14 -679
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +409 -320
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +8 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +6 -6
- package/library/components/types.js +25 -25
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
- package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
- package/library/packages/atoms/src/components/input/input.d.ts +9 -0
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +31 -2
- package/library/packages/atoms/src/components/table/table.d.ts +13 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
- package/library/packages/types/src/icon-button.d.ts +7 -0
- package/library/packages/types/src/table.d.ts +3 -1
- package/library/packages/utils/src/custom-element/i18n.d.ts +2 -2
- package/library/react-web-component.d.ts +39 -7
- package/library/utils.js +2 -2
- package/package.json +1 -1
- package/library/chunks/pagination.DPQn2fKX.js +0 -341
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { c as
|
|
3
|
-
import { f as
|
|
1
|
+
import { n as d, C as rt } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
2
|
+
import { c as ut } from "../chunks/component.styles.DMSLciL5.js";
|
|
3
|
+
import { f as ot } from "../chunks/form-control.styles.CUGhvlfT.js";
|
|
4
4
|
import { c as lt } from "../chunks/custom-element.L4WJXn1j.js";
|
|
5
|
-
import { d as
|
|
6
|
-
import { F as
|
|
7
|
-
import { L as
|
|
8
|
-
import { H as
|
|
9
|
-
import { w as
|
|
10
|
-
import { i as
|
|
5
|
+
import { d as ht } from "../chunks/default-value.COZopaet.js";
|
|
6
|
+
import { F as pt } from "../chunks/form.DgwYWi0O.js";
|
|
7
|
+
import { L as ct } from "../chunks/i18n.BU7mYVLM.js";
|
|
8
|
+
import { H as dt } from "../chunks/slot.j5oheLJC.js";
|
|
9
|
+
import { w as V } from "../chunks/watch.BCJD77bD.js";
|
|
10
|
+
import { i as ft, x as E } from "../chunks/lit-element.jLBm65_O.js";
|
|
11
11
|
import { r as j } from "../chunks/state.CSDxrqLd.js";
|
|
12
|
-
import { e as
|
|
13
|
-
import { e as
|
|
12
|
+
import { e as O } from "../chunks/query.BBf1UFkC.js";
|
|
13
|
+
import { e as S } from "../chunks/class-map.BiVq-cVR.js";
|
|
14
14
|
import { o as _ } from "../chunks/if-defined.BRoBj_Rp.js";
|
|
15
|
-
import { l as
|
|
16
|
-
import { n as
|
|
15
|
+
import { l as mt } from "../chunks/live.SCz6M8Gs.js";
|
|
16
|
+
import { n as Y } from "../chunks/when.Dr1es41R.js";
|
|
17
17
|
import gt from "./icon.js";
|
|
18
|
-
function
|
|
18
|
+
function F(a) {
|
|
19
19
|
return typeof a == "string" || a instanceof String;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Z(a) {
|
|
22
22
|
var t;
|
|
23
23
|
return typeof a == "object" && a != null && (a == null || (t = a.constructor) == null ? void 0 : t.name) === "Object";
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ function X(a, t) {
|
|
|
28
28
|
return t(n, s) && (e[s] = n), e;
|
|
29
29
|
}, {});
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const p = {
|
|
32
32
|
NONE: "NONE",
|
|
33
33
|
LEFT: "LEFT",
|
|
34
34
|
FORCE_LEFT: "FORCE_LEFT",
|
|
@@ -37,24 +37,24 @@ const h = {
|
|
|
37
37
|
};
|
|
38
38
|
function _t(a) {
|
|
39
39
|
switch (a) {
|
|
40
|
-
case
|
|
41
|
-
return
|
|
42
|
-
case
|
|
43
|
-
return
|
|
40
|
+
case p.LEFT:
|
|
41
|
+
return p.FORCE_LEFT;
|
|
42
|
+
case p.RIGHT:
|
|
43
|
+
return p.FORCE_RIGHT;
|
|
44
44
|
default:
|
|
45
45
|
return a;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function P(a) {
|
|
49
49
|
return a.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function T(a, t) {
|
|
52
52
|
if (t === a) return !0;
|
|
53
53
|
const e = Array.isArray(t), i = Array.isArray(a);
|
|
54
54
|
let s;
|
|
55
55
|
if (e && i) {
|
|
56
56
|
if (t.length != a.length) return !1;
|
|
57
|
-
for (s = 0; s < t.length; s++) if (!
|
|
57
|
+
for (s = 0; s < t.length; s++) if (!T(t[s], a[s])) return !1;
|
|
58
58
|
return !0;
|
|
59
59
|
}
|
|
60
60
|
if (e != i) return !1;
|
|
@@ -67,7 +67,7 @@ function D(a, t) {
|
|
|
67
67
|
if (u != l) return !1;
|
|
68
68
|
const c = Object.keys(t);
|
|
69
69
|
for (s = 0; s < c.length; s++) if (!Object.prototype.hasOwnProperty.call(a, c[s])) return !1;
|
|
70
|
-
for (s = 0; s < c.length; s++) if (!
|
|
70
|
+
for (s = 0; s < c.length; s++) if (!T(a[c[s]], t[c[s]])) return !1;
|
|
71
71
|
return !0;
|
|
72
72
|
} else if (t && a && typeof t == "function" && typeof a == "function")
|
|
73
73
|
return t.toString() === a.toString();
|
|
@@ -116,29 +116,29 @@ class kt {
|
|
|
116
116
|
}
|
|
117
117
|
/** Remove direction */
|
|
118
118
|
get removeDirection() {
|
|
119
|
-
return !this.removedCount || this.insertedCount ?
|
|
120
|
-
this.oldSelection.end === this.oldSelection.start ?
|
|
119
|
+
return !this.removedCount || this.insertedCount ? p.NONE : (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)
|
|
120
|
+
this.oldSelection.end === this.oldSelection.start ? p.RIGHT : p.LEFT;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
return new
|
|
123
|
+
function f(a, t) {
|
|
124
|
+
return new f.InputMask(a, t);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function J(a) {
|
|
127
127
|
if (a == null) throw new Error("mask property should be defined");
|
|
128
|
-
return a instanceof RegExp ?
|
|
128
|
+
return a instanceof RegExp ? f.MaskedRegExp : F(a) ? f.MaskedPattern : a === Date ? f.MaskedDate : a === Number ? f.MaskedNumber : Array.isArray(a) || a === Array ? f.MaskedDynamic : f.Masked && a.prototype instanceof f.Masked ? a : f.Masked && a instanceof f.Masked ? a.constructor : a instanceof Function ? f.MaskedFunction : (console.warn("Mask not found for mask", a), f.Masked);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function I(a) {
|
|
131
131
|
if (!a) throw new Error("Options in not defined");
|
|
132
|
-
if (
|
|
133
|
-
if (a.prototype instanceof
|
|
132
|
+
if (f.Masked) {
|
|
133
|
+
if (a.prototype instanceof f.Masked) return {
|
|
134
134
|
mask: a
|
|
135
135
|
};
|
|
136
136
|
const {
|
|
137
137
|
mask: t = void 0,
|
|
138
138
|
...e
|
|
139
|
-
} = a instanceof
|
|
139
|
+
} = a instanceof f.Masked ? {
|
|
140
140
|
mask: a
|
|
141
|
-
} :
|
|
141
|
+
} : Z(a) && a.mask instanceof f.Masked ? a : {};
|
|
142
142
|
if (t) {
|
|
143
143
|
const i = t.mask;
|
|
144
144
|
return {
|
|
@@ -149,20 +149,20 @@ function S(a) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return Z(a) ? {
|
|
153
153
|
...a
|
|
154
154
|
} : {
|
|
155
155
|
mask: a
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
function A(a) {
|
|
159
|
-
if (
|
|
160
|
-
const t =
|
|
159
|
+
if (f.Masked && a instanceof f.Masked) return a;
|
|
160
|
+
const t = I(a), e = J(t.mask);
|
|
161
161
|
if (!e) throw new Error("Masked class is not found for provided mask " + t.mask + ", appropriate module needs to be imported manually before creating mask.");
|
|
162
162
|
return t.mask === e && delete t.mask, t._mask && (t.mask = t._mask, delete t._mask), new e(t);
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
class
|
|
164
|
+
f.createMask = A;
|
|
165
|
+
class K {
|
|
166
166
|
/** */
|
|
167
167
|
/** */
|
|
168
168
|
/** */
|
|
@@ -200,9 +200,9 @@ class q {
|
|
|
200
200
|
/** */
|
|
201
201
|
/** */
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
class
|
|
203
|
+
f.MaskElement = K;
|
|
204
|
+
const W = 90, vt = 89;
|
|
205
|
+
class L extends K {
|
|
206
206
|
/** HTMLElement to use mask on */
|
|
207
207
|
constructor(t) {
|
|
208
208
|
super(), this.input = t, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
|
|
@@ -220,9 +220,9 @@ class R extends q {
|
|
|
220
220
|
this.input.addEventListener("keydown", this._onKeydown), this.input.addEventListener("input", this._onInput), this.input.addEventListener("beforeinput", this._onBeforeinput), this.input.addEventListener("compositionend", this._onCompositionEnd), this.input.addEventListener("drop", t.drop), this.input.addEventListener("click", t.click), this.input.addEventListener("focus", t.focus), this.input.addEventListener("blur", t.commit), this._handlers = t;
|
|
221
221
|
}
|
|
222
222
|
_onKeydown(t) {
|
|
223
|
-
if (this._handlers.redo && (t.keyCode ===
|
|
223
|
+
if (this._handlers.redo && (t.keyCode === W && t.shiftKey && (t.metaKey || t.ctrlKey) || t.keyCode === vt && t.ctrlKey))
|
|
224
224
|
return t.preventDefault(), this._handlers.redo(t);
|
|
225
|
-
if (this._handlers.undo && t.keyCode ===
|
|
225
|
+
if (this._handlers.undo && t.keyCode === W && (t.metaKey || t.ctrlKey))
|
|
226
226
|
return t.preventDefault(), this._handlers.undo(t);
|
|
227
227
|
t.isComposing || this._handlers.selectionChange(t);
|
|
228
228
|
}
|
|
@@ -243,8 +243,8 @@ class R extends q {
|
|
|
243
243
|
this.input.removeEventListener("keydown", this._onKeydown), this.input.removeEventListener("input", this._onInput), this.input.removeEventListener("beforeinput", this._onBeforeinput), this.input.removeEventListener("compositionend", this._onCompositionEnd), this.input.removeEventListener("drop", this._handlers.drop), this.input.removeEventListener("click", this._handlers.click), this.input.removeEventListener("focus", this._handlers.focus), this.input.removeEventListener("blur", this._handlers.commit), this._handlers = {};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
class xt extends
|
|
246
|
+
f.HTMLMaskElement = L;
|
|
247
|
+
class xt extends L {
|
|
248
248
|
/** InputElement to use mask on */
|
|
249
249
|
constructor(t) {
|
|
250
250
|
super(t), this.input = t;
|
|
@@ -268,8 +268,8 @@ class xt extends R {
|
|
|
268
268
|
this.input.value = t;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
|
|
272
|
-
class
|
|
271
|
+
f.HTMLMaskElement = L;
|
|
272
|
+
class Q extends L {
|
|
273
273
|
/** Returns HTMLElement selection start */
|
|
274
274
|
get _unsafeSelectionStart() {
|
|
275
275
|
const t = this.rootElement, e = t.getSelection && t.getSelection(), i = e && e.anchorOffset, s = e && e.focusOffset;
|
|
@@ -296,8 +296,8 @@ class J extends R {
|
|
|
296
296
|
this.input.textContent = t;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
|
|
300
|
-
class
|
|
299
|
+
f.HTMLContenteditableMaskElement = Q;
|
|
300
|
+
class N {
|
|
301
301
|
constructor() {
|
|
302
302
|
this.states = [], this.currentIndex = 0;
|
|
303
303
|
}
|
|
@@ -308,7 +308,7 @@ class O {
|
|
|
308
308
|
return this.states.length === 0;
|
|
309
309
|
}
|
|
310
310
|
push(t) {
|
|
311
|
-
this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length >
|
|
311
|
+
this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length > N.MAX_LENGTH && this.states.shift(), this.currentIndex = this.states.length - 1;
|
|
312
312
|
}
|
|
313
313
|
go(t) {
|
|
314
314
|
return this.currentIndex = Math.min(Math.max(this.currentIndex + t, 0), this.states.length - 1), this.currentState;
|
|
@@ -323,14 +323,14 @@ class O {
|
|
|
323
323
|
this.states.length = 0, this.currentIndex = 0;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
N.MAX_LENGTH = 100;
|
|
327
327
|
class bt {
|
|
328
328
|
/**
|
|
329
329
|
View element
|
|
330
330
|
*/
|
|
331
331
|
/** Internal {@link Masked} model */
|
|
332
332
|
constructor(t, e) {
|
|
333
|
-
this.el = t instanceof
|
|
333
|
+
this.el = t instanceof K ? t : t.isContentEditable && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" ? new Q(t) : new xt(t), this.masked = A(e), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._rawInputValue = "", this.history = new N(), this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this._onUndo = this._onUndo.bind(this), this._onRedo = this._onRedo.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange();
|
|
334
334
|
}
|
|
335
335
|
maskEquals(t) {
|
|
336
336
|
var e;
|
|
@@ -342,13 +342,13 @@ class bt {
|
|
|
342
342
|
}
|
|
343
343
|
set mask(t) {
|
|
344
344
|
if (this.maskEquals(t)) return;
|
|
345
|
-
if (!(t instanceof
|
|
345
|
+
if (!(t instanceof f.Masked) && this.masked.constructor === J(t)) {
|
|
346
346
|
this.masked.updateOptions({
|
|
347
347
|
mask: t
|
|
348
348
|
});
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
351
|
-
const e = t instanceof
|
|
351
|
+
const e = t instanceof f.Masked ? t : A({
|
|
352
352
|
mask: t
|
|
353
353
|
});
|
|
354
354
|
e.unmaskedValue = this.masked.unmaskedValue, this.masked = e;
|
|
@@ -468,7 +468,7 @@ class bt {
|
|
|
468
468
|
}
|
|
469
469
|
/** Aligns cursor to nearest available position */
|
|
470
470
|
alignCursor() {
|
|
471
|
-
this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,
|
|
471
|
+
this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, p.LEFT));
|
|
472
472
|
}
|
|
473
473
|
/** Aligns cursor only if selection is empty */
|
|
474
474
|
alignCursorFriendly() {
|
|
@@ -499,9 +499,9 @@ class bt {
|
|
|
499
499
|
}), i = this.masked.rawInputValue, s = this.masked.splice(e.startChangePos, e.removed.length, e.inserted, e.removeDirection, {
|
|
500
500
|
input: !0,
|
|
501
501
|
raw: !0
|
|
502
|
-
}).offset, n = i === this.masked.rawInputValue ? e.removeDirection :
|
|
502
|
+
}).offset, n = i === this.masked.rawInputValue ? e.removeDirection : p.NONE;
|
|
503
503
|
let r = this.masked.nearestInputPos(e.startChangePos + s, n);
|
|
504
|
-
n !==
|
|
504
|
+
n !== p.NONE && (r = this.masked.nearestInputPos(r, p.NONE)), this.updateControl(r), delete this._inputEvent;
|
|
505
505
|
}
|
|
506
506
|
/** Handles view change event and commits model value */
|
|
507
507
|
_onChange() {
|
|
@@ -533,7 +533,7 @@ class bt {
|
|
|
533
533
|
this._unbindEvents(), this._listeners.length = 0, delete this.el;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
|
|
536
|
+
f.InputMask = bt;
|
|
537
537
|
class m {
|
|
538
538
|
/** Inserted symbols */
|
|
539
539
|
/** Additional offset if any changes occurred before tail */
|
|
@@ -565,7 +565,7 @@ class m {
|
|
|
565
565
|
return this.inserted === t.inserted && this.tailShift === t.tailShift && this.rawInserted === t.rawInserted && this.skip === t.skip;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
|
|
568
|
+
f.ChangeDetails = m;
|
|
569
569
|
class y {
|
|
570
570
|
/** Tail value as string */
|
|
571
571
|
/** Tail start position */
|
|
@@ -710,7 +710,7 @@ class v {
|
|
|
710
710
|
}
|
|
711
711
|
/** Appends tail */
|
|
712
712
|
appendTail(t) {
|
|
713
|
-
return
|
|
713
|
+
return F(t) && (t = new y(String(t))), t.appendTo(this);
|
|
714
714
|
}
|
|
715
715
|
/** Appends char */
|
|
716
716
|
_appendCharRaw(t, e) {
|
|
@@ -763,8 +763,8 @@ class v {
|
|
|
763
763
|
}
|
|
764
764
|
/** Appends symbols considering flags */
|
|
765
765
|
append(t, e, i) {
|
|
766
|
-
if (!
|
|
767
|
-
const s =
|
|
766
|
+
if (!F(t)) throw new Error("value should be string");
|
|
767
|
+
const s = F(i) ? new y(String(i)) : i;
|
|
768
768
|
e != null && e.tail && (e._beforeTailState = this.state);
|
|
769
769
|
let n;
|
|
770
770
|
[t, n] = this.doPrepare(t, e);
|
|
@@ -811,7 +811,7 @@ class v {
|
|
|
811
811
|
this.commit && this.commit(this.value, this);
|
|
812
812
|
}
|
|
813
813
|
splice(t, e, i, s, n) {
|
|
814
|
-
i === void 0 && (i = ""), s === void 0 && (s =
|
|
814
|
+
i === void 0 && (i = ""), s === void 0 && (s = p.NONE), n === void 0 && (n = {
|
|
815
815
|
input: !0
|
|
816
816
|
});
|
|
817
817
|
const r = t + e, u = this.extractTail(r), l = this.eager === !0 || this.eager === "remove";
|
|
@@ -821,21 +821,21 @@ class v {
|
|
|
821
821
|
}));
|
|
822
822
|
let g = t;
|
|
823
823
|
const k = new m();
|
|
824
|
-
if (s !==
|
|
825
|
-
if (s ===
|
|
824
|
+
if (s !== p.NONE && (g = this.nearestInputPos(t, e > 1 && t !== 0 && !l ? p.NONE : s), k.tailShift = g - t), k.aggregate(this.remove(g)), l && s !== p.NONE && c === this.rawInputValue)
|
|
825
|
+
if (s === p.FORCE_LEFT) {
|
|
826
826
|
let b;
|
|
827
827
|
for (; c === this.rawInputValue && (b = this.displayValue.length); )
|
|
828
828
|
k.aggregate(new m({
|
|
829
829
|
tailShift: -1
|
|
830
830
|
})).aggregate(this.remove(b - 1));
|
|
831
|
-
} else s ===
|
|
831
|
+
} else s === p.FORCE_RIGHT && u.unshift();
|
|
832
832
|
return k.aggregate(this.append(i, n, u));
|
|
833
833
|
}
|
|
834
834
|
maskEquals(t) {
|
|
835
835
|
return this.mask === t;
|
|
836
836
|
}
|
|
837
837
|
optionsIsChanged(t) {
|
|
838
|
-
return !
|
|
838
|
+
return !T(this, t);
|
|
839
839
|
}
|
|
840
840
|
typedValueEquals(t) {
|
|
841
841
|
const e = this.typedValue;
|
|
@@ -849,7 +849,7 @@ v.DEFAULTS = {
|
|
|
849
849
|
skipInvalid: !0
|
|
850
850
|
};
|
|
851
851
|
v.EMPTY_VALUES = [void 0, null, ""];
|
|
852
|
-
|
|
852
|
+
f.Masked = v;
|
|
853
853
|
class B {
|
|
854
854
|
/** */
|
|
855
855
|
constructor(t, e) {
|
|
@@ -860,7 +860,7 @@ class B {
|
|
|
860
860
|
}
|
|
861
861
|
extend(t) {
|
|
862
862
|
if (!String(t)) return;
|
|
863
|
-
t =
|
|
863
|
+
t = F(t) ? new y(String(t)) : t;
|
|
864
864
|
const e = this.chunks[this.chunks.length - 1], i = e && // if stops are same or tail has no stop
|
|
865
865
|
(e.stop === t.stop || t.stop == null) && // if tail chunk goes just after last chunk
|
|
866
866
|
t.from === e.from + e.toString().length;
|
|
@@ -876,7 +876,7 @@ class B {
|
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
878
|
appendTo(t) {
|
|
879
|
-
if (!(t instanceof
|
|
879
|
+
if (!(t instanceof f.MaskedPattern))
|
|
880
880
|
return new y(this.toString()).appendTo(t);
|
|
881
881
|
const e = new m();
|
|
882
882
|
for (let i = 0; i < this.chunks.length; ++i) {
|
|
@@ -1007,42 +1007,42 @@ class Ct {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
pushLeftBeforeFilled() {
|
|
1009
1009
|
return this._pushLeft(() => {
|
|
1010
|
-
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset,
|
|
1010
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, p.FORCE_LEFT), this.offset !== 0))
|
|
1011
1011
|
return !0;
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
1014
|
pushLeftBeforeInput() {
|
|
1015
1015
|
return this._pushLeft(() => {
|
|
1016
1016
|
if (!this.block.isFixed)
|
|
1017
|
-
return this.offset = this.block.nearestInputPos(this.offset,
|
|
1017
|
+
return this.offset = this.block.nearestInputPos(this.offset, p.LEFT), !0;
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
1020
|
pushLeftBeforeRequired() {
|
|
1021
1021
|
return this._pushLeft(() => {
|
|
1022
1022
|
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
1023
|
-
return this.offset = this.block.nearestInputPos(this.offset,
|
|
1023
|
+
return this.offset = this.block.nearestInputPos(this.offset, p.LEFT), !0;
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
pushRightBeforeFilled() {
|
|
1027
1027
|
return this._pushRight(() => {
|
|
1028
|
-
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset,
|
|
1028
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, p.FORCE_RIGHT), this.offset !== this.block.value.length))
|
|
1029
1029
|
return !0;
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
1032
|
pushRightBeforeInput() {
|
|
1033
1033
|
return this._pushRight(() => {
|
|
1034
1034
|
if (!this.block.isFixed)
|
|
1035
|
-
return this.offset = this.block.nearestInputPos(this.offset,
|
|
1035
|
+
return this.offset = this.block.nearestInputPos(this.offset, p.NONE), !0;
|
|
1036
1036
|
});
|
|
1037
1037
|
}
|
|
1038
1038
|
pushRightBeforeRequired() {
|
|
1039
1039
|
return this._pushRight(() => {
|
|
1040
1040
|
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
1041
|
-
return this.offset = this.block.nearestInputPos(this.offset,
|
|
1041
|
+
return this.offset = this.block.nearestInputPos(this.offset, p.NONE), !0;
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
|
-
class
|
|
1045
|
+
class tt {
|
|
1046
1046
|
/** */
|
|
1047
1047
|
/** */
|
|
1048
1048
|
/** */
|
|
@@ -1071,15 +1071,15 @@ class Q {
|
|
|
1071
1071
|
return t === void 0 && (t = 0), e === void 0 && (e = this._value.length), this._value = this._value.slice(0, t) + this._value.slice(e), this._value || (this._isRawInput = !1), new m();
|
|
1072
1072
|
}
|
|
1073
1073
|
nearestInputPos(t, e) {
|
|
1074
|
-
e === void 0 && (e =
|
|
1074
|
+
e === void 0 && (e = p.NONE);
|
|
1075
1075
|
const i = 0, s = this._value.length;
|
|
1076
1076
|
switch (e) {
|
|
1077
|
-
case
|
|
1078
|
-
case
|
|
1077
|
+
case p.LEFT:
|
|
1078
|
+
case p.FORCE_LEFT:
|
|
1079
1079
|
return i;
|
|
1080
|
-
case
|
|
1081
|
-
case
|
|
1082
|
-
case
|
|
1080
|
+
case p.NONE:
|
|
1081
|
+
case p.RIGHT:
|
|
1082
|
+
case p.FORCE_RIGHT:
|
|
1083
1083
|
default:
|
|
1084
1084
|
return s;
|
|
1085
1085
|
}
|
|
@@ -1117,7 +1117,7 @@ class Q {
|
|
|
1117
1117
|
return new y("");
|
|
1118
1118
|
}
|
|
1119
1119
|
appendTail(t) {
|
|
1120
|
-
return
|
|
1120
|
+
return F(t) && (t = new y(String(t))), t.appendTo(this);
|
|
1121
1121
|
}
|
|
1122
1122
|
append(t, e, i) {
|
|
1123
1123
|
const s = this._appendChar(t[0], e);
|
|
@@ -1138,7 +1138,7 @@ class Q {
|
|
|
1138
1138
|
return this._appendPlaceholder();
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
class
|
|
1141
|
+
class R {
|
|
1142
1142
|
/** */
|
|
1143
1143
|
/** */
|
|
1144
1144
|
/** */
|
|
@@ -1214,16 +1214,16 @@ class M {
|
|
|
1214
1214
|
return t === void 0 && (t = 0), e === void 0 && (e = this.value.length), this.masked.extractInput(t, e, i);
|
|
1215
1215
|
}
|
|
1216
1216
|
nearestInputPos(t, e) {
|
|
1217
|
-
e === void 0 && (e =
|
|
1217
|
+
e === void 0 && (e = p.NONE);
|
|
1218
1218
|
const i = 0, s = this.value.length, n = Math.min(Math.max(t, i), s);
|
|
1219
1219
|
switch (e) {
|
|
1220
|
-
case
|
|
1221
|
-
case
|
|
1220
|
+
case p.LEFT:
|
|
1221
|
+
case p.FORCE_LEFT:
|
|
1222
1222
|
return this.isComplete ? n : i;
|
|
1223
|
-
case
|
|
1224
|
-
case
|
|
1223
|
+
case p.RIGHT:
|
|
1224
|
+
case p.FORCE_RIGHT:
|
|
1225
1225
|
return this.isComplete ? n : s;
|
|
1226
|
-
case
|
|
1226
|
+
case p.NONE:
|
|
1227
1227
|
default:
|
|
1228
1228
|
return n;
|
|
1229
1229
|
}
|
|
@@ -1259,7 +1259,7 @@ class M {
|
|
|
1259
1259
|
return new m();
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
|
-
|
|
1262
|
+
R.DEFAULT_DEFINITIONS = {
|
|
1263
1263
|
0: /\d/,
|
|
1264
1264
|
a: /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
|
|
1265
1265
|
// http://stackoverflow.com/a/22075070
|
|
@@ -1279,7 +1279,7 @@ class yt extends v {
|
|
|
1279
1279
|
e && (t.validate = (i) => i.search(e) >= 0), super._update(t);
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
|
|
1282
|
+
f.MaskedRegExp = yt;
|
|
1283
1283
|
class x extends v {
|
|
1284
1284
|
/** */
|
|
1285
1285
|
/** */
|
|
@@ -1294,7 +1294,7 @@ class x extends v {
|
|
|
1294
1294
|
super({
|
|
1295
1295
|
...x.DEFAULTS,
|
|
1296
1296
|
...t,
|
|
1297
|
-
definitions: Object.assign({},
|
|
1297
|
+
definitions: Object.assign({}, R.DEFAULT_DEFINITIONS, t?.definitions)
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
updateOptions(t) {
|
|
@@ -1312,28 +1312,28 @@ class x extends v {
|
|
|
1312
1312
|
for (let n = 0; n < e.length; ++n) {
|
|
1313
1313
|
if (this.blocks) {
|
|
1314
1314
|
const c = e.slice(n), g = Object.keys(this.blocks).filter((b) => c.indexOf(b) === 0);
|
|
1315
|
-
g.sort((b,
|
|
1315
|
+
g.sort((b, D) => D.length - b.length);
|
|
1316
1316
|
const k = g[0];
|
|
1317
1317
|
if (k) {
|
|
1318
1318
|
const {
|
|
1319
1319
|
expose: b,
|
|
1320
|
-
repeat:
|
|
1321
|
-
...
|
|
1322
|
-
} =
|
|
1320
|
+
repeat: D,
|
|
1321
|
+
...at
|
|
1322
|
+
} = I(this.blocks[k]), q = {
|
|
1323
1323
|
lazy: this.lazy,
|
|
1324
1324
|
eager: this.eager,
|
|
1325
1325
|
placeholderChar: this.placeholderChar,
|
|
1326
1326
|
displayChar: this.displayChar,
|
|
1327
1327
|
overwrite: this.overwrite,
|
|
1328
1328
|
autofix: this.autofix,
|
|
1329
|
-
...
|
|
1330
|
-
repeat:
|
|
1329
|
+
...at,
|
|
1330
|
+
repeat: D,
|
|
1331
1331
|
parent: this
|
|
1332
|
-
},
|
|
1333
|
-
|
|
1332
|
+
}, U = D != null ? new f.RepeatBlock(
|
|
1333
|
+
q
|
|
1334
1334
|
/* TODO */
|
|
1335
|
-
) : A(
|
|
1336
|
-
|
|
1335
|
+
) : A(q);
|
|
1336
|
+
U && (this._blocks.push(U), b && (this.exposeBlock = U), this._maskedBlocks[k] || (this._maskedBlocks[k] = []), this._maskedBlocks[k].push(this._blocks.length - 1)), n += k.length - 1;
|
|
1337
1337
|
continue;
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
@@ -1354,15 +1354,15 @@ class x extends v {
|
|
|
1354
1354
|
if (++n, r = e[n], !r) break;
|
|
1355
1355
|
u = !1;
|
|
1356
1356
|
}
|
|
1357
|
-
const l = u ? new
|
|
1357
|
+
const l = u ? new R({
|
|
1358
1358
|
isOptional: s,
|
|
1359
1359
|
lazy: this.lazy,
|
|
1360
1360
|
eager: this.eager,
|
|
1361
1361
|
placeholderChar: this.placeholderChar,
|
|
1362
1362
|
displayChar: this.displayChar,
|
|
1363
|
-
...
|
|
1363
|
+
...I(t[r]),
|
|
1364
1364
|
parent: this
|
|
1365
|
-
}) : new
|
|
1365
|
+
}) : new tt({
|
|
1366
1366
|
char: r,
|
|
1367
1367
|
eager: this.eager,
|
|
1368
1368
|
isUnmasking: i
|
|
@@ -1541,22 +1541,22 @@ class x extends v {
|
|
|
1541
1541
|
}), i;
|
|
1542
1542
|
}
|
|
1543
1543
|
nearestInputPos(t, e) {
|
|
1544
|
-
if (e === void 0 && (e =
|
|
1544
|
+
if (e === void 0 && (e = p.NONE), !this._blocks.length) return 0;
|
|
1545
1545
|
const i = new Ct(this, t);
|
|
1546
|
-
if (e ===
|
|
1546
|
+
if (e === p.NONE)
|
|
1547
1547
|
return i.pushRightBeforeInput() || (i.popState(), i.pushLeftBeforeInput()) ? i.pos : this.displayValue.length;
|
|
1548
|
-
if (e ===
|
|
1549
|
-
if (e ===
|
|
1548
|
+
if (e === p.LEFT || e === p.FORCE_LEFT) {
|
|
1549
|
+
if (e === p.LEFT) {
|
|
1550
1550
|
if (i.pushRightBeforeFilled(), i.ok && i.pos === t) return t;
|
|
1551
1551
|
i.popState();
|
|
1552
1552
|
}
|
|
1553
|
-
if (i.pushLeftBeforeInput(), i.pushLeftBeforeRequired(), i.pushLeftBeforeFilled(), e ===
|
|
1553
|
+
if (i.pushLeftBeforeInput(), i.pushLeftBeforeRequired(), i.pushLeftBeforeFilled(), e === p.LEFT) {
|
|
1554
1554
|
if (i.pushRightBeforeInput(), i.pushRightBeforeRequired(), i.ok && i.pos <= t || (i.popState(), i.ok && i.pos <= t)) return i.pos;
|
|
1555
1555
|
i.popState();
|
|
1556
1556
|
}
|
|
1557
|
-
return i.ok ? i.pos : e ===
|
|
1557
|
+
return i.ok ? i.pos : e === p.FORCE_LEFT ? 0 : (i.popState(), i.ok || (i.popState(), i.ok) ? i.pos : 0);
|
|
1558
1558
|
}
|
|
1559
|
-
return e ===
|
|
1559
|
+
return e === p.RIGHT || e === p.FORCE_RIGHT ? (i.pushRightBeforeInput(), i.pushRightBeforeRequired(), i.pushRightBeforeFilled() ? i.pos : e === p.FORCE_RIGHT ? this.displayValue.length : (i.popState(), i.ok || (i.popState(), i.ok) ? i.pos : this.nearestInputPos(t, p.LEFT))) : t;
|
|
1560
1560
|
}
|
|
1561
1561
|
totalInputPositions(t, e) {
|
|
1562
1562
|
t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length);
|
|
@@ -1586,10 +1586,10 @@ x.DEFAULTS = {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
x.STOP_CHAR = "`";
|
|
1588
1588
|
x.ESCAPE_CHAR = "\\";
|
|
1589
|
-
x.InputDefinition =
|
|
1590
|
-
x.FixedDefinition =
|
|
1591
|
-
|
|
1592
|
-
class
|
|
1589
|
+
x.InputDefinition = R;
|
|
1590
|
+
x.FixedDefinition = tt;
|
|
1591
|
+
f.MaskedPattern = x;
|
|
1592
|
+
class M extends x {
|
|
1593
1593
|
/**
|
|
1594
1594
|
Optionally sets max length of pattern.
|
|
1595
1595
|
Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
|
|
@@ -1656,9 +1656,9 @@ class V extends x {
|
|
|
1656
1656
|
return e;
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
|
|
1659
|
+
f.MaskedRange = M;
|
|
1660
1660
|
const Et = "d{.}`m{.}`Y";
|
|
1661
|
-
class
|
|
1661
|
+
class w extends x {
|
|
1662
1662
|
static extractPatternOptions(t) {
|
|
1663
1663
|
const {
|
|
1664
1664
|
mask: e,
|
|
@@ -1667,7 +1667,7 @@ class E extends x {
|
|
|
1667
1667
|
} = t;
|
|
1668
1668
|
return {
|
|
1669
1669
|
...s,
|
|
1670
|
-
mask:
|
|
1670
|
+
mask: F(e) ? e : i
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
1673
|
/** Pattern mask for date according to {@link MaskedDate#format} */
|
|
@@ -1676,8 +1676,8 @@ class E extends x {
|
|
|
1676
1676
|
/** Format typed value to string */
|
|
1677
1677
|
/** Parse string to get typed value */
|
|
1678
1678
|
constructor(t) {
|
|
1679
|
-
super(
|
|
1680
|
-
...
|
|
1679
|
+
super(w.extractPatternOptions({
|
|
1680
|
+
...w.DEFAULTS,
|
|
1681
1681
|
...t
|
|
1682
1682
|
}));
|
|
1683
1683
|
}
|
|
@@ -1691,12 +1691,12 @@ class E extends x {
|
|
|
1691
1691
|
blocks: s,
|
|
1692
1692
|
...n
|
|
1693
1693
|
} = {
|
|
1694
|
-
...
|
|
1694
|
+
...w.DEFAULTS,
|
|
1695
1695
|
...t
|
|
1696
|
-
}, r = Object.assign({},
|
|
1696
|
+
}, r = Object.assign({}, w.GET_DEFAULT_BLOCKS());
|
|
1697
1697
|
t.min && (r.Y.from = t.min.getFullYear()), t.max && (r.Y.to = t.max.getFullYear()), t.min && t.max && r.Y.from === r.Y.to && (r.m.from = t.min.getMonth() + 1, r.m.to = t.max.getMonth() + 1, r.m.from === r.m.to && (r.d.from = t.min.getDate(), r.d.to = t.max.getDate())), Object.assign(r, this.blocks, s), super._update({
|
|
1698
1698
|
...n,
|
|
1699
|
-
mask:
|
|
1699
|
+
mask: F(e) ? e : i,
|
|
1700
1700
|
blocks: r
|
|
1701
1701
|
});
|
|
1702
1702
|
}
|
|
@@ -1725,29 +1725,29 @@ class E extends x {
|
|
|
1725
1725
|
return t === Date || super.maskEquals(t);
|
|
1726
1726
|
}
|
|
1727
1727
|
optionsIsChanged(t) {
|
|
1728
|
-
return super.optionsIsChanged(
|
|
1728
|
+
return super.optionsIsChanged(w.extractPatternOptions(t));
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
|
|
1731
|
+
w.GET_DEFAULT_BLOCKS = () => ({
|
|
1732
1732
|
d: {
|
|
1733
|
-
mask:
|
|
1733
|
+
mask: M,
|
|
1734
1734
|
from: 1,
|
|
1735
1735
|
to: 31,
|
|
1736
1736
|
maxLength: 2
|
|
1737
1737
|
},
|
|
1738
1738
|
m: {
|
|
1739
|
-
mask:
|
|
1739
|
+
mask: M,
|
|
1740
1740
|
from: 1,
|
|
1741
1741
|
to: 12,
|
|
1742
1742
|
maxLength: 2
|
|
1743
1743
|
},
|
|
1744
1744
|
Y: {
|
|
1745
|
-
mask:
|
|
1745
|
+
mask: M,
|
|
1746
1746
|
from: 1900,
|
|
1747
1747
|
to: 9999
|
|
1748
1748
|
}
|
|
1749
1749
|
});
|
|
1750
|
-
|
|
1750
|
+
w.DEFAULTS = {
|
|
1751
1751
|
...x.DEFAULTS,
|
|
1752
1752
|
mask: Date,
|
|
1753
1753
|
pattern: Et,
|
|
@@ -1761,11 +1761,11 @@ E.DEFAULTS = {
|
|
|
1761
1761
|
return new Date(s, i - 1, e);
|
|
1762
1762
|
}
|
|
1763
1763
|
};
|
|
1764
|
-
|
|
1765
|
-
class
|
|
1764
|
+
f.MaskedDate = w;
|
|
1765
|
+
class $ extends v {
|
|
1766
1766
|
constructor(t) {
|
|
1767
1767
|
super({
|
|
1768
|
-
|
|
1768
|
+
...$.DEFAULTS,
|
|
1769
1769
|
...t
|
|
1770
1770
|
}), this.currentMask = void 0;
|
|
1771
1771
|
}
|
|
@@ -1777,7 +1777,7 @@ class L extends v {
|
|
|
1777
1777
|
const {
|
|
1778
1778
|
expose: i,
|
|
1779
1779
|
...s
|
|
1780
|
-
} =
|
|
1780
|
+
} = I(e), n = A({
|
|
1781
1781
|
overwrite: this._overwrite,
|
|
1782
1782
|
eager: this._eager,
|
|
1783
1783
|
skipInvalid: this._skipInvalid,
|
|
@@ -1950,7 +1950,7 @@ class L extends v {
|
|
|
1950
1950
|
mask: s,
|
|
1951
1951
|
...n
|
|
1952
1952
|
} = t[i];
|
|
1953
|
-
return
|
|
1953
|
+
return T(e, n) && e.maskEquals(s);
|
|
1954
1954
|
}) : super.maskEquals(t);
|
|
1955
1955
|
}
|
|
1956
1956
|
typedValueEquals(t) {
|
|
@@ -1958,28 +1958,28 @@ class L extends v {
|
|
|
1958
1958
|
return !!((e = this.currentMask) != null && e.typedValueEquals(t));
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
|
-
|
|
1961
|
+
$.DEFAULTS = {
|
|
1962
1962
|
...v.DEFAULTS,
|
|
1963
1963
|
dispatch: (a, t, e, i) => {
|
|
1964
1964
|
if (!t.compiledMasks.length) return;
|
|
1965
1965
|
const s = t.rawInputValue, n = t.compiledMasks.map((r, u) => {
|
|
1966
|
-
const l = t.currentMask === r, c = l ? r.displayValue.length : r.nearestInputPos(r.displayValue.length,
|
|
1966
|
+
const l = t.currentMask === r, c = l ? r.displayValue.length : r.nearestInputPos(r.displayValue.length, p.FORCE_LEFT);
|
|
1967
1967
|
return r.rawInputValue !== s ? (r.reset(), r.append(s, {
|
|
1968
1968
|
raw: !0
|
|
1969
1969
|
})) : l || r.remove(c), r.append(a, t.currentMaskFlags(e)), r.appendTail(i), {
|
|
1970
1970
|
index: u,
|
|
1971
1971
|
weight: r.rawInputValue.length,
|
|
1972
|
-
totalInputPositions: r.totalInputPositions(0, Math.max(c, r.nearestInputPos(r.displayValue.length,
|
|
1972
|
+
totalInputPositions: r.totalInputPositions(0, Math.max(c, r.nearestInputPos(r.displayValue.length, p.FORCE_LEFT)))
|
|
1973
1973
|
};
|
|
1974
1974
|
});
|
|
1975
1975
|
return n.sort((r, u) => u.weight - r.weight || u.totalInputPositions - r.totalInputPositions), t.compiledMasks[n[0].index];
|
|
1976
1976
|
}
|
|
1977
1977
|
};
|
|
1978
|
-
|
|
1979
|
-
class
|
|
1978
|
+
f.MaskedDynamic = $;
|
|
1979
|
+
class z extends x {
|
|
1980
1980
|
constructor(t) {
|
|
1981
1981
|
super({
|
|
1982
|
-
...
|
|
1982
|
+
...z.DEFAULTS,
|
|
1983
1983
|
...t
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
@@ -1999,7 +1999,7 @@ class N extends x {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
_appendCharRaw(t, e) {
|
|
2001
2001
|
e === void 0 && (e = {});
|
|
2002
|
-
const i = Math.min(this.nearestInputPos(0,
|
|
2002
|
+
const i = Math.min(this.nearestInputPos(0, p.FORCE_RIGHT), this.value.length), s = this.enum.filter((n) => this.matchValue(n, this.unmaskedValue + t, i));
|
|
2003
2003
|
if (s.length) {
|
|
2004
2004
|
s.length === 1 && this._forEachBlocksInRange(0, this.value.length, (r, u) => {
|
|
2005
2005
|
const l = s[0][u];
|
|
@@ -2017,7 +2017,7 @@ class N extends x {
|
|
|
2017
2017
|
}
|
|
2018
2018
|
remove(t, e) {
|
|
2019
2019
|
if (t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), t === e) return new m();
|
|
2020
|
-
const i = Math.min(super.nearestInputPos(0,
|
|
2020
|
+
const i = Math.min(super.nearestInputPos(0, p.FORCE_RIGHT), this.value.length);
|
|
2021
2021
|
let s;
|
|
2022
2022
|
for (s = t; s >= 0 && !(this.enum.filter((u) => this.matchValue(u, this.value.slice(i, s), i)).length > 1); --s)
|
|
2023
2023
|
;
|
|
@@ -2028,12 +2028,12 @@ class N extends x {
|
|
|
2028
2028
|
return this.enum.indexOf(this.value) >= 0;
|
|
2029
2029
|
}
|
|
2030
2030
|
}
|
|
2031
|
-
|
|
2031
|
+
z.DEFAULTS = {
|
|
2032
2032
|
...x.DEFAULTS,
|
|
2033
2033
|
matchValue: (a, t, e) => a.indexOf(t, e) === e
|
|
2034
2034
|
};
|
|
2035
|
-
|
|
2036
|
-
class
|
|
2035
|
+
f.MaskedEnum = z;
|
|
2036
|
+
class wt extends v {
|
|
2037
2037
|
/** */
|
|
2038
2038
|
/** Enable characters overwriting */
|
|
2039
2039
|
/** */
|
|
@@ -2049,8 +2049,8 @@ class At extends v {
|
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2053
|
-
var
|
|
2052
|
+
f.MaskedFunction = wt;
|
|
2053
|
+
var et;
|
|
2054
2054
|
class C extends v {
|
|
2055
2055
|
/** Single char */
|
|
2056
2056
|
/** Single char */
|
|
@@ -2079,8 +2079,8 @@ class C extends v {
|
|
|
2079
2079
|
super._update(t), this._updateRegExps();
|
|
2080
2080
|
}
|
|
2081
2081
|
_updateRegExps() {
|
|
2082
|
-
const t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), e = "\\d*", i = (this.scale ? "(" +
|
|
2083
|
-
this._numberRegExp = new RegExp(t + e + i), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(
|
|
2082
|
+
const t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), e = "\\d*", i = (this.scale ? "(" + P(this.radix) + "\\d{0," + this.scale + "})?" : "") + "$";
|
|
2083
|
+
this._numberRegExp = new RegExp(t + e + i), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(P).join("") + "]", "g"), this._thousandsSeparatorRegExp = new RegExp(P(this.thousandsSeparator), "g");
|
|
2084
2084
|
}
|
|
2085
2085
|
_removeThousandsSeparators(t) {
|
|
2086
2086
|
return t.replace(this._thousandsSeparatorRegExp, "");
|
|
@@ -2161,19 +2161,19 @@ class C extends v {
|
|
|
2161
2161
|
nearestInputPos(t, e) {
|
|
2162
2162
|
if (!this.thousandsSeparator) return t;
|
|
2163
2163
|
switch (e) {
|
|
2164
|
-
case
|
|
2165
|
-
case
|
|
2166
|
-
case
|
|
2164
|
+
case p.NONE:
|
|
2165
|
+
case p.LEFT:
|
|
2166
|
+
case p.FORCE_LEFT: {
|
|
2167
2167
|
const i = this._findSeparatorAround(t - 1);
|
|
2168
2168
|
if (i >= 0) {
|
|
2169
2169
|
const s = i + this.thousandsSeparator.length;
|
|
2170
|
-
if (t < s || this.value.length <= s || e ===
|
|
2170
|
+
if (t < s || this.value.length <= s || e === p.FORCE_LEFT)
|
|
2171
2171
|
return i;
|
|
2172
2172
|
}
|
|
2173
2173
|
break;
|
|
2174
2174
|
}
|
|
2175
|
-
case
|
|
2176
|
-
case
|
|
2175
|
+
case p.RIGHT:
|
|
2176
|
+
case p.FORCE_RIGHT: {
|
|
2177
2177
|
const i = this._findSeparatorAround(t);
|
|
2178
2178
|
if (i >= 0)
|
|
2179
2179
|
return i + this.thousandsSeparator.length;
|
|
@@ -2234,7 +2234,7 @@ class C extends v {
|
|
|
2234
2234
|
return (super.typedValueEquals(t) || C.EMPTY_VALUES.includes(t) && C.EMPTY_VALUES.includes(this.typedValue)) && !(t === 0 && this.value === "");
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
|
-
|
|
2237
|
+
et = C;
|
|
2238
2238
|
C.UNMASKED_RADIX = ".";
|
|
2239
2239
|
C.EMPTY_VALUES = [...v.EMPTY_VALUES, 0];
|
|
2240
2240
|
C.DEFAULTS = {
|
|
@@ -2242,7 +2242,7 @@ C.DEFAULTS = {
|
|
|
2242
2242
|
mask: Number,
|
|
2243
2243
|
radix: ",",
|
|
2244
2244
|
thousandsSeparator: "",
|
|
2245
|
-
mapToRadix: [
|
|
2245
|
+
mapToRadix: [et.UNMASKED_RADIX],
|
|
2246
2246
|
min: Number.MIN_SAFE_INTEGER,
|
|
2247
2247
|
max: Number.MAX_SAFE_INTEGER,
|
|
2248
2248
|
scale: 2,
|
|
@@ -2254,24 +2254,24 @@ C.DEFAULTS = {
|
|
|
2254
2254
|
maximumFractionDigits: 20
|
|
2255
2255
|
})
|
|
2256
2256
|
};
|
|
2257
|
-
|
|
2258
|
-
const
|
|
2257
|
+
f.MaskedNumber = C;
|
|
2258
|
+
const G = {
|
|
2259
2259
|
MASKED: "value",
|
|
2260
2260
|
UNMASKED: "unmaskedValue",
|
|
2261
2261
|
TYPED: "typedValue"
|
|
2262
2262
|
};
|
|
2263
|
-
function
|
|
2264
|
-
t === void 0 && (t =
|
|
2263
|
+
function it(a, t, e) {
|
|
2264
|
+
t === void 0 && (t = G.MASKED), e === void 0 && (e = G.MASKED);
|
|
2265
2265
|
const i = A(a);
|
|
2266
2266
|
return (s) => i.runIsolated((n) => (n[t] = s, n[e]));
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2269
|
-
return
|
|
2268
|
+
function At(a, t, e, i) {
|
|
2269
|
+
return it(t, e, i)(a);
|
|
2270
2270
|
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
class
|
|
2271
|
+
f.PIPE_TYPE = G;
|
|
2272
|
+
f.createPipe = it;
|
|
2273
|
+
f.pipe = At;
|
|
2274
|
+
class Ft extends x {
|
|
2275
2275
|
get repeatFrom() {
|
|
2276
2276
|
var t;
|
|
2277
2277
|
return (t = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === 1 / 0 ? 0 : this.repeat) != null ? t : 0;
|
|
@@ -2291,7 +2291,7 @@ class wt extends x {
|
|
|
2291
2291
|
const {
|
|
2292
2292
|
repeat: n,
|
|
2293
2293
|
...r
|
|
2294
|
-
} =
|
|
2294
|
+
} = I(t);
|
|
2295
2295
|
this._blockOpts = Object.assign({}, this._blockOpts, r);
|
|
2296
2296
|
const u = A(this._blockOpts);
|
|
2297
2297
|
this.repeat = (e = (i = n ?? u.repeat) != null ? i : this.repeat) != null ? e : 1 / 0, super._update({
|
|
@@ -2364,12 +2364,40 @@ class wt extends x {
|
|
|
2364
2364
|
this._blocks.length = t._blocks.length, this.mask = this.mask.slice(0, this._blocks.length), super.state = t;
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
|
-
|
|
2367
|
+
f.RepeatBlock = Ft;
|
|
2368
2368
|
try {
|
|
2369
|
-
globalThis.IMask =
|
|
2369
|
+
globalThis.IMask = f;
|
|
2370
2370
|
} catch {
|
|
2371
2371
|
}
|
|
2372
|
-
|
|
2372
|
+
class Bt {
|
|
2373
|
+
constructor(t) {
|
|
2374
|
+
this.host = t, this.host.addController(this);
|
|
2375
|
+
}
|
|
2376
|
+
hostConnected() {
|
|
2377
|
+
}
|
|
2378
|
+
hostDisconnected() {
|
|
2379
|
+
}
|
|
2380
|
+
hostUpdated() {
|
|
2381
|
+
}
|
|
2382
|
+
sync() {
|
|
2383
|
+
if (!this.host.input)
|
|
2384
|
+
return;
|
|
2385
|
+
if (!this.host.autoGrow || this.host.type === "file") {
|
|
2386
|
+
this.host.input.style.removeProperty("width"), this.host.input.style.removeProperty("min-width");
|
|
2387
|
+
return;
|
|
2388
|
+
}
|
|
2389
|
+
const t = this.host.value || this.host.placeholder || " ", e = this.measureWidth(t);
|
|
2390
|
+
if (e <= 0) {
|
|
2391
|
+
this.host.input.style.removeProperty("width"), this.host.input.style.removeProperty("min-width");
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
this.host.input.style.width = `${e}px`, this.host.input.style.removeProperty("min-width");
|
|
2395
|
+
}
|
|
2396
|
+
measureWidth(t) {
|
|
2397
|
+
return this.host.autoGrowMirror ? (this.host.autoGrowMirror.textContent = t || " ", Math.ceil(this.host.autoGrowMirror.getBoundingClientRect().width)) : 0;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
const St = ft`
|
|
2373
2401
|
:host {
|
|
2374
2402
|
display: block;
|
|
2375
2403
|
line-height: normal;
|
|
@@ -2404,6 +2432,12 @@ const Bt = dt`
|
|
|
2404
2432
|
var(--cx-transition-fast) background-color;
|
|
2405
2433
|
}
|
|
2406
2434
|
|
|
2435
|
+
.input--auto-grow {
|
|
2436
|
+
flex: 0 1 auto;
|
|
2437
|
+
width: auto;
|
|
2438
|
+
max-width: 100%;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2407
2441
|
/* Standard inputs */
|
|
2408
2442
|
.input--standard {
|
|
2409
2443
|
background-color: var(--cx-input-background-color);
|
|
@@ -2476,7 +2510,22 @@ const Bt = dt`
|
|
|
2476
2510
|
line-height: var(--cx-line-height-medium);
|
|
2477
2511
|
}
|
|
2478
2512
|
|
|
2479
|
-
.
|
|
2513
|
+
.input__auto-grow-mirror {
|
|
2514
|
+
position: absolute;
|
|
2515
|
+
visibility: hidden;
|
|
2516
|
+
white-space: pre;
|
|
2517
|
+
pointer-events: none;
|
|
2518
|
+
box-sizing: border-box;
|
|
2519
|
+
font: inherit;
|
|
2520
|
+
letter-spacing: inherit;
|
|
2521
|
+
line-height: var(--cx-line-height-medium);
|
|
2522
|
+
padding: 0;
|
|
2523
|
+
margin: 0;
|
|
2524
|
+
border: 0;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
.form-control--has-label .input__control,
|
|
2528
|
+
.form-control--has-label .input__auto-grow-mirror {
|
|
2480
2529
|
padding-top: var(--cx-spacing-x-small);
|
|
2481
2530
|
padding-bottom: var(--cx-spacing-2x-small);
|
|
2482
2531
|
}
|
|
@@ -2557,7 +2606,8 @@ const Bt = dt`
|
|
|
2557
2606
|
min-height: var(--cx-input-height-small);
|
|
2558
2607
|
}
|
|
2559
2608
|
|
|
2560
|
-
.input--small .input__control
|
|
2609
|
+
.input--small .input__control,
|
|
2610
|
+
.input--small .input__auto-grow-mirror {
|
|
2561
2611
|
padding-left: var(--cx-input-spacing-small);
|
|
2562
2612
|
padding-right: var(--cx-input-spacing-small);
|
|
2563
2613
|
}
|
|
@@ -2587,7 +2637,8 @@ const Bt = dt`
|
|
|
2587
2637
|
min-height: var(--cx-input-height-medium);
|
|
2588
2638
|
}
|
|
2589
2639
|
|
|
2590
|
-
.input--medium .input__control
|
|
2640
|
+
.input--medium .input__control,
|
|
2641
|
+
.input--medium .input__auto-grow-mirror {
|
|
2591
2642
|
padding-left: var(--cx-input-spacing-medium);
|
|
2592
2643
|
padding-right: var(--cx-input-spacing-medium);
|
|
2593
2644
|
}
|
|
@@ -2615,7 +2666,8 @@ const Bt = dt`
|
|
|
2615
2666
|
min-height: var(--cx-input-height-large);
|
|
2616
2667
|
}
|
|
2617
2668
|
|
|
2618
|
-
.input--large .input__control
|
|
2669
|
+
.input--large .input__control,
|
|
2670
|
+
.input--large .input__auto-grow-mirror {
|
|
2619
2671
|
padding-left: var(--cx-input-spacing-large);
|
|
2620
2672
|
padding-right: var(--cx-input-spacing-large);
|
|
2621
2673
|
}
|
|
@@ -2729,6 +2781,16 @@ const Bt = dt`
|
|
|
2729
2781
|
width: 0;
|
|
2730
2782
|
}
|
|
2731
2783
|
|
|
2784
|
+
.input-container--auto-grow {
|
|
2785
|
+
flex: 0 1 auto;
|
|
2786
|
+
width: auto;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
.input__control--auto-grow {
|
|
2790
|
+
min-width: var(--cx-input-auto-grow-min-width, 0);
|
|
2791
|
+
max-width: 100%;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2732
2794
|
.form-control__label {
|
|
2733
2795
|
position: relative;
|
|
2734
2796
|
-webkit-transition: transform 0.2s ease-in-out;
|
|
@@ -2874,22 +2936,22 @@ const Bt = dt`
|
|
|
2874
2936
|
z-index: 2;
|
|
2875
2937
|
}
|
|
2876
2938
|
`;
|
|
2877
|
-
var
|
|
2939
|
+
var It = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, st = (a) => {
|
|
2878
2940
|
throw TypeError(a);
|
|
2879
|
-
},
|
|
2880
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2941
|
+
}, h = (a, t, e, i) => {
|
|
2942
|
+
for (var s = i > 1 ? void 0 : i ? Vt(t, e) : t, n = a.length - 1, r; n >= 0; n--)
|
|
2881
2943
|
(r = a[n]) && (s = (i ? r(t, e, s) : r(s)) || s);
|
|
2882
|
-
return i && s &&
|
|
2883
|
-
},
|
|
2884
|
-
let o = class extends
|
|
2944
|
+
return i && s && It(t, e, s), s;
|
|
2945
|
+
}, Dt = (a, t, e) => t.has(a) || st("Cannot " + e), Mt = (a, t, e) => (Dt(a, t, "read from private field"), e ? e.call(a) : t.get(a)), Tt = (a, t, e) => t.has(a) ? st("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, e), H, nt;
|
|
2946
|
+
let o = class extends rt {
|
|
2885
2947
|
constructor() {
|
|
2886
|
-
super(),
|
|
2948
|
+
super(), Tt(this, H), this.formControlController = new pt(this, {
|
|
2887
2949
|
assumeInteractionOn: ["cx-input"]
|
|
2888
|
-
}), this.hasSlotController = new
|
|
2950
|
+
}), this.hasSlotController = new dt(
|
|
2889
2951
|
this,
|
|
2890
2952
|
"help-text",
|
|
2891
2953
|
"label"
|
|
2892
|
-
), this.localize = new
|
|
2954
|
+
), this.localize = new ct(this), this.autoGrowController = new Bt(this), this.hasFocus = !1, this.maskInstance = null, this.containerClicked = !1, this.title = "", this.__numberInput = Object.assign(
|
|
2893
2955
|
document.createElement("input"),
|
|
2894
2956
|
{
|
|
2895
2957
|
type: "number"
|
|
@@ -2899,7 +2961,7 @@ let o = class extends at {
|
|
|
2899
2961
|
{
|
|
2900
2962
|
type: "date"
|
|
2901
2963
|
}
|
|
2902
|
-
), this.type = "text", this.name = "", this.value = "", this.unmaskedValue = "", this.defaultValue = "", this.size = "medium", this.filled = !1, this.pill = !1, this.label = "", this.helpText = "", this.clearable = !1, this.disabled = !1, this.placeholder = "", this.readonly = !1, this.passwordToggle = !1, this.passwordVisible = !1, this.noSpinButtons = !1, this.form = void 0, this.required = !1, this.showLength = !1, this.autocomplete = "off", this.autoFocus = !1, this.spellCheck = !0, this.maskPlaceholder = "_", this.maskLazy = !1, this.maskOverwrite = !1, this.maskBlocks = void 0, this.variant = "default", this.fileButtonLabel = "Choose file", this.buttonOnly = !1, this.fileResultLabel = (a) => {
|
|
2964
|
+
), this.type = "text", this.name = "", this.value = "", this.autoGrow = !1, this.unmaskedValue = "", this.defaultValue = "", this.size = "medium", this.filled = !1, this.pill = !1, this.label = "", this.helpText = "", this.clearable = !1, this.disabled = !1, this.placeholder = "", this.readonly = !1, this.passwordToggle = !1, this.passwordVisible = !1, this.noSpinButtons = !1, this.form = void 0, this.required = !1, this.showLength = !1, this.autocomplete = "off", this.autoFocus = !1, this.spellCheck = !0, this.maskPlaceholder = "_", this.maskLazy = !1, this.maskOverwrite = !1, this.maskBlocks = void 0, this.variant = "default", this.fileButtonLabel = "Choose file", this.buttonOnly = !1, this.fileResultLabel = (a) => {
|
|
2903
2965
|
let t = "No file chosen";
|
|
2904
2966
|
return a?.length && (a.length === 1 ? t = a[0].name : a.length > 1 && (t = `${a.length} files`)), t;
|
|
2905
2967
|
}, this.handleMaskAccept = this.handleMaskAccept.bind(this);
|
|
@@ -2937,7 +2999,7 @@ let o = class extends at {
|
|
|
2937
2999
|
this.initMaskInstance();
|
|
2938
3000
|
}
|
|
2939
3001
|
runFirstUpdated() {
|
|
2940
|
-
this.formControlController.updateValidity();
|
|
3002
|
+
this.formControlController.updateValidity(), this.autoGrowController.sync();
|
|
2941
3003
|
}
|
|
2942
3004
|
disconnectedCallback() {
|
|
2943
3005
|
super.disconnectedCallback(), this.maskInstance?.off("accept", this.handleMaskAccept), this.maskInstance?.destroy();
|
|
@@ -2951,7 +3013,7 @@ let o = class extends at {
|
|
|
2951
3013
|
overwrite: this.maskOverwrite,
|
|
2952
3014
|
placeholderChar: this.maskPlaceholder
|
|
2953
3015
|
};
|
|
2954
|
-
this.maskInstance =
|
|
3016
|
+
this.maskInstance = f(this.input, a);
|
|
2955
3017
|
const t = this.value;
|
|
2956
3018
|
this.value = this.maskInstance.value, this.unmaskedValue = this.maskInstance.unmaskedValue, t !== this.value && this.emit("cx-change"), this.maskInstance.on("accept", this.handleMaskAccept);
|
|
2957
3019
|
}
|
|
@@ -3007,7 +3069,10 @@ let o = class extends at {
|
|
|
3007
3069
|
this.input.step = String(this.step), this.formControlController.updateValidity();
|
|
3008
3070
|
}
|
|
3009
3071
|
async handleValueChange() {
|
|
3010
|
-
await this.updateComplete, this.formControlController.updateValidity(), this.maskInstance?.el && this.value !== this.maskInstance?.value && this.maskInstance.updateValue();
|
|
3072
|
+
await this.updateComplete, this.formControlController.updateValidity(), this.maskInstance?.el && this.value !== this.maskInstance?.value && this.maskInstance.updateValue(), this.autoGrowController.sync();
|
|
3073
|
+
}
|
|
3074
|
+
async handleAutoGrowChange() {
|
|
3075
|
+
await this.updateComplete, this.autoGrowController.sync();
|
|
3011
3076
|
}
|
|
3012
3077
|
/** Sets focus on the input. */
|
|
3013
3078
|
focus(a) {
|
|
@@ -3068,11 +3133,11 @@ let o = class extends at {
|
|
|
3068
3133
|
this.input.setCustomValidity(a), this.formControlController.updateValidity();
|
|
3069
3134
|
}
|
|
3070
3135
|
render() {
|
|
3071
|
-
const a = this.hasSlotController.test("label"), t = this.hasSlotController.test("help-text"), e = this.label ? !0 : !!a, i = this.helpText ? !0 : !!t, n = this.clearable && !this.disabled && !this.readonly && (typeof this.value == "number" || this.value.length > 0), r = typeof this.fileResultLabel == "function" ? this.fileResultLabel(
|
|
3072
|
-
return
|
|
3136
|
+
const a = this.hasSlotController.test("label"), t = this.hasSlotController.test("help-text"), e = this.label ? !0 : !!a, i = this.helpText ? !0 : !!t, n = this.clearable && !this.disabled && !this.readonly && (typeof this.value == "number" || this.value.length > 0), r = this.autoGrow && this.type !== "file", u = typeof this.fileResultLabel == "function" ? this.fileResultLabel(Mt(this, H, nt)) : this.fileResultLabel;
|
|
3137
|
+
return E`
|
|
3073
3138
|
<div
|
|
3074
3139
|
part="form-control"
|
|
3075
|
-
class=${
|
|
3140
|
+
class=${S({
|
|
3076
3141
|
"form-control": !0,
|
|
3077
3142
|
"form-control--file": this.type === "file",
|
|
3078
3143
|
"form-control--has-help-text": i,
|
|
@@ -3085,8 +3150,9 @@ let o = class extends at {
|
|
|
3085
3150
|
<div part="form-control-input" class="form-control-input">
|
|
3086
3151
|
<div
|
|
3087
3152
|
part="base"
|
|
3088
|
-
class=${
|
|
3153
|
+
class=${S({
|
|
3089
3154
|
input: !0,
|
|
3155
|
+
"input--auto-grow": r,
|
|
3090
3156
|
"input--button-only": this.buttonOnly,
|
|
3091
3157
|
"input--disabled": this.disabled,
|
|
3092
3158
|
"input--empty": !this.value,
|
|
@@ -3107,12 +3173,15 @@ let o = class extends at {
|
|
|
3107
3173
|
</span>
|
|
3108
3174
|
|
|
3109
3175
|
<span
|
|
3110
|
-
class
|
|
3176
|
+
class=${S({
|
|
3177
|
+
"input-container": !0,
|
|
3178
|
+
"input-container--auto-grow": r
|
|
3179
|
+
})}
|
|
3111
3180
|
@mousedown=${this.handleContainerMouseDown}
|
|
3112
3181
|
>
|
|
3113
3182
|
<label
|
|
3114
3183
|
part="form-control-label"
|
|
3115
|
-
class=${
|
|
3184
|
+
class=${S({
|
|
3116
3185
|
"form-control__label": !0,
|
|
3117
3186
|
"form-control__label--empty": !this.value
|
|
3118
3187
|
})}
|
|
@@ -3124,7 +3193,10 @@ let o = class extends at {
|
|
|
3124
3193
|
<input
|
|
3125
3194
|
part="input"
|
|
3126
3195
|
id="input"
|
|
3127
|
-
class
|
|
3196
|
+
class=${S({
|
|
3197
|
+
input__control: !0,
|
|
3198
|
+
"input__control--auto-grow": r
|
|
3199
|
+
})}
|
|
3128
3200
|
type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
|
|
3129
3201
|
title=${this.title}
|
|
3130
3202
|
aria-label=${_(this.ariaLabel)}
|
|
@@ -3147,7 +3219,7 @@ let o = class extends at {
|
|
|
3147
3219
|
enterkeyhint=${_(this.enterKeyHint)}
|
|
3148
3220
|
inputmode=${_(this.inputMode)}
|
|
3149
3221
|
aria-describedby="help-text"
|
|
3150
|
-
.value=${
|
|
3222
|
+
.value=${mt(this.value)}
|
|
3151
3223
|
@change=${this.handleChange}
|
|
3152
3224
|
@input=${this.handleInput}
|
|
3153
3225
|
@invalid=${this.handleInvalid}
|
|
@@ -3157,7 +3229,15 @@ let o = class extends at {
|
|
|
3157
3229
|
accept=${_(this.accept)}
|
|
3158
3230
|
?multiple=${this.multiple}
|
|
3159
3231
|
/>
|
|
3160
|
-
${
|
|
3232
|
+
${Y(
|
|
3233
|
+
r,
|
|
3234
|
+
() => E`<span
|
|
3235
|
+
part="auto-grow-mirror"
|
|
3236
|
+
class="input__auto-grow-mirror"
|
|
3237
|
+
aria-hidden="true"
|
|
3238
|
+
></span>`
|
|
3239
|
+
)}
|
|
3240
|
+
${this.type === "file" && !this.buttonOnly ? E`<div
|
|
3161
3241
|
class="input__control input__control--file"
|
|
3162
3242
|
part="file-control"
|
|
3163
3243
|
@click=${this.handleFileButtonClick}
|
|
@@ -3171,10 +3251,10 @@ let o = class extends at {
|
|
|
3171
3251
|
>${this.fileButtonLabel}</cx-button
|
|
3172
3252
|
>
|
|
3173
3253
|
</slot>
|
|
3174
|
-
<span part="file-result">${
|
|
3254
|
+
<span part="file-result">${u}</span>
|
|
3175
3255
|
</div>` : ""}
|
|
3176
3256
|
</span>
|
|
3177
|
-
${this.type === "file" && this.buttonOnly ?
|
|
3257
|
+
${this.type === "file" && this.buttonOnly ? E` <div
|
|
3178
3258
|
class="input__control input__control--file"
|
|
3179
3259
|
part="file-control"
|
|
3180
3260
|
@click=${this.handleFileButtonClick}
|
|
@@ -3189,7 +3269,7 @@ let o = class extends at {
|
|
|
3189
3269
|
>
|
|
3190
3270
|
</slot>
|
|
3191
3271
|
</div>` : ""}
|
|
3192
|
-
${n ?
|
|
3272
|
+
${n ? E`
|
|
3193
3273
|
<button
|
|
3194
3274
|
part="clear-button"
|
|
3195
3275
|
class="input__clear"
|
|
@@ -3203,7 +3283,7 @@ let o = class extends at {
|
|
|
3203
3283
|
</slot>
|
|
3204
3284
|
</button>
|
|
3205
3285
|
` : ""}
|
|
3206
|
-
${this.passwordToggle && !this.disabled ?
|
|
3286
|
+
${this.passwordToggle && !this.disabled ? E`
|
|
3207
3287
|
<button
|
|
3208
3288
|
part="password-toggle-button"
|
|
3209
3289
|
class="input__password-toggle"
|
|
@@ -3214,14 +3294,14 @@ let o = class extends at {
|
|
|
3214
3294
|
@click=${this.handlePasswordToggle}
|
|
3215
3295
|
tabindex="-1"
|
|
3216
3296
|
>
|
|
3217
|
-
${this.passwordVisible ?
|
|
3297
|
+
${this.passwordVisible ? E`
|
|
3218
3298
|
<slot name="show-password-icon">
|
|
3219
3299
|
<cx-icon
|
|
3220
3300
|
name="visibility_off"
|
|
3221
3301
|
library="system"
|
|
3222
3302
|
></cx-icon>
|
|
3223
3303
|
</slot>
|
|
3224
|
-
` :
|
|
3304
|
+
` : E`
|
|
3225
3305
|
<slot name="hide-password-icon">
|
|
3226
3306
|
<cx-icon
|
|
3227
3307
|
name="visibility"
|
|
@@ -3236,7 +3316,7 @@ let o = class extends at {
|
|
|
3236
3316
|
<slot name="suffix"></slot>
|
|
3237
3317
|
</span>
|
|
3238
3318
|
</div>
|
|
3239
|
-
${
|
|
3319
|
+
${Y(this.showLength, () => E`
|
|
3240
3320
|
<div part="character-count" class="input__character-count">
|
|
3241
3321
|
${[
|
|
3242
3322
|
this.minlength && `${this.minlength} /`,
|
|
@@ -3259,131 +3339,137 @@ let o = class extends at {
|
|
|
3259
3339
|
}
|
|
3260
3340
|
};
|
|
3261
3341
|
H = /* @__PURE__ */ new WeakSet();
|
|
3262
|
-
|
|
3342
|
+
nt = function() {
|
|
3263
3343
|
return this.input?.files;
|
|
3264
3344
|
};
|
|
3265
3345
|
o.styles = [
|
|
3266
|
-
rt,
|
|
3267
3346
|
ut,
|
|
3268
|
-
|
|
3347
|
+
ot,
|
|
3348
|
+
St
|
|
3269
3349
|
];
|
|
3270
3350
|
o.dependencies = { "cx-icon": gt };
|
|
3271
|
-
|
|
3272
|
-
|
|
3351
|
+
h([
|
|
3352
|
+
O(".input__control")
|
|
3273
3353
|
], o.prototype, "input", 2);
|
|
3274
|
-
|
|
3275
|
-
|
|
3354
|
+
h([
|
|
3355
|
+
O(".input__auto-grow-mirror")
|
|
3356
|
+
], o.prototype, "autoGrowMirror", 2);
|
|
3357
|
+
h([
|
|
3358
|
+
O(".input-container")
|
|
3276
3359
|
], o.prototype, "inputContainer", 2);
|
|
3277
|
-
|
|
3278
|
-
|
|
3360
|
+
h([
|
|
3361
|
+
O(".form-control__label")
|
|
3279
3362
|
], o.prototype, "labelElement", 2);
|
|
3280
|
-
|
|
3363
|
+
h([
|
|
3281
3364
|
j()
|
|
3282
3365
|
], o.prototype, "hasFocus", 2);
|
|
3283
|
-
|
|
3366
|
+
h([
|
|
3284
3367
|
j()
|
|
3285
3368
|
], o.prototype, "maskInstance", 2);
|
|
3286
|
-
|
|
3369
|
+
h([
|
|
3287
3370
|
j()
|
|
3288
3371
|
], o.prototype, "containerClicked", 2);
|
|
3289
|
-
|
|
3290
|
-
|
|
3372
|
+
h([
|
|
3373
|
+
d()
|
|
3291
3374
|
], o.prototype, "title", 2);
|
|
3292
|
-
|
|
3293
|
-
|
|
3375
|
+
h([
|
|
3376
|
+
d({ reflect: !0 })
|
|
3294
3377
|
], o.prototype, "type", 2);
|
|
3295
|
-
|
|
3296
|
-
|
|
3378
|
+
h([
|
|
3379
|
+
d()
|
|
3297
3380
|
], o.prototype, "name", 2);
|
|
3298
|
-
|
|
3299
|
-
|
|
3381
|
+
h([
|
|
3382
|
+
d()
|
|
3300
3383
|
], o.prototype, "value", 2);
|
|
3301
|
-
|
|
3302
|
-
|
|
3384
|
+
h([
|
|
3385
|
+
d({ attribute: "auto-grow", type: Boolean })
|
|
3386
|
+
], o.prototype, "autoGrow", 2);
|
|
3387
|
+
h([
|
|
3388
|
+
d({ attribute: "unmasked-value", reflect: !0, type: String })
|
|
3303
3389
|
], o.prototype, "unmaskedValue", 2);
|
|
3304
|
-
|
|
3305
|
-
|
|
3390
|
+
h([
|
|
3391
|
+
ht()
|
|
3306
3392
|
], o.prototype, "defaultValue", 2);
|
|
3307
|
-
|
|
3308
|
-
|
|
3393
|
+
h([
|
|
3394
|
+
d({ reflect: !0 })
|
|
3309
3395
|
], o.prototype, "size", 2);
|
|
3310
|
-
|
|
3311
|
-
|
|
3396
|
+
h([
|
|
3397
|
+
d({ reflect: !0, type: Boolean })
|
|
3312
3398
|
], o.prototype, "filled", 2);
|
|
3313
|
-
|
|
3314
|
-
|
|
3399
|
+
h([
|
|
3400
|
+
d({ reflect: !0, type: Boolean })
|
|
3315
3401
|
], o.prototype, "pill", 2);
|
|
3316
|
-
|
|
3317
|
-
|
|
3402
|
+
h([
|
|
3403
|
+
d()
|
|
3318
3404
|
], o.prototype, "label", 2);
|
|
3319
|
-
|
|
3320
|
-
|
|
3405
|
+
h([
|
|
3406
|
+
d({ attribute: "help-text" })
|
|
3321
3407
|
], o.prototype, "helpText", 2);
|
|
3322
|
-
|
|
3323
|
-
|
|
3408
|
+
h([
|
|
3409
|
+
d({ type: Boolean })
|
|
3324
3410
|
], o.prototype, "clearable", 2);
|
|
3325
|
-
|
|
3326
|
-
|
|
3411
|
+
h([
|
|
3412
|
+
d({ reflect: !0, type: Boolean })
|
|
3327
3413
|
], o.prototype, "disabled", 2);
|
|
3328
|
-
|
|
3329
|
-
|
|
3414
|
+
h([
|
|
3415
|
+
d()
|
|
3330
3416
|
], o.prototype, "placeholder", 2);
|
|
3331
|
-
|
|
3332
|
-
|
|
3417
|
+
h([
|
|
3418
|
+
d({ reflect: !0, type: Boolean })
|
|
3333
3419
|
], o.prototype, "readonly", 2);
|
|
3334
|
-
|
|
3335
|
-
|
|
3420
|
+
h([
|
|
3421
|
+
d({ attribute: "password-toggle", type: Boolean })
|
|
3336
3422
|
], o.prototype, "passwordToggle", 2);
|
|
3337
|
-
|
|
3338
|
-
|
|
3423
|
+
h([
|
|
3424
|
+
d({ attribute: "password-visible", type: Boolean })
|
|
3339
3425
|
], o.prototype, "passwordVisible", 2);
|
|
3340
|
-
|
|
3341
|
-
|
|
3426
|
+
h([
|
|
3427
|
+
d({ attribute: "no-spin-buttons", type: Boolean })
|
|
3342
3428
|
], o.prototype, "noSpinButtons", 2);
|
|
3343
|
-
|
|
3344
|
-
|
|
3429
|
+
h([
|
|
3430
|
+
d({ reflect: !1 })
|
|
3345
3431
|
], o.prototype, "form", 2);
|
|
3346
|
-
|
|
3347
|
-
|
|
3432
|
+
h([
|
|
3433
|
+
d({ reflect: !0, type: Boolean })
|
|
3348
3434
|
], o.prototype, "required", 2);
|
|
3349
|
-
|
|
3350
|
-
|
|
3435
|
+
h([
|
|
3436
|
+
d()
|
|
3351
3437
|
], o.prototype, "pattern", 2);
|
|
3352
|
-
|
|
3353
|
-
|
|
3438
|
+
h([
|
|
3439
|
+
d({ type: Number })
|
|
3354
3440
|
], o.prototype, "minlength", 2);
|
|
3355
|
-
|
|
3356
|
-
|
|
3441
|
+
h([
|
|
3442
|
+
d({ type: Number })
|
|
3357
3443
|
], o.prototype, "maxlength", 2);
|
|
3358
|
-
|
|
3359
|
-
|
|
3444
|
+
h([
|
|
3445
|
+
d({ attribute: "show-length", type: Boolean })
|
|
3360
3446
|
], o.prototype, "showLength", 2);
|
|
3361
|
-
|
|
3362
|
-
|
|
3447
|
+
h([
|
|
3448
|
+
d()
|
|
3363
3449
|
], o.prototype, "min", 2);
|
|
3364
|
-
|
|
3365
|
-
|
|
3450
|
+
h([
|
|
3451
|
+
d()
|
|
3366
3452
|
], o.prototype, "max", 2);
|
|
3367
|
-
|
|
3368
|
-
|
|
3453
|
+
h([
|
|
3454
|
+
d()
|
|
3369
3455
|
], o.prototype, "step", 2);
|
|
3370
|
-
|
|
3371
|
-
|
|
3456
|
+
h([
|
|
3457
|
+
d({ attribute: "autocapitalize", reflect: !0, type: String })
|
|
3372
3458
|
], o.prototype, "autoCapitalize", 2);
|
|
3373
|
-
|
|
3374
|
-
|
|
3459
|
+
h([
|
|
3460
|
+
d({ attribute: "autocorrect", reflect: !0, type: String })
|
|
3375
3461
|
], o.prototype, "autoCorrect", 2);
|
|
3376
|
-
|
|
3377
|
-
|
|
3462
|
+
h([
|
|
3463
|
+
d()
|
|
3378
3464
|
], o.prototype, "autocomplete", 2);
|
|
3379
|
-
|
|
3380
|
-
|
|
3465
|
+
h([
|
|
3466
|
+
d({ attribute: "autofocus", type: Boolean })
|
|
3381
3467
|
], o.prototype, "autoFocus", 2);
|
|
3382
|
-
|
|
3383
|
-
|
|
3468
|
+
h([
|
|
3469
|
+
d({ attribute: "enterkeyhint", reflect: !0, type: String })
|
|
3384
3470
|
], o.prototype, "enterKeyHint", 2);
|
|
3385
|
-
|
|
3386
|
-
|
|
3471
|
+
h([
|
|
3472
|
+
d({
|
|
3387
3473
|
attribute: "spellcheck",
|
|
3388
3474
|
converter: {
|
|
3389
3475
|
// Allow "true|false" attribute values but keep the property boolean
|
|
@@ -3394,20 +3480,20 @@ p([
|
|
|
3394
3480
|
type: Boolean
|
|
3395
3481
|
})
|
|
3396
3482
|
], o.prototype, "spellCheck", 2);
|
|
3397
|
-
|
|
3398
|
-
|
|
3483
|
+
h([
|
|
3484
|
+
d({ attribute: "inputmode", reflect: !0, type: String })
|
|
3399
3485
|
], o.prototype, "inputMode", 2);
|
|
3400
|
-
|
|
3401
|
-
|
|
3486
|
+
h([
|
|
3487
|
+
d()
|
|
3402
3488
|
], o.prototype, "mask", 2);
|
|
3403
|
-
|
|
3404
|
-
|
|
3489
|
+
h([
|
|
3490
|
+
d({ attribute: "mask-placeholder" })
|
|
3405
3491
|
], o.prototype, "maskPlaceholder", 2);
|
|
3406
|
-
|
|
3407
|
-
|
|
3492
|
+
h([
|
|
3493
|
+
d({ attribute: "mask-lazy", type: Boolean })
|
|
3408
3494
|
], o.prototype, "maskLazy", 2);
|
|
3409
|
-
|
|
3410
|
-
|
|
3495
|
+
h([
|
|
3496
|
+
d({
|
|
3411
3497
|
attribute: "mask-overwrite",
|
|
3412
3498
|
converter: {
|
|
3413
3499
|
fromAttribute: (a) => a === "shift" ? a : a !== void 0,
|
|
@@ -3415,29 +3501,29 @@ p([
|
|
|
3415
3501
|
}
|
|
3416
3502
|
})
|
|
3417
3503
|
], o.prototype, "maskOverwrite", 2);
|
|
3418
|
-
|
|
3419
|
-
|
|
3504
|
+
h([
|
|
3505
|
+
d({ attribute: "mask-blocks", type: Object })
|
|
3420
3506
|
], o.prototype, "maskBlocks", 2);
|
|
3421
|
-
|
|
3422
|
-
|
|
3507
|
+
h([
|
|
3508
|
+
d()
|
|
3423
3509
|
], o.prototype, "accept", 2);
|
|
3424
|
-
|
|
3425
|
-
|
|
3510
|
+
h([
|
|
3511
|
+
d({ type: Boolean })
|
|
3426
3512
|
], o.prototype, "multiple", 2);
|
|
3427
|
-
|
|
3428
|
-
|
|
3513
|
+
h([
|
|
3514
|
+
d({ reflect: !0 })
|
|
3429
3515
|
], o.prototype, "variant", 2);
|
|
3430
|
-
|
|
3431
|
-
|
|
3516
|
+
h([
|
|
3517
|
+
d({ attribute: "file-button-label" })
|
|
3432
3518
|
], o.prototype, "fileButtonLabel", 2);
|
|
3433
|
-
|
|
3434
|
-
|
|
3519
|
+
h([
|
|
3520
|
+
d({ attribute: "button-only", type: Boolean })
|
|
3435
3521
|
], o.prototype, "buttonOnly", 2);
|
|
3436
|
-
|
|
3437
|
-
|
|
3522
|
+
h([
|
|
3523
|
+
d({ attribute: "file-result-label" })
|
|
3438
3524
|
], o.prototype, "fileResultLabel", 2);
|
|
3439
|
-
|
|
3440
|
-
|
|
3525
|
+
h([
|
|
3526
|
+
V(
|
|
3441
3527
|
["mask", "maskBlocks", "maskLazy", "maskOverwrite", "maskPlaceholder"],
|
|
3442
3528
|
{
|
|
3443
3529
|
deepCompare: !0,
|
|
@@ -3445,16 +3531,19 @@ p([
|
|
|
3445
3531
|
}
|
|
3446
3532
|
)
|
|
3447
3533
|
], o.prototype, "initMaskInstance", 1);
|
|
3448
|
-
|
|
3449
|
-
|
|
3534
|
+
h([
|
|
3535
|
+
V("disabled", { waitUntilFirstUpdate: !0 })
|
|
3450
3536
|
], o.prototype, "handleDisabledChange", 1);
|
|
3451
|
-
|
|
3452
|
-
|
|
3537
|
+
h([
|
|
3538
|
+
V("step", { waitUntilFirstUpdate: !0 })
|
|
3453
3539
|
], o.prototype, "handleStepChange", 1);
|
|
3454
|
-
|
|
3455
|
-
|
|
3540
|
+
h([
|
|
3541
|
+
V("value", { waitUntilFirstUpdate: !0 })
|
|
3456
3542
|
], o.prototype, "handleValueChange", 1);
|
|
3457
|
-
|
|
3543
|
+
h([
|
|
3544
|
+
V(["autoGrow", "placeholder", "type"], { waitUntilFirstUpdate: !0 })
|
|
3545
|
+
], o.prototype, "handleAutoGrowChange", 1);
|
|
3546
|
+
o = h([
|
|
3458
3547
|
lt("cx-input")
|
|
3459
3548
|
], o);
|
|
3460
3549
|
export {
|