@signal24/vue-foundation 4.19.5 → 4.19.6
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/alert-helpers.d.ts +1 -0
- package/dist/src/components/vf-alert-modal.vue.d.ts +1 -0
- package/dist/vue-foundation.css +1 -1
- package/dist/vue-foundation.es.js +137 -132
- package/package.json +1 -1
- package/src/components/alert-helpers.ts +1 -0
- package/src/components/vf-alert-modal.vue +7 -0
|
@@ -2,6 +2,7 @@ interface IAlertOptions {
|
|
|
2
2
|
title?: string;
|
|
3
3
|
message: string | Error;
|
|
4
4
|
classes?: string[];
|
|
5
|
+
iconClass?: string | string[];
|
|
5
6
|
}
|
|
6
7
|
export declare function showAlert(title: string, message: string | Error): Promise<void>;
|
|
7
8
|
export declare function showAlert(message: string | Error): Promise<void>;
|
|
@@ -5,6 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
message: string | Error;
|
|
7
7
|
shouldConfirm?: boolean;
|
|
8
|
+
iconClass?: string | string[];
|
|
8
9
|
callback: (ok: boolean) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
package/dist/vue-foundation.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vf-overlay-anchor{position:absolute;z-index:100}.vf-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100}.vf-overlay.hidden{display:none}.vf-modal-wrap{background:#00000040;display:flex;justify-content:center;align-items:center}.vf-modal{background:#fff;box-shadow:0 3px 6px #00000026;min-width:200px;max-width:95%;max-height:95%;display:flex;flex-direction:column}.vf-modal-header,.vf-modal-footer{flex-shrink:0;position:relative}.vf-modal.scrolls>.vf-modal-content{overflow:auto;flex-grow:1;flex-shrink:1;flex-basis:0%}.vf-modal-wrap.vf-alert .vf-modal{max-width:800px}.vf-modal-wrap.vf-alert .vf-modal>.vf-modal-content{padding:12px}.vf-modal-wrap.vf-alert.wait .vf-modal-content{text-align:center}.vf-modal-wrap.vf-alert.destructive button.primary{color:red}.vf-smart-select{position:relative}.vf-smart-select input{width:100%;padding-right:24px!important}.vf-smart-select input.nullable::placeholder{color:#000}.vf-smart-select:after{content:" ";display:block;position:absolute;top:50%;right:8px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#333333 transparent transparent transparent;pointer-events:none}.vf-smart-select.open:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:transparent transparent #333333 transparent}.vf-smart-select:not(.disabled) input{cursor:pointer}.vf-smart-select.disabled:after{opacity:.4}.vf-smart-select-options{visibility:hidden;position:absolute;min-height:20px;border:1px solid #e8e8e8;background:#fff;overflow:auto;z-index:101}.vf-smart-select-options .option,.vf-smart-select-options .no-results{padding:5px 8px}.vf-smart-select-options .option{cursor:pointer}.vf-smart-select-options .option.highlighted{background-color:#f5f5f5}.vf-toast{position:absolute;bottom:50px;left:50%;transform:translate(-50%)}.vf-toast .content{display:flex;align-items:center}
|
|
1
|
+
.vf-overlay-anchor{position:absolute;z-index:100}.vf-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100}.vf-overlay.hidden{display:none}.vf-modal-wrap{background:#00000040;display:flex;justify-content:center;align-items:center}.vf-modal{background:#fff;box-shadow:0 3px 6px #00000026;min-width:200px;max-width:95%;max-height:95%;display:flex;flex-direction:column}.vf-modal-header,.vf-modal-footer{flex-shrink:0;position:relative}.vf-modal.scrolls>.vf-modal-content{overflow:auto;flex-grow:1;flex-shrink:1;flex-basis:0%}.vf-modal-wrap.vf-alert .vf-modal{max-width:800px}.vf-modal-wrap.vf-alert .vf-modal>.vf-modal-content{padding:12px}.vf-modal-wrap.vf-alert.wait .vf-modal-content{text-align:center}.vf-modal-wrap.vf-alert.wait .vf-alert-icon{margin-bottom:12px}.vf-modal-wrap.vf-alert.destructive button.primary{color:red}.vf-smart-select{position:relative}.vf-smart-select input{width:100%;padding-right:24px!important}.vf-smart-select input.nullable::placeholder{color:#000}.vf-smart-select:after{content:" ";display:block;position:absolute;top:50%;right:8px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#333333 transparent transparent transparent;pointer-events:none}.vf-smart-select.open:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:transparent transparent #333333 transparent}.vf-smart-select:not(.disabled) input{cursor:pointer}.vf-smart-select.disabled:after{opacity:.4}.vf-smart-select-options{visibility:hidden;position:absolute;min-height:20px;border:1px solid #e8e8e8;background:#fff;overflow:auto;z-index:101}.vf-smart-select-options .option,.vf-smart-select-options .no-results{padding:5px 8px}.vf-smart-select-options .option{cursor:pointer}.vf-smart-select-options .option.highlighted{background-color:#f5f5f5}.vf-toast{position:absolute;bottom:50px;left:50%;transform:translate(-50%)}.vf-toast .content{display:flex;align-items:center}
|
|
@@ -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 k, createElementVNode as D, toDisplayString as U, withDirectives as Q, createCommentVNode as F, Fragment as J, renderList as he, vModelSelect as Ct, getCurrentInstance as pe, withModifiers as ye, normalizeStyle as xt, normalizeClass as B, 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,8 +26,8 @@ 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 b = g;
|
|
30
|
+
return n.preprocesor ? n.preprocesor(b) : n.displayKey ? b[n.displayKey] : "";
|
|
31
31
|
}) : null), u = T(n.modelValue ?? null);
|
|
32
32
|
A(() => n.loadFn, a), A(
|
|
33
33
|
() => n.modelValue,
|
|
@@ -36,22 +36,22 @@ const Ut = {
|
|
|
36
36
|
async function a() {
|
|
37
37
|
i.value = await n.loadFn();
|
|
38
38
|
}
|
|
39
|
-
return V(a), (d, g) => l.value ? Q((E(),
|
|
39
|
+
return V(a), (d, g) => l.value ? Q((E(), k("select", {
|
|
40
40
|
key: 1,
|
|
41
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
41
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => u.value = b)
|
|
42
42
|
}, [
|
|
43
|
-
n.nullText ? (E(),
|
|
44
|
-
(E(!0),
|
|
43
|
+
n.nullText ? (E(), k("option", jt, U(n.nullText), 1)) : F("", !0),
|
|
44
|
+
(E(!0), k(J, null, he(l.value, (b, f) => {
|
|
45
45
|
var w;
|
|
46
|
-
return E(),
|
|
46
|
+
return E(), k("option", {
|
|
47
47
|
key: f,
|
|
48
48
|
value: (w = i.value) == null ? void 0 : w[f]
|
|
49
|
-
}, U(
|
|
49
|
+
}, U(b), 9, Pt);
|
|
50
50
|
}), 128))
|
|
51
51
|
], 512)), [
|
|
52
|
-
[
|
|
53
|
-
]) : (E(),
|
|
54
|
-
|
|
52
|
+
[Ct, u.value]
|
|
53
|
+
]) : (E(), k("select", Ut, [
|
|
54
|
+
D("option", null, U(n.loadingText || "Loading..."), 1)
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
57
|
}), qt = /* @__PURE__ */ N({
|
|
@@ -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: b, classes: f } = a(g, n);
|
|
69
|
+
o.value = b, i.value = f;
|
|
70
70
|
}
|
|
71
|
-
function a(g,
|
|
72
|
-
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w =
|
|
71
|
+
function a(g, b) {
|
|
72
|
+
const f = t.anchor instanceof HTMLElement ? {} : t.anchor, w = b.getBoundingClientRect(), m = g.getBoundingClientRect();
|
|
73
73
|
f.matchWidth && (m.width = w.width), f.matchHeight && (m.height = w.height);
|
|
74
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
77
|
c = w.top + w.height / 2 - m.height / 2, r.push("anchored-center-y");
|
|
78
78
|
else {
|
|
79
|
-
const
|
|
80
|
-
c =
|
|
79
|
+
const x = (w.bottom + m.height < window.innerHeight || f.y === "below") && f.y !== "above";
|
|
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
83
|
S = w.left + w.width / 2 - m.width / 2, r.push("anchored-center-x");
|
|
84
84
|
else {
|
|
85
|
-
const
|
|
86
|
-
S =
|
|
85
|
+
const x = (w.left + m.width < window.innerWidth || f.x === "left") && f.x !== "right";
|
|
86
|
+
S = x ? w.left : w.right - m.width, r.push(x ? "anchored-left" : "anchored-right");
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
styles: {
|
|
@@ -102,9 +102,9 @@ const Ut = {
|
|
|
102
102
|
setTimeout(() => {
|
|
103
103
|
window.addEventListener("click", d);
|
|
104
104
|
}, 10);
|
|
105
|
-
}), (g,
|
|
106
|
-
class:
|
|
107
|
-
style:
|
|
105
|
+
}), (g, b) => (E(), k("div", {
|
|
106
|
+
class: B(["vf-overlay-anchor", i.value]),
|
|
107
|
+
style: xt(o.value),
|
|
108
108
|
onClick: ye(d, ["stop"])
|
|
109
109
|
}, [
|
|
110
110
|
G(g.$slots, "default")
|
|
@@ -200,14 +200,14 @@ function wo(e, t) {
|
|
|
200
200
|
});
|
|
201
201
|
return () => te(o);
|
|
202
202
|
}
|
|
203
|
-
const
|
|
203
|
+
const $ = {
|
|
204
204
|
unhandledErrorSupportText: "please contact support",
|
|
205
205
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
206
206
|
defaultDateFormat: "M/d/yy",
|
|
207
207
|
defaultTimeFormat: "H:mm"
|
|
208
208
|
};
|
|
209
209
|
function Eo(e) {
|
|
210
|
-
Object.assign(
|
|
210
|
+
Object.assign($, e);
|
|
211
211
|
}
|
|
212
212
|
class oe extends Error {
|
|
213
213
|
constructor(t) {
|
|
@@ -217,24 +217,24 @@ 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
|
+
${ke(e).message}
|
|
221
221
|
|
|
222
|
-
Please refresh the page and try again. If this error persists, ${
|
|
222
|
+
Please refresh the page and try again. If this error persists, ${$.unhandledErrorSupportText}.`;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function ke(e) {
|
|
225
225
|
return e instanceof Error ? e : new Error(String(e));
|
|
226
226
|
}
|
|
227
|
-
async function
|
|
228
|
-
const n =
|
|
229
|
-
return n instanceof oe ||
|
|
227
|
+
async function ko(e, t) {
|
|
228
|
+
const n = ke(e);
|
|
229
|
+
return n instanceof oe || $.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 =
|
|
237
|
-
t instanceof oe ||
|
|
235
|
+
async function bo(e) {
|
|
236
|
+
const t = ke(e);
|
|
237
|
+
t instanceof oe || $.errorHandler(t);
|
|
238
238
|
}
|
|
239
239
|
const z = Symbol("MaskState");
|
|
240
240
|
function To(e, t) {
|
|
@@ -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 && b();
|
|
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 && b();
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function b() {
|
|
323
323
|
Ze(n);
|
|
324
324
|
}
|
|
325
325
|
function f() {
|
|
@@ -334,33 +334,33 @@ const Jt = ["id"], en = {
|
|
|
334
334
|
function r() {
|
|
335
335
|
u.value = !1;
|
|
336
336
|
}
|
|
337
|
-
return (c, S) => (E(),
|
|
337
|
+
return (c, S) => (E(), k("div", {
|
|
338
338
|
id: c.id,
|
|
339
339
|
ref_key: "overlay",
|
|
340
340
|
ref: i,
|
|
341
|
-
class:
|
|
341
|
+
class: B(["vf-overlay vf-modal-wrap", a.value])
|
|
342
342
|
}, [
|
|
343
|
-
|
|
343
|
+
D("form", {
|
|
344
344
|
ref_key: "form",
|
|
345
345
|
ref: l,
|
|
346
346
|
action: ".",
|
|
347
|
-
class:
|
|
347
|
+
class: B(["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(), k("div", en, [
|
|
351
351
|
G(c.$slots, "header"),
|
|
352
|
-
o.closeX ? (E(),
|
|
352
|
+
o.closeX ? (E(), k("i", {
|
|
353
353
|
key: 0,
|
|
354
354
|
class: "close",
|
|
355
|
-
onClick:
|
|
356
|
-
})) :
|
|
357
|
-
])) :
|
|
358
|
-
|
|
355
|
+
onClick: b
|
|
356
|
+
})) : F("", !0)
|
|
357
|
+
])) : F("", !0),
|
|
358
|
+
D("div", tn, [
|
|
359
359
|
G(c.$slots, "default")
|
|
360
360
|
]),
|
|
361
|
-
c.$slots.footer ? (E(),
|
|
361
|
+
c.$slots.footer ? (E(), k("div", nn, [
|
|
362
362
|
G(c.$slots, "footer")
|
|
363
|
-
])) :
|
|
363
|
+
])) : F("", !0)
|
|
364
364
|
], 34)
|
|
365
365
|
], 10, Jt));
|
|
366
366
|
}
|
|
@@ -373,6 +373,7 @@ const Jt = ["id"], en = {
|
|
|
373
373
|
title: {},
|
|
374
374
|
message: {},
|
|
375
375
|
shouldConfirm: { type: Boolean },
|
|
376
|
+
iconClass: {},
|
|
376
377
|
callback: { type: Function }
|
|
377
378
|
},
|
|
378
379
|
setup(e) {
|
|
@@ -380,15 +381,19 @@ const Jt = ["id"], en = {
|
|
|
380
381
|
return (o, i) => {
|
|
381
382
|
const l = Ht("autofocus");
|
|
382
383
|
return E(), qe(on, {
|
|
383
|
-
class:
|
|
384
|
+
class: B(["vf-alert", ...o.classes ?? []])
|
|
384
385
|
}, Ot({
|
|
385
386
|
default: ue(() => [
|
|
386
|
-
o.
|
|
387
|
+
o.iconClass ? (E(), k("i", {
|
|
387
388
|
key: 0,
|
|
389
|
+
class: B(["vf-alert-icon", o.iconClass])
|
|
390
|
+
}, null, 2)) : F("", !0),
|
|
391
|
+
o.isHtml ? (E(), k("div", {
|
|
392
|
+
key: 1,
|
|
388
393
|
innerHtml: o.message,
|
|
389
394
|
class: "user-message"
|
|
390
|
-
}, null, 8, ln)) : (E(),
|
|
391
|
-
key:
|
|
395
|
+
}, null, 8, ln)) : (E(), k("div", {
|
|
396
|
+
key: 2,
|
|
392
397
|
innerText: n.value
|
|
393
398
|
}, null, 8, sn))
|
|
394
399
|
]),
|
|
@@ -404,8 +409,8 @@ const Jt = ["id"], en = {
|
|
|
404
409
|
o.isBare ? void 0 : {
|
|
405
410
|
name: "footer",
|
|
406
411
|
fn: ue(() => [
|
|
407
|
-
o.shouldConfirm ? (E(),
|
|
408
|
-
Q((E(),
|
|
412
|
+
o.shouldConfirm ? (E(), k(J, { key: 0 }, [
|
|
413
|
+
Q((E(), k("button", {
|
|
409
414
|
class: "primary",
|
|
410
415
|
onClick: i[0] || (i[0] = () => o.callback(!0))
|
|
411
416
|
}, i[3] || (i[3] = [
|
|
@@ -413,11 +418,11 @@ const Jt = ["id"], en = {
|
|
|
413
418
|
]))), [
|
|
414
419
|
[l]
|
|
415
420
|
]),
|
|
416
|
-
|
|
421
|
+
D("button", {
|
|
417
422
|
class: "default",
|
|
418
423
|
onClick: i[1] || (i[1] = () => o.callback(!1))
|
|
419
424
|
}, "Cancel")
|
|
420
|
-
], 64)) : Q((E(),
|
|
425
|
+
], 64)) : Q((E(), k("button", {
|
|
421
426
|
key: 1,
|
|
422
427
|
class: "default",
|
|
423
428
|
onClick: i[2] || (i[2] = () => o.callback(!0))
|
|
@@ -456,7 +461,7 @@ function dn(e, t, n) {
|
|
|
456
461
|
const o = e.random || (e.rng || un)();
|
|
457
462
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, an(o);
|
|
458
463
|
}
|
|
459
|
-
function
|
|
464
|
+
function Co(e) {
|
|
460
465
|
return e.replace(/\n/g, "<br>");
|
|
461
466
|
}
|
|
462
467
|
function fn(e) {
|
|
@@ -469,7 +474,7 @@ function vn(e) {
|
|
|
469
474
|
function mn(e, t = 1) {
|
|
470
475
|
return "$" + (Number(e) / t).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
471
476
|
}
|
|
472
|
-
function
|
|
477
|
+
function xo() {
|
|
473
478
|
return dn();
|
|
474
479
|
}
|
|
475
480
|
const hn = ["disabled", "placeholder", "required"], pn = {
|
|
@@ -478,7 +483,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
478
483
|
}, yn = ["onMousemove", "onMousedown"], gn = ["innerHTML"], wn = ["innerHTML"], En = {
|
|
479
484
|
key: 0,
|
|
480
485
|
class: "no-results"
|
|
481
|
-
},
|
|
486
|
+
}, kn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", bn = /* @__PURE__ */ N({
|
|
482
487
|
__name: "vf-smart-select",
|
|
483
488
|
props: {
|
|
484
489
|
modelValue: {},
|
|
@@ -511,14 +516,14 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
511
516
|
setup(e, { expose: t, emit: n }) {
|
|
512
517
|
const o = Symbol("null"), i = Symbol("create"), l = e, u = n;
|
|
513
518
|
t({
|
|
514
|
-
addRemoteOption:
|
|
519
|
+
addRemoteOption: bt
|
|
515
520
|
});
|
|
516
|
-
const a = T(), d = T(), g = T(),
|
|
521
|
+
const a = T(), d = T(), g = T(), b = 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) => {
|
|
517
522
|
var Ae, Fe;
|
|
518
|
-
const h = se.value(s), p = (Ae = l.subtitleFormatter) == null ? void 0 : Ae.call(l, s), y = h ? h.trim().toLowerCase() : "",
|
|
523
|
+
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 = [];
|
|
519
524
|
return l.searchFields ? l.searchFields.forEach((De) => {
|
|
520
525
|
s[De] && Z.push(String(s[De]).toLowerCase());
|
|
521
|
-
}) : (Z.push(y),
|
|
526
|
+
}) : (Z.push(y), C && Z.push(C)), {
|
|
522
527
|
key: ((Fe = j.value) == null ? void 0 : Fe.call(j, s)) ?? String(v),
|
|
523
528
|
title: h,
|
|
524
529
|
subtitle: p,
|
|
@@ -533,13 +538,13 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
533
538
|
s = s.filter((y) => y.searchContent.includes(v));
|
|
534
539
|
const h = Nt(r.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${h})`, "ig");
|
|
535
540
|
s = s.map((y) => {
|
|
536
|
-
var
|
|
541
|
+
var C;
|
|
537
542
|
return {
|
|
538
543
|
...y,
|
|
539
544
|
title: y.title.replace(p, "<mark>$1</mark>"),
|
|
540
|
-
subtitle: (
|
|
545
|
+
subtitle: (C = y.subtitle) == null ? void 0 : C.replace(p, "<mark>$1</mark>")
|
|
541
546
|
};
|
|
542
|
-
}), Se.value && (s.find((
|
|
547
|
+
}), Se.value && (s.find((C) => C.searchContent === v) !== void 0 || s.push({
|
|
543
548
|
key: i,
|
|
544
549
|
title: at.value ? "Create <strong>" + r.value.trim() + "</strong>..." : r.value.trim()
|
|
545
550
|
}));
|
|
@@ -563,7 +568,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
563
568
|
I.value ? setTimeout(wt, 0) : (m.value = !1, r.value = S.value || "", g.value && (g.value.style.visibility = "hidden"));
|
|
564
569
|
}), A(H, () => {
|
|
565
570
|
var s;
|
|
566
|
-
l.modelValue && !c.value && re(), (
|
|
571
|
+
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);
|
|
567
572
|
}), V(async () => {
|
|
568
573
|
Se.value = l.onCreateItem !== void 0, l.options ? (w.value = [...l.options], f.value = !0) : l.preload && await Le(), re(), A(c, () => {
|
|
569
574
|
c.value !== l.modelValue && u(
|
|
@@ -578,7 +583,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
578
583
|
async function Me() {
|
|
579
584
|
var v;
|
|
580
585
|
const s = l.remoteSearch && m.value && r.value ? r.value : null;
|
|
581
|
-
|
|
586
|
+
b.value = !0, w.value = await ((v = l.loadOptions) == null ? void 0 : v.call(l, s)) ?? [], b.value = !1, f.value = !0;
|
|
582
587
|
}
|
|
583
588
|
function ft() {
|
|
584
589
|
m.value && (Me(), m.value = r.value.trim().length > 0);
|
|
@@ -601,14 +606,14 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
601
606
|
return s.preventDefault(), ae(s.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
602
607
|
if (s.key == "Enter") {
|
|
603
608
|
s.preventDefault();
|
|
604
|
-
const v = H.value.find((h) => h.key ==
|
|
609
|
+
const v = H.value.find((h) => h.key == x.value);
|
|
605
610
|
if (v) return He(v);
|
|
606
611
|
}
|
|
607
612
|
if (s.key === "Delete" || s.key === "Backspace") {
|
|
608
613
|
r.value.length > 1 && (m.value = !0);
|
|
609
614
|
return;
|
|
610
615
|
}
|
|
611
|
-
!s.metaKey &&
|
|
616
|
+
!s.metaKey && kn.includes(s.key) && (m.value = !0);
|
|
612
617
|
}
|
|
613
618
|
}
|
|
614
619
|
function mt() {
|
|
@@ -618,7 +623,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
618
623
|
}, 0);
|
|
619
624
|
}
|
|
620
625
|
function ht(s) {
|
|
621
|
-
c.value ?
|
|
626
|
+
c.value ? x.value = pt(c.value) : l.nullTitle && (x.value = o);
|
|
622
627
|
}
|
|
623
628
|
function pt(s) {
|
|
624
629
|
var v;
|
|
@@ -628,7 +633,7 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
628
633
|
const v = H.value.find((y) => y.ref === s);
|
|
629
634
|
if (v)
|
|
630
635
|
return v;
|
|
631
|
-
const h = l.keyExtractor ? (y,
|
|
636
|
+
const h = l.keyExtractor ? (y, C) => l.keyExtractor(y) === l.keyExtractor(C) : Xe, p = H.value.find((y) => h(y.ref, s));
|
|
632
637
|
return p || null;
|
|
633
638
|
}
|
|
634
639
|
function gt() {
|
|
@@ -640,27 +645,27 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
640
645
|
}
|
|
641
646
|
function Et() {
|
|
642
647
|
const s = a.value.getBoundingClientRect(), v = s.y + s.height + 2, h = s.x, p = g.value, y = window.getComputedStyle(a.value);
|
|
643
|
-
for (let
|
|
644
|
-
/^(font|text)/.test(
|
|
648
|
+
for (let C in y)
|
|
649
|
+
/^(font|text)/.test(C) && (p.style[C] = y[C]);
|
|
645
650
|
if (p.style.top = v + "px", p.style.left = h + "px", p.style.minWidth = s.width + "px", !y.maxHeight || y.maxHeight == "none") {
|
|
646
|
-
const
|
|
647
|
-
p.style.maxHeight =
|
|
651
|
+
const C = window.innerHeight - v - 12;
|
|
652
|
+
p.style.maxHeight = C + "px";
|
|
648
653
|
}
|
|
649
654
|
p.style.visibility = "visible", document.body.appendChild(p), setTimeout(Ie, 0);
|
|
650
655
|
}
|
|
651
656
|
function Ie() {
|
|
652
|
-
if (!f.value || !
|
|
653
|
-
const s = H.value.findIndex((p) => p.key ==
|
|
657
|
+
if (!f.value || !x.value) return;
|
|
658
|
+
const s = H.value.findIndex((p) => p.key == x.value), v = g.value, h = v == null ? void 0 : v.querySelectorAll(".option")[s];
|
|
654
659
|
h && (v.scrollTop = h.offsetTop);
|
|
655
660
|
}
|
|
656
|
-
function
|
|
657
|
-
|
|
661
|
+
function kt(s) {
|
|
662
|
+
x.value = s ? s.key : null;
|
|
658
663
|
}
|
|
659
664
|
function ae(s) {
|
|
660
|
-
const v = H.value.findIndex((
|
|
665
|
+
const v = H.value.findIndex((C) => C.key == x.value);
|
|
661
666
|
let h = v + s;
|
|
662
667
|
if (h < 0 ? h = 0 : h >= H.value.length && (h = H.value.length - 1), v == h) return;
|
|
663
|
-
|
|
668
|
+
x.value = H.value[h].key;
|
|
664
669
|
const p = g.value, y = p == null ? void 0 : p.querySelectorAll(".option")[h];
|
|
665
670
|
y && (y.offsetTop < p.scrollTop ? p.scrollTop = y.offsetTop : y.offsetTop + y.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = y.offsetTop + y.offsetHeight - p.clientHeight));
|
|
666
671
|
}
|
|
@@ -672,15 +677,15 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
672
677
|
const p = r.value.trim();
|
|
673
678
|
r.value = "", c.value = null, S.value = null, (v = l.onCreateItem) == null || v.call(l, p);
|
|
674
679
|
} else {
|
|
675
|
-
const y = ie.value.find((
|
|
680
|
+
const y = ie.value.find((C) => C.key == s.key).ref;
|
|
676
681
|
c.value = y, S.value = se.value(y), r.value = S.value || "";
|
|
677
682
|
}
|
|
678
683
|
(h = d.value) == null || h.blur(), Oe();
|
|
679
684
|
}
|
|
680
685
|
function re() {
|
|
681
|
-
l.modelValue ? (c.value = W.value ?
|
|
686
|
+
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 = "");
|
|
682
687
|
}
|
|
683
|
-
function
|
|
688
|
+
function bt(s) {
|
|
684
689
|
w.value.unshift(s);
|
|
685
690
|
}
|
|
686
691
|
function Oe() {
|
|
@@ -692,21 +697,21 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
692
697
|
if (!s) return;
|
|
693
698
|
const v = s.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
|
|
694
699
|
if (!v) return;
|
|
695
|
-
const h = Array.from(v).findIndex((
|
|
700
|
+
const h = Array.from(v).findIndex((C) => C === d.value), p = v[h + 1];
|
|
696
701
|
p && setTimeout(() => p.focus(), 0);
|
|
697
702
|
}
|
|
698
|
-
return (s, v) => (E(),
|
|
703
|
+
return (s, v) => (E(), k("div", {
|
|
699
704
|
ref_key: "el",
|
|
700
705
|
ref: a,
|
|
701
|
-
class:
|
|
706
|
+
class: B(["vf-smart-select", { disabled: Ce.value, open: I.value }])
|
|
702
707
|
}, [
|
|
703
|
-
Q(
|
|
708
|
+
Q(D("input", {
|
|
704
709
|
ref_key: "searchField",
|
|
705
710
|
ref: d,
|
|
706
711
|
"onUpdate:modelValue": v[0] || (v[0] = (h) => r.value = h),
|
|
707
712
|
type: "text",
|
|
708
|
-
disabled:
|
|
709
|
-
class:
|
|
713
|
+
disabled: Ce.value,
|
|
714
|
+
class: B({ nullable: !!s.nullTitle }),
|
|
710
715
|
placeholder: ct.value,
|
|
711
716
|
required: s.required,
|
|
712
717
|
"data-1p-ignore": "",
|
|
@@ -716,34 +721,34 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
716
721
|
}, null, 42, hn), [
|
|
717
722
|
[At, r.value]
|
|
718
723
|
]),
|
|
719
|
-
I.value ? (E(),
|
|
724
|
+
I.value ? (E(), k("div", {
|
|
720
725
|
key: 0,
|
|
721
726
|
ref_key: "optionsContainer",
|
|
722
727
|
ref: g,
|
|
723
728
|
class: "vf-smart-select-options"
|
|
724
729
|
}, [
|
|
725
|
-
f.value ? (E(),
|
|
726
|
-
(E(!0),
|
|
730
|
+
f.value ? (E(), k(J, { key: 1 }, [
|
|
731
|
+
(E(!0), k(J, null, he(H.value, (h) => (E(), k("div", {
|
|
727
732
|
key: String(h.key),
|
|
728
|
-
class:
|
|
729
|
-
highlighted:
|
|
733
|
+
class: B(["option", {
|
|
734
|
+
highlighted: x.value === h.key
|
|
730
735
|
}]),
|
|
731
|
-
onMousemove: (p) =>
|
|
736
|
+
onMousemove: (p) => kt(h),
|
|
732
737
|
onMousedown: (p) => He(h)
|
|
733
738
|
}, [
|
|
734
|
-
|
|
739
|
+
D("div", {
|
|
735
740
|
class: "title",
|
|
736
741
|
innerHTML: h.title
|
|
737
742
|
}, null, 8, gn),
|
|
738
|
-
h.subtitle ? (E(),
|
|
743
|
+
h.subtitle ? (E(), k("div", {
|
|
739
744
|
key: 0,
|
|
740
745
|
class: "subtitle",
|
|
741
746
|
innerHTML: h.subtitle
|
|
742
|
-
}, null, 8, wn)) :
|
|
747
|
+
}, null, 8, wn)) : F("", !0)
|
|
743
748
|
], 42, yn))), 128)),
|
|
744
|
-
!H.value.length && r.value ? (E(),
|
|
745
|
-
], 64)) : (E(),
|
|
746
|
-
], 512)) :
|
|
749
|
+
!H.value.length && r.value ? (E(), k("div", En, U(dt.value), 1)) : F("", !0)
|
|
750
|
+
], 64)) : (E(), k("div", pn, "Loading..."))
|
|
751
|
+
], 512)) : F("", !0)
|
|
747
752
|
], 2));
|
|
748
753
|
}
|
|
749
754
|
}), Lo = /* @__PURE__ */ N({
|
|
@@ -768,9 +773,9 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
768
773
|
}
|
|
769
774
|
), A(u, (a) => {
|
|
770
775
|
var g;
|
|
771
|
-
const d = a ? (g = o.value.find((
|
|
776
|
+
const d = a ? (g = o.value.find((b) => Xe(b, a))) == null ? void 0 : g.value : null;
|
|
772
777
|
l("update:modelValue", d ?? null);
|
|
773
|
-
}), (a, d) => (E(), qe(
|
|
778
|
+
}), (a, d) => (E(), qe(bn, {
|
|
774
779
|
modelValue: u.value,
|
|
775
780
|
"onUpdate:modelValue": d[0] || (d[0] = (g) => u.value = g),
|
|
776
781
|
options: o.value,
|
|
@@ -783,10 +788,10 @@ const hn = ["disabled", "placeholder", "required"], pn = {
|
|
|
783
788
|
function Mo() {
|
|
784
789
|
return T();
|
|
785
790
|
}
|
|
786
|
-
const Tn = { class: "content" }, Sn = { class: "message" },
|
|
791
|
+
const Tn = { class: "content" }, Sn = { class: "message" }, Cn = {
|
|
787
792
|
key: 0,
|
|
788
793
|
class: "close"
|
|
789
|
-
},
|
|
794
|
+
}, xn = {
|
|
790
795
|
key: 0,
|
|
791
796
|
class: "progress-bar"
|
|
792
797
|
}, Ln = /* @__PURE__ */ N({
|
|
@@ -812,21 +817,21 @@ const Tn = { class: "content" }, Sn = { class: "message" }, xn = {
|
|
|
812
817
|
duration: i * 1e3,
|
|
813
818
|
easing: "linear"
|
|
814
819
|
}), setTimeout(() => t.callback(), i * 1e3);
|
|
815
|
-
}), (i, l) => (E(),
|
|
816
|
-
class:
|
|
820
|
+
}), (i, l) => (E(), k("div", {
|
|
821
|
+
class: B(["vf-toast", i.className]),
|
|
817
822
|
onClick: ye(n, ["stop"])
|
|
818
823
|
}, [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
i.disableClose ?
|
|
824
|
+
D("div", Tn, [
|
|
825
|
+
D("div", Sn, U(i.message), 1),
|
|
826
|
+
i.disableClose ? F("", !0) : (E(), k("div", Cn, "x"))
|
|
822
827
|
]),
|
|
823
|
-
i.durationSecs !== null ? (E(),
|
|
824
|
-
|
|
828
|
+
i.durationSecs !== null ? (E(), k("div", xn, [
|
|
829
|
+
D("div", {
|
|
825
830
|
ref_key: "progressInnerEl",
|
|
826
831
|
ref: o,
|
|
827
832
|
class: "inner"
|
|
828
833
|
}, null, 512)
|
|
829
|
-
])) :
|
|
834
|
+
])) : F("", !0)
|
|
830
835
|
], 2));
|
|
831
836
|
}
|
|
832
837
|
});
|
|
@@ -902,8 +907,8 @@ function Ao(e, t) {
|
|
|
902
907
|
const r = document.createElement("div");
|
|
903
908
|
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());
|
|
904
909
|
});
|
|
905
|
-
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,
|
|
906
|
-
o.style.left = g + "px", o.style.top =
|
|
910
|
+
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, b = u < a ? e.clientY - a - 1 : e.clientY + 1;
|
|
911
|
+
o.style.left = g + "px", o.style.top = b + "px", setTimeout(() => {
|
|
907
912
|
o.style.width = o.offsetWidth + "px";
|
|
908
913
|
}, 50);
|
|
909
914
|
function f() {
|
|
@@ -944,7 +949,7 @@ function $o(e, t) {
|
|
|
944
949
|
}
|
|
945
950
|
});
|
|
946
951
|
}
|
|
947
|
-
const
|
|
952
|
+
const be = Symbol("HookState");
|
|
948
953
|
function Vo(e, t) {
|
|
949
954
|
const n = t ?? pe();
|
|
950
955
|
V(() => Rn(n, e), n), ze(() => Wn(n), n), Ye(() => Ve(n), n), ge(() => Ve(n), n);
|
|
@@ -955,16 +960,16 @@ function Rn(e, t) {
|
|
|
955
960
|
const o = et(e.vnode.el);
|
|
956
961
|
o ? n.ancestor = new Y(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
957
962
|
}
|
|
958
|
-
t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[
|
|
963
|
+
t.windowScrolledToBottom && (n.window = new Y(window, t.windowScrolledToBottom)), e[be] = n;
|
|
959
964
|
}
|
|
960
965
|
function Wn(e) {
|
|
961
966
|
var n, o, i;
|
|
962
|
-
const t = e[
|
|
967
|
+
const t = e[be];
|
|
963
968
|
(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();
|
|
964
969
|
}
|
|
965
970
|
function Ve(e) {
|
|
966
971
|
var n, o, i;
|
|
967
|
-
const t = e[
|
|
972
|
+
const t = e[be];
|
|
968
973
|
(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();
|
|
969
974
|
}
|
|
970
975
|
const fe = ["auto", "scroll"];
|
|
@@ -1047,13 +1052,13 @@ function Re(e, t) {
|
|
|
1047
1052
|
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Kn(e, t));
|
|
1048
1053
|
}
|
|
1049
1054
|
function Kn(e, t) {
|
|
1050
|
-
var g,
|
|
1055
|
+
var g, b;
|
|
1051
1056
|
if (!t.value)
|
|
1052
1057
|
return ((g = e.attributes.getNamedItem("placeholder")) == null ? void 0 : g.value) ?? "";
|
|
1053
1058
|
let n = "";
|
|
1054
1059
|
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);
|
|
1055
1060
|
e.attributes.getNamedItem("display-utc") !== null && l.setMinutes(l.getMinutes() - l.getTimezoneOffset());
|
|
1056
|
-
let u = (
|
|
1061
|
+
let u = (b = e.attributes.getNamedItem("format")) == null ? void 0 : b.value;
|
|
1057
1062
|
const a = e.attributes.getNamedItem("date-only") !== null;
|
|
1058
1063
|
if (!u && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1059
1064
|
const f = /* @__PURE__ */ new Date();
|
|
@@ -1063,10 +1068,10 @@ function Kn(e, t) {
|
|
|
1063
1068
|
let f = null;
|
|
1064
1069
|
const w = /* @__PURE__ */ new Date();
|
|
1065
1070
|
w.getFullYear() === l.getFullYear() ? (w.getMonth() !== l.getMonth() || w.getDate() !== l.getDate()) && (f = "M/d") : f = "M/d/YY";
|
|
1066
|
-
const m = a ? null :
|
|
1071
|
+
const m = a ? null : $.defaultTimeFormat;
|
|
1067
1072
|
u = Ke([f, m]).join(" ");
|
|
1068
1073
|
}
|
|
1069
|
-
u || (a ? u =
|
|
1074
|
+
u || (a ? u = $.defaultDateFormat : u = `${$.defaultDateFormat} ${$.defaultTimeFormat}`);
|
|
1070
1075
|
let d = ve(l, u);
|
|
1071
1076
|
return n && (d = n + " " + d), d;
|
|
1072
1077
|
}
|
|
@@ -1243,7 +1248,7 @@ export {
|
|
|
1243
1248
|
le as VfAlertModal,
|
|
1244
1249
|
Lo as VfEzSmartSelect,
|
|
1245
1250
|
on as VfModal,
|
|
1246
|
-
|
|
1251
|
+
bn as VfSmartSelect,
|
|
1247
1252
|
Do as cloneProp,
|
|
1248
1253
|
Eo as configureVf,
|
|
1249
1254
|
$o as configureVfOpenApiClient,
|
|
@@ -1259,13 +1264,13 @@ export {
|
|
|
1259
1264
|
Nn as formatNumber,
|
|
1260
1265
|
vn as formatPhone,
|
|
1261
1266
|
mn as formatUSCurrency,
|
|
1262
|
-
|
|
1263
|
-
|
|
1267
|
+
bo as handleError,
|
|
1268
|
+
ko as handleErrorAndAlert,
|
|
1264
1269
|
No as installVf,
|
|
1265
1270
|
To as maskComponent,
|
|
1266
1271
|
Gt as maskEl,
|
|
1267
1272
|
Qt as maskForm,
|
|
1268
|
-
|
|
1273
|
+
Co as nl2br,
|
|
1269
1274
|
Bo as nullifyEmptyInputs,
|
|
1270
1275
|
Ee as presentOverlay,
|
|
1271
1276
|
te as removeOverlayInjection,
|
|
@@ -1278,12 +1283,12 @@ export {
|
|
|
1278
1283
|
wo as showWait,
|
|
1279
1284
|
_n as sleep,
|
|
1280
1285
|
Fo as sleepSecs,
|
|
1281
|
-
|
|
1286
|
+
ke as toError,
|
|
1282
1287
|
So as unmaskComponent,
|
|
1283
1288
|
Ge as unmaskEl,
|
|
1284
1289
|
Qe as unmaskForm,
|
|
1285
1290
|
Vo as useInfiniteScroll,
|
|
1286
1291
|
_o as useResizeWatcher,
|
|
1287
|
-
|
|
1292
|
+
xo as uuid,
|
|
1288
1293
|
Mo as vfModalRef
|
|
1289
1294
|
};
|
package/package.json
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
{{ title }}
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
+
<i v-if="iconClass" :class="['vf-alert-icon', iconClass]" />
|
|
8
|
+
|
|
7
9
|
<div v-if="isHtml" :innerHtml="message" class="user-message"></div>
|
|
8
10
|
<div v-else :innerText="textMessage"></div>
|
|
9
11
|
|
|
@@ -30,6 +32,7 @@ const props = defineProps<{
|
|
|
30
32
|
title?: string;
|
|
31
33
|
message: string | Error;
|
|
32
34
|
shouldConfirm?: boolean;
|
|
35
|
+
iconClass?: string | string[];
|
|
33
36
|
callback: (ok: boolean) => void;
|
|
34
37
|
}>();
|
|
35
38
|
|
|
@@ -56,6 +59,10 @@ const textMessage = computed(() => {
|
|
|
56
59
|
.vf-modal-content {
|
|
57
60
|
text-align: center;
|
|
58
61
|
}
|
|
62
|
+
|
|
63
|
+
.vf-alert-icon {
|
|
64
|
+
margin-bottom: 12px;
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
&.destructive {
|