@signal24/vue-foundation 4.25.6 → 4.25.8
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,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as R, ref as
|
|
5
|
-
import { compact as
|
|
6
|
-
import { configureOpenApiClient as
|
|
7
|
-
import { escapeHtml as
|
|
8
|
-
import { escapeHtml as
|
|
9
|
-
import { format as P, addDays as
|
|
10
|
-
const
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var Bt = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var O = (e, t, n) => Bt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as R, ref as S, computed as T, watch as D, onMounted as _, createElementBlock as k, withDirectives as oe, openBlock as b, createElementVNode as $, toDisplayString as W, createCommentVNode as V, Fragment as se, renderList as ie, vModelSelect as _t, getCurrentInstance as Ee, withModifiers as be, normalizeStyle as Nt, normalizeClass as A, renderSlot as U, reactive as Rt, h as le, Teleport as Wt, markRaw as Ut, onBeforeUnmount as ae, resolveDirective as jt, createBlock as tt, createSlots as Pt, withCtx as he, createTextVNode as Z, vModelText as qt, onActivated as nt, onDeactivated as ot } from "vue";
|
|
5
|
+
import { compact as st, cloneDeep as zt, uniq as Kt, groupBy as Yt, debounce as Xt, isEqual as it, startCase as Zt, upperFirst as Gt, remove as Jt, last as Qt } from "lodash";
|
|
6
|
+
import { configureOpenApiClient as en, OpenApiError as tn } from "@signal24/openapi-client-codegen/browser";
|
|
7
|
+
import { escapeHtml as nn } from "@vue/shared";
|
|
8
|
+
import { escapeHtml as ys } from "@vue/shared";
|
|
9
|
+
import { format as P, addDays as on, parse as sn } from "date-fns";
|
|
10
|
+
const ln = {
|
|
11
11
|
key: 0,
|
|
12
12
|
disabled: ""
|
|
13
|
-
},
|
|
13
|
+
}, rn = {
|
|
14
14
|
key: 0,
|
|
15
15
|
value: null
|
|
16
|
-
},
|
|
16
|
+
}, an = ["value"], jo = /* @__PURE__ */ R({
|
|
17
17
|
__name: "vf-ajax-select",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: {},
|
|
@@ -25,104 +25,104 @@ const sn = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
27
|
setup(e, { emit: t }) {
|
|
28
|
-
const n = e, o = t, l =
|
|
29
|
-
const E =
|
|
28
|
+
const n = e, o = t, l = S(null), s = T(() => l.value ? l.value.map((m) => {
|
|
29
|
+
const E = m;
|
|
30
30
|
return n.preprocesor ? n.preprocesor(E) : n.displayKey ? E[n.displayKey] : "";
|
|
31
|
-
}) : null), a =
|
|
32
|
-
|
|
31
|
+
}) : null), a = S(n.modelValue ?? null);
|
|
32
|
+
D(() => n.loadFn, r), D(
|
|
33
33
|
() => n.modelValue,
|
|
34
34
|
() => a.value = n.modelValue
|
|
35
|
-
),
|
|
35
|
+
), D(a, () => o("update:modelValue", a.value));
|
|
36
36
|
async function r() {
|
|
37
37
|
l.value = await n.loadFn();
|
|
38
38
|
}
|
|
39
|
-
return _(r), (
|
|
39
|
+
return _(r), (u, m) => s.value ? oe((b(), k("select", {
|
|
40
40
|
key: 1,
|
|
41
|
-
"onUpdate:modelValue":
|
|
41
|
+
"onUpdate:modelValue": m[0] || (m[0] = (E) => a.value = E)
|
|
42
42
|
}, [
|
|
43
|
-
n.nullText ? (b(), k("option",
|
|
44
|
-
(b(!0), k(
|
|
45
|
-
var
|
|
43
|
+
n.nullText ? (b(), k("option", rn, W(n.nullText), 1)) : V("", !0),
|
|
44
|
+
(b(!0), k(se, null, ie(s.value, (E, p) => {
|
|
45
|
+
var y;
|
|
46
46
|
return b(), k("option", {
|
|
47
|
-
key:
|
|
48
|
-
value: (
|
|
49
|
-
}, W(E), 9,
|
|
47
|
+
key: p,
|
|
48
|
+
value: (y = l.value) == null ? void 0 : y[p]
|
|
49
|
+
}, W(E), 9, an);
|
|
50
50
|
}), 128))
|
|
51
51
|
], 512)), [
|
|
52
|
-
[
|
|
53
|
-
]) : (b(), k("select",
|
|
54
|
-
|
|
52
|
+
[_t, a.value]
|
|
53
|
+
]) : (b(), k("select", ln, [
|
|
54
|
+
$("option", null, W(n.loadingText || "Loading..."), 1)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), un = /* @__PURE__ */ R({
|
|
58
58
|
__name: "overlay-anchor",
|
|
59
59
|
props: {
|
|
60
60
|
overlayId: {},
|
|
61
61
|
anchor: {}
|
|
62
62
|
},
|
|
63
63
|
setup(e) {
|
|
64
|
-
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o =
|
|
64
|
+
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = S({ visibility: "hidden", top: "0", left: "0" }), l = S([]), s = Ee();
|
|
65
65
|
_(a);
|
|
66
66
|
function a() {
|
|
67
67
|
if (!s) return;
|
|
68
|
-
const
|
|
69
|
-
o.value = E, l.value =
|
|
68
|
+
const m = s.vnode.el, { styles: E, classes: p } = r(m, n);
|
|
69
|
+
o.value = E, l.value = p;
|
|
70
70
|
}
|
|
71
|
-
function r(
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
let
|
|
76
|
-
if (
|
|
77
|
-
|
|
71
|
+
function r(m, E) {
|
|
72
|
+
const p = t.anchor instanceof HTMLElement ? {} : t.anchor, y = E.getBoundingClientRect(), c = m.getBoundingClientRect();
|
|
73
|
+
p.matchWidth && (c.width = y.width), p.matchHeight && (c.height = y.height);
|
|
74
|
+
const f = p.class ? Array.isArray(p.class) ? p.class : [p.class] : [];
|
|
75
|
+
let g, M;
|
|
76
|
+
if (p.y === "center")
|
|
77
|
+
g = y.top + y.height / 2 - c.height / 2, f.push("anchored-center-y");
|
|
78
78
|
else {
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const B = (y.bottom + c.height < window.innerHeight || p.y === "below") && p.y !== "above";
|
|
80
|
+
g = B ? y.bottom : y.top - c.height, f.push(B ? "anchored-top" : "anchored-bottom");
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
82
|
+
if (p.x === "center")
|
|
83
|
+
M = y.left + y.width / 2 - c.width / 2, f.push("anchored-center-x");
|
|
84
84
|
else {
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
const B = (y.left + c.width < window.innerWidth || p.x === "left") && p.x !== "right";
|
|
86
|
+
M = B ? y.left : y.right - c.width, f.push(B ? "anchored-left" : "anchored-right");
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
styles: {
|
|
90
|
-
top: `${
|
|
91
|
-
left: `${
|
|
92
|
-
...
|
|
93
|
-
...
|
|
90
|
+
top: `${g}px`,
|
|
91
|
+
left: `${M}px`,
|
|
92
|
+
...p.matchWidth ? { width: `${c.width}px` } : {},
|
|
93
|
+
...p.matchHeight ? { height: `${c.height}px` } : {}
|
|
94
94
|
},
|
|
95
|
-
classes:
|
|
95
|
+
classes: f
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
window.removeEventListener("click",
|
|
98
|
+
function u() {
|
|
99
|
+
window.removeEventListener("click", u), fn(t.overlayId);
|
|
100
100
|
}
|
|
101
101
|
return _(() => {
|
|
102
102
|
setTimeout(() => {
|
|
103
|
-
window.addEventListener("click",
|
|
103
|
+
window.addEventListener("click", u);
|
|
104
104
|
}, 10);
|
|
105
|
-
}), (
|
|
106
|
-
class:
|
|
107
|
-
style:
|
|
108
|
-
onClick:
|
|
105
|
+
}), (m, E) => (b(), k("div", {
|
|
106
|
+
class: A(["vf-overlay-anchor", l.value]),
|
|
107
|
+
style: Nt(o.value),
|
|
108
|
+
onClick: be(u, ["stop"])
|
|
109
109
|
}, [
|
|
110
|
-
U(
|
|
110
|
+
U(m.$slots, "default")
|
|
111
111
|
], 6));
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
let
|
|
115
|
-
const N =
|
|
114
|
+
let cn = 0;
|
|
115
|
+
const N = Rt([]), Po = R({
|
|
116
116
|
setup() {
|
|
117
|
-
return () =>
|
|
118
|
-
|
|
117
|
+
return () => le("div", [
|
|
118
|
+
ie(N, (e) => le(Wt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
function
|
|
122
|
+
function ke(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 l = String(++
|
|
125
|
+
const l = String(++cn), s = Ut(e), a = le(s, t), r = n != null && n.anchor ? le(un, { overlayId: l, anchor: n.anchor }, () => [a]) : void 0, u = {
|
|
126
126
|
id: l,
|
|
127
127
|
component: s,
|
|
128
128
|
props: t,
|
|
@@ -130,75 +130,75 @@ function be(e, t, n) {
|
|
|
130
130
|
vnode: a,
|
|
131
131
|
wrapperVnode: r
|
|
132
132
|
};
|
|
133
|
-
return N.push(
|
|
133
|
+
return N.push(u), u;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
e.$ &&
|
|
135
|
+
function qo(e) {
|
|
136
|
+
e.$ && lt(e.$);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function lt(e) {
|
|
139
139
|
let t = e;
|
|
140
|
-
for (; t && !
|
|
140
|
+
for (; t && !dn(t.vnode); )
|
|
141
141
|
t = t.parent;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function dn(e) {
|
|
144
144
|
const t = N.findIndex((n) => n.vnode.component === e.component);
|
|
145
145
|
return t >= 0 ? (N[t].props.callback(), !0) : !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function fn(e) {
|
|
148
148
|
const t = N.findIndex((n) => n.id === e);
|
|
149
149
|
return t >= 0 ? (N[t].props.callback(), !0) : !1;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function re(e) {
|
|
152
152
|
const t = N.indexOf(e);
|
|
153
153
|
t >= 0 && N.splice(t, 1);
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function Te(e, t, n) {
|
|
156
156
|
return new Promise((o) => {
|
|
157
157
|
let l = null;
|
|
158
158
|
const a = { ...t, callback: async (r) => {
|
|
159
159
|
if (n != null && n.onCallback) {
|
|
160
|
-
const
|
|
161
|
-
if (typeof
|
|
160
|
+
const u = n.onCallback(r);
|
|
161
|
+
if (typeof u == "object" && "then" in u && typeof u.then == "function" && await u === !1)
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
re(l), o(r);
|
|
165
165
|
} };
|
|
166
|
-
l =
|
|
166
|
+
l = ke(e, a, n);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function ue(e, t) {
|
|
170
170
|
return typeof e == "object" && !(e instanceof Error) ? {
|
|
171
171
|
...e,
|
|
172
172
|
classes: e.classes ?? []
|
|
173
173
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
174
174
|
}
|
|
175
|
-
async function
|
|
176
|
-
await
|
|
175
|
+
async function vn(e, t) {
|
|
176
|
+
await Te(de, ue(e, t));
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
179
|
-
const n =
|
|
180
|
-
return await
|
|
178
|
+
async function zo(e, t) {
|
|
179
|
+
const n = ue(e, t);
|
|
180
|
+
return await Te(de, {
|
|
181
181
|
...n,
|
|
182
182
|
shouldConfirm: !0
|
|
183
183
|
}) === !0;
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
186
|
-
const n =
|
|
187
|
-
return await
|
|
185
|
+
async function Ko(e, t) {
|
|
186
|
+
const n = ue(e, t);
|
|
187
|
+
return await Te(de, {
|
|
188
188
|
...n,
|
|
189
189
|
shouldConfirm: !0,
|
|
190
190
|
classes: ["destructive", ...n.classes]
|
|
191
191
|
}) === !0;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
const n =
|
|
193
|
+
function Yo(e, t) {
|
|
194
|
+
const n = ue(e, t), o = ke(de, {
|
|
195
195
|
...n,
|
|
196
196
|
isBare: !0,
|
|
197
197
|
classes: ["wait", ...n.classes],
|
|
198
198
|
callback: () => {
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
|
-
return () =>
|
|
201
|
+
return () => re(o);
|
|
202
202
|
}
|
|
203
203
|
const I = {
|
|
204
204
|
unhandledErrorSupportText: "please contact support",
|
|
@@ -207,63 +207,63 @@ const I = {
|
|
|
207
207
|
defaultTimeFormat: "H:mm",
|
|
208
208
|
defaultCurrencyDivisor: 1
|
|
209
209
|
};
|
|
210
|
-
function
|
|
210
|
+
function Xo(e) {
|
|
211
211
|
Object.assign(I, e);
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class ce extends Error {
|
|
214
214
|
constructor(t) {
|
|
215
215
|
super(t), this.name = "UserError";
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
return e instanceof
|
|
218
|
+
function mn(e) {
|
|
219
|
+
return e instanceof ce ? e.message : `An application error has occurred:
|
|
220
220
|
|
|
221
|
-
${
|
|
221
|
+
${Ce(e).message}
|
|
222
222
|
|
|
223
223
|
Please refresh the page and try again. If this error persists, ${I.unhandledErrorSupportText}.`;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
225
|
+
function Ce(e) {
|
|
226
|
+
return pn(e) ? e : new Error(String(e));
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function pn(e) {
|
|
229
229
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
|
|
230
230
|
}
|
|
231
|
-
async function
|
|
232
|
-
const n =
|
|
233
|
-
return n instanceof
|
|
231
|
+
async function Zo(e, t) {
|
|
232
|
+
const n = Ce(e);
|
|
233
|
+
return n instanceof ce || I.errorHandler(n), vn({
|
|
234
234
|
title: t == null ? void 0 : t.title,
|
|
235
235
|
message: n,
|
|
236
236
|
classes: t == null ? void 0 : t.classes
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
async function
|
|
240
|
-
const t =
|
|
241
|
-
t instanceof
|
|
239
|
+
async function Go(e) {
|
|
240
|
+
const t = Ce(e);
|
|
241
|
+
t instanceof ce || I.errorHandler(t);
|
|
242
242
|
}
|
|
243
|
-
const
|
|
244
|
-
function
|
|
243
|
+
const G = Symbol("MaskState");
|
|
244
|
+
function Jo(e, t) {
|
|
245
245
|
var l;
|
|
246
246
|
const n = (l = e.$) == null ? void 0 : l.vnode.el, o = n.closest(".vf-modal");
|
|
247
|
-
return
|
|
247
|
+
return hn(o ?? n, t);
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Qo(e) {
|
|
250
250
|
var o;
|
|
251
251
|
const t = (o = e.$) == null ? void 0 : o.vnode.el, n = t.closest(".vf-modal");
|
|
252
|
-
return
|
|
252
|
+
return rt(n ?? t);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
if (!e[
|
|
254
|
+
function hn(e, t) {
|
|
255
|
+
if (!e[G]) {
|
|
256
256
|
const n = document.createElement("div");
|
|
257
|
-
n.classList.add("vf-mask"), e.appendChild(n), e[
|
|
257
|
+
n.classList.add("vf-mask"), e.appendChild(n), e[G] = { maskEl: n };
|
|
258
258
|
}
|
|
259
|
-
return e[
|
|
259
|
+
return e[G].maskEl.innerText = t ?? "", () => rt(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
e[
|
|
261
|
+
function rt(e) {
|
|
262
|
+
e[G] && e.removeChild(e[G].maskEl);
|
|
263
263
|
}
|
|
264
|
-
const
|
|
265
|
-
function
|
|
266
|
-
const o = e instanceof Element ? e :
|
|
264
|
+
const we = Symbol("FormMaskState");
|
|
265
|
+
function yn(e, t, n) {
|
|
266
|
+
const o = e instanceof Element ? e : ut(e);
|
|
267
267
|
if (!o) return () => {
|
|
268
268
|
};
|
|
269
269
|
o.classList.add("vf-masked");
|
|
@@ -271,30 +271,30 @@ function hn(e, t, n) {
|
|
|
271
271
|
let s;
|
|
272
272
|
l && (s = l.tagName === "INPUT" ? l.value : l.innerHTML, l.setAttribute("disabled", "disabled"), l.innerText = n ?? "Please wait...");
|
|
273
273
|
const r = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
274
|
-
return r.forEach((
|
|
274
|
+
return r.forEach((u) => u.setAttribute("disabled", "disabled")), o[we] = {
|
|
275
275
|
disabledElements: r,
|
|
276
276
|
waitButton: l,
|
|
277
277
|
buttonHtml: s
|
|
278
|
-
}, () =>
|
|
278
|
+
}, () => at(o);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const t = e instanceof Element ? e :
|
|
280
|
+
function at(e) {
|
|
281
|
+
const t = e instanceof Element ? e : ut(e);
|
|
282
282
|
if (!t) return;
|
|
283
|
-
const n = t[
|
|
284
|
-
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[
|
|
283
|
+
const n = t[we];
|
|
284
|
+
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[we]);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function ut(e) {
|
|
287
287
|
var n;
|
|
288
288
|
const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
|
|
289
289
|
return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
|
|
290
290
|
}
|
|
291
|
-
const
|
|
291
|
+
const gn = ["id"], wn = {
|
|
292
292
|
key: 0,
|
|
293
293
|
class: "vf-modal-header"
|
|
294
|
-
},
|
|
294
|
+
}, En = { class: "vf-modal-content" }, bn = {
|
|
295
295
|
key: 1,
|
|
296
296
|
class: "vf-modal-footer"
|
|
297
|
-
},
|
|
297
|
+
}, kn = /* @__PURE__ */ R({
|
|
298
298
|
__name: "vf-modal",
|
|
299
299
|
props: {
|
|
300
300
|
id: {},
|
|
@@ -305,70 +305,70 @@ const yn = ["id"], gn = {
|
|
|
305
305
|
},
|
|
306
306
|
emits: ["formSubmit"],
|
|
307
307
|
setup(e, { expose: t }) {
|
|
308
|
-
const n =
|
|
309
|
-
t({ mask:
|
|
310
|
-
const l =
|
|
308
|
+
const n = Ee(), o = e;
|
|
309
|
+
t({ mask: p, unmask: y, hide: c, unhide: f });
|
|
310
|
+
const l = S(), s = S(), a = S(!1), r = T(() => st([...Array.isArray(o.class) ? o.class : [o.class], a.value && "hidden"]));
|
|
311
311
|
_(() => {
|
|
312
|
-
var
|
|
313
|
-
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown",
|
|
314
|
-
}),
|
|
315
|
-
window.removeEventListener("keydown",
|
|
312
|
+
var g;
|
|
313
|
+
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", m), (g = l.value) == null || g.addEventListener("click", u));
|
|
314
|
+
}), ae(() => {
|
|
315
|
+
window.removeEventListener("keydown", m), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
316
316
|
});
|
|
317
|
-
function
|
|
318
|
-
|
|
317
|
+
function u(g) {
|
|
318
|
+
g.target == l.value && E();
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
if (
|
|
322
|
-
const
|
|
323
|
-
|
|
320
|
+
function m(g) {
|
|
321
|
+
if (g.key === "Esc" || g.key === "Escape") {
|
|
322
|
+
const M = document.querySelectorAll(".vf-modal-wrap");
|
|
323
|
+
M[M.length - 1] === l.value && E();
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
function E() {
|
|
327
|
-
|
|
327
|
+
lt(n);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function p() {
|
|
330
|
+
return yn(s.value), () => y();
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
|
|
332
|
+
function y() {
|
|
333
|
+
at(s.value);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
return a.value = !0, () =>
|
|
335
|
+
function c() {
|
|
336
|
+
return a.value = !0, () => f();
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function f() {
|
|
339
339
|
a.value = !1;
|
|
340
340
|
}
|
|
341
|
-
return (
|
|
342
|
-
id:
|
|
341
|
+
return (g, M) => (b(), k("div", {
|
|
342
|
+
id: g.id,
|
|
343
343
|
ref_key: "overlay",
|
|
344
344
|
ref: l,
|
|
345
|
-
class:
|
|
345
|
+
class: A(["vf-overlay vf-modal-wrap", r.value])
|
|
346
346
|
}, [
|
|
347
|
-
|
|
347
|
+
$("form", {
|
|
348
348
|
ref_key: "form",
|
|
349
349
|
ref: s,
|
|
350
350
|
action: ".",
|
|
351
|
-
class:
|
|
352
|
-
onSubmit:
|
|
351
|
+
class: A(["vf-modal", { scrolls: g.scrolls }]),
|
|
352
|
+
onSubmit: M[0] || (M[0] = be((L) => g.$emit("formSubmit"), ["prevent"]))
|
|
353
353
|
}, [
|
|
354
|
-
|
|
355
|
-
U(
|
|
354
|
+
g.$slots.header ? (b(), k("div", wn, [
|
|
355
|
+
U(g.$slots, "header"),
|
|
356
356
|
o.closeX ? (b(), k("i", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "close",
|
|
359
359
|
onClick: E
|
|
360
|
-
})) :
|
|
361
|
-
])) :
|
|
362
|
-
|
|
363
|
-
U(
|
|
360
|
+
})) : V("", !0)
|
|
361
|
+
])) : V("", !0),
|
|
362
|
+
$("div", En, [
|
|
363
|
+
U(g.$slots, "default")
|
|
364
364
|
]),
|
|
365
|
-
|
|
366
|
-
U(
|
|
367
|
-
])) :
|
|
365
|
+
g.$slots.footer ? (b(), k("div", bn, [
|
|
366
|
+
U(g.$slots, "footer")
|
|
367
|
+
])) : V("", !0)
|
|
368
368
|
], 34)
|
|
369
|
-
], 10,
|
|
369
|
+
], 10, gn));
|
|
370
370
|
}
|
|
371
|
-
}),
|
|
371
|
+
}), Tn = ["innerHtml"], Cn = ["innerText"], de = /* @__PURE__ */ R({
|
|
372
372
|
__name: "vf-alert-modal",
|
|
373
373
|
props: {
|
|
374
374
|
isBare: { type: Boolean },
|
|
@@ -381,57 +381,57 @@ const yn = ["id"], gn = {
|
|
|
381
381
|
callback: { type: Function }
|
|
382
382
|
},
|
|
383
383
|
setup(e) {
|
|
384
|
-
const t = e, n =
|
|
384
|
+
const t = e, n = T(() => t.message instanceof Error ? mn(t.message) : t.message);
|
|
385
385
|
return (o, l) => {
|
|
386
|
-
const s =
|
|
387
|
-
return b(),
|
|
388
|
-
class:
|
|
389
|
-
},
|
|
390
|
-
default:
|
|
386
|
+
const s = jt("autofocus");
|
|
387
|
+
return b(), tt(kn, {
|
|
388
|
+
class: A(["vf-alert", ...o.classes ?? []])
|
|
389
|
+
}, Pt({
|
|
390
|
+
default: he(() => [
|
|
391
391
|
o.iconClass ? (b(), k("i", {
|
|
392
392
|
key: 0,
|
|
393
|
-
class:
|
|
394
|
-
}, null, 2)) :
|
|
393
|
+
class: A(["vf-alert-icon", o.iconClass])
|
|
394
|
+
}, null, 2)) : V("", !0),
|
|
395
395
|
o.isHtml ? (b(), k("div", {
|
|
396
396
|
key: 1,
|
|
397
397
|
innerHtml: o.message,
|
|
398
398
|
class: "user-message"
|
|
399
|
-
}, null, 8,
|
|
399
|
+
}, null, 8, Tn)) : (b(), k("div", {
|
|
400
400
|
key: 2,
|
|
401
401
|
innerText: n.value
|
|
402
|
-
}, null, 8,
|
|
402
|
+
}, null, 8, Cn))
|
|
403
403
|
]),
|
|
404
404
|
_: 2
|
|
405
405
|
}, [
|
|
406
406
|
o.title ? {
|
|
407
407
|
name: "header",
|
|
408
|
-
fn:
|
|
409
|
-
|
|
408
|
+
fn: he(() => [
|
|
409
|
+
Z(W(o.title), 1)
|
|
410
410
|
]),
|
|
411
411
|
key: "0"
|
|
412
412
|
} : void 0,
|
|
413
413
|
o.isBare ? void 0 : {
|
|
414
414
|
name: "footer",
|
|
415
|
-
fn:
|
|
416
|
-
o.shouldConfirm ? (b(), k(
|
|
417
|
-
|
|
415
|
+
fn: he(() => [
|
|
416
|
+
o.shouldConfirm ? (b(), k(se, { key: 0 }, [
|
|
417
|
+
oe((b(), k("button", {
|
|
418
418
|
class: "primary",
|
|
419
419
|
onClick: l[0] || (l[0] = () => o.callback(!0))
|
|
420
420
|
}, l[3] || (l[3] = [
|
|
421
|
-
|
|
421
|
+
Z("Confirm")
|
|
422
422
|
]))), [
|
|
423
423
|
[s]
|
|
424
424
|
]),
|
|
425
|
-
|
|
425
|
+
$("button", {
|
|
426
426
|
class: "default",
|
|
427
427
|
onClick: l[1] || (l[1] = () => o.callback(!1))
|
|
428
428
|
}, "Cancel")
|
|
429
|
-
], 64)) :
|
|
429
|
+
], 64)) : oe((b(), k("button", {
|
|
430
430
|
key: 1,
|
|
431
431
|
class: "default",
|
|
432
432
|
onClick: l[2] || (l[2] = () => o.callback(!0))
|
|
433
433
|
}, l[4] || (l[4] = [
|
|
434
|
-
|
|
434
|
+
Z("OK")
|
|
435
435
|
]))), [
|
|
436
436
|
[s]
|
|
437
437
|
])
|
|
@@ -442,65 +442,65 @@ const yn = ["id"], gn = {
|
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
|
-
function
|
|
445
|
+
function es(e, t, n) {
|
|
446
446
|
const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
447
447
|
return o === -1 ? !1 : (e.splice(o, 1, n), !0);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function ts(e, t) {
|
|
450
450
|
const n = document.createElement("div");
|
|
451
|
-
n.classList.add("vf-overlay"), n.addEventListener("click",
|
|
451
|
+
n.classList.add("vf-overlay"), n.addEventListener("click", p), document.body.appendChild(n);
|
|
452
452
|
const o = document.createElement("div");
|
|
453
453
|
o.classList.add("vf-context-menu"), o.style.position = "absolute", n.appendChild(o);
|
|
454
454
|
const l = e.currentTarget;
|
|
455
|
-
l.style.userSelect = "none", l.classList.add("context-menu-active"), t.targetClass && l.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
455
|
+
l.style.userSelect = "none", l.classList.add("context-menu-active"), t.targetClass && l.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((c) => {
|
|
456
|
+
if (c == "-") {
|
|
457
|
+
const g = document.createElement("div");
|
|
458
|
+
g.classList.add("separator"), o.appendChild(g);
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
|
|
461
|
+
const f = document.createElement("div");
|
|
462
|
+
f.classList.add("item"), f.style.userSelect = "none", f.innerText = c.title, o.appendChild(f), c.class && f.classList.add(c.class), c.shouldConfirm ? f.addEventListener("click", (g) => y(g, f, c.handler)) : f.addEventListener("click", () => c.handler());
|
|
463
463
|
});
|
|
464
|
-
const s = window.innerWidth - e.clientX, a = window.innerHeight - e.clientY, r = o.offsetHeight,
|
|
465
|
-
o.style.left =
|
|
464
|
+
const s = window.innerWidth - e.clientX, a = window.innerHeight - e.clientY, r = o.offsetHeight, u = o.offsetWidth, m = s < u ? e.clientX - u - 1 : e.clientX + 1, E = a < r ? e.clientY - r - 1 : e.clientY + 1;
|
|
465
|
+
o.style.left = m + "px", o.style.top = E + "px", setTimeout(() => {
|
|
466
466
|
o.style.width = o.offsetWidth + "px";
|
|
467
467
|
}, 50);
|
|
468
|
-
function
|
|
468
|
+
function p() {
|
|
469
469
|
t.targetClass && l.classList.remove(t.targetClass), l.classList.remove("context-menu-active"), l.style.userSelect = "", n.remove();
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
if (
|
|
473
|
-
return
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
const
|
|
477
|
-
|
|
471
|
+
function y(c, f, g) {
|
|
472
|
+
if (f.classList.contains("pending-confirm"))
|
|
473
|
+
return g();
|
|
474
|
+
const M = f.innerHTML;
|
|
475
|
+
f.classList.add("pending-confirm"), f.innerText = "Confirm";
|
|
476
|
+
const L = () => {
|
|
477
|
+
f.classList.remove("pending-confirm"), f.innerHTML = M, f.removeEventListener("mouseleave", L);
|
|
478
478
|
};
|
|
479
|
-
|
|
479
|
+
f.addEventListener("mouseleave", L), c.stopPropagation();
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
const
|
|
483
|
-
function
|
|
482
|
+
const Sn = (e) => new Promise((t) => setTimeout(t, e)), ns = (e) => Sn(e * 1e3);
|
|
483
|
+
function Mn(e) {
|
|
484
484
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
485
485
|
}
|
|
486
|
-
function ns(e, t) {
|
|
487
|
-
return e != null ? qt(e) : t;
|
|
488
|
-
}
|
|
489
486
|
function os(e, t) {
|
|
487
|
+
return e != null ? zt(e) : t;
|
|
488
|
+
}
|
|
489
|
+
function ss(e, t) {
|
|
490
490
|
const n = { ...e };
|
|
491
491
|
for (const o of t)
|
|
492
492
|
n[o] === "" && (n[o] = null);
|
|
493
493
|
return n;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Pe(e) {
|
|
496
496
|
return e != null;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
|
|
498
|
+
function is(e, t) {
|
|
499
|
+
en(e, {
|
|
500
500
|
...t,
|
|
501
501
|
onError(n, o) {
|
|
502
502
|
var s;
|
|
503
|
-
n instanceof
|
|
503
|
+
n instanceof tn && n.response.status === 422 && typeof n.body == "object" && n.body && "error" in n.body && typeof n.body.error == "string" && (n = new ce(n.body.error));
|
|
504
504
|
const l = (s = t.onError) == null ? void 0 : s.call(t, n, o);
|
|
505
505
|
return l !== void 0 ? l : n;
|
|
506
506
|
}
|
|
@@ -513,7 +513,7 @@ function ss(e, t) {
|
|
|
513
513
|
* Copyright (c) 2021 Jason Wilson
|
|
514
514
|
* Released under MIT license
|
|
515
515
|
*/
|
|
516
|
-
var
|
|
516
|
+
var Ln = {
|
|
517
517
|
symbol: "$",
|
|
518
518
|
separator: ",",
|
|
519
519
|
decimal: ".",
|
|
@@ -521,43 +521,43 @@ var Mn = {
|
|
|
521
521
|
precision: 2,
|
|
522
522
|
pattern: "!#",
|
|
523
523
|
negativePattern: "-!#",
|
|
524
|
-
format:
|
|
524
|
+
format: On,
|
|
525
525
|
fromCents: !1
|
|
526
|
-
},
|
|
526
|
+
}, ct = function(t) {
|
|
527
527
|
return Math.round(t);
|
|
528
|
-
},
|
|
528
|
+
}, Se = function(t) {
|
|
529
529
|
return Math.pow(10, t);
|
|
530
|
-
},
|
|
531
|
-
return
|
|
532
|
-
},
|
|
533
|
-
function
|
|
530
|
+
}, xn = function(t, n) {
|
|
531
|
+
return ct(t / n) * n;
|
|
532
|
+
}, Fn = /(\d)(?=(\d{3})+\b)/g, In = /(\d)(?=(\d\d)+\d\b)/g;
|
|
533
|
+
function H(e, t) {
|
|
534
534
|
var n = this;
|
|
535
|
-
if (!(n instanceof
|
|
536
|
-
return new
|
|
537
|
-
var o = Object.assign({},
|
|
538
|
-
n.intValue = s, n.value = s / l, o.increment = o.increment || 1 / l, o.useVedic ? o.groups =
|
|
535
|
+
if (!(n instanceof H))
|
|
536
|
+
return new H(e, t);
|
|
537
|
+
var o = Object.assign({}, Ln, t), l = Se(o.precision), s = ne(e, o);
|
|
538
|
+
n.intValue = s, n.value = s / l, o.increment = o.increment || 1 / l, o.useVedic ? o.groups = In : o.groups = Fn, this.s = o, this.p = l;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
541
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, l = t.decimal, s = t.errorOnInvalid, a = t.precision, r = t.fromCents,
|
|
540
|
+
function ne(e, t) {
|
|
541
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, l = t.decimal, s = t.errorOnInvalid, a = t.precision, r = t.fromCents, u = Se(a), m = typeof e == "number", E = e instanceof H;
|
|
542
542
|
if (E && r)
|
|
543
543
|
return e.intValue;
|
|
544
|
-
if (
|
|
544
|
+
if (m || E)
|
|
545
545
|
o = E ? e.value : e;
|
|
546
546
|
else if (typeof e == "string") {
|
|
547
|
-
var
|
|
548
|
-
o = e.replace(/\((.*)\)/, "-$1").replace(
|
|
547
|
+
var p = new RegExp("[^-\\d" + l + "]", "g"), y = new RegExp("\\" + l, "g");
|
|
548
|
+
o = e.replace(/\((.*)\)/, "-$1").replace(p, "").replace(y, "."), o = o || 0;
|
|
549
549
|
} else {
|
|
550
550
|
if (s)
|
|
551
551
|
throw Error("Invalid Input");
|
|
552
552
|
o = 0;
|
|
553
553
|
}
|
|
554
|
-
return r || (o *=
|
|
554
|
+
return r || (o *= u, o = o.toFixed(4)), n ? ct(o) : o;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
var n = t.pattern, o = t.negativePattern, l = t.symbol, s = t.separator, a = t.decimal, r = t.groups,
|
|
558
|
-
return (e.value >= 0 ? n : o).replace("!", l).replace("#",
|
|
556
|
+
function On(e, t) {
|
|
557
|
+
var n = t.pattern, o = t.negativePattern, l = t.symbol, s = t.separator, a = t.decimal, r = t.groups, u = ("" + e).replace(/^-/, "").split("."), m = u[0], E = u[1];
|
|
558
|
+
return (e.value >= 0 ? n : o).replace("!", l).replace("#", m.replace(r, "$1" + s) + (E ? a + E : ""));
|
|
559
559
|
}
|
|
560
|
-
|
|
560
|
+
H.prototype = {
|
|
561
561
|
/**
|
|
562
562
|
* Adds values together.
|
|
563
563
|
* @param {number} number
|
|
@@ -565,7 +565,7 @@ V.prototype = {
|
|
|
565
565
|
*/
|
|
566
566
|
add: function(t) {
|
|
567
567
|
var n = this.intValue, o = this.s, l = this.p;
|
|
568
|
-
return
|
|
568
|
+
return H((n += ne(t, o)) / (o.fromCents ? 1 : l), o);
|
|
569
569
|
},
|
|
570
570
|
/**
|
|
571
571
|
* Subtracts value.
|
|
@@ -574,7 +574,7 @@ V.prototype = {
|
|
|
574
574
|
*/
|
|
575
575
|
subtract: function(t) {
|
|
576
576
|
var n = this.intValue, o = this.s, l = this.p;
|
|
577
|
-
return
|
|
577
|
+
return H((n -= ne(t, o)) / (o.fromCents ? 1 : l), o);
|
|
578
578
|
},
|
|
579
579
|
/**
|
|
580
580
|
* Multiplies values.
|
|
@@ -583,7 +583,7 @@ V.prototype = {
|
|
|
583
583
|
*/
|
|
584
584
|
multiply: function(t) {
|
|
585
585
|
var n = this.intValue, o = this.s;
|
|
586
|
-
return
|
|
586
|
+
return H((n *= t) / (o.fromCents ? 1 : Se(o.precision)), o);
|
|
587
587
|
},
|
|
588
588
|
/**
|
|
589
589
|
* Divides value.
|
|
@@ -592,7 +592,7 @@ V.prototype = {
|
|
|
592
592
|
*/
|
|
593
593
|
divide: function(t) {
|
|
594
594
|
var n = this.intValue, o = this.s;
|
|
595
|
-
return
|
|
595
|
+
return H(n /= ne(t, o, !1), o);
|
|
596
596
|
},
|
|
597
597
|
/**
|
|
598
598
|
* Takes the currency amount and distributes the values evenly. Any extra pennies
|
|
@@ -601,9 +601,9 @@ V.prototype = {
|
|
|
601
601
|
* @returns {array}
|
|
602
602
|
*/
|
|
603
603
|
distribute: function(t) {
|
|
604
|
-
for (var n = this.intValue, o = this.p, l = this.s, s = [], a = Math[n >= 0 ? "floor" : "ceil"](n / t), r = Math.abs(n - a * t),
|
|
605
|
-
var
|
|
606
|
-
r-- > 0 && (
|
|
604
|
+
for (var n = this.intValue, o = this.p, l = this.s, s = [], a = Math[n >= 0 ? "floor" : "ceil"](n / t), r = Math.abs(n - a * t), u = l.fromCents ? 1 : o; t !== 0; t--) {
|
|
605
|
+
var m = H(a / u, l);
|
|
606
|
+
r-- > 0 && (m = m[n >= 0 ? "add" : "subtract"](1 / u)), s.push(m);
|
|
607
607
|
}
|
|
608
608
|
return s;
|
|
609
609
|
},
|
|
@@ -637,7 +637,7 @@ V.prototype = {
|
|
|
637
637
|
*/
|
|
638
638
|
toString: function() {
|
|
639
639
|
var t = this.intValue, n = this.p, o = this.s;
|
|
640
|
-
return
|
|
640
|
+
return xn(t / n, o.increment).toFixed(o.precision);
|
|
641
641
|
},
|
|
642
642
|
/**
|
|
643
643
|
* Value for JSON serialization.
|
|
@@ -650,56 +650,56 @@ V.prototype = {
|
|
|
650
650
|
const x = [];
|
|
651
651
|
for (let e = 0; e < 256; ++e)
|
|
652
652
|
x.push((e + 256).toString(16).slice(1));
|
|
653
|
-
function
|
|
653
|
+
function Dn(e, t = 0) {
|
|
654
654
|
return (x[e[t + 0]] + x[e[t + 1]] + x[e[t + 2]] + x[e[t + 3]] + "-" + x[e[t + 4]] + x[e[t + 5]] + "-" + x[e[t + 6]] + x[e[t + 7]] + "-" + x[e[t + 8]] + x[e[t + 9]] + "-" + x[e[t + 10]] + x[e[t + 11]] + x[e[t + 12]] + x[e[t + 13]] + x[e[t + 14]] + x[e[t + 15]]).toLowerCase();
|
|
655
655
|
}
|
|
656
|
-
let
|
|
657
|
-
const
|
|
658
|
-
function
|
|
659
|
-
if (!
|
|
656
|
+
let ye;
|
|
657
|
+
const Hn = new Uint8Array(16);
|
|
658
|
+
function Vn() {
|
|
659
|
+
if (!ye) {
|
|
660
660
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
661
661
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
662
|
-
|
|
662
|
+
ye = crypto.getRandomValues.bind(crypto);
|
|
663
663
|
}
|
|
664
|
-
return
|
|
664
|
+
return ye(Hn);
|
|
665
665
|
}
|
|
666
|
-
const
|
|
667
|
-
function
|
|
666
|
+
const An = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), qe = { randomUUID: An };
|
|
667
|
+
function $n(e, t, n) {
|
|
668
668
|
var l;
|
|
669
|
-
if (
|
|
670
|
-
return
|
|
669
|
+
if (qe.randomUUID && !e)
|
|
670
|
+
return qe.randomUUID();
|
|
671
671
|
e = e || {};
|
|
672
|
-
const o = e.random ?? ((l = e.rng) == null ? void 0 : l.call(e)) ??
|
|
672
|
+
const o = e.random ?? ((l = e.rng) == null ? void 0 : l.call(e)) ?? Vn();
|
|
673
673
|
if (o.length < 16)
|
|
674
674
|
throw new Error("Random bytes length must be >= 16");
|
|
675
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
675
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Dn(o);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function ls(e) {
|
|
678
678
|
return e.replace(/\n/g, "<br>");
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Bn(e) {
|
|
681
681
|
return e.replace(/_/g, " ");
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function _n(e) {
|
|
684
684
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
685
|
-
return t.length
|
|
685
|
+
return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
return
|
|
687
|
+
function Nn(e, t) {
|
|
688
|
+
return H(e).divide(t ?? I.defaultCurrencyDivisor).format();
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
return
|
|
690
|
+
function rs() {
|
|
691
|
+
return $n();
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const Rn = ["disabled", "placeholder", "required", "name"], Wn = {
|
|
694
694
|
key: 0,
|
|
695
695
|
class: "no-results"
|
|
696
|
-
},
|
|
696
|
+
}, Un = {
|
|
697
697
|
key: 0,
|
|
698
698
|
class: "group-title"
|
|
699
|
-
},
|
|
699
|
+
}, jn = ["onMousemove", "onMousedown"], Pn = ["innerHTML"], qn = ["innerHTML"], zn = {
|
|
700
700
|
key: 1,
|
|
701
701
|
class: "no-results"
|
|
702
|
-
},
|
|
702
|
+
}, Kn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Yn = /* @__PURE__ */ R({
|
|
703
703
|
__name: "vf-smart-select",
|
|
704
704
|
props: {
|
|
705
705
|
modelValue: {},
|
|
@@ -738,38 +738,38 @@ const Nn = ["disabled", "placeholder", "required", "name"], Rn = {
|
|
|
738
738
|
setup(e, { expose: t, emit: n }) {
|
|
739
739
|
const o = Symbol("null"), l = Symbol("create"), s = e, a = n;
|
|
740
740
|
t({
|
|
741
|
-
addRemoteOption:
|
|
741
|
+
addRemoteOption: At
|
|
742
742
|
});
|
|
743
|
-
const r =
|
|
744
|
-
var
|
|
745
|
-
const h = (
|
|
746
|
-
return s.searchFields ? s.searchFields.forEach((
|
|
747
|
-
i[
|
|
748
|
-
}) : (
|
|
749
|
-
key: ((
|
|
743
|
+
const r = S(), u = S(), m = S(), E = S(!1), p = S(), y = S(!1), c = S(""), f = S(null), g = S(null), M = S(!1), L = S(null), B = S(!1), wt = T(() => s.showCreateTextOnNewItem ?? !0), q = T(() => !!(s.options || p.value)), Et = T(() => s.options ?? p.value ?? []), bt = T(() => s.prependOptions ?? []), kt = T(() => s.appendOptions ?? []), xe = T(() => !!s.disabled || !q.value && !s.loadOptions), Tt = T(() => !q.value && s.preload ? "Loading..." : s.nullTitle ? s.nullTitle : s.placeholder || ""), Ct = T(() => s.noResultsText || "No options match your search."), z = T(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (i) => i[s.valueField] : null), K = T(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (i) => String(i[s.keyField]) : z.value ? (i) => String(z.value(i)) : null), fe = T(() => s.groupFormatter ? s.groupFormatter : s.groupField ? (i) => String(i[s.groupField]) : null), Fe = T(() => s.formatter ? s.formatter : s.labelField ? (i) => String(i[s.labelField]) : (i) => String(i)), Ie = T(() => s.selectionFormatter ? s.selectionFormatter : Fe.value), Oe = T(() => [...bt.value, ...Et.value, ...kt.value]), De = T(() => !!(s.groupField || s.groupFormatter)), ve = T(() => Oe.value.map((i, v) => {
|
|
744
|
+
var Re, We, Ue;
|
|
745
|
+
const h = (Re = fe.value) == null ? void 0 : Re.call(fe, i), d = Fe.value(i), w = (We = s.subtitleFormatter) == null ? void 0 : We.call(s, i), C = d ? d.trim().toLowerCase() : "", Ne = w ? w.trim().toLowerCase() : "", te = [];
|
|
746
|
+
return s.searchFields ? s.searchFields.forEach((je) => {
|
|
747
|
+
i[je] && te.push(String(i[je]).toLowerCase());
|
|
748
|
+
}) : (te.push(C), Ne && te.push(Ne)), {
|
|
749
|
+
key: ((Ue = K.value) == null ? void 0 : Ue.call(K, i)) ?? String(v),
|
|
750
750
|
group: h,
|
|
751
|
-
title:
|
|
752
|
-
subtitle:
|
|
753
|
-
searchContent:
|
|
751
|
+
title: d,
|
|
752
|
+
subtitle: w,
|
|
753
|
+
searchContent: te.join(""),
|
|
754
754
|
ref: i
|
|
755
755
|
};
|
|
756
|
-
})), F =
|
|
757
|
-
let i = [...
|
|
758
|
-
if (
|
|
759
|
-
const
|
|
760
|
-
if (
|
|
761
|
-
i = i.filter((
|
|
762
|
-
const h =
|
|
763
|
-
i = i.map((
|
|
756
|
+
})), F = T(() => {
|
|
757
|
+
let i = [...ve.value];
|
|
758
|
+
if (y.value) {
|
|
759
|
+
const v = c.value.trim().toLowerCase();
|
|
760
|
+
if (v.length) {
|
|
761
|
+
i = i.filter((w) => w.searchContent.includes(v));
|
|
762
|
+
const h = nn(c.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), d = new RegExp(`(${h})`, "ig");
|
|
763
|
+
i = i.map((w) => {
|
|
764
764
|
var C;
|
|
765
765
|
return {
|
|
766
|
-
...
|
|
767
|
-
title:
|
|
768
|
-
subtitle: (C =
|
|
766
|
+
...w,
|
|
767
|
+
title: w.title.replace(d, "<mark>$1</mark>"),
|
|
768
|
+
subtitle: (C = w.subtitle) == null ? void 0 : C.replace(d, "<mark>$1</mark>")
|
|
769
769
|
};
|
|
770
|
-
}),
|
|
770
|
+
}), B.value && (i.find((C) => C.searchContent === v) !== void 0 || i.push({
|
|
771
771
|
key: l,
|
|
772
|
-
title:
|
|
772
|
+
title: wt.value ? "Create <strong>" + c.value.trim() + "</strong>..." : c.value.trim()
|
|
773
773
|
}));
|
|
774
774
|
}
|
|
775
775
|
} else s.nullTitle && i.unshift({
|
|
@@ -777,7 +777,7 @@ const Nn = ["disabled", "placeholder", "required", "name"], Rn = {
|
|
|
777
777
|
title: s.nullTitle
|
|
778
778
|
});
|
|
779
779
|
return i;
|
|
780
|
-
}),
|
|
780
|
+
}), St = T(() => {
|
|
781
781
|
if (!De.value)
|
|
782
782
|
return [
|
|
783
783
|
{
|
|
@@ -785,230 +785,225 @@ const Nn = ["disabled", "placeholder", "required", "name"], Rn = {
|
|
|
785
785
|
options: F.value
|
|
786
786
|
}
|
|
787
787
|
];
|
|
788
|
-
const i =
|
|
788
|
+
const i = Kt(F.value.map((h) => h.group ?? "")), v = Yt(F.value, (h) => h.group ?? "");
|
|
789
789
|
return i.map((h) => ({
|
|
790
790
|
groupTitle: h,
|
|
791
|
-
options:
|
|
791
|
+
options: v[h]
|
|
792
792
|
}));
|
|
793
793
|
});
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}), H(u, () => {
|
|
802
|
-
g.value && !s.remoteSearch && !u.value.trim().length && (g.value = !1);
|
|
803
|
-
}), H(O, () => {
|
|
804
|
-
O.value ? setTimeout(Ot, 0) : (g.value = !1, u.value = S.value ?? "", p.value && (p.value.style.visibility = "hidden"));
|
|
805
|
-
}), H(F, () => {
|
|
794
|
+
D(() => s.modelValue, pe), D(ve, () => {
|
|
795
|
+
M.value && setTimeout($e, 0);
|
|
796
|
+
}), D(c, () => {
|
|
797
|
+
y.value && !s.remoteSearch && !c.value.trim().length && (y.value = !1);
|
|
798
|
+
}), D(M, () => {
|
|
799
|
+
M.value ? setTimeout(Dt, 0) : (y.value = !1, c.value = g.value ?? "", m.value && (m.value.style.visibility = "hidden"));
|
|
800
|
+
}), D(F, () => {
|
|
806
801
|
var i;
|
|
807
|
-
s.modelValue !== null &&
|
|
802
|
+
s.modelValue !== null && f.value === null && pe(), (L.value !== null || y.value) && !F.value.find((v) => v.key == L.value) && (L.value = ((i = F.value[0]) == null ? void 0 : i.key) ?? o);
|
|
808
803
|
}), _(async () => {
|
|
809
|
-
|
|
810
|
-
|
|
804
|
+
B.value = s.onCreateItem !== void 0, s.loadOptions && s.preload && await He(), !s.options && (s.valueField || s.valueExtractor) && (!s.loadOptions || s.preload) ? c.value = s.loadingText ?? "..." : pe(), D(f, () => {
|
|
805
|
+
f.value !== s.modelValue && a(
|
|
811
806
|
"update:modelValue",
|
|
812
|
-
|
|
807
|
+
Pe(f.value) && z.value !== null ? z.value(f.value) : f.value
|
|
813
808
|
);
|
|
814
|
-
}), s.remoteSearch &&
|
|
815
|
-
}),
|
|
809
|
+
}), s.remoteSearch && D(c, Xt(Mt, 250));
|
|
810
|
+
}), ae(() => {
|
|
816
811
|
var i;
|
|
817
|
-
(i =
|
|
812
|
+
(i = m.value) == null || i.remove();
|
|
818
813
|
});
|
|
819
814
|
async function He() {
|
|
820
|
-
await Ve(),
|
|
815
|
+
await Ve(), p.value && a("optionsLoaded", p.value);
|
|
821
816
|
}
|
|
822
817
|
async function Ve() {
|
|
823
|
-
var
|
|
824
|
-
const i = s.remoteSearch &&
|
|
825
|
-
E.value = !0,
|
|
818
|
+
var v;
|
|
819
|
+
const i = s.remoteSearch && y.value && c.value.length ? c.value : null;
|
|
820
|
+
E.value = !0, p.value = await ((v = s.loadOptions) == null ? void 0 : v.call(s, i)) ?? [], E.value = !1, Ae();
|
|
826
821
|
}
|
|
827
|
-
function
|
|
828
|
-
|
|
822
|
+
function Mt() {
|
|
823
|
+
y.value && (Ve(), y.value = c.value.trim().length > 0);
|
|
829
824
|
}
|
|
830
|
-
function
|
|
825
|
+
function Lt(i) {
|
|
831
826
|
if (i.key == "Escape") {
|
|
832
|
-
i.stopPropagation(), i.target.blur(),
|
|
827
|
+
i.stopPropagation(), i.target.blur(), _e();
|
|
833
828
|
return;
|
|
834
829
|
}
|
|
835
830
|
if (!(i.key == "ArrowLeft" || i.key == "ArrowRight") && i.key != "Tab") {
|
|
836
|
-
if (!
|
|
837
|
-
|
|
831
|
+
if (!q.value) {
|
|
832
|
+
y.value || i.preventDefault();
|
|
838
833
|
return;
|
|
839
834
|
}
|
|
840
835
|
if (i.key == "ArrowUp" || i.key == "ArrowDown")
|
|
841
|
-
return i.preventDefault(),
|
|
836
|
+
return i.preventDefault(), me(i.key == "ArrowUp" ? -1 : 1);
|
|
842
837
|
if (i.key == "PageUp" || i.key == "PageDown")
|
|
843
|
-
return i.preventDefault(),
|
|
838
|
+
return i.preventDefault(), me(i.key == "PageUp" ? -10 : 10);
|
|
844
839
|
if (i.key == "Home" || i.key == "End")
|
|
845
|
-
return i.preventDefault(),
|
|
840
|
+
return i.preventDefault(), me(i.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
846
841
|
if (i.key == "Enter") {
|
|
847
842
|
i.preventDefault();
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
843
|
+
const v = F.value.find((h) => h.key == L.value);
|
|
844
|
+
if (v) return Be(v);
|
|
850
845
|
}
|
|
851
846
|
if (i.key === "Delete" || i.key === "Backspace") {
|
|
852
|
-
|
|
847
|
+
c.value.length > 1 && (y.value = !0);
|
|
853
848
|
return;
|
|
854
849
|
}
|
|
855
|
-
!i.metaKey &&
|
|
850
|
+
!i.metaKey && Kn.includes(i.key) && (y.value = !0);
|
|
856
851
|
}
|
|
857
852
|
}
|
|
858
|
-
function
|
|
859
|
-
|
|
853
|
+
function xt() {
|
|
854
|
+
Ae(), M.value = !0, setTimeout(() => {
|
|
860
855
|
var i;
|
|
861
|
-
return (i =
|
|
856
|
+
return (i = u.value) == null ? void 0 : i.select();
|
|
862
857
|
}, 0);
|
|
863
858
|
}
|
|
864
|
-
function
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
function xt(i) {
|
|
868
|
-
var m;
|
|
869
|
-
return z.value ? z.value(d.value) : ((m = Ft(i)) == null ? void 0 : m.key) ?? "";
|
|
859
|
+
function Ae(i) {
|
|
860
|
+
f.value ? L.value = Ft(f.value) : s.nullTitle && (L.value = o);
|
|
870
861
|
}
|
|
871
862
|
function Ft(i) {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
return m;
|
|
875
|
-
const h = s.keyExtractor ? (y, C) => s.keyExtractor(y) === s.keyExtractor(C) : st, f = F.value.find((y) => h(y.ref, i));
|
|
876
|
-
return f || null;
|
|
863
|
+
var v;
|
|
864
|
+
return K.value ? K.value(f.value) : ((v = It(i)) == null ? void 0 : v.key) ?? "";
|
|
877
865
|
}
|
|
878
|
-
function It() {
|
|
879
|
-
|
|
866
|
+
function It(i) {
|
|
867
|
+
const v = F.value.find((w) => w.ref === i);
|
|
868
|
+
if (v)
|
|
869
|
+
return v;
|
|
870
|
+
const h = s.keyExtractor ? (w, C) => s.keyExtractor(w) === s.keyExtractor(C) : it, d = F.value.find((w) => h(w.ref, i));
|
|
871
|
+
return d || null;
|
|
880
872
|
}
|
|
881
873
|
function Ot() {
|
|
882
|
-
|
|
883
|
-
v.value || He(), s.optionsListId && ((i = p.value) == null || i.setAttribute("id", s.optionsListId)), Dt();
|
|
874
|
+
s.debug || (!c.value.length && s.nullTitle && (f.value = null, g.value = null), M.value = !1);
|
|
884
875
|
}
|
|
885
876
|
function Dt() {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
877
|
+
var i;
|
|
878
|
+
q.value || He(), s.optionsListId && ((i = m.value) == null || i.setAttribute("id", s.optionsListId)), Ht();
|
|
879
|
+
}
|
|
880
|
+
function Ht() {
|
|
881
|
+
const i = r.value.getBoundingClientRect(), v = i.y + i.height + 2, h = i.x, d = m.value, w = window.getComputedStyle(r.value);
|
|
882
|
+
for (let C in w)
|
|
883
|
+
/^(font|text)/.test(C) && (d.style[C] = w[C]);
|
|
884
|
+
if (d.style.top = v + "px", d.style.left = h + "px", d.style.minWidth = i.width + "px", !w.maxHeight || w.maxHeight == "none") {
|
|
885
|
+
const C = window.innerHeight - v - 12;
|
|
886
|
+
d.style.maxHeight = C + "px";
|
|
892
887
|
}
|
|
893
|
-
|
|
888
|
+
d.style.visibility = "visible", document.body.appendChild(d), setTimeout($e, 0);
|
|
894
889
|
}
|
|
895
|
-
function
|
|
896
|
-
if (!
|
|
897
|
-
const i = F.value.findIndex((
|
|
898
|
-
h && (
|
|
890
|
+
function $e() {
|
|
891
|
+
if (!q.value || !L.value) return;
|
|
892
|
+
const i = F.value.findIndex((d) => d.key == L.value), v = m.value, h = v == null ? void 0 : v.querySelectorAll(".option")[i];
|
|
893
|
+
h && (v.scrollTop = h.offsetTop);
|
|
899
894
|
}
|
|
900
|
-
function
|
|
895
|
+
function Vt(i) {
|
|
901
896
|
L.value = i ? i.key : null;
|
|
902
897
|
}
|
|
903
|
-
function
|
|
904
|
-
const
|
|
905
|
-
let h =
|
|
906
|
-
if (h < 0 ? h = 0 : h >= F.value.length && (h = F.value.length - 1),
|
|
898
|
+
function me(i) {
|
|
899
|
+
const v = F.value.findIndex((C) => C.key == L.value);
|
|
900
|
+
let h = v + i;
|
|
901
|
+
if (h < 0 ? h = 0 : h >= F.value.length && (h = F.value.length - 1), v == h) return;
|
|
907
902
|
L.value = F.value[h].key;
|
|
908
|
-
const
|
|
909
|
-
|
|
903
|
+
const d = m.value, w = d == null ? void 0 : d.querySelectorAll(".option")[h];
|
|
904
|
+
w && (w.offsetTop < d.scrollTop ? d.scrollTop = w.offsetTop : w.offsetTop + w.offsetHeight > d.scrollTop + d.clientHeight && (d.scrollTop = w.offsetTop + w.offsetHeight - d.clientHeight));
|
|
910
905
|
}
|
|
911
|
-
function
|
|
912
|
-
var
|
|
913
|
-
if (
|
|
914
|
-
|
|
906
|
+
function Be(i) {
|
|
907
|
+
var v, h;
|
|
908
|
+
if (y.value = !1, i.key === o)
|
|
909
|
+
c.value = "", f.value = null, g.value = null;
|
|
915
910
|
else if (i.key === l) {
|
|
916
|
-
const
|
|
917
|
-
|
|
911
|
+
const d = c.value.trim();
|
|
912
|
+
c.value = "", f.value = null, g.value = null, (v = s.onCreateItem) == null || v.call(s, d);
|
|
918
913
|
} else {
|
|
919
|
-
const
|
|
920
|
-
|
|
914
|
+
const w = ve.value.find((C) => C.key == i.key).ref;
|
|
915
|
+
f.value = w, g.value = Ie.value(w), c.value = g.value ?? "";
|
|
921
916
|
}
|
|
922
|
-
(h =
|
|
917
|
+
(h = u.value) == null || h.blur(), _e();
|
|
923
918
|
}
|
|
924
|
-
function
|
|
925
|
-
s.modelValue !== null ? (
|
|
919
|
+
function pe() {
|
|
920
|
+
s.modelValue !== null ? (f.value = z.value ? Oe.value.find((i) => s.modelValue === z.value(i)) : s.modelValue, g.value = Pe(f.value) ? Ie.value(f.value) : null, c.value = g.value ?? "") : (f.value = null, g.value = null, c.value = "");
|
|
926
921
|
}
|
|
927
|
-
function
|
|
928
|
-
|
|
922
|
+
function At(i) {
|
|
923
|
+
p.value.unshift(i);
|
|
929
924
|
}
|
|
930
|
-
function
|
|
931
|
-
var
|
|
925
|
+
function _e() {
|
|
926
|
+
var w;
|
|
932
927
|
if (!s.autoNext) return;
|
|
933
|
-
let i = (
|
|
928
|
+
let i = (w = r.value) == null ? void 0 : w.parentElement;
|
|
934
929
|
for (; i && i.tagName !== "FORM" && i.tagName !== "BODY"; )
|
|
935
930
|
i = i.parentElement;
|
|
936
931
|
if (!i) return;
|
|
937
|
-
const
|
|
938
|
-
if (!
|
|
939
|
-
const h = Array.from(
|
|
940
|
-
|
|
932
|
+
const v = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
|
|
933
|
+
if (!v) return;
|
|
934
|
+
const h = Array.from(v).findIndex((C) => C === u.value), d = v[h + 1];
|
|
935
|
+
d && setTimeout(() => d.focus(), 0);
|
|
941
936
|
}
|
|
942
|
-
return (i,
|
|
937
|
+
return (i, v) => (b(), k("div", {
|
|
943
938
|
ref_key: "el",
|
|
944
939
|
ref: r,
|
|
945
|
-
class:
|
|
940
|
+
class: A(["vf-smart-select", { disabled: xe.value, open: M.value }])
|
|
946
941
|
}, [
|
|
947
|
-
|
|
942
|
+
oe($("input", {
|
|
948
943
|
ref_key: "searchField",
|
|
949
|
-
ref:
|
|
950
|
-
"onUpdate:modelValue":
|
|
944
|
+
ref: u,
|
|
945
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => c.value = h),
|
|
951
946
|
type: "text",
|
|
952
947
|
disabled: xe.value,
|
|
953
|
-
class:
|
|
954
|
-
placeholder:
|
|
948
|
+
class: A({ nullable: !!i.nullTitle }),
|
|
949
|
+
placeholder: Tt.value,
|
|
955
950
|
required: i.required,
|
|
956
951
|
name: i.name,
|
|
957
952
|
"data-1p-ignore": "",
|
|
958
|
-
onKeydown:
|
|
959
|
-
onFocus:
|
|
960
|
-
onBlur:
|
|
961
|
-
}, null, 42,
|
|
962
|
-
[
|
|
953
|
+
onKeydown: Lt,
|
|
954
|
+
onFocus: xt,
|
|
955
|
+
onBlur: Ot
|
|
956
|
+
}, null, 42, Rn), [
|
|
957
|
+
[qt, c.value]
|
|
963
958
|
]),
|
|
964
|
-
|
|
959
|
+
M.value ? (b(), k("div", {
|
|
965
960
|
key: 0,
|
|
966
961
|
ref_key: "optionsContainer",
|
|
967
|
-
ref:
|
|
968
|
-
class:
|
|
962
|
+
ref: m,
|
|
963
|
+
class: A(["vf-smart-select-options", { grouped: De.value }])
|
|
969
964
|
}, [
|
|
970
|
-
|
|
965
|
+
q.value ? (b(!0), k(se, { key: 1 }, ie(St.value, (h) => (b(), k("div", {
|
|
971
966
|
key: h.groupTitle,
|
|
972
967
|
class: "group"
|
|
973
968
|
}, [
|
|
974
|
-
h.groupTitle ? (b(), k("div",
|
|
969
|
+
h.groupTitle ? (b(), k("div", Un, [
|
|
975
970
|
U(i.$slots, "group", {
|
|
976
971
|
group: h.groupTitle
|
|
977
972
|
}, () => [
|
|
978
|
-
|
|
973
|
+
Z(W(h.groupTitle), 1)
|
|
979
974
|
])
|
|
980
|
-
])) :
|
|
981
|
-
(b(!0), k(
|
|
982
|
-
var
|
|
975
|
+
])) : V("", !0),
|
|
976
|
+
(b(!0), k(se, null, ie(h.options, (d) => {
|
|
977
|
+
var w;
|
|
983
978
|
return b(), k("div", {
|
|
984
|
-
key:
|
|
985
|
-
class:
|
|
986
|
-
onMousemove: (C) =>
|
|
987
|
-
onMousedown: (C) =>
|
|
979
|
+
key: d.key,
|
|
980
|
+
class: A(["option", [L.value === d.key && "highlighted", d.ref && ((w = i.classForOption) == null ? void 0 : w.call(i, d.ref))]]),
|
|
981
|
+
onMousemove: (C) => Vt(d),
|
|
982
|
+
onMousedown: (C) => Be(d)
|
|
988
983
|
}, [
|
|
989
|
-
U(i.$slots, "option", { option:
|
|
990
|
-
|
|
984
|
+
U(i.$slots, "option", { option: d }, () => [
|
|
985
|
+
$("div", {
|
|
991
986
|
class: "title",
|
|
992
|
-
innerHTML:
|
|
993
|
-
}, null, 8,
|
|
994
|
-
|
|
987
|
+
innerHTML: d.title
|
|
988
|
+
}, null, 8, Pn),
|
|
989
|
+
d.subtitle ? (b(), k("div", {
|
|
995
990
|
key: 0,
|
|
996
991
|
class: "subtitle",
|
|
997
|
-
innerHTML:
|
|
998
|
-
}, null, 8,
|
|
992
|
+
innerHTML: d.subtitle
|
|
993
|
+
}, null, 8, qn)) : V("", !0)
|
|
999
994
|
])
|
|
1000
|
-
], 42,
|
|
995
|
+
], 42, jn);
|
|
1001
996
|
}), 128)),
|
|
1002
|
-
!F.value.length &&
|
|
997
|
+
!F.value.length && c.value ? (b(), k("div", zn, [
|
|
1003
998
|
U(i.$slots, "no-results", {}, () => [
|
|
1004
|
-
|
|
999
|
+
Z(W(Ct.value), 1)
|
|
1005
1000
|
])
|
|
1006
|
-
])) :
|
|
1007
|
-
]))), 128)) : (b(), k("div",
|
|
1008
|
-
], 2)) :
|
|
1001
|
+
])) : V("", !0)
|
|
1002
|
+
]))), 128)) : (b(), k("div", Wn, "Loading..."))
|
|
1003
|
+
], 2)) : V("", !0)
|
|
1009
1004
|
], 2));
|
|
1010
1005
|
}
|
|
1011
|
-
}),
|
|
1006
|
+
}), as = /* @__PURE__ */ R({
|
|
1012
1007
|
__name: "vf-ez-smart-select",
|
|
1013
1008
|
props: {
|
|
1014
1009
|
modelValue: {},
|
|
@@ -1020,22 +1015,22 @@ const Nn = ["disabled", "placeholder", "required", "name"], Rn = {
|
|
|
1020
1015
|
},
|
|
1021
1016
|
emits: ["update:modelValue"],
|
|
1022
1017
|
setup(e, { emit: t }) {
|
|
1023
|
-
const n = e, o =
|
|
1018
|
+
const n = e, o = T(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: String(r) })) : Object.entries(n.options).map(([r, u]) => ({
|
|
1024
1019
|
value: r,
|
|
1025
|
-
label:
|
|
1026
|
-
}))), l =
|
|
1027
|
-
return
|
|
1020
|
+
label: u
|
|
1021
|
+
}))), l = T(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label), s = t, a = S(o.value.find((r) => r.value === n.modelValue) ?? null);
|
|
1022
|
+
return D(
|
|
1028
1023
|
() => n.modelValue,
|
|
1029
1024
|
(r) => {
|
|
1030
|
-
a.value = o.value.find((
|
|
1025
|
+
a.value = o.value.find((u) => u.value === r) ?? null;
|
|
1031
1026
|
}
|
|
1032
|
-
),
|
|
1033
|
-
var
|
|
1034
|
-
const
|
|
1035
|
-
s("update:modelValue",
|
|
1036
|
-
}), (r,
|
|
1027
|
+
), D(a, (r) => {
|
|
1028
|
+
var m;
|
|
1029
|
+
const u = r ? (m = o.value.find((E) => it(E, r))) == null ? void 0 : m.value : null;
|
|
1030
|
+
s("update:modelValue", u ?? null);
|
|
1031
|
+
}), (r, u) => (b(), tt(Yn, {
|
|
1037
1032
|
modelValue: a.value,
|
|
1038
|
-
"onUpdate:modelValue":
|
|
1033
|
+
"onUpdate:modelValue": u[0] || (u[0] = (m) => a.value = m),
|
|
1039
1034
|
options: o.value,
|
|
1040
1035
|
formatter: l.value,
|
|
1041
1036
|
"null-title": r.nullTitle,
|
|
@@ -1044,16 +1039,16 @@ const Nn = ["disabled", "placeholder", "required", "name"], Rn = {
|
|
|
1044
1039
|
}, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder", "name"]));
|
|
1045
1040
|
}
|
|
1046
1041
|
});
|
|
1047
|
-
function
|
|
1048
|
-
return
|
|
1042
|
+
function us() {
|
|
1043
|
+
return S();
|
|
1049
1044
|
}
|
|
1050
|
-
const
|
|
1045
|
+
const Xn = { class: "content" }, Zn = { class: "message" }, Gn = {
|
|
1051
1046
|
key: 0,
|
|
1052
1047
|
class: "close"
|
|
1053
|
-
},
|
|
1048
|
+
}, Jn = {
|
|
1054
1049
|
key: 0,
|
|
1055
1050
|
class: "progress-bar"
|
|
1056
|
-
},
|
|
1051
|
+
}, Qn = /* @__PURE__ */ R({
|
|
1057
1052
|
__name: "vf-toast",
|
|
1058
1053
|
props: {
|
|
1059
1054
|
message: {},
|
|
@@ -1068,7 +1063,7 @@ const Yn = { class: "content" }, Xn = { class: "message" }, Zn = {
|
|
|
1068
1063
|
function n() {
|
|
1069
1064
|
t.onClick ? t.onClick() : t.disableClose || t.callback();
|
|
1070
1065
|
}
|
|
1071
|
-
const o =
|
|
1066
|
+
const o = S();
|
|
1072
1067
|
return t.durationSecs !== null && _(() => {
|
|
1073
1068
|
var s;
|
|
1074
1069
|
const l = t.durationSecs ?? 5;
|
|
@@ -1077,133 +1072,133 @@ const Yn = { class: "content" }, Xn = { class: "message" }, Zn = {
|
|
|
1077
1072
|
easing: "linear"
|
|
1078
1073
|
}), setTimeout(() => t.callback(), l * 1e3);
|
|
1079
1074
|
}), (l, s) => (b(), k("div", {
|
|
1080
|
-
class:
|
|
1081
|
-
onClick:
|
|
1075
|
+
class: A(["vf-toast", l.className]),
|
|
1076
|
+
onClick: be(n, ["stop"])
|
|
1082
1077
|
}, [
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
l.disableClose ?
|
|
1078
|
+
$("div", Xn, [
|
|
1079
|
+
$("div", Zn, W(l.message), 1),
|
|
1080
|
+
l.disableClose ? V("", !0) : (b(), k("div", Gn, "x"))
|
|
1086
1081
|
]),
|
|
1087
|
-
l.durationSecs !== null ? (b(), k("div",
|
|
1088
|
-
|
|
1082
|
+
l.durationSecs !== null ? (b(), k("div", Jn, [
|
|
1083
|
+
$("div", {
|
|
1089
1084
|
ref_key: "progressInnerEl",
|
|
1090
1085
|
ref: o,
|
|
1091
1086
|
class: "inner"
|
|
1092
1087
|
}, null, 512)
|
|
1093
|
-
])) :
|
|
1088
|
+
])) : V("", !0)
|
|
1094
1089
|
], 2));
|
|
1095
1090
|
}
|
|
1096
1091
|
});
|
|
1097
|
-
function
|
|
1098
|
-
const t =
|
|
1092
|
+
function cs(e) {
|
|
1093
|
+
const t = ke(Qn, {
|
|
1099
1094
|
...e,
|
|
1100
|
-
callback: () =>
|
|
1095
|
+
callback: () => re(t)
|
|
1101
1096
|
});
|
|
1102
|
-
return () =>
|
|
1097
|
+
return () => re(t);
|
|
1103
1098
|
}
|
|
1104
|
-
function
|
|
1099
|
+
function eo(e) {
|
|
1105
1100
|
const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), l = ["B", "KB", "MB", "GB", "TB"][t];
|
|
1106
1101
|
return `${o} ${l}`;
|
|
1107
1102
|
}
|
|
1108
|
-
function eo(e) {
|
|
1109
|
-
return e != null && String(e).length ? e : "-";
|
|
1110
|
-
}
|
|
1111
1103
|
function to(e) {
|
|
1112
|
-
return e
|
|
1104
|
+
return e != null && String(e).length ? e : "-";
|
|
1113
1105
|
}
|
|
1114
1106
|
function no(e) {
|
|
1115
|
-
return e
|
|
1107
|
+
return e || "-";
|
|
1116
1108
|
}
|
|
1117
1109
|
function oo(e) {
|
|
1118
|
-
return e &&
|
|
1110
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Mn(Number(e));
|
|
1119
1111
|
}
|
|
1120
1112
|
function so(e) {
|
|
1121
|
-
return e
|
|
1122
|
-
}
|
|
1123
|
-
function ct(e) {
|
|
1124
|
-
return e ? Xt(e) : null;
|
|
1113
|
+
return e && _n(e);
|
|
1125
1114
|
}
|
|
1126
1115
|
function io(e) {
|
|
1127
|
-
return e ? e
|
|
1116
|
+
return e ? Gt(e) : null;
|
|
1117
|
+
}
|
|
1118
|
+
function dt(e) {
|
|
1119
|
+
return e ? Zt(e) : null;
|
|
1128
1120
|
}
|
|
1129
1121
|
function lo(e) {
|
|
1130
|
-
return e ?
|
|
1122
|
+
return e ? e.toUpperCase() : null;
|
|
1131
1123
|
}
|
|
1132
1124
|
function ro(e) {
|
|
1133
|
-
return e ?
|
|
1125
|
+
return e ? dt(e.toLowerCase()) : null;
|
|
1134
1126
|
}
|
|
1135
|
-
function ao(e
|
|
1136
|
-
return
|
|
1127
|
+
function ao(e) {
|
|
1128
|
+
return e ? Bn(e) : null;
|
|
1137
1129
|
}
|
|
1138
1130
|
function uo(e, t) {
|
|
1139
|
-
return
|
|
1131
|
+
return Nn(e, t);
|
|
1140
1132
|
}
|
|
1141
1133
|
function co(e, t) {
|
|
1142
|
-
return
|
|
1134
|
+
return H(e).divide(t).value;
|
|
1143
1135
|
}
|
|
1144
1136
|
function fo(e, t) {
|
|
1145
|
-
return e && P(new Date(e), t ?? I.
|
|
1137
|
+
return e && P(new Date(e), t ?? I.defaultDateFormat);
|
|
1146
1138
|
}
|
|
1147
1139
|
function vo(e, t) {
|
|
1140
|
+
return e && P(new Date(e), t ?? I.defaultTimeFormat);
|
|
1141
|
+
}
|
|
1142
|
+
function mo(e, t) {
|
|
1148
1143
|
return e && P(new Date(e), t ?? `${I.defaultDateFormat} ${I.defaultTimeFormat}`);
|
|
1149
1144
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return e && P(
|
|
1152
|
-
}
|
|
1153
|
-
const
|
|
1154
|
-
bytes:
|
|
1155
|
-
dash:
|
|
1156
|
-
dashZeros:
|
|
1157
|
-
number:
|
|
1158
|
-
phone:
|
|
1159
|
-
upperFirst:
|
|
1160
|
-
startCase:
|
|
1161
|
-
upperCase:
|
|
1162
|
-
upperWords:
|
|
1163
|
-
desnake:
|
|
1164
|
-
usCurrency:
|
|
1165
|
-
divide:
|
|
1166
|
-
date:
|
|
1167
|
-
time:
|
|
1168
|
-
dateTime:
|
|
1169
|
-
oneDayForward:
|
|
1170
|
-
},
|
|
1171
|
-
...
|
|
1172
|
-
...e(
|
|
1173
|
-
}),
|
|
1174
|
-
function
|
|
1175
|
-
const n = t ??
|
|
1176
|
-
_(() =>
|
|
1177
|
-
}
|
|
1178
|
-
function
|
|
1145
|
+
function po(e) {
|
|
1146
|
+
return e && P(on(sn(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), I.defaultDateFormat);
|
|
1147
|
+
}
|
|
1148
|
+
const ze = {
|
|
1149
|
+
bytes: eo,
|
|
1150
|
+
dash: to,
|
|
1151
|
+
dashZeros: no,
|
|
1152
|
+
number: oo,
|
|
1153
|
+
phone: so,
|
|
1154
|
+
upperFirst: io,
|
|
1155
|
+
startCase: dt,
|
|
1156
|
+
upperCase: lo,
|
|
1157
|
+
upperWords: ro,
|
|
1158
|
+
desnake: ao,
|
|
1159
|
+
usCurrency: uo,
|
|
1160
|
+
divide: co,
|
|
1161
|
+
date: fo,
|
|
1162
|
+
time: vo,
|
|
1163
|
+
dateTime: mo,
|
|
1164
|
+
oneDayForward: po
|
|
1165
|
+
}, ds = (e) => ({
|
|
1166
|
+
...ze,
|
|
1167
|
+
...e(ze)
|
|
1168
|
+
}), Me = Symbol("HookState");
|
|
1169
|
+
function fs(e, t) {
|
|
1170
|
+
const n = t ?? Ee();
|
|
1171
|
+
_(() => ho(n, e), n), nt(() => yo(n), n), ot(() => Ke(n), n), ae(() => Ke(n), n);
|
|
1172
|
+
}
|
|
1173
|
+
function ho(e, t) {
|
|
1179
1174
|
const n = {};
|
|
1180
|
-
if (t.elScrolledToBottom && (n.el = new
|
|
1181
|
-
const o =
|
|
1182
|
-
o ? n.ancestor = new
|
|
1175
|
+
if (t.elScrolledToBottom && (n.el = new J(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1176
|
+
const o = ft(e.vnode.el);
|
|
1177
|
+
o ? n.ancestor = new J(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
1183
1178
|
}
|
|
1184
|
-
t.windowScrolledToBottom && (n.window = new
|
|
1179
|
+
t.windowScrolledToBottom && (n.window = new J(window, t.windowScrolledToBottom)), e[Me] = n;
|
|
1185
1180
|
}
|
|
1186
|
-
function
|
|
1181
|
+
function yo(e) {
|
|
1187
1182
|
var n, o, l;
|
|
1188
|
-
const t = e[
|
|
1183
|
+
const t = e[Me];
|
|
1189
1184
|
(n = t == null ? void 0 : t.el) == null || n.install(), (o = t == null ? void 0 : t.ancestor) == null || o.install(), (l = t == null ? void 0 : t.window) == null || l.install();
|
|
1190
1185
|
}
|
|
1191
|
-
function
|
|
1186
|
+
function Ke(e) {
|
|
1192
1187
|
var n, o, l;
|
|
1193
|
-
const t = e[
|
|
1188
|
+
const t = e[Me];
|
|
1194
1189
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (o = t == null ? void 0 : t.ancestor) == null || o.uninstall(), (l = t == null ? void 0 : t.window) == null || l.uninstall();
|
|
1195
1190
|
}
|
|
1196
|
-
const
|
|
1197
|
-
function
|
|
1191
|
+
const ge = ["auto", "scroll"];
|
|
1192
|
+
function ft(e) {
|
|
1198
1193
|
const t = e.parentElement;
|
|
1199
1194
|
if (!t) return null;
|
|
1200
1195
|
const n = window.getComputedStyle(t);
|
|
1201
|
-
return
|
|
1196
|
+
return ge.includes(n.overflow) || ge.includes(n.overflowX) || ge.includes(n.overflowY) ? t : ft(t);
|
|
1202
1197
|
}
|
|
1203
|
-
class
|
|
1198
|
+
class J {
|
|
1204
1199
|
constructor(t, n) {
|
|
1205
|
-
|
|
1206
|
-
|
|
1200
|
+
O(this, "isTripped", !1);
|
|
1201
|
+
O(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
1207
1202
|
this.el = t, this.handler = n, this.install();
|
|
1208
1203
|
}
|
|
1209
1204
|
install() {
|
|
@@ -1216,30 +1211,30 @@ class G {
|
|
|
1216
1211
|
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);
|
|
1217
1212
|
}
|
|
1218
1213
|
}
|
|
1219
|
-
function
|
|
1220
|
-
_(() => window.addEventListener("resize", e)),
|
|
1214
|
+
function vs(e) {
|
|
1215
|
+
_(() => window.addEventListener("resize", e)), nt(() => window.addEventListener("resize", e)), ot(() => window.removeEventListener("resize", e)), ae(() => window.removeEventListener("resize", e));
|
|
1221
1216
|
}
|
|
1222
|
-
const
|
|
1223
|
-
mounted:
|
|
1224
|
-
updated:
|
|
1225
|
-
},
|
|
1226
|
-
function
|
|
1227
|
-
if (t.value === void 0 && e[
|
|
1228
|
-
e[
|
|
1217
|
+
const go = {
|
|
1218
|
+
mounted: Xe,
|
|
1219
|
+
updated: Xe
|
|
1220
|
+
}, Ye = Symbol("HasAutoFocused");
|
|
1221
|
+
function Xe(e, t) {
|
|
1222
|
+
if (t.value === void 0 && e[Ye] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
|
|
1223
|
+
e[Ye] = !0;
|
|
1229
1224
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1230
1225
|
setTimeout(() => n.focus(), 10);
|
|
1231
1226
|
}
|
|
1232
|
-
const
|
|
1233
|
-
mounted:
|
|
1234
|
-
},
|
|
1235
|
-
function
|
|
1227
|
+
const wo = {
|
|
1228
|
+
mounted: Eo
|
|
1229
|
+
}, Y = Symbol("ConfirmState");
|
|
1230
|
+
function Eo(e, t) {
|
|
1236
1231
|
e.addEventListener("click", (n) => {
|
|
1237
1232
|
var a, r;
|
|
1238
1233
|
const o = Date.now(), l = ((a = t.value) == null ? void 0 : a.text) !== void 0 ? t.value.text : "Confirm";
|
|
1239
|
-
if (e[
|
|
1240
|
-
if (o - e[
|
|
1234
|
+
if (e[Y]) {
|
|
1235
|
+
if (o - e[Y].initTime < 300)
|
|
1241
1236
|
return;
|
|
1242
|
-
e[
|
|
1237
|
+
e[Y].resetHandler(), e.dispatchEvent(new Event("confirm"));
|
|
1243
1238
|
return;
|
|
1244
1239
|
}
|
|
1245
1240
|
n.preventDefault(), n.stopImmediatePropagation();
|
|
@@ -1247,17 +1242,17 @@ function wo(e, t) {
|
|
|
1247
1242
|
initTime: o,
|
|
1248
1243
|
preconfirmHtml: e.innerHTML,
|
|
1249
1244
|
resetHandler: () => {
|
|
1250
|
-
var
|
|
1251
|
-
l && (e.innerHTML = s.preconfirmHtml), (
|
|
1245
|
+
var u;
|
|
1246
|
+
l && (e.innerHTML = s.preconfirmHtml), (u = t.value) != null && u.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", s.resetHandler), delete e[Y];
|
|
1252
1247
|
}
|
|
1253
1248
|
};
|
|
1254
|
-
e[
|
|
1249
|
+
e[Y] = s, l && (e.innerHTML = l), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", s.resetHandler);
|
|
1255
1250
|
});
|
|
1256
1251
|
}
|
|
1257
|
-
const
|
|
1258
|
-
beforeMount:
|
|
1252
|
+
const bo = {
|
|
1253
|
+
beforeMount: ko
|
|
1259
1254
|
};
|
|
1260
|
-
function
|
|
1255
|
+
function ko(e) {
|
|
1261
1256
|
e.addEventListener("blur", () => {
|
|
1262
1257
|
let t = e.value;
|
|
1263
1258
|
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + P(/* @__PURE__ */ new Date(), "yy"));
|
|
@@ -1265,75 +1260,75 @@ function bo(e) {
|
|
|
1265
1260
|
isNaN(n) ? e.value = "" : e.value = P(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1266
1261
|
});
|
|
1267
1262
|
}
|
|
1268
|
-
const
|
|
1269
|
-
beforeMount:
|
|
1270
|
-
updated:
|
|
1263
|
+
const To = {
|
|
1264
|
+
beforeMount: Ze,
|
|
1265
|
+
updated: Ze
|
|
1271
1266
|
};
|
|
1272
|
-
function
|
|
1273
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1267
|
+
function Ze(e, t) {
|
|
1268
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Co(e, t));
|
|
1274
1269
|
}
|
|
1275
|
-
function
|
|
1276
|
-
var
|
|
1270
|
+
function Co(e, t) {
|
|
1271
|
+
var m, E;
|
|
1277
1272
|
if (!t.value)
|
|
1278
|
-
return ((
|
|
1273
|
+
return ((m = e.attributes.getNamedItem("placeholder")) == null ? void 0 : m.value) ?? "";
|
|
1279
1274
|
let n = "";
|
|
1280
1275
|
const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), l = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), s = new Date(l);
|
|
1281
1276
|
e.attributes.getNamedItem("display-utc") !== null && s.setMinutes(s.getMinutes() - s.getTimezoneOffset());
|
|
1282
1277
|
let a = (E = e.attributes.getNamedItem("format")) == null ? void 0 : E.value;
|
|
1283
1278
|
const r = e.attributes.getNamedItem("date-only") !== null;
|
|
1284
1279
|
if (!a && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1280
|
+
const p = /* @__PURE__ */ new Date();
|
|
1281
|
+
p.getFullYear() === s.getFullYear() && p.getMonth() === s.getMonth() && p.getDate() === s.getDate() && (n = "at", a = "HH:mm");
|
|
1287
1282
|
}
|
|
1288
1283
|
if (!a && e.attributes.getNamedItem("simplified-date") !== null) {
|
|
1289
|
-
let
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1293
|
-
a =
|
|
1284
|
+
let p = null;
|
|
1285
|
+
const y = /* @__PURE__ */ new Date();
|
|
1286
|
+
y.getFullYear() === s.getFullYear() ? (y.getMonth() !== s.getMonth() || y.getDate() !== s.getDate()) && (p = "M/d") : p = "M/d/yy";
|
|
1287
|
+
const c = r ? null : I.defaultTimeFormat;
|
|
1288
|
+
a = st([p, c]).join(" ");
|
|
1294
1289
|
}
|
|
1295
1290
|
a || (r ? a = I.defaultDateFormat : a = `${I.defaultDateFormat} ${I.defaultTimeFormat}`);
|
|
1296
|
-
let
|
|
1297
|
-
return n && (
|
|
1291
|
+
let u = P(s, a);
|
|
1292
|
+
return n && (u = n + " " + u), u;
|
|
1298
1293
|
}
|
|
1299
|
-
const
|
|
1300
|
-
beforeMount:
|
|
1301
|
-
updated:
|
|
1302
|
-
unmounted:
|
|
1294
|
+
const So = {
|
|
1295
|
+
beforeMount: Ge,
|
|
1296
|
+
updated: Ge,
|
|
1297
|
+
unmounted: Mo
|
|
1303
1298
|
};
|
|
1304
|
-
function
|
|
1299
|
+
function Ge(e, t) {
|
|
1305
1300
|
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");
|
|
1306
1301
|
}
|
|
1307
|
-
function
|
|
1302
|
+
function Mo(e) {
|
|
1308
1303
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1309
1304
|
}
|
|
1310
|
-
const
|
|
1311
|
-
beforeMount:
|
|
1312
|
-
updated:
|
|
1313
|
-
unmounted:
|
|
1314
|
-
},
|
|
1315
|
-
function
|
|
1316
|
-
|
|
1305
|
+
const Lo = {
|
|
1306
|
+
beforeMount: Je,
|
|
1307
|
+
updated: Je,
|
|
1308
|
+
unmounted: mt
|
|
1309
|
+
}, ee = Symbol("HasAutoFocused"), Le = [];
|
|
1310
|
+
function xo() {
|
|
1311
|
+
Le.forEach(vt);
|
|
1317
1312
|
}
|
|
1318
|
-
setInterval(
|
|
1319
|
-
function
|
|
1313
|
+
setInterval(xo, 1e3);
|
|
1314
|
+
function Je(e, t) {
|
|
1320
1315
|
var a;
|
|
1321
1316
|
if (t.value == t.oldValue) return;
|
|
1322
|
-
if (!t.value) return
|
|
1317
|
+
if (!t.value) return mt(e);
|
|
1323
1318
|
const n = new Date(t.value), o = (a = e.attributes.getNamedItem("base-time")) == null ? void 0 : a.value, l = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), s = e.getAttribute("no-seconds") === null;
|
|
1324
|
-
e[
|
|
1319
|
+
e[ee] || Le.push(e), e[ee] = {
|
|
1325
1320
|
startTs: l,
|
|
1326
1321
|
includeSeconds: s
|
|
1327
|
-
},
|
|
1328
|
-
}
|
|
1329
|
-
function ft(e) {
|
|
1330
|
-
const t = e[Q], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1331
|
-
e.innerText = xo(n, t.includeSeconds);
|
|
1322
|
+
}, vt(e);
|
|
1332
1323
|
}
|
|
1333
1324
|
function vt(e) {
|
|
1334
|
-
e[
|
|
1325
|
+
const t = e[ee], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1326
|
+
e.innerText = Fo(n, t.includeSeconds);
|
|
1327
|
+
}
|
|
1328
|
+
function mt(e) {
|
|
1329
|
+
e[ee] && (Jt(Le, e), delete e[ee]), e.innerText = "-";
|
|
1335
1330
|
}
|
|
1336
|
-
function
|
|
1331
|
+
function Fo(e, t) {
|
|
1337
1332
|
const n = [], o = Math.floor(e / 86400);
|
|
1338
1333
|
o && n.push(o + "d"), e -= o * 86400;
|
|
1339
1334
|
const l = Math.floor(e / 3600);
|
|
@@ -1341,58 +1336,58 @@ function xo(e, t) {
|
|
|
1341
1336
|
const s = Math.floor(e / 60);
|
|
1342
1337
|
return (o || l || s) && n.push(s + "m"), t ? n.length || n.push("0m") : (e -= s * 60, n.push(e + "s")), n.join(" ");
|
|
1343
1338
|
}
|
|
1344
|
-
const
|
|
1345
|
-
mounted:
|
|
1346
|
-
updated:
|
|
1347
|
-
unmounted:
|
|
1339
|
+
const Io = {
|
|
1340
|
+
mounted: pt,
|
|
1341
|
+
updated: Oo,
|
|
1342
|
+
unmounted: ht
|
|
1348
1343
|
}, j = /* @__PURE__ */ new Map();
|
|
1349
|
-
function mt(e, t) {
|
|
1350
|
-
j.size === 0 && window.addEventListener("keydown", ht), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
|
|
1351
|
-
}
|
|
1352
1344
|
function pt(e, t) {
|
|
1345
|
+
j.size === 0 && window.addEventListener("keydown", yt), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
|
|
1346
|
+
}
|
|
1347
|
+
function ht(e, t) {
|
|
1353
1348
|
const n = j.get(t.value.toLowerCase());
|
|
1354
1349
|
if (n) {
|
|
1355
1350
|
const o = n.indexOf(e);
|
|
1356
1351
|
o !== -1 && n.splice(o, 1), n.length === 0 && j.delete(t.value.toLowerCase());
|
|
1357
1352
|
}
|
|
1358
|
-
j.size === 0 && window.removeEventListener("keydown",
|
|
1353
|
+
j.size === 0 && window.removeEventListener("keydown", yt);
|
|
1359
1354
|
}
|
|
1360
|
-
function
|
|
1361
|
-
|
|
1355
|
+
function Oo(e, t) {
|
|
1356
|
+
ht(e, t), pt(e, t);
|
|
1362
1357
|
}
|
|
1363
|
-
function
|
|
1358
|
+
function yt(e) {
|
|
1364
1359
|
if (typeof e.key != "string") return;
|
|
1365
1360
|
const t = e.key.toLowerCase(), n = j.get(t);
|
|
1366
1361
|
if (n) {
|
|
1367
|
-
const o =
|
|
1362
|
+
const o = Qt(n);
|
|
1368
1363
|
o == null || o.click(), e.preventDefault();
|
|
1369
1364
|
}
|
|
1370
1365
|
}
|
|
1371
|
-
const
|
|
1366
|
+
const X = Symbol("InfiniteScrollHandler"), Do = {
|
|
1372
1367
|
mounted(e, t) {
|
|
1373
|
-
e[
|
|
1368
|
+
e[X] = new J(e, t.value);
|
|
1374
1369
|
},
|
|
1375
1370
|
updated(e, t) {
|
|
1376
1371
|
var n;
|
|
1377
|
-
(n = e[
|
|
1372
|
+
(n = e[X]) == null || n.uninstall(), e[X] = new J(e, t.value);
|
|
1378
1373
|
},
|
|
1379
1374
|
unmounted(e) {
|
|
1380
1375
|
var t;
|
|
1381
|
-
(t = e[
|
|
1376
|
+
(t = e[X]) == null || t.uninstall(), delete e[X];
|
|
1382
1377
|
}
|
|
1383
|
-
},
|
|
1384
|
-
beforeMount:
|
|
1385
|
-
updated:
|
|
1378
|
+
}, Ho = {
|
|
1379
|
+
beforeMount: Qe,
|
|
1380
|
+
updated: Qe
|
|
1386
1381
|
};
|
|
1387
|
-
function
|
|
1382
|
+
function Qe(e, t) {
|
|
1388
1383
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1389
1384
|
}
|
|
1390
|
-
const
|
|
1391
|
-
mounted:
|
|
1392
|
-
updated:
|
|
1393
|
-
unmounted:
|
|
1394
|
-
},
|
|
1395
|
-
function
|
|
1385
|
+
const Vo = {
|
|
1386
|
+
mounted: et,
|
|
1387
|
+
updated: et,
|
|
1388
|
+
unmounted: gt
|
|
1389
|
+
}, Q = Symbol("TooltipState");
|
|
1390
|
+
function et(e, t) {
|
|
1396
1391
|
var o;
|
|
1397
1392
|
let n = ((o = e.attributes.getNamedItem("tip")) == null ? void 0 : o.value) ?? t.value;
|
|
1398
1393
|
if (t.value || (n = null), n) {
|
|
@@ -1400,26 +1395,26 @@ function Qe(e, t) {
|
|
|
1400
1395
|
content: n,
|
|
1401
1396
|
html: e.getAttribute("html") !== null
|
|
1402
1397
|
};
|
|
1403
|
-
e[
|
|
1398
|
+
e[Q] ? e[Q].configure(l) : e[Q] = new Ao(e, l);
|
|
1404
1399
|
} else
|
|
1405
|
-
|
|
1400
|
+
gt(e);
|
|
1406
1401
|
}
|
|
1407
|
-
function
|
|
1402
|
+
function gt(e) {
|
|
1408
1403
|
var t;
|
|
1409
|
-
(t = e[
|
|
1404
|
+
(t = e[Q]) == null || t.destroy(), delete e[Q];
|
|
1410
1405
|
}
|
|
1411
|
-
class
|
|
1406
|
+
class Ao {
|
|
1412
1407
|
constructor(t, n) {
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1408
|
+
O(this, "lastMoveEvt");
|
|
1409
|
+
O(this, "checkInterval");
|
|
1410
|
+
O(this, "shouldShow", !1);
|
|
1411
|
+
O(this, "tipEl");
|
|
1412
|
+
O(this, "titleEl");
|
|
1413
|
+
O(this, "contentEl");
|
|
1414
|
+
O(this, "mouseMoveBound", !1);
|
|
1415
|
+
O(this, "handleMouseMoveWithContext", this.handleMouseMove.bind(this));
|
|
1416
|
+
O(this, "handleTargetMouseEnterWithContext", this.handleTargetMouseEnter.bind(this));
|
|
1417
|
+
O(this, "handleTargetMouseLeaveWithContext", this.handleTargetMouseLeave.bind(this));
|
|
1423
1418
|
this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
1424
1419
|
}
|
|
1425
1420
|
configure(t) {
|
|
@@ -1456,62 +1451,62 @@ class Vo {
|
|
|
1456
1451
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
1457
1452
|
}
|
|
1458
1453
|
}
|
|
1459
|
-
function
|
|
1460
|
-
e.directive("autofocus",
|
|
1454
|
+
function $o(e) {
|
|
1455
|
+
e.directive("autofocus", go), e.directive("confirm-button", wo), e.directive("date-input", bo), e.directive("datetime", To), e.directive("disabled", So), e.directive("duration", Lo), e.directive("hotkey", Io), e.directive("infinite-scroll", Do), e.directive("readonly", Ho), e.directive("tooltip", Vo);
|
|
1461
1456
|
}
|
|
1462
|
-
function
|
|
1463
|
-
|
|
1457
|
+
function ms(e) {
|
|
1458
|
+
$o(e);
|
|
1464
1459
|
}
|
|
1465
1460
|
export {
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1461
|
+
Po as OverlayContainer,
|
|
1462
|
+
ce as UserError,
|
|
1463
|
+
jo as VfAjaxSelect,
|
|
1464
|
+
de as VfAlertModal,
|
|
1465
|
+
as as VfEzSmartSelect,
|
|
1466
|
+
kn as VfModal,
|
|
1467
|
+
Yn as VfSmartSelect,
|
|
1468
|
+
os as cloneProp,
|
|
1469
|
+
Xo as configureVf,
|
|
1470
|
+
is as configureVfOpenApiClient,
|
|
1471
|
+
ds as createFilters,
|
|
1472
|
+
ke as createOverlayInjection,
|
|
1473
|
+
Bn as desnakeCase,
|
|
1474
|
+
fn as dismissOverlayInjectionById,
|
|
1475
|
+
qo as dismissOverlayInjectionByInstance,
|
|
1476
|
+
lt as dismissOverlayInjectionByInternalInstance,
|
|
1477
|
+
dn as dismissOverlayInjectionByVnode,
|
|
1478
|
+
ys as escapeHtml,
|
|
1479
|
+
mn as formatError,
|
|
1480
|
+
Mn as formatNumber,
|
|
1481
|
+
_n as formatPhone,
|
|
1482
|
+
Nn as formatUSCurrency,
|
|
1483
|
+
Go as handleError,
|
|
1484
|
+
Zo as handleErrorAndAlert,
|
|
1485
|
+
ms as installVf,
|
|
1486
|
+
pn as isError,
|
|
1487
|
+
Pe as isNotNullOrUndefined,
|
|
1488
|
+
Jo as maskComponent,
|
|
1489
|
+
hn as maskEl,
|
|
1490
|
+
yn as maskForm,
|
|
1491
|
+
ls as nl2br,
|
|
1492
|
+
ss as nullifyEmptyInputs,
|
|
1493
|
+
Te as presentOverlay,
|
|
1494
|
+
re as removeOverlayInjection,
|
|
1495
|
+
es as replaceElement,
|
|
1496
|
+
vn as showAlert,
|
|
1497
|
+
zo as showConfirm,
|
|
1498
|
+
Ko as showConfirmDestroy,
|
|
1499
|
+
ts as showContextMenu,
|
|
1500
|
+
cs as showToast,
|
|
1501
|
+
Yo as showWait,
|
|
1502
|
+
Sn as sleep,
|
|
1503
|
+
ns as sleepSecs,
|
|
1504
|
+
Ce as toError,
|
|
1505
|
+
Qo as unmaskComponent,
|
|
1506
|
+
rt as unmaskEl,
|
|
1507
|
+
at as unmaskForm,
|
|
1508
|
+
fs as useInfiniteScroll,
|
|
1509
|
+
vs as useResizeWatcher,
|
|
1510
|
+
rs as uuid,
|
|
1511
|
+
us as vfModalRef
|
|
1517
1512
|
};
|