vue-spear-tip 0.2.1 → 0.2.2
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/dist/.vite/manifest.json +17 -17
- package/dist/{Button-C5m9ByFN.js → Button-DZlKBvlw.js} +1 -1
- package/dist/{Button-BEdTx9u1.cjs → Button-DpDqwLlR.cjs} +1 -1
- package/dist/{CodeHighlight-BQ1d2aqx.js → CodeHighlight-BONqkePV.js} +1 -1
- package/dist/{CodeHighlight-nbryO056.cjs → CodeHighlight-WaVjepT3.cjs} +1 -1
- package/dist/{DateField-DxsK3GG9.cjs → DateField-BwOE2XuE.cjs} +4 -4
- package/dist/{DateField-CFvAUmKN.js → DateField-DCshiDON.js} +324 -317
- package/dist/Interfaces/IGlobalVST.d.ts +6 -0
- package/dist/{SelectField-BOx6vfDK.js → SelectField-C97iZqqJ.js} +140 -133
- package/dist/{SelectField-ClKKyDbm.cjs → SelectField-DJg-e6r7.cjs} +7 -7
- package/dist/{StringField-DRfphhbX.cjs → StringField-BiddnfN1.cjs} +1 -1
- package/dist/{StringField-DdPq8L1n.js → StringField-q2EjZuwT.js} +121 -123
- package/dist/Tabs--qXAltMn.cjs +1 -0
- package/dist/Tabs-i2bTEtg7.js +77 -0
- package/dist/{index-B5vZ3Sg-.cjs → index-BmhExWks.cjs} +1 -1
- package/dist/{index-D38VsUaN.js → index-hQ1VmssH.js} +338 -317
- package/dist/replaceable/BaseComponent.vue +1 -0
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +2 -2
- package/docs/static/{Button-gIUrdnJP.js → Button-BI5BLid9.js} +1 -1
- package/docs/static/{ButtonInherited-D2Mzenov.js → ButtonInherited-Dwuz_QB-.js} +1 -1
- package/docs/static/{CodeHighlight-DrpNg95H.js → CodeHighlight-DwP55Obc.js} +1 -1
- package/docs/static/{DateField-BvSvZnWx.js → DateField-BD-4IMMe.js} +4 -4
- package/docs/static/{DateField-BvE8SnW6.css → DateField-DfbnkNv3.css} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-C1h8xGCf.js → FieldComponent.vue_vue_type_script_lang-Dwp-wLcy.js} +1 -1
- package/docs/static/{SelectField-CM692gdJ.css → SelectField-BMU3NQkW.css} +1 -1
- package/docs/static/{SelectField-BqYtVfX-.js → SelectField-DdvXIk4C.js} +7 -7
- package/docs/static/StringField-BqYql_dk.js +1 -0
- package/docs/static/StringField-DV9336PV.css +1 -0
- package/docs/static/Tabs-Co8T0Qi9.css +1 -0
- package/docs/static/Tabs-CwTc00Yi.js +1 -0
- package/docs/static/index-BXtpWRTc.js +2 -0
- package/docs/static/index-BeNEN9J-.js +2 -0
- package/docs/static/index-CMpYTAiF.js +2 -0
- package/docs/static/index-DMKgrxE1.js +2 -0
- package/docs/static/index-Dsi6A5t5.js +2 -0
- package/docs/static/index-Nc0Poa_J.js +2 -0
- package/docs/static/main-C7jrUur6.css +1 -0
- package/docs/static/main-C8MaaDZb.js +103 -0
- package/package.json +1 -1
- package/dist/Tabs-BGaFVFbD.js +0 -57
- package/dist/Tabs-CSkFtqJi.cjs +0 -1
- package/docs/static/StringField-Dyl3XDRE.js +0 -1
- package/docs/static/StringField-ifygx7YK.css +0 -1
- package/docs/static/Tabs-BB0HZDmo.css +0 -1
- package/docs/static/Tabs-BNUXJT3V.js +0 -1
- package/docs/static/index-BDibxxvJ.js +0 -2
- package/docs/static/index-BvlNGib6.js +0 -2
- package/docs/static/index-CVDxaFb5.js +0 -2
- package/docs/static/index-DsOd_0-n.js +0 -2
- package/docs/static/index-aQmObjQp.js +0 -2
- package/docs/static/index-hac6GmDh.js +0 -2
- package/docs/static/main-21CU6hww.css +0 -1
- package/docs/static/main-BwdfadvU.js +0 -103
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (u, e) =>
|
|
3
|
-
import { F as Je, P as j,
|
|
4
|
-
import { isRef as
|
|
5
|
-
import { _ as
|
|
1
|
+
var We = Object.defineProperty;
|
|
2
|
+
var o = (u, e) => We(u, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { F as Je, P as j, C as Qe, V as et } from "./index-hQ1VmssH.js";
|
|
4
|
+
import { isRef as tt, ref as O, watch as x, onMounted as st, onUnmounted as it, readonly as at, defineComponent as nt, toRef as G, h as ut, createElementBlock as M, openBlock as y, createElementVNode as q, resolveComponent as X, normalizeClass as de, createCommentVNode as W, createBlock as pe, createVNode as je, withKeys as rt, normalizeStyle as lt, toDisplayString as ce, resolveDynamicComponent as ot, withCtx as ht, createTextVNode as dt } from "vue";
|
|
5
|
+
import { _ as pt } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
6
|
function b(u) {
|
|
7
7
|
return typeof u == "string" || u instanceof String;
|
|
8
8
|
}
|
|
@@ -26,7 +26,7 @@ const d = {
|
|
|
26
26
|
RIGHT: "RIGHT",
|
|
27
27
|
FORCE_RIGHT: "FORCE_RIGHT"
|
|
28
28
|
};
|
|
29
|
-
function
|
|
29
|
+
function ct(u) {
|
|
30
30
|
switch (u) {
|
|
31
31
|
case d.LEFT:
|
|
32
32
|
return d.FORCE_LEFT;
|
|
@@ -36,7 +36,7 @@ function ft(u) {
|
|
|
36
36
|
return u;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
o(
|
|
39
|
+
o(ct, "forceDirection");
|
|
40
40
|
function fe(u) {
|
|
41
41
|
return u.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
|
|
42
42
|
}
|
|
@@ -203,7 +203,7 @@ const ye = class ye {
|
|
|
203
203
|
o(ye, "MaskElement");
|
|
204
204
|
let K = ye;
|
|
205
205
|
c.MaskElement = K;
|
|
206
|
-
const ze = 90,
|
|
206
|
+
const ze = 90, ft = 89, Se = class Se extends K {
|
|
207
207
|
/** HTMLElement to use mask on */
|
|
208
208
|
constructor(e) {
|
|
209
209
|
super(), this.input = e, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
|
|
@@ -221,7 +221,7 @@ const ze = 90, mt = 89, Se = class Se extends K {
|
|
|
221
221
|
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", e.drop), this.input.addEventListener("click", e.click), this.input.addEventListener("focus", e.focus), this.input.addEventListener("blur", e.commit), this._handlers = e;
|
|
222
222
|
}
|
|
223
223
|
_onKeydown(e) {
|
|
224
|
-
if (this._handlers.redo && (e.keyCode === ze && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode ===
|
|
224
|
+
if (this._handlers.redo && (e.keyCode === ze && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === ft && e.ctrlKey))
|
|
225
225
|
return e.preventDefault(), this._handlers.redo(e);
|
|
226
226
|
if (this._handlers.undo && e.keyCode === ze && (e.metaKey || e.ctrlKey))
|
|
227
227
|
return e.preventDefault(), this._handlers.undo(e);
|
|
@@ -579,7 +579,7 @@ const ue = class ue {
|
|
|
579
579
|
o(ue, "ChangeDetails");
|
|
580
580
|
let f = ue;
|
|
581
581
|
c.ChangeDetails = f;
|
|
582
|
-
const
|
|
582
|
+
const be = class be {
|
|
583
583
|
/** Tail value as string */
|
|
584
584
|
/** Tail start position */
|
|
585
585
|
/** Start position */
|
|
@@ -618,8 +618,8 @@ const Ie = class Ie {
|
|
|
618
618
|
return this.value = this.value.slice(0, -1), e;
|
|
619
619
|
}
|
|
620
620
|
};
|
|
621
|
-
o(
|
|
622
|
-
let A =
|
|
621
|
+
o(be, "ContinuousTailDetails");
|
|
622
|
+
let A = be;
|
|
623
623
|
const L = class L {
|
|
624
624
|
/** */
|
|
625
625
|
/** */
|
|
@@ -831,7 +831,7 @@ const L = class L {
|
|
|
831
831
|
});
|
|
832
832
|
const n = e + t, r = this.extractTail(n), l = this.eager === !0 || this.eager === "remove";
|
|
833
833
|
let h;
|
|
834
|
-
l && (i =
|
|
834
|
+
l && (i = ct(i), h = this.extractInput(0, n, {
|
|
835
835
|
raw: !0
|
|
836
836
|
}));
|
|
837
837
|
let p = e;
|
|
@@ -965,7 +965,7 @@ const D = class D {
|
|
|
965
965
|
};
|
|
966
966
|
o(D, "ChunksTailDetails");
|
|
967
967
|
let te = D;
|
|
968
|
-
const
|
|
968
|
+
const Ie = class Ie {
|
|
969
969
|
constructor(e, t) {
|
|
970
970
|
this.masked = e, this._log = [];
|
|
971
971
|
const {
|
|
@@ -1061,8 +1061,8 @@ const be = class be {
|
|
|
1061
1061
|
});
|
|
1062
1062
|
}
|
|
1063
1063
|
};
|
|
1064
|
-
o(
|
|
1065
|
-
let ve =
|
|
1064
|
+
o(Ie, "PatternCursor");
|
|
1065
|
+
let ve = Ie;
|
|
1066
1066
|
const we = class we {
|
|
1067
1067
|
/** */
|
|
1068
1068
|
/** */
|
|
@@ -1688,7 +1688,7 @@ const Te = class Te extends E {
|
|
|
1688
1688
|
o(Te, "MaskedRange");
|
|
1689
1689
|
let P = Te;
|
|
1690
1690
|
c.MaskedRange = P;
|
|
1691
|
-
const
|
|
1691
|
+
const mt = "d{.}`m{.}`Y", B = class B extends E {
|
|
1692
1692
|
static extractPatternOptions(e) {
|
|
1693
1693
|
const {
|
|
1694
1694
|
mask: t,
|
|
@@ -1706,8 +1706,8 @@ const kt = "d{.}`m{.}`Y", x = class x extends E {
|
|
|
1706
1706
|
/** Format typed value to string */
|
|
1707
1707
|
/** Parse string to get typed value */
|
|
1708
1708
|
constructor(e) {
|
|
1709
|
-
super(
|
|
1710
|
-
...
|
|
1709
|
+
super(B.extractPatternOptions({
|
|
1710
|
+
...B.DEFAULTS,
|
|
1711
1711
|
...e
|
|
1712
1712
|
}));
|
|
1713
1713
|
}
|
|
@@ -1721,9 +1721,9 @@ const kt = "d{.}`m{.}`Y", x = class x extends E {
|
|
|
1721
1721
|
blocks: i,
|
|
1722
1722
|
...a
|
|
1723
1723
|
} = {
|
|
1724
|
-
...
|
|
1724
|
+
...B.DEFAULTS,
|
|
1725
1725
|
...e
|
|
1726
|
-
}, n = Object.assign({},
|
|
1726
|
+
}, n = Object.assign({}, B.GET_DEFAULT_BLOCKS());
|
|
1727
1727
|
e.min && (n.Y.from = e.min.getFullYear()), e.max && (n.Y.to = e.max.getFullYear()), e.min && e.max && n.Y.from === n.Y.to && (n.m.from = e.min.getMonth() + 1, n.m.to = e.max.getMonth() + 1, n.m.from === n.m.to && (n.d.from = e.min.getDate(), n.d.to = e.max.getDate())), Object.assign(n, this.blocks, i), super._update({
|
|
1728
1728
|
...a,
|
|
1729
1729
|
mask: b(t) ? t : s,
|
|
@@ -1755,11 +1755,11 @@ const kt = "d{.}`m{.}`Y", x = class x extends E {
|
|
|
1755
1755
|
return e === Date || super.maskEquals(e);
|
|
1756
1756
|
}
|
|
1757
1757
|
optionsIsChanged(e) {
|
|
1758
|
-
return super.optionsIsChanged(
|
|
1758
|
+
return super.optionsIsChanged(B.extractPatternOptions(e));
|
|
1759
1759
|
}
|
|
1760
1760
|
};
|
|
1761
|
-
o(
|
|
1762
|
-
let H =
|
|
1761
|
+
o(B, "MaskedDate");
|
|
1762
|
+
let H = B;
|
|
1763
1763
|
H.GET_DEFAULT_BLOCKS = () => ({
|
|
1764
1764
|
d: {
|
|
1765
1765
|
mask: P,
|
|
@@ -1782,7 +1782,7 @@ H.GET_DEFAULT_BLOCKS = () => ({
|
|
|
1782
1782
|
H.DEFAULTS = {
|
|
1783
1783
|
...E.DEFAULTS,
|
|
1784
1784
|
mask: Date,
|
|
1785
|
-
pattern:
|
|
1785
|
+
pattern: mt,
|
|
1786
1786
|
format: /* @__PURE__ */ o((u, e) => {
|
|
1787
1787
|
if (!u) return "";
|
|
1788
1788
|
const t = String(u.getDate()).padStart(2, "0"), s = String(u.getMonth() + 1).padStart(2, "0"), i = u.getFullYear();
|
|
@@ -2089,7 +2089,7 @@ o(Re, "MaskedFunction");
|
|
|
2089
2089
|
let Ce = Re;
|
|
2090
2090
|
c.MaskedFunction = Ce;
|
|
2091
2091
|
var Ze;
|
|
2092
|
-
const
|
|
2092
|
+
const F = class F extends C {
|
|
2093
2093
|
/** Single char */
|
|
2094
2094
|
/** Single char */
|
|
2095
2095
|
/** Array of single chars */
|
|
@@ -2106,7 +2106,7 @@ const y = class y extends C {
|
|
|
2106
2106
|
/** Parse string to get typed value */
|
|
2107
2107
|
constructor(e) {
|
|
2108
2108
|
super({
|
|
2109
|
-
...
|
|
2109
|
+
...F.DEFAULTS,
|
|
2110
2110
|
...e
|
|
2111
2111
|
});
|
|
2112
2112
|
}
|
|
@@ -2163,7 +2163,7 @@ const y = class y extends C {
|
|
|
2163
2163
|
let r = !isNaN(n), l = !1;
|
|
2164
2164
|
if (r) {
|
|
2165
2165
|
let g;
|
|
2166
|
-
this.min != null && this.min < 0 && this.number < this.min && (g = this.min), this.max != null && this.max > 0 && this.number > this.max && (g = this.max), g != null && (this.autofix ? (this._value = this.format(g, this).replace(
|
|
2166
|
+
this.min != null && this.min < 0 && this.number < this.min && (g = this.min), this.max != null && this.max > 0 && this.number > this.max && (g = this.max), g != null && (this.autofix ? (this._value = this.format(g, this).replace(F.UNMASKED_RADIX, this.radix), l || (l = a === this._value && !t.tail)) : r = !1), r && (r = !!this._value.match(this._numberRegExp));
|
|
2167
2167
|
}
|
|
2168
2168
|
let h;
|
|
2169
2169
|
r ? h = new f({
|
|
@@ -2240,11 +2240,11 @@ const y = class y extends C {
|
|
|
2240
2240
|
}
|
|
2241
2241
|
doSkipInvalid(e, t, s) {
|
|
2242
2242
|
t === void 0 && (t = {});
|
|
2243
|
-
const i = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e ===
|
|
2243
|
+
const i = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e === F.UNMASKED_RADIX || this.mapToRadix.includes(e));
|
|
2244
2244
|
return super.doSkipInvalid(e, t, s) && !i;
|
|
2245
2245
|
}
|
|
2246
2246
|
get unmaskedValue() {
|
|
2247
|
-
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,
|
|
2247
|
+
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, F.UNMASKED_RADIX);
|
|
2248
2248
|
}
|
|
2249
2249
|
set unmaskedValue(e) {
|
|
2250
2250
|
super.unmaskedValue = e;
|
|
@@ -2253,7 +2253,7 @@ const y = class y extends C {
|
|
|
2253
2253
|
return this.parse(this.unmaskedValue, this);
|
|
2254
2254
|
}
|
|
2255
2255
|
set typedValue(e) {
|
|
2256
|
-
this.rawInputValue = this.format(e, this).replace(
|
|
2256
|
+
this.rawInputValue = this.format(e, this).replace(F.UNMASKED_RADIX, this.radix);
|
|
2257
2257
|
}
|
|
2258
2258
|
/** Parsed Number */
|
|
2259
2259
|
get number() {
|
|
@@ -2269,11 +2269,11 @@ const y = class y extends C {
|
|
|
2269
2269
|
return this.min != null && this.min > 0 || this.max != null && this.max > 0;
|
|
2270
2270
|
}
|
|
2271
2271
|
typedValueEquals(e) {
|
|
2272
|
-
return (super.typedValueEquals(e) ||
|
|
2272
|
+
return (super.typedValueEquals(e) || F.EMPTY_VALUES.includes(e) && F.EMPTY_VALUES.includes(this.typedValue)) && !(e === 0 && this.value === "");
|
|
2273
2273
|
}
|
|
2274
2274
|
};
|
|
2275
|
-
o(
|
|
2276
|
-
let T =
|
|
2275
|
+
o(F, "MaskedNumber");
|
|
2276
|
+
let T = F;
|
|
2277
2277
|
Ze = T;
|
|
2278
2278
|
T.UNMASKED_RADIX = ".";
|
|
2279
2279
|
T.EMPTY_VALUES = [...C.EMPTY_VALUES, 0];
|
|
@@ -2306,13 +2306,13 @@ function Ge(u, e, t) {
|
|
|
2306
2306
|
return (i) => s.runIsolated((a) => (a[e] = i, a[t]));
|
|
2307
2307
|
}
|
|
2308
2308
|
o(Ge, "createPipe");
|
|
2309
|
-
function
|
|
2309
|
+
function kt(u, e, t, s) {
|
|
2310
2310
|
return Ge(e, t, s)(u);
|
|
2311
2311
|
}
|
|
2312
|
-
o(
|
|
2312
|
+
o(kt, "pipe");
|
|
2313
2313
|
c.PIPE_TYPE = Ee;
|
|
2314
2314
|
c.createPipe = Ge;
|
|
2315
|
-
c.pipe =
|
|
2315
|
+
c.pipe = kt;
|
|
2316
2316
|
const Oe = class Oe extends E {
|
|
2317
2317
|
get repeatFrom() {
|
|
2318
2318
|
var e;
|
|
@@ -2413,7 +2413,7 @@ try {
|
|
|
2413
2413
|
globalThis.IMask = c;
|
|
2414
2414
|
} catch {
|
|
2415
2415
|
}
|
|
2416
|
-
var
|
|
2416
|
+
var gt = {
|
|
2417
2417
|
// common
|
|
2418
2418
|
mask: void 0,
|
|
2419
2419
|
prepare: Function,
|
|
@@ -2480,7 +2480,7 @@ var vt = {
|
|
|
2480
2480
|
// dynamic
|
|
2481
2481
|
dispatch: Function
|
|
2482
2482
|
};
|
|
2483
|
-
function
|
|
2483
|
+
function vt(u, e) {
|
|
2484
2484
|
let {
|
|
2485
2485
|
emit: t,
|
|
2486
2486
|
onAccept: s,
|
|
@@ -2489,7 +2489,7 @@ function _t(u, e) {
|
|
|
2489
2489
|
defaultUnmaskedValue: n,
|
|
2490
2490
|
defaultTypedValue: r
|
|
2491
2491
|
} = e === void 0 ? {} : e;
|
|
2492
|
-
const l =
|
|
2492
|
+
const l = tt(u) ? u : O(u), h = O(), p = O(), k = O(""), g = O(""), m = O();
|
|
2493
2493
|
let _, R = k.value, w = g.value, oe = m.value;
|
|
2494
2494
|
function Le() {
|
|
2495
2495
|
oe = m.value = p.value.typedValue, w = g.value = p.value.unmaskedValue, R = k.value = p.value.value;
|
|
@@ -2499,54 +2499,54 @@ function _t(u, e) {
|
|
|
2499
2499
|
Le(), t && (t("accept", k.value, v), t("accept:masked", k.value, v), t("accept:typed", m.value, v), t("accept:unmasked", g.value, v)), s?.(v);
|
|
2500
2500
|
}
|
|
2501
2501
|
o(Z, "_onAccept");
|
|
2502
|
-
function
|
|
2502
|
+
function Xe(v) {
|
|
2503
2503
|
t && (t("complete", p.value.value, v), t("complete:masked", p.value.value, v), t("complete:typed", p.value.typedValue, v), t("complete:unmasked", p.value.unmaskedValue, v)), i?.(v);
|
|
2504
2504
|
}
|
|
2505
|
-
o(
|
|
2505
|
+
o(Xe, "_onComplete");
|
|
2506
2506
|
const Ne = /* @__PURE__ */ o(() => {
|
|
2507
2507
|
!p.value || g.value === void 0 || (w !== g.value && (p.value.unmaskedValue = g.value, p.value.unmaskedValue !== g.value && Z()), w = void 0);
|
|
2508
2508
|
}, "updateUnmaskedValue");
|
|
2509
|
-
|
|
2509
|
+
x(g, Ne);
|
|
2510
2510
|
const Pe = /* @__PURE__ */ o(() => {
|
|
2511
2511
|
!p.value || k.value === void 0 || (R !== k.value && (p.value.value = k.value, p.value.value !== k.value && Z()), R = void 0);
|
|
2512
2512
|
}, "updateMaskedValue");
|
|
2513
|
-
|
|
2513
|
+
x(k, Pe);
|
|
2514
2514
|
const Ue = /* @__PURE__ */ o(() => {
|
|
2515
2515
|
!p.value || m.value === void 0 || (oe !== m.value && (p.value.typedValue = m.value, p.value.masked.typedValueEquals(m.value) || Z()), oe = void 0);
|
|
2516
2516
|
}, "updateTypedValue");
|
|
2517
|
-
|
|
2517
|
+
x(m, Ue);
|
|
2518
2518
|
function $e() {
|
|
2519
2519
|
_ = h.value;
|
|
2520
2520
|
const v = l.value;
|
|
2521
|
-
!_ || !(v != null && v.mask) || (p.value = c(_, v), a !== void 0 && (k.value = a), n !== void 0 && (g.value = n), r !== void 0 && (m.value = r), Ne(), Pe(), Ue(), Le(), p.value.on("accept", Z).on("complete",
|
|
2521
|
+
!_ || !(v != null && v.mask) || (p.value = c(_, v), a !== void 0 && (k.value = a), n !== void 0 && (g.value = n), r !== void 0 && (m.value = r), Ne(), Pe(), Ue(), Le(), p.value.on("accept", Z).on("complete", Xe));
|
|
2522
2522
|
}
|
|
2523
2523
|
o($e, "_initMask");
|
|
2524
2524
|
function Ye() {
|
|
2525
2525
|
var v;
|
|
2526
2526
|
(v = p.value) == null || v.destroy(), p.value = void 0;
|
|
2527
2527
|
}
|
|
2528
|
-
return o(Ye, "_destroyMask"),
|
|
2528
|
+
return o(Ye, "_destroyMask"), st($e), it(Ye), x([h, l], () => {
|
|
2529
2529
|
const v = h.value, he = l.value;
|
|
2530
2530
|
(!(he != null && he.mask) || v !== _) && Ye(), v && (p.value ? p.value.updateOptions(he) : $e());
|
|
2531
2531
|
}), {
|
|
2532
2532
|
el: h,
|
|
2533
|
-
mask:
|
|
2533
|
+
mask: at(p),
|
|
2534
2534
|
masked: k,
|
|
2535
2535
|
unmasked: g,
|
|
2536
2536
|
typed: m
|
|
2537
2537
|
};
|
|
2538
2538
|
}
|
|
2539
|
-
o(
|
|
2540
|
-
function
|
|
2539
|
+
o(vt, "useIMask");
|
|
2540
|
+
function _t(u, e) {
|
|
2541
2541
|
return u = {
|
|
2542
2542
|
...u
|
|
2543
2543
|
}, Object.keys(u).forEach((t) => {
|
|
2544
2544
|
(u[t] === void 0 || e.includes(t)) && delete u[t];
|
|
2545
2545
|
}), u;
|
|
2546
2546
|
}
|
|
2547
|
-
o(
|
|
2548
|
-
const
|
|
2549
|
-
var
|
|
2547
|
+
o(_t, "extractOptionsFromProps");
|
|
2548
|
+
const Ct = ["typed", "unmasked", "value", "modelValue"];
|
|
2549
|
+
var Et = nt({
|
|
2550
2550
|
name: "imask-input",
|
|
2551
2551
|
inheritAttrs: !1,
|
|
2552
2552
|
props: {
|
|
@@ -2557,7 +2557,7 @@ var At = ut({
|
|
|
2557
2557
|
typed: {
|
|
2558
2558
|
validator: /* @__PURE__ */ o(() => !0, "validator")
|
|
2559
2559
|
},
|
|
2560
|
-
...
|
|
2560
|
+
...gt
|
|
2561
2561
|
},
|
|
2562
2562
|
emits: ["update:modelValue", "update:masked", "update:value", "update:unmasked", "update:typed", "accept", "accept:value", "accept:masked", "accept:unmasked", "accept:typed", "complete", "complete:value", "complete:masked", "complete:unmasked", "complete:typed"],
|
|
2563
2563
|
setup(u, e) {
|
|
@@ -2571,7 +2571,7 @@ var At = ut({
|
|
|
2571
2571
|
masked: n,
|
|
2572
2572
|
unmasked: r,
|
|
2573
2573
|
typed: l
|
|
2574
|
-
} = _t(
|
|
2574
|
+
} = vt(_t(u, Ct), {
|
|
2575
2575
|
emit: s,
|
|
2576
2576
|
onAccept: /* @__PURE__ */ o((m) => {
|
|
2577
2577
|
const _ = n.value;
|
|
@@ -2581,7 +2581,7 @@ var At = ut({
|
|
|
2581
2581
|
s("complete:value", n.value, m);
|
|
2582
2582
|
}, "onComplete")
|
|
2583
2583
|
}), h = G(u, "value"), p = G(u, "modelValue"), k = G(u, "unmasked"), g = G(u, "typed");
|
|
2584
|
-
return n.value = p.value || h.value || "", r.value = k.value || "", l.value = g.value,
|
|
2584
|
+
return n.value = p.value || h.value || "", r.value = k.value || "", l.value = g.value, x(h, (m) => n.value = m), x(p, (m) => n.value = m), x(k, (m) => r.value = m), x(g, (m) => l.value = m), () => {
|
|
2585
2585
|
const m = {
|
|
2586
2586
|
...t,
|
|
2587
2587
|
value: u.value != null ? u.value : u.modelValue != null ? u.modelValue : a.value ? a.value.displayValue : "",
|
|
@@ -2589,12 +2589,12 @@ var At = ut({
|
|
|
2589
2589
|
};
|
|
2590
2590
|
return u.mask || (m.onInput = (_) => {
|
|
2591
2591
|
s("update:modelValue", _.target.value), s("update:value", _.target.value);
|
|
2592
|
-
}),
|
|
2592
|
+
}), ut("input", m);
|
|
2593
2593
|
};
|
|
2594
2594
|
}
|
|
2595
|
-
}),
|
|
2596
|
-
function
|
|
2597
|
-
return
|
|
2595
|
+
}), At = Et;
|
|
2596
|
+
function Ft(u, e) {
|
|
2597
|
+
return y(), M("svg", {
|
|
2598
2598
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2599
2599
|
viewBox: "0 0 24 24",
|
|
2600
2600
|
fill: "currentColor",
|
|
@@ -2608,9 +2608,9 @@ function yt(u, e) {
|
|
|
2608
2608
|
})
|
|
2609
2609
|
]);
|
|
2610
2610
|
}
|
|
2611
|
-
o(
|
|
2612
|
-
function
|
|
2613
|
-
return
|
|
2611
|
+
o(Ft, "render$3");
|
|
2612
|
+
function yt(u, e) {
|
|
2613
|
+
return y(), M("svg", {
|
|
2614
2614
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2615
2615
|
viewBox: "0 0 24 24",
|
|
2616
2616
|
fill: "currentColor",
|
|
@@ -2629,9 +2629,9 @@ function St(u, e) {
|
|
|
2629
2629
|
})
|
|
2630
2630
|
]);
|
|
2631
2631
|
}
|
|
2632
|
-
o(
|
|
2633
|
-
function
|
|
2634
|
-
return
|
|
2632
|
+
o(yt, "render$2");
|
|
2633
|
+
function St(u, e) {
|
|
2634
|
+
return y(), M("svg", {
|
|
2635
2635
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2636
2636
|
viewBox: "0 0 20 20",
|
|
2637
2637
|
fill: "currentColor",
|
|
@@ -2645,20 +2645,20 @@ function Vt(u, e) {
|
|
|
2645
2645
|
})
|
|
2646
2646
|
]);
|
|
2647
2647
|
}
|
|
2648
|
-
o(
|
|
2649
|
-
var
|
|
2650
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
2648
|
+
o(St, "render$1");
|
|
2649
|
+
var Vt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, I = /* @__PURE__ */ o((u, e, t, s) => {
|
|
2650
|
+
for (var i = s > 1 ? void 0 : s ? Bt(e, t) : e, a = u.length - 1, n; a >= 0; a--)
|
|
2651
2651
|
(n = u[a]) && (i = (s ? n(e, t, i) : n(i)) || i);
|
|
2652
|
-
return s && i &&
|
|
2652
|
+
return s && i && Vt(e, t, i), i;
|
|
2653
2653
|
}, "__decorateClass"), U;
|
|
2654
|
-
let
|
|
2654
|
+
let S = (U = class extends Je {
|
|
2655
2655
|
maskPreset = null;
|
|
2656
2656
|
force12hours = !1;
|
|
2657
2657
|
alwaysCopyIcon = !1;
|
|
2658
2658
|
disabled = !1;
|
|
2659
2659
|
dtPresetLocale = "";
|
|
2660
2660
|
emitsParent = ["input", "change", "focus", "update:modelValue", "dateMaskChange", "keypress.enter"];
|
|
2661
|
-
componentsParent = { IMaskComponent:
|
|
2661
|
+
componentsParent = { IMaskComponent: At, ClipboardDocumentListIcon: yt, CheckBadgeIcon: Ft, NoSymbolIcon: St };
|
|
2662
2662
|
mask = null;
|
|
2663
2663
|
maskBlocks = {};
|
|
2664
2664
|
utc = "UTC";
|
|
@@ -2686,7 +2686,7 @@ let F = (U = class extends Je {
|
|
|
2686
2686
|
if (this._randKey = $VST.generateRandomKey(), !this.is12hours && this.isDateTime)
|
|
2687
2687
|
try {
|
|
2688
2688
|
const e = new Intl.DateTimeFormat(
|
|
2689
|
-
this.dtPresetLocale ||
|
|
2689
|
+
this.dtPresetLocale || this.VST.$r.locale,
|
|
2690
2690
|
{ hour: "numeric" }
|
|
2691
2691
|
).resolvedOptions();
|
|
2692
2692
|
this.is12hours = e.hourCycle === "h11" || e.hourCycle === "h12";
|
|
@@ -2697,7 +2697,7 @@ let F = (U = class extends Je {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
beforeMountParent() {
|
|
2699
2699
|
if (this.value = this.modelValue || this.inputValue || "", this.isDateTime) {
|
|
2700
|
-
const e = new Intl.DateTimeFormat(this.dtPresetLocale ||
|
|
2700
|
+
const e = new Intl.DateTimeFormat(this.dtPresetLocale || this.VST.$r.locale, {
|
|
2701
2701
|
year: "numeric",
|
|
2702
2702
|
month: "2-digit",
|
|
2703
2703
|
day: "2-digit",
|
|
@@ -2802,7 +2802,11 @@ let F = (U = class extends Je {
|
|
|
2802
2802
|
this.$emit("focus");
|
|
2803
2803
|
}
|
|
2804
2804
|
_onInput(e) {
|
|
2805
|
-
|
|
2805
|
+
const t = e?.target?.value?.trim?.() || e;
|
|
2806
|
+
typeof t == "string" && (this.$emit(
|
|
2807
|
+
"input",
|
|
2808
|
+
this.value = t
|
|
2809
|
+
), this.$emit("change", this.value), this.$emit("update:modelValue", this.value));
|
|
2806
2810
|
}
|
|
2807
2811
|
_extractDateOnly(e) {
|
|
2808
2812
|
const t = /([\d\w]{2,4}[./_-][\d\w]{2,4}[./_-][\d\w]{2,4})/, s = e.match(t);
|
|
@@ -2850,52 +2854,46 @@ let F = (U = class extends Je {
|
|
|
2850
2854
|
_copyValueToClipboard() {
|
|
2851
2855
|
this.value && $VST.copyToClipboard(this.value), this._isOnlyValueCopied = !0, setTimeout(() => this._isOnlyValueCopied = !1, 500);
|
|
2852
2856
|
}
|
|
2853
|
-
_valueWatch(e) {
|
|
2854
|
-
this.$emit("input", e), this.$emit("change", e), this.$emit("update:modelValue", e);
|
|
2855
|
-
}
|
|
2856
2857
|
_valueComputed() {
|
|
2857
2858
|
return ["date", "datetime", "datetimeSec"].includes(this.maskPreset ?? "");
|
|
2858
2859
|
}
|
|
2859
2860
|
}, o(U, "StringField"), U);
|
|
2860
|
-
|
|
2861
|
+
I([
|
|
2861
2862
|
j(String)
|
|
2862
|
-
],
|
|
2863
|
-
|
|
2863
|
+
], S.prototype, "maskPreset", 2);
|
|
2864
|
+
I([
|
|
2864
2865
|
j(Boolean)
|
|
2865
|
-
],
|
|
2866
|
-
|
|
2866
|
+
], S.prototype, "force12hours", 2);
|
|
2867
|
+
I([
|
|
2867
2868
|
j(Boolean)
|
|
2868
|
-
],
|
|
2869
|
-
|
|
2869
|
+
], S.prototype, "alwaysCopyIcon", 2);
|
|
2870
|
+
I([
|
|
2870
2871
|
j(Boolean)
|
|
2871
|
-
],
|
|
2872
|
-
|
|
2872
|
+
], S.prototype, "disabled", 2);
|
|
2873
|
+
I([
|
|
2873
2874
|
j(String)
|
|
2874
|
-
],
|
|
2875
|
-
|
|
2875
|
+
], S.prototype, "dtPresetLocale", 2);
|
|
2876
|
+
I([
|
|
2876
2877
|
j(String)
|
|
2877
|
-
],
|
|
2878
|
-
|
|
2879
|
-
Qe("
|
|
2880
|
-
],
|
|
2881
|
-
|
|
2882
|
-
et
|
|
2883
|
-
],
|
|
2884
|
-
|
|
2885
|
-
tt
|
|
2886
|
-
], F);
|
|
2887
|
-
const It = { class: "relative w100%" }, bt = {
|
|
2878
|
+
], S.prototype, "placeholder", 2);
|
|
2879
|
+
I([
|
|
2880
|
+
Qe("isDateTime")
|
|
2881
|
+
], S.prototype, "_valueComputed", 1);
|
|
2882
|
+
S = I([
|
|
2883
|
+
et
|
|
2884
|
+
], S);
|
|
2885
|
+
const xt = { class: "relative w100%" }, bt = {
|
|
2888
2886
|
key: 0,
|
|
2889
|
-
class: "
|
|
2887
|
+
class: "w22px h22px text-stone absolute t-13px l-12px z4 cursor-pointer hover:scale-130"
|
|
2890
2888
|
};
|
|
2891
|
-
function
|
|
2892
|
-
const n =
|
|
2893
|
-
return
|
|
2889
|
+
function It(u, e, t, s, i, a) {
|
|
2890
|
+
const n = X("IMaskComponent"), r = X("ClipboardDocumentListIcon"), l = X("CheckBadgeIcon"), h = X("NoSymbolIcon");
|
|
2891
|
+
return y(), M("div", {
|
|
2894
2892
|
class: de(["d-inline-block my2px w100% relative", {
|
|
2895
2893
|
["sf" + u._randKey]: !0
|
|
2896
2894
|
}])
|
|
2897
2895
|
}, [
|
|
2898
|
-
q("div",
|
|
2896
|
+
q("div", xt, [
|
|
2899
2897
|
je(n, {
|
|
2900
2898
|
class: de(["w100% inputMask", {
|
|
2901
2899
|
"hover:bg-white": !u.disabled,
|
|
@@ -2917,26 +2915,26 @@ function wt(u, e, t, s, i, a) {
|
|
|
2917
2915
|
"onComplete:typed": u.onCompleteTyped,
|
|
2918
2916
|
disabled: u.disabled,
|
|
2919
2917
|
prepare: u._prepareIMask,
|
|
2920
|
-
onKeypress: e[0] || (e[0] =
|
|
2918
|
+
onKeypress: e[0] || (e[0] = rt((p) => u.$emit("keypress.enter"), ["enter"]))
|
|
2921
2919
|
}, null, 8, ["value", "mask", "placeholder", "blocks", "autocomplete", "onAccept", "onComplete:typed", "class", "disabled", "prepare"]),
|
|
2922
|
-
u.maskPreset == "datetime" || u.maskPreset == "datetimeSec" ? (
|
|
2920
|
+
u.maskPreset == "datetime" || u.maskPreset == "datetimeSec" ? (y(), M("div", {
|
|
2923
2921
|
key: 0,
|
|
2924
2922
|
class: "absolute! r-15px! t-2 fs-0.7rem text-stone-500 hover:scale-110 hover:fw-bold",
|
|
2925
|
-
style:
|
|
2923
|
+
style: lt({
|
|
2926
2924
|
pointerEvents: u.disabled ? "none !important" : void 0
|
|
2927
2925
|
})
|
|
2928
|
-
}, ce(u.utc), 5)) :
|
|
2926
|
+
}, ce(u.utc), 5)) : W("", !0)
|
|
2929
2927
|
]),
|
|
2930
|
-
u.disabled || u.alwaysCopyIcon ? (
|
|
2931
|
-
u._isOnlyValueCopied ? (
|
|
2928
|
+
u.disabled || u.alwaysCopyIcon ? (y(), M("div", bt, [
|
|
2929
|
+
u._isOnlyValueCopied ? (y(), pe(l, {
|
|
2932
2930
|
key: 1,
|
|
2933
2931
|
class: "text-emerald-500"
|
|
2934
|
-
})) : (
|
|
2932
|
+
})) : (y(), pe(r, {
|
|
2935
2933
|
key: 0,
|
|
2936
2934
|
onClick: e[1] || (e[1] = (p) => u._copyValueToClipboard())
|
|
2937
2935
|
}))
|
|
2938
|
-
])) :
|
|
2939
|
-
!u.disabled && u.value ? (
|
|
2936
|
+
])) : W("", !0),
|
|
2937
|
+
!u.disabled && u.value ? (y(), M("div", {
|
|
2940
2938
|
key: 1,
|
|
2941
2939
|
class: de(["w25px h25px text-stone absolute r-12px z4 cursor-pointer hover:scale-130", {
|
|
2942
2940
|
"t-15px": u.maskPreset == "datetime" || u.maskPreset == "datetimeSec",
|
|
@@ -2944,19 +2942,19 @@ function wt(u, e, t, s, i, a) {
|
|
|
2944
2942
|
}])
|
|
2945
2943
|
}, [
|
|
2946
2944
|
je(h, {
|
|
2947
|
-
onClick: e[2] || (e[2] = (p) => u.
|
|
2945
|
+
onClick: e[2] || (e[2] = (p) => u._onInput(""))
|
|
2948
2946
|
})
|
|
2949
|
-
], 2)) :
|
|
2950
|
-
u.disabled || u.alwaysCopyIcon ? (
|
|
2951
|
-
default:
|
|
2952
|
-
|
|
2947
|
+
], 2)) : W("", !0),
|
|
2948
|
+
u.disabled || u.alwaysCopyIcon ? (y(), pe(ot("style"), { key: 2 }, {
|
|
2949
|
+
default: ht(() => [
|
|
2950
|
+
dt(".sf" + ce(u._randKey) + "[" + ce(u.$options.__scopeId) + "] input { padding-left: 40px !important; } ", 1)
|
|
2953
2951
|
]),
|
|
2954
2952
|
_: 1
|
|
2955
|
-
})) :
|
|
2953
|
+
})) : W("", !0)
|
|
2956
2954
|
], 2);
|
|
2957
2955
|
}
|
|
2958
|
-
o(
|
|
2959
|
-
const
|
|
2956
|
+
o(It, "render");
|
|
2957
|
+
const Rt = /* @__PURE__ */ pt(S, [["render", It], ["__scopeId", "data-v-9b5c4527"]]);
|
|
2960
2958
|
export {
|
|
2961
|
-
|
|
2959
|
+
Rt as default
|
|
2962
2960
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var l=(t,o)=>m(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-BmhExWks.cjs"),e=require("vue"),_=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var b=Object.getOwnPropertyDescriptor,B=l((t,o,d,i)=>{for(var s=i>1?void 0:i?b(o,d):o,c=t.length-1,a;c>=0;c--)(a=t[c])&&(s=a(s)||s);return s},"__decorateClass"),n;let u=(n=class extends p.BaseComponent{currentTab="default";CommentT=Comment;mounted(){}setCurrentTab(o){this.currentTab=o}getTabTitle(o){return o.props?.title||"Без названия"}},l(n,"Tabs"),n);u=B([p.VST],u);const v={class:"tabs"},h={class:"tabs__headers"},$=["onClick"],C=["onClick"],T={key:0,class:"tabs__content"};function g(t,o,d,i,s,c){return e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$title-")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r.split("-")[1]}]),onClick:l(k=>t.setCurrentTab(r.split("-")[1]),"onClick")},[e.renderSlot(t.$slots,r,{},void 0,!0)],10,$)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!r.startsWith("$title")&&!t.$slots?.[`$title-${r}`]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r}]),onClick:l(k=>t.setCurrentTab(r),"onClick")},e.toDisplayString(r),11,C)):e.createCommentVNode("",!0)],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$")?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(t.$slots,r,{},void 0,!0)],512)),[[e.vShow,t.currentTab==r]])],64))),256))])}l(g,"render");const E=_._export_sfc(u,[["render",g],["__scopeId","data-v-f8d3de0a"]]);exports.default=E;
|