@signal24/vue-foundation 4.15.1 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/ajax-select.vue.d.ts +7 -7
- package/dist/src/components/alert-modal.vue.d.ts +13 -22
- package/dist/src/components/ez-smart-select.vue.d.ts +12 -21
- package/dist/src/components/modal.vue.d.ts +32 -29
- package/dist/src/components/overlay-anchor.vue.d.ts +14 -14
- package/dist/src/components/overlay-container.d.ts +1 -1
- package/dist/src/components/smart-select.vue.d.ts +27 -32
- package/dist/src/components/toast.vue.d.ts +3 -12
- package/dist/src/directives/hotkey.d.ts +2 -0
- package/dist/src/directives/index.d.ts +2 -0
- package/dist/src/filters/index.d.ts +1 -12
- package/dist/vue-foundation.es.js +494 -468
- package/package.json +28 -28
- package/src/components/alert-modal.vue +1 -1
- package/src/components/ez-smart-select.vue +1 -1
- package/src/components/modal.vue +2 -2
- package/src/directives/hotkey.ts +51 -0
- package/src/directives/index.ts +3 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var E = (e, t, n) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { compact as
|
|
6
|
-
import { escapeHtml as
|
|
7
|
-
import { escapeHtml as
|
|
8
|
-
import { installOpenApiClientInterceptors as
|
|
9
|
-
import { format as
|
|
10
|
-
const
|
|
1
|
+
var _e = Object.defineProperty;
|
|
2
|
+
var Ke = (e, t, n) => t in e ? _e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => Ke(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as L, defineProps as je, defineEmits as We, ref as O, computed as N, openBlock as d, createElementBlock as h, createElementVNode as T, toDisplayString as x, withDirectives as W, createCommentVNode as b, Fragment as U, renderList as te, vModelSelect as Ue, getCurrentInstance as ne, onMounted as M, normalizeClass as k, normalizeStyle as Pe, withModifiers as se, renderSlot as j, reactive as qe, h as P, Teleport as ze, markRaw as Xe, onBeforeUnmount as ie, resolveDirective as be, createBlock as ke, createSlots as Ye, withCtx as Z, createTextVNode as de, vModelText as Ze, watch as ue, onActivated as Se, onDeactivated as Ce } from "vue";
|
|
5
|
+
import { compact as Ge, debounce as Qe, isEqual as Le, upperFirst as Je, startCase as et, cloneDeep as tt, remove as nt, last as st } from "lodash";
|
|
6
|
+
import { escapeHtml as it } from "@vue/shared";
|
|
7
|
+
import { escapeHtml as ds } from "@vue/shared";
|
|
8
|
+
import { installOpenApiClientInterceptors as ot, isOpenApiError as rt } from "@signal24/openapi-client-codegen/browser";
|
|
9
|
+
import { format as J } from "date-fns";
|
|
10
|
+
const lt = L({
|
|
11
11
|
setup() {
|
|
12
|
-
const e =
|
|
13
|
-
|
|
14
|
-
const t =
|
|
12
|
+
const e = je();
|
|
13
|
+
We(["update:modelValue"]);
|
|
14
|
+
const t = O(null), n = N(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), s = O(e.modelValue ?? null);
|
|
15
15
|
return { props: e, options: t, renderOptions: n, selectedItem: s };
|
|
16
16
|
},
|
|
17
17
|
watch: {
|
|
@@ -33,72 +33,72 @@ const tt = C({
|
|
|
33
33
|
this.options = await this.props.loadFn();
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), xe = (e, t) => {
|
|
37
37
|
const n = e.__vccOpts || e;
|
|
38
38
|
for (const [s, i] of t)
|
|
39
39
|
n[s] = i;
|
|
40
40
|
return n;
|
|
41
|
-
},
|
|
41
|
+
}, at = {
|
|
42
42
|
key: 0,
|
|
43
43
|
disabled: ""
|
|
44
|
-
},
|
|
44
|
+
}, ct = {
|
|
45
45
|
key: 0,
|
|
46
46
|
value: null
|
|
47
|
-
},
|
|
48
|
-
function
|
|
49
|
-
return e.renderOptions ?
|
|
47
|
+
}, dt = ["value"];
|
|
48
|
+
function ut(e, t, n, s, i, o) {
|
|
49
|
+
return e.renderOptions ? W((d(), h("select", {
|
|
50
50
|
key: 1,
|
|
51
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
51
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.selectedItem = l)
|
|
52
52
|
}, [
|
|
53
|
-
e.props.nullText ? (d(), h("option",
|
|
54
|
-
(d(!0), h(
|
|
53
|
+
e.props.nullText ? (d(), h("option", ct, x(e.props.nullText), 1)) : b("", !0),
|
|
54
|
+
(d(!0), h(U, null, te(e.renderOptions, (l, r) => {
|
|
55
55
|
var a;
|
|
56
56
|
return d(), h("option", {
|
|
57
|
-
key:
|
|
58
|
-
value: (a = e.options) == null ? void 0 : a[
|
|
59
|
-
}, x(
|
|
57
|
+
key: r,
|
|
58
|
+
value: (a = e.options) == null ? void 0 : a[r]
|
|
59
|
+
}, x(l), 9, dt);
|
|
60
60
|
}), 128))
|
|
61
61
|
], 512)), [
|
|
62
|
-
[
|
|
63
|
-
]) : (d(), h("select",
|
|
64
|
-
|
|
62
|
+
[Ue, e.selectedItem]
|
|
63
|
+
]) : (d(), h("select", at, [
|
|
64
|
+
T("option", null, x(e.props.loadingText || "Loading..."), 1)
|
|
65
65
|
]));
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Fn = /* @__PURE__ */ xe(lt, [["render", ut]]), ht = /* @__PURE__ */ L({
|
|
68
68
|
__name: "overlay-anchor",
|
|
69
69
|
props: {
|
|
70
70
|
overlayId: {},
|
|
71
71
|
anchor: {}
|
|
72
72
|
},
|
|
73
73
|
setup(e) {
|
|
74
|
-
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s =
|
|
75
|
-
|
|
76
|
-
function
|
|
74
|
+
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = O({ visibility: "hidden", top: "0", left: "0" }), i = O([]), o = ne();
|
|
75
|
+
M(l);
|
|
76
|
+
function l() {
|
|
77
77
|
if (!o) return;
|
|
78
|
-
const p = o.vnode.el, { styles: g, classes: m } =
|
|
78
|
+
const p = o.vnode.el, { styles: g, classes: m } = r(p, n);
|
|
79
79
|
s.value = g, i.value = m;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function r(p, g) {
|
|
82
82
|
const m = t.anchor instanceof HTMLElement ? {} : t.anchor, v = g.getBoundingClientRect(), f = p.getBoundingClientRect();
|
|
83
83
|
m.matchWidth && (f.width = v.width), m.matchHeight && (f.height = v.height);
|
|
84
84
|
const u = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
|
|
85
|
-
let c,
|
|
85
|
+
let c, w;
|
|
86
86
|
if (m.y === "center")
|
|
87
87
|
c = v.top + v.height / 2 - f.height / 2, u.push("anchored-center-y");
|
|
88
88
|
else {
|
|
89
|
-
const
|
|
90
|
-
c =
|
|
89
|
+
const D = (v.bottom + f.height < window.innerHeight || m.y === "below") && m.y !== "above";
|
|
90
|
+
c = D ? v.bottom : v.top - f.height, u.push(D ? "anchored-top" : "anchored-bottom");
|
|
91
91
|
}
|
|
92
92
|
if (m.x === "center")
|
|
93
|
-
|
|
93
|
+
w = v.left + v.width / 2 - f.width / 2, u.push("anchored-center-x");
|
|
94
94
|
else {
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
const D = (v.left + f.width < window.innerWidth || m.x === "left") && m.x !== "right";
|
|
96
|
+
w = D ? v.left : v.right - f.width, u.push(D ? "anchored-left" : "anchored-right");
|
|
97
97
|
}
|
|
98
98
|
return {
|
|
99
99
|
styles: {
|
|
100
100
|
top: `${c}px`,
|
|
101
|
-
left: `${
|
|
101
|
+
left: `${w}px`,
|
|
102
102
|
...m.matchWidth ? { width: `${f.width}px` } : {},
|
|
103
103
|
...m.matchHeight ? { height: `${f.height}px` } : {}
|
|
104
104
|
},
|
|
@@ -106,201 +106,201 @@ const Mn = /* @__PURE__ */ Ce(tt, [["render", ot]]), lt = /* @__PURE__ */ C({
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
function a() {
|
|
109
|
-
window.removeEventListener("click", a),
|
|
109
|
+
window.removeEventListener("click", a), mt(t.overlayId);
|
|
110
110
|
}
|
|
111
|
-
return
|
|
111
|
+
return M(() => {
|
|
112
112
|
setTimeout(() => {
|
|
113
113
|
window.addEventListener("click", a);
|
|
114
114
|
}, 10);
|
|
115
115
|
}), (p, g) => (d(), h("div", {
|
|
116
116
|
class: k(["vf-overlay-anchor", i.value]),
|
|
117
|
-
style:
|
|
118
|
-
onClick:
|
|
117
|
+
style: Pe(s.value),
|
|
118
|
+
onClick: se(a, ["stop"])
|
|
119
119
|
}, [
|
|
120
|
-
|
|
120
|
+
j(p.$slots, "default")
|
|
121
121
|
], 6));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
let
|
|
125
|
-
const S =
|
|
124
|
+
let ft = 0;
|
|
125
|
+
const S = qe([]), Rn = L({
|
|
126
126
|
setup() {
|
|
127
|
-
return () =>
|
|
128
|
-
|
|
127
|
+
return () => P("div", [
|
|
128
|
+
te(S, (e) => P(ze, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
129
129
|
]);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
function
|
|
132
|
+
function oe(e, t, n) {
|
|
133
133
|
const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
134
134
|
s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
|
|
135
|
-
const i = String(++
|
|
135
|
+
const i = String(++ft), o = Xe(e), l = P(o, t), r = n != null && n.anchor ? P(ht, { overlayId: i, anchor: n.anchor }, () => [l]) : void 0, a = {
|
|
136
136
|
id: i,
|
|
137
137
|
component: o,
|
|
138
138
|
props: t,
|
|
139
139
|
options: n ?? {},
|
|
140
|
-
vnode:
|
|
141
|
-
wrapperVnode:
|
|
140
|
+
vnode: l,
|
|
141
|
+
wrapperVnode: r
|
|
142
142
|
};
|
|
143
143
|
return S.push(a), a;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
e.$ &&
|
|
145
|
+
function Nn(e) {
|
|
146
|
+
e.$ && Me(e.$);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Me(e) {
|
|
149
149
|
let t = e;
|
|
150
|
-
for (; t && !
|
|
150
|
+
for (; t && !pt(t.vnode); )
|
|
151
151
|
t = t.parent;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function pt(e) {
|
|
154
154
|
const t = S.findIndex((n) => n.vnode.component === e.component);
|
|
155
155
|
return t >= 0 ? (S[t].props.callback(), !0) : !1;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function mt(e) {
|
|
158
158
|
const t = S.findIndex((n) => n.id === e);
|
|
159
159
|
return t >= 0 ? (S[t].props.callback(), !0) : !1;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function q(e) {
|
|
162
162
|
const t = S.indexOf(e);
|
|
163
163
|
t >= 0 && S.splice(t, 1);
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
165
|
+
async function re(e, t, n) {
|
|
166
166
|
return new Promise((s) => {
|
|
167
167
|
let i = null;
|
|
168
|
-
const
|
|
168
|
+
const l = { ...t, callback: async (r) => {
|
|
169
169
|
if (n != null && n.onCallback) {
|
|
170
|
-
const a = n.onCallback(
|
|
170
|
+
const a = n.onCallback(r);
|
|
171
171
|
if (typeof a == "object" && "then" in a && typeof a.then == "function" && await a === !1)
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
q(i), s(r);
|
|
175
175
|
} };
|
|
176
|
-
i =
|
|
176
|
+
i = oe(e, l, n);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function z(e, t) {
|
|
180
180
|
return typeof e == "object" && !(e instanceof Error) ? {
|
|
181
181
|
...e,
|
|
182
182
|
classes: e.classes ?? []
|
|
183
183
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
186
|
-
await
|
|
185
|
+
async function vt(e, t) {
|
|
186
|
+
await re(Y, z(e, t));
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
189
|
-
const n =
|
|
190
|
-
return await
|
|
188
|
+
async function _n(e, t) {
|
|
189
|
+
const n = z(e, t);
|
|
190
|
+
return await re(Y, {
|
|
191
191
|
...n,
|
|
192
192
|
shouldConfirm: !0
|
|
193
193
|
}) === !0;
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
196
|
-
const n =
|
|
197
|
-
return await
|
|
195
|
+
async function Kn(e, t) {
|
|
196
|
+
const n = z(e, t);
|
|
197
|
+
return await re(Y, {
|
|
198
198
|
...n,
|
|
199
199
|
shouldConfirm: !0,
|
|
200
200
|
classes: ["destructive", ...n.classes]
|
|
201
201
|
}) === !0;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
const n =
|
|
203
|
+
function jn(e, t) {
|
|
204
|
+
const n = z(e, t), s = oe(Y, {
|
|
205
205
|
...n,
|
|
206
206
|
isBare: !0,
|
|
207
207
|
classes: ["wait", ...n.classes],
|
|
208
208
|
callback: () => {
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
|
-
return () =>
|
|
211
|
+
return () => q(s);
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const I = {
|
|
214
214
|
unhandledErrorSupportText: "please contact support",
|
|
215
215
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
216
216
|
defaultDateFormat: "M/d/yy",
|
|
217
217
|
defaultDateTimeFormat: "M/d/yy H:mm"
|
|
218
218
|
};
|
|
219
|
-
function
|
|
220
|
-
Object.assign(
|
|
219
|
+
function Wn(e) {
|
|
220
|
+
Object.assign(I, e);
|
|
221
221
|
}
|
|
222
|
-
class
|
|
222
|
+
class X extends Error {
|
|
223
223
|
constructor(t) {
|
|
224
224
|
super(t), this.name = "UserError";
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return e instanceof
|
|
227
|
+
function yt(e) {
|
|
228
|
+
return e instanceof X ? e.message : `An application error has occurred:
|
|
229
229
|
|
|
230
|
-
${
|
|
230
|
+
${le(e).message}
|
|
231
231
|
|
|
232
|
-
Please refresh the page and try again. If this error persists, ${
|
|
232
|
+
Please refresh the page and try again. If this error persists, ${I.unhandledErrorSupportText}.`;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function le(e) {
|
|
235
235
|
return e instanceof Error ? e : new Error(String(e));
|
|
236
236
|
}
|
|
237
|
-
async function
|
|
238
|
-
const n =
|
|
239
|
-
return n instanceof
|
|
237
|
+
async function Un(e, t) {
|
|
238
|
+
const n = le(e);
|
|
239
|
+
return n instanceof X || I.errorHandler(n), vt({
|
|
240
240
|
title: t == null ? void 0 : t.title,
|
|
241
241
|
message: n,
|
|
242
242
|
classes: t == null ? void 0 : t.classes
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
async function
|
|
246
|
-
const t =
|
|
247
|
-
t instanceof
|
|
245
|
+
async function Pn(e) {
|
|
246
|
+
const t = le(e);
|
|
247
|
+
t instanceof X || I.errorHandler(t);
|
|
248
248
|
}
|
|
249
|
-
const
|
|
250
|
-
function
|
|
249
|
+
const V = Symbol("MaskState");
|
|
250
|
+
function qn(e, t) {
|
|
251
251
|
var i;
|
|
252
252
|
const n = (i = e.$) == null ? void 0 : i.vnode.el, s = n.closest(".vf-modal");
|
|
253
|
-
return
|
|
253
|
+
return gt(s ?? n, t);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function zn(e) {
|
|
256
256
|
var s;
|
|
257
257
|
const t = (s = e.$) == null ? void 0 : s.vnode.el, n = t.closest(".vf-modal");
|
|
258
|
-
return
|
|
258
|
+
return Ie(n ?? t);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
if (!e[
|
|
260
|
+
function gt(e, t) {
|
|
261
|
+
if (!e[V]) {
|
|
262
262
|
const n = document.createElement("div");
|
|
263
|
-
n.classList.add("vf-mask"), e.appendChild(n), e[
|
|
263
|
+
n.classList.add("vf-mask"), e.appendChild(n), e[V] = { maskEl: n };
|
|
264
264
|
}
|
|
265
|
-
return e[
|
|
265
|
+
return e[V].maskEl.innerText = t ?? "", () => Ie(e);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
e[
|
|
267
|
+
function Ie(e) {
|
|
268
|
+
e[V] && e.removeChild(e[V].maskEl);
|
|
269
269
|
}
|
|
270
|
-
const
|
|
271
|
-
function
|
|
272
|
-
const s = e instanceof Element ? e :
|
|
270
|
+
const ee = Symbol("FormMaskState");
|
|
271
|
+
function Et(e, t, n) {
|
|
272
|
+
const s = e instanceof Element ? e : De(e);
|
|
273
273
|
if (!s) return () => {
|
|
274
274
|
};
|
|
275
275
|
s.classList.add("vf-masked");
|
|
276
276
|
const i = t instanceof Element ? t : s.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
|
|
277
277
|
let o;
|
|
278
278
|
i && (o = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
|
|
279
|
-
const
|
|
280
|
-
return
|
|
281
|
-
disabledElements:
|
|
279
|
+
const r = [...s.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
280
|
+
return r.forEach((a) => a.setAttribute("disabled", "disabled")), s[ee] = {
|
|
281
|
+
disabledElements: r,
|
|
282
282
|
waitButton: i,
|
|
283
283
|
buttonHtml: o
|
|
284
|
-
}, () =>
|
|
284
|
+
}, () => He(s);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const t = e instanceof Element ? e :
|
|
286
|
+
function He(e) {
|
|
287
|
+
const t = e instanceof Element ? e : De(e);
|
|
288
288
|
if (!t) return;
|
|
289
|
-
const n = t[
|
|
290
|
-
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[
|
|
289
|
+
const n = t[ee];
|
|
290
|
+
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[ee]);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function De(e) {
|
|
293
293
|
var n;
|
|
294
294
|
const t = (n = e == null ? void 0 : e.$) == null ? void 0 : n.vnode.el;
|
|
295
295
|
return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const wt = ["id"], Tt = {
|
|
298
298
|
key: 0,
|
|
299
299
|
class: "vf-modal-header"
|
|
300
|
-
},
|
|
300
|
+
}, Ot = { class: "vf-modal-content" }, bt = {
|
|
301
301
|
key: 1,
|
|
302
302
|
class: "vf-modal-footer"
|
|
303
|
-
},
|
|
303
|
+
}, kt = /* @__PURE__ */ L({
|
|
304
304
|
__name: "modal",
|
|
305
305
|
props: {
|
|
306
306
|
id: {},
|
|
@@ -311,13 +311,13 @@ const pt = ["id"], mt = {
|
|
|
311
311
|
},
|
|
312
312
|
emits: ["formSubmit"],
|
|
313
313
|
setup(e, { expose: t }) {
|
|
314
|
-
const n =
|
|
314
|
+
const n = ne(), s = e;
|
|
315
315
|
t({ mask: m, unmask: v, hide: f, unhide: u });
|
|
316
|
-
const i =
|
|
317
|
-
|
|
316
|
+
const i = O(), o = O(), l = O(!1), r = N(() => Ge([...Array.isArray(s.class) ? s.class : [s.class], l.value && "hidden"]));
|
|
317
|
+
M(() => {
|
|
318
318
|
var c;
|
|
319
319
|
document.body.classList.add("vf-modal-open"), s.closeOnMaskClick && (window.addEventListener("keydown", p), (c = i.value) == null || c.addEventListener("click", a));
|
|
320
|
-
}),
|
|
320
|
+
}), ie(() => {
|
|
321
321
|
window.removeEventListener("keydown", p), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
322
322
|
});
|
|
323
323
|
function a(c) {
|
|
@@ -325,56 +325,56 @@ const pt = ["id"], mt = {
|
|
|
325
325
|
}
|
|
326
326
|
function p(c) {
|
|
327
327
|
if (c.key === "Esc" || c.key === "Escape") {
|
|
328
|
-
const
|
|
329
|
-
|
|
328
|
+
const w = document.querySelectorAll(".vf-modal-wrap");
|
|
329
|
+
w[w.length - 1] === i.value && g();
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
function g() {
|
|
333
|
-
|
|
333
|
+
Me(n);
|
|
334
334
|
}
|
|
335
335
|
function m() {
|
|
336
|
-
return
|
|
336
|
+
return Et(o.value), () => v();
|
|
337
337
|
}
|
|
338
338
|
function v() {
|
|
339
|
-
|
|
339
|
+
He(o.value);
|
|
340
340
|
}
|
|
341
341
|
function f() {
|
|
342
|
-
return
|
|
342
|
+
return l.value = !0, () => u();
|
|
343
343
|
}
|
|
344
344
|
function u() {
|
|
345
|
-
|
|
345
|
+
l.value = !1;
|
|
346
346
|
}
|
|
347
|
-
return (c,
|
|
347
|
+
return (c, w) => (d(), h("div", {
|
|
348
348
|
id: c.id,
|
|
349
|
-
class: k(["vf-overlay vf-modal-wrap",
|
|
349
|
+
class: k(["vf-overlay vf-modal-wrap", r.value]),
|
|
350
350
|
ref_key: "overlay",
|
|
351
351
|
ref: i
|
|
352
352
|
}, [
|
|
353
|
-
|
|
353
|
+
T("form", {
|
|
354
354
|
action: ".",
|
|
355
355
|
class: k(["vf-modal", { scrolls: c.scrolls }]),
|
|
356
|
-
onSubmit:
|
|
356
|
+
onSubmit: w[0] || (w[0] = se((H) => c.$emit("formSubmit"), ["prevent"])),
|
|
357
357
|
ref_key: "form",
|
|
358
358
|
ref: o
|
|
359
359
|
}, [
|
|
360
|
-
c.$slots.header ? (d(), h("div",
|
|
361
|
-
|
|
360
|
+
c.$slots.header ? (d(), h("div", Tt, [
|
|
361
|
+
j(c.$slots, "header"),
|
|
362
362
|
s.closeX ? (d(), h("i", {
|
|
363
363
|
key: 0,
|
|
364
364
|
class: "close",
|
|
365
365
|
onClick: g
|
|
366
|
-
})) :
|
|
367
|
-
])) :
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
})) : b("", !0)
|
|
367
|
+
])) : b("", !0),
|
|
368
|
+
T("div", Ot, [
|
|
369
|
+
j(c.$slots, "default")
|
|
370
370
|
]),
|
|
371
|
-
c.$slots.footer ? (d(), h("div",
|
|
372
|
-
|
|
373
|
-
])) :
|
|
371
|
+
c.$slots.footer ? (d(), h("div", bt, [
|
|
372
|
+
j(c.$slots, "footer")
|
|
373
|
+
])) : b("", !0)
|
|
374
374
|
], 34)
|
|
375
|
-
], 10,
|
|
375
|
+
], 10, wt));
|
|
376
376
|
}
|
|
377
|
-
}),
|
|
377
|
+
}), St = ["innerHtml"], Ct = ["innerText"], Y = /* @__PURE__ */ L({
|
|
378
378
|
__name: "alert-modal",
|
|
379
379
|
props: {
|
|
380
380
|
isBare: { type: Boolean },
|
|
@@ -386,54 +386,54 @@ const pt = ["id"], mt = {
|
|
|
386
386
|
callback: { type: Function }
|
|
387
387
|
},
|
|
388
388
|
setup(e) {
|
|
389
|
-
const t = e, n =
|
|
389
|
+
const t = e, n = N(() => t.message instanceof Error ? yt(t.message) : t.message);
|
|
390
390
|
return (s, i) => {
|
|
391
|
-
const o =
|
|
392
|
-
return d(),
|
|
393
|
-
class: k(["vf-alert", s.classes])
|
|
394
|
-
},
|
|
395
|
-
default:
|
|
391
|
+
const o = be("autofocus");
|
|
392
|
+
return d(), ke(kt, {
|
|
393
|
+
class: k(["vf-alert", ...s.classes ?? []])
|
|
394
|
+
}, Ye({
|
|
395
|
+
default: Z(() => [
|
|
396
396
|
s.isHtml ? (d(), h("div", {
|
|
397
397
|
key: 0,
|
|
398
398
|
innerHtml: s.message,
|
|
399
399
|
class: "user-message"
|
|
400
|
-
}, null, 8,
|
|
400
|
+
}, null, 8, St)) : (d(), h("div", {
|
|
401
401
|
key: 1,
|
|
402
402
|
innerText: n.value
|
|
403
|
-
}, null, 8,
|
|
403
|
+
}, null, 8, Ct))
|
|
404
404
|
]),
|
|
405
405
|
_: 2
|
|
406
406
|
}, [
|
|
407
407
|
s.title ? {
|
|
408
408
|
name: "header",
|
|
409
|
-
fn:
|
|
410
|
-
|
|
409
|
+
fn: Z(() => [
|
|
410
|
+
T("h1", null, x(s.title), 1)
|
|
411
411
|
]),
|
|
412
412
|
key: "0"
|
|
413
413
|
} : void 0,
|
|
414
414
|
s.isBare ? void 0 : {
|
|
415
415
|
name: "footer",
|
|
416
|
-
fn:
|
|
417
|
-
s.shouldConfirm ? (d(), h(
|
|
418
|
-
|
|
416
|
+
fn: Z(() => [
|
|
417
|
+
s.shouldConfirm ? (d(), h(U, { key: 0 }, [
|
|
418
|
+
W((d(), h("button", {
|
|
419
419
|
class: "primary",
|
|
420
420
|
onClick: i[0] || (i[0] = () => s.callback(!0))
|
|
421
|
-
}, [
|
|
422
|
-
|
|
423
|
-
])), [
|
|
421
|
+
}, i[3] || (i[3] = [
|
|
422
|
+
de("Confirm")
|
|
423
|
+
]))), [
|
|
424
424
|
[o]
|
|
425
425
|
]),
|
|
426
|
-
|
|
426
|
+
T("button", {
|
|
427
427
|
class: "default",
|
|
428
428
|
onClick: i[1] || (i[1] = () => s.callback(!1))
|
|
429
429
|
}, "Cancel")
|
|
430
|
-
], 64)) :
|
|
430
|
+
], 64)) : W((d(), h("button", {
|
|
431
431
|
key: 1,
|
|
432
432
|
class: "default",
|
|
433
433
|
onClick: i[2] || (i[2] = () => s.callback(!0))
|
|
434
|
-
}, [
|
|
435
|
-
|
|
436
|
-
])), [
|
|
434
|
+
}, i[4] || (i[4] = [
|
|
435
|
+
de("OK")
|
|
436
|
+
]))), [
|
|
437
437
|
[o]
|
|
438
438
|
])
|
|
439
439
|
]),
|
|
@@ -443,46 +443,46 @@ const pt = ["id"], mt = {
|
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
446
|
+
var y = [];
|
|
447
|
+
for (var G = 0; G < 256; ++G)
|
|
448
|
+
y.push((G + 256).toString(16).slice(1));
|
|
449
|
+
function Lt(e, t = 0) {
|
|
450
|
+
return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
|
|
451
|
+
}
|
|
452
|
+
var K, xt = new Uint8Array(16);
|
|
453
|
+
function Mt() {
|
|
454
|
+
if (!K && (K = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !K))
|
|
450
455
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
451
|
-
return
|
|
452
|
-
}
|
|
453
|
-
const y = [];
|
|
454
|
-
for (let e = 0; e < 256; ++e)
|
|
455
|
-
y.push((e + 256).toString(16).slice(1));
|
|
456
|
-
function Ot(e, t = 0) {
|
|
457
|
-
return y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]];
|
|
456
|
+
return K(xt);
|
|
458
457
|
}
|
|
459
|
-
|
|
460
|
-
|
|
458
|
+
var It = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
459
|
+
const he = {
|
|
460
|
+
randomUUID: It
|
|
461
461
|
};
|
|
462
|
-
function
|
|
463
|
-
if (
|
|
464
|
-
return
|
|
462
|
+
function Ht(e, t, n) {
|
|
463
|
+
if (he.randomUUID && !t && !e)
|
|
464
|
+
return he.randomUUID();
|
|
465
465
|
e = e || {};
|
|
466
|
-
|
|
467
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
466
|
+
var s = e.random || (e.rng || Mt)();
|
|
467
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Lt(s);
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Xn(e) {
|
|
470
470
|
return e.replace(/\n/g, "<br>");
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Dt(e) {
|
|
473
473
|
return e.replace(/_/g, " ");
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function At(e) {
|
|
476
476
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
477
477
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function $t(e, t = 1) {
|
|
480
480
|
return "$" + (Number(e) / t).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
481
481
|
}
|
|
482
|
-
function
|
|
483
|
-
return
|
|
482
|
+
function Yn() {
|
|
483
|
+
return Ht();
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const A = Symbol("null"), fe = Symbol("create"), Bt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Vt = {
|
|
486
486
|
props: {
|
|
487
487
|
modelValue: {
|
|
488
488
|
type: null,
|
|
@@ -559,16 +559,16 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
559
559
|
},
|
|
560
560
|
optionsDescriptors() {
|
|
561
561
|
return this.allOptions.map((e, t) => {
|
|
562
|
-
var
|
|
563
|
-
const n = this.formatter(e), s = (
|
|
562
|
+
var r, a;
|
|
563
|
+
const n = this.formatter(e), s = (r = this.subtitleFormatter) == null ? void 0 : r.call(this, e), i = n ? n.trim().toLowerCase() : "", o = s ? s.trim().toLowerCase() : "", l = [];
|
|
564
564
|
return this.searchFields ? this.searchFields.forEach((p) => {
|
|
565
|
-
e[p] &&
|
|
566
|
-
}) : (
|
|
565
|
+
e[p] && l.push(String(e[p]).toLowerCase());
|
|
566
|
+
}) : (l.push(i), o && l.push(o)), {
|
|
567
567
|
// eslint-disable-next-line vue/no-use-computed-property-like-method
|
|
568
568
|
key: ((a = this.effectiveKeyExtractor) == null ? void 0 : a.call(this, e)) ?? String(t),
|
|
569
569
|
title: n,
|
|
570
570
|
subtitle: s,
|
|
571
|
-
searchContent:
|
|
571
|
+
searchContent: l.join(""),
|
|
572
572
|
ref: e
|
|
573
573
|
};
|
|
574
574
|
});
|
|
@@ -579,7 +579,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
579
579
|
const t = this.searchText.trim().toLowerCase();
|
|
580
580
|
if (t.length) {
|
|
581
581
|
e = e.filter((i) => i.searchContent.includes(t));
|
|
582
|
-
const n =
|
|
582
|
+
const n = it(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(`(${n})`, "ig");
|
|
583
583
|
e = e.map((i) => {
|
|
584
584
|
var o;
|
|
585
585
|
return {
|
|
@@ -588,12 +588,12 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
588
588
|
subtitle: (o = i.subtitle) == null ? void 0 : o.replace(s, "<mark>$1</mark>")
|
|
589
589
|
};
|
|
590
590
|
}), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
|
|
591
|
-
key:
|
|
591
|
+
key: fe,
|
|
592
592
|
title: "Create <strong>" + this.searchText.trim() + "</strong>..."
|
|
593
593
|
}));
|
|
594
594
|
}
|
|
595
595
|
} else this.nullTitle && e.unshift({
|
|
596
|
-
key:
|
|
596
|
+
key: A,
|
|
597
597
|
title: this.nullTitle
|
|
598
598
|
});
|
|
599
599
|
return e;
|
|
@@ -619,7 +619,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
619
619
|
},
|
|
620
620
|
effectiveOptions() {
|
|
621
621
|
var e;
|
|
622
|
-
this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ??
|
|
622
|
+
this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? A);
|
|
623
623
|
}
|
|
624
624
|
},
|
|
625
625
|
async mounted() {
|
|
@@ -628,7 +628,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
628
628
|
"update:modelValue",
|
|
629
629
|
this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
|
|
630
630
|
);
|
|
631
|
-
}), this.remoteSearch && this.$watch("searchText",
|
|
631
|
+
}), this.remoteSearch && this.$watch("searchText", Qe(this.reloadOptionsIfSearching, 250));
|
|
632
632
|
},
|
|
633
633
|
methods: {
|
|
634
634
|
async loadRemoteOptions() {
|
|
@@ -667,7 +667,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
667
667
|
this.searchText.length > 1 && (this.isSearching = !0);
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
!e.metaKey &&
|
|
670
|
+
!e.metaKey && Bt.includes(e.key) && (this.isSearching = !0);
|
|
671
671
|
}
|
|
672
672
|
},
|
|
673
673
|
handleInputFocused() {
|
|
@@ -675,7 +675,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
675
675
|
},
|
|
676
676
|
setHighlightedOptionKey(e) {
|
|
677
677
|
var t;
|
|
678
|
-
this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ??
|
|
678
|
+
this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? A : this.nullTitle && (this.highlightedOptionKey = A);
|
|
679
679
|
},
|
|
680
680
|
getOptionKey(e) {
|
|
681
681
|
var t;
|
|
@@ -685,7 +685,7 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
685
685
|
const t = this.effectiveOptions.find((i) => i.ref === e);
|
|
686
686
|
if (t)
|
|
687
687
|
return t;
|
|
688
|
-
const n = this.keyExtractor ? (i, o) => this.keyExtractor(i) === this.keyExtractor(o) :
|
|
688
|
+
const n = this.keyExtractor ? (i, o) => this.keyExtractor(i) === this.keyExtractor(o) : Le, s = this.effectiveOptions.find((i) => n(i.ref, e));
|
|
689
689
|
return s || null;
|
|
690
690
|
},
|
|
691
691
|
handleInputBlurred() {
|
|
@@ -722,9 +722,9 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
722
722
|
},
|
|
723
723
|
selectOption(e) {
|
|
724
724
|
var t;
|
|
725
|
-
if (this.isSearching = !1, e.key ==
|
|
725
|
+
if (this.isSearching = !1, e.key == A)
|
|
726
726
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
|
|
727
|
-
else if (e.key ===
|
|
727
|
+
else if (e.key === fe) {
|
|
728
728
|
const n = this.searchText.trim();
|
|
729
729
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, (t = this.onCreateItem) == null || t.call(this, n);
|
|
730
730
|
} else {
|
|
@@ -740,63 +740,63 @@ const D = Symbol("null"), ue = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
740
740
|
this.loadedOptions.unshift(e);
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
},
|
|
743
|
+
}, Ft = ["placeholder", "required"], Rt = {
|
|
744
744
|
key: 0,
|
|
745
745
|
ref: "optionsContainer",
|
|
746
746
|
class: "vf-smart-select-options"
|
|
747
|
-
},
|
|
747
|
+
}, Nt = {
|
|
748
748
|
key: 0,
|
|
749
749
|
class: "no-results"
|
|
750
|
-
},
|
|
750
|
+
}, _t = ["onMousemove", "onMousedown"], Kt = ["innerHTML"], jt = ["innerHTML"], Wt = {
|
|
751
751
|
key: 0,
|
|
752
752
|
class: "no-results"
|
|
753
753
|
};
|
|
754
|
-
function
|
|
755
|
-
const
|
|
754
|
+
function Ut(e, t, n, s, i, o) {
|
|
755
|
+
const l = be("disabled");
|
|
756
756
|
return d(), h("div", {
|
|
757
757
|
class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
|
|
758
758
|
}, [
|
|
759
|
-
|
|
760
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
759
|
+
W(T("input", {
|
|
760
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.searchText = r),
|
|
761
761
|
ref: "searchField",
|
|
762
762
|
type: "text",
|
|
763
763
|
class: k({ nullable: !!n.nullTitle }),
|
|
764
|
-
onKeydown: t[1] || (t[1] = (...
|
|
764
|
+
onKeydown: t[1] || (t[1] = (...r) => o.handleKeyDown && o.handleKeyDown(...r)),
|
|
765
765
|
placeholder: o.effectivePlaceholder,
|
|
766
|
-
onFocus: t[2] || (t[2] = (...
|
|
767
|
-
onBlur: t[3] || (t[3] = (...
|
|
766
|
+
onFocus: t[2] || (t[2] = (...r) => o.handleInputFocused && o.handleInputFocused(...r)),
|
|
767
|
+
onBlur: t[3] || (t[3] = (...r) => o.handleInputBlurred && o.handleInputBlurred(...r)),
|
|
768
768
|
required: n.required,
|
|
769
769
|
"data-1p-ignore": ""
|
|
770
|
-
}, null, 42,
|
|
771
|
-
[
|
|
772
|
-
[
|
|
770
|
+
}, null, 42, Ft), [
|
|
771
|
+
[Ze, e.searchText],
|
|
772
|
+
[l, o.effectiveDisabled]
|
|
773
773
|
]),
|
|
774
|
-
e.shouldDisplayOptions ? (d(), h("div",
|
|
775
|
-
e.isLoaded ? (d(), h(
|
|
776
|
-
(d(!0), h(
|
|
777
|
-
key: String(
|
|
774
|
+
e.shouldDisplayOptions ? (d(), h("div", Rt, [
|
|
775
|
+
e.isLoaded ? (d(), h(U, { key: 1 }, [
|
|
776
|
+
(d(!0), h(U, null, te(o.effectiveOptions, (r) => (d(), h("div", {
|
|
777
|
+
key: String(r.key),
|
|
778
778
|
class: k(["option", {
|
|
779
|
-
highlighted: e.highlightedOptionKey ===
|
|
779
|
+
highlighted: e.highlightedOptionKey === r.key
|
|
780
780
|
}]),
|
|
781
|
-
onMousemove: (a) => o.handleOptionHover(
|
|
782
|
-
onMousedown: (a) => o.selectOption(
|
|
781
|
+
onMousemove: (a) => o.handleOptionHover(r),
|
|
782
|
+
onMousedown: (a) => o.selectOption(r)
|
|
783
783
|
}, [
|
|
784
|
-
|
|
784
|
+
T("div", {
|
|
785
785
|
class: "title",
|
|
786
|
-
innerHTML:
|
|
787
|
-
}, null, 8,
|
|
788
|
-
|
|
786
|
+
innerHTML: r.title
|
|
787
|
+
}, null, 8, Kt),
|
|
788
|
+
r.subtitle ? (d(), h("div", {
|
|
789
789
|
key: 0,
|
|
790
790
|
class: "subtitle",
|
|
791
|
-
innerHTML:
|
|
792
|
-
}, null, 8,
|
|
793
|
-
], 42,
|
|
794
|
-
!o.effectiveOptions.length && e.searchText ? (d(), h("div",
|
|
795
|
-
], 64)) : (d(), h("div",
|
|
796
|
-
], 512)) :
|
|
791
|
+
innerHTML: r.subtitle
|
|
792
|
+
}, null, 8, jt)) : b("", !0)
|
|
793
|
+
], 42, _t))), 128)),
|
|
794
|
+
!o.effectiveOptions.length && e.searchText ? (d(), h("div", Wt, x(o.effectiveNoResultsText), 1)) : b("", !0)
|
|
795
|
+
], 64)) : (d(), h("div", Nt, "Loading..."))
|
|
796
|
+
], 512)) : b("", !0)
|
|
797
797
|
], 2);
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const Pt = /* @__PURE__ */ xe(Vt, [["render", Ut]]), Zn = /* @__PURE__ */ L({
|
|
800
800
|
__name: "ez-smart-select",
|
|
801
801
|
props: {
|
|
802
802
|
modelValue: {},
|
|
@@ -807,36 +807,36 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
807
807
|
},
|
|
808
808
|
emits: ["update:modelValue"],
|
|
809
809
|
setup(e, { emit: t }) {
|
|
810
|
-
const n = e, s =
|
|
811
|
-
value:
|
|
810
|
+
const n = e, s = N(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, a]) => ({
|
|
811
|
+
value: r,
|
|
812
812
|
label: a
|
|
813
|
-
}))), i =
|
|
813
|
+
}))), i = N(() => n.formatter ? (r) => {
|
|
814
814
|
var a;
|
|
815
|
-
return (a = n.formatter) == null ? void 0 : a.call(n,
|
|
816
|
-
} : (
|
|
817
|
-
return
|
|
815
|
+
return (a = n.formatter) == null ? void 0 : a.call(n, r.label);
|
|
816
|
+
} : (r) => r.label), o = t, l = O(s.value.find((r) => r.value === n.modelValue) ?? null);
|
|
817
|
+
return ue(
|
|
818
818
|
() => n.modelValue,
|
|
819
|
-
(
|
|
820
|
-
|
|
819
|
+
(r) => {
|
|
820
|
+
l.value = s.value.find((a) => a.value === r) ?? null;
|
|
821
821
|
}
|
|
822
|
-
),
|
|
822
|
+
), ue(l, (r) => {
|
|
823
823
|
var a;
|
|
824
|
-
o("update:modelValue",
|
|
825
|
-
}), (
|
|
826
|
-
modelValue:
|
|
827
|
-
"onUpdate:modelValue": a[0] || (a[0] = (p) =>
|
|
824
|
+
o("update:modelValue", r ? ((a = s.value.find((p) => Le(p, r))) == null ? void 0 : a.value) ?? null : null);
|
|
825
|
+
}), (r, a) => (d(), ke(Pt, {
|
|
826
|
+
modelValue: l.value,
|
|
827
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => l.value = p),
|
|
828
828
|
options: s.value,
|
|
829
829
|
formatter: i.value,
|
|
830
|
-
"null-title":
|
|
830
|
+
"null-title": r.nullTitle
|
|
831
831
|
}, null, 8, ["modelValue", "options", "formatter", "null-title"]));
|
|
832
832
|
}
|
|
833
|
-
}),
|
|
833
|
+
}), qt = { class: "content" }, zt = { class: "message" }, Xt = {
|
|
834
834
|
key: 0,
|
|
835
835
|
class: "close"
|
|
836
|
-
},
|
|
836
|
+
}, Yt = {
|
|
837
837
|
key: 0,
|
|
838
838
|
class: "progress-bar"
|
|
839
|
-
},
|
|
839
|
+
}, Zt = /* @__PURE__ */ L({
|
|
840
840
|
__name: "toast",
|
|
841
841
|
props: {
|
|
842
842
|
message: {},
|
|
@@ -851,8 +851,8 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
851
851
|
function n() {
|
|
852
852
|
t.onClick ? t.onClick() : t.disableClose || t.callback();
|
|
853
853
|
}
|
|
854
|
-
const s =
|
|
855
|
-
return t.durationSecs !== null &&
|
|
854
|
+
const s = O();
|
|
855
|
+
return t.durationSecs !== null && M(() => {
|
|
856
856
|
var o;
|
|
857
857
|
const i = t.durationSecs ?? 5;
|
|
858
858
|
(o = s.value) == null || o.animate([{ width: "0%" }, { width: "100%" }], {
|
|
@@ -861,80 +861,80 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
861
861
|
}), setTimeout(() => t.callback(), i * 1e3);
|
|
862
862
|
}), (i, o) => (d(), h("div", {
|
|
863
863
|
class: k(["vf-toast", i.className]),
|
|
864
|
-
onClick:
|
|
864
|
+
onClick: se(n, ["stop"])
|
|
865
865
|
}, [
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
i.disableClose ?
|
|
866
|
+
T("div", qt, [
|
|
867
|
+
T("div", zt, x(i.message), 1),
|
|
868
|
+
i.disableClose ? b("", !0) : (d(), h("div", Xt, "x"))
|
|
869
869
|
]),
|
|
870
|
-
i.durationSecs !== null ? (d(), h("div",
|
|
871
|
-
|
|
870
|
+
i.durationSecs !== null ? (d(), h("div", Yt, [
|
|
871
|
+
T("div", {
|
|
872
872
|
ref_key: "progressInnerEl",
|
|
873
873
|
ref: s,
|
|
874
874
|
class: "inner"
|
|
875
875
|
}, null, 512)
|
|
876
|
-
])) :
|
|
876
|
+
])) : b("", !0)
|
|
877
877
|
], 2));
|
|
878
878
|
}
|
|
879
879
|
});
|
|
880
|
-
function
|
|
881
|
-
const t =
|
|
880
|
+
function Gn(e) {
|
|
881
|
+
const t = oe(Zt, {
|
|
882
882
|
...e,
|
|
883
|
-
callback: () =>
|
|
883
|
+
callback: () => q(t)
|
|
884
884
|
});
|
|
885
|
-
return () =>
|
|
885
|
+
return () => q(t);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Gt(e) {
|
|
888
888
|
const t = Math.floor(Math.log(e) / Math.log(1024)), s = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
|
|
889
889
|
return `${s} ${i}`;
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Qt(e) {
|
|
892
892
|
return e != null && String(e).length ? e : "-";
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function Jt(e) {
|
|
895
895
|
return e || "-";
|
|
896
896
|
}
|
|
897
|
-
function
|
|
898
|
-
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e :
|
|
897
|
+
function en(e) {
|
|
898
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : cn(Number(e));
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
return e &&
|
|
900
|
+
function tn(e) {
|
|
901
|
+
return e && At(e);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
return e ?
|
|
903
|
+
function nn(e) {
|
|
904
|
+
return e ? Je(e) : null;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
return e ?
|
|
906
|
+
function sn(e) {
|
|
907
|
+
return e ? et(e) : null;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function on(e) {
|
|
910
910
|
return e ? e.toUpperCase() : null;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return e ?
|
|
914
|
-
}
|
|
915
|
-
function
|
|
916
|
-
return
|
|
917
|
-
}
|
|
918
|
-
const
|
|
919
|
-
bytes:
|
|
920
|
-
dash:
|
|
921
|
-
dashZeros:
|
|
922
|
-
number:
|
|
923
|
-
phone:
|
|
924
|
-
upperFirst:
|
|
925
|
-
startCase:
|
|
926
|
-
upperCase:
|
|
927
|
-
desnake:
|
|
928
|
-
usCurrency:
|
|
929
|
-
},
|
|
930
|
-
...
|
|
931
|
-
...e(
|
|
912
|
+
function rn(e) {
|
|
913
|
+
return e ? Dt(e) : null;
|
|
914
|
+
}
|
|
915
|
+
function ln(e, t = 1) {
|
|
916
|
+
return $t(e, t);
|
|
917
|
+
}
|
|
918
|
+
const pe = {
|
|
919
|
+
bytes: Gt,
|
|
920
|
+
dash: Qt,
|
|
921
|
+
dashZeros: Jt,
|
|
922
|
+
number: en,
|
|
923
|
+
phone: tn,
|
|
924
|
+
upperFirst: nn,
|
|
925
|
+
startCase: sn,
|
|
926
|
+
upperCase: on,
|
|
927
|
+
desnake: rn,
|
|
928
|
+
usCurrency: ln
|
|
929
|
+
}, Qn = (e) => ({
|
|
930
|
+
...pe,
|
|
931
|
+
...e(pe)
|
|
932
932
|
});
|
|
933
|
-
function
|
|
933
|
+
function Jn(e, t, n) {
|
|
934
934
|
const s = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
935
935
|
return s === -1 ? !1 : (e.splice(s, 1, n), !0);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function es(e, t) {
|
|
938
938
|
const n = document.createElement("div");
|
|
939
939
|
n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
|
|
940
940
|
const s = document.createElement("div");
|
|
@@ -949,7 +949,7 @@ function qn(e, t) {
|
|
|
949
949
|
const u = document.createElement("div");
|
|
950
950
|
u.classList.add("item"), u.style.userSelect = "none", u.innerText = f.title, s.appendChild(u), f.class && u.classList.add(f.class), f.shouldConfirm ? u.addEventListener("click", (c) => v(c, u, f.handler)) : u.addEventListener("click", () => f.handler());
|
|
951
951
|
});
|
|
952
|
-
const o = window.innerWidth - e.clientX,
|
|
952
|
+
const o = window.innerWidth - e.clientX, l = window.innerHeight - e.clientY, r = s.offsetHeight, a = s.offsetWidth, p = o < a ? e.clientX - a - 1 : e.clientX + 1, g = l < r ? e.clientY - r - 1 : e.clientY + 1;
|
|
953
953
|
s.style.left = p + "px", s.style.top = g + "px", setTimeout(() => {
|
|
954
954
|
s.style.width = s.offsetWidth + "px";
|
|
955
955
|
}, 50);
|
|
@@ -959,69 +959,69 @@ function qn(e, t) {
|
|
|
959
959
|
function v(f, u, c) {
|
|
960
960
|
if (u.classList.contains("pending-confirm"))
|
|
961
961
|
return c();
|
|
962
|
-
const
|
|
962
|
+
const w = u.innerHTML;
|
|
963
963
|
u.classList.add("pending-confirm"), u.innerText = "Confirm";
|
|
964
|
-
const
|
|
965
|
-
u.classList.remove("pending-confirm"), u.innerHTML =
|
|
964
|
+
const H = () => {
|
|
965
|
+
u.classList.remove("pending-confirm"), u.innerHTML = w, u.removeEventListener("mouseleave", H);
|
|
966
966
|
};
|
|
967
|
-
u.addEventListener("mouseleave",
|
|
967
|
+
u.addEventListener("mouseleave", H), f.stopPropagation();
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
const
|
|
971
|
-
function
|
|
970
|
+
const an = (e) => new Promise((t) => setTimeout(t, e)), ts = (e) => an(e * 1e3);
|
|
971
|
+
function cn(e) {
|
|
972
972
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
return e != null ?
|
|
974
|
+
function ns(e, t) {
|
|
975
|
+
return e != null ? tt(e) : t;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function ss(e, t) {
|
|
978
978
|
const n = { ...e };
|
|
979
979
|
for (const s of t)
|
|
980
980
|
n[s] === "" && (n[s] = null);
|
|
981
981
|
return n;
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
|
|
983
|
+
function is(e) {
|
|
984
|
+
ot({
|
|
985
985
|
...e,
|
|
986
986
|
onError(t, n) {
|
|
987
987
|
var i;
|
|
988
|
-
|
|
988
|
+
rt(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new X(t.body.error));
|
|
989
989
|
const s = (i = e.onError) == null ? void 0 : i.call(e, t, n);
|
|
990
990
|
return s !== void 0 ? s : t;
|
|
991
991
|
}
|
|
992
992
|
});
|
|
993
993
|
}
|
|
994
|
-
const
|
|
995
|
-
function
|
|
996
|
-
const n = t ??
|
|
997
|
-
|
|
994
|
+
const ae = Symbol("HookState");
|
|
995
|
+
function os(e, t) {
|
|
996
|
+
const n = t ?? ne();
|
|
997
|
+
M(() => dn(n, e), n), Se(() => un(n), n), Ce(() => me(n), n), ie(() => me(n), n);
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function dn(e, t) {
|
|
1000
1000
|
const n = {};
|
|
1001
|
-
if (t.elScrolledToBottom && (n.el = new
|
|
1002
|
-
const s =
|
|
1003
|
-
s ? n.ancestor = new
|
|
1001
|
+
if (t.elScrolledToBottom && (n.el = new F(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1002
|
+
const s = Ae(e.vnode.el);
|
|
1003
|
+
s ? n.ancestor = new F(s, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
1004
1004
|
}
|
|
1005
|
-
t.windowScrolledToBottom && (n.window = new
|
|
1005
|
+
t.windowScrolledToBottom && (n.window = new F(window, t.windowScrolledToBottom)), e[ae] = n;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function un(e) {
|
|
1008
1008
|
var n, s, i;
|
|
1009
|
-
const t = e[
|
|
1009
|
+
const t = e[ae];
|
|
1010
1010
|
(n = t == null ? void 0 : t.el) == null || n.install(), (s = t == null ? void 0 : t.ancestor) == null || s.install(), (i = t == null ? void 0 : t.window) == null || i.install();
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function me(e) {
|
|
1013
1013
|
var n, s, i;
|
|
1014
|
-
const t = e[
|
|
1014
|
+
const t = e[ae];
|
|
1015
1015
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (s = t == null ? void 0 : t.ancestor) == null || s.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1017
|
+
const Q = ["auto", "scroll"];
|
|
1018
|
+
function Ae(e) {
|
|
1019
1019
|
const t = e.parentElement;
|
|
1020
1020
|
if (!t) return null;
|
|
1021
1021
|
const n = window.getComputedStyle(t);
|
|
1022
|
-
return
|
|
1022
|
+
return Q.includes(n.overflow) || Q.includes(n.overflowX) || Q.includes(n.overflowY) ? t : Ae(t);
|
|
1023
1023
|
}
|
|
1024
|
-
class
|
|
1024
|
+
class F {
|
|
1025
1025
|
constructor(t, n) {
|
|
1026
1026
|
E(this, "isTripped", !1);
|
|
1027
1027
|
E(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
@@ -1037,30 +1037,30 @@ class V {
|
|
|
1037
1037
|
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);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1041
|
-
|
|
1040
|
+
function rs(e) {
|
|
1041
|
+
M(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), Ce(() => window.removeEventListener("resize", e)), ie(() => window.removeEventListener("resize", e));
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1044
|
-
mounted:
|
|
1045
|
-
updated:
|
|
1046
|
-
},
|
|
1047
|
-
function
|
|
1048
|
-
if (t.value === void 0 && e[
|
|
1049
|
-
e[
|
|
1043
|
+
const hn = {
|
|
1044
|
+
mounted: ye,
|
|
1045
|
+
updated: ye
|
|
1046
|
+
}, ve = Symbol("HasAutoFocused");
|
|
1047
|
+
function ye(e, t) {
|
|
1048
|
+
if (t.value === void 0 && e[ve] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
|
|
1049
|
+
e[ve] = !0;
|
|
1050
1050
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1051
1051
|
setTimeout(() => n.focus(), 10);
|
|
1052
1052
|
}
|
|
1053
|
-
const
|
|
1054
|
-
mounted:
|
|
1055
|
-
},
|
|
1056
|
-
function
|
|
1053
|
+
const fn = {
|
|
1054
|
+
mounted: pn
|
|
1055
|
+
}, $ = Symbol("ConfirmState");
|
|
1056
|
+
function pn(e, t) {
|
|
1057
1057
|
e.addEventListener("click", (n) => {
|
|
1058
|
-
var
|
|
1059
|
-
const s = Date.now(), i = ((
|
|
1060
|
-
if (e[
|
|
1061
|
-
if (s - e[
|
|
1058
|
+
var l, r;
|
|
1059
|
+
const s = Date.now(), i = ((l = t.value) == null ? void 0 : l.text) !== void 0 ? t.value.text : "Confirm";
|
|
1060
|
+
if (e[$]) {
|
|
1061
|
+
if (s - e[$].initTime < 300)
|
|
1062
1062
|
return;
|
|
1063
|
-
e[
|
|
1063
|
+
e[$].resetHandler(), e.dispatchEvent(new Event("confirm"));
|
|
1064
1064
|
return;
|
|
1065
1065
|
}
|
|
1066
1066
|
n.preventDefault(), n.stopImmediatePropagation();
|
|
@@ -1069,84 +1069,84 @@ function an(e, t) {
|
|
|
1069
1069
|
preconfirmHtml: e.innerHTML,
|
|
1070
1070
|
resetHandler: () => {
|
|
1071
1071
|
var a;
|
|
1072
|
-
i && (e.innerHTML = o.preconfirmHtml), (a = t.value) != null && a.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", o.resetHandler), delete e[
|
|
1072
|
+
i && (e.innerHTML = o.preconfirmHtml), (a = t.value) != null && a.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", o.resetHandler), delete e[$];
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
|
-
e[
|
|
1075
|
+
e[$] = o, i && (e.innerHTML = i), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", o.resetHandler);
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1079
|
-
beforeMount:
|
|
1078
|
+
const mn = {
|
|
1079
|
+
beforeMount: vn
|
|
1080
1080
|
};
|
|
1081
|
-
function
|
|
1081
|
+
function vn(e) {
|
|
1082
1082
|
e.addEventListener("blur", () => {
|
|
1083
1083
|
let t = e.value;
|
|
1084
|
-
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" +
|
|
1084
|
+
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + J(/* @__PURE__ */ new Date(), "yy"));
|
|
1085
1085
|
const n = Date.parse(t);
|
|
1086
|
-
isNaN(n) ? e.value = "" : e.value =
|
|
1086
|
+
isNaN(n) ? e.value = "" : e.value = J(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
const
|
|
1090
|
-
beforeMount:
|
|
1091
|
-
updated:
|
|
1089
|
+
const yn = {
|
|
1090
|
+
beforeMount: ge,
|
|
1091
|
+
updated: ge
|
|
1092
1092
|
};
|
|
1093
|
-
function
|
|
1094
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1093
|
+
function ge(e, t) {
|
|
1094
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = gn(e, t));
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function gn(e, t) {
|
|
1097
1097
|
var a, p;
|
|
1098
1098
|
if (!t.value)
|
|
1099
1099
|
return ((a = e.attributes.getNamedItem("placeholder")) == null ? void 0 : a.value) ?? "";
|
|
1100
1100
|
let n = "";
|
|
1101
1101
|
const s = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? s.replace(/Z$/, "") : s.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(i);
|
|
1102
1102
|
e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
|
|
1103
|
-
let
|
|
1104
|
-
if (!
|
|
1103
|
+
let l = (p = e.attributes.getNamedItem("format")) == null ? void 0 : p.value;
|
|
1104
|
+
if (!l && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1105
1105
|
const g = /* @__PURE__ */ new Date();
|
|
1106
|
-
g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at",
|
|
1106
|
+
g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", l = "HH:mm");
|
|
1107
1107
|
}
|
|
1108
|
-
|
|
1109
|
-
let
|
|
1110
|
-
return n && (
|
|
1108
|
+
l || (e.attributes.getNamedItem("date-only") !== null ? l = I.defaultDateFormat : l = I.defaultDateTimeFormat);
|
|
1109
|
+
let r = J(o, l);
|
|
1110
|
+
return n && (r = n + " " + r), r;
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1113
|
-
beforeMount:
|
|
1114
|
-
updated:
|
|
1115
|
-
unmounted:
|
|
1112
|
+
const En = {
|
|
1113
|
+
beforeMount: Ee,
|
|
1114
|
+
updated: Ee,
|
|
1115
|
+
unmounted: wn
|
|
1116
1116
|
};
|
|
1117
|
-
function
|
|
1117
|
+
function Ee(e, t) {
|
|
1118
1118
|
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");
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function wn(e) {
|
|
1121
1121
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1122
1122
|
}
|
|
1123
|
-
const
|
|
1124
|
-
beforeMount:
|
|
1125
|
-
updated:
|
|
1126
|
-
unmounted:
|
|
1127
|
-
},
|
|
1128
|
-
function
|
|
1129
|
-
|
|
1130
|
-
}
|
|
1131
|
-
setInterval(
|
|
1132
|
-
function
|
|
1133
|
-
var
|
|
1123
|
+
const Tn = {
|
|
1124
|
+
beforeMount: we,
|
|
1125
|
+
updated: we,
|
|
1126
|
+
unmounted: Be
|
|
1127
|
+
}, _ = Symbol("HasAutoFocused"), ce = [];
|
|
1128
|
+
function On() {
|
|
1129
|
+
ce.forEach($e);
|
|
1130
|
+
}
|
|
1131
|
+
setInterval(On, 1e3);
|
|
1132
|
+
function we(e, t) {
|
|
1133
|
+
var l;
|
|
1134
1134
|
if (t.value == t.oldValue) return;
|
|
1135
|
-
if (!t.value) return
|
|
1136
|
-
const n = new Date(t.value), s = (
|
|
1137
|
-
e[
|
|
1135
|
+
if (!t.value) return Be(e);
|
|
1136
|
+
const n = new Date(t.value), s = (l = e.attributes.getNamedItem("base-time")) == null ? void 0 : l.value, i = n.getTime() - (s ? new Date(s).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
|
|
1137
|
+
e[_] || ce.push(e), e[_] = {
|
|
1138
1138
|
startTs: i,
|
|
1139
1139
|
includeSeconds: o
|
|
1140
|
-
},
|
|
1140
|
+
}, $e(e);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const t = e[
|
|
1144
|
-
e.innerText =
|
|
1142
|
+
function $e(e) {
|
|
1143
|
+
const t = e[_], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1144
|
+
e.innerText = bn(n, t.includeSeconds);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
e[
|
|
1146
|
+
function Be(e) {
|
|
1147
|
+
e[_] && (nt(ce, e), delete e[_]), e.innerText = "-";
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function bn(e, t) {
|
|
1150
1150
|
const n = [], s = Math.floor(e / 86400);
|
|
1151
1151
|
s && n.push(s + "d"), e -= s * 86400;
|
|
1152
1152
|
const i = Math.floor(e / 3600);
|
|
@@ -1154,31 +1154,57 @@ function yn(e, t) {
|
|
|
1154
1154
|
const o = Math.floor(e / 60);
|
|
1155
1155
|
return (s || i || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
|
|
1156
1156
|
}
|
|
1157
|
-
const
|
|
1157
|
+
const kn = {
|
|
1158
|
+
mounted: Ve,
|
|
1159
|
+
updated: Sn,
|
|
1160
|
+
unmounted: Fe
|
|
1161
|
+
}, C = /* @__PURE__ */ new Map();
|
|
1162
|
+
function Ve(e, t) {
|
|
1163
|
+
C.size === 0 && window.addEventListener("keydown", Re), C.set(t.value.toLowerCase(), [...C.get(t.value.toLowerCase()) ?? [], e]);
|
|
1164
|
+
}
|
|
1165
|
+
function Fe(e, t) {
|
|
1166
|
+
const n = C.get(t.value.toLowerCase());
|
|
1167
|
+
if (n) {
|
|
1168
|
+
const s = n.indexOf(e);
|
|
1169
|
+
s !== -1 && n.splice(s, 1), n.length === 0 && C.delete(t.value.toLowerCase());
|
|
1170
|
+
}
|
|
1171
|
+
C.size === 0 && window.removeEventListener("keydown", Re);
|
|
1172
|
+
}
|
|
1173
|
+
function Sn(e, t) {
|
|
1174
|
+
Fe(e, t), Ve(e, t);
|
|
1175
|
+
}
|
|
1176
|
+
function Re(e) {
|
|
1177
|
+
const t = e.key.toLowerCase(), n = C.get(t);
|
|
1178
|
+
if (n) {
|
|
1179
|
+
const s = st(n);
|
|
1180
|
+
s == null || s.click(), e.preventDefault();
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
const B = Symbol("InfiniteScrollHandler"), Cn = {
|
|
1158
1184
|
mounted(e, t) {
|
|
1159
|
-
e[
|
|
1185
|
+
e[B] = new F(e, t.value);
|
|
1160
1186
|
},
|
|
1161
1187
|
updated(e, t) {
|
|
1162
1188
|
var n;
|
|
1163
|
-
(n = e[
|
|
1189
|
+
(n = e[B]) == null || n.uninstall(), e[B] = new F(e, t.value);
|
|
1164
1190
|
},
|
|
1165
1191
|
unmounted(e) {
|
|
1166
1192
|
var t;
|
|
1167
|
-
(t = e[
|
|
1193
|
+
(t = e[B]) == null || t.uninstall(), delete e[B];
|
|
1168
1194
|
}
|
|
1169
|
-
},
|
|
1170
|
-
beforeMount:
|
|
1171
|
-
updated:
|
|
1195
|
+
}, Ln = {
|
|
1196
|
+
beforeMount: Te,
|
|
1197
|
+
updated: Te
|
|
1172
1198
|
};
|
|
1173
|
-
function
|
|
1199
|
+
function Te(e, t) {
|
|
1174
1200
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1175
1201
|
}
|
|
1176
|
-
const
|
|
1177
|
-
mounted:
|
|
1178
|
-
updated:
|
|
1179
|
-
unmounted:
|
|
1180
|
-
},
|
|
1181
|
-
function
|
|
1202
|
+
const xn = {
|
|
1203
|
+
mounted: Oe,
|
|
1204
|
+
updated: Oe,
|
|
1205
|
+
unmounted: Ne
|
|
1206
|
+
}, R = Symbol("TooltipState");
|
|
1207
|
+
function Oe(e, t) {
|
|
1182
1208
|
var s;
|
|
1183
1209
|
let n = ((s = e.attributes.getNamedItem("tip")) == null ? void 0 : s.value) ?? t.value;
|
|
1184
1210
|
if (t.value || (n = null), n) {
|
|
@@ -1186,15 +1212,15 @@ function Te(e, t) {
|
|
|
1186
1212
|
content: n,
|
|
1187
1213
|
html: e.getAttribute("html") !== null
|
|
1188
1214
|
};
|
|
1189
|
-
e[
|
|
1215
|
+
e[R] ? e[R].configure(i) : e[R] = new Mn(e, i);
|
|
1190
1216
|
} else
|
|
1191
|
-
|
|
1217
|
+
Ne(e);
|
|
1192
1218
|
}
|
|
1193
|
-
function
|
|
1219
|
+
function Ne(e) {
|
|
1194
1220
|
var t;
|
|
1195
|
-
(t = e[
|
|
1221
|
+
(t = e[R]) == null || t.destroy(), delete e[R];
|
|
1196
1222
|
}
|
|
1197
|
-
class
|
|
1223
|
+
class Mn {
|
|
1198
1224
|
constructor(t, n) {
|
|
1199
1225
|
E(this, "lastMoveEvt");
|
|
1200
1226
|
E(this, "checkInterval");
|
|
@@ -1231,8 +1257,8 @@ class wn {
|
|
|
1231
1257
|
}
|
|
1232
1258
|
handleMouseMove(t) {
|
|
1233
1259
|
const n = this.tipEl.offsetWidth, s = this.tipEl.offsetHeight, i = window.innerWidth, o = window.innerHeight;
|
|
1234
|
-
let
|
|
1235
|
-
|
|
1260
|
+
let l = t.pageX + 10, r = t.pageY + 20;
|
|
1261
|
+
l + n > i && (l = t.pageX - 5 - n), r + s > o && (r = t.pageY - 5 - s), this.tipEl.style.left = l + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
|
|
1236
1262
|
}
|
|
1237
1263
|
checkMoveEvent() {
|
|
1238
1264
|
var t;
|
|
@@ -1242,59 +1268,59 @@ class wn {
|
|
|
1242
1268
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
1243
1269
|
}
|
|
1244
1270
|
}
|
|
1245
|
-
function
|
|
1246
|
-
e.directive("autofocus",
|
|
1271
|
+
function In(e) {
|
|
1272
|
+
e.directive("autofocus", hn), e.directive("confirm-button", fn), e.directive("date-input", mn), e.directive("datetime", yn), e.directive("disabled", En), e.directive("duration", Tn), e.directive("hotkey", kn), e.directive("infinite-scroll", Cn), e.directive("readonly", Ln), e.directive("tooltip", xn);
|
|
1247
1273
|
}
|
|
1248
|
-
function
|
|
1249
|
-
|
|
1274
|
+
function ls(e) {
|
|
1275
|
+
In(e);
|
|
1250
1276
|
}
|
|
1251
1277
|
export {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1278
|
+
Rn as OverlayContainer,
|
|
1279
|
+
X as UserError,
|
|
1280
|
+
Fn as VfAjaxSelect,
|
|
1281
|
+
Y as VfAlertModal,
|
|
1282
|
+
Zn as VfEzSmartSelect,
|
|
1283
|
+
kt as VfModal,
|
|
1284
|
+
Pt as VfSmartSelect,
|
|
1285
|
+
ns as cloneProp,
|
|
1286
|
+
Wn as configureVf,
|
|
1287
|
+
Qn as createFilters,
|
|
1288
|
+
oe as createOverlayInjection,
|
|
1289
|
+
Dt as desnakeCase,
|
|
1290
|
+
mt as dismissOverlayInjectionById,
|
|
1291
|
+
Nn as dismissOverlayInjectionByInstance,
|
|
1292
|
+
Me as dismissOverlayInjectionByInternalInstance,
|
|
1293
|
+
pt as dismissOverlayInjectionByVnode,
|
|
1294
|
+
ds as escapeHtml,
|
|
1295
|
+
yt as formatError,
|
|
1296
|
+
cn as formatNumber,
|
|
1297
|
+
At as formatPhone,
|
|
1298
|
+
$t as formatUSCurrency,
|
|
1299
|
+
Pn as handleError,
|
|
1300
|
+
Un as handleErrorAndAlert,
|
|
1301
|
+
is as installApiClientInterceptors,
|
|
1302
|
+
ls as installVf,
|
|
1303
|
+
qn as maskComponent,
|
|
1304
|
+
gt as maskEl,
|
|
1305
|
+
Et as maskForm,
|
|
1306
|
+
Xn as nl2br,
|
|
1307
|
+
ss as nullifyEmptyInputs,
|
|
1308
|
+
re as presentOverlay,
|
|
1309
|
+
q as removeOverlayInjection,
|
|
1310
|
+
Jn as replaceElement,
|
|
1311
|
+
vt as showAlert,
|
|
1312
|
+
_n as showConfirm,
|
|
1313
|
+
Kn as showConfirmDestroy,
|
|
1314
|
+
es as showContextMenu,
|
|
1315
|
+
Gn as showToast,
|
|
1316
|
+
jn as showWait,
|
|
1317
|
+
an as sleep,
|
|
1318
|
+
ts as sleepSecs,
|
|
1319
|
+
le as toError,
|
|
1320
|
+
zn as unmaskComponent,
|
|
1321
|
+
Ie as unmaskEl,
|
|
1322
|
+
He as unmaskForm,
|
|
1323
|
+
os as useInfiniteScroll,
|
|
1324
|
+
rs as useResizeWatcher,
|
|
1325
|
+
Yn as uuid
|
|
1300
1326
|
};
|