@signal24/vue-foundation 4.7.3 → 4.8.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.vue.d.ts +3 -1
- package/dist/src/helpers/openapi.d.ts +2 -52
- package/dist/src/vite-plugins/vite-openapi-plugin.d.ts +0 -3
- package/dist/src/vite-plugins/vite-openapi-plugin.js +2 -99
- package/dist/vue-foundation.es.js +296 -282
- package/package.json +24 -27
- package/src/helpers/openapi.ts +10 -124
- package/src/vite-plugins/vite-openapi-plugin.ts +3 -118
- package/tsconfig.vite-plugins.json +1 -0
- package/dist/src/vite-plugins/vite-openapi-plugin.cli.d.ts +0 -2
- package/dist/src/vite-plugins/vite-openapi-plugin.cli.js +0 -15
- package/src/vite-plugins/vite-openapi-plugin.cli.ts +0 -19
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var Ve = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var v = (e, t, n) => (
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { compact as
|
|
6
|
-
import { escapeHtml as
|
|
7
|
-
import { escapeHtml as
|
|
2
|
+
var Ne = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => (Ne(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent as x, defineProps as Re, defineEmits as Ue, ref as w, computed as F, openBlock as u, createElementBlock as f, createElementVNode as T, toDisplayString as C, withDirectives as K, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as je, withModifiers as te, renderSlot as U, reactive as We, h as W, Teleport as Pe, markRaw as qe, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as ke, createSlots as ze, withCtx as Y, createTextVNode as ce, vModelText as Xe, watch as de, onActivated as Se, onDeactivated as xe } from "vue";
|
|
5
|
+
import { compact as Ye, debounce as Ze, isEqual as Ce, upperFirst as Ge, startCase as Qe, cloneDeep as Je, remove as et } from "lodash";
|
|
6
|
+
import { escapeHtml as tt } from "@vue/shared";
|
|
7
|
+
import { escapeHtml as ri } from "@vue/shared";
|
|
8
8
|
import { format as G } from "date-fns";
|
|
9
|
-
const
|
|
9
|
+
const nt = x({
|
|
10
10
|
setup() {
|
|
11
|
-
const e =
|
|
12
|
-
|
|
13
|
-
const t = w(null), n =
|
|
11
|
+
const e = Re();
|
|
12
|
+
Ue(["update:modelValue"]);
|
|
13
|
+
const t = w(null), n = F(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = w(e.modelValue ?? null);
|
|
14
14
|
return { props: e, options: t, renderOptions: n, selectedItem: i };
|
|
15
15
|
},
|
|
16
16
|
watch: {
|
|
@@ -37,33 +37,33 @@ const tt = C({
|
|
|
37
37
|
for (const [i, s] of t)
|
|
38
38
|
n[i] = s;
|
|
39
39
|
return n;
|
|
40
|
-
},
|
|
40
|
+
}, it = {
|
|
41
41
|
key: 0,
|
|
42
42
|
disabled: ""
|
|
43
|
-
},
|
|
43
|
+
}, st = {
|
|
44
44
|
key: 0,
|
|
45
45
|
value: null
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
return e.renderOptions ?
|
|
46
|
+
}, ot = ["value"];
|
|
47
|
+
function lt(e, t, n, i, s, o) {
|
|
48
|
+
return e.renderOptions ? K((u(), f("select", {
|
|
49
49
|
key: 1,
|
|
50
50
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
|
|
51
51
|
}, [
|
|
52
|
-
e.props.nullText ? (u(), f("option",
|
|
52
|
+
e.props.nullText ? (u(), f("option", st, C(e.props.nullText), 1)) : O("", !0),
|
|
53
53
|
(u(!0), f(j, null, J(e.renderOptions, (r, l) => {
|
|
54
54
|
var c;
|
|
55
55
|
return u(), f("option", {
|
|
56
56
|
key: l,
|
|
57
57
|
value: (c = e.options) == null ? void 0 : c[l]
|
|
58
|
-
},
|
|
58
|
+
}, C(r), 9, ot);
|
|
59
59
|
}), 128))
|
|
60
60
|
], 512)), [
|
|
61
61
|
[Ke, e.selectedItem]
|
|
62
|
-
]) : (u(), f("select",
|
|
63
|
-
|
|
62
|
+
]) : (u(), f("select", it, [
|
|
63
|
+
T("option", null, C(e.props.loadingText || "Loading..."), 1)
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const $n = /* @__PURE__ */ Le(nt, [["render", lt]]), rt = ["onClick"], at = /* @__PURE__ */ x({
|
|
67
67
|
__name: "overlay-anchor",
|
|
68
68
|
props: {
|
|
69
69
|
overlayId: {},
|
|
@@ -104,7 +104,7 @@ const Hn = /* @__PURE__ */ Le(tt, [["render", ot]]), lt = ["onClick"], rt = /* @
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
function c() {
|
|
107
|
-
window.removeEventListener("click", c),
|
|
107
|
+
window.removeEventListener("click", c), ut(t.overlayId);
|
|
108
108
|
}
|
|
109
109
|
return L(() => {
|
|
110
110
|
setTimeout(() => {
|
|
@@ -112,25 +112,25 @@ const Hn = /* @__PURE__ */ Le(tt, [["render", ot]]), lt = ["onClick"], rt = /* @
|
|
|
112
112
|
}, 10);
|
|
113
113
|
}), (h, b) => (u(), f("div", {
|
|
114
114
|
class: k(["vf-overlay-anchor", s.value]),
|
|
115
|
-
style:
|
|
115
|
+
style: je(i.value),
|
|
116
116
|
onClick: te(c, ["stop"])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
119
|
-
], 14,
|
|
118
|
+
U(h.$slots, "default")
|
|
119
|
+
], 14, rt));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
let
|
|
123
|
-
const S =
|
|
122
|
+
let ct = 0;
|
|
123
|
+
const S = We([]), An = x({
|
|
124
124
|
setup() {
|
|
125
125
|
return () => W("div", [
|
|
126
|
-
J(S, (e) => W(
|
|
126
|
+
J(S, (e) => W(Pe, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
127
127
|
]);
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
function ie(e, t, n) {
|
|
131
131
|
const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
132
132
|
i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
|
|
133
|
-
const s = String(++
|
|
133
|
+
const s = String(++ct), o = qe(e), r = W(o, t), l = n != null && n.anchor ? W(at, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, c = {
|
|
134
134
|
id: s,
|
|
135
135
|
component: o,
|
|
136
136
|
props: t,
|
|
@@ -140,19 +140,19 @@ function ie(e, t, n) {
|
|
|
140
140
|
};
|
|
141
141
|
return S.push(c), c;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Bn(e) {
|
|
144
144
|
Me(e.$);
|
|
145
145
|
}
|
|
146
146
|
function Me(e) {
|
|
147
147
|
let t = e;
|
|
148
|
-
for (; t && !
|
|
148
|
+
for (; t && !dt(t.vnode); )
|
|
149
149
|
t = t.parent;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function dt(e) {
|
|
152
152
|
const t = S.findIndex((n) => n.vnode.component === e.component);
|
|
153
153
|
return t >= 0 ? (S[t].props.callback(), !0) : !1;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ut(e) {
|
|
156
156
|
const t = S.findIndex((n) => n.id === e);
|
|
157
157
|
return t >= 0 ? (S[t].props.callback(), !0) : !1;
|
|
158
158
|
}
|
|
@@ -172,23 +172,23 @@ async function se(e, t, n) {
|
|
|
172
172
|
function q(e, t) {
|
|
173
173
|
return { title: t ? e : void 0, message: t ?? e };
|
|
174
174
|
}
|
|
175
|
-
async function
|
|
175
|
+
async function ue(e, t) {
|
|
176
176
|
await se(X, q(e, t));
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function Fn(e, t) {
|
|
179
179
|
return await se(X, {
|
|
180
180
|
...q(e, t),
|
|
181
181
|
shouldConfirm: !0
|
|
182
182
|
}) === !0;
|
|
183
183
|
}
|
|
184
|
-
async function
|
|
184
|
+
async function Vn(e, t) {
|
|
185
185
|
return await se(X, {
|
|
186
186
|
...q(e, t),
|
|
187
187
|
shouldConfirm: !0,
|
|
188
188
|
classes: ["destructive"]
|
|
189
189
|
}) === !0;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Nn(e, t) {
|
|
192
192
|
const n = ie(X, {
|
|
193
193
|
...q(e, t),
|
|
194
194
|
isBare: !0,
|
|
@@ -203,7 +203,7 @@ const N = {
|
|
|
203
203
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
204
204
|
defaultDateTimeFormat: "MM/dd/yy HH:mm"
|
|
205
205
|
};
|
|
206
|
-
function
|
|
206
|
+
function Rn(e) {
|
|
207
207
|
Object.assign(N, e);
|
|
208
208
|
}
|
|
209
209
|
class z extends Error {
|
|
@@ -211,7 +211,7 @@ class z extends Error {
|
|
|
211
211
|
super(t), this.name = "UserError";
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function ht(e) {
|
|
215
215
|
return e instanceof z ? e.message : `An application error has occurred:
|
|
216
216
|
|
|
217
217
|
${oe(e).message}
|
|
@@ -221,24 +221,24 @@ Please refresh the page and try again. If this error persists, ${N.unhandledErro
|
|
|
221
221
|
function oe(e) {
|
|
222
222
|
return e instanceof Error ? e : new Error(String(e));
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
224
|
+
async function Un(e, t) {
|
|
225
225
|
const n = oe(e);
|
|
226
|
-
return n instanceof z || N.errorHandler(n), t ?
|
|
226
|
+
return n instanceof z || N.errorHandler(n), t ? ue(t, n) : ue(n);
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
228
|
+
async function Kn(e) {
|
|
229
229
|
const t = oe(e);
|
|
230
230
|
t instanceof z || N.errorHandler(t);
|
|
231
231
|
}
|
|
232
232
|
const $ = Symbol("MaskState");
|
|
233
|
-
function
|
|
233
|
+
function jn(e, t) {
|
|
234
234
|
const n = e.$.vnode.el, i = n.closest(".vf-modal");
|
|
235
|
-
return
|
|
235
|
+
return ft(i ?? n, t);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Wn(e) {
|
|
238
238
|
const t = e.$.vnode.el, n = t.closest(".vf-modal");
|
|
239
239
|
return Ie(n ?? t);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function ft(e, t) {
|
|
242
242
|
if (!e[$]) {
|
|
243
243
|
const n = document.createElement("div");
|
|
244
244
|
n.classList.add("vf-mask"), e.appendChild(n), e[$] = { maskEl: n };
|
|
@@ -249,7 +249,7 @@ function Ie(e) {
|
|
|
249
249
|
e[$] && e.removeChild(e[$].maskEl);
|
|
250
250
|
}
|
|
251
251
|
const Q = Symbol("FormMaskState");
|
|
252
|
-
function
|
|
252
|
+
function pt(e, t, n) {
|
|
253
253
|
const i = e instanceof Element ? e : _e(e);
|
|
254
254
|
i.classList.add("vf-masked");
|
|
255
255
|
const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
|
|
@@ -270,13 +270,13 @@ function _e(e) {
|
|
|
270
270
|
const t = e.$.vnode.el;
|
|
271
271
|
return t.tagName === "FORM" ? t : t.querySelector("form");
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const mt = ["id"], vt = {
|
|
274
274
|
key: 0,
|
|
275
275
|
class: "vf-modal-header"
|
|
276
|
-
},
|
|
276
|
+
}, yt = { class: "vf-modal-content" }, gt = {
|
|
277
277
|
key: 1,
|
|
278
278
|
class: "vf-modal-footer"
|
|
279
|
-
},
|
|
279
|
+
}, bt = /* @__PURE__ */ x({
|
|
280
280
|
__name: "modal",
|
|
281
281
|
props: {
|
|
282
282
|
id: {},
|
|
@@ -289,7 +289,7 @@ const pt = ["id"], mt = {
|
|
|
289
289
|
setup(e, { expose: t }) {
|
|
290
290
|
const n = e, i = ee();
|
|
291
291
|
t({ mask: m, unmask: y, hide: p, unhide: a });
|
|
292
|
-
const s = w(), o = w(), r = w(!1), l =
|
|
292
|
+
const s = w(), o = w(), r = w(!1), l = F(() => Ye([n.class, r.value && "hidden"]));
|
|
293
293
|
L(() => {
|
|
294
294
|
var d;
|
|
295
295
|
document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", h), (d = s.value) == null || d.addEventListener("click", c));
|
|
@@ -309,7 +309,7 @@ const pt = ["id"], mt = {
|
|
|
309
309
|
Me(i);
|
|
310
310
|
}
|
|
311
311
|
function m() {
|
|
312
|
-
|
|
312
|
+
pt(o.value);
|
|
313
313
|
}
|
|
314
314
|
function y() {
|
|
315
315
|
He(o.value);
|
|
@@ -326,32 +326,32 @@ const pt = ["id"], mt = {
|
|
|
326
326
|
ref_key: "overlay",
|
|
327
327
|
ref: s
|
|
328
328
|
}, [
|
|
329
|
-
|
|
329
|
+
T("form", {
|
|
330
330
|
action: ".",
|
|
331
331
|
class: k(["vf-modal", { scrolls: d.scrolls }]),
|
|
332
332
|
onSubmit: E[0] || (E[0] = te((M) => d.$emit("formSubmit"), ["prevent"])),
|
|
333
333
|
ref_key: "form",
|
|
334
334
|
ref: o
|
|
335
335
|
}, [
|
|
336
|
-
d.$slots.header ? (u(), f("div",
|
|
337
|
-
|
|
336
|
+
d.$slots.header ? (u(), f("div", vt, [
|
|
337
|
+
U(d.$slots, "header"),
|
|
338
338
|
n.closeX ? (u(), f("i", {
|
|
339
339
|
key: 0,
|
|
340
340
|
class: "close",
|
|
341
341
|
onClick: b
|
|
342
|
-
})) :
|
|
343
|
-
])) :
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
})) : O("", !0)
|
|
343
|
+
])) : O("", !0),
|
|
344
|
+
T("div", yt, [
|
|
345
|
+
U(d.$slots, "default")
|
|
346
346
|
]),
|
|
347
|
-
d.$slots.footer ? (u(), f("div",
|
|
348
|
-
|
|
349
|
-
])) :
|
|
347
|
+
d.$slots.footer ? (u(), f("div", gt, [
|
|
348
|
+
U(d.$slots, "footer")
|
|
349
|
+
])) : O("", !0)
|
|
350
350
|
], 34)
|
|
351
|
-
], 10,
|
|
351
|
+
], 10, mt));
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
-
const
|
|
354
|
+
const Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
|
|
355
355
|
__name: "alert-modal",
|
|
356
356
|
props: {
|
|
357
357
|
isBare: { type: Boolean },
|
|
@@ -363,28 +363,28 @@ const bt = ["innerHtml"], Et = ["innerText"], X = /* @__PURE__ */ C({
|
|
|
363
363
|
callback: { type: Function }
|
|
364
364
|
},
|
|
365
365
|
setup(e) {
|
|
366
|
-
const t = e, n =
|
|
366
|
+
const t = e, n = F(() => t.message instanceof Error ? ht(t.message) : t.message);
|
|
367
367
|
return (i, s) => {
|
|
368
|
-
const o =
|
|
369
|
-
return u(), ke(
|
|
368
|
+
const o = Oe("autofocus");
|
|
369
|
+
return u(), ke(bt, {
|
|
370
370
|
class: k(["vf-alert", i.classes])
|
|
371
|
-
},
|
|
371
|
+
}, ze({
|
|
372
372
|
default: Y(() => [
|
|
373
373
|
i.isHtml ? (u(), f("div", {
|
|
374
374
|
key: 0,
|
|
375
375
|
innerHtml: i.message,
|
|
376
376
|
class: "user-message"
|
|
377
|
-
}, null, 8,
|
|
377
|
+
}, null, 8, Et)) : (u(), f("div", {
|
|
378
378
|
key: 1,
|
|
379
379
|
innerText: n.value
|
|
380
|
-
}, null, 8,
|
|
380
|
+
}, null, 8, Tt))
|
|
381
381
|
]),
|
|
382
382
|
_: 2
|
|
383
383
|
}, [
|
|
384
384
|
i.title ? {
|
|
385
385
|
name: "header",
|
|
386
386
|
fn: Y(() => [
|
|
387
|
-
|
|
387
|
+
T("h1", null, C(i.title), 1)
|
|
388
388
|
]),
|
|
389
389
|
key: "0"
|
|
390
390
|
} : void 0,
|
|
@@ -392,24 +392,24 @@ const bt = ["innerHtml"], Et = ["innerText"], X = /* @__PURE__ */ C({
|
|
|
392
392
|
name: "footer",
|
|
393
393
|
fn: Y(() => [
|
|
394
394
|
i.shouldConfirm ? (u(), f(j, { key: 0 }, [
|
|
395
|
-
|
|
395
|
+
K((u(), f("button", {
|
|
396
396
|
class: "primary",
|
|
397
397
|
onClick: s[0] || (s[0] = () => i.callback(!0))
|
|
398
398
|
}, [
|
|
399
|
-
|
|
399
|
+
ce("Confirm")
|
|
400
400
|
])), [
|
|
401
401
|
[o]
|
|
402
402
|
]),
|
|
403
|
-
|
|
403
|
+
T("button", {
|
|
404
404
|
class: "default",
|
|
405
405
|
onClick: s[1] || (s[1] = () => i.callback(!1))
|
|
406
406
|
}, "Cancel")
|
|
407
|
-
], 64)) :
|
|
407
|
+
], 64)) : K((u(), f("button", {
|
|
408
408
|
key: 1,
|
|
409
409
|
class: "default",
|
|
410
410
|
onClick: s[2] || (s[2] = () => i.callback(!0))
|
|
411
411
|
}, [
|
|
412
|
-
|
|
412
|
+
ce("OK")
|
|
413
413
|
])), [
|
|
414
414
|
[o]
|
|
415
415
|
])
|
|
@@ -421,51 +421,51 @@ const bt = ["innerHtml"], Et = ["innerText"], X = /* @__PURE__ */ C({
|
|
|
421
421
|
}
|
|
422
422
|
});
|
|
423
423
|
let R;
|
|
424
|
-
const
|
|
425
|
-
function
|
|
424
|
+
const wt = new Uint8Array(16);
|
|
425
|
+
function Ot() {
|
|
426
426
|
if (!R && (R = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))
|
|
427
427
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
428
|
-
return R(
|
|
428
|
+
return R(wt);
|
|
429
429
|
}
|
|
430
430
|
const g = [];
|
|
431
431
|
for (let e = 0; e < 256; ++e)
|
|
432
432
|
g.push((e + 256).toString(16).slice(1));
|
|
433
|
-
function
|
|
434
|
-
return
|
|
433
|
+
function kt(e, t = 0) {
|
|
434
|
+
return g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]];
|
|
435
435
|
}
|
|
436
|
-
const
|
|
437
|
-
randomUUID:
|
|
436
|
+
const St = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), he = {
|
|
437
|
+
randomUUID: St
|
|
438
438
|
};
|
|
439
|
-
function
|
|
440
|
-
if (
|
|
441
|
-
return
|
|
439
|
+
function xt(e, t, n) {
|
|
440
|
+
if (he.randomUUID && !t && !e)
|
|
441
|
+
return he.randomUUID();
|
|
442
442
|
e = e || {};
|
|
443
|
-
const i = e.random || (e.rng ||
|
|
443
|
+
const i = e.random || (e.rng || Ot)();
|
|
444
444
|
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
|
445
445
|
n = n || 0;
|
|
446
446
|
for (let s = 0; s < 16; ++s)
|
|
447
447
|
t[n + s] = i[s];
|
|
448
448
|
return t;
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return kt(i);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Pn(e) {
|
|
453
453
|
return e.replace(/\n/g, "<br>");
|
|
454
454
|
}
|
|
455
455
|
function Ct(e) {
|
|
456
456
|
return e.replace(/_/g, " ");
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Lt(e) {
|
|
459
459
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
460
460
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Mt(e) {
|
|
463
463
|
return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return
|
|
465
|
+
function qn() {
|
|
466
|
+
return xt();
|
|
467
467
|
}
|
|
468
|
-
const H = Symbol("null"),
|
|
468
|
+
const H = Symbol("null"), fe = Symbol("create"), It = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Ht = {
|
|
469
469
|
props: {
|
|
470
470
|
modelValue: {
|
|
471
471
|
type: null,
|
|
@@ -562,7 +562,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
562
562
|
const t = this.searchText.trim().toLowerCase();
|
|
563
563
|
if (t.length) {
|
|
564
564
|
e = e.filter((s) => s.searchContent.includes(t));
|
|
565
|
-
const n =
|
|
565
|
+
const n = tt(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
|
|
566
566
|
e = e.map((s) => {
|
|
567
567
|
var o;
|
|
568
568
|
return {
|
|
@@ -571,7 +571,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
571
571
|
subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
|
|
572
572
|
};
|
|
573
573
|
}), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
|
|
574
|
-
key:
|
|
574
|
+
key: fe,
|
|
575
575
|
title: "Create <strong>" + this.searchText.trim() + "</strong>..."
|
|
576
576
|
}));
|
|
577
577
|
}
|
|
@@ -612,7 +612,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
612
612
|
"update:modelValue",
|
|
613
613
|
this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
|
|
614
614
|
);
|
|
615
|
-
}), this.remoteSearch && this.$watch("searchText",
|
|
615
|
+
}), this.remoteSearch && this.$watch("searchText", Ze(this.reloadOptionsIfSearching, 250));
|
|
616
616
|
},
|
|
617
617
|
methods: {
|
|
618
618
|
async loadRemoteOptions() {
|
|
@@ -652,7 +652,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
652
652
|
this.searchText.length > 1 && (this.isSearching = !0);
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
|
-
!e.metaKey &&
|
|
655
|
+
!e.metaKey && It.includes(e.key) && (this.isSearching = !0);
|
|
656
656
|
}
|
|
657
657
|
},
|
|
658
658
|
handleInputFocused() {
|
|
@@ -670,7 +670,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
670
670
|
const t = this.effectiveOptions.find((i) => i.ref === e);
|
|
671
671
|
if (t)
|
|
672
672
|
return t;
|
|
673
|
-
const n = this.effectiveOptions.find((i) =>
|
|
673
|
+
const n = this.effectiveOptions.find((i) => Ce(i.ref, e));
|
|
674
674
|
return n || null;
|
|
675
675
|
},
|
|
676
676
|
handleInputBlurred() {
|
|
@@ -711,7 +711,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
711
711
|
var t;
|
|
712
712
|
if (this.isSearching = !1, e.key == H)
|
|
713
713
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
|
|
714
|
-
else if (e.key ===
|
|
714
|
+
else if (e.key === fe) {
|
|
715
715
|
const n = this.searchText.trim();
|
|
716
716
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, (t = this.onCreateItem) == null || t.call(this, n);
|
|
717
717
|
} else {
|
|
@@ -728,23 +728,23 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
};
|
|
731
|
-
const
|
|
731
|
+
const _t = ["placeholder", "required"], Dt = {
|
|
732
732
|
key: 0,
|
|
733
733
|
ref: "optionsContainer",
|
|
734
734
|
class: "vf-smart-select-options"
|
|
735
|
-
},
|
|
735
|
+
}, $t = {
|
|
736
736
|
key: 0,
|
|
737
737
|
class: "no-results"
|
|
738
|
-
},
|
|
738
|
+
}, At = ["onMousemove", "onMousedown"], Bt = ["innerHTML"], Ft = ["innerHTML"], Vt = {
|
|
739
739
|
key: 0,
|
|
740
740
|
class: "no-results"
|
|
741
741
|
};
|
|
742
|
-
function
|
|
743
|
-
const r =
|
|
742
|
+
function Nt(e, t, n, i, s, o) {
|
|
743
|
+
const r = Oe("disabled");
|
|
744
744
|
return u(), f("div", {
|
|
745
745
|
class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
|
|
746
746
|
}, [
|
|
747
|
-
|
|
747
|
+
K(T("input", {
|
|
748
748
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
|
|
749
749
|
ref: "searchField",
|
|
750
750
|
type: "text",
|
|
@@ -754,11 +754,11 @@ function Ft(e, t, n, i, s, o) {
|
|
|
754
754
|
onFocus: t[2] || (t[2] = (...l) => o.handleInputFocused && o.handleInputFocused(...l)),
|
|
755
755
|
onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l)),
|
|
756
756
|
required: n.required
|
|
757
|
-
}, null, 42,
|
|
758
|
-
[
|
|
757
|
+
}, null, 42, _t), [
|
|
758
|
+
[Xe, e.searchText],
|
|
759
759
|
[r, o.effectiveDisabled]
|
|
760
760
|
]),
|
|
761
|
-
e.shouldDisplayOptions ? (u(), f("div",
|
|
761
|
+
e.shouldDisplayOptions ? (u(), f("div", Dt, [
|
|
762
762
|
e.isLoaded ? (u(), f(j, { key: 1 }, [
|
|
763
763
|
(u(!0), f(j, null, J(o.effectiveOptions, (l) => (u(), f("div", {
|
|
764
764
|
key: String(l.key),
|
|
@@ -768,22 +768,22 @@ function Ft(e, t, n, i, s, o) {
|
|
|
768
768
|
onMousemove: (c) => o.handleOptionHover(l),
|
|
769
769
|
onMousedown: (c) => o.selectOption(l)
|
|
770
770
|
}, [
|
|
771
|
-
|
|
771
|
+
T("div", {
|
|
772
772
|
class: "title",
|
|
773
773
|
innerHTML: l.title
|
|
774
|
-
}, null, 8,
|
|
774
|
+
}, null, 8, Bt),
|
|
775
775
|
l.subtitle ? (u(), f("div", {
|
|
776
776
|
key: 0,
|
|
777
777
|
class: "subtitle",
|
|
778
778
|
innerHTML: l.subtitle
|
|
779
|
-
}, null, 8,
|
|
780
|
-
], 42,
|
|
781
|
-
!o.effectiveOptions.length && e.searchText ? (u(), f("div", Vt,
|
|
782
|
-
], 64)) : (u(), f("div",
|
|
783
|
-
], 512)) :
|
|
779
|
+
}, null, 8, Ft)) : O("", !0)
|
|
780
|
+
], 42, At))), 128)),
|
|
781
|
+
!o.effectiveOptions.length && e.searchText ? (u(), f("div", Vt, C(o.effectiveNoResultsText), 1)) : O("", !0)
|
|
782
|
+
], 64)) : (u(), f("div", $t, "Loading..."))
|
|
783
|
+
], 512)) : O("", !0)
|
|
784
784
|
], 2);
|
|
785
785
|
}
|
|
786
|
-
const
|
|
786
|
+
const Rt = /* @__PURE__ */ Le(Ht, [["render", Nt]]), zn = /* @__PURE__ */ x({
|
|
787
787
|
__name: "ez-smart-select",
|
|
788
788
|
props: {
|
|
789
789
|
modelValue: {},
|
|
@@ -794,22 +794,22 @@ const Nt = /* @__PURE__ */ Le(It, [["render", Ft]]), Wn = /* @__PURE__ */ C({
|
|
|
794
794
|
},
|
|
795
795
|
emits: ["update:modelValue"],
|
|
796
796
|
setup(e, { emit: t }) {
|
|
797
|
-
const n = e, i =
|
|
797
|
+
const n = e, i = F(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
|
|
798
798
|
value: r,
|
|
799
799
|
label: l
|
|
800
|
-
}))), s =
|
|
800
|
+
}))), s = F(() => n.formatter ? (r) => {
|
|
801
801
|
var l;
|
|
802
802
|
return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
|
|
803
803
|
} : (r) => r.label), o = w(i.value.find((r) => r.value === n.modelValue) ?? null);
|
|
804
|
-
return
|
|
804
|
+
return de(
|
|
805
805
|
() => n.modelValue,
|
|
806
806
|
(r) => {
|
|
807
807
|
o.value = i.value.find((l) => l.value === r) ?? null;
|
|
808
808
|
}
|
|
809
|
-
),
|
|
809
|
+
), de(o, (r) => {
|
|
810
810
|
var l;
|
|
811
|
-
t("update:modelValue", r ? ((l = i.value.find((c) =>
|
|
812
|
-
}), (r, l) => (u(), ke(
|
|
811
|
+
t("update:modelValue", r ? ((l = i.value.find((c) => Ce(c, r))) == null ? void 0 : l.value) ?? null : null);
|
|
812
|
+
}), (r, l) => (u(), ke(Rt, {
|
|
813
813
|
modelValue: o.value,
|
|
814
814
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
|
|
815
815
|
options: i.value,
|
|
@@ -817,13 +817,13 @@ const Nt = /* @__PURE__ */ Le(It, [["render", Ft]]), Wn = /* @__PURE__ */ C({
|
|
|
817
817
|
"null-title": r.nullTitle
|
|
818
818
|
}, null, 8, ["modelValue", "options", "formatter", "null-title"]));
|
|
819
819
|
}
|
|
820
|
-
}),
|
|
820
|
+
}), Ut = ["onClick"], Kt = { class: "content" }, jt = { class: "message" }, Wt = {
|
|
821
821
|
key: 0,
|
|
822
822
|
class: "close"
|
|
823
|
-
},
|
|
823
|
+
}, Pt = {
|
|
824
824
|
key: 0,
|
|
825
825
|
class: "progress-bar"
|
|
826
|
-
},
|
|
826
|
+
}, qt = /* @__PURE__ */ x({
|
|
827
827
|
__name: "toast",
|
|
828
828
|
props: {
|
|
829
829
|
message: {},
|
|
@@ -850,78 +850,78 @@ const Nt = /* @__PURE__ */ Le(It, [["render", Ft]]), Wn = /* @__PURE__ */ C({
|
|
|
850
850
|
class: k(["vf-toast", s.className]),
|
|
851
851
|
onClick: te(n, ["stop"])
|
|
852
852
|
}, [
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
s.disableClose ?
|
|
853
|
+
T("div", Kt, [
|
|
854
|
+
T("div", jt, C(s.message), 1),
|
|
855
|
+
s.disableClose ? O("", !0) : (u(), f("div", Wt, "x"))
|
|
856
856
|
]),
|
|
857
|
-
s.durationSecs !== null ? (u(), f("div",
|
|
858
|
-
|
|
857
|
+
s.durationSecs !== null ? (u(), f("div", Pt, [
|
|
858
|
+
T("div", {
|
|
859
859
|
ref_key: "progressInnerEl",
|
|
860
860
|
ref: i,
|
|
861
861
|
class: "inner"
|
|
862
862
|
}, null, 512)
|
|
863
|
-
])) :
|
|
864
|
-
], 10,
|
|
863
|
+
])) : O("", !0)
|
|
864
|
+
], 10, Ut));
|
|
865
865
|
}
|
|
866
866
|
});
|
|
867
|
-
function
|
|
868
|
-
const t = ie(
|
|
867
|
+
function Xn(e) {
|
|
868
|
+
const t = ie(qt, {
|
|
869
869
|
...e,
|
|
870
870
|
callback: () => P(t)
|
|
871
871
|
});
|
|
872
872
|
return () => P(t);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function zt(e) {
|
|
875
875
|
const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), s = ["B", "KB", "MB", "GB", "TB"][t];
|
|
876
876
|
return `${i} ${s}`;
|
|
877
877
|
}
|
|
878
|
-
function zt(e) {
|
|
879
|
-
return e != null && String(e).length ? e : "-";
|
|
880
|
-
}
|
|
881
878
|
function Xt(e) {
|
|
882
|
-
return e
|
|
879
|
+
return e != null && String(e).length ? e : "-";
|
|
883
880
|
}
|
|
884
881
|
function Yt(e) {
|
|
885
|
-
return e
|
|
882
|
+
return e || "-";
|
|
886
883
|
}
|
|
887
884
|
function Zt(e) {
|
|
888
|
-
return e &&
|
|
885
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : on(Number(e));
|
|
889
886
|
}
|
|
890
887
|
function Gt(e) {
|
|
891
|
-
return e
|
|
888
|
+
return e && Lt(e);
|
|
892
889
|
}
|
|
893
890
|
function Qt(e) {
|
|
894
891
|
return e ? Ge(e) : null;
|
|
895
892
|
}
|
|
896
893
|
function Jt(e) {
|
|
897
|
-
return e ? e
|
|
894
|
+
return e ? Qe(e) : null;
|
|
898
895
|
}
|
|
899
896
|
function en(e) {
|
|
900
|
-
return e ?
|
|
897
|
+
return e ? e.toUpperCase() : null;
|
|
901
898
|
}
|
|
902
899
|
function tn(e) {
|
|
903
|
-
return
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
900
|
+
return e ? Ct(e) : null;
|
|
901
|
+
}
|
|
902
|
+
function nn(e) {
|
|
903
|
+
return Mt(e);
|
|
904
|
+
}
|
|
905
|
+
const pe = {
|
|
906
|
+
bytes: zt,
|
|
907
|
+
dash: Xt,
|
|
908
|
+
dashZeros: Yt,
|
|
909
|
+
number: Zt,
|
|
910
|
+
phone: Gt,
|
|
911
|
+
upperFirst: Qt,
|
|
912
|
+
startCase: Jt,
|
|
913
|
+
upperCase: en,
|
|
914
|
+
desnake: tn,
|
|
915
|
+
usCurrency: nn
|
|
916
|
+
}, Yn = (e) => ({
|
|
917
|
+
...pe,
|
|
918
|
+
...e(pe)
|
|
919
919
|
});
|
|
920
|
-
function
|
|
920
|
+
function Zn(e, t, n) {
|
|
921
921
|
const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
922
922
|
return i === -1 ? !1 : (e.splice(i, 1, n), !0);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function Gn(e, t) {
|
|
925
925
|
const n = document.createElement("div");
|
|
926
926
|
n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
|
|
927
927
|
const i = document.createElement("div");
|
|
@@ -954,33 +954,28 @@ function Xn(e, t) {
|
|
|
954
954
|
a.addEventListener("mouseleave", M), p.stopPropagation();
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
const
|
|
958
|
-
function
|
|
957
|
+
const sn = (e) => new Promise((t) => setTimeout(t, e)), Qn = (e) => sn(e * 1e3);
|
|
958
|
+
function on(e) {
|
|
959
959
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
return e != null ?
|
|
961
|
+
function Jn(e, t) {
|
|
962
|
+
return e != null ? Je(e) : t;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function ei(e, t) {
|
|
965
965
|
const n = { ...e };
|
|
966
966
|
for (const i of t)
|
|
967
967
|
n[i] === "" && (n[i] = null);
|
|
968
968
|
return n;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function De(e) {
|
|
971
971
|
return e instanceof Error && "status" in e && "body" in e;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function ln({ apiClient: e, wrapper: t, onRequest: n, onError: i, afterRequest: s, CancelablePromise: o }) {
|
|
974
974
|
const r = e.request.request.bind(e.request), l = t ?? ((c, h) => h(c));
|
|
975
|
-
e.request.request = (c) => l(c, (h) => (h =
|
|
975
|
+
e.request.request = (c) => l(c, (h) => (h = cn(h), n && (h = n(h)), new o((b, m, y) => {
|
|
976
976
|
const p = r(h);
|
|
977
977
|
y(p.cancel), p.then(b).catch((a) => {
|
|
978
|
-
if (
|
|
979
|
-
if (a.status === 422)
|
|
980
|
-
return m(new z(a.body.error));
|
|
981
|
-
a.message = `${a.body.error} (${a.status})`;
|
|
982
|
-
}
|
|
983
|
-
if (i) {
|
|
978
|
+
if (De(a) && typeof a.body == "object" && "error" in a.body && (a.message = `${a.body.error} (${a.status})`), i) {
|
|
984
979
|
const d = i(a, h);
|
|
985
980
|
if (d === null)
|
|
986
981
|
return;
|
|
@@ -991,60 +986,81 @@ function Qn({ apiClient: e, wrapper: t, onRequest: n, onError: i, afterRequest:
|
|
|
991
986
|
}).finally(() => s == null ? void 0 : s(h));
|
|
992
987
|
})));
|
|
993
988
|
}
|
|
994
|
-
class
|
|
995
|
-
constructor(
|
|
989
|
+
class le {
|
|
990
|
+
constructor() {
|
|
996
991
|
v(this, "validator", null);
|
|
997
992
|
v(this, "lastModifiedDate", null);
|
|
998
993
|
v(this, "size", 0);
|
|
999
994
|
v(this, "path", "");
|
|
1000
995
|
v(this, "name", "");
|
|
1001
996
|
v(this, "type", "");
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
class rn extends le {
|
|
1000
|
+
constructor(n) {
|
|
1001
|
+
super();
|
|
1002
1002
|
v(this, "blob");
|
|
1003
|
-
this.blob =
|
|
1003
|
+
this.blob = n;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
class an extends le {
|
|
1007
|
+
constructor(n) {
|
|
1008
|
+
super();
|
|
1009
|
+
v(this, "uri");
|
|
1010
|
+
this.uri = n.uri, this.name = n.name ?? void 0, this.type = n.type ?? void 0;
|
|
1004
1011
|
}
|
|
1005
1012
|
}
|
|
1006
|
-
function
|
|
1007
|
-
if (
|
|
1013
|
+
function cn(e) {
|
|
1014
|
+
if (typeof e.body != "object" || !Object.values(e.body).some((s) => s instanceof le))
|
|
1008
1015
|
return e;
|
|
1009
|
-
const n =
|
|
1016
|
+
const n = new FormData(), i = {};
|
|
1010
1017
|
for (const [s, o] of Object.entries(e.body))
|
|
1011
|
-
o instanceof
|
|
1012
|
-
return n._payload
|
|
1018
|
+
o instanceof an ? n.append(s, o) : o instanceof rn ? n.append(s, o.blob) : i[s] = o;
|
|
1019
|
+
return n.append("_payload", JSON.stringify(i)), {
|
|
1013
1020
|
...e,
|
|
1014
|
-
|
|
1015
|
-
|
|
1021
|
+
mediaType: void 0,
|
|
1022
|
+
body: n
|
|
1016
1023
|
};
|
|
1017
1024
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1025
|
+
function ti(e) {
|
|
1026
|
+
ln({
|
|
1027
|
+
...e,
|
|
1028
|
+
onError(t, n) {
|
|
1029
|
+
var i;
|
|
1030
|
+
De(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new z(t.body.error)), (i = e.onError) == null || i.call(e, t, n);
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
const re = Symbol("HookState");
|
|
1035
|
+
function ni(e, t) {
|
|
1020
1036
|
const n = t ?? ee();
|
|
1021
|
-
L(() =>
|
|
1037
|
+
L(() => dn(n, e), n), Se(() => un(n), n), xe(() => me(n), n), ne(() => me(n), n);
|
|
1022
1038
|
}
|
|
1023
|
-
function
|
|
1039
|
+
function dn(e, t) {
|
|
1024
1040
|
const n = {};
|
|
1025
1041
|
if (t.elScrolledToBottom && (n.el = new A(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1026
|
-
const i =
|
|
1042
|
+
const i = $e(e.vnode.el);
|
|
1027
1043
|
i ? n.ancestor = new A(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
1028
1044
|
}
|
|
1029
|
-
t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[
|
|
1045
|
+
t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[re] = n;
|
|
1030
1046
|
}
|
|
1031
|
-
function
|
|
1047
|
+
function un(e) {
|
|
1032
1048
|
var n, i, s;
|
|
1033
|
-
const t = e[
|
|
1049
|
+
const t = e[re];
|
|
1034
1050
|
(n = t == null ? void 0 : t.el) == null || n.install(), (i = t == null ? void 0 : t.ancestor) == null || i.install(), (s = t == null ? void 0 : t.window) == null || s.install();
|
|
1035
1051
|
}
|
|
1036
1052
|
function me(e) {
|
|
1037
1053
|
var n, i, s;
|
|
1038
|
-
const t = e[
|
|
1054
|
+
const t = e[re];
|
|
1039
1055
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (i = t == null ? void 0 : t.ancestor) == null || i.uninstall(), (s = t == null ? void 0 : t.window) == null || s.uninstall();
|
|
1040
1056
|
}
|
|
1041
1057
|
const Z = ["auto", "scroll"];
|
|
1042
|
-
function
|
|
1058
|
+
function $e(e) {
|
|
1043
1059
|
const t = e.parentElement;
|
|
1044
1060
|
if (!t)
|
|
1045
1061
|
return null;
|
|
1046
1062
|
const n = window.getComputedStyle(t);
|
|
1047
|
-
return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t :
|
|
1063
|
+
return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : $e(t);
|
|
1048
1064
|
}
|
|
1049
1065
|
class A {
|
|
1050
1066
|
constructor(t, n) {
|
|
@@ -1062,10 +1078,10 @@ class A {
|
|
|
1062
1078
|
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);
|
|
1063
1079
|
}
|
|
1064
1080
|
}
|
|
1065
|
-
function
|
|
1066
|
-
L(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)),
|
|
1081
|
+
function ii(e) {
|
|
1082
|
+
L(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
|
|
1067
1083
|
}
|
|
1068
|
-
const
|
|
1084
|
+
const hn = {
|
|
1069
1085
|
mounted: ye,
|
|
1070
1086
|
updated: ye
|
|
1071
1087
|
}, ve = Symbol("HasAutoFocused");
|
|
@@ -1076,10 +1092,10 @@ function ye(e, t) {
|
|
|
1076
1092
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1077
1093
|
setTimeout(() => n.focus(), 10);
|
|
1078
1094
|
}
|
|
1079
|
-
const
|
|
1080
|
-
mounted:
|
|
1095
|
+
const fn = {
|
|
1096
|
+
mounted: pn
|
|
1081
1097
|
}, _ = Symbol("ConfirmState");
|
|
1082
|
-
function
|
|
1098
|
+
function pn(e) {
|
|
1083
1099
|
e.addEventListener("click", (t) => {
|
|
1084
1100
|
const n = Date.now();
|
|
1085
1101
|
if (e[_]) {
|
|
@@ -1099,10 +1115,10 @@ function un(e) {
|
|
|
1099
1115
|
e[_] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
|
|
1100
1116
|
});
|
|
1101
1117
|
}
|
|
1102
|
-
const
|
|
1103
|
-
beforeMount:
|
|
1118
|
+
const mn = {
|
|
1119
|
+
beforeMount: vn
|
|
1104
1120
|
};
|
|
1105
|
-
function
|
|
1121
|
+
function vn(e) {
|
|
1106
1122
|
e.addEventListener("blur", () => {
|
|
1107
1123
|
let t = e.value;
|
|
1108
1124
|
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + G(/* @__PURE__ */ new Date(), "yy"));
|
|
@@ -1110,14 +1126,14 @@ function fn(e) {
|
|
|
1110
1126
|
isNaN(n) ? e.value = "" : e.value = G(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1111
1127
|
});
|
|
1112
1128
|
}
|
|
1113
|
-
const
|
|
1129
|
+
const yn = {
|
|
1114
1130
|
beforeMount: ge,
|
|
1115
1131
|
updated: ge
|
|
1116
1132
|
};
|
|
1117
1133
|
function ge(e, t) {
|
|
1118
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1134
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = gn(e, t));
|
|
1119
1135
|
}
|
|
1120
|
-
function
|
|
1136
|
+
function gn(e, t) {
|
|
1121
1137
|
var c, h;
|
|
1122
1138
|
if (!t.value)
|
|
1123
1139
|
return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
|
|
@@ -1133,46 +1149,46 @@ function mn(e, t) {
|
|
|
1133
1149
|
let l = G(o, r);
|
|
1134
1150
|
return n && (l = n + " " + l), l;
|
|
1135
1151
|
}
|
|
1136
|
-
const
|
|
1152
|
+
const bn = {
|
|
1137
1153
|
beforeMount: be,
|
|
1138
1154
|
updated: be,
|
|
1139
|
-
unmounted:
|
|
1155
|
+
unmounted: En
|
|
1140
1156
|
};
|
|
1141
1157
|
function be(e, t) {
|
|
1142
1158
|
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");
|
|
1143
1159
|
}
|
|
1144
|
-
function
|
|
1160
|
+
function En(e) {
|
|
1145
1161
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1146
1162
|
}
|
|
1147
|
-
const
|
|
1163
|
+
const Tn = {
|
|
1148
1164
|
beforeMount: Ee,
|
|
1149
1165
|
updated: Ee,
|
|
1150
|
-
unmounted:
|
|
1151
|
-
},
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1166
|
+
unmounted: Be
|
|
1167
|
+
}, V = Symbol("HasAutoFocused"), ae = [];
|
|
1168
|
+
function wn() {
|
|
1169
|
+
ae.forEach(Ae);
|
|
1154
1170
|
}
|
|
1155
|
-
setInterval(
|
|
1171
|
+
setInterval(wn, 1e3);
|
|
1156
1172
|
function Ee(e, t) {
|
|
1157
1173
|
var r;
|
|
1158
1174
|
if (t.value == t.oldValue)
|
|
1159
1175
|
return;
|
|
1160
1176
|
if (!t.value)
|
|
1161
|
-
return
|
|
1177
|
+
return Be(e);
|
|
1162
1178
|
const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
|
|
1163
|
-
e[
|
|
1179
|
+
e[V] || ae.push(e), e[V] = {
|
|
1164
1180
|
startTs: s,
|
|
1165
1181
|
includeSeconds: o
|
|
1166
|
-
},
|
|
1167
|
-
}
|
|
1168
|
-
function $e(e) {
|
|
1169
|
-
const t = e[F], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1170
|
-
e.innerText = En(n, t.includeSeconds);
|
|
1182
|
+
}, Ae(e);
|
|
1171
1183
|
}
|
|
1172
1184
|
function Ae(e) {
|
|
1173
|
-
e[
|
|
1185
|
+
const t = e[V], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1186
|
+
e.innerText = On(n, t.includeSeconds);
|
|
1187
|
+
}
|
|
1188
|
+
function Be(e) {
|
|
1189
|
+
e[V] && (et(ae, e), delete e[V]), e.innerText = "-";
|
|
1174
1190
|
}
|
|
1175
|
-
function
|
|
1191
|
+
function On(e, t) {
|
|
1176
1192
|
const n = [], i = Math.floor(e / 86400);
|
|
1177
1193
|
i && n.push(i + "d"), e -= i * 86400;
|
|
1178
1194
|
const s = Math.floor(e / 3600);
|
|
@@ -1180,7 +1196,7 @@ function En(e, t) {
|
|
|
1180
1196
|
const o = Math.floor(e / 60);
|
|
1181
1197
|
return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
|
|
1182
1198
|
}
|
|
1183
|
-
const D = Symbol("InfiniteScrollHandler"),
|
|
1199
|
+
const D = Symbol("InfiniteScrollHandler"), kn = {
|
|
1184
1200
|
mounted(e, t) {
|
|
1185
1201
|
e[D] = new A(e, t.value);
|
|
1186
1202
|
},
|
|
@@ -1192,17 +1208,17 @@ const D = Symbol("InfiniteScrollHandler"), On = {
|
|
|
1192
1208
|
var t;
|
|
1193
1209
|
(t = e[D]) == null || t.uninstall(), delete e[D];
|
|
1194
1210
|
}
|
|
1195
|
-
},
|
|
1196
|
-
beforeMount:
|
|
1197
|
-
updated:
|
|
1211
|
+
}, Sn = {
|
|
1212
|
+
beforeMount: Te,
|
|
1213
|
+
updated: Te
|
|
1198
1214
|
};
|
|
1199
|
-
function
|
|
1215
|
+
function Te(e, t) {
|
|
1200
1216
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1201
1217
|
}
|
|
1202
|
-
const
|
|
1218
|
+
const xn = {
|
|
1203
1219
|
mounted: we,
|
|
1204
1220
|
updated: we,
|
|
1205
|
-
unmounted:
|
|
1221
|
+
unmounted: Fe
|
|
1206
1222
|
}, B = Symbol("TooltipState");
|
|
1207
1223
|
function we(e, t) {
|
|
1208
1224
|
var i;
|
|
@@ -1212,15 +1228,15 @@ function we(e, t) {
|
|
|
1212
1228
|
content: n,
|
|
1213
1229
|
html: e.getAttribute("html") !== null
|
|
1214
1230
|
};
|
|
1215
|
-
e[B] ? e[B].configure(s) : e[B] = new
|
|
1231
|
+
e[B] ? e[B].configure(s) : e[B] = new Cn(e, s);
|
|
1216
1232
|
} else
|
|
1217
|
-
|
|
1233
|
+
Fe(e);
|
|
1218
1234
|
}
|
|
1219
|
-
function
|
|
1235
|
+
function Fe(e) {
|
|
1220
1236
|
var t;
|
|
1221
1237
|
(t = e[B]) == null || t.destroy(), delete e[B];
|
|
1222
1238
|
}
|
|
1223
|
-
class
|
|
1239
|
+
class Cn {
|
|
1224
1240
|
constructor(t, n) {
|
|
1225
1241
|
v(this, "lastMoveEvt");
|
|
1226
1242
|
v(this, "checkInterval");
|
|
@@ -1268,61 +1284,59 @@ class kn {
|
|
|
1268
1284
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
|
|
1269
1285
|
}
|
|
1270
1286
|
}
|
|
1271
|
-
function
|
|
1272
|
-
e.directive("autofocus",
|
|
1287
|
+
function Ln(e) {
|
|
1288
|
+
e.directive("autofocus", hn), e.directive("confirm-button", fn), e.directive("date-input", mn), e.directive("datetime", yn), e.directive("disabled", bn), e.directive("duration", Tn), e.directive("infinite-scroll", kn), e.directive("readonly", Sn), e.directive("tooltip", xn);
|
|
1273
1289
|
}
|
|
1274
|
-
function
|
|
1275
|
-
|
|
1290
|
+
function si(e) {
|
|
1291
|
+
Ln(e);
|
|
1276
1292
|
}
|
|
1277
1293
|
export {
|
|
1278
|
-
|
|
1279
|
-
_n as OverlayContainer,
|
|
1294
|
+
An as OverlayContainer,
|
|
1280
1295
|
z as UserError,
|
|
1281
|
-
|
|
1296
|
+
$n as VfAjaxSelect,
|
|
1282
1297
|
X as VfAlertModal,
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1298
|
+
zn as VfEzSmartSelect,
|
|
1299
|
+
bt as VfModal,
|
|
1300
|
+
Rt as VfSmartSelect,
|
|
1301
|
+
Jn as cloneProp,
|
|
1302
|
+
Rn as configureVf,
|
|
1303
|
+
Yn as createFilters,
|
|
1289
1304
|
ie as createOverlayInjection,
|
|
1290
1305
|
Ct as desnakeCase,
|
|
1291
|
-
|
|
1292
|
-
|
|
1306
|
+
ut as dismissOverlayInjectionById,
|
|
1307
|
+
Bn as dismissOverlayInjectionByInstance,
|
|
1293
1308
|
Me as dismissOverlayInjectionByInternalInstance,
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
Gn as nullifyEmptyInputs,
|
|
1309
|
+
dt as dismissOverlayInjectionByVnode,
|
|
1310
|
+
ri as escapeHtml,
|
|
1311
|
+
ht as formatError,
|
|
1312
|
+
on as formatNumber,
|
|
1313
|
+
Lt as formatPhone,
|
|
1314
|
+
Mt as formatUSCurrency,
|
|
1315
|
+
Kn as handleError,
|
|
1316
|
+
Un as handleErrorAndAlert,
|
|
1317
|
+
ti as installApiClientInterceptors,
|
|
1318
|
+
si as installVf,
|
|
1319
|
+
jn as maskComponent,
|
|
1320
|
+
ft as maskEl,
|
|
1321
|
+
pt as maskForm,
|
|
1322
|
+
Pn as nl2br,
|
|
1323
|
+
ei as nullifyEmptyInputs,
|
|
1310
1324
|
se as presentOverlay,
|
|
1311
1325
|
P as removeOverlayInjection,
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1326
|
+
Zn as replaceElement,
|
|
1327
|
+
ue as showAlert,
|
|
1328
|
+
Fn as showConfirm,
|
|
1329
|
+
Vn as showConfirmDestroy,
|
|
1330
|
+
Gn as showContextMenu,
|
|
1331
|
+
Xn as showToast,
|
|
1332
|
+
Nn as showWait,
|
|
1333
|
+
sn as sleep,
|
|
1334
|
+
Qn as sleepSecs,
|
|
1321
1335
|
oe as toError,
|
|
1322
|
-
|
|
1336
|
+
Wn as unmaskComponent,
|
|
1323
1337
|
Ie as unmaskEl,
|
|
1324
1338
|
He as unmaskForm,
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1339
|
+
ni as useInfiniteScroll,
|
|
1340
|
+
ii as useResizeWatcher,
|
|
1341
|
+
qn as uuid
|
|
1328
1342
|
};
|