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