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