@wishbone-media/spark 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as S, resolveComponent as A, createElementBlock as g, openBlock as m, normalizeClass as H, createElementVNode as
|
|
1
|
+
import { computed as S, resolveComponent as A, createElementBlock as g, openBlock as m, normalizeClass as H, createElementVNode as f, createCommentVNode as T, createVNode as b, unref as w, renderSlot as O, reactive as q, Fragment as R, renderList as z, toDisplayString as L, createBlock as V, resolveDynamicComponent as I, markRaw as fe, ref as E, watch as N, Transition as Ue, withCtx as C, normalizeProps as Ke, mergeProps as Z, createTextVNode as B, Teleport as Ge, TransitionGroup as le, inject as Ve, provide as We, toHandlers as Re, onMounted as be, withModifiers as Q, useSlots as Be, onUnmounted as Ye, h as ke } from "vue";
|
|
2
2
|
import { library as Ee, icon as ce } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as Xe } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faCloudDownload as Je, faBolt as Qe, faUndo as et, faEye as tt, faSignOut as st, faXmark as ot, faTrash as at, faTimes as rt, faStreetView as nt, faSortUp as lt, faSortDown as it, faSort as ct, faScaleBalanced as ut, faSatelliteDish as dt, faLayerPlus as pt, faLaptopMobile as ft, faInfoCircle as mt, faGripDotsVertical as ht, faGearComplex as gt, faFlag as yt, faFaceSmileWink as vt, faFaceSmileRelaxed as bt, faExclamationTriangle as xt, faEllipsisVertical as kt, faEllipsis as
|
|
4
|
+
import { faCloudDownload as Je, faBolt as Qe, faUndo as et, faEye as tt, faSignOut as st, faXmark as ot, faTrash as at, faTimes as rt, faStreetView as nt, faSortUp as lt, faSortDown as it, faSort as ct, faScaleBalanced as ut, faSatelliteDish as dt, faLayerPlus as pt, faLaptopMobile as ft, faInfoCircle as mt, faGripDotsVertical as ht, faGearComplex as gt, faFlag as yt, faFaceSmileWink as vt, faFaceSmileRelaxed as bt, faExclamationTriangle as xt, faEllipsisVertical as kt, faEllipsis as wt, faEdit as _t, faComments as St, faCircleXmark as Ct, faCircleUser as $t, faChevronUp as Tt, faChevronRight as Lt, faChevronLeft as Pt, faChevronDown as Mt, faCheckCircle as Ht, faCheck as Vt, faBullhorn as Rt, faBellRing as Bt, faBarsSort as Et, faArrowRightToLine as At, faArrowLeftToLine as Ft } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { defineStore as ue } from "pinia";
|
|
6
|
-
import { TransitionRoot as Ae, Dialog as
|
|
6
|
+
import { TransitionRoot as Ae, Dialog as Fe, TransitionChild as pe, DialogPanel as Oe } from "@headlessui/vue";
|
|
7
7
|
import me from "nprogress";
|
|
8
|
-
import { range as
|
|
8
|
+
import { range as Ot, get as Y, find as zt, has as Dt } from "lodash";
|
|
9
9
|
import { HotTable as jt } from "@handsontable/vue3";
|
|
10
10
|
import "handsontable/styles/handsontable.css";
|
|
11
11
|
import "handsontable/styles/ht-theme-classic.css";
|
|
12
|
-
import { registerPlugin as de, AutoColumnSize as
|
|
12
|
+
import { registerPlugin as de, AutoColumnSize as Nt, CopyPaste as It, StretchColumns as Zt, NestedHeaders as qt } from "handsontable/plugins";
|
|
13
13
|
import { registerAllCellTypes as Ut } from "handsontable/cellTypes";
|
|
14
|
-
import { useDebounceFn as ze, watchDebounced as
|
|
14
|
+
import { useDebounceFn as ze, watchDebounced as we } from "@vueuse/core";
|
|
15
15
|
import { registerRenderer as Kt, baseRenderer as Gt } from "handsontable/renderers";
|
|
16
16
|
import { useRouter as J, useRoute as ne } from "vue-router";
|
|
17
17
|
import re from "axios";
|
|
@@ -28,8 +28,8 @@ var Wt = {
|
|
|
28
28
|
iconName: "sort-down",
|
|
29
29
|
icon: [384, 512, ["sort-desc"], "f0dd", ["", "M32 288c-12.9 0-24.6 7.8-29.6 19.8S.2 333.5 9.4 342.6l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288z"]]
|
|
30
30
|
};
|
|
31
|
-
const
|
|
32
|
-
farArrowLeftToLine:
|
|
31
|
+
const F = {
|
|
32
|
+
farArrowLeftToLine: Ft,
|
|
33
33
|
farArrowRightToLine: At,
|
|
34
34
|
farBarsSort: Et,
|
|
35
35
|
farBellRing: Bt,
|
|
@@ -43,8 +43,8 @@ const O = {
|
|
|
43
43
|
farCircleUser: $t,
|
|
44
44
|
farCircleXmark: Ct,
|
|
45
45
|
farComments: St,
|
|
46
|
-
farEdit:
|
|
47
|
-
farEllipsis:
|
|
46
|
+
farEdit: _t,
|
|
47
|
+
farEllipsis: wt,
|
|
48
48
|
farEllipsisVertical: kt,
|
|
49
49
|
farExclamationTriangle: xt,
|
|
50
50
|
farFaceSmileRelaxed: bt,
|
|
@@ -73,11 +73,11 @@ const O = {
|
|
|
73
73
|
fadSortDown: Xt,
|
|
74
74
|
fadSortUp: Wt
|
|
75
75
|
};
|
|
76
|
-
function
|
|
77
|
-
Object.assign(
|
|
76
|
+
function nn(e) {
|
|
77
|
+
Object.assign(F, e), Ee.add(...Object.values(e));
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
Ee.add(...Object.values(
|
|
79
|
+
function ln(e) {
|
|
80
|
+
Ee.add(...Object.values(F)), e.component("FontAwesomeIcon", Xe);
|
|
81
81
|
}
|
|
82
82
|
const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }, es = { class: "ml-3" }, ts = {
|
|
83
83
|
key: 0,
|
|
@@ -123,25 +123,25 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
123
123
|
return m(), g("div", {
|
|
124
124
|
class: H(["rounded-md border p-4", t.value])
|
|
125
125
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
f("div", Jt, [
|
|
127
|
+
f("div", Qt, [
|
|
128
128
|
b(r, {
|
|
129
|
-
icon:
|
|
129
|
+
icon: w(F)[l.value],
|
|
130
130
|
class: H(o.value)
|
|
131
131
|
}, null, 8, ["icon", "class"])
|
|
132
132
|
]),
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
f("div", es, [
|
|
134
|
+
O(a.$slots, "default")
|
|
135
135
|
]),
|
|
136
136
|
e.closeable ? (m(), g("div", ts, [
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
f("div", ss, [
|
|
138
|
+
f("button", {
|
|
139
139
|
type: "button",
|
|
140
140
|
class: H(["inline-flex rounded-md px-2 py-1.5", n.value]),
|
|
141
141
|
onClick: c[0] || (c[0] = (i) => a.$emit("close"))
|
|
142
142
|
}, [
|
|
143
143
|
b(r, {
|
|
144
|
-
icon:
|
|
144
|
+
icon: w(F).farXmark
|
|
145
145
|
}, null, 8, ["icon"])
|
|
146
146
|
], 2)
|
|
147
147
|
])
|
|
@@ -293,13 +293,13 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
293
293
|
return (c, r) => {
|
|
294
294
|
const i = A("font-awesome-icon");
|
|
295
295
|
return m(), g("div", os, [
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
r[1] || (r[1] =
|
|
300
|
-
|
|
296
|
+
f("div", as, [
|
|
297
|
+
f("div", rs, [
|
|
298
|
+
f("div", ns, [
|
|
299
|
+
r[1] || (r[1] = f("div", null, "Mr Group Network", -1)),
|
|
300
|
+
f("div", ls, [
|
|
301
301
|
b(i, {
|
|
302
|
-
icon:
|
|
302
|
+
icon: w(F).farTimes,
|
|
303
303
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
304
304
|
onClick: r[0] || (r[0] = (u) => t("close"))
|
|
305
305
|
}, null, 8, ["icon"])
|
|
@@ -312,31 +312,31 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
312
312
|
class: H([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
313
313
|
onClick: (d) => u.current ? d.preventDefault() : a(u)
|
|
314
314
|
}, [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
315
|
+
f("div", cs, [
|
|
316
|
+
f("div", us, [
|
|
317
|
+
f("div", ds, L(u.name), 1),
|
|
318
318
|
u.current ? (m(), g("span", ps, " Active ")) : T("", !0)
|
|
319
319
|
]),
|
|
320
|
-
|
|
320
|
+
f("div", fs, L(u.description), 1)
|
|
321
321
|
]),
|
|
322
|
-
|
|
322
|
+
f("div", ms, [
|
|
323
323
|
b(i, {
|
|
324
324
|
class: H([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
325
|
-
icon:
|
|
325
|
+
icon: w(F)[u.icon]
|
|
326
326
|
}, null, 8, ["class", "icon"])
|
|
327
327
|
])
|
|
328
328
|
], 10, is))), 128)),
|
|
329
|
-
r[2] || (r[2] =
|
|
329
|
+
r[2] || (r[2] = f("div", null, null, -1))
|
|
330
330
|
]),
|
|
331
|
-
|
|
331
|
+
f("div", hs, [
|
|
332
332
|
c.$slots.bottom || e.bottomSlot ? (m(), g("div", gs, [
|
|
333
|
-
|
|
334
|
-
e.bottomSlot ? (m(), V(
|
|
333
|
+
O(c.$slots, "bottom", {}, () => [
|
|
334
|
+
e.bottomSlot ? (m(), V(I(e.bottomSlot), { key: 0 })) : T("", !0)
|
|
335
335
|
])
|
|
336
336
|
])) : T("", !0),
|
|
337
337
|
c.$slots.footer || e.footerSlot ? (m(), g("div", ys, [
|
|
338
|
-
|
|
339
|
-
e.footerSlot ? (m(), V(
|
|
338
|
+
O(c.$slots, "footer", {}, () => [
|
|
339
|
+
e.footerSlot ? (m(), V(I(e.footerSlot), { key: 0 })) : T("", !0)
|
|
340
340
|
])
|
|
341
341
|
])) : T("", !0)
|
|
342
342
|
])
|
|
@@ -344,13 +344,13 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
344
344
|
]);
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Ne = {
|
|
348
348
|
success: 5e3,
|
|
349
349
|
info: 5e3,
|
|
350
350
|
warning: 5e3,
|
|
351
351
|
danger: 0
|
|
352
352
|
// sticky by default
|
|
353
|
-
},
|
|
353
|
+
}, _e = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
|
|
354
354
|
function bs() {
|
|
355
355
|
const e = q({
|
|
356
356
|
isVisible: !1,
|
|
@@ -366,14 +366,14 @@ function bs() {
|
|
|
366
366
|
s && (clearTimeout(s), s = null), t = 0, o = !1, l = null;
|
|
367
367
|
}, a = () => {
|
|
368
368
|
n(), e.isVisible = !1;
|
|
369
|
-
}, c = (
|
|
370
|
-
|
|
369
|
+
}, c = (p) => {
|
|
370
|
+
p <= 0 || (t = p, l = Date.now(), s = setTimeout(() => {
|
|
371
371
|
a();
|
|
372
|
-
},
|
|
372
|
+
}, p));
|
|
373
373
|
};
|
|
374
374
|
return {
|
|
375
375
|
state: e,
|
|
376
|
-
show: (
|
|
376
|
+
show: (p = {}) => {
|
|
377
377
|
n();
|
|
378
378
|
const {
|
|
379
379
|
type: y = "info",
|
|
@@ -381,10 +381,10 @@ function bs() {
|
|
|
381
381
|
component: h = null,
|
|
382
382
|
props: x = {},
|
|
383
383
|
closeable: P = !0,
|
|
384
|
-
duration:
|
|
385
|
-
} =
|
|
384
|
+
duration: _ = null
|
|
385
|
+
} = p;
|
|
386
386
|
e.type = y, e.message = k, e.component = h ? fe(h) : null, e.props = x, e.closeable = P, e.isVisible = !0;
|
|
387
|
-
const v =
|
|
387
|
+
const v = _ !== null ? _ : Ne[y];
|
|
388
388
|
e.duration = v, v > 0 && c(v);
|
|
389
389
|
},
|
|
390
390
|
hide: a,
|
|
@@ -394,8 +394,8 @@ function bs() {
|
|
|
394
394
|
pause: () => {
|
|
395
395
|
if (!s || o) return;
|
|
396
396
|
clearTimeout(s), s = null;
|
|
397
|
-
const
|
|
398
|
-
t = Math.max(0, t -
|
|
397
|
+
const p = Date.now() - l;
|
|
398
|
+
t = Math.max(0, t - p), o = !0;
|
|
399
399
|
},
|
|
400
400
|
resume: () => {
|
|
401
401
|
!o || t <= 0 || (o = !1, l = Date.now(), s = setTimeout(() => {
|
|
@@ -493,7 +493,7 @@ class xs {
|
|
|
493
493
|
* @param {boolean} options.newestOnTop - Whether newest toasts appear on top (default: true)
|
|
494
494
|
*/
|
|
495
495
|
configureToasts(s = {}) {
|
|
496
|
-
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 &&
|
|
496
|
+
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 && _e.includes(s.defaultPosition) && (this.toastState.defaultPosition = s.defaultPosition), s.newestOnTop !== void 0 && (this.toastState.newestOnTop = s.newestOnTop);
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
499
|
* Show a toast notification
|
|
@@ -516,7 +516,7 @@ class xs {
|
|
|
516
516
|
closeable: a = !0,
|
|
517
517
|
duration: c = null,
|
|
518
518
|
position: r = null
|
|
519
|
-
} = s, i = ++this._toastIdCounter, u = r &&
|
|
519
|
+
} = s, i = ++this._toastIdCounter, u = r && _e.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c : Ne[t], p = {
|
|
520
520
|
id: i,
|
|
521
521
|
type: t,
|
|
522
522
|
message: o,
|
|
@@ -533,9 +533,9 @@ class xs {
|
|
|
533
533
|
}
|
|
534
534
|
if (this.toastState.newestOnTop) {
|
|
535
535
|
const k = this.toastState.toasts.findIndex((h) => h.position === u);
|
|
536
|
-
k === -1 ? this.toastState.toasts.push(
|
|
536
|
+
k === -1 ? this.toastState.toasts.push(p) : this.toastState.toasts.splice(k, 0, p);
|
|
537
537
|
} else
|
|
538
|
-
this.toastState.toasts.push(
|
|
538
|
+
this.toastState.toasts.push(p);
|
|
539
539
|
return d > 0 && this._startToastTimer(i, d), i;
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
@@ -609,7 +609,7 @@ class xs {
|
|
|
609
609
|
t && (t.timeout && clearTimeout(t.timeout), this._toastTimers.delete(s));
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
const X = new xs(),
|
|
612
|
+
const X = new xs(), cn = {
|
|
613
613
|
__name: "SparkNotificationOutlet",
|
|
614
614
|
props: {
|
|
615
615
|
name: {
|
|
@@ -619,7 +619,7 @@ const X = new xs(), nn = {
|
|
|
619
619
|
},
|
|
620
620
|
setup(e) {
|
|
621
621
|
const s = e, t = S(() => X.getOutlet(s.name)), o = E(0);
|
|
622
|
-
|
|
622
|
+
N(
|
|
623
623
|
() => [t.value.state.message, t.value.state.component, t.value.state.type],
|
|
624
624
|
() => {
|
|
625
625
|
t.value.state.isVisible && o.value++;
|
|
@@ -651,7 +651,7 @@ const X = new xs(), nn = {
|
|
|
651
651
|
onMouseleave: a
|
|
652
652
|
}, {
|
|
653
653
|
default: C(() => [
|
|
654
|
-
t.value.state.component ? (m(), V(
|
|
654
|
+
t.value.state.component ? (m(), V(I(t.value.state.component), Ke(Z({ key: 0 }, t.value.state.props)), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
655
655
|
B(L(t.value.state.message), 1)
|
|
656
656
|
], 64))
|
|
657
657
|
]),
|
|
@@ -661,7 +661,7 @@ const X = new xs(), nn = {
|
|
|
661
661
|
_: 1
|
|
662
662
|
}));
|
|
663
663
|
}
|
|
664
|
-
}, ks = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" },
|
|
664
|
+
}, ks = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, ws = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, _s = { class: "fixed top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ss = { class: "fixed bottom-4 left-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Cs = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, un = {
|
|
665
665
|
__name: "SparkToastContainer",
|
|
666
666
|
setup(e) {
|
|
667
667
|
const s = X.toastState, t = S(
|
|
@@ -682,7 +682,7 @@ const X = new xs(), nn = {
|
|
|
682
682
|
X.resumeToast(u);
|
|
683
683
|
};
|
|
684
684
|
return (u, d) => (m(), V(Ge, { to: "body" }, [
|
|
685
|
-
|
|
685
|
+
f("div", ks, [
|
|
686
686
|
b(le, {
|
|
687
687
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
688
688
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
@@ -692,23 +692,23 @@ const X = new xs(), nn = {
|
|
|
692
692
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
693
693
|
}, {
|
|
694
694
|
default: C(() => [
|
|
695
|
-
(m(!0), g(R, null, z(t.value, (
|
|
696
|
-
key:
|
|
695
|
+
(m(!0), g(R, null, z(t.value, (p) => (m(), g("div", {
|
|
696
|
+
key: p.id,
|
|
697
697
|
class: "pointer-events-auto"
|
|
698
698
|
}, [
|
|
699
699
|
b(se, {
|
|
700
|
-
type:
|
|
701
|
-
closeable:
|
|
702
|
-
onClose: (y) => c(
|
|
703
|
-
onMouseenter: (y) => r(
|
|
704
|
-
onMouseleave: (y) => i(
|
|
700
|
+
type: p.type,
|
|
701
|
+
closeable: p.closeable,
|
|
702
|
+
onClose: (y) => c(p.id),
|
|
703
|
+
onMouseenter: (y) => r(p.id),
|
|
704
|
+
onMouseleave: (y) => i(p.id)
|
|
705
705
|
}, {
|
|
706
706
|
default: C(() => [
|
|
707
|
-
|
|
707
|
+
p.component ? (m(), V(I(p.component), Z({
|
|
708
708
|
key: 0,
|
|
709
709
|
ref_for: !0
|
|
710
|
-
},
|
|
711
|
-
B(L(
|
|
710
|
+
}, p.props), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
711
|
+
B(L(p.message), 1)
|
|
712
712
|
], 64))
|
|
713
713
|
]),
|
|
714
714
|
_: 2
|
|
@@ -718,7 +718,7 @@ const X = new xs(), nn = {
|
|
|
718
718
|
_: 1
|
|
719
719
|
})
|
|
720
720
|
]),
|
|
721
|
-
|
|
721
|
+
f("div", ws, [
|
|
722
722
|
b(le, {
|
|
723
723
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
724
724
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
@@ -728,23 +728,23 @@ const X = new xs(), nn = {
|
|
|
728
728
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
729
729
|
}, {
|
|
730
730
|
default: C(() => [
|
|
731
|
-
(m(!0), g(R, null, z(o.value, (
|
|
732
|
-
key:
|
|
731
|
+
(m(!0), g(R, null, z(o.value, (p) => (m(), g("div", {
|
|
732
|
+
key: p.id,
|
|
733
733
|
class: "pointer-events-auto"
|
|
734
734
|
}, [
|
|
735
735
|
b(se, {
|
|
736
|
-
type:
|
|
737
|
-
closeable:
|
|
738
|
-
onClose: (y) => c(
|
|
739
|
-
onMouseenter: (y) => r(
|
|
740
|
-
onMouseleave: (y) => i(
|
|
736
|
+
type: p.type,
|
|
737
|
+
closeable: p.closeable,
|
|
738
|
+
onClose: (y) => c(p.id),
|
|
739
|
+
onMouseenter: (y) => r(p.id),
|
|
740
|
+
onMouseleave: (y) => i(p.id)
|
|
741
741
|
}, {
|
|
742
742
|
default: C(() => [
|
|
743
|
-
|
|
743
|
+
p.component ? (m(), V(I(p.component), Z({
|
|
744
744
|
key: 0,
|
|
745
745
|
ref_for: !0
|
|
746
|
-
},
|
|
747
|
-
B(L(
|
|
746
|
+
}, p.props), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
747
|
+
B(L(p.message), 1)
|
|
748
748
|
], 64))
|
|
749
749
|
]),
|
|
750
750
|
_: 2
|
|
@@ -754,7 +754,7 @@ const X = new xs(), nn = {
|
|
|
754
754
|
_: 1
|
|
755
755
|
})
|
|
756
756
|
]),
|
|
757
|
-
|
|
757
|
+
f("div", _s, [
|
|
758
758
|
b(le, {
|
|
759
759
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
760
760
|
"enter-from-class": "opacity-0 scale-95",
|
|
@@ -764,23 +764,23 @@ const X = new xs(), nn = {
|
|
|
764
764
|
"leave-to-class": "opacity-0 scale-95"
|
|
765
765
|
}, {
|
|
766
766
|
default: C(() => [
|
|
767
|
-
(m(!0), g(R, null, z(l.value, (
|
|
768
|
-
key:
|
|
767
|
+
(m(!0), g(R, null, z(l.value, (p) => (m(), g("div", {
|
|
768
|
+
key: p.id,
|
|
769
769
|
class: "pointer-events-auto"
|
|
770
770
|
}, [
|
|
771
771
|
b(se, {
|
|
772
|
-
type:
|
|
773
|
-
closeable:
|
|
774
|
-
onClose: (y) => c(
|
|
775
|
-
onMouseenter: (y) => r(
|
|
776
|
-
onMouseleave: (y) => i(
|
|
772
|
+
type: p.type,
|
|
773
|
+
closeable: p.closeable,
|
|
774
|
+
onClose: (y) => c(p.id),
|
|
775
|
+
onMouseenter: (y) => r(p.id),
|
|
776
|
+
onMouseleave: (y) => i(p.id)
|
|
777
777
|
}, {
|
|
778
778
|
default: C(() => [
|
|
779
|
-
|
|
779
|
+
p.component ? (m(), V(I(p.component), Z({
|
|
780
780
|
key: 0,
|
|
781
781
|
ref_for: !0
|
|
782
|
-
},
|
|
783
|
-
B(L(
|
|
782
|
+
}, p.props), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
783
|
+
B(L(p.message), 1)
|
|
784
784
|
], 64))
|
|
785
785
|
]),
|
|
786
786
|
_: 2
|
|
@@ -790,7 +790,7 @@ const X = new xs(), nn = {
|
|
|
790
790
|
_: 1
|
|
791
791
|
})
|
|
792
792
|
]),
|
|
793
|
-
|
|
793
|
+
f("div", Ss, [
|
|
794
794
|
b(le, {
|
|
795
795
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
796
796
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
@@ -800,23 +800,23 @@ const X = new xs(), nn = {
|
|
|
800
800
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
801
801
|
}, {
|
|
802
802
|
default: C(() => [
|
|
803
|
-
(m(!0), g(R, null, z(n.value, (
|
|
804
|
-
key:
|
|
803
|
+
(m(!0), g(R, null, z(n.value, (p) => (m(), g("div", {
|
|
804
|
+
key: p.id,
|
|
805
805
|
class: "pointer-events-auto"
|
|
806
806
|
}, [
|
|
807
807
|
b(se, {
|
|
808
|
-
type:
|
|
809
|
-
closeable:
|
|
810
|
-
onClose: (y) => c(
|
|
811
|
-
onMouseenter: (y) => r(
|
|
812
|
-
onMouseleave: (y) => i(
|
|
808
|
+
type: p.type,
|
|
809
|
+
closeable: p.closeable,
|
|
810
|
+
onClose: (y) => c(p.id),
|
|
811
|
+
onMouseenter: (y) => r(p.id),
|
|
812
|
+
onMouseleave: (y) => i(p.id)
|
|
813
813
|
}, {
|
|
814
814
|
default: C(() => [
|
|
815
|
-
|
|
815
|
+
p.component ? (m(), V(I(p.component), Z({
|
|
816
816
|
key: 0,
|
|
817
817
|
ref_for: !0
|
|
818
|
-
},
|
|
819
|
-
B(L(
|
|
818
|
+
}, p.props), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
819
|
+
B(L(p.message), 1)
|
|
820
820
|
], 64))
|
|
821
821
|
]),
|
|
822
822
|
_: 2
|
|
@@ -826,7 +826,7 @@ const X = new xs(), nn = {
|
|
|
826
826
|
_: 1
|
|
827
827
|
})
|
|
828
828
|
]),
|
|
829
|
-
|
|
829
|
+
f("div", Cs, [
|
|
830
830
|
b(le, {
|
|
831
831
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
832
832
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
@@ -836,23 +836,23 @@ const X = new xs(), nn = {
|
|
|
836
836
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
837
837
|
}, {
|
|
838
838
|
default: C(() => [
|
|
839
|
-
(m(!0), g(R, null, z(a.value, (
|
|
840
|
-
key:
|
|
839
|
+
(m(!0), g(R, null, z(a.value, (p) => (m(), g("div", {
|
|
840
|
+
key: p.id,
|
|
841
841
|
class: "pointer-events-auto"
|
|
842
842
|
}, [
|
|
843
843
|
b(se, {
|
|
844
|
-
type:
|
|
845
|
-
closeable:
|
|
846
|
-
onClose: (y) => c(
|
|
847
|
-
onMouseenter: (y) => r(
|
|
848
|
-
onMouseleave: (y) => i(
|
|
844
|
+
type: p.type,
|
|
845
|
+
closeable: p.closeable,
|
|
846
|
+
onClose: (y) => c(p.id),
|
|
847
|
+
onMouseenter: (y) => r(p.id),
|
|
848
|
+
onMouseleave: (y) => i(p.id)
|
|
849
849
|
}, {
|
|
850
850
|
default: C(() => [
|
|
851
|
-
|
|
851
|
+
p.component ? (m(), V(I(p.component), Z({
|
|
852
852
|
key: 0,
|
|
853
853
|
ref_for: !0
|
|
854
|
-
},
|
|
855
|
-
B(L(
|
|
854
|
+
}, p.props), null, 16)) : (m(), g(R, { key: 1 }, [
|
|
855
|
+
B(L(p.message), 1)
|
|
856
856
|
], 64))
|
|
857
857
|
]),
|
|
858
858
|
_: 2
|
|
@@ -864,7 +864,7 @@ const X = new xs(), nn = {
|
|
|
864
864
|
])
|
|
865
865
|
]));
|
|
866
866
|
}
|
|
867
|
-
},
|
|
867
|
+
}, Ie = ue(
|
|
868
868
|
"brandFilter",
|
|
869
869
|
() => {
|
|
870
870
|
const e = q({
|
|
@@ -911,47 +911,47 @@ const X = new xs(), nn = {
|
|
|
911
911
|
), $s = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Ts = { class: "flex flex-1 flex-col" }, Ls = { class: "divide-y divide-gray-200" }, Ps = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ms = { class: "ml-auto flex items-center" }, Hs = {
|
|
912
912
|
key: 0,
|
|
913
913
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
914
|
-
}, Vs = ["onClick"], Rs = { class: "w-full gap-y-1 flex justify-between" }, Bs = { class: "flex flex-col" }, Es = { class: "flex items-center" }, As = { class: "font-medium text-base text-gray-900" },
|
|
914
|
+
}, Vs = ["onClick"], Rs = { class: "w-full gap-y-1 flex justify-between" }, Bs = { class: "flex flex-col" }, Es = { class: "flex items-center" }, As = { class: "font-medium text-base text-gray-900" }, Fs = {
|
|
915
915
|
key: 0,
|
|
916
916
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-800 ml-1"
|
|
917
|
-
},
|
|
917
|
+
}, Os = { class: "text-sm text-gray-500 font-normal" }, zs = { class: "flex items-center" }, Ds = ["src", "alt"], js = {
|
|
918
918
|
__name: "SparkBrandSelector",
|
|
919
919
|
emits: ["close", "select"],
|
|
920
920
|
setup(e, { emit: s }) {
|
|
921
|
-
const t = s, o =
|
|
921
|
+
const t = s, o = Ie(), l = (n) => {
|
|
922
922
|
t("select", n);
|
|
923
923
|
};
|
|
924
924
|
return (n, a) => {
|
|
925
925
|
const c = A("font-awesome-icon");
|
|
926
926
|
return m(), g("div", $s, [
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
a[1] || (a[1] =
|
|
931
|
-
|
|
927
|
+
f("div", Ts, [
|
|
928
|
+
f("div", Ls, [
|
|
929
|
+
f("div", Ps, [
|
|
930
|
+
a[1] || (a[1] = f("div", null, "Filter by Brand", -1)),
|
|
931
|
+
f("div", Ms, [
|
|
932
932
|
b(c, {
|
|
933
|
-
icon:
|
|
933
|
+
icon: w(F).farTimes,
|
|
934
934
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
935
935
|
onClick: a[0] || (a[0] = (r) => t("close"))
|
|
936
936
|
}, null, 8, ["icon"])
|
|
937
937
|
])
|
|
938
938
|
]),
|
|
939
|
-
|
|
940
|
-
(m(!0), g(R, null, z(
|
|
939
|
+
w(o).allBrands.length === 0 ? (m(), g("div", Hs, " No brands configured ")) : T("", !0),
|
|
940
|
+
(m(!0), g(R, null, z(w(o).allBrands, (r) => (m(), g("div", {
|
|
941
941
|
key: r.id,
|
|
942
942
|
class: H([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
943
943
|
onClick: (i) => l(r)
|
|
944
944
|
}, [
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
r.current ? (m(), g("span",
|
|
945
|
+
f("div", Rs, [
|
|
946
|
+
f("div", Bs, [
|
|
947
|
+
f("div", Es, [
|
|
948
|
+
f("div", As, L(r.name), 1),
|
|
949
|
+
r.current ? (m(), g("span", Fs, " Current ")) : T("", !0)
|
|
950
950
|
]),
|
|
951
|
-
|
|
951
|
+
f("div", Os, L(r.current ? "Current Brand" : "Change to"), 1)
|
|
952
952
|
]),
|
|
953
|
-
|
|
954
|
-
|
|
953
|
+
f("div", zs, [
|
|
954
|
+
f("img", {
|
|
955
955
|
src: r.logo,
|
|
956
956
|
alt: `${r.name} logo`,
|
|
957
957
|
class: "h-8 w-auto"
|
|
@@ -959,14 +959,14 @@ const X = new xs(), nn = {
|
|
|
959
959
|
])
|
|
960
960
|
])
|
|
961
961
|
], 10, Vs))), 128)),
|
|
962
|
-
a[2] || (a[2] =
|
|
962
|
+
a[2] || (a[2] = f("div", null, null, -1))
|
|
963
963
|
]),
|
|
964
|
-
a[3] || (a[3] =
|
|
964
|
+
a[3] || (a[3] = f("div", { class: "mt-auto" }, null, -1))
|
|
965
965
|
])
|
|
966
966
|
]);
|
|
967
967
|
};
|
|
968
968
|
}
|
|
969
|
-
},
|
|
969
|
+
}, Ns = ["disabled"], G = {
|
|
970
970
|
__name: "SparkButton",
|
|
971
971
|
props: {
|
|
972
972
|
size: {
|
|
@@ -1013,9 +1013,9 @@ const X = new xs(), nn = {
|
|
|
1013
1013
|
const u = r.split(" ").filter(Boolean), d = i.split(" ").filter(Boolean);
|
|
1014
1014
|
return [...u.filter((y) => !d.some((k) => {
|
|
1015
1015
|
const h = Object.entries(n).find(
|
|
1016
|
-
([P,
|
|
1016
|
+
([P, _]) => _.test(y)
|
|
1017
1017
|
)?.[0], x = Object.entries(n).find(
|
|
1018
|
-
([P,
|
|
1018
|
+
([P, _]) => _.test(k)
|
|
1019
1019
|
)?.[0];
|
|
1020
1020
|
return h && h === x;
|
|
1021
1021
|
})), ...d].join(" ");
|
|
@@ -1075,10 +1075,10 @@ const X = new xs(), nn = {
|
|
|
1075
1075
|
disabled: e.disabled,
|
|
1076
1076
|
onClick: i[0] || (i[0] = (u) => r.$emit("click"))
|
|
1077
1077
|
}, [
|
|
1078
|
-
|
|
1079
|
-
], 10,
|
|
1078
|
+
O(r.$slots, "default")
|
|
1079
|
+
], 10, Ns));
|
|
1080
1080
|
}
|
|
1081
|
-
},
|
|
1081
|
+
}, Is = {
|
|
1082
1082
|
__name: "SparkButtonGroup",
|
|
1083
1083
|
setup(e) {
|
|
1084
1084
|
const s = E(null);
|
|
@@ -1091,7 +1091,7 @@ const X = new xs(), nn = {
|
|
|
1091
1091
|
ref_key: "groupRef",
|
|
1092
1092
|
ref: s
|
|
1093
1093
|
}, [
|
|
1094
|
-
|
|
1094
|
+
O(l.$slots, "default")
|
|
1095
1095
|
], 512));
|
|
1096
1096
|
}
|
|
1097
1097
|
}, Zs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, qs = {
|
|
@@ -1100,7 +1100,7 @@ const X = new xs(), nn = {
|
|
|
1100
1100
|
}, Us = {
|
|
1101
1101
|
key: 1,
|
|
1102
1102
|
class: "p-5"
|
|
1103
|
-
},
|
|
1103
|
+
}, dn = {
|
|
1104
1104
|
__name: "SparkCard",
|
|
1105
1105
|
props: {
|
|
1106
1106
|
padded: {
|
|
@@ -1116,15 +1116,15 @@ const X = new xs(), nn = {
|
|
|
1116
1116
|
const s = e;
|
|
1117
1117
|
return (t, o) => (m(), g("div", Zs, [
|
|
1118
1118
|
t.$slots.header ? (m(), g("div", qs, [
|
|
1119
|
-
|
|
1119
|
+
O(t.$slots, "header")
|
|
1120
1120
|
])) : T("", !0),
|
|
1121
|
-
|
|
1121
|
+
f("div", {
|
|
1122
1122
|
class: H([s.padded ? s.paddedClass : ""])
|
|
1123
1123
|
}, [
|
|
1124
|
-
|
|
1124
|
+
O(t.$slots, "default")
|
|
1125
1125
|
], 2),
|
|
1126
1126
|
t.$slots.footer ? (m(), g("div", Us, [
|
|
1127
|
-
|
|
1127
|
+
O(t.$slots, "footer")
|
|
1128
1128
|
])) : T("", !0)
|
|
1129
1129
|
]));
|
|
1130
1130
|
}
|
|
@@ -1216,11 +1216,11 @@ const X = new xs(), nn = {
|
|
|
1216
1216
|
class: H(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
|
|
1217
1217
|
}, [
|
|
1218
1218
|
b(u, {
|
|
1219
|
-
icon:
|
|
1219
|
+
icon: w(F)[n.value],
|
|
1220
1220
|
class: H(["h-5 w-5", c.value])
|
|
1221
1221
|
}, null, 8, ["icon", "class"])
|
|
1222
1222
|
], 2)) : T("", !0),
|
|
1223
|
-
|
|
1223
|
+
f("div", {
|
|
1224
1224
|
class: H(["text-center", { "mt-3 sm:mt-5": n.value }])
|
|
1225
1225
|
}, [
|
|
1226
1226
|
e.title ? (m(), g("h3", Gs, L(e.title), 1)) : T("", !0),
|
|
@@ -1229,11 +1229,11 @@ const X = new xs(), nn = {
|
|
|
1229
1229
|
class: H([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
1230
1230
|
}, L(e.message), 3)) : T("", !0)
|
|
1231
1231
|
], 2),
|
|
1232
|
-
|
|
1232
|
+
f("div", {
|
|
1233
1233
|
class: H(["mt-5 sm:mt-6", o.value])
|
|
1234
1234
|
}, [
|
|
1235
|
-
(m(!0), g(R, null, z(t.value, (d,
|
|
1236
|
-
key:
|
|
1235
|
+
(m(!0), g(R, null, z(t.value, (d, p) => (m(), V(w(G), {
|
|
1236
|
+
key: p,
|
|
1237
1237
|
variant: d.variant,
|
|
1238
1238
|
onClick: (y) => r.$emit(d.event, d)
|
|
1239
1239
|
}, {
|
|
@@ -1308,17 +1308,17 @@ class Ys {
|
|
|
1308
1308
|
const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Js = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Qs = {
|
|
1309
1309
|
__name: "SparkModalContainer",
|
|
1310
1310
|
setup(e) {
|
|
1311
|
-
return (s, t) => (m(), V(
|
|
1311
|
+
return (s, t) => (m(), V(w(Ae), {
|
|
1312
1312
|
as: "template",
|
|
1313
|
-
show:
|
|
1313
|
+
show: w(oe).state.isVisible
|
|
1314
1314
|
}, {
|
|
1315
1315
|
default: C(() => [
|
|
1316
|
-
b(
|
|
1316
|
+
b(w(Fe), {
|
|
1317
1317
|
class: "relative z-1000",
|
|
1318
|
-
onClose:
|
|
1318
|
+
onClose: w(oe).hide
|
|
1319
1319
|
}, {
|
|
1320
1320
|
default: C(() => [
|
|
1321
|
-
b(
|
|
1321
|
+
b(w(pe), {
|
|
1322
1322
|
as: "template",
|
|
1323
1323
|
enter: "ease-out duration-300",
|
|
1324
1324
|
"enter-from": "opacity-0",
|
|
@@ -1328,13 +1328,13 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1328
1328
|
"leave-to": "opacity-0"
|
|
1329
1329
|
}, {
|
|
1330
1330
|
default: C(() => [...t[0] || (t[0] = [
|
|
1331
|
-
|
|
1331
|
+
f("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
1332
1332
|
])]),
|
|
1333
1333
|
_: 1
|
|
1334
1334
|
}),
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
b(
|
|
1335
|
+
f("div", Xs, [
|
|
1336
|
+
f("div", Js, [
|
|
1337
|
+
b(w(pe), {
|
|
1338
1338
|
as: "template",
|
|
1339
1339
|
enter: "ease-out duration-300",
|
|
1340
1340
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -1344,9 +1344,9 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1344
1344
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1345
1345
|
}, {
|
|
1346
1346
|
default: C(() => [
|
|
1347
|
-
b(
|
|
1347
|
+
b(w(Oe), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
|
|
1348
1348
|
default: C(() => [
|
|
1349
|
-
(m(), V(
|
|
1349
|
+
(m(), V(I(w(oe).state.content), Z(w(oe).state.props, Re(w(oe).state.eventHandlers)), null, 16))
|
|
1350
1350
|
]),
|
|
1351
1351
|
_: 1
|
|
1352
1352
|
})
|
|
@@ -1386,18 +1386,18 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1386
1386
|
}, l = e, n = s, a = S(() => o[l.overlayInstance.state.size] || o.md), c = () => {
|
|
1387
1387
|
l.overlayInstance.close(), n("close");
|
|
1388
1388
|
};
|
|
1389
|
-
return (r, i) => (m(), V(
|
|
1389
|
+
return (r, i) => (m(), V(w(Ae), {
|
|
1390
1390
|
show: e.overlayInstance.state.isVisible,
|
|
1391
1391
|
as: "template"
|
|
1392
1392
|
}, {
|
|
1393
1393
|
default: C(() => [
|
|
1394
|
-
b(
|
|
1394
|
+
b(w(Fe), {
|
|
1395
1395
|
initialFocus: t.value,
|
|
1396
1396
|
class: "relative z-1000",
|
|
1397
1397
|
onClose: c
|
|
1398
1398
|
}, {
|
|
1399
1399
|
default: C(() => [
|
|
1400
|
-
b(
|
|
1400
|
+
b(w(pe), {
|
|
1401
1401
|
as: "template",
|
|
1402
1402
|
enter: "transition-opacity ease-linear duration-150",
|
|
1403
1403
|
"enter-from": "opacity-0",
|
|
@@ -1407,12 +1407,12 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1407
1407
|
"leave-to": "opacity-0"
|
|
1408
1408
|
}, {
|
|
1409
1409
|
default: C(() => [...i[0] || (i[0] = [
|
|
1410
|
-
|
|
1410
|
+
f("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
|
|
1411
1411
|
])]),
|
|
1412
1412
|
_: 1
|
|
1413
1413
|
}),
|
|
1414
|
-
|
|
1415
|
-
b(
|
|
1414
|
+
f("div", eo, [
|
|
1415
|
+
b(w(pe), {
|
|
1416
1416
|
as: "template",
|
|
1417
1417
|
enter: "transition ease-in-out duration-150 transform",
|
|
1418
1418
|
"enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
@@ -1422,7 +1422,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1422
1422
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
1423
1423
|
}, {
|
|
1424
1424
|
default: C(() => [
|
|
1425
|
-
b(
|
|
1425
|
+
b(w(Oe), {
|
|
1426
1426
|
ref_key: "panelRef",
|
|
1427
1427
|
ref: t,
|
|
1428
1428
|
class: H([
|
|
@@ -1432,7 +1432,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1432
1432
|
])
|
|
1433
1433
|
}, {
|
|
1434
1434
|
default: C(() => [
|
|
1435
|
-
(m(), V(
|
|
1435
|
+
(m(), V(I(e.overlayInstance.state.content), Z(e.overlayInstance.state.props, Re(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
1436
1436
|
]),
|
|
1437
1437
|
_: 1
|
|
1438
1438
|
}, 8, ["class"])
|
|
@@ -1511,32 +1511,32 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1511
1511
|
if (i.length === 0)
|
|
1512
1512
|
return;
|
|
1513
1513
|
const u = s.getSourceDataAtRow(s.toPhysicalRow(o)), d = document.createElement("div");
|
|
1514
|
-
d.classList.add("flex", "items-center", "gap-2"), i.forEach((
|
|
1515
|
-
if (
|
|
1514
|
+
d.classList.add("flex", "items-center", "gap-2"), i.forEach((p) => {
|
|
1515
|
+
if (p.condition && typeof p.condition == "function" && !p.condition(u))
|
|
1516
1516
|
return;
|
|
1517
1517
|
const y = document.createElement("button");
|
|
1518
|
-
if (y.type = "button", y.classList.add("spark-table-action-button"),
|
|
1518
|
+
if (y.type = "button", y.classList.add("spark-table-action-button"), p.icon) {
|
|
1519
1519
|
const k = document.createElement("span");
|
|
1520
|
-
k.innerHTML = ce({ prefix: "far", iconName:
|
|
1520
|
+
k.innerHTML = ce({ prefix: "far", iconName: p.icon }).html, k.classList.add("size-4"), y.appendChild(k);
|
|
1521
1521
|
}
|
|
1522
|
-
if (
|
|
1522
|
+
if (p.label) {
|
|
1523
1523
|
const k = document.createElement("span");
|
|
1524
|
-
k.textContent =
|
|
1524
|
+
k.textContent = p.label, y.appendChild(k);
|
|
1525
1525
|
}
|
|
1526
1526
|
y.addEventListener("click", async (k) => {
|
|
1527
|
-
if (k.preventDefault(), k.stopPropagation(),
|
|
1528
|
-
const h = typeof
|
|
1527
|
+
if (k.preventDefault(), k.stopPropagation(), p.confirm) {
|
|
1528
|
+
const h = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
|
|
1529
1529
|
if (!await oe.confirm({
|
|
1530
|
-
title:
|
|
1530
|
+
title: p.confirmTitle,
|
|
1531
1531
|
message: h,
|
|
1532
|
-
type:
|
|
1533
|
-
confirmText:
|
|
1534
|
-
cancelText:
|
|
1535
|
-
confirmVariant:
|
|
1532
|
+
type: p.confirmType,
|
|
1533
|
+
confirmText: p.confirmText,
|
|
1534
|
+
cancelText: p.cancelText,
|
|
1535
|
+
confirmVariant: p.confirmVariant
|
|
1536
1536
|
}))
|
|
1537
1537
|
return;
|
|
1538
1538
|
}
|
|
1539
|
-
|
|
1539
|
+
p.event && e.methods.fireEvent(p.event, u), p.handler && typeof p.handler == "function" && p.handler(u);
|
|
1540
1540
|
}), d.appendChild(y);
|
|
1541
1541
|
}), t.appendChild(d);
|
|
1542
1542
|
}, Ce = {
|
|
@@ -1551,8 +1551,8 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1551
1551
|
}, io = (e) => (s, t, o, l, n, a, c) => {
|
|
1552
1552
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !a)
|
|
1553
1553
|
return;
|
|
1554
|
-
const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d = Ce[u] || Ce.gray,
|
|
1555
|
-
|
|
1554
|
+
const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d = Ce[u] || Ce.gray, p = document.createElement("span");
|
|
1555
|
+
p.classList.add(
|
|
1556
1556
|
"inline-flex",
|
|
1557
1557
|
"items-center",
|
|
1558
1558
|
"px-2.5",
|
|
@@ -1562,7 +1562,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1562
1562
|
"font-medium",
|
|
1563
1563
|
"capitalize",
|
|
1564
1564
|
...d.split(" ")
|
|
1565
|
-
),
|
|
1565
|
+
), p.textContent = a, t.appendChild(p);
|
|
1566
1566
|
}, $e = {
|
|
1567
1567
|
green: { bg: "bg-green-100", text: "text-green-500" },
|
|
1568
1568
|
red: { bg: "bg-red-100", text: "text-red-500" },
|
|
@@ -1584,7 +1584,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1584
1584
|
return !1;
|
|
1585
1585
|
}, uo = (e) => (s, t, o, l, n, a, c) => {
|
|
1586
1586
|
t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
|
|
1587
|
-
const r = c.rendererConfig || {}, i = co(a), u = i ? r.trueIcon || "check" : r.falseIcon || "xmark", d = i ? r.trueColor || "green" : r.falseColor || "red",
|
|
1587
|
+
const r = c.rendererConfig || {}, i = co(a), u = i ? r.trueIcon || "check" : r.falseIcon || "xmark", d = i ? r.trueColor || "green" : r.falseColor || "red", p = r.size || 32, y = r.iconPrefix || "far", k = $e[d] || $e.gray;
|
|
1588
1588
|
t.dataset.copyValue = i ? "true" : "false";
|
|
1589
1589
|
const h = document.createElement("div");
|
|
1590
1590
|
h.classList.add(
|
|
@@ -1594,34 +1594,56 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1594
1594
|
"rounded-full",
|
|
1595
1595
|
k.bg,
|
|
1596
1596
|
k.text
|
|
1597
|
-
), h.style.width = `${
|
|
1597
|
+
), h.style.width = `${p}px`, h.style.height = `${p}px`;
|
|
1598
1598
|
const x = document.createElement("span");
|
|
1599
1599
|
x.innerHTML = ce({ prefix: y, iconName: u }).html, x.classList.add("flex", "items-center", "justify-center");
|
|
1600
|
-
const P = Math.round(
|
|
1600
|
+
const P = Math.round(p * 0.5);
|
|
1601
1601
|
x.style.fontSize = `${P}px`, h.appendChild(x), t.appendChild(h);
|
|
1602
|
-
}, po = (e
|
|
1602
|
+
}, po = (e, s = 2) => {
|
|
1603
|
+
const t = Number(e);
|
|
1604
|
+
if (isNaN(t)) return null;
|
|
1605
|
+
const o = t < 0, n = Math.abs(t).toLocaleString("en-AU", {
|
|
1606
|
+
minimumFractionDigits: s,
|
|
1607
|
+
maximumFractionDigits: s
|
|
1608
|
+
});
|
|
1609
|
+
return o ? `-$${n}` : `$${n}`;
|
|
1610
|
+
}, fo = (e) => (s, t, o, l, n, a, c) => {
|
|
1611
|
+
t.innerHTML = "", t.classList.add("spark-table-cell-currency");
|
|
1612
|
+
const r = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = r;
|
|
1613
|
+
if (a == null || a === "") {
|
|
1614
|
+
t.textContent = u;
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
const d = po(a, i);
|
|
1618
|
+
if (d === null) {
|
|
1619
|
+
t.textContent = u;
|
|
1620
|
+
return;
|
|
1621
|
+
}
|
|
1622
|
+
const p = document.createElement("span");
|
|
1623
|
+
p.textContent = d, t.appendChild(p);
|
|
1624
|
+
}, mo = (e) => (s, t, o, l, n, a, c) => {
|
|
1603
1625
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !a)
|
|
1604
1626
|
return;
|
|
1605
1627
|
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o));
|
|
1606
1628
|
let u = a;
|
|
1607
1629
|
r.href && (typeof r.href == "function" ? u = r.href(i) : r.href === "email" ? u = `mailto:${a}` : r.href === "tel" ? u = `tel:${a}` : typeof r.href == "string" && (u = i[r.href] || a));
|
|
1608
1630
|
const d = document.createElement("a");
|
|
1609
|
-
d.href = u, d.textContent = a, d.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (d.target = r.target), r.rel && (d.rel = r.rel), d.addEventListener("click", (
|
|
1610
|
-
|
|
1631
|
+
d.href = u, d.textContent = a, d.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (d.target = r.target), r.rel && (d.rel = r.rel), d.addEventListener("click", (p) => {
|
|
1632
|
+
p.stopPropagation();
|
|
1611
1633
|
}), t.appendChild(d);
|
|
1612
1634
|
}, Te = {
|
|
1613
1635
|
sm: "h-6 w-6",
|
|
1614
1636
|
md: "h-8 w-8",
|
|
1615
1637
|
lg: "h-12 w-12"
|
|
1616
|
-
},
|
|
1638
|
+
}, ho = (e) => (s, t, o, l, n, a, c) => {
|
|
1617
1639
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !a)
|
|
1618
1640
|
return;
|
|
1619
|
-
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d = Te[u] || Te.md,
|
|
1641
|
+
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d = Te[u] || Te.md, p = r.rounded !== !1;
|
|
1620
1642
|
let y = r.alt || "";
|
|
1621
1643
|
typeof r.alt == "string" && i[r.alt] && (y = i[r.alt]);
|
|
1622
1644
|
const k = document.createElement("img");
|
|
1623
|
-
k.src = a, k.alt = y, k.classList.add(...d.split(" "), "object-cover"),
|
|
1624
|
-
},
|
|
1645
|
+
k.src = a, k.alt = y, k.classList.add(...d.split(" "), "object-cover"), p ? k.classList.add("rounded-full") : k.classList.add("rounded"), t.appendChild(k);
|
|
1646
|
+
}, go = (e) => (s, t, o, l, n, a, c) => {
|
|
1625
1647
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !a)
|
|
1626
1648
|
return;
|
|
1627
1649
|
const r = c.rendererConfig || {}, i = r.format || "short", u = r.locale || "en-US";
|
|
@@ -1632,27 +1654,27 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1632
1654
|
year: "numeric",
|
|
1633
1655
|
month: "long",
|
|
1634
1656
|
day: "numeric"
|
|
1635
|
-
}) : i === "relative" ? d =
|
|
1657
|
+
}) : i === "relative" ? d = yo(y) : i === "datetime" ? d = y.toLocaleString(u) : d = y.toLocaleDateString(u);
|
|
1636
1658
|
} catch (y) {
|
|
1637
1659
|
console.error("Error formatting date:", y), d = a;
|
|
1638
1660
|
}
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1661
|
+
const p = document.createElement("span");
|
|
1662
|
+
p.textContent = d, t.appendChild(p);
|
|
1641
1663
|
};
|
|
1642
|
-
function
|
|
1664
|
+
function yo(e) {
|
|
1643
1665
|
const t = /* @__PURE__ */ new Date() - e, o = Math.floor(Math.abs(t) / 1e3), l = Math.floor(o / 60), n = Math.floor(l / 60), a = Math.floor(n / 24), c = Math.floor(a / 30), r = Math.floor(a / 365), i = t > 0;
|
|
1644
1666
|
return o < 60 ? i ? "just now" : "in a moment" : l < 60 ? i ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : n < 24 ? i ? `${n} hour${n > 1 ? "s" : ""} ago` : `in ${n} hour${n > 1 ? "s" : ""}` : a < 30 ? i ? `${a} day${a > 1 ? "s" : ""} ago` : `in ${a} day${a > 1 ? "s" : ""}` : c < 12 ? i ? `${c} month${c > 1 ? "s" : ""} ago` : `in ${c} month${c > 1 ? "s" : ""}` : i ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
|
|
1645
1667
|
}
|
|
1646
|
-
const
|
|
1668
|
+
const vo = (e) => {
|
|
1647
1669
|
const s = ["th", "st", "nd", "rd"], t = e % 100;
|
|
1648
1670
|
return e + (s[(t - 20) % 10] || s[t] || s[0]);
|
|
1649
|
-
}, j = (e, s = 2) => String(e).padStart(s, "0"), ge = /* @__PURE__ */ new Map(),
|
|
1671
|
+
}, j = (e, s = 2) => String(e).padStart(s, "0"), ge = /* @__PURE__ */ new Map(), bo = (e, s) => {
|
|
1650
1672
|
const t = `${e}:${JSON.stringify(s)}`;
|
|
1651
1673
|
return ge.has(t) || ge.set(t, new Intl.DateTimeFormat(e, s)), ge.get(t);
|
|
1652
1674
|
}, ie = (e, s, t, o) => {
|
|
1653
|
-
const a =
|
|
1675
|
+
const a = bo(s, t).formatToParts(e).find((c) => c.type === o);
|
|
1654
1676
|
return a ? a.value : "";
|
|
1655
|
-
},
|
|
1677
|
+
}, xo = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
|
|
1656
1678
|
e.year,
|
|
1657
1679
|
e.month - 1,
|
|
1658
1680
|
e.day,
|
|
@@ -1660,7 +1682,7 @@ const go = (e) => {
|
|
|
1660
1682
|
e.minute || 0,
|
|
1661
1683
|
e.second || 0,
|
|
1662
1684
|
e.millisecond || 0
|
|
1663
|
-
),
|
|
1685
|
+
), ko = (e) => {
|
|
1664
1686
|
const s = e.hour || 0, t = s % 12 || 12, o = s >= 12;
|
|
1665
1687
|
return {
|
|
1666
1688
|
year: e.year,
|
|
@@ -1683,8 +1705,8 @@ const go = (e) => {
|
|
|
1683
1705
|
return "";
|
|
1684
1706
|
const t = Math.round(e.offsetNanoseconds / 6e10), o = t >= 0 ? "+" : "-", l = Math.abs(t), n = Math.floor(l / 60), a = l % 60;
|
|
1685
1707
|
return s ? `${o}${j(n)}:${j(a)}` : `${o}${j(n)}${j(a)}`;
|
|
1686
|
-
},
|
|
1687
|
-
const t =
|
|
1708
|
+
}, wo = (e, s) => {
|
|
1709
|
+
const t = ko(e), o = xo(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
|
|
1688
1710
|
return [
|
|
1689
1711
|
// Year
|
|
1690
1712
|
["YYYY", () => String(t.year)],
|
|
@@ -1696,7 +1718,7 @@ const go = (e) => {
|
|
|
1696
1718
|
["M", () => String(t.month)],
|
|
1697
1719
|
// Day of month
|
|
1698
1720
|
["DD", () => j(t.day)],
|
|
1699
|
-
["Do", () =>
|
|
1721
|
+
["Do", () => vo(t.day)],
|
|
1700
1722
|
["D", () => String(t.day)],
|
|
1701
1723
|
// Day of week
|
|
1702
1724
|
["dddd", () => ie(o, s, { weekday: "long" }, "weekday")],
|
|
@@ -1730,7 +1752,7 @@ const go = (e) => {
|
|
|
1730
1752
|
["x", () => String(e.epochMilliseconds ?? o.getTime())],
|
|
1731
1753
|
["X", () => String(Math.floor((e.epochMilliseconds ?? o.getTime()) / 1e3))]
|
|
1732
1754
|
];
|
|
1733
|
-
},
|
|
1755
|
+
}, _o = (e, s, t = {}) => {
|
|
1734
1756
|
const { locale: o = "en-US" } = t;
|
|
1735
1757
|
if (!e)
|
|
1736
1758
|
return "";
|
|
@@ -1746,26 +1768,26 @@ const go = (e) => {
|
|
|
1746
1768
|
} catch (r) {
|
|
1747
1769
|
return console.error("Failed to parse date string:", e, r), e;
|
|
1748
1770
|
}
|
|
1749
|
-
const n =
|
|
1771
|
+
const n = wo(l, o), a = n.map(([r]) => r).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${a})`, "g");
|
|
1750
1772
|
return s.replace(c, (r, i, u) => {
|
|
1751
1773
|
if (i !== void 0)
|
|
1752
1774
|
return i;
|
|
1753
|
-
const d = n.find(([
|
|
1775
|
+
const d = n.find(([p]) => p === u);
|
|
1754
1776
|
return d ? d[1]() : r;
|
|
1755
1777
|
});
|
|
1756
|
-
},
|
|
1778
|
+
}, So = (e, s = {}) => {
|
|
1757
1779
|
const { fromTimezone: t, toTimezone: o } = s;
|
|
1758
1780
|
if (!e)
|
|
1759
1781
|
return null;
|
|
1760
1782
|
const l = e.replace(" ", "T");
|
|
1761
1783
|
return t && o ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(o) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
|
|
1762
|
-
},
|
|
1784
|
+
}, Co = (e) => (s, t, o, l, n, a, c) => {
|
|
1763
1785
|
t.innerHTML = "", t.classList.add("spark-table-cell-datetime");
|
|
1764
1786
|
const r = c.rendererConfig || {}, {
|
|
1765
1787
|
format: i = "DD MMM YYYY, HH:mm",
|
|
1766
1788
|
fromTimezone: u,
|
|
1767
1789
|
toTimezone: d,
|
|
1768
|
-
locale:
|
|
1790
|
+
locale: p = "en-US",
|
|
1769
1791
|
emptyText: y = ""
|
|
1770
1792
|
} = r;
|
|
1771
1793
|
if (!a) {
|
|
@@ -1773,22 +1795,22 @@ const go = (e) => {
|
|
|
1773
1795
|
return;
|
|
1774
1796
|
}
|
|
1775
1797
|
try {
|
|
1776
|
-
const k =
|
|
1798
|
+
const k = So(a, { fromTimezone: u, toTimezone: d });
|
|
1777
1799
|
if (!k) {
|
|
1778
1800
|
t.textContent = y;
|
|
1779
1801
|
return;
|
|
1780
1802
|
}
|
|
1781
|
-
const h =
|
|
1803
|
+
const h = _o(k, i, { locale: p }), x = document.createElement("span");
|
|
1782
1804
|
x.textContent = h, t.appendChild(x);
|
|
1783
1805
|
} catch (k) {
|
|
1784
1806
|
console.error("Error formatting datetime:", k, { value: a, format: i }), t.textContent = a;
|
|
1785
1807
|
}
|
|
1786
|
-
},
|
|
1808
|
+
}, $o = /* @__PURE__ */ new Map(), U = (e, s) => {
|
|
1787
1809
|
Kt(e, (t, o, l, n, a, c, r) => {
|
|
1788
1810
|
Gt.apply(null, [t, o, l, n, a, c, r]), s(t, o, l, n, a, c, r);
|
|
1789
|
-
}),
|
|
1790
|
-
},
|
|
1791
|
-
|
|
1811
|
+
}), $o.set(e, s);
|
|
1812
|
+
}, To = (e) => {
|
|
1813
|
+
U("spark.actions", lo(e)), U("spark.badge", io()), U("spark.boolean", uo()), U("spark.currency", fo()), U("spark.link", mo()), U("spark.image", ho()), U("spark.date", go()), U("spark.datetime", Co()), U("style.capitalize", (s, t, o, l, n, a) => {
|
|
1792
1814
|
if (!a || a.length === 0) {
|
|
1793
1815
|
t.innerText = "";
|
|
1794
1816
|
return;
|
|
@@ -1796,15 +1818,15 @@ const go = (e) => {
|
|
|
1796
1818
|
const c = document.createElement("span");
|
|
1797
1819
|
c.innerHTML = a, c.classList.add("capitalize"), t.replaceChildren(c);
|
|
1798
1820
|
});
|
|
1799
|
-
},
|
|
1800
|
-
},
|
|
1821
|
+
}, Lo = () => {
|
|
1822
|
+
}, Po = (e, s = {}) => {
|
|
1801
1823
|
const t = J(), o = ne(), l = s.namespace, n = l === null, a = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${o.path}` : `spark-table:${l}`, d = (v, $ = "") => {
|
|
1802
1824
|
const M = {};
|
|
1803
1825
|
return Object.keys(v).forEach((D) => {
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1826
|
+
const W = v[D], xe = $ ? `${$}[${D}]` : D;
|
|
1827
|
+
W != null && (typeof W == "object" && !Array.isArray(W) ? Object.assign(M, d(W, xe)) : M[xe] = String(W));
|
|
1806
1828
|
}), M;
|
|
1807
|
-
},
|
|
1829
|
+
}, p = () => {
|
|
1808
1830
|
if (c)
|
|
1809
1831
|
try {
|
|
1810
1832
|
const v = {
|
|
@@ -1859,7 +1881,7 @@ const go = (e) => {
|
|
|
1859
1881
|
return isNaN(D) ? $ : D;
|
|
1860
1882
|
}
|
|
1861
1883
|
return $;
|
|
1862
|
-
},
|
|
1884
|
+
}, _ = () => {
|
|
1863
1885
|
if (n)
|
|
1864
1886
|
Object.keys(o.query).forEach((v) => {
|
|
1865
1887
|
x(v) && (e.params[v] = P(v, o.query[v]));
|
|
@@ -1874,10 +1896,10 @@ const go = (e) => {
|
|
|
1874
1896
|
});
|
|
1875
1897
|
}
|
|
1876
1898
|
};
|
|
1877
|
-
return
|
|
1899
|
+
return N(
|
|
1878
1900
|
() => e.params,
|
|
1879
1901
|
() => {
|
|
1880
|
-
a && h(), c &&
|
|
1902
|
+
a && h(), c && p();
|
|
1881
1903
|
},
|
|
1882
1904
|
{ deep: !0 }
|
|
1883
1905
|
), r && be(() => {
|
|
@@ -1892,7 +1914,7 @@ const go = (e) => {
|
|
|
1892
1914
|
(D) => D.startsWith(M)
|
|
1893
1915
|
);
|
|
1894
1916
|
}
|
|
1895
|
-
$ && (v = !0,
|
|
1917
|
+
$ && (v = !0, _());
|
|
1896
1918
|
}
|
|
1897
1919
|
if (!v && c) {
|
|
1898
1920
|
const $ = y();
|
|
@@ -1902,12 +1924,12 @@ const go = (e) => {
|
|
|
1902
1924
|
}
|
|
1903
1925
|
}), {
|
|
1904
1926
|
syncToRoute: h,
|
|
1905
|
-
restoreFromRoute:
|
|
1906
|
-
saveToStorage:
|
|
1927
|
+
restoreFromRoute: _,
|
|
1928
|
+
saveToStorage: p,
|
|
1907
1929
|
loadFromStorage: y,
|
|
1908
1930
|
clearStorage: k
|
|
1909
1931
|
};
|
|
1910
|
-
},
|
|
1932
|
+
}, Mo = { class: "flex items-center gap-4 py-3" }, Ho = { class: "shrink-0" }, Vo = { class: "text-sm text-gray-700" }, Ro = { class: "font-medium" }, Bo = { class: "font-medium" }, Eo = { class: "font-medium" }, Ao = {
|
|
1911
1933
|
__name: "SparkTablePaginationDetails",
|
|
1912
1934
|
props: {
|
|
1913
1935
|
sparkTable: {
|
|
@@ -1918,28 +1940,28 @@ const go = (e) => {
|
|
|
1918
1940
|
setup(e) {
|
|
1919
1941
|
const s = e;
|
|
1920
1942
|
return (t, o) => (m(), g("div", null, [
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1943
|
+
f("div", Mo, [
|
|
1944
|
+
f("div", Ho, [
|
|
1945
|
+
f("div", Vo, [
|
|
1924
1946
|
o[0] || (o[0] = B(" Showing ", -1)),
|
|
1925
|
-
|
|
1947
|
+
f("span", Ro, L(s.sparkTable.response.meta.from), 1),
|
|
1926
1948
|
o[1] || (o[1] = B(" to ", -1)),
|
|
1927
|
-
|
|
1949
|
+
f("span", Bo, L(s.sparkTable.response.meta.to), 1),
|
|
1928
1950
|
o[2] || (o[2] = B(" of ", -1)),
|
|
1929
|
-
|
|
1951
|
+
f("span", Eo, L(s.sparkTable.response.meta.total), 1),
|
|
1930
1952
|
o[3] || (o[3] = B(" results ", -1))
|
|
1931
1953
|
])
|
|
1932
1954
|
])
|
|
1933
1955
|
])
|
|
1934
1956
|
]));
|
|
1935
1957
|
}
|
|
1936
|
-
},
|
|
1958
|
+
}, Fo = { class: "flex items-center gap-4 px-4 py-3" }, Oo = {
|
|
1937
1959
|
key: 0,
|
|
1938
1960
|
class: "shrink-0 ml-auto"
|
|
1939
|
-
},
|
|
1961
|
+
}, zo = {
|
|
1940
1962
|
class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
|
|
1941
1963
|
"aria-label": "Pagination"
|
|
1942
|
-
},
|
|
1964
|
+
}, Do = ["onClick"], jo = {
|
|
1943
1965
|
__name: "SparkTablePaginationPaging",
|
|
1944
1966
|
props: {
|
|
1945
1967
|
sparkTable: {
|
|
@@ -1955,26 +1977,26 @@ const go = (e) => {
|
|
|
1955
1977
|
u < 1 || u > t.sparkTable.response.meta.last_page || o("paginate", {
|
|
1956
1978
|
page: u
|
|
1957
1979
|
});
|
|
1958
|
-
}, a = S(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = S(() => t.sparkTable.computed.ready ?
|
|
1980
|
+
}, a = S(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = S(() => t.sparkTable.computed.ready ? Ot(
|
|
1959
1981
|
Math.floor((a.value - 1) / 10) * 10 + 1,
|
|
1960
1982
|
a.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : a.value + 1
|
|
1961
1983
|
) : []), r = S(
|
|
1962
1984
|
() => t.sparkTable.params.page < Y(t.sparkTable.response.meta, "last_page", 1)
|
|
1963
1985
|
), i = S(() => t.sparkTable.params.page > 1);
|
|
1964
1986
|
return (u, d) => {
|
|
1965
|
-
const
|
|
1987
|
+
const p = A("font-awesome-icon");
|
|
1966
1988
|
return m(), g("div", null, [
|
|
1967
|
-
|
|
1968
|
-
c.value.length > 1 ? (m(), g("div",
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1989
|
+
f("div", Fo, [
|
|
1990
|
+
c.value.length > 1 ? (m(), g("div", Oo, [
|
|
1991
|
+
f("div", null, [
|
|
1992
|
+
f("nav", zo, [
|
|
1993
|
+
f("a", {
|
|
1972
1994
|
class: H([i.value ? "" : "disabled", "relative inline-flex items-center rounded-l-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
|
|
1973
1995
|
href: "#",
|
|
1974
1996
|
onClick: d[0] || (d[0] = Q((y) => l(-1), ["prevent"]))
|
|
1975
1997
|
}, [
|
|
1976
|
-
b(
|
|
1977
|
-
icon:
|
|
1998
|
+
b(p, {
|
|
1999
|
+
icon: w(F).farChevronLeft,
|
|
1978
2000
|
class: "size-5"
|
|
1979
2001
|
}, null, 8, ["icon"])
|
|
1980
2002
|
], 2),
|
|
@@ -1986,14 +2008,14 @@ const go = (e) => {
|
|
|
1986
2008
|
e.sparkTable.params.page === y ? "z-10 text-white bg-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 hover:bg-primary-600" : "text-gray-900 hover:bg-gray-50 ring-gray-300 focus:z-20 focus:outline-offset-0"
|
|
1987
2009
|
]),
|
|
1988
2010
|
onClick: (k) => n(y)
|
|
1989
|
-
}, L(y), 11,
|
|
1990
|
-
|
|
2011
|
+
}, L(y), 11, Do))), 128)),
|
|
2012
|
+
f("a", {
|
|
1991
2013
|
class: H([r.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
|
|
1992
2014
|
onClick: d[1] || (d[1] = Q((y) => l(1), ["prevent"])),
|
|
1993
2015
|
href: "#"
|
|
1994
2016
|
}, [
|
|
1995
|
-
b(
|
|
1996
|
-
icon:
|
|
2017
|
+
b(p, {
|
|
2018
|
+
icon: w(F).farChevronRight,
|
|
1997
2019
|
class: "size-5"
|
|
1998
2020
|
}, null, 8, ["icon"])
|
|
1999
2021
|
], 2)
|
|
@@ -2009,7 +2031,7 @@ const go = (e) => {
|
|
|
2009
2031
|
for (const [o, l] of s)
|
|
2010
2032
|
t[o] = l;
|
|
2011
2033
|
return t;
|
|
2012
|
-
},
|
|
2034
|
+
}, No = { class: "spark-table-pagination-per-page" }, Io = {
|
|
2013
2035
|
__name: "SparkTablePaginationPerPage",
|
|
2014
2036
|
props: {
|
|
2015
2037
|
sparkTable: {
|
|
@@ -2030,7 +2052,7 @@ const go = (e) => {
|
|
|
2030
2052
|
};
|
|
2031
2053
|
return (a, c) => {
|
|
2032
2054
|
const r = A("FormKit");
|
|
2033
|
-
return m(), g("div",
|
|
2055
|
+
return m(), g("div", No, [
|
|
2034
2056
|
b(r, {
|
|
2035
2057
|
"model-value": e.sparkTable.params.limit,
|
|
2036
2058
|
type: "select",
|
|
@@ -2043,7 +2065,7 @@ const go = (e) => {
|
|
|
2043
2065
|
]);
|
|
2044
2066
|
};
|
|
2045
2067
|
}
|
|
2046
|
-
},
|
|
2068
|
+
}, Zo = /* @__PURE__ */ ee(Io, [["__scopeId", "data-v-9ef8544b"]]), Pe = {
|
|
2047
2069
|
__name: "SparkTableToolbar",
|
|
2048
2070
|
props: {
|
|
2049
2071
|
position: {
|
|
@@ -2061,10 +2083,10 @@ const go = (e) => {
|
|
|
2061
2083
|
key: 0,
|
|
2062
2084
|
class: H(l.value)
|
|
2063
2085
|
}, [
|
|
2064
|
-
|
|
2086
|
+
O(n.$slots, "default")
|
|
2065
2087
|
], 2)) : T("", !0);
|
|
2066
2088
|
}
|
|
2067
|
-
},
|
|
2089
|
+
}, qo = { class: "spark-table-search" }, Uo = {
|
|
2068
2090
|
__name: "SparkTableSearch",
|
|
2069
2091
|
props: {
|
|
2070
2092
|
/** SparkTable instance object */
|
|
@@ -2093,23 +2115,23 @@ const go = (e) => {
|
|
|
2093
2115
|
[o]: a
|
|
2094
2116
|
}) : s.sparkTable.methods.removeParam(o);
|
|
2095
2117
|
}, s.config.debounce || 300);
|
|
2096
|
-
|
|
2118
|
+
N(t, (a) => {
|
|
2097
2119
|
l(a);
|
|
2098
2120
|
});
|
|
2099
2121
|
const n = s.config.placeholder || "Search...";
|
|
2100
|
-
return
|
|
2122
|
+
return N(
|
|
2101
2123
|
() => s.sparkTable.params[o],
|
|
2102
2124
|
(a) => {
|
|
2103
2125
|
a && a !== t.value ? t.value = a : !a && t.value && (t.value = "");
|
|
2104
2126
|
}
|
|
2105
2127
|
), (a, c) => {
|
|
2106
2128
|
const r = A("FormKit");
|
|
2107
|
-
return m(), g("div",
|
|
2129
|
+
return m(), g("div", qo, [
|
|
2108
2130
|
b(r, Z({
|
|
2109
2131
|
modelValue: t.value,
|
|
2110
2132
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2111
2133
|
type: "text",
|
|
2112
|
-
placeholder:
|
|
2134
|
+
placeholder: w(n),
|
|
2113
2135
|
suffixIcon: "search",
|
|
2114
2136
|
"outer-class": "!mb-0",
|
|
2115
2137
|
"wrapper-class": "!mb-0",
|
|
@@ -2118,7 +2140,7 @@ const go = (e) => {
|
|
|
2118
2140
|
]);
|
|
2119
2141
|
};
|
|
2120
2142
|
}
|
|
2121
|
-
},
|
|
2143
|
+
}, Ko = /* @__PURE__ */ ee(Uo, [["__scopeId", "data-v-976170dc"]]), Go = { class: "spark-table-filter-select" }, Wo = {
|
|
2122
2144
|
__name: "SparkTableFilterSelect",
|
|
2123
2145
|
props: {
|
|
2124
2146
|
/** SparkTable instance object */
|
|
@@ -2142,24 +2164,24 @@ const go = (e) => {
|
|
|
2142
2164
|
{ label: s.config.placeholder || "All", value: "" },
|
|
2143
2165
|
...s.config.options
|
|
2144
2166
|
]);
|
|
2145
|
-
return
|
|
2167
|
+
return N(t, (a) => {
|
|
2146
2168
|
a ? s.sparkTable.methods.applyParams({
|
|
2147
2169
|
page: 1,
|
|
2148
2170
|
[o]: a
|
|
2149
2171
|
}) : s.sparkTable.methods.removeParam(o);
|
|
2150
|
-
}),
|
|
2172
|
+
}), N(
|
|
2151
2173
|
() => s.sparkTable.params[o],
|
|
2152
2174
|
(a) => {
|
|
2153
2175
|
a != null && a !== "" ? t.value !== a && (t.value = a) : t.value && (t.value = "");
|
|
2154
2176
|
}
|
|
2155
2177
|
), (a, c) => {
|
|
2156
2178
|
const r = A("FormKit");
|
|
2157
|
-
return m(), g("div",
|
|
2179
|
+
return m(), g("div", Go, [
|
|
2158
2180
|
b(r, Z({
|
|
2159
2181
|
modelValue: t.value,
|
|
2160
2182
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2161
2183
|
type: "select",
|
|
2162
|
-
label:
|
|
2184
|
+
label: w(l),
|
|
2163
2185
|
options: n.value,
|
|
2164
2186
|
placeholder: e.config.placeholder || "All",
|
|
2165
2187
|
"outer-class": "!mb-0",
|
|
@@ -2168,10 +2190,10 @@ const go = (e) => {
|
|
|
2168
2190
|
]);
|
|
2169
2191
|
};
|
|
2170
2192
|
}
|
|
2171
|
-
},
|
|
2193
|
+
}, Yo = /* @__PURE__ */ ee(Wo, [["__scopeId", "data-v-642dbc69"]]), Xo = { class: "spark-table-filter-buttons" }, Jo = {
|
|
2172
2194
|
key: 0,
|
|
2173
2195
|
class: "spark-table-filter-buttons-label"
|
|
2174
|
-
},
|
|
2196
|
+
}, Qo = {
|
|
2175
2197
|
__name: "SparkTableFilterButtons",
|
|
2176
2198
|
props: {
|
|
2177
2199
|
/** SparkTable instance object */
|
|
@@ -2197,16 +2219,16 @@ const go = (e) => {
|
|
|
2197
2219
|
[l]: c
|
|
2198
2220
|
});
|
|
2199
2221
|
};
|
|
2200
|
-
return
|
|
2222
|
+
return N(
|
|
2201
2223
|
() => s.sparkTable.params[l],
|
|
2202
2224
|
(c) => {
|
|
2203
2225
|
(c == null || c === "") && t.value ? t.value = null : c !== t.value && (t.value = c);
|
|
2204
2226
|
}
|
|
2205
|
-
), (c, r) => (m(), g("div",
|
|
2206
|
-
|
|
2207
|
-
b(
|
|
2227
|
+
), (c, r) => (m(), g("div", Xo, [
|
|
2228
|
+
w(o) ? (m(), g("span", Jo, L(w(o)), 1)) : T("", !0),
|
|
2229
|
+
b(Is, { class: "isolate" }, {
|
|
2208
2230
|
default: C(() => [
|
|
2209
|
-
(m(!0), g(R, null, z(e.config.options, (i) => (m(), V(
|
|
2231
|
+
(m(!0), g(R, null, z(e.config.options, (i) => (m(), V(G, {
|
|
2210
2232
|
key: i.value,
|
|
2211
2233
|
size: "xl",
|
|
2212
2234
|
variant: n(i.value) ? "primary" : "secondary",
|
|
@@ -2222,7 +2244,7 @@ const go = (e) => {
|
|
|
2222
2244
|
})
|
|
2223
2245
|
]));
|
|
2224
2246
|
}
|
|
2225
|
-
},
|
|
2247
|
+
}, ea = /* @__PURE__ */ ee(Qo, [["__scopeId", "data-v-0fcd0cce"]]), ta = { class: "spark-table-date-picker" }, sa = {
|
|
2226
2248
|
__name: "SparkTableDatePicker",
|
|
2227
2249
|
props: {
|
|
2228
2250
|
/** SparkTable instance object */
|
|
@@ -2241,12 +2263,12 @@ const go = (e) => {
|
|
|
2241
2263
|
const s = e, t = E(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = E(`${l}-0`);
|
|
2242
2264
|
return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2243
2265
|
[l]: s.config.initialValue
|
|
2244
|
-
})) : t.value = null,
|
|
2266
|
+
})) : t.value = null, N(t, (a) => {
|
|
2245
2267
|
a ? s.sparkTable.methods.applyParams({
|
|
2246
2268
|
page: 1,
|
|
2247
2269
|
[l]: a
|
|
2248
2270
|
}) : s.sparkTable.methods.removeParam(l);
|
|
2249
|
-
}),
|
|
2271
|
+
}), N(
|
|
2250
2272
|
() => s.sparkTable.params[l],
|
|
2251
2273
|
(a) => {
|
|
2252
2274
|
if ((a == null || a === "") && t.value) {
|
|
@@ -2257,14 +2279,14 @@ const go = (e) => {
|
|
|
2257
2279
|
}
|
|
2258
2280
|
), (a, c) => {
|
|
2259
2281
|
const r = A("FormKit");
|
|
2260
|
-
return m(), g("div",
|
|
2282
|
+
return m(), g("div", ta, [
|
|
2261
2283
|
(m(), V(r, Z({
|
|
2262
2284
|
key: n.value,
|
|
2263
2285
|
modelValue: t.value,
|
|
2264
2286
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2265
2287
|
type: "datepicker",
|
|
2266
2288
|
"picker-only": "",
|
|
2267
|
-
label:
|
|
2289
|
+
label: w(o),
|
|
2268
2290
|
placeholder: e.config.placeholder || "Select date",
|
|
2269
2291
|
overlay: !0,
|
|
2270
2292
|
"value-format": "YYYY-MM-DD",
|
|
@@ -2275,7 +2297,7 @@ const go = (e) => {
|
|
|
2275
2297
|
]);
|
|
2276
2298
|
};
|
|
2277
2299
|
}
|
|
2278
|
-
},
|
|
2300
|
+
}, oa = /* @__PURE__ */ ee(sa, [["__scopeId", "data-v-44ef9cb8"]]), aa = { class: "spark-table-reset" }, ra = { key: 1 }, na = {
|
|
2279
2301
|
__name: "SparkTableReset",
|
|
2280
2302
|
props: {
|
|
2281
2303
|
/** SparkTable instance object */
|
|
@@ -2295,8 +2317,8 @@ const go = (e) => {
|
|
|
2295
2317
|
Object.entries(o).forEach(([i, u]) => {
|
|
2296
2318
|
if (!u || u.type === "reset" || !(typeof u.enabled == "function" ? u.enabled(s.sparkTable.params) : u.enabled))
|
|
2297
2319
|
return;
|
|
2298
|
-
let
|
|
2299
|
-
u.type === "search" ?
|
|
2320
|
+
let p = null;
|
|
2321
|
+
u.type === "search" ? p = u.param || "search" : u.type === "filterSelect" || u.type === "filterButtons" ? p = u.param || `filter[${u.key}]` : u.type === "datePicker" && (p = u.param || `filter[${u.key}]`), p && (u.initialValue !== void 0 && u.initialValue !== null ? n[p] = u.initialValue : l.push(p));
|
|
2300
2322
|
});
|
|
2301
2323
|
const a = l.filter(
|
|
2302
2324
|
(i) => s.sparkTable.params[i] !== void 0 && s.sparkTable.params[i] !== null && s.sparkTable.params[i] !== ""
|
|
@@ -2313,8 +2335,8 @@ const go = (e) => {
|
|
|
2313
2335
|
};
|
|
2314
2336
|
return (o, l) => {
|
|
2315
2337
|
const n = A("font-awesome-icon");
|
|
2316
|
-
return m(), g("div",
|
|
2317
|
-
b(
|
|
2338
|
+
return m(), g("div", aa, [
|
|
2339
|
+
b(G, {
|
|
2318
2340
|
onClick: t,
|
|
2319
2341
|
variant: "secondary",
|
|
2320
2342
|
size: "xl"
|
|
@@ -2325,20 +2347,20 @@ const go = (e) => {
|
|
|
2325
2347
|
icon: ["far", e.config.icon],
|
|
2326
2348
|
class: H({ "mr-1.5": e.config.label })
|
|
2327
2349
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
2328
|
-
e.config.label ? (m(), g("span",
|
|
2350
|
+
e.config.label ? (m(), g("span", ra, L(e.config.label), 1)) : T("", !0)
|
|
2329
2351
|
]),
|
|
2330
2352
|
_: 1
|
|
2331
2353
|
})
|
|
2332
2354
|
]);
|
|
2333
2355
|
};
|
|
2334
2356
|
}
|
|
2335
|
-
},
|
|
2357
|
+
}, la = /* @__PURE__ */ ee(na, [["__scopeId", "data-v-45343158"]]), ia = { class: "spark-table" }, ca = {
|
|
2336
2358
|
key: 1,
|
|
2337
2359
|
class: "pt-5"
|
|
2338
|
-
},
|
|
2360
|
+
}, ua = { class: "flex items-center gap-x-3" }, ve = {
|
|
2339
2361
|
perPages: [15, 30, 50, 100, 200, 500],
|
|
2340
2362
|
limit: 15
|
|
2341
|
-
},
|
|
2363
|
+
}, da = {
|
|
2342
2364
|
page: 1,
|
|
2343
2365
|
limit: ve.limit
|
|
2344
2366
|
}, Me = {
|
|
@@ -2351,7 +2373,7 @@ const go = (e) => {
|
|
|
2351
2373
|
tableClassName: "spark-table-table",
|
|
2352
2374
|
readOnlyCellClassName: "read-only",
|
|
2353
2375
|
licenseKey: "non-commercial-and-evaluation"
|
|
2354
|
-
},
|
|
2376
|
+
}, pn = {
|
|
2355
2377
|
__name: "SparkTable",
|
|
2356
2378
|
props: {
|
|
2357
2379
|
url: {
|
|
@@ -2375,7 +2397,7 @@ const go = (e) => {
|
|
|
2375
2397
|
params: {
|
|
2376
2398
|
type: Object,
|
|
2377
2399
|
default() {
|
|
2378
|
-
return
|
|
2400
|
+
return da;
|
|
2379
2401
|
}
|
|
2380
2402
|
},
|
|
2381
2403
|
options: {
|
|
@@ -2416,15 +2438,15 @@ const go = (e) => {
|
|
|
2416
2438
|
],
|
|
2417
2439
|
setup(e, { expose: s, emit: t }) {
|
|
2418
2440
|
const o = e;
|
|
2419
|
-
Ut(), de(
|
|
2441
|
+
Ut(), de(Nt), de(It), de(Zt), Y(o, "settings.nestedHeaders") && de(qt);
|
|
2420
2442
|
const l = t, n = Ve("axios"), a = E(null), c = E(!1), r = E(null);
|
|
2421
2443
|
let i = !1;
|
|
2422
2444
|
const u = {
|
|
2423
|
-
search:
|
|
2424
|
-
filterSelect:
|
|
2425
|
-
filterButtons:
|
|
2426
|
-
datePicker:
|
|
2427
|
-
reset:
|
|
2445
|
+
search: Ko,
|
|
2446
|
+
filterSelect: Yo,
|
|
2447
|
+
filterButtons: ea,
|
|
2448
|
+
datePicker: oa,
|
|
2449
|
+
reset: la
|
|
2428
2450
|
}, d = q({
|
|
2429
2451
|
hotInstance: null,
|
|
2430
2452
|
url: S(() => o.url),
|
|
@@ -2449,13 +2471,13 @@ const go = (e) => {
|
|
|
2449
2471
|
c.value = !0, r.value = null, l("loading", !0), me.start(), d.hotInstance = a.value.hotInstance;
|
|
2450
2472
|
try {
|
|
2451
2473
|
if (o.dataProvider) {
|
|
2452
|
-
const
|
|
2453
|
-
d.response = o.dataTransformer(
|
|
2474
|
+
const _ = await o.dataProvider(d.computed.params);
|
|
2475
|
+
d.response = o.dataTransformer(_, o);
|
|
2454
2476
|
} else if (o.url) {
|
|
2455
|
-
const
|
|
2477
|
+
const _ = await n.get(o.url, {
|
|
2456
2478
|
params: d.computed.params
|
|
2457
2479
|
});
|
|
2458
|
-
d.response = o.dataTransformer(
|
|
2480
|
+
d.response = o.dataTransformer(_, o);
|
|
2459
2481
|
} else {
|
|
2460
2482
|
console.error("No data provider or URL provided"), c.value = !1, l("loading", !1), me.done();
|
|
2461
2483
|
return;
|
|
@@ -2463,8 +2485,8 @@ const go = (e) => {
|
|
|
2463
2485
|
if (i) return;
|
|
2464
2486
|
d.hotInstance.updateData(d.response.data), d.options.callback && typeof d.options.callback == "function" && await d.options.callback();
|
|
2465
2487
|
const x = d.hotInstance.getPlugin("autoColumnSize");
|
|
2466
|
-
Y(o.settings, "columns", []).forEach((
|
|
2467
|
-
|
|
2488
|
+
Y(o.settings, "columns", []).forEach((_, v) => {
|
|
2489
|
+
_.width || x.calculateColumnsWidth(v, v, !0);
|
|
2468
2490
|
}), l("load", {
|
|
2469
2491
|
data: d.response.data,
|
|
2470
2492
|
meta: d.response.meta
|
|
@@ -2512,7 +2534,7 @@ const go = (e) => {
|
|
|
2512
2534
|
...!Y(o.settings, "nestedHeaders") && {
|
|
2513
2535
|
afterGetColHeader: (h, x) => ro(h, x, d)
|
|
2514
2536
|
},
|
|
2515
|
-
afterChange: (h, x) =>
|
|
2537
|
+
afterChange: (h, x) => Lo(),
|
|
2516
2538
|
afterRender: () => no(d),
|
|
2517
2539
|
/**
|
|
2518
2540
|
* Prevent columns with explicit width from being stretched
|
|
@@ -2520,8 +2542,8 @@ const go = (e) => {
|
|
|
2520
2542
|
* while letting others stretch normally
|
|
2521
2543
|
*/
|
|
2522
2544
|
beforeStretchingColumnWidth: (h, x) => {
|
|
2523
|
-
const
|
|
2524
|
-
return
|
|
2545
|
+
const _ = Y(o.settings, "columns", [])[x];
|
|
2546
|
+
return _ && _.width !== void 0 ? _.width : h;
|
|
2525
2547
|
},
|
|
2526
2548
|
/**
|
|
2527
2549
|
* Copy displayed cell content instead of raw data values
|
|
@@ -2529,20 +2551,20 @@ const go = (e) => {
|
|
|
2529
2551
|
*/
|
|
2530
2552
|
beforeCopy: (h, x) => {
|
|
2531
2553
|
const P = a.value?.hotInstance;
|
|
2532
|
-
P && x.forEach((
|
|
2533
|
-
for (let v =
|
|
2534
|
-
for (let $ =
|
|
2554
|
+
P && x.forEach((_) => {
|
|
2555
|
+
for (let v = _.startRow; v <= _.endRow; v++)
|
|
2556
|
+
for (let $ = _.startCol; $ <= _.endCol; $++) {
|
|
2535
2557
|
const M = P.getCell(v, $);
|
|
2536
2558
|
if (M) {
|
|
2537
|
-
const D = v - x[0].startRow,
|
|
2538
|
-
h[D][
|
|
2559
|
+
const D = v - x[0].startRow, W = $ - x[0].startCol;
|
|
2560
|
+
h[D][W] = M.dataset.copyValue ?? M.textContent ?? "";
|
|
2539
2561
|
}
|
|
2540
2562
|
}
|
|
2541
2563
|
});
|
|
2542
2564
|
},
|
|
2543
2565
|
...o.settings
|
|
2544
2566
|
}))
|
|
2545
|
-
}),
|
|
2567
|
+
}), p = (h) => {
|
|
2546
2568
|
if (!h) return null;
|
|
2547
2569
|
switch (h.type) {
|
|
2548
2570
|
case "search":
|
|
@@ -2555,15 +2577,15 @@ const go = (e) => {
|
|
|
2555
2577
|
return null;
|
|
2556
2578
|
}
|
|
2557
2579
|
}, y = (h) => h ? typeof h.enabled == "function" ? h.enabled(d.params) : h.enabled : !1, k = S(() => Object.entries(o.plugins).filter(([h, x]) => y(x)).map(([h, x]) => ({ name: h, config: x })));
|
|
2558
|
-
if (
|
|
2580
|
+
if (N(
|
|
2559
2581
|
() => ({ ...d.params }),
|
|
2560
2582
|
() => {
|
|
2561
2583
|
const h = [];
|
|
2562
2584
|
Object.values(o.plugins).forEach((x) => {
|
|
2563
|
-
const P =
|
|
2585
|
+
const P = p(x);
|
|
2564
2586
|
if (!P) return;
|
|
2565
|
-
const
|
|
2566
|
-
!
|
|
2587
|
+
const _ = y(x), v = d.params[P] !== void 0;
|
|
2588
|
+
!_ && v && h.push(P);
|
|
2567
2589
|
}), h.length > 0 && h.forEach((x) => {
|
|
2568
2590
|
delete d.params[x];
|
|
2569
2591
|
});
|
|
@@ -2571,25 +2593,25 @@ const go = (e) => {
|
|
|
2571
2593
|
{ deep: !0, flush: "sync" }
|
|
2572
2594
|
), o.syncToRoute || o.persistToStorage) {
|
|
2573
2595
|
const h = typeof o.syncToRoute == "string";
|
|
2574
|
-
|
|
2596
|
+
Po(d, {
|
|
2575
2597
|
namespace: h ? o.syncToRoute : null,
|
|
2576
2598
|
syncToRoute: !!o.syncToRoute,
|
|
2577
2599
|
persistToStorage: o.persistToStorage
|
|
2578
2600
|
});
|
|
2579
2601
|
}
|
|
2580
|
-
return
|
|
2602
|
+
return we(
|
|
2581
2603
|
() => o.params,
|
|
2582
2604
|
async () => {
|
|
2583
2605
|
d.params.page = 1, await d.methods.loadTable();
|
|
2584
2606
|
},
|
|
2585
2607
|
{ debounce: 50, maxWait: 1e3 }
|
|
2586
|
-
),
|
|
2608
|
+
), we(
|
|
2587
2609
|
() => d.params,
|
|
2588
2610
|
async () => {
|
|
2589
2611
|
await d.methods.loadTable();
|
|
2590
2612
|
},
|
|
2591
2613
|
{ debounce: 50, maxWait: 1e3 }
|
|
2592
|
-
),
|
|
2614
|
+
), N(
|
|
2593
2615
|
() => o.url,
|
|
2594
2616
|
async (h, x) => {
|
|
2595
2617
|
h !== x && (d.params.page = 1, await d.methods.loadTable());
|
|
@@ -2598,7 +2620,7 @@ const go = (e) => {
|
|
|
2598
2620
|
await d.methods.loadTable(), l("ready");
|
|
2599
2621
|
}), Ye(() => {
|
|
2600
2622
|
i = !0;
|
|
2601
|
-
}),
|
|
2623
|
+
}), To(d), s({
|
|
2602
2624
|
refresh: () => d.methods.loadTable(),
|
|
2603
2625
|
getParams: () => d.methods.getParams(),
|
|
2604
2626
|
getParam: (h) => d.methods.getParam(h),
|
|
@@ -2610,27 +2632,27 @@ const go = (e) => {
|
|
|
2610
2632
|
error: r,
|
|
2611
2633
|
sparkTable: d,
|
|
2612
2634
|
table: a
|
|
2613
|
-
}), (h, x) => (m(), g("div",
|
|
2635
|
+
}), (h, x) => (m(), g("div", ia, [
|
|
2614
2636
|
d.computed.ready && k.value && k.value.length ? (m(), V(Pe, {
|
|
2615
2637
|
key: 0,
|
|
2616
2638
|
position: "header"
|
|
2617
2639
|
}, {
|
|
2618
2640
|
default: C(() => [
|
|
2619
|
-
(m(!0), g(R, null, z(k.value, (P) => (m(), V(
|
|
2641
|
+
(m(!0), g(R, null, z(k.value, (P) => (m(), V(I(u[P.config.type]), {
|
|
2620
2642
|
key: P.name,
|
|
2621
2643
|
class: H(P.config.align ? `self-${P.config.align}` : ""),
|
|
2622
2644
|
"spark-table": d,
|
|
2623
2645
|
config: P.config
|
|
2624
2646
|
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
2625
|
-
|
|
2647
|
+
O(h.$slots, "header", {
|
|
2626
2648
|
sparkTable: d,
|
|
2627
2649
|
loading: c.value,
|
|
2628
2650
|
error: r.value
|
|
2629
2651
|
})
|
|
2630
2652
|
]),
|
|
2631
2653
|
_: 3
|
|
2632
|
-
})) : (m(), g("div",
|
|
2633
|
-
b(
|
|
2654
|
+
})) : (m(), g("div", ca)),
|
|
2655
|
+
b(w(jt), {
|
|
2634
2656
|
"theme-name": "ht-theme-classic",
|
|
2635
2657
|
ref_key: "table",
|
|
2636
2658
|
ref: a,
|
|
@@ -2641,17 +2663,17 @@ const go = (e) => {
|
|
|
2641
2663
|
position: "footer"
|
|
2642
2664
|
}, {
|
|
2643
2665
|
default: C(() => [
|
|
2644
|
-
b(
|
|
2645
|
-
|
|
2646
|
-
b(
|
|
2666
|
+
b(Ao, { "spark-table": d }, null, 8, ["spark-table"]),
|
|
2667
|
+
f("div", ua, [
|
|
2668
|
+
b(jo, {
|
|
2647
2669
|
"spark-table": d,
|
|
2648
2670
|
onPaginate: d.methods.applyParams
|
|
2649
2671
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2650
|
-
b(
|
|
2672
|
+
b(Zo, {
|
|
2651
2673
|
"spark-table": d,
|
|
2652
2674
|
onPaginate: d.methods.applyParams
|
|
2653
2675
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2654
|
-
|
|
2676
|
+
O(h.$slots, "footer", {
|
|
2655
2677
|
sparkTable: d,
|
|
2656
2678
|
loading: c.value,
|
|
2657
2679
|
error: r.value
|
|
@@ -2690,7 +2712,7 @@ function He() {
|
|
|
2690
2712
|
}
|
|
2691
2713
|
};
|
|
2692
2714
|
}
|
|
2693
|
-
class
|
|
2715
|
+
class pa {
|
|
2694
2716
|
constructor() {
|
|
2695
2717
|
this.left = He(), this.right = He();
|
|
2696
2718
|
}
|
|
@@ -2722,22 +2744,22 @@ class ua {
|
|
|
2722
2744
|
this.left.close(), this.right.close();
|
|
2723
2745
|
};
|
|
2724
2746
|
}
|
|
2725
|
-
const te = new
|
|
2747
|
+
const te = new pa(), fa = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ma = { class: "flex flex-1 flex-col" }, ha = {
|
|
2726
2748
|
class: "flex flex-1 flex-col gap-y-7",
|
|
2727
2749
|
role: "list"
|
|
2728
|
-
},
|
|
2750
|
+
}, ga = { class: "flex flex-1 flex-col" }, ya = {
|
|
2729
2751
|
role: "list",
|
|
2730
2752
|
class: "flex flex-1 flex-col"
|
|
2731
|
-
},
|
|
2753
|
+
}, va = { class: "flex items-center pb-8" }, ba = ["href", "onClick"], xa = {
|
|
2732
2754
|
key: 2,
|
|
2733
2755
|
class: "w-full flex justify-center"
|
|
2734
|
-
},
|
|
2756
|
+
}, ka = {
|
|
2735
2757
|
key: 0,
|
|
2736
2758
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
2737
|
-
},
|
|
2759
|
+
}, wa = ["href", "onClick"], _a = {
|
|
2738
2760
|
key: 1,
|
|
2739
2761
|
class: "text-[13px]"
|
|
2740
|
-
},
|
|
2762
|
+
}, Sa = { class: "mt-auto" }, Ca = { class: "p-[10px] flex-shrink-0" }, $a = { class: "flex flex-1 items-center gap-x-6" }, Ta = { class: "relative flex flex-1 items-center gap-4" }, La = { class: "cursor-pointer" }, Pa = ["src"], Ma = { class: "ml-auto" }, Ha = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, fn = {
|
|
2741
2763
|
__name: "SparkDefaultContainer",
|
|
2742
2764
|
props: {
|
|
2743
2765
|
appStore: {
|
|
@@ -2755,7 +2777,7 @@ const te = new ua(), da = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, pa =
|
|
|
2755
2777
|
},
|
|
2756
2778
|
emits: ["overlayClose"],
|
|
2757
2779
|
setup(e, { emit: s }) {
|
|
2758
|
-
const t = e, o = s, l = Be(), n = ne(), a =
|
|
2780
|
+
const t = e, o = s, l = Be(), n = ne(), a = Ie(), c = De(), r = S(() => c.getAppIcon(t.appStore.state.app)), i = S(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
|
|
2759
2781
|
const k = {};
|
|
2760
2782
|
l["app-selector-bottom"] ? k.bottomSlot = () => ke("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (k.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? k.footerSlot = () => ke("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (k.footerSlot = t.appSelectorSlots.footerSlot), te.showRight(vs, k, {
|
|
2761
2783
|
select: (h) => {
|
|
@@ -2772,96 +2794,96 @@ const te = new ua(), da = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, pa =
|
|
|
2772
2794
|
}
|
|
2773
2795
|
}
|
|
2774
2796
|
);
|
|
2775
|
-
},
|
|
2797
|
+
}, p = S(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), y = S(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
2776
2798
|
return (k, h) => {
|
|
2777
2799
|
const x = A("font-awesome-icon"), P = A("router-view");
|
|
2778
2800
|
return m(), g(R, null, [
|
|
2779
|
-
|
|
2780
|
-
class: H([
|
|
2801
|
+
f("div", {
|
|
2802
|
+
class: H([p.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
2781
2803
|
}, [
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2804
|
+
f("div", fa, [
|
|
2805
|
+
f("nav", ma, [
|
|
2806
|
+
f("ul", ha, [
|
|
2807
|
+
f("li", ga, [
|
|
2808
|
+
f("ul", ya, [
|
|
2809
|
+
f("li", va, [
|
|
2810
|
+
f("a", {
|
|
2789
2811
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
2790
|
-
onClick: h[0] || (h[0] = Q((
|
|
2812
|
+
onClick: h[0] || (h[0] = Q((_) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
2791
2813
|
}, [
|
|
2792
2814
|
b(x, {
|
|
2793
|
-
icon:
|
|
2815
|
+
icon: w(F)[r.value],
|
|
2794
2816
|
class: "size-5"
|
|
2795
2817
|
}, null, 8, ["icon"])
|
|
2796
2818
|
]),
|
|
2797
2819
|
e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("a", {
|
|
2798
2820
|
key: 0,
|
|
2799
|
-
onClick: h[1] || (h[1] = Q((
|
|
2821
|
+
onClick: h[1] || (h[1] = Q((_) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
2800
2822
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
2801
2823
|
}, L(e.appStore.state.app), 1))
|
|
2802
2824
|
]),
|
|
2803
|
-
(m(!0), g(R, null, z(e.mainNavStore.state.menu, (
|
|
2804
|
-
key:
|
|
2825
|
+
(m(!0), g(R, null, z(e.mainNavStore.state.menu, (_) => (m(), g("li", {
|
|
2826
|
+
key: _.name,
|
|
2805
2827
|
class: H({
|
|
2806
|
-
"mt-[10px]":
|
|
2807
|
-
"mt-auto":
|
|
2828
|
+
"mt-[10px]": _.children,
|
|
2829
|
+
"mt-auto": _.footerSection
|
|
2808
2830
|
})
|
|
2809
2831
|
}, [
|
|
2810
|
-
|
|
2832
|
+
f("a", {
|
|
2811
2833
|
class: H([{
|
|
2812
|
-
"bg-gray-100":
|
|
2813
|
-
"hover:bg-gray-100":
|
|
2834
|
+
"bg-gray-100": _.current,
|
|
2835
|
+
"hover:bg-gray-100": _?.href
|
|
2814
2836
|
}, "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
2815
|
-
href:
|
|
2816
|
-
onClick: Q((v) => e.mainNavStore.goto(
|
|
2837
|
+
href: _?.href,
|
|
2838
|
+
onClick: Q((v) => e.mainNavStore.goto(_.href), ["prevent"])
|
|
2817
2839
|
}, [
|
|
2818
|
-
|
|
2840
|
+
_.icon ? (m(), V(x, {
|
|
2819
2841
|
key: 0,
|
|
2820
|
-
icon:
|
|
2821
|
-
class: H([[(
|
|
2842
|
+
icon: w(F)[_.icon],
|
|
2843
|
+
class: H([[(_.current, "text-gray-400")], "size-4"])
|
|
2822
2844
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
2823
|
-
e.mainNavStore.state.collapsed ?
|
|
2824
|
-
|
|
2845
|
+
e.mainNavStore.state.collapsed ? _?.children ? (m(), g("div", xa, [...h[6] || (h[6] = [
|
|
2846
|
+
f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
2825
2847
|
])])) : T("", !0) : (m(), g("span", {
|
|
2826
2848
|
key: 1,
|
|
2827
2849
|
class: H({
|
|
2828
|
-
"text-[11px]":
|
|
2829
|
-
"text-[13px]": !
|
|
2830
|
-
"font-semibold":
|
|
2831
|
-
"text-gray-500":
|
|
2850
|
+
"text-[11px]": _?.children,
|
|
2851
|
+
"text-[13px]": !_?.children,
|
|
2852
|
+
"font-semibold": _?.children,
|
|
2853
|
+
"text-gray-500": _?.children
|
|
2832
2854
|
})
|
|
2833
|
-
}, L(
|
|
2834
|
-
], 10,
|
|
2835
|
-
|
|
2836
|
-
(m(!0), g(R, null, z(
|
|
2855
|
+
}, L(_.name), 3))
|
|
2856
|
+
], 10, ba),
|
|
2857
|
+
_.children ? (m(), g("ul", ka, [
|
|
2858
|
+
(m(!0), g(R, null, z(_.children, (v) => (m(), g("li", {
|
|
2837
2859
|
key: v.name
|
|
2838
2860
|
}, [
|
|
2839
|
-
|
|
2861
|
+
f("a", {
|
|
2840
2862
|
class: H([[v.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
2841
2863
|
href: v.href,
|
|
2842
2864
|
onClick: Q(($) => e.mainNavStore.goto(v.href), ["prevent"])
|
|
2843
2865
|
}, [
|
|
2844
2866
|
v.icon ? (m(), V(x, {
|
|
2845
2867
|
key: 0,
|
|
2846
|
-
icon:
|
|
2868
|
+
icon: w(F)[v.icon],
|
|
2847
2869
|
class: H([[(v.current, "text-gray-400")], "size-4"])
|
|
2848
2870
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
2849
|
-
e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("span",
|
|
2850
|
-
], 10,
|
|
2871
|
+
e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("span", _a, L(v.name), 1))
|
|
2872
|
+
], 10, wa)
|
|
2851
2873
|
]))), 128))
|
|
2852
2874
|
])) : T("", !0)
|
|
2853
2875
|
], 2))), 128))
|
|
2854
2876
|
])
|
|
2855
2877
|
]),
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2878
|
+
f("li", Sa, [
|
|
2879
|
+
O(k.$slots, "sidebar-footer"),
|
|
2880
|
+
f("a", {
|
|
2859
2881
|
class: "font-medium grid place-content-center gap-x-3 rounded-md h-10 p-2.5 text-gray-800 text-[13px] hover:bg-gray-100 transition-all duration-300 ease-in-out",
|
|
2860
2882
|
href: "#",
|
|
2861
|
-
onClick: h[2] || (h[2] = Q((
|
|
2883
|
+
onClick: h[2] || (h[2] = Q((_) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
2862
2884
|
}, [
|
|
2863
2885
|
b(x, {
|
|
2864
|
-
icon:
|
|
2886
|
+
icon: w(F)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
2865
2887
|
class: "class-5"
|
|
2866
2888
|
}, null, 8, ["icon"])
|
|
2867
2889
|
])
|
|
@@ -2870,37 +2892,37 @@ const te = new ua(), da = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, pa =
|
|
|
2870
2892
|
])
|
|
2871
2893
|
])
|
|
2872
2894
|
], 2),
|
|
2873
|
-
|
|
2895
|
+
f("div", {
|
|
2874
2896
|
class: H([y.value, "h-full transition-all flex flex-col"])
|
|
2875
2897
|
}, [
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2898
|
+
f("div", Ca, [
|
|
2899
|
+
f("div", $a, [
|
|
2900
|
+
f("div", Ta, [
|
|
2901
|
+
O(k.$slots, "header-left", {}, () => [
|
|
2902
|
+
f("div", La, [
|
|
2881
2903
|
b(x, {
|
|
2882
|
-
icon:
|
|
2904
|
+
icon: w(F).farBarsSort,
|
|
2883
2905
|
class: "size-5",
|
|
2884
|
-
onClick: h[3] || (h[3] = (
|
|
2906
|
+
onClick: h[3] || (h[3] = (_) => e.mainNavStore.toggleHidden())
|
|
2885
2907
|
}, null, 8, ["icon"])
|
|
2886
2908
|
])
|
|
2887
2909
|
]),
|
|
2888
|
-
|
|
2910
|
+
O(k.$slots, "header-center", {}, () => [
|
|
2889
2911
|
i.value ? (m(), g("div", {
|
|
2890
2912
|
key: 0,
|
|
2891
2913
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
2892
2914
|
onClick: d
|
|
2893
2915
|
}, [
|
|
2894
|
-
|
|
2916
|
+
w(a).currentBrand ? (m(), g("img", {
|
|
2895
2917
|
key: 0,
|
|
2896
|
-
src:
|
|
2918
|
+
src: w(a).currentBrand.logo,
|
|
2897
2919
|
alt: "",
|
|
2898
2920
|
class: "h-[30px] w-auto"
|
|
2899
|
-
}, null, 8,
|
|
2921
|
+
}, null, 8, Pa)) : T("", !0)
|
|
2900
2922
|
])) : T("", !0)
|
|
2901
2923
|
]),
|
|
2902
|
-
|
|
2903
|
-
|
|
2924
|
+
f("div", Ma, [
|
|
2925
|
+
O(k.$slots, "header-right", {}, () => [
|
|
2904
2926
|
e.appStore.state.showAppSelector ? (m(), g("button", {
|
|
2905
2927
|
key: 0,
|
|
2906
2928
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
@@ -2908,7 +2930,7 @@ const te = new ua(), da = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, pa =
|
|
|
2908
2930
|
onClick: u
|
|
2909
2931
|
}, [
|
|
2910
2932
|
b(x, {
|
|
2911
|
-
icon:
|
|
2933
|
+
icon: w(F).farGripDotsVertical,
|
|
2912
2934
|
class: "size-4 text-gray-400"
|
|
2913
2935
|
}, null, 8, ["icon"])
|
|
2914
2936
|
])) : T("", !0)
|
|
@@ -2917,35 +2939,35 @@ const te = new ua(), da = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, pa =
|
|
|
2917
2939
|
])
|
|
2918
2940
|
])
|
|
2919
2941
|
]),
|
|
2920
|
-
|
|
2942
|
+
f("main", Ha, [
|
|
2921
2943
|
b(P)
|
|
2922
2944
|
])
|
|
2923
2945
|
], 2),
|
|
2924
|
-
b(
|
|
2946
|
+
b(w(Se), {
|
|
2925
2947
|
position: "left",
|
|
2926
|
-
"overlay-instance":
|
|
2927
|
-
onClose: h[4] || (h[4] = (
|
|
2948
|
+
"overlay-instance": w(te).left,
|
|
2949
|
+
onClose: h[4] || (h[4] = (_) => o("overlayClose", "left"))
|
|
2928
2950
|
}, null, 8, ["overlay-instance"]),
|
|
2929
|
-
b(
|
|
2951
|
+
b(w(Se), {
|
|
2930
2952
|
position: "right",
|
|
2931
|
-
"overlay-instance":
|
|
2932
|
-
onClose: h[5] || (h[5] = (
|
|
2953
|
+
"overlay-instance": w(te).right,
|
|
2954
|
+
onClose: h[5] || (h[5] = (_) => o("overlayClose", "right"))
|
|
2933
2955
|
}, null, 8, ["overlay-instance"]),
|
|
2934
|
-
b(
|
|
2956
|
+
b(w(Qs))
|
|
2935
2957
|
], 64);
|
|
2936
2958
|
};
|
|
2937
2959
|
}
|
|
2938
|
-
},
|
|
2939
|
-
function
|
|
2960
|
+
}, Va = {}, Ra = { class: "h-full" };
|
|
2961
|
+
function Ba(e, s) {
|
|
2940
2962
|
const t = A("router-view");
|
|
2941
|
-
return m(), g("main",
|
|
2963
|
+
return m(), g("main", Ra, [
|
|
2942
2964
|
b(t)
|
|
2943
2965
|
]);
|
|
2944
2966
|
}
|
|
2945
|
-
const
|
|
2967
|
+
const mn = /* @__PURE__ */ ee(Va, [["render", Ba]]), Ea = (e) => {
|
|
2946
2968
|
const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2947
2969
|
return s ? s[2] : null;
|
|
2948
|
-
},
|
|
2970
|
+
}, Aa = (e, s, t = {}) => {
|
|
2949
2971
|
const {
|
|
2950
2972
|
maxAge: o = 31536e3,
|
|
2951
2973
|
// 365 days in seconds
|
|
@@ -2956,7 +2978,7 @@ const pn = /* @__PURE__ */ ee(Ma, [["render", Va]]), Ra = (e) => {
|
|
|
2956
2978
|
} = t;
|
|
2957
2979
|
let r = `${e}=${s}; max-age=${o}; path=${c}; samesite=${a}`;
|
|
2958
2980
|
l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
|
|
2959
|
-
},
|
|
2981
|
+
}, Fa = (e, s = {}) => {
|
|
2960
2982
|
const { domain: t = Ze(), path: o = "/" } = s;
|
|
2961
2983
|
let l = `${e}=; max-age=0; path=${o}`;
|
|
2962
2984
|
t && (l += `; domain=${t}`), document.cookie = l;
|
|
@@ -2964,15 +2986,15 @@ const pn = /* @__PURE__ */ ee(Ma, [["render", Va]]), Ra = (e) => {
|
|
|
2964
2986
|
const e = window.location.hostname;
|
|
2965
2987
|
return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
|
|
2966
2988
|
}, qe = [];
|
|
2967
|
-
function
|
|
2989
|
+
function Oa(e) {
|
|
2968
2990
|
qe.push(e);
|
|
2969
2991
|
}
|
|
2970
|
-
function
|
|
2992
|
+
function za() {
|
|
2971
2993
|
qe.forEach((e) => e());
|
|
2972
2994
|
}
|
|
2973
|
-
function
|
|
2995
|
+
function hn(e) {
|
|
2974
2996
|
let s = !1;
|
|
2975
|
-
return
|
|
2997
|
+
return Oa(() => {
|
|
2976
2998
|
s = !1;
|
|
2977
2999
|
}), {
|
|
2978
3000
|
bootstrapApp: async () => {
|
|
@@ -2985,7 +3007,7 @@ function fn(e) {
|
|
|
2985
3007
|
}
|
|
2986
3008
|
};
|
|
2987
3009
|
}
|
|
2988
|
-
const ye = "bolt-next-token",
|
|
3010
|
+
const ye = "bolt-next-token", K = ue("auth", () => {
|
|
2989
3011
|
const e = q({
|
|
2990
3012
|
user: null,
|
|
2991
3013
|
token: null,
|
|
@@ -3021,10 +3043,10 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3021
3043
|
}), s = (i = {}) => {
|
|
3022
3044
|
i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks), i.overrideToken && (e.overrideToken = i.overrideToken);
|
|
3023
3045
|
}, t = (i) => {
|
|
3024
|
-
|
|
3046
|
+
Aa(ye, i), e.token = i;
|
|
3025
3047
|
}, o = () => {
|
|
3026
|
-
|
|
3027
|
-
}, l = () =>
|
|
3048
|
+
Fa(ye), e.token = null;
|
|
3049
|
+
}, l = () => Ea(ye), n = async (i) => {
|
|
3028
3050
|
const u = await re.post(e.endpoints.login, i), d = u.headers.authorization;
|
|
3029
3051
|
return t(d), e.user = u.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(u.data), u.data;
|
|
3030
3052
|
}, a = async () => {
|
|
@@ -3041,7 +3063,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3041
3063
|
} catch (i) {
|
|
3042
3064
|
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
|
|
3043
3065
|
} finally {
|
|
3044
|
-
o(), e.user = null,
|
|
3066
|
+
o(), e.user = null, za();
|
|
3045
3067
|
}
|
|
3046
3068
|
}, c = async () => {
|
|
3047
3069
|
const i = e.overrideToken || l();
|
|
@@ -3071,17 +3093,17 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3071
3093
|
clearTokenCookie: o,
|
|
3072
3094
|
getTokenCookie: l
|
|
3073
3095
|
};
|
|
3074
|
-
}),
|
|
3096
|
+
}), Da = { class: "h-full grid place-content-center relative" }, ja = { class: "absolute top-8 left-8" }, Na = ["src"], Ia = {
|
|
3075
3097
|
key: 1,
|
|
3076
3098
|
width: "59",
|
|
3077
3099
|
height: "23",
|
|
3078
3100
|
viewBox: "0 0 59 23",
|
|
3079
3101
|
fill: "none",
|
|
3080
3102
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3081
|
-
},
|
|
3103
|
+
}, Za = { class: "max-w-sm grid gap-y-1 -mt-8" }, qa = { class: "mb-7" }, Ua = { class: "text-gray-600" }, Ka = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Ga = {
|
|
3082
3104
|
key: 0,
|
|
3083
3105
|
class: "text-red-600 text-sm mb-2"
|
|
3084
|
-
},
|
|
3106
|
+
}, Wa = { key: 0 }, Ya = { key: 1 }, Xa = {
|
|
3085
3107
|
__name: "SparkLoginView",
|
|
3086
3108
|
props: {
|
|
3087
3109
|
logo: {
|
|
@@ -3098,7 +3120,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3098
3120
|
}
|
|
3099
3121
|
},
|
|
3100
3122
|
setup(e) {
|
|
3101
|
-
const s = J(), t = ne(), o = je(), l =
|
|
3123
|
+
const s = J(), t = ne(), o = je(), l = K(), n = e, a = E(!1), c = E(""), r = async (i) => {
|
|
3102
3124
|
a.value = !0, c.value = "";
|
|
3103
3125
|
try {
|
|
3104
3126
|
await l.login(i);
|
|
@@ -3118,37 +3140,37 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3118
3140
|
}
|
|
3119
3141
|
};
|
|
3120
3142
|
return (i, u) => {
|
|
3121
|
-
const d = A("FormKit"),
|
|
3122
|
-
return m(), g("div",
|
|
3123
|
-
|
|
3143
|
+
const d = A("FormKit"), p = A("router-link");
|
|
3144
|
+
return m(), g("div", Da, [
|
|
3145
|
+
f("div", ja, [
|
|
3124
3146
|
n.logo ? (m(), g("img", {
|
|
3125
3147
|
key: 0,
|
|
3126
3148
|
src: n.logo,
|
|
3127
3149
|
alt: "Logo",
|
|
3128
3150
|
class: "h-[23px] w-auto"
|
|
3129
|
-
}, null, 8,
|
|
3130
|
-
|
|
3151
|
+
}, null, 8, Na)) : (m(), g("svg", Ia, [...u[0] || (u[0] = [
|
|
3152
|
+
f("path", {
|
|
3131
3153
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3132
3154
|
fill: "#1C64F2"
|
|
3133
3155
|
}, null, -1),
|
|
3134
|
-
|
|
3156
|
+
f("path", {
|
|
3135
3157
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3136
3158
|
fill: "#1C64F2"
|
|
3137
3159
|
}, null, -1),
|
|
3138
|
-
|
|
3160
|
+
f("path", {
|
|
3139
3161
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3140
3162
|
fill: "#1C64F2"
|
|
3141
3163
|
}, null, -1),
|
|
3142
|
-
|
|
3164
|
+
f("path", {
|
|
3143
3165
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3144
3166
|
fill: "#1C64F2"
|
|
3145
3167
|
}, null, -1)
|
|
3146
3168
|
])]))
|
|
3147
3169
|
]),
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
u[1] || (u[1] =
|
|
3151
|
-
|
|
3170
|
+
f("div", Za, [
|
|
3171
|
+
f("div", qa, [
|
|
3172
|
+
u[1] || (u[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
3173
|
+
f("p", Ua, " Welcome back" + L(w(o).state.app ? ` to ${w(o).state.app}` : "") + "! Please enter your details. ", 1)
|
|
3152
3174
|
]),
|
|
3153
3175
|
b(d, {
|
|
3154
3176
|
type: "form",
|
|
@@ -3163,7 +3185,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3163
3185
|
type: "email",
|
|
3164
3186
|
validation: "required|email",
|
|
3165
3187
|
"outer-class": "max-w-full",
|
|
3166
|
-
value:
|
|
3188
|
+
value: w(l).state.devCredentials.username
|
|
3167
3189
|
}, null, 8, ["value"]),
|
|
3168
3190
|
b(d, {
|
|
3169
3191
|
label: "Password",
|
|
@@ -3172,11 +3194,11 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3172
3194
|
type: "password",
|
|
3173
3195
|
validation: "required",
|
|
3174
3196
|
"outer-class": "max-w-full",
|
|
3175
|
-
value:
|
|
3197
|
+
value: w(l).state.devCredentials.password
|
|
3176
3198
|
}, null, 8, ["value"]),
|
|
3177
|
-
|
|
3178
|
-
u[3] || (u[3] =
|
|
3179
|
-
b(
|
|
3199
|
+
f("div", Ka, [
|
|
3200
|
+
u[3] || (u[3] = f("span", null, null, -1)),
|
|
3201
|
+
b(p, {
|
|
3180
3202
|
to: n.forgotPasswordRoute,
|
|
3181
3203
|
class: "text-sm text-primary-600 font-semibold"
|
|
3182
3204
|
}, {
|
|
@@ -3186,15 +3208,15 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3186
3208
|
_: 1
|
|
3187
3209
|
}, 8, ["to"])
|
|
3188
3210
|
]),
|
|
3189
|
-
c.value ? (m(), g("div",
|
|
3190
|
-
b(
|
|
3211
|
+
c.value ? (m(), g("div", Ga, L(c.value), 1)) : T("", !0),
|
|
3212
|
+
b(w(G), {
|
|
3191
3213
|
type: "submit",
|
|
3192
3214
|
size: "xl",
|
|
3193
3215
|
disabled: a.value,
|
|
3194
3216
|
"button-class": "w-full mb-2"
|
|
3195
3217
|
}, {
|
|
3196
3218
|
default: C(() => [
|
|
3197
|
-
a.value ? (m(), g("span",
|
|
3219
|
+
a.value ? (m(), g("span", Ya, "Signing in...")) : (m(), g("span", Wa, "Sign in"))
|
|
3198
3220
|
]),
|
|
3199
3221
|
_: 1
|
|
3200
3222
|
}, 8, ["disabled"])
|
|
@@ -3205,7 +3227,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3205
3227
|
]);
|
|
3206
3228
|
};
|
|
3207
3229
|
}
|
|
3208
|
-
},
|
|
3230
|
+
}, Ja = {
|
|
3209
3231
|
__name: "SparkLogoutView",
|
|
3210
3232
|
props: {
|
|
3211
3233
|
defaultRedirect: {
|
|
@@ -3214,27 +3236,27 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3214
3236
|
}
|
|
3215
3237
|
},
|
|
3216
3238
|
setup(e) {
|
|
3217
|
-
const s = J(), t = ne(), o =
|
|
3239
|
+
const s = J(), t = ne(), o = K(), l = e;
|
|
3218
3240
|
return be(async () => {
|
|
3219
3241
|
await o.logout();
|
|
3220
3242
|
const n = t.query.redirect;
|
|
3221
3243
|
n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
|
|
3222
3244
|
}), (n, a) => null;
|
|
3223
3245
|
}
|
|
3224
|
-
},
|
|
3246
|
+
}, Qa = { class: "h-full grid place-content-center relative" }, er = { class: "absolute top-8 left-8" }, tr = ["src"], sr = {
|
|
3225
3247
|
key: 1,
|
|
3226
3248
|
width: "59",
|
|
3227
3249
|
height: "23",
|
|
3228
3250
|
viewBox: "0 0 59 23",
|
|
3229
3251
|
fill: "none",
|
|
3230
3252
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3231
|
-
},
|
|
3253
|
+
}, or = { class: "max-w-sm grid gap-y-1 -mt-8" }, ar = {
|
|
3232
3254
|
key: 0,
|
|
3233
3255
|
class: "text-red-600 text-sm mb-2"
|
|
3234
|
-
},
|
|
3256
|
+
}, rr = {
|
|
3235
3257
|
key: 1,
|
|
3236
3258
|
class: "text-green-600 text-sm mb-2"
|
|
3237
|
-
},
|
|
3259
|
+
}, nr = { key: 0 }, lr = { key: 1 }, ir = {
|
|
3238
3260
|
__name: "SparkForgotPasswordView",
|
|
3239
3261
|
props: {
|
|
3240
3262
|
logo: {
|
|
@@ -3247,7 +3269,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3247
3269
|
}
|
|
3248
3270
|
},
|
|
3249
3271
|
setup(e) {
|
|
3250
|
-
const s =
|
|
3272
|
+
const s = K(), t = e, o = E(!1), l = E(""), n = E(""), a = async ({ email: c }) => {
|
|
3251
3273
|
o.value = !0, l.value = "", n.value = "";
|
|
3252
3274
|
try {
|
|
3253
3275
|
await re.post(s.state.endpoints.passwordEmail, { email: c }), n.value = "Password reset link sent! Check your email.";
|
|
@@ -3259,36 +3281,36 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3259
3281
|
};
|
|
3260
3282
|
return (c, r) => {
|
|
3261
3283
|
const i = A("FormKit"), u = A("router-link");
|
|
3262
|
-
return m(), g("div",
|
|
3263
|
-
|
|
3284
|
+
return m(), g("div", Qa, [
|
|
3285
|
+
f("div", er, [
|
|
3264
3286
|
t.logo ? (m(), g("img", {
|
|
3265
3287
|
key: 0,
|
|
3266
3288
|
src: t.logo,
|
|
3267
3289
|
alt: "Logo",
|
|
3268
3290
|
class: "h-[23px] w-auto"
|
|
3269
|
-
}, null, 8,
|
|
3270
|
-
|
|
3291
|
+
}, null, 8, tr)) : (m(), g("svg", sr, [...r[0] || (r[0] = [
|
|
3292
|
+
f("path", {
|
|
3271
3293
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3272
3294
|
fill: "#1C64F2"
|
|
3273
3295
|
}, null, -1),
|
|
3274
|
-
|
|
3296
|
+
f("path", {
|
|
3275
3297
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3276
3298
|
fill: "#1C64F2"
|
|
3277
3299
|
}, null, -1),
|
|
3278
|
-
|
|
3300
|
+
f("path", {
|
|
3279
3301
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3280
3302
|
fill: "#1C64F2"
|
|
3281
3303
|
}, null, -1),
|
|
3282
|
-
|
|
3304
|
+
f("path", {
|
|
3283
3305
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3284
3306
|
fill: "#1C64F2"
|
|
3285
3307
|
}, null, -1)
|
|
3286
3308
|
])]))
|
|
3287
3309
|
]),
|
|
3288
|
-
|
|
3289
|
-
r[2] || (r[2] =
|
|
3290
|
-
|
|
3291
|
-
|
|
3310
|
+
f("div", or, [
|
|
3311
|
+
r[2] || (r[2] = f("div", { class: "mb-7" }, [
|
|
3312
|
+
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
3313
|
+
f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
3292
3314
|
], -1)),
|
|
3293
3315
|
b(i, {
|
|
3294
3316
|
type: "form",
|
|
@@ -3304,16 +3326,16 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3304
3326
|
validation: "required|email",
|
|
3305
3327
|
"outer-class": "max-w-full"
|
|
3306
3328
|
}),
|
|
3307
|
-
l.value ? (m(), g("div",
|
|
3308
|
-
n.value ? (m(), g("div",
|
|
3309
|
-
b(
|
|
3329
|
+
l.value ? (m(), g("div", ar, L(l.value), 1)) : T("", !0),
|
|
3330
|
+
n.value ? (m(), g("div", rr, L(n.value), 1)) : T("", !0),
|
|
3331
|
+
b(w(G), {
|
|
3310
3332
|
type: "submit",
|
|
3311
3333
|
size: "xl",
|
|
3312
3334
|
disabled: o.value,
|
|
3313
3335
|
"button-class": "w-full mb-2"
|
|
3314
3336
|
}, {
|
|
3315
3337
|
default: C(() => [
|
|
3316
|
-
o.value ? (m(), g("span",
|
|
3338
|
+
o.value ? (m(), g("span", lr, "Sending...")) : (m(), g("span", nr, "Send reset link"))
|
|
3317
3339
|
]),
|
|
3318
3340
|
_: 1
|
|
3319
3341
|
}, 8, ["disabled"]),
|
|
@@ -3333,17 +3355,17 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3333
3355
|
]);
|
|
3334
3356
|
};
|
|
3335
3357
|
}
|
|
3336
|
-
},
|
|
3358
|
+
}, cr = { class: "h-full grid place-content-center relative" }, ur = { class: "absolute top-8 left-8" }, dr = ["src"], pr = {
|
|
3337
3359
|
key: 1,
|
|
3338
3360
|
width: "59",
|
|
3339
3361
|
height: "23",
|
|
3340
3362
|
viewBox: "0 0 59 23",
|
|
3341
3363
|
fill: "none",
|
|
3342
3364
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3343
|
-
},
|
|
3365
|
+
}, fr = { class: "max-w-sm grid gap-y-1 -mt-8" }, mr = {
|
|
3344
3366
|
key: 0,
|
|
3345
3367
|
class: "text-red-600 text-sm mb-2"
|
|
3346
|
-
},
|
|
3368
|
+
}, hr = { key: 0 }, gr = { key: 1 }, yr = {
|
|
3347
3369
|
__name: "SparkResetPasswordView",
|
|
3348
3370
|
props: {
|
|
3349
3371
|
logo: {
|
|
@@ -3356,7 +3378,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3356
3378
|
}
|
|
3357
3379
|
},
|
|
3358
3380
|
setup(e) {
|
|
3359
|
-
const s = J(), t = ne(), o =
|
|
3381
|
+
const s = J(), t = ne(), o = K(), l = e, n = E(!1), a = E(""), c = async ({ password: r, password_confirmation: i }) => {
|
|
3360
3382
|
n.value = !0, a.value = "";
|
|
3361
3383
|
try {
|
|
3362
3384
|
await re.post(o.state.endpoints.passwordReset, {
|
|
@@ -3373,36 +3395,36 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3373
3395
|
};
|
|
3374
3396
|
return (r, i) => {
|
|
3375
3397
|
const u = A("FormKit");
|
|
3376
|
-
return m(), g("div",
|
|
3377
|
-
|
|
3398
|
+
return m(), g("div", cr, [
|
|
3399
|
+
f("div", ur, [
|
|
3378
3400
|
l.logo ? (m(), g("img", {
|
|
3379
3401
|
key: 0,
|
|
3380
3402
|
src: l.logo,
|
|
3381
3403
|
alt: "Logo",
|
|
3382
3404
|
class: "h-[23px] w-auto"
|
|
3383
|
-
}, null, 8,
|
|
3384
|
-
|
|
3405
|
+
}, null, 8, dr)) : (m(), g("svg", pr, [...i[0] || (i[0] = [
|
|
3406
|
+
f("path", {
|
|
3385
3407
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3386
3408
|
fill: "#1C64F2"
|
|
3387
3409
|
}, null, -1),
|
|
3388
|
-
|
|
3410
|
+
f("path", {
|
|
3389
3411
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3390
3412
|
fill: "#1C64F2"
|
|
3391
3413
|
}, null, -1),
|
|
3392
|
-
|
|
3414
|
+
f("path", {
|
|
3393
3415
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3394
3416
|
fill: "#1C64F2"
|
|
3395
3417
|
}, null, -1),
|
|
3396
|
-
|
|
3418
|
+
f("path", {
|
|
3397
3419
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3398
3420
|
fill: "#1C64F2"
|
|
3399
3421
|
}, null, -1)
|
|
3400
3422
|
])]))
|
|
3401
3423
|
]),
|
|
3402
|
-
|
|
3403
|
-
i[1] || (i[1] =
|
|
3404
|
-
|
|
3405
|
-
|
|
3424
|
+
f("div", fr, [
|
|
3425
|
+
i[1] || (i[1] = f("div", { class: "mb-7" }, [
|
|
3426
|
+
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
3427
|
+
f("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
3406
3428
|
], -1)),
|
|
3407
3429
|
b(u, {
|
|
3408
3430
|
type: "form",
|
|
@@ -3426,15 +3448,15 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3426
3448
|
validation: "required|confirm:password",
|
|
3427
3449
|
"outer-class": "max-w-full"
|
|
3428
3450
|
}),
|
|
3429
|
-
a.value ? (m(), g("div",
|
|
3430
|
-
b(
|
|
3451
|
+
a.value ? (m(), g("div", mr, L(a.value), 1)) : T("", !0),
|
|
3452
|
+
b(w(G), {
|
|
3431
3453
|
type: "submit",
|
|
3432
3454
|
size: "xl",
|
|
3433
3455
|
disabled: n.value,
|
|
3434
3456
|
"button-class": "w-full mb-2"
|
|
3435
3457
|
}, {
|
|
3436
3458
|
default: C(() => [
|
|
3437
|
-
n.value ? (m(), g("span",
|
|
3459
|
+
n.value ? (m(), g("span", gr, "Resetting...")) : (m(), g("span", hr, "Reset password"))
|
|
3438
3460
|
]),
|
|
3439
3461
|
_: 1
|
|
3440
3462
|
}, 8, ["disabled"])
|
|
@@ -3445,14 +3467,14 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3445
3467
|
]);
|
|
3446
3468
|
};
|
|
3447
3469
|
}
|
|
3448
|
-
},
|
|
3470
|
+
}, vr = { class: "h-full grid place-content-center relative" }, br = { class: "absolute top-8 left-8" }, xr = ["src"], kr = {
|
|
3449
3471
|
key: 1,
|
|
3450
3472
|
width: "59",
|
|
3451
3473
|
height: "23",
|
|
3452
3474
|
viewBox: "0 0 59 23",
|
|
3453
3475
|
fill: "none",
|
|
3454
3476
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3455
|
-
},
|
|
3477
|
+
}, wr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, _r = { class: "flex gap-4 justify-center" }, Sr = {
|
|
3456
3478
|
__name: "SparkError403View",
|
|
3457
3479
|
props: {
|
|
3458
3480
|
logo: {
|
|
@@ -3468,44 +3490,44 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3468
3490
|
const s = J(), t = e, o = () => {
|
|
3469
3491
|
s.push(t.homeRoute);
|
|
3470
3492
|
};
|
|
3471
|
-
return (l, n) => (m(), g("div",
|
|
3472
|
-
|
|
3493
|
+
return (l, n) => (m(), g("div", vr, [
|
|
3494
|
+
f("div", br, [
|
|
3473
3495
|
t.logo ? (m(), g("img", {
|
|
3474
3496
|
key: 0,
|
|
3475
3497
|
src: t.logo,
|
|
3476
3498
|
alt: "Logo",
|
|
3477
3499
|
class: "h-[23px] w-auto"
|
|
3478
|
-
}, null, 8,
|
|
3479
|
-
|
|
3500
|
+
}, null, 8, xr)) : (m(), g("svg", kr, [...n[0] || (n[0] = [
|
|
3501
|
+
f("path", {
|
|
3480
3502
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3481
3503
|
fill: "#1C64F2"
|
|
3482
3504
|
}, null, -1),
|
|
3483
|
-
|
|
3505
|
+
f("path", {
|
|
3484
3506
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3485
3507
|
fill: "#1C64F2"
|
|
3486
3508
|
}, null, -1),
|
|
3487
|
-
|
|
3509
|
+
f("path", {
|
|
3488
3510
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3489
3511
|
fill: "#1C64F2"
|
|
3490
3512
|
}, null, -1),
|
|
3491
|
-
|
|
3513
|
+
f("path", {
|
|
3492
3514
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3493
3515
|
fill: "#1C64F2"
|
|
3494
3516
|
}, null, -1)
|
|
3495
3517
|
])]))
|
|
3496
3518
|
]),
|
|
3497
|
-
|
|
3498
|
-
n[2] || (n[2] =
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3519
|
+
f("div", wr, [
|
|
3520
|
+
n[2] || (n[2] = f("div", null, [
|
|
3521
|
+
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
3522
|
+
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
3523
|
+
f("p", { class: "text-gray-600" }, [
|
|
3502
3524
|
B(" You don't have permission to access this resource."),
|
|
3503
|
-
|
|
3525
|
+
f("br"),
|
|
3504
3526
|
B(" If you believe this is an error, please contact your administrator. ")
|
|
3505
3527
|
])
|
|
3506
3528
|
], -1)),
|
|
3507
|
-
|
|
3508
|
-
b(
|
|
3529
|
+
f("div", _r, [
|
|
3530
|
+
b(w(G), {
|
|
3509
3531
|
onClick: o,
|
|
3510
3532
|
size: "lg"
|
|
3511
3533
|
}, {
|
|
@@ -3518,14 +3540,14 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3518
3540
|
])
|
|
3519
3541
|
]));
|
|
3520
3542
|
}
|
|
3521
|
-
},
|
|
3543
|
+
}, Cr = { class: "h-full grid place-content-center relative" }, $r = { class: "absolute top-8 left-8" }, Tr = ["src"], Lr = {
|
|
3522
3544
|
key: 1,
|
|
3523
3545
|
width: "59",
|
|
3524
3546
|
height: "23",
|
|
3525
3547
|
viewBox: "0 0 59 23",
|
|
3526
3548
|
fill: "none",
|
|
3527
3549
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3528
|
-
},
|
|
3550
|
+
}, Pr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Mr = { class: "flex gap-4 justify-center" }, Hr = {
|
|
3529
3551
|
__name: "SparkError404View",
|
|
3530
3552
|
props: {
|
|
3531
3553
|
logo: {
|
|
@@ -3541,40 +3563,40 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3541
3563
|
const s = J(), t = e, o = () => {
|
|
3542
3564
|
s.push(t.homeRoute);
|
|
3543
3565
|
};
|
|
3544
|
-
return (l, n) => (m(), g("div",
|
|
3545
|
-
|
|
3566
|
+
return (l, n) => (m(), g("div", Cr, [
|
|
3567
|
+
f("div", $r, [
|
|
3546
3568
|
t.logo ? (m(), g("img", {
|
|
3547
3569
|
key: 0,
|
|
3548
3570
|
src: t.logo,
|
|
3549
3571
|
alt: "Logo",
|
|
3550
3572
|
class: "h-[23px] w-auto"
|
|
3551
|
-
}, null, 8,
|
|
3552
|
-
|
|
3573
|
+
}, null, 8, Tr)) : (m(), g("svg", Lr, [...n[0] || (n[0] = [
|
|
3574
|
+
f("path", {
|
|
3553
3575
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3554
3576
|
fill: "#1C64F2"
|
|
3555
3577
|
}, null, -1),
|
|
3556
|
-
|
|
3578
|
+
f("path", {
|
|
3557
3579
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3558
3580
|
fill: "#1C64F2"
|
|
3559
3581
|
}, null, -1),
|
|
3560
|
-
|
|
3582
|
+
f("path", {
|
|
3561
3583
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3562
3584
|
fill: "#1C64F2"
|
|
3563
3585
|
}, null, -1),
|
|
3564
|
-
|
|
3586
|
+
f("path", {
|
|
3565
3587
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3566
3588
|
fill: "#1C64F2"
|
|
3567
3589
|
}, null, -1)
|
|
3568
3590
|
])]))
|
|
3569
3591
|
]),
|
|
3570
|
-
|
|
3571
|
-
n[2] || (n[2] =
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3592
|
+
f("div", Pr, [
|
|
3593
|
+
n[2] || (n[2] = f("div", null, [
|
|
3594
|
+
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
3595
|
+
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
3596
|
+
f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
3575
3597
|
], -1)),
|
|
3576
|
-
|
|
3577
|
-
b(
|
|
3598
|
+
f("div", Mr, [
|
|
3599
|
+
b(w(G), {
|
|
3578
3600
|
onClick: o,
|
|
3579
3601
|
size: "lg"
|
|
3580
3602
|
}, {
|
|
@@ -3587,14 +3609,14 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3587
3609
|
])
|
|
3588
3610
|
]));
|
|
3589
3611
|
}
|
|
3590
|
-
},
|
|
3612
|
+
}, Vr = { class: "h-full grid place-content-center relative" }, Rr = { class: "absolute top-8 left-8" }, Br = ["src"], Er = {
|
|
3591
3613
|
key: 1,
|
|
3592
3614
|
width: "59",
|
|
3593
3615
|
height: "23",
|
|
3594
3616
|
viewBox: "0 0 59 23",
|
|
3595
3617
|
fill: "none",
|
|
3596
3618
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3597
|
-
},
|
|
3619
|
+
}, Ar = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Fr = { class: "text-primary-600 text-7xl font-bold mb-4" }, Or = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, zr = { class: "text-gray-600" }, Dr = { class: "flex gap-4 justify-center" }, gn = {
|
|
3598
3620
|
__name: "SparkErrorGeneralView",
|
|
3599
3621
|
props: {
|
|
3600
3622
|
logo: {
|
|
@@ -3622,40 +3644,40 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3622
3644
|
const s = J(), t = e, o = () => {
|
|
3623
3645
|
s.push(t.homeRoute);
|
|
3624
3646
|
};
|
|
3625
|
-
return (l, n) => (m(), g("div",
|
|
3626
|
-
|
|
3647
|
+
return (l, n) => (m(), g("div", Vr, [
|
|
3648
|
+
f("div", Rr, [
|
|
3627
3649
|
t.logo ? (m(), g("img", {
|
|
3628
3650
|
key: 0,
|
|
3629
3651
|
src: t.logo,
|
|
3630
3652
|
alt: "Logo",
|
|
3631
3653
|
class: "h-[23px] w-auto"
|
|
3632
|
-
}, null, 8,
|
|
3633
|
-
|
|
3654
|
+
}, null, 8, Br)) : (m(), g("svg", Er, [...n[0] || (n[0] = [
|
|
3655
|
+
f("path", {
|
|
3634
3656
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3635
3657
|
fill: "#1C64F2"
|
|
3636
3658
|
}, null, -1),
|
|
3637
|
-
|
|
3659
|
+
f("path", {
|
|
3638
3660
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
3639
3661
|
fill: "#1C64F2"
|
|
3640
3662
|
}, null, -1),
|
|
3641
|
-
|
|
3663
|
+
f("path", {
|
|
3642
3664
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
3643
3665
|
fill: "#1C64F2"
|
|
3644
3666
|
}, null, -1),
|
|
3645
|
-
|
|
3667
|
+
f("path", {
|
|
3646
3668
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
3647
3669
|
fill: "#1C64F2"
|
|
3648
3670
|
}, null, -1)
|
|
3649
3671
|
])]))
|
|
3650
3672
|
]),
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3673
|
+
f("div", Ar, [
|
|
3674
|
+
f("div", null, [
|
|
3675
|
+
f("div", Fr, L(t.errorCode || "Error"), 1),
|
|
3676
|
+
f("h1", Or, L(t.title || "Something went wrong"), 1),
|
|
3677
|
+
f("p", zr, L(t.message || "An unexpected error occurred. Please try again later."), 1)
|
|
3656
3678
|
]),
|
|
3657
|
-
|
|
3658
|
-
b(
|
|
3679
|
+
f("div", Dr, [
|
|
3680
|
+
b(w(G), {
|
|
3659
3681
|
onClick: o,
|
|
3660
3682
|
size: "lg"
|
|
3661
3683
|
}, {
|
|
@@ -3669,7 +3691,7 @@ const ye = "bolt-next-token", U = ue("auth", () => {
|
|
|
3669
3691
|
]));
|
|
3670
3692
|
}
|
|
3671
3693
|
};
|
|
3672
|
-
function
|
|
3694
|
+
function yn(e = {}) {
|
|
3673
3695
|
const {
|
|
3674
3696
|
loginPath: s = "/login",
|
|
3675
3697
|
logoutPath: t = "/logout",
|
|
@@ -3682,41 +3704,41 @@ function hn(e = {}) {
|
|
|
3682
3704
|
{
|
|
3683
3705
|
path: s,
|
|
3684
3706
|
name: "login",
|
|
3685
|
-
component:
|
|
3707
|
+
component: Xa,
|
|
3686
3708
|
props: { logo: n, defaultRedirect: a },
|
|
3687
3709
|
meta: { auth: !1 }
|
|
3688
3710
|
},
|
|
3689
3711
|
{
|
|
3690
3712
|
path: t,
|
|
3691
3713
|
name: "logout",
|
|
3692
|
-
component:
|
|
3714
|
+
component: Ja,
|
|
3693
3715
|
props: { defaultRedirect: s },
|
|
3694
3716
|
meta: { auth: !1 }
|
|
3695
3717
|
},
|
|
3696
3718
|
{
|
|
3697
3719
|
path: o,
|
|
3698
3720
|
name: "forgot-password",
|
|
3699
|
-
component:
|
|
3721
|
+
component: ir,
|
|
3700
3722
|
props: { logo: n, loginRoute: s },
|
|
3701
3723
|
meta: { auth: !1 }
|
|
3702
3724
|
},
|
|
3703
3725
|
{
|
|
3704
3726
|
path: l,
|
|
3705
3727
|
name: "password-reset",
|
|
3706
|
-
component:
|
|
3728
|
+
component: yr,
|
|
3707
3729
|
props: { logo: n, loginRoute: s },
|
|
3708
3730
|
meta: { auth: !1 }
|
|
3709
3731
|
}
|
|
3710
3732
|
];
|
|
3711
3733
|
}
|
|
3712
|
-
function
|
|
3734
|
+
function vn(e, s = {}) {
|
|
3713
3735
|
const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
|
|
3714
3736
|
e.beforeEach(async (o, l, n) => {
|
|
3715
|
-
const a =
|
|
3716
|
-
a.state.ready || await a.fetchUser(),
|
|
3737
|
+
const a = K();
|
|
3738
|
+
a.state.ready || await a.fetchUser(), jr(o, n, a, t);
|
|
3717
3739
|
});
|
|
3718
3740
|
}
|
|
3719
|
-
function
|
|
3741
|
+
function jr(e, s, t, o) {
|
|
3720
3742
|
const l = e.meta.auth !== !1, n = t.check;
|
|
3721
3743
|
if (t.state.overrideToken && e.path === "/logout") {
|
|
3722
3744
|
s({ path: o });
|
|
@@ -3754,7 +3776,7 @@ function zr(e, s, t, o) {
|
|
|
3754
3776
|
s();
|
|
3755
3777
|
}
|
|
3756
3778
|
}
|
|
3757
|
-
function
|
|
3779
|
+
function bn(e = {}) {
|
|
3758
3780
|
const {
|
|
3759
3781
|
forbiddenPath: s = "/error/403",
|
|
3760
3782
|
logo: t = "",
|
|
@@ -3763,12 +3785,12 @@ function yn(e = {}) {
|
|
|
3763
3785
|
return {
|
|
3764
3786
|
path: s,
|
|
3765
3787
|
name: "error-403",
|
|
3766
|
-
component:
|
|
3788
|
+
component: Sr,
|
|
3767
3789
|
props: { logo: t, homeRoute: o },
|
|
3768
3790
|
meta: { auth: !1 }
|
|
3769
3791
|
};
|
|
3770
3792
|
}
|
|
3771
|
-
function
|
|
3793
|
+
function xn(e = {}) {
|
|
3772
3794
|
const {
|
|
3773
3795
|
logo: s = "",
|
|
3774
3796
|
homeRoute: t = "/dashboard"
|
|
@@ -3776,20 +3798,20 @@ function vn(e = {}) {
|
|
|
3776
3798
|
return {
|
|
3777
3799
|
path: "/:pathMatch(.*)*",
|
|
3778
3800
|
name: "error-404",
|
|
3779
|
-
component:
|
|
3801
|
+
component: Hr,
|
|
3780
3802
|
props: { logo: s, homeRoute: t },
|
|
3781
3803
|
meta: { auth: !1 }
|
|
3782
3804
|
};
|
|
3783
3805
|
}
|
|
3784
|
-
function
|
|
3806
|
+
function kn(e, s) {
|
|
3785
3807
|
e.beforeResolve(async (t) => {
|
|
3786
3808
|
if (t.meta.auth !== !1) {
|
|
3787
|
-
const o =
|
|
3809
|
+
const o = K();
|
|
3788
3810
|
o.state.ready && o.check && await s();
|
|
3789
3811
|
}
|
|
3790
3812
|
});
|
|
3791
3813
|
}
|
|
3792
|
-
function
|
|
3814
|
+
function Nr(e = {}) {
|
|
3793
3815
|
const s = re.create({
|
|
3794
3816
|
baseURL: e.baseURL || "",
|
|
3795
3817
|
timeout: e.timeout || 3e4,
|
|
@@ -3801,7 +3823,7 @@ function Dr(e = {}) {
|
|
|
3801
3823
|
return s.interceptors.request.use(
|
|
3802
3824
|
(t) => {
|
|
3803
3825
|
try {
|
|
3804
|
-
const o =
|
|
3826
|
+
const o = K();
|
|
3805
3827
|
o.state.overrideToken ? t.headers.Authorization = `Bearer ${o.state.overrideToken}` : o.state.token && (t.headers.Authorization = `Bearer ${o.state.token}`);
|
|
3806
3828
|
} catch {
|
|
3807
3829
|
}
|
|
@@ -3813,14 +3835,14 @@ function Dr(e = {}) {
|
|
|
3813
3835
|
async (t) => {
|
|
3814
3836
|
if (t.response?.status === 401)
|
|
3815
3837
|
try {
|
|
3816
|
-
const o =
|
|
3838
|
+
const o = K();
|
|
3817
3839
|
await o.logout(), window.location.href = o.state.routes.auth;
|
|
3818
3840
|
} catch (o) {
|
|
3819
3841
|
console.error("Error during auto-logout:", o), window.location.href = "/login";
|
|
3820
3842
|
}
|
|
3821
3843
|
if (t.response?.status === 403)
|
|
3822
3844
|
try {
|
|
3823
|
-
const o =
|
|
3845
|
+
const o = K();
|
|
3824
3846
|
window.location.href = o.state.routes.forbidden;
|
|
3825
3847
|
} catch (o) {
|
|
3826
3848
|
console.error("Error during 403 redirect:", o), window.location.href = "/error/403";
|
|
@@ -3830,15 +3852,15 @@ function Dr(e = {}) {
|
|
|
3830
3852
|
), s;
|
|
3831
3853
|
}
|
|
3832
3854
|
let ae = null;
|
|
3833
|
-
function
|
|
3834
|
-
return ae =
|
|
3855
|
+
function wn(e, s = {}) {
|
|
3856
|
+
return ae = Nr(s), e.provide("axios", ae), e.config.globalProperties.$axios = ae, ae;
|
|
3835
3857
|
}
|
|
3836
|
-
function
|
|
3858
|
+
function _n() {
|
|
3837
3859
|
if (!ae)
|
|
3838
3860
|
throw new Error("Axios instance not initialized. Call setupAxios() first.");
|
|
3839
3861
|
return ae;
|
|
3840
3862
|
}
|
|
3841
|
-
const
|
|
3863
|
+
const Sn = ue("sparkNav", () => {
|
|
3842
3864
|
const e = q({
|
|
3843
3865
|
menu: [],
|
|
3844
3866
|
collapsed: !1,
|
|
@@ -3849,8 +3871,8 @@ const _n = ue("sparkNav", () => {
|
|
|
3849
3871
|
for (const d of i) {
|
|
3850
3872
|
if (d.href === u) return d;
|
|
3851
3873
|
if (d.children) {
|
|
3852
|
-
const
|
|
3853
|
-
if (
|
|
3874
|
+
const p = l(d.children, u);
|
|
3875
|
+
if (p) return p;
|
|
3854
3876
|
}
|
|
3855
3877
|
}
|
|
3856
3878
|
return null;
|
|
@@ -3871,14 +3893,14 @@ const _n = ue("sparkNav", () => {
|
|
|
3871
3893
|
const i = t.name || t.path.replace("/", "");
|
|
3872
3894
|
if (i) {
|
|
3873
3895
|
const u = (d) => {
|
|
3874
|
-
d.forEach((
|
|
3875
|
-
|
|
3896
|
+
d.forEach((p) => {
|
|
3897
|
+
p.current = p.href === i, p.children && u(p.children);
|
|
3876
3898
|
});
|
|
3877
3899
|
};
|
|
3878
3900
|
u(e.menu);
|
|
3879
3901
|
}
|
|
3880
3902
|
};
|
|
3881
|
-
return
|
|
3903
|
+
return N(
|
|
3882
3904
|
() => t.path,
|
|
3883
3905
|
() => {
|
|
3884
3906
|
r();
|
|
@@ -3894,64 +3916,64 @@ const _n = ue("sparkNav", () => {
|
|
|
3894
3916
|
};
|
|
3895
3917
|
});
|
|
3896
3918
|
export {
|
|
3897
|
-
|
|
3919
|
+
F as Icons,
|
|
3898
3920
|
se as SparkAlert,
|
|
3899
3921
|
vs as SparkAppSelector,
|
|
3900
3922
|
js as SparkBrandSelector,
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3923
|
+
G as SparkButton,
|
|
3924
|
+
Is as SparkButtonGroup,
|
|
3925
|
+
dn as SparkCard,
|
|
3926
|
+
fn as SparkDefaultContainer,
|
|
3927
|
+
Sr as SparkError403View,
|
|
3928
|
+
Hr as SparkError404View,
|
|
3929
|
+
gn as SparkErrorGeneralView,
|
|
3930
|
+
ir as SparkForgotPasswordView,
|
|
3931
|
+
Xa as SparkLoginView,
|
|
3932
|
+
Ja as SparkLogoutView,
|
|
3911
3933
|
Qs as SparkModalContainer,
|
|
3912
3934
|
Ws as SparkModalDialog,
|
|
3913
|
-
|
|
3935
|
+
cn as SparkNotificationOutlet,
|
|
3914
3936
|
Se as SparkOverlay,
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3937
|
+
mn as SparkPublicContainer,
|
|
3938
|
+
yr as SparkResetPasswordView,
|
|
3939
|
+
pn as SparkTable,
|
|
3940
|
+
oa as SparkTableDatePicker,
|
|
3941
|
+
ea as SparkTableFilterButtons,
|
|
3942
|
+
Yo as SparkTableFilterSelect,
|
|
3943
|
+
jo as SparkTablePaginationPaging,
|
|
3944
|
+
Zo as SparkTablePaginationPerPage,
|
|
3945
|
+
la as SparkTableReset,
|
|
3946
|
+
Ko as SparkTableSearch,
|
|
3925
3947
|
Pe as SparkTableToolbar,
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3948
|
+
un as SparkToastContainer,
|
|
3949
|
+
nn as addIcons,
|
|
3950
|
+
bn as create403Route,
|
|
3951
|
+
xn as create404Route,
|
|
3952
|
+
yn as createAuthRoutes,
|
|
3953
|
+
Nr as createAxiosInstance,
|
|
3954
|
+
hn as createBootstrapService,
|
|
3933
3955
|
ro as customiseHeader,
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3956
|
+
Fa as deleteCookie,
|
|
3957
|
+
_o as formatTemporal,
|
|
3958
|
+
_n as getAxiosInstance,
|
|
3959
|
+
Ea as getCookie,
|
|
3938
3960
|
Ze as getDomain,
|
|
3939
|
-
|
|
3961
|
+
So as parseDatetime,
|
|
3940
3962
|
to as renderHeaderTitle,
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3963
|
+
Aa as setCookie,
|
|
3964
|
+
vn as setupAuthGuards,
|
|
3965
|
+
wn as setupAxios,
|
|
3966
|
+
kn as setupBootstrapGuard,
|
|
3967
|
+
ln as setupFontAwesome,
|
|
3946
3968
|
oe as sparkModalService,
|
|
3947
3969
|
X as sparkNotificationService,
|
|
3948
3970
|
te as sparkOverlayService,
|
|
3949
|
-
|
|
3971
|
+
Lo as updateRow,
|
|
3950
3972
|
De as useSparkAppSelectorStore,
|
|
3951
3973
|
je as useSparkAppStore,
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3974
|
+
K as useSparkAuthStore,
|
|
3975
|
+
Ie as useSparkBrandFilterStore,
|
|
3976
|
+
Sn as useSparkNavStore,
|
|
3955
3977
|
He as useSparkOverlay,
|
|
3956
|
-
|
|
3978
|
+
Po as useSparkTableRouteSync
|
|
3957
3979
|
};
|