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