@signal24/vue-foundation 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-foundation.es.js +247 -247
- package/package.json +1 -1
- package/src/helpers/context-menu.ts +2 -3
|
@@ -1,16 +1,16 @@
|
|
|
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 Re, defineEmits as Ne, ref as w, computed as K, openBlock as d, createElementBlock as f, createElementVNode as k, toDisplayString as H, withDirectives as U, createCommentVNode as b, Fragment as j, renderList as Q, vModelSelect as Ke, getCurrentInstance as J, onMounted as B, normalizeClass as T, normalizeStyle as Ue, withModifiers as Oe, renderSlot as N, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ee, resolveDirective as be, createBlock as Te, createSlots as qe, withCtx as X, createTextVNode as oe, vModelText as ze, watch as le, onActivated as we, onDeactivated as ke } from "vue";
|
|
5
|
+
import { debounce as Xe, isEqual as Se, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
|
|
6
6
|
import { escapeHtml as Je } from "@vue/shared";
|
|
7
7
|
import { escapeHtml as Zn } from "@vue/shared";
|
|
8
|
-
import { format as
|
|
9
|
-
const et =
|
|
8
|
+
import { format as Z } from "date-fns";
|
|
9
|
+
const et = S({
|
|
10
10
|
setup() {
|
|
11
11
|
const e = Re();
|
|
12
12
|
Ne(["update:modelValue"]);
|
|
13
|
-
const t = w(null), n =
|
|
13
|
+
const t = w(null), n = K(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = w(e.modelValue ?? null);
|
|
14
14
|
return { props: e, options: t, renderOptions: n, selectedItem: i };
|
|
15
15
|
},
|
|
16
16
|
watch: {
|
|
@@ -32,7 +32,7 @@ const et = x({
|
|
|
32
32
|
this.options = await this.props.loadFn();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), xe = (e, t) => {
|
|
36
36
|
const n = e.__vccOpts || e;
|
|
37
37
|
for (const [i, s] of t)
|
|
38
38
|
n[i] = s;
|
|
@@ -45,62 +45,62 @@ const et = x({
|
|
|
45
45
|
value: null
|
|
46
46
|
}, it = ["value"];
|
|
47
47
|
function st(e, t, n, i, s, o) {
|
|
48
|
-
return e.renderOptions ?
|
|
48
|
+
return e.renderOptions ? U((d(), f("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(), f("option", nt, H(e.props.nullText), 1)) : b("", !0),
|
|
53
|
+
(d(!0), f(j, null, Q(e.renderOptions, (r, l) => {
|
|
54
54
|
var c;
|
|
55
|
-
return
|
|
55
|
+
return d(), f("option", {
|
|
56
56
|
key: l,
|
|
57
57
|
value: (c = e.options) == null ? void 0 : c[l]
|
|
58
58
|
}, H(r), 9, it);
|
|
59
59
|
}), 128))
|
|
60
60
|
], 512)), [
|
|
61
61
|
[Ke, e.selectedItem]
|
|
62
|
-
]) : (
|
|
62
|
+
]) : (d(), f("select", tt, [
|
|
63
63
|
k("option", null, H(e.props.loadingText || "Loading..."), 1)
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
|
-
const kn = /* @__PURE__ */
|
|
66
|
+
const kn = /* @__PURE__ */ xe(et, [["render", st]]), 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, i = w({ visibility: "hidden", top: "0", left: "0" }), s = w([]), o =
|
|
73
|
+
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = w({ visibility: "hidden", top: "0", left: "0" }), s = w([]), o = J();
|
|
74
74
|
B(r);
|
|
75
75
|
function r() {
|
|
76
|
-
const
|
|
77
|
-
i.value =
|
|
76
|
+
const y = o.vnode.el, { styles: u, classes: a } = l(y, n);
|
|
77
|
+
i.value = u, s.value = a;
|
|
78
78
|
}
|
|
79
|
-
function l(
|
|
80
|
-
const a = t.anchor instanceof HTMLElement ? {} : t.anchor,
|
|
81
|
-
a.matchWidth && (
|
|
82
|
-
const
|
|
83
|
-
let E,
|
|
79
|
+
function l(y, u) {
|
|
80
|
+
const a = t.anchor instanceof HTMLElement ? {} : t.anchor, m = u.getBoundingClientRect(), p = y.getBoundingClientRect();
|
|
81
|
+
a.matchWidth && (p.width = m.width), a.matchHeight && (p.height = m.height);
|
|
82
|
+
const h = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
|
|
83
|
+
let E, x;
|
|
84
84
|
if (a.y === "center")
|
|
85
|
-
E =
|
|
85
|
+
E = m.top + m.height / 2 - p.height / 2, h.push("anchored-center-y");
|
|
86
86
|
else {
|
|
87
|
-
const L = (
|
|
88
|
-
E = L ?
|
|
87
|
+
const L = (m.bottom + p.height < window.innerHeight || a.y === "below") && a.y !== "above";
|
|
88
|
+
E = L ? m.bottom : m.top - p.height, h.push(L ? "anchored-top" : "anchored-bottom");
|
|
89
89
|
}
|
|
90
90
|
if (a.x === "center")
|
|
91
|
-
|
|
91
|
+
x = m.left + m.width / 2 - p.width / 2, h.push("anchored-center-x");
|
|
92
92
|
else {
|
|
93
|
-
const L = (
|
|
94
|
-
|
|
93
|
+
const L = (m.left + p.width < window.innerWidth || a.x === "left") && a.x !== "right";
|
|
94
|
+
x = L ? m.left : m.right - p.width, h.push(L ? "anchored-left" : "anchored-right");
|
|
95
95
|
}
|
|
96
96
|
return {
|
|
97
97
|
styles: {
|
|
98
98
|
top: `${E}px`,
|
|
99
|
-
left: `${
|
|
100
|
-
...a.matchWidth ? { width: `${
|
|
101
|
-
...a.matchHeight ? { height: `${
|
|
99
|
+
left: `${x}px`,
|
|
100
|
+
...a.matchWidth ? { width: `${p.width}px` } : {},
|
|
101
|
+
...a.matchHeight ? { height: `${p.height}px` } : {}
|
|
102
102
|
},
|
|
103
|
-
classes:
|
|
103
|
+
classes: h
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
function c() {
|
|
@@ -110,27 +110,27 @@ const kn = /* @__PURE__ */ Se(et, [["render", st]]), ot = ["onClick"], lt = /* @
|
|
|
110
110
|
setTimeout(() => {
|
|
111
111
|
window.addEventListener("click", c);
|
|
112
112
|
}, 10);
|
|
113
|
-
}), (
|
|
113
|
+
}), (y, u) => (d(), f("div", {
|
|
114
114
|
class: T(["vf-overlay-anchor", s.value]),
|
|
115
115
|
style: Ue(i.value),
|
|
116
|
-
onClick:
|
|
116
|
+
onClick: Oe(c, ["stop"])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
118
|
+
N(y.$slots, "default")
|
|
119
119
|
], 14, ot));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
let rt = 0;
|
|
123
|
-
const O = je([]), Sn =
|
|
123
|
+
const O = je([]), Sn = S({
|
|
124
124
|
setup() {
|
|
125
|
-
return () =>
|
|
126
|
-
|
|
125
|
+
return () => W("div", [
|
|
126
|
+
Q(O, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
127
127
|
]);
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
function
|
|
130
|
+
function Le(e, t, n) {
|
|
131
131
|
const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
132
132
|
i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
|
|
133
|
-
const s = String(++rt), o = Pe(e), r =
|
|
133
|
+
const s = String(++rt), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, c = {
|
|
134
134
|
id: s,
|
|
135
135
|
component: o,
|
|
136
136
|
props: t,
|
|
@@ -141,9 +141,9 @@ function xe(e, t, n) {
|
|
|
141
141
|
return O.push(c), c;
|
|
142
142
|
}
|
|
143
143
|
function xn(e) {
|
|
144
|
-
|
|
144
|
+
Ce(e.$);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Ce(e) {
|
|
147
147
|
let t = e;
|
|
148
148
|
for (; t && !at(t.vnode); )
|
|
149
149
|
t = t.parent;
|
|
@@ -156,47 +156,47 @@ function ct(e) {
|
|
|
156
156
|
const t = O.findIndex((n) => n.id === e);
|
|
157
157
|
return t >= 0 ? (O[t].props.callback(), !0) : !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Me(e) {
|
|
160
160
|
const t = O.indexOf(e);
|
|
161
161
|
t >= 0 && O.splice(t, 1);
|
|
162
162
|
}
|
|
163
|
-
async function
|
|
163
|
+
async function te(e, t, n) {
|
|
164
164
|
return new Promise((i) => {
|
|
165
165
|
let s = null;
|
|
166
166
|
const r = { ...t, callback: (l) => {
|
|
167
|
-
|
|
167
|
+
Me(s), i(l);
|
|
168
168
|
} };
|
|
169
|
-
s =
|
|
169
|
+
s = Le(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 re(e, t) {
|
|
176
|
+
await te(z, P(e, t));
|
|
177
177
|
}
|
|
178
178
|
async function Ln(e, t) {
|
|
179
|
-
return await
|
|
180
|
-
...
|
|
179
|
+
return await te(z, {
|
|
180
|
+
...P(e, t),
|
|
181
181
|
shouldConfirm: !0
|
|
182
182
|
}) === !0;
|
|
183
183
|
}
|
|
184
184
|
async function Cn(e, t) {
|
|
185
|
-
return await
|
|
186
|
-
...
|
|
185
|
+
return await te(z, {
|
|
186
|
+
...P(e, t),
|
|
187
187
|
shouldConfirm: !0,
|
|
188
188
|
classes: ["destructive"]
|
|
189
189
|
}) === !0;
|
|
190
190
|
}
|
|
191
191
|
function Mn(e, t) {
|
|
192
|
-
const n =
|
|
193
|
-
...
|
|
192
|
+
const n = Le(z, {
|
|
193
|
+
...P(e, t),
|
|
194
194
|
isBare: !0,
|
|
195
195
|
classes: ["wait"],
|
|
196
196
|
callback: () => {
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
-
return () =>
|
|
199
|
+
return () => Me(n);
|
|
200
200
|
}
|
|
201
201
|
const V = {
|
|
202
202
|
unhandledErrorSupportText: "please contact support",
|
|
@@ -206,28 +206,28 @@ const V = {
|
|
|
206
206
|
function In(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
|
+
${ne(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 ne(e) {
|
|
222
222
|
return e instanceof Error ? e : new Error(String(e));
|
|
223
223
|
}
|
|
224
224
|
async function Hn(e, t) {
|
|
225
|
-
const n =
|
|
226
|
-
return n instanceof
|
|
225
|
+
const n = ne(e);
|
|
226
|
+
return n instanceof q || V.errorHandler(n), t ? re(t, n) : re(n);
|
|
227
227
|
}
|
|
228
228
|
async function Dn(e) {
|
|
229
|
-
const t =
|
|
230
|
-
t instanceof
|
|
229
|
+
const t = ne(e);
|
|
230
|
+
t instanceof q || V.errorHandler(t);
|
|
231
231
|
}
|
|
232
232
|
const D = Symbol("MaskState");
|
|
233
233
|
function An(e, t) {
|
|
@@ -236,36 +236,36 @@ function An(e, t) {
|
|
|
236
236
|
}
|
|
237
237
|
function $n(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 i = e instanceof Element ? e :
|
|
253
|
+
const i = e instanceof Element ? e : De(e);
|
|
254
254
|
i.classList.add("vf-masked");
|
|
255
255
|
const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = s.tagName === "INPUT" ? s.value : s.innerHTML;
|
|
256
256
|
s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...";
|
|
257
257
|
const l = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
258
|
-
return l.forEach((c) => c.setAttribute("disabled", "disabled")), i[
|
|
258
|
+
return l.forEach((c) => c.setAttribute("disabled", "disabled")), i[G] = {
|
|
259
259
|
disabledElements: l,
|
|
260
260
|
waitButton: s,
|
|
261
261
|
buttonHtml: o
|
|
262
|
-
}, () =>
|
|
263
|
-
}
|
|
264
|
-
function Ie(e) {
|
|
265
|
-
const t = e instanceof Element ? e : He(e), n = t[Z];
|
|
266
|
-
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Z]);
|
|
262
|
+
}, () => He(i);
|
|
267
263
|
}
|
|
268
264
|
function He(e) {
|
|
265
|
+
const t = e instanceof Element ? e : De(e), n = t[G];
|
|
266
|
+
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[G]);
|
|
267
|
+
}
|
|
268
|
+
function De(e) {
|
|
269
269
|
const t = e.$.vnode.el;
|
|
270
270
|
return t.tagName === "FORM" ? t : t.querySelector("form");
|
|
271
271
|
}
|
|
@@ -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,13 +286,13 @@ const ft = ["id"], pt = {
|
|
|
286
286
|
},
|
|
287
287
|
emits: ["formSubmit"],
|
|
288
288
|
setup(e, { expose: t }) {
|
|
289
|
-
const n = e, i =
|
|
290
|
-
t({ mask:
|
|
289
|
+
const n = e, i = J();
|
|
290
|
+
t({ mask: y, unmask: u });
|
|
291
291
|
const s = w(), o = w();
|
|
292
292
|
B(() => {
|
|
293
293
|
var a;
|
|
294
294
|
document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", l), (a = s.value) == null || a.addEventListener("click", r));
|
|
295
|
-
}),
|
|
295
|
+
}), ee(() => {
|
|
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) {
|
|
@@ -300,20 +300,20 @@ const ft = ["id"], pt = {
|
|
|
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] === s.value && c();
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
function c() {
|
|
308
|
-
|
|
308
|
+
Ce(i);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function y() {
|
|
311
311
|
ht(o.value);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
|
|
313
|
+
function u() {
|
|
314
|
+
He(o.value);
|
|
315
315
|
}
|
|
316
|
-
return (a,
|
|
316
|
+
return (a, m) => (d(), f("div", {
|
|
317
317
|
id: a.id,
|
|
318
318
|
class: T(["vf-overlay vf-modal-wrap", n.class]),
|
|
319
319
|
ref_key: "overlay",
|
|
@@ -322,29 +322,29 @@ const ft = ["id"], pt = {
|
|
|
322
322
|
k("form", {
|
|
323
323
|
action: ".",
|
|
324
324
|
class: T(["vf-modal", { scrolls: a.scrolls }]),
|
|
325
|
-
onSubmit:
|
|
325
|
+
onSubmit: m[0] || (m[0] = Oe((p) => a.$emit("formSubmit"), ["prevent"])),
|
|
326
326
|
ref_key: "form",
|
|
327
327
|
ref: o
|
|
328
328
|
}, [
|
|
329
|
-
a.$slots.header ? (
|
|
330
|
-
|
|
331
|
-
n.closeX ? (
|
|
329
|
+
a.$slots.header ? (d(), f("div", pt, [
|
|
330
|
+
N(a.$slots, "header"),
|
|
331
|
+
n.closeX ? (d(), f("i", {
|
|
332
332
|
key: 0,
|
|
333
333
|
class: "close",
|
|
334
334
|
onClick: c
|
|
335
335
|
})) : b("", !0)
|
|
336
336
|
])) : b("", !0),
|
|
337
337
|
k("div", mt, [
|
|
338
|
-
|
|
338
|
+
N(a.$slots, "default")
|
|
339
339
|
]),
|
|
340
|
-
a.$slots.footer ? (
|
|
341
|
-
|
|
340
|
+
a.$slots.footer ? (d(), f("div", vt, [
|
|
341
|
+
N(a.$slots, "footer")
|
|
342
342
|
])) : b("", !0)
|
|
343
343
|
], 34)
|
|
344
344
|
], 10, ft));
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
const gt = ["innerHtml"], Et = ["innerText"],
|
|
347
|
+
const gt = ["innerHtml"], Et = ["innerText"], z = /* @__PURE__ */ S({
|
|
348
348
|
__name: "alert-modal",
|
|
349
349
|
props: {
|
|
350
350
|
isBare: { type: Boolean },
|
|
@@ -356,18 +356,18 @@ const gt = ["innerHtml"], Et = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
356
356
|
callback: { type: Function }
|
|
357
357
|
},
|
|
358
358
|
setup(e) {
|
|
359
|
-
const t = e, n =
|
|
359
|
+
const t = e, n = K(() => t.message instanceof Error ? dt(t.message) : t.message);
|
|
360
360
|
return (i, s) => {
|
|
361
|
-
const o =
|
|
362
|
-
return
|
|
361
|
+
const o = be("autofocus");
|
|
362
|
+
return d(), Te(yt, {
|
|
363
363
|
class: T(["vf-alert", i.classes])
|
|
364
364
|
}, qe({
|
|
365
|
-
default:
|
|
366
|
-
i.isHtml ? (
|
|
365
|
+
default: X(() => [
|
|
366
|
+
i.isHtml ? (d(), f("div", {
|
|
367
367
|
key: 0,
|
|
368
368
|
innerHtml: i.message,
|
|
369
369
|
class: "user-message"
|
|
370
|
-
}, null, 8, gt)) : (
|
|
370
|
+
}, null, 8, gt)) : (d(), f("div", {
|
|
371
371
|
key: 1,
|
|
372
372
|
innerText: n.value
|
|
373
373
|
}, null, 8, Et))
|
|
@@ -376,20 +376,20 @@ const gt = ["innerHtml"], Et = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
376
376
|
}, [
|
|
377
377
|
i.title ? {
|
|
378
378
|
name: "header",
|
|
379
|
-
fn:
|
|
379
|
+
fn: X(() => [
|
|
380
380
|
k("h1", null, H(i.title), 1)
|
|
381
381
|
]),
|
|
382
382
|
key: "0"
|
|
383
383
|
} : void 0,
|
|
384
384
|
i.isBare ? void 0 : {
|
|
385
385
|
name: "footer",
|
|
386
|
-
fn:
|
|
387
|
-
i.shouldConfirm ? (
|
|
388
|
-
|
|
386
|
+
fn: X(() => [
|
|
387
|
+
i.shouldConfirm ? (d(), f(j, { key: 0 }, [
|
|
388
|
+
U((d(), f("button", {
|
|
389
389
|
class: "primary",
|
|
390
390
|
onClick: s[0] || (s[0] = () => i.callback(!0))
|
|
391
391
|
}, [
|
|
392
|
-
|
|
392
|
+
oe("Confirm")
|
|
393
393
|
])), [
|
|
394
394
|
[o]
|
|
395
395
|
]),
|
|
@@ -397,12 +397,12 @@ const gt = ["innerHtml"], Et = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
397
397
|
class: "default",
|
|
398
398
|
onClick: s[1] || (s[1] = () => i.callback(!1))
|
|
399
399
|
}, "Cancel")
|
|
400
|
-
], 64)) :
|
|
400
|
+
], 64)) : U((d(), f("button", {
|
|
401
401
|
key: 1,
|
|
402
402
|
class: "default",
|
|
403
403
|
onClick: s[2] || (s[2] = () => i.callback(!0))
|
|
404
404
|
}, [
|
|
405
|
-
|
|
405
|
+
oe("OK")
|
|
406
406
|
])), [
|
|
407
407
|
[o]
|
|
408
408
|
])
|
|
@@ -413,25 +413,25 @@ const gt = ["innerHtml"], Et = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
|
-
let
|
|
416
|
+
let R;
|
|
417
417
|
const Ot = new Uint8Array(16);
|
|
418
418
|
function bt() {
|
|
419
|
-
if (!
|
|
419
|
+
if (!R && (R = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))
|
|
420
420
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
421
|
-
return
|
|
421
|
+
return R(Ot);
|
|
422
422
|
}
|
|
423
|
-
const
|
|
423
|
+
const g = [];
|
|
424
424
|
for (let e = 0; e < 256; ++e)
|
|
425
|
-
|
|
425
|
+
g.push((e + 256).toString(16).slice(1));
|
|
426
426
|
function Tt(e, t = 0) {
|
|
427
|
-
return (
|
|
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 wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
429
|
+
const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ae = {
|
|
430
430
|
randomUUID: wt
|
|
431
431
|
};
|
|
432
432
|
function kt(e, t, n) {
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
433
|
+
if (ae.randomUUID && !t && !e)
|
|
434
|
+
return ae.randomUUID();
|
|
435
435
|
e = e || {};
|
|
436
436
|
const i = e.random || (e.rng || bt)();
|
|
437
437
|
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
|
@@ -458,7 +458,7 @@ function Lt(e) {
|
|
|
458
458
|
function _n() {
|
|
459
459
|
return kt();
|
|
460
460
|
}
|
|
461
|
-
const C = Symbol("null"),
|
|
461
|
+
const C = Symbol("null"), ce = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Mt = {
|
|
462
462
|
props: {
|
|
463
463
|
modelValue: {
|
|
464
464
|
type: null,
|
|
@@ -537,8 +537,8 @@ const C = Symbol("null"), ae = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@
|
|
|
537
537
|
return this.allOptions.map((e, t) => {
|
|
538
538
|
var l, c;
|
|
539
539
|
const n = this.formatter(e), i = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), s = n ? n.trim().toLowerCase() : "", o = i ? i.trim().toLowerCase() : "", r = [];
|
|
540
|
-
return this.searchFields ? this.searchFields.forEach((
|
|
541
|
-
e[
|
|
540
|
+
return this.searchFields ? this.searchFields.forEach((y) => {
|
|
541
|
+
e[y] && r.push(String(e[y]).toLowerCase());
|
|
542
542
|
}) : (r.push(s), 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),
|
|
@@ -564,7 +564,7 @@ const C = Symbol("null"), ae = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@
|
|
|
564
564
|
subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
|
|
565
565
|
};
|
|
566
566
|
}), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
|
|
567
|
-
key:
|
|
567
|
+
key: ce,
|
|
568
568
|
title: "Create <strong>" + this.searchText.trim() + "</strong>..."
|
|
569
569
|
}));
|
|
570
570
|
}
|
|
@@ -668,7 +668,7 @@ const C = Symbol("null"), ae = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@
|
|
|
668
668
|
const t = this.effectiveOptions.find((i) => i.ref === e);
|
|
669
669
|
if (t)
|
|
670
670
|
return t;
|
|
671
|
-
const n = this.effectiveOptions.find((i) =>
|
|
671
|
+
const n = this.effectiveOptions.find((i) => Se(i.ref, e));
|
|
672
672
|
return n || null;
|
|
673
673
|
},
|
|
674
674
|
handleInputBlurred() {
|
|
@@ -708,7 +708,7 @@ const C = Symbol("null"), ae = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@
|
|
|
708
708
|
selectOption(e) {
|
|
709
709
|
if (this.isSearching = !1, e.key == C)
|
|
710
710
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
|
|
711
|
-
else if (e.key ===
|
|
711
|
+
else if (e.key === ce) {
|
|
712
712
|
const t = this.searchText.trim();
|
|
713
713
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, this.$emit("createItem", t);
|
|
714
714
|
} else {
|
|
@@ -737,11 +737,11 @@ const It = ["placeholder"], Ht = {
|
|
|
737
737
|
class: "no-results"
|
|
738
738
|
};
|
|
739
739
|
function Vt(e, t, n, i, s, o) {
|
|
740
|
-
const r =
|
|
741
|
-
return
|
|
740
|
+
const r = be("disabled");
|
|
741
|
+
return d(), f("div", {
|
|
742
742
|
class: T(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
|
|
743
743
|
}, [
|
|
744
|
-
|
|
744
|
+
U(k("input", {
|
|
745
745
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
|
|
746
746
|
ref: "searchField",
|
|
747
747
|
type: "text",
|
|
@@ -754,9 +754,9 @@ 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(), f("div", Ht, [
|
|
758
|
+
e.isLoaded ? (d(), f(j, { key: 1 }, [
|
|
759
|
+
(d(!0), f(j, null, Q(o.effectiveOptions, (l) => (d(), f("div", {
|
|
760
760
|
key: String(l.key),
|
|
761
761
|
class: T(["option", {
|
|
762
762
|
highlighted: e.highlightedOptionKey === l.key
|
|
@@ -768,18 +768,18 @@ function Vt(e, t, n, i, s, o) {
|
|
|
768
768
|
class: "title",
|
|
769
769
|
innerHTML: l.title
|
|
770
770
|
}, null, 8, $t),
|
|
771
|
-
l.subtitle ? (
|
|
771
|
+
l.subtitle ? (d(), f("div", {
|
|
772
772
|
key: 0,
|
|
773
773
|
class: "subtitle",
|
|
774
774
|
innerHTML: l.subtitle
|
|
775
775
|
}, null, 8, Bt)) : b("", !0)
|
|
776
776
|
], 42, At))), 128)),
|
|
777
|
-
!o.effectiveOptions.length && e.searchText ? (
|
|
778
|
-
], 64)) : (
|
|
777
|
+
!o.effectiveOptions.length && e.searchText ? (d(), f("div", _t, H(o.effectiveNoResultsText), 1)) : b("", !0)
|
|
778
|
+
], 64)) : (d(), f("div", Dt, "Loading..."))
|
|
779
779
|
], 512)) : b("", !0)
|
|
780
780
|
], 2);
|
|
781
781
|
}
|
|
782
|
-
const Ft = /* @__PURE__ */
|
|
782
|
+
const Ft = /* @__PURE__ */ xe(Mt, [["render", Vt]]), Vn = /* @__PURE__ */ S({
|
|
783
783
|
__name: "ez-smart-select",
|
|
784
784
|
props: {
|
|
785
785
|
modelValue: {},
|
|
@@ -790,22 +790,22 @@ 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, i =
|
|
793
|
+
const n = e, i = 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
|
-
}))), s =
|
|
796
|
+
}))), s = K(() => n.formatter ? (r) => {
|
|
797
797
|
var l;
|
|
798
798
|
return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
|
|
799
799
|
} : (r) => r.label), o = w(i.value.find((r) => r.value === n.modelValue) ?? null);
|
|
800
|
-
return
|
|
800
|
+
return le(
|
|
801
801
|
() => n.modelValue,
|
|
802
802
|
(r) => {
|
|
803
803
|
o.value = i.value.find((l) => l.value === r) ?? null;
|
|
804
804
|
}
|
|
805
|
-
),
|
|
805
|
+
), le(o, (r) => {
|
|
806
806
|
var l;
|
|
807
|
-
t("update:modelValue", r ? ((l = i.value.find((c) =>
|
|
808
|
-
}), (r, l) => (
|
|
807
|
+
t("update:modelValue", r ? ((l = i.value.find((c) => Se(c, r))) == null ? void 0 : l.value) ?? null : null);
|
|
808
|
+
}), (r, l) => (d(), Te(Ft, {
|
|
809
809
|
modelValue: o.value,
|
|
810
810
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
|
|
811
811
|
options: i.value,
|
|
@@ -845,7 +845,7 @@ function zt(e) {
|
|
|
845
845
|
function Xt(e) {
|
|
846
846
|
return Lt(e);
|
|
847
847
|
}
|
|
848
|
-
const
|
|
848
|
+
const de = {
|
|
849
849
|
bytes: Rt,
|
|
850
850
|
dash: Nt,
|
|
851
851
|
dashZeros: Kt,
|
|
@@ -857,8 +857,8 @@ const ce = {
|
|
|
857
857
|
desnake: zt,
|
|
858
858
|
usCurrency: Xt
|
|
859
859
|
}, Fn = (e) => ({
|
|
860
|
-
...
|
|
861
|
-
...e(
|
|
860
|
+
...de,
|
|
861
|
+
...e(de)
|
|
862
862
|
});
|
|
863
863
|
function Rn(e, t, n) {
|
|
864
864
|
const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
@@ -870,31 +870,31 @@ function Nn(e, t) {
|
|
|
870
870
|
const i = document.createElement("div");
|
|
871
871
|
i.classList.add("vf-context-menu"), i.style.position = "absolute", n.appendChild(i);
|
|
872
872
|
const s = e.currentTarget;
|
|
873
|
-
s.style.userSelect = "none", s.classList.add("context-menu-active"), t.targetClass && s.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((
|
|
874
|
-
if (
|
|
873
|
+
s.style.userSelect = "none", s.classList.add("context-menu-active"), t.targetClass && s.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((p) => {
|
|
874
|
+
if (p == "-") {
|
|
875
875
|
const E = document.createElement("div");
|
|
876
876
|
E.classList.add("separator"), i.appendChild(E);
|
|
877
877
|
return;
|
|
878
878
|
}
|
|
879
|
-
const
|
|
880
|
-
|
|
879
|
+
const h = document.createElement("div");
|
|
880
|
+
h.classList.add("item"), h.style.userSelect = "none", h.innerText = p.title, i.appendChild(h), p.class && h.classList.add(p.class), p.shouldConfirm ? h.addEventListener("click", (E) => m(E, h, p.handler)) : h.addEventListener("click", () => p.handler());
|
|
881
881
|
});
|
|
882
|
-
const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth,
|
|
883
|
-
i.style.left =
|
|
882
|
+
const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth, y = o < c ? e.clientX - c - 1 : e.clientX + 1, u = r < l ? e.clientY - l - 1 : e.clientY + 1;
|
|
883
|
+
i.style.left = y + "px", i.style.top = u + "px", setTimeout(() => {
|
|
884
884
|
i.style.width = i.offsetWidth + "px";
|
|
885
885
|
}, 50);
|
|
886
886
|
function a() {
|
|
887
887
|
t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
|
|
888
888
|
}
|
|
889
|
-
function p
|
|
890
|
-
if (
|
|
891
|
-
return
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
889
|
+
function m(p, h, E) {
|
|
890
|
+
if (h.classList.contains("pending-confirm"))
|
|
891
|
+
return E();
|
|
892
|
+
const x = h.innerHTML;
|
|
893
|
+
h.classList.add("pending-confirm"), h.innerText = "Confirm";
|
|
894
|
+
const F = () => {
|
|
895
|
+
h.classList.remove("pending-confirm"), h.innerHTML = x, h.removeEventListener("mouseleave", F);
|
|
896
896
|
};
|
|
897
|
-
|
|
897
|
+
h.addEventListener("mouseleave", F), p.stopPropagation();
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
900
|
const Yt = (e) => new Promise((t) => setTimeout(t, e)), Kn = (e) => Yt(e * 1e3);
|
|
@@ -916,83 +916,83 @@ function Gt(e) {
|
|
|
916
916
|
function Wn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
|
|
917
917
|
const s = e.request.request.bind(e.request);
|
|
918
918
|
e.request.request = (o) => (o = Qt(o), t && (o = t(o)), new i((r, l, c) => {
|
|
919
|
-
const
|
|
920
|
-
c(
|
|
921
|
-
if (Gt(
|
|
922
|
-
if (
|
|
923
|
-
return l(new
|
|
924
|
-
|
|
919
|
+
const y = s(o);
|
|
920
|
+
c(y.cancel), y.then(r).catch((u) => {
|
|
921
|
+
if (Gt(u) && typeof u.body == "object" && "error" in u.body) {
|
|
922
|
+
if (u.status === 422)
|
|
923
|
+
return l(new q(u.body.error));
|
|
924
|
+
u.message = `${u.body.error} (${u.status})`;
|
|
925
925
|
}
|
|
926
926
|
if (n) {
|
|
927
|
-
const a = n(
|
|
927
|
+
const a = n(u, o);
|
|
928
928
|
if (a === null)
|
|
929
929
|
return;
|
|
930
930
|
if (a instanceof Error)
|
|
931
931
|
return l(a);
|
|
932
932
|
}
|
|
933
|
-
l(
|
|
933
|
+
l(u);
|
|
934
934
|
});
|
|
935
935
|
}));
|
|
936
936
|
}
|
|
937
|
-
class
|
|
937
|
+
class ue {
|
|
938
938
|
constructor(t) {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
939
|
+
v(this, "validator", null);
|
|
940
|
+
v(this, "lastModifiedDate", null);
|
|
941
|
+
v(this, "size", 0);
|
|
942
|
+
v(this, "path", "");
|
|
943
|
+
v(this, "name", "");
|
|
944
|
+
v(this, "type", "");
|
|
945
|
+
v(this, "blob");
|
|
946
946
|
this.blob = t;
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
function Qt(e) {
|
|
950
|
-
if (!(typeof e.body == "object" && Object.values(e.body).some((s) => s instanceof
|
|
950
|
+
if (!(typeof e.body == "object" && Object.values(e.body).some((s) => s instanceof ue)))
|
|
951
951
|
return e;
|
|
952
952
|
const n = {}, i = {};
|
|
953
953
|
for (const [s, o] of Object.entries(e.body))
|
|
954
|
-
o instanceof
|
|
954
|
+
o instanceof ue ? n[s] = o.blob : i[s] = o;
|
|
955
955
|
return n._payload = new Blob([JSON.stringify(i)], { type: "application/json" }), {
|
|
956
956
|
...e,
|
|
957
957
|
body: void 0,
|
|
958
958
|
formData: n
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
const
|
|
961
|
+
const ie = Symbol("HookState");
|
|
962
962
|
function Pn(e, t) {
|
|
963
|
-
const n = t ??
|
|
964
|
-
B(() => Jt(n, e), n),
|
|
963
|
+
const n = t ?? J();
|
|
964
|
+
B(() => Jt(n, e), n), we(() => en(n), n), ke(() => he(n), n), ee(() => he(n), n);
|
|
965
965
|
}
|
|
966
966
|
function Jt(e, t) {
|
|
967
967
|
const n = {};
|
|
968
968
|
if (t.elScrolledToBottom && (n.el = new A(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
969
|
-
const i =
|
|
969
|
+
const i = Ae(e.vnode.el);
|
|
970
970
|
i ? n.ancestor = new A(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
971
971
|
}
|
|
972
|
-
t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[
|
|
972
|
+
t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[ie] = n;
|
|
973
973
|
}
|
|
974
974
|
function en(e) {
|
|
975
975
|
var n, i, s;
|
|
976
|
-
const t = e[
|
|
976
|
+
const t = e[ie];
|
|
977
977
|
(n = t == null ? void 0 : t.el) == null || n.install(), (i = t == null ? void 0 : t.ancestor) == null || i.install(), (s = t == null ? void 0 : t.window) == null || s.install();
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function he(e) {
|
|
980
980
|
var n, i, s;
|
|
981
|
-
const t = e[
|
|
981
|
+
const t = e[ie];
|
|
982
982
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (i = t == null ? void 0 : t.ancestor) == null || i.uninstall(), (s = t == null ? void 0 : t.window) == null || s.uninstall();
|
|
983
983
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
984
|
+
const Y = ["auto", "scroll"];
|
|
985
|
+
function Ae(e) {
|
|
986
986
|
const t = e.parentElement;
|
|
987
987
|
if (!t)
|
|
988
988
|
return null;
|
|
989
989
|
const n = window.getComputedStyle(t);
|
|
990
|
-
return
|
|
990
|
+
return Y.includes(n.overflow) || Y.includes(n.overflowX) || Y.includes(n.overflowY) ? t : Ae(t);
|
|
991
991
|
}
|
|
992
992
|
class A {
|
|
993
993
|
constructor(t, n) {
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
v(this, "isTripped", !1);
|
|
995
|
+
v(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
996
996
|
this.el = t, this.handler = n, this.install();
|
|
997
997
|
}
|
|
998
998
|
install() {
|
|
@@ -1006,16 +1006,16 @@ class A {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
function qn(e) {
|
|
1009
|
-
B(() => window.addEventListener("resize", e)),
|
|
1009
|
+
B(() => window.addEventListener("resize", e)), we(() => window.addEventListener("resize", e)), ke(() => window.removeEventListener("resize", e)), ee(() => window.removeEventListener("resize", e));
|
|
1010
1010
|
}
|
|
1011
1011
|
const tn = {
|
|
1012
|
-
mounted:
|
|
1013
|
-
updated:
|
|
1014
|
-
},
|
|
1015
|
-
function
|
|
1016
|
-
if (t.value === void 0 && e[
|
|
1012
|
+
mounted: pe,
|
|
1013
|
+
updated: pe
|
|
1014
|
+
}, fe = Symbol("HasAutoFocused");
|
|
1015
|
+
function pe(e, t) {
|
|
1016
|
+
if (t.value === void 0 && e[fe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
|
|
1017
1017
|
return;
|
|
1018
|
-
e[
|
|
1018
|
+
e[fe] = !0;
|
|
1019
1019
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1020
1020
|
setTimeout(() => n.focus(), 10);
|
|
1021
1021
|
}
|
|
@@ -1048,72 +1048,72 @@ const on = {
|
|
|
1048
1048
|
function ln(e) {
|
|
1049
1049
|
e.addEventListener("blur", () => {
|
|
1050
1050
|
let t = e.value;
|
|
1051
|
-
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" +
|
|
1051
|
+
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + Z(/* @__PURE__ */ new Date(), "yy"));
|
|
1052
1052
|
const n = Date.parse(t);
|
|
1053
|
-
isNaN(n) ? e.value = "" : e.value =
|
|
1053
|
+
isNaN(n) ? e.value = "" : e.value = Z(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
1056
|
const rn = {
|
|
1057
|
-
beforeMount:
|
|
1058
|
-
updated:
|
|
1057
|
+
beforeMount: me,
|
|
1058
|
+
updated: me
|
|
1059
1059
|
};
|
|
1060
|
-
function
|
|
1060
|
+
function me(e, t) {
|
|
1061
1061
|
t.value == t.oldValue && e.innerHTML.length || (e.innerText = an(e, t));
|
|
1062
1062
|
}
|
|
1063
1063
|
function an(e, t) {
|
|
1064
|
-
var c,
|
|
1064
|
+
var c, y;
|
|
1065
1065
|
if (!t.value)
|
|
1066
1066
|
return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
|
|
1067
1067
|
let n = "";
|
|
1068
1068
|
const i = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), s = e.attributes.getNamedItem("local") !== null ? i.replace(/Z$/, "") : i.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(s);
|
|
1069
1069
|
e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
|
|
1070
|
-
let r = (
|
|
1070
|
+
let r = (y = e.attributes.getNamedItem("format")) == null ? void 0 : y.value;
|
|
1071
1071
|
if (!r && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1072
|
+
const u = /* @__PURE__ */ new Date();
|
|
1073
|
+
u.getFullYear() == o.getFullYear() && u.getMonth() == o.getMonth() && u.getDate() == o.getDate() && (n = "at", r = "HH:mm");
|
|
1074
1074
|
}
|
|
1075
1075
|
r || (r = V.defaultDateTimeFormat);
|
|
1076
|
-
let l =
|
|
1076
|
+
let l = Z(o, r);
|
|
1077
1077
|
return n && (l = n + " " + l), l;
|
|
1078
1078
|
}
|
|
1079
1079
|
const cn = {
|
|
1080
|
-
beforeMount:
|
|
1081
|
-
updated:
|
|
1080
|
+
beforeMount: ve,
|
|
1081
|
+
updated: ve,
|
|
1082
1082
|
unmounted: dn
|
|
1083
1083
|
};
|
|
1084
|
-
function
|
|
1084
|
+
function ve(e, t) {
|
|
1085
1085
|
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
1086
|
}
|
|
1087
1087
|
function dn(e) {
|
|
1088
1088
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1089
1089
|
}
|
|
1090
1090
|
const un = {
|
|
1091
|
-
beforeMount:
|
|
1092
|
-
updated:
|
|
1093
|
-
unmounted:
|
|
1094
|
-
}, _ = Symbol("HasAutoFocused"),
|
|
1091
|
+
beforeMount: ye,
|
|
1092
|
+
updated: ye,
|
|
1093
|
+
unmounted: Be
|
|
1094
|
+
}, _ = Symbol("HasAutoFocused"), se = [];
|
|
1095
1095
|
function hn() {
|
|
1096
|
-
|
|
1096
|
+
se.forEach($e);
|
|
1097
1097
|
}
|
|
1098
1098
|
setInterval(hn, 1e3);
|
|
1099
|
-
function
|
|
1099
|
+
function ye(e, t) {
|
|
1100
1100
|
var r;
|
|
1101
1101
|
if (t.value == t.oldValue)
|
|
1102
1102
|
return;
|
|
1103
1103
|
if (!t.value)
|
|
1104
|
-
return
|
|
1104
|
+
return Be(e);
|
|
1105
1105
|
const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
|
|
1106
|
-
e[_] ||
|
|
1106
|
+
e[_] || se.push(e), e[_] = {
|
|
1107
1107
|
startTs: s,
|
|
1108
1108
|
includeSeconds: o
|
|
1109
|
-
},
|
|
1109
|
+
}, $e(e);
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function $e(e) {
|
|
1112
1112
|
const t = e[_], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1113
1113
|
e.innerText = fn(n, t.includeSeconds);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
e[_] && (Qe(
|
|
1115
|
+
function Be(e) {
|
|
1116
|
+
e[_] && (Qe(se, e), delete e[_]), e.innerText = "-";
|
|
1117
1117
|
}
|
|
1118
1118
|
function fn(e, t) {
|
|
1119
1119
|
const n = [], i = Math.floor(e / 86400);
|
|
@@ -1136,18 +1136,18 @@ const I = Symbol("InfiniteScrollHandler"), pn = {
|
|
|
1136
1136
|
(t = e[I]) == null || t.uninstall(), delete e[I];
|
|
1137
1137
|
}
|
|
1138
1138
|
}, mn = {
|
|
1139
|
-
beforeMount:
|
|
1140
|
-
updated:
|
|
1139
|
+
beforeMount: ge,
|
|
1140
|
+
updated: ge
|
|
1141
1141
|
};
|
|
1142
|
-
function
|
|
1142
|
+
function ge(e, t) {
|
|
1143
1143
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1144
1144
|
}
|
|
1145
1145
|
const vn = {
|
|
1146
|
-
mounted:
|
|
1147
|
-
updated:
|
|
1148
|
-
unmounted:
|
|
1146
|
+
mounted: Ee,
|
|
1147
|
+
updated: Ee,
|
|
1148
|
+
unmounted: _e
|
|
1149
1149
|
}, $ = Symbol("TooltipState");
|
|
1150
|
-
function
|
|
1150
|
+
function Ee(e, t) {
|
|
1151
1151
|
var i;
|
|
1152
1152
|
let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
|
|
1153
1153
|
if (t.value || (n = null), n) {
|
|
@@ -1157,24 +1157,24 @@ function ge(e, t) {
|
|
|
1157
1157
|
};
|
|
1158
1158
|
e[$] ? e[$].configure(s) : e[$] = new yn(e, s);
|
|
1159
1159
|
} else
|
|
1160
|
-
|
|
1160
|
+
_e(e);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function _e(e) {
|
|
1163
1163
|
var t;
|
|
1164
1164
|
(t = e[$]) == null || t.destroy(), delete e[$];
|
|
1165
1165
|
}
|
|
1166
1166
|
class yn {
|
|
1167
1167
|
constructor(t, n) {
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1168
|
+
v(this, "lastMoveEvt");
|
|
1169
|
+
v(this, "checkInterval");
|
|
1170
|
+
v(this, "shouldShow", !1);
|
|
1171
|
+
v(this, "tipEl");
|
|
1172
|
+
v(this, "titleEl");
|
|
1173
|
+
v(this, "contentEl");
|
|
1174
|
+
v(this, "mouseMoveBound", !1);
|
|
1175
|
+
v(this, "handleMouseMoveWithContext", this.handleMouseMove.bind(this));
|
|
1176
|
+
v(this, "handleTargetMouseEnterWithContext", this.handleTargetMouseEnter.bind(this));
|
|
1177
|
+
v(this, "handleTargetMouseLeaveWithContext", this.handleTargetMouseLeave.bind(this));
|
|
1178
1178
|
this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
|
|
1179
1179
|
}
|
|
1180
1180
|
configure(t) {
|
|
@@ -1218,22 +1218,22 @@ function zn(e) {
|
|
|
1218
1218
|
gn(e);
|
|
1219
1219
|
}
|
|
1220
1220
|
export {
|
|
1221
|
-
|
|
1221
|
+
ue as FileUploadRequest,
|
|
1222
1222
|
Sn as OverlayContainer,
|
|
1223
|
-
|
|
1223
|
+
q as UserError,
|
|
1224
1224
|
kn as VfAjaxSelect,
|
|
1225
|
-
|
|
1225
|
+
z as VfAlertModal,
|
|
1226
1226
|
Vn as VfEzSmartSelect,
|
|
1227
1227
|
yt as VfModal,
|
|
1228
1228
|
Ft as VfSmartSelect,
|
|
1229
1229
|
Un as cloneProp,
|
|
1230
1230
|
In as configureVf,
|
|
1231
1231
|
Fn as createFilters,
|
|
1232
|
-
|
|
1232
|
+
Le as createOverlayInjection,
|
|
1233
1233
|
St as desnakeCase,
|
|
1234
1234
|
ct as dismissOverlayInjectionById,
|
|
1235
1235
|
xn as dismissOverlayInjectionByInstance,
|
|
1236
|
-
|
|
1236
|
+
Ce as dismissOverlayInjectionByInternalInstance,
|
|
1237
1237
|
at as dismissOverlayInjectionByVnode,
|
|
1238
1238
|
Zn as escapeHtml,
|
|
1239
1239
|
dt as formatError,
|
|
@@ -1250,20 +1250,20 @@ export {
|
|
|
1250
1250
|
ht as maskForm,
|
|
1251
1251
|
Bn as nl2br,
|
|
1252
1252
|
jn as nullifyEmptyInputs,
|
|
1253
|
-
|
|
1254
|
-
|
|
1253
|
+
te as presentOverlay,
|
|
1254
|
+
Me as removeOverlayInjection,
|
|
1255
1255
|
Rn as replaceElement,
|
|
1256
|
-
|
|
1256
|
+
re as showAlert,
|
|
1257
1257
|
Ln as showConfirm,
|
|
1258
1258
|
Cn as showConfirmDestroy,
|
|
1259
1259
|
Nn as showContextMenu,
|
|
1260
1260
|
Mn as showWait,
|
|
1261
1261
|
Yt as sleep,
|
|
1262
1262
|
Kn as sleepSecs,
|
|
1263
|
-
|
|
1263
|
+
ne as toError,
|
|
1264
1264
|
$n as unmaskComponent,
|
|
1265
|
-
|
|
1266
|
-
|
|
1265
|
+
Ie as unmaskEl,
|
|
1266
|
+
He as unmaskForm,
|
|
1267
1267
|
Pn as useInfiniteScroll,
|
|
1268
1268
|
qn as useResizeWatcher,
|
|
1269
1269
|
_n as uuid
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@ export function showContextMenu(e: MouseEvent, config: ContextMenuConfig) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (item.shouldConfirm) {
|
|
56
|
-
itemEl.addEventListener('click',
|
|
56
|
+
itemEl.addEventListener('click', e => confirmAction(e, itemEl, item.handler));
|
|
57
57
|
} else {
|
|
58
58
|
itemEl.addEventListener('click', () => item.handler());
|
|
59
59
|
}
|
|
@@ -85,7 +85,7 @@ export function showContextMenu(e: MouseEvent, config: ContextMenuConfig) {
|
|
|
85
85
|
wrapperEl.remove();
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function confirmAction(itemEl: HTMLElement, handler: () => void) {
|
|
88
|
+
function confirmAction(e: MouseEvent, itemEl: HTMLElement, handler: () => void) {
|
|
89
89
|
if (itemEl.classList.contains('pending-confirm')) {
|
|
90
90
|
return handler();
|
|
91
91
|
}
|
|
@@ -106,4 +106,3 @@ export function showContextMenu(e: MouseEvent, config: ContextMenuConfig) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// TODO: actually de-select text rather than just using CSS to hide its selection
|
|
109
|
-
// TODO: confirm isn't working
|