@signal24/vue-foundation 4.30.0 → 4.30.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as q, ref as N, computed as O, watch as
|
|
1
|
+
import { defineComponent as q, ref as N, computed as O, watch as H, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as T, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as he, renderList as pe, vModelSelect as Ht, getCurrentInstance as Oe, withModifiers as Ne, normalizeStyle as Vt, normalizeClass as P, renderSlot as K, reactive as Bt, h as ve, Teleport as _t, markRaw as Wt, onBeforeUnmount as me, resolveDirective as Pt, createBlock as at, createSlots as jt, withCtx as be, createTextVNode as te, onUpdated as Ut, vModelText as zt, onActivated as st, onDeactivated as lt } from "vue";
|
|
2
2
|
import { compact as ut, cloneDeep as qt, uniq as Jt, groupBy as Kt, isEqual as Me, debounce as Yt, startCase as Xt, upperFirst as Zt, remove as Gt, last as Qt } from "lodash";
|
|
3
3
|
import { configureOpenApiClient as en, OpenApiError as tn } from "@signal24/openapi-client-codegen";
|
|
4
4
|
import { escapeHtml as br } from "@vue/shared";
|
|
@@ -25,29 +25,29 @@ const rn = {
|
|
|
25
25
|
const c = v;
|
|
26
26
|
return o.preprocesor ? o.preprocesor(c) : o.displayKey ? c[o.displayKey] : "";
|
|
27
27
|
}) : null), y = N(o.modelValue ?? null);
|
|
28
|
-
|
|
28
|
+
H(() => o.loadFn, g), H(
|
|
29
29
|
() => o.modelValue,
|
|
30
30
|
() => y.value = o.modelValue
|
|
31
|
-
),
|
|
31
|
+
), H(y, () => a("update:modelValue", y.value));
|
|
32
32
|
async function g() {
|
|
33
33
|
p.value = await o.loadFn();
|
|
34
34
|
}
|
|
35
|
-
return z(g), (E, v) => l.value ? fe((
|
|
35
|
+
return z(g), (E, v) => l.value ? fe((T(), I("select", {
|
|
36
36
|
key: 1,
|
|
37
37
|
"onUpdate:modelValue": v[0] || (v[0] = (c) => y.value = c)
|
|
38
38
|
}, [
|
|
39
|
-
o.nullText ? (
|
|
40
|
-
(
|
|
39
|
+
o.nullText ? (T(), I("option", an, J(o.nullText), 1)) : W("", !0),
|
|
40
|
+
(T(!0), I(he, null, pe(l.value, (c, n) => (T(), I("option", {
|
|
41
41
|
key: n,
|
|
42
42
|
value: p.value?.[n]
|
|
43
43
|
}, J(c), 9, sn))), 128))
|
|
44
44
|
], 512)), [
|
|
45
|
-
[
|
|
46
|
-
]) : (
|
|
45
|
+
[Ht, y.value]
|
|
46
|
+
]) : (T(), I("select", rn, [
|
|
47
47
|
U("option", null, J(o.loadingText || "Loading..."), 1)
|
|
48
48
|
]));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), $ = {
|
|
51
51
|
unhandledErrorSupportText: "please contact support",
|
|
52
52
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
53
53
|
defaultDateFormat: "M/d/yy",
|
|
@@ -55,7 +55,7 @@ const rn = {
|
|
|
55
55
|
defaultCurrencyDivisor: 1
|
|
56
56
|
};
|
|
57
57
|
function Yo(e) {
|
|
58
|
-
Object.assign(
|
|
58
|
+
Object.assign($, e);
|
|
59
59
|
}
|
|
60
60
|
const ln = /* @__PURE__ */ q({
|
|
61
61
|
__name: "overlay-anchor",
|
|
@@ -105,9 +105,9 @@ const ln = /* @__PURE__ */ q({
|
|
|
105
105
|
setTimeout(() => {
|
|
106
106
|
window.addEventListener("click", E);
|
|
107
107
|
}, 10);
|
|
108
|
-
}), (v, c) => (
|
|
108
|
+
}), (v, c) => (T(), I("div", {
|
|
109
109
|
class: P(["vf-overlay-anchor", p.value]),
|
|
110
|
-
style:
|
|
110
|
+
style: Vt(a.value),
|
|
111
111
|
onClick: Ne(E, ["stop"])
|
|
112
112
|
}, [
|
|
113
113
|
K(v.$slots, "default")
|
|
@@ -116,8 +116,8 @@ const ln = /* @__PURE__ */ q({
|
|
|
116
116
|
});
|
|
117
117
|
let un = 0;
|
|
118
118
|
const j = Bt([]);
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
H(j, () => {
|
|
120
|
+
$.onOverlaysChanged?.(j.length);
|
|
121
121
|
});
|
|
122
122
|
const Xo = q({
|
|
123
123
|
setup() {
|
|
@@ -237,7 +237,7 @@ function pn(e) {
|
|
|
237
237
|
|
|
238
238
|
${Re(e).message}
|
|
239
239
|
|
|
240
|
-
Please refresh the page and try again. If this error persists, ${
|
|
240
|
+
Please refresh the page and try again. If this error persists, ${$.unhandledErrorSupportText}.`;
|
|
241
241
|
}
|
|
242
242
|
function Re(e) {
|
|
243
243
|
return vn(e) ? e : new Error(String(e));
|
|
@@ -247,7 +247,7 @@ function vn(e) {
|
|
|
247
247
|
}
|
|
248
248
|
async function nr(e, t) {
|
|
249
249
|
const o = Re(e);
|
|
250
|
-
return o instanceof ye ||
|
|
250
|
+
return o instanceof ye || $.errorHandler(o), hn({
|
|
251
251
|
title: t?.title,
|
|
252
252
|
message: o,
|
|
253
253
|
classes: t?.classes
|
|
@@ -255,7 +255,7 @@ async function nr(e, t) {
|
|
|
255
255
|
}
|
|
256
256
|
async function or(e) {
|
|
257
257
|
const t = Re(e);
|
|
258
|
-
t instanceof ye ||
|
|
258
|
+
t instanceof ye || $.errorHandler(t);
|
|
259
259
|
}
|
|
260
260
|
const ne = Symbol("MaskState");
|
|
261
261
|
function rr(e, t) {
|
|
@@ -351,7 +351,7 @@ const yn = ["id"], En = {
|
|
|
351
351
|
function s() {
|
|
352
352
|
y.value = !1;
|
|
353
353
|
}
|
|
354
|
-
return (u, h) => (
|
|
354
|
+
return (u, h) => (T(), I("div", {
|
|
355
355
|
id: e.id,
|
|
356
356
|
ref_key: "overlay",
|
|
357
357
|
ref: p,
|
|
@@ -364,9 +364,9 @@ const yn = ["id"], En = {
|
|
|
364
364
|
class: P(["vf-modal", { scrolls: e.scrolls }]),
|
|
365
365
|
onSubmit: h[0] || (h[0] = Ne((f) => u.$emit("formSubmit"), ["prevent"]))
|
|
366
366
|
}, [
|
|
367
|
-
u.$slots.header ? (
|
|
367
|
+
u.$slots.header ? (T(), I("div", En, [
|
|
368
368
|
K(u.$slots, "header"),
|
|
369
|
-
a.closeX ? (
|
|
369
|
+
a.closeX ? (T(), I("i", {
|
|
370
370
|
key: 0,
|
|
371
371
|
class: "close",
|
|
372
372
|
onClick: c
|
|
@@ -375,13 +375,13 @@ const yn = ["id"], En = {
|
|
|
375
375
|
U("div", kn, [
|
|
376
376
|
K(u.$slots, "default")
|
|
377
377
|
]),
|
|
378
|
-
u.$slots.footer ? (
|
|
378
|
+
u.$slots.footer ? (T(), I("div", xn, [
|
|
379
379
|
K(u.$slots, "footer")
|
|
380
380
|
])) : W("", !0)
|
|
381
381
|
], 34)
|
|
382
382
|
], 10, yn));
|
|
383
383
|
}
|
|
384
|
-
}), bn = ["innerHtml"],
|
|
384
|
+
}), bn = ["innerHtml"], Sn = ["innerText"], le = /* @__PURE__ */ q({
|
|
385
385
|
__name: "vf-alert-modal",
|
|
386
386
|
props: {
|
|
387
387
|
isBare: { type: Boolean },
|
|
@@ -397,23 +397,23 @@ const yn = ["id"], En = {
|
|
|
397
397
|
const t = e, o = O(() => t.message instanceof Error ? pn(t.message) : t.message);
|
|
398
398
|
return (a, p) => {
|
|
399
399
|
const l = Pt("autofocus");
|
|
400
|
-
return
|
|
400
|
+
return T(), at(wn, {
|
|
401
401
|
class: P(["vf-alert", ...e.classes ?? []]),
|
|
402
402
|
scrolls: ""
|
|
403
403
|
}, jt({
|
|
404
404
|
default: be(() => [
|
|
405
|
-
e.iconClass ? (
|
|
405
|
+
e.iconClass ? (T(), I("i", {
|
|
406
406
|
key: 0,
|
|
407
407
|
class: P(["vf-alert-icon", e.iconClass])
|
|
408
408
|
}, null, 2)) : W("", !0),
|
|
409
|
-
e.isHtml ? (
|
|
409
|
+
e.isHtml ? (T(), I("div", {
|
|
410
410
|
key: 1,
|
|
411
411
|
innerHtml: e.message,
|
|
412
412
|
class: "user-message"
|
|
413
|
-
}, null, 8, bn)) : (
|
|
413
|
+
}, null, 8, bn)) : (T(), I("div", {
|
|
414
414
|
key: 2,
|
|
415
415
|
innerText: o.value
|
|
416
|
-
}, null, 8,
|
|
416
|
+
}, null, 8, Sn))
|
|
417
417
|
]),
|
|
418
418
|
_: 2
|
|
419
419
|
}, [
|
|
@@ -427,8 +427,8 @@ const yn = ["id"], En = {
|
|
|
427
427
|
e.isBare ? void 0 : {
|
|
428
428
|
name: "footer",
|
|
429
429
|
fn: be(() => [
|
|
430
|
-
e.shouldConfirm ? (
|
|
431
|
-
fe((
|
|
430
|
+
e.shouldConfirm ? (T(), I(he, { key: 0 }, [
|
|
431
|
+
fe((T(), I("button", {
|
|
432
432
|
class: "primary",
|
|
433
433
|
onClick: p[0] || (p[0] = () => e.callback(!0))
|
|
434
434
|
}, [...p[3] || (p[3] = [
|
|
@@ -440,7 +440,7 @@ const yn = ["id"], En = {
|
|
|
440
440
|
class: "default",
|
|
441
441
|
onClick: p[1] || (p[1] = () => e.callback(!1))
|
|
442
442
|
}, "Cancel")
|
|
443
|
-
], 64)) : fe((
|
|
443
|
+
], 64)) : fe((T(), I("button", {
|
|
444
444
|
key: 1,
|
|
445
445
|
class: "default",
|
|
446
446
|
onClick: p[2] || (p[2] = () => e.callback(!0))
|
|
@@ -456,7 +456,7 @@ const yn = ["id"], En = {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
|
-
function
|
|
459
|
+
function Tn(e) {
|
|
460
460
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
461
461
|
}
|
|
462
462
|
var ce = { exports: {} };
|
|
@@ -573,9 +573,9 @@ function Mn() {
|
|
|
573
573
|
var w = function() {
|
|
574
574
|
--f <= 0 && u(m);
|
|
575
575
|
};
|
|
576
|
-
f || w(), h.forEach(function(
|
|
577
|
-
v.matches(
|
|
578
|
-
i(
|
|
576
|
+
f || w(), h.forEach(function(S) {
|
|
577
|
+
v.matches(S, s.exclude) ? w() : s.onIframeReady(S, function(C) {
|
|
578
|
+
i(S) && (m++, r(C)), w();
|
|
579
579
|
}, w);
|
|
580
580
|
});
|
|
581
581
|
}
|
|
@@ -638,17 +638,17 @@ function Mn() {
|
|
|
638
638
|
}, {
|
|
639
639
|
key: "iterateThroughNodes",
|
|
640
640
|
value: function(n, i, r, s, u) {
|
|
641
|
-
for (var h = this, f = this.createIterator(i, n, s), m = [], w = [],
|
|
641
|
+
for (var h = this, f = this.createIterator(i, n, s), m = [], w = [], S = void 0, C = void 0, L = function() {
|
|
642
642
|
var F = h.getIteratorNode(f);
|
|
643
|
-
return C = F.prevNode,
|
|
643
|
+
return C = F.prevNode, S = F.node, S;
|
|
644
644
|
}; L(); )
|
|
645
645
|
this.iframes && this.forEachIframe(i, function(R) {
|
|
646
|
-
return h.checkIframeFilter(
|
|
646
|
+
return h.checkIframeFilter(S, C, R, m);
|
|
647
647
|
}, function(R) {
|
|
648
648
|
h.createInstanceOnIframe(R).forEachNode(n, function(F) {
|
|
649
649
|
return w.push(F);
|
|
650
650
|
}, s);
|
|
651
|
-
}), w.push(
|
|
651
|
+
}), w.push(S);
|
|
652
652
|
w.forEach(function(R) {
|
|
653
653
|
r(R);
|
|
654
654
|
}), this.iframes && this.handleOpenIframes(m, n, r, s), u();
|
|
@@ -876,9 +876,9 @@ function Mn() {
|
|
|
876
876
|
if (typeof w > "u" || w.start > i) {
|
|
877
877
|
if (!s(f.node))
|
|
878
878
|
return !1;
|
|
879
|
-
var
|
|
880
|
-
if (f.node = h.wrapRangeInTextNode(f.node,
|
|
881
|
-
|
|
879
|
+
var S = i - f.start, C = (r > f.end ? f.end : r) - f.start, L = n.value.substr(0, f.start), R = n.value.substr(C + f.start);
|
|
880
|
+
if (f.node = h.wrapRangeInTextNode(f.node, S, C), n.value = L + R, n.nodes.forEach(function(F, V) {
|
|
881
|
+
V >= m && (n.nodes[V].start > 0 && V !== m && (n.nodes[V].start -= C), n.nodes[V].end -= C);
|
|
882
882
|
}), r -= C, u(f.node.previousSibling, f.start), r > f.end)
|
|
883
883
|
i = f.end;
|
|
884
884
|
else
|
|
@@ -894,13 +894,13 @@ function Mn() {
|
|
|
894
894
|
this.getTextNodes(function(m) {
|
|
895
895
|
m.nodes.forEach(function(w) {
|
|
896
896
|
w = w.node;
|
|
897
|
-
for (var
|
|
898
|
-
if (r(
|
|
899
|
-
var C =
|
|
897
|
+
for (var S = void 0; (S = n.exec(w.textContent)) !== null && S[f] !== ""; )
|
|
898
|
+
if (r(S[f], w)) {
|
|
899
|
+
var C = S.index;
|
|
900
900
|
if (f !== 0)
|
|
901
901
|
for (var L = 1; L < f; L++)
|
|
902
|
-
C +=
|
|
903
|
-
w = h.wrapRangeInTextNode(w, C, C +
|
|
902
|
+
C += S[L].length;
|
|
903
|
+
w = h.wrapRangeInTextNode(w, C, C + S[f].length), s(w.previousSibling), n.lastIndex = 0;
|
|
904
904
|
}
|
|
905
905
|
}), u();
|
|
906
906
|
});
|
|
@@ -911,12 +911,12 @@ function Mn() {
|
|
|
911
911
|
var h = this, f = i === 0 ? 0 : i + 1;
|
|
912
912
|
this.getTextNodes(function(m) {
|
|
913
913
|
for (var w = void 0; (w = n.exec(m.value)) !== null && w[f] !== ""; ) {
|
|
914
|
-
var
|
|
914
|
+
var S = w.index;
|
|
915
915
|
if (f !== 0)
|
|
916
916
|
for (var C = 1; C < f; C++)
|
|
917
|
-
|
|
918
|
-
var L =
|
|
919
|
-
h.wrapRangeInMappedTextNode(m,
|
|
917
|
+
S += w[C].length;
|
|
918
|
+
var L = S + w[f].length;
|
|
919
|
+
h.wrapRangeInMappedTextNode(m, S, L, function(R) {
|
|
920
920
|
return r(w[f], R);
|
|
921
921
|
}, function(R, F) {
|
|
922
922
|
n.lastIndex = F, s(R);
|
|
@@ -932,7 +932,7 @@ function Mn() {
|
|
|
932
932
|
this.getTextNodes(function(h) {
|
|
933
933
|
var f = h.value.length;
|
|
934
934
|
n.forEach(function(m, w) {
|
|
935
|
-
var
|
|
935
|
+
var S = u.checkWhitespaceRanges(m, f, h.value), C = S.start, L = S.end, R = S.valid;
|
|
936
936
|
R && u.wrapRangeInMappedTextNode(h, C, L, function(F) {
|
|
937
937
|
return i(F, m, h.value.substring(C, L), w);
|
|
938
938
|
}, function(F) {
|
|
@@ -979,17 +979,17 @@ function Mn() {
|
|
|
979
979
|
value: function(n, i) {
|
|
980
980
|
var r = this;
|
|
981
981
|
this.opt = i;
|
|
982
|
-
var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length, w = this.opt.caseSensitive ? "" : "i",
|
|
982
|
+
var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length, w = this.opt.caseSensitive ? "" : "i", S = function C(L) {
|
|
983
983
|
var R = new RegExp(r.createRegExp(L), "gm" + w), F = 0;
|
|
984
|
-
r.log('Searching with expression "' + R + '"'), r[u](R, 1, function(
|
|
984
|
+
r.log('Searching with expression "' + R + '"'), r[u](R, 1, function(V, Ee) {
|
|
985
985
|
return r.opt.filter(Ee, L, s, F);
|
|
986
|
-
}, function(
|
|
987
|
-
F++, s++, r.opt.each(
|
|
986
|
+
}, function(V) {
|
|
987
|
+
F++, s++, r.opt.each(V);
|
|
988
988
|
}, function() {
|
|
989
989
|
F === 0 && r.opt.noMatch(L), f[m - 1] === L ? r.opt.done(s) : C(f[f.indexOf(L) + 1]);
|
|
990
990
|
});
|
|
991
991
|
};
|
|
992
|
-
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) :
|
|
992
|
+
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) : S(f[0]);
|
|
993
993
|
}
|
|
994
994
|
}, {
|
|
995
995
|
key: "markRanges",
|
|
@@ -1077,7 +1077,7 @@ function Mn() {
|
|
|
1077
1077
|
})(ce)), ce.exports;
|
|
1078
1078
|
}
|
|
1079
1079
|
var Cn = Mn();
|
|
1080
|
-
const On = /* @__PURE__ */
|
|
1080
|
+
const On = /* @__PURE__ */ Tn(Cn);
|
|
1081
1081
|
function ar(e, t, o) {
|
|
1082
1082
|
const a = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
1083
1083
|
return a === -1 ? !1 : (e.splice(a, 1, o), !0);
|
|
@@ -1149,7 +1149,7 @@ var Rn = {
|
|
|
1149
1149
|
precision: 2,
|
|
1150
1150
|
pattern: "!#",
|
|
1151
1151
|
negativePattern: "-!#",
|
|
1152
|
-
format:
|
|
1152
|
+
format: $n,
|
|
1153
1153
|
fromCents: !1
|
|
1154
1154
|
}, pt = function(t) {
|
|
1155
1155
|
return Math.round(t);
|
|
@@ -1181,7 +1181,7 @@ function de(e, t) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return g || (a *= E, a = a.toFixed(4)), o ? pt(a) : a;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function $n(e, t) {
|
|
1185
1185
|
var o = t.pattern, a = t.negativePattern, p = t.symbol, l = t.separator, y = t.decimal, g = t.groups, E = ("" + e).replace(/^-/, "").split("."), v = E[0], c = E[1];
|
|
1186
1186
|
return (e.value >= 0 ? o : a).replace("!", p).replace("#", v.replace(g, "$1" + l) + (c ? y + c : ""));
|
|
1187
1187
|
}
|
|
@@ -1278,18 +1278,18 @@ _.prototype = {
|
|
|
1278
1278
|
const A = [];
|
|
1279
1279
|
for (let e = 0; e < 256; ++e)
|
|
1280
1280
|
A.push((e + 256).toString(16).slice(1));
|
|
1281
|
-
function
|
|
1281
|
+
function Hn(e, t = 0) {
|
|
1282
1282
|
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1283
1283
|
}
|
|
1284
|
-
let
|
|
1285
|
-
const
|
|
1284
|
+
let Se;
|
|
1285
|
+
const Vn = new Uint8Array(16);
|
|
1286
1286
|
function Bn() {
|
|
1287
|
-
if (!
|
|
1287
|
+
if (!Se) {
|
|
1288
1288
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1289
1289
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1290
|
-
|
|
1290
|
+
Se = crypto.getRandomValues.bind(crypto);
|
|
1291
1291
|
}
|
|
1292
|
-
return
|
|
1292
|
+
return Se(Vn);
|
|
1293
1293
|
}
|
|
1294
1294
|
const _n = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xe = { randomUUID: _n };
|
|
1295
1295
|
function Wn(e, t, o) {
|
|
@@ -1297,7 +1297,7 @@ function Wn(e, t, o) {
|
|
|
1297
1297
|
const a = e.random ?? e.rng?.() ?? Bn();
|
|
1298
1298
|
if (a.length < 16)
|
|
1299
1299
|
throw new Error("Random bytes length must be >= 16");
|
|
1300
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1300
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Hn(a);
|
|
1301
1301
|
}
|
|
1302
1302
|
function Pn(e, t, o) {
|
|
1303
1303
|
return Xe.randomUUID && !e ? Xe.randomUUID() : Wn(e);
|
|
@@ -1313,7 +1313,7 @@ function Un(e) {
|
|
|
1313
1313
|
return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
1314
1314
|
}
|
|
1315
1315
|
function zn(e, t) {
|
|
1316
|
-
return _(e).divide(t ??
|
|
1316
|
+
return _(e).divide(t ?? $.defaultCurrencyDivisor).format();
|
|
1317
1317
|
}
|
|
1318
1318
|
function hr() {
|
|
1319
1319
|
return Pn();
|
|
@@ -1366,10 +1366,10 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1366
1366
|
setup(e, { expose: t, emit: o }) {
|
|
1367
1367
|
const a = Symbol("null"), p = Symbol("create"), l = e, y = o;
|
|
1368
1368
|
t({
|
|
1369
|
-
addRemoteOption:
|
|
1369
|
+
addRemoteOption: $t
|
|
1370
1370
|
});
|
|
1371
|
-
const g = N(), E = N(), v = N(), c = N(!1), n = N(), i = N(!1), r = N(""), s = N(null), u = N(null), h = N(!1), f = N(null), m = N(!1), w = O(() => l.showCreateTextOnNewItem ?? !0),
|
|
1372
|
-
const k =
|
|
1371
|
+
const g = N(), E = N(), v = N(), c = N(!1), n = N(), i = N(!1), r = N(""), s = N(null), u = N(null), h = N(!1), f = N(null), m = N(!1), w = O(() => l.showCreateTextOnNewItem ?? !0), S = O(() => !!(l.options || n.value)), C = O(() => l.options ?? n.value ?? []), L = O(() => l.prependOptions ?? []), R = O(() => l.appendOptions ?? []), F = O(() => !!l.disabled || !S.value && !l.loadOptions), V = O(() => l.loadingText || "..."), Ee = O(() => !S.value && (!l.loadOptions || l.preload || l.modelValue && (l.valueField || l.valueExtractor)) ? V.value : l.nullTitle ? l.nullTitle : l.placeholder || ""), bt = O(() => l.noResultsText || "No options match your search."), Z = O(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (d) => d[l.valueField] : null), ke = O(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (d) => String(d[l.keyField]) : Z.value ? (d) => String(Z.value(d)) : null), St = O(() => l.groupFormatter ? l.groupFormatter : l.groupField ? (d) => String(d[l.groupField]) : null), $e = O(() => l.formatter ? l.formatter : l.labelField ? (d) => String(d[l.labelField]) : (d) => String(d)), He = O(() => l.selectionFormatter ? l.selectionFormatter : $e.value), Ve = O(() => [...L.value, ...C.value, ...R.value]), Be = O(() => !!(l.groupField || l.groupFormatter)), xe = O(() => Ve.value.map((d, b) => {
|
|
1372
|
+
const k = St.value?.(d), x = $e.value(d), M = l.subtitleFormatter?.(d), B = x ? x.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ue = [];
|
|
1373
1373
|
return l.searchFields ? l.searchFields.forEach((Je) => {
|
|
1374
1374
|
d[Je] && ue.push(
|
|
1375
1375
|
String(d[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
|
|
@@ -1395,7 +1395,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1395
1395
|
title: l.nullTitle
|
|
1396
1396
|
});
|
|
1397
1397
|
return d;
|
|
1398
|
-
}),
|
|
1398
|
+
}), Tt = O(() => {
|
|
1399
1399
|
if (!Be.value)
|
|
1400
1400
|
return [
|
|
1401
1401
|
{
|
|
@@ -1409,19 +1409,19 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1409
1409
|
options: b[k]
|
|
1410
1410
|
}));
|
|
1411
1411
|
});
|
|
1412
|
-
|
|
1412
|
+
H(() => l.modelValue, G), H(xe, () => {
|
|
1413
1413
|
h.value && setTimeout(je, 0);
|
|
1414
|
-
}),
|
|
1414
|
+
}), H(r, () => {
|
|
1415
1415
|
i.value && !l.remoteSearch && !r.value.trim().length && (i.value = !1);
|
|
1416
|
-
}),
|
|
1416
|
+
}), H(h, () => {
|
|
1417
1417
|
h.value ? setTimeout(Ft, 0) : (i.value = !1, r.value = u.value ?? "", v.value && (v.value.style.visibility = "hidden"));
|
|
1418
|
-
}),
|
|
1418
|
+
}), H(D, () => {
|
|
1419
1419
|
l.modelValue !== null && s.value === null && G(), (f.value !== null || i.value) && !D.value.find((d) => d.key == f.value) && (f.value = D.value[0]?.key ?? a);
|
|
1420
1420
|
}), z(async () => {
|
|
1421
|
-
m.value = l.onCreateItem !== void 0, l.loadOptions && l.preload ? await _e() : !l.options && !l.loadOptions && (l.valueField || l.valueExtractor) || G(),
|
|
1421
|
+
m.value = l.onCreateItem !== void 0, l.loadOptions && l.preload ? await _e() : !l.options && !l.loadOptions && (l.valueField || l.valueExtractor) || G(), H(s, () => {
|
|
1422
1422
|
const d = Ye(s.value) && Z.value !== null ? Z.value(s.value) : s.value;
|
|
1423
1423
|
Me(l.modelValue, d) || y("update:modelValue", d);
|
|
1424
|
-
}), l.remoteSearch &&
|
|
1424
|
+
}), l.remoteSearch && H(r, Yt(It, 250));
|
|
1425
1425
|
}), me(() => {
|
|
1426
1426
|
v.value?.remove();
|
|
1427
1427
|
});
|
|
@@ -1441,7 +1441,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
1443
|
if (!(d.key == "ArrowLeft" || d.key == "ArrowRight") && d.key != "Tab") {
|
|
1444
|
-
if (!
|
|
1444
|
+
if (!S.value) {
|
|
1445
1445
|
i.value || d.preventDefault();
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
@@ -1486,7 +1486,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1486
1486
|
l.debug || (!r.value.length && l.nullTitle && (s.value = null, u.value = null), h.value = !1);
|
|
1487
1487
|
}
|
|
1488
1488
|
function Ft() {
|
|
1489
|
-
|
|
1489
|
+
S.value || _e(), l.optionsListId && v.value?.setAttribute("id", l.optionsListId), At();
|
|
1490
1490
|
}
|
|
1491
1491
|
function At() {
|
|
1492
1492
|
const d = g.value.getBoundingClientRect(), b = d.y + d.height + 2, k = d.x, x = v.value, M = window.getComputedStyle(g.value);
|
|
@@ -1499,7 +1499,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1499
1499
|
x.style.visibility = "visible", document.body.appendChild(x), setTimeout(je, 0);
|
|
1500
1500
|
}
|
|
1501
1501
|
function je() {
|
|
1502
|
-
if (!
|
|
1502
|
+
if (!S.value || !f.value) return;
|
|
1503
1503
|
const d = D.value.findIndex((x) => x.key == f.value), b = v.value, k = b?.querySelectorAll(".option")[d];
|
|
1504
1504
|
k && (b.scrollTop = k.offsetTop);
|
|
1505
1505
|
}
|
|
@@ -1522,14 +1522,14 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1522
1522
|
r.value = "", s.value = null, u.value = null, l.onCreateItem?.(b);
|
|
1523
1523
|
} else {
|
|
1524
1524
|
const k = xe.value.find((x) => x.key == d.key).ref;
|
|
1525
|
-
s.value = k, u.value =
|
|
1525
|
+
s.value = k, u.value = He.value(k), r.value = u.value ?? "";
|
|
1526
1526
|
}
|
|
1527
1527
|
E.value?.blur(), ze();
|
|
1528
1528
|
}
|
|
1529
1529
|
function G() {
|
|
1530
|
-
l.modelValue !== null ? (s.value = Z.value ?
|
|
1530
|
+
l.modelValue !== null ? (s.value = Z.value ? Ve.value.find((d) => l.modelValue === Z.value(d)) : l.modelValue, u.value = Ye(s.value) ? He.value(s.value) : null, r.value = u.value ?? "") : (s.value = null, u.value = null, r.value = "");
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function $t(d) {
|
|
1533
1533
|
n.value.unshift(d);
|
|
1534
1534
|
}
|
|
1535
1535
|
function ze() {
|
|
@@ -1554,7 +1554,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
});
|
|
1556
1556
|
});
|
|
1557
|
-
}), (d, b) => (
|
|
1557
|
+
}), (d, b) => (T(), I("div", {
|
|
1558
1558
|
ref_key: "el",
|
|
1559
1559
|
ref: g,
|
|
1560
1560
|
class: P(["vf-smart-select", { disabled: F.value, open: h.value }])
|
|
@@ -1577,24 +1577,24 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1577
1577
|
}, null, 42, qn), [
|
|
1578
1578
|
[zt, r.value]
|
|
1579
1579
|
]),
|
|
1580
|
-
h.value ? (
|
|
1580
|
+
h.value ? (T(), I("div", {
|
|
1581
1581
|
key: 0,
|
|
1582
1582
|
ref_key: "optionsContainer",
|
|
1583
1583
|
ref: v,
|
|
1584
1584
|
class: P(["vf-smart-select-options", { grouped: Be.value }])
|
|
1585
1585
|
}, [
|
|
1586
|
-
|
|
1586
|
+
S.value ? (T(!0), I(he, { key: 1 }, pe(Tt.value, (k) => (T(), I("div", {
|
|
1587
1587
|
key: k.groupTitle,
|
|
1588
1588
|
class: "group"
|
|
1589
1589
|
}, [
|
|
1590
|
-
k.groupTitle ? (
|
|
1590
|
+
k.groupTitle ? (T(), I("div", Kn, [
|
|
1591
1591
|
K(d.$slots, "group", {
|
|
1592
1592
|
group: k.groupTitle
|
|
1593
1593
|
}, () => [
|
|
1594
1594
|
te(J(k.groupTitle), 1)
|
|
1595
1595
|
])
|
|
1596
1596
|
])) : W("", !0),
|
|
1597
|
-
(
|
|
1597
|
+
(T(!0), I(he, null, pe(k.options, (x) => (T(), I("div", {
|
|
1598
1598
|
key: x.key,
|
|
1599
1599
|
class: P(["option", [f.value === x.key && "highlighted", x.ref && e.classForOption?.(x.ref)]]),
|
|
1600
1600
|
onMousemove: (M) => Dt(x),
|
|
@@ -1605,19 +1605,19 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1605
1605
|
class: "title",
|
|
1606
1606
|
innerHTML: x.title
|
|
1607
1607
|
}, null, 8, Xn),
|
|
1608
|
-
x.subtitle ? (
|
|
1608
|
+
x.subtitle ? (T(), I("div", {
|
|
1609
1609
|
key: 0,
|
|
1610
1610
|
class: "subtitle",
|
|
1611
1611
|
innerHTML: x.subtitle
|
|
1612
1612
|
}, null, 8, Zn)) : W("", !0)
|
|
1613
1613
|
])
|
|
1614
1614
|
], 42, Yn))), 128)),
|
|
1615
|
-
!D.value.length && r.value ? (
|
|
1615
|
+
!D.value.length && r.value ? (T(), I("div", Gn, [
|
|
1616
1616
|
K(d.$slots, "no-results", {}, () => [
|
|
1617
1617
|
te(J(bt.value), 1)
|
|
1618
1618
|
])
|
|
1619
1619
|
])) : W("", !0)
|
|
1620
|
-
]))), 128)) : (
|
|
1620
|
+
]))), 128)) : (T(), I("div", Jn, "Loading..."))
|
|
1621
1621
|
], 2)) : W("", !0)
|
|
1622
1622
|
], 2));
|
|
1623
1623
|
}
|
|
@@ -1637,15 +1637,15 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1637
1637
|
value: g,
|
|
1638
1638
|
label: E
|
|
1639
1639
|
}))), p = O(() => o.formatter ? (g) => o.formatter(g.label, g.value) : (g) => g.label), l = t, y = N(a.value.find((g) => g.value === o.modelValue) ?? null);
|
|
1640
|
-
return
|
|
1640
|
+
return H(
|
|
1641
1641
|
() => o.modelValue,
|
|
1642
1642
|
(g) => {
|
|
1643
1643
|
y.value = a.value.find((E) => E.value === g) ?? null;
|
|
1644
1644
|
}
|
|
1645
|
-
),
|
|
1645
|
+
), H(y, (g) => {
|
|
1646
1646
|
const E = g ? a.value.find((v) => Me(v, g))?.value : null;
|
|
1647
1647
|
l("update:modelValue", E ?? null);
|
|
1648
|
-
}), (g, E) => (
|
|
1648
|
+
}), (g, E) => (T(), at(eo, {
|
|
1649
1649
|
modelValue: y.value,
|
|
1650
1650
|
"onUpdate:modelValue": E[0] || (E[0] = (v) => y.value = v),
|
|
1651
1651
|
options: a.value,
|
|
@@ -1688,15 +1688,15 @@ const to = { class: "content" }, no = { class: "message" }, oo = {
|
|
|
1688
1688
|
duration: p * 1e3,
|
|
1689
1689
|
easing: "linear"
|
|
1690
1690
|
}), setTimeout(() => t.callback(), p * 1e3);
|
|
1691
|
-
}), (p, l) => (
|
|
1691
|
+
}), (p, l) => (T(), I("div", {
|
|
1692
1692
|
class: P(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
|
|
1693
1693
|
onClick: Ne(o, ["stop"])
|
|
1694
1694
|
}, [
|
|
1695
1695
|
U("div", to, [
|
|
1696
1696
|
U("div", no, J(e.message), 1),
|
|
1697
|
-
e.disableClose ? W("", !0) : (
|
|
1697
|
+
e.disableClose ? W("", !0) : (T(), I("div", oo, "x"))
|
|
1698
1698
|
]),
|
|
1699
|
-
e.durationSecs !== null ? (
|
|
1699
|
+
e.durationSecs !== null ? (T(), I("div", ro, [
|
|
1700
1700
|
U("div", {
|
|
1701
1701
|
ref_key: "progressInnerEl",
|
|
1702
1702
|
ref: a,
|
|
@@ -1751,16 +1751,16 @@ function go(e, t) {
|
|
|
1751
1751
|
return _(e).divide(t).value;
|
|
1752
1752
|
}
|
|
1753
1753
|
function yo(e, t) {
|
|
1754
|
-
return e && X(new Date(e), t ??
|
|
1754
|
+
return e && X(new Date(e), t ?? $.defaultDateFormat);
|
|
1755
1755
|
}
|
|
1756
1756
|
function Eo(e, t) {
|
|
1757
|
-
return e && X(new Date(e), t ??
|
|
1757
|
+
return e && X(new Date(e), t ?? $.defaultTimeFormat);
|
|
1758
1758
|
}
|
|
1759
1759
|
function ko(e, t) {
|
|
1760
|
-
return e && X(new Date(e), t ?? `${
|
|
1760
|
+
return e && X(new Date(e), t ?? `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
|
|
1761
1761
|
}
|
|
1762
1762
|
function xo(e) {
|
|
1763
|
-
return e && X(nn(on(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1),
|
|
1763
|
+
return e && X(nn(on(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), $.defaultDateFormat);
|
|
1764
1764
|
}
|
|
1765
1765
|
const Ze = {
|
|
1766
1766
|
bytes: ao,
|
|
@@ -1803,12 +1803,12 @@ function Ge(e) {
|
|
|
1803
1803
|
const t = e[Ae];
|
|
1804
1804
|
t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
|
|
1805
1805
|
}
|
|
1806
|
-
const
|
|
1806
|
+
const Te = ["auto", "scroll"];
|
|
1807
1807
|
function mt(e) {
|
|
1808
1808
|
const t = e.parentElement;
|
|
1809
1809
|
if (!t) return null;
|
|
1810
1810
|
const o = window.getComputedStyle(t);
|
|
1811
|
-
return
|
|
1811
|
+
return Te.includes(o.overflow) || Te.includes(o.overflowX) || Te.includes(o.overflowY) ? t : mt(t);
|
|
1812
1812
|
}
|
|
1813
1813
|
class oe {
|
|
1814
1814
|
constructor(t, o) {
|
|
@@ -1829,7 +1829,7 @@ class oe {
|
|
|
1829
1829
|
function Er(e) {
|
|
1830
1830
|
z(() => window.addEventListener("resize", e)), st(() => window.addEventListener("resize", e)), lt(() => window.removeEventListener("resize", e)), me(() => window.removeEventListener("resize", e));
|
|
1831
1831
|
}
|
|
1832
|
-
const
|
|
1832
|
+
const So = {
|
|
1833
1833
|
mounted: et,
|
|
1834
1834
|
updated: et
|
|
1835
1835
|
}, Qe = Symbol("HasAutoFocused");
|
|
@@ -1839,7 +1839,7 @@ function et(e, t) {
|
|
|
1839
1839
|
const o = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1840
1840
|
setTimeout(() => o.focus(), 10);
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const To = {
|
|
1843
1843
|
mounted: Io
|
|
1844
1844
|
}, Q = Symbol("ConfirmState");
|
|
1845
1845
|
function Io(e, t) {
|
|
@@ -1896,10 +1896,10 @@ function No(e, t) {
|
|
|
1896
1896
|
let v = null;
|
|
1897
1897
|
const c = /* @__PURE__ */ new Date();
|
|
1898
1898
|
c.getFullYear() === l.getFullYear() ? (c.getMonth() !== l.getMonth() || c.getDate() !== l.getDate()) && (v = "M/d") : v = "M/d/yy";
|
|
1899
|
-
const n = g ? null :
|
|
1899
|
+
const n = g ? null : $.defaultTimeFormat;
|
|
1900
1900
|
y = ut([v, n]).join(" ");
|
|
1901
1901
|
}
|
|
1902
|
-
y || (g ? y =
|
|
1902
|
+
y || (g ? y = $.defaultDateFormat : y = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
|
|
1903
1903
|
let E = X(l, y);
|
|
1904
1904
|
return o && (E = o + " " + E), E;
|
|
1905
1905
|
}
|
|
@@ -1947,9 +1947,9 @@ function Do(e, t) {
|
|
|
1947
1947
|
const l = Math.floor(e / 60);
|
|
1948
1948
|
return (a || p || l) && o.push(l + "m"), t ? o.length || o.push("0m") : (e -= l * 60, o.push(e + "s")), o.join(" ");
|
|
1949
1949
|
}
|
|
1950
|
-
const
|
|
1950
|
+
const $o = {
|
|
1951
1951
|
mounted: Et,
|
|
1952
|
-
updated:
|
|
1952
|
+
updated: Ho,
|
|
1953
1953
|
unmounted: kt
|
|
1954
1954
|
}, Y = /* @__PURE__ */ new Map();
|
|
1955
1955
|
function Et(e, t) {
|
|
@@ -1963,7 +1963,7 @@ function kt(e, t) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
Y.size === 0 && window.removeEventListener("keydown", xt);
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function Ho(e, t) {
|
|
1967
1967
|
kt(e, t), Et(e, t);
|
|
1968
1968
|
}
|
|
1969
1969
|
function xt(e) {
|
|
@@ -1971,7 +1971,7 @@ function xt(e) {
|
|
|
1971
1971
|
const t = e.key.toLowerCase(), o = Y.get(t);
|
|
1972
1972
|
o && (Qt(o)?.click(), e.preventDefault());
|
|
1973
1973
|
}
|
|
1974
|
-
const ee = Symbol("InfiniteScrollHandler"),
|
|
1974
|
+
const ee = Symbol("InfiniteScrollHandler"), Vo = {
|
|
1975
1975
|
mounted(e, t) {
|
|
1976
1976
|
e[ee] = new oe(e, t.value);
|
|
1977
1977
|
},
|
|
@@ -1991,8 +1991,8 @@ function rt(e, t) {
|
|
|
1991
1991
|
const Ie = /* @__PURE__ */ new WeakMap(), _o = {
|
|
1992
1992
|
beforeMount(e) {
|
|
1993
1993
|
const t = new ResizeObserver(() => {
|
|
1994
|
-
const o = e.
|
|
1995
|
-
e.style.minWidth = `${
|
|
1994
|
+
const o = window.getComputedStyle(e).minWidth.match(/^(\d+)px$/)?.[1], a = o ? parseInt(o, 10) : 0;
|
|
1995
|
+
e.clientWidth <= a || (e.style.minWidth = `${e.clientWidth}px`);
|
|
1996
1996
|
});
|
|
1997
1997
|
Ie.set(e, t), t.observe(e);
|
|
1998
1998
|
},
|
|
@@ -2067,7 +2067,7 @@ class Po {
|
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
function jo(e) {
|
|
2070
|
-
e.directive("autofocus",
|
|
2070
|
+
e.directive("autofocus", So), e.directive("confirm-button", To), e.directive("date-input", Mo), e.directive("datetime", Oo), e.directive("disabled", Lo), e.directive("duration", Fo), e.directive("hotkey", $o), e.directive("infinite-scroll", Vo), e.directive("readonly", Bo), e.directive("tooltip", Wo), e.directive("sticky-min-width", _o);
|
|
2071
2071
|
}
|
|
2072
2072
|
function kr(e) {
|
|
2073
2073
|
jo(e);
|