@wishbone-media/spark 0.27.0 → 0.29.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,28 +1,28 @@
|
|
|
1
|
-
import { computed as $, resolveComponent as
|
|
2
|
-
import { icon as
|
|
1
|
+
import { computed as $, resolveComponent as F, createElementBlock as g, openBlock as m, normalizeClass as V, createElementVNode as f, createCommentVNode as T, createVNode as k, unref as S, renderSlot as B, reactive as K, Fragment as E, renderList as I, toDisplayString as M, createBlock as H, resolveDynamicComponent as Z, markRaw as me, ref as R, watch as z, onMounted as he, Transition as dt, withCtx as P, normalizeProps as pt, mergeProps as q, createTextVNode as A, Teleport as ft, TransitionGroup as ie, inject as Se, provide as mt, withModifiers as U, toHandlers as Ae, useSlots as Be, onUnmounted as ht, withDirectives as gt, vShow as yt, h as Ce } from "vue";
|
|
2
|
+
import { icon as ee, library as De } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as vt } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faCircleDot as
|
|
4
|
+
import { faCircleDot as je, faEyeDropper as ze, faAnglesLeft as Ie, faAnglesRight as Ne, faStar as Ze, faSpinnerThird as qe, faCircle as bt, faFile as xe, faCalendar as Ue, faArrowUp as Ke, faArrowDown as Ge, faPlus as We, faInbox as xt, faCloudDownload as kt, faBolt as wt, faUndo as _t, faEye as St, faSignOut as Ct, faXmark as ke, faTrash as Ye, faTimes as $t, faStreetView as Tt, faSortUp as Pt, faSortDown as Lt, faSort as Mt, faScaleBalanced as Vt, faSatelliteDish as Ht, faLayerPlus as Rt, faLaptopMobile as Ft, faInfoCircle as Et, faGripDotsVertical as Xe, faGearComplex as Ot, faFlag as At, faFaceSmileWink as Bt, faFaceSmileRelaxed as Dt, faExclamationTriangle as jt, faEllipsisVertical as zt, faEllipsis as It, faEdit as Nt, faComments as Zt, faCircleXmark as qt, faCircleUser as Ut, faChevronUp as Kt, faChevronRight as Je, faChevronLeft as Qe, faChevronDown as et, faCheckCircle as Gt, faCheck as we, faBullhorn as Wt, faBellRing as Yt, faBarsSort as Xt, faArrowRightToLine as Jt, faArrowLeftToLine as Qt } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { faSortUp as es, faSortDown as ts, faSort as ss } from "@fortawesome/pro-duotone-svg-icons";
|
|
6
6
|
import { defineStore as ue } from "pinia";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import { useRoute as te, useRouter as Y } from "vue-router";
|
|
8
|
+
import { TransitionRoot as tt, Dialog as st, TransitionChild as fe, DialogPanel as at } from "@headlessui/vue";
|
|
9
|
+
import ge from "nprogress";
|
|
10
|
+
import { range as as, get as Q, find as os, has as rs } from "lodash";
|
|
10
11
|
import { HotTable as ns } from "@handsontable/vue3";
|
|
11
12
|
import "handsontable/styles/handsontable.css";
|
|
12
13
|
import "handsontable/styles/ht-theme-classic.css";
|
|
13
14
|
import { registerPlugin as pe, AutoColumnSize as ls, CopyPaste as is, StretchColumns as cs, NestedHeaders as us } from "handsontable/plugins";
|
|
14
15
|
import { registerAllCellTypes as ds } from "handsontable/cellTypes";
|
|
15
|
-
import { useDebounceFn as
|
|
16
|
+
import { useDebounceFn as ot, watchDebounced as $e } from "@vueuse/core";
|
|
16
17
|
import { registerRenderer as ps, baseRenderer as fs } from "handsontable/renderers";
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
const A = {
|
|
18
|
+
import le from "axios";
|
|
19
|
+
const O = {
|
|
20
20
|
farArrowLeftToLine: Qt,
|
|
21
21
|
farArrowRightToLine: Jt,
|
|
22
22
|
farBarsSort: Xt,
|
|
23
23
|
farBellRing: Yt,
|
|
24
24
|
farBullhorn: Wt,
|
|
25
|
-
farCheck:
|
|
25
|
+
farCheck: we,
|
|
26
26
|
farCheckCircle: Gt,
|
|
27
27
|
farChevronDown: et,
|
|
28
28
|
farChevronLeft: Qe,
|
|
@@ -33,25 +33,25 @@ const A = {
|
|
|
33
33
|
farComments: Zt,
|
|
34
34
|
farEdit: Nt,
|
|
35
35
|
farEllipsis: It,
|
|
36
|
-
farEllipsisVertical:
|
|
37
|
-
farExclamationTriangle:
|
|
36
|
+
farEllipsisVertical: zt,
|
|
37
|
+
farExclamationTriangle: jt,
|
|
38
38
|
farFaceSmileRelaxed: Dt,
|
|
39
39
|
farFaceSmileWink: Bt,
|
|
40
|
-
farFlag:
|
|
41
|
-
farGearComplex:
|
|
40
|
+
farFlag: At,
|
|
41
|
+
farGearComplex: Ot,
|
|
42
42
|
farGripDotsVertical: Xe,
|
|
43
|
-
farInfoCircle:
|
|
44
|
-
farLaptopMobile:
|
|
43
|
+
farInfoCircle: Et,
|
|
44
|
+
farLaptopMobile: Ft,
|
|
45
45
|
farLayerPlus: Rt,
|
|
46
|
-
farSatelliteDish:
|
|
47
|
-
farScaleBalanced:
|
|
46
|
+
farSatelliteDish: Ht,
|
|
47
|
+
farScaleBalanced: Vt,
|
|
48
48
|
farSort: Mt,
|
|
49
49
|
farSortDown: Lt,
|
|
50
50
|
farSortUp: Pt,
|
|
51
51
|
farStreetView: Tt,
|
|
52
52
|
farTimes: $t,
|
|
53
53
|
farTrash: Ye,
|
|
54
|
-
farXmark:
|
|
54
|
+
farXmark: ke,
|
|
55
55
|
farSignOut: Ct,
|
|
56
56
|
farEye: St,
|
|
57
57
|
farUndo: _t,
|
|
@@ -66,32 +66,32 @@ const A = {
|
|
|
66
66
|
farArrowDown: Ge,
|
|
67
67
|
farArrowUp: Ke,
|
|
68
68
|
farCalendar: Ue,
|
|
69
|
-
farFile:
|
|
69
|
+
farFile: xe,
|
|
70
70
|
farCircle: bt,
|
|
71
71
|
farSpinner: qe,
|
|
72
72
|
farStar: Ze,
|
|
73
73
|
farAnglesRight: Ne,
|
|
74
74
|
farAnglesLeft: Ie,
|
|
75
|
-
farEyeDropper:
|
|
76
|
-
farCircleDot:
|
|
77
|
-
},
|
|
78
|
-
Object.entries(
|
|
79
|
-
const t =
|
|
75
|
+
farEyeDropper: ze,
|
|
76
|
+
farCircleDot: je
|
|
77
|
+
}, On = Object.fromEntries(
|
|
78
|
+
Object.entries(O).map(([e, s]) => {
|
|
79
|
+
const t = ee(s);
|
|
80
80
|
return [e, t?.html?.[0] || ""];
|
|
81
81
|
})
|
|
82
82
|
), ms = {
|
|
83
83
|
add: We,
|
|
84
84
|
arrowDown: Ge,
|
|
85
85
|
arrowUp: Ke,
|
|
86
|
-
check:
|
|
87
|
-
close:
|
|
88
|
-
checkboxDecorator:
|
|
86
|
+
check: we,
|
|
87
|
+
close: ke,
|
|
88
|
+
checkboxDecorator: we,
|
|
89
89
|
date: Ue,
|
|
90
90
|
dragHandle: Xe,
|
|
91
|
-
fileItem:
|
|
92
|
-
fileRemove:
|
|
93
|
-
noFiles:
|
|
94
|
-
radioDecorator:
|
|
91
|
+
fileItem: xe,
|
|
92
|
+
fileRemove: ke,
|
|
93
|
+
noFiles: xe,
|
|
94
|
+
radioDecorator: je,
|
|
95
95
|
// Circle with dot for radio indicator
|
|
96
96
|
select: et,
|
|
97
97
|
spinner: qe,
|
|
@@ -101,26 +101,26 @@ const A = {
|
|
|
101
101
|
right: Je,
|
|
102
102
|
left: Qe,
|
|
103
103
|
rewind: Ie,
|
|
104
|
-
color:
|
|
105
|
-
},
|
|
104
|
+
color: ze
|
|
105
|
+
}, An = Object.fromEntries(
|
|
106
106
|
Object.entries(ms).map(([e, s]) => {
|
|
107
|
-
const t =
|
|
107
|
+
const t = ee(s);
|
|
108
108
|
return [e, t?.html?.[0] || ""];
|
|
109
109
|
})
|
|
110
110
|
);
|
|
111
|
-
function
|
|
112
|
-
const s =
|
|
111
|
+
function Bn(e) {
|
|
112
|
+
const s = O[e];
|
|
113
113
|
if (s) {
|
|
114
|
-
const t =
|
|
114
|
+
const t = ee(s);
|
|
115
115
|
return Promise.resolve(t?.html?.[0] || void 0);
|
|
116
116
|
}
|
|
117
117
|
return Promise.resolve(void 0);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
Object.assign(
|
|
119
|
+
function Dn(e) {
|
|
120
|
+
Object.assign(O, e), De.add(...Object.values(e));
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
De.add(...Object.values(
|
|
122
|
+
function jn(e) {
|
|
123
|
+
De.add(...Object.values(O)), e.component("FontAwesomeIcon", vt);
|
|
124
124
|
}
|
|
125
125
|
const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }, ys = { class: "ml-3" }, vs = {
|
|
126
126
|
key: 0,
|
|
@@ -145,7 +145,7 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
145
145
|
warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
|
|
146
146
|
danger: "bg-red-50 border-red-200 text-red-700",
|
|
147
147
|
info: "bg-blue-50 border-blue-200 text-blue-700"
|
|
148
|
-
})[s.type]),
|
|
148
|
+
})[s.type]), a = $(() => ({
|
|
149
149
|
success: "text-green-400",
|
|
150
150
|
warning: "text-yellow-400",
|
|
151
151
|
danger: "text-red-400",
|
|
@@ -161,39 +161,39 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
161
161
|
danger: "text-red-400 hover:bg-red-100",
|
|
162
162
|
info: "text-blue-400 hover:bg-blue-100"
|
|
163
163
|
})[s.type]);
|
|
164
|
-
return (
|
|
165
|
-
const r =
|
|
166
|
-
return m(),
|
|
167
|
-
class:
|
|
164
|
+
return (o, c) => {
|
|
165
|
+
const r = F("font-awesome-icon");
|
|
166
|
+
return m(), g("div", {
|
|
167
|
+
class: V(["rounded-md border p-4", t.value])
|
|
168
168
|
}, [
|
|
169
169
|
f("div", hs, [
|
|
170
170
|
f("div", gs, [
|
|
171
|
-
|
|
172
|
-
icon:
|
|
173
|
-
class:
|
|
171
|
+
k(r, {
|
|
172
|
+
icon: S(O)[l.value],
|
|
173
|
+
class: V(a.value)
|
|
174
174
|
}, null, 8, ["icon", "class"])
|
|
175
175
|
]),
|
|
176
176
|
f("div", ys, [
|
|
177
|
-
B(
|
|
177
|
+
B(o.$slots, "default")
|
|
178
178
|
]),
|
|
179
|
-
e.closeable ? (m(),
|
|
179
|
+
e.closeable ? (m(), g("div", vs, [
|
|
180
180
|
f("div", bs, [
|
|
181
181
|
f("button", {
|
|
182
182
|
type: "button",
|
|
183
|
-
class:
|
|
184
|
-
onClick: c[0] || (c[0] = (i) =>
|
|
183
|
+
class: V(["inline-flex rounded-md px-2 py-1.5", n.value]),
|
|
184
|
+
onClick: c[0] || (c[0] = (i) => o.$emit("close"))
|
|
185
185
|
}, [
|
|
186
|
-
|
|
187
|
-
icon:
|
|
186
|
+
k(r, {
|
|
187
|
+
icon: S(O).farXmark
|
|
188
188
|
}, null, 8, ["icon"])
|
|
189
189
|
], 2)
|
|
190
190
|
])
|
|
191
|
-
])) :
|
|
191
|
+
])) : T("", !0)
|
|
192
192
|
])
|
|
193
193
|
], 2);
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
},
|
|
196
|
+
}, ye = [
|
|
197
197
|
{
|
|
198
198
|
name: "Bolt",
|
|
199
199
|
description: "Job management",
|
|
@@ -243,15 +243,15 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
243
243
|
icon: "farCompass"
|
|
244
244
|
}
|
|
245
245
|
], rt = ue("sparkAppSelector", () => {
|
|
246
|
-
const e =
|
|
247
|
-
apps: [...
|
|
246
|
+
const e = K({
|
|
247
|
+
apps: [...ye]
|
|
248
248
|
}), s = (n = {}) => {
|
|
249
249
|
if (n.apps && Array.isArray(n.apps)) {
|
|
250
|
-
const
|
|
250
|
+
const o = n.apps.filter((c) => {
|
|
251
251
|
const r = c.name && c.description && c.icon && c.href;
|
|
252
252
|
return r || console.warn("useSparkAppSelectorStore: Invalid app object", c), r;
|
|
253
253
|
});
|
|
254
|
-
e.apps =
|
|
254
|
+
e.apps = o.map((c) => ({
|
|
255
255
|
name: c.name,
|
|
256
256
|
description: c.description,
|
|
257
257
|
icon: c.icon,
|
|
@@ -260,11 +260,11 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
262
|
if (n.appHrefs && typeof n.appHrefs == "object") {
|
|
263
|
-
const
|
|
263
|
+
const o = /* @__PURE__ */ new Map();
|
|
264
264
|
Object.keys(n.appHrefs).forEach((c) => {
|
|
265
|
-
|
|
266
|
-
}), e.apps =
|
|
267
|
-
const r =
|
|
265
|
+
o.set(c.toLowerCase(), n.appHrefs[c]);
|
|
266
|
+
}), e.apps = ye.map((c) => {
|
|
267
|
+
const r = o.get(c.name.toLowerCase());
|
|
268
268
|
return {
|
|
269
269
|
...c,
|
|
270
270
|
href: r || c.href
|
|
@@ -272,24 +272,24 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
272
272
|
});
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
e.apps = [...
|
|
276
|
-
}, t = $(() => e.apps),
|
|
275
|
+
e.apps = [...ye];
|
|
276
|
+
}, t = $(() => e.apps), a = (n) => {
|
|
277
277
|
if (!n) return null;
|
|
278
|
-
const
|
|
279
|
-
return e.apps.find((c) => c.name.toLowerCase() ===
|
|
278
|
+
const o = n.toLowerCase();
|
|
279
|
+
return e.apps.find((c) => c.name.toLowerCase() === o) || null;
|
|
280
280
|
};
|
|
281
281
|
return {
|
|
282
282
|
state: e,
|
|
283
283
|
initialize: s,
|
|
284
284
|
allApps: t,
|
|
285
|
-
getAppByName:
|
|
285
|
+
getAppByName: a,
|
|
286
286
|
getAppIcon: (n) => {
|
|
287
|
-
const
|
|
288
|
-
return
|
|
287
|
+
const o = a(n);
|
|
288
|
+
return o ? o.icon : "";
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
}), nt = ue("sparkApp", () => {
|
|
292
|
-
const e =
|
|
292
|
+
const e = K({
|
|
293
293
|
app: "",
|
|
294
294
|
homeRoute: "dashboard",
|
|
295
295
|
showBrandSelector: !0,
|
|
@@ -304,13 +304,13 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
304
304
|
}), xs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ks = { class: "flex flex-1 flex-col" }, ws = { class: "divide-y divide-gray-200" }, _s = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ss = { class: "ml-auto flex items-center" }, Cs = ["href", "onClick"], $s = { class: "gap-y-1" }, Ts = { class: "text-base text-gray-800 flex items-center" }, Ps = { class: "font-medium" }, Ls = {
|
|
305
305
|
key: 0,
|
|
306
306
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
|
|
307
|
-
}, Ms = { class: "text-sm text-gray-500" },
|
|
307
|
+
}, Ms = { class: "text-sm text-gray-500" }, Vs = { class: "ml-auto flex items-center" }, Hs = { class: "mt-auto" }, Rs = {
|
|
308
308
|
key: 0,
|
|
309
309
|
class: "p-6"
|
|
310
|
-
},
|
|
310
|
+
}, Fs = {
|
|
311
311
|
key: 1,
|
|
312
312
|
class: "bg-gray-50 p-6"
|
|
313
|
-
},
|
|
313
|
+
}, Es = {
|
|
314
314
|
__name: "SparkAppSelector",
|
|
315
315
|
props: {
|
|
316
316
|
bottomSlot: {
|
|
@@ -324,64 +324,64 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
324
324
|
},
|
|
325
325
|
emits: ["close", "select"],
|
|
326
326
|
setup(e, { emit: s }) {
|
|
327
|
-
const t = s,
|
|
327
|
+
const t = s, a = rt(), l = nt(), n = $(() => {
|
|
328
328
|
const c = l.state.app;
|
|
329
|
-
return
|
|
329
|
+
return a.state.apps.map((r) => ({
|
|
330
330
|
...r,
|
|
331
331
|
current: c && r.name.toLowerCase() === c.toLowerCase()
|
|
332
332
|
}));
|
|
333
|
-
}),
|
|
333
|
+
}), o = (c, r) => {
|
|
334
334
|
t("select", c);
|
|
335
335
|
};
|
|
336
336
|
return (c, r) => {
|
|
337
|
-
const i =
|
|
338
|
-
return m(),
|
|
337
|
+
const i = F("font-awesome-icon");
|
|
338
|
+
return m(), g("div", xs, [
|
|
339
339
|
f("div", ks, [
|
|
340
340
|
f("div", ws, [
|
|
341
341
|
f("div", _s, [
|
|
342
342
|
r[1] || (r[1] = f("div", null, "Mr Group Network", -1)),
|
|
343
343
|
f("div", Ss, [
|
|
344
|
-
|
|
345
|
-
icon:
|
|
344
|
+
k(i, {
|
|
345
|
+
icon: S(O).farTimes,
|
|
346
346
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
347
347
|
onClick: r[0] || (r[0] = (u) => t("close"))
|
|
348
348
|
}, null, 8, ["icon"])
|
|
349
349
|
])
|
|
350
350
|
]),
|
|
351
|
-
(m(!0),
|
|
351
|
+
(m(!0), g(E, null, I(n.value, (u) => (m(), g("a", {
|
|
352
352
|
key: u.name,
|
|
353
353
|
href: u.href,
|
|
354
354
|
target: "_blank",
|
|
355
|
-
class:
|
|
356
|
-
onClick: (d) => u.current ? d.preventDefault() :
|
|
355
|
+
class: V([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
356
|
+
onClick: (d) => u.current ? d.preventDefault() : o(u)
|
|
357
357
|
}, [
|
|
358
358
|
f("div", $s, [
|
|
359
359
|
f("div", Ts, [
|
|
360
360
|
f("div", Ps, M(u.name), 1),
|
|
361
|
-
u.current ? (m(),
|
|
361
|
+
u.current ? (m(), g("span", Ls, " Active ")) : T("", !0)
|
|
362
362
|
]),
|
|
363
363
|
f("div", Ms, M(u.description), 1)
|
|
364
364
|
]),
|
|
365
|
-
f("div",
|
|
366
|
-
|
|
367
|
-
class:
|
|
368
|
-
icon:
|
|
365
|
+
f("div", Vs, [
|
|
366
|
+
k(i, {
|
|
367
|
+
class: V([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
368
|
+
icon: S(O)[u.icon]
|
|
369
369
|
}, null, 8, ["class", "icon"])
|
|
370
370
|
])
|
|
371
371
|
], 10, Cs))), 128)),
|
|
372
372
|
r[2] || (r[2] = f("div", null, null, -1))
|
|
373
373
|
]),
|
|
374
|
-
f("div",
|
|
375
|
-
c.$slots.bottom || e.bottomSlot ? (m(),
|
|
374
|
+
f("div", Hs, [
|
|
375
|
+
c.$slots.bottom || e.bottomSlot ? (m(), g("div", Rs, [
|
|
376
376
|
B(c.$slots, "bottom", {}, () => [
|
|
377
|
-
e.bottomSlot ? (m(),
|
|
377
|
+
e.bottomSlot ? (m(), H(Z(e.bottomSlot), { key: 0 })) : T("", !0)
|
|
378
378
|
])
|
|
379
|
-
])) :
|
|
380
|
-
c.$slots.footer || e.footerSlot ? (m(),
|
|
379
|
+
])) : T("", !0),
|
|
380
|
+
c.$slots.footer || e.footerSlot ? (m(), g("div", Fs, [
|
|
381
381
|
B(c.$slots, "footer", {}, () => [
|
|
382
|
-
e.footerSlot ? (m(),
|
|
382
|
+
e.footerSlot ? (m(), H(Z(e.footerSlot), { key: 0 })) : T("", !0)
|
|
383
383
|
])
|
|
384
|
-
])) :
|
|
384
|
+
])) : T("", !0)
|
|
385
385
|
])
|
|
386
386
|
])
|
|
387
387
|
]);
|
|
@@ -393,25 +393,27 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
|
|
|
393
393
|
warning: 5e3,
|
|
394
394
|
danger: 0
|
|
395
395
|
// sticky by default
|
|
396
|
-
},
|
|
397
|
-
function
|
|
398
|
-
const e =
|
|
396
|
+
}, Te = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
|
|
397
|
+
function Os() {
|
|
398
|
+
const e = K({
|
|
399
399
|
isVisible: !1,
|
|
400
400
|
type: "info",
|
|
401
401
|
message: null,
|
|
402
402
|
component: null,
|
|
403
403
|
props: {},
|
|
404
404
|
closeable: !0,
|
|
405
|
-
duration: null
|
|
405
|
+
duration: null,
|
|
406
|
+
persistent: !1,
|
|
407
|
+
shownOnPath: null
|
|
406
408
|
});
|
|
407
|
-
let s = null, t = 0,
|
|
409
|
+
let s = null, t = 0, a = !1, l = null;
|
|
408
410
|
const n = () => {
|
|
409
|
-
s && (clearTimeout(s), s = null), t = 0,
|
|
410
|
-
},
|
|
411
|
+
s && (clearTimeout(s), s = null), t = 0, a = !1, l = null;
|
|
412
|
+
}, o = () => {
|
|
411
413
|
n(), e.isVisible = !1;
|
|
412
414
|
}, c = (p) => {
|
|
413
415
|
p <= 0 || (t = p, l = Date.now(), s = setTimeout(() => {
|
|
414
|
-
|
|
416
|
+
o();
|
|
415
417
|
}, p));
|
|
416
418
|
};
|
|
417
419
|
return {
|
|
@@ -419,37 +421,38 @@ function Fs() {
|
|
|
419
421
|
show: (p = {}) => {
|
|
420
422
|
n();
|
|
421
423
|
const {
|
|
422
|
-
type:
|
|
423
|
-
message:
|
|
424
|
-
component:
|
|
425
|
-
props:
|
|
424
|
+
type: b = "info",
|
|
425
|
+
message: v = null,
|
|
426
|
+
component: x = null,
|
|
427
|
+
props: h = {},
|
|
426
428
|
closeable: w = !0,
|
|
427
|
-
duration:
|
|
429
|
+
duration: C = null,
|
|
430
|
+
persistent: y = !1
|
|
428
431
|
} = p;
|
|
429
|
-
e.type =
|
|
430
|
-
const
|
|
431
|
-
e.duration =
|
|
432
|
+
e.type = b, e.message = v, e.component = x ? me(x) : null, e.props = h, e.closeable = w, e.persistent = y, e.isVisible = !0;
|
|
433
|
+
const _ = C !== null ? C : lt[b];
|
|
434
|
+
e.duration = _, _ > 0 && c(_);
|
|
432
435
|
},
|
|
433
|
-
hide:
|
|
436
|
+
hide: o,
|
|
434
437
|
reset: () => {
|
|
435
|
-
|
|
438
|
+
o(), e.type = "info", e.message = null, e.component = null, e.props = {}, e.closeable = !0, e.duration = null, e.persistent = !1, e.shownOnPath = null;
|
|
436
439
|
},
|
|
437
440
|
pause: () => {
|
|
438
|
-
if (!s ||
|
|
441
|
+
if (!s || a) return;
|
|
439
442
|
clearTimeout(s), s = null;
|
|
440
443
|
const p = Date.now() - l;
|
|
441
|
-
t = Math.max(0, t - p),
|
|
444
|
+
t = Math.max(0, t - p), a = !0;
|
|
442
445
|
},
|
|
443
446
|
resume: () => {
|
|
444
|
-
!
|
|
445
|
-
|
|
447
|
+
!a || t <= 0 || (a = !1, l = Date.now(), s = setTimeout(() => {
|
|
448
|
+
o();
|
|
446
449
|
}, t));
|
|
447
450
|
}
|
|
448
451
|
};
|
|
449
452
|
}
|
|
450
|
-
class
|
|
453
|
+
class As {
|
|
451
454
|
constructor() {
|
|
452
|
-
this.outlets = /* @__PURE__ */ new Map(), this.toastState =
|
|
455
|
+
this.outlets = /* @__PURE__ */ new Map(), this.toastState = K({
|
|
453
456
|
toasts: [],
|
|
454
457
|
maxToasts: 3,
|
|
455
458
|
defaultPosition: "bottom-right",
|
|
@@ -465,7 +468,7 @@ class Os {
|
|
|
465
468
|
* @returns {Object} Notification outlet instance
|
|
466
469
|
*/
|
|
467
470
|
getOutlet(s = "default") {
|
|
468
|
-
return this.outlets.has(s) || this.outlets.set(s,
|
|
471
|
+
return this.outlets.has(s) || this.outlets.set(s, Os()), this.outlets.get(s);
|
|
469
472
|
}
|
|
470
473
|
/**
|
|
471
474
|
* Show a banner notification in the specified outlet
|
|
@@ -476,6 +479,7 @@ class Os {
|
|
|
476
479
|
* @param {Object} options.props - Props to pass to the component
|
|
477
480
|
* @param {boolean} options.closeable - Whether to show close button (default: true)
|
|
478
481
|
* @param {number} options.duration - Auto-dismiss duration in ms (0 = sticky, null = use default)
|
|
482
|
+
* @param {boolean} options.persistent - Whether notification survives route changes (default: false)
|
|
479
483
|
* @param {string} outletName - Target outlet name (default: 'default')
|
|
480
484
|
*/
|
|
481
485
|
show(s = {}, t = "default") {
|
|
@@ -495,6 +499,14 @@ class Os {
|
|
|
495
499
|
for (const s of this.outlets.values())
|
|
496
500
|
s.hide();
|
|
497
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* Hide all non-persistent banner notifications
|
|
504
|
+
* Called by setupNotificationGuard on route change
|
|
505
|
+
*/
|
|
506
|
+
hideAllNonPersistent() {
|
|
507
|
+
for (const s of this.outlets.values())
|
|
508
|
+
s.state.persistent || s.hide();
|
|
509
|
+
}
|
|
498
510
|
/**
|
|
499
511
|
* Pause auto-dismiss timer for the specified banner outlet
|
|
500
512
|
* @param {string} outletName - Target outlet name (default: 'default')
|
|
@@ -536,7 +548,7 @@ class Os {
|
|
|
536
548
|
* @param {boolean} options.newestOnTop - Whether newest toasts appear on top (default: true)
|
|
537
549
|
*/
|
|
538
550
|
configureToasts(s = {}) {
|
|
539
|
-
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 &&
|
|
551
|
+
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 && Te.includes(s.defaultPosition) && (this.toastState.defaultPosition = s.defaultPosition), s.newestOnTop !== void 0 && (this.toastState.newestOnTop = s.newestOnTop);
|
|
540
552
|
}
|
|
541
553
|
/**
|
|
542
554
|
* Show a toast notification
|
|
@@ -553,30 +565,30 @@ class Os {
|
|
|
553
565
|
toast(s = {}) {
|
|
554
566
|
const {
|
|
555
567
|
type: t = "info",
|
|
556
|
-
message:
|
|
568
|
+
message: a = null,
|
|
557
569
|
component: l = null,
|
|
558
570
|
props: n = {},
|
|
559
|
-
closeable:
|
|
571
|
+
closeable: o = !0,
|
|
560
572
|
duration: c = null,
|
|
561
573
|
position: r = null
|
|
562
|
-
} = s, i = ++this._toastIdCounter, u = r &&
|
|
574
|
+
} = s, i = ++this._toastIdCounter, u = r && Te.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c : lt[t], p = {
|
|
563
575
|
id: i,
|
|
564
576
|
type: t,
|
|
565
|
-
message:
|
|
577
|
+
message: a,
|
|
566
578
|
component: l ? me(l) : null,
|
|
567
579
|
props: n,
|
|
568
|
-
closeable:
|
|
580
|
+
closeable: o,
|
|
569
581
|
duration: d,
|
|
570
582
|
position: u,
|
|
571
583
|
createdAt: Date.now()
|
|
572
|
-
},
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
this.hideToast(
|
|
584
|
+
}, b = this.toastState.toasts.filter((v) => v.position === u);
|
|
585
|
+
if (b.length >= this.toastState.maxToasts) {
|
|
586
|
+
const v = this.toastState.newestOnTop ? b[b.length - 1] : b[0];
|
|
587
|
+
this.hideToast(v.id);
|
|
576
588
|
}
|
|
577
589
|
if (this.toastState.newestOnTop) {
|
|
578
|
-
const
|
|
579
|
-
|
|
590
|
+
const v = this.toastState.toasts.findIndex((x) => x.position === u);
|
|
591
|
+
v === -1 ? this.toastState.toasts.push(p) : this.toastState.toasts.splice(v, 0, p);
|
|
580
592
|
} else
|
|
581
593
|
this.toastState.toasts.push(p);
|
|
582
594
|
return d > 0 && this._startToastTimer(i, d), i;
|
|
@@ -587,7 +599,7 @@ class Os {
|
|
|
587
599
|
*/
|
|
588
600
|
hideToast(s) {
|
|
589
601
|
this._clearToastTimer(s);
|
|
590
|
-
const t = this.toastState.toasts.findIndex((
|
|
602
|
+
const t = this.toastState.toasts.findIndex((a) => a.id === s);
|
|
591
603
|
t !== -1 && this.toastState.toasts.splice(t, 1);
|
|
592
604
|
}
|
|
593
605
|
/**
|
|
@@ -606,8 +618,8 @@ class Os {
|
|
|
606
618
|
const t = this._toastTimers.get(s);
|
|
607
619
|
if (!t || t.isPaused) return;
|
|
608
620
|
clearTimeout(t.timeout), t.timeout = null;
|
|
609
|
-
const
|
|
610
|
-
t.remainingTime = Math.max(0, t.remainingTime -
|
|
621
|
+
const a = Date.now() - t.startedAt;
|
|
622
|
+
t.remainingTime = Math.max(0, t.remainingTime - a), t.isPaused = !0;
|
|
611
623
|
}
|
|
612
624
|
/**
|
|
613
625
|
* Resume auto-dismiss timer for a specific toast
|
|
@@ -634,15 +646,15 @@ class Os {
|
|
|
634
646
|
* @private
|
|
635
647
|
*/
|
|
636
648
|
_startToastTimer(s, t) {
|
|
637
|
-
const
|
|
649
|
+
const a = {
|
|
638
650
|
timeout: null,
|
|
639
651
|
remainingTime: t,
|
|
640
652
|
startedAt: Date.now(),
|
|
641
653
|
isPaused: !1
|
|
642
654
|
};
|
|
643
|
-
|
|
655
|
+
a.timeout = setTimeout(() => {
|
|
644
656
|
this.hideToast(s);
|
|
645
|
-
}, t), this._toastTimers.set(s,
|
|
657
|
+
}, t), this._toastTimers.set(s, a);
|
|
646
658
|
}
|
|
647
659
|
/**
|
|
648
660
|
* @private
|
|
@@ -652,30 +664,47 @@ class Os {
|
|
|
652
664
|
t && (t.timeout && clearTimeout(t.timeout), this._toastTimers.delete(s));
|
|
653
665
|
}
|
|
654
666
|
}
|
|
655
|
-
const
|
|
667
|
+
const j = new As(), zn = {
|
|
656
668
|
__name: "SparkNotificationOutlet",
|
|
657
669
|
props: {
|
|
658
670
|
name: {
|
|
659
671
|
type: String,
|
|
660
672
|
default: "default"
|
|
673
|
+
},
|
|
674
|
+
clearOnRouteChange: {
|
|
675
|
+
type: Boolean,
|
|
676
|
+
default: !0
|
|
661
677
|
}
|
|
662
678
|
},
|
|
663
679
|
setup(e) {
|
|
664
|
-
const s = e, t = $(() =>
|
|
665
|
-
|
|
666
|
-
() => [
|
|
680
|
+
const s = e, t = te(), a = $(() => j.getOutlet(s.name)), l = R(0);
|
|
681
|
+
z(
|
|
682
|
+
() => [a.value.state.message, a.value.state.component, a.value.state.type],
|
|
667
683
|
() => {
|
|
668
|
-
|
|
684
|
+
a.value.state.isVisible && l.value++;
|
|
685
|
+
}
|
|
686
|
+
), z(
|
|
687
|
+
() => a.value.state.isVisible,
|
|
688
|
+
(r) => {
|
|
689
|
+
r && !a.value.state.shownOnPath && (a.value.state.shownOnPath = t.path);
|
|
690
|
+
},
|
|
691
|
+
{ immediate: !0 }
|
|
692
|
+
), he(() => {
|
|
693
|
+
s.clearOnRouteChange && (t.meta.preserveNotifications || a.value.state.isVisible && (a.value.state.persistent || a.value.state.shownOnPath && a.value.state.shownOnPath !== t.path && a.value.hide()));
|
|
694
|
+
}), z(
|
|
695
|
+
() => t.path,
|
|
696
|
+
() => {
|
|
697
|
+
s.clearOnRouteChange && (t.meta.preserveNotifications || a.value.state.isVisible && (a.value.state.persistent || a.value.hide()));
|
|
669
698
|
}
|
|
670
699
|
);
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
700
|
+
const n = () => {
|
|
701
|
+
j.hide(s.name);
|
|
702
|
+
}, o = () => {
|
|
703
|
+
j.pause(s.name);
|
|
704
|
+
}, c = () => {
|
|
705
|
+
j.resume(s.name);
|
|
677
706
|
};
|
|
678
|
-
return (
|
|
707
|
+
return (r, i) => (m(), H(dt, {
|
|
679
708
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
680
709
|
"enter-from-class": "opacity-0 -translate-y-2",
|
|
681
710
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -684,49 +713,49 @@ const q = new Os(), En = {
|
|
|
684
713
|
"leave-to-class": "opacity-0 -translate-y-2",
|
|
685
714
|
mode: "out-in"
|
|
686
715
|
}, {
|
|
687
|
-
default:
|
|
688
|
-
|
|
689
|
-
key:
|
|
690
|
-
type:
|
|
691
|
-
closeable:
|
|
692
|
-
onClose:
|
|
693
|
-
onMouseenter:
|
|
694
|
-
onMouseleave:
|
|
716
|
+
default: P(() => [
|
|
717
|
+
a.value.state.isVisible ? (m(), H(oe, {
|
|
718
|
+
key: l.value,
|
|
719
|
+
type: a.value.state.type,
|
|
720
|
+
closeable: a.value.state.closeable,
|
|
721
|
+
onClose: n,
|
|
722
|
+
onMouseenter: o,
|
|
723
|
+
onMouseleave: c
|
|
695
724
|
}, {
|
|
696
|
-
default:
|
|
697
|
-
|
|
698
|
-
|
|
725
|
+
default: P(() => [
|
|
726
|
+
a.value.state.component ? (m(), H(Z(a.value.state.component), pt(q({ key: 0 }, a.value.state.props)), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
727
|
+
A(M(a.value.state.message), 1)
|
|
699
728
|
], 64))
|
|
700
729
|
]),
|
|
701
730
|
_: 1
|
|
702
|
-
}, 8, ["type", "closeable"])) :
|
|
731
|
+
}, 8, ["type", "closeable"])) : T("", !0)
|
|
703
732
|
]),
|
|
704
733
|
_: 1
|
|
705
734
|
}));
|
|
706
735
|
}
|
|
707
|
-
}, Bs = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ds = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" },
|
|
736
|
+
}, Bs = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ds = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, js = { 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" }, zs = { class: "fixed bottom-4 left-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Is = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, In = {
|
|
708
737
|
__name: "SparkToastContainer",
|
|
709
738
|
setup(e) {
|
|
710
|
-
const s =
|
|
739
|
+
const s = j.toastState, t = $(
|
|
711
740
|
() => s.toasts.filter((u) => u.position === "top-left")
|
|
712
|
-
),
|
|
741
|
+
), a = $(
|
|
713
742
|
() => s.toasts.filter((u) => u.position === "top-right")
|
|
714
743
|
), l = $(
|
|
715
744
|
() => s.toasts.filter((u) => u.position === "center")
|
|
716
745
|
), n = $(
|
|
717
746
|
() => s.toasts.filter((u) => u.position === "bottom-left")
|
|
718
|
-
),
|
|
747
|
+
), o = $(
|
|
719
748
|
() => s.toasts.filter((u) => u.position === "bottom-right")
|
|
720
749
|
), c = (u) => {
|
|
721
|
-
|
|
750
|
+
j.hideToast(u);
|
|
722
751
|
}, r = (u) => {
|
|
723
|
-
|
|
752
|
+
j.pauseToast(u);
|
|
724
753
|
}, i = (u) => {
|
|
725
|
-
|
|
754
|
+
j.resumeToast(u);
|
|
726
755
|
};
|
|
727
|
-
return (u, d) => (m(),
|
|
756
|
+
return (u, d) => (m(), H(ft, { to: "body" }, [
|
|
728
757
|
f("div", Bs, [
|
|
729
|
-
|
|
758
|
+
k(ie, {
|
|
730
759
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
731
760
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
732
761
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -734,24 +763,24 @@ const q = new Os(), En = {
|
|
|
734
763
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
735
764
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
736
765
|
}, {
|
|
737
|
-
default:
|
|
738
|
-
(m(!0),
|
|
766
|
+
default: P(() => [
|
|
767
|
+
(m(!0), g(E, null, I(t.value, (p) => (m(), g("div", {
|
|
739
768
|
key: p.id,
|
|
740
769
|
class: "pointer-events-auto"
|
|
741
770
|
}, [
|
|
742
|
-
|
|
771
|
+
k(oe, {
|
|
743
772
|
type: p.type,
|
|
744
773
|
closeable: p.closeable,
|
|
745
|
-
onClose: (
|
|
746
|
-
onMouseenter: (
|
|
747
|
-
onMouseleave: (
|
|
774
|
+
onClose: (b) => c(p.id),
|
|
775
|
+
onMouseenter: (b) => r(p.id),
|
|
776
|
+
onMouseleave: (b) => i(p.id)
|
|
748
777
|
}, {
|
|
749
|
-
default:
|
|
750
|
-
p.component ? (m(),
|
|
778
|
+
default: P(() => [
|
|
779
|
+
p.component ? (m(), H(Z(p.component), q({
|
|
751
780
|
key: 0,
|
|
752
781
|
ref_for: !0
|
|
753
|
-
}, p.props), null, 16)) : (m(),
|
|
754
|
-
|
|
782
|
+
}, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
783
|
+
A(M(p.message), 1)
|
|
755
784
|
], 64))
|
|
756
785
|
]),
|
|
757
786
|
_: 2
|
|
@@ -762,7 +791,7 @@ const q = new Os(), En = {
|
|
|
762
791
|
})
|
|
763
792
|
]),
|
|
764
793
|
f("div", Ds, [
|
|
765
|
-
|
|
794
|
+
k(ie, {
|
|
766
795
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
767
796
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
768
797
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -770,24 +799,24 @@ const q = new Os(), En = {
|
|
|
770
799
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
771
800
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
772
801
|
}, {
|
|
773
|
-
default:
|
|
774
|
-
(m(!0),
|
|
802
|
+
default: P(() => [
|
|
803
|
+
(m(!0), g(E, null, I(a.value, (p) => (m(), g("div", {
|
|
775
804
|
key: p.id,
|
|
776
805
|
class: "pointer-events-auto"
|
|
777
806
|
}, [
|
|
778
|
-
|
|
807
|
+
k(oe, {
|
|
779
808
|
type: p.type,
|
|
780
809
|
closeable: p.closeable,
|
|
781
|
-
onClose: (
|
|
782
|
-
onMouseenter: (
|
|
783
|
-
onMouseleave: (
|
|
810
|
+
onClose: (b) => c(p.id),
|
|
811
|
+
onMouseenter: (b) => r(p.id),
|
|
812
|
+
onMouseleave: (b) => i(p.id)
|
|
784
813
|
}, {
|
|
785
|
-
default:
|
|
786
|
-
p.component ? (m(),
|
|
814
|
+
default: P(() => [
|
|
815
|
+
p.component ? (m(), H(Z(p.component), q({
|
|
787
816
|
key: 0,
|
|
788
817
|
ref_for: !0
|
|
789
|
-
}, p.props), null, 16)) : (m(),
|
|
790
|
-
|
|
818
|
+
}, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
819
|
+
A(M(p.message), 1)
|
|
791
820
|
], 64))
|
|
792
821
|
]),
|
|
793
822
|
_: 2
|
|
@@ -797,8 +826,8 @@ const q = new Os(), En = {
|
|
|
797
826
|
_: 1
|
|
798
827
|
})
|
|
799
828
|
]),
|
|
800
|
-
f("div",
|
|
801
|
-
|
|
829
|
+
f("div", js, [
|
|
830
|
+
k(ie, {
|
|
802
831
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
803
832
|
"enter-from-class": "opacity-0 scale-95",
|
|
804
833
|
"enter-to-class": "opacity-100 scale-100",
|
|
@@ -806,24 +835,24 @@ const q = new Os(), En = {
|
|
|
806
835
|
"leave-from-class": "opacity-100 scale-100",
|
|
807
836
|
"leave-to-class": "opacity-0 scale-95"
|
|
808
837
|
}, {
|
|
809
|
-
default:
|
|
810
|
-
(m(!0),
|
|
838
|
+
default: P(() => [
|
|
839
|
+
(m(!0), g(E, null, I(l.value, (p) => (m(), g("div", {
|
|
811
840
|
key: p.id,
|
|
812
841
|
class: "pointer-events-auto"
|
|
813
842
|
}, [
|
|
814
|
-
|
|
843
|
+
k(oe, {
|
|
815
844
|
type: p.type,
|
|
816
845
|
closeable: p.closeable,
|
|
817
|
-
onClose: (
|
|
818
|
-
onMouseenter: (
|
|
819
|
-
onMouseleave: (
|
|
846
|
+
onClose: (b) => c(p.id),
|
|
847
|
+
onMouseenter: (b) => r(p.id),
|
|
848
|
+
onMouseleave: (b) => i(p.id)
|
|
820
849
|
}, {
|
|
821
|
-
default:
|
|
822
|
-
p.component ? (m(),
|
|
850
|
+
default: P(() => [
|
|
851
|
+
p.component ? (m(), H(Z(p.component), q({
|
|
823
852
|
key: 0,
|
|
824
853
|
ref_for: !0
|
|
825
|
-
}, p.props), null, 16)) : (m(),
|
|
826
|
-
|
|
854
|
+
}, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
855
|
+
A(M(p.message), 1)
|
|
827
856
|
], 64))
|
|
828
857
|
]),
|
|
829
858
|
_: 2
|
|
@@ -833,8 +862,8 @@ const q = new Os(), En = {
|
|
|
833
862
|
_: 1
|
|
834
863
|
})
|
|
835
864
|
]),
|
|
836
|
-
f("div",
|
|
837
|
-
|
|
865
|
+
f("div", zs, [
|
|
866
|
+
k(ie, {
|
|
838
867
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
839
868
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
840
869
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -842,24 +871,24 @@ const q = new Os(), En = {
|
|
|
842
871
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
843
872
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
844
873
|
}, {
|
|
845
|
-
default:
|
|
846
|
-
(m(!0),
|
|
874
|
+
default: P(() => [
|
|
875
|
+
(m(!0), g(E, null, I(n.value, (p) => (m(), g("div", {
|
|
847
876
|
key: p.id,
|
|
848
877
|
class: "pointer-events-auto"
|
|
849
878
|
}, [
|
|
850
|
-
|
|
879
|
+
k(oe, {
|
|
851
880
|
type: p.type,
|
|
852
881
|
closeable: p.closeable,
|
|
853
|
-
onClose: (
|
|
854
|
-
onMouseenter: (
|
|
855
|
-
onMouseleave: (
|
|
882
|
+
onClose: (b) => c(p.id),
|
|
883
|
+
onMouseenter: (b) => r(p.id),
|
|
884
|
+
onMouseleave: (b) => i(p.id)
|
|
856
885
|
}, {
|
|
857
|
-
default:
|
|
858
|
-
p.component ? (m(),
|
|
886
|
+
default: P(() => [
|
|
887
|
+
p.component ? (m(), H(Z(p.component), q({
|
|
859
888
|
key: 0,
|
|
860
889
|
ref_for: !0
|
|
861
|
-
}, p.props), null, 16)) : (m(),
|
|
862
|
-
|
|
890
|
+
}, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
891
|
+
A(M(p.message), 1)
|
|
863
892
|
], 64))
|
|
864
893
|
]),
|
|
865
894
|
_: 2
|
|
@@ -870,7 +899,7 @@ const q = new Os(), En = {
|
|
|
870
899
|
})
|
|
871
900
|
]),
|
|
872
901
|
f("div", Is, [
|
|
873
|
-
|
|
902
|
+
k(ie, {
|
|
874
903
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
875
904
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
876
905
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -878,24 +907,24 @@ const q = new Os(), En = {
|
|
|
878
907
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
879
908
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
880
909
|
}, {
|
|
881
|
-
default:
|
|
882
|
-
(m(!0),
|
|
910
|
+
default: P(() => [
|
|
911
|
+
(m(!0), g(E, null, I(o.value, (p) => (m(), g("div", {
|
|
883
912
|
key: p.id,
|
|
884
913
|
class: "pointer-events-auto"
|
|
885
914
|
}, [
|
|
886
|
-
|
|
915
|
+
k(oe, {
|
|
887
916
|
type: p.type,
|
|
888
917
|
closeable: p.closeable,
|
|
889
|
-
onClose: (
|
|
890
|
-
onMouseenter: (
|
|
891
|
-
onMouseleave: (
|
|
918
|
+
onClose: (b) => c(p.id),
|
|
919
|
+
onMouseenter: (b) => r(p.id),
|
|
920
|
+
onMouseleave: (b) => i(p.id)
|
|
892
921
|
}, {
|
|
893
|
-
default:
|
|
894
|
-
p.component ? (m(),
|
|
922
|
+
default: P(() => [
|
|
923
|
+
p.component ? (m(), H(Z(p.component), q({
|
|
895
924
|
key: 0,
|
|
896
925
|
ref_for: !0
|
|
897
|
-
}, p.props), null, 16)) : (m(),
|
|
898
|
-
|
|
926
|
+
}, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
|
|
927
|
+
A(M(p.message), 1)
|
|
899
928
|
], 64))
|
|
900
929
|
]),
|
|
901
930
|
_: 2
|
|
@@ -910,38 +939,38 @@ const q = new Os(), En = {
|
|
|
910
939
|
}, it = ue(
|
|
911
940
|
"brandFilter",
|
|
912
941
|
() => {
|
|
913
|
-
const e =
|
|
942
|
+
const e = K({
|
|
914
943
|
brands: []
|
|
915
944
|
}), s = (n = {}) => {
|
|
916
945
|
if (!n.brands || !Array.isArray(n.brands)) {
|
|
917
946
|
console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
|
|
918
947
|
return;
|
|
919
948
|
}
|
|
920
|
-
const
|
|
949
|
+
const o = n.brands.filter((r) => {
|
|
921
950
|
const i = r.name && r.logo;
|
|
922
951
|
return i || console.warn("useSparkBrandFilterStore: Invalid brand object", r), i;
|
|
923
|
-
}), c =
|
|
924
|
-
c.length === 0 &&
|
|
952
|
+
}), c = o.filter((r) => r.current);
|
|
953
|
+
c.length === 0 && o.length > 0 ? o[0].current = !0 : c.length > 1 && o.forEach((r) => {
|
|
925
954
|
r.current = r === c[0];
|
|
926
|
-
}), e.brands =
|
|
955
|
+
}), e.brands = o.map((r) => ({
|
|
927
956
|
id: r.id,
|
|
928
957
|
name: r.name,
|
|
929
958
|
logo: r.logo,
|
|
930
959
|
current: r.current || !1
|
|
931
960
|
}));
|
|
932
|
-
}, t = $(() => e.brands.find((n) => n.current) || null),
|
|
961
|
+
}, t = $(() => e.brands.find((n) => n.current) || null), a = $(() => e.brands);
|
|
933
962
|
return {
|
|
934
963
|
state: e,
|
|
935
964
|
initialize: s,
|
|
936
965
|
currentBrand: t,
|
|
937
|
-
allBrands:
|
|
966
|
+
allBrands: a,
|
|
938
967
|
toggleBrand: (n) => {
|
|
939
968
|
if (!n || !e.brands.includes(n)) {
|
|
940
969
|
console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
|
|
941
970
|
return;
|
|
942
971
|
}
|
|
943
|
-
e.brands.forEach((
|
|
944
|
-
|
|
972
|
+
e.brands.forEach((o) => {
|
|
973
|
+
o.current = o === n;
|
|
945
974
|
});
|
|
946
975
|
}
|
|
947
976
|
};
|
|
@@ -954,62 +983,62 @@ const q = new Os(), En = {
|
|
|
954
983
|
), Ns = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Zs = { class: "flex flex-1 flex-col" }, qs = { class: "divide-y divide-gray-200" }, Us = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ks = { class: "ml-auto flex items-center" }, Gs = {
|
|
955
984
|
key: 0,
|
|
956
985
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
957
|
-
}, Ws = ["onClick"], Ys = { class: "w-full gap-y-1 flex justify-between" }, Xs = { class: "flex flex-col" }, Js = { class: "flex items-center" }, Qs = { class: "font-medium text-base text-gray-900" },
|
|
986
|
+
}, Ws = ["onClick"], Ys = { class: "w-full gap-y-1 flex justify-between" }, Xs = { class: "flex flex-col" }, Js = { class: "flex items-center" }, Qs = { class: "font-medium text-base text-gray-900" }, ea = {
|
|
958
987
|
key: 0,
|
|
959
988
|
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"
|
|
960
|
-
},
|
|
989
|
+
}, ta = { class: "text-sm text-gray-500 font-normal" }, sa = { class: "flex items-center" }, aa = ["src", "alt"], oa = {
|
|
961
990
|
__name: "SparkBrandSelector",
|
|
962
991
|
emits: ["close", "select"],
|
|
963
992
|
setup(e, { emit: s }) {
|
|
964
|
-
const t = s,
|
|
993
|
+
const t = s, a = it(), l = (n) => {
|
|
965
994
|
t("select", n);
|
|
966
995
|
};
|
|
967
|
-
return (n,
|
|
968
|
-
const c =
|
|
969
|
-
return m(),
|
|
996
|
+
return (n, o) => {
|
|
997
|
+
const c = F("font-awesome-icon");
|
|
998
|
+
return m(), g("div", Ns, [
|
|
970
999
|
f("div", Zs, [
|
|
971
1000
|
f("div", qs, [
|
|
972
1001
|
f("div", Us, [
|
|
973
|
-
|
|
1002
|
+
o[1] || (o[1] = f("div", null, "Filter by Brand", -1)),
|
|
974
1003
|
f("div", Ks, [
|
|
975
|
-
|
|
976
|
-
icon:
|
|
1004
|
+
k(c, {
|
|
1005
|
+
icon: S(O).farTimes,
|
|
977
1006
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
978
|
-
onClick:
|
|
1007
|
+
onClick: o[0] || (o[0] = (r) => t("close"))
|
|
979
1008
|
}, null, 8, ["icon"])
|
|
980
1009
|
])
|
|
981
1010
|
]),
|
|
982
|
-
|
|
983
|
-
(m(!0),
|
|
1011
|
+
S(a).allBrands.length === 0 ? (m(), g("div", Gs, " No brands configured ")) : T("", !0),
|
|
1012
|
+
(m(!0), g(E, null, I(S(a).allBrands, (r) => (m(), g("div", {
|
|
984
1013
|
key: r.id,
|
|
985
|
-
class:
|
|
1014
|
+
class: V([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
986
1015
|
onClick: (i) => l(r)
|
|
987
1016
|
}, [
|
|
988
1017
|
f("div", Ys, [
|
|
989
1018
|
f("div", Xs, [
|
|
990
1019
|
f("div", Js, [
|
|
991
1020
|
f("div", Qs, M(r.name), 1),
|
|
992
|
-
r.current ? (m(),
|
|
1021
|
+
r.current ? (m(), g("span", ea, " Current ")) : T("", !0)
|
|
993
1022
|
]),
|
|
994
|
-
f("div",
|
|
1023
|
+
f("div", ta, M(r.current ? "Current Brand" : "Change to"), 1)
|
|
995
1024
|
]),
|
|
996
|
-
f("div",
|
|
1025
|
+
f("div", sa, [
|
|
997
1026
|
f("img", {
|
|
998
1027
|
src: r.logo,
|
|
999
1028
|
alt: `${r.name} logo`,
|
|
1000
1029
|
class: "h-8 w-auto"
|
|
1001
|
-
}, null, 8,
|
|
1030
|
+
}, null, 8, aa)
|
|
1002
1031
|
])
|
|
1003
1032
|
])
|
|
1004
1033
|
], 10, Ws))), 128)),
|
|
1005
|
-
|
|
1034
|
+
o[2] || (o[2] = f("div", null, null, -1))
|
|
1006
1035
|
]),
|
|
1007
|
-
|
|
1036
|
+
o[3] || (o[3] = f("div", { class: "mt-auto" }, null, -1))
|
|
1008
1037
|
])
|
|
1009
1038
|
]);
|
|
1010
1039
|
};
|
|
1011
1040
|
}
|
|
1012
|
-
},
|
|
1041
|
+
}, ra = ["disabled"], X = {
|
|
1013
1042
|
__name: "SparkButton",
|
|
1014
1043
|
props: {
|
|
1015
1044
|
size: {
|
|
@@ -1032,9 +1061,9 @@ const q = new Os(), En = {
|
|
|
1032
1061
|
},
|
|
1033
1062
|
emits: ["click"],
|
|
1034
1063
|
setup(e) {
|
|
1035
|
-
const s = e, t =
|
|
1036
|
-
if (!
|
|
1037
|
-
const r =
|
|
1064
|
+
const s = e, t = R(null), a = Se("buttonGroup", null), l = $(() => {
|
|
1065
|
+
if (!a?.isInGroup || !t.value) return null;
|
|
1066
|
+
const r = a.getButtonIndex(t.value), i = a.getButtonCount();
|
|
1038
1067
|
return {
|
|
1039
1068
|
isFirst: r === 0,
|
|
1040
1069
|
isLast: r === i - 1,
|
|
@@ -1051,16 +1080,16 @@ const q = new Os(), En = {
|
|
|
1051
1080
|
borderRadius: /^rounded-/,
|
|
1052
1081
|
background: /^bg-/,
|
|
1053
1082
|
text: /^text-(?!white|black)/
|
|
1054
|
-
},
|
|
1083
|
+
}, o = (r, i) => {
|
|
1055
1084
|
if (!i) return r;
|
|
1056
1085
|
const u = r.split(" ").filter(Boolean), d = i.split(" ").filter(Boolean);
|
|
1057
|
-
return [...u.filter((
|
|
1058
|
-
const
|
|
1059
|
-
([w,
|
|
1060
|
-
)?.[0],
|
|
1061
|
-
([w,
|
|
1086
|
+
return [...u.filter((b) => !d.some((v) => {
|
|
1087
|
+
const x = Object.entries(n).find(
|
|
1088
|
+
([w, C]) => C.test(b)
|
|
1089
|
+
)?.[0], h = Object.entries(n).find(
|
|
1090
|
+
([w, C]) => C.test(v)
|
|
1062
1091
|
)?.[0];
|
|
1063
|
-
return
|
|
1092
|
+
return x && x === h;
|
|
1064
1093
|
})), ...d].join(" ");
|
|
1065
1094
|
}, c = $(() => {
|
|
1066
1095
|
let r = "", i = "";
|
|
@@ -1081,7 +1110,7 @@ const q = new Os(), En = {
|
|
|
1081
1110
|
r += " px-7 py-2.5 min-h-[42px] text-sm", i = "md";
|
|
1082
1111
|
break;
|
|
1083
1112
|
}
|
|
1084
|
-
if (
|
|
1113
|
+
if (a?.isInGroup && l.value) {
|
|
1085
1114
|
const { isFirst: u, isLast: d } = l.value;
|
|
1086
1115
|
r += " relative inline-flex items-center focus:z-10", u && d ? r += ` rounded-${i}` : u ? r += ` rounded-l-${i} rounded-r-none` : d ? r += ` rounded-r-${i} rounded-l-none -ml-px` : r += " rounded-none -ml-px";
|
|
1087
1116
|
} else
|
|
@@ -1108,28 +1137,28 @@ const q = new Os(), En = {
|
|
|
1108
1137
|
default:
|
|
1109
1138
|
r += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
|
|
1110
1139
|
}
|
|
1111
|
-
return r =
|
|
1140
|
+
return r = o(r, s.buttonClass), r;
|
|
1112
1141
|
});
|
|
1113
|
-
return (r, i) => (m(),
|
|
1142
|
+
return (r, i) => (m(), g("button", {
|
|
1114
1143
|
type: "button",
|
|
1115
1144
|
ref_key: "buttonRef",
|
|
1116
1145
|
ref: t,
|
|
1117
|
-
class:
|
|
1146
|
+
class: V(c.value),
|
|
1118
1147
|
disabled: e.disabled,
|
|
1119
1148
|
onClick: i[0] || (i[0] = (u) => r.$emit("click"))
|
|
1120
1149
|
}, [
|
|
1121
1150
|
B(r.$slots, "default")
|
|
1122
|
-
], 10,
|
|
1151
|
+
], 10, ra));
|
|
1123
1152
|
}
|
|
1124
|
-
},
|
|
1153
|
+
}, na = {
|
|
1125
1154
|
__name: "SparkButtonGroup",
|
|
1126
1155
|
setup(e) {
|
|
1127
|
-
const s =
|
|
1156
|
+
const s = R(null);
|
|
1128
1157
|
return mt("buttonGroup", {
|
|
1129
1158
|
isInGroup: !0,
|
|
1130
1159
|
getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
|
|
1131
1160
|
getButtonCount: () => s.value?.children.length || 0
|
|
1132
|
-
}), (l, n) => (m(),
|
|
1161
|
+
}), (l, n) => (m(), g("div", {
|
|
1133
1162
|
class: "inline-flex rounded-md shadow-xs",
|
|
1134
1163
|
ref_key: "groupRef",
|
|
1135
1164
|
ref: s
|
|
@@ -1137,13 +1166,13 @@ const q = new Os(), En = {
|
|
|
1137
1166
|
B(l.$slots, "default")
|
|
1138
1167
|
], 512));
|
|
1139
1168
|
}
|
|
1140
|
-
},
|
|
1169
|
+
}, la = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, ia = {
|
|
1141
1170
|
key: 0,
|
|
1142
1171
|
class: "px-[30px] py-5"
|
|
1143
|
-
},
|
|
1172
|
+
}, ca = {
|
|
1144
1173
|
key: 1,
|
|
1145
1174
|
class: "p-5"
|
|
1146
|
-
},
|
|
1175
|
+
}, Nn = {
|
|
1147
1176
|
__name: "SparkCard",
|
|
1148
1177
|
props: {
|
|
1149
1178
|
padded: {
|
|
@@ -1157,24 +1186,200 @@ const q = new Os(), En = {
|
|
|
1157
1186
|
},
|
|
1158
1187
|
setup(e) {
|
|
1159
1188
|
const s = e;
|
|
1160
|
-
return (t,
|
|
1161
|
-
t.$slots.header ? (m(),
|
|
1189
|
+
return (t, a) => (m(), g("div", la, [
|
|
1190
|
+
t.$slots.header ? (m(), g("div", ia, [
|
|
1162
1191
|
B(t.$slots, "header")
|
|
1163
|
-
])) :
|
|
1192
|
+
])) : T("", !0),
|
|
1164
1193
|
f("div", {
|
|
1165
|
-
class:
|
|
1194
|
+
class: V([s.padded ? s.paddedClass : ""])
|
|
1166
1195
|
}, [
|
|
1167
1196
|
B(t.$slots, "default")
|
|
1168
1197
|
], 2),
|
|
1169
|
-
t.$slots.footer ? (m(),
|
|
1198
|
+
t.$slots.footer ? (m(), g("div", ca, [
|
|
1170
1199
|
B(t.$slots, "footer")
|
|
1171
|
-
])) :
|
|
1200
|
+
])) : T("", !0)
|
|
1172
1201
|
]));
|
|
1173
1202
|
}
|
|
1174
|
-
},
|
|
1203
|
+
}, ua = {
|
|
1204
|
+
key: 0,
|
|
1205
|
+
class: "block text-sm font-medium text-gray-700 mb-2"
|
|
1206
|
+
}, da = {
|
|
1207
|
+
key: 1,
|
|
1208
|
+
class: "mb-2 relative inline-block"
|
|
1209
|
+
}, pa = ["href"], fa = ["src", "alt"], ma = ["disabled"], ha = {
|
|
1210
|
+
key: 0,
|
|
1211
|
+
class: "absolute inset-0 flex items-center justify-center bg-blue-50/80 rounded-md pointer-events-none"
|
|
1212
|
+
}, ga = {
|
|
1213
|
+
key: 3,
|
|
1214
|
+
class: "text-sm text-gray-500 mt-1"
|
|
1215
|
+
}, Zn = {
|
|
1216
|
+
__name: "SparkImageUpload",
|
|
1217
|
+
props: {
|
|
1218
|
+
modelValue: {
|
|
1219
|
+
type: String,
|
|
1220
|
+
default: ""
|
|
1221
|
+
},
|
|
1222
|
+
uploadUrl: {
|
|
1223
|
+
type: String,
|
|
1224
|
+
required: !0
|
|
1225
|
+
},
|
|
1226
|
+
fieldName: {
|
|
1227
|
+
type: String,
|
|
1228
|
+
default: "file"
|
|
1229
|
+
},
|
|
1230
|
+
extraFields: {
|
|
1231
|
+
type: Object,
|
|
1232
|
+
default: () => ({})
|
|
1233
|
+
},
|
|
1234
|
+
label: {
|
|
1235
|
+
type: String,
|
|
1236
|
+
default: ""
|
|
1237
|
+
},
|
|
1238
|
+
name: {
|
|
1239
|
+
type: String,
|
|
1240
|
+
default: "image_file"
|
|
1241
|
+
},
|
|
1242
|
+
height: {
|
|
1243
|
+
type: String,
|
|
1244
|
+
default: "h-16"
|
|
1245
|
+
},
|
|
1246
|
+
accept: {
|
|
1247
|
+
type: String,
|
|
1248
|
+
default: "image/*"
|
|
1249
|
+
},
|
|
1250
|
+
disabled: {
|
|
1251
|
+
type: Boolean,
|
|
1252
|
+
default: !1
|
|
1253
|
+
},
|
|
1254
|
+
responseParser: {
|
|
1255
|
+
type: Function,
|
|
1256
|
+
default: (e) => e.data.url || e.data
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
emits: ["update:modelValue", "upload-start", "upload-success", "upload-error"],
|
|
1260
|
+
setup(e, { emit: s }) {
|
|
1261
|
+
const t = e, a = s, l = Se("axios"), n = R(!1), o = R(!1);
|
|
1262
|
+
function c() {
|
|
1263
|
+
a("update:modelValue", "");
|
|
1264
|
+
}
|
|
1265
|
+
function r() {
|
|
1266
|
+
t.disabled || n.value || (o.value = !0);
|
|
1267
|
+
}
|
|
1268
|
+
function i() {
|
|
1269
|
+
o.value = !1;
|
|
1270
|
+
}
|
|
1271
|
+
function u(v) {
|
|
1272
|
+
if (o.value = !1, t.disabled || n.value) return;
|
|
1273
|
+
const x = v.dataTransfer?.files?.[0];
|
|
1274
|
+
if (x) {
|
|
1275
|
+
if (!d(x)) {
|
|
1276
|
+
j.show({
|
|
1277
|
+
type: "danger",
|
|
1278
|
+
message: "File type not accepted."
|
|
1279
|
+
});
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
b(x);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function d(v) {
|
|
1286
|
+
const x = t.accept.split(",").map((h) => h.trim());
|
|
1287
|
+
for (const h of x) {
|
|
1288
|
+
if (h === "*/*") return !0;
|
|
1289
|
+
if (h.endsWith("/*")) {
|
|
1290
|
+
const w = h.slice(0, -2);
|
|
1291
|
+
if (v.type.startsWith(w + "/")) return !0;
|
|
1292
|
+
} else if (h.startsWith(".")) {
|
|
1293
|
+
if (v.name.toLowerCase().endsWith(h.toLowerCase())) return !0;
|
|
1294
|
+
} else if (v.type === h) return !0;
|
|
1295
|
+
}
|
|
1296
|
+
return !1;
|
|
1297
|
+
}
|
|
1298
|
+
function p(v) {
|
|
1299
|
+
if (!v || v.length === 0) return;
|
|
1300
|
+
const x = v[0].file;
|
|
1301
|
+
x && b(x);
|
|
1302
|
+
}
|
|
1303
|
+
async function b(v) {
|
|
1304
|
+
n.value = !0, a("upload-start");
|
|
1305
|
+
try {
|
|
1306
|
+
const x = new FormData();
|
|
1307
|
+
x.append(t.fieldName, v), Object.entries(t.extraFields).forEach(([C, y]) => {
|
|
1308
|
+
x.append(C, y);
|
|
1309
|
+
});
|
|
1310
|
+
const h = await l.post(t.uploadUrl, x, {
|
|
1311
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
1312
|
+
}), w = t.responseParser(h);
|
|
1313
|
+
a("update:modelValue", w), a("upload-success", h), j.show({
|
|
1314
|
+
type: "success",
|
|
1315
|
+
message: "Image uploaded!"
|
|
1316
|
+
});
|
|
1317
|
+
} catch (x) {
|
|
1318
|
+
a("upload-error", x), j.show({
|
|
1319
|
+
type: "danger",
|
|
1320
|
+
message: x.response?.data?.message || "Failed to upload image."
|
|
1321
|
+
});
|
|
1322
|
+
} finally {
|
|
1323
|
+
n.value = !1;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
return (v, x) => {
|
|
1327
|
+
const h = F("font-awesome-icon"), w = F("FormKit");
|
|
1328
|
+
return m(), g("div", null, [
|
|
1329
|
+
e.label ? (m(), g("label", ua, M(e.label), 1)) : T("", !0),
|
|
1330
|
+
e.modelValue ? (m(), g("div", da, [
|
|
1331
|
+
f("a", {
|
|
1332
|
+
href: e.modelValue,
|
|
1333
|
+
target: "_blank",
|
|
1334
|
+
rel: "noopener noreferrer"
|
|
1335
|
+
}, [
|
|
1336
|
+
f("img", {
|
|
1337
|
+
src: e.modelValue,
|
|
1338
|
+
alt: e.label || "Image preview",
|
|
1339
|
+
class: V([e.height, "w-auto object-contain border border-gray-300 rounded-md cursor-pointer hover:opacity-80 transition-opacity"])
|
|
1340
|
+
}, null, 10, fa)
|
|
1341
|
+
], 8, pa),
|
|
1342
|
+
f("button", {
|
|
1343
|
+
type: "button",
|
|
1344
|
+
class: "absolute -top-2 -right-2 w-5 h-5 bg-white/80 hover:bg-white text-gray-500 hover:text-gray-700 rounded-full flex items-center justify-center shadow-sm border border-gray-200",
|
|
1345
|
+
disabled: e.disabled,
|
|
1346
|
+
onClick: c
|
|
1347
|
+
}, [
|
|
1348
|
+
k(h, {
|
|
1349
|
+
icon: S(O).farXmark,
|
|
1350
|
+
class: "text-xs"
|
|
1351
|
+
}, null, 8, ["icon"])
|
|
1352
|
+
], 8, ma)
|
|
1353
|
+
])) : T("", !0),
|
|
1354
|
+
e.modelValue ? T("", !0) : (m(), g("div", {
|
|
1355
|
+
key: 2,
|
|
1356
|
+
class: V(["relative rounded-md transition-colors", {
|
|
1357
|
+
"ring-2 ring-blue-500 ring-offset-2 bg-blue-50": o.value
|
|
1358
|
+
}]),
|
|
1359
|
+
onDragover: U(r, ["prevent"]),
|
|
1360
|
+
onDragenter: U(r, ["prevent"]),
|
|
1361
|
+
onDragleave: U(i, ["prevent"]),
|
|
1362
|
+
onDrop: U(u, ["prevent"])
|
|
1363
|
+
}, [
|
|
1364
|
+
k(w, {
|
|
1365
|
+
type: "file",
|
|
1366
|
+
name: e.name,
|
|
1367
|
+
accept: e.accept,
|
|
1368
|
+
disabled: e.disabled || n.value,
|
|
1369
|
+
onInput: p
|
|
1370
|
+
}, null, 8, ["name", "accept", "disabled"]),
|
|
1371
|
+
o.value ? (m(), g("div", ha, [...x[0] || (x[0] = [
|
|
1372
|
+
f("span", { class: "text-sm text-blue-600 font-medium" }, "Drop image here", -1)
|
|
1373
|
+
])])) : T("", !0)
|
|
1374
|
+
], 34)),
|
|
1375
|
+
n.value ? (m(), g("p", ga, "Uploading...")) : T("", !0)
|
|
1376
|
+
]);
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
}, ya = { class: "px-4 pt-5 pb-4 sm:p-6" }, va = {
|
|
1175
1380
|
key: 0,
|
|
1176
1381
|
class: "text-lg font-medium text-gray-900"
|
|
1177
|
-
},
|
|
1382
|
+
}, ba = {
|
|
1178
1383
|
__name: "SparkModalDialog",
|
|
1179
1384
|
props: {
|
|
1180
1385
|
title: {
|
|
@@ -1224,7 +1429,7 @@ const q = new Os(), En = {
|
|
|
1224
1429
|
"input"
|
|
1225
1430
|
],
|
|
1226
1431
|
setup(e) {
|
|
1227
|
-
const s = e, t = $(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons),
|
|
1432
|
+
const s = e, t = $(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), a = $(() => {
|
|
1228
1433
|
switch (t.value.length) {
|
|
1229
1434
|
case 1:
|
|
1230
1435
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -1240,7 +1445,7 @@ const q = new Os(), En = {
|
|
|
1240
1445
|
success: "farCheckCircle",
|
|
1241
1446
|
warning: "farExclamationTriangle",
|
|
1242
1447
|
danger: "farCircleXmark"
|
|
1243
|
-
}, n = $(() => s.icon || l[s.type]),
|
|
1448
|
+
}, n = $(() => s.icon || l[s.type]), o = $(() => ({
|
|
1244
1449
|
info: "bg-blue-100",
|
|
1245
1450
|
success: "bg-green-100",
|
|
1246
1451
|
warning: "bg-yellow-100",
|
|
@@ -1252,36 +1457,36 @@ const q = new Os(), En = {
|
|
|
1252
1457
|
danger: "text-red-400"
|
|
1253
1458
|
})[s.type]);
|
|
1254
1459
|
return (r, i) => {
|
|
1255
|
-
const u =
|
|
1256
|
-
return m(),
|
|
1257
|
-
n.value ? (m(),
|
|
1460
|
+
const u = F("font-awesome-icon");
|
|
1461
|
+
return m(), g("div", ya, [
|
|
1462
|
+
n.value ? (m(), g("div", {
|
|
1258
1463
|
key: 0,
|
|
1259
|
-
class:
|
|
1464
|
+
class: V(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
|
|
1260
1465
|
}, [
|
|
1261
|
-
|
|
1262
|
-
icon:
|
|
1263
|
-
class:
|
|
1466
|
+
k(u, {
|
|
1467
|
+
icon: S(O)[n.value],
|
|
1468
|
+
class: V(["h-5 w-5", c.value])
|
|
1264
1469
|
}, null, 8, ["icon", "class"])
|
|
1265
|
-
], 2)) :
|
|
1470
|
+
], 2)) : T("", !0),
|
|
1266
1471
|
f("div", {
|
|
1267
|
-
class:
|
|
1472
|
+
class: V(["text-center", { "mt-3 sm:mt-5": n.value }])
|
|
1268
1473
|
}, [
|
|
1269
|
-
e.title ? (m(),
|
|
1270
|
-
e.message ? (m(),
|
|
1474
|
+
e.title ? (m(), g("h3", va, M(e.title), 1)) : T("", !0),
|
|
1475
|
+
e.message ? (m(), g("div", {
|
|
1271
1476
|
key: 1,
|
|
1272
|
-
class:
|
|
1273
|
-
}, M(e.message), 3)) :
|
|
1477
|
+
class: V([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
1478
|
+
}, M(e.message), 3)) : T("", !0)
|
|
1274
1479
|
], 2),
|
|
1275
1480
|
f("div", {
|
|
1276
|
-
class:
|
|
1481
|
+
class: V(["mt-5 sm:mt-6", a.value])
|
|
1277
1482
|
}, [
|
|
1278
|
-
(m(!0),
|
|
1483
|
+
(m(!0), g(E, null, I(t.value, (d, p) => (m(), H(S(X), {
|
|
1279
1484
|
key: p,
|
|
1280
1485
|
variant: d.variant,
|
|
1281
|
-
onClick: (
|
|
1486
|
+
onClick: (b) => r.$emit(d.event, d)
|
|
1282
1487
|
}, {
|
|
1283
|
-
default:
|
|
1284
|
-
|
|
1488
|
+
default: P(() => [
|
|
1489
|
+
A(M(d.text), 1)
|
|
1285
1490
|
]),
|
|
1286
1491
|
_: 2
|
|
1287
1492
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -1290,17 +1495,17 @@ const q = new Os(), En = {
|
|
|
1290
1495
|
};
|
|
1291
1496
|
}
|
|
1292
1497
|
};
|
|
1293
|
-
class
|
|
1498
|
+
class xa {
|
|
1294
1499
|
constructor() {
|
|
1295
|
-
this.state =
|
|
1500
|
+
this.state = K({
|
|
1296
1501
|
isVisible: !1,
|
|
1297
1502
|
content: null,
|
|
1298
1503
|
props: {},
|
|
1299
1504
|
eventHandlers: {}
|
|
1300
1505
|
});
|
|
1301
1506
|
}
|
|
1302
|
-
show = (s, t = {},
|
|
1303
|
-
this.state.content = me(s), this.state.props = t, this.state.eventHandlers =
|
|
1507
|
+
show = (s, t = {}, a = {}) => {
|
|
1508
|
+
this.state.content = me(s), this.state.props = t, this.state.eventHandlers = a, this.state.isVisible = !0;
|
|
1304
1509
|
};
|
|
1305
1510
|
hide = () => {
|
|
1306
1511
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
@@ -1319,21 +1524,21 @@ class mo {
|
|
|
1319
1524
|
*/
|
|
1320
1525
|
confirm = (s = {}) => new Promise((t) => {
|
|
1321
1526
|
const {
|
|
1322
|
-
title:
|
|
1527
|
+
title: a = "Confirm",
|
|
1323
1528
|
message: l = "Are you sure?",
|
|
1324
1529
|
type: n = "warning",
|
|
1325
|
-
confirmText:
|
|
1530
|
+
confirmText: o = "Confirm",
|
|
1326
1531
|
cancelText: c = "Cancel",
|
|
1327
1532
|
confirmVariant: r = "primary"
|
|
1328
1533
|
} = s;
|
|
1329
1534
|
this.show(
|
|
1330
|
-
|
|
1535
|
+
ba,
|
|
1331
1536
|
{
|
|
1332
|
-
title:
|
|
1537
|
+
title: a,
|
|
1333
1538
|
message: l,
|
|
1334
1539
|
type: n,
|
|
1335
1540
|
buttons: [
|
|
1336
|
-
{ text:
|
|
1541
|
+
{ text: o, variant: r, event: "confirm" },
|
|
1337
1542
|
{ text: c, variant: "secondary", event: "cancel" }
|
|
1338
1543
|
]
|
|
1339
1544
|
},
|
|
@@ -1348,20 +1553,20 @@ class mo {
|
|
|
1348
1553
|
);
|
|
1349
1554
|
});
|
|
1350
1555
|
}
|
|
1351
|
-
const
|
|
1556
|
+
const re = new xa(), ka = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, wa = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, _a = {
|
|
1352
1557
|
__name: "SparkModalContainer",
|
|
1353
1558
|
setup(e) {
|
|
1354
|
-
return (s, t) => (m(),
|
|
1559
|
+
return (s, t) => (m(), H(S(tt), {
|
|
1355
1560
|
as: "template",
|
|
1356
|
-
show:
|
|
1561
|
+
show: S(re).state.isVisible
|
|
1357
1562
|
}, {
|
|
1358
|
-
default:
|
|
1359
|
-
|
|
1563
|
+
default: P(() => [
|
|
1564
|
+
k(S(st), {
|
|
1360
1565
|
class: "relative z-1000",
|
|
1361
|
-
onClose:
|
|
1566
|
+
onClose: S(re).hide
|
|
1362
1567
|
}, {
|
|
1363
|
-
default:
|
|
1364
|
-
|
|
1568
|
+
default: P(() => [
|
|
1569
|
+
k(S(fe), {
|
|
1365
1570
|
as: "template",
|
|
1366
1571
|
enter: "ease-out duration-300",
|
|
1367
1572
|
"enter-from": "opacity-0",
|
|
@@ -1370,14 +1575,14 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1370
1575
|
"leave-from": "opacity-100",
|
|
1371
1576
|
"leave-to": "opacity-0"
|
|
1372
1577
|
}, {
|
|
1373
|
-
default:
|
|
1578
|
+
default: P(() => [...t[0] || (t[0] = [
|
|
1374
1579
|
f("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
1375
1580
|
])]),
|
|
1376
1581
|
_: 1
|
|
1377
1582
|
}),
|
|
1378
|
-
f("div",
|
|
1379
|
-
f("div",
|
|
1380
|
-
|
|
1583
|
+
f("div", ka, [
|
|
1584
|
+
f("div", wa, [
|
|
1585
|
+
k(S(fe), {
|
|
1381
1586
|
as: "template",
|
|
1382
1587
|
enter: "ease-out duration-300",
|
|
1383
1588
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -1386,10 +1591,10 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1386
1591
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
1387
1592
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1388
1593
|
}, {
|
|
1389
|
-
default:
|
|
1390
|
-
|
|
1391
|
-
default:
|
|
1392
|
-
(m(),
|
|
1594
|
+
default: P(() => [
|
|
1595
|
+
k(S(at), { 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" }, {
|
|
1596
|
+
default: P(() => [
|
|
1597
|
+
(m(), H(Z(S(re).state.content), q(S(re).state.props, Ae(S(re).state.eventHandlers)), null, 16))
|
|
1393
1598
|
]),
|
|
1394
1599
|
_: 1
|
|
1395
1600
|
})
|
|
@@ -1405,7 +1610,7 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1405
1610
|
_: 1
|
|
1406
1611
|
}, 8, ["show"]));
|
|
1407
1612
|
}
|
|
1408
|
-
},
|
|
1613
|
+
}, Sa = { class: "fixed inset-0 flex" }, Pe = {
|
|
1409
1614
|
__name: "SparkOverlay",
|
|
1410
1615
|
props: {
|
|
1411
1616
|
position: {
|
|
@@ -1420,27 +1625,27 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1420
1625
|
},
|
|
1421
1626
|
emits: ["close"],
|
|
1422
1627
|
setup(e, { emit: s }) {
|
|
1423
|
-
const t =
|
|
1628
|
+
const t = R(null), a = {
|
|
1424
1629
|
xs: "w-[250px]",
|
|
1425
1630
|
sm: "w-[300px]",
|
|
1426
1631
|
md: "w-[450px]",
|
|
1427
1632
|
lg: "w-[810px]",
|
|
1428
1633
|
xl: "w-[1000px]"
|
|
1429
|
-
}, l = e, n = s,
|
|
1634
|
+
}, l = e, n = s, o = $(() => a[l.overlayInstance.state.size] || a.md), c = () => {
|
|
1430
1635
|
l.overlayInstance.close(), n("close");
|
|
1431
1636
|
};
|
|
1432
|
-
return (r, i) => (m(),
|
|
1637
|
+
return (r, i) => (m(), H(S(tt), {
|
|
1433
1638
|
show: e.overlayInstance.state.isVisible,
|
|
1434
1639
|
as: "template"
|
|
1435
1640
|
}, {
|
|
1436
|
-
default:
|
|
1437
|
-
|
|
1641
|
+
default: P(() => [
|
|
1642
|
+
k(S(st), {
|
|
1438
1643
|
initialFocus: t.value,
|
|
1439
1644
|
class: "relative z-1000",
|
|
1440
1645
|
onClose: c
|
|
1441
1646
|
}, {
|
|
1442
|
-
default:
|
|
1443
|
-
|
|
1647
|
+
default: P(() => [
|
|
1648
|
+
k(S(fe), {
|
|
1444
1649
|
as: "template",
|
|
1445
1650
|
enter: "transition-opacity ease-linear duration-150",
|
|
1446
1651
|
"enter-from": "opacity-0",
|
|
@@ -1449,13 +1654,13 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1449
1654
|
"leave-from": "opacity-100",
|
|
1450
1655
|
"leave-to": "opacity-0"
|
|
1451
1656
|
}, {
|
|
1452
|
-
default:
|
|
1657
|
+
default: P(() => [...i[0] || (i[0] = [
|
|
1453
1658
|
f("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
|
|
1454
1659
|
])]),
|
|
1455
1660
|
_: 1
|
|
1456
1661
|
}),
|
|
1457
|
-
f("div",
|
|
1458
|
-
|
|
1662
|
+
f("div", Sa, [
|
|
1663
|
+
k(S(fe), {
|
|
1459
1664
|
as: "template",
|
|
1460
1665
|
enter: "transition ease-in-out duration-150 transform",
|
|
1461
1666
|
"enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
@@ -1464,18 +1669,18 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1464
1669
|
"leave-from": "translate-x-0 opacity-100",
|
|
1465
1670
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
1466
1671
|
}, {
|
|
1467
|
-
default:
|
|
1468
|
-
|
|
1672
|
+
default: P(() => [
|
|
1673
|
+
k(S(at), {
|
|
1469
1674
|
ref_key: "panelRef",
|
|
1470
1675
|
ref: t,
|
|
1471
|
-
class:
|
|
1676
|
+
class: V([
|
|
1472
1677
|
"flex py-2.5",
|
|
1473
|
-
|
|
1678
|
+
o.value,
|
|
1474
1679
|
e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
|
|
1475
1680
|
])
|
|
1476
1681
|
}, {
|
|
1477
|
-
default:
|
|
1478
|
-
(m(),
|
|
1682
|
+
default: P(() => [
|
|
1683
|
+
(m(), H(Z(e.overlayInstance.state.content), q(e.overlayInstance.state.props, Ae(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
1479
1684
|
]),
|
|
1480
1685
|
_: 1
|
|
1481
1686
|
}, 8, ["class"])
|
|
@@ -1490,34 +1695,34 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1490
1695
|
_: 1
|
|
1491
1696
|
}, 8, ["show"]));
|
|
1492
1697
|
}
|
|
1493
|
-
},
|
|
1698
|
+
}, Ca = (e) => {
|
|
1494
1699
|
if (e.includes(".")) {
|
|
1495
1700
|
const s = e.split(".");
|
|
1496
1701
|
e = s[s.length - 1];
|
|
1497
1702
|
}
|
|
1498
1703
|
return e.replace(/_/g, " ");
|
|
1499
|
-
},
|
|
1500
|
-
const
|
|
1501
|
-
if (!
|
|
1704
|
+
}, $a = (e, s, t) => {
|
|
1705
|
+
const a = s.querySelector(".relative");
|
|
1706
|
+
if (!a || a.querySelector(".spark-table-head-sorting"))
|
|
1502
1707
|
return;
|
|
1503
1708
|
const l = document.createElement("span");
|
|
1504
|
-
l.classList.add("spark-table-head-sorting"), l.innerHTML =
|
|
1505
|
-
const n = t.params.orderBy,
|
|
1506
|
-
return n === e &&
|
|
1709
|
+
l.classList.add("spark-table-head-sorting"), l.innerHTML = ee({ prefix: "fad", iconName: "sort" }).html + ee({ prefix: "fad", iconName: "sort-up" }).html + ee({ prefix: "fad", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
|
|
1710
|
+
const n = t.params.orderBy, o = t.params.sortedBy;
|
|
1711
|
+
return n === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
|
|
1507
1712
|
orderBy: e,
|
|
1508
1713
|
sortedBy: "desc"
|
|
1509
|
-
})) : n === e ? (
|
|
1714
|
+
})) : n === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
|
|
1510
1715
|
orderBy: e,
|
|
1511
1716
|
sortedBy: "asc"
|
|
1512
1717
|
}));
|
|
1513
1718
|
});
|
|
1514
|
-
},
|
|
1719
|
+
}, Ta = (e, s, t) => {
|
|
1515
1720
|
if (s.querySelector(".spark-table-head-filter"))
|
|
1516
1721
|
return;
|
|
1517
|
-
const
|
|
1518
|
-
l.type = "text", l.placeholder = "Filter...",
|
|
1519
|
-
const n =
|
|
1520
|
-
const r = c.target.value, i = `filter[${
|
|
1722
|
+
const a = document.createElement("div"), l = document.createElement("input");
|
|
1723
|
+
l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
|
|
1724
|
+
const n = ot(async (o, c) => {
|
|
1725
|
+
const r = c.target.value, i = `filter[${o}]`;
|
|
1521
1726
|
if (r)
|
|
1522
1727
|
return t.params[i] && t.params[i] === r ? void 0 : t.methods.applyParams({
|
|
1523
1728
|
page: 1,
|
|
@@ -1525,53 +1730,53 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1525
1730
|
});
|
|
1526
1731
|
await t.methods.removeParam(i);
|
|
1527
1732
|
}, 200);
|
|
1528
|
-
l.addEventListener("keyup", (
|
|
1529
|
-
},
|
|
1733
|
+
l.addEventListener("keyup", (o) => n(e, o)), s.appendChild(a);
|
|
1734
|
+
}, Pa = (e, s, t) => {
|
|
1530
1735
|
e.classList.add("spark-table-head"), t && t.columnSort && e.classList.add("can-sort"), t && t.columnFilter && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
|
|
1531
1736
|
const l = e.querySelector(".colHeader");
|
|
1532
|
-
l.classList.add("spark-table-head-title"), l.innerHTML =
|
|
1533
|
-
},
|
|
1737
|
+
l.classList.add("spark-table-head-title"), l.innerHTML = Ca(s);
|
|
1738
|
+
}, La = (e, s, t) => {
|
|
1534
1739
|
if (typeof e != "number")
|
|
1535
1740
|
return e;
|
|
1536
1741
|
if (e < 0)
|
|
1537
1742
|
return;
|
|
1538
|
-
let
|
|
1743
|
+
let a = 2;
|
|
1539
1744
|
const l = t.methods.colToProp(e), n = t.methods.getSettingsForProp(l);
|
|
1540
|
-
s.childElementCount === 1 && ((!n || !n.columnSort) &&
|
|
1541
|
-
},
|
|
1745
|
+
s.childElementCount === 1 && ((!n || !n.columnSort) && a--, (!n || !n.columnFilter) && a--, n && n.columnSort && $a(l, s, t), n && n.columnFilter && Ta(l, s, t)), (s.childElementCount === a || a === 0) && Pa(s, l, n);
|
|
1746
|
+
}, Ma = (e) => {
|
|
1542
1747
|
if (!e.hotInstance || !e.hotInstance.rootElement)
|
|
1543
1748
|
return;
|
|
1544
|
-
const s = e.params.orderBy, t = e.params.sortedBy,
|
|
1545
|
-
|
|
1749
|
+
const s = e.params.orderBy, t = e.params.sortedBy, a = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
|
|
1750
|
+
a.forEach((l) => {
|
|
1546
1751
|
l.classList.remove("asc", "desc");
|
|
1547
|
-
}), s && t &&
|
|
1548
|
-
const n = l.closest("th"),
|
|
1549
|
-
e.methods.colToProp(
|
|
1752
|
+
}), s && t && a.forEach((l) => {
|
|
1753
|
+
const n = l.closest("th"), o = Array.from(n.parentElement.children).indexOf(n);
|
|
1754
|
+
e.methods.colToProp(o) === s && l.classList.add(t);
|
|
1550
1755
|
});
|
|
1551
|
-
},
|
|
1756
|
+
}, Va = (e) => (s, t, a, l, n, o, c) => {
|
|
1552
1757
|
t.innerHTML = "", t.classList.add("spark-table-cell-actions");
|
|
1553
1758
|
const i = (c.rendererConfig || {}).actions || [];
|
|
1554
1759
|
if (i.length === 0)
|
|
1555
1760
|
return;
|
|
1556
|
-
const u = s.getSourceDataAtRow(s.toPhysicalRow(
|
|
1761
|
+
const u = s.getSourceDataAtRow(s.toPhysicalRow(a)), d = document.createElement("div");
|
|
1557
1762
|
d.classList.add("flex", "items-center", "gap-2"), i.forEach((p) => {
|
|
1558
1763
|
if (p.condition && typeof p.condition == "function" && !p.condition(u))
|
|
1559
1764
|
return;
|
|
1560
|
-
const
|
|
1561
|
-
if (
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1765
|
+
const b = document.createElement("button");
|
|
1766
|
+
if (b.type = "button", b.classList.add("spark-table-action-button"), p.icon) {
|
|
1767
|
+
const v = document.createElement("span");
|
|
1768
|
+
v.innerHTML = ee({ prefix: "far", iconName: p.icon }).html, v.classList.add("size-4"), b.appendChild(v);
|
|
1564
1769
|
}
|
|
1565
1770
|
if (p.label) {
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1771
|
+
const v = document.createElement("span");
|
|
1772
|
+
v.textContent = p.label, b.appendChild(v);
|
|
1568
1773
|
}
|
|
1569
|
-
|
|
1570
|
-
if (
|
|
1571
|
-
const
|
|
1572
|
-
if (!await
|
|
1774
|
+
b.addEventListener("click", async (v) => {
|
|
1775
|
+
if (v.preventDefault(), v.stopPropagation(), p.confirm) {
|
|
1776
|
+
const x = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
|
|
1777
|
+
if (!await re.confirm({
|
|
1573
1778
|
title: p.confirmTitle,
|
|
1574
|
-
message:
|
|
1779
|
+
message: x,
|
|
1575
1780
|
type: p.confirmType,
|
|
1576
1781
|
confirmText: p.confirmText,
|
|
1577
1782
|
cancelText: p.cancelText,
|
|
@@ -1580,9 +1785,9 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1580
1785
|
return;
|
|
1581
1786
|
}
|
|
1582
1787
|
p.event && e.methods.fireEvent(p.event, u), p.handler && typeof p.handler == "function" && p.handler(u);
|
|
1583
|
-
}), d.appendChild(
|
|
1788
|
+
}), d.appendChild(b);
|
|
1584
1789
|
}), t.appendChild(d);
|
|
1585
|
-
},
|
|
1790
|
+
}, Le = {
|
|
1586
1791
|
green: "bg-green-100 text-green-800",
|
|
1587
1792
|
red: "bg-red-100 text-red-800",
|
|
1588
1793
|
yellow: "bg-yellow-100 text-yellow-800",
|
|
@@ -1591,10 +1796,10 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1591
1796
|
purple: "bg-purple-100 text-purple-800",
|
|
1592
1797
|
pink: "bg-pink-100 text-pink-800",
|
|
1593
1798
|
indigo: "bg-indigo-100 text-indigo-800"
|
|
1594
|
-
},
|
|
1595
|
-
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !
|
|
1799
|
+
}, Ha = (e) => (s, t, a, l, n, o, c) => {
|
|
1800
|
+
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
|
|
1596
1801
|
return;
|
|
1597
|
-
const i = (c.rendererConfig || {}).colorMap || {}, u = i[
|
|
1802
|
+
const i = (c.rendererConfig || {}).colorMap || {}, u = i[o] || i[o?.toLowerCase()] || "gray", d = Le[u] || Le.gray, p = document.createElement("span");
|
|
1598
1803
|
p.classList.add(
|
|
1599
1804
|
"inline-flex",
|
|
1600
1805
|
"items-center",
|
|
@@ -1605,15 +1810,15 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1605
1810
|
"font-medium",
|
|
1606
1811
|
"capitalize",
|
|
1607
1812
|
...d.split(" ")
|
|
1608
|
-
), p.textContent =
|
|
1609
|
-
},
|
|
1813
|
+
), p.textContent = o, t.appendChild(p);
|
|
1814
|
+
}, Me = {
|
|
1610
1815
|
green: { bg: "bg-green-100", text: "text-green-500" },
|
|
1611
1816
|
red: { bg: "bg-red-100", text: "text-red-500" },
|
|
1612
1817
|
yellow: { bg: "bg-yellow-100", text: "text-yellow-500" },
|
|
1613
1818
|
blue: { bg: "bg-blue-100", text: "text-blue-500" },
|
|
1614
1819
|
gray: { bg: "bg-gray-100", text: "text-gray-500" },
|
|
1615
1820
|
purple: { bg: "bg-purple-100", text: "text-purple-500" }
|
|
1616
|
-
},
|
|
1821
|
+
}, Ra = (e) => {
|
|
1617
1822
|
if (e == null || e === "")
|
|
1618
1823
|
return !1;
|
|
1619
1824
|
if (typeof e == "boolean")
|
|
@@ -1625,99 +1830,99 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1625
1830
|
return s === "1" || s === "yes" || s === "true";
|
|
1626
1831
|
}
|
|
1627
1832
|
return !1;
|
|
1628
|
-
},
|
|
1833
|
+
}, Fa = (e) => (s, t, a, l, n, o, c) => {
|
|
1629
1834
|
t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
|
|
1630
|
-
const r = c.rendererConfig || {}, i =
|
|
1835
|
+
const r = c.rendererConfig || {}, i = Ra(o), u = i ? r.trueIcon || "check" : r.falseIcon || "xmark", d = i ? r.trueColor || "green" : r.falseColor || "red", p = r.size || 32, b = r.iconPrefix || "far", v = Me[d] || Me.gray;
|
|
1631
1836
|
t.dataset.copyValue = i ? "true" : "false";
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1837
|
+
const x = document.createElement("div");
|
|
1838
|
+
x.classList.add(
|
|
1634
1839
|
"inline-flex",
|
|
1635
1840
|
"items-center",
|
|
1636
1841
|
"justify-center",
|
|
1637
1842
|
"rounded-full",
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
),
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1843
|
+
v.bg,
|
|
1844
|
+
v.text
|
|
1845
|
+
), x.style.width = `${p}px`, x.style.height = `${p}px`;
|
|
1846
|
+
const h = document.createElement("span");
|
|
1847
|
+
h.innerHTML = ee({ prefix: b, iconName: u }).html, h.classList.add("flex", "items-center", "justify-center");
|
|
1643
1848
|
const w = Math.round(p * 0.5);
|
|
1644
|
-
|
|
1645
|
-
},
|
|
1849
|
+
h.style.fontSize = `${w}px`, x.appendChild(h), t.appendChild(x);
|
|
1850
|
+
}, Ea = (e, s = 2) => {
|
|
1646
1851
|
const t = Number(e);
|
|
1647
1852
|
if (isNaN(t)) return null;
|
|
1648
|
-
const
|
|
1853
|
+
const a = t < 0, n = Math.abs(t).toLocaleString("en-AU", {
|
|
1649
1854
|
minimumFractionDigits: s,
|
|
1650
1855
|
maximumFractionDigits: s
|
|
1651
1856
|
});
|
|
1652
|
-
return
|
|
1653
|
-
},
|
|
1857
|
+
return a ? `-$${n}` : `$${n}`;
|
|
1858
|
+
}, Oa = (e) => (s, t, a, l, n, o, c) => {
|
|
1654
1859
|
t.innerHTML = "", t.classList.add("spark-table-cell-currency");
|
|
1655
1860
|
const r = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = r;
|
|
1656
|
-
if (
|
|
1861
|
+
if (o == null || o === "") {
|
|
1657
1862
|
t.textContent = u;
|
|
1658
1863
|
return;
|
|
1659
1864
|
}
|
|
1660
|
-
const d =
|
|
1865
|
+
const d = Ea(o, i);
|
|
1661
1866
|
if (d === null) {
|
|
1662
1867
|
t.textContent = u;
|
|
1663
1868
|
return;
|
|
1664
1869
|
}
|
|
1665
1870
|
const p = document.createElement("span");
|
|
1666
1871
|
p.textContent = d, t.appendChild(p);
|
|
1667
|
-
},
|
|
1668
|
-
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !
|
|
1872
|
+
}, Aa = (e) => (s, t, a, l, n, o, c) => {
|
|
1873
|
+
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
|
|
1669
1874
|
return;
|
|
1670
|
-
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(
|
|
1671
|
-
let u =
|
|
1672
|
-
r.href && (typeof r.href == "function" ? u = r.href(i) : r.href === "email" ? u = `mailto:${
|
|
1875
|
+
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(a));
|
|
1876
|
+
let u = o;
|
|
1877
|
+
r.href && (typeof r.href == "function" ? u = r.href(i) : r.href === "email" ? u = `mailto:${o}` : r.href === "tel" ? u = `tel:${o}` : typeof r.href == "string" && (u = i[r.href] || o));
|
|
1673
1878
|
const d = document.createElement("a");
|
|
1674
|
-
d.href = u, d.textContent =
|
|
1879
|
+
d.href = u, d.textContent = o, 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) => {
|
|
1675
1880
|
p.stopPropagation();
|
|
1676
1881
|
}), t.appendChild(d);
|
|
1677
|
-
},
|
|
1882
|
+
}, Ve = {
|
|
1678
1883
|
sm: "h-6 w-6",
|
|
1679
1884
|
md: "h-8 w-8",
|
|
1680
1885
|
lg: "h-12 w-12"
|
|
1681
|
-
},
|
|
1682
|
-
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !
|
|
1886
|
+
}, Ba = (e) => (s, t, a, l, n, o, c) => {
|
|
1887
|
+
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
|
|
1683
1888
|
return;
|
|
1684
|
-
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(
|
|
1685
|
-
let
|
|
1686
|
-
typeof r.alt == "string" && i[r.alt] && (
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
},
|
|
1690
|
-
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !
|
|
1889
|
+
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(a)), u = r.size || "md", d = Ve[u] || Ve.md, p = r.rounded !== !1;
|
|
1890
|
+
let b = r.alt || "";
|
|
1891
|
+
typeof r.alt == "string" && i[r.alt] && (b = i[r.alt]);
|
|
1892
|
+
const v = document.createElement("img");
|
|
1893
|
+
v.src = o, v.alt = b, v.classList.add(...d.split(" "), "object-cover"), p ? v.classList.add("rounded-full") : v.classList.add("rounded"), t.appendChild(v);
|
|
1894
|
+
}, Da = (e) => (s, t, a, l, n, o, c) => {
|
|
1895
|
+
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
|
|
1691
1896
|
return;
|
|
1692
1897
|
const r = c.rendererConfig || {}, i = r.format || "short", u = r.locale || "en-US";
|
|
1693
|
-
let d =
|
|
1898
|
+
let d = o;
|
|
1694
1899
|
try {
|
|
1695
|
-
const
|
|
1696
|
-
isNaN(
|
|
1900
|
+
const b = new Date(o);
|
|
1901
|
+
isNaN(b.getTime()) ? d = o : typeof i == "function" ? d = i(b) : i === "short" ? d = b.toLocaleDateString(u) : i === "long" ? d = b.toLocaleDateString(u, {
|
|
1697
1902
|
year: "numeric",
|
|
1698
1903
|
month: "long",
|
|
1699
1904
|
day: "numeric"
|
|
1700
|
-
}) : i === "relative" ? d =
|
|
1701
|
-
} catch (
|
|
1702
|
-
console.error("Error formatting date:",
|
|
1905
|
+
}) : i === "relative" ? d = ja(b) : i === "datetime" ? d = b.toLocaleString(u) : d = b.toLocaleDateString(u);
|
|
1906
|
+
} catch (b) {
|
|
1907
|
+
console.error("Error formatting date:", b), d = o;
|
|
1703
1908
|
}
|
|
1704
1909
|
const p = document.createElement("span");
|
|
1705
1910
|
p.textContent = d, t.appendChild(p);
|
|
1706
1911
|
};
|
|
1707
|
-
function
|
|
1708
|
-
const t = /* @__PURE__ */ new Date() - e,
|
|
1709
|
-
return
|
|
1912
|
+
function ja(e) {
|
|
1913
|
+
const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), n = Math.floor(l / 60), o = Math.floor(n / 24), c = Math.floor(o / 30), r = Math.floor(o / 365), i = t > 0;
|
|
1914
|
+
return a < 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" : ""}` : o < 30 ? i ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 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" : ""}`;
|
|
1710
1915
|
}
|
|
1711
|
-
const
|
|
1916
|
+
const za = (e) => {
|
|
1712
1917
|
const s = ["th", "st", "nd", "rd"], t = e % 100;
|
|
1713
1918
|
return e + (s[(t - 20) % 10] || s[t] || s[0]);
|
|
1714
|
-
},
|
|
1919
|
+
}, N = (e, s = 2) => String(e).padStart(s, "0"), ve = /* @__PURE__ */ new Map(), Ia = (e, s) => {
|
|
1715
1920
|
const t = `${e}:${JSON.stringify(s)}`;
|
|
1716
|
-
return
|
|
1717
|
-
}, ce = (e, s, t,
|
|
1718
|
-
const
|
|
1719
|
-
return
|
|
1720
|
-
},
|
|
1921
|
+
return ve.has(t) || ve.set(t, new Intl.DateTimeFormat(e, s)), ve.get(t);
|
|
1922
|
+
}, ce = (e, s, t, a) => {
|
|
1923
|
+
const o = Ia(s, t).formatToParts(e).find((c) => c.type === a);
|
|
1924
|
+
return o ? o.value : "";
|
|
1925
|
+
}, Na = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
|
|
1721
1926
|
e.year,
|
|
1722
1927
|
e.month - 1,
|
|
1723
1928
|
e.day,
|
|
@@ -1725,8 +1930,8 @@ const Ao = (e) => {
|
|
|
1725
1930
|
e.minute || 0,
|
|
1726
1931
|
e.second || 0,
|
|
1727
1932
|
e.millisecond || 0
|
|
1728
|
-
),
|
|
1729
|
-
const s = e.hour || 0, t = s % 12 || 12,
|
|
1933
|
+
), Za = (e) => {
|
|
1934
|
+
const s = e.hour || 0, t = s % 12 || 12, a = s >= 12;
|
|
1730
1935
|
return {
|
|
1731
1936
|
year: e.year,
|
|
1732
1937
|
month: e.month,
|
|
@@ -1740,49 +1945,49 @@ const Ao = (e) => {
|
|
|
1740
1945
|
millisecond: e.millisecond || 0,
|
|
1741
1946
|
dayOfWeek: e.dayOfWeek,
|
|
1742
1947
|
// 1=Monday, 7=Sunday in Temporal
|
|
1743
|
-
isPM:
|
|
1948
|
+
isPM: a,
|
|
1744
1949
|
quarter: Math.ceil(e.month / 3)
|
|
1745
1950
|
};
|
|
1746
1951
|
}, He = (e, s = !0) => {
|
|
1747
1952
|
if (!e.offsetNanoseconds && e.offsetNanoseconds !== 0)
|
|
1748
1953
|
return "";
|
|
1749
|
-
const t = Math.round(e.offsetNanoseconds / 6e10),
|
|
1750
|
-
return s ? `${
|
|
1751
|
-
},
|
|
1752
|
-
const t =
|
|
1954
|
+
const t = Math.round(e.offsetNanoseconds / 6e10), a = t >= 0 ? "+" : "-", l = Math.abs(t), n = Math.floor(l / 60), o = l % 60;
|
|
1955
|
+
return s ? `${a}${N(n)}:${N(o)}` : `${a}${N(n)}${N(o)}`;
|
|
1956
|
+
}, qa = (e, s) => {
|
|
1957
|
+
const t = Za(e), a = Na(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
|
|
1753
1958
|
return [
|
|
1754
1959
|
// Year
|
|
1755
1960
|
["YYYY", () => String(t.year)],
|
|
1756
1961
|
["YY", () => String(t.year).slice(-2)],
|
|
1757
1962
|
// Month
|
|
1758
|
-
["MMMM", () => ce(
|
|
1759
|
-
["MMM", () => ce(
|
|
1760
|
-
["MM", () =>
|
|
1963
|
+
["MMMM", () => ce(a, s, { month: "long" }, "month")],
|
|
1964
|
+
["MMM", () => ce(a, s, { month: "short" }, "month")],
|
|
1965
|
+
["MM", () => N(t.month)],
|
|
1761
1966
|
["M", () => String(t.month)],
|
|
1762
1967
|
// Day of month
|
|
1763
|
-
["DD", () =>
|
|
1764
|
-
["Do", () =>
|
|
1968
|
+
["DD", () => N(t.day)],
|
|
1969
|
+
["Do", () => za(t.day)],
|
|
1765
1970
|
["D", () => String(t.day)],
|
|
1766
1971
|
// Day of week
|
|
1767
|
-
["dddd", () => ce(
|
|
1768
|
-
["ddd", () => ce(
|
|
1769
|
-
["dd", () => ce(
|
|
1972
|
+
["dddd", () => ce(a, s, { weekday: "long" }, "weekday")],
|
|
1973
|
+
["ddd", () => ce(a, s, { weekday: "short" }, "weekday")],
|
|
1974
|
+
["dd", () => ce(a, s, { weekday: "short" }, "weekday").slice(0, 2)],
|
|
1770
1975
|
["d", () => String(l)],
|
|
1771
1976
|
// Hour
|
|
1772
|
-
["HH", () =>
|
|
1977
|
+
["HH", () => N(t.hour24)],
|
|
1773
1978
|
["H", () => String(t.hour24)],
|
|
1774
|
-
["hh", () =>
|
|
1979
|
+
["hh", () => N(t.hour12)],
|
|
1775
1980
|
["h", () => String(t.hour12)],
|
|
1776
|
-
["kk", () =>
|
|
1981
|
+
["kk", () => N(t.hourFrom1)],
|
|
1777
1982
|
["k", () => String(t.hourFrom1)],
|
|
1778
1983
|
// Minute
|
|
1779
|
-
["mm", () =>
|
|
1984
|
+
["mm", () => N(t.minute)],
|
|
1780
1985
|
["m", () => String(t.minute)],
|
|
1781
1986
|
// Second
|
|
1782
|
-
["ss", () =>
|
|
1987
|
+
["ss", () => N(t.second)],
|
|
1783
1988
|
["s", () => String(t.second)],
|
|
1784
1989
|
// Millisecond
|
|
1785
|
-
["SSS", () =>
|
|
1990
|
+
["SSS", () => N(t.millisecond, 3)],
|
|
1786
1991
|
// AM/PM
|
|
1787
1992
|
["A", () => t.isPM ? "PM" : "AM"],
|
|
1788
1993
|
["a", () => t.isPM ? "pm" : "am"],
|
|
@@ -1792,11 +1997,11 @@ const Ao = (e) => {
|
|
|
1792
1997
|
// Quarter
|
|
1793
1998
|
["Q", () => String(t.quarter)],
|
|
1794
1999
|
// Unix timestamp
|
|
1795
|
-
["x", () => String(e.epochMilliseconds ??
|
|
1796
|
-
["X", () => String(Math.floor((e.epochMilliseconds ??
|
|
2000
|
+
["x", () => String(e.epochMilliseconds ?? a.getTime())],
|
|
2001
|
+
["X", () => String(Math.floor((e.epochMilliseconds ?? a.getTime()) / 1e3))]
|
|
1797
2002
|
];
|
|
1798
|
-
},
|
|
1799
|
-
const { locale:
|
|
2003
|
+
}, Ua = (e, s, t = {}) => {
|
|
2004
|
+
const { locale: a = "en-US" } = t;
|
|
1800
2005
|
if (!e)
|
|
1801
2006
|
return "";
|
|
1802
2007
|
let l = e;
|
|
@@ -1811,64 +2016,64 @@ const Ao = (e) => {
|
|
|
1811
2016
|
} catch (r) {
|
|
1812
2017
|
return console.error("Failed to parse date string:", e, r), e;
|
|
1813
2018
|
}
|
|
1814
|
-
const n =
|
|
2019
|
+
const n = qa(l, a), o = n.map(([r]) => r).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${o})`, "g");
|
|
1815
2020
|
return s.replace(c, (r, i, u) => {
|
|
1816
2021
|
if (i !== void 0)
|
|
1817
2022
|
return i;
|
|
1818
2023
|
const d = n.find(([p]) => p === u);
|
|
1819
2024
|
return d ? d[1]() : r;
|
|
1820
2025
|
});
|
|
1821
|
-
},
|
|
1822
|
-
const { fromTimezone: t, toTimezone:
|
|
2026
|
+
}, Ka = (e, s = {}) => {
|
|
2027
|
+
const { fromTimezone: t, toTimezone: a } = s;
|
|
1823
2028
|
if (!e)
|
|
1824
2029
|
return null;
|
|
1825
2030
|
const l = e.replace(" ", "T");
|
|
1826
|
-
return t &&
|
|
1827
|
-
},
|
|
2031
|
+
return t && a ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(a) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
|
|
2032
|
+
}, Ga = (e) => (s, t, a, l, n, o, c) => {
|
|
1828
2033
|
t.innerHTML = "", t.classList.add("spark-table-cell-datetime");
|
|
1829
2034
|
const r = c.rendererConfig || {}, {
|
|
1830
2035
|
format: i = "DD MMM YYYY, HH:mm",
|
|
1831
2036
|
fromTimezone: u,
|
|
1832
2037
|
toTimezone: d,
|
|
1833
2038
|
locale: p = "en-US",
|
|
1834
|
-
emptyText:
|
|
2039
|
+
emptyText: b = ""
|
|
1835
2040
|
} = r;
|
|
1836
|
-
if (!
|
|
1837
|
-
t.textContent =
|
|
2041
|
+
if (!o) {
|
|
2042
|
+
t.textContent = b;
|
|
1838
2043
|
return;
|
|
1839
2044
|
}
|
|
1840
2045
|
try {
|
|
1841
|
-
const
|
|
1842
|
-
if (!
|
|
1843
|
-
t.textContent =
|
|
2046
|
+
const v = Ka(o, { fromTimezone: u, toTimezone: d });
|
|
2047
|
+
if (!v) {
|
|
2048
|
+
t.textContent = b;
|
|
1844
2049
|
return;
|
|
1845
2050
|
}
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1848
|
-
} catch (
|
|
1849
|
-
console.error("Error formatting datetime:",
|
|
2051
|
+
const x = Ua(v, i, { locale: p }), h = document.createElement("span");
|
|
2052
|
+
h.textContent = x, t.appendChild(h);
|
|
2053
|
+
} catch (v) {
|
|
2054
|
+
console.error("Error formatting datetime:", v, { value: o, format: i }), t.textContent = o;
|
|
1850
2055
|
}
|
|
1851
|
-
},
|
|
1852
|
-
ps(e, (t,
|
|
1853
|
-
fs.apply(null, [t,
|
|
1854
|
-
}),
|
|
1855
|
-
},
|
|
1856
|
-
|
|
1857
|
-
if (!
|
|
2056
|
+
}, Wa = /* @__PURE__ */ new Map(), G = (e, s) => {
|
|
2057
|
+
ps(e, (t, a, l, n, o, c, r) => {
|
|
2058
|
+
fs.apply(null, [t, a, l, n, o, c, r]), s(t, a, l, n, o, c, r);
|
|
2059
|
+
}), Wa.set(e, s);
|
|
2060
|
+
}, Ya = (e) => {
|
|
2061
|
+
G("spark.actions", Va(e)), G("spark.badge", Ha()), G("spark.boolean", Fa()), G("spark.currency", Oa()), G("spark.link", Aa()), G("spark.image", Ba()), G("spark.date", Da()), G("spark.datetime", Ga()), G("style.capitalize", (s, t, a, l, n, o) => {
|
|
2062
|
+
if (!o || o.length === 0) {
|
|
1858
2063
|
t.innerText = "";
|
|
1859
2064
|
return;
|
|
1860
2065
|
}
|
|
1861
2066
|
const c = document.createElement("span");
|
|
1862
|
-
c.innerHTML =
|
|
2067
|
+
c.innerHTML = o, c.classList.add("capitalize"), t.replaceChildren(c);
|
|
1863
2068
|
});
|
|
1864
|
-
},
|
|
1865
|
-
},
|
|
1866
|
-
const t =
|
|
1867
|
-
const
|
|
2069
|
+
}, Xa = () => {
|
|
2070
|
+
}, Ja = (e, s = {}) => {
|
|
2071
|
+
const t = Y(), a = te(), l = s.namespace, n = l === null, o = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${a.path}` : `spark-table:${l}`, d = (y, _ = "") => {
|
|
2072
|
+
const L = {};
|
|
1868
2073
|
return Object.keys(y).forEach((D) => {
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
}),
|
|
2074
|
+
const J = y[D], de = _ ? `${_}[${D}]` : D;
|
|
2075
|
+
J != null && (typeof J == "object" && !Array.isArray(J) ? Object.assign(L, d(J, de)) : L[de] = String(J));
|
|
2076
|
+
}), L;
|
|
1872
2077
|
}, p = () => {
|
|
1873
2078
|
if (c)
|
|
1874
2079
|
try {
|
|
@@ -1880,99 +2085,99 @@ const Ao = (e) => {
|
|
|
1880
2085
|
} catch (y) {
|
|
1881
2086
|
console.warn("Failed to save table state to localStorage:", y);
|
|
1882
2087
|
}
|
|
1883
|
-
},
|
|
2088
|
+
}, b = () => {
|
|
1884
2089
|
if (!c) return null;
|
|
1885
2090
|
try {
|
|
1886
2091
|
const y = localStorage.getItem(u);
|
|
1887
2092
|
if (!y) return null;
|
|
1888
|
-
const
|
|
2093
|
+
const _ = JSON.parse(y);
|
|
1889
2094
|
if (i > 0) {
|
|
1890
|
-
const
|
|
1891
|
-
if (
|
|
2095
|
+
const L = Date.now() - _.timestamp, D = i * 24 * 60 * 60 * 1e3;
|
|
2096
|
+
if (L > D)
|
|
1892
2097
|
return localStorage.removeItem(u), null;
|
|
1893
2098
|
}
|
|
1894
|
-
return
|
|
2099
|
+
return _.params;
|
|
1895
2100
|
} catch (y) {
|
|
1896
2101
|
return console.warn("Failed to load table state from localStorage:", y), null;
|
|
1897
2102
|
}
|
|
1898
|
-
},
|
|
2103
|
+
}, v = () => {
|
|
1899
2104
|
try {
|
|
1900
2105
|
localStorage.removeItem(u);
|
|
1901
2106
|
} catch (y) {
|
|
1902
2107
|
console.warn("Failed to clear table state from localStorage:", y);
|
|
1903
2108
|
}
|
|
1904
|
-
},
|
|
1905
|
-
if (!
|
|
1906
|
-
const y = { ...
|
|
2109
|
+
}, x = () => {
|
|
2110
|
+
if (!o) return;
|
|
2111
|
+
const y = { ...a.query };
|
|
1907
2112
|
if (n) {
|
|
1908
|
-
Object.keys(y).forEach((
|
|
1909
|
-
|
|
2113
|
+
Object.keys(y).forEach((L) => {
|
|
2114
|
+
h(L) && delete y[L];
|
|
1910
2115
|
});
|
|
1911
|
-
const
|
|
1912
|
-
Object.assign(y,
|
|
2116
|
+
const _ = d(e.params);
|
|
2117
|
+
Object.assign(y, _);
|
|
1913
2118
|
} else {
|
|
1914
|
-
Object.keys(y).forEach((
|
|
1915
|
-
(
|
|
2119
|
+
Object.keys(y).forEach((L) => {
|
|
2120
|
+
(L.startsWith(`${l}[`) || L === l) && delete y[L];
|
|
1916
2121
|
});
|
|
1917
|
-
const
|
|
1918
|
-
Object.assign(y,
|
|
2122
|
+
const _ = d(e.params, l);
|
|
2123
|
+
Object.assign(y, _);
|
|
1919
2124
|
}
|
|
1920
2125
|
t.replace({ query: y });
|
|
1921
|
-
},
|
|
1922
|
-
if (["page", "limit"].includes(y) &&
|
|
1923
|
-
const D = parseInt(
|
|
1924
|
-
return isNaN(D) ?
|
|
2126
|
+
}, h = (y) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(y) || y.includes("[")), w = (y, _) => {
|
|
2127
|
+
if (["page", "limit"].includes(y) && _ !== null && _ !== void 0) {
|
|
2128
|
+
const D = parseInt(_, 10);
|
|
2129
|
+
return isNaN(D) ? _ : D;
|
|
1925
2130
|
}
|
|
1926
|
-
return
|
|
1927
|
-
},
|
|
2131
|
+
return _;
|
|
2132
|
+
}, C = () => {
|
|
1928
2133
|
if (n)
|
|
1929
|
-
Object.keys(
|
|
1930
|
-
|
|
2134
|
+
Object.keys(a.query).forEach((y) => {
|
|
2135
|
+
h(y) && (e.params[y] = w(y, a.query[y]));
|
|
1931
2136
|
});
|
|
1932
2137
|
else {
|
|
1933
2138
|
const y = `${l}[`;
|
|
1934
|
-
Object.keys(
|
|
1935
|
-
if (
|
|
1936
|
-
const
|
|
1937
|
-
e.params[
|
|
2139
|
+
Object.keys(a.query).forEach((_) => {
|
|
2140
|
+
if (_.startsWith(y)) {
|
|
2141
|
+
const L = _.slice(y.length, -1);
|
|
2142
|
+
e.params[L] = w(L, a.query[_]);
|
|
1938
2143
|
}
|
|
1939
2144
|
});
|
|
1940
2145
|
}
|
|
1941
2146
|
};
|
|
1942
|
-
return
|
|
2147
|
+
return z(
|
|
1943
2148
|
() => e.params,
|
|
1944
2149
|
() => {
|
|
1945
|
-
|
|
2150
|
+
o && x(), c && p();
|
|
1946
2151
|
},
|
|
1947
2152
|
{ deep: !0 }
|
|
1948
|
-
), r &&
|
|
2153
|
+
), r && he(() => {
|
|
1949
2154
|
let y = !1;
|
|
1950
|
-
if (
|
|
1951
|
-
let
|
|
2155
|
+
if (o) {
|
|
2156
|
+
let _ = !1;
|
|
1952
2157
|
if (n)
|
|
1953
|
-
|
|
2158
|
+
_ = Object.keys(a.query).some((L) => h(L));
|
|
1954
2159
|
else {
|
|
1955
|
-
const
|
|
1956
|
-
|
|
1957
|
-
(D) => D.startsWith(
|
|
2160
|
+
const L = `${l}[`;
|
|
2161
|
+
_ = Object.keys(a.query).some(
|
|
2162
|
+
(D) => D.startsWith(L)
|
|
1958
2163
|
);
|
|
1959
2164
|
}
|
|
1960
|
-
|
|
2165
|
+
_ && (y = !0, C());
|
|
1961
2166
|
}
|
|
1962
2167
|
if (!y && c) {
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
}), Object.assign(e.params,
|
|
2168
|
+
const _ = b();
|
|
2169
|
+
_ && Object.keys(_).length > 0 && (Object.keys(_).forEach((L) => {
|
|
2170
|
+
_[L] = w(L, _[L]);
|
|
2171
|
+
}), Object.assign(e.params, _));
|
|
1967
2172
|
}
|
|
1968
2173
|
}), {
|
|
1969
|
-
syncToRoute:
|
|
1970
|
-
restoreFromRoute:
|
|
2174
|
+
syncToRoute: x,
|
|
2175
|
+
restoreFromRoute: C,
|
|
1971
2176
|
saveToStorage: p,
|
|
1972
|
-
loadFromStorage:
|
|
1973
|
-
clearStorage:
|
|
2177
|
+
loadFromStorage: b,
|
|
2178
|
+
clearStorage: v
|
|
1974
2179
|
};
|
|
1975
|
-
},
|
|
2180
|
+
}, Qa = { class: "flex items-center gap-4 py-3" }, eo = { class: "shrink-0" }, to = { class: "text-sm text-gray-700" }, so = { class: "font-medium" }, ao = { class: "font-medium" }, oo = { class: "font-medium" }, ro = {
|
|
1976
2181
|
__name: "SparkTablePaginationDetails",
|
|
1977
2182
|
props: {
|
|
1978
2183
|
sparkTable: {
|
|
@@ -1982,29 +2187,29 @@ const Ao = (e) => {
|
|
|
1982
2187
|
},
|
|
1983
2188
|
setup(e) {
|
|
1984
2189
|
const s = e;
|
|
1985
|
-
return (t,
|
|
1986
|
-
f("div",
|
|
1987
|
-
f("div",
|
|
1988
|
-
f("div",
|
|
1989
|
-
|
|
1990
|
-
f("span",
|
|
1991
|
-
|
|
1992
|
-
f("span",
|
|
1993
|
-
|
|
1994
|
-
f("span",
|
|
1995
|
-
|
|
2190
|
+
return (t, a) => (m(), g("div", null, [
|
|
2191
|
+
f("div", Qa, [
|
|
2192
|
+
f("div", eo, [
|
|
2193
|
+
f("div", to, [
|
|
2194
|
+
a[0] || (a[0] = A(" Showing ", -1)),
|
|
2195
|
+
f("span", so, M(s.sparkTable.response.meta.from), 1),
|
|
2196
|
+
a[1] || (a[1] = A(" to ", -1)),
|
|
2197
|
+
f("span", ao, M(s.sparkTable.response.meta.to), 1),
|
|
2198
|
+
a[2] || (a[2] = A(" of ", -1)),
|
|
2199
|
+
f("span", oo, M(s.sparkTable.response.meta.total), 1),
|
|
2200
|
+
a[3] || (a[3] = A(" results ", -1))
|
|
1996
2201
|
])
|
|
1997
2202
|
])
|
|
1998
2203
|
])
|
|
1999
2204
|
]));
|
|
2000
2205
|
}
|
|
2001
|
-
},
|
|
2206
|
+
}, no = { class: "flex items-center gap-4 px-4 py-3" }, lo = {
|
|
2002
2207
|
key: 0,
|
|
2003
2208
|
class: "shrink-0 ml-auto"
|
|
2004
|
-
},
|
|
2209
|
+
}, io = {
|
|
2005
2210
|
class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
|
|
2006
2211
|
"aria-label": "Pagination"
|
|
2007
|
-
},
|
|
2212
|
+
}, co = ["onClick"], uo = {
|
|
2008
2213
|
__name: "SparkTablePaginationPaging",
|
|
2009
2214
|
props: {
|
|
2010
2215
|
sparkTable: {
|
|
@@ -2014,67 +2219,67 @@ const Ao = (e) => {
|
|
|
2014
2219
|
},
|
|
2015
2220
|
emits: ["paginate"],
|
|
2016
2221
|
setup(e, { emit: s }) {
|
|
2017
|
-
const t = e,
|
|
2222
|
+
const t = e, a = s, l = (u) => {
|
|
2018
2223
|
n(t.sparkTable.params.page + u);
|
|
2019
2224
|
}, n = (u) => {
|
|
2020
|
-
u < 1 || u > t.sparkTable.response.meta.last_page ||
|
|
2225
|
+
u < 1 || u > t.sparkTable.response.meta.last_page || a("paginate", {
|
|
2021
2226
|
page: u
|
|
2022
2227
|
});
|
|
2023
|
-
},
|
|
2024
|
-
Math.floor((
|
|
2025
|
-
|
|
2228
|
+
}, o = $(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = $(() => t.sparkTable.computed.ready ? as(
|
|
2229
|
+
Math.floor((o.value - 1) / 10) * 10 + 1,
|
|
2230
|
+
o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
|
|
2026
2231
|
) : []), r = $(
|
|
2027
|
-
() => t.sparkTable.params.page <
|
|
2232
|
+
() => t.sparkTable.params.page < Q(t.sparkTable.response.meta, "last_page", 1)
|
|
2028
2233
|
), i = $(() => t.sparkTable.params.page > 1);
|
|
2029
2234
|
return (u, d) => {
|
|
2030
|
-
const p =
|
|
2031
|
-
return m(),
|
|
2032
|
-
f("div",
|
|
2033
|
-
c.value.length > 1 ? (m(),
|
|
2235
|
+
const p = F("font-awesome-icon");
|
|
2236
|
+
return m(), g("div", null, [
|
|
2237
|
+
f("div", no, [
|
|
2238
|
+
c.value.length > 1 ? (m(), g("div", lo, [
|
|
2034
2239
|
f("div", null, [
|
|
2035
|
-
f("nav",
|
|
2240
|
+
f("nav", io, [
|
|
2036
2241
|
f("a", {
|
|
2037
|
-
class:
|
|
2242
|
+
class: V([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"]),
|
|
2038
2243
|
href: "#",
|
|
2039
|
-
onClick: d[0] || (d[0] =
|
|
2244
|
+
onClick: d[0] || (d[0] = U((b) => l(-1), ["prevent"]))
|
|
2040
2245
|
}, [
|
|
2041
|
-
|
|
2042
|
-
icon:
|
|
2246
|
+
k(p, {
|
|
2247
|
+
icon: S(O).farChevronLeft,
|
|
2043
2248
|
class: "size-5"
|
|
2044
2249
|
}, null, 8, ["icon"])
|
|
2045
2250
|
], 2),
|
|
2046
|
-
(m(!0),
|
|
2047
|
-
key: `page-${
|
|
2251
|
+
(m(!0), g(E, null, I(c.value, (b) => (m(), g("a", {
|
|
2252
|
+
key: `page-${b}`,
|
|
2048
2253
|
href: "#",
|
|
2049
|
-
class:
|
|
2254
|
+
class: V([
|
|
2050
2255
|
"relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
|
|
2051
|
-
e.sparkTable.params.page ===
|
|
2256
|
+
e.sparkTable.params.page === b ? "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"
|
|
2052
2257
|
]),
|
|
2053
|
-
onClick: (
|
|
2054
|
-
}, M(
|
|
2258
|
+
onClick: (v) => n(b)
|
|
2259
|
+
}, M(b), 11, co))), 128)),
|
|
2055
2260
|
f("a", {
|
|
2056
|
-
class:
|
|
2057
|
-
onClick: d[1] || (d[1] =
|
|
2261
|
+
class: V([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"]),
|
|
2262
|
+
onClick: d[1] || (d[1] = U((b) => l(1), ["prevent"])),
|
|
2058
2263
|
href: "#"
|
|
2059
2264
|
}, [
|
|
2060
|
-
|
|
2061
|
-
icon:
|
|
2265
|
+
k(p, {
|
|
2266
|
+
icon: S(O).farChevronRight,
|
|
2062
2267
|
class: "size-5"
|
|
2063
2268
|
}, null, 8, ["icon"])
|
|
2064
2269
|
], 2)
|
|
2065
2270
|
])
|
|
2066
2271
|
])
|
|
2067
|
-
])) :
|
|
2272
|
+
])) : T("", !0)
|
|
2068
2273
|
])
|
|
2069
2274
|
]);
|
|
2070
2275
|
};
|
|
2071
2276
|
}
|
|
2072
|
-
},
|
|
2277
|
+
}, se = (e, s) => {
|
|
2073
2278
|
const t = e.__vccOpts || e;
|
|
2074
|
-
for (const [
|
|
2075
|
-
t[
|
|
2279
|
+
for (const [a, l] of s)
|
|
2280
|
+
t[a] = l;
|
|
2076
2281
|
return t;
|
|
2077
|
-
},
|
|
2282
|
+
}, po = { class: "spark-table-pagination-per-page" }, fo = {
|
|
2078
2283
|
__name: "SparkTablePaginationPerPage",
|
|
2079
2284
|
props: {
|
|
2080
2285
|
sparkTable: {
|
|
@@ -2084,19 +2289,19 @@ const Ao = (e) => {
|
|
|
2084
2289
|
},
|
|
2085
2290
|
emits: ["paginate"],
|
|
2086
2291
|
setup(e, { emit: s }) {
|
|
2087
|
-
const t = e,
|
|
2088
|
-
label: String(
|
|
2089
|
-
value:
|
|
2090
|
-
}))), n = (
|
|
2091
|
-
|
|
2292
|
+
const t = e, a = s, l = $(() => t.sparkTable.options.perPages.map((o) => ({
|
|
2293
|
+
label: String(o),
|
|
2294
|
+
value: o
|
|
2295
|
+
}))), n = (o) => {
|
|
2296
|
+
a("paginate", {
|
|
2092
2297
|
page: 1,
|
|
2093
|
-
limit: parseInt(
|
|
2298
|
+
limit: parseInt(o)
|
|
2094
2299
|
});
|
|
2095
2300
|
};
|
|
2096
|
-
return (
|
|
2097
|
-
const r =
|
|
2098
|
-
return m(),
|
|
2099
|
-
|
|
2301
|
+
return (o, c) => {
|
|
2302
|
+
const r = F("FormKit");
|
|
2303
|
+
return m(), g("div", po, [
|
|
2304
|
+
k(r, {
|
|
2100
2305
|
"model-value": e.sparkTable.params.limit,
|
|
2101
2306
|
type: "select",
|
|
2102
2307
|
options: l.value,
|
|
@@ -2108,7 +2313,7 @@ const Ao = (e) => {
|
|
|
2108
2313
|
]);
|
|
2109
2314
|
};
|
|
2110
2315
|
}
|
|
2111
|
-
},
|
|
2316
|
+
}, mo = /* @__PURE__ */ se(fo, [["__scopeId", "data-v-9ef8544b"]]), Re = {
|
|
2112
2317
|
__name: "SparkTableToolbar",
|
|
2113
2318
|
props: {
|
|
2114
2319
|
position: {
|
|
@@ -2118,18 +2323,18 @@ const Ao = (e) => {
|
|
|
2118
2323
|
}
|
|
2119
2324
|
},
|
|
2120
2325
|
setup(e) {
|
|
2121
|
-
const s = e, t = Be(),
|
|
2326
|
+
const s = e, t = Be(), a = $(() => !!t.default), l = $(() => {
|
|
2122
2327
|
const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
|
|
2123
2328
|
return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
|
|
2124
2329
|
});
|
|
2125
|
-
return (n,
|
|
2330
|
+
return (n, o) => a.value ? (m(), g("div", {
|
|
2126
2331
|
key: 0,
|
|
2127
|
-
class:
|
|
2332
|
+
class: V(l.value)
|
|
2128
2333
|
}, [
|
|
2129
2334
|
B(n.$slots, "default")
|
|
2130
|
-
], 2)) :
|
|
2335
|
+
], 2)) : T("", !0);
|
|
2131
2336
|
}
|
|
2132
|
-
},
|
|
2337
|
+
}, ho = { class: "spark-table-search" }, go = {
|
|
2133
2338
|
__name: "SparkTableSearch",
|
|
2134
2339
|
props: {
|
|
2135
2340
|
/** SparkTable instance object */
|
|
@@ -2148,33 +2353,33 @@ const Ao = (e) => {
|
|
|
2148
2353
|
}
|
|
2149
2354
|
},
|
|
2150
2355
|
setup(e) {
|
|
2151
|
-
const s = e, t =
|
|
2152
|
-
s.sparkTable.params[
|
|
2153
|
-
[
|
|
2356
|
+
const s = e, t = R(""), a = s.config.param || "search";
|
|
2357
|
+
s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2358
|
+
[a]: s.config.initialValue
|
|
2154
2359
|
}));
|
|
2155
|
-
const l =
|
|
2156
|
-
|
|
2360
|
+
const l = ot((o) => {
|
|
2361
|
+
o ? s.sparkTable.methods.applyParams({
|
|
2157
2362
|
page: 1,
|
|
2158
|
-
[
|
|
2159
|
-
}) : s.sparkTable.methods.removeParam(
|
|
2363
|
+
[a]: o
|
|
2364
|
+
}) : s.sparkTable.methods.removeParam(a);
|
|
2160
2365
|
}, s.config.debounce || 300);
|
|
2161
|
-
|
|
2162
|
-
l(
|
|
2366
|
+
z(t, (o) => {
|
|
2367
|
+
l(o);
|
|
2163
2368
|
});
|
|
2164
2369
|
const n = s.config.placeholder || "Search...";
|
|
2165
|
-
return
|
|
2166
|
-
() => s.sparkTable.params[
|
|
2167
|
-
(
|
|
2168
|
-
|
|
2370
|
+
return z(
|
|
2371
|
+
() => s.sparkTable.params[a],
|
|
2372
|
+
(o) => {
|
|
2373
|
+
o && o !== t.value ? t.value = o : !o && t.value && (t.value = "");
|
|
2169
2374
|
}
|
|
2170
|
-
), (
|
|
2171
|
-
const r =
|
|
2172
|
-
return m(),
|
|
2173
|
-
|
|
2375
|
+
), (o, c) => {
|
|
2376
|
+
const r = F("FormKit");
|
|
2377
|
+
return m(), g("div", ho, [
|
|
2378
|
+
k(r, q({
|
|
2174
2379
|
modelValue: t.value,
|
|
2175
2380
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2176
2381
|
type: "text",
|
|
2177
|
-
placeholder:
|
|
2382
|
+
placeholder: S(n),
|
|
2178
2383
|
suffixIcon: "search",
|
|
2179
2384
|
"outer-class": "!mb-0",
|
|
2180
2385
|
"wrapper-class": "!mb-0",
|
|
@@ -2183,7 +2388,7 @@ const Ao = (e) => {
|
|
|
2183
2388
|
]);
|
|
2184
2389
|
};
|
|
2185
2390
|
}
|
|
2186
|
-
},
|
|
2391
|
+
}, yo = /* @__PURE__ */ se(go, [["__scopeId", "data-v-976170dc"]]), vo = { class: "spark-table-filter-select" }, bo = {
|
|
2187
2392
|
__name: "SparkTableFilterSelect",
|
|
2188
2393
|
props: {
|
|
2189
2394
|
/** SparkTable instance object */
|
|
@@ -2199,32 +2404,32 @@ const Ao = (e) => {
|
|
|
2199
2404
|
}
|
|
2200
2405
|
},
|
|
2201
2406
|
setup(e) {
|
|
2202
|
-
const s = e, t =
|
|
2203
|
-
s.sparkTable.params[
|
|
2204
|
-
[
|
|
2407
|
+
const s = e, t = R(""), a = s.config.param || `filter[${s.config.key}]`;
|
|
2408
|
+
s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2409
|
+
[a]: s.config.initialValue
|
|
2205
2410
|
}));
|
|
2206
2411
|
const l = s.config.label || null, n = $(() => [
|
|
2207
2412
|
{ label: s.config.placeholder || "All", value: "" },
|
|
2208
2413
|
...s.config.options
|
|
2209
2414
|
]);
|
|
2210
|
-
return
|
|
2211
|
-
|
|
2415
|
+
return z(t, (o) => {
|
|
2416
|
+
o ? s.sparkTable.methods.applyParams({
|
|
2212
2417
|
page: 1,
|
|
2213
|
-
[
|
|
2214
|
-
}) : s.sparkTable.methods.removeParam(
|
|
2215
|
-
}),
|
|
2216
|
-
() => s.sparkTable.params[
|
|
2217
|
-
(
|
|
2218
|
-
|
|
2418
|
+
[a]: o
|
|
2419
|
+
}) : s.sparkTable.methods.removeParam(a);
|
|
2420
|
+
}), z(
|
|
2421
|
+
() => s.sparkTable.params[a],
|
|
2422
|
+
(o) => {
|
|
2423
|
+
o != null && o !== "" ? t.value !== o && (t.value = o) : t.value && (t.value = "");
|
|
2219
2424
|
}
|
|
2220
|
-
), (
|
|
2221
|
-
const r =
|
|
2222
|
-
return m(),
|
|
2223
|
-
|
|
2425
|
+
), (o, c) => {
|
|
2426
|
+
const r = F("FormKit");
|
|
2427
|
+
return m(), g("div", vo, [
|
|
2428
|
+
k(r, q({
|
|
2224
2429
|
modelValue: t.value,
|
|
2225
2430
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2226
2431
|
type: "select",
|
|
2227
|
-
label:
|
|
2432
|
+
label: S(l),
|
|
2228
2433
|
options: n.value,
|
|
2229
2434
|
placeholder: e.config.placeholder || "All",
|
|
2230
2435
|
"outer-class": "!mb-0",
|
|
@@ -2233,10 +2438,10 @@ const Ao = (e) => {
|
|
|
2233
2438
|
]);
|
|
2234
2439
|
};
|
|
2235
2440
|
}
|
|
2236
|
-
},
|
|
2441
|
+
}, xo = /* @__PURE__ */ se(bo, [["__scopeId", "data-v-642dbc69"]]), ko = { class: "spark-table-filter-buttons" }, wo = {
|
|
2237
2442
|
key: 0,
|
|
2238
2443
|
class: "spark-table-filter-buttons-label"
|
|
2239
|
-
},
|
|
2444
|
+
}, _o = {
|
|
2240
2445
|
__name: "SparkTableFilterButtons",
|
|
2241
2446
|
props: {
|
|
2242
2447
|
/** SparkTable instance object */
|
|
@@ -2252,34 +2457,34 @@ const Ao = (e) => {
|
|
|
2252
2457
|
}
|
|
2253
2458
|
},
|
|
2254
2459
|
setup(e) {
|
|
2255
|
-
const s = e, t =
|
|
2460
|
+
const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
|
|
2256
2461
|
s.sparkTable.params[l] !== void 0 ? t.value = s.sparkTable.params[l] : s.config.initialValue !== void 0 && (t.value = s.config.initialValue, s.config.initialValue !== null && s.sparkTable.methods.applyParams({
|
|
2257
2462
|
[l]: s.config.initialValue
|
|
2258
2463
|
}));
|
|
2259
|
-
const n = (c) => c == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === c,
|
|
2464
|
+
const n = (c) => c == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === c, o = (c) => {
|
|
2260
2465
|
t.value = c, c == null || c === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
|
|
2261
2466
|
page: 1,
|
|
2262
2467
|
[l]: c
|
|
2263
2468
|
});
|
|
2264
2469
|
};
|
|
2265
|
-
return
|
|
2470
|
+
return z(
|
|
2266
2471
|
() => s.sparkTable.params[l],
|
|
2267
2472
|
(c) => {
|
|
2268
2473
|
(c == null || c === "") && t.value ? t.value = null : c !== t.value && (t.value = c);
|
|
2269
2474
|
}
|
|
2270
|
-
), (c, r) => (m(),
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
default:
|
|
2274
|
-
(m(!0),
|
|
2475
|
+
), (c, r) => (m(), g("div", ko, [
|
|
2476
|
+
S(a) ? (m(), g("span", wo, M(S(a)), 1)) : T("", !0),
|
|
2477
|
+
k(na, { class: "isolate" }, {
|
|
2478
|
+
default: P(() => [
|
|
2479
|
+
(m(!0), g(E, null, I(e.config.options, (i) => (m(), H(X, {
|
|
2275
2480
|
key: i.value,
|
|
2276
2481
|
size: "xl",
|
|
2277
2482
|
"button-class": "px-3.5",
|
|
2278
2483
|
variant: n(i.value) ? "primary" : "secondary",
|
|
2279
|
-
onClick: (u) =>
|
|
2484
|
+
onClick: (u) => o(i.value)
|
|
2280
2485
|
}, {
|
|
2281
|
-
default:
|
|
2282
|
-
|
|
2486
|
+
default: P(() => [
|
|
2487
|
+
A(M(i.label), 1)
|
|
2283
2488
|
]),
|
|
2284
2489
|
_: 2
|
|
2285
2490
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -2288,7 +2493,7 @@ const Ao = (e) => {
|
|
|
2288
2493
|
})
|
|
2289
2494
|
]));
|
|
2290
2495
|
}
|
|
2291
|
-
},
|
|
2496
|
+
}, So = /* @__PURE__ */ se(_o, [["__scopeId", "data-v-01a49899"]]), Co = { class: "spark-table-date-picker" }, $o = {
|
|
2292
2497
|
__name: "SparkTableDatePicker",
|
|
2293
2498
|
props: {
|
|
2294
2499
|
/** SparkTable instance object */
|
|
@@ -2304,33 +2509,33 @@ const Ao = (e) => {
|
|
|
2304
2509
|
}
|
|
2305
2510
|
},
|
|
2306
2511
|
setup(e) {
|
|
2307
|
-
const s = e, t =
|
|
2512
|
+
const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = R(`${l}-0`);
|
|
2308
2513
|
return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2309
2514
|
[l]: s.config.initialValue
|
|
2310
|
-
})) : t.value = null,
|
|
2311
|
-
|
|
2515
|
+
})) : t.value = null, z(t, (o) => {
|
|
2516
|
+
o ? s.sparkTable.methods.applyParams({
|
|
2312
2517
|
page: 1,
|
|
2313
|
-
[l]:
|
|
2518
|
+
[l]: o
|
|
2314
2519
|
}) : s.sparkTable.methods.removeParam(l);
|
|
2315
|
-
}),
|
|
2520
|
+
}), z(
|
|
2316
2521
|
() => s.sparkTable.params[l],
|
|
2317
|
-
(
|
|
2318
|
-
if ((
|
|
2522
|
+
(o) => {
|
|
2523
|
+
if ((o == null || o === "") && t.value) {
|
|
2319
2524
|
t.value = null;
|
|
2320
2525
|
const c = parseInt(n.value.split("-").pop()) || 0;
|
|
2321
2526
|
n.value = `${l}-${c + 1}`;
|
|
2322
|
-
} else
|
|
2527
|
+
} else o && o !== t.value && (t.value = o);
|
|
2323
2528
|
}
|
|
2324
|
-
), (
|
|
2325
|
-
const r =
|
|
2326
|
-
return m(),
|
|
2327
|
-
(m(),
|
|
2529
|
+
), (o, c) => {
|
|
2530
|
+
const r = F("FormKit");
|
|
2531
|
+
return m(), g("div", Co, [
|
|
2532
|
+
(m(), H(r, q({
|
|
2328
2533
|
key: n.value,
|
|
2329
2534
|
modelValue: t.value,
|
|
2330
2535
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2331
2536
|
type: "datepicker",
|
|
2332
2537
|
"picker-only": "",
|
|
2333
|
-
label:
|
|
2538
|
+
label: S(a),
|
|
2334
2539
|
placeholder: e.config.placeholder || "Select date",
|
|
2335
2540
|
overlay: !0,
|
|
2336
2541
|
"value-format": "YYYY-MM-DD",
|
|
@@ -2341,7 +2546,7 @@ const Ao = (e) => {
|
|
|
2341
2546
|
]);
|
|
2342
2547
|
};
|
|
2343
2548
|
}
|
|
2344
|
-
},
|
|
2549
|
+
}, To = /* @__PURE__ */ se($o, [["__scopeId", "data-v-44ef9cb8"]]), Po = { class: "spark-table-reset" }, Lo = { key: 1 }, Mo = {
|
|
2345
2550
|
__name: "SparkTableReset",
|
|
2346
2551
|
props: {
|
|
2347
2552
|
/** SparkTable instance object */
|
|
@@ -2357,61 +2562,61 @@ const Ao = (e) => {
|
|
|
2357
2562
|
},
|
|
2358
2563
|
setup(e) {
|
|
2359
2564
|
const s = e, t = () => {
|
|
2360
|
-
const
|
|
2361
|
-
Object.entries(
|
|
2565
|
+
const a = s.sparkTable.plugins || {}, l = [], n = {};
|
|
2566
|
+
Object.entries(a).forEach(([i, u]) => {
|
|
2362
2567
|
if (!u || u.type === "reset" || !(typeof u.enabled == "function" ? u.enabled(s.sparkTable.params) : u.enabled))
|
|
2363
2568
|
return;
|
|
2364
2569
|
let p = null;
|
|
2365
2570
|
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));
|
|
2366
2571
|
});
|
|
2367
|
-
const
|
|
2572
|
+
const o = l.filter(
|
|
2368
2573
|
(i) => s.sparkTable.params[i] !== void 0 && s.sparkTable.params[i] !== null && s.sparkTable.params[i] !== ""
|
|
2369
2574
|
), c = Object.entries(n).filter(
|
|
2370
2575
|
([i, u]) => s.sparkTable.params[i] !== u
|
|
2371
2576
|
);
|
|
2372
|
-
if (
|
|
2577
|
+
if (o.length === 0 && c.length === 0)
|
|
2373
2578
|
return;
|
|
2374
|
-
|
|
2579
|
+
o.forEach((i) => {
|
|
2375
2580
|
delete s.sparkTable.params[i];
|
|
2376
2581
|
});
|
|
2377
2582
|
const r = Object.fromEntries(c);
|
|
2378
2583
|
s.sparkTable.methods.applyParams({ ...r, page: 1 });
|
|
2379
2584
|
};
|
|
2380
|
-
return (
|
|
2381
|
-
const n =
|
|
2382
|
-
return m(),
|
|
2383
|
-
|
|
2585
|
+
return (a, l) => {
|
|
2586
|
+
const n = F("font-awesome-icon");
|
|
2587
|
+
return m(), g("div", Po, [
|
|
2588
|
+
k(X, {
|
|
2384
2589
|
onClick: t,
|
|
2385
2590
|
variant: "secondary",
|
|
2386
2591
|
"button-class": "px-3.5",
|
|
2387
2592
|
size: "xl"
|
|
2388
2593
|
}, {
|
|
2389
|
-
default:
|
|
2390
|
-
e.config.icon ? (m(),
|
|
2594
|
+
default: P(() => [
|
|
2595
|
+
e.config.icon ? (m(), H(n, {
|
|
2391
2596
|
key: 0,
|
|
2392
2597
|
icon: ["far", e.config.icon],
|
|
2393
|
-
class:
|
|
2394
|
-
}, null, 8, ["icon", "class"])) :
|
|
2395
|
-
e.config.label ? (m(),
|
|
2598
|
+
class: V({ "mr-1.5": e.config.label })
|
|
2599
|
+
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
2600
|
+
e.config.label ? (m(), g("span", Lo, M(e.config.label), 1)) : T("", !0)
|
|
2396
2601
|
]),
|
|
2397
2602
|
_: 1
|
|
2398
2603
|
})
|
|
2399
2604
|
]);
|
|
2400
2605
|
};
|
|
2401
2606
|
}
|
|
2402
|
-
},
|
|
2607
|
+
}, Vo = /* @__PURE__ */ se(Mo, [["__scopeId", "data-v-0894e3bf"]]), Ho = { class: "spark-table" }, Ro = {
|
|
2403
2608
|
key: 1,
|
|
2404
2609
|
class: "pt-5"
|
|
2405
|
-
},
|
|
2610
|
+
}, Fo = {
|
|
2406
2611
|
key: 2,
|
|
2407
2612
|
class: "flex flex-col items-center justify-center py-16 text-gray-500 rounded-md border border-gray-300 bg-white"
|
|
2408
|
-
},
|
|
2613
|
+
}, Eo = { class: "flex items-center gap-x-3 ml-auto" }, _e = {
|
|
2409
2614
|
perPages: [15, 30, 50, 100, 200, 500],
|
|
2410
2615
|
limit: 15
|
|
2411
|
-
},
|
|
2616
|
+
}, Oo = {
|
|
2412
2617
|
page: 1,
|
|
2413
|
-
limit:
|
|
2414
|
-
},
|
|
2618
|
+
limit: _e.limit
|
|
2619
|
+
}, Fe = {
|
|
2415
2620
|
colHeaders: !0,
|
|
2416
2621
|
filters: !1,
|
|
2417
2622
|
stretchH: "all",
|
|
@@ -2421,7 +2626,7 @@ const Ao = (e) => {
|
|
|
2421
2626
|
tableClassName: "spark-table-table",
|
|
2422
2627
|
readOnlyCellClassName: "read-only",
|
|
2423
2628
|
licenseKey: "non-commercial-and-evaluation"
|
|
2424
|
-
},
|
|
2629
|
+
}, qn = {
|
|
2425
2630
|
__name: "SparkTable",
|
|
2426
2631
|
props: {
|
|
2427
2632
|
url: {
|
|
@@ -2433,7 +2638,7 @@ const Ao = (e) => {
|
|
|
2433
2638
|
dataTransformer: {
|
|
2434
2639
|
type: Function,
|
|
2435
2640
|
default: (e, s) => ({
|
|
2436
|
-
data:
|
|
2641
|
+
data: Q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((n) => a[n])) : e.data.data,
|
|
2437
2642
|
meta: {
|
|
2438
2643
|
last_page: e.data.last_page,
|
|
2439
2644
|
from: e.data.from,
|
|
@@ -2445,19 +2650,19 @@ const Ao = (e) => {
|
|
|
2445
2650
|
params: {
|
|
2446
2651
|
type: Object,
|
|
2447
2652
|
default() {
|
|
2448
|
-
return
|
|
2653
|
+
return Oo;
|
|
2449
2654
|
}
|
|
2450
2655
|
},
|
|
2451
2656
|
options: {
|
|
2452
2657
|
type: Object,
|
|
2453
2658
|
default() {
|
|
2454
|
-
return
|
|
2659
|
+
return _e;
|
|
2455
2660
|
}
|
|
2456
2661
|
},
|
|
2457
2662
|
settings: {
|
|
2458
2663
|
type: Object,
|
|
2459
2664
|
default() {
|
|
2460
|
-
return
|
|
2665
|
+
return Fe;
|
|
2461
2666
|
}
|
|
2462
2667
|
},
|
|
2463
2668
|
plugins: {
|
|
@@ -2485,260 +2690,260 @@ const Ao = (e) => {
|
|
|
2485
2690
|
"page-change"
|
|
2486
2691
|
],
|
|
2487
2692
|
setup(e, { expose: s, emit: t }) {
|
|
2488
|
-
const
|
|
2489
|
-
ds(), pe(ls), pe(is), pe(cs),
|
|
2490
|
-
const l = t, n =
|
|
2693
|
+
const a = e;
|
|
2694
|
+
ds(), pe(ls), pe(is), pe(cs), Q(a, "settings.nestedHeaders") && pe(us);
|
|
2695
|
+
const l = t, n = Se("axios"), o = R(null), c = R(!1), r = R(null);
|
|
2491
2696
|
let i = !1;
|
|
2492
2697
|
const u = {
|
|
2493
|
-
search:
|
|
2494
|
-
filterSelect:
|
|
2495
|
-
filterButtons:
|
|
2496
|
-
datePicker:
|
|
2497
|
-
reset:
|
|
2498
|
-
}, d =
|
|
2698
|
+
search: yo,
|
|
2699
|
+
filterSelect: xo,
|
|
2700
|
+
filterButtons: So,
|
|
2701
|
+
datePicker: To,
|
|
2702
|
+
reset: Vo
|
|
2703
|
+
}, d = K({
|
|
2499
2704
|
hotInstance: null,
|
|
2500
|
-
url: $(() =>
|
|
2501
|
-
plugins:
|
|
2705
|
+
url: $(() => a.url),
|
|
2706
|
+
plugins: a.plugins,
|
|
2502
2707
|
response: {},
|
|
2503
2708
|
params: {
|
|
2504
2709
|
page: 1,
|
|
2505
|
-
limit:
|
|
2710
|
+
limit: a.options.limit
|
|
2506
2711
|
},
|
|
2507
2712
|
methods: {
|
|
2508
|
-
applyParams: (
|
|
2509
|
-
|
|
2713
|
+
applyParams: (h) => {
|
|
2714
|
+
h && (d.params = {
|
|
2510
2715
|
...d.params,
|
|
2511
|
-
...
|
|
2716
|
+
...h
|
|
2512
2717
|
}, l("page-change", d.params));
|
|
2513
2718
|
},
|
|
2514
|
-
removeParam: async (
|
|
2515
|
-
d.params[
|
|
2719
|
+
removeParam: async (h) => {
|
|
2720
|
+
d.params[h] && (delete d.params[h], await d.methods.loadTable());
|
|
2516
2721
|
},
|
|
2517
|
-
loadTable: async (
|
|
2518
|
-
if (!(!
|
|
2519
|
-
c.value = !0, r.value = null, l("loading", !0),
|
|
2722
|
+
loadTable: async (h) => {
|
|
2723
|
+
if (!(!o.value || !o.value.hotInstance)) {
|
|
2724
|
+
c.value = !0, r.value = null, l("loading", !0), ge.start(), d.hotInstance = o.value.hotInstance;
|
|
2520
2725
|
try {
|
|
2521
|
-
if (
|
|
2522
|
-
const y = await
|
|
2523
|
-
d.response =
|
|
2524
|
-
} else if (
|
|
2525
|
-
const y = await n.get(
|
|
2726
|
+
if (a.dataProvider) {
|
|
2727
|
+
const y = await a.dataProvider(d.computed.params);
|
|
2728
|
+
d.response = a.dataTransformer(y, a);
|
|
2729
|
+
} else if (a.url) {
|
|
2730
|
+
const y = await n.get(a.url, {
|
|
2526
2731
|
params: d.computed.params
|
|
2527
2732
|
});
|
|
2528
|
-
d.response =
|
|
2733
|
+
d.response = a.dataTransformer(y, a);
|
|
2529
2734
|
} else {
|
|
2530
|
-
console.error("No data provider or URL provided"), c.value = !1, l("loading", !1),
|
|
2735
|
+
console.error("No data provider or URL provided"), c.value = !1, l("loading", !1), ge.done();
|
|
2531
2736
|
return;
|
|
2532
2737
|
}
|
|
2533
2738
|
if (i) return;
|
|
2534
2739
|
d.hotInstance.updateData(d.response.data), d.options.callback && typeof d.options.callback == "function" && await d.options.callback();
|
|
2535
2740
|
const w = d.hotInstance.getPlugin("autoColumnSize");
|
|
2536
|
-
|
|
2537
|
-
y.width || w.calculateColumnsWidth(
|
|
2741
|
+
Q(a.settings, "columns", []).forEach((y, _) => {
|
|
2742
|
+
y.width || w.calculateColumnsWidth(_, _, !0);
|
|
2538
2743
|
}), l("load", {
|
|
2539
2744
|
data: d.response.data,
|
|
2540
2745
|
meta: d.response.meta
|
|
2541
|
-
}),
|
|
2746
|
+
}), h && typeof h == "function" && h();
|
|
2542
2747
|
} catch (w) {
|
|
2543
2748
|
r.value = w, l("error", w), console.error("Error loading table data:", w);
|
|
2544
2749
|
} finally {
|
|
2545
|
-
c.value = !1, l("loading", !1),
|
|
2750
|
+
c.value = !1, l("loading", !1), ge.done();
|
|
2546
2751
|
}
|
|
2547
2752
|
}
|
|
2548
2753
|
},
|
|
2549
2754
|
// can't use sparkTable.hotInstance here because the ref isn't ready
|
|
2550
|
-
colToProp: (
|
|
2551
|
-
fireEvent: (
|
|
2552
|
-
l(
|
|
2755
|
+
colToProp: (h) => o.value.hotInstance.colToProp(h),
|
|
2756
|
+
fireEvent: (h, w) => {
|
|
2757
|
+
l(h, w);
|
|
2553
2758
|
},
|
|
2554
|
-
getSettingsForProp: (
|
|
2759
|
+
getSettingsForProp: (h) => os(Q(d.tableSettings, "columns"), { data: h }),
|
|
2555
2760
|
// Helper methods for easier param access
|
|
2556
2761
|
getParams: () => d.computed.params,
|
|
2557
|
-
getParam: (
|
|
2558
|
-
setParam: (
|
|
2559
|
-
d.methods.applyParams({ [
|
|
2762
|
+
getParam: (h) => d.computed.params[h],
|
|
2763
|
+
setParam: (h, w) => {
|
|
2764
|
+
d.methods.applyParams({ [h]: w });
|
|
2560
2765
|
},
|
|
2561
|
-
clearParam: (
|
|
2562
|
-
clearParams: (
|
|
2563
|
-
(Array.isArray(
|
|
2564
|
-
d.params[
|
|
2766
|
+
clearParam: (h) => d.methods.removeParam(h),
|
|
2767
|
+
clearParams: (h) => {
|
|
2768
|
+
(Array.isArray(h) ? h : [h]).forEach((C) => {
|
|
2769
|
+
d.params[C] !== void 0 && delete d.params[C];
|
|
2565
2770
|
}), d.methods.applyParams({ page: 1 });
|
|
2566
2771
|
}
|
|
2567
2772
|
},
|
|
2568
2773
|
computed: {
|
|
2569
2774
|
params: $(() => ({
|
|
2570
|
-
...
|
|
2775
|
+
...a.params,
|
|
2571
2776
|
...d.params
|
|
2572
2777
|
})),
|
|
2573
2778
|
ready: $(() => rs(d, "response.meta.last_page"))
|
|
2574
2779
|
},
|
|
2575
2780
|
options: $(() => ({
|
|
2576
|
-
...
|
|
2577
|
-
...
|
|
2781
|
+
..._e,
|
|
2782
|
+
...a.options
|
|
2578
2783
|
})),
|
|
2579
2784
|
tableSettings: $(() => ({
|
|
2580
|
-
...
|
|
2581
|
-
nestedHeaders:
|
|
2582
|
-
...!
|
|
2583
|
-
afterGetColHeader: (
|
|
2785
|
+
...Fe,
|
|
2786
|
+
nestedHeaders: Q(a.settings, "nestedHeaders", []),
|
|
2787
|
+
...!Q(a.settings, "nestedHeaders") && {
|
|
2788
|
+
afterGetColHeader: (h, w) => La(h, w, d)
|
|
2584
2789
|
},
|
|
2585
|
-
afterChange: (
|
|
2586
|
-
afterRender: () =>
|
|
2790
|
+
afterChange: (h, w) => Xa(),
|
|
2791
|
+
afterRender: () => Ma(d),
|
|
2587
2792
|
/**
|
|
2588
2793
|
* Prevent columns with explicit width from being stretched
|
|
2589
2794
|
* This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
|
|
2590
2795
|
* while letting others stretch normally
|
|
2591
2796
|
*/
|
|
2592
|
-
beforeStretchingColumnWidth: (
|
|
2593
|
-
const y =
|
|
2594
|
-
return y && y.width !== void 0 ? y.width :
|
|
2797
|
+
beforeStretchingColumnWidth: (h, w) => {
|
|
2798
|
+
const y = Q(a.settings, "columns", [])[w];
|
|
2799
|
+
return y && y.width !== void 0 ? y.width : h;
|
|
2595
2800
|
},
|
|
2596
2801
|
/**
|
|
2597
2802
|
* Copy displayed cell content instead of raw data values
|
|
2598
2803
|
* This ensures custom renderers copy their visual output, not the underlying data
|
|
2599
2804
|
*/
|
|
2600
|
-
beforeCopy: (
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2603
|
-
for (let
|
|
2604
|
-
for (let
|
|
2605
|
-
const D =
|
|
2805
|
+
beforeCopy: (h, w) => {
|
|
2806
|
+
const C = o.value?.hotInstance;
|
|
2807
|
+
C && w.forEach((y) => {
|
|
2808
|
+
for (let _ = y.startRow; _ <= y.endRow; _++)
|
|
2809
|
+
for (let L = y.startCol; L <= y.endCol; L++) {
|
|
2810
|
+
const D = C.getCell(_, L);
|
|
2606
2811
|
if (D) {
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2812
|
+
const J = _ - w[0].startRow, de = L - w[0].startCol;
|
|
2813
|
+
h[J][de] = D.dataset.copyValue ?? D.textContent ?? "";
|
|
2609
2814
|
}
|
|
2610
2815
|
}
|
|
2611
2816
|
});
|
|
2612
2817
|
},
|
|
2613
|
-
...
|
|
2818
|
+
...a.settings
|
|
2614
2819
|
}))
|
|
2615
2820
|
}), p = $(
|
|
2616
2821
|
() => d.computed.ready && d.response.data?.length === 0
|
|
2617
|
-
),
|
|
2618
|
-
if (!
|
|
2619
|
-
switch (
|
|
2822
|
+
), b = (h) => {
|
|
2823
|
+
if (!h) return null;
|
|
2824
|
+
switch (h.type) {
|
|
2620
2825
|
case "search":
|
|
2621
|
-
return
|
|
2826
|
+
return h.param || "search";
|
|
2622
2827
|
case "filterSelect":
|
|
2623
2828
|
case "filterButtons":
|
|
2624
2829
|
case "datePicker":
|
|
2625
|
-
return
|
|
2830
|
+
return h.param || `filter[${h.key}]`;
|
|
2626
2831
|
default:
|
|
2627
2832
|
return null;
|
|
2628
2833
|
}
|
|
2629
|
-
},
|
|
2630
|
-
if (
|
|
2834
|
+
}, v = (h) => h ? typeof h.enabled == "function" ? h.enabled(d.params) : h.enabled : !1, x = $(() => Object.entries(a.plugins).filter(([h, w]) => v(w)).map(([h, w]) => ({ name: h, config: w })));
|
|
2835
|
+
if (z(
|
|
2631
2836
|
() => ({ ...d.params }),
|
|
2632
2837
|
() => {
|
|
2633
|
-
const
|
|
2634
|
-
Object.values(
|
|
2635
|
-
const
|
|
2636
|
-
if (!
|
|
2637
|
-
const y =
|
|
2638
|
-
!y &&
|
|
2639
|
-
}),
|
|
2838
|
+
const h = [];
|
|
2839
|
+
Object.values(a.plugins).forEach((w) => {
|
|
2840
|
+
const C = b(w);
|
|
2841
|
+
if (!C) return;
|
|
2842
|
+
const y = v(w), _ = d.params[C] !== void 0;
|
|
2843
|
+
!y && _ && h.push(C);
|
|
2844
|
+
}), h.length > 0 && h.forEach((w) => {
|
|
2640
2845
|
delete d.params[w];
|
|
2641
2846
|
});
|
|
2642
2847
|
},
|
|
2643
2848
|
{ deep: !0, flush: "sync" }
|
|
2644
|
-
),
|
|
2645
|
-
const
|
|
2646
|
-
|
|
2647
|
-
namespace:
|
|
2648
|
-
syncToRoute: !!
|
|
2649
|
-
persistToStorage:
|
|
2849
|
+
), a.syncToRoute || a.persistToStorage) {
|
|
2850
|
+
const h = typeof a.syncToRoute == "string";
|
|
2851
|
+
Ja(d, {
|
|
2852
|
+
namespace: h ? a.syncToRoute : null,
|
|
2853
|
+
syncToRoute: !!a.syncToRoute,
|
|
2854
|
+
persistToStorage: a.persistToStorage
|
|
2650
2855
|
});
|
|
2651
2856
|
}
|
|
2652
|
-
return
|
|
2653
|
-
() =>
|
|
2857
|
+
return $e(
|
|
2858
|
+
() => a.params,
|
|
2654
2859
|
async () => {
|
|
2655
2860
|
d.params.page = 1, await d.methods.loadTable();
|
|
2656
2861
|
},
|
|
2657
2862
|
{ debounce: 50, maxWait: 1e3 }
|
|
2658
|
-
),
|
|
2863
|
+
), $e(
|
|
2659
2864
|
() => d.params,
|
|
2660
2865
|
async () => {
|
|
2661
2866
|
await d.methods.loadTable();
|
|
2662
2867
|
},
|
|
2663
2868
|
{ debounce: 50, maxWait: 1e3 }
|
|
2664
|
-
),
|
|
2665
|
-
() =>
|
|
2666
|
-
async (
|
|
2667
|
-
|
|
2869
|
+
), z(
|
|
2870
|
+
() => a.url,
|
|
2871
|
+
async (h, w) => {
|
|
2872
|
+
h !== w && (d.params.page = 1, await d.methods.loadTable());
|
|
2668
2873
|
}
|
|
2669
|
-
),
|
|
2874
|
+
), he(async () => {
|
|
2670
2875
|
await d.methods.loadTable(), l("ready");
|
|
2671
2876
|
}), ht(() => {
|
|
2672
2877
|
i = !0;
|
|
2673
|
-
}),
|
|
2878
|
+
}), Ya(d), s({
|
|
2674
2879
|
refresh: () => d.methods.loadTable(),
|
|
2675
2880
|
getParams: () => d.methods.getParams(),
|
|
2676
|
-
getParam: (
|
|
2677
|
-
setParam: (
|
|
2678
|
-
clearParam: (
|
|
2679
|
-
clearParams: (
|
|
2680
|
-
applyParams: (
|
|
2881
|
+
getParam: (h) => d.methods.getParam(h),
|
|
2882
|
+
setParam: (h, w) => d.methods.setParam(h, w),
|
|
2883
|
+
clearParam: (h) => d.methods.clearParam(h),
|
|
2884
|
+
clearParams: (h) => d.methods.clearParams(h),
|
|
2885
|
+
applyParams: (h) => d.methods.applyParams(h),
|
|
2681
2886
|
loading: c,
|
|
2682
2887
|
error: r,
|
|
2683
2888
|
sparkTable: d,
|
|
2684
|
-
table:
|
|
2685
|
-
}), (
|
|
2686
|
-
const
|
|
2687
|
-
return m(),
|
|
2688
|
-
d.computed.ready &&
|
|
2889
|
+
table: o
|
|
2890
|
+
}), (h, w) => {
|
|
2891
|
+
const C = F("font-awesome-icon");
|
|
2892
|
+
return m(), g("div", Ho, [
|
|
2893
|
+
d.computed.ready && x.value && x.value.length ? (m(), H(Re, {
|
|
2689
2894
|
key: 0,
|
|
2690
2895
|
position: "header"
|
|
2691
2896
|
}, {
|
|
2692
|
-
default:
|
|
2693
|
-
(m(!0),
|
|
2897
|
+
default: P(() => [
|
|
2898
|
+
(m(!0), g(E, null, I(x.value, (y) => (m(), H(Z(u[y.config.type]), {
|
|
2694
2899
|
key: y.name,
|
|
2695
|
-
class:
|
|
2900
|
+
class: V(y.config.align ? `self-${y.config.align}` : ""),
|
|
2696
2901
|
"spark-table": d,
|
|
2697
2902
|
config: y.config
|
|
2698
2903
|
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
2699
|
-
B(
|
|
2904
|
+
B(h.$slots, "header", {
|
|
2700
2905
|
sparkTable: d,
|
|
2701
2906
|
loading: c.value,
|
|
2702
2907
|
error: r.value
|
|
2703
2908
|
})
|
|
2704
2909
|
]),
|
|
2705
2910
|
_: 3
|
|
2706
|
-
})) : (m(),
|
|
2707
|
-
gt(
|
|
2911
|
+
})) : (m(), g("div", Ro)),
|
|
2912
|
+
gt(k(S(ns), {
|
|
2708
2913
|
"theme-name": "ht-theme-classic",
|
|
2709
2914
|
ref_key: "table",
|
|
2710
|
-
ref:
|
|
2915
|
+
ref: o,
|
|
2711
2916
|
settings: d.tableSettings
|
|
2712
2917
|
}, null, 8, ["settings"]), [
|
|
2713
2918
|
[yt, !p.value]
|
|
2714
2919
|
]),
|
|
2715
|
-
p.value ? (m(),
|
|
2716
|
-
|
|
2717
|
-
icon:
|
|
2920
|
+
p.value ? (m(), g("div", Fo, [
|
|
2921
|
+
k(C, {
|
|
2922
|
+
icon: S(O).farInbox,
|
|
2718
2923
|
class: "size-12 mb-4 text-gray-300"
|
|
2719
2924
|
}, null, 8, ["icon"]),
|
|
2720
2925
|
w[0] || (w[0] = f("p", { class: "text-sm" }, "No records found", -1))
|
|
2721
|
-
])) :
|
|
2722
|
-
d.computed.ready ? (m(),
|
|
2926
|
+
])) : T("", !0),
|
|
2927
|
+
d.computed.ready ? (m(), H(Re, {
|
|
2723
2928
|
key: 3,
|
|
2724
2929
|
position: "footer"
|
|
2725
2930
|
}, {
|
|
2726
|
-
default:
|
|
2727
|
-
p.value ?
|
|
2931
|
+
default: P(() => [
|
|
2932
|
+
p.value ? T("", !0) : (m(), H(ro, {
|
|
2728
2933
|
key: 0,
|
|
2729
2934
|
"spark-table": d
|
|
2730
2935
|
}, null, 8, ["spark-table"])),
|
|
2731
|
-
f("div",
|
|
2732
|
-
p.value ?
|
|
2936
|
+
f("div", Eo, [
|
|
2937
|
+
p.value ? T("", !0) : (m(), H(uo, {
|
|
2733
2938
|
key: 0,
|
|
2734
2939
|
"spark-table": d,
|
|
2735
2940
|
onPaginate: d.methods.applyParams
|
|
2736
2941
|
}, null, 8, ["spark-table", "onPaginate"])),
|
|
2737
|
-
|
|
2942
|
+
k(mo, {
|
|
2738
2943
|
"spark-table": d,
|
|
2739
2944
|
onPaginate: d.methods.applyParams
|
|
2740
2945
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2741
|
-
B(
|
|
2946
|
+
B(h.$slots, "footer", {
|
|
2742
2947
|
sparkTable: d,
|
|
2743
2948
|
loading: c.value,
|
|
2744
2949
|
error: r.value
|
|
@@ -2746,13 +2951,13 @@ const Ao = (e) => {
|
|
|
2746
2951
|
])
|
|
2747
2952
|
]),
|
|
2748
2953
|
_: 3
|
|
2749
|
-
})) :
|
|
2954
|
+
})) : T("", !0)
|
|
2750
2955
|
]);
|
|
2751
2956
|
};
|
|
2752
2957
|
}
|
|
2753
2958
|
};
|
|
2754
2959
|
function Ee() {
|
|
2755
|
-
const e =
|
|
2960
|
+
const e = K({
|
|
2756
2961
|
isVisible: !1,
|
|
2757
2962
|
content: null,
|
|
2758
2963
|
props: {},
|
|
@@ -2762,41 +2967,41 @@ function Ee() {
|
|
|
2762
2967
|
e.isVisible = !e.isVisible;
|
|
2763
2968
|
}, t = () => {
|
|
2764
2969
|
e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {}, e.size = "md";
|
|
2765
|
-
},
|
|
2970
|
+
}, a = () => {
|
|
2766
2971
|
e.isVisible = !0;
|
|
2767
|
-
}, l = (
|
|
2768
|
-
e.content = me(
|
|
2972
|
+
}, l = (o, c = {}, r = {}, i = {}) => {
|
|
2973
|
+
e.content = me(o), e.props = c, e.eventHandlers = r, e.size = i.size || "md";
|
|
2769
2974
|
};
|
|
2770
2975
|
return {
|
|
2771
2976
|
state: e,
|
|
2772
2977
|
toggle: s,
|
|
2773
2978
|
close: t,
|
|
2774
|
-
open:
|
|
2979
|
+
open: a,
|
|
2775
2980
|
setContent: l,
|
|
2776
|
-
show: (
|
|
2777
|
-
|
|
2981
|
+
show: (o, c = {}, r = {}, i = {}) => {
|
|
2982
|
+
o && l(o, c, r, i), a();
|
|
2778
2983
|
}
|
|
2779
2984
|
};
|
|
2780
2985
|
}
|
|
2781
|
-
class
|
|
2986
|
+
class Ao {
|
|
2782
2987
|
constructor() {
|
|
2783
2988
|
this.left = Ee(), this.right = Ee();
|
|
2784
2989
|
}
|
|
2785
|
-
showLeft = (s, t = {},
|
|
2990
|
+
showLeft = (s, t = {}, a = {}, l = {}) => {
|
|
2786
2991
|
const n = {
|
|
2787
2992
|
close: () => {
|
|
2788
|
-
|
|
2993
|
+
a.close?.(), this.closeLeft();
|
|
2789
2994
|
},
|
|
2790
|
-
...
|
|
2995
|
+
...a
|
|
2791
2996
|
};
|
|
2792
2997
|
this.left.show(s, t, n, l);
|
|
2793
2998
|
};
|
|
2794
|
-
showRight = (s, t = {},
|
|
2999
|
+
showRight = (s, t = {}, a = {}, l = {}) => {
|
|
2795
3000
|
const n = {
|
|
2796
3001
|
close: () => {
|
|
2797
|
-
|
|
3002
|
+
a.close?.(), this.closeRight();
|
|
2798
3003
|
},
|
|
2799
|
-
...
|
|
3004
|
+
...a
|
|
2800
3005
|
};
|
|
2801
3006
|
this.right.show(s, t, n, l);
|
|
2802
3007
|
};
|
|
@@ -2810,37 +3015,37 @@ class Ma {
|
|
|
2810
3015
|
this.left.close(), this.right.close();
|
|
2811
3016
|
};
|
|
2812
3017
|
}
|
|
2813
|
-
const
|
|
3018
|
+
const ae = new Ao(), Bo = (e) => {
|
|
2814
3019
|
const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2815
3020
|
return s ? s[2] : null;
|
|
2816
|
-
},
|
|
3021
|
+
}, Do = (e, s, t = {}) => {
|
|
2817
3022
|
const {
|
|
2818
|
-
maxAge:
|
|
3023
|
+
maxAge: a = 31536e3,
|
|
2819
3024
|
// 365 days in seconds
|
|
2820
3025
|
domain: l = ct(),
|
|
2821
3026
|
secure: n = !0,
|
|
2822
|
-
sameSite:
|
|
3027
|
+
sameSite: o = "Lax",
|
|
2823
3028
|
path: c = "/"
|
|
2824
3029
|
} = t;
|
|
2825
|
-
let r = `${e}=${s}; max-age=${
|
|
3030
|
+
let r = `${e}=${s}; max-age=${a}; path=${c}; samesite=${o}`;
|
|
2826
3031
|
l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
|
|
2827
|
-
},
|
|
2828
|
-
const { domain: t = ct(), path:
|
|
2829
|
-
let l = `${e}=; max-age=0; path=${
|
|
3032
|
+
}, jo = (e, s = {}) => {
|
|
3033
|
+
const { domain: t = ct(), path: a = "/" } = s;
|
|
3034
|
+
let l = `${e}=; max-age=0; path=${a}`;
|
|
2830
3035
|
t && (l += `; domain=${t}`), document.cookie = l;
|
|
2831
3036
|
}, ct = () => {
|
|
2832
3037
|
const e = window.location.hostname;
|
|
2833
3038
|
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;
|
|
2834
3039
|
}, ut = [];
|
|
2835
|
-
function
|
|
3040
|
+
function zo(e) {
|
|
2836
3041
|
ut.push(e);
|
|
2837
3042
|
}
|
|
2838
|
-
function
|
|
3043
|
+
function Io() {
|
|
2839
3044
|
ut.forEach((e) => e());
|
|
2840
3045
|
}
|
|
2841
|
-
function
|
|
3046
|
+
function Un(e) {
|
|
2842
3047
|
let s = !1;
|
|
2843
|
-
return
|
|
3048
|
+
return zo(() => {
|
|
2844
3049
|
s = !1;
|
|
2845
3050
|
}), {
|
|
2846
3051
|
bootstrapApp: async () => {
|
|
@@ -2853,8 +3058,8 @@ function Bn(e) {
|
|
|
2853
3058
|
}
|
|
2854
3059
|
};
|
|
2855
3060
|
}
|
|
2856
|
-
const
|
|
2857
|
-
const e =
|
|
3061
|
+
const be = "bolt-next-token", W = ue("auth", () => {
|
|
3062
|
+
const e = K({
|
|
2858
3063
|
user: null,
|
|
2859
3064
|
token: null,
|
|
2860
3065
|
ready: !1,
|
|
@@ -2889,15 +3094,15 @@ const ve = "bolt-next-token", G = ue("auth", () => {
|
|
|
2889
3094
|
}), s = (i = {}) => {
|
|
2890
3095
|
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);
|
|
2891
3096
|
}, t = (i) => {
|
|
2892
|
-
|
|
2893
|
-
},
|
|
2894
|
-
|
|
2895
|
-
}, l = () =>
|
|
2896
|
-
const u = await
|
|
3097
|
+
Do(be, i), e.token = i;
|
|
3098
|
+
}, a = () => {
|
|
3099
|
+
jo(be), e.token = null;
|
|
3100
|
+
}, l = () => Bo(be), n = async (i) => {
|
|
3101
|
+
const u = await le.post(e.endpoints.login, i), d = u.headers.authorization;
|
|
2897
3102
|
return t(d), e.user = u.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(u.data), u.data;
|
|
2898
|
-
},
|
|
3103
|
+
}, o = async () => {
|
|
2899
3104
|
try {
|
|
2900
|
-
await
|
|
3105
|
+
await le.post(
|
|
2901
3106
|
e.endpoints.logout,
|
|
2902
3107
|
{},
|
|
2903
3108
|
{
|
|
@@ -2909,21 +3114,21 @@ const ve = "bolt-next-token", G = ue("auth", () => {
|
|
|
2909
3114
|
} catch (i) {
|
|
2910
3115
|
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
|
|
2911
3116
|
} finally {
|
|
2912
|
-
|
|
3117
|
+
a(), e.user = null, Io();
|
|
2913
3118
|
}
|
|
2914
3119
|
}, c = async () => {
|
|
2915
3120
|
const i = e.overrideToken || l();
|
|
2916
3121
|
if (!i)
|
|
2917
3122
|
return e.ready = !0, null;
|
|
2918
3123
|
try {
|
|
2919
|
-
const { data: u } = await
|
|
3124
|
+
const { data: u } = await le.get(e.endpoints.fetch, {
|
|
2920
3125
|
headers: {
|
|
2921
3126
|
Authorization: `Bearer ${i}`
|
|
2922
3127
|
}
|
|
2923
3128
|
});
|
|
2924
3129
|
e.user = u, e.overrideToken || (e.token = i);
|
|
2925
3130
|
} catch {
|
|
2926
|
-
e.overrideToken ||
|
|
3131
|
+
e.overrideToken || a();
|
|
2927
3132
|
} finally {
|
|
2928
3133
|
e.ready = !0;
|
|
2929
3134
|
}
|
|
@@ -2932,16 +3137,16 @@ const ve = "bolt-next-token", G = ue("auth", () => {
|
|
|
2932
3137
|
state: e,
|
|
2933
3138
|
initialize: s,
|
|
2934
3139
|
login: n,
|
|
2935
|
-
logout:
|
|
3140
|
+
logout: o,
|
|
2936
3141
|
fetchUser: c,
|
|
2937
3142
|
check: r,
|
|
2938
3143
|
setTokenCookie: t,
|
|
2939
|
-
clearTokenCookie:
|
|
3144
|
+
clearTokenCookie: a,
|
|
2940
3145
|
getTokenCookie: l
|
|
2941
3146
|
};
|
|
2942
3147
|
});
|
|
2943
|
-
function
|
|
2944
|
-
const s =
|
|
3148
|
+
function No(e = {}) {
|
|
3149
|
+
const s = le.create({
|
|
2945
3150
|
baseURL: e.baseURL || "",
|
|
2946
3151
|
timeout: e.timeout || 3e4,
|
|
2947
3152
|
headers: {
|
|
@@ -2952,8 +3157,8 @@ function Fa(e = {}) {
|
|
|
2952
3157
|
return s.interceptors.request.use(
|
|
2953
3158
|
(t) => {
|
|
2954
3159
|
try {
|
|
2955
|
-
const
|
|
2956
|
-
|
|
3160
|
+
const a = W();
|
|
3161
|
+
a.state.overrideToken ? t.headers.Authorization = `Bearer ${a.state.overrideToken}` : a.state.token && (t.headers.Authorization = `Bearer ${a.state.token}`);
|
|
2957
3162
|
} catch {
|
|
2958
3163
|
}
|
|
2959
3164
|
return t;
|
|
@@ -2964,120 +3169,120 @@ function Fa(e = {}) {
|
|
|
2964
3169
|
async (t) => {
|
|
2965
3170
|
if (t.response?.status === 401)
|
|
2966
3171
|
try {
|
|
2967
|
-
const
|
|
2968
|
-
await
|
|
2969
|
-
} catch (
|
|
2970
|
-
console.error("Error during auto-logout:",
|
|
3172
|
+
const a = W();
|
|
3173
|
+
await a.logout(), window.location.href = a.state.routes.auth;
|
|
3174
|
+
} catch (a) {
|
|
3175
|
+
console.error("Error during auto-logout:", a), window.location.href = "/login";
|
|
2971
3176
|
}
|
|
2972
3177
|
if (t.response?.status === 403)
|
|
2973
3178
|
try {
|
|
2974
|
-
const
|
|
2975
|
-
window.location.href =
|
|
2976
|
-
} catch (
|
|
2977
|
-
console.error("Error during 403 redirect:",
|
|
3179
|
+
const a = W();
|
|
3180
|
+
window.location.href = a.state.routes.forbidden;
|
|
3181
|
+
} catch (a) {
|
|
3182
|
+
console.error("Error during 403 redirect:", a), window.location.href = "/error/403";
|
|
2978
3183
|
}
|
|
2979
3184
|
return Promise.reject(t);
|
|
2980
3185
|
}
|
|
2981
3186
|
), s;
|
|
2982
3187
|
}
|
|
2983
|
-
let
|
|
2984
|
-
function
|
|
2985
|
-
return
|
|
3188
|
+
let ne = null;
|
|
3189
|
+
function Kn(e, s = {}) {
|
|
3190
|
+
return ne = No(s), e.provide("axios", ne), e.config.globalProperties.$axios = ne, ne;
|
|
2986
3191
|
}
|
|
2987
|
-
function
|
|
2988
|
-
if (!
|
|
3192
|
+
function Zo() {
|
|
3193
|
+
if (!ne)
|
|
2989
3194
|
throw new Error("Axios instance not initialized. Call setupAxios() first.");
|
|
2990
|
-
return
|
|
3195
|
+
return ne;
|
|
2991
3196
|
}
|
|
2992
|
-
function
|
|
3197
|
+
function qo(e) {
|
|
2993
3198
|
return e?.status !== 422 ? null : e.data?.errors || null;
|
|
2994
3199
|
}
|
|
2995
|
-
function
|
|
3200
|
+
function Oe(e) {
|
|
2996
3201
|
return e?.status === 422 ? e.data?.message || "Please fix the validation errors." : e?.data?.message || "An error occurred.";
|
|
2997
3202
|
}
|
|
2998
|
-
function
|
|
3203
|
+
function Uo(e) {
|
|
2999
3204
|
return e?.status === 422;
|
|
3000
3205
|
}
|
|
3001
|
-
function
|
|
3206
|
+
function Gn(e = {}) {
|
|
3002
3207
|
const {
|
|
3003
3208
|
successMessage: s = "Saved successfully!",
|
|
3004
3209
|
createMessage: t = "Created successfully!",
|
|
3005
|
-
updateMessage:
|
|
3210
|
+
updateMessage: a = "Updated successfully!",
|
|
3006
3211
|
redirectTo: l = null,
|
|
3007
3212
|
onSuccess: n = null,
|
|
3008
|
-
onError:
|
|
3213
|
+
onError: o = null,
|
|
3009
3214
|
showNotification: c = !0,
|
|
3010
3215
|
setFieldErrors: r = !0,
|
|
3011
3216
|
setFormErrors: i = !1
|
|
3012
|
-
} = e, u =
|
|
3013
|
-
async function p(
|
|
3014
|
-
const { submitFn:
|
|
3217
|
+
} = e, u = Y(), d = R(!1);
|
|
3218
|
+
async function p(v) {
|
|
3219
|
+
const { submitFn: x, method: h = "create", node: w = null, isEditMode: C = !1 } = v;
|
|
3015
3220
|
d.value = !0, w && w.clearErrors();
|
|
3016
3221
|
try {
|
|
3017
|
-
const
|
|
3222
|
+
const _ = (await x()).data;
|
|
3018
3223
|
if (c) {
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3224
|
+
const L = C ? a : h === "create" ? t : s;
|
|
3225
|
+
j.show({
|
|
3021
3226
|
type: "success",
|
|
3022
|
-
message:
|
|
3227
|
+
message: L
|
|
3023
3228
|
});
|
|
3024
3229
|
}
|
|
3025
|
-
if (n && await n(
|
|
3026
|
-
const
|
|
3027
|
-
await u.push(
|
|
3230
|
+
if (n && await n(_), !C && l) {
|
|
3231
|
+
const L = typeof l == "function" ? l(_) : l;
|
|
3232
|
+
await u.push(L);
|
|
3028
3233
|
}
|
|
3029
|
-
return { success: !0, data:
|
|
3234
|
+
return { success: !0, data: _, error: null };
|
|
3030
3235
|
} catch (y) {
|
|
3031
|
-
const
|
|
3032
|
-
if (
|
|
3236
|
+
const _ = y.response;
|
|
3237
|
+
if (o && await o(y) === !0)
|
|
3033
3238
|
return { success: !1, data: null, error: y };
|
|
3034
|
-
if (
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3239
|
+
if (Uo(_)) {
|
|
3240
|
+
const L = qo(_);
|
|
3241
|
+
L && w && r && w.setErrors([], L), i && j.show({
|
|
3037
3242
|
type: "danger",
|
|
3038
|
-
message:
|
|
3243
|
+
message: Oe(_)
|
|
3039
3244
|
});
|
|
3040
3245
|
} else
|
|
3041
|
-
|
|
3246
|
+
j.show({
|
|
3042
3247
|
type: "danger",
|
|
3043
|
-
message:
|
|
3248
|
+
message: Oe(_)
|
|
3044
3249
|
});
|
|
3045
3250
|
return { success: !1, data: null, error: y };
|
|
3046
3251
|
} finally {
|
|
3047
3252
|
d.value = !1;
|
|
3048
3253
|
}
|
|
3049
3254
|
}
|
|
3050
|
-
async function v
|
|
3051
|
-
const { url:
|
|
3255
|
+
async function b(v) {
|
|
3256
|
+
const { url: x, payload: h, method: w = "post", node: C, isEditMode: y } = v, _ = Zo();
|
|
3052
3257
|
return p({
|
|
3053
|
-
submitFn: () =>
|
|
3258
|
+
submitFn: () => _[w](x, h),
|
|
3054
3259
|
method: y ? "update" : "create",
|
|
3055
|
-
node:
|
|
3260
|
+
node: C,
|
|
3056
3261
|
isEditMode: y
|
|
3057
3262
|
});
|
|
3058
3263
|
}
|
|
3059
3264
|
return {
|
|
3060
3265
|
submitting: d,
|
|
3061
3266
|
submit: p,
|
|
3062
|
-
submitToApi:
|
|
3267
|
+
submitToApi: b
|
|
3063
3268
|
};
|
|
3064
3269
|
}
|
|
3065
|
-
const
|
|
3270
|
+
const Ko = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Go = { class: "flex flex-1 flex-col" }, Wo = {
|
|
3066
3271
|
class: "flex flex-1 flex-col gap-y-7",
|
|
3067
3272
|
role: "list"
|
|
3068
|
-
},
|
|
3273
|
+
}, Yo = { class: "flex flex-1 flex-col" }, Xo = {
|
|
3069
3274
|
role: "list",
|
|
3070
3275
|
class: "flex flex-1 flex-col"
|
|
3071
|
-
},
|
|
3276
|
+
}, Jo = { class: "flex items-center pb-8" }, Qo = ["href", "onClick"], er = {
|
|
3072
3277
|
key: 2,
|
|
3073
3278
|
class: "w-full flex justify-center"
|
|
3074
|
-
},
|
|
3279
|
+
}, tr = {
|
|
3075
3280
|
key: 0,
|
|
3076
3281
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
3077
|
-
},
|
|
3282
|
+
}, sr = ["href", "onClick"], ar = {
|
|
3078
3283
|
key: 1,
|
|
3079
3284
|
class: "text-[13px]"
|
|
3080
|
-
},
|
|
3285
|
+
}, or = { class: "mt-auto" }, rr = { class: "p-[10px] flex-shrink-0" }, nr = { class: "flex flex-1 items-center gap-x-6" }, lr = { class: "relative flex flex-1 items-center gap-4" }, ir = { class: "cursor-pointer" }, cr = ["src"], ur = { class: "ml-auto" }, dr = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Wn = {
|
|
3081
3286
|
__name: "SparkDefaultContainer",
|
|
3082
3287
|
props: {
|
|
3083
3288
|
appStore: {
|
|
@@ -3095,113 +3300,113 @@ const za = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex
|
|
|
3095
3300
|
},
|
|
3096
3301
|
emits: ["overlayClose"],
|
|
3097
3302
|
setup(e, { emit: s }) {
|
|
3098
|
-
const t = e,
|
|
3099
|
-
const
|
|
3100
|
-
l["app-selector-bottom"] ?
|
|
3101
|
-
select: (
|
|
3102
|
-
|
|
3303
|
+
const t = e, a = s, l = Be(), n = te(), o = it(), c = rt(), r = $(() => c.getAppIcon(t.appStore.state.app)), i = $(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
|
|
3304
|
+
const v = {};
|
|
3305
|
+
l["app-selector-bottom"] ? v.bottomSlot = () => Ce("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (v.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? v.footerSlot = () => Ce("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (v.footerSlot = t.appSelectorSlots.footerSlot), ae.showRight(Es, v, {
|
|
3306
|
+
select: (x) => {
|
|
3307
|
+
ae.closeRight();
|
|
3103
3308
|
}
|
|
3104
3309
|
});
|
|
3105
3310
|
}, d = () => {
|
|
3106
|
-
|
|
3107
|
-
|
|
3311
|
+
ae.showLeft(
|
|
3312
|
+
oa,
|
|
3108
3313
|
{},
|
|
3109
3314
|
{
|
|
3110
|
-
select: (
|
|
3111
|
-
|
|
3315
|
+
select: (v) => {
|
|
3316
|
+
o.toggleBrand(v), ae.closeLeft();
|
|
3112
3317
|
}
|
|
3113
3318
|
}
|
|
3114
3319
|
);
|
|
3115
|
-
}, p = $(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]),
|
|
3116
|
-
return (
|
|
3117
|
-
const
|
|
3118
|
-
return m(),
|
|
3320
|
+
}, p = $(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), b = $(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
3321
|
+
return (v, x) => {
|
|
3322
|
+
const h = F("font-awesome-icon"), w = F("router-view");
|
|
3323
|
+
return m(), g(E, null, [
|
|
3119
3324
|
f("div", {
|
|
3120
|
-
class:
|
|
3325
|
+
class: V([p.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
3121
3326
|
}, [
|
|
3122
|
-
f("div",
|
|
3123
|
-
f("nav",
|
|
3124
|
-
f("ul",
|
|
3125
|
-
f("li",
|
|
3126
|
-
f("ul",
|
|
3127
|
-
f("li",
|
|
3327
|
+
f("div", Ko, [
|
|
3328
|
+
f("nav", Go, [
|
|
3329
|
+
f("ul", Wo, [
|
|
3330
|
+
f("li", Yo, [
|
|
3331
|
+
f("ul", Xo, [
|
|
3332
|
+
f("li", Jo, [
|
|
3128
3333
|
f("a", {
|
|
3129
3334
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
3130
|
-
onClick:
|
|
3335
|
+
onClick: x[0] || (x[0] = U((C) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
3131
3336
|
}, [
|
|
3132
|
-
|
|
3133
|
-
icon:
|
|
3337
|
+
k(h, {
|
|
3338
|
+
icon: S(O)[r.value],
|
|
3134
3339
|
class: "size-5"
|
|
3135
3340
|
}, null, 8, ["icon"])
|
|
3136
3341
|
]),
|
|
3137
|
-
e.mainNavStore.state.collapsed ?
|
|
3342
|
+
e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("a", {
|
|
3138
3343
|
key: 0,
|
|
3139
|
-
onClick:
|
|
3344
|
+
onClick: x[1] || (x[1] = U((C) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
3140
3345
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
3141
3346
|
}, M(e.appStore.state.app), 1))
|
|
3142
3347
|
]),
|
|
3143
|
-
(m(!0),
|
|
3144
|
-
key:
|
|
3145
|
-
class:
|
|
3146
|
-
"mt-[10px]":
|
|
3147
|
-
"mt-auto":
|
|
3348
|
+
(m(!0), g(E, null, I(e.mainNavStore.state.menu, (C) => (m(), g("li", {
|
|
3349
|
+
key: C.name,
|
|
3350
|
+
class: V({
|
|
3351
|
+
"mt-[10px]": C.children,
|
|
3352
|
+
"mt-auto": C.footerSection
|
|
3148
3353
|
})
|
|
3149
3354
|
}, [
|
|
3150
3355
|
f("a", {
|
|
3151
|
-
class:
|
|
3152
|
-
"bg-gray-100":
|
|
3153
|
-
"hover:bg-gray-100":
|
|
3356
|
+
class: V([{
|
|
3357
|
+
"bg-gray-100": C.current,
|
|
3358
|
+
"hover:bg-gray-100": C?.href
|
|
3154
3359
|
}, "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"]),
|
|
3155
|
-
href:
|
|
3156
|
-
onClick:
|
|
3360
|
+
href: C?.href,
|
|
3361
|
+
onClick: U((y) => e.mainNavStore.goto(C.href), ["prevent"])
|
|
3157
3362
|
}, [
|
|
3158
|
-
|
|
3363
|
+
C.icon ? (m(), H(h, {
|
|
3159
3364
|
key: 0,
|
|
3160
|
-
icon:
|
|
3161
|
-
class:
|
|
3162
|
-
}, null, 8, ["icon", "class"])) :
|
|
3163
|
-
e.mainNavStore.state.collapsed ?
|
|
3365
|
+
icon: S(O)[C.icon],
|
|
3366
|
+
class: V([[(C.current, "text-gray-400")], "size-4"])
|
|
3367
|
+
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
3368
|
+
e.mainNavStore.state.collapsed ? C?.children ? (m(), g("div", er, [...x[6] || (x[6] = [
|
|
3164
3369
|
f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
3165
|
-
])])) :
|
|
3370
|
+
])])) : T("", !0) : (m(), g("span", {
|
|
3166
3371
|
key: 1,
|
|
3167
|
-
class:
|
|
3168
|
-
"text-[11px]":
|
|
3169
|
-
"text-[13px]": !
|
|
3170
|
-
"font-semibold":
|
|
3171
|
-
"text-gray-500":
|
|
3372
|
+
class: V({
|
|
3373
|
+
"text-[11px]": C?.children,
|
|
3374
|
+
"text-[13px]": !C?.children,
|
|
3375
|
+
"font-semibold": C?.children,
|
|
3376
|
+
"text-gray-500": C?.children
|
|
3172
3377
|
})
|
|
3173
|
-
}, M(
|
|
3174
|
-
], 10,
|
|
3175
|
-
|
|
3176
|
-
(m(!0),
|
|
3378
|
+
}, M(C.name), 3))
|
|
3379
|
+
], 10, Qo),
|
|
3380
|
+
C.children ? (m(), g("ul", tr, [
|
|
3381
|
+
(m(!0), g(E, null, I(C.children, (y) => (m(), g("li", {
|
|
3177
3382
|
key: y.name
|
|
3178
3383
|
}, [
|
|
3179
3384
|
f("a", {
|
|
3180
|
-
class:
|
|
3385
|
+
class: V([[y.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"]),
|
|
3181
3386
|
href: y.href,
|
|
3182
|
-
onClick:
|
|
3387
|
+
onClick: U((_) => e.mainNavStore.goto(y.href), ["prevent"])
|
|
3183
3388
|
}, [
|
|
3184
|
-
y.icon ? (m(),
|
|
3389
|
+
y.icon ? (m(), H(h, {
|
|
3185
3390
|
key: 0,
|
|
3186
|
-
icon:
|
|
3187
|
-
class:
|
|
3188
|
-
}, null, 8, ["icon", "class"])) :
|
|
3189
|
-
e.mainNavStore.state.collapsed ?
|
|
3190
|
-
], 10,
|
|
3391
|
+
icon: S(O)[y.icon],
|
|
3392
|
+
class: V([[(y.current, "text-gray-400")], "size-4"])
|
|
3393
|
+
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
3394
|
+
e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("span", ar, M(y.name), 1))
|
|
3395
|
+
], 10, sr)
|
|
3191
3396
|
]))), 128))
|
|
3192
|
-
])) :
|
|
3397
|
+
])) : T("", !0)
|
|
3193
3398
|
], 2))), 128))
|
|
3194
3399
|
])
|
|
3195
3400
|
]),
|
|
3196
|
-
f("li",
|
|
3197
|
-
B(
|
|
3401
|
+
f("li", or, [
|
|
3402
|
+
B(v.$slots, "sidebar-footer"),
|
|
3198
3403
|
f("a", {
|
|
3199
3404
|
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",
|
|
3200
3405
|
href: "#",
|
|
3201
|
-
onClick:
|
|
3406
|
+
onClick: x[2] || (x[2] = U((C) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
3202
3407
|
}, [
|
|
3203
|
-
|
|
3204
|
-
icon:
|
|
3408
|
+
k(h, {
|
|
3409
|
+
icon: S(O)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
3205
3410
|
class: "class-5"
|
|
3206
3411
|
}, null, 8, ["icon"])
|
|
3207
3412
|
])
|
|
@@ -3211,88 +3416,88 @@ const za = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex
|
|
|
3211
3416
|
])
|
|
3212
3417
|
], 2),
|
|
3213
3418
|
f("div", {
|
|
3214
|
-
class:
|
|
3419
|
+
class: V([b.value, "h-full transition-all flex flex-col"])
|
|
3215
3420
|
}, [
|
|
3216
|
-
f("div",
|
|
3217
|
-
f("div",
|
|
3218
|
-
f("div",
|
|
3219
|
-
B(
|
|
3220
|
-
f("div",
|
|
3221
|
-
|
|
3222
|
-
icon:
|
|
3421
|
+
f("div", rr, [
|
|
3422
|
+
f("div", nr, [
|
|
3423
|
+
f("div", lr, [
|
|
3424
|
+
B(v.$slots, "header-left", {}, () => [
|
|
3425
|
+
f("div", ir, [
|
|
3426
|
+
k(h, {
|
|
3427
|
+
icon: S(O).farBarsSort,
|
|
3223
3428
|
class: "size-5",
|
|
3224
|
-
onClick:
|
|
3429
|
+
onClick: x[3] || (x[3] = (C) => e.mainNavStore.toggleHidden())
|
|
3225
3430
|
}, null, 8, ["icon"])
|
|
3226
3431
|
])
|
|
3227
3432
|
]),
|
|
3228
|
-
B(
|
|
3229
|
-
i.value ? (m(),
|
|
3433
|
+
B(v.$slots, "header-center", {}, () => [
|
|
3434
|
+
i.value ? (m(), g("div", {
|
|
3230
3435
|
key: 0,
|
|
3231
3436
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
3232
3437
|
onClick: d
|
|
3233
3438
|
}, [
|
|
3234
|
-
|
|
3439
|
+
S(o).currentBrand ? (m(), g("img", {
|
|
3235
3440
|
key: 0,
|
|
3236
|
-
src:
|
|
3441
|
+
src: S(o).currentBrand.logo,
|
|
3237
3442
|
alt: "",
|
|
3238
3443
|
class: "h-[30px] w-auto"
|
|
3239
|
-
}, null, 8,
|
|
3240
|
-
])) :
|
|
3444
|
+
}, null, 8, cr)) : T("", !0)
|
|
3445
|
+
])) : T("", !0)
|
|
3241
3446
|
]),
|
|
3242
|
-
f("div",
|
|
3243
|
-
B(
|
|
3244
|
-
e.appStore.state.showAppSelector ? (m(),
|
|
3447
|
+
f("div", ur, [
|
|
3448
|
+
B(v.$slots, "header-right", {}, () => [
|
|
3449
|
+
e.appStore.state.showAppSelector ? (m(), g("button", {
|
|
3245
3450
|
key: 0,
|
|
3246
3451
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
3247
3452
|
type: "button",
|
|
3248
3453
|
onClick: u
|
|
3249
3454
|
}, [
|
|
3250
|
-
|
|
3251
|
-
icon:
|
|
3455
|
+
k(h, {
|
|
3456
|
+
icon: S(O).farGripDotsVertical,
|
|
3252
3457
|
class: "size-4 text-gray-400"
|
|
3253
3458
|
}, null, 8, ["icon"])
|
|
3254
|
-
])) :
|
|
3459
|
+
])) : T("", !0)
|
|
3255
3460
|
])
|
|
3256
3461
|
])
|
|
3257
3462
|
])
|
|
3258
3463
|
])
|
|
3259
3464
|
]),
|
|
3260
|
-
f("main",
|
|
3261
|
-
|
|
3465
|
+
f("main", dr, [
|
|
3466
|
+
k(w)
|
|
3262
3467
|
])
|
|
3263
3468
|
], 2),
|
|
3264
|
-
|
|
3469
|
+
k(S(Pe), {
|
|
3265
3470
|
position: "left",
|
|
3266
|
-
"overlay-instance":
|
|
3267
|
-
onClose:
|
|
3471
|
+
"overlay-instance": S(ae).left,
|
|
3472
|
+
onClose: x[4] || (x[4] = (C) => a("overlayClose", "left"))
|
|
3268
3473
|
}, null, 8, ["overlay-instance"]),
|
|
3269
|
-
|
|
3474
|
+
k(S(Pe), {
|
|
3270
3475
|
position: "right",
|
|
3271
|
-
"overlay-instance":
|
|
3272
|
-
onClose:
|
|
3476
|
+
"overlay-instance": S(ae).right,
|
|
3477
|
+
onClose: x[5] || (x[5] = (C) => a("overlayClose", "right"))
|
|
3273
3478
|
}, null, 8, ["overlay-instance"]),
|
|
3274
|
-
|
|
3479
|
+
k(S(_a))
|
|
3275
3480
|
], 64);
|
|
3276
3481
|
};
|
|
3277
3482
|
}
|
|
3278
|
-
},
|
|
3279
|
-
function
|
|
3280
|
-
const t =
|
|
3281
|
-
return m(),
|
|
3282
|
-
|
|
3483
|
+
}, pr = {}, fr = { class: "h-full" };
|
|
3484
|
+
function mr(e, s) {
|
|
3485
|
+
const t = F("router-view");
|
|
3486
|
+
return m(), g("main", fr, [
|
|
3487
|
+
k(t)
|
|
3283
3488
|
]);
|
|
3284
3489
|
}
|
|
3285
|
-
const
|
|
3490
|
+
const Yn = /* @__PURE__ */ se(pr, [["render", mr]]), hr = { class: "h-full grid place-content-center relative" }, gr = { class: "absolute top-8 left-8" }, yr = ["src"], vr = {
|
|
3286
3491
|
key: 1,
|
|
3287
3492
|
width: "59",
|
|
3288
3493
|
height: "23",
|
|
3289
3494
|
viewBox: "0 0 59 23",
|
|
3290
3495
|
fill: "none",
|
|
3291
3496
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3292
|
-
},
|
|
3497
|
+
}, br = { class: "max-w-sm grid gap-y-1 -mt-8" }, xr = { class: "mb-7" }, kr = { class: "text-gray-600" }, wr = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, _r = {
|
|
3293
3498
|
key: 0,
|
|
3294
3499
|
class: "text-red-600 text-sm mb-2"
|
|
3295
|
-
},
|
|
3500
|
+
}, Sr = { key: 0 }, Cr = { key: 1 }, $r = {
|
|
3296
3501
|
__name: "SparkLoginView",
|
|
3297
3502
|
props: {
|
|
3298
3503
|
logo: {
|
|
@@ -3309,8 +3514,8 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3309
3514
|
}
|
|
3310
3515
|
},
|
|
3311
3516
|
setup(e) {
|
|
3312
|
-
const s =
|
|
3313
|
-
|
|
3517
|
+
const s = Y(), t = te(), a = nt(), l = W(), n = e, o = R(!1), c = R(""), r = async (i) => {
|
|
3518
|
+
o.value = !0, c.value = "";
|
|
3314
3519
|
try {
|
|
3315
3520
|
await l.login(i);
|
|
3316
3521
|
const u = t.query.redirect;
|
|
@@ -3325,19 +3530,19 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3325
3530
|
} catch (u) {
|
|
3326
3531
|
c.value = u.response?.data?.message || u.message || "Login failed. Please try again.";
|
|
3327
3532
|
} finally {
|
|
3328
|
-
|
|
3533
|
+
o.value = !1;
|
|
3329
3534
|
}
|
|
3330
3535
|
};
|
|
3331
3536
|
return (i, u) => {
|
|
3332
|
-
const d =
|
|
3333
|
-
return m(),
|
|
3334
|
-
f("div",
|
|
3335
|
-
n.logo ? (m(),
|
|
3537
|
+
const d = F("FormKit"), p = F("router-link");
|
|
3538
|
+
return m(), g("div", hr, [
|
|
3539
|
+
f("div", gr, [
|
|
3540
|
+
n.logo ? (m(), g("img", {
|
|
3336
3541
|
key: 0,
|
|
3337
3542
|
src: n.logo,
|
|
3338
3543
|
alt: "Logo",
|
|
3339
3544
|
class: "h-[23px] w-auto"
|
|
3340
|
-
}, null, 8,
|
|
3545
|
+
}, null, 8, yr)) : (m(), g("svg", vr, [...u[0] || (u[0] = [
|
|
3341
3546
|
f("path", {
|
|
3342
3547
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3343
3548
|
fill: "#1C64F2"
|
|
@@ -3356,56 +3561,56 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3356
3561
|
}, null, -1)
|
|
3357
3562
|
])]))
|
|
3358
3563
|
]),
|
|
3359
|
-
f("div",
|
|
3360
|
-
f("div",
|
|
3564
|
+
f("div", br, [
|
|
3565
|
+
f("div", xr, [
|
|
3361
3566
|
u[1] || (u[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
3362
|
-
f("p",
|
|
3567
|
+
f("p", kr, " Welcome back" + M(S(a).state.app ? ` to ${S(a).state.app}` : "") + "! Please enter your details. ", 1)
|
|
3363
3568
|
]),
|
|
3364
|
-
|
|
3569
|
+
k(d, {
|
|
3365
3570
|
type: "form",
|
|
3366
3571
|
onSubmit: r,
|
|
3367
3572
|
actions: !1
|
|
3368
3573
|
}, {
|
|
3369
|
-
default:
|
|
3370
|
-
|
|
3574
|
+
default: P(() => [
|
|
3575
|
+
k(d, {
|
|
3371
3576
|
label: "Email",
|
|
3372
3577
|
name: "email",
|
|
3373
3578
|
placeholder: "Enter your email",
|
|
3374
3579
|
type: "email",
|
|
3375
3580
|
validation: "required|email",
|
|
3376
3581
|
"outer-class": "max-w-full",
|
|
3377
|
-
value:
|
|
3582
|
+
value: S(l).state.devCredentials.username
|
|
3378
3583
|
}, null, 8, ["value"]),
|
|
3379
|
-
|
|
3584
|
+
k(d, {
|
|
3380
3585
|
label: "Password",
|
|
3381
3586
|
name: "password",
|
|
3382
3587
|
placeholder: "••••••••",
|
|
3383
3588
|
type: "password",
|
|
3384
3589
|
validation: "required",
|
|
3385
3590
|
"outer-class": "max-w-full",
|
|
3386
|
-
value:
|
|
3591
|
+
value: S(l).state.devCredentials.password
|
|
3387
3592
|
}, null, 8, ["value"]),
|
|
3388
|
-
f("div",
|
|
3593
|
+
f("div", wr, [
|
|
3389
3594
|
u[3] || (u[3] = f("span", null, null, -1)),
|
|
3390
|
-
|
|
3595
|
+
k(p, {
|
|
3391
3596
|
to: n.forgotPasswordRoute,
|
|
3392
3597
|
class: "text-sm text-primary-600 font-semibold"
|
|
3393
3598
|
}, {
|
|
3394
|
-
default:
|
|
3395
|
-
|
|
3599
|
+
default: P(() => [...u[2] || (u[2] = [
|
|
3600
|
+
A(" Forgot password ", -1)
|
|
3396
3601
|
])]),
|
|
3397
3602
|
_: 1
|
|
3398
3603
|
}, 8, ["to"])
|
|
3399
3604
|
]),
|
|
3400
|
-
c.value ? (m(),
|
|
3401
|
-
|
|
3605
|
+
c.value ? (m(), g("div", _r, M(c.value), 1)) : T("", !0),
|
|
3606
|
+
k(S(X), {
|
|
3402
3607
|
type: "submit",
|
|
3403
3608
|
size: "xl",
|
|
3404
|
-
disabled:
|
|
3609
|
+
disabled: o.value,
|
|
3405
3610
|
"button-class": "w-full mb-2"
|
|
3406
3611
|
}, {
|
|
3407
|
-
default:
|
|
3408
|
-
|
|
3612
|
+
default: P(() => [
|
|
3613
|
+
o.value ? (m(), g("span", Cr, "Signing in...")) : (m(), g("span", Sr, "Sign in"))
|
|
3409
3614
|
]),
|
|
3410
3615
|
_: 1
|
|
3411
3616
|
}, 8, ["disabled"])
|
|
@@ -3416,7 +3621,7 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3416
3621
|
]);
|
|
3417
3622
|
};
|
|
3418
3623
|
}
|
|
3419
|
-
},
|
|
3624
|
+
}, Tr = {
|
|
3420
3625
|
__name: "SparkLogoutView",
|
|
3421
3626
|
props: {
|
|
3422
3627
|
defaultRedirect: {
|
|
@@ -3425,27 +3630,27 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3425
3630
|
}
|
|
3426
3631
|
},
|
|
3427
3632
|
setup(e) {
|
|
3428
|
-
const s =
|
|
3429
|
-
return
|
|
3430
|
-
await
|
|
3633
|
+
const s = Y(), t = te(), a = W(), l = e;
|
|
3634
|
+
return he(async () => {
|
|
3635
|
+
await a.logout();
|
|
3431
3636
|
const n = t.query.redirect;
|
|
3432
3637
|
n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
|
|
3433
|
-
}), (n,
|
|
3638
|
+
}), (n, o) => null;
|
|
3434
3639
|
}
|
|
3435
|
-
},
|
|
3640
|
+
}, Pr = { class: "h-full grid place-content-center relative" }, Lr = { class: "absolute top-8 left-8" }, Mr = ["src"], Vr = {
|
|
3436
3641
|
key: 1,
|
|
3437
3642
|
width: "59",
|
|
3438
3643
|
height: "23",
|
|
3439
3644
|
viewBox: "0 0 59 23",
|
|
3440
3645
|
fill: "none",
|
|
3441
3646
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3442
|
-
},
|
|
3647
|
+
}, Hr = { class: "max-w-sm grid gap-y-1 -mt-8" }, Rr = {
|
|
3443
3648
|
key: 0,
|
|
3444
3649
|
class: "text-red-600 text-sm mb-2"
|
|
3445
|
-
},
|
|
3650
|
+
}, Fr = {
|
|
3446
3651
|
key: 1,
|
|
3447
3652
|
class: "text-green-600 text-sm mb-2"
|
|
3448
|
-
},
|
|
3653
|
+
}, Er = { key: 0 }, Or = { key: 1 }, Ar = {
|
|
3449
3654
|
__name: "SparkForgotPasswordView",
|
|
3450
3655
|
props: {
|
|
3451
3656
|
logo: {
|
|
@@ -3458,26 +3663,26 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3458
3663
|
}
|
|
3459
3664
|
},
|
|
3460
3665
|
setup(e) {
|
|
3461
|
-
const s =
|
|
3462
|
-
|
|
3666
|
+
const s = W(), t = e, a = R(!1), l = R(""), n = R(""), o = async ({ email: c }) => {
|
|
3667
|
+
a.value = !0, l.value = "", n.value = "";
|
|
3463
3668
|
try {
|
|
3464
|
-
await
|
|
3669
|
+
await le.post(s.state.endpoints.passwordEmail, { email: c }), n.value = "Password reset link sent! Check your email.";
|
|
3465
3670
|
} catch (r) {
|
|
3466
3671
|
l.value = r.response?.data?.message || "Failed to send reset link.";
|
|
3467
3672
|
} finally {
|
|
3468
|
-
|
|
3673
|
+
a.value = !1;
|
|
3469
3674
|
}
|
|
3470
3675
|
};
|
|
3471
3676
|
return (c, r) => {
|
|
3472
|
-
const i =
|
|
3473
|
-
return m(),
|
|
3474
|
-
f("div",
|
|
3475
|
-
t.logo ? (m(),
|
|
3677
|
+
const i = F("FormKit"), u = F("router-link");
|
|
3678
|
+
return m(), g("div", Pr, [
|
|
3679
|
+
f("div", Lr, [
|
|
3680
|
+
t.logo ? (m(), g("img", {
|
|
3476
3681
|
key: 0,
|
|
3477
3682
|
src: t.logo,
|
|
3478
3683
|
alt: "Logo",
|
|
3479
3684
|
class: "h-[23px] w-auto"
|
|
3480
|
-
}, null, 8,
|
|
3685
|
+
}, null, 8, Mr)) : (m(), g("svg", Vr, [...r[0] || (r[0] = [
|
|
3481
3686
|
f("path", {
|
|
3482
3687
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3483
3688
|
fill: "#1C64F2"
|
|
@@ -3496,18 +3701,18 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3496
3701
|
}, null, -1)
|
|
3497
3702
|
])]))
|
|
3498
3703
|
]),
|
|
3499
|
-
f("div",
|
|
3704
|
+
f("div", Hr, [
|
|
3500
3705
|
r[2] || (r[2] = f("div", { class: "mb-7" }, [
|
|
3501
3706
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
3502
3707
|
f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
3503
3708
|
], -1)),
|
|
3504
|
-
|
|
3709
|
+
k(i, {
|
|
3505
3710
|
type: "form",
|
|
3506
|
-
onSubmit:
|
|
3711
|
+
onSubmit: o,
|
|
3507
3712
|
actions: !1
|
|
3508
3713
|
}, {
|
|
3509
|
-
default:
|
|
3510
|
-
|
|
3714
|
+
default: P(() => [
|
|
3715
|
+
k(i, {
|
|
3511
3716
|
label: "Email",
|
|
3512
3717
|
name: "email",
|
|
3513
3718
|
placeholder: "Enter your email",
|
|
@@ -3515,25 +3720,25 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3515
3720
|
validation: "required|email",
|
|
3516
3721
|
"outer-class": "max-w-full"
|
|
3517
3722
|
}),
|
|
3518
|
-
l.value ? (m(),
|
|
3519
|
-
n.value ? (m(),
|
|
3520
|
-
|
|
3723
|
+
l.value ? (m(), g("div", Rr, M(l.value), 1)) : T("", !0),
|
|
3724
|
+
n.value ? (m(), g("div", Fr, M(n.value), 1)) : T("", !0),
|
|
3725
|
+
k(S(X), {
|
|
3521
3726
|
type: "submit",
|
|
3522
3727
|
size: "xl",
|
|
3523
|
-
disabled:
|
|
3728
|
+
disabled: a.value,
|
|
3524
3729
|
"button-class": "w-full mb-2"
|
|
3525
3730
|
}, {
|
|
3526
|
-
default:
|
|
3527
|
-
|
|
3731
|
+
default: P(() => [
|
|
3732
|
+
a.value ? (m(), g("span", Or, "Sending...")) : (m(), g("span", Er, "Send reset link"))
|
|
3528
3733
|
]),
|
|
3529
3734
|
_: 1
|
|
3530
3735
|
}, 8, ["disabled"]),
|
|
3531
|
-
|
|
3736
|
+
k(u, {
|
|
3532
3737
|
to: t.loginRoute,
|
|
3533
3738
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
3534
3739
|
}, {
|
|
3535
|
-
default:
|
|
3536
|
-
|
|
3740
|
+
default: P(() => [...r[1] || (r[1] = [
|
|
3741
|
+
A(" Back to login ", -1)
|
|
3537
3742
|
])]),
|
|
3538
3743
|
_: 1
|
|
3539
3744
|
}, 8, ["to"])
|
|
@@ -3544,17 +3749,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3544
3749
|
]);
|
|
3545
3750
|
};
|
|
3546
3751
|
}
|
|
3547
|
-
},
|
|
3752
|
+
}, Br = { class: "h-full grid place-content-center relative" }, Dr = { class: "absolute top-8 left-8" }, jr = ["src"], zr = {
|
|
3548
3753
|
key: 1,
|
|
3549
3754
|
width: "59",
|
|
3550
3755
|
height: "23",
|
|
3551
3756
|
viewBox: "0 0 59 23",
|
|
3552
3757
|
fill: "none",
|
|
3553
3758
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3554
|
-
},
|
|
3759
|
+
}, Ir = { class: "max-w-sm grid gap-y-1 -mt-8" }, Nr = {
|
|
3555
3760
|
key: 0,
|
|
3556
3761
|
class: "text-red-600 text-sm mb-2"
|
|
3557
|
-
},
|
|
3762
|
+
}, Zr = { key: 0 }, qr = { key: 1 }, Ur = {
|
|
3558
3763
|
__name: "SparkResetPasswordView",
|
|
3559
3764
|
props: {
|
|
3560
3765
|
logo: {
|
|
@@ -3567,31 +3772,31 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3567
3772
|
}
|
|
3568
3773
|
},
|
|
3569
3774
|
setup(e) {
|
|
3570
|
-
const s =
|
|
3571
|
-
n.value = !0,
|
|
3775
|
+
const s = Y(), t = te(), a = W(), l = e, n = R(!1), o = R(""), c = async ({ password: r, password_confirmation: i }) => {
|
|
3776
|
+
n.value = !0, o.value = "";
|
|
3572
3777
|
try {
|
|
3573
|
-
await
|
|
3778
|
+
await le.post(a.state.endpoints.passwordReset, {
|
|
3574
3779
|
email: t.query.email,
|
|
3575
3780
|
token: t.query.token,
|
|
3576
3781
|
password: r,
|
|
3577
3782
|
password_confirmation: i
|
|
3578
3783
|
}), await s.push(l.loginRoute);
|
|
3579
3784
|
} catch (u) {
|
|
3580
|
-
|
|
3785
|
+
o.value = u.response?.data?.message || "Failed to reset password.";
|
|
3581
3786
|
} finally {
|
|
3582
3787
|
n.value = !1;
|
|
3583
3788
|
}
|
|
3584
3789
|
};
|
|
3585
3790
|
return (r, i) => {
|
|
3586
|
-
const u =
|
|
3587
|
-
return m(),
|
|
3588
|
-
f("div",
|
|
3589
|
-
l.logo ? (m(),
|
|
3791
|
+
const u = F("FormKit");
|
|
3792
|
+
return m(), g("div", Br, [
|
|
3793
|
+
f("div", Dr, [
|
|
3794
|
+
l.logo ? (m(), g("img", {
|
|
3590
3795
|
key: 0,
|
|
3591
3796
|
src: l.logo,
|
|
3592
3797
|
alt: "Logo",
|
|
3593
3798
|
class: "h-[23px] w-auto"
|
|
3594
|
-
}, null, 8,
|
|
3799
|
+
}, null, 8, jr)) : (m(), g("svg", zr, [...i[0] || (i[0] = [
|
|
3595
3800
|
f("path", {
|
|
3596
3801
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3597
3802
|
fill: "#1C64F2"
|
|
@@ -3610,18 +3815,18 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3610
3815
|
}, null, -1)
|
|
3611
3816
|
])]))
|
|
3612
3817
|
]),
|
|
3613
|
-
f("div",
|
|
3818
|
+
f("div", Ir, [
|
|
3614
3819
|
i[1] || (i[1] = f("div", { class: "mb-7" }, [
|
|
3615
3820
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
3616
3821
|
f("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
3617
3822
|
], -1)),
|
|
3618
|
-
|
|
3823
|
+
k(u, {
|
|
3619
3824
|
type: "form",
|
|
3620
3825
|
onSubmit: c,
|
|
3621
3826
|
actions: !1
|
|
3622
3827
|
}, {
|
|
3623
|
-
default:
|
|
3624
|
-
|
|
3828
|
+
default: P(() => [
|
|
3829
|
+
k(u, {
|
|
3625
3830
|
label: "New Password",
|
|
3626
3831
|
name: "password",
|
|
3627
3832
|
placeholder: "••••••••",
|
|
@@ -3629,7 +3834,7 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3629
3834
|
validation: "required|length:8",
|
|
3630
3835
|
"outer-class": "max-w-full"
|
|
3631
3836
|
}),
|
|
3632
|
-
|
|
3837
|
+
k(u, {
|
|
3633
3838
|
label: "Confirm Password",
|
|
3634
3839
|
name: "password_confirmation",
|
|
3635
3840
|
placeholder: "••••••••",
|
|
@@ -3637,15 +3842,15 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3637
3842
|
validation: "required|confirm:password",
|
|
3638
3843
|
"outer-class": "max-w-full"
|
|
3639
3844
|
}),
|
|
3640
|
-
|
|
3641
|
-
|
|
3845
|
+
o.value ? (m(), g("div", Nr, M(o.value), 1)) : T("", !0),
|
|
3846
|
+
k(S(X), {
|
|
3642
3847
|
type: "submit",
|
|
3643
3848
|
size: "xl",
|
|
3644
3849
|
disabled: n.value,
|
|
3645
3850
|
"button-class": "w-full mb-2"
|
|
3646
3851
|
}, {
|
|
3647
|
-
default:
|
|
3648
|
-
n.value ? (m(),
|
|
3852
|
+
default: P(() => [
|
|
3853
|
+
n.value ? (m(), g("span", qr, "Resetting...")) : (m(), g("span", Zr, "Reset password"))
|
|
3649
3854
|
]),
|
|
3650
3855
|
_: 1
|
|
3651
3856
|
}, 8, ["disabled"])
|
|
@@ -3656,14 +3861,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3656
3861
|
]);
|
|
3657
3862
|
};
|
|
3658
3863
|
}
|
|
3659
|
-
},
|
|
3864
|
+
}, Kr = { class: "h-full grid place-content-center relative" }, Gr = { class: "absolute top-8 left-8" }, Wr = ["src"], Yr = {
|
|
3660
3865
|
key: 1,
|
|
3661
3866
|
width: "59",
|
|
3662
3867
|
height: "23",
|
|
3663
3868
|
viewBox: "0 0 59 23",
|
|
3664
3869
|
fill: "none",
|
|
3665
3870
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3666
|
-
},
|
|
3871
|
+
}, Xr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Jr = { class: "flex gap-4 justify-center" }, Qr = {
|
|
3667
3872
|
__name: "SparkError403View",
|
|
3668
3873
|
props: {
|
|
3669
3874
|
logo: {
|
|
@@ -3676,17 +3881,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3676
3881
|
}
|
|
3677
3882
|
},
|
|
3678
3883
|
setup(e) {
|
|
3679
|
-
const s =
|
|
3884
|
+
const s = Y(), t = e, a = () => {
|
|
3680
3885
|
s.push(t.homeRoute);
|
|
3681
3886
|
};
|
|
3682
|
-
return (l, n) => (m(),
|
|
3683
|
-
f("div",
|
|
3684
|
-
t.logo ? (m(),
|
|
3887
|
+
return (l, n) => (m(), g("div", Kr, [
|
|
3888
|
+
f("div", Gr, [
|
|
3889
|
+
t.logo ? (m(), g("img", {
|
|
3685
3890
|
key: 0,
|
|
3686
3891
|
src: t.logo,
|
|
3687
3892
|
alt: "Logo",
|
|
3688
3893
|
class: "h-[23px] w-auto"
|
|
3689
|
-
}, null, 8,
|
|
3894
|
+
}, null, 8, Wr)) : (m(), g("svg", Yr, [...n[0] || (n[0] = [
|
|
3690
3895
|
f("path", {
|
|
3691
3896
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3692
3897
|
fill: "#1C64F2"
|
|
@@ -3705,23 +3910,23 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3705
3910
|
}, null, -1)
|
|
3706
3911
|
])]))
|
|
3707
3912
|
]),
|
|
3708
|
-
f("div",
|
|
3913
|
+
f("div", Xr, [
|
|
3709
3914
|
n[2] || (n[2] = f("div", null, [
|
|
3710
3915
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
3711
3916
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
3712
3917
|
f("p", { class: "text-gray-600" }, [
|
|
3713
|
-
|
|
3918
|
+
A(" You don't have permission to access this resource."),
|
|
3714
3919
|
f("br"),
|
|
3715
|
-
|
|
3920
|
+
A(" If you believe this is an error, please contact your administrator. ")
|
|
3716
3921
|
])
|
|
3717
3922
|
], -1)),
|
|
3718
|
-
f("div",
|
|
3719
|
-
|
|
3720
|
-
onClick:
|
|
3923
|
+
f("div", Jr, [
|
|
3924
|
+
k(S(X), {
|
|
3925
|
+
onClick: a,
|
|
3721
3926
|
size: "lg"
|
|
3722
3927
|
}, {
|
|
3723
|
-
default:
|
|
3724
|
-
|
|
3928
|
+
default: P(() => [...n[1] || (n[1] = [
|
|
3929
|
+
A(" Go to Home ", -1)
|
|
3725
3930
|
])]),
|
|
3726
3931
|
_: 1
|
|
3727
3932
|
})
|
|
@@ -3729,14 +3934,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3729
3934
|
])
|
|
3730
3935
|
]));
|
|
3731
3936
|
}
|
|
3732
|
-
},
|
|
3937
|
+
}, en = { class: "h-full grid place-content-center relative" }, tn = { class: "absolute top-8 left-8" }, sn = ["src"], an = {
|
|
3733
3938
|
key: 1,
|
|
3734
3939
|
width: "59",
|
|
3735
3940
|
height: "23",
|
|
3736
3941
|
viewBox: "0 0 59 23",
|
|
3737
3942
|
fill: "none",
|
|
3738
3943
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3739
|
-
},
|
|
3944
|
+
}, on = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, rn = { class: "flex gap-4 justify-center" }, nn = {
|
|
3740
3945
|
__name: "SparkError404View",
|
|
3741
3946
|
props: {
|
|
3742
3947
|
logo: {
|
|
@@ -3749,17 +3954,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3749
3954
|
}
|
|
3750
3955
|
},
|
|
3751
3956
|
setup(e) {
|
|
3752
|
-
const s =
|
|
3957
|
+
const s = Y(), t = e, a = () => {
|
|
3753
3958
|
s.push(t.homeRoute);
|
|
3754
3959
|
};
|
|
3755
|
-
return (l, n) => (m(),
|
|
3756
|
-
f("div",
|
|
3757
|
-
t.logo ? (m(),
|
|
3960
|
+
return (l, n) => (m(), g("div", en, [
|
|
3961
|
+
f("div", tn, [
|
|
3962
|
+
t.logo ? (m(), g("img", {
|
|
3758
3963
|
key: 0,
|
|
3759
3964
|
src: t.logo,
|
|
3760
3965
|
alt: "Logo",
|
|
3761
3966
|
class: "h-[23px] w-auto"
|
|
3762
|
-
}, null, 8,
|
|
3967
|
+
}, null, 8, sn)) : (m(), g("svg", an, [...n[0] || (n[0] = [
|
|
3763
3968
|
f("path", {
|
|
3764
3969
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3765
3970
|
fill: "#1C64F2"
|
|
@@ -3778,19 +3983,19 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3778
3983
|
}, null, -1)
|
|
3779
3984
|
])]))
|
|
3780
3985
|
]),
|
|
3781
|
-
f("div",
|
|
3986
|
+
f("div", on, [
|
|
3782
3987
|
n[2] || (n[2] = f("div", null, [
|
|
3783
3988
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
3784
3989
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
3785
3990
|
f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
3786
3991
|
], -1)),
|
|
3787
|
-
f("div",
|
|
3788
|
-
|
|
3789
|
-
onClick:
|
|
3992
|
+
f("div", rn, [
|
|
3993
|
+
k(S(X), {
|
|
3994
|
+
onClick: a,
|
|
3790
3995
|
size: "lg"
|
|
3791
3996
|
}, {
|
|
3792
|
-
default:
|
|
3793
|
-
|
|
3997
|
+
default: P(() => [...n[1] || (n[1] = [
|
|
3998
|
+
A(" Go to Home ", -1)
|
|
3794
3999
|
])]),
|
|
3795
4000
|
_: 1
|
|
3796
4001
|
})
|
|
@@ -3798,14 +4003,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3798
4003
|
])
|
|
3799
4004
|
]));
|
|
3800
4005
|
}
|
|
3801
|
-
},
|
|
4006
|
+
}, ln = { class: "h-full grid place-content-center relative" }, cn = { class: "absolute top-8 left-8" }, un = ["src"], dn = {
|
|
3802
4007
|
key: 1,
|
|
3803
4008
|
width: "59",
|
|
3804
4009
|
height: "23",
|
|
3805
4010
|
viewBox: "0 0 59 23",
|
|
3806
4011
|
fill: "none",
|
|
3807
4012
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3808
|
-
},
|
|
4013
|
+
}, pn = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, fn = { class: "text-primary-600 text-7xl font-bold mb-4" }, mn = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, hn = { class: "text-gray-600" }, gn = { class: "flex gap-4 justify-center" }, Xn = {
|
|
3809
4014
|
__name: "SparkErrorGeneralView",
|
|
3810
4015
|
props: {
|
|
3811
4016
|
logo: {
|
|
@@ -3830,17 +4035,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3830
4035
|
}
|
|
3831
4036
|
},
|
|
3832
4037
|
setup(e) {
|
|
3833
|
-
const s =
|
|
4038
|
+
const s = Y(), t = e, a = () => {
|
|
3834
4039
|
s.push(t.homeRoute);
|
|
3835
4040
|
};
|
|
3836
|
-
return (l, n) => (m(),
|
|
3837
|
-
f("div",
|
|
3838
|
-
t.logo ? (m(),
|
|
4041
|
+
return (l, n) => (m(), g("div", ln, [
|
|
4042
|
+
f("div", cn, [
|
|
4043
|
+
t.logo ? (m(), g("img", {
|
|
3839
4044
|
key: 0,
|
|
3840
4045
|
src: t.logo,
|
|
3841
4046
|
alt: "Logo",
|
|
3842
4047
|
class: "h-[23px] w-auto"
|
|
3843
|
-
}, null, 8,
|
|
4048
|
+
}, null, 8, un)) : (m(), g("svg", dn, [...n[0] || (n[0] = [
|
|
3844
4049
|
f("path", {
|
|
3845
4050
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3846
4051
|
fill: "#1C64F2"
|
|
@@ -3859,19 +4064,19 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3859
4064
|
}, null, -1)
|
|
3860
4065
|
])]))
|
|
3861
4066
|
]),
|
|
3862
|
-
f("div",
|
|
4067
|
+
f("div", pn, [
|
|
3863
4068
|
f("div", null, [
|
|
3864
|
-
f("div",
|
|
3865
|
-
f("h1",
|
|
3866
|
-
f("p",
|
|
4069
|
+
f("div", fn, M(t.errorCode || "Error"), 1),
|
|
4070
|
+
f("h1", mn, M(t.title || "Something went wrong"), 1),
|
|
4071
|
+
f("p", hn, M(t.message || "An unexpected error occurred. Please try again later."), 1)
|
|
3867
4072
|
]),
|
|
3868
|
-
f("div",
|
|
3869
|
-
|
|
3870
|
-
onClick:
|
|
4073
|
+
f("div", gn, [
|
|
4074
|
+
k(S(X), {
|
|
4075
|
+
onClick: a,
|
|
3871
4076
|
size: "lg"
|
|
3872
4077
|
}, {
|
|
3873
|
-
default:
|
|
3874
|
-
|
|
4078
|
+
default: P(() => [...n[1] || (n[1] = [
|
|
4079
|
+
A(" Go to Home ", -1)
|
|
3875
4080
|
])]),
|
|
3876
4081
|
_: 1
|
|
3877
4082
|
})
|
|
@@ -3880,57 +4085,57 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
|
|
|
3880
4085
|
]));
|
|
3881
4086
|
}
|
|
3882
4087
|
};
|
|
3883
|
-
function
|
|
4088
|
+
function Jn(e = {}) {
|
|
3884
4089
|
const {
|
|
3885
4090
|
loginPath: s = "/login",
|
|
3886
4091
|
logoutPath: t = "/logout",
|
|
3887
|
-
forgotPasswordPath:
|
|
4092
|
+
forgotPasswordPath: a = "/forgot-password",
|
|
3888
4093
|
resetPasswordPath: l = "/password/reset",
|
|
3889
4094
|
logo: n = "",
|
|
3890
|
-
defaultRedirect:
|
|
4095
|
+
defaultRedirect: o = "/dashboard"
|
|
3891
4096
|
} = e;
|
|
3892
4097
|
return [
|
|
3893
4098
|
{
|
|
3894
4099
|
path: s,
|
|
3895
4100
|
name: "login",
|
|
3896
|
-
component:
|
|
3897
|
-
props: { logo: n, defaultRedirect:
|
|
4101
|
+
component: $r,
|
|
4102
|
+
props: { logo: n, defaultRedirect: o },
|
|
3898
4103
|
meta: { auth: !1 }
|
|
3899
4104
|
},
|
|
3900
4105
|
{
|
|
3901
4106
|
path: t,
|
|
3902
4107
|
name: "logout",
|
|
3903
|
-
component:
|
|
4108
|
+
component: Tr,
|
|
3904
4109
|
props: { defaultRedirect: s },
|
|
3905
4110
|
meta: { auth: !1 }
|
|
3906
4111
|
},
|
|
3907
4112
|
{
|
|
3908
|
-
path:
|
|
4113
|
+
path: a,
|
|
3909
4114
|
name: "forgot-password",
|
|
3910
|
-
component:
|
|
4115
|
+
component: Ar,
|
|
3911
4116
|
props: { logo: n, loginRoute: s },
|
|
3912
4117
|
meta: { auth: !1 }
|
|
3913
4118
|
},
|
|
3914
4119
|
{
|
|
3915
4120
|
path: l,
|
|
3916
4121
|
name: "password-reset",
|
|
3917
|
-
component:
|
|
4122
|
+
component: Ur,
|
|
3918
4123
|
props: { logo: n, loginRoute: s },
|
|
3919
4124
|
meta: { auth: !1 }
|
|
3920
4125
|
}
|
|
3921
4126
|
];
|
|
3922
4127
|
}
|
|
3923
|
-
function
|
|
4128
|
+
function Qn(e, s = {}) {
|
|
3924
4129
|
const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
|
|
3925
|
-
e.beforeEach(async (
|
|
3926
|
-
const
|
|
3927
|
-
|
|
4130
|
+
e.beforeEach(async (a, l, n) => {
|
|
4131
|
+
const o = W();
|
|
4132
|
+
o.state.ready || await o.fetchUser(), yn(a, n, o, t);
|
|
3928
4133
|
});
|
|
3929
4134
|
}
|
|
3930
|
-
function
|
|
4135
|
+
function yn(e, s, t, a) {
|
|
3931
4136
|
const l = e.meta.auth !== !1, n = t.check;
|
|
3932
4137
|
if (t.state.overrideToken && e.path === "/logout") {
|
|
3933
|
-
s({ path:
|
|
4138
|
+
s({ path: a });
|
|
3934
4139
|
return;
|
|
3935
4140
|
}
|
|
3936
4141
|
if (!n) {
|
|
@@ -3942,44 +4147,44 @@ function un(e, s, t, o) {
|
|
|
3942
4147
|
s();
|
|
3943
4148
|
return;
|
|
3944
4149
|
}
|
|
3945
|
-
let
|
|
3946
|
-
if (
|
|
4150
|
+
let o = e.fullPath;
|
|
4151
|
+
if (o === "/" || o === "" || o === a) {
|
|
3947
4152
|
s({ path: t.state.routes.auth });
|
|
3948
4153
|
return;
|
|
3949
4154
|
}
|
|
3950
|
-
|
|
4155
|
+
o.includes("%") && (o = decodeURIComponent(o)), s({
|
|
3951
4156
|
path: t.state.routes.auth,
|
|
3952
|
-
query: { redirect:
|
|
4157
|
+
query: { redirect: o }
|
|
3953
4158
|
});
|
|
3954
4159
|
return;
|
|
3955
4160
|
}
|
|
3956
4161
|
if (n) {
|
|
3957
4162
|
if (!l && e.path === t.state.routes.auth) {
|
|
3958
|
-
s({ path:
|
|
4163
|
+
s({ path: a });
|
|
3959
4164
|
return;
|
|
3960
4165
|
}
|
|
3961
4166
|
if (e.path === "/") {
|
|
3962
|
-
s({ path:
|
|
4167
|
+
s({ path: a });
|
|
3963
4168
|
return;
|
|
3964
4169
|
}
|
|
3965
4170
|
s();
|
|
3966
4171
|
}
|
|
3967
4172
|
}
|
|
3968
|
-
function
|
|
4173
|
+
function el(e = {}) {
|
|
3969
4174
|
const {
|
|
3970
4175
|
forbiddenPath: s = "/error/403",
|
|
3971
4176
|
logo: t = "",
|
|
3972
|
-
homeRoute:
|
|
4177
|
+
homeRoute: a = "/dashboard"
|
|
3973
4178
|
} = e;
|
|
3974
4179
|
return {
|
|
3975
4180
|
path: s,
|
|
3976
4181
|
name: "error-403",
|
|
3977
|
-
component:
|
|
3978
|
-
props: { logo: t, homeRoute:
|
|
4182
|
+
component: Qr,
|
|
4183
|
+
props: { logo: t, homeRoute: a },
|
|
3979
4184
|
meta: { auth: !1 }
|
|
3980
4185
|
};
|
|
3981
4186
|
}
|
|
3982
|
-
function
|
|
4187
|
+
function tl(e = {}) {
|
|
3983
4188
|
const {
|
|
3984
4189
|
logo: s = "",
|
|
3985
4190
|
homeRoute: t = "/dashboard"
|
|
@@ -3987,25 +4192,25 @@ function Kn(e = {}) {
|
|
|
3987
4192
|
return {
|
|
3988
4193
|
path: "/:pathMatch(.*)*",
|
|
3989
4194
|
name: "error-404",
|
|
3990
|
-
component:
|
|
4195
|
+
component: nn,
|
|
3991
4196
|
props: { logo: s, homeRoute: t },
|
|
3992
4197
|
meta: { auth: !1 }
|
|
3993
4198
|
};
|
|
3994
4199
|
}
|
|
3995
|
-
function
|
|
4200
|
+
function sl(e, s) {
|
|
3996
4201
|
e.beforeResolve(async (t) => {
|
|
3997
4202
|
if (t.meta.auth !== !1) {
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4203
|
+
const a = W();
|
|
4204
|
+
a.state.ready && a.check && await s();
|
|
4000
4205
|
}
|
|
4001
4206
|
});
|
|
4002
4207
|
}
|
|
4003
|
-
const
|
|
4004
|
-
const e =
|
|
4208
|
+
const al = ue("sparkNav", () => {
|
|
4209
|
+
const e = K({
|
|
4005
4210
|
menu: [],
|
|
4006
4211
|
collapsed: !1,
|
|
4007
4212
|
hidden: !1
|
|
4008
|
-
}), s =
|
|
4213
|
+
}), s = Y(), t = te(), a = (i = []) => {
|
|
4009
4214
|
e.menu = i, r();
|
|
4010
4215
|
}, l = (i, u) => {
|
|
4011
4216
|
for (const d of i) {
|
|
@@ -4025,7 +4230,7 @@ const Wn = ue("sparkNav", () => {
|
|
|
4025
4230
|
}
|
|
4026
4231
|
await s.push(i);
|
|
4027
4232
|
}
|
|
4028
|
-
},
|
|
4233
|
+
}, o = () => {
|
|
4029
4234
|
e.collapsed = !e.collapsed;
|
|
4030
4235
|
}, c = () => {
|
|
4031
4236
|
e.hidden = !e.hidden;
|
|
@@ -4040,7 +4245,7 @@ const Wn = ue("sparkNav", () => {
|
|
|
4040
4245
|
u(e.menu);
|
|
4041
4246
|
}
|
|
4042
4247
|
};
|
|
4043
|
-
return
|
|
4248
|
+
return z(
|
|
4044
4249
|
() => t.path,
|
|
4045
4250
|
() => {
|
|
4046
4251
|
r();
|
|
@@ -4048,79 +4253,80 @@ const Wn = ue("sparkNav", () => {
|
|
|
4048
4253
|
{ immediate: !0 }
|
|
4049
4254
|
), {
|
|
4050
4255
|
state: e,
|
|
4051
|
-
initialize:
|
|
4256
|
+
initialize: a,
|
|
4052
4257
|
goto: n,
|
|
4053
|
-
toggleCollapsed:
|
|
4258
|
+
toggleCollapsed: o,
|
|
4054
4259
|
toggleHidden: c,
|
|
4055
4260
|
syncWithRoute: r
|
|
4056
4261
|
};
|
|
4057
4262
|
});
|
|
4058
4263
|
export {
|
|
4059
|
-
|
|
4264
|
+
O as Icons,
|
|
4060
4265
|
oe as SparkAlert,
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4266
|
+
Es as SparkAppSelector,
|
|
4267
|
+
oa as SparkBrandSelector,
|
|
4268
|
+
X as SparkButton,
|
|
4269
|
+
na as SparkButtonGroup,
|
|
4270
|
+
Nn as SparkCard,
|
|
4271
|
+
Wn as SparkDefaultContainer,
|
|
4272
|
+
Qr as SparkError403View,
|
|
4273
|
+
nn as SparkError404View,
|
|
4274
|
+
Xn as SparkErrorGeneralView,
|
|
4275
|
+
Ar as SparkForgotPasswordView,
|
|
4276
|
+
Zn as SparkImageUpload,
|
|
4277
|
+
$r as SparkLoginView,
|
|
4278
|
+
Tr as SparkLogoutView,
|
|
4279
|
+
_a as SparkModalContainer,
|
|
4280
|
+
ba as SparkModalDialog,
|
|
4281
|
+
zn as SparkNotificationOutlet,
|
|
4282
|
+
Pe as SparkOverlay,
|
|
4283
|
+
Yn as SparkPublicContainer,
|
|
4284
|
+
Ur as SparkResetPasswordView,
|
|
4285
|
+
qn as SparkTable,
|
|
4286
|
+
To as SparkTableDatePicker,
|
|
4287
|
+
So as SparkTableFilterButtons,
|
|
4288
|
+
xo as SparkTableFilterSelect,
|
|
4289
|
+
uo as SparkTablePaginationPaging,
|
|
4290
|
+
mo as SparkTablePaginationPerPage,
|
|
4291
|
+
Vo as SparkTableReset,
|
|
4292
|
+
yo as SparkTableSearch,
|
|
4293
|
+
Re as SparkTableToolbar,
|
|
4294
|
+
In as SparkToastContainer,
|
|
4295
|
+
Dn as addIcons,
|
|
4296
|
+
el as create403Route,
|
|
4297
|
+
tl as create404Route,
|
|
4298
|
+
Jn as createAuthRoutes,
|
|
4299
|
+
No as createAxiosInstance,
|
|
4300
|
+
Un as createBootstrapService,
|
|
4301
|
+
La as customiseHeader,
|
|
4302
|
+
jo as deleteCookie,
|
|
4303
|
+
An as formKitGenesisOverride,
|
|
4304
|
+
Bn as formKitIconLoader,
|
|
4305
|
+
On as formKitIcons,
|
|
4306
|
+
Ua as formatTemporal,
|
|
4307
|
+
Zo as getAxiosInstance,
|
|
4308
|
+
Bo as getCookie,
|
|
4103
4309
|
ct as getDomain,
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4310
|
+
Oe as getFormLevelMessage,
|
|
4311
|
+
Uo as isValidationError,
|
|
4312
|
+
Ka as parseDatetime,
|
|
4313
|
+
qo as parseLaravelErrors,
|
|
4314
|
+
Ca as renderHeaderTitle,
|
|
4315
|
+
Do as setCookie,
|
|
4316
|
+
Qn as setupAuthGuards,
|
|
4317
|
+
Kn as setupAxios,
|
|
4318
|
+
sl as setupBootstrapGuard,
|
|
4319
|
+
jn as setupFontAwesome,
|
|
4320
|
+
re as sparkModalService,
|
|
4321
|
+
j as sparkNotificationService,
|
|
4322
|
+
ae as sparkOverlayService,
|
|
4323
|
+
Xa as updateRow,
|
|
4324
|
+
Gn as useFormSubmission,
|
|
4119
4325
|
rt as useSparkAppSelectorStore,
|
|
4120
4326
|
nt as useSparkAppStore,
|
|
4121
|
-
|
|
4327
|
+
W as useSparkAuthStore,
|
|
4122
4328
|
it as useSparkBrandFilterStore,
|
|
4123
|
-
|
|
4329
|
+
al as useSparkNavStore,
|
|
4124
4330
|
Ee as useSparkOverlay,
|
|
4125
|
-
|
|
4331
|
+
Ja as useSparkTableRouteSync
|
|
4126
4332
|
};
|