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