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