@signal24/vue-foundation 4.17.1 → 4.17.3
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,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var A = (e, t, n) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { compact as
|
|
1
|
+
var bt = Object.defineProperty;
|
|
2
|
+
var Tt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var A = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as N, ref as T, computed as x, watch as F, onMounted as V, openBlock as w, createElementBlock as k, createElementVNode as D, toDisplayString as U, withDirectives as J, createCommentVNode as O, Fragment as ee, renderList as he, vModelSelect as St, getCurrentInstance as pe, normalizeClass as B, normalizeStyle as Ct, withModifiers as ye, renderSlot as Q, reactive as Lt, h as te, Teleport as Mt, markRaw as xt, onBeforeUnmount as ge, resolveDirective as It, createBlock as qe, createSlots as Ht, withCtx as ce, createTextVNode as Oe, vModelText as At, onActivated as ze, onDeactivated as Ye } from "vue";
|
|
5
|
+
import { compact as Ke, debounce as Ft, isEqual as Xe, upperFirst as Dt, startCase as Ot, cloneDeep as $t, remove as Bt, last as Vt } from "lodash";
|
|
6
6
|
import { escapeHtml as _t } from "@vue/shared";
|
|
7
7
|
import { escapeHtml as Ro } from "@vue/shared";
|
|
8
8
|
import { installOpenApiClientInterceptors as Nt, isOpenApiError as Rt } from "@signal24/openapi-client-codegen/browser";
|
|
@@ -13,7 +13,7 @@ const Wt = {
|
|
|
13
13
|
}, Ut = {
|
|
14
14
|
key: 0,
|
|
15
15
|
value: null
|
|
16
|
-
}, jt = ["value"], vo = /* @__PURE__ */
|
|
16
|
+
}, jt = ["value"], vo = /* @__PURE__ */ N({
|
|
17
17
|
__name: "vf-ajax-select",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: {},
|
|
@@ -25,36 +25,36 @@ const Wt = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
27
|
setup(e, { emit: t }) {
|
|
28
|
-
const n = e, o = t, i = T(null), l =
|
|
29
|
-
const
|
|
30
|
-
return n.preprocesor ? n.preprocesor(
|
|
31
|
-
}) : null),
|
|
28
|
+
const n = e, o = t, i = T(null), l = x(() => i.value ? i.value.map((y) => {
|
|
29
|
+
const b = y;
|
|
30
|
+
return n.preprocesor ? n.preprocesor(b) : n.displayKey ? b[n.displayKey] : "";
|
|
31
|
+
}) : null), u = T(n.modelValue ?? null);
|
|
32
32
|
F(() => n.loadFn, r), F(
|
|
33
33
|
() => n.modelValue,
|
|
34
|
-
() =>
|
|
35
|
-
), F(
|
|
34
|
+
() => u.value = n.modelValue
|
|
35
|
+
), F(u, () => o("update:modelValue", u.value));
|
|
36
36
|
async function r() {
|
|
37
37
|
i.value = await n.loadFn();
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return V(r), (d, y) => l.value ? J((w(), k("select", {
|
|
40
40
|
key: 1,
|
|
41
|
-
"onUpdate:modelValue":
|
|
41
|
+
"onUpdate:modelValue": y[0] || (y[0] = (b) => u.value = b)
|
|
42
42
|
}, [
|
|
43
|
-
n.nullText ? (w(),
|
|
44
|
-
(w(!0),
|
|
45
|
-
var
|
|
46
|
-
return w(),
|
|
47
|
-
key:
|
|
48
|
-
value: (
|
|
49
|
-
},
|
|
43
|
+
n.nullText ? (w(), k("option", Ut, U(n.nullText), 1)) : O("", !0),
|
|
44
|
+
(w(!0), k(ee, null, he(l.value, (b, f) => {
|
|
45
|
+
var g;
|
|
46
|
+
return w(), k("option", {
|
|
47
|
+
key: f,
|
|
48
|
+
value: (g = i.value) == null ? void 0 : g[f]
|
|
49
|
+
}, U(b), 9, jt);
|
|
50
50
|
}), 128))
|
|
51
51
|
], 512)), [
|
|
52
|
-
[
|
|
53
|
-
]) : (w(),
|
|
54
|
-
|
|
52
|
+
[St, u.value]
|
|
53
|
+
]) : (w(), k("select", Wt, [
|
|
54
|
+
D("option", null, U(n.loadingText || "Loading..."), 1)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}), Pt = /* @__PURE__ */
|
|
57
|
+
}), Pt = /* @__PURE__ */ N({
|
|
58
58
|
__name: "overlay-anchor",
|
|
59
59
|
props: {
|
|
60
60
|
overlayId: {},
|
|
@@ -62,100 +62,100 @@ const Wt = {
|
|
|
62
62
|
},
|
|
63
63
|
setup(e) {
|
|
64
64
|
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), l = pe();
|
|
65
|
-
|
|
66
|
-
function
|
|
65
|
+
V(u);
|
|
66
|
+
function u() {
|
|
67
67
|
if (!l) return;
|
|
68
|
-
const
|
|
69
|
-
o.value =
|
|
68
|
+
const y = l.vnode.el, { styles: b, classes: f } = r(y, n);
|
|
69
|
+
o.value = b, i.value = f;
|
|
70
70
|
}
|
|
71
|
-
function r(
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const a =
|
|
75
|
-
let
|
|
76
|
-
if (
|
|
77
|
-
|
|
71
|
+
function r(y, b) {
|
|
72
|
+
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, g = b.getBoundingClientRect(), v = y.getBoundingClientRect();
|
|
73
|
+
f.matchWidth && (v.width = g.width), f.matchHeight && (v.height = g.height);
|
|
74
|
+
const a = f.class ? Array.isArray(f.class) ? f.class : [f.class] : [];
|
|
75
|
+
let c, S;
|
|
76
|
+
if (f.y === "center")
|
|
77
|
+
c = g.top + g.height / 2 - v.height / 2, a.push("anchored-center-y");
|
|
78
78
|
else {
|
|
79
|
-
const L = (
|
|
80
|
-
|
|
79
|
+
const L = (g.bottom + v.height < window.innerHeight || f.y === "below") && f.y !== "above";
|
|
80
|
+
c = L ? g.bottom : g.top - v.height, a.push(L ? "anchored-top" : "anchored-bottom");
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
S =
|
|
82
|
+
if (f.x === "center")
|
|
83
|
+
S = g.left + g.width / 2 - v.width / 2, a.push("anchored-center-x");
|
|
84
84
|
else {
|
|
85
|
-
const L = (
|
|
86
|
-
S = L ?
|
|
85
|
+
const L = (g.left + v.width < window.innerWidth || f.x === "left") && f.x !== "right";
|
|
86
|
+
S = L ? g.left : g.right - v.width, a.push(L ? "anchored-left" : "anchored-right");
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
styles: {
|
|
90
|
-
top: `${
|
|
90
|
+
top: `${c}px`,
|
|
91
91
|
left: `${S}px`,
|
|
92
|
-
...
|
|
93
|
-
...
|
|
92
|
+
...f.matchWidth ? { width: `${v.width}px` } : {},
|
|
93
|
+
...f.matchHeight ? { height: `${v.height}px` } : {}
|
|
94
94
|
},
|
|
95
95
|
classes: a
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
function d() {
|
|
99
|
-
window.removeEventListener("click", d),
|
|
99
|
+
window.removeEventListener("click", d), Yt(t.overlayId);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return V(() => {
|
|
102
102
|
setTimeout(() => {
|
|
103
103
|
window.addEventListener("click", d);
|
|
104
104
|
}, 10);
|
|
105
|
-
}), (
|
|
105
|
+
}), (y, b) => (w(), k("div", {
|
|
106
106
|
class: B(["vf-overlay-anchor", i.value]),
|
|
107
|
-
style:
|
|
107
|
+
style: Ct(o.value),
|
|
108
108
|
onClick: ye(d, ["stop"])
|
|
109
109
|
}, [
|
|
110
|
-
Q(
|
|
110
|
+
Q(y.$slots, "default")
|
|
111
111
|
], 6));
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
let qt = 0;
|
|
115
|
-
const
|
|
115
|
+
const _ = Lt([]), mo = N({
|
|
116
116
|
setup() {
|
|
117
117
|
return () => te("div", [
|
|
118
|
-
he(
|
|
118
|
+
he(_, (e) => te(Mt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
function Ee(e, t, n) {
|
|
123
123
|
const o = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
124
124
|
o.id = "vf-overlay-target", o.removeAttribute("inert"), document.body.appendChild(o);
|
|
125
|
-
const i = String(++qt), l = xt(e),
|
|
125
|
+
const i = String(++qt), l = xt(e), u = te(l, t), r = n != null && n.anchor ? te(Pt, { overlayId: i, anchor: n.anchor }, () => [u]) : void 0, d = {
|
|
126
126
|
id: i,
|
|
127
127
|
component: l,
|
|
128
128
|
props: t,
|
|
129
129
|
options: n ?? {},
|
|
130
|
-
vnode:
|
|
130
|
+
vnode: u,
|
|
131
131
|
wrapperVnode: r
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return _.push(d), d;
|
|
134
134
|
}
|
|
135
135
|
function ho(e) {
|
|
136
|
-
e.$ &&
|
|
136
|
+
e.$ && Ze(e.$);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ze(e) {
|
|
139
139
|
let t = e;
|
|
140
140
|
for (; t && !zt(t.vnode); )
|
|
141
141
|
t = t.parent;
|
|
142
142
|
}
|
|
143
143
|
function zt(e) {
|
|
144
|
-
const t =
|
|
145
|
-
return t >= 0 ? (
|
|
144
|
+
const t = _.findIndex((n) => n.vnode.component === e.component);
|
|
145
|
+
return t >= 0 ? (_[t].props.callback(), !0) : !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
const t =
|
|
149
|
-
return t >= 0 ? (
|
|
147
|
+
function Yt(e) {
|
|
148
|
+
const t = _.findIndex((n) => n.id === e);
|
|
149
|
+
return t >= 0 ? (_[t].props.callback(), !0) : !1;
|
|
150
150
|
}
|
|
151
151
|
function ne(e) {
|
|
152
|
-
const t =
|
|
153
|
-
t >= 0 &&
|
|
152
|
+
const t = _.indexOf(e);
|
|
153
|
+
t >= 0 && _.splice(t, 1);
|
|
154
154
|
}
|
|
155
155
|
async function we(e, t, n) {
|
|
156
156
|
return new Promise((o) => {
|
|
157
157
|
let i = null;
|
|
158
|
-
const
|
|
158
|
+
const u = { ...t, callback: async (r) => {
|
|
159
159
|
if (n != null && n.onCallback) {
|
|
160
160
|
const d = n.onCallback(r);
|
|
161
161
|
if (typeof d == "object" && "then" in d && typeof d.then == "function" && await d === !1)
|
|
@@ -163,7 +163,7 @@ async function we(e, t, n) {
|
|
|
163
163
|
}
|
|
164
164
|
ne(i), o(r);
|
|
165
165
|
} };
|
|
166
|
-
i = Ee(e,
|
|
166
|
+
i = Ee(e, u, n);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
function oe(e, t) {
|
|
@@ -172,7 +172,7 @@ function oe(e, t) {
|
|
|
172
172
|
classes: e.classes ?? []
|
|
173
173
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
174
174
|
}
|
|
175
|
-
async function
|
|
175
|
+
async function Kt(e, t) {
|
|
176
176
|
await we(se, oe(e, t));
|
|
177
177
|
}
|
|
178
178
|
async function po(e, t) {
|
|
@@ -200,33 +200,33 @@ function go(e, t) {
|
|
|
200
200
|
});
|
|
201
201
|
return () => ne(o);
|
|
202
202
|
}
|
|
203
|
-
const
|
|
203
|
+
const $ = {
|
|
204
204
|
unhandledErrorSupportText: "please contact support",
|
|
205
205
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
206
206
|
defaultDateFormat: "M/d/yy",
|
|
207
|
-
|
|
207
|
+
defaultTimeFormat: "H:mm"
|
|
208
208
|
};
|
|
209
209
|
function Eo(e) {
|
|
210
|
-
Object.assign(
|
|
210
|
+
Object.assign($, e);
|
|
211
211
|
}
|
|
212
212
|
class le extends Error {
|
|
213
213
|
constructor(t) {
|
|
214
214
|
super(t), this.name = "UserError";
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Xt(e) {
|
|
218
218
|
return e instanceof le ? e.message : `An application error has occurred:
|
|
219
219
|
|
|
220
220
|
${ke(e).message}
|
|
221
221
|
|
|
222
|
-
Please refresh the page and try again. If this error persists, ${
|
|
222
|
+
Please refresh the page and try again. If this error persists, ${$.unhandledErrorSupportText}.`;
|
|
223
223
|
}
|
|
224
224
|
function ke(e) {
|
|
225
225
|
return e instanceof Error ? e : new Error(String(e));
|
|
226
226
|
}
|
|
227
227
|
async function wo(e, t) {
|
|
228
228
|
const n = ke(e);
|
|
229
|
-
return n instanceof le ||
|
|
229
|
+
return n instanceof le || $.errorHandler(n), Kt({
|
|
230
230
|
title: t == null ? void 0 : t.title,
|
|
231
231
|
message: n,
|
|
232
232
|
classes: t == null ? void 0 : t.classes
|
|
@@ -234,7 +234,7 @@ async function wo(e, t) {
|
|
|
234
234
|
}
|
|
235
235
|
async function ko(e) {
|
|
236
236
|
const t = ke(e);
|
|
237
|
-
t instanceof le ||
|
|
237
|
+
t instanceof le || $.errorHandler(t);
|
|
238
238
|
}
|
|
239
239
|
const z = Symbol("MaskState");
|
|
240
240
|
function bo(e, t) {
|
|
@@ -245,21 +245,21 @@ function bo(e, t) {
|
|
|
245
245
|
function To(e) {
|
|
246
246
|
var o;
|
|
247
247
|
const t = (o = e.$) == null ? void 0 : o.vnode.el, n = t.closest(".vf-modal");
|
|
248
|
-
return
|
|
248
|
+
return Ge(n ?? t);
|
|
249
249
|
}
|
|
250
250
|
function Zt(e, t) {
|
|
251
251
|
if (!e[z]) {
|
|
252
252
|
const n = document.createElement("div");
|
|
253
253
|
n.classList.add("vf-mask"), e.appendChild(n), e[z] = { maskEl: n };
|
|
254
254
|
}
|
|
255
|
-
return e[z].maskEl.innerText = t ?? "", () =>
|
|
255
|
+
return e[z].maskEl.innerText = t ?? "", () => Ge(e);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ge(e) {
|
|
258
258
|
e[z] && e.removeChild(e[z].maskEl);
|
|
259
259
|
}
|
|
260
260
|
const me = Symbol("FormMaskState");
|
|
261
261
|
function Gt(e, t, n) {
|
|
262
|
-
const o = e instanceof Element ? e :
|
|
262
|
+
const o = e instanceof Element ? e : Je(e);
|
|
263
263
|
if (!o) return () => {
|
|
264
264
|
};
|
|
265
265
|
o.classList.add("vf-masked");
|
|
@@ -271,15 +271,15 @@ function Gt(e, t, n) {
|
|
|
271
271
|
disabledElements: r,
|
|
272
272
|
waitButton: i,
|
|
273
273
|
buttonHtml: l
|
|
274
|
-
}, () =>
|
|
274
|
+
}, () => Qe(o);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const t = e instanceof Element ? e :
|
|
276
|
+
function Qe(e) {
|
|
277
|
+
const t = e instanceof Element ? e : Je(e);
|
|
278
278
|
if (!t) return;
|
|
279
279
|
const n = t[me];
|
|
280
280
|
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[me]);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Je(e) {
|
|
283
283
|
var n;
|
|
284
284
|
const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
|
|
285
285
|
return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
|
|
@@ -290,7 +290,7 @@ const Qt = ["id"], Jt = {
|
|
|
290
290
|
}, en = { class: "vf-modal-content" }, tn = {
|
|
291
291
|
key: 1,
|
|
292
292
|
class: "vf-modal-footer"
|
|
293
|
-
}, nn = /* @__PURE__ */
|
|
293
|
+
}, nn = /* @__PURE__ */ N({
|
|
294
294
|
__name: "vf-modal",
|
|
295
295
|
props: {
|
|
296
296
|
id: {},
|
|
@@ -302,69 +302,69 @@ const Qt = ["id"], Jt = {
|
|
|
302
302
|
emits: ["formSubmit"],
|
|
303
303
|
setup(e, { expose: t }) {
|
|
304
304
|
const n = pe(), o = e;
|
|
305
|
-
t({ mask:
|
|
306
|
-
const i = T(), l = T(),
|
|
307
|
-
|
|
308
|
-
var
|
|
309
|
-
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown",
|
|
305
|
+
t({ mask: f, unmask: g, hide: v, unhide: a });
|
|
306
|
+
const i = T(), l = T(), u = T(!1), r = x(() => Ke([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
|
|
307
|
+
V(() => {
|
|
308
|
+
var c;
|
|
309
|
+
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", y), (c = i.value) == null || c.addEventListener("click", d));
|
|
310
310
|
}), ge(() => {
|
|
311
|
-
window.removeEventListener("keydown",
|
|
311
|
+
window.removeEventListener("keydown", y), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
312
312
|
});
|
|
313
|
-
function d(
|
|
314
|
-
|
|
313
|
+
function d(c) {
|
|
314
|
+
c.target == i.value && b();
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
if (
|
|
316
|
+
function y(c) {
|
|
317
|
+
if (c.key === "Esc" || c.key === "Escape") {
|
|
318
318
|
const S = document.querySelectorAll(".vf-modal-wrap");
|
|
319
|
-
S[S.length - 1] === i.value &&
|
|
319
|
+
S[S.length - 1] === i.value && b();
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
322
|
+
function b() {
|
|
323
|
+
Ze(n);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
return Gt(l.value), () =>
|
|
325
|
+
function f() {
|
|
326
|
+
return Gt(l.value), () => g();
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
|
|
328
|
+
function g() {
|
|
329
|
+
Qe(l.value);
|
|
330
330
|
}
|
|
331
331
|
function v() {
|
|
332
|
-
return
|
|
332
|
+
return u.value = !0, () => a();
|
|
333
333
|
}
|
|
334
334
|
function a() {
|
|
335
|
-
|
|
335
|
+
u.value = !1;
|
|
336
336
|
}
|
|
337
|
-
return (
|
|
338
|
-
id:
|
|
337
|
+
return (c, S) => (w(), k("div", {
|
|
338
|
+
id: c.id,
|
|
339
339
|
ref_key: "overlay",
|
|
340
340
|
ref: i,
|
|
341
341
|
class: B(["vf-overlay vf-modal-wrap", r.value])
|
|
342
342
|
}, [
|
|
343
|
-
|
|
343
|
+
D("form", {
|
|
344
344
|
ref_key: "form",
|
|
345
345
|
ref: l,
|
|
346
346
|
action: ".",
|
|
347
|
-
class: B(["vf-modal", { scrolls:
|
|
348
|
-
onSubmit: S[0] || (S[0] = ye((I) =>
|
|
347
|
+
class: B(["vf-modal", { scrolls: c.scrolls }]),
|
|
348
|
+
onSubmit: S[0] || (S[0] = ye((I) => c.$emit("formSubmit"), ["prevent"]))
|
|
349
349
|
}, [
|
|
350
|
-
|
|
351
|
-
Q(
|
|
352
|
-
o.closeX ? (w(),
|
|
350
|
+
c.$slots.header ? (w(), k("div", Jt, [
|
|
351
|
+
Q(c.$slots, "header"),
|
|
352
|
+
o.closeX ? (w(), k("i", {
|
|
353
353
|
key: 0,
|
|
354
354
|
class: "close",
|
|
355
|
-
onClick:
|
|
356
|
-
})) :
|
|
357
|
-
])) :
|
|
358
|
-
|
|
359
|
-
Q(
|
|
355
|
+
onClick: b
|
|
356
|
+
})) : O("", !0)
|
|
357
|
+
])) : O("", !0),
|
|
358
|
+
D("div", en, [
|
|
359
|
+
Q(c.$slots, "default")
|
|
360
360
|
]),
|
|
361
|
-
|
|
362
|
-
Q(
|
|
363
|
-
])) :
|
|
361
|
+
c.$slots.footer ? (w(), k("div", tn, [
|
|
362
|
+
Q(c.$slots, "footer")
|
|
363
|
+
])) : O("", !0)
|
|
364
364
|
], 34)
|
|
365
365
|
], 10, Qt));
|
|
366
366
|
}
|
|
367
|
-
}), on = ["innerHtml"], ln = ["innerText"], se = /* @__PURE__ */
|
|
367
|
+
}), on = ["innerHtml"], ln = ["innerText"], se = /* @__PURE__ */ N({
|
|
368
368
|
__name: "vf-alert-modal",
|
|
369
369
|
props: {
|
|
370
370
|
isBare: { type: Boolean },
|
|
@@ -376,18 +376,18 @@ const Qt = ["id"], Jt = {
|
|
|
376
376
|
callback: { type: Function }
|
|
377
377
|
},
|
|
378
378
|
setup(e) {
|
|
379
|
-
const t = e, n =
|
|
379
|
+
const t = e, n = x(() => t.message instanceof Error ? Xt(t.message) : t.message);
|
|
380
380
|
return (o, i) => {
|
|
381
|
-
const l =
|
|
381
|
+
const l = It("autofocus");
|
|
382
382
|
return w(), qe(nn, {
|
|
383
383
|
class: B(["vf-alert", ...o.classes ?? []])
|
|
384
|
-
},
|
|
384
|
+
}, Ht({
|
|
385
385
|
default: ce(() => [
|
|
386
|
-
o.isHtml ? (w(),
|
|
386
|
+
o.isHtml ? (w(), k("div", {
|
|
387
387
|
key: 0,
|
|
388
388
|
innerHtml: o.message,
|
|
389
389
|
class: "user-message"
|
|
390
|
-
}, null, 8, on)) : (w(),
|
|
390
|
+
}, null, 8, on)) : (w(), k("div", {
|
|
391
391
|
key: 1,
|
|
392
392
|
innerText: n.value
|
|
393
393
|
}, null, 8, ln))
|
|
@@ -397,32 +397,32 @@ const Qt = ["id"], Jt = {
|
|
|
397
397
|
o.title ? {
|
|
398
398
|
name: "header",
|
|
399
399
|
fn: ce(() => [
|
|
400
|
-
|
|
400
|
+
D("h1", null, U(o.title), 1)
|
|
401
401
|
]),
|
|
402
402
|
key: "0"
|
|
403
403
|
} : void 0,
|
|
404
404
|
o.isBare ? void 0 : {
|
|
405
405
|
name: "footer",
|
|
406
406
|
fn: ce(() => [
|
|
407
|
-
o.shouldConfirm ? (w(),
|
|
408
|
-
J((w(),
|
|
407
|
+
o.shouldConfirm ? (w(), k(ee, { key: 0 }, [
|
|
408
|
+
J((w(), k("button", {
|
|
409
409
|
class: "primary",
|
|
410
410
|
onClick: i[0] || (i[0] = () => o.callback(!0))
|
|
411
411
|
}, i[3] || (i[3] = [
|
|
412
|
-
|
|
412
|
+
Oe("Confirm")
|
|
413
413
|
]))), [
|
|
414
414
|
[l]
|
|
415
415
|
]),
|
|
416
|
-
|
|
416
|
+
D("button", {
|
|
417
417
|
class: "default",
|
|
418
418
|
onClick: i[1] || (i[1] = () => o.callback(!1))
|
|
419
419
|
}, "Cancel")
|
|
420
|
-
], 64)) : J((w(),
|
|
420
|
+
], 64)) : J((w(), k("button", {
|
|
421
421
|
key: 1,
|
|
422
422
|
class: "default",
|
|
423
423
|
onClick: i[2] || (i[2] = () => o.callback(!0))
|
|
424
424
|
}, i[4] || (i[4] = [
|
|
425
|
-
|
|
425
|
+
Oe("OK")
|
|
426
426
|
]))), [
|
|
427
427
|
[l]
|
|
428
428
|
])
|
|
@@ -433,11 +433,11 @@ const Qt = ["id"], Jt = {
|
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
|
-
var
|
|
436
|
+
var M = [];
|
|
437
437
|
for (var de = 0; de < 256; ++de)
|
|
438
|
-
|
|
438
|
+
M.push((de + 256).toString(16).slice(1));
|
|
439
439
|
function sn(e, t = 0) {
|
|
440
|
-
return (
|
|
440
|
+
return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
|
|
441
441
|
}
|
|
442
442
|
var G, rn = new Uint8Array(16);
|
|
443
443
|
function an() {
|
|
@@ -446,12 +446,12 @@ function an() {
|
|
|
446
446
|
return G(rn);
|
|
447
447
|
}
|
|
448
448
|
var un = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
449
|
-
const
|
|
449
|
+
const $e = {
|
|
450
450
|
randomUUID: un
|
|
451
451
|
};
|
|
452
452
|
function cn(e, t, n) {
|
|
453
|
-
if (
|
|
454
|
-
return
|
|
453
|
+
if ($e.randomUUID && !t && !e)
|
|
454
|
+
return $e.randomUUID();
|
|
455
455
|
e = e || {};
|
|
456
456
|
var o = e.random || (e.rng || an)();
|
|
457
457
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, sn(o);
|
|
@@ -478,7 +478,7 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
478
478
|
}, pn = ["onMousemove", "onMousedown"], yn = ["innerHTML"], gn = ["innerHTML"], En = {
|
|
479
479
|
key: 0,
|
|
480
480
|
class: "no-results"
|
|
481
|
-
}, wn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", kn = /* @__PURE__ */
|
|
481
|
+
}, wn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", kn = /* @__PURE__ */ N({
|
|
482
482
|
__name: "vf-smart-select",
|
|
483
483
|
props: {
|
|
484
484
|
modelValue: {},
|
|
@@ -507,37 +507,37 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
507
507
|
},
|
|
508
508
|
emits: ["optionsLoaded", "update:modelValue"],
|
|
509
509
|
setup(e, { expose: t, emit: n }) {
|
|
510
|
-
const o = Symbol("null"), i = Symbol("create"), l = e,
|
|
510
|
+
const o = Symbol("null"), i = Symbol("create"), l = e, u = n;
|
|
511
511
|
t({
|
|
512
|
-
addRemoteOption:
|
|
512
|
+
addRemoteOption: kt
|
|
513
513
|
});
|
|
514
|
-
const r = T(), d = T(),
|
|
514
|
+
const r = T(), d = T(), y = T(), b = T(!1), f = T(!1), g = T([]), v = T(!1), a = T(""), c = T(null), S = T(null), I = T(!1), L = T(null), Se = T(!1), rt = x(() => l.prependOptions ?? []), at = x(() => l.appendOptions ?? []), Ce = x(() => !!l.disabled), ut = x(() => !f.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), ct = x(() => l.noResultsText || "No options match your search."), W = x(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (s) => s[l.valueField] : null), j = x(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (s) => String(s[l.keyField]) : W.value ? (s) => String(W.value(s)) : null), ie = x(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), Le = x(() => [...rt.value, ...g.value, ...at.value]), re = x(() => Le.value.map((s, m) => {
|
|
515
515
|
var Ae, Fe;
|
|
516
|
-
const
|
|
517
|
-
return l.searchFields ? l.searchFields.forEach((
|
|
518
|
-
s[
|
|
519
|
-
}) : (Z.push(
|
|
520
|
-
key: ((Fe = j.value) == null ? void 0 : Fe.call(j, s)) ?? String(
|
|
521
|
-
title:
|
|
522
|
-
subtitle:
|
|
516
|
+
const h = ie.value(s), p = (Ae = l.subtitleFormatter) == null ? void 0 : Ae.call(l, s), E = h ? h.trim().toLowerCase() : "", C = p ? p.trim().toLowerCase() : "", Z = [];
|
|
517
|
+
return l.searchFields ? l.searchFields.forEach((De) => {
|
|
518
|
+
s[De] && Z.push(String(s[De]).toLowerCase());
|
|
519
|
+
}) : (Z.push(E), C && Z.push(C)), {
|
|
520
|
+
key: ((Fe = j.value) == null ? void 0 : Fe.call(j, s)) ?? String(m),
|
|
521
|
+
title: h,
|
|
522
|
+
subtitle: p,
|
|
523
523
|
searchContent: Z.join(""),
|
|
524
524
|
ref: s
|
|
525
525
|
};
|
|
526
|
-
})), H =
|
|
526
|
+
})), H = x(() => {
|
|
527
527
|
let s = [...re.value];
|
|
528
528
|
if (v.value) {
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
531
|
-
s = s.filter((
|
|
532
|
-
const
|
|
533
|
-
s = s.map((
|
|
529
|
+
const m = a.value.trim().toLowerCase();
|
|
530
|
+
if (m.length) {
|
|
531
|
+
s = s.filter((E) => E.searchContent.includes(m));
|
|
532
|
+
const h = _t(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
|
|
533
|
+
s = s.map((E) => {
|
|
534
534
|
var C;
|
|
535
535
|
return {
|
|
536
|
-
...
|
|
537
|
-
title:
|
|
538
|
-
subtitle: (C =
|
|
536
|
+
...E,
|
|
537
|
+
title: E.title.replace(p, "<mark>$1</mark>"),
|
|
538
|
+
subtitle: (C = E.subtitle) == null ? void 0 : C.replace(p, "<mark>$1</mark>")
|
|
539
539
|
};
|
|
540
|
-
}), Se.value && (s.find((C) => C.searchContent ===
|
|
540
|
+
}), Se.value && (s.find((C) => C.searchContent === m) !== void 0 || s.push({
|
|
541
541
|
key: i,
|
|
542
542
|
title: "Create <strong>" + a.value.trim() + "</strong>..."
|
|
543
543
|
}));
|
|
@@ -551,43 +551,43 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
551
551
|
F(() => l.modelValue, ue), F(
|
|
552
552
|
() => l.options,
|
|
553
553
|
() => {
|
|
554
|
-
|
|
554
|
+
g.value = l.options ?? [], f.value = !0;
|
|
555
555
|
}
|
|
556
556
|
), F(re, () => {
|
|
557
557
|
I.value && setTimeout(Ie, 0);
|
|
558
558
|
}), F(a, () => {
|
|
559
559
|
v.value && !l.remoteSearch && !a.value.trim().length && (v.value = !1);
|
|
560
560
|
}), F(I, () => {
|
|
561
|
-
I.value ? setTimeout(
|
|
561
|
+
I.value ? setTimeout(gt, 0) : (v.value = !1, a.value = S.value || "", y.value && (y.value.style.visibility = "hidden"));
|
|
562
562
|
}), F(H, () => {
|
|
563
563
|
var s;
|
|
564
|
-
l.modelValue && !
|
|
565
|
-
}),
|
|
566
|
-
Se.value = l.onCreateItem !== void 0, l.options ? (
|
|
567
|
-
|
|
564
|
+
l.modelValue && !c.value && ue(), (L.value || v.value) && !H.value.find((m) => m.key == L.value) && (L.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
|
|
565
|
+
}), V(async () => {
|
|
566
|
+
Se.value = l.onCreateItem !== void 0, l.options ? (g.value = [...l.options], f.value = !0) : l.preload && await Me(), ue(), F(c, () => {
|
|
567
|
+
c.value !== l.modelValue && u(
|
|
568
568
|
"update:modelValue",
|
|
569
|
-
|
|
569
|
+
c.value && W.value ? W.value(c.value) : c.value
|
|
570
570
|
);
|
|
571
|
-
}), l.remoteSearch && F(a, Ft(
|
|
571
|
+
}), l.remoteSearch && F(a, Ft(dt, 250));
|
|
572
572
|
});
|
|
573
|
-
async function xe() {
|
|
574
|
-
await Me(), E.value && c("optionsLoaded", E.value);
|
|
575
|
-
}
|
|
576
573
|
async function Me() {
|
|
577
|
-
|
|
574
|
+
await xe(), g.value && u("optionsLoaded", g.value);
|
|
575
|
+
}
|
|
576
|
+
async function xe() {
|
|
577
|
+
var m;
|
|
578
578
|
const s = l.remoteSearch && v.value && a.value ? a.value : null;
|
|
579
|
-
|
|
579
|
+
b.value = !0, g.value = await ((m = l.loadOptions) == null ? void 0 : m.call(l, s)) ?? [], b.value = !1, f.value = !0;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
v.value && (
|
|
581
|
+
function dt() {
|
|
582
|
+
v.value && (xe(), v.value = a.value.trim().length > 0);
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function ft(s) {
|
|
585
585
|
if (s.key == "Escape") {
|
|
586
586
|
s.stopPropagation(), s.target.blur();
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
589
|
if (!(s.key == "ArrowLeft" || s.key == "ArrowRight") && s.key != "Tab") {
|
|
590
|
-
if (!
|
|
590
|
+
if (!f.value) {
|
|
591
591
|
v.value || s.preventDefault();
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
@@ -599,8 +599,8 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
599
599
|
return s.preventDefault(), ae(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
600
600
|
if (s.key == "Enter") {
|
|
601
601
|
s.preventDefault();
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
602
|
+
const m = H.value.find((h) => h.key == L.value);
|
|
603
|
+
if (m) return He(m);
|
|
604
604
|
}
|
|
605
605
|
if (s.key === "Delete" || s.key === "Backspace") {
|
|
606
606
|
a.value.length > 1 && (v.value = !0);
|
|
@@ -609,130 +609,130 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
609
609
|
!s.metaKey && wn.includes(s.key) && (v.value = !0);
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
|
|
612
|
+
function vt() {
|
|
613
|
+
mt(), I.value = !0, setTimeout(() => {
|
|
614
614
|
var s;
|
|
615
615
|
return (s = d.value) == null ? void 0 : s.select();
|
|
616
616
|
}, 0);
|
|
617
617
|
}
|
|
618
|
-
function vt(s) {
|
|
619
|
-
u.value ? L.value = mt(u.value) : l.nullTitle && (L.value = o);
|
|
620
|
-
}
|
|
621
618
|
function mt(s) {
|
|
622
|
-
|
|
623
|
-
return j.value ? j.value(u.value) : ((f = ht(s)) == null ? void 0 : f.key) ?? "";
|
|
619
|
+
c.value ? L.value = ht(c.value) : l.nullTitle && (L.value = o);
|
|
624
620
|
}
|
|
625
621
|
function ht(s) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return f;
|
|
629
|
-
const m = l.keyExtractor ? (g, C) => l.keyExtractor(g) === l.keyExtractor(C) : Xe, h = H.value.find((g) => m(g.ref, s));
|
|
630
|
-
return h || null;
|
|
622
|
+
var m;
|
|
623
|
+
return j.value ? j.value(c.value) : ((m = pt(s)) == null ? void 0 : m.key) ?? "";
|
|
631
624
|
}
|
|
632
|
-
function pt() {
|
|
633
|
-
|
|
625
|
+
function pt(s) {
|
|
626
|
+
const m = H.value.find((E) => E.ref === s);
|
|
627
|
+
if (m)
|
|
628
|
+
return m;
|
|
629
|
+
const h = l.keyExtractor ? (E, C) => l.keyExtractor(E) === l.keyExtractor(C) : Xe, p = H.value.find((E) => h(E.ref, s));
|
|
630
|
+
return p || null;
|
|
634
631
|
}
|
|
635
632
|
function yt() {
|
|
636
|
-
|
|
637
|
-
y.value || xe(), l.optionsListId && ((s = p.value) == null || s.setAttribute("id", l.optionsListId)), gt();
|
|
633
|
+
l.debug || (!a.value.length && l.nullTitle && (c.value = null, S.value = null), I.value = !1);
|
|
638
634
|
}
|
|
639
635
|
function gt() {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
636
|
+
var s;
|
|
637
|
+
f.value || Me(), l.optionsListId && ((s = y.value) == null || s.setAttribute("id", l.optionsListId)), Et();
|
|
638
|
+
}
|
|
639
|
+
function Et() {
|
|
640
|
+
const s = r.value.getBoundingClientRect(), m = s.y + s.height + 2, h = s.x, p = y.value, E = window.getComputedStyle(r.value);
|
|
641
|
+
for (let C in E)
|
|
642
|
+
/^(font|text)/.test(C) && (p.style[C] = E[C]);
|
|
643
|
+
if (p.style.top = m + "px", p.style.left = h + "px", p.style.minWidth = s.width + "px", !E.maxHeight || E.maxHeight == "none") {
|
|
644
|
+
const C = window.innerHeight - m - 12;
|
|
645
|
+
p.style.maxHeight = C + "px";
|
|
646
646
|
}
|
|
647
|
-
|
|
647
|
+
p.style.visibility = "visible", document.body.appendChild(p), setTimeout(Ie, 0);
|
|
648
648
|
}
|
|
649
649
|
function Ie() {
|
|
650
|
-
if (!
|
|
651
|
-
const s = H.value.findIndex((
|
|
652
|
-
|
|
650
|
+
if (!f.value || !L.value) return;
|
|
651
|
+
const s = H.value.findIndex((p) => p.key == L.value), m = y.value, h = m == null ? void 0 : m.querySelectorAll(".option")[s];
|
|
652
|
+
h && (m.scrollTop = h.offsetTop);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function wt(s) {
|
|
655
655
|
L.value = s ? s.key : null;
|
|
656
656
|
}
|
|
657
657
|
function ae(s) {
|
|
658
|
-
const
|
|
659
|
-
let
|
|
660
|
-
if (
|
|
661
|
-
L.value = H.value[
|
|
662
|
-
const
|
|
663
|
-
|
|
658
|
+
const m = H.value.findIndex((C) => C.key == L.value);
|
|
659
|
+
let h = m + s;
|
|
660
|
+
if (h < 0 ? h = 0 : h >= H.value.length && (h = H.value.length - 1), m == h) return;
|
|
661
|
+
L.value = H.value[h].key;
|
|
662
|
+
const p = y.value, E = p == null ? void 0 : p.querySelectorAll(".option")[h];
|
|
663
|
+
E && (E.offsetTop < p.scrollTop ? p.scrollTop = E.offsetTop : E.offsetTop + E.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = E.offsetTop + E.offsetHeight - p.clientHeight));
|
|
664
664
|
}
|
|
665
665
|
function He(s) {
|
|
666
|
-
var
|
|
666
|
+
var m, h;
|
|
667
667
|
if (v.value = !1, s.key == o)
|
|
668
|
-
a.value = "",
|
|
668
|
+
a.value = "", c.value = null, S.value = null;
|
|
669
669
|
else if (s.key === i) {
|
|
670
|
-
const
|
|
671
|
-
a.value = "",
|
|
670
|
+
const p = a.value.trim();
|
|
671
|
+
a.value = "", c.value = null, S.value = null, (m = l.onCreateItem) == null || m.call(l, p);
|
|
672
672
|
} else {
|
|
673
|
-
const
|
|
674
|
-
|
|
673
|
+
const E = re.value.find((C) => C.key == s.key).ref;
|
|
674
|
+
c.value = E, S.value = ie.value(E), a.value = S.value || "";
|
|
675
675
|
}
|
|
676
|
-
(
|
|
676
|
+
(h = d.value) == null || h.blur();
|
|
677
677
|
}
|
|
678
678
|
function ue() {
|
|
679
|
-
l.modelValue ? (
|
|
679
|
+
l.modelValue ? (c.value = W.value ? Le.value.find((s) => l.modelValue === W.value(s)) : l.modelValue, S.value = c.value ? ie.value(c.value) : null, a.value = S.value || "") : (c.value = null, S.value = null, a.value = "");
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
|
|
681
|
+
function kt(s) {
|
|
682
|
+
g.value.unshift(s);
|
|
683
683
|
}
|
|
684
|
-
return (s,
|
|
684
|
+
return (s, m) => (w(), k("div", {
|
|
685
685
|
ref_key: "el",
|
|
686
686
|
ref: r,
|
|
687
687
|
class: B(["vf-smart-select", { disabled: Ce.value, open: I.value }])
|
|
688
688
|
}, [
|
|
689
|
-
J(
|
|
689
|
+
J(D("input", {
|
|
690
690
|
ref_key: "searchField",
|
|
691
691
|
ref: d,
|
|
692
|
-
"onUpdate:modelValue":
|
|
692
|
+
"onUpdate:modelValue": m[0] || (m[0] = (h) => a.value = h),
|
|
693
693
|
type: "text",
|
|
694
694
|
disabled: Ce.value,
|
|
695
695
|
class: B({ nullable: !!s.nullTitle }),
|
|
696
|
-
placeholder:
|
|
696
|
+
placeholder: ut.value,
|
|
697
697
|
required: s.required,
|
|
698
698
|
"data-1p-ignore": "",
|
|
699
|
-
onKeydown:
|
|
700
|
-
onFocus:
|
|
701
|
-
onBlur:
|
|
699
|
+
onKeydown: ft,
|
|
700
|
+
onFocus: vt,
|
|
701
|
+
onBlur: yt
|
|
702
702
|
}, null, 42, mn), [
|
|
703
|
-
[
|
|
703
|
+
[At, a.value]
|
|
704
704
|
]),
|
|
705
|
-
I.value ? (w(),
|
|
705
|
+
I.value ? (w(), k("div", {
|
|
706
706
|
key: 0,
|
|
707
707
|
ref_key: "optionsContainer",
|
|
708
|
-
ref:
|
|
708
|
+
ref: y,
|
|
709
709
|
class: "vf-smart-select-options"
|
|
710
710
|
}, [
|
|
711
|
-
|
|
712
|
-
(w(!0),
|
|
713
|
-
key: String(
|
|
711
|
+
f.value ? (w(), k(ee, { key: 1 }, [
|
|
712
|
+
(w(!0), k(ee, null, he(H.value, (h) => (w(), k("div", {
|
|
713
|
+
key: String(h.key),
|
|
714
714
|
class: B(["option", {
|
|
715
|
-
highlighted: L.value ===
|
|
715
|
+
highlighted: L.value === h.key
|
|
716
716
|
}]),
|
|
717
|
-
onMousemove: (
|
|
718
|
-
onMousedown: (
|
|
717
|
+
onMousemove: (p) => wt(h),
|
|
718
|
+
onMousedown: (p) => He(h)
|
|
719
719
|
}, [
|
|
720
|
-
|
|
720
|
+
D("div", {
|
|
721
721
|
class: "title",
|
|
722
|
-
innerHTML:
|
|
722
|
+
innerHTML: h.title
|
|
723
723
|
}, null, 8, yn),
|
|
724
|
-
|
|
724
|
+
h.subtitle ? (w(), k("div", {
|
|
725
725
|
key: 0,
|
|
726
726
|
class: "subtitle",
|
|
727
|
-
innerHTML:
|
|
728
|
-
}, null, 8, gn)) :
|
|
727
|
+
innerHTML: h.subtitle
|
|
728
|
+
}, null, 8, gn)) : O("", !0)
|
|
729
729
|
], 42, pn))), 128)),
|
|
730
|
-
!H.value.length && a.value ? (w(),
|
|
731
|
-
], 64)) : (w(),
|
|
732
|
-
], 512)) :
|
|
730
|
+
!H.value.length && a.value ? (w(), k("div", En, U(ct.value), 1)) : O("", !0)
|
|
731
|
+
], 64)) : (w(), k("div", hn, "Loading..."))
|
|
732
|
+
], 512)) : O("", !0)
|
|
733
733
|
], 2));
|
|
734
734
|
}
|
|
735
|
-
}), Lo = /* @__PURE__ */
|
|
735
|
+
}), Lo = /* @__PURE__ */ N({
|
|
736
736
|
__name: "vf-ez-smart-select",
|
|
737
737
|
props: {
|
|
738
738
|
modelValue: {},
|
|
@@ -743,22 +743,22 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
743
743
|
},
|
|
744
744
|
emits: ["update:modelValue"],
|
|
745
745
|
setup(e, { emit: t }) {
|
|
746
|
-
const n = e, o =
|
|
746
|
+
const n = e, o = x(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, d]) => ({
|
|
747
747
|
value: r,
|
|
748
748
|
label: d
|
|
749
|
-
}))), i =
|
|
749
|
+
}))), i = x(() => n.formatter ? (r) => n.formatter(r) : (r) => r.label), l = t, u = T(o.value.find((r) => r.value === n.modelValue) ?? null);
|
|
750
750
|
return F(
|
|
751
751
|
() => n.modelValue,
|
|
752
752
|
(r) => {
|
|
753
|
-
|
|
753
|
+
u.value = o.value.find((d) => d.value === r) ?? null;
|
|
754
754
|
}
|
|
755
|
-
), F(
|
|
756
|
-
var
|
|
757
|
-
const d = r ? (
|
|
755
|
+
), F(u, (r) => {
|
|
756
|
+
var y;
|
|
757
|
+
const d = r ? (y = o.value.find((b) => Xe(b, r))) == null ? void 0 : y.value : null;
|
|
758
758
|
l("update:modelValue", d ?? null);
|
|
759
759
|
}), (r, d) => (w(), qe(kn, {
|
|
760
|
-
modelValue:
|
|
761
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
760
|
+
modelValue: u.value,
|
|
761
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => u.value = y),
|
|
762
762
|
options: o.value,
|
|
763
763
|
formatter: i.value,
|
|
764
764
|
"null-title": r.nullTitle
|
|
@@ -770,7 +770,7 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
770
770
|
}, Cn = {
|
|
771
771
|
key: 0,
|
|
772
772
|
class: "progress-bar"
|
|
773
|
-
}, Ln = /* @__PURE__ */
|
|
773
|
+
}, Ln = /* @__PURE__ */ N({
|
|
774
774
|
__name: "vf-toast",
|
|
775
775
|
props: {
|
|
776
776
|
message: {},
|
|
@@ -786,43 +786,43 @@ const mn = ["disabled", "placeholder", "required"], hn = {
|
|
|
786
786
|
t.onClick ? t.onClick() : t.disableClose || t.callback();
|
|
787
787
|
}
|
|
788
788
|
const o = T();
|
|
789
|
-
return t.durationSecs !== null &&
|
|
789
|
+
return t.durationSecs !== null && V(() => {
|
|
790
790
|
var l;
|
|
791
791
|
const i = t.durationSecs ?? 5;
|
|
792
792
|
(l = o.value) == null || l.animate([{ width: "0%" }, { width: "100%" }], {
|
|
793
793
|
duration: i * 1e3,
|
|
794
794
|
easing: "linear"
|
|
795
795
|
}), setTimeout(() => t.callback(), i * 1e3);
|
|
796
|
-
}), (i, l) => (w(),
|
|
796
|
+
}), (i, l) => (w(), k("div", {
|
|
797
797
|
class: B(["vf-toast", i.className]),
|
|
798
798
|
onClick: ye(n, ["stop"])
|
|
799
799
|
}, [
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
i.disableClose ?
|
|
800
|
+
D("div", bn, [
|
|
801
|
+
D("div", Tn, U(i.message), 1),
|
|
802
|
+
i.disableClose ? O("", !0) : (w(), k("div", Sn, "x"))
|
|
803
803
|
]),
|
|
804
|
-
i.durationSecs !== null ? (w(),
|
|
805
|
-
|
|
804
|
+
i.durationSecs !== null ? (w(), k("div", Cn, [
|
|
805
|
+
D("div", {
|
|
806
806
|
ref_key: "progressInnerEl",
|
|
807
807
|
ref: o,
|
|
808
808
|
class: "inner"
|
|
809
809
|
}, null, 512)
|
|
810
|
-
])) :
|
|
810
|
+
])) : O("", !0)
|
|
811
811
|
], 2));
|
|
812
812
|
}
|
|
813
813
|
});
|
|
814
|
-
function
|
|
814
|
+
function Mo(e) {
|
|
815
815
|
const t = Ee(Ln, {
|
|
816
816
|
...e,
|
|
817
817
|
callback: () => ne(t)
|
|
818
818
|
});
|
|
819
819
|
return () => ne(t);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function Mn(e) {
|
|
822
822
|
const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
|
|
823
823
|
return `${o} ${i}`;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function xn(e) {
|
|
826
826
|
return e != null && String(e).length ? e : "-";
|
|
827
827
|
}
|
|
828
828
|
function In(e) {
|
|
@@ -835,34 +835,34 @@ function An(e) {
|
|
|
835
835
|
return e && fn(e);
|
|
836
836
|
}
|
|
837
837
|
function Fn(e) {
|
|
838
|
-
return e ? Ot(e) : null;
|
|
839
|
-
}
|
|
840
|
-
function On(e) {
|
|
841
838
|
return e ? Dt(e) : null;
|
|
842
839
|
}
|
|
843
840
|
function Dn(e) {
|
|
841
|
+
return e ? Ot(e) : null;
|
|
842
|
+
}
|
|
843
|
+
function On(e) {
|
|
844
844
|
return e ? e.toUpperCase() : null;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function $n(e) {
|
|
847
847
|
return e ? dn(e) : null;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Bn(e, t = 1) {
|
|
850
850
|
return vn(e, t);
|
|
851
851
|
}
|
|
852
|
-
const
|
|
853
|
-
bytes:
|
|
854
|
-
dash:
|
|
852
|
+
const Be = {
|
|
853
|
+
bytes: Mn,
|
|
854
|
+
dash: xn,
|
|
855
855
|
dashZeros: In,
|
|
856
856
|
number: Hn,
|
|
857
857
|
phone: An,
|
|
858
858
|
upperFirst: Fn,
|
|
859
|
-
startCase:
|
|
860
|
-
upperCase:
|
|
861
|
-
desnake:
|
|
862
|
-
usCurrency:
|
|
863
|
-
},
|
|
864
|
-
|
|
865
|
-
...e(
|
|
859
|
+
startCase: Dn,
|
|
860
|
+
upperCase: On,
|
|
861
|
+
desnake: $n,
|
|
862
|
+
usCurrency: Bn
|
|
863
|
+
}, xo = (e) => ({
|
|
864
|
+
...Be,
|
|
865
|
+
...e(Be)
|
|
866
866
|
});
|
|
867
867
|
function Io(e, t, n) {
|
|
868
868
|
const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
@@ -870,29 +870,29 @@ function Io(e, t, n) {
|
|
|
870
870
|
}
|
|
871
871
|
function Ho(e, t) {
|
|
872
872
|
const n = document.createElement("div");
|
|
873
|
-
n.classList.add("vf-overlay"), n.addEventListener("click",
|
|
873
|
+
n.classList.add("vf-overlay"), n.addEventListener("click", f), document.body.appendChild(n);
|
|
874
874
|
const o = document.createElement("div");
|
|
875
875
|
o.classList.add("vf-context-menu"), o.style.position = "absolute", n.appendChild(o);
|
|
876
876
|
const i = e.currentTarget;
|
|
877
877
|
i.style.userSelect = "none", i.classList.add("context-menu-active"), t.targetClass && i.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((v) => {
|
|
878
878
|
if (v == "-") {
|
|
879
|
-
const
|
|
880
|
-
|
|
879
|
+
const c = document.createElement("div");
|
|
880
|
+
c.classList.add("separator"), o.appendChild(c);
|
|
881
881
|
return;
|
|
882
882
|
}
|
|
883
883
|
const a = document.createElement("div");
|
|
884
|
-
a.classList.add("item"), a.style.userSelect = "none", a.innerText = v.title, o.appendChild(a), v.class && a.classList.add(v.class), v.shouldConfirm ? a.addEventListener("click", (
|
|
884
|
+
a.classList.add("item"), a.style.userSelect = "none", a.innerText = v.title, o.appendChild(a), v.class && a.classList.add(v.class), v.shouldConfirm ? a.addEventListener("click", (c) => g(c, a, v.handler)) : a.addEventListener("click", () => v.handler());
|
|
885
885
|
});
|
|
886
|
-
const l = window.innerWidth - e.clientX,
|
|
887
|
-
o.style.left =
|
|
886
|
+
const l = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, d = o.offsetWidth, y = l < d ? e.clientX - d - 1 : e.clientX + 1, b = u < r ? e.clientY - r - 1 : e.clientY + 1;
|
|
887
|
+
o.style.left = y + "px", o.style.top = b + "px", setTimeout(() => {
|
|
888
888
|
o.style.width = o.offsetWidth + "px";
|
|
889
889
|
}, 50);
|
|
890
|
-
function
|
|
890
|
+
function f() {
|
|
891
891
|
t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function g(v, a, c) {
|
|
894
894
|
if (a.classList.contains("pending-confirm"))
|
|
895
|
-
return
|
|
895
|
+
return c();
|
|
896
896
|
const S = a.innerHTML;
|
|
897
897
|
a.classList.add("pending-confirm"), a.innerText = "Confirm";
|
|
898
898
|
const I = () => {
|
|
@@ -906,15 +906,15 @@ function _n(e) {
|
|
|
906
906
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
907
907
|
}
|
|
908
908
|
function Fo(e, t) {
|
|
909
|
-
return e != null ?
|
|
909
|
+
return e != null ? $t(e) : t;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function Do(e, t) {
|
|
912
912
|
const n = { ...e };
|
|
913
913
|
for (const o of t)
|
|
914
914
|
n[o] === "" && (n[o] = null);
|
|
915
915
|
return n;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Oo(e) {
|
|
918
918
|
Nt({
|
|
919
919
|
...e,
|
|
920
920
|
onError(t, n) {
|
|
@@ -926,17 +926,17 @@ function Do(e) {
|
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
928
|
const be = Symbol("HookState");
|
|
929
|
-
function
|
|
929
|
+
function $o(e, t) {
|
|
930
930
|
const n = t ?? pe();
|
|
931
|
-
|
|
931
|
+
V(() => Nn(n, e), n), ze(() => Rn(n), n), Ye(() => Ve(n), n), ge(() => Ve(n), n);
|
|
932
932
|
}
|
|
933
933
|
function Nn(e, t) {
|
|
934
934
|
const n = {};
|
|
935
|
-
if (t.elScrolledToBottom && (n.el = new
|
|
936
|
-
const o =
|
|
937
|
-
o ? n.ancestor = new
|
|
935
|
+
if (t.elScrolledToBottom && (n.el = new Y(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
936
|
+
const o = et(e.vnode.el);
|
|
937
|
+
o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
938
938
|
}
|
|
939
|
-
t.windowScrolledToBottom && (n.window = new
|
|
939
|
+
t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[be] = n;
|
|
940
940
|
}
|
|
941
941
|
function Rn(e) {
|
|
942
942
|
var n, o, i;
|
|
@@ -949,13 +949,13 @@ function Ve(e) {
|
|
|
949
949
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (o = t == null ? void 0 : t.ancestor) == null || o.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
|
|
950
950
|
}
|
|
951
951
|
const fe = ["auto", "scroll"];
|
|
952
|
-
function
|
|
952
|
+
function et(e) {
|
|
953
953
|
const t = e.parentElement;
|
|
954
954
|
if (!t) return null;
|
|
955
955
|
const n = window.getComputedStyle(t);
|
|
956
|
-
return fe.includes(n.overflow) || fe.includes(n.overflowX) || fe.includes(n.overflowY) ? t :
|
|
956
|
+
return fe.includes(n.overflow) || fe.includes(n.overflowX) || fe.includes(n.overflowY) ? t : et(t);
|
|
957
957
|
}
|
|
958
|
-
class
|
|
958
|
+
class Y {
|
|
959
959
|
constructor(t, n) {
|
|
960
960
|
A(this, "isTripped", !1);
|
|
961
961
|
A(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
@@ -971,8 +971,8 @@ class K {
|
|
|
971
971
|
Math.ceil(this.el.scrollTop + this.el.clientHeight + 5) >= this.el.scrollHeight ? this.isTripped || (this.handler(t), this.isTripped = !0) : this.isTripped && (this.isTripped = !1);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
|
|
974
|
+
function Bo(e) {
|
|
975
|
+
V(() => window.addEventListener("resize", e)), ze(() => window.addEventListener("resize", e)), Ye(() => window.removeEventListener("resize", e)), ge(() => window.removeEventListener("resize", e));
|
|
976
976
|
}
|
|
977
977
|
const Wn = {
|
|
978
978
|
mounted: Ne,
|
|
@@ -989,8 +989,8 @@ const Un = {
|
|
|
989
989
|
}, P = Symbol("ConfirmState");
|
|
990
990
|
function jn(e, t) {
|
|
991
991
|
e.addEventListener("click", (n) => {
|
|
992
|
-
var
|
|
993
|
-
const o = Date.now(), i = ((
|
|
992
|
+
var u, r;
|
|
993
|
+
const o = Date.now(), i = ((u = t.value) == null ? void 0 : u.text) !== void 0 ? t.value.text : "Confirm";
|
|
994
994
|
if (e[P]) {
|
|
995
995
|
if (o - e[P].initTime < 300)
|
|
996
996
|
return;
|
|
@@ -1025,60 +1025,68 @@ const zn = {
|
|
|
1025
1025
|
updated: Re
|
|
1026
1026
|
};
|
|
1027
1027
|
function Re(e, t) {
|
|
1028
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1028
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Yn(e, t));
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1031
|
-
var
|
|
1030
|
+
function Yn(e, t) {
|
|
1031
|
+
var y, b;
|
|
1032
1032
|
if (!t.value)
|
|
1033
|
-
return ((
|
|
1033
|
+
return ((y = e.attributes.getNamedItem("placeholder")) == null ? void 0 : y.value) ?? "";
|
|
1034
1034
|
let n = "";
|
|
1035
1035
|
const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), l = new Date(i);
|
|
1036
1036
|
e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
|
|
1037
|
-
let
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1037
|
+
let u = (b = e.attributes.getNamedItem("format")) == null ? void 0 : b.value;
|
|
1038
|
+
const r = e.attributes.getNamedItem("date-only") !== null;
|
|
1039
|
+
if (!u && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1040
|
+
const f = /* @__PURE__ */ new Date();
|
|
1041
|
+
f.getFullYear() === l.getFullYear() && f.getMonth() === l.getMonth() && f.getDate() === l.getDate() && (n = "at", u = "HH:mm");
|
|
1042
|
+
}
|
|
1043
|
+
if (!u && e.attributes.getNamedItem("simplified-date") !== null) {
|
|
1044
|
+
let f = null;
|
|
1045
|
+
const g = /* @__PURE__ */ new Date();
|
|
1046
|
+
g.getFullYear() === l.getFullYear() ? (g.getMonth() !== l.getMonth() || g.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/YY";
|
|
1047
|
+
const v = r ? null : $.defaultTimeFormat;
|
|
1048
|
+
u = Ke([f, v]).join(" ");
|
|
1041
1049
|
}
|
|
1042
|
-
|
|
1043
|
-
let
|
|
1044
|
-
return n && (
|
|
1050
|
+
u || (r ? u = $.defaultDateFormat : u = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
|
|
1051
|
+
let d = ve(l, u);
|
|
1052
|
+
return n && (d = n + " " + d), d;
|
|
1045
1053
|
}
|
|
1046
|
-
const
|
|
1054
|
+
const Kn = {
|
|
1047
1055
|
beforeMount: We,
|
|
1048
1056
|
updated: We,
|
|
1049
|
-
unmounted:
|
|
1057
|
+
unmounted: Xn
|
|
1050
1058
|
};
|
|
1051
1059
|
function We(e, t) {
|
|
1052
1060
|
e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
|
|
1053
1061
|
}
|
|
1054
|
-
function
|
|
1062
|
+
function Xn(e) {
|
|
1055
1063
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1056
1064
|
}
|
|
1057
1065
|
const Zn = {
|
|
1058
1066
|
beforeMount: Ue,
|
|
1059
1067
|
updated: Ue,
|
|
1060
|
-
unmounted:
|
|
1061
|
-
},
|
|
1068
|
+
unmounted: nt
|
|
1069
|
+
}, X = Symbol("HasAutoFocused"), Te = [];
|
|
1062
1070
|
function Gn() {
|
|
1063
|
-
Te.forEach(
|
|
1071
|
+
Te.forEach(tt);
|
|
1064
1072
|
}
|
|
1065
1073
|
setInterval(Gn, 1e3);
|
|
1066
1074
|
function Ue(e, t) {
|
|
1067
|
-
var
|
|
1075
|
+
var u;
|
|
1068
1076
|
if (t.value == t.oldValue) return;
|
|
1069
|
-
if (!t.value) return
|
|
1070
|
-
const n = new Date(t.value), o = (
|
|
1071
|
-
e[
|
|
1077
|
+
if (!t.value) return nt(e);
|
|
1078
|
+
const n = new Date(t.value), o = (u = e.attributes.getNamedItem("base-time")) == null ? void 0 : u.value, i = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
|
|
1079
|
+
e[X] || Te.push(e), e[X] = {
|
|
1072
1080
|
startTs: i,
|
|
1073
1081
|
includeSeconds: l
|
|
1074
|
-
},
|
|
1082
|
+
}, tt(e);
|
|
1075
1083
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const t = e[
|
|
1084
|
+
function tt(e) {
|
|
1085
|
+
const t = e[X], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1078
1086
|
e.innerText = Qn(n, t.includeSeconds);
|
|
1079
1087
|
}
|
|
1080
|
-
function
|
|
1081
|
-
e[
|
|
1088
|
+
function nt(e) {
|
|
1089
|
+
e[X] && (Bt(Te, e), delete e[X]), e.innerText = "-";
|
|
1082
1090
|
}
|
|
1083
1091
|
function Qn(e, t) {
|
|
1084
1092
|
const n = [], o = Math.floor(e / 86400);
|
|
@@ -1089,27 +1097,27 @@ function Qn(e, t) {
|
|
|
1089
1097
|
return (o || i || l) && n.push(l + "m"), t ? n.length || n.push("0m") : (e -= l * 60, n.push(e + "s")), n.join(" ");
|
|
1090
1098
|
}
|
|
1091
1099
|
const Jn = {
|
|
1092
|
-
mounted:
|
|
1100
|
+
mounted: ot,
|
|
1093
1101
|
updated: eo,
|
|
1094
|
-
unmounted:
|
|
1095
|
-
},
|
|
1096
|
-
function nt(e, t) {
|
|
1097
|
-
N.size === 0 && window.addEventListener("keydown", lt), N.set(t.value.toLowerCase(), [...N.get(t.value.toLowerCase()) ?? [], e]);
|
|
1098
|
-
}
|
|
1102
|
+
unmounted: lt
|
|
1103
|
+
}, R = /* @__PURE__ */ new Map();
|
|
1099
1104
|
function ot(e, t) {
|
|
1100
|
-
|
|
1105
|
+
R.size === 0 && window.addEventListener("keydown", st), R.set(t.value.toLowerCase(), [...R.get(t.value.toLowerCase()) ?? [], e]);
|
|
1106
|
+
}
|
|
1107
|
+
function lt(e, t) {
|
|
1108
|
+
const n = R.get(t.value.toLowerCase());
|
|
1101
1109
|
if (n) {
|
|
1102
1110
|
const o = n.indexOf(e);
|
|
1103
|
-
o !== -1 && n.splice(o, 1), n.length === 0 &&
|
|
1111
|
+
o !== -1 && n.splice(o, 1), n.length === 0 && R.delete(t.value.toLowerCase());
|
|
1104
1112
|
}
|
|
1105
|
-
|
|
1113
|
+
R.size === 0 && window.removeEventListener("keydown", st);
|
|
1106
1114
|
}
|
|
1107
1115
|
function eo(e, t) {
|
|
1108
|
-
|
|
1116
|
+
lt(e, t), ot(e, t);
|
|
1109
1117
|
}
|
|
1110
|
-
function
|
|
1118
|
+
function st(e) {
|
|
1111
1119
|
if (typeof e.key != "string") return;
|
|
1112
|
-
const t = e.key.toLowerCase(), n =
|
|
1120
|
+
const t = e.key.toLowerCase(), n = R.get(t);
|
|
1113
1121
|
if (n) {
|
|
1114
1122
|
const o = Vt(n);
|
|
1115
1123
|
o == null || o.click(), e.preventDefault();
|
|
@@ -1117,11 +1125,11 @@ function lt(e) {
|
|
|
1117
1125
|
}
|
|
1118
1126
|
const q = Symbol("InfiniteScrollHandler"), to = {
|
|
1119
1127
|
mounted(e, t) {
|
|
1120
|
-
e[q] = new
|
|
1128
|
+
e[q] = new Y(e, t.value);
|
|
1121
1129
|
},
|
|
1122
1130
|
updated(e, t) {
|
|
1123
1131
|
var n;
|
|
1124
|
-
(n = e[q]) == null || n.uninstall(), e[q] = new
|
|
1132
|
+
(n = e[q]) == null || n.uninstall(), e[q] = new Y(e, t.value);
|
|
1125
1133
|
},
|
|
1126
1134
|
unmounted(e) {
|
|
1127
1135
|
var t;
|
|
@@ -1137,8 +1145,8 @@ function je(e, t) {
|
|
|
1137
1145
|
const oo = {
|
|
1138
1146
|
mounted: Pe,
|
|
1139
1147
|
updated: Pe,
|
|
1140
|
-
unmounted:
|
|
1141
|
-
},
|
|
1148
|
+
unmounted: it
|
|
1149
|
+
}, K = Symbol("TooltipState");
|
|
1142
1150
|
function Pe(e, t) {
|
|
1143
1151
|
var o;
|
|
1144
1152
|
let n = ((o = e.attributes.getNamedItem("tip")) == null ? void 0 : o.value) ?? t.value;
|
|
@@ -1147,13 +1155,13 @@ function Pe(e, t) {
|
|
|
1147
1155
|
content: n,
|
|
1148
1156
|
html: e.getAttribute("html") !== null
|
|
1149
1157
|
};
|
|
1150
|
-
e[
|
|
1158
|
+
e[K] ? e[K].configure(i) : e[K] = new lo(e, i);
|
|
1151
1159
|
} else
|
|
1152
|
-
|
|
1160
|
+
it(e);
|
|
1153
1161
|
}
|
|
1154
|
-
function
|
|
1162
|
+
function it(e) {
|
|
1155
1163
|
var t;
|
|
1156
|
-
(t = e[
|
|
1164
|
+
(t = e[K]) == null || t.destroy(), delete e[K];
|
|
1157
1165
|
}
|
|
1158
1166
|
class lo {
|
|
1159
1167
|
constructor(t, n) {
|
|
@@ -1192,8 +1200,8 @@ class lo {
|
|
|
1192
1200
|
}
|
|
1193
1201
|
handleMouseMove(t) {
|
|
1194
1202
|
const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, i = window.innerWidth, l = window.innerHeight;
|
|
1195
|
-
let
|
|
1196
|
-
|
|
1203
|
+
let u = t.pageX + 10, r = t.pageY + 20;
|
|
1204
|
+
u + n > i && (u = t.pageX - 5 - n), r + o > l && (r = t.pageY - 5 - o), this.tipEl.style.left = u + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
|
|
1197
1205
|
}
|
|
1198
1206
|
checkMoveEvent() {
|
|
1199
1207
|
var t;
|
|
@@ -1204,7 +1212,7 @@ class lo {
|
|
|
1204
1212
|
}
|
|
1205
1213
|
}
|
|
1206
1214
|
function so(e) {
|
|
1207
|
-
e.directive("autofocus", Wn), e.directive("confirm-button", Un), e.directive("date-input", Pn), e.directive("datetime", zn), e.directive("disabled",
|
|
1215
|
+
e.directive("autofocus", Wn), e.directive("confirm-button", Un), e.directive("date-input", Pn), e.directive("datetime", zn), e.directive("disabled", Kn), e.directive("duration", Zn), e.directive("hotkey", Jn), e.directive("infinite-scroll", to), e.directive("readonly", no), e.directive("tooltip", oo);
|
|
1208
1216
|
}
|
|
1209
1217
|
function Vo(e) {
|
|
1210
1218
|
so(e);
|
|
@@ -1219,43 +1227,43 @@ export {
|
|
|
1219
1227
|
kn as VfSmartSelect,
|
|
1220
1228
|
Fo as cloneProp,
|
|
1221
1229
|
Eo as configureVf,
|
|
1222
|
-
|
|
1230
|
+
xo as createFilters,
|
|
1223
1231
|
Ee as createOverlayInjection,
|
|
1224
1232
|
dn as desnakeCase,
|
|
1225
|
-
|
|
1233
|
+
Yt as dismissOverlayInjectionById,
|
|
1226
1234
|
ho as dismissOverlayInjectionByInstance,
|
|
1227
|
-
|
|
1235
|
+
Ze as dismissOverlayInjectionByInternalInstance,
|
|
1228
1236
|
zt as dismissOverlayInjectionByVnode,
|
|
1229
1237
|
Ro as escapeHtml,
|
|
1230
|
-
|
|
1238
|
+
Xt as formatError,
|
|
1231
1239
|
_n as formatNumber,
|
|
1232
1240
|
fn as formatPhone,
|
|
1233
1241
|
vn as formatUSCurrency,
|
|
1234
1242
|
ko as handleError,
|
|
1235
1243
|
wo as handleErrorAndAlert,
|
|
1236
|
-
|
|
1244
|
+
Oo as installApiClientInterceptors,
|
|
1237
1245
|
Vo as installVf,
|
|
1238
1246
|
bo as maskComponent,
|
|
1239
1247
|
Zt as maskEl,
|
|
1240
1248
|
Gt as maskForm,
|
|
1241
1249
|
So as nl2br,
|
|
1242
|
-
|
|
1250
|
+
Do as nullifyEmptyInputs,
|
|
1243
1251
|
we as presentOverlay,
|
|
1244
1252
|
ne as removeOverlayInjection,
|
|
1245
1253
|
Io as replaceElement,
|
|
1246
|
-
|
|
1254
|
+
Kt as showAlert,
|
|
1247
1255
|
po as showConfirm,
|
|
1248
1256
|
yo as showConfirmDestroy,
|
|
1249
1257
|
Ho as showContextMenu,
|
|
1250
|
-
|
|
1258
|
+
Mo as showToast,
|
|
1251
1259
|
go as showWait,
|
|
1252
1260
|
Vn as sleep,
|
|
1253
1261
|
Ao as sleepSecs,
|
|
1254
1262
|
ke as toError,
|
|
1255
1263
|
To as unmaskComponent,
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1264
|
+
Ge as unmaskEl,
|
|
1265
|
+
Qe as unmaskForm,
|
|
1266
|
+
$o as useInfiniteScroll,
|
|
1267
|
+
Bo as useResizeWatcher,
|
|
1260
1268
|
Co as uuid
|
|
1261
1269
|
};
|