@wishbone-media/spark 0.24.0 → 0.26.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.css +1 -1
- package/dist/index.js +702 -655
- package/formkit.config.js +12 -7
- package/formkit.theme.mjs +101 -97
- package/package.json +1 -1
- package/src/assets/css/spark-table.css +1 -1
- package/src/components/SparkButton.vue +5 -5
- package/src/components/SparkCard.vue +1 -1
- package/src/components/plugins/SparkTableFilterButtons.vue +1 -0
- package/src/components/plugins/SparkTableReset.vue +1 -0
- package/src/plugins/fontawesome.js +90 -1
- package/src/plugins/index.js +1 -1
package/dist/index.js
CHANGED
|
@@ -1,89 +1,131 @@
|
|
|
1
|
-
import { computed as C, resolveComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faInbox as
|
|
1
|
+
import { computed as C, resolveComponent as O, createElementBlock as h, openBlock as m, normalizeClass as H, createElementVNode as f, createCommentVNode as P, createVNode as b, unref as x, renderSlot as B, reactive as q, Fragment as R, renderList as z, toDisplayString as L, createBlock as V, resolveDynamicComponent as N, markRaw as me, ref as F, watch as I, Transition as ut, withCtx as T, normalizeProps as dt, mergeProps as Z, createTextVNode as E, Teleport as pt, TransitionGroup as ie, inject as Ee, provide as ft, toHandlers as Fe, onMounted as _e, withModifiers as ee, useSlots as Oe, onUnmounted as mt, withDirectives as ht, vShow as gt, h as Se } from "vue";
|
|
2
|
+
import { icon as J, library as Be } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import { FontAwesomeIcon as yt } from "@fortawesome/vue-fontawesome";
|
|
4
|
+
import { faCircleDot as De, faEyeDropper as ze, faAnglesLeft as je, faAnglesRight as Ie, faStar as Ne, faSpinnerThird as Ze, faCircle as vt, faFile as be, faCalendar as qe, faArrowUp as Ue, faArrowDown as Ke, faPlus as Ge, faInbox as bt, faCloudDownload as xt, faBolt as kt, faUndo as wt, faEye as _t, faSignOut as St, faXmark as xe, faTrash as We, faTimes as Ct, faStreetView as $t, faSortUp as Tt, faSortDown as Pt, faSort as Lt, faScaleBalanced as Mt, faSatelliteDish as Ht, faLayerPlus as Vt, faLaptopMobile as Rt, faInfoCircle as At, faGripDotsVertical as Ye, faGearComplex as Et, faFlag as Ft, faFaceSmileWink as Ot, faFaceSmileRelaxed as Bt, faExclamationTriangle as Dt, faEllipsisVertical as zt, faEllipsis as jt, faEdit as It, faComments as Nt, faCircleXmark as Zt, faCircleUser as qt, faChevronUp as Ut, faChevronRight as Xe, faChevronLeft as Je, faChevronDown as Qe, faCheckCircle as Kt, faCheck as ke, faBullhorn as Gt, faBellRing as Wt, faBarsSort as Yt, faArrowRightToLine as Xt, faArrowLeftToLine as Jt } from "@fortawesome/pro-regular-svg-icons";
|
|
5
|
+
import { faSortUp as Qt, faSortDown as es, faSort as ts } from "@fortawesome/pro-duotone-svg-icons";
|
|
5
6
|
import { defineStore as ue } from "pinia";
|
|
6
|
-
import { TransitionRoot as
|
|
7
|
+
import { TransitionRoot as et, Dialog as tt, TransitionChild as fe, DialogPanel as st } from "@headlessui/vue";
|
|
7
8
|
import he from "nprogress";
|
|
8
|
-
import { range as
|
|
9
|
-
import { HotTable as
|
|
9
|
+
import { range as ss, get as Y, find as os, has as as } from "lodash";
|
|
10
|
+
import { HotTable as rs } from "@handsontable/vue3";
|
|
10
11
|
import "handsontable/styles/handsontable.css";
|
|
11
12
|
import "handsontable/styles/ht-theme-classic.css";
|
|
12
|
-
import { registerPlugin as pe, AutoColumnSize as
|
|
13
|
-
import { registerAllCellTypes as
|
|
14
|
-
import { useDebounceFn as
|
|
15
|
-
import { registerRenderer as
|
|
16
|
-
import { useRouter as
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
farSortDown: dt,
|
|
62
|
-
farSortUp: ut,
|
|
63
|
-
farStreetView: ct,
|
|
64
|
-
farTimes: it,
|
|
65
|
-
farTrash: lt,
|
|
66
|
-
farXmark: nt,
|
|
67
|
-
farSignOut: rt,
|
|
68
|
-
farEye: at,
|
|
69
|
-
farUndo: ot,
|
|
70
|
-
farBolt: st,
|
|
71
|
-
farCloudDownload: tt,
|
|
72
|
-
farInbox: et,
|
|
73
|
-
fadSort: Qt,
|
|
13
|
+
import { registerPlugin as pe, AutoColumnSize as ns, CopyPaste as ls, StretchColumns as is, NestedHeaders as cs } from "handsontable/plugins";
|
|
14
|
+
import { registerAllCellTypes as us } from "handsontable/cellTypes";
|
|
15
|
+
import { useDebounceFn as ot, watchDebounced as Ce } from "@vueuse/core";
|
|
16
|
+
import { registerRenderer as ds, baseRenderer as ps } from "handsontable/renderers";
|
|
17
|
+
import { useRouter as Q, useRoute as le } from "vue-router";
|
|
18
|
+
import ne from "axios";
|
|
19
|
+
const A = {
|
|
20
|
+
farArrowLeftToLine: Jt,
|
|
21
|
+
farArrowRightToLine: Xt,
|
|
22
|
+
farBarsSort: Yt,
|
|
23
|
+
farBellRing: Wt,
|
|
24
|
+
farBullhorn: Gt,
|
|
25
|
+
farCheck: ke,
|
|
26
|
+
farCheckCircle: Kt,
|
|
27
|
+
farChevronDown: Qe,
|
|
28
|
+
farChevronLeft: Je,
|
|
29
|
+
farChevronRight: Xe,
|
|
30
|
+
farChevronUp: Ut,
|
|
31
|
+
farCircleUser: qt,
|
|
32
|
+
farCircleXmark: Zt,
|
|
33
|
+
farComments: Nt,
|
|
34
|
+
farEdit: It,
|
|
35
|
+
farEllipsis: jt,
|
|
36
|
+
farEllipsisVertical: zt,
|
|
37
|
+
farExclamationTriangle: Dt,
|
|
38
|
+
farFaceSmileRelaxed: Bt,
|
|
39
|
+
farFaceSmileWink: Ot,
|
|
40
|
+
farFlag: Ft,
|
|
41
|
+
farGearComplex: Et,
|
|
42
|
+
farGripDotsVertical: Ye,
|
|
43
|
+
farInfoCircle: At,
|
|
44
|
+
farLaptopMobile: Rt,
|
|
45
|
+
farLayerPlus: Vt,
|
|
46
|
+
farSatelliteDish: Ht,
|
|
47
|
+
farScaleBalanced: Mt,
|
|
48
|
+
farSort: Lt,
|
|
49
|
+
farSortDown: Pt,
|
|
50
|
+
farSortUp: Tt,
|
|
51
|
+
farStreetView: $t,
|
|
52
|
+
farTimes: Ct,
|
|
53
|
+
farTrash: We,
|
|
54
|
+
farXmark: xe,
|
|
55
|
+
farSignOut: St,
|
|
56
|
+
farEye: _t,
|
|
57
|
+
farUndo: wt,
|
|
58
|
+
farBolt: kt,
|
|
59
|
+
farCloudDownload: xt,
|
|
60
|
+
farInbox: bt,
|
|
61
|
+
fadSort: ts,
|
|
74
62
|
fadSortDown: es,
|
|
75
|
-
fadSortUp:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
fadSortUp: Qt,
|
|
64
|
+
// Additional icons for FormKit genesis replacement
|
|
65
|
+
farPlus: Ge,
|
|
66
|
+
farArrowDown: Ke,
|
|
67
|
+
farArrowUp: Ue,
|
|
68
|
+
farCalendar: qe,
|
|
69
|
+
farFile: be,
|
|
70
|
+
farCircle: vt,
|
|
71
|
+
farSpinner: Ze,
|
|
72
|
+
farStar: Ne,
|
|
73
|
+
farAnglesRight: Ie,
|
|
74
|
+
farAnglesLeft: je,
|
|
75
|
+
farEyeDropper: ze,
|
|
76
|
+
farCircleDot: De
|
|
77
|
+
}, Cn = Object.fromEntries(
|
|
78
|
+
Object.entries(A).map(([e, s]) => {
|
|
79
|
+
const t = J(s);
|
|
80
|
+
return [e, t?.html?.[0] || ""];
|
|
81
|
+
})
|
|
82
|
+
), fs = {
|
|
83
|
+
add: Ge,
|
|
84
|
+
arrowDown: Ke,
|
|
85
|
+
arrowUp: Ue,
|
|
86
|
+
check: ke,
|
|
87
|
+
close: xe,
|
|
88
|
+
checkboxDecorator: ke,
|
|
89
|
+
date: qe,
|
|
90
|
+
dragHandle: Ye,
|
|
91
|
+
fileItem: be,
|
|
92
|
+
fileRemove: xe,
|
|
93
|
+
noFiles: be,
|
|
94
|
+
radioDecorator: De,
|
|
95
|
+
// Circle with dot for radio indicator
|
|
96
|
+
select: Qe,
|
|
97
|
+
spinner: Ze,
|
|
98
|
+
star: Ne,
|
|
99
|
+
trash: We,
|
|
100
|
+
fastForward: Ie,
|
|
101
|
+
right: Xe,
|
|
102
|
+
left: Je,
|
|
103
|
+
rewind: je,
|
|
104
|
+
color: ze
|
|
105
|
+
}, $n = Object.fromEntries(
|
|
106
|
+
Object.entries(fs).map(([e, s]) => {
|
|
107
|
+
const t = J(s);
|
|
108
|
+
return [e, t?.html?.[0] || ""];
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
function Tn(e) {
|
|
112
|
+
const s = A[e];
|
|
113
|
+
if (s) {
|
|
114
|
+
const t = J(s);
|
|
115
|
+
return Promise.resolve(t?.html?.[0] || void 0);
|
|
116
|
+
}
|
|
117
|
+
return Promise.resolve(void 0);
|
|
118
|
+
}
|
|
119
|
+
function Pn(e) {
|
|
120
|
+
Object.assign(A, e), Be.add(...Object.values(e));
|
|
79
121
|
}
|
|
80
|
-
function
|
|
81
|
-
Be.add(...Object.values(
|
|
122
|
+
function Ln(e) {
|
|
123
|
+
Be.add(...Object.values(A)), e.component("FontAwesomeIcon", yt);
|
|
82
124
|
}
|
|
83
|
-
const
|
|
125
|
+
const ms = { class: "flex items-center" }, hs = { class: "shrink-0 self-start" }, gs = { class: "ml-3" }, ys = {
|
|
84
126
|
key: 0,
|
|
85
127
|
class: "ml-auto pl-3 pt-1 self-start"
|
|
86
|
-
},
|
|
128
|
+
}, vs = { class: "-mx-1.5 -my-1.5" }, oe = {
|
|
87
129
|
__name: "SparkAlert",
|
|
88
130
|
props: {
|
|
89
131
|
type: {
|
|
@@ -120,33 +162,33 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
120
162
|
info: "text-blue-400 hover:bg-blue-100"
|
|
121
163
|
})[s.type]);
|
|
122
164
|
return (a, c) => {
|
|
123
|
-
const r =
|
|
165
|
+
const r = O("font-awesome-icon");
|
|
124
166
|
return m(), h("div", {
|
|
125
167
|
class: H(["rounded-md border p-4", t.value])
|
|
126
168
|
}, [
|
|
127
|
-
f("div",
|
|
128
|
-
f("div",
|
|
169
|
+
f("div", ms, [
|
|
170
|
+
f("div", hs, [
|
|
129
171
|
b(r, {
|
|
130
|
-
icon: x(
|
|
172
|
+
icon: x(A)[l.value],
|
|
131
173
|
class: H(o.value)
|
|
132
174
|
}, null, 8, ["icon", "class"])
|
|
133
175
|
]),
|
|
134
|
-
f("div",
|
|
135
|
-
|
|
176
|
+
f("div", gs, [
|
|
177
|
+
B(a.$slots, "default")
|
|
136
178
|
]),
|
|
137
|
-
e.closeable ? (m(), h("div",
|
|
138
|
-
f("div",
|
|
179
|
+
e.closeable ? (m(), h("div", ys, [
|
|
180
|
+
f("div", vs, [
|
|
139
181
|
f("button", {
|
|
140
182
|
type: "button",
|
|
141
183
|
class: H(["inline-flex rounded-md px-2 py-1.5", n.value]),
|
|
142
184
|
onClick: c[0] || (c[0] = (i) => a.$emit("close"))
|
|
143
185
|
}, [
|
|
144
186
|
b(r, {
|
|
145
|
-
icon: x(
|
|
187
|
+
icon: x(A).farXmark
|
|
146
188
|
}, null, 8, ["icon"])
|
|
147
189
|
], 2)
|
|
148
190
|
])
|
|
149
|
-
])) :
|
|
191
|
+
])) : P("", !0)
|
|
150
192
|
])
|
|
151
193
|
], 2);
|
|
152
194
|
};
|
|
@@ -200,7 +242,7 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
200
242
|
href: "https://tabula.letsbolt.io",
|
|
201
243
|
icon: "farCompass"
|
|
202
244
|
}
|
|
203
|
-
],
|
|
245
|
+
], at = ue("sparkAppSelector", () => {
|
|
204
246
|
const e = q({
|
|
205
247
|
apps: [...ge]
|
|
206
248
|
}), s = (n = {}) => {
|
|
@@ -246,7 +288,7 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
246
288
|
return a ? a.icon : "";
|
|
247
289
|
}
|
|
248
290
|
};
|
|
249
|
-
}),
|
|
291
|
+
}), rt = ue("sparkApp", () => {
|
|
250
292
|
const e = q({
|
|
251
293
|
app: "",
|
|
252
294
|
homeRoute: "dashboard",
|
|
@@ -259,16 +301,16 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
259
301
|
e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
|
|
260
302
|
}
|
|
261
303
|
};
|
|
262
|
-
}),
|
|
304
|
+
}), bs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, xs = { class: "flex flex-1 flex-col" }, ks = { class: "divide-y divide-gray-200" }, ws = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, _s = { class: "ml-auto flex items-center" }, Ss = ["href", "onClick"], Cs = { class: "gap-y-1" }, $s = { class: "text-base text-gray-800 flex items-center" }, Ts = { class: "font-medium" }, Ps = {
|
|
263
305
|
key: 0,
|
|
264
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"
|
|
265
|
-
},
|
|
307
|
+
}, Ls = { class: "text-sm text-gray-500" }, Ms = { class: "ml-auto flex items-center" }, Hs = { class: "mt-auto" }, Vs = {
|
|
266
308
|
key: 0,
|
|
267
309
|
class: "p-6"
|
|
268
|
-
},
|
|
310
|
+
}, Rs = {
|
|
269
311
|
key: 1,
|
|
270
312
|
class: "bg-gray-50 p-6"
|
|
271
|
-
},
|
|
313
|
+
}, As = {
|
|
272
314
|
__name: "SparkAppSelector",
|
|
273
315
|
props: {
|
|
274
316
|
bottomSlot: {
|
|
@@ -282,7 +324,7 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
282
324
|
},
|
|
283
325
|
emits: ["close", "select"],
|
|
284
326
|
setup(e, { emit: s }) {
|
|
285
|
-
const t = s, o =
|
|
327
|
+
const t = s, o = at(), l = rt(), n = C(() => {
|
|
286
328
|
const c = l.state.app;
|
|
287
329
|
return o.state.apps.map((r) => ({
|
|
288
330
|
...r,
|
|
@@ -292,67 +334,67 @@ const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }
|
|
|
292
334
|
t("select", c);
|
|
293
335
|
};
|
|
294
336
|
return (c, r) => {
|
|
295
|
-
const i =
|
|
296
|
-
return m(), h("div",
|
|
297
|
-
f("div",
|
|
298
|
-
f("div",
|
|
299
|
-
f("div",
|
|
337
|
+
const i = O("font-awesome-icon");
|
|
338
|
+
return m(), h("div", bs, [
|
|
339
|
+
f("div", xs, [
|
|
340
|
+
f("div", ks, [
|
|
341
|
+
f("div", ws, [
|
|
300
342
|
r[1] || (r[1] = f("div", null, "Mr Group Network", -1)),
|
|
301
|
-
f("div",
|
|
343
|
+
f("div", _s, [
|
|
302
344
|
b(i, {
|
|
303
|
-
icon: x(
|
|
345
|
+
icon: x(A).farTimes,
|
|
304
346
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
305
347
|
onClick: r[0] || (r[0] = (u) => t("close"))
|
|
306
348
|
}, null, 8, ["icon"])
|
|
307
349
|
])
|
|
308
350
|
]),
|
|
309
|
-
(m(!0), h(R, null,
|
|
351
|
+
(m(!0), h(R, null, z(n.value, (u) => (m(), h("a", {
|
|
310
352
|
key: u.name,
|
|
311
353
|
href: u.href,
|
|
312
354
|
target: "_blank",
|
|
313
355
|
class: H([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
314
356
|
onClick: (d) => u.current ? d.preventDefault() : a(u)
|
|
315
357
|
}, [
|
|
316
|
-
f("div",
|
|
317
|
-
f("div",
|
|
318
|
-
f("div",
|
|
319
|
-
u.current ? (m(), h("span",
|
|
358
|
+
f("div", Cs, [
|
|
359
|
+
f("div", $s, [
|
|
360
|
+
f("div", Ts, L(u.name), 1),
|
|
361
|
+
u.current ? (m(), h("span", Ps, " Active ")) : P("", !0)
|
|
320
362
|
]),
|
|
321
|
-
f("div",
|
|
363
|
+
f("div", Ls, L(u.description), 1)
|
|
322
364
|
]),
|
|
323
|
-
f("div",
|
|
365
|
+
f("div", Ms, [
|
|
324
366
|
b(i, {
|
|
325
367
|
class: H([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
326
|
-
icon: x(
|
|
368
|
+
icon: x(A)[u.icon]
|
|
327
369
|
}, null, 8, ["class", "icon"])
|
|
328
370
|
])
|
|
329
|
-
], 10,
|
|
371
|
+
], 10, Ss))), 128)),
|
|
330
372
|
r[2] || (r[2] = f("div", null, null, -1))
|
|
331
373
|
]),
|
|
332
|
-
f("div",
|
|
333
|
-
c.$slots.bottom || e.bottomSlot ? (m(), h("div",
|
|
334
|
-
|
|
335
|
-
e.bottomSlot ? (m(), V(N(e.bottomSlot), { key: 0 })) :
|
|
374
|
+
f("div", Hs, [
|
|
375
|
+
c.$slots.bottom || e.bottomSlot ? (m(), h("div", Vs, [
|
|
376
|
+
B(c.$slots, "bottom", {}, () => [
|
|
377
|
+
e.bottomSlot ? (m(), V(N(e.bottomSlot), { key: 0 })) : P("", !0)
|
|
336
378
|
])
|
|
337
|
-
])) :
|
|
338
|
-
c.$slots.footer || e.footerSlot ? (m(), h("div",
|
|
339
|
-
|
|
340
|
-
e.footerSlot ? (m(), V(N(e.footerSlot), { key: 0 })) :
|
|
379
|
+
])) : P("", !0),
|
|
380
|
+
c.$slots.footer || e.footerSlot ? (m(), h("div", Rs, [
|
|
381
|
+
B(c.$slots, "footer", {}, () => [
|
|
382
|
+
e.footerSlot ? (m(), V(N(e.footerSlot), { key: 0 })) : P("", !0)
|
|
341
383
|
])
|
|
342
|
-
])) :
|
|
384
|
+
])) : P("", !0)
|
|
343
385
|
])
|
|
344
386
|
])
|
|
345
387
|
]);
|
|
346
388
|
};
|
|
347
389
|
}
|
|
348
|
-
},
|
|
390
|
+
}, nt = {
|
|
349
391
|
success: 5e3,
|
|
350
392
|
info: 5e3,
|
|
351
393
|
warning: 5e3,
|
|
352
394
|
danger: 0
|
|
353
395
|
// sticky by default
|
|
354
|
-
},
|
|
355
|
-
function
|
|
396
|
+
}, $e = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
|
|
397
|
+
function Es() {
|
|
356
398
|
const e = q({
|
|
357
399
|
isVisible: !1,
|
|
358
400
|
type: "info",
|
|
@@ -385,7 +427,7 @@ function ws() {
|
|
|
385
427
|
duration: w = null
|
|
386
428
|
} = p;
|
|
387
429
|
e.type = v, e.message = k, e.component = $ ? me($) : null, e.props = g, e.closeable = _, e.isVisible = !0;
|
|
388
|
-
const y = w !== null ? w :
|
|
430
|
+
const y = w !== null ? w : nt[v];
|
|
389
431
|
e.duration = y, y > 0 && c(y);
|
|
390
432
|
},
|
|
391
433
|
hide: a,
|
|
@@ -405,7 +447,7 @@ function ws() {
|
|
|
405
447
|
}
|
|
406
448
|
};
|
|
407
449
|
}
|
|
408
|
-
class
|
|
450
|
+
class Fs {
|
|
409
451
|
constructor() {
|
|
410
452
|
this.outlets = /* @__PURE__ */ new Map(), this.toastState = q({
|
|
411
453
|
toasts: [],
|
|
@@ -423,7 +465,7 @@ class _s {
|
|
|
423
465
|
* @returns {Object} Notification outlet instance
|
|
424
466
|
*/
|
|
425
467
|
getOutlet(s = "default") {
|
|
426
|
-
return this.outlets.has(s) || this.outlets.set(s,
|
|
468
|
+
return this.outlets.has(s) || this.outlets.set(s, Es()), this.outlets.get(s);
|
|
427
469
|
}
|
|
428
470
|
/**
|
|
429
471
|
* Show a banner notification in the specified outlet
|
|
@@ -494,7 +536,7 @@ class _s {
|
|
|
494
536
|
* @param {boolean} options.newestOnTop - Whether newest toasts appear on top (default: true)
|
|
495
537
|
*/
|
|
496
538
|
configureToasts(s = {}) {
|
|
497
|
-
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 &&
|
|
539
|
+
s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 && $e.includes(s.defaultPosition) && (this.toastState.defaultPosition = s.defaultPosition), s.newestOnTop !== void 0 && (this.toastState.newestOnTop = s.newestOnTop);
|
|
498
540
|
}
|
|
499
541
|
/**
|
|
500
542
|
* Show a toast notification
|
|
@@ -517,7 +559,7 @@ class _s {
|
|
|
517
559
|
closeable: a = !0,
|
|
518
560
|
duration: c = null,
|
|
519
561
|
position: r = null
|
|
520
|
-
} = s, i = ++this._toastIdCounter, u = r &&
|
|
562
|
+
} = s, i = ++this._toastIdCounter, u = r && $e.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c : nt[t], p = {
|
|
521
563
|
id: i,
|
|
522
564
|
type: t,
|
|
523
565
|
message: o,
|
|
@@ -610,7 +652,7 @@ class _s {
|
|
|
610
652
|
t && (t.timeout && clearTimeout(t.timeout), this._toastTimers.delete(s));
|
|
611
653
|
}
|
|
612
654
|
}
|
|
613
|
-
const X = new
|
|
655
|
+
const X = new Fs(), Mn = {
|
|
614
656
|
__name: "SparkNotificationOutlet",
|
|
615
657
|
props: {
|
|
616
658
|
name: {
|
|
@@ -619,7 +661,7 @@ const X = new _s(), fn = {
|
|
|
619
661
|
}
|
|
620
662
|
},
|
|
621
663
|
setup(e) {
|
|
622
|
-
const s = e, t = C(() => X.getOutlet(s.name)), o =
|
|
664
|
+
const s = e, t = C(() => X.getOutlet(s.name)), o = F(0);
|
|
623
665
|
I(
|
|
624
666
|
() => [t.value.state.message, t.value.state.component, t.value.state.type],
|
|
625
667
|
() => {
|
|
@@ -633,7 +675,7 @@ const X = new _s(), fn = {
|
|
|
633
675
|
}, a = () => {
|
|
634
676
|
X.resume(s.name);
|
|
635
677
|
};
|
|
636
|
-
return (c, r) => (m(), V(
|
|
678
|
+
return (c, r) => (m(), V(ut, {
|
|
637
679
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
638
680
|
"enter-from-class": "opacity-0 -translate-y-2",
|
|
639
681
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -643,7 +685,7 @@ const X = new _s(), fn = {
|
|
|
643
685
|
mode: "out-in"
|
|
644
686
|
}, {
|
|
645
687
|
default: T(() => [
|
|
646
|
-
t.value.state.isVisible ? (m(), V(
|
|
688
|
+
t.value.state.isVisible ? (m(), V(oe, {
|
|
647
689
|
key: o.value,
|
|
648
690
|
type: t.value.state.type,
|
|
649
691
|
closeable: t.value.state.closeable,
|
|
@@ -652,17 +694,17 @@ const X = new _s(), fn = {
|
|
|
652
694
|
onMouseleave: a
|
|
653
695
|
}, {
|
|
654
696
|
default: T(() => [
|
|
655
|
-
t.value.state.component ? (m(), V(N(t.value.state.component),
|
|
656
|
-
E(
|
|
697
|
+
t.value.state.component ? (m(), V(N(t.value.state.component), dt(Z({ key: 0 }, t.value.state.props)), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
698
|
+
E(L(t.value.state.message), 1)
|
|
657
699
|
], 64))
|
|
658
700
|
]),
|
|
659
701
|
_: 1
|
|
660
|
-
}, 8, ["type", "closeable"])) :
|
|
702
|
+
}, 8, ["type", "closeable"])) : P("", !0)
|
|
661
703
|
]),
|
|
662
704
|
_: 1
|
|
663
705
|
}));
|
|
664
706
|
}
|
|
665
|
-
},
|
|
707
|
+
}, Os = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Bs = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ds = { 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" }, js = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Hn = {
|
|
666
708
|
__name: "SparkToastContainer",
|
|
667
709
|
setup(e) {
|
|
668
710
|
const s = X.toastState, t = C(
|
|
@@ -682,9 +724,9 @@ const X = new _s(), fn = {
|
|
|
682
724
|
}, i = (u) => {
|
|
683
725
|
X.resumeToast(u);
|
|
684
726
|
};
|
|
685
|
-
return (u, d) => (m(), V(
|
|
686
|
-
f("div",
|
|
687
|
-
b(
|
|
727
|
+
return (u, d) => (m(), V(pt, { to: "body" }, [
|
|
728
|
+
f("div", Os, [
|
|
729
|
+
b(ie, {
|
|
688
730
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
689
731
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
690
732
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -693,11 +735,11 @@ const X = new _s(), fn = {
|
|
|
693
735
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
694
736
|
}, {
|
|
695
737
|
default: T(() => [
|
|
696
|
-
(m(!0), h(R, null,
|
|
738
|
+
(m(!0), h(R, null, z(t.value, (p) => (m(), h("div", {
|
|
697
739
|
key: p.id,
|
|
698
740
|
class: "pointer-events-auto"
|
|
699
741
|
}, [
|
|
700
|
-
b(
|
|
742
|
+
b(oe, {
|
|
701
743
|
type: p.type,
|
|
702
744
|
closeable: p.closeable,
|
|
703
745
|
onClose: (v) => c(p.id),
|
|
@@ -709,7 +751,7 @@ const X = new _s(), fn = {
|
|
|
709
751
|
key: 0,
|
|
710
752
|
ref_for: !0
|
|
711
753
|
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
712
|
-
E(
|
|
754
|
+
E(L(p.message), 1)
|
|
713
755
|
], 64))
|
|
714
756
|
]),
|
|
715
757
|
_: 2
|
|
@@ -719,8 +761,8 @@ const X = new _s(), fn = {
|
|
|
719
761
|
_: 1
|
|
720
762
|
})
|
|
721
763
|
]),
|
|
722
|
-
f("div",
|
|
723
|
-
b(
|
|
764
|
+
f("div", Bs, [
|
|
765
|
+
b(ie, {
|
|
724
766
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
725
767
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
726
768
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -729,11 +771,11 @@ const X = new _s(), fn = {
|
|
|
729
771
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
730
772
|
}, {
|
|
731
773
|
default: T(() => [
|
|
732
|
-
(m(!0), h(R, null,
|
|
774
|
+
(m(!0), h(R, null, z(o.value, (p) => (m(), h("div", {
|
|
733
775
|
key: p.id,
|
|
734
776
|
class: "pointer-events-auto"
|
|
735
777
|
}, [
|
|
736
|
-
b(
|
|
778
|
+
b(oe, {
|
|
737
779
|
type: p.type,
|
|
738
780
|
closeable: p.closeable,
|
|
739
781
|
onClose: (v) => c(p.id),
|
|
@@ -745,7 +787,7 @@ const X = new _s(), fn = {
|
|
|
745
787
|
key: 0,
|
|
746
788
|
ref_for: !0
|
|
747
789
|
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
748
|
-
E(
|
|
790
|
+
E(L(p.message), 1)
|
|
749
791
|
], 64))
|
|
750
792
|
]),
|
|
751
793
|
_: 2
|
|
@@ -755,8 +797,8 @@ const X = new _s(), fn = {
|
|
|
755
797
|
_: 1
|
|
756
798
|
})
|
|
757
799
|
]),
|
|
758
|
-
f("div",
|
|
759
|
-
b(
|
|
800
|
+
f("div", Ds, [
|
|
801
|
+
b(ie, {
|
|
760
802
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
761
803
|
"enter-from-class": "opacity-0 scale-95",
|
|
762
804
|
"enter-to-class": "opacity-100 scale-100",
|
|
@@ -765,11 +807,11 @@ const X = new _s(), fn = {
|
|
|
765
807
|
"leave-to-class": "opacity-0 scale-95"
|
|
766
808
|
}, {
|
|
767
809
|
default: T(() => [
|
|
768
|
-
(m(!0), h(R, null,
|
|
810
|
+
(m(!0), h(R, null, z(l.value, (p) => (m(), h("div", {
|
|
769
811
|
key: p.id,
|
|
770
812
|
class: "pointer-events-auto"
|
|
771
813
|
}, [
|
|
772
|
-
b(
|
|
814
|
+
b(oe, {
|
|
773
815
|
type: p.type,
|
|
774
816
|
closeable: p.closeable,
|
|
775
817
|
onClose: (v) => c(p.id),
|
|
@@ -781,7 +823,7 @@ const X = new _s(), fn = {
|
|
|
781
823
|
key: 0,
|
|
782
824
|
ref_for: !0
|
|
783
825
|
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
784
|
-
E(
|
|
826
|
+
E(L(p.message), 1)
|
|
785
827
|
], 64))
|
|
786
828
|
]),
|
|
787
829
|
_: 2
|
|
@@ -791,8 +833,8 @@ const X = new _s(), fn = {
|
|
|
791
833
|
_: 1
|
|
792
834
|
})
|
|
793
835
|
]),
|
|
794
|
-
f("div",
|
|
795
|
-
b(
|
|
836
|
+
f("div", zs, [
|
|
837
|
+
b(ie, {
|
|
796
838
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
797
839
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
798
840
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -801,11 +843,11 @@ const X = new _s(), fn = {
|
|
|
801
843
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
802
844
|
}, {
|
|
803
845
|
default: T(() => [
|
|
804
|
-
(m(!0), h(R, null,
|
|
846
|
+
(m(!0), h(R, null, z(n.value, (p) => (m(), h("div", {
|
|
805
847
|
key: p.id,
|
|
806
848
|
class: "pointer-events-auto"
|
|
807
849
|
}, [
|
|
808
|
-
b(
|
|
850
|
+
b(oe, {
|
|
809
851
|
type: p.type,
|
|
810
852
|
closeable: p.closeable,
|
|
811
853
|
onClose: (v) => c(p.id),
|
|
@@ -817,7 +859,7 @@ const X = new _s(), fn = {
|
|
|
817
859
|
key: 0,
|
|
818
860
|
ref_for: !0
|
|
819
861
|
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
820
|
-
E(
|
|
862
|
+
E(L(p.message), 1)
|
|
821
863
|
], 64))
|
|
822
864
|
]),
|
|
823
865
|
_: 2
|
|
@@ -827,8 +869,8 @@ const X = new _s(), fn = {
|
|
|
827
869
|
_: 1
|
|
828
870
|
})
|
|
829
871
|
]),
|
|
830
|
-
f("div",
|
|
831
|
-
b(
|
|
872
|
+
f("div", js, [
|
|
873
|
+
b(ie, {
|
|
832
874
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
833
875
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
834
876
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -837,11 +879,11 @@ const X = new _s(), fn = {
|
|
|
837
879
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
838
880
|
}, {
|
|
839
881
|
default: T(() => [
|
|
840
|
-
(m(!0), h(R, null,
|
|
882
|
+
(m(!0), h(R, null, z(a.value, (p) => (m(), h("div", {
|
|
841
883
|
key: p.id,
|
|
842
884
|
class: "pointer-events-auto"
|
|
843
885
|
}, [
|
|
844
|
-
b(
|
|
886
|
+
b(oe, {
|
|
845
887
|
type: p.type,
|
|
846
888
|
closeable: p.closeable,
|
|
847
889
|
onClose: (v) => c(p.id),
|
|
@@ -853,7 +895,7 @@ const X = new _s(), fn = {
|
|
|
853
895
|
key: 0,
|
|
854
896
|
ref_for: !0
|
|
855
897
|
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
856
|
-
E(
|
|
898
|
+
E(L(p.message), 1)
|
|
857
899
|
], 64))
|
|
858
900
|
]),
|
|
859
901
|
_: 2
|
|
@@ -865,7 +907,7 @@ const X = new _s(), fn = {
|
|
|
865
907
|
])
|
|
866
908
|
]));
|
|
867
909
|
}
|
|
868
|
-
},
|
|
910
|
+
}, lt = ue(
|
|
869
911
|
"brandFilter",
|
|
870
912
|
() => {
|
|
871
913
|
const e = q({
|
|
@@ -909,57 +951,57 @@ const X = new _s(), fn = {
|
|
|
909
951
|
paths: ["state.brands"]
|
|
910
952
|
}
|
|
911
953
|
}
|
|
912
|
-
),
|
|
954
|
+
), Is = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Ns = { class: "flex flex-1 flex-col" }, Zs = { class: "divide-y divide-gray-200" }, qs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Us = { class: "ml-auto flex items-center" }, Ks = {
|
|
913
955
|
key: 0,
|
|
914
956
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
915
|
-
},
|
|
957
|
+
}, Gs = ["onClick"], Ws = { class: "w-full gap-y-1 flex justify-between" }, Ys = { class: "flex flex-col" }, Xs = { class: "flex items-center" }, Js = { class: "font-medium text-base text-gray-900" }, Qs = {
|
|
916
958
|
key: 0,
|
|
917
959
|
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"
|
|
918
|
-
},
|
|
960
|
+
}, eo = { class: "text-sm text-gray-500 font-normal" }, to = { class: "flex items-center" }, so = ["src", "alt"], oo = {
|
|
919
961
|
__name: "SparkBrandSelector",
|
|
920
962
|
emits: ["close", "select"],
|
|
921
963
|
setup(e, { emit: s }) {
|
|
922
|
-
const t = s, o =
|
|
964
|
+
const t = s, o = lt(), l = (n) => {
|
|
923
965
|
t("select", n);
|
|
924
966
|
};
|
|
925
967
|
return (n, a) => {
|
|
926
|
-
const c =
|
|
927
|
-
return m(), h("div",
|
|
928
|
-
f("div",
|
|
929
|
-
f("div",
|
|
930
|
-
f("div",
|
|
968
|
+
const c = O("font-awesome-icon");
|
|
969
|
+
return m(), h("div", Is, [
|
|
970
|
+
f("div", Ns, [
|
|
971
|
+
f("div", Zs, [
|
|
972
|
+
f("div", qs, [
|
|
931
973
|
a[1] || (a[1] = f("div", null, "Filter by Brand", -1)),
|
|
932
|
-
f("div",
|
|
974
|
+
f("div", Us, [
|
|
933
975
|
b(c, {
|
|
934
|
-
icon: x(
|
|
976
|
+
icon: x(A).farTimes,
|
|
935
977
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
936
978
|
onClick: a[0] || (a[0] = (r) => t("close"))
|
|
937
979
|
}, null, 8, ["icon"])
|
|
938
980
|
])
|
|
939
981
|
]),
|
|
940
|
-
x(o).allBrands.length === 0 ? (m(), h("div",
|
|
941
|
-
(m(!0), h(R, null,
|
|
982
|
+
x(o).allBrands.length === 0 ? (m(), h("div", Ks, " No brands configured ")) : P("", !0),
|
|
983
|
+
(m(!0), h(R, null, z(x(o).allBrands, (r) => (m(), h("div", {
|
|
942
984
|
key: r.id,
|
|
943
985
|
class: H([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
944
986
|
onClick: (i) => l(r)
|
|
945
987
|
}, [
|
|
946
|
-
f("div",
|
|
947
|
-
f("div",
|
|
948
|
-
f("div",
|
|
949
|
-
f("div",
|
|
950
|
-
r.current ? (m(), h("span",
|
|
988
|
+
f("div", Ws, [
|
|
989
|
+
f("div", Ys, [
|
|
990
|
+
f("div", Xs, [
|
|
991
|
+
f("div", Js, L(r.name), 1),
|
|
992
|
+
r.current ? (m(), h("span", Qs, " Current ")) : P("", !0)
|
|
951
993
|
]),
|
|
952
|
-
f("div",
|
|
994
|
+
f("div", eo, L(r.current ? "Current Brand" : "Change to"), 1)
|
|
953
995
|
]),
|
|
954
|
-
f("div",
|
|
996
|
+
f("div", to, [
|
|
955
997
|
f("img", {
|
|
956
998
|
src: r.logo,
|
|
957
999
|
alt: `${r.name} logo`,
|
|
958
1000
|
class: "h-8 w-auto"
|
|
959
|
-
}, null, 8,
|
|
1001
|
+
}, null, 8, so)
|
|
960
1002
|
])
|
|
961
1003
|
])
|
|
962
|
-
], 10,
|
|
1004
|
+
], 10, Gs))), 128)),
|
|
963
1005
|
a[2] || (a[2] = f("div", null, null, -1))
|
|
964
1006
|
]),
|
|
965
1007
|
a[3] || (a[3] = f("div", { class: "mt-auto" }, null, -1))
|
|
@@ -967,7 +1009,7 @@ const X = new _s(), fn = {
|
|
|
967
1009
|
]);
|
|
968
1010
|
};
|
|
969
1011
|
}
|
|
970
|
-
},
|
|
1012
|
+
}, ao = ["disabled"], G = {
|
|
971
1013
|
__name: "SparkButton",
|
|
972
1014
|
props: {
|
|
973
1015
|
size: {
|
|
@@ -990,7 +1032,7 @@ const X = new _s(), fn = {
|
|
|
990
1032
|
},
|
|
991
1033
|
emits: ["click"],
|
|
992
1034
|
setup(e) {
|
|
993
|
-
const s = e, t =
|
|
1035
|
+
const s = e, t = F(null), o = Ee("buttonGroup", null), l = C(() => {
|
|
994
1036
|
if (!o?.isInGroup || !t.value) return null;
|
|
995
1037
|
const r = o.getButtonIndex(t.value), i = o.getButtonCount();
|
|
996
1038
|
return {
|
|
@@ -1024,19 +1066,19 @@ const X = new _s(), fn = {
|
|
|
1024
1066
|
let r = "", i = "";
|
|
1025
1067
|
switch (s.size) {
|
|
1026
1068
|
case "xs":
|
|
1027
|
-
r += " px-
|
|
1069
|
+
r += " px-4 py-1 text-xs", i = "sm";
|
|
1028
1070
|
break;
|
|
1029
1071
|
case "sm":
|
|
1030
|
-
r += " px-
|
|
1072
|
+
r += " px-4 py-1 text-sm", i = "sm";
|
|
1031
1073
|
break;
|
|
1032
1074
|
case "md":
|
|
1033
|
-
r += " px-
|
|
1075
|
+
r += " px-5 py-1.5 text-sm", i = "md";
|
|
1034
1076
|
break;
|
|
1035
1077
|
case "lg":
|
|
1036
|
-
r += " px-
|
|
1078
|
+
r += " px-6 py-2 text-sm", i = "md";
|
|
1037
1079
|
break;
|
|
1038
1080
|
case "xl":
|
|
1039
|
-
r += " px-
|
|
1081
|
+
r += " px-7 py-2.5 min-h-[42px] text-sm", i = "md";
|
|
1040
1082
|
break;
|
|
1041
1083
|
}
|
|
1042
1084
|
if (o?.isInGroup && l.value) {
|
|
@@ -1076,14 +1118,14 @@ const X = new _s(), fn = {
|
|
|
1076
1118
|
disabled: e.disabled,
|
|
1077
1119
|
onClick: i[0] || (i[0] = (u) => r.$emit("click"))
|
|
1078
1120
|
}, [
|
|
1079
|
-
|
|
1080
|
-
], 10,
|
|
1121
|
+
B(r.$slots, "default")
|
|
1122
|
+
], 10, ao));
|
|
1081
1123
|
}
|
|
1082
|
-
},
|
|
1124
|
+
}, ro = {
|
|
1083
1125
|
__name: "SparkButtonGroup",
|
|
1084
1126
|
setup(e) {
|
|
1085
|
-
const s =
|
|
1086
|
-
return
|
|
1127
|
+
const s = F(null);
|
|
1128
|
+
return ft("buttonGroup", {
|
|
1087
1129
|
isInGroup: !0,
|
|
1088
1130
|
getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
|
|
1089
1131
|
getButtonCount: () => s.value?.children.length || 0
|
|
@@ -1092,16 +1134,16 @@ const X = new _s(), fn = {
|
|
|
1092
1134
|
ref_key: "groupRef",
|
|
1093
1135
|
ref: s
|
|
1094
1136
|
}, [
|
|
1095
|
-
|
|
1137
|
+
B(l.$slots, "default")
|
|
1096
1138
|
], 512));
|
|
1097
1139
|
}
|
|
1098
|
-
},
|
|
1140
|
+
}, no = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, lo = {
|
|
1099
1141
|
key: 0,
|
|
1100
|
-
class: "
|
|
1101
|
-
},
|
|
1142
|
+
class: "px-[30px] py-5"
|
|
1143
|
+
}, io = {
|
|
1102
1144
|
key: 1,
|
|
1103
1145
|
class: "p-5"
|
|
1104
|
-
},
|
|
1146
|
+
}, Vn = {
|
|
1105
1147
|
__name: "SparkCard",
|
|
1106
1148
|
props: {
|
|
1107
1149
|
padded: {
|
|
@@ -1115,24 +1157,24 @@ const X = new _s(), fn = {
|
|
|
1115
1157
|
},
|
|
1116
1158
|
setup(e) {
|
|
1117
1159
|
const s = e;
|
|
1118
|
-
return (t, o) => (m(), h("div",
|
|
1119
|
-
t.$slots.header ? (m(), h("div",
|
|
1120
|
-
|
|
1121
|
-
])) :
|
|
1160
|
+
return (t, o) => (m(), h("div", no, [
|
|
1161
|
+
t.$slots.header ? (m(), h("div", lo, [
|
|
1162
|
+
B(t.$slots, "header")
|
|
1163
|
+
])) : P("", !0),
|
|
1122
1164
|
f("div", {
|
|
1123
1165
|
class: H([s.padded ? s.paddedClass : ""])
|
|
1124
1166
|
}, [
|
|
1125
|
-
|
|
1167
|
+
B(t.$slots, "default")
|
|
1126
1168
|
], 2),
|
|
1127
|
-
t.$slots.footer ? (m(), h("div",
|
|
1128
|
-
|
|
1129
|
-
])) :
|
|
1169
|
+
t.$slots.footer ? (m(), h("div", io, [
|
|
1170
|
+
B(t.$slots, "footer")
|
|
1171
|
+
])) : P("", !0)
|
|
1130
1172
|
]));
|
|
1131
1173
|
}
|
|
1132
|
-
},
|
|
1174
|
+
}, co = { class: "px-4 pt-5 pb-4 sm:p-6" }, uo = {
|
|
1133
1175
|
key: 0,
|
|
1134
1176
|
class: "text-lg font-medium text-gray-900"
|
|
1135
|
-
},
|
|
1177
|
+
}, po = {
|
|
1136
1178
|
__name: "SparkModalDialog",
|
|
1137
1179
|
props: {
|
|
1138
1180
|
title: {
|
|
@@ -1210,36 +1252,36 @@ const X = new _s(), fn = {
|
|
|
1210
1252
|
danger: "text-red-400"
|
|
1211
1253
|
})[s.type]);
|
|
1212
1254
|
return (r, i) => {
|
|
1213
|
-
const u =
|
|
1214
|
-
return m(), h("div",
|
|
1255
|
+
const u = O("font-awesome-icon");
|
|
1256
|
+
return m(), h("div", co, [
|
|
1215
1257
|
n.value ? (m(), h("div", {
|
|
1216
1258
|
key: 0,
|
|
1217
1259
|
class: H(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
|
|
1218
1260
|
}, [
|
|
1219
1261
|
b(u, {
|
|
1220
|
-
icon: x(
|
|
1262
|
+
icon: x(A)[n.value],
|
|
1221
1263
|
class: H(["h-5 w-5", c.value])
|
|
1222
1264
|
}, null, 8, ["icon", "class"])
|
|
1223
|
-
], 2)) :
|
|
1265
|
+
], 2)) : P("", !0),
|
|
1224
1266
|
f("div", {
|
|
1225
1267
|
class: H(["text-center", { "mt-3 sm:mt-5": n.value }])
|
|
1226
1268
|
}, [
|
|
1227
|
-
e.title ? (m(), h("h3",
|
|
1269
|
+
e.title ? (m(), h("h3", uo, L(e.title), 1)) : P("", !0),
|
|
1228
1270
|
e.message ? (m(), h("div", {
|
|
1229
1271
|
key: 1,
|
|
1230
1272
|
class: H([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
1231
|
-
},
|
|
1273
|
+
}, L(e.message), 3)) : P("", !0)
|
|
1232
1274
|
], 2),
|
|
1233
1275
|
f("div", {
|
|
1234
1276
|
class: H(["mt-5 sm:mt-6", o.value])
|
|
1235
1277
|
}, [
|
|
1236
|
-
(m(!0), h(R, null,
|
|
1278
|
+
(m(!0), h(R, null, z(t.value, (d, p) => (m(), V(x(G), {
|
|
1237
1279
|
key: p,
|
|
1238
1280
|
variant: d.variant,
|
|
1239
1281
|
onClick: (v) => r.$emit(d.event, d)
|
|
1240
1282
|
}, {
|
|
1241
1283
|
default: T(() => [
|
|
1242
|
-
E(
|
|
1284
|
+
E(L(d.text), 1)
|
|
1243
1285
|
]),
|
|
1244
1286
|
_: 2
|
|
1245
1287
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -1248,7 +1290,7 @@ const X = new _s(), fn = {
|
|
|
1248
1290
|
};
|
|
1249
1291
|
}
|
|
1250
1292
|
};
|
|
1251
|
-
class
|
|
1293
|
+
class fo {
|
|
1252
1294
|
constructor() {
|
|
1253
1295
|
this.state = q({
|
|
1254
1296
|
isVisible: !1,
|
|
@@ -1285,7 +1327,7 @@ class Qs {
|
|
|
1285
1327
|
confirmVariant: r = "primary"
|
|
1286
1328
|
} = s;
|
|
1287
1329
|
this.show(
|
|
1288
|
-
|
|
1330
|
+
po,
|
|
1289
1331
|
{
|
|
1290
1332
|
title: o,
|
|
1291
1333
|
message: l,
|
|
@@ -1306,17 +1348,17 @@ class Qs {
|
|
|
1306
1348
|
);
|
|
1307
1349
|
});
|
|
1308
1350
|
}
|
|
1309
|
-
const
|
|
1351
|
+
const ae = new fo(), mo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, ho = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, go = {
|
|
1310
1352
|
__name: "SparkModalContainer",
|
|
1311
1353
|
setup(e) {
|
|
1312
|
-
return (s, t) => (m(), V(x(
|
|
1354
|
+
return (s, t) => (m(), V(x(et), {
|
|
1313
1355
|
as: "template",
|
|
1314
|
-
show: x(
|
|
1356
|
+
show: x(ae).state.isVisible
|
|
1315
1357
|
}, {
|
|
1316
1358
|
default: T(() => [
|
|
1317
|
-
b(x(
|
|
1359
|
+
b(x(tt), {
|
|
1318
1360
|
class: "relative z-1000",
|
|
1319
|
-
onClose: x(
|
|
1361
|
+
onClose: x(ae).hide
|
|
1320
1362
|
}, {
|
|
1321
1363
|
default: T(() => [
|
|
1322
1364
|
b(x(fe), {
|
|
@@ -1333,8 +1375,8 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1333
1375
|
])]),
|
|
1334
1376
|
_: 1
|
|
1335
1377
|
}),
|
|
1336
|
-
f("div",
|
|
1337
|
-
f("div",
|
|
1378
|
+
f("div", mo, [
|
|
1379
|
+
f("div", ho, [
|
|
1338
1380
|
b(x(fe), {
|
|
1339
1381
|
as: "template",
|
|
1340
1382
|
enter: "ease-out duration-300",
|
|
@@ -1345,9 +1387,9 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1345
1387
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1346
1388
|
}, {
|
|
1347
1389
|
default: T(() => [
|
|
1348
|
-
b(x(
|
|
1390
|
+
b(x(st), { 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" }, {
|
|
1349
1391
|
default: T(() => [
|
|
1350
|
-
(m(), V(N(x(
|
|
1392
|
+
(m(), V(N(x(ae).state.content), Z(x(ae).state.props, Fe(x(ae).state.eventHandlers)), null, 16))
|
|
1351
1393
|
]),
|
|
1352
1394
|
_: 1
|
|
1353
1395
|
})
|
|
@@ -1363,7 +1405,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1363
1405
|
_: 1
|
|
1364
1406
|
}, 8, ["show"]));
|
|
1365
1407
|
}
|
|
1366
|
-
},
|
|
1408
|
+
}, yo = { class: "fixed inset-0 flex" }, Te = {
|
|
1367
1409
|
__name: "SparkOverlay",
|
|
1368
1410
|
props: {
|
|
1369
1411
|
position: {
|
|
@@ -1378,7 +1420,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1378
1420
|
},
|
|
1379
1421
|
emits: ["close"],
|
|
1380
1422
|
setup(e, { emit: s }) {
|
|
1381
|
-
const t =
|
|
1423
|
+
const t = F(null), o = {
|
|
1382
1424
|
xs: "w-[250px]",
|
|
1383
1425
|
sm: "w-[300px]",
|
|
1384
1426
|
md: "w-[450px]",
|
|
@@ -1387,12 +1429,12 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1387
1429
|
}, l = e, n = s, a = C(() => o[l.overlayInstance.state.size] || o.md), c = () => {
|
|
1388
1430
|
l.overlayInstance.close(), n("close");
|
|
1389
1431
|
};
|
|
1390
|
-
return (r, i) => (m(), V(x(
|
|
1432
|
+
return (r, i) => (m(), V(x(et), {
|
|
1391
1433
|
show: e.overlayInstance.state.isVisible,
|
|
1392
1434
|
as: "template"
|
|
1393
1435
|
}, {
|
|
1394
1436
|
default: T(() => [
|
|
1395
|
-
b(x(
|
|
1437
|
+
b(x(tt), {
|
|
1396
1438
|
initialFocus: t.value,
|
|
1397
1439
|
class: "relative z-1000",
|
|
1398
1440
|
onClose: c
|
|
@@ -1412,7 +1454,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1412
1454
|
])]),
|
|
1413
1455
|
_: 1
|
|
1414
1456
|
}),
|
|
1415
|
-
f("div",
|
|
1457
|
+
f("div", yo, [
|
|
1416
1458
|
b(x(fe), {
|
|
1417
1459
|
as: "template",
|
|
1418
1460
|
enter: "transition ease-in-out duration-150 transform",
|
|
@@ -1423,7 +1465,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1423
1465
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
1424
1466
|
}, {
|
|
1425
1467
|
default: T(() => [
|
|
1426
|
-
b(x(
|
|
1468
|
+
b(x(st), {
|
|
1427
1469
|
ref_key: "panelRef",
|
|
1428
1470
|
ref: t,
|
|
1429
1471
|
class: H([
|
|
@@ -1433,7 +1475,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1433
1475
|
])
|
|
1434
1476
|
}, {
|
|
1435
1477
|
default: T(() => [
|
|
1436
|
-
(m(), V(N(e.overlayInstance.state.content), Z(e.overlayInstance.state.props,
|
|
1478
|
+
(m(), V(N(e.overlayInstance.state.content), Z(e.overlayInstance.state.props, Fe(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
1437
1479
|
]),
|
|
1438
1480
|
_: 1
|
|
1439
1481
|
}, 8, ["class"])
|
|
@@ -1448,18 +1490,18 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1448
1490
|
_: 1
|
|
1449
1491
|
}, 8, ["show"]));
|
|
1450
1492
|
}
|
|
1451
|
-
},
|
|
1493
|
+
}, vo = (e) => {
|
|
1452
1494
|
if (e.includes(".")) {
|
|
1453
1495
|
const s = e.split(".");
|
|
1454
1496
|
e = s[s.length - 1];
|
|
1455
1497
|
}
|
|
1456
1498
|
return e.replace(/_/g, " ");
|
|
1457
|
-
},
|
|
1499
|
+
}, bo = (e, s, t) => {
|
|
1458
1500
|
const o = s.querySelector(".relative");
|
|
1459
1501
|
if (!o || o.querySelector(".spark-table-head-sorting"))
|
|
1460
1502
|
return;
|
|
1461
1503
|
const l = document.createElement("span");
|
|
1462
|
-
l.classList.add("spark-table-head-sorting"), l.innerHTML =
|
|
1504
|
+
l.classList.add("spark-table-head-sorting"), l.innerHTML = J({ prefix: "fad", iconName: "sort" }).html + J({ prefix: "fad", iconName: "sort-up" }).html + J({ prefix: "fad", iconName: "sort-down" }).html, o.appendChild(l), o.addEventListener("click", async () => {
|
|
1463
1505
|
const n = t.params.orderBy, a = t.params.sortedBy;
|
|
1464
1506
|
return n === e && a === "asc" ? (o.classList.remove("asc"), o.classList.add("desc"), t.methods.applyParams({
|
|
1465
1507
|
orderBy: e,
|
|
@@ -1469,12 +1511,12 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1469
1511
|
sortedBy: "asc"
|
|
1470
1512
|
}));
|
|
1471
1513
|
});
|
|
1472
|
-
},
|
|
1514
|
+
}, xo = (e, s, t) => {
|
|
1473
1515
|
if (s.querySelector(".spark-table-head-filter"))
|
|
1474
1516
|
return;
|
|
1475
1517
|
const o = document.createElement("div"), l = document.createElement("input");
|
|
1476
1518
|
l.type = "text", l.placeholder = "Filter...", o.className = "spark-table-head-filter", o.appendChild(l);
|
|
1477
|
-
const n =
|
|
1519
|
+
const n = ot(async (a, c) => {
|
|
1478
1520
|
const r = c.target.value, i = `filter[${a}]`;
|
|
1479
1521
|
if (r)
|
|
1480
1522
|
return t.params[i] && t.params[i] === r ? void 0 : t.methods.applyParams({
|
|
@@ -1484,19 +1526,19 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1484
1526
|
await t.methods.removeParam(i);
|
|
1485
1527
|
}, 200);
|
|
1486
1528
|
l.addEventListener("keyup", (a) => n(e, a)), s.appendChild(o);
|
|
1487
|
-
},
|
|
1529
|
+
}, ko = (e, s, t) => {
|
|
1488
1530
|
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");
|
|
1489
1531
|
const l = e.querySelector(".colHeader");
|
|
1490
|
-
l.classList.add("spark-table-head-title"), l.innerHTML =
|
|
1491
|
-
},
|
|
1532
|
+
l.classList.add("spark-table-head-title"), l.innerHTML = vo(s);
|
|
1533
|
+
}, wo = (e, s, t) => {
|
|
1492
1534
|
if (typeof e != "number")
|
|
1493
1535
|
return e;
|
|
1494
1536
|
if (e < 0)
|
|
1495
1537
|
return;
|
|
1496
1538
|
let o = 2;
|
|
1497
1539
|
const l = t.methods.colToProp(e), n = t.methods.getSettingsForProp(l);
|
|
1498
|
-
s.childElementCount === 1 && ((!n || !n.columnSort) && o--, (!n || !n.columnFilter) && o--, n && n.columnSort &&
|
|
1499
|
-
},
|
|
1540
|
+
s.childElementCount === 1 && ((!n || !n.columnSort) && o--, (!n || !n.columnFilter) && o--, n && n.columnSort && bo(l, s, t), n && n.columnFilter && xo(l, s, t)), (s.childElementCount === o || o === 0) && ko(s, l, n);
|
|
1541
|
+
}, _o = (e) => {
|
|
1500
1542
|
if (!e.hotInstance || !e.hotInstance.rootElement)
|
|
1501
1543
|
return;
|
|
1502
1544
|
const s = e.params.orderBy, t = e.params.sortedBy, o = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
|
|
@@ -1506,7 +1548,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1506
1548
|
const n = l.closest("th"), a = Array.from(n.parentElement.children).indexOf(n);
|
|
1507
1549
|
e.methods.colToProp(a) === s && l.classList.add(t);
|
|
1508
1550
|
});
|
|
1509
|
-
},
|
|
1551
|
+
}, So = (e) => (s, t, o, l, n, a, c) => {
|
|
1510
1552
|
t.innerHTML = "", t.classList.add("spark-table-cell-actions");
|
|
1511
1553
|
const i = (c.rendererConfig || {}).actions || [];
|
|
1512
1554
|
if (i.length === 0)
|
|
@@ -1518,7 +1560,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1518
1560
|
const v = document.createElement("button");
|
|
1519
1561
|
if (v.type = "button", v.classList.add("spark-table-action-button"), p.icon) {
|
|
1520
1562
|
const k = document.createElement("span");
|
|
1521
|
-
k.innerHTML =
|
|
1563
|
+
k.innerHTML = J({ prefix: "far", iconName: p.icon }).html, k.classList.add("size-4"), v.appendChild(k);
|
|
1522
1564
|
}
|
|
1523
1565
|
if (p.label) {
|
|
1524
1566
|
const k = document.createElement("span");
|
|
@@ -1527,7 +1569,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1527
1569
|
v.addEventListener("click", async (k) => {
|
|
1528
1570
|
if (k.preventDefault(), k.stopPropagation(), p.confirm) {
|
|
1529
1571
|
const $ = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
|
|
1530
|
-
if (!await
|
|
1572
|
+
if (!await ae.confirm({
|
|
1531
1573
|
title: p.confirmTitle,
|
|
1532
1574
|
message: $,
|
|
1533
1575
|
type: p.confirmType,
|
|
@@ -1540,7 +1582,7 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1540
1582
|
p.event && e.methods.fireEvent(p.event, u), p.handler && typeof p.handler == "function" && p.handler(u);
|
|
1541
1583
|
}), d.appendChild(v);
|
|
1542
1584
|
}), t.appendChild(d);
|
|
1543
|
-
},
|
|
1585
|
+
}, Pe = {
|
|
1544
1586
|
green: "bg-green-100 text-green-800",
|
|
1545
1587
|
red: "bg-red-100 text-red-800",
|
|
1546
1588
|
yellow: "bg-yellow-100 text-yellow-800",
|
|
@@ -1549,10 +1591,10 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1549
1591
|
purple: "bg-purple-100 text-purple-800",
|
|
1550
1592
|
pink: "bg-pink-100 text-pink-800",
|
|
1551
1593
|
indigo: "bg-indigo-100 text-indigo-800"
|
|
1552
|
-
},
|
|
1594
|
+
}, Co = (e) => (s, t, o, l, n, a, c) => {
|
|
1553
1595
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !a)
|
|
1554
1596
|
return;
|
|
1555
|
-
const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d =
|
|
1597
|
+
const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d = Pe[u] || Pe.gray, p = document.createElement("span");
|
|
1556
1598
|
p.classList.add(
|
|
1557
1599
|
"inline-flex",
|
|
1558
1600
|
"items-center",
|
|
@@ -1564,14 +1606,14 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1564
1606
|
"capitalize",
|
|
1565
1607
|
...d.split(" ")
|
|
1566
1608
|
), p.textContent = a, t.appendChild(p);
|
|
1567
|
-
},
|
|
1609
|
+
}, Le = {
|
|
1568
1610
|
green: { bg: "bg-green-100", text: "text-green-500" },
|
|
1569
1611
|
red: { bg: "bg-red-100", text: "text-red-500" },
|
|
1570
1612
|
yellow: { bg: "bg-yellow-100", text: "text-yellow-500" },
|
|
1571
1613
|
blue: { bg: "bg-blue-100", text: "text-blue-500" },
|
|
1572
1614
|
gray: { bg: "bg-gray-100", text: "text-gray-500" },
|
|
1573
1615
|
purple: { bg: "bg-purple-100", text: "text-purple-500" }
|
|
1574
|
-
},
|
|
1616
|
+
}, $o = (e) => {
|
|
1575
1617
|
if (e == null || e === "")
|
|
1576
1618
|
return !1;
|
|
1577
1619
|
if (typeof e == "boolean")
|
|
@@ -1583,9 +1625,9 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1583
1625
|
return s === "1" || s === "yes" || s === "true";
|
|
1584
1626
|
}
|
|
1585
1627
|
return !1;
|
|
1586
|
-
},
|
|
1628
|
+
}, To = (e) => (s, t, o, l, n, a, c) => {
|
|
1587
1629
|
t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
|
|
1588
|
-
const r = c.rendererConfig || {}, i =
|
|
1630
|
+
const r = c.rendererConfig || {}, i = $o(a), u = i ? r.trueIcon || "check" : r.falseIcon || "xmark", d = i ? r.trueColor || "green" : r.falseColor || "red", p = r.size || 32, v = r.iconPrefix || "far", k = Le[d] || Le.gray;
|
|
1589
1631
|
t.dataset.copyValue = i ? "true" : "false";
|
|
1590
1632
|
const $ = document.createElement("div");
|
|
1591
1633
|
$.classList.add(
|
|
@@ -1597,10 +1639,10 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1597
1639
|
k.text
|
|
1598
1640
|
), $.style.width = `${p}px`, $.style.height = `${p}px`;
|
|
1599
1641
|
const g = document.createElement("span");
|
|
1600
|
-
g.innerHTML =
|
|
1642
|
+
g.innerHTML = J({ prefix: v, iconName: u }).html, g.classList.add("flex", "items-center", "justify-center");
|
|
1601
1643
|
const _ = Math.round(p * 0.5);
|
|
1602
1644
|
g.style.fontSize = `${_}px`, $.appendChild(g), t.appendChild($);
|
|
1603
|
-
},
|
|
1645
|
+
}, Po = (e, s = 2) => {
|
|
1604
1646
|
const t = Number(e);
|
|
1605
1647
|
if (isNaN(t)) return null;
|
|
1606
1648
|
const o = t < 0, n = Math.abs(t).toLocaleString("en-AU", {
|
|
@@ -1608,21 +1650,21 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1608
1650
|
maximumFractionDigits: s
|
|
1609
1651
|
});
|
|
1610
1652
|
return o ? `-$${n}` : `$${n}`;
|
|
1611
|
-
},
|
|
1653
|
+
}, Lo = (e) => (s, t, o, l, n, a, c) => {
|
|
1612
1654
|
t.innerHTML = "", t.classList.add("spark-table-cell-currency");
|
|
1613
1655
|
const r = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = r;
|
|
1614
1656
|
if (a == null || a === "") {
|
|
1615
1657
|
t.textContent = u;
|
|
1616
1658
|
return;
|
|
1617
1659
|
}
|
|
1618
|
-
const d =
|
|
1660
|
+
const d = Po(a, i);
|
|
1619
1661
|
if (d === null) {
|
|
1620
1662
|
t.textContent = u;
|
|
1621
1663
|
return;
|
|
1622
1664
|
}
|
|
1623
1665
|
const p = document.createElement("span");
|
|
1624
1666
|
p.textContent = d, t.appendChild(p);
|
|
1625
|
-
},
|
|
1667
|
+
}, Mo = (e) => (s, t, o, l, n, a, c) => {
|
|
1626
1668
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !a)
|
|
1627
1669
|
return;
|
|
1628
1670
|
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o));
|
|
@@ -1632,19 +1674,19 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1632
1674
|
d.href = u, d.textContent = a, d.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (d.target = r.target), r.rel && (d.rel = r.rel), d.addEventListener("click", (p) => {
|
|
1633
1675
|
p.stopPropagation();
|
|
1634
1676
|
}), t.appendChild(d);
|
|
1635
|
-
},
|
|
1677
|
+
}, Me = {
|
|
1636
1678
|
sm: "h-6 w-6",
|
|
1637
1679
|
md: "h-8 w-8",
|
|
1638
1680
|
lg: "h-12 w-12"
|
|
1639
|
-
},
|
|
1681
|
+
}, Ho = (e) => (s, t, o, l, n, a, c) => {
|
|
1640
1682
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !a)
|
|
1641
1683
|
return;
|
|
1642
|
-
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d =
|
|
1684
|
+
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d = Me[u] || Me.md, p = r.rounded !== !1;
|
|
1643
1685
|
let v = r.alt || "";
|
|
1644
1686
|
typeof r.alt == "string" && i[r.alt] && (v = i[r.alt]);
|
|
1645
1687
|
const k = document.createElement("img");
|
|
1646
1688
|
k.src = a, k.alt = v, k.classList.add(...d.split(" "), "object-cover"), p ? k.classList.add("rounded-full") : k.classList.add("rounded"), t.appendChild(k);
|
|
1647
|
-
},
|
|
1689
|
+
}, Vo = (e) => (s, t, o, l, n, a, c) => {
|
|
1648
1690
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !a)
|
|
1649
1691
|
return;
|
|
1650
1692
|
const r = c.rendererConfig || {}, i = r.format || "short", u = r.locale || "en-US";
|
|
@@ -1655,27 +1697,27 @@ const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1655
1697
|
year: "numeric",
|
|
1656
1698
|
month: "long",
|
|
1657
1699
|
day: "numeric"
|
|
1658
|
-
}) : i === "relative" ? d =
|
|
1700
|
+
}) : i === "relative" ? d = Ro(v) : i === "datetime" ? d = v.toLocaleString(u) : d = v.toLocaleDateString(u);
|
|
1659
1701
|
} catch (v) {
|
|
1660
1702
|
console.error("Error formatting date:", v), d = a;
|
|
1661
1703
|
}
|
|
1662
1704
|
const p = document.createElement("span");
|
|
1663
1705
|
p.textContent = d, t.appendChild(p);
|
|
1664
1706
|
};
|
|
1665
|
-
function
|
|
1707
|
+
function Ro(e) {
|
|
1666
1708
|
const t = /* @__PURE__ */ new Date() - e, o = Math.floor(Math.abs(t) / 1e3), l = Math.floor(o / 60), n = Math.floor(l / 60), a = Math.floor(n / 24), c = Math.floor(a / 30), r = Math.floor(a / 365), i = t > 0;
|
|
1667
1709
|
return o < 60 ? i ? "just now" : "in a moment" : l < 60 ? i ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : n < 24 ? i ? `${n} hour${n > 1 ? "s" : ""} ago` : `in ${n} hour${n > 1 ? "s" : ""}` : a < 30 ? i ? `${a} day${a > 1 ? "s" : ""} ago` : `in ${a} day${a > 1 ? "s" : ""}` : c < 12 ? i ? `${c} month${c > 1 ? "s" : ""} ago` : `in ${c} month${c > 1 ? "s" : ""}` : i ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
|
|
1668
1710
|
}
|
|
1669
|
-
const
|
|
1711
|
+
const Ao = (e) => {
|
|
1670
1712
|
const s = ["th", "st", "nd", "rd"], t = e % 100;
|
|
1671
1713
|
return e + (s[(t - 20) % 10] || s[t] || s[0]);
|
|
1672
|
-
}, j = (e, s = 2) => String(e).padStart(s, "0"), ye = /* @__PURE__ */ new Map(),
|
|
1714
|
+
}, j = (e, s = 2) => String(e).padStart(s, "0"), ye = /* @__PURE__ */ new Map(), Eo = (e, s) => {
|
|
1673
1715
|
const t = `${e}:${JSON.stringify(s)}`;
|
|
1674
1716
|
return ye.has(t) || ye.set(t, new Intl.DateTimeFormat(e, s)), ye.get(t);
|
|
1675
|
-
},
|
|
1676
|
-
const a =
|
|
1717
|
+
}, ce = (e, s, t, o) => {
|
|
1718
|
+
const a = Eo(s, t).formatToParts(e).find((c) => c.type === o);
|
|
1677
1719
|
return a ? a.value : "";
|
|
1678
|
-
},
|
|
1720
|
+
}, Fo = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
|
|
1679
1721
|
e.year,
|
|
1680
1722
|
e.month - 1,
|
|
1681
1723
|
e.day,
|
|
@@ -1683,7 +1725,7 @@ const ko = (e) => {
|
|
|
1683
1725
|
e.minute || 0,
|
|
1684
1726
|
e.second || 0,
|
|
1685
1727
|
e.millisecond || 0
|
|
1686
|
-
),
|
|
1728
|
+
), Oo = (e) => {
|
|
1687
1729
|
const s = e.hour || 0, t = s % 12 || 12, o = s >= 12;
|
|
1688
1730
|
return {
|
|
1689
1731
|
year: e.year,
|
|
@@ -1701,30 +1743,30 @@ const ko = (e) => {
|
|
|
1701
1743
|
isPM: o,
|
|
1702
1744
|
quarter: Math.ceil(e.month / 3)
|
|
1703
1745
|
};
|
|
1704
|
-
},
|
|
1746
|
+
}, He = (e, s = !0) => {
|
|
1705
1747
|
if (!e.offsetNanoseconds && e.offsetNanoseconds !== 0)
|
|
1706
1748
|
return "";
|
|
1707
1749
|
const t = Math.round(e.offsetNanoseconds / 6e10), o = t >= 0 ? "+" : "-", l = Math.abs(t), n = Math.floor(l / 60), a = l % 60;
|
|
1708
1750
|
return s ? `${o}${j(n)}:${j(a)}` : `${o}${j(n)}${j(a)}`;
|
|
1709
|
-
},
|
|
1710
|
-
const t =
|
|
1751
|
+
}, Bo = (e, s) => {
|
|
1752
|
+
const t = Oo(e), o = Fo(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
|
|
1711
1753
|
return [
|
|
1712
1754
|
// Year
|
|
1713
1755
|
["YYYY", () => String(t.year)],
|
|
1714
1756
|
["YY", () => String(t.year).slice(-2)],
|
|
1715
1757
|
// Month
|
|
1716
|
-
["MMMM", () =>
|
|
1717
|
-
["MMM", () =>
|
|
1758
|
+
["MMMM", () => ce(o, s, { month: "long" }, "month")],
|
|
1759
|
+
["MMM", () => ce(o, s, { month: "short" }, "month")],
|
|
1718
1760
|
["MM", () => j(t.month)],
|
|
1719
1761
|
["M", () => String(t.month)],
|
|
1720
1762
|
// Day of month
|
|
1721
1763
|
["DD", () => j(t.day)],
|
|
1722
|
-
["Do", () =>
|
|
1764
|
+
["Do", () => Ao(t.day)],
|
|
1723
1765
|
["D", () => String(t.day)],
|
|
1724
1766
|
// Day of week
|
|
1725
|
-
["dddd", () =>
|
|
1726
|
-
["ddd", () =>
|
|
1727
|
-
["dd", () =>
|
|
1767
|
+
["dddd", () => ce(o, s, { weekday: "long" }, "weekday")],
|
|
1768
|
+
["ddd", () => ce(o, s, { weekday: "short" }, "weekday")],
|
|
1769
|
+
["dd", () => ce(o, s, { weekday: "short" }, "weekday").slice(0, 2)],
|
|
1728
1770
|
["d", () => String(l)],
|
|
1729
1771
|
// Hour
|
|
1730
1772
|
["HH", () => j(t.hour24)],
|
|
@@ -1745,15 +1787,15 @@ const ko = (e) => {
|
|
|
1745
1787
|
["A", () => t.isPM ? "PM" : "AM"],
|
|
1746
1788
|
["a", () => t.isPM ? "pm" : "am"],
|
|
1747
1789
|
// Timezone offset
|
|
1748
|
-
["ZZ", () =>
|
|
1749
|
-
["Z", () =>
|
|
1790
|
+
["ZZ", () => He(e, !1)],
|
|
1791
|
+
["Z", () => He(e, !0)],
|
|
1750
1792
|
// Quarter
|
|
1751
1793
|
["Q", () => String(t.quarter)],
|
|
1752
1794
|
// Unix timestamp
|
|
1753
1795
|
["x", () => String(e.epochMilliseconds ?? o.getTime())],
|
|
1754
1796
|
["X", () => String(Math.floor((e.epochMilliseconds ?? o.getTime()) / 1e3))]
|
|
1755
1797
|
];
|
|
1756
|
-
},
|
|
1798
|
+
}, Do = (e, s, t = {}) => {
|
|
1757
1799
|
const { locale: o = "en-US" } = t;
|
|
1758
1800
|
if (!e)
|
|
1759
1801
|
return "";
|
|
@@ -1769,20 +1811,20 @@ const ko = (e) => {
|
|
|
1769
1811
|
} catch (r) {
|
|
1770
1812
|
return console.error("Failed to parse date string:", e, r), e;
|
|
1771
1813
|
}
|
|
1772
|
-
const n =
|
|
1814
|
+
const n = Bo(l, o), a = n.map(([r]) => r).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${a})`, "g");
|
|
1773
1815
|
return s.replace(c, (r, i, u) => {
|
|
1774
1816
|
if (i !== void 0)
|
|
1775
1817
|
return i;
|
|
1776
1818
|
const d = n.find(([p]) => p === u);
|
|
1777
1819
|
return d ? d[1]() : r;
|
|
1778
1820
|
});
|
|
1779
|
-
},
|
|
1821
|
+
}, zo = (e, s = {}) => {
|
|
1780
1822
|
const { fromTimezone: t, toTimezone: o } = s;
|
|
1781
1823
|
if (!e)
|
|
1782
1824
|
return null;
|
|
1783
1825
|
const l = e.replace(" ", "T");
|
|
1784
1826
|
return t && o ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(o) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
|
|
1785
|
-
},
|
|
1827
|
+
}, jo = (e) => (s, t, o, l, n, a, c) => {
|
|
1786
1828
|
t.innerHTML = "", t.classList.add("spark-table-cell-datetime");
|
|
1787
1829
|
const r = c.rendererConfig || {}, {
|
|
1788
1830
|
format: i = "DD MMM YYYY, HH:mm",
|
|
@@ -1796,22 +1838,22 @@ const ko = (e) => {
|
|
|
1796
1838
|
return;
|
|
1797
1839
|
}
|
|
1798
1840
|
try {
|
|
1799
|
-
const k =
|
|
1841
|
+
const k = zo(a, { fromTimezone: u, toTimezone: d });
|
|
1800
1842
|
if (!k) {
|
|
1801
1843
|
t.textContent = v;
|
|
1802
1844
|
return;
|
|
1803
1845
|
}
|
|
1804
|
-
const $ =
|
|
1846
|
+
const $ = Do(k, i, { locale: p }), g = document.createElement("span");
|
|
1805
1847
|
g.textContent = $, t.appendChild(g);
|
|
1806
1848
|
} catch (k) {
|
|
1807
1849
|
console.error("Error formatting datetime:", k, { value: a, format: i }), t.textContent = a;
|
|
1808
1850
|
}
|
|
1809
|
-
},
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
}),
|
|
1813
|
-
},
|
|
1814
|
-
U("spark.actions",
|
|
1851
|
+
}, Io = /* @__PURE__ */ new Map(), U = (e, s) => {
|
|
1852
|
+
ds(e, (t, o, l, n, a, c, r) => {
|
|
1853
|
+
ps.apply(null, [t, o, l, n, a, c, r]), s(t, o, l, n, a, c, r);
|
|
1854
|
+
}), Io.set(e, s);
|
|
1855
|
+
}, No = (e) => {
|
|
1856
|
+
U("spark.actions", So(e)), U("spark.badge", Co()), U("spark.boolean", To()), U("spark.currency", Lo()), U("spark.link", Mo()), U("spark.image", Ho()), U("spark.date", Vo()), U("spark.datetime", jo()), U("style.capitalize", (s, t, o, l, n, a) => {
|
|
1815
1857
|
if (!a || a.length === 0) {
|
|
1816
1858
|
t.innerText = "";
|
|
1817
1859
|
return;
|
|
@@ -1819,12 +1861,12 @@ const ko = (e) => {
|
|
|
1819
1861
|
const c = document.createElement("span");
|
|
1820
1862
|
c.innerHTML = a, c.classList.add("capitalize"), t.replaceChildren(c);
|
|
1821
1863
|
});
|
|
1822
|
-
},
|
|
1823
|
-
},
|
|
1824
|
-
const t =
|
|
1864
|
+
}, Zo = () => {
|
|
1865
|
+
}, qo = (e, s = {}) => {
|
|
1866
|
+
const t = Q(), o = le(), l = s.namespace, n = l === null, a = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${o.path}` : `spark-table:${l}`, d = (y, S = "") => {
|
|
1825
1867
|
const M = {};
|
|
1826
|
-
return Object.keys(y).forEach((
|
|
1827
|
-
const W = y[
|
|
1868
|
+
return Object.keys(y).forEach((D) => {
|
|
1869
|
+
const W = y[D], de = S ? `${S}[${D}]` : D;
|
|
1828
1870
|
W != null && (typeof W == "object" && !Array.isArray(W) ? Object.assign(M, d(W, de)) : M[de] = String(W));
|
|
1829
1871
|
}), M;
|
|
1830
1872
|
}, p = () => {
|
|
@@ -1845,8 +1887,8 @@ const ko = (e) => {
|
|
|
1845
1887
|
if (!y) return null;
|
|
1846
1888
|
const S = JSON.parse(y);
|
|
1847
1889
|
if (i > 0) {
|
|
1848
|
-
const M = Date.now() - S.timestamp,
|
|
1849
|
-
if (M >
|
|
1890
|
+
const M = Date.now() - S.timestamp, D = i * 24 * 60 * 60 * 1e3;
|
|
1891
|
+
if (M > D)
|
|
1850
1892
|
return localStorage.removeItem(u), null;
|
|
1851
1893
|
}
|
|
1852
1894
|
return S.params;
|
|
@@ -1878,8 +1920,8 @@ const ko = (e) => {
|
|
|
1878
1920
|
t.replace({ query: y });
|
|
1879
1921
|
}, g = (y) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(y) || y.includes("[")), _ = (y, S) => {
|
|
1880
1922
|
if (["page", "limit"].includes(y) && S !== null && S !== void 0) {
|
|
1881
|
-
const
|
|
1882
|
-
return isNaN(
|
|
1923
|
+
const D = parseInt(S, 10);
|
|
1924
|
+
return isNaN(D) ? S : D;
|
|
1883
1925
|
}
|
|
1884
1926
|
return S;
|
|
1885
1927
|
}, w = () => {
|
|
@@ -1903,7 +1945,7 @@ const ko = (e) => {
|
|
|
1903
1945
|
a && $(), c && p();
|
|
1904
1946
|
},
|
|
1905
1947
|
{ deep: !0 }
|
|
1906
|
-
), r &&
|
|
1948
|
+
), r && _e(() => {
|
|
1907
1949
|
let y = !1;
|
|
1908
1950
|
if (a) {
|
|
1909
1951
|
let S = !1;
|
|
@@ -1912,7 +1954,7 @@ const ko = (e) => {
|
|
|
1912
1954
|
else {
|
|
1913
1955
|
const M = `${l}[`;
|
|
1914
1956
|
S = Object.keys(o.query).some(
|
|
1915
|
-
(
|
|
1957
|
+
(D) => D.startsWith(M)
|
|
1916
1958
|
);
|
|
1917
1959
|
}
|
|
1918
1960
|
S && (y = !0, w());
|
|
@@ -1930,7 +1972,7 @@ const ko = (e) => {
|
|
|
1930
1972
|
loadFromStorage: v,
|
|
1931
1973
|
clearStorage: k
|
|
1932
1974
|
};
|
|
1933
|
-
},
|
|
1975
|
+
}, Uo = { class: "flex items-center gap-4 py-3" }, Ko = { class: "shrink-0" }, Go = { class: "text-sm text-gray-700" }, Wo = { class: "font-medium" }, Yo = { class: "font-medium" }, Xo = { class: "font-medium" }, Jo = {
|
|
1934
1976
|
__name: "SparkTablePaginationDetails",
|
|
1935
1977
|
props: {
|
|
1936
1978
|
sparkTable: {
|
|
@@ -1941,28 +1983,28 @@ const ko = (e) => {
|
|
|
1941
1983
|
setup(e) {
|
|
1942
1984
|
const s = e;
|
|
1943
1985
|
return (t, o) => (m(), h("div", null, [
|
|
1944
|
-
f("div",
|
|
1945
|
-
f("div",
|
|
1946
|
-
f("div",
|
|
1986
|
+
f("div", Uo, [
|
|
1987
|
+
f("div", Ko, [
|
|
1988
|
+
f("div", Go, [
|
|
1947
1989
|
o[0] || (o[0] = E(" Showing ", -1)),
|
|
1948
|
-
f("span",
|
|
1990
|
+
f("span", Wo, L(s.sparkTable.response.meta.from), 1),
|
|
1949
1991
|
o[1] || (o[1] = E(" to ", -1)),
|
|
1950
|
-
f("span",
|
|
1992
|
+
f("span", Yo, L(s.sparkTable.response.meta.to), 1),
|
|
1951
1993
|
o[2] || (o[2] = E(" of ", -1)),
|
|
1952
|
-
f("span",
|
|
1994
|
+
f("span", Xo, L(s.sparkTable.response.meta.total), 1),
|
|
1953
1995
|
o[3] || (o[3] = E(" results ", -1))
|
|
1954
1996
|
])
|
|
1955
1997
|
])
|
|
1956
1998
|
])
|
|
1957
1999
|
]));
|
|
1958
2000
|
}
|
|
1959
|
-
},
|
|
2001
|
+
}, Qo = { class: "flex items-center gap-4 px-4 py-3" }, ea = {
|
|
1960
2002
|
key: 0,
|
|
1961
2003
|
class: "shrink-0 ml-auto"
|
|
1962
|
-
},
|
|
2004
|
+
}, ta = {
|
|
1963
2005
|
class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
|
|
1964
2006
|
"aria-label": "Pagination"
|
|
1965
|
-
},
|
|
2007
|
+
}, sa = ["onClick"], oa = {
|
|
1966
2008
|
__name: "SparkTablePaginationPaging",
|
|
1967
2009
|
props: {
|
|
1968
2010
|
sparkTable: {
|
|
@@ -1978,30 +2020,30 @@ const ko = (e) => {
|
|
|
1978
2020
|
u < 1 || u > t.sparkTable.response.meta.last_page || o("paginate", {
|
|
1979
2021
|
page: u
|
|
1980
2022
|
});
|
|
1981
|
-
}, a = C(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = C(() => t.sparkTable.computed.ready ?
|
|
2023
|
+
}, a = C(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = C(() => t.sparkTable.computed.ready ? ss(
|
|
1982
2024
|
Math.floor((a.value - 1) / 10) * 10 + 1,
|
|
1983
2025
|
a.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : a.value + 1
|
|
1984
2026
|
) : []), r = C(
|
|
1985
2027
|
() => t.sparkTable.params.page < Y(t.sparkTable.response.meta, "last_page", 1)
|
|
1986
2028
|
), i = C(() => t.sparkTable.params.page > 1);
|
|
1987
2029
|
return (u, d) => {
|
|
1988
|
-
const p =
|
|
2030
|
+
const p = O("font-awesome-icon");
|
|
1989
2031
|
return m(), h("div", null, [
|
|
1990
|
-
f("div",
|
|
1991
|
-
c.value.length > 1 ? (m(), h("div",
|
|
2032
|
+
f("div", Qo, [
|
|
2033
|
+
c.value.length > 1 ? (m(), h("div", ea, [
|
|
1992
2034
|
f("div", null, [
|
|
1993
|
-
f("nav",
|
|
2035
|
+
f("nav", ta, [
|
|
1994
2036
|
f("a", {
|
|
1995
2037
|
class: H([i.value ? "" : "disabled", "relative inline-flex items-center rounded-l-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
|
|
1996
2038
|
href: "#",
|
|
1997
|
-
onClick: d[0] || (d[0] =
|
|
2039
|
+
onClick: d[0] || (d[0] = ee((v) => l(-1), ["prevent"]))
|
|
1998
2040
|
}, [
|
|
1999
2041
|
b(p, {
|
|
2000
|
-
icon: x(
|
|
2042
|
+
icon: x(A).farChevronLeft,
|
|
2001
2043
|
class: "size-5"
|
|
2002
2044
|
}, null, 8, ["icon"])
|
|
2003
2045
|
], 2),
|
|
2004
|
-
(m(!0), h(R, null,
|
|
2046
|
+
(m(!0), h(R, null, z(c.value, (v) => (m(), h("a", {
|
|
2005
2047
|
key: `page-${v}`,
|
|
2006
2048
|
href: "#",
|
|
2007
2049
|
class: H([
|
|
@@ -2009,30 +2051,30 @@ const ko = (e) => {
|
|
|
2009
2051
|
e.sparkTable.params.page === v ? "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"
|
|
2010
2052
|
]),
|
|
2011
2053
|
onClick: (k) => n(v)
|
|
2012
|
-
},
|
|
2054
|
+
}, L(v), 11, sa))), 128)),
|
|
2013
2055
|
f("a", {
|
|
2014
2056
|
class: H([r.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
|
|
2015
|
-
onClick: d[1] || (d[1] =
|
|
2057
|
+
onClick: d[1] || (d[1] = ee((v) => l(1), ["prevent"])),
|
|
2016
2058
|
href: "#"
|
|
2017
2059
|
}, [
|
|
2018
2060
|
b(p, {
|
|
2019
|
-
icon: x(
|
|
2061
|
+
icon: x(A).farChevronRight,
|
|
2020
2062
|
class: "size-5"
|
|
2021
2063
|
}, null, 8, ["icon"])
|
|
2022
2064
|
], 2)
|
|
2023
2065
|
])
|
|
2024
2066
|
])
|
|
2025
|
-
])) :
|
|
2067
|
+
])) : P("", !0)
|
|
2026
2068
|
])
|
|
2027
2069
|
]);
|
|
2028
2070
|
};
|
|
2029
2071
|
}
|
|
2030
|
-
},
|
|
2072
|
+
}, te = (e, s) => {
|
|
2031
2073
|
const t = e.__vccOpts || e;
|
|
2032
2074
|
for (const [o, l] of s)
|
|
2033
2075
|
t[o] = l;
|
|
2034
2076
|
return t;
|
|
2035
|
-
},
|
|
2077
|
+
}, aa = { class: "spark-table-pagination-per-page" }, ra = {
|
|
2036
2078
|
__name: "SparkTablePaginationPerPage",
|
|
2037
2079
|
props: {
|
|
2038
2080
|
sparkTable: {
|
|
@@ -2052,8 +2094,8 @@ const ko = (e) => {
|
|
|
2052
2094
|
});
|
|
2053
2095
|
};
|
|
2054
2096
|
return (a, c) => {
|
|
2055
|
-
const r =
|
|
2056
|
-
return m(), h("div",
|
|
2097
|
+
const r = O("FormKit");
|
|
2098
|
+
return m(), h("div", aa, [
|
|
2057
2099
|
b(r, {
|
|
2058
2100
|
"model-value": e.sparkTable.params.limit,
|
|
2059
2101
|
type: "select",
|
|
@@ -2066,7 +2108,7 @@ const ko = (e) => {
|
|
|
2066
2108
|
]);
|
|
2067
2109
|
};
|
|
2068
2110
|
}
|
|
2069
|
-
},
|
|
2111
|
+
}, na = /* @__PURE__ */ te(ra, [["__scopeId", "data-v-9ef8544b"]]), Ve = {
|
|
2070
2112
|
__name: "SparkTableToolbar",
|
|
2071
2113
|
props: {
|
|
2072
2114
|
position: {
|
|
@@ -2076,7 +2118,7 @@ const ko = (e) => {
|
|
|
2076
2118
|
}
|
|
2077
2119
|
},
|
|
2078
2120
|
setup(e) {
|
|
2079
|
-
const s = e, t =
|
|
2121
|
+
const s = e, t = Oe(), o = C(() => !!t.default), l = C(() => {
|
|
2080
2122
|
const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
|
|
2081
2123
|
return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
|
|
2082
2124
|
});
|
|
@@ -2084,10 +2126,10 @@ const ko = (e) => {
|
|
|
2084
2126
|
key: 0,
|
|
2085
2127
|
class: H(l.value)
|
|
2086
2128
|
}, [
|
|
2087
|
-
|
|
2088
|
-
], 2)) :
|
|
2129
|
+
B(n.$slots, "default")
|
|
2130
|
+
], 2)) : P("", !0);
|
|
2089
2131
|
}
|
|
2090
|
-
},
|
|
2132
|
+
}, la = { class: "spark-table-search" }, ia = {
|
|
2091
2133
|
__name: "SparkTableSearch",
|
|
2092
2134
|
props: {
|
|
2093
2135
|
/** SparkTable instance object */
|
|
@@ -2106,11 +2148,11 @@ const ko = (e) => {
|
|
|
2106
2148
|
}
|
|
2107
2149
|
},
|
|
2108
2150
|
setup(e) {
|
|
2109
|
-
const s = e, t =
|
|
2151
|
+
const s = e, t = F(""), o = s.config.param || "search";
|
|
2110
2152
|
s.sparkTable.params[o] ? t.value = s.sparkTable.params[o] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2111
2153
|
[o]: s.config.initialValue
|
|
2112
2154
|
}));
|
|
2113
|
-
const l =
|
|
2155
|
+
const l = ot((a) => {
|
|
2114
2156
|
a ? s.sparkTable.methods.applyParams({
|
|
2115
2157
|
page: 1,
|
|
2116
2158
|
[o]: a
|
|
@@ -2126,8 +2168,8 @@ const ko = (e) => {
|
|
|
2126
2168
|
a && a !== t.value ? t.value = a : !a && t.value && (t.value = "");
|
|
2127
2169
|
}
|
|
2128
2170
|
), (a, c) => {
|
|
2129
|
-
const r =
|
|
2130
|
-
return m(), h("div",
|
|
2171
|
+
const r = O("FormKit");
|
|
2172
|
+
return m(), h("div", la, [
|
|
2131
2173
|
b(r, Z({
|
|
2132
2174
|
modelValue: t.value,
|
|
2133
2175
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
@@ -2141,7 +2183,7 @@ const ko = (e) => {
|
|
|
2141
2183
|
]);
|
|
2142
2184
|
};
|
|
2143
2185
|
}
|
|
2144
|
-
},
|
|
2186
|
+
}, ca = /* @__PURE__ */ te(ia, [["__scopeId", "data-v-976170dc"]]), ua = { class: "spark-table-filter-select" }, da = {
|
|
2145
2187
|
__name: "SparkTableFilterSelect",
|
|
2146
2188
|
props: {
|
|
2147
2189
|
/** SparkTable instance object */
|
|
@@ -2157,7 +2199,7 @@ const ko = (e) => {
|
|
|
2157
2199
|
}
|
|
2158
2200
|
},
|
|
2159
2201
|
setup(e) {
|
|
2160
|
-
const s = e, t =
|
|
2202
|
+
const s = e, t = F(""), o = s.config.param || `filter[${s.config.key}]`;
|
|
2161
2203
|
s.sparkTable.params[o] ? t.value = s.sparkTable.params[o] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2162
2204
|
[o]: s.config.initialValue
|
|
2163
2205
|
}));
|
|
@@ -2176,8 +2218,8 @@ const ko = (e) => {
|
|
|
2176
2218
|
a != null && a !== "" ? t.value !== a && (t.value = a) : t.value && (t.value = "");
|
|
2177
2219
|
}
|
|
2178
2220
|
), (a, c) => {
|
|
2179
|
-
const r =
|
|
2180
|
-
return m(), h("div",
|
|
2221
|
+
const r = O("FormKit");
|
|
2222
|
+
return m(), h("div", ua, [
|
|
2181
2223
|
b(r, Z({
|
|
2182
2224
|
modelValue: t.value,
|
|
2183
2225
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
@@ -2191,10 +2233,10 @@ const ko = (e) => {
|
|
|
2191
2233
|
]);
|
|
2192
2234
|
};
|
|
2193
2235
|
}
|
|
2194
|
-
},
|
|
2236
|
+
}, pa = /* @__PURE__ */ te(da, [["__scopeId", "data-v-642dbc69"]]), fa = { class: "spark-table-filter-buttons" }, ma = {
|
|
2195
2237
|
key: 0,
|
|
2196
2238
|
class: "spark-table-filter-buttons-label"
|
|
2197
|
-
},
|
|
2239
|
+
}, ha = {
|
|
2198
2240
|
__name: "SparkTableFilterButtons",
|
|
2199
2241
|
props: {
|
|
2200
2242
|
/** SparkTable instance object */
|
|
@@ -2210,7 +2252,7 @@ const ko = (e) => {
|
|
|
2210
2252
|
}
|
|
2211
2253
|
},
|
|
2212
2254
|
setup(e) {
|
|
2213
|
-
const s = e, t =
|
|
2255
|
+
const s = e, t = F(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
|
|
2214
2256
|
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({
|
|
2215
2257
|
[l]: s.config.initialValue
|
|
2216
2258
|
}));
|
|
@@ -2225,18 +2267,19 @@ const ko = (e) => {
|
|
|
2225
2267
|
(c) => {
|
|
2226
2268
|
(c == null || c === "") && t.value ? t.value = null : c !== t.value && (t.value = c);
|
|
2227
2269
|
}
|
|
2228
|
-
), (c, r) => (m(), h("div",
|
|
2229
|
-
x(o) ? (m(), h("span",
|
|
2230
|
-
b(
|
|
2270
|
+
), (c, r) => (m(), h("div", fa, [
|
|
2271
|
+
x(o) ? (m(), h("span", ma, L(x(o)), 1)) : P("", !0),
|
|
2272
|
+
b(ro, { class: "isolate" }, {
|
|
2231
2273
|
default: T(() => [
|
|
2232
|
-
(m(!0), h(R, null,
|
|
2274
|
+
(m(!0), h(R, null, z(e.config.options, (i) => (m(), V(G, {
|
|
2233
2275
|
key: i.value,
|
|
2234
2276
|
size: "xl",
|
|
2277
|
+
"button-class": "px-3.5",
|
|
2235
2278
|
variant: n(i.value) ? "primary" : "secondary",
|
|
2236
2279
|
onClick: (u) => a(i.value)
|
|
2237
2280
|
}, {
|
|
2238
2281
|
default: T(() => [
|
|
2239
|
-
E(
|
|
2282
|
+
E(L(i.label), 1)
|
|
2240
2283
|
]),
|
|
2241
2284
|
_: 2
|
|
2242
2285
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -2245,7 +2288,7 @@ const ko = (e) => {
|
|
|
2245
2288
|
})
|
|
2246
2289
|
]));
|
|
2247
2290
|
}
|
|
2248
|
-
},
|
|
2291
|
+
}, ga = /* @__PURE__ */ te(ha, [["__scopeId", "data-v-01a49899"]]), ya = { class: "spark-table-date-picker" }, va = {
|
|
2249
2292
|
__name: "SparkTableDatePicker",
|
|
2250
2293
|
props: {
|
|
2251
2294
|
/** SparkTable instance object */
|
|
@@ -2261,7 +2304,7 @@ const ko = (e) => {
|
|
|
2261
2304
|
}
|
|
2262
2305
|
},
|
|
2263
2306
|
setup(e) {
|
|
2264
|
-
const s = e, t =
|
|
2307
|
+
const s = e, t = F(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = F(`${l}-0`);
|
|
2265
2308
|
return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2266
2309
|
[l]: s.config.initialValue
|
|
2267
2310
|
})) : t.value = null, I(t, (a) => {
|
|
@@ -2279,8 +2322,8 @@ const ko = (e) => {
|
|
|
2279
2322
|
} else a && a !== t.value && (t.value = a);
|
|
2280
2323
|
}
|
|
2281
2324
|
), (a, c) => {
|
|
2282
|
-
const r =
|
|
2283
|
-
return m(), h("div",
|
|
2325
|
+
const r = O("FormKit");
|
|
2326
|
+
return m(), h("div", ya, [
|
|
2284
2327
|
(m(), V(r, Z({
|
|
2285
2328
|
key: n.value,
|
|
2286
2329
|
modelValue: t.value,
|
|
@@ -2298,7 +2341,7 @@ const ko = (e) => {
|
|
|
2298
2341
|
]);
|
|
2299
2342
|
};
|
|
2300
2343
|
}
|
|
2301
|
-
},
|
|
2344
|
+
}, ba = /* @__PURE__ */ te(va, [["__scopeId", "data-v-44ef9cb8"]]), xa = { class: "spark-table-reset" }, ka = { key: 1 }, wa = {
|
|
2302
2345
|
__name: "SparkTableReset",
|
|
2303
2346
|
props: {
|
|
2304
2347
|
/** SparkTable instance object */
|
|
@@ -2335,11 +2378,12 @@ const ko = (e) => {
|
|
|
2335
2378
|
s.sparkTable.methods.applyParams({ ...r, page: 1 });
|
|
2336
2379
|
};
|
|
2337
2380
|
return (o, l) => {
|
|
2338
|
-
const n =
|
|
2339
|
-
return m(), h("div",
|
|
2381
|
+
const n = O("font-awesome-icon");
|
|
2382
|
+
return m(), h("div", xa, [
|
|
2340
2383
|
b(G, {
|
|
2341
2384
|
onClick: t,
|
|
2342
2385
|
variant: "secondary",
|
|
2386
|
+
"button-class": "px-3.5",
|
|
2343
2387
|
size: "xl"
|
|
2344
2388
|
}, {
|
|
2345
2389
|
default: T(() => [
|
|
@@ -2347,27 +2391,27 @@ const ko = (e) => {
|
|
|
2347
2391
|
key: 0,
|
|
2348
2392
|
icon: ["far", e.config.icon],
|
|
2349
2393
|
class: H({ "mr-1.5": e.config.label })
|
|
2350
|
-
}, null, 8, ["icon", "class"])) :
|
|
2351
|
-
e.config.label ? (m(), h("span",
|
|
2394
|
+
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
2395
|
+
e.config.label ? (m(), h("span", ka, L(e.config.label), 1)) : P("", !0)
|
|
2352
2396
|
]),
|
|
2353
2397
|
_: 1
|
|
2354
2398
|
})
|
|
2355
2399
|
]);
|
|
2356
2400
|
};
|
|
2357
2401
|
}
|
|
2358
|
-
},
|
|
2402
|
+
}, _a = /* @__PURE__ */ te(wa, [["__scopeId", "data-v-0894e3bf"]]), Sa = { class: "spark-table" }, Ca = {
|
|
2359
2403
|
key: 1,
|
|
2360
2404
|
class: "pt-5"
|
|
2361
|
-
},
|
|
2405
|
+
}, $a = {
|
|
2362
2406
|
key: 2,
|
|
2363
2407
|
class: "flex flex-col items-center justify-center py-16 text-gray-500 rounded-md border border-gray-300 bg-white"
|
|
2364
|
-
},
|
|
2408
|
+
}, Ta = { class: "flex items-center gap-x-3 ml-auto" }, we = {
|
|
2365
2409
|
perPages: [15, 30, 50, 100, 200, 500],
|
|
2366
2410
|
limit: 15
|
|
2367
|
-
},
|
|
2411
|
+
}, Pa = {
|
|
2368
2412
|
page: 1,
|
|
2369
|
-
limit:
|
|
2370
|
-
},
|
|
2413
|
+
limit: we.limit
|
|
2414
|
+
}, Re = {
|
|
2371
2415
|
colHeaders: !0,
|
|
2372
2416
|
filters: !1,
|
|
2373
2417
|
stretchH: "all",
|
|
@@ -2377,7 +2421,7 @@ const ko = (e) => {
|
|
|
2377
2421
|
tableClassName: "spark-table-table",
|
|
2378
2422
|
readOnlyCellClassName: "read-only",
|
|
2379
2423
|
licenseKey: "non-commercial-and-evaluation"
|
|
2380
|
-
},
|
|
2424
|
+
}, Rn = {
|
|
2381
2425
|
__name: "SparkTable",
|
|
2382
2426
|
props: {
|
|
2383
2427
|
url: {
|
|
@@ -2401,19 +2445,19 @@ const ko = (e) => {
|
|
|
2401
2445
|
params: {
|
|
2402
2446
|
type: Object,
|
|
2403
2447
|
default() {
|
|
2404
|
-
return
|
|
2448
|
+
return Pa;
|
|
2405
2449
|
}
|
|
2406
2450
|
},
|
|
2407
2451
|
options: {
|
|
2408
2452
|
type: Object,
|
|
2409
2453
|
default() {
|
|
2410
|
-
return
|
|
2454
|
+
return we;
|
|
2411
2455
|
}
|
|
2412
2456
|
},
|
|
2413
2457
|
settings: {
|
|
2414
2458
|
type: Object,
|
|
2415
2459
|
default() {
|
|
2416
|
-
return
|
|
2460
|
+
return Re;
|
|
2417
2461
|
}
|
|
2418
2462
|
},
|
|
2419
2463
|
plugins: {
|
|
@@ -2442,15 +2486,15 @@ const ko = (e) => {
|
|
|
2442
2486
|
],
|
|
2443
2487
|
setup(e, { expose: s, emit: t }) {
|
|
2444
2488
|
const o = e;
|
|
2445
|
-
|
|
2446
|
-
const l = t, n =
|
|
2489
|
+
us(), pe(ns), pe(ls), pe(is), Y(o, "settings.nestedHeaders") && pe(cs);
|
|
2490
|
+
const l = t, n = Ee("axios"), a = F(null), c = F(!1), r = F(null);
|
|
2447
2491
|
let i = !1;
|
|
2448
2492
|
const u = {
|
|
2449
|
-
search:
|
|
2450
|
-
filterSelect:
|
|
2451
|
-
filterButtons:
|
|
2452
|
-
datePicker:
|
|
2453
|
-
reset:
|
|
2493
|
+
search: ca,
|
|
2494
|
+
filterSelect: pa,
|
|
2495
|
+
filterButtons: ga,
|
|
2496
|
+
datePicker: ba,
|
|
2497
|
+
reset: _a
|
|
2454
2498
|
}, d = q({
|
|
2455
2499
|
hotInstance: null,
|
|
2456
2500
|
url: C(() => o.url),
|
|
@@ -2507,7 +2551,7 @@ const ko = (e) => {
|
|
|
2507
2551
|
fireEvent: (g, _) => {
|
|
2508
2552
|
l(g, _);
|
|
2509
2553
|
},
|
|
2510
|
-
getSettingsForProp: (g) =>
|
|
2554
|
+
getSettingsForProp: (g) => os(Y(d.tableSettings, "columns"), { data: g }),
|
|
2511
2555
|
// Helper methods for easier param access
|
|
2512
2556
|
getParams: () => d.computed.params,
|
|
2513
2557
|
getParam: (g) => d.computed.params[g],
|
|
@@ -2526,20 +2570,20 @@ const ko = (e) => {
|
|
|
2526
2570
|
...o.params,
|
|
2527
2571
|
...d.params
|
|
2528
2572
|
})),
|
|
2529
|
-
ready: C(() =>
|
|
2573
|
+
ready: C(() => as(d, "response.meta.last_page"))
|
|
2530
2574
|
},
|
|
2531
2575
|
options: C(() => ({
|
|
2532
|
-
...
|
|
2576
|
+
...we,
|
|
2533
2577
|
...o.options
|
|
2534
2578
|
})),
|
|
2535
2579
|
tableSettings: C(() => ({
|
|
2536
|
-
...
|
|
2580
|
+
...Re,
|
|
2537
2581
|
nestedHeaders: Y(o.settings, "nestedHeaders", []),
|
|
2538
2582
|
...!Y(o.settings, "nestedHeaders") && {
|
|
2539
|
-
afterGetColHeader: (g, _) =>
|
|
2583
|
+
afterGetColHeader: (g, _) => wo(g, _, d)
|
|
2540
2584
|
},
|
|
2541
|
-
afterChange: (g, _) =>
|
|
2542
|
-
afterRender: () =>
|
|
2585
|
+
afterChange: (g, _) => Zo(),
|
|
2586
|
+
afterRender: () => _o(d),
|
|
2543
2587
|
/**
|
|
2544
2588
|
* Prevent columns with explicit width from being stretched
|
|
2545
2589
|
* This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
|
|
@@ -2558,10 +2602,10 @@ const ko = (e) => {
|
|
|
2558
2602
|
w && _.forEach((y) => {
|
|
2559
2603
|
for (let S = y.startRow; S <= y.endRow; S++)
|
|
2560
2604
|
for (let M = y.startCol; M <= y.endCol; M++) {
|
|
2561
|
-
const
|
|
2562
|
-
if (
|
|
2605
|
+
const D = w.getCell(S, M);
|
|
2606
|
+
if (D) {
|
|
2563
2607
|
const W = S - _[0].startRow, de = M - _[0].startCol;
|
|
2564
|
-
g[W][de] =
|
|
2608
|
+
g[W][de] = D.dataset.copyValue ?? D.textContent ?? "";
|
|
2565
2609
|
}
|
|
2566
2610
|
}
|
|
2567
2611
|
});
|
|
@@ -2599,19 +2643,19 @@ const ko = (e) => {
|
|
|
2599
2643
|
{ deep: !0, flush: "sync" }
|
|
2600
2644
|
), o.syncToRoute || o.persistToStorage) {
|
|
2601
2645
|
const g = typeof o.syncToRoute == "string";
|
|
2602
|
-
|
|
2646
|
+
qo(d, {
|
|
2603
2647
|
namespace: g ? o.syncToRoute : null,
|
|
2604
2648
|
syncToRoute: !!o.syncToRoute,
|
|
2605
2649
|
persistToStorage: o.persistToStorage
|
|
2606
2650
|
});
|
|
2607
2651
|
}
|
|
2608
|
-
return
|
|
2652
|
+
return Ce(
|
|
2609
2653
|
() => o.params,
|
|
2610
2654
|
async () => {
|
|
2611
2655
|
d.params.page = 1, await d.methods.loadTable();
|
|
2612
2656
|
},
|
|
2613
2657
|
{ debounce: 50, maxWait: 1e3 }
|
|
2614
|
-
),
|
|
2658
|
+
), Ce(
|
|
2615
2659
|
() => d.params,
|
|
2616
2660
|
async () => {
|
|
2617
2661
|
await d.methods.loadTable();
|
|
@@ -2622,11 +2666,11 @@ const ko = (e) => {
|
|
|
2622
2666
|
async (g, _) => {
|
|
2623
2667
|
g !== _ && (d.params.page = 1, await d.methods.loadTable());
|
|
2624
2668
|
}
|
|
2625
|
-
),
|
|
2669
|
+
), _e(async () => {
|
|
2626
2670
|
await d.methods.loadTable(), l("ready");
|
|
2627
|
-
}),
|
|
2671
|
+
}), mt(() => {
|
|
2628
2672
|
i = !0;
|
|
2629
|
-
}),
|
|
2673
|
+
}), No(d), s({
|
|
2630
2674
|
refresh: () => d.methods.loadTable(),
|
|
2631
2675
|
getParams: () => d.methods.getParams(),
|
|
2632
2676
|
getParam: (g) => d.methods.getParam(g),
|
|
@@ -2639,62 +2683,62 @@ const ko = (e) => {
|
|
|
2639
2683
|
sparkTable: d,
|
|
2640
2684
|
table: a
|
|
2641
2685
|
}), (g, _) => {
|
|
2642
|
-
const w =
|
|
2643
|
-
return m(), h("div",
|
|
2644
|
-
d.computed.ready && $.value && $.value.length ? (m(), V(
|
|
2686
|
+
const w = O("font-awesome-icon");
|
|
2687
|
+
return m(), h("div", Sa, [
|
|
2688
|
+
d.computed.ready && $.value && $.value.length ? (m(), V(Ve, {
|
|
2645
2689
|
key: 0,
|
|
2646
2690
|
position: "header"
|
|
2647
2691
|
}, {
|
|
2648
2692
|
default: T(() => [
|
|
2649
|
-
(m(!0), h(R, null,
|
|
2693
|
+
(m(!0), h(R, null, z($.value, (y) => (m(), V(N(u[y.config.type]), {
|
|
2650
2694
|
key: y.name,
|
|
2651
2695
|
class: H(y.config.align ? `self-${y.config.align}` : ""),
|
|
2652
2696
|
"spark-table": d,
|
|
2653
2697
|
config: y.config
|
|
2654
2698
|
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
2655
|
-
|
|
2699
|
+
B(g.$slots, "header", {
|
|
2656
2700
|
sparkTable: d,
|
|
2657
2701
|
loading: c.value,
|
|
2658
2702
|
error: r.value
|
|
2659
2703
|
})
|
|
2660
2704
|
]),
|
|
2661
2705
|
_: 3
|
|
2662
|
-
})) : (m(), h("div",
|
|
2663
|
-
|
|
2706
|
+
})) : (m(), h("div", Ca)),
|
|
2707
|
+
ht(b(x(rs), {
|
|
2664
2708
|
"theme-name": "ht-theme-classic",
|
|
2665
2709
|
ref_key: "table",
|
|
2666
2710
|
ref: a,
|
|
2667
2711
|
settings: d.tableSettings
|
|
2668
2712
|
}, null, 8, ["settings"]), [
|
|
2669
|
-
[
|
|
2713
|
+
[gt, !p.value]
|
|
2670
2714
|
]),
|
|
2671
|
-
p.value ? (m(), h("div",
|
|
2715
|
+
p.value ? (m(), h("div", $a, [
|
|
2672
2716
|
b(w, {
|
|
2673
|
-
icon: x(
|
|
2717
|
+
icon: x(A).farInbox,
|
|
2674
2718
|
class: "size-12 mb-4 text-gray-300"
|
|
2675
2719
|
}, null, 8, ["icon"]),
|
|
2676
2720
|
_[0] || (_[0] = f("p", { class: "text-sm" }, "No records found", -1))
|
|
2677
|
-
])) :
|
|
2678
|
-
d.computed.ready ? (m(), V(
|
|
2721
|
+
])) : P("", !0),
|
|
2722
|
+
d.computed.ready ? (m(), V(Ve, {
|
|
2679
2723
|
key: 3,
|
|
2680
2724
|
position: "footer"
|
|
2681
2725
|
}, {
|
|
2682
2726
|
default: T(() => [
|
|
2683
|
-
p.value ?
|
|
2727
|
+
p.value ? P("", !0) : (m(), V(Jo, {
|
|
2684
2728
|
key: 0,
|
|
2685
2729
|
"spark-table": d
|
|
2686
2730
|
}, null, 8, ["spark-table"])),
|
|
2687
|
-
f("div",
|
|
2688
|
-
p.value ?
|
|
2731
|
+
f("div", Ta, [
|
|
2732
|
+
p.value ? P("", !0) : (m(), V(oa, {
|
|
2689
2733
|
key: 0,
|
|
2690
2734
|
"spark-table": d,
|
|
2691
2735
|
onPaginate: d.methods.applyParams
|
|
2692
2736
|
}, null, 8, ["spark-table", "onPaginate"])),
|
|
2693
|
-
b(
|
|
2737
|
+
b(na, {
|
|
2694
2738
|
"spark-table": d,
|
|
2695
2739
|
onPaginate: d.methods.applyParams
|
|
2696
2740
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2697
|
-
|
|
2741
|
+
B(g.$slots, "footer", {
|
|
2698
2742
|
sparkTable: d,
|
|
2699
2743
|
loading: c.value,
|
|
2700
2744
|
error: r.value
|
|
@@ -2702,12 +2746,12 @@ const ko = (e) => {
|
|
|
2702
2746
|
])
|
|
2703
2747
|
]),
|
|
2704
2748
|
_: 3
|
|
2705
|
-
})) :
|
|
2749
|
+
})) : P("", !0)
|
|
2706
2750
|
]);
|
|
2707
2751
|
};
|
|
2708
2752
|
}
|
|
2709
2753
|
};
|
|
2710
|
-
function
|
|
2754
|
+
function Ae() {
|
|
2711
2755
|
const e = q({
|
|
2712
2756
|
isVisible: !1,
|
|
2713
2757
|
content: null,
|
|
@@ -2734,9 +2778,9 @@ function He() {
|
|
|
2734
2778
|
}
|
|
2735
2779
|
};
|
|
2736
2780
|
}
|
|
2737
|
-
class
|
|
2781
|
+
class La {
|
|
2738
2782
|
constructor() {
|
|
2739
|
-
this.left =
|
|
2783
|
+
this.left = Ae(), this.right = Ae();
|
|
2740
2784
|
}
|
|
2741
2785
|
showLeft = (s, t = {}, o = {}, l = {}) => {
|
|
2742
2786
|
const n = {
|
|
@@ -2766,22 +2810,22 @@ class ga {
|
|
|
2766
2810
|
this.left.close(), this.right.close();
|
|
2767
2811
|
};
|
|
2768
2812
|
}
|
|
2769
|
-
const
|
|
2813
|
+
const se = new La(), Ma = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ha = { class: "flex flex-1 flex-col" }, Va = {
|
|
2770
2814
|
class: "flex flex-1 flex-col gap-y-7",
|
|
2771
2815
|
role: "list"
|
|
2772
|
-
},
|
|
2816
|
+
}, Ra = { class: "flex flex-1 flex-col" }, Aa = {
|
|
2773
2817
|
role: "list",
|
|
2774
2818
|
class: "flex flex-1 flex-col"
|
|
2775
|
-
},
|
|
2819
|
+
}, Ea = { class: "flex items-center pb-8" }, Fa = ["href", "onClick"], Oa = {
|
|
2776
2820
|
key: 2,
|
|
2777
2821
|
class: "w-full flex justify-center"
|
|
2778
|
-
},
|
|
2822
|
+
}, Ba = {
|
|
2779
2823
|
key: 0,
|
|
2780
2824
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
2781
|
-
},
|
|
2825
|
+
}, Da = ["href", "onClick"], za = {
|
|
2782
2826
|
key: 1,
|
|
2783
2827
|
class: "text-[13px]"
|
|
2784
|
-
},
|
|
2828
|
+
}, ja = { class: "mt-auto" }, Ia = { class: "p-[10px] flex-shrink-0" }, Na = { class: "flex flex-1 items-center gap-x-6" }, Za = { class: "relative flex flex-1 items-center gap-4" }, qa = { class: "cursor-pointer" }, Ua = ["src"], Ka = { class: "ml-auto" }, Ga = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, An = {
|
|
2785
2829
|
__name: "SparkDefaultContainer",
|
|
2786
2830
|
props: {
|
|
2787
2831
|
appStore: {
|
|
@@ -2799,52 +2843,52 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2799
2843
|
},
|
|
2800
2844
|
emits: ["overlayClose"],
|
|
2801
2845
|
setup(e, { emit: s }) {
|
|
2802
|
-
const t = e, o = s, l =
|
|
2846
|
+
const t = e, o = s, l = Oe(), n = le(), a = lt(), c = at(), r = C(() => c.getAppIcon(t.appStore.state.app)), i = C(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
|
|
2803
2847
|
const k = {};
|
|
2804
|
-
l["app-selector-bottom"] ? k.bottomSlot = () =>
|
|
2848
|
+
l["app-selector-bottom"] ? k.bottomSlot = () => Se("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (k.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? k.footerSlot = () => Se("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (k.footerSlot = t.appSelectorSlots.footerSlot), se.showRight(As, k, {
|
|
2805
2849
|
select: ($) => {
|
|
2806
|
-
|
|
2850
|
+
se.closeRight();
|
|
2807
2851
|
}
|
|
2808
2852
|
});
|
|
2809
2853
|
}, d = () => {
|
|
2810
|
-
|
|
2811
|
-
|
|
2854
|
+
se.showLeft(
|
|
2855
|
+
oo,
|
|
2812
2856
|
{},
|
|
2813
2857
|
{
|
|
2814
2858
|
select: (k) => {
|
|
2815
|
-
a.toggleBrand(k),
|
|
2859
|
+
a.toggleBrand(k), se.closeLeft();
|
|
2816
2860
|
}
|
|
2817
2861
|
}
|
|
2818
2862
|
);
|
|
2819
2863
|
}, p = C(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), v = C(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
2820
2864
|
return (k, $) => {
|
|
2821
|
-
const g =
|
|
2865
|
+
const g = O("font-awesome-icon"), _ = O("router-view");
|
|
2822
2866
|
return m(), h(R, null, [
|
|
2823
2867
|
f("div", {
|
|
2824
2868
|
class: H([p.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
2825
2869
|
}, [
|
|
2826
|
-
f("div",
|
|
2827
|
-
f("nav",
|
|
2828
|
-
f("ul",
|
|
2829
|
-
f("li",
|
|
2830
|
-
f("ul",
|
|
2831
|
-
f("li",
|
|
2870
|
+
f("div", Ma, [
|
|
2871
|
+
f("nav", Ha, [
|
|
2872
|
+
f("ul", Va, [
|
|
2873
|
+
f("li", Ra, [
|
|
2874
|
+
f("ul", Aa, [
|
|
2875
|
+
f("li", Ea, [
|
|
2832
2876
|
f("a", {
|
|
2833
2877
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
2834
|
-
onClick: $[0] || ($[0] =
|
|
2878
|
+
onClick: $[0] || ($[0] = ee((w) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
2835
2879
|
}, [
|
|
2836
2880
|
b(g, {
|
|
2837
|
-
icon: x(
|
|
2881
|
+
icon: x(A)[r.value],
|
|
2838
2882
|
class: "size-5"
|
|
2839
2883
|
}, null, 8, ["icon"])
|
|
2840
2884
|
]),
|
|
2841
|
-
e.mainNavStore.state.collapsed ?
|
|
2885
|
+
e.mainNavStore.state.collapsed ? P("", !0) : (m(), h("a", {
|
|
2842
2886
|
key: 0,
|
|
2843
|
-
onClick: $[1] || ($[1] =
|
|
2887
|
+
onClick: $[1] || ($[1] = ee((w) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
2844
2888
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
2845
|
-
},
|
|
2889
|
+
}, L(e.appStore.state.app), 1))
|
|
2846
2890
|
]),
|
|
2847
|
-
(m(!0), h(R, null,
|
|
2891
|
+
(m(!0), h(R, null, z(e.mainNavStore.state.menu, (w) => (m(), h("li", {
|
|
2848
2892
|
key: w.name,
|
|
2849
2893
|
class: H({
|
|
2850
2894
|
"mt-[10px]": w.children,
|
|
@@ -2857,16 +2901,16 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2857
2901
|
"hover:bg-gray-100": w?.href
|
|
2858
2902
|
}, "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"]),
|
|
2859
2903
|
href: w?.href,
|
|
2860
|
-
onClick:
|
|
2904
|
+
onClick: ee((y) => e.mainNavStore.goto(w.href), ["prevent"])
|
|
2861
2905
|
}, [
|
|
2862
2906
|
w.icon ? (m(), V(g, {
|
|
2863
2907
|
key: 0,
|
|
2864
|
-
icon: x(
|
|
2908
|
+
icon: x(A)[w.icon],
|
|
2865
2909
|
class: H([[(w.current, "text-gray-400")], "size-4"])
|
|
2866
|
-
}, null, 8, ["icon", "class"])) :
|
|
2867
|
-
e.mainNavStore.state.collapsed ? w?.children ? (m(), h("div",
|
|
2910
|
+
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
2911
|
+
e.mainNavStore.state.collapsed ? w?.children ? (m(), h("div", Oa, [...$[6] || ($[6] = [
|
|
2868
2912
|
f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
2869
|
-
])])) :
|
|
2913
|
+
])])) : P("", !0) : (m(), h("span", {
|
|
2870
2914
|
key: 1,
|
|
2871
2915
|
class: H({
|
|
2872
2916
|
"text-[11px]": w?.children,
|
|
@@ -2874,38 +2918,38 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2874
2918
|
"font-semibold": w?.children,
|
|
2875
2919
|
"text-gray-500": w?.children
|
|
2876
2920
|
})
|
|
2877
|
-
},
|
|
2878
|
-
], 10,
|
|
2879
|
-
w.children ? (m(), h("ul",
|
|
2880
|
-
(m(!0), h(R, null,
|
|
2921
|
+
}, L(w.name), 3))
|
|
2922
|
+
], 10, Fa),
|
|
2923
|
+
w.children ? (m(), h("ul", Ba, [
|
|
2924
|
+
(m(!0), h(R, null, z(w.children, (y) => (m(), h("li", {
|
|
2881
2925
|
key: y.name
|
|
2882
2926
|
}, [
|
|
2883
2927
|
f("a", {
|
|
2884
2928
|
class: H([[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"]),
|
|
2885
2929
|
href: y.href,
|
|
2886
|
-
onClick:
|
|
2930
|
+
onClick: ee((S) => e.mainNavStore.goto(y.href), ["prevent"])
|
|
2887
2931
|
}, [
|
|
2888
2932
|
y.icon ? (m(), V(g, {
|
|
2889
2933
|
key: 0,
|
|
2890
|
-
icon: x(
|
|
2934
|
+
icon: x(A)[y.icon],
|
|
2891
2935
|
class: H([[(y.current, "text-gray-400")], "size-4"])
|
|
2892
|
-
}, null, 8, ["icon", "class"])) :
|
|
2893
|
-
e.mainNavStore.state.collapsed ?
|
|
2894
|
-
], 10,
|
|
2936
|
+
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
2937
|
+
e.mainNavStore.state.collapsed ? P("", !0) : (m(), h("span", za, L(y.name), 1))
|
|
2938
|
+
], 10, Da)
|
|
2895
2939
|
]))), 128))
|
|
2896
|
-
])) :
|
|
2940
|
+
])) : P("", !0)
|
|
2897
2941
|
], 2))), 128))
|
|
2898
2942
|
])
|
|
2899
2943
|
]),
|
|
2900
|
-
f("li",
|
|
2901
|
-
|
|
2944
|
+
f("li", ja, [
|
|
2945
|
+
B(k.$slots, "sidebar-footer"),
|
|
2902
2946
|
f("a", {
|
|
2903
2947
|
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",
|
|
2904
2948
|
href: "#",
|
|
2905
|
-
onClick: $[2] || ($[2] =
|
|
2949
|
+
onClick: $[2] || ($[2] = ee((w) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
2906
2950
|
}, [
|
|
2907
2951
|
b(g, {
|
|
2908
|
-
icon: x(
|
|
2952
|
+
icon: x(A)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
2909
2953
|
class: "class-5"
|
|
2910
2954
|
}, null, 8, ["icon"])
|
|
2911
2955
|
])
|
|
@@ -2917,19 +2961,19 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2917
2961
|
f("div", {
|
|
2918
2962
|
class: H([v.value, "h-full transition-all flex flex-col"])
|
|
2919
2963
|
}, [
|
|
2920
|
-
f("div",
|
|
2921
|
-
f("div",
|
|
2922
|
-
f("div",
|
|
2923
|
-
|
|
2924
|
-
f("div",
|
|
2964
|
+
f("div", Ia, [
|
|
2965
|
+
f("div", Na, [
|
|
2966
|
+
f("div", Za, [
|
|
2967
|
+
B(k.$slots, "header-left", {}, () => [
|
|
2968
|
+
f("div", qa, [
|
|
2925
2969
|
b(g, {
|
|
2926
|
-
icon: x(
|
|
2970
|
+
icon: x(A).farBarsSort,
|
|
2927
2971
|
class: "size-5",
|
|
2928
2972
|
onClick: $[3] || ($[3] = (w) => e.mainNavStore.toggleHidden())
|
|
2929
2973
|
}, null, 8, ["icon"])
|
|
2930
2974
|
])
|
|
2931
2975
|
]),
|
|
2932
|
-
|
|
2976
|
+
B(k.$slots, "header-center", {}, () => [
|
|
2933
2977
|
i.value ? (m(), h("div", {
|
|
2934
2978
|
key: 0,
|
|
2935
2979
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
@@ -2940,11 +2984,11 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2940
2984
|
src: x(a).currentBrand.logo,
|
|
2941
2985
|
alt: "",
|
|
2942
2986
|
class: "h-[30px] w-auto"
|
|
2943
|
-
}, null, 8,
|
|
2944
|
-
])) :
|
|
2987
|
+
}, null, 8, Ua)) : P("", !0)
|
|
2988
|
+
])) : P("", !0)
|
|
2945
2989
|
]),
|
|
2946
|
-
f("div",
|
|
2947
|
-
|
|
2990
|
+
f("div", Ka, [
|
|
2991
|
+
B(k.$slots, "header-right", {}, () => [
|
|
2948
2992
|
e.appStore.state.showAppSelector ? (m(), h("button", {
|
|
2949
2993
|
key: 0,
|
|
2950
2994
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
@@ -2952,71 +2996,71 @@ const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
|
|
|
2952
2996
|
onClick: u
|
|
2953
2997
|
}, [
|
|
2954
2998
|
b(g, {
|
|
2955
|
-
icon: x(
|
|
2999
|
+
icon: x(A).farGripDotsVertical,
|
|
2956
3000
|
class: "size-4 text-gray-400"
|
|
2957
3001
|
}, null, 8, ["icon"])
|
|
2958
|
-
])) :
|
|
3002
|
+
])) : P("", !0)
|
|
2959
3003
|
])
|
|
2960
3004
|
])
|
|
2961
3005
|
])
|
|
2962
3006
|
])
|
|
2963
3007
|
]),
|
|
2964
|
-
f("main",
|
|
3008
|
+
f("main", Ga, [
|
|
2965
3009
|
b(_)
|
|
2966
3010
|
])
|
|
2967
3011
|
], 2),
|
|
2968
|
-
b(x(
|
|
3012
|
+
b(x(Te), {
|
|
2969
3013
|
position: "left",
|
|
2970
|
-
"overlay-instance": x(
|
|
3014
|
+
"overlay-instance": x(se).left,
|
|
2971
3015
|
onClose: $[4] || ($[4] = (w) => o("overlayClose", "left"))
|
|
2972
3016
|
}, null, 8, ["overlay-instance"]),
|
|
2973
|
-
b(x(
|
|
3017
|
+
b(x(Te), {
|
|
2974
3018
|
position: "right",
|
|
2975
|
-
"overlay-instance": x(
|
|
3019
|
+
"overlay-instance": x(se).right,
|
|
2976
3020
|
onClose: $[5] || ($[5] = (w) => o("overlayClose", "right"))
|
|
2977
3021
|
}, null, 8, ["overlay-instance"]),
|
|
2978
|
-
b(x(
|
|
3022
|
+
b(x(go))
|
|
2979
3023
|
], 64);
|
|
2980
3024
|
};
|
|
2981
3025
|
}
|
|
2982
|
-
},
|
|
2983
|
-
function
|
|
2984
|
-
const t =
|
|
2985
|
-
return m(), h("main",
|
|
3026
|
+
}, Wa = {}, Ya = { class: "h-full" };
|
|
3027
|
+
function Xa(e, s) {
|
|
3028
|
+
const t = O("router-view");
|
|
3029
|
+
return m(), h("main", Ya, [
|
|
2986
3030
|
b(t)
|
|
2987
3031
|
]);
|
|
2988
3032
|
}
|
|
2989
|
-
const
|
|
3033
|
+
const En = /* @__PURE__ */ te(Wa, [["render", Xa]]), Ja = (e) => {
|
|
2990
3034
|
const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2991
3035
|
return s ? s[2] : null;
|
|
2992
|
-
},
|
|
3036
|
+
}, Qa = (e, s, t = {}) => {
|
|
2993
3037
|
const {
|
|
2994
3038
|
maxAge: o = 31536e3,
|
|
2995
3039
|
// 365 days in seconds
|
|
2996
|
-
domain: l =
|
|
3040
|
+
domain: l = it(),
|
|
2997
3041
|
secure: n = !0,
|
|
2998
3042
|
sameSite: a = "Lax",
|
|
2999
3043
|
path: c = "/"
|
|
3000
3044
|
} = t;
|
|
3001
3045
|
let r = `${e}=${s}; max-age=${o}; path=${c}; samesite=${a}`;
|
|
3002
3046
|
l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
|
|
3003
|
-
},
|
|
3004
|
-
const { domain: t =
|
|
3047
|
+
}, er = (e, s = {}) => {
|
|
3048
|
+
const { domain: t = it(), path: o = "/" } = s;
|
|
3005
3049
|
let l = `${e}=; max-age=0; path=${o}`;
|
|
3006
3050
|
t && (l += `; domain=${t}`), document.cookie = l;
|
|
3007
|
-
},
|
|
3051
|
+
}, it = () => {
|
|
3008
3052
|
const e = window.location.hostname;
|
|
3009
3053
|
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;
|
|
3010
|
-
},
|
|
3011
|
-
function
|
|
3012
|
-
|
|
3054
|
+
}, ct = [];
|
|
3055
|
+
function tr(e) {
|
|
3056
|
+
ct.push(e);
|
|
3013
3057
|
}
|
|
3014
|
-
function
|
|
3015
|
-
|
|
3058
|
+
function sr() {
|
|
3059
|
+
ct.forEach((e) => e());
|
|
3016
3060
|
}
|
|
3017
|
-
function
|
|
3061
|
+
function Fn(e) {
|
|
3018
3062
|
let s = !1;
|
|
3019
|
-
return
|
|
3063
|
+
return tr(() => {
|
|
3020
3064
|
s = !1;
|
|
3021
3065
|
}), {
|
|
3022
3066
|
bootstrapApp: async () => {
|
|
@@ -3065,15 +3109,15 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3065
3109
|
}), s = (i = {}) => {
|
|
3066
3110
|
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);
|
|
3067
3111
|
}, t = (i) => {
|
|
3068
|
-
|
|
3112
|
+
Qa(ve, i), e.token = i;
|
|
3069
3113
|
}, o = () => {
|
|
3070
|
-
|
|
3071
|
-
}, l = () =>
|
|
3072
|
-
const u = await
|
|
3114
|
+
er(ve), e.token = null;
|
|
3115
|
+
}, l = () => Ja(ve), n = async (i) => {
|
|
3116
|
+
const u = await ne.post(e.endpoints.login, i), d = u.headers.authorization;
|
|
3073
3117
|
return t(d), e.user = u.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(u.data), u.data;
|
|
3074
3118
|
}, a = async () => {
|
|
3075
3119
|
try {
|
|
3076
|
-
await
|
|
3120
|
+
await ne.post(
|
|
3077
3121
|
e.endpoints.logout,
|
|
3078
3122
|
{},
|
|
3079
3123
|
{
|
|
@@ -3085,14 +3129,14 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3085
3129
|
} catch (i) {
|
|
3086
3130
|
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
|
|
3087
3131
|
} finally {
|
|
3088
|
-
o(), e.user = null,
|
|
3132
|
+
o(), e.user = null, sr();
|
|
3089
3133
|
}
|
|
3090
3134
|
}, c = async () => {
|
|
3091
3135
|
const i = e.overrideToken || l();
|
|
3092
3136
|
if (!i)
|
|
3093
3137
|
return e.ready = !0, null;
|
|
3094
3138
|
try {
|
|
3095
|
-
const { data: u } = await
|
|
3139
|
+
const { data: u } = await ne.get(e.endpoints.fetch, {
|
|
3096
3140
|
headers: {
|
|
3097
3141
|
Authorization: `Bearer ${i}`
|
|
3098
3142
|
}
|
|
@@ -3115,17 +3159,17 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3115
3159
|
clearTokenCookie: o,
|
|
3116
3160
|
getTokenCookie: l
|
|
3117
3161
|
};
|
|
3118
|
-
}),
|
|
3162
|
+
}), or = { class: "h-full grid place-content-center relative" }, ar = { class: "absolute top-8 left-8" }, rr = ["src"], nr = {
|
|
3119
3163
|
key: 1,
|
|
3120
3164
|
width: "59",
|
|
3121
3165
|
height: "23",
|
|
3122
3166
|
viewBox: "0 0 59 23",
|
|
3123
3167
|
fill: "none",
|
|
3124
3168
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3125
|
-
},
|
|
3169
|
+
}, lr = { class: "max-w-sm grid gap-y-1 -mt-8" }, ir = { class: "mb-7" }, cr = { class: "text-gray-600" }, ur = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, dr = {
|
|
3126
3170
|
key: 0,
|
|
3127
3171
|
class: "text-red-600 text-sm mb-2"
|
|
3128
|
-
},
|
|
3172
|
+
}, pr = { key: 0 }, fr = { key: 1 }, mr = {
|
|
3129
3173
|
__name: "SparkLoginView",
|
|
3130
3174
|
props: {
|
|
3131
3175
|
logo: {
|
|
@@ -3142,7 +3186,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3142
3186
|
}
|
|
3143
3187
|
},
|
|
3144
3188
|
setup(e) {
|
|
3145
|
-
const s =
|
|
3189
|
+
const s = Q(), t = le(), o = rt(), l = K(), n = e, a = F(!1), c = F(""), r = async (i) => {
|
|
3146
3190
|
a.value = !0, c.value = "";
|
|
3147
3191
|
try {
|
|
3148
3192
|
await l.login(i);
|
|
@@ -3162,15 +3206,15 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3162
3206
|
}
|
|
3163
3207
|
};
|
|
3164
3208
|
return (i, u) => {
|
|
3165
|
-
const d =
|
|
3166
|
-
return m(), h("div",
|
|
3167
|
-
f("div",
|
|
3209
|
+
const d = O("FormKit"), p = O("router-link");
|
|
3210
|
+
return m(), h("div", or, [
|
|
3211
|
+
f("div", ar, [
|
|
3168
3212
|
n.logo ? (m(), h("img", {
|
|
3169
3213
|
key: 0,
|
|
3170
3214
|
src: n.logo,
|
|
3171
3215
|
alt: "Logo",
|
|
3172
3216
|
class: "h-[23px] w-auto"
|
|
3173
|
-
}, null, 8,
|
|
3217
|
+
}, null, 8, rr)) : (m(), h("svg", nr, [...u[0] || (u[0] = [
|
|
3174
3218
|
f("path", {
|
|
3175
3219
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3176
3220
|
fill: "#1C64F2"
|
|
@@ -3189,10 +3233,10 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3189
3233
|
}, null, -1)
|
|
3190
3234
|
])]))
|
|
3191
3235
|
]),
|
|
3192
|
-
f("div",
|
|
3193
|
-
f("div",
|
|
3236
|
+
f("div", lr, [
|
|
3237
|
+
f("div", ir, [
|
|
3194
3238
|
u[1] || (u[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
3195
|
-
f("p",
|
|
3239
|
+
f("p", cr, " Welcome back" + L(x(o).state.app ? ` to ${x(o).state.app}` : "") + "! Please enter your details. ", 1)
|
|
3196
3240
|
]),
|
|
3197
3241
|
b(d, {
|
|
3198
3242
|
type: "form",
|
|
@@ -3218,7 +3262,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3218
3262
|
"outer-class": "max-w-full",
|
|
3219
3263
|
value: x(l).state.devCredentials.password
|
|
3220
3264
|
}, null, 8, ["value"]),
|
|
3221
|
-
f("div",
|
|
3265
|
+
f("div", ur, [
|
|
3222
3266
|
u[3] || (u[3] = f("span", null, null, -1)),
|
|
3223
3267
|
b(p, {
|
|
3224
3268
|
to: n.forgotPasswordRoute,
|
|
@@ -3230,7 +3274,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3230
3274
|
_: 1
|
|
3231
3275
|
}, 8, ["to"])
|
|
3232
3276
|
]),
|
|
3233
|
-
c.value ? (m(), h("div",
|
|
3277
|
+
c.value ? (m(), h("div", dr, L(c.value), 1)) : P("", !0),
|
|
3234
3278
|
b(x(G), {
|
|
3235
3279
|
type: "submit",
|
|
3236
3280
|
size: "xl",
|
|
@@ -3238,7 +3282,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3238
3282
|
"button-class": "w-full mb-2"
|
|
3239
3283
|
}, {
|
|
3240
3284
|
default: T(() => [
|
|
3241
|
-
a.value ? (m(), h("span",
|
|
3285
|
+
a.value ? (m(), h("span", fr, "Signing in...")) : (m(), h("span", pr, "Sign in"))
|
|
3242
3286
|
]),
|
|
3243
3287
|
_: 1
|
|
3244
3288
|
}, 8, ["disabled"])
|
|
@@ -3249,7 +3293,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3249
3293
|
]);
|
|
3250
3294
|
};
|
|
3251
3295
|
}
|
|
3252
|
-
},
|
|
3296
|
+
}, hr = {
|
|
3253
3297
|
__name: "SparkLogoutView",
|
|
3254
3298
|
props: {
|
|
3255
3299
|
defaultRedirect: {
|
|
@@ -3258,27 +3302,27 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3258
3302
|
}
|
|
3259
3303
|
},
|
|
3260
3304
|
setup(e) {
|
|
3261
|
-
const s =
|
|
3262
|
-
return
|
|
3305
|
+
const s = Q(), t = le(), o = K(), l = e;
|
|
3306
|
+
return _e(async () => {
|
|
3263
3307
|
await o.logout();
|
|
3264
3308
|
const n = t.query.redirect;
|
|
3265
3309
|
n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
|
|
3266
3310
|
}), (n, a) => null;
|
|
3267
3311
|
}
|
|
3268
|
-
},
|
|
3312
|
+
}, gr = { class: "h-full grid place-content-center relative" }, yr = { class: "absolute top-8 left-8" }, vr = ["src"], br = {
|
|
3269
3313
|
key: 1,
|
|
3270
3314
|
width: "59",
|
|
3271
3315
|
height: "23",
|
|
3272
3316
|
viewBox: "0 0 59 23",
|
|
3273
3317
|
fill: "none",
|
|
3274
3318
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3275
|
-
},
|
|
3319
|
+
}, xr = { class: "max-w-sm grid gap-y-1 -mt-8" }, kr = {
|
|
3276
3320
|
key: 0,
|
|
3277
3321
|
class: "text-red-600 text-sm mb-2"
|
|
3278
|
-
},
|
|
3322
|
+
}, wr = {
|
|
3279
3323
|
key: 1,
|
|
3280
3324
|
class: "text-green-600 text-sm mb-2"
|
|
3281
|
-
},
|
|
3325
|
+
}, _r = { key: 0 }, Sr = { key: 1 }, Cr = {
|
|
3282
3326
|
__name: "SparkForgotPasswordView",
|
|
3283
3327
|
props: {
|
|
3284
3328
|
logo: {
|
|
@@ -3291,10 +3335,10 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3291
3335
|
}
|
|
3292
3336
|
},
|
|
3293
3337
|
setup(e) {
|
|
3294
|
-
const s = K(), t = e, o =
|
|
3338
|
+
const s = K(), t = e, o = F(!1), l = F(""), n = F(""), a = async ({ email: c }) => {
|
|
3295
3339
|
o.value = !0, l.value = "", n.value = "";
|
|
3296
3340
|
try {
|
|
3297
|
-
await
|
|
3341
|
+
await ne.post(s.state.endpoints.passwordEmail, { email: c }), n.value = "Password reset link sent! Check your email.";
|
|
3298
3342
|
} catch (r) {
|
|
3299
3343
|
l.value = r.response?.data?.message || "Failed to send reset link.";
|
|
3300
3344
|
} finally {
|
|
@@ -3302,15 +3346,15 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3302
3346
|
}
|
|
3303
3347
|
};
|
|
3304
3348
|
return (c, r) => {
|
|
3305
|
-
const i =
|
|
3306
|
-
return m(), h("div",
|
|
3307
|
-
f("div",
|
|
3349
|
+
const i = O("FormKit"), u = O("router-link");
|
|
3350
|
+
return m(), h("div", gr, [
|
|
3351
|
+
f("div", yr, [
|
|
3308
3352
|
t.logo ? (m(), h("img", {
|
|
3309
3353
|
key: 0,
|
|
3310
3354
|
src: t.logo,
|
|
3311
3355
|
alt: "Logo",
|
|
3312
3356
|
class: "h-[23px] w-auto"
|
|
3313
|
-
}, null, 8,
|
|
3357
|
+
}, null, 8, vr)) : (m(), h("svg", br, [...r[0] || (r[0] = [
|
|
3314
3358
|
f("path", {
|
|
3315
3359
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3316
3360
|
fill: "#1C64F2"
|
|
@@ -3329,7 +3373,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3329
3373
|
}, null, -1)
|
|
3330
3374
|
])]))
|
|
3331
3375
|
]),
|
|
3332
|
-
f("div",
|
|
3376
|
+
f("div", xr, [
|
|
3333
3377
|
r[2] || (r[2] = f("div", { class: "mb-7" }, [
|
|
3334
3378
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
3335
3379
|
f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
@@ -3348,8 +3392,8 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3348
3392
|
validation: "required|email",
|
|
3349
3393
|
"outer-class": "max-w-full"
|
|
3350
3394
|
}),
|
|
3351
|
-
l.value ? (m(), h("div",
|
|
3352
|
-
n.value ? (m(), h("div",
|
|
3395
|
+
l.value ? (m(), h("div", kr, L(l.value), 1)) : P("", !0),
|
|
3396
|
+
n.value ? (m(), h("div", wr, L(n.value), 1)) : P("", !0),
|
|
3353
3397
|
b(x(G), {
|
|
3354
3398
|
type: "submit",
|
|
3355
3399
|
size: "xl",
|
|
@@ -3357,7 +3401,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3357
3401
|
"button-class": "w-full mb-2"
|
|
3358
3402
|
}, {
|
|
3359
3403
|
default: T(() => [
|
|
3360
|
-
o.value ? (m(), h("span",
|
|
3404
|
+
o.value ? (m(), h("span", Sr, "Sending...")) : (m(), h("span", _r, "Send reset link"))
|
|
3361
3405
|
]),
|
|
3362
3406
|
_: 1
|
|
3363
3407
|
}, 8, ["disabled"]),
|
|
@@ -3377,17 +3421,17 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3377
3421
|
]);
|
|
3378
3422
|
};
|
|
3379
3423
|
}
|
|
3380
|
-
},
|
|
3424
|
+
}, $r = { class: "h-full grid place-content-center relative" }, Tr = { class: "absolute top-8 left-8" }, Pr = ["src"], Lr = {
|
|
3381
3425
|
key: 1,
|
|
3382
3426
|
width: "59",
|
|
3383
3427
|
height: "23",
|
|
3384
3428
|
viewBox: "0 0 59 23",
|
|
3385
3429
|
fill: "none",
|
|
3386
3430
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3387
|
-
},
|
|
3431
|
+
}, Mr = { class: "max-w-sm grid gap-y-1 -mt-8" }, Hr = {
|
|
3388
3432
|
key: 0,
|
|
3389
3433
|
class: "text-red-600 text-sm mb-2"
|
|
3390
|
-
},
|
|
3434
|
+
}, Vr = { key: 0 }, Rr = { key: 1 }, Ar = {
|
|
3391
3435
|
__name: "SparkResetPasswordView",
|
|
3392
3436
|
props: {
|
|
3393
3437
|
logo: {
|
|
@@ -3400,10 +3444,10 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3400
3444
|
}
|
|
3401
3445
|
},
|
|
3402
3446
|
setup(e) {
|
|
3403
|
-
const s =
|
|
3447
|
+
const s = Q(), t = le(), o = K(), l = e, n = F(!1), a = F(""), c = async ({ password: r, password_confirmation: i }) => {
|
|
3404
3448
|
n.value = !0, a.value = "";
|
|
3405
3449
|
try {
|
|
3406
|
-
await
|
|
3450
|
+
await ne.post(o.state.endpoints.passwordReset, {
|
|
3407
3451
|
email: t.query.email,
|
|
3408
3452
|
token: t.query.token,
|
|
3409
3453
|
password: r,
|
|
@@ -3416,15 +3460,15 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3416
3460
|
}
|
|
3417
3461
|
};
|
|
3418
3462
|
return (r, i) => {
|
|
3419
|
-
const u =
|
|
3420
|
-
return m(), h("div",
|
|
3421
|
-
f("div",
|
|
3463
|
+
const u = O("FormKit");
|
|
3464
|
+
return m(), h("div", $r, [
|
|
3465
|
+
f("div", Tr, [
|
|
3422
3466
|
l.logo ? (m(), h("img", {
|
|
3423
3467
|
key: 0,
|
|
3424
3468
|
src: l.logo,
|
|
3425
3469
|
alt: "Logo",
|
|
3426
3470
|
class: "h-[23px] w-auto"
|
|
3427
|
-
}, null, 8,
|
|
3471
|
+
}, null, 8, Pr)) : (m(), h("svg", Lr, [...i[0] || (i[0] = [
|
|
3428
3472
|
f("path", {
|
|
3429
3473
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3430
3474
|
fill: "#1C64F2"
|
|
@@ -3443,7 +3487,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3443
3487
|
}, null, -1)
|
|
3444
3488
|
])]))
|
|
3445
3489
|
]),
|
|
3446
|
-
f("div",
|
|
3490
|
+
f("div", Mr, [
|
|
3447
3491
|
i[1] || (i[1] = f("div", { class: "mb-7" }, [
|
|
3448
3492
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
3449
3493
|
f("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
@@ -3470,7 +3514,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3470
3514
|
validation: "required|confirm:password",
|
|
3471
3515
|
"outer-class": "max-w-full"
|
|
3472
3516
|
}),
|
|
3473
|
-
a.value ? (m(), h("div",
|
|
3517
|
+
a.value ? (m(), h("div", Hr, L(a.value), 1)) : P("", !0),
|
|
3474
3518
|
b(x(G), {
|
|
3475
3519
|
type: "submit",
|
|
3476
3520
|
size: "xl",
|
|
@@ -3478,7 +3522,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3478
3522
|
"button-class": "w-full mb-2"
|
|
3479
3523
|
}, {
|
|
3480
3524
|
default: T(() => [
|
|
3481
|
-
n.value ? (m(), h("span",
|
|
3525
|
+
n.value ? (m(), h("span", Rr, "Resetting...")) : (m(), h("span", Vr, "Reset password"))
|
|
3482
3526
|
]),
|
|
3483
3527
|
_: 1
|
|
3484
3528
|
}, 8, ["disabled"])
|
|
@@ -3489,14 +3533,14 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3489
3533
|
]);
|
|
3490
3534
|
};
|
|
3491
3535
|
}
|
|
3492
|
-
},
|
|
3536
|
+
}, Er = { class: "h-full grid place-content-center relative" }, Fr = { class: "absolute top-8 left-8" }, Or = ["src"], Br = {
|
|
3493
3537
|
key: 1,
|
|
3494
3538
|
width: "59",
|
|
3495
3539
|
height: "23",
|
|
3496
3540
|
viewBox: "0 0 59 23",
|
|
3497
3541
|
fill: "none",
|
|
3498
3542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3499
|
-
},
|
|
3543
|
+
}, Dr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, zr = { class: "flex gap-4 justify-center" }, jr = {
|
|
3500
3544
|
__name: "SparkError403View",
|
|
3501
3545
|
props: {
|
|
3502
3546
|
logo: {
|
|
@@ -3509,17 +3553,17 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3509
3553
|
}
|
|
3510
3554
|
},
|
|
3511
3555
|
setup(e) {
|
|
3512
|
-
const s =
|
|
3556
|
+
const s = Q(), t = e, o = () => {
|
|
3513
3557
|
s.push(t.homeRoute);
|
|
3514
3558
|
};
|
|
3515
|
-
return (l, n) => (m(), h("div",
|
|
3516
|
-
f("div",
|
|
3559
|
+
return (l, n) => (m(), h("div", Er, [
|
|
3560
|
+
f("div", Fr, [
|
|
3517
3561
|
t.logo ? (m(), h("img", {
|
|
3518
3562
|
key: 0,
|
|
3519
3563
|
src: t.logo,
|
|
3520
3564
|
alt: "Logo",
|
|
3521
3565
|
class: "h-[23px] w-auto"
|
|
3522
|
-
}, null, 8,
|
|
3566
|
+
}, null, 8, Or)) : (m(), h("svg", Br, [...n[0] || (n[0] = [
|
|
3523
3567
|
f("path", {
|
|
3524
3568
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3525
3569
|
fill: "#1C64F2"
|
|
@@ -3538,7 +3582,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3538
3582
|
}, null, -1)
|
|
3539
3583
|
])]))
|
|
3540
3584
|
]),
|
|
3541
|
-
f("div",
|
|
3585
|
+
f("div", Dr, [
|
|
3542
3586
|
n[2] || (n[2] = f("div", null, [
|
|
3543
3587
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
3544
3588
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
@@ -3548,7 +3592,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3548
3592
|
E(" If you believe this is an error, please contact your administrator. ")
|
|
3549
3593
|
])
|
|
3550
3594
|
], -1)),
|
|
3551
|
-
f("div",
|
|
3595
|
+
f("div", zr, [
|
|
3552
3596
|
b(x(G), {
|
|
3553
3597
|
onClick: o,
|
|
3554
3598
|
size: "lg"
|
|
@@ -3562,14 +3606,14 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3562
3606
|
])
|
|
3563
3607
|
]));
|
|
3564
3608
|
}
|
|
3565
|
-
},
|
|
3609
|
+
}, Ir = { class: "h-full grid place-content-center relative" }, Nr = { class: "absolute top-8 left-8" }, Zr = ["src"], qr = {
|
|
3566
3610
|
key: 1,
|
|
3567
3611
|
width: "59",
|
|
3568
3612
|
height: "23",
|
|
3569
3613
|
viewBox: "0 0 59 23",
|
|
3570
3614
|
fill: "none",
|
|
3571
3615
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3572
|
-
},
|
|
3616
|
+
}, Ur = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Kr = { class: "flex gap-4 justify-center" }, Gr = {
|
|
3573
3617
|
__name: "SparkError404View",
|
|
3574
3618
|
props: {
|
|
3575
3619
|
logo: {
|
|
@@ -3582,17 +3626,17 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3582
3626
|
}
|
|
3583
3627
|
},
|
|
3584
3628
|
setup(e) {
|
|
3585
|
-
const s =
|
|
3629
|
+
const s = Q(), t = e, o = () => {
|
|
3586
3630
|
s.push(t.homeRoute);
|
|
3587
3631
|
};
|
|
3588
|
-
return (l, n) => (m(), h("div",
|
|
3589
|
-
f("div",
|
|
3632
|
+
return (l, n) => (m(), h("div", Ir, [
|
|
3633
|
+
f("div", Nr, [
|
|
3590
3634
|
t.logo ? (m(), h("img", {
|
|
3591
3635
|
key: 0,
|
|
3592
3636
|
src: t.logo,
|
|
3593
3637
|
alt: "Logo",
|
|
3594
3638
|
class: "h-[23px] w-auto"
|
|
3595
|
-
}, null, 8,
|
|
3639
|
+
}, null, 8, Zr)) : (m(), h("svg", qr, [...n[0] || (n[0] = [
|
|
3596
3640
|
f("path", {
|
|
3597
3641
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3598
3642
|
fill: "#1C64F2"
|
|
@@ -3611,13 +3655,13 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3611
3655
|
}, null, -1)
|
|
3612
3656
|
])]))
|
|
3613
3657
|
]),
|
|
3614
|
-
f("div",
|
|
3658
|
+
f("div", Ur, [
|
|
3615
3659
|
n[2] || (n[2] = f("div", null, [
|
|
3616
3660
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
3617
3661
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
3618
3662
|
f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
3619
3663
|
], -1)),
|
|
3620
|
-
f("div",
|
|
3664
|
+
f("div", Kr, [
|
|
3621
3665
|
b(x(G), {
|
|
3622
3666
|
onClick: o,
|
|
3623
3667
|
size: "lg"
|
|
@@ -3631,14 +3675,14 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3631
3675
|
])
|
|
3632
3676
|
]));
|
|
3633
3677
|
}
|
|
3634
|
-
},
|
|
3678
|
+
}, Wr = { class: "h-full grid place-content-center relative" }, Yr = { class: "absolute top-8 left-8" }, Xr = ["src"], Jr = {
|
|
3635
3679
|
key: 1,
|
|
3636
3680
|
width: "59",
|
|
3637
3681
|
height: "23",
|
|
3638
3682
|
viewBox: "0 0 59 23",
|
|
3639
3683
|
fill: "none",
|
|
3640
3684
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3641
|
-
},
|
|
3685
|
+
}, Qr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, en = { class: "text-primary-600 text-7xl font-bold mb-4" }, tn = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, sn = { class: "text-gray-600" }, on = { class: "flex gap-4 justify-center" }, On = {
|
|
3642
3686
|
__name: "SparkErrorGeneralView",
|
|
3643
3687
|
props: {
|
|
3644
3688
|
logo: {
|
|
@@ -3663,17 +3707,17 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3663
3707
|
}
|
|
3664
3708
|
},
|
|
3665
3709
|
setup(e) {
|
|
3666
|
-
const s =
|
|
3710
|
+
const s = Q(), t = e, o = () => {
|
|
3667
3711
|
s.push(t.homeRoute);
|
|
3668
3712
|
};
|
|
3669
|
-
return (l, n) => (m(), h("div",
|
|
3670
|
-
f("div",
|
|
3713
|
+
return (l, n) => (m(), h("div", Wr, [
|
|
3714
|
+
f("div", Yr, [
|
|
3671
3715
|
t.logo ? (m(), h("img", {
|
|
3672
3716
|
key: 0,
|
|
3673
3717
|
src: t.logo,
|
|
3674
3718
|
alt: "Logo",
|
|
3675
3719
|
class: "h-[23px] w-auto"
|
|
3676
|
-
}, null, 8,
|
|
3720
|
+
}, null, 8, Xr)) : (m(), h("svg", Jr, [...n[0] || (n[0] = [
|
|
3677
3721
|
f("path", {
|
|
3678
3722
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3679
3723
|
fill: "#1C64F2"
|
|
@@ -3692,13 +3736,13 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3692
3736
|
}, null, -1)
|
|
3693
3737
|
])]))
|
|
3694
3738
|
]),
|
|
3695
|
-
f("div",
|
|
3739
|
+
f("div", Qr, [
|
|
3696
3740
|
f("div", null, [
|
|
3697
|
-
f("div",
|
|
3698
|
-
f("h1",
|
|
3699
|
-
f("p",
|
|
3741
|
+
f("div", en, L(t.errorCode || "Error"), 1),
|
|
3742
|
+
f("h1", tn, L(t.title || "Something went wrong"), 1),
|
|
3743
|
+
f("p", sn, L(t.message || "An unexpected error occurred. Please try again later."), 1)
|
|
3700
3744
|
]),
|
|
3701
|
-
f("div",
|
|
3745
|
+
f("div", on, [
|
|
3702
3746
|
b(x(G), {
|
|
3703
3747
|
onClick: o,
|
|
3704
3748
|
size: "lg"
|
|
@@ -3713,7 +3757,7 @@ const ve = "bolt-next-token", K = ue("auth", () => {
|
|
|
3713
3757
|
]));
|
|
3714
3758
|
}
|
|
3715
3759
|
};
|
|
3716
|
-
function
|
|
3760
|
+
function Bn(e = {}) {
|
|
3717
3761
|
const {
|
|
3718
3762
|
loginPath: s = "/login",
|
|
3719
3763
|
logoutPath: t = "/logout",
|
|
@@ -3726,41 +3770,41 @@ function kn(e = {}) {
|
|
|
3726
3770
|
{
|
|
3727
3771
|
path: s,
|
|
3728
3772
|
name: "login",
|
|
3729
|
-
component:
|
|
3773
|
+
component: mr,
|
|
3730
3774
|
props: { logo: n, defaultRedirect: a },
|
|
3731
3775
|
meta: { auth: !1 }
|
|
3732
3776
|
},
|
|
3733
3777
|
{
|
|
3734
3778
|
path: t,
|
|
3735
3779
|
name: "logout",
|
|
3736
|
-
component:
|
|
3780
|
+
component: hr,
|
|
3737
3781
|
props: { defaultRedirect: s },
|
|
3738
3782
|
meta: { auth: !1 }
|
|
3739
3783
|
},
|
|
3740
3784
|
{
|
|
3741
3785
|
path: o,
|
|
3742
3786
|
name: "forgot-password",
|
|
3743
|
-
component:
|
|
3787
|
+
component: Cr,
|
|
3744
3788
|
props: { logo: n, loginRoute: s },
|
|
3745
3789
|
meta: { auth: !1 }
|
|
3746
3790
|
},
|
|
3747
3791
|
{
|
|
3748
3792
|
path: l,
|
|
3749
3793
|
name: "password-reset",
|
|
3750
|
-
component:
|
|
3794
|
+
component: Ar,
|
|
3751
3795
|
props: { logo: n, loginRoute: s },
|
|
3752
3796
|
meta: { auth: !1 }
|
|
3753
3797
|
}
|
|
3754
3798
|
];
|
|
3755
3799
|
}
|
|
3756
|
-
function
|
|
3800
|
+
function Dn(e, s = {}) {
|
|
3757
3801
|
const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
|
|
3758
3802
|
e.beforeEach(async (o, l, n) => {
|
|
3759
3803
|
const a = K();
|
|
3760
|
-
a.state.ready || await a.fetchUser(),
|
|
3804
|
+
a.state.ready || await a.fetchUser(), an(o, n, a, t);
|
|
3761
3805
|
});
|
|
3762
3806
|
}
|
|
3763
|
-
function
|
|
3807
|
+
function an(e, s, t, o) {
|
|
3764
3808
|
const l = e.meta.auth !== !1, n = t.check;
|
|
3765
3809
|
if (t.state.overrideToken && e.path === "/logout") {
|
|
3766
3810
|
s({ path: o });
|
|
@@ -3798,7 +3842,7 @@ function qr(e, s, t, o) {
|
|
|
3798
3842
|
s();
|
|
3799
3843
|
}
|
|
3800
3844
|
}
|
|
3801
|
-
function
|
|
3845
|
+
function zn(e = {}) {
|
|
3802
3846
|
const {
|
|
3803
3847
|
forbiddenPath: s = "/error/403",
|
|
3804
3848
|
logo: t = "",
|
|
@@ -3807,12 +3851,12 @@ function _n(e = {}) {
|
|
|
3807
3851
|
return {
|
|
3808
3852
|
path: s,
|
|
3809
3853
|
name: "error-403",
|
|
3810
|
-
component:
|
|
3854
|
+
component: jr,
|
|
3811
3855
|
props: { logo: t, homeRoute: o },
|
|
3812
3856
|
meta: { auth: !1 }
|
|
3813
3857
|
};
|
|
3814
3858
|
}
|
|
3815
|
-
function
|
|
3859
|
+
function jn(e = {}) {
|
|
3816
3860
|
const {
|
|
3817
3861
|
logo: s = "",
|
|
3818
3862
|
homeRoute: t = "/dashboard"
|
|
@@ -3820,12 +3864,12 @@ function Sn(e = {}) {
|
|
|
3820
3864
|
return {
|
|
3821
3865
|
path: "/:pathMatch(.*)*",
|
|
3822
3866
|
name: "error-404",
|
|
3823
|
-
component:
|
|
3867
|
+
component: Gr,
|
|
3824
3868
|
props: { logo: s, homeRoute: t },
|
|
3825
3869
|
meta: { auth: !1 }
|
|
3826
3870
|
};
|
|
3827
3871
|
}
|
|
3828
|
-
function
|
|
3872
|
+
function In(e, s) {
|
|
3829
3873
|
e.beforeResolve(async (t) => {
|
|
3830
3874
|
if (t.meta.auth !== !1) {
|
|
3831
3875
|
const o = K();
|
|
@@ -3833,8 +3877,8 @@ function Cn(e, s) {
|
|
|
3833
3877
|
}
|
|
3834
3878
|
});
|
|
3835
3879
|
}
|
|
3836
|
-
function
|
|
3837
|
-
const s =
|
|
3880
|
+
function rn(e = {}) {
|
|
3881
|
+
const s = ne.create({
|
|
3838
3882
|
baseURL: e.baseURL || "",
|
|
3839
3883
|
timeout: e.timeout || 3e4,
|
|
3840
3884
|
headers: {
|
|
@@ -3873,21 +3917,21 @@ function Ur(e = {}) {
|
|
|
3873
3917
|
}
|
|
3874
3918
|
), s;
|
|
3875
3919
|
}
|
|
3876
|
-
let
|
|
3877
|
-
function
|
|
3878
|
-
return
|
|
3920
|
+
let re = null;
|
|
3921
|
+
function Nn(e, s = {}) {
|
|
3922
|
+
return re = rn(s), e.provide("axios", re), e.config.globalProperties.$axios = re, re;
|
|
3879
3923
|
}
|
|
3880
|
-
function
|
|
3881
|
-
if (!
|
|
3924
|
+
function Zn() {
|
|
3925
|
+
if (!re)
|
|
3882
3926
|
throw new Error("Axios instance not initialized. Call setupAxios() first.");
|
|
3883
|
-
return
|
|
3927
|
+
return re;
|
|
3884
3928
|
}
|
|
3885
|
-
const
|
|
3929
|
+
const qn = ue("sparkNav", () => {
|
|
3886
3930
|
const e = q({
|
|
3887
3931
|
menu: [],
|
|
3888
3932
|
collapsed: !1,
|
|
3889
3933
|
hidden: !1
|
|
3890
|
-
}), s =
|
|
3934
|
+
}), s = Q(), t = le(), o = (i = []) => {
|
|
3891
3935
|
e.menu = i, r();
|
|
3892
3936
|
}, l = (i, u) => {
|
|
3893
3937
|
for (const d of i) {
|
|
@@ -3938,64 +3982,67 @@ const Ln = ue("sparkNav", () => {
|
|
|
3938
3982
|
};
|
|
3939
3983
|
});
|
|
3940
3984
|
export {
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3985
|
+
A as Icons,
|
|
3986
|
+
oe as SparkAlert,
|
|
3987
|
+
As as SparkAppSelector,
|
|
3988
|
+
oo as SparkBrandSelector,
|
|
3945
3989
|
G as SparkButton,
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
$
|
|
3980
|
-
Tn as
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3990
|
+
ro as SparkButtonGroup,
|
|
3991
|
+
Vn as SparkCard,
|
|
3992
|
+
An as SparkDefaultContainer,
|
|
3993
|
+
jr as SparkError403View,
|
|
3994
|
+
Gr as SparkError404View,
|
|
3995
|
+
On as SparkErrorGeneralView,
|
|
3996
|
+
Cr as SparkForgotPasswordView,
|
|
3997
|
+
mr as SparkLoginView,
|
|
3998
|
+
hr as SparkLogoutView,
|
|
3999
|
+
go as SparkModalContainer,
|
|
4000
|
+
po as SparkModalDialog,
|
|
4001
|
+
Mn as SparkNotificationOutlet,
|
|
4002
|
+
Te as SparkOverlay,
|
|
4003
|
+
En as SparkPublicContainer,
|
|
4004
|
+
Ar as SparkResetPasswordView,
|
|
4005
|
+
Rn as SparkTable,
|
|
4006
|
+
ba as SparkTableDatePicker,
|
|
4007
|
+
ga as SparkTableFilterButtons,
|
|
4008
|
+
pa as SparkTableFilterSelect,
|
|
4009
|
+
oa as SparkTablePaginationPaging,
|
|
4010
|
+
na as SparkTablePaginationPerPage,
|
|
4011
|
+
_a as SparkTableReset,
|
|
4012
|
+
ca as SparkTableSearch,
|
|
4013
|
+
Ve as SparkTableToolbar,
|
|
4014
|
+
Hn as SparkToastContainer,
|
|
4015
|
+
Pn as addIcons,
|
|
4016
|
+
zn as create403Route,
|
|
4017
|
+
jn as create404Route,
|
|
4018
|
+
Bn as createAuthRoutes,
|
|
4019
|
+
rn as createAxiosInstance,
|
|
4020
|
+
Fn as createBootstrapService,
|
|
4021
|
+
wo as customiseHeader,
|
|
4022
|
+
er as deleteCookie,
|
|
4023
|
+
$n as formKitGenesisOverride,
|
|
4024
|
+
Tn as formKitIconLoader,
|
|
4025
|
+
Cn as formKitIcons,
|
|
4026
|
+
Do as formatTemporal,
|
|
4027
|
+
Zn as getAxiosInstance,
|
|
4028
|
+
Ja as getCookie,
|
|
4029
|
+
it as getDomain,
|
|
4030
|
+
zo as parseDatetime,
|
|
4031
|
+
vo as renderHeaderTitle,
|
|
4032
|
+
Qa as setCookie,
|
|
4033
|
+
Dn as setupAuthGuards,
|
|
4034
|
+
Nn as setupAxios,
|
|
4035
|
+
In as setupBootstrapGuard,
|
|
4036
|
+
Ln as setupFontAwesome,
|
|
4037
|
+
ae as sparkModalService,
|
|
3991
4038
|
X as sparkNotificationService,
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
4039
|
+
se as sparkOverlayService,
|
|
4040
|
+
Zo as updateRow,
|
|
4041
|
+
at as useSparkAppSelectorStore,
|
|
4042
|
+
rt as useSparkAppStore,
|
|
3996
4043
|
K as useSparkAuthStore,
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4044
|
+
lt as useSparkBrandFilterStore,
|
|
4045
|
+
qn as useSparkNavStore,
|
|
4046
|
+
Ae as useSparkOverlay,
|
|
4047
|
+
qo as useSparkTableRouteSync
|
|
4001
4048
|
};
|