@signal24/vue-foundation 4.19.2 → 4.19.3
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.
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
interface IComputedOption {
|
|
2
|
-
value: string;
|
|
3
|
-
label: string;
|
|
4
|
-
}
|
|
5
1
|
type __VLS_Props = {
|
|
6
2
|
modelValue: string | null | undefined;
|
|
7
3
|
nullTitle?: string;
|
|
@@ -9,7 +5,7 @@ type __VLS_Props = {
|
|
|
9
5
|
options: {
|
|
10
6
|
[K: string]: string;
|
|
11
7
|
} | string[];
|
|
12
|
-
formatter?: (
|
|
8
|
+
formatter?: (title: string) => string;
|
|
13
9
|
};
|
|
14
10
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
11
|
"update:modelValue": (value: string | null) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Tt = Object.defineProperty;
|
|
2
2
|
var St = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var O = (e, t, n) => St(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { defineComponent as N, ref as T, computed as M, watch as A, onMounted as V, openBlock as E, createElementBlock as
|
|
4
|
+
import { defineComponent as N, ref as T, computed as M, watch as A, onMounted as V, openBlock as E, createElementBlock as b, createElementVNode as F, toDisplayString as U, withDirectives as Q, createCommentVNode as D, Fragment as J, renderList as he, vModelSelect as Ct, getCurrentInstance as pe, withModifiers as ye, normalizeStyle as xt, normalizeClass as $, renderSlot as G, reactive as Lt, h as ee, Teleport as Mt, markRaw as It, onBeforeUnmount as ge, resolveDirective as Ht, createBlock as qe, createSlots as Ot, withCtx as ue, createTextVNode as ce, vModelText as At, onActivated as ze, onDeactivated as Ye } from "vue";
|
|
5
5
|
import { compact as Ke, debounce as Ft, isEqual as Xe, startCase as Dt, upperFirst as Bt, cloneDeep as $t, remove as Vt, last as _t } from "lodash";
|
|
6
6
|
import { escapeHtml as Nt } from "@vue/shared";
|
|
7
7
|
import { escapeHtml as Uo } from "@vue/shared";
|
|
@@ -26,31 +26,31 @@ const Ut = {
|
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
27
|
setup(e, { emit: t }) {
|
|
28
28
|
const n = e, o = t, i = T(null), l = M(() => i.value ? i.value.map((g) => {
|
|
29
|
-
const
|
|
30
|
-
return n.preprocesor ? n.preprocesor(
|
|
29
|
+
const k = g;
|
|
30
|
+
return n.preprocesor ? n.preprocesor(k) : n.displayKey ? k[n.displayKey] : "";
|
|
31
31
|
}) : null), u = T(n.modelValue ?? null);
|
|
32
|
-
A(() => n.loadFn,
|
|
32
|
+
A(() => n.loadFn, a), A(
|
|
33
33
|
() => n.modelValue,
|
|
34
34
|
() => u.value = n.modelValue
|
|
35
35
|
), A(u, () => o("update:modelValue", u.value));
|
|
36
|
-
async function
|
|
36
|
+
async function a() {
|
|
37
37
|
i.value = await n.loadFn();
|
|
38
38
|
}
|
|
39
|
-
return V(
|
|
39
|
+
return V(a), (d, g) => l.value ? Q((E(), b("select", {
|
|
40
40
|
key: 1,
|
|
41
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
41
|
+
"onUpdate:modelValue": g[0] || (g[0] = (k) => u.value = k)
|
|
42
42
|
}, [
|
|
43
|
-
n.nullText ? (E(),
|
|
44
|
-
(E(!0),
|
|
43
|
+
n.nullText ? (E(), b("option", jt, U(n.nullText), 1)) : D("", !0),
|
|
44
|
+
(E(!0), b(J, null, he(l.value, (k, f) => {
|
|
45
45
|
var w;
|
|
46
|
-
return E(),
|
|
46
|
+
return E(), b("option", {
|
|
47
47
|
key: f,
|
|
48
48
|
value: (w = i.value) == null ? void 0 : w[f]
|
|
49
|
-
}, U(
|
|
49
|
+
}, U(k), 9, Pt);
|
|
50
50
|
}), 128))
|
|
51
51
|
], 512)), [
|
|
52
52
|
[Ct, u.value]
|
|
53
|
-
]) : (E(),
|
|
53
|
+
]) : (E(), b("select", Ut, [
|
|
54
54
|
F("option", null, U(n.loadingText || "Loading..."), 1)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
@@ -65,25 +65,25 @@ const Ut = {
|
|
|
65
65
|
V(u);
|
|
66
66
|
function u() {
|
|
67
67
|
if (!l) return;
|
|
68
|
-
const g = l.vnode.el, { styles:
|
|
69
|
-
o.value =
|
|
68
|
+
const g = l.vnode.el, { styles: k, classes: f } = a(g, n);
|
|
69
|
+
o.value = k, i.value = f;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w =
|
|
71
|
+
function a(g, k) {
|
|
72
|
+
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w = k.getBoundingClientRect(), m = g.getBoundingClientRect();
|
|
73
73
|
f.matchWidth && (m.width = w.width), f.matchHeight && (m.height = w.height);
|
|
74
|
-
const
|
|
74
|
+
const r = f.class ? Array.isArray(f.class) ? f.class : [f.class] : [];
|
|
75
75
|
let c, S;
|
|
76
76
|
if (f.y === "center")
|
|
77
|
-
c = w.top + w.height / 2 - m.height / 2,
|
|
77
|
+
c = w.top + w.height / 2 - m.height / 2, r.push("anchored-center-y");
|
|
78
78
|
else {
|
|
79
79
|
const x = (w.bottom + m.height < window.innerHeight || f.y === "below") && f.y !== "above";
|
|
80
|
-
c = x ? w.bottom : w.top - m.height,
|
|
80
|
+
c = x ? w.bottom : w.top - m.height, r.push(x ? "anchored-top" : "anchored-bottom");
|
|
81
81
|
}
|
|
82
82
|
if (f.x === "center")
|
|
83
|
-
S = w.left + w.width / 2 - m.width / 2,
|
|
83
|
+
S = w.left + w.width / 2 - m.width / 2, r.push("anchored-center-x");
|
|
84
84
|
else {
|
|
85
85
|
const x = (w.left + m.width < window.innerWidth || f.x === "left") && f.x !== "right";
|
|
86
|
-
S = x ? w.left : w.right - m.width,
|
|
86
|
+
S = x ? w.left : w.right - m.width, r.push(x ? "anchored-left" : "anchored-right");
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
styles: {
|
|
@@ -92,7 +92,7 @@ const Ut = {
|
|
|
92
92
|
...f.matchWidth ? { width: `${m.width}px` } : {},
|
|
93
93
|
...f.matchHeight ? { height: `${m.height}px` } : {}
|
|
94
94
|
},
|
|
95
|
-
classes:
|
|
95
|
+
classes: r
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
function d() {
|
|
@@ -102,7 +102,7 @@ const Ut = {
|
|
|
102
102
|
setTimeout(() => {
|
|
103
103
|
window.addEventListener("click", d);
|
|
104
104
|
}, 10);
|
|
105
|
-
}), (g,
|
|
105
|
+
}), (g, k) => (E(), b("div", {
|
|
106
106
|
class: $(["vf-overlay-anchor", i.value]),
|
|
107
107
|
style: xt(o.value),
|
|
108
108
|
onClick: ye(d, ["stop"])
|
|
@@ -122,13 +122,13 @@ const _ = Lt([]), ho = N({
|
|
|
122
122
|
function we(e, t, n) {
|
|
123
123
|
const o = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
124
124
|
o.id = "vf-overlay-target", o.removeAttribute("inert"), document.body.appendChild(o);
|
|
125
|
-
const i = String(++zt), l = It(e), u = ee(l, t),
|
|
125
|
+
const i = String(++zt), l = It(e), u = ee(l, t), a = n != null && n.anchor ? ee(qt, { overlayId: i, anchor: n.anchor }, () => [u]) : void 0, d = {
|
|
126
126
|
id: i,
|
|
127
127
|
component: l,
|
|
128
128
|
props: t,
|
|
129
129
|
options: n ?? {},
|
|
130
130
|
vnode: u,
|
|
131
|
-
wrapperVnode:
|
|
131
|
+
wrapperVnode: a
|
|
132
132
|
};
|
|
133
133
|
return _.push(d), d;
|
|
134
134
|
}
|
|
@@ -155,13 +155,13 @@ function te(e) {
|
|
|
155
155
|
async function Ee(e, t, n) {
|
|
156
156
|
return new Promise((o) => {
|
|
157
157
|
let i = null;
|
|
158
|
-
const u = { ...t, callback: async (
|
|
158
|
+
const u = { ...t, callback: async (a) => {
|
|
159
159
|
if (n != null && n.onCallback) {
|
|
160
|
-
const d = n.onCallback(
|
|
160
|
+
const d = n.onCallback(a);
|
|
161
161
|
if (typeof d == "object" && "then" in d && typeof d.then == "function" && await d === !1)
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
te(i), o(
|
|
164
|
+
te(i), o(a);
|
|
165
165
|
} };
|
|
166
166
|
i = we(e, u, n);
|
|
167
167
|
});
|
|
@@ -217,23 +217,23 @@ class oe extends Error {
|
|
|
217
217
|
function Zt(e) {
|
|
218
218
|
return e instanceof oe ? e.message : `An application error has occurred:
|
|
219
219
|
|
|
220
|
-
${
|
|
220
|
+
${be(e).message}
|
|
221
221
|
|
|
222
222
|
Please refresh the page and try again. If this error persists, ${B.unhandledErrorSupportText}.`;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function be(e) {
|
|
225
225
|
return e instanceof Error ? e : new Error(String(e));
|
|
226
226
|
}
|
|
227
|
-
async function
|
|
228
|
-
const n =
|
|
227
|
+
async function bo(e, t) {
|
|
228
|
+
const n = be(e);
|
|
229
229
|
return n instanceof oe || B.errorHandler(n), Xt({
|
|
230
230
|
title: t == null ? void 0 : t.title,
|
|
231
231
|
message: n,
|
|
232
232
|
classes: t == null ? void 0 : t.classes
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
async function
|
|
236
|
-
const t =
|
|
235
|
+
async function ko(e) {
|
|
236
|
+
const t = be(e);
|
|
237
237
|
t instanceof oe || B.errorHandler(t);
|
|
238
238
|
}
|
|
239
239
|
const z = Symbol("MaskState");
|
|
@@ -266,9 +266,9 @@ function Qt(e, t, n) {
|
|
|
266
266
|
const i = t instanceof Element ? t : o.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
|
|
267
267
|
let l;
|
|
268
268
|
i && (l = i.tagName === "INPUT" ? i.value : i.innerHTML, i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...");
|
|
269
|
-
const
|
|
270
|
-
return
|
|
271
|
-
disabledElements:
|
|
269
|
+
const a = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
270
|
+
return a.forEach((d) => d.setAttribute("disabled", "disabled")), o[me] = {
|
|
271
|
+
disabledElements: a,
|
|
272
272
|
waitButton: i,
|
|
273
273
|
buttonHtml: l
|
|
274
274
|
}, () => Qe(o);
|
|
@@ -302,8 +302,8 @@ const Jt = ["id"], en = {
|
|
|
302
302
|
emits: ["formSubmit"],
|
|
303
303
|
setup(e, { expose: t }) {
|
|
304
304
|
const n = pe(), o = e;
|
|
305
|
-
t({ mask: f, unmask: w, hide: m, unhide:
|
|
306
|
-
const i = T(), l = T(), u = T(!1),
|
|
305
|
+
t({ mask: f, unmask: w, hide: m, unhide: r });
|
|
306
|
+
const i = T(), l = T(), u = T(!1), a = M(() => Ke([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
|
|
307
307
|
V(() => {
|
|
308
308
|
var c;
|
|
309
309
|
document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", g), (c = i.value) == null || c.addEventListener("click", d));
|
|
@@ -311,15 +311,15 @@ const Jt = ["id"], en = {
|
|
|
311
311
|
window.removeEventListener("keydown", g), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
312
312
|
});
|
|
313
313
|
function d(c) {
|
|
314
|
-
c.target == i.value &&
|
|
314
|
+
c.target == i.value && k();
|
|
315
315
|
}
|
|
316
316
|
function g(c) {
|
|
317
317
|
if (c.key === "Esc" || c.key === "Escape") {
|
|
318
318
|
const S = document.querySelectorAll(".vf-modal-wrap");
|
|
319
|
-
S[S.length - 1] === i.value &&
|
|
319
|
+
S[S.length - 1] === i.value && k();
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function k() {
|
|
323
323
|
Ze(n);
|
|
324
324
|
}
|
|
325
325
|
function f() {
|
|
@@ -329,16 +329,16 @@ const Jt = ["id"], en = {
|
|
|
329
329
|
Qe(l.value);
|
|
330
330
|
}
|
|
331
331
|
function m() {
|
|
332
|
-
return u.value = !0, () =>
|
|
332
|
+
return u.value = !0, () => r();
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function r() {
|
|
335
335
|
u.value = !1;
|
|
336
336
|
}
|
|
337
|
-
return (c, S) => (E(),
|
|
337
|
+
return (c, S) => (E(), b("div", {
|
|
338
338
|
id: c.id,
|
|
339
339
|
ref_key: "overlay",
|
|
340
340
|
ref: i,
|
|
341
|
-
class: $(["vf-overlay vf-modal-wrap",
|
|
341
|
+
class: $(["vf-overlay vf-modal-wrap", a.value])
|
|
342
342
|
}, [
|
|
343
343
|
F("form", {
|
|
344
344
|
ref_key: "form",
|
|
@@ -347,18 +347,18 @@ const Jt = ["id"], en = {
|
|
|
347
347
|
class: $(["vf-modal", { scrolls: c.scrolls }]),
|
|
348
348
|
onSubmit: S[0] || (S[0] = ye((I) => c.$emit("formSubmit"), ["prevent"]))
|
|
349
349
|
}, [
|
|
350
|
-
c.$slots.header ? (E(),
|
|
350
|
+
c.$slots.header ? (E(), b("div", en, [
|
|
351
351
|
G(c.$slots, "header"),
|
|
352
|
-
o.closeX ? (E(),
|
|
352
|
+
o.closeX ? (E(), b("i", {
|
|
353
353
|
key: 0,
|
|
354
354
|
class: "close",
|
|
355
|
-
onClick:
|
|
355
|
+
onClick: k
|
|
356
356
|
})) : D("", !0)
|
|
357
357
|
])) : D("", !0),
|
|
358
358
|
F("div", tn, [
|
|
359
359
|
G(c.$slots, "default")
|
|
360
360
|
]),
|
|
361
|
-
c.$slots.footer ? (E(),
|
|
361
|
+
c.$slots.footer ? (E(), b("div", nn, [
|
|
362
362
|
G(c.$slots, "footer")
|
|
363
363
|
])) : D("", !0)
|
|
364
364
|
], 34)
|
|
@@ -383,11 +383,11 @@ const Jt = ["id"], en = {
|
|
|
383
383
|
class: $(["vf-alert", ...o.classes ?? []])
|
|
384
384
|
}, Ot({
|
|
385
385
|
default: ue(() => [
|
|
386
|
-
o.isHtml ? (E(),
|
|
386
|
+
o.isHtml ? (E(), b("div", {
|
|
387
387
|
key: 0,
|
|
388
388
|
innerHtml: o.message,
|
|
389
389
|
class: "user-message"
|
|
390
|
-
}, null, 8, ln)) : (E(),
|
|
390
|
+
}, null, 8, ln)) : (E(), b("div", {
|
|
391
391
|
key: 1,
|
|
392
392
|
innerText: n.value
|
|
393
393
|
}, null, 8, sn))
|
|
@@ -404,8 +404,8 @@ const Jt = ["id"], en = {
|
|
|
404
404
|
o.isBare ? void 0 : {
|
|
405
405
|
name: "footer",
|
|
406
406
|
fn: ue(() => [
|
|
407
|
-
o.shouldConfirm ? (E(),
|
|
408
|
-
Q((E(),
|
|
407
|
+
o.shouldConfirm ? (E(), b(J, { key: 0 }, [
|
|
408
|
+
Q((E(), b("button", {
|
|
409
409
|
class: "primary",
|
|
410
410
|
onClick: i[0] || (i[0] = () => o.callback(!0))
|
|
411
411
|
}, i[3] || (i[3] = [
|
|
@@ -417,7 +417,7 @@ const Jt = ["id"], en = {
|
|
|
417
417
|
class: "default",
|
|
418
418
|
onClick: i[1] || (i[1] = () => o.callback(!1))
|
|
419
419
|
}, "Cancel")
|
|
420
|
-
], 64)) : Q((E(),
|
|
420
|
+
], 64)) : Q((E(), b("button", {
|
|
421
421
|
key: 1,
|
|
422
422
|
class: "default",
|
|
423
423
|
onClick: i[2] || (i[2] = () => o.callback(!0))
|
|
@@ -435,18 +435,18 @@ const Jt = ["id"], en = {
|
|
|
435
435
|
}), L = [];
|
|
436
436
|
for (let e = 0; e < 256; ++e)
|
|
437
437
|
L.push((e + 256).toString(16).slice(1));
|
|
438
|
-
function
|
|
438
|
+
function an(e, t = 0) {
|
|
439
439
|
return (L[e[t + 0]] + L[e[t + 1]] + L[e[t + 2]] + L[e[t + 3]] + "-" + L[e[t + 4]] + L[e[t + 5]] + "-" + L[e[t + 6]] + L[e[t + 7]] + "-" + L[e[t + 8]] + L[e[t + 9]] + "-" + L[e[t + 10]] + L[e[t + 11]] + L[e[t + 12]] + L[e[t + 13]] + L[e[t + 14]] + L[e[t + 15]]).toLowerCase();
|
|
440
440
|
}
|
|
441
441
|
let de;
|
|
442
|
-
const
|
|
442
|
+
const rn = new Uint8Array(16);
|
|
443
443
|
function un() {
|
|
444
444
|
if (!de) {
|
|
445
445
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
446
446
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
447
447
|
de = crypto.getRandomValues.bind(crypto);
|
|
448
448
|
}
|
|
449
|
-
return de(
|
|
449
|
+
return de(rn);
|
|
450
450
|
}
|
|
451
451
|
const cn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Be = { randomUUID: cn };
|
|
452
452
|
function dn(e, t, n) {
|
|
@@ -454,7 +454,7 @@ function dn(e, t, n) {
|
|
|
454
454
|
return Be.randomUUID();
|
|
455
455
|
e = e || {};
|
|
456
456
|
const o = e.random || (e.rng || un)();
|
|
457
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
457
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, an(o);
|
|
458
458
|
}
|
|
459
459
|
function Co(e) {
|
|
460
460
|
return e.replace(/\n/g, "<br>");
|
|
@@ -478,7 +478,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
478
478
|
}, yn = ["onMousemove", "onMousedown"], gn = ["innerHTML"], wn = ["innerHTML"], En = {
|
|
479
479
|
key: 0,
|
|
480
480
|
class: "no-results"
|
|
481
|
-
},
|
|
481
|
+
}, bn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", kn = /* @__PURE__ */ N({
|
|
482
482
|
__name: "vf-smart-select",
|
|
483
483
|
props: {
|
|
484
484
|
modelValue: {},
|
|
@@ -510,9 +510,9 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
510
510
|
setup(e, { expose: t, emit: n }) {
|
|
511
511
|
const o = Symbol("null"), i = Symbol("create"), l = e, u = n;
|
|
512
512
|
t({
|
|
513
|
-
addRemoteOption:
|
|
513
|
+
addRemoteOption: kt
|
|
514
514
|
});
|
|
515
|
-
const
|
|
515
|
+
const a = T(), d = T(), g = T(), k = T(!1), f = T(!1), w = T([]), m = T(!1), r = T(""), c = T(null), S = T(null), I = T(!1), x = T(null), Se = T(!1), at = M(() => l.showCreateTextOnNewItem ?? !0), rt = M(() => l.prependOptions ?? []), ut = M(() => l.appendOptions ?? []), Ce = M(() => !!l.disabled), ct = M(() => !f.value && l.preload ? "Loading..." : l.nullTitle ? l.nullTitle : l.placeholder || ""), dt = M(() => l.noResultsText || "No options match your search."), W = M(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (s) => s[l.valueField] : null), j = M(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (s) => String(s[l.keyField]) : W.value ? (s) => String(W.value(s)) : null), se = M(() => l.formatter ? l.formatter : l.labelField ? (s) => String(s[l.labelField]) : (s) => String(s)), xe = M(() => [...rt.value, ...w.value, ...ut.value]), ie = M(() => xe.value.map((s, v) => {
|
|
516
516
|
var Ae, Fe;
|
|
517
517
|
const h = se.value(s), p = (Ae = l.subtitleFormatter) == null ? void 0 : Ae.call(l, s), y = h ? h.trim().toLowerCase() : "", C = p ? p.trim().toLowerCase() : "", Z = [];
|
|
518
518
|
return l.searchFields ? l.searchFields.forEach((De) => {
|
|
@@ -527,10 +527,10 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
527
527
|
})), H = M(() => {
|
|
528
528
|
let s = [...ie.value];
|
|
529
529
|
if (m.value) {
|
|
530
|
-
const v =
|
|
530
|
+
const v = r.value.trim().toLowerCase();
|
|
531
531
|
if (v.length) {
|
|
532
532
|
s = s.filter((y) => y.searchContent.includes(v));
|
|
533
|
-
const h = Nt(
|
|
533
|
+
const h = Nt(r.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
|
|
534
534
|
s = s.map((y) => {
|
|
535
535
|
var C;
|
|
536
536
|
return {
|
|
@@ -540,7 +540,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
540
540
|
};
|
|
541
541
|
}), Se.value && (s.find((C) => C.searchContent === v) !== void 0 || s.push({
|
|
542
542
|
key: i,
|
|
543
|
-
title:
|
|
543
|
+
title: at.value ? "Create <strong>" + r.value.trim() + "</strong>..." : r.value.trim()
|
|
544
544
|
}));
|
|
545
545
|
}
|
|
546
546
|
} else l.nullTitle && s.unshift({
|
|
@@ -549,38 +549,38 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
549
549
|
});
|
|
550
550
|
return s;
|
|
551
551
|
});
|
|
552
|
-
A(() => l.modelValue,
|
|
552
|
+
A(() => l.modelValue, re), A(
|
|
553
553
|
() => l.options,
|
|
554
554
|
() => {
|
|
555
555
|
w.value = l.options ?? [], f.value = !0;
|
|
556
556
|
}
|
|
557
557
|
), A(ie, () => {
|
|
558
558
|
I.value && setTimeout(Ie, 0);
|
|
559
|
-
}), A(
|
|
560
|
-
m.value && !l.remoteSearch && !
|
|
559
|
+
}), A(r, () => {
|
|
560
|
+
m.value && !l.remoteSearch && !r.value.trim().length && (m.value = !1);
|
|
561
561
|
}), A(I, () => {
|
|
562
|
-
I.value ? setTimeout(wt, 0) : (m.value = !1,
|
|
562
|
+
I.value ? setTimeout(wt, 0) : (m.value = !1, r.value = S.value || "", g.value && (g.value.style.visibility = "hidden"));
|
|
563
563
|
}), A(H, () => {
|
|
564
564
|
var s;
|
|
565
|
-
l.modelValue && !c.value &&
|
|
565
|
+
l.modelValue && !c.value && re(), (x.value || m.value) && !H.value.find((v) => v.key == x.value) && (x.value = ((s = H.value[0]) == null ? void 0 : s.key) ?? o);
|
|
566
566
|
}), V(async () => {
|
|
567
|
-
Se.value = l.onCreateItem !== void 0, l.options ? (w.value = [...l.options], f.value = !0) : l.preload && await Le(),
|
|
567
|
+
Se.value = l.onCreateItem !== void 0, l.options ? (w.value = [...l.options], f.value = !0) : l.preload && await Le(), re(), A(c, () => {
|
|
568
568
|
c.value !== l.modelValue && u(
|
|
569
569
|
"update:modelValue",
|
|
570
570
|
c.value && W.value ? W.value(c.value) : c.value
|
|
571
571
|
);
|
|
572
|
-
}), l.remoteSearch && A(
|
|
572
|
+
}), l.remoteSearch && A(r, Ft(ft, 250));
|
|
573
573
|
});
|
|
574
574
|
async function Le() {
|
|
575
575
|
await Me(), w.value && u("optionsLoaded", w.value);
|
|
576
576
|
}
|
|
577
577
|
async function Me() {
|
|
578
578
|
var v;
|
|
579
|
-
const s = l.remoteSearch && m.value &&
|
|
580
|
-
|
|
579
|
+
const s = l.remoteSearch && m.value && r.value ? r.value : null;
|
|
580
|
+
k.value = !0, w.value = await ((v = l.loadOptions) == null ? void 0 : v.call(l, s)) ?? [], k.value = !1, f.value = !0;
|
|
581
581
|
}
|
|
582
582
|
function ft() {
|
|
583
|
-
m.value && (Me(), m.value =
|
|
583
|
+
m.value && (Me(), m.value = r.value.trim().length > 0);
|
|
584
584
|
}
|
|
585
585
|
function vt(s) {
|
|
586
586
|
if (s.key == "Escape") {
|
|
@@ -593,21 +593,21 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
595
|
if (s.key == "ArrowUp" || s.key == "ArrowDown")
|
|
596
|
-
return s.preventDefault(),
|
|
596
|
+
return s.preventDefault(), ae(s.key == "ArrowUp" ? -1 : 1);
|
|
597
597
|
if (s.key == "PageUp" || s.key == "PageDown")
|
|
598
|
-
return s.preventDefault(),
|
|
598
|
+
return s.preventDefault(), ae(s.key == "PageUp" ? -10 : 10);
|
|
599
599
|
if (s.key == "Home" || s.key == "End")
|
|
600
|
-
return s.preventDefault(),
|
|
600
|
+
return s.preventDefault(), ae(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
601
601
|
if (s.key == "Enter") {
|
|
602
602
|
s.preventDefault();
|
|
603
603
|
const v = H.value.find((h) => h.key == x.value);
|
|
604
604
|
if (v) return He(v);
|
|
605
605
|
}
|
|
606
606
|
if (s.key === "Delete" || s.key === "Backspace") {
|
|
607
|
-
|
|
607
|
+
r.value.length > 1 && (m.value = !0);
|
|
608
608
|
return;
|
|
609
609
|
}
|
|
610
|
-
!s.metaKey &&
|
|
610
|
+
!s.metaKey && bn.includes(s.key) && (m.value = !0);
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
function mt() {
|
|
@@ -631,14 +631,14 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
631
631
|
return p || null;
|
|
632
632
|
}
|
|
633
633
|
function gt() {
|
|
634
|
-
l.debug || (!
|
|
634
|
+
l.debug || (!r.value.length && l.nullTitle && (c.value = null, S.value = null), I.value = !1);
|
|
635
635
|
}
|
|
636
636
|
function wt() {
|
|
637
637
|
var s;
|
|
638
638
|
f.value || Le(), l.optionsListId && ((s = g.value) == null || s.setAttribute("id", l.optionsListId)), Et();
|
|
639
639
|
}
|
|
640
640
|
function Et() {
|
|
641
|
-
const s =
|
|
641
|
+
const s = a.value.getBoundingClientRect(), v = s.y + s.height + 2, h = s.x, p = g.value, y = window.getComputedStyle(a.value);
|
|
642
642
|
for (let C in y)
|
|
643
643
|
/^(font|text)/.test(C) && (p.style[C] = y[C]);
|
|
644
644
|
if (p.style.top = v + "px", p.style.left = h + "px", p.style.minWidth = s.width + "px", !y.maxHeight || y.maxHeight == "none") {
|
|
@@ -652,10 +652,10 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
652
652
|
const s = H.value.findIndex((p) => p.key == x.value), v = g.value, h = v == null ? void 0 : v.querySelectorAll(".option")[s];
|
|
653
653
|
h && (v.scrollTop = h.offsetTop);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function bt(s) {
|
|
656
656
|
x.value = s ? s.key : null;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function ae(s) {
|
|
659
659
|
const v = H.value.findIndex((C) => C.key == x.value);
|
|
660
660
|
let h = v + s;
|
|
661
661
|
if (h < 0 ? h = 0 : h >= H.value.length && (h = H.value.length - 1), v == h) return;
|
|
@@ -666,25 +666,25 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
666
666
|
function He(s) {
|
|
667
667
|
var v, h;
|
|
668
668
|
if (m.value = !1, s.key == o)
|
|
669
|
-
|
|
669
|
+
r.value = "", c.value = null, S.value = null;
|
|
670
670
|
else if (s.key === i) {
|
|
671
|
-
const p =
|
|
672
|
-
|
|
671
|
+
const p = r.value.trim();
|
|
672
|
+
r.value = "", c.value = null, S.value = null, (v = l.onCreateItem) == null || v.call(l, p);
|
|
673
673
|
} else {
|
|
674
674
|
const y = ie.value.find((C) => C.key == s.key).ref;
|
|
675
|
-
c.value = y, S.value = se.value(y),
|
|
675
|
+
c.value = y, S.value = se.value(y), r.value = S.value || "";
|
|
676
676
|
}
|
|
677
677
|
(h = d.value) == null || h.blur(), Oe();
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
l.modelValue ? (c.value = W.value ? xe.value.find((s) => l.modelValue === W.value(s)) : l.modelValue, S.value = c.value ? se.value(c.value) : null,
|
|
679
|
+
function re() {
|
|
680
|
+
l.modelValue ? (c.value = W.value ? xe.value.find((s) => l.modelValue === W.value(s)) : l.modelValue, S.value = c.value ? se.value(c.value) : null, r.value = S.value || "") : (c.value = null, S.value = null, r.value = "");
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function kt(s) {
|
|
683
683
|
w.value.unshift(s);
|
|
684
684
|
}
|
|
685
685
|
function Oe() {
|
|
686
686
|
var y;
|
|
687
|
-
let s = (y =
|
|
687
|
+
let s = (y = a.value) == null ? void 0 : y.parentElement;
|
|
688
688
|
for (; s && s.tagName !== "FORM" && s.tagName !== "BODY"; )
|
|
689
689
|
s = s.parentElement;
|
|
690
690
|
if (!s) return;
|
|
@@ -693,15 +693,15 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
693
693
|
const h = Array.from(v).findIndex((C) => C === d.value), p = v[h + 1];
|
|
694
694
|
p && setTimeout(() => p.focus(), 0);
|
|
695
695
|
}
|
|
696
|
-
return (s, v) => (E(),
|
|
696
|
+
return (s, v) => (E(), b("div", {
|
|
697
697
|
ref_key: "el",
|
|
698
|
-
ref:
|
|
698
|
+
ref: a,
|
|
699
699
|
class: $(["vf-smart-select", { disabled: Ce.value, open: I.value }])
|
|
700
700
|
}, [
|
|
701
701
|
Q(F("input", {
|
|
702
702
|
ref_key: "searchField",
|
|
703
703
|
ref: d,
|
|
704
|
-
"onUpdate:modelValue": v[0] || (v[0] = (h) =>
|
|
704
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => r.value = h),
|
|
705
705
|
type: "text",
|
|
706
706
|
disabled: Ce.value,
|
|
707
707
|
class: $({ nullable: !!s.nullTitle }),
|
|
@@ -712,35 +712,35 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
712
712
|
onFocus: mt,
|
|
713
713
|
onBlur: gt
|
|
714
714
|
}, null, 42, hn), [
|
|
715
|
-
[At,
|
|
715
|
+
[At, r.value]
|
|
716
716
|
]),
|
|
717
|
-
I.value ? (E(),
|
|
717
|
+
I.value ? (E(), b("div", {
|
|
718
718
|
key: 0,
|
|
719
719
|
ref_key: "optionsContainer",
|
|
720
720
|
ref: g,
|
|
721
721
|
class: "vf-smart-select-options"
|
|
722
722
|
}, [
|
|
723
|
-
f.value ? (E(),
|
|
724
|
-
(E(!0),
|
|
723
|
+
f.value ? (E(), b(J, { key: 1 }, [
|
|
724
|
+
(E(!0), b(J, null, he(H.value, (h) => (E(), b("div", {
|
|
725
725
|
key: String(h.key),
|
|
726
726
|
class: $(["option", {
|
|
727
727
|
highlighted: x.value === h.key
|
|
728
728
|
}]),
|
|
729
|
-
onMousemove: (p) =>
|
|
729
|
+
onMousemove: (p) => bt(h),
|
|
730
730
|
onMousedown: (p) => He(h)
|
|
731
731
|
}, [
|
|
732
732
|
F("div", {
|
|
733
733
|
class: "title",
|
|
734
734
|
innerHTML: h.title
|
|
735
735
|
}, null, 8, gn),
|
|
736
|
-
h.subtitle ? (E(),
|
|
736
|
+
h.subtitle ? (E(), b("div", {
|
|
737
737
|
key: 0,
|
|
738
738
|
class: "subtitle",
|
|
739
739
|
innerHTML: h.subtitle
|
|
740
740
|
}, null, 8, wn)) : D("", !0)
|
|
741
741
|
], 42, yn))), 128)),
|
|
742
|
-
!H.value.length &&
|
|
743
|
-
], 64)) : (E(),
|
|
742
|
+
!H.value.length && r.value ? (E(), b("div", En, U(dt.value), 1)) : D("", !0)
|
|
743
|
+
], 64)) : (E(), b("div", pn, "Loading..."))
|
|
744
744
|
], 512)) : D("", !0)
|
|
745
745
|
], 2));
|
|
746
746
|
}
|
|
@@ -755,25 +755,25 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
755
755
|
},
|
|
756
756
|
emits: ["update:modelValue"],
|
|
757
757
|
setup(e, { emit: t }) {
|
|
758
|
-
const n = e, o = M(() => Array.isArray(n.options) ? n.options.map((
|
|
759
|
-
value:
|
|
758
|
+
const n = e, o = M(() => Array.isArray(n.options) ? n.options.map((a) => ({ value: a, label: a })) : Object.entries(n.options).map(([a, d]) => ({
|
|
759
|
+
value: a,
|
|
760
760
|
label: d
|
|
761
|
-
}))), i = M(() => n.formatter ? (
|
|
761
|
+
}))), i = M(() => n.formatter ? (a) => n.formatter(a.label) : (a) => a.label), l = t, u = T(o.value.find((a) => a.value === n.modelValue) ?? null);
|
|
762
762
|
return A(
|
|
763
763
|
() => n.modelValue,
|
|
764
|
-
(
|
|
765
|
-
u.value = o.value.find((d) => d.value ===
|
|
764
|
+
(a) => {
|
|
765
|
+
u.value = o.value.find((d) => d.value === a) ?? null;
|
|
766
766
|
}
|
|
767
|
-
), A(u, (
|
|
767
|
+
), A(u, (a) => {
|
|
768
768
|
var g;
|
|
769
|
-
const d =
|
|
769
|
+
const d = a ? (g = o.value.find((k) => Xe(k, a))) == null ? void 0 : g.value : null;
|
|
770
770
|
l("update:modelValue", d ?? null);
|
|
771
|
-
}), (
|
|
771
|
+
}), (a, d) => (E(), qe(kn, {
|
|
772
772
|
modelValue: u.value,
|
|
773
773
|
"onUpdate:modelValue": d[0] || (d[0] = (g) => u.value = g),
|
|
774
774
|
options: o.value,
|
|
775
775
|
formatter: i.value,
|
|
776
|
-
"null-title":
|
|
776
|
+
"null-title": a.nullTitle
|
|
777
777
|
}, null, 8, ["modelValue", "options", "formatter", "null-title"]));
|
|
778
778
|
}
|
|
779
779
|
});
|
|
@@ -809,15 +809,15 @@ const Tn = { class: "content" }, Sn = { class: "message" }, Cn = {
|
|
|
809
809
|
duration: i * 1e3,
|
|
810
810
|
easing: "linear"
|
|
811
811
|
}), setTimeout(() => t.callback(), i * 1e3);
|
|
812
|
-
}), (i, l) => (E(),
|
|
812
|
+
}), (i, l) => (E(), b("div", {
|
|
813
813
|
class: $(["vf-toast", i.className]),
|
|
814
814
|
onClick: ye(n, ["stop"])
|
|
815
815
|
}, [
|
|
816
816
|
F("div", Tn, [
|
|
817
817
|
F("div", Sn, U(i.message), 1),
|
|
818
|
-
i.disableClose ? D("", !0) : (E(),
|
|
818
|
+
i.disableClose ? D("", !0) : (E(), b("div", Cn, "x"))
|
|
819
819
|
]),
|
|
820
|
-
i.durationSecs !== null ? (E(),
|
|
820
|
+
i.durationSecs !== null ? (E(), b("div", xn, [
|
|
821
821
|
F("div", {
|
|
822
822
|
ref_key: "progressInnerEl",
|
|
823
823
|
ref: o,
|
|
@@ -896,25 +896,25 @@ function Ao(e, t) {
|
|
|
896
896
|
c.classList.add("separator"), o.appendChild(c);
|
|
897
897
|
return;
|
|
898
898
|
}
|
|
899
|
-
const
|
|
900
|
-
|
|
899
|
+
const r = document.createElement("div");
|
|
900
|
+
r.classList.add("item"), r.style.userSelect = "none", r.innerText = m.title, o.appendChild(r), m.class && r.classList.add(m.class), m.shouldConfirm ? r.addEventListener("click", (c) => w(c, r, m.handler)) : r.addEventListener("click", () => m.handler());
|
|
901
901
|
});
|
|
902
|
-
const l = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY,
|
|
903
|
-
o.style.left = g + "px", o.style.top =
|
|
902
|
+
const l = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, a = o.offsetHeight, d = o.offsetWidth, g = l < d ? e.clientX - d - 1 : e.clientX + 1, k = u < a ? e.clientY - a - 1 : e.clientY + 1;
|
|
903
|
+
o.style.left = g + "px", o.style.top = k + "px", setTimeout(() => {
|
|
904
904
|
o.style.width = o.offsetWidth + "px";
|
|
905
905
|
}, 50);
|
|
906
906
|
function f() {
|
|
907
907
|
t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
|
|
908
908
|
}
|
|
909
|
-
function w(m,
|
|
910
|
-
if (
|
|
909
|
+
function w(m, r, c) {
|
|
910
|
+
if (r.classList.contains("pending-confirm"))
|
|
911
911
|
return c();
|
|
912
|
-
const S =
|
|
913
|
-
|
|
912
|
+
const S = r.innerHTML;
|
|
913
|
+
r.classList.add("pending-confirm"), r.innerText = "Confirm";
|
|
914
914
|
const I = () => {
|
|
915
|
-
|
|
915
|
+
r.classList.remove("pending-confirm"), r.innerHTML = S, r.removeEventListener("mouseleave", I);
|
|
916
916
|
};
|
|
917
|
-
|
|
917
|
+
r.addEventListener("mouseleave", I), m.stopPropagation();
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
const _n = (e) => new Promise((t) => setTimeout(t, e)), Fo = (e) => _n(e * 1e3);
|
|
@@ -941,7 +941,7 @@ function $o(e, t) {
|
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const ke = Symbol("HookState");
|
|
945
945
|
function Vo(e, t) {
|
|
946
946
|
const n = t ?? pe();
|
|
947
947
|
V(() => Rn(n, e), n), ze(() => Wn(n), n), Ye(() => Ve(n), n), ge(() => Ve(n), n);
|
|
@@ -952,16 +952,16 @@ function Rn(e, t) {
|
|
|
952
952
|
const o = et(e.vnode.el);
|
|
953
953
|
o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
954
954
|
}
|
|
955
|
-
t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[
|
|
955
|
+
t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[ke] = n;
|
|
956
956
|
}
|
|
957
957
|
function Wn(e) {
|
|
958
958
|
var n, o, i;
|
|
959
|
-
const t = e[
|
|
959
|
+
const t = e[ke];
|
|
960
960
|
(n = t == null ? void 0 : t.el) == null || n.install(), (o = t == null ? void 0 : t.ancestor) == null || o.install(), (i = t == null ? void 0 : t.window) == null || i.install();
|
|
961
961
|
}
|
|
962
962
|
function Ve(e) {
|
|
963
963
|
var n, o, i;
|
|
964
|
-
const t = e[
|
|
964
|
+
const t = e[ke];
|
|
965
965
|
(n = t == null ? void 0 : t.el) == null || n.uninstall(), (o = t == null ? void 0 : t.ancestor) == null || o.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
|
|
966
966
|
}
|
|
967
967
|
const fe = ["auto", "scroll"];
|
|
@@ -1005,7 +1005,7 @@ const jn = {
|
|
|
1005
1005
|
}, P = Symbol("ConfirmState");
|
|
1006
1006
|
function Pn(e, t) {
|
|
1007
1007
|
e.addEventListener("click", (n) => {
|
|
1008
|
-
var u,
|
|
1008
|
+
var u, a;
|
|
1009
1009
|
const o = Date.now(), i = ((u = t.value) == null ? void 0 : u.text) !== void 0 ? t.value.text : "Confirm";
|
|
1010
1010
|
if (e[P]) {
|
|
1011
1011
|
if (o - e[P].initTime < 300)
|
|
@@ -1022,7 +1022,7 @@ function Pn(e, t) {
|
|
|
1022
1022
|
i && (e.innerHTML = l.preconfirmHtml), (d = t.value) != null && d.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", l.resetHandler), delete e[P];
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
e[P] = l, i && (e.innerHTML = i), (
|
|
1025
|
+
e[P] = l, i && (e.innerHTML = i), (a = t.value) != null && a.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
1028
|
const qn = {
|
|
@@ -1044,14 +1044,14 @@ function Re(e, t) {
|
|
|
1044
1044
|
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Kn(e, t));
|
|
1045
1045
|
}
|
|
1046
1046
|
function Kn(e, t) {
|
|
1047
|
-
var g,
|
|
1047
|
+
var g, k;
|
|
1048
1048
|
if (!t.value)
|
|
1049
1049
|
return ((g = e.attributes.getNamedItem("placeholder")) == null ? void 0 : g.value) ?? "";
|
|
1050
1050
|
let n = "";
|
|
1051
1051
|
const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), l = new Date(i);
|
|
1052
1052
|
e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
|
|
1053
|
-
let u = (
|
|
1054
|
-
const
|
|
1053
|
+
let u = (k = e.attributes.getNamedItem("format")) == null ? void 0 : k.value;
|
|
1054
|
+
const a = e.attributes.getNamedItem("date-only") !== null;
|
|
1055
1055
|
if (!u && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1056
1056
|
const f = /* @__PURE__ */ new Date();
|
|
1057
1057
|
f.getFullYear() === l.getFullYear() && f.getMonth() === l.getMonth() && f.getDate() === l.getDate() && (n = "at", u = "HH:mm");
|
|
@@ -1060,10 +1060,10 @@ function Kn(e, t) {
|
|
|
1060
1060
|
let f = null;
|
|
1061
1061
|
const w = /* @__PURE__ */ new Date();
|
|
1062
1062
|
w.getFullYear() === l.getFullYear() ? (w.getMonth() !== l.getMonth() || w.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/YY";
|
|
1063
|
-
const m =
|
|
1063
|
+
const m = a ? null : B.defaultTimeFormat;
|
|
1064
1064
|
u = Ke([f, m]).join(" ");
|
|
1065
1065
|
}
|
|
1066
|
-
u || (
|
|
1066
|
+
u || (a ? u = B.defaultDateFormat : u = `${B.defaultDateFormat} ${B.defaultTimeFormat}`);
|
|
1067
1067
|
let d = ve(l, u);
|
|
1068
1068
|
return n && (d = n + " " + d), d;
|
|
1069
1069
|
}
|
|
@@ -1216,8 +1216,8 @@ class so {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
handleMouseMove(t) {
|
|
1218
1218
|
const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, i = window.innerWidth, l = window.innerHeight;
|
|
1219
|
-
let u = t.pageX + 10,
|
|
1220
|
-
u + n > i && (u = t.pageX - 5 - n),
|
|
1219
|
+
let u = t.pageX + 10, a = t.pageY + 20;
|
|
1220
|
+
u + n > i && (u = t.pageX - 5 - n), a + o > l && (a = t.pageY - 5 - o), this.tipEl.style.left = u + "px", this.tipEl.style.top = a + "px", this.lastMoveEvt = t;
|
|
1221
1221
|
}
|
|
1222
1222
|
checkMoveEvent() {
|
|
1223
1223
|
var t;
|
|
@@ -1240,7 +1240,7 @@ export {
|
|
|
1240
1240
|
le as VfAlertModal,
|
|
1241
1241
|
Lo as VfEzSmartSelect,
|
|
1242
1242
|
on as VfModal,
|
|
1243
|
-
|
|
1243
|
+
kn as VfSmartSelect,
|
|
1244
1244
|
Do as cloneProp,
|
|
1245
1245
|
Eo as configureVf,
|
|
1246
1246
|
$o as configureVfOpenApiClient,
|
|
@@ -1256,8 +1256,8 @@ export {
|
|
|
1256
1256
|
Nn as formatNumber,
|
|
1257
1257
|
vn as formatPhone,
|
|
1258
1258
|
mn as formatUSCurrency,
|
|
1259
|
-
|
|
1260
|
-
|
|
1259
|
+
ko as handleError,
|
|
1260
|
+
bo as handleErrorAndAlert,
|
|
1261
1261
|
No as installVf,
|
|
1262
1262
|
To as maskComponent,
|
|
1263
1263
|
Gt as maskEl,
|
|
@@ -1275,7 +1275,7 @@ export {
|
|
|
1275
1275
|
wo as showWait,
|
|
1276
1276
|
_n as sleep,
|
|
1277
1277
|
Fo as sleepSecs,
|
|
1278
|
-
|
|
1278
|
+
be as toError,
|
|
1279
1279
|
So as unmaskComponent,
|
|
1280
1280
|
Ge as unmaskEl,
|
|
1281
1281
|
Qe as unmaskForm,
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ const props = defineProps<{
|
|
|
18
18
|
nullTitle?: string;
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
options: { [K: string]: string } | string[];
|
|
21
|
-
formatter?: (
|
|
21
|
+
formatter?: (title: string) => string;
|
|
22
22
|
}>();
|
|
23
23
|
|
|
24
24
|
const computedOpts = computed(() => {
|
|
@@ -32,7 +32,7 @@ const computedOpts = computed(() => {
|
|
|
32
32
|
|
|
33
33
|
const ezFormatter = computed(() => {
|
|
34
34
|
if (props.formatter) {
|
|
35
|
-
return (o: IComputedOption) => props.formatter!(o);
|
|
35
|
+
return (o: IComputedOption) => props.formatter!(o.label);
|
|
36
36
|
}
|
|
37
37
|
return (o: IComputedOption) => o.label;
|
|
38
38
|
});
|