@wishbone-media/spark 0.23.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +916 -894
- package/package.json +1 -1
- package/src/assets/css/spark-table.css +8 -0
- package/src/components/SparkTable.vue +16 -2
- package/src/plugins/fontawesome.js +2 -0
package/dist/index.js
CHANGED
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { library as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faCloudDownload as
|
|
1
|
+
import { computed as C, resolveComponent as A, createElementBlock as h, openBlock as m, normalizeClass as H, createElementVNode as f, createCommentVNode as L, createVNode as b, unref as x, renderSlot as O, reactive as q, Fragment as R, renderList as D, toDisplayString as P, createBlock as V, resolveDynamicComponent as N, markRaw as me, ref as B, watch as I, Transition as Ue, withCtx as T, normalizeProps as Ke, mergeProps as Z, createTextVNode as E, Teleport as Ge, TransitionGroup as le, inject as Ve, provide as We, toHandlers as Re, onMounted as xe, withModifiers as Q, useSlots as Ee, onUnmounted as Ye, withDirectives as Xe, vShow as Je, h as ke } from "vue";
|
|
2
|
+
import { library as Be, icon as ce } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import { FontAwesomeIcon as Qe } from "@fortawesome/vue-fontawesome";
|
|
4
|
+
import { faInbox as et, faCloudDownload as tt, faBolt as st, faUndo as ot, faEye as at, faSignOut as rt, faXmark as nt, faTrash as lt, faTimes as it, faStreetView as ct, faSortUp as ut, faSortDown as dt, faSort as pt, faScaleBalanced as ft, faSatelliteDish as mt, faLayerPlus as ht, faLaptopMobile as gt, faInfoCircle as yt, faGripDotsVertical as vt, faGearComplex as bt, faFlag as xt, faFaceSmileWink as kt, faFaceSmileRelaxed as wt, faExclamationTriangle as _t, faEllipsisVertical as St, faEllipsis as Ct, faEdit as $t, faComments as Tt, faCircleXmark as Lt, faCircleUser as Pt, faChevronUp as Mt, faChevronRight as Ht, faChevronLeft as Vt, faChevronDown as Rt, faCheckCircle as Et, faCheck as Bt, faBullhorn as At, faBellRing as Ft, faBarsSort as Ot, faArrowRightToLine as zt, faArrowLeftToLine as Dt } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { defineStore as ue } from "pinia";
|
|
6
|
-
import { TransitionRoot as Ae, Dialog as Fe, TransitionChild as
|
|
7
|
-
import
|
|
8
|
-
import { range as
|
|
9
|
-
import { HotTable as
|
|
6
|
+
import { TransitionRoot as Ae, Dialog as Fe, TransitionChild as fe, DialogPanel as Oe } from "@headlessui/vue";
|
|
7
|
+
import he from "nprogress";
|
|
8
|
+
import { range as jt, get as Y, find as It, has as Nt } from "lodash";
|
|
9
|
+
import { HotTable as Zt } from "@handsontable/vue3";
|
|
10
10
|
import "handsontable/styles/handsontable.css";
|
|
11
11
|
import "handsontable/styles/ht-theme-classic.css";
|
|
12
|
-
import { registerPlugin as
|
|
13
|
-
import { registerAllCellTypes as
|
|
12
|
+
import { registerPlugin as pe, AutoColumnSize as qt, CopyPaste as Ut, StretchColumns as Kt, NestedHeaders as Gt } from "handsontable/plugins";
|
|
13
|
+
import { registerAllCellTypes as Wt } from "handsontable/cellTypes";
|
|
14
14
|
import { useDebounceFn as ze, watchDebounced as we } from "@vueuse/core";
|
|
15
|
-
import { registerRenderer as
|
|
15
|
+
import { registerRenderer as Yt, baseRenderer as Xt } from "handsontable/renderers";
|
|
16
16
|
import { useRouter as J, useRoute as ne } from "vue-router";
|
|
17
17
|
import re from "axios";
|
|
18
|
-
var
|
|
18
|
+
var Jt = {
|
|
19
19
|
prefix: "fad",
|
|
20
20
|
iconName: "sort-up",
|
|
21
21
|
icon: [384, 512, ["sort-asc"], "f0de", ["", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
|
|
22
|
-
},
|
|
22
|
+
}, Qt = {
|
|
23
23
|
prefix: "fad",
|
|
24
24
|
iconName: "sort",
|
|
25
25
|
icon: [384, 512, ["unsorted"], "f0dc", ["M2.4 307.8c-5 12-2.2 25.7 6.9 34.9l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288c-12.9 0-24.6 7.8-29.6 19.8z", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
|
|
26
|
-
},
|
|
26
|
+
}, es = {
|
|
27
27
|
prefix: "fad",
|
|
28
28
|
iconName: "sort-down",
|
|
29
29
|
icon: [384, 512, ["sort-desc"], "f0dd", ["", "M32 288c-12.9 0-24.6 7.8-29.6 19.8S.2 333.5 9.4 342.6l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288z"]]
|
|
30
30
|
};
|
|
31
31
|
const F = {
|
|
32
|
-
farArrowLeftToLine:
|
|
33
|
-
farArrowRightToLine:
|
|
34
|
-
farBarsSort:
|
|
35
|
-
farBellRing:
|
|
36
|
-
farBullhorn:
|
|
37
|
-
farCheck:
|
|
38
|
-
farCheckCircle:
|
|
39
|
-
farChevronDown:
|
|
40
|
-
farChevronLeft:
|
|
41
|
-
farChevronRight:
|
|
42
|
-
farChevronUp:
|
|
43
|
-
farCircleUser:
|
|
44
|
-
farCircleXmark:
|
|
45
|
-
farComments:
|
|
46
|
-
farEdit:
|
|
47
|
-
farEllipsis:
|
|
48
|
-
farEllipsisVertical:
|
|
49
|
-
farExclamationTriangle:
|
|
50
|
-
farFaceSmileRelaxed:
|
|
51
|
-
farFaceSmileWink:
|
|
52
|
-
farFlag:
|
|
53
|
-
farGearComplex:
|
|
54
|
-
farGripDotsVertical:
|
|
55
|
-
farInfoCircle:
|
|
56
|
-
farLaptopMobile:
|
|
57
|
-
farLayerPlus:
|
|
58
|
-
farSatelliteDish:
|
|
59
|
-
farScaleBalanced:
|
|
60
|
-
farSort:
|
|
61
|
-
farSortDown:
|
|
62
|
-
farSortUp:
|
|
63
|
-
farStreetView:
|
|
64
|
-
farTimes:
|
|
65
|
-
farTrash:
|
|
66
|
-
farXmark:
|
|
67
|
-
farSignOut:
|
|
68
|
-
farEye:
|
|
69
|
-
farUndo:
|
|
70
|
-
farBolt:
|
|
71
|
-
farCloudDownload:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
32
|
+
farArrowLeftToLine: Dt,
|
|
33
|
+
farArrowRightToLine: zt,
|
|
34
|
+
farBarsSort: Ot,
|
|
35
|
+
farBellRing: Ft,
|
|
36
|
+
farBullhorn: At,
|
|
37
|
+
farCheck: Bt,
|
|
38
|
+
farCheckCircle: Et,
|
|
39
|
+
farChevronDown: Rt,
|
|
40
|
+
farChevronLeft: Vt,
|
|
41
|
+
farChevronRight: Ht,
|
|
42
|
+
farChevronUp: Mt,
|
|
43
|
+
farCircleUser: Pt,
|
|
44
|
+
farCircleXmark: Lt,
|
|
45
|
+
farComments: Tt,
|
|
46
|
+
farEdit: $t,
|
|
47
|
+
farEllipsis: Ct,
|
|
48
|
+
farEllipsisVertical: St,
|
|
49
|
+
farExclamationTriangle: _t,
|
|
50
|
+
farFaceSmileRelaxed: wt,
|
|
51
|
+
farFaceSmileWink: kt,
|
|
52
|
+
farFlag: xt,
|
|
53
|
+
farGearComplex: bt,
|
|
54
|
+
farGripDotsVertical: vt,
|
|
55
|
+
farInfoCircle: yt,
|
|
56
|
+
farLaptopMobile: gt,
|
|
57
|
+
farLayerPlus: ht,
|
|
58
|
+
farSatelliteDish: mt,
|
|
59
|
+
farScaleBalanced: ft,
|
|
60
|
+
farSort: pt,
|
|
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,
|
|
74
|
+
fadSortDown: es,
|
|
75
|
+
fadSortUp: Jt
|
|
75
76
|
};
|
|
76
|
-
function
|
|
77
|
-
Object.assign(F, e),
|
|
77
|
+
function dn(e) {
|
|
78
|
+
Object.assign(F, e), Be.add(...Object.values(e));
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
80
|
+
function pn(e) {
|
|
81
|
+
Be.add(...Object.values(F)), e.component("FontAwesomeIcon", Qe);
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const ts = { class: "flex items-center" }, ss = { class: "shrink-0 self-start" }, os = { class: "ml-3" }, as = {
|
|
83
84
|
key: 0,
|
|
84
85
|
class: "ml-auto pl-3 pt-1 self-start"
|
|
85
|
-
},
|
|
86
|
+
}, rs = { class: "-mx-1.5 -my-1.5" }, se = {
|
|
86
87
|
__name: "SparkAlert",
|
|
87
88
|
props: {
|
|
88
89
|
type: {
|
|
@@ -97,22 +98,22 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
97
98
|
},
|
|
98
99
|
emits: ["close"],
|
|
99
100
|
setup(e) {
|
|
100
|
-
const s = e, t =
|
|
101
|
+
const s = e, t = C(() => ({
|
|
101
102
|
success: "bg-green-50 border-green-200 text-green-700",
|
|
102
103
|
warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
|
|
103
104
|
danger: "bg-red-50 border-red-200 text-red-700",
|
|
104
105
|
info: "bg-blue-50 border-blue-200 text-blue-700"
|
|
105
|
-
})[s.type]), o =
|
|
106
|
+
})[s.type]), o = C(() => ({
|
|
106
107
|
success: "text-green-400",
|
|
107
108
|
warning: "text-yellow-400",
|
|
108
109
|
danger: "text-red-400",
|
|
109
110
|
info: "text-blue-400"
|
|
110
|
-
})[s.type]), l =
|
|
111
|
+
})[s.type]), l = C(() => ({
|
|
111
112
|
success: "farCheckCircle",
|
|
112
113
|
warning: "farExclamationTriangle",
|
|
113
114
|
danger: "farCircleXmark",
|
|
114
115
|
info: "farInfoCircle"
|
|
115
|
-
})[s.type]), n =
|
|
116
|
+
})[s.type]), n = C(() => ({
|
|
116
117
|
success: "text-green-400 hover:bg-green-100",
|
|
117
118
|
warning: "text-yellow-400 hover:bg-yellow-100",
|
|
118
119
|
danger: "text-red-400 hover:bg-red-100",
|
|
@@ -120,37 +121,37 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
120
121
|
})[s.type]);
|
|
121
122
|
return (a, c) => {
|
|
122
123
|
const r = A("font-awesome-icon");
|
|
123
|
-
return m(),
|
|
124
|
+
return m(), h("div", {
|
|
124
125
|
class: H(["rounded-md border p-4", t.value])
|
|
125
126
|
}, [
|
|
126
|
-
f("div",
|
|
127
|
-
f("div",
|
|
127
|
+
f("div", ts, [
|
|
128
|
+
f("div", ss, [
|
|
128
129
|
b(r, {
|
|
129
|
-
icon:
|
|
130
|
+
icon: x(F)[l.value],
|
|
130
131
|
class: H(o.value)
|
|
131
132
|
}, null, 8, ["icon", "class"])
|
|
132
133
|
]),
|
|
133
|
-
f("div",
|
|
134
|
+
f("div", os, [
|
|
134
135
|
O(a.$slots, "default")
|
|
135
136
|
]),
|
|
136
|
-
e.closeable ? (m(),
|
|
137
|
-
f("div",
|
|
137
|
+
e.closeable ? (m(), h("div", as, [
|
|
138
|
+
f("div", rs, [
|
|
138
139
|
f("button", {
|
|
139
140
|
type: "button",
|
|
140
141
|
class: H(["inline-flex rounded-md px-2 py-1.5", n.value]),
|
|
141
142
|
onClick: c[0] || (c[0] = (i) => a.$emit("close"))
|
|
142
143
|
}, [
|
|
143
144
|
b(r, {
|
|
144
|
-
icon:
|
|
145
|
+
icon: x(F).farXmark
|
|
145
146
|
}, null, 8, ["icon"])
|
|
146
147
|
], 2)
|
|
147
148
|
])
|
|
148
|
-
])) :
|
|
149
|
+
])) : L("", !0)
|
|
149
150
|
])
|
|
150
151
|
], 2);
|
|
151
152
|
};
|
|
152
153
|
}
|
|
153
|
-
},
|
|
154
|
+
}, ge = [
|
|
154
155
|
{
|
|
155
156
|
name: "Bolt",
|
|
156
157
|
description: "Job management",
|
|
@@ -201,7 +202,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
201
202
|
}
|
|
202
203
|
], De = ue("sparkAppSelector", () => {
|
|
203
204
|
const e = q({
|
|
204
|
-
apps: [...
|
|
205
|
+
apps: [...ge]
|
|
205
206
|
}), s = (n = {}) => {
|
|
206
207
|
if (n.apps && Array.isArray(n.apps)) {
|
|
207
208
|
const a = n.apps.filter((c) => {
|
|
@@ -220,7 +221,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
220
221
|
const a = /* @__PURE__ */ new Map();
|
|
221
222
|
Object.keys(n.appHrefs).forEach((c) => {
|
|
222
223
|
a.set(c.toLowerCase(), n.appHrefs[c]);
|
|
223
|
-
}), e.apps =
|
|
224
|
+
}), e.apps = ge.map((c) => {
|
|
224
225
|
const r = a.get(c.name.toLowerCase());
|
|
225
226
|
return {
|
|
226
227
|
...c,
|
|
@@ -229,8 +230,8 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
229
230
|
});
|
|
230
231
|
return;
|
|
231
232
|
}
|
|
232
|
-
e.apps = [...
|
|
233
|
-
}, t =
|
|
233
|
+
e.apps = [...ge];
|
|
234
|
+
}, t = C(() => e.apps), o = (n) => {
|
|
234
235
|
if (!n) return null;
|
|
235
236
|
const a = n.toLowerCase();
|
|
236
237
|
return e.apps.find((c) => c.name.toLowerCase() === a) || null;
|
|
@@ -258,16 +259,16 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
258
259
|
e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
|
|
259
260
|
}
|
|
260
261
|
};
|
|
261
|
-
}),
|
|
262
|
+
}), ns = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ls = { class: "flex flex-1 flex-col" }, is = { class: "divide-y divide-gray-200" }, cs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, us = { class: "ml-auto flex items-center" }, ds = ["href", "onClick"], ps = { class: "gap-y-1" }, fs = { class: "text-base text-gray-800 flex items-center" }, ms = { class: "font-medium" }, hs = {
|
|
262
263
|
key: 0,
|
|
263
264
|
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"
|
|
264
|
-
},
|
|
265
|
+
}, gs = { class: "text-sm text-gray-500" }, ys = { class: "ml-auto flex items-center" }, vs = { class: "mt-auto" }, bs = {
|
|
265
266
|
key: 0,
|
|
266
267
|
class: "p-6"
|
|
267
|
-
},
|
|
268
|
+
}, xs = {
|
|
268
269
|
key: 1,
|
|
269
270
|
class: "bg-gray-50 p-6"
|
|
270
|
-
},
|
|
271
|
+
}, ks = {
|
|
271
272
|
__name: "SparkAppSelector",
|
|
272
273
|
props: {
|
|
273
274
|
bottomSlot: {
|
|
@@ -281,7 +282,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
281
282
|
},
|
|
282
283
|
emits: ["close", "select"],
|
|
283
284
|
setup(e, { emit: s }) {
|
|
284
|
-
const t = s, o = De(), l = je(), n =
|
|
285
|
+
const t = s, o = De(), l = je(), n = C(() => {
|
|
285
286
|
const c = l.state.app;
|
|
286
287
|
return o.state.apps.map((r) => ({
|
|
287
288
|
...r,
|
|
@@ -292,66 +293,66 @@ const Jt = { class: "flex items-center" }, Qt = { class: "shrink-0 self-start" }
|
|
|
292
293
|
};
|
|
293
294
|
return (c, r) => {
|
|
294
295
|
const i = A("font-awesome-icon");
|
|
295
|
-
return m(),
|
|
296
|
-
f("div",
|
|
297
|
-
f("div",
|
|
298
|
-
f("div",
|
|
296
|
+
return m(), h("div", ns, [
|
|
297
|
+
f("div", ls, [
|
|
298
|
+
f("div", is, [
|
|
299
|
+
f("div", cs, [
|
|
299
300
|
r[1] || (r[1] = f("div", null, "Mr Group Network", -1)),
|
|
300
|
-
f("div",
|
|
301
|
+
f("div", us, [
|
|
301
302
|
b(i, {
|
|
302
|
-
icon:
|
|
303
|
+
icon: x(F).farTimes,
|
|
303
304
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
304
305
|
onClick: r[0] || (r[0] = (u) => t("close"))
|
|
305
306
|
}, null, 8, ["icon"])
|
|
306
307
|
])
|
|
307
308
|
]),
|
|
308
|
-
(m(!0),
|
|
309
|
+
(m(!0), h(R, null, D(n.value, (u) => (m(), h("a", {
|
|
309
310
|
key: u.name,
|
|
310
311
|
href: u.href,
|
|
311
312
|
target: "_blank",
|
|
312
313
|
class: H([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
313
314
|
onClick: (d) => u.current ? d.preventDefault() : a(u)
|
|
314
315
|
}, [
|
|
315
|
-
f("div",
|
|
316
|
-
f("div",
|
|
317
|
-
f("div",
|
|
318
|
-
u.current ? (m(),
|
|
316
|
+
f("div", ps, [
|
|
317
|
+
f("div", fs, [
|
|
318
|
+
f("div", ms, P(u.name), 1),
|
|
319
|
+
u.current ? (m(), h("span", hs, " Active ")) : L("", !0)
|
|
319
320
|
]),
|
|
320
|
-
f("div",
|
|
321
|
+
f("div", gs, P(u.description), 1)
|
|
321
322
|
]),
|
|
322
|
-
f("div",
|
|
323
|
+
f("div", ys, [
|
|
323
324
|
b(i, {
|
|
324
325
|
class: H([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
325
|
-
icon:
|
|
326
|
+
icon: x(F)[u.icon]
|
|
326
327
|
}, null, 8, ["class", "icon"])
|
|
327
328
|
])
|
|
328
|
-
], 10,
|
|
329
|
+
], 10, ds))), 128)),
|
|
329
330
|
r[2] || (r[2] = f("div", null, null, -1))
|
|
330
331
|
]),
|
|
331
|
-
f("div",
|
|
332
|
-
c.$slots.bottom || e.bottomSlot ? (m(),
|
|
332
|
+
f("div", vs, [
|
|
333
|
+
c.$slots.bottom || e.bottomSlot ? (m(), h("div", bs, [
|
|
333
334
|
O(c.$slots, "bottom", {}, () => [
|
|
334
|
-
e.bottomSlot ? (m(), V(
|
|
335
|
+
e.bottomSlot ? (m(), V(N(e.bottomSlot), { key: 0 })) : L("", !0)
|
|
335
336
|
])
|
|
336
|
-
])) :
|
|
337
|
-
c.$slots.footer || e.footerSlot ? (m(),
|
|
337
|
+
])) : L("", !0),
|
|
338
|
+
c.$slots.footer || e.footerSlot ? (m(), h("div", xs, [
|
|
338
339
|
O(c.$slots, "footer", {}, () => [
|
|
339
|
-
e.footerSlot ? (m(), V(
|
|
340
|
+
e.footerSlot ? (m(), V(N(e.footerSlot), { key: 0 })) : L("", !0)
|
|
340
341
|
])
|
|
341
|
-
])) :
|
|
342
|
+
])) : L("", !0)
|
|
342
343
|
])
|
|
343
344
|
])
|
|
344
345
|
]);
|
|
345
346
|
};
|
|
346
347
|
}
|
|
347
|
-
},
|
|
348
|
+
}, Ie = {
|
|
348
349
|
success: 5e3,
|
|
349
350
|
info: 5e3,
|
|
350
351
|
warning: 5e3,
|
|
351
352
|
danger: 0
|
|
352
353
|
// sticky by default
|
|
353
354
|
}, _e = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
|
|
354
|
-
function
|
|
355
|
+
function ws() {
|
|
355
356
|
const e = q({
|
|
356
357
|
isVisible: !1,
|
|
357
358
|
type: "info",
|
|
@@ -376,16 +377,16 @@ function bs() {
|
|
|
376
377
|
show: (p = {}) => {
|
|
377
378
|
n();
|
|
378
379
|
const {
|
|
379
|
-
type:
|
|
380
|
+
type: v = "info",
|
|
380
381
|
message: k = null,
|
|
381
|
-
component:
|
|
382
|
-
props:
|
|
383
|
-
closeable:
|
|
384
|
-
duration:
|
|
382
|
+
component: $ = null,
|
|
383
|
+
props: g = {},
|
|
384
|
+
closeable: _ = !0,
|
|
385
|
+
duration: w = null
|
|
385
386
|
} = p;
|
|
386
|
-
e.type =
|
|
387
|
-
const
|
|
388
|
-
e.duration =
|
|
387
|
+
e.type = v, e.message = k, e.component = $ ? me($) : null, e.props = g, e.closeable = _, e.isVisible = !0;
|
|
388
|
+
const y = w !== null ? w : Ie[v];
|
|
389
|
+
e.duration = y, y > 0 && c(y);
|
|
389
390
|
},
|
|
390
391
|
hide: a,
|
|
391
392
|
reset: () => {
|
|
@@ -404,7 +405,7 @@ function bs() {
|
|
|
404
405
|
}
|
|
405
406
|
};
|
|
406
407
|
}
|
|
407
|
-
class
|
|
408
|
+
class _s {
|
|
408
409
|
constructor() {
|
|
409
410
|
this.outlets = /* @__PURE__ */ new Map(), this.toastState = q({
|
|
410
411
|
toasts: [],
|
|
@@ -422,7 +423,7 @@ class xs {
|
|
|
422
423
|
* @returns {Object} Notification outlet instance
|
|
423
424
|
*/
|
|
424
425
|
getOutlet(s = "default") {
|
|
425
|
-
return this.outlets.has(s) || this.outlets.set(s,
|
|
426
|
+
return this.outlets.has(s) || this.outlets.set(s, ws()), this.outlets.get(s);
|
|
426
427
|
}
|
|
427
428
|
/**
|
|
428
429
|
* Show a banner notification in the specified outlet
|
|
@@ -516,23 +517,23 @@ class xs {
|
|
|
516
517
|
closeable: a = !0,
|
|
517
518
|
duration: c = null,
|
|
518
519
|
position: r = null
|
|
519
|
-
} = s, i = ++this._toastIdCounter, u = r && _e.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c :
|
|
520
|
+
} = s, i = ++this._toastIdCounter, u = r && _e.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c : Ie[t], p = {
|
|
520
521
|
id: i,
|
|
521
522
|
type: t,
|
|
522
523
|
message: o,
|
|
523
|
-
component: l ?
|
|
524
|
+
component: l ? me(l) : null,
|
|
524
525
|
props: n,
|
|
525
526
|
closeable: a,
|
|
526
527
|
duration: d,
|
|
527
528
|
position: u,
|
|
528
529
|
createdAt: Date.now()
|
|
529
|
-
},
|
|
530
|
-
if (
|
|
531
|
-
const k = this.toastState.newestOnTop ?
|
|
530
|
+
}, v = this.toastState.toasts.filter((k) => k.position === u);
|
|
531
|
+
if (v.length >= this.toastState.maxToasts) {
|
|
532
|
+
const k = this.toastState.newestOnTop ? v[v.length - 1] : v[0];
|
|
532
533
|
this.hideToast(k.id);
|
|
533
534
|
}
|
|
534
535
|
if (this.toastState.newestOnTop) {
|
|
535
|
-
const k = this.toastState.toasts.findIndex((
|
|
536
|
+
const k = this.toastState.toasts.findIndex(($) => $.position === u);
|
|
536
537
|
k === -1 ? this.toastState.toasts.push(p) : this.toastState.toasts.splice(k, 0, p);
|
|
537
538
|
} else
|
|
538
539
|
this.toastState.toasts.push(p);
|
|
@@ -609,7 +610,7 @@ class xs {
|
|
|
609
610
|
t && (t.timeout && clearTimeout(t.timeout), this._toastTimers.delete(s));
|
|
610
611
|
}
|
|
611
612
|
}
|
|
612
|
-
const X = new
|
|
613
|
+
const X = new _s(), fn = {
|
|
613
614
|
__name: "SparkNotificationOutlet",
|
|
614
615
|
props: {
|
|
615
616
|
name: {
|
|
@@ -618,8 +619,8 @@ const X = new xs(), cn = {
|
|
|
618
619
|
}
|
|
619
620
|
},
|
|
620
621
|
setup(e) {
|
|
621
|
-
const s = e, t =
|
|
622
|
-
|
|
622
|
+
const s = e, t = C(() => X.getOutlet(s.name)), o = B(0);
|
|
623
|
+
I(
|
|
623
624
|
() => [t.value.state.message, t.value.state.component, t.value.state.type],
|
|
624
625
|
() => {
|
|
625
626
|
t.value.state.isVisible && o.value++;
|
|
@@ -641,7 +642,7 @@ const X = new xs(), cn = {
|
|
|
641
642
|
"leave-to-class": "opacity-0 -translate-y-2",
|
|
642
643
|
mode: "out-in"
|
|
643
644
|
}, {
|
|
644
|
-
default:
|
|
645
|
+
default: T(() => [
|
|
645
646
|
t.value.state.isVisible ? (m(), V(se, {
|
|
646
647
|
key: o.value,
|
|
647
648
|
type: t.value.state.type,
|
|
@@ -650,29 +651,29 @@ const X = new xs(), cn = {
|
|
|
650
651
|
onMouseenter: n,
|
|
651
652
|
onMouseleave: a
|
|
652
653
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
t.value.state.component ? (m(), V(
|
|
655
|
-
|
|
654
|
+
default: T(() => [
|
|
655
|
+
t.value.state.component ? (m(), V(N(t.value.state.component), Ke(Z({ key: 0 }, t.value.state.props)), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
656
|
+
E(P(t.value.state.message), 1)
|
|
656
657
|
], 64))
|
|
657
658
|
]),
|
|
658
659
|
_: 1
|
|
659
|
-
}, 8, ["type", "closeable"])) :
|
|
660
|
+
}, 8, ["type", "closeable"])) : L("", !0)
|
|
660
661
|
]),
|
|
661
662
|
_: 1
|
|
662
663
|
}));
|
|
663
664
|
}
|
|
664
|
-
},
|
|
665
|
+
}, Ss = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Cs = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, $s = { class: "fixed top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ts = { class: "fixed bottom-4 left-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Ls = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, mn = {
|
|
665
666
|
__name: "SparkToastContainer",
|
|
666
667
|
setup(e) {
|
|
667
|
-
const s = X.toastState, t =
|
|
668
|
+
const s = X.toastState, t = C(
|
|
668
669
|
() => s.toasts.filter((u) => u.position === "top-left")
|
|
669
|
-
), o =
|
|
670
|
+
), o = C(
|
|
670
671
|
() => s.toasts.filter((u) => u.position === "top-right")
|
|
671
|
-
), l =
|
|
672
|
+
), l = C(
|
|
672
673
|
() => s.toasts.filter((u) => u.position === "center")
|
|
673
|
-
), n =
|
|
674
|
+
), n = C(
|
|
674
675
|
() => s.toasts.filter((u) => u.position === "bottom-left")
|
|
675
|
-
), a =
|
|
676
|
+
), a = C(
|
|
676
677
|
() => s.toasts.filter((u) => u.position === "bottom-right")
|
|
677
678
|
), c = (u) => {
|
|
678
679
|
X.hideToast(u);
|
|
@@ -682,7 +683,7 @@ const X = new xs(), cn = {
|
|
|
682
683
|
X.resumeToast(u);
|
|
683
684
|
};
|
|
684
685
|
return (u, d) => (m(), V(Ge, { to: "body" }, [
|
|
685
|
-
f("div",
|
|
686
|
+
f("div", Ss, [
|
|
686
687
|
b(le, {
|
|
687
688
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
688
689
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
@@ -691,24 +692,24 @@ const X = new xs(), cn = {
|
|
|
691
692
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
692
693
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
693
694
|
}, {
|
|
694
|
-
default:
|
|
695
|
-
(m(!0),
|
|
695
|
+
default: T(() => [
|
|
696
|
+
(m(!0), h(R, null, D(t.value, (p) => (m(), h("div", {
|
|
696
697
|
key: p.id,
|
|
697
698
|
class: "pointer-events-auto"
|
|
698
699
|
}, [
|
|
699
700
|
b(se, {
|
|
700
701
|
type: p.type,
|
|
701
702
|
closeable: p.closeable,
|
|
702
|
-
onClose: (
|
|
703
|
-
onMouseenter: (
|
|
704
|
-
onMouseleave: (
|
|
703
|
+
onClose: (v) => c(p.id),
|
|
704
|
+
onMouseenter: (v) => r(p.id),
|
|
705
|
+
onMouseleave: (v) => i(p.id)
|
|
705
706
|
}, {
|
|
706
|
-
default:
|
|
707
|
-
p.component ? (m(), V(
|
|
707
|
+
default: T(() => [
|
|
708
|
+
p.component ? (m(), V(N(p.component), Z({
|
|
708
709
|
key: 0,
|
|
709
710
|
ref_for: !0
|
|
710
|
-
}, p.props), null, 16)) : (m(),
|
|
711
|
-
|
|
711
|
+
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
712
|
+
E(P(p.message), 1)
|
|
712
713
|
], 64))
|
|
713
714
|
]),
|
|
714
715
|
_: 2
|
|
@@ -718,7 +719,7 @@ const X = new xs(), cn = {
|
|
|
718
719
|
_: 1
|
|
719
720
|
})
|
|
720
721
|
]),
|
|
721
|
-
f("div",
|
|
722
|
+
f("div", Cs, [
|
|
722
723
|
b(le, {
|
|
723
724
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
724
725
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
@@ -727,24 +728,24 @@ const X = new xs(), cn = {
|
|
|
727
728
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
728
729
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
729
730
|
}, {
|
|
730
|
-
default:
|
|
731
|
-
(m(!0),
|
|
731
|
+
default: T(() => [
|
|
732
|
+
(m(!0), h(R, null, D(o.value, (p) => (m(), h("div", {
|
|
732
733
|
key: p.id,
|
|
733
734
|
class: "pointer-events-auto"
|
|
734
735
|
}, [
|
|
735
736
|
b(se, {
|
|
736
737
|
type: p.type,
|
|
737
738
|
closeable: p.closeable,
|
|
738
|
-
onClose: (
|
|
739
|
-
onMouseenter: (
|
|
740
|
-
onMouseleave: (
|
|
739
|
+
onClose: (v) => c(p.id),
|
|
740
|
+
onMouseenter: (v) => r(p.id),
|
|
741
|
+
onMouseleave: (v) => i(p.id)
|
|
741
742
|
}, {
|
|
742
|
-
default:
|
|
743
|
-
p.component ? (m(), V(
|
|
743
|
+
default: T(() => [
|
|
744
|
+
p.component ? (m(), V(N(p.component), Z({
|
|
744
745
|
key: 0,
|
|
745
746
|
ref_for: !0
|
|
746
|
-
}, p.props), null, 16)) : (m(),
|
|
747
|
-
|
|
747
|
+
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
748
|
+
E(P(p.message), 1)
|
|
748
749
|
], 64))
|
|
749
750
|
]),
|
|
750
751
|
_: 2
|
|
@@ -754,7 +755,7 @@ const X = new xs(), cn = {
|
|
|
754
755
|
_: 1
|
|
755
756
|
})
|
|
756
757
|
]),
|
|
757
|
-
f("div",
|
|
758
|
+
f("div", $s, [
|
|
758
759
|
b(le, {
|
|
759
760
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
760
761
|
"enter-from-class": "opacity-0 scale-95",
|
|
@@ -763,24 +764,24 @@ const X = new xs(), cn = {
|
|
|
763
764
|
"leave-from-class": "opacity-100 scale-100",
|
|
764
765
|
"leave-to-class": "opacity-0 scale-95"
|
|
765
766
|
}, {
|
|
766
|
-
default:
|
|
767
|
-
(m(!0),
|
|
767
|
+
default: T(() => [
|
|
768
|
+
(m(!0), h(R, null, D(l.value, (p) => (m(), h("div", {
|
|
768
769
|
key: p.id,
|
|
769
770
|
class: "pointer-events-auto"
|
|
770
771
|
}, [
|
|
771
772
|
b(se, {
|
|
772
773
|
type: p.type,
|
|
773
774
|
closeable: p.closeable,
|
|
774
|
-
onClose: (
|
|
775
|
-
onMouseenter: (
|
|
776
|
-
onMouseleave: (
|
|
775
|
+
onClose: (v) => c(p.id),
|
|
776
|
+
onMouseenter: (v) => r(p.id),
|
|
777
|
+
onMouseleave: (v) => i(p.id)
|
|
777
778
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
p.component ? (m(), V(
|
|
779
|
+
default: T(() => [
|
|
780
|
+
p.component ? (m(), V(N(p.component), Z({
|
|
780
781
|
key: 0,
|
|
781
782
|
ref_for: !0
|
|
782
|
-
}, p.props), null, 16)) : (m(),
|
|
783
|
-
|
|
783
|
+
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
784
|
+
E(P(p.message), 1)
|
|
784
785
|
], 64))
|
|
785
786
|
]),
|
|
786
787
|
_: 2
|
|
@@ -790,7 +791,7 @@ const X = new xs(), cn = {
|
|
|
790
791
|
_: 1
|
|
791
792
|
})
|
|
792
793
|
]),
|
|
793
|
-
f("div",
|
|
794
|
+
f("div", Ts, [
|
|
794
795
|
b(le, {
|
|
795
796
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
796
797
|
"enter-from-class": "opacity-0 -translate-x-4",
|
|
@@ -799,24 +800,24 @@ const X = new xs(), cn = {
|
|
|
799
800
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
800
801
|
"leave-to-class": "opacity-0 -translate-x-4"
|
|
801
802
|
}, {
|
|
802
|
-
default:
|
|
803
|
-
(m(!0),
|
|
803
|
+
default: T(() => [
|
|
804
|
+
(m(!0), h(R, null, D(n.value, (p) => (m(), h("div", {
|
|
804
805
|
key: p.id,
|
|
805
806
|
class: "pointer-events-auto"
|
|
806
807
|
}, [
|
|
807
808
|
b(se, {
|
|
808
809
|
type: p.type,
|
|
809
810
|
closeable: p.closeable,
|
|
810
|
-
onClose: (
|
|
811
|
-
onMouseenter: (
|
|
812
|
-
onMouseleave: (
|
|
811
|
+
onClose: (v) => c(p.id),
|
|
812
|
+
onMouseenter: (v) => r(p.id),
|
|
813
|
+
onMouseleave: (v) => i(p.id)
|
|
813
814
|
}, {
|
|
814
|
-
default:
|
|
815
|
-
p.component ? (m(), V(
|
|
815
|
+
default: T(() => [
|
|
816
|
+
p.component ? (m(), V(N(p.component), Z({
|
|
816
817
|
key: 0,
|
|
817
818
|
ref_for: !0
|
|
818
|
-
}, p.props), null, 16)) : (m(),
|
|
819
|
-
|
|
819
|
+
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
820
|
+
E(P(p.message), 1)
|
|
820
821
|
], 64))
|
|
821
822
|
]),
|
|
822
823
|
_: 2
|
|
@@ -826,7 +827,7 @@ const X = new xs(), cn = {
|
|
|
826
827
|
_: 1
|
|
827
828
|
})
|
|
828
829
|
]),
|
|
829
|
-
f("div",
|
|
830
|
+
f("div", Ls, [
|
|
830
831
|
b(le, {
|
|
831
832
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
832
833
|
"enter-from-class": "opacity-0 translate-x-4",
|
|
@@ -835,24 +836,24 @@ const X = new xs(), cn = {
|
|
|
835
836
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
836
837
|
"leave-to-class": "opacity-0 translate-x-4"
|
|
837
838
|
}, {
|
|
838
|
-
default:
|
|
839
|
-
(m(!0),
|
|
839
|
+
default: T(() => [
|
|
840
|
+
(m(!0), h(R, null, D(a.value, (p) => (m(), h("div", {
|
|
840
841
|
key: p.id,
|
|
841
842
|
class: "pointer-events-auto"
|
|
842
843
|
}, [
|
|
843
844
|
b(se, {
|
|
844
845
|
type: p.type,
|
|
845
846
|
closeable: p.closeable,
|
|
846
|
-
onClose: (
|
|
847
|
-
onMouseenter: (
|
|
848
|
-
onMouseleave: (
|
|
847
|
+
onClose: (v) => c(p.id),
|
|
848
|
+
onMouseenter: (v) => r(p.id),
|
|
849
|
+
onMouseleave: (v) => i(p.id)
|
|
849
850
|
}, {
|
|
850
|
-
default:
|
|
851
|
-
p.component ? (m(), V(
|
|
851
|
+
default: T(() => [
|
|
852
|
+
p.component ? (m(), V(N(p.component), Z({
|
|
852
853
|
key: 0,
|
|
853
854
|
ref_for: !0
|
|
854
|
-
}, p.props), null, 16)) : (m(),
|
|
855
|
-
|
|
855
|
+
}, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
|
|
856
|
+
E(P(p.message), 1)
|
|
856
857
|
], 64))
|
|
857
858
|
]),
|
|
858
859
|
_: 2
|
|
@@ -864,7 +865,7 @@ const X = new xs(), cn = {
|
|
|
864
865
|
])
|
|
865
866
|
]));
|
|
866
867
|
}
|
|
867
|
-
},
|
|
868
|
+
}, Ne = ue(
|
|
868
869
|
"brandFilter",
|
|
869
870
|
() => {
|
|
870
871
|
const e = q({
|
|
@@ -886,7 +887,7 @@ const X = new xs(), cn = {
|
|
|
886
887
|
logo: r.logo,
|
|
887
888
|
current: r.current || !1
|
|
888
889
|
}));
|
|
889
|
-
}, t =
|
|
890
|
+
}, t = C(() => e.brands.find((n) => n.current) || null), o = C(() => e.brands);
|
|
890
891
|
return {
|
|
891
892
|
state: e,
|
|
892
893
|
initialize: s,
|
|
@@ -908,57 +909,57 @@ const X = new xs(), cn = {
|
|
|
908
909
|
paths: ["state.brands"]
|
|
909
910
|
}
|
|
910
911
|
}
|
|
911
|
-
),
|
|
912
|
+
), Ps = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Ms = { class: "flex flex-1 flex-col" }, Hs = { class: "divide-y divide-gray-200" }, Vs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Rs = { class: "ml-auto flex items-center" }, Es = {
|
|
912
913
|
key: 0,
|
|
913
914
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
914
|
-
},
|
|
915
|
+
}, Bs = ["onClick"], As = { class: "w-full gap-y-1 flex justify-between" }, Fs = { class: "flex flex-col" }, Os = { class: "flex items-center" }, zs = { class: "font-medium text-base text-gray-900" }, Ds = {
|
|
915
916
|
key: 0,
|
|
916
917
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-800 ml-1"
|
|
917
|
-
},
|
|
918
|
+
}, js = { class: "text-sm text-gray-500 font-normal" }, Is = { class: "flex items-center" }, Ns = ["src", "alt"], Zs = {
|
|
918
919
|
__name: "SparkBrandSelector",
|
|
919
920
|
emits: ["close", "select"],
|
|
920
921
|
setup(e, { emit: s }) {
|
|
921
|
-
const t = s, o =
|
|
922
|
+
const t = s, o = Ne(), l = (n) => {
|
|
922
923
|
t("select", n);
|
|
923
924
|
};
|
|
924
925
|
return (n, a) => {
|
|
925
926
|
const c = A("font-awesome-icon");
|
|
926
|
-
return m(),
|
|
927
|
-
f("div",
|
|
928
|
-
f("div",
|
|
929
|
-
f("div",
|
|
927
|
+
return m(), h("div", Ps, [
|
|
928
|
+
f("div", Ms, [
|
|
929
|
+
f("div", Hs, [
|
|
930
|
+
f("div", Vs, [
|
|
930
931
|
a[1] || (a[1] = f("div", null, "Filter by Brand", -1)),
|
|
931
|
-
f("div",
|
|
932
|
+
f("div", Rs, [
|
|
932
933
|
b(c, {
|
|
933
|
-
icon:
|
|
934
|
+
icon: x(F).farTimes,
|
|
934
935
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
935
936
|
onClick: a[0] || (a[0] = (r) => t("close"))
|
|
936
937
|
}, null, 8, ["icon"])
|
|
937
938
|
])
|
|
938
939
|
]),
|
|
939
|
-
|
|
940
|
-
(m(!0),
|
|
940
|
+
x(o).allBrands.length === 0 ? (m(), h("div", Es, " No brands configured ")) : L("", !0),
|
|
941
|
+
(m(!0), h(R, null, D(x(o).allBrands, (r) => (m(), h("div", {
|
|
941
942
|
key: r.id,
|
|
942
943
|
class: H([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
943
944
|
onClick: (i) => l(r)
|
|
944
945
|
}, [
|
|
945
|
-
f("div",
|
|
946
|
-
f("div",
|
|
947
|
-
f("div",
|
|
948
|
-
f("div",
|
|
949
|
-
r.current ? (m(),
|
|
946
|
+
f("div", As, [
|
|
947
|
+
f("div", Fs, [
|
|
948
|
+
f("div", Os, [
|
|
949
|
+
f("div", zs, P(r.name), 1),
|
|
950
|
+
r.current ? (m(), h("span", Ds, " Current ")) : L("", !0)
|
|
950
951
|
]),
|
|
951
|
-
f("div",
|
|
952
|
+
f("div", js, P(r.current ? "Current Brand" : "Change to"), 1)
|
|
952
953
|
]),
|
|
953
|
-
f("div",
|
|
954
|
+
f("div", Is, [
|
|
954
955
|
f("img", {
|
|
955
956
|
src: r.logo,
|
|
956
957
|
alt: `${r.name} logo`,
|
|
957
958
|
class: "h-8 w-auto"
|
|
958
|
-
}, null, 8,
|
|
959
|
+
}, null, 8, Ns)
|
|
959
960
|
])
|
|
960
961
|
])
|
|
961
|
-
], 10,
|
|
962
|
+
], 10, Bs))), 128)),
|
|
962
963
|
a[2] || (a[2] = f("div", null, null, -1))
|
|
963
964
|
]),
|
|
964
965
|
a[3] || (a[3] = f("div", { class: "mt-auto" }, null, -1))
|
|
@@ -966,7 +967,7 @@ const X = new xs(), cn = {
|
|
|
966
967
|
]);
|
|
967
968
|
};
|
|
968
969
|
}
|
|
969
|
-
},
|
|
970
|
+
}, qs = ["disabled"], G = {
|
|
970
971
|
__name: "SparkButton",
|
|
971
972
|
props: {
|
|
972
973
|
size: {
|
|
@@ -989,7 +990,7 @@ const X = new xs(), cn = {
|
|
|
989
990
|
},
|
|
990
991
|
emits: ["click"],
|
|
991
992
|
setup(e) {
|
|
992
|
-
const s = e, t =
|
|
993
|
+
const s = e, t = B(null), o = Ve("buttonGroup", null), l = C(() => {
|
|
993
994
|
if (!o?.isInGroup || !t.value) return null;
|
|
994
995
|
const r = o.getButtonIndex(t.value), i = o.getButtonCount();
|
|
995
996
|
return {
|
|
@@ -1011,15 +1012,15 @@ const X = new xs(), cn = {
|
|
|
1011
1012
|
}, a = (r, i) => {
|
|
1012
1013
|
if (!i) return r;
|
|
1013
1014
|
const u = r.split(" ").filter(Boolean), d = i.split(" ").filter(Boolean);
|
|
1014
|
-
return [...u.filter((
|
|
1015
|
-
const
|
|
1016
|
-
([
|
|
1017
|
-
)?.[0],
|
|
1018
|
-
([
|
|
1015
|
+
return [...u.filter((v) => !d.some((k) => {
|
|
1016
|
+
const $ = Object.entries(n).find(
|
|
1017
|
+
([_, w]) => w.test(v)
|
|
1018
|
+
)?.[0], g = Object.entries(n).find(
|
|
1019
|
+
([_, w]) => w.test(k)
|
|
1019
1020
|
)?.[0];
|
|
1020
|
-
return
|
|
1021
|
+
return $ && $ === g;
|
|
1021
1022
|
})), ...d].join(" ");
|
|
1022
|
-
}, c =
|
|
1023
|
+
}, c = C(() => {
|
|
1023
1024
|
let r = "", i = "";
|
|
1024
1025
|
switch (s.size) {
|
|
1025
1026
|
case "xs":
|
|
@@ -1067,7 +1068,7 @@ const X = new xs(), cn = {
|
|
|
1067
1068
|
}
|
|
1068
1069
|
return r = a(r, s.buttonClass), r;
|
|
1069
1070
|
});
|
|
1070
|
-
return (r, i) => (m(),
|
|
1071
|
+
return (r, i) => (m(), h("button", {
|
|
1071
1072
|
type: "button",
|
|
1072
1073
|
ref_key: "buttonRef",
|
|
1073
1074
|
ref: t,
|
|
@@ -1076,17 +1077,17 @@ const X = new xs(), cn = {
|
|
|
1076
1077
|
onClick: i[0] || (i[0] = (u) => r.$emit("click"))
|
|
1077
1078
|
}, [
|
|
1078
1079
|
O(r.$slots, "default")
|
|
1079
|
-
], 10,
|
|
1080
|
+
], 10, qs));
|
|
1080
1081
|
}
|
|
1081
|
-
},
|
|
1082
|
+
}, Us = {
|
|
1082
1083
|
__name: "SparkButtonGroup",
|
|
1083
1084
|
setup(e) {
|
|
1084
|
-
const s =
|
|
1085
|
+
const s = B(null);
|
|
1085
1086
|
return We("buttonGroup", {
|
|
1086
1087
|
isInGroup: !0,
|
|
1087
1088
|
getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
|
|
1088
1089
|
getButtonCount: () => s.value?.children.length || 0
|
|
1089
|
-
}), (l, n) => (m(),
|
|
1090
|
+
}), (l, n) => (m(), h("div", {
|
|
1090
1091
|
class: "inline-flex rounded-md shadow-xs",
|
|
1091
1092
|
ref_key: "groupRef",
|
|
1092
1093
|
ref: s
|
|
@@ -1094,13 +1095,13 @@ const X = new xs(), cn = {
|
|
|
1094
1095
|
O(l.$slots, "default")
|
|
1095
1096
|
], 512));
|
|
1096
1097
|
}
|
|
1097
|
-
},
|
|
1098
|
+
}, Ks = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, Gs = {
|
|
1098
1099
|
key: 0,
|
|
1099
1100
|
class: "p-5"
|
|
1100
|
-
},
|
|
1101
|
+
}, Ws = {
|
|
1101
1102
|
key: 1,
|
|
1102
1103
|
class: "p-5"
|
|
1103
|
-
},
|
|
1104
|
+
}, hn = {
|
|
1104
1105
|
__name: "SparkCard",
|
|
1105
1106
|
props: {
|
|
1106
1107
|
padded: {
|
|
@@ -1114,24 +1115,24 @@ const X = new xs(), cn = {
|
|
|
1114
1115
|
},
|
|
1115
1116
|
setup(e) {
|
|
1116
1117
|
const s = e;
|
|
1117
|
-
return (t, o) => (m(),
|
|
1118
|
-
t.$slots.header ? (m(),
|
|
1118
|
+
return (t, o) => (m(), h("div", Ks, [
|
|
1119
|
+
t.$slots.header ? (m(), h("div", Gs, [
|
|
1119
1120
|
O(t.$slots, "header")
|
|
1120
|
-
])) :
|
|
1121
|
+
])) : L("", !0),
|
|
1121
1122
|
f("div", {
|
|
1122
1123
|
class: H([s.padded ? s.paddedClass : ""])
|
|
1123
1124
|
}, [
|
|
1124
1125
|
O(t.$slots, "default")
|
|
1125
1126
|
], 2),
|
|
1126
|
-
t.$slots.footer ? (m(),
|
|
1127
|
+
t.$slots.footer ? (m(), h("div", Ws, [
|
|
1127
1128
|
O(t.$slots, "footer")
|
|
1128
|
-
])) :
|
|
1129
|
+
])) : L("", !0)
|
|
1129
1130
|
]));
|
|
1130
1131
|
}
|
|
1131
|
-
},
|
|
1132
|
+
}, Ys = { class: "px-4 pt-5 pb-4 sm:p-6" }, Xs = {
|
|
1132
1133
|
key: 0,
|
|
1133
1134
|
class: "text-lg font-medium text-gray-900"
|
|
1134
|
-
},
|
|
1135
|
+
}, Js = {
|
|
1135
1136
|
__name: "SparkModalDialog",
|
|
1136
1137
|
props: {
|
|
1137
1138
|
title: {
|
|
@@ -1181,7 +1182,7 @@ const X = new xs(), cn = {
|
|
|
1181
1182
|
"input"
|
|
1182
1183
|
],
|
|
1183
1184
|
setup(e) {
|
|
1184
|
-
const s = e, t =
|
|
1185
|
+
const s = e, t = C(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), o = C(() => {
|
|
1185
1186
|
switch (t.value.length) {
|
|
1186
1187
|
case 1:
|
|
1187
1188
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -1197,12 +1198,12 @@ const X = new xs(), cn = {
|
|
|
1197
1198
|
success: "farCheckCircle",
|
|
1198
1199
|
warning: "farExclamationTriangle",
|
|
1199
1200
|
danger: "farCircleXmark"
|
|
1200
|
-
}, n =
|
|
1201
|
+
}, n = C(() => s.icon || l[s.type]), a = C(() => ({
|
|
1201
1202
|
info: "bg-blue-100",
|
|
1202
1203
|
success: "bg-green-100",
|
|
1203
1204
|
warning: "bg-yellow-100",
|
|
1204
1205
|
danger: "bg-red-100"
|
|
1205
|
-
})[s.type]), c =
|
|
1206
|
+
})[s.type]), c = C(() => ({
|
|
1206
1207
|
info: "text-blue-400",
|
|
1207
1208
|
success: "text-green-400",
|
|
1208
1209
|
warning: "text-yellow-400",
|
|
@@ -1210,35 +1211,35 @@ const X = new xs(), cn = {
|
|
|
1210
1211
|
})[s.type]);
|
|
1211
1212
|
return (r, i) => {
|
|
1212
1213
|
const u = A("font-awesome-icon");
|
|
1213
|
-
return m(),
|
|
1214
|
-
n.value ? (m(),
|
|
1214
|
+
return m(), h("div", Ys, [
|
|
1215
|
+
n.value ? (m(), h("div", {
|
|
1215
1216
|
key: 0,
|
|
1216
1217
|
class: H(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
|
|
1217
1218
|
}, [
|
|
1218
1219
|
b(u, {
|
|
1219
|
-
icon:
|
|
1220
|
+
icon: x(F)[n.value],
|
|
1220
1221
|
class: H(["h-5 w-5", c.value])
|
|
1221
1222
|
}, null, 8, ["icon", "class"])
|
|
1222
|
-
], 2)) :
|
|
1223
|
+
], 2)) : L("", !0),
|
|
1223
1224
|
f("div", {
|
|
1224
1225
|
class: H(["text-center", { "mt-3 sm:mt-5": n.value }])
|
|
1225
1226
|
}, [
|
|
1226
|
-
e.title ? (m(),
|
|
1227
|
-
e.message ? (m(),
|
|
1227
|
+
e.title ? (m(), h("h3", Xs, P(e.title), 1)) : L("", !0),
|
|
1228
|
+
e.message ? (m(), h("div", {
|
|
1228
1229
|
key: 1,
|
|
1229
1230
|
class: H([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
1230
|
-
},
|
|
1231
|
+
}, P(e.message), 3)) : L("", !0)
|
|
1231
1232
|
], 2),
|
|
1232
1233
|
f("div", {
|
|
1233
1234
|
class: H(["mt-5 sm:mt-6", o.value])
|
|
1234
1235
|
}, [
|
|
1235
|
-
(m(!0),
|
|
1236
|
+
(m(!0), h(R, null, D(t.value, (d, p) => (m(), V(x(G), {
|
|
1236
1237
|
key: p,
|
|
1237
1238
|
variant: d.variant,
|
|
1238
|
-
onClick: (
|
|
1239
|
+
onClick: (v) => r.$emit(d.event, d)
|
|
1239
1240
|
}, {
|
|
1240
|
-
default:
|
|
1241
|
-
|
|
1241
|
+
default: T(() => [
|
|
1242
|
+
E(P(d.text), 1)
|
|
1242
1243
|
]),
|
|
1243
1244
|
_: 2
|
|
1244
1245
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -1247,7 +1248,7 @@ const X = new xs(), cn = {
|
|
|
1247
1248
|
};
|
|
1248
1249
|
}
|
|
1249
1250
|
};
|
|
1250
|
-
class
|
|
1251
|
+
class Qs {
|
|
1251
1252
|
constructor() {
|
|
1252
1253
|
this.state = q({
|
|
1253
1254
|
isVisible: !1,
|
|
@@ -1257,7 +1258,7 @@ class Ys {
|
|
|
1257
1258
|
});
|
|
1258
1259
|
}
|
|
1259
1260
|
show = (s, t = {}, o = {}) => {
|
|
1260
|
-
this.state.content =
|
|
1261
|
+
this.state.content = me(s), this.state.props = t, this.state.eventHandlers = o, this.state.isVisible = !0;
|
|
1261
1262
|
};
|
|
1262
1263
|
hide = () => {
|
|
1263
1264
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
@@ -1284,7 +1285,7 @@ class Ys {
|
|
|
1284
1285
|
confirmVariant: r = "primary"
|
|
1285
1286
|
} = s;
|
|
1286
1287
|
this.show(
|
|
1287
|
-
|
|
1288
|
+
Js,
|
|
1288
1289
|
{
|
|
1289
1290
|
title: o,
|
|
1290
1291
|
message: l,
|
|
@@ -1305,20 +1306,20 @@ class Ys {
|
|
|
1305
1306
|
);
|
|
1306
1307
|
});
|
|
1307
1308
|
}
|
|
1308
|
-
const oe = new
|
|
1309
|
+
const oe = new Qs(), eo = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, to = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, so = {
|
|
1309
1310
|
__name: "SparkModalContainer",
|
|
1310
1311
|
setup(e) {
|
|
1311
|
-
return (s, t) => (m(), V(
|
|
1312
|
+
return (s, t) => (m(), V(x(Ae), {
|
|
1312
1313
|
as: "template",
|
|
1313
|
-
show:
|
|
1314
|
+
show: x(oe).state.isVisible
|
|
1314
1315
|
}, {
|
|
1315
|
-
default:
|
|
1316
|
-
b(
|
|
1316
|
+
default: T(() => [
|
|
1317
|
+
b(x(Fe), {
|
|
1317
1318
|
class: "relative z-1000",
|
|
1318
|
-
onClose:
|
|
1319
|
+
onClose: x(oe).hide
|
|
1319
1320
|
}, {
|
|
1320
|
-
default:
|
|
1321
|
-
b(
|
|
1321
|
+
default: T(() => [
|
|
1322
|
+
b(x(fe), {
|
|
1322
1323
|
as: "template",
|
|
1323
1324
|
enter: "ease-out duration-300",
|
|
1324
1325
|
"enter-from": "opacity-0",
|
|
@@ -1327,14 +1328,14 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1327
1328
|
"leave-from": "opacity-100",
|
|
1328
1329
|
"leave-to": "opacity-0"
|
|
1329
1330
|
}, {
|
|
1330
|
-
default:
|
|
1331
|
+
default: T(() => [...t[0] || (t[0] = [
|
|
1331
1332
|
f("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
1332
1333
|
])]),
|
|
1333
1334
|
_: 1
|
|
1334
1335
|
}),
|
|
1335
|
-
f("div",
|
|
1336
|
-
f("div",
|
|
1337
|
-
b(
|
|
1336
|
+
f("div", eo, [
|
|
1337
|
+
f("div", to, [
|
|
1338
|
+
b(x(fe), {
|
|
1338
1339
|
as: "template",
|
|
1339
1340
|
enter: "ease-out duration-300",
|
|
1340
1341
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -1343,10 +1344,10 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1343
1344
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
1344
1345
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1345
1346
|
}, {
|
|
1346
|
-
default:
|
|
1347
|
-
b(
|
|
1348
|
-
default:
|
|
1349
|
-
(m(), V(
|
|
1347
|
+
default: T(() => [
|
|
1348
|
+
b(x(Oe), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
|
|
1349
|
+
default: T(() => [
|
|
1350
|
+
(m(), V(N(x(oe).state.content), Z(x(oe).state.props, Re(x(oe).state.eventHandlers)), null, 16))
|
|
1350
1351
|
]),
|
|
1351
1352
|
_: 1
|
|
1352
1353
|
})
|
|
@@ -1362,7 +1363,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1362
1363
|
_: 1
|
|
1363
1364
|
}, 8, ["show"]));
|
|
1364
1365
|
}
|
|
1365
|
-
},
|
|
1366
|
+
}, oo = { class: "fixed inset-0 flex" }, Se = {
|
|
1366
1367
|
__name: "SparkOverlay",
|
|
1367
1368
|
props: {
|
|
1368
1369
|
position: {
|
|
@@ -1377,27 +1378,27 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1377
1378
|
},
|
|
1378
1379
|
emits: ["close"],
|
|
1379
1380
|
setup(e, { emit: s }) {
|
|
1380
|
-
const t =
|
|
1381
|
+
const t = B(null), o = {
|
|
1381
1382
|
xs: "w-[250px]",
|
|
1382
1383
|
sm: "w-[300px]",
|
|
1383
1384
|
md: "w-[450px]",
|
|
1384
1385
|
lg: "w-[810px]",
|
|
1385
1386
|
xl: "w-[1000px]"
|
|
1386
|
-
}, l = e, n = s, a =
|
|
1387
|
+
}, l = e, n = s, a = C(() => o[l.overlayInstance.state.size] || o.md), c = () => {
|
|
1387
1388
|
l.overlayInstance.close(), n("close");
|
|
1388
1389
|
};
|
|
1389
|
-
return (r, i) => (m(), V(
|
|
1390
|
+
return (r, i) => (m(), V(x(Ae), {
|
|
1390
1391
|
show: e.overlayInstance.state.isVisible,
|
|
1391
1392
|
as: "template"
|
|
1392
1393
|
}, {
|
|
1393
|
-
default:
|
|
1394
|
-
b(
|
|
1394
|
+
default: T(() => [
|
|
1395
|
+
b(x(Fe), {
|
|
1395
1396
|
initialFocus: t.value,
|
|
1396
1397
|
class: "relative z-1000",
|
|
1397
1398
|
onClose: c
|
|
1398
1399
|
}, {
|
|
1399
|
-
default:
|
|
1400
|
-
b(
|
|
1400
|
+
default: T(() => [
|
|
1401
|
+
b(x(fe), {
|
|
1401
1402
|
as: "template",
|
|
1402
1403
|
enter: "transition-opacity ease-linear duration-150",
|
|
1403
1404
|
"enter-from": "opacity-0",
|
|
@@ -1406,13 +1407,13 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1406
1407
|
"leave-from": "opacity-100",
|
|
1407
1408
|
"leave-to": "opacity-0"
|
|
1408
1409
|
}, {
|
|
1409
|
-
default:
|
|
1410
|
+
default: T(() => [...i[0] || (i[0] = [
|
|
1410
1411
|
f("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
|
|
1411
1412
|
])]),
|
|
1412
1413
|
_: 1
|
|
1413
1414
|
}),
|
|
1414
|
-
f("div",
|
|
1415
|
-
b(
|
|
1415
|
+
f("div", oo, [
|
|
1416
|
+
b(x(fe), {
|
|
1416
1417
|
as: "template",
|
|
1417
1418
|
enter: "transition ease-in-out duration-150 transform",
|
|
1418
1419
|
"enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
@@ -1421,8 +1422,8 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1421
1422
|
"leave-from": "translate-x-0 opacity-100",
|
|
1422
1423
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
1423
1424
|
}, {
|
|
1424
|
-
default:
|
|
1425
|
-
b(
|
|
1425
|
+
default: T(() => [
|
|
1426
|
+
b(x(Oe), {
|
|
1426
1427
|
ref_key: "panelRef",
|
|
1427
1428
|
ref: t,
|
|
1428
1429
|
class: H([
|
|
@@ -1431,8 +1432,8 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1431
1432
|
e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
|
|
1432
1433
|
])
|
|
1433
1434
|
}, {
|
|
1434
|
-
default:
|
|
1435
|
-
(m(), V(
|
|
1435
|
+
default: T(() => [
|
|
1436
|
+
(m(), V(N(e.overlayInstance.state.content), Z(e.overlayInstance.state.props, Re(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
1436
1437
|
]),
|
|
1437
1438
|
_: 1
|
|
1438
1439
|
}, 8, ["class"])
|
|
@@ -1447,13 +1448,13 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1447
1448
|
_: 1
|
|
1448
1449
|
}, 8, ["show"]));
|
|
1449
1450
|
}
|
|
1450
|
-
},
|
|
1451
|
+
}, ao = (e) => {
|
|
1451
1452
|
if (e.includes(".")) {
|
|
1452
1453
|
const s = e.split(".");
|
|
1453
1454
|
e = s[s.length - 1];
|
|
1454
1455
|
}
|
|
1455
1456
|
return e.replace(/_/g, " ");
|
|
1456
|
-
},
|
|
1457
|
+
}, ro = (e, s, t) => {
|
|
1457
1458
|
const o = s.querySelector(".relative");
|
|
1458
1459
|
if (!o || o.querySelector(".spark-table-head-sorting"))
|
|
1459
1460
|
return;
|
|
@@ -1468,7 +1469,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1468
1469
|
sortedBy: "asc"
|
|
1469
1470
|
}));
|
|
1470
1471
|
});
|
|
1471
|
-
},
|
|
1472
|
+
}, no = (e, s, t) => {
|
|
1472
1473
|
if (s.querySelector(".spark-table-head-filter"))
|
|
1473
1474
|
return;
|
|
1474
1475
|
const o = document.createElement("div"), l = document.createElement("input");
|
|
@@ -1483,19 +1484,19 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1483
1484
|
await t.methods.removeParam(i);
|
|
1484
1485
|
}, 200);
|
|
1485
1486
|
l.addEventListener("keyup", (a) => n(e, a)), s.appendChild(o);
|
|
1486
|
-
},
|
|
1487
|
+
}, lo = (e, s, t) => {
|
|
1487
1488
|
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");
|
|
1488
1489
|
const l = e.querySelector(".colHeader");
|
|
1489
|
-
l.classList.add("spark-table-head-title"), l.innerHTML =
|
|
1490
|
-
},
|
|
1490
|
+
l.classList.add("spark-table-head-title"), l.innerHTML = ao(s);
|
|
1491
|
+
}, io = (e, s, t) => {
|
|
1491
1492
|
if (typeof e != "number")
|
|
1492
1493
|
return e;
|
|
1493
1494
|
if (e < 0)
|
|
1494
1495
|
return;
|
|
1495
1496
|
let o = 2;
|
|
1496
1497
|
const l = t.methods.colToProp(e), n = t.methods.getSettingsForProp(l);
|
|
1497
|
-
s.childElementCount === 1 && ((!n || !n.columnSort) && o--, (!n || !n.columnFilter) && o--, n && n.columnSort &&
|
|
1498
|
-
},
|
|
1498
|
+
s.childElementCount === 1 && ((!n || !n.columnSort) && o--, (!n || !n.columnFilter) && o--, n && n.columnSort && ro(l, s, t), n && n.columnFilter && no(l, s, t)), (s.childElementCount === o || o === 0) && lo(s, l, n);
|
|
1499
|
+
}, co = (e) => {
|
|
1499
1500
|
if (!e.hotInstance || !e.hotInstance.rootElement)
|
|
1500
1501
|
return;
|
|
1501
1502
|
const s = e.params.orderBy, t = e.params.sortedBy, o = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
|
|
@@ -1505,7 +1506,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1505
1506
|
const n = l.closest("th"), a = Array.from(n.parentElement.children).indexOf(n);
|
|
1506
1507
|
e.methods.colToProp(a) === s && l.classList.add(t);
|
|
1507
1508
|
});
|
|
1508
|
-
},
|
|
1509
|
+
}, uo = (e) => (s, t, o, l, n, a, c) => {
|
|
1509
1510
|
t.innerHTML = "", t.classList.add("spark-table-cell-actions");
|
|
1510
1511
|
const i = (c.rendererConfig || {}).actions || [];
|
|
1511
1512
|
if (i.length === 0)
|
|
@@ -1514,21 +1515,21 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1514
1515
|
d.classList.add("flex", "items-center", "gap-2"), i.forEach((p) => {
|
|
1515
1516
|
if (p.condition && typeof p.condition == "function" && !p.condition(u))
|
|
1516
1517
|
return;
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1518
|
+
const v = document.createElement("button");
|
|
1519
|
+
if (v.type = "button", v.classList.add("spark-table-action-button"), p.icon) {
|
|
1519
1520
|
const k = document.createElement("span");
|
|
1520
|
-
k.innerHTML = ce({ prefix: "far", iconName: p.icon }).html, k.classList.add("size-4"),
|
|
1521
|
+
k.innerHTML = ce({ prefix: "far", iconName: p.icon }).html, k.classList.add("size-4"), v.appendChild(k);
|
|
1521
1522
|
}
|
|
1522
1523
|
if (p.label) {
|
|
1523
1524
|
const k = document.createElement("span");
|
|
1524
|
-
k.textContent = p.label,
|
|
1525
|
+
k.textContent = p.label, v.appendChild(k);
|
|
1525
1526
|
}
|
|
1526
|
-
|
|
1527
|
+
v.addEventListener("click", async (k) => {
|
|
1527
1528
|
if (k.preventDefault(), k.stopPropagation(), p.confirm) {
|
|
1528
|
-
const
|
|
1529
|
+
const $ = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
|
|
1529
1530
|
if (!await oe.confirm({
|
|
1530
1531
|
title: p.confirmTitle,
|
|
1531
|
-
message:
|
|
1532
|
+
message: $,
|
|
1532
1533
|
type: p.confirmType,
|
|
1533
1534
|
confirmText: p.confirmText,
|
|
1534
1535
|
cancelText: p.cancelText,
|
|
@@ -1537,7 +1538,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1537
1538
|
return;
|
|
1538
1539
|
}
|
|
1539
1540
|
p.event && e.methods.fireEvent(p.event, u), p.handler && typeof p.handler == "function" && p.handler(u);
|
|
1540
|
-
}), d.appendChild(
|
|
1541
|
+
}), d.appendChild(v);
|
|
1541
1542
|
}), t.appendChild(d);
|
|
1542
1543
|
}, Ce = {
|
|
1543
1544
|
green: "bg-green-100 text-green-800",
|
|
@@ -1548,7 +1549,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1548
1549
|
purple: "bg-purple-100 text-purple-800",
|
|
1549
1550
|
pink: "bg-pink-100 text-pink-800",
|
|
1550
1551
|
indigo: "bg-indigo-100 text-indigo-800"
|
|
1551
|
-
},
|
|
1552
|
+
}, po = (e) => (s, t, o, l, n, a, c) => {
|
|
1552
1553
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !a)
|
|
1553
1554
|
return;
|
|
1554
1555
|
const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d = Ce[u] || Ce.gray, p = document.createElement("span");
|
|
@@ -1570,7 +1571,7 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1570
1571
|
blue: { bg: "bg-blue-100", text: "text-blue-500" },
|
|
1571
1572
|
gray: { bg: "bg-gray-100", text: "text-gray-500" },
|
|
1572
1573
|
purple: { bg: "bg-purple-100", text: "text-purple-500" }
|
|
1573
|
-
},
|
|
1574
|
+
}, fo = (e) => {
|
|
1574
1575
|
if (e == null || e === "")
|
|
1575
1576
|
return !1;
|
|
1576
1577
|
if (typeof e == "boolean")
|
|
@@ -1582,24 +1583,24 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1582
1583
|
return s === "1" || s === "yes" || s === "true";
|
|
1583
1584
|
}
|
|
1584
1585
|
return !1;
|
|
1585
|
-
},
|
|
1586
|
+
}, mo = (e) => (s, t, o, l, n, a, c) => {
|
|
1586
1587
|
t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
|
|
1587
|
-
const r = c.rendererConfig || {}, i =
|
|
1588
|
+
const r = c.rendererConfig || {}, i = fo(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 = $e[d] || $e.gray;
|
|
1588
1589
|
t.dataset.copyValue = i ? "true" : "false";
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1590
|
+
const $ = document.createElement("div");
|
|
1591
|
+
$.classList.add(
|
|
1591
1592
|
"inline-flex",
|
|
1592
1593
|
"items-center",
|
|
1593
1594
|
"justify-center",
|
|
1594
1595
|
"rounded-full",
|
|
1595
1596
|
k.bg,
|
|
1596
1597
|
k.text
|
|
1597
|
-
),
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1600
|
-
const
|
|
1601
|
-
|
|
1602
|
-
},
|
|
1598
|
+
), $.style.width = `${p}px`, $.style.height = `${p}px`;
|
|
1599
|
+
const g = document.createElement("span");
|
|
1600
|
+
g.innerHTML = ce({ prefix: v, iconName: u }).html, g.classList.add("flex", "items-center", "justify-center");
|
|
1601
|
+
const _ = Math.round(p * 0.5);
|
|
1602
|
+
g.style.fontSize = `${_}px`, $.appendChild(g), t.appendChild($);
|
|
1603
|
+
}, ho = (e, s = 2) => {
|
|
1603
1604
|
const t = Number(e);
|
|
1604
1605
|
if (isNaN(t)) return null;
|
|
1605
1606
|
const o = t < 0, n = Math.abs(t).toLocaleString("en-AU", {
|
|
@@ -1607,21 +1608,21 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1607
1608
|
maximumFractionDigits: s
|
|
1608
1609
|
});
|
|
1609
1610
|
return o ? `-$${n}` : `$${n}`;
|
|
1610
|
-
},
|
|
1611
|
+
}, go = (e) => (s, t, o, l, n, a, c) => {
|
|
1611
1612
|
t.innerHTML = "", t.classList.add("spark-table-cell-currency");
|
|
1612
1613
|
const r = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = r;
|
|
1613
1614
|
if (a == null || a === "") {
|
|
1614
1615
|
t.textContent = u;
|
|
1615
1616
|
return;
|
|
1616
1617
|
}
|
|
1617
|
-
const d =
|
|
1618
|
+
const d = ho(a, i);
|
|
1618
1619
|
if (d === null) {
|
|
1619
1620
|
t.textContent = u;
|
|
1620
1621
|
return;
|
|
1621
1622
|
}
|
|
1622
1623
|
const p = document.createElement("span");
|
|
1623
1624
|
p.textContent = d, t.appendChild(p);
|
|
1624
|
-
},
|
|
1625
|
+
}, yo = (e) => (s, t, o, l, n, a, c) => {
|
|
1625
1626
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !a)
|
|
1626
1627
|
return;
|
|
1627
1628
|
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o));
|
|
@@ -1635,46 +1636,46 @@ const oe = new Ys(), Xs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
1635
1636
|
sm: "h-6 w-6",
|
|
1636
1637
|
md: "h-8 w-8",
|
|
1637
1638
|
lg: "h-12 w-12"
|
|
1638
|
-
},
|
|
1639
|
+
}, vo = (e) => (s, t, o, l, n, a, c) => {
|
|
1639
1640
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !a)
|
|
1640
1641
|
return;
|
|
1641
1642
|
const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d = Te[u] || Te.md, p = r.rounded !== !1;
|
|
1642
|
-
let
|
|
1643
|
-
typeof r.alt == "string" && i[r.alt] && (
|
|
1643
|
+
let v = r.alt || "";
|
|
1644
|
+
typeof r.alt == "string" && i[r.alt] && (v = i[r.alt]);
|
|
1644
1645
|
const k = document.createElement("img");
|
|
1645
|
-
k.src = a, k.alt =
|
|
1646
|
-
},
|
|
1646
|
+
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
|
+
}, bo = (e) => (s, t, o, l, n, a, c) => {
|
|
1647
1648
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !a)
|
|
1648
1649
|
return;
|
|
1649
1650
|
const r = c.rendererConfig || {}, i = r.format || "short", u = r.locale || "en-US";
|
|
1650
1651
|
let d = a;
|
|
1651
1652
|
try {
|
|
1652
|
-
const
|
|
1653
|
-
isNaN(
|
|
1653
|
+
const v = new Date(a);
|
|
1654
|
+
isNaN(v.getTime()) ? d = a : typeof i == "function" ? d = i(v) : i === "short" ? d = v.toLocaleDateString(u) : i === "long" ? d = v.toLocaleDateString(u, {
|
|
1654
1655
|
year: "numeric",
|
|
1655
1656
|
month: "long",
|
|
1656
1657
|
day: "numeric"
|
|
1657
|
-
}) : i === "relative" ? d =
|
|
1658
|
-
} catch (
|
|
1659
|
-
console.error("Error formatting date:",
|
|
1658
|
+
}) : i === "relative" ? d = xo(v) : i === "datetime" ? d = v.toLocaleString(u) : d = v.toLocaleDateString(u);
|
|
1659
|
+
} catch (v) {
|
|
1660
|
+
console.error("Error formatting date:", v), d = a;
|
|
1660
1661
|
}
|
|
1661
1662
|
const p = document.createElement("span");
|
|
1662
1663
|
p.textContent = d, t.appendChild(p);
|
|
1663
1664
|
};
|
|
1664
|
-
function
|
|
1665
|
+
function xo(e) {
|
|
1665
1666
|
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;
|
|
1666
1667
|
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" : ""}`;
|
|
1667
1668
|
}
|
|
1668
|
-
const
|
|
1669
|
+
const ko = (e) => {
|
|
1669
1670
|
const s = ["th", "st", "nd", "rd"], t = e % 100;
|
|
1670
1671
|
return e + (s[(t - 20) % 10] || s[t] || s[0]);
|
|
1671
|
-
}, j = (e, s = 2) => String(e).padStart(s, "0"),
|
|
1672
|
+
}, j = (e, s = 2) => String(e).padStart(s, "0"), ye = /* @__PURE__ */ new Map(), wo = (e, s) => {
|
|
1672
1673
|
const t = `${e}:${JSON.stringify(s)}`;
|
|
1673
|
-
return
|
|
1674
|
+
return ye.has(t) || ye.set(t, new Intl.DateTimeFormat(e, s)), ye.get(t);
|
|
1674
1675
|
}, ie = (e, s, t, o) => {
|
|
1675
|
-
const a =
|
|
1676
|
+
const a = wo(s, t).formatToParts(e).find((c) => c.type === o);
|
|
1676
1677
|
return a ? a.value : "";
|
|
1677
|
-
},
|
|
1678
|
+
}, _o = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
|
|
1678
1679
|
e.year,
|
|
1679
1680
|
e.month - 1,
|
|
1680
1681
|
e.day,
|
|
@@ -1682,7 +1683,7 @@ const vo = (e) => {
|
|
|
1682
1683
|
e.minute || 0,
|
|
1683
1684
|
e.second || 0,
|
|
1684
1685
|
e.millisecond || 0
|
|
1685
|
-
),
|
|
1686
|
+
), So = (e) => {
|
|
1686
1687
|
const s = e.hour || 0, t = s % 12 || 12, o = s >= 12;
|
|
1687
1688
|
return {
|
|
1688
1689
|
year: e.year,
|
|
@@ -1705,8 +1706,8 @@ const vo = (e) => {
|
|
|
1705
1706
|
return "";
|
|
1706
1707
|
const t = Math.round(e.offsetNanoseconds / 6e10), o = t >= 0 ? "+" : "-", l = Math.abs(t), n = Math.floor(l / 60), a = l % 60;
|
|
1707
1708
|
return s ? `${o}${j(n)}:${j(a)}` : `${o}${j(n)}${j(a)}`;
|
|
1708
|
-
},
|
|
1709
|
-
const t =
|
|
1709
|
+
}, Co = (e, s) => {
|
|
1710
|
+
const t = So(e), o = _o(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
|
|
1710
1711
|
return [
|
|
1711
1712
|
// Year
|
|
1712
1713
|
["YYYY", () => String(t.year)],
|
|
@@ -1718,7 +1719,7 @@ const vo = (e) => {
|
|
|
1718
1719
|
["M", () => String(t.month)],
|
|
1719
1720
|
// Day of month
|
|
1720
1721
|
["DD", () => j(t.day)],
|
|
1721
|
-
["Do", () =>
|
|
1722
|
+
["Do", () => ko(t.day)],
|
|
1722
1723
|
["D", () => String(t.day)],
|
|
1723
1724
|
// Day of week
|
|
1724
1725
|
["dddd", () => ie(o, s, { weekday: "long" }, "weekday")],
|
|
@@ -1752,7 +1753,7 @@ const vo = (e) => {
|
|
|
1752
1753
|
["x", () => String(e.epochMilliseconds ?? o.getTime())],
|
|
1753
1754
|
["X", () => String(Math.floor((e.epochMilliseconds ?? o.getTime()) / 1e3))]
|
|
1754
1755
|
];
|
|
1755
|
-
},
|
|
1756
|
+
}, $o = (e, s, t = {}) => {
|
|
1756
1757
|
const { locale: o = "en-US" } = t;
|
|
1757
1758
|
if (!e)
|
|
1758
1759
|
return "";
|
|
@@ -1768,49 +1769,49 @@ const vo = (e) => {
|
|
|
1768
1769
|
} catch (r) {
|
|
1769
1770
|
return console.error("Failed to parse date string:", e, r), e;
|
|
1770
1771
|
}
|
|
1771
|
-
const n =
|
|
1772
|
+
const n = Co(l, o), a = n.map(([r]) => r).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${a})`, "g");
|
|
1772
1773
|
return s.replace(c, (r, i, u) => {
|
|
1773
1774
|
if (i !== void 0)
|
|
1774
1775
|
return i;
|
|
1775
1776
|
const d = n.find(([p]) => p === u);
|
|
1776
1777
|
return d ? d[1]() : r;
|
|
1777
1778
|
});
|
|
1778
|
-
},
|
|
1779
|
+
}, To = (e, s = {}) => {
|
|
1779
1780
|
const { fromTimezone: t, toTimezone: o } = s;
|
|
1780
1781
|
if (!e)
|
|
1781
1782
|
return null;
|
|
1782
1783
|
const l = e.replace(" ", "T");
|
|
1783
1784
|
return t && o ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(o) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
|
|
1784
|
-
},
|
|
1785
|
+
}, Lo = (e) => (s, t, o, l, n, a, c) => {
|
|
1785
1786
|
t.innerHTML = "", t.classList.add("spark-table-cell-datetime");
|
|
1786
1787
|
const r = c.rendererConfig || {}, {
|
|
1787
1788
|
format: i = "DD MMM YYYY, HH:mm",
|
|
1788
1789
|
fromTimezone: u,
|
|
1789
1790
|
toTimezone: d,
|
|
1790
1791
|
locale: p = "en-US",
|
|
1791
|
-
emptyText:
|
|
1792
|
+
emptyText: v = ""
|
|
1792
1793
|
} = r;
|
|
1793
1794
|
if (!a) {
|
|
1794
|
-
t.textContent =
|
|
1795
|
+
t.textContent = v;
|
|
1795
1796
|
return;
|
|
1796
1797
|
}
|
|
1797
1798
|
try {
|
|
1798
|
-
const k =
|
|
1799
|
+
const k = To(a, { fromTimezone: u, toTimezone: d });
|
|
1799
1800
|
if (!k) {
|
|
1800
|
-
t.textContent =
|
|
1801
|
+
t.textContent = v;
|
|
1801
1802
|
return;
|
|
1802
1803
|
}
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1804
|
+
const $ = $o(k, i, { locale: p }), g = document.createElement("span");
|
|
1805
|
+
g.textContent = $, t.appendChild(g);
|
|
1805
1806
|
} catch (k) {
|
|
1806
1807
|
console.error("Error formatting datetime:", k, { value: a, format: i }), t.textContent = a;
|
|
1807
1808
|
}
|
|
1808
|
-
},
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
}),
|
|
1812
|
-
},
|
|
1813
|
-
U("spark.actions",
|
|
1809
|
+
}, Po = /* @__PURE__ */ new Map(), U = (e, s) => {
|
|
1810
|
+
Yt(e, (t, o, l, n, a, c, r) => {
|
|
1811
|
+
Xt.apply(null, [t, o, l, n, a, c, r]), s(t, o, l, n, a, c, r);
|
|
1812
|
+
}), Po.set(e, s);
|
|
1813
|
+
}, Mo = (e) => {
|
|
1814
|
+
U("spark.actions", uo(e)), U("spark.badge", po()), U("spark.boolean", mo()), U("spark.currency", go()), U("spark.link", yo()), U("spark.image", vo()), U("spark.date", bo()), U("spark.datetime", Lo()), U("style.capitalize", (s, t, o, l, n, a) => {
|
|
1814
1815
|
if (!a || a.length === 0) {
|
|
1815
1816
|
t.innerText = "";
|
|
1816
1817
|
return;
|
|
@@ -1818,118 +1819,118 @@ const vo = (e) => {
|
|
|
1818
1819
|
const c = document.createElement("span");
|
|
1819
1820
|
c.innerHTML = a, c.classList.add("capitalize"), t.replaceChildren(c);
|
|
1820
1821
|
});
|
|
1821
|
-
},
|
|
1822
|
-
},
|
|
1823
|
-
const t = J(), o = ne(), l = s.namespace, n = l === null, a = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${o.path}` : `spark-table:${l}`, d = (
|
|
1822
|
+
}, Ho = () => {
|
|
1823
|
+
}, Vo = (e, s = {}) => {
|
|
1824
|
+
const t = J(), o = ne(), l = s.namespace, n = l === null, a = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${o.path}` : `spark-table:${l}`, d = (y, S = "") => {
|
|
1824
1825
|
const M = {};
|
|
1825
|
-
return Object.keys(
|
|
1826
|
-
const W =
|
|
1827
|
-
W != null && (typeof W == "object" && !Array.isArray(W) ? Object.assign(M, d(W,
|
|
1826
|
+
return Object.keys(y).forEach((z) => {
|
|
1827
|
+
const W = y[z], de = S ? `${S}[${z}]` : z;
|
|
1828
|
+
W != null && (typeof W == "object" && !Array.isArray(W) ? Object.assign(M, d(W, de)) : M[de] = String(W));
|
|
1828
1829
|
}), M;
|
|
1829
1830
|
}, p = () => {
|
|
1830
1831
|
if (c)
|
|
1831
1832
|
try {
|
|
1832
|
-
const
|
|
1833
|
+
const y = {
|
|
1833
1834
|
params: e.params,
|
|
1834
1835
|
timestamp: Date.now()
|
|
1835
1836
|
};
|
|
1836
|
-
localStorage.setItem(u, JSON.stringify(
|
|
1837
|
-
} catch (
|
|
1838
|
-
console.warn("Failed to save table state to localStorage:",
|
|
1837
|
+
localStorage.setItem(u, JSON.stringify(y));
|
|
1838
|
+
} catch (y) {
|
|
1839
|
+
console.warn("Failed to save table state to localStorage:", y);
|
|
1839
1840
|
}
|
|
1840
|
-
},
|
|
1841
|
+
}, v = () => {
|
|
1841
1842
|
if (!c) return null;
|
|
1842
1843
|
try {
|
|
1843
|
-
const
|
|
1844
|
-
if (!
|
|
1845
|
-
const
|
|
1844
|
+
const y = localStorage.getItem(u);
|
|
1845
|
+
if (!y) return null;
|
|
1846
|
+
const S = JSON.parse(y);
|
|
1846
1847
|
if (i > 0) {
|
|
1847
|
-
const M = Date.now() -
|
|
1848
|
-
if (M >
|
|
1848
|
+
const M = Date.now() - S.timestamp, z = i * 24 * 60 * 60 * 1e3;
|
|
1849
|
+
if (M > z)
|
|
1849
1850
|
return localStorage.removeItem(u), null;
|
|
1850
1851
|
}
|
|
1851
|
-
return
|
|
1852
|
-
} catch (
|
|
1853
|
-
return console.warn("Failed to load table state from localStorage:",
|
|
1852
|
+
return S.params;
|
|
1853
|
+
} catch (y) {
|
|
1854
|
+
return console.warn("Failed to load table state from localStorage:", y), null;
|
|
1854
1855
|
}
|
|
1855
1856
|
}, k = () => {
|
|
1856
1857
|
try {
|
|
1857
1858
|
localStorage.removeItem(u);
|
|
1858
|
-
} catch (
|
|
1859
|
-
console.warn("Failed to clear table state from localStorage:",
|
|
1859
|
+
} catch (y) {
|
|
1860
|
+
console.warn("Failed to clear table state from localStorage:", y);
|
|
1860
1861
|
}
|
|
1861
|
-
},
|
|
1862
|
+
}, $ = () => {
|
|
1862
1863
|
if (!a) return;
|
|
1863
|
-
const
|
|
1864
|
+
const y = { ...o.query };
|
|
1864
1865
|
if (n) {
|
|
1865
|
-
Object.keys(
|
|
1866
|
-
|
|
1866
|
+
Object.keys(y).forEach((M) => {
|
|
1867
|
+
g(M) && delete y[M];
|
|
1867
1868
|
});
|
|
1868
|
-
const
|
|
1869
|
-
Object.assign(
|
|
1869
|
+
const S = d(e.params);
|
|
1870
|
+
Object.assign(y, S);
|
|
1870
1871
|
} else {
|
|
1871
|
-
Object.keys(
|
|
1872
|
-
(M.startsWith(`${l}[`) || M === l) && delete
|
|
1872
|
+
Object.keys(y).forEach((M) => {
|
|
1873
|
+
(M.startsWith(`${l}[`) || M === l) && delete y[M];
|
|
1873
1874
|
});
|
|
1874
|
-
const
|
|
1875
|
-
Object.assign(
|
|
1875
|
+
const S = d(e.params, l);
|
|
1876
|
+
Object.assign(y, S);
|
|
1876
1877
|
}
|
|
1877
|
-
t.replace({ query:
|
|
1878
|
-
},
|
|
1879
|
-
if (["page", "limit"].includes(
|
|
1880
|
-
const
|
|
1881
|
-
return isNaN(
|
|
1878
|
+
t.replace({ query: y });
|
|
1879
|
+
}, g = (y) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(y) || y.includes("[")), _ = (y, S) => {
|
|
1880
|
+
if (["page", "limit"].includes(y) && S !== null && S !== void 0) {
|
|
1881
|
+
const z = parseInt(S, 10);
|
|
1882
|
+
return isNaN(z) ? S : z;
|
|
1882
1883
|
}
|
|
1883
|
-
return
|
|
1884
|
-
},
|
|
1884
|
+
return S;
|
|
1885
|
+
}, w = () => {
|
|
1885
1886
|
if (n)
|
|
1886
|
-
Object.keys(o.query).forEach((
|
|
1887
|
-
|
|
1887
|
+
Object.keys(o.query).forEach((y) => {
|
|
1888
|
+
g(y) && (e.params[y] = _(y, o.query[y]));
|
|
1888
1889
|
});
|
|
1889
1890
|
else {
|
|
1890
|
-
const
|
|
1891
|
-
Object.keys(o.query).forEach((
|
|
1892
|
-
if (
|
|
1893
|
-
const M =
|
|
1894
|
-
e.params[M] =
|
|
1891
|
+
const y = `${l}[`;
|
|
1892
|
+
Object.keys(o.query).forEach((S) => {
|
|
1893
|
+
if (S.startsWith(y)) {
|
|
1894
|
+
const M = S.slice(y.length, -1);
|
|
1895
|
+
e.params[M] = _(M, o.query[S]);
|
|
1895
1896
|
}
|
|
1896
1897
|
});
|
|
1897
1898
|
}
|
|
1898
1899
|
};
|
|
1899
|
-
return
|
|
1900
|
+
return I(
|
|
1900
1901
|
() => e.params,
|
|
1901
1902
|
() => {
|
|
1902
|
-
a &&
|
|
1903
|
+
a && $(), c && p();
|
|
1903
1904
|
},
|
|
1904
1905
|
{ deep: !0 }
|
|
1905
|
-
), r &&
|
|
1906
|
-
let
|
|
1906
|
+
), r && xe(() => {
|
|
1907
|
+
let y = !1;
|
|
1907
1908
|
if (a) {
|
|
1908
|
-
let
|
|
1909
|
+
let S = !1;
|
|
1909
1910
|
if (n)
|
|
1910
|
-
|
|
1911
|
+
S = Object.keys(o.query).some((M) => g(M));
|
|
1911
1912
|
else {
|
|
1912
1913
|
const M = `${l}[`;
|
|
1913
|
-
|
|
1914
|
-
(
|
|
1914
|
+
S = Object.keys(o.query).some(
|
|
1915
|
+
(z) => z.startsWith(M)
|
|
1915
1916
|
);
|
|
1916
1917
|
}
|
|
1917
|
-
|
|
1918
|
+
S && (y = !0, w());
|
|
1918
1919
|
}
|
|
1919
|
-
if (!
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}), Object.assign(e.params,
|
|
1920
|
+
if (!y && c) {
|
|
1921
|
+
const S = v();
|
|
1922
|
+
S && Object.keys(S).length > 0 && (Object.keys(S).forEach((M) => {
|
|
1923
|
+
S[M] = _(M, S[M]);
|
|
1924
|
+
}), Object.assign(e.params, S));
|
|
1924
1925
|
}
|
|
1925
1926
|
}), {
|
|
1926
|
-
syncToRoute:
|
|
1927
|
-
restoreFromRoute:
|
|
1927
|
+
syncToRoute: $,
|
|
1928
|
+
restoreFromRoute: w,
|
|
1928
1929
|
saveToStorage: p,
|
|
1929
|
-
loadFromStorage:
|
|
1930
|
+
loadFromStorage: v,
|
|
1930
1931
|
clearStorage: k
|
|
1931
1932
|
};
|
|
1932
|
-
},
|
|
1933
|
+
}, Ro = { class: "flex items-center gap-4 py-3" }, Eo = { class: "shrink-0" }, Bo = { class: "text-sm text-gray-700" }, Ao = { class: "font-medium" }, Fo = { class: "font-medium" }, Oo = { class: "font-medium" }, zo = {
|
|
1933
1934
|
__name: "SparkTablePaginationDetails",
|
|
1934
1935
|
props: {
|
|
1935
1936
|
sparkTable: {
|
|
@@ -1939,29 +1940,29 @@ const vo = (e) => {
|
|
|
1939
1940
|
},
|
|
1940
1941
|
setup(e) {
|
|
1941
1942
|
const s = e;
|
|
1942
|
-
return (t, o) => (m(),
|
|
1943
|
-
f("div",
|
|
1944
|
-
f("div",
|
|
1945
|
-
f("div",
|
|
1946
|
-
o[0] || (o[0] =
|
|
1947
|
-
f("span",
|
|
1948
|
-
o[1] || (o[1] =
|
|
1949
|
-
f("span",
|
|
1950
|
-
o[2] || (o[2] =
|
|
1951
|
-
f("span",
|
|
1952
|
-
o[3] || (o[3] =
|
|
1943
|
+
return (t, o) => (m(), h("div", null, [
|
|
1944
|
+
f("div", Ro, [
|
|
1945
|
+
f("div", Eo, [
|
|
1946
|
+
f("div", Bo, [
|
|
1947
|
+
o[0] || (o[0] = E(" Showing ", -1)),
|
|
1948
|
+
f("span", Ao, P(s.sparkTable.response.meta.from), 1),
|
|
1949
|
+
o[1] || (o[1] = E(" to ", -1)),
|
|
1950
|
+
f("span", Fo, P(s.sparkTable.response.meta.to), 1),
|
|
1951
|
+
o[2] || (o[2] = E(" of ", -1)),
|
|
1952
|
+
f("span", Oo, P(s.sparkTable.response.meta.total), 1),
|
|
1953
|
+
o[3] || (o[3] = E(" results ", -1))
|
|
1953
1954
|
])
|
|
1954
1955
|
])
|
|
1955
1956
|
])
|
|
1956
1957
|
]));
|
|
1957
1958
|
}
|
|
1958
|
-
},
|
|
1959
|
+
}, Do = { class: "flex items-center gap-4 px-4 py-3" }, jo = {
|
|
1959
1960
|
key: 0,
|
|
1960
1961
|
class: "shrink-0 ml-auto"
|
|
1961
|
-
},
|
|
1962
|
+
}, Io = {
|
|
1962
1963
|
class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
|
|
1963
1964
|
"aria-label": "Pagination"
|
|
1964
|
-
},
|
|
1965
|
+
}, No = ["onClick"], Zo = {
|
|
1965
1966
|
__name: "SparkTablePaginationPaging",
|
|
1966
1967
|
props: {
|
|
1967
1968
|
sparkTable: {
|
|
@@ -1977,51 +1978,51 @@ const vo = (e) => {
|
|
|
1977
1978
|
u < 1 || u > t.sparkTable.response.meta.last_page || o("paginate", {
|
|
1978
1979
|
page: u
|
|
1979
1980
|
});
|
|
1980
|
-
}, a =
|
|
1981
|
+
}, a = C(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = C(() => t.sparkTable.computed.ready ? jt(
|
|
1981
1982
|
Math.floor((a.value - 1) / 10) * 10 + 1,
|
|
1982
1983
|
a.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : a.value + 1
|
|
1983
|
-
) : []), r =
|
|
1984
|
+
) : []), r = C(
|
|
1984
1985
|
() => t.sparkTable.params.page < Y(t.sparkTable.response.meta, "last_page", 1)
|
|
1985
|
-
), i =
|
|
1986
|
+
), i = C(() => t.sparkTable.params.page > 1);
|
|
1986
1987
|
return (u, d) => {
|
|
1987
1988
|
const p = A("font-awesome-icon");
|
|
1988
|
-
return m(),
|
|
1989
|
-
f("div",
|
|
1990
|
-
c.value.length > 1 ? (m(),
|
|
1989
|
+
return m(), h("div", null, [
|
|
1990
|
+
f("div", Do, [
|
|
1991
|
+
c.value.length > 1 ? (m(), h("div", jo, [
|
|
1991
1992
|
f("div", null, [
|
|
1992
|
-
f("nav",
|
|
1993
|
+
f("nav", Io, [
|
|
1993
1994
|
f("a", {
|
|
1994
1995
|
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"]),
|
|
1995
1996
|
href: "#",
|
|
1996
|
-
onClick: d[0] || (d[0] = Q((
|
|
1997
|
+
onClick: d[0] || (d[0] = Q((v) => l(-1), ["prevent"]))
|
|
1997
1998
|
}, [
|
|
1998
1999
|
b(p, {
|
|
1999
|
-
icon:
|
|
2000
|
+
icon: x(F).farChevronLeft,
|
|
2000
2001
|
class: "size-5"
|
|
2001
2002
|
}, null, 8, ["icon"])
|
|
2002
2003
|
], 2),
|
|
2003
|
-
(m(!0),
|
|
2004
|
-
key: `page-${
|
|
2004
|
+
(m(!0), h(R, null, D(c.value, (v) => (m(), h("a", {
|
|
2005
|
+
key: `page-${v}`,
|
|
2005
2006
|
href: "#",
|
|
2006
2007
|
class: H([
|
|
2007
2008
|
"relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
|
|
2008
|
-
e.sparkTable.params.page ===
|
|
2009
|
+
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"
|
|
2009
2010
|
]),
|
|
2010
|
-
onClick: (k) => n(
|
|
2011
|
-
},
|
|
2011
|
+
onClick: (k) => n(v)
|
|
2012
|
+
}, P(v), 11, No))), 128)),
|
|
2012
2013
|
f("a", {
|
|
2013
2014
|
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"]),
|
|
2014
|
-
onClick: d[1] || (d[1] = Q((
|
|
2015
|
+
onClick: d[1] || (d[1] = Q((v) => l(1), ["prevent"])),
|
|
2015
2016
|
href: "#"
|
|
2016
2017
|
}, [
|
|
2017
2018
|
b(p, {
|
|
2018
|
-
icon:
|
|
2019
|
+
icon: x(F).farChevronRight,
|
|
2019
2020
|
class: "size-5"
|
|
2020
2021
|
}, null, 8, ["icon"])
|
|
2021
2022
|
], 2)
|
|
2022
2023
|
])
|
|
2023
2024
|
])
|
|
2024
|
-
])) :
|
|
2025
|
+
])) : L("", !0)
|
|
2025
2026
|
])
|
|
2026
2027
|
]);
|
|
2027
2028
|
};
|
|
@@ -2031,7 +2032,7 @@ const vo = (e) => {
|
|
|
2031
2032
|
for (const [o, l] of s)
|
|
2032
2033
|
t[o] = l;
|
|
2033
2034
|
return t;
|
|
2034
|
-
},
|
|
2035
|
+
}, qo = { class: "spark-table-pagination-per-page" }, Uo = {
|
|
2035
2036
|
__name: "SparkTablePaginationPerPage",
|
|
2036
2037
|
props: {
|
|
2037
2038
|
sparkTable: {
|
|
@@ -2041,7 +2042,7 @@ const vo = (e) => {
|
|
|
2041
2042
|
},
|
|
2042
2043
|
emits: ["paginate"],
|
|
2043
2044
|
setup(e, { emit: s }) {
|
|
2044
|
-
const t = e, o = s, l =
|
|
2045
|
+
const t = e, o = s, l = C(() => t.sparkTable.options.perPages.map((a) => ({
|
|
2045
2046
|
label: String(a),
|
|
2046
2047
|
value: a
|
|
2047
2048
|
}))), n = (a) => {
|
|
@@ -2052,7 +2053,7 @@ const vo = (e) => {
|
|
|
2052
2053
|
};
|
|
2053
2054
|
return (a, c) => {
|
|
2054
2055
|
const r = A("FormKit");
|
|
2055
|
-
return m(),
|
|
2056
|
+
return m(), h("div", qo, [
|
|
2056
2057
|
b(r, {
|
|
2057
2058
|
"model-value": e.sparkTable.params.limit,
|
|
2058
2059
|
type: "select",
|
|
@@ -2065,7 +2066,7 @@ const vo = (e) => {
|
|
|
2065
2066
|
]);
|
|
2066
2067
|
};
|
|
2067
2068
|
}
|
|
2068
|
-
},
|
|
2069
|
+
}, Ko = /* @__PURE__ */ ee(Uo, [["__scopeId", "data-v-9ef8544b"]]), Pe = {
|
|
2069
2070
|
__name: "SparkTableToolbar",
|
|
2070
2071
|
props: {
|
|
2071
2072
|
position: {
|
|
@@ -2075,18 +2076,18 @@ const vo = (e) => {
|
|
|
2075
2076
|
}
|
|
2076
2077
|
},
|
|
2077
2078
|
setup(e) {
|
|
2078
|
-
const s = e, t =
|
|
2079
|
+
const s = e, t = Ee(), o = C(() => !!t.default), l = C(() => {
|
|
2079
2080
|
const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
|
|
2080
2081
|
return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
|
|
2081
2082
|
});
|
|
2082
|
-
return (n, a) => o.value ? (m(),
|
|
2083
|
+
return (n, a) => o.value ? (m(), h("div", {
|
|
2083
2084
|
key: 0,
|
|
2084
2085
|
class: H(l.value)
|
|
2085
2086
|
}, [
|
|
2086
2087
|
O(n.$slots, "default")
|
|
2087
|
-
], 2)) :
|
|
2088
|
+
], 2)) : L("", !0);
|
|
2088
2089
|
}
|
|
2089
|
-
},
|
|
2090
|
+
}, Go = { class: "spark-table-search" }, Wo = {
|
|
2090
2091
|
__name: "SparkTableSearch",
|
|
2091
2092
|
props: {
|
|
2092
2093
|
/** SparkTable instance object */
|
|
@@ -2105,7 +2106,7 @@ const vo = (e) => {
|
|
|
2105
2106
|
}
|
|
2106
2107
|
},
|
|
2107
2108
|
setup(e) {
|
|
2108
|
-
const s = e, t =
|
|
2109
|
+
const s = e, t = B(""), o = s.config.param || "search";
|
|
2109
2110
|
s.sparkTable.params[o] ? t.value = s.sparkTable.params[o] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2110
2111
|
[o]: s.config.initialValue
|
|
2111
2112
|
}));
|
|
@@ -2115,23 +2116,23 @@ const vo = (e) => {
|
|
|
2115
2116
|
[o]: a
|
|
2116
2117
|
}) : s.sparkTable.methods.removeParam(o);
|
|
2117
2118
|
}, s.config.debounce || 300);
|
|
2118
|
-
|
|
2119
|
+
I(t, (a) => {
|
|
2119
2120
|
l(a);
|
|
2120
2121
|
});
|
|
2121
2122
|
const n = s.config.placeholder || "Search...";
|
|
2122
|
-
return
|
|
2123
|
+
return I(
|
|
2123
2124
|
() => s.sparkTable.params[o],
|
|
2124
2125
|
(a) => {
|
|
2125
2126
|
a && a !== t.value ? t.value = a : !a && t.value && (t.value = "");
|
|
2126
2127
|
}
|
|
2127
2128
|
), (a, c) => {
|
|
2128
2129
|
const r = A("FormKit");
|
|
2129
|
-
return m(),
|
|
2130
|
+
return m(), h("div", Go, [
|
|
2130
2131
|
b(r, Z({
|
|
2131
2132
|
modelValue: t.value,
|
|
2132
2133
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2133
2134
|
type: "text",
|
|
2134
|
-
placeholder:
|
|
2135
|
+
placeholder: x(n),
|
|
2135
2136
|
suffixIcon: "search",
|
|
2136
2137
|
"outer-class": "!mb-0",
|
|
2137
2138
|
"wrapper-class": "!mb-0",
|
|
@@ -2140,7 +2141,7 @@ const vo = (e) => {
|
|
|
2140
2141
|
]);
|
|
2141
2142
|
};
|
|
2142
2143
|
}
|
|
2143
|
-
},
|
|
2144
|
+
}, Yo = /* @__PURE__ */ ee(Wo, [["__scopeId", "data-v-976170dc"]]), Xo = { class: "spark-table-filter-select" }, Jo = {
|
|
2144
2145
|
__name: "SparkTableFilterSelect",
|
|
2145
2146
|
props: {
|
|
2146
2147
|
/** SparkTable instance object */
|
|
@@ -2156,32 +2157,32 @@ const vo = (e) => {
|
|
|
2156
2157
|
}
|
|
2157
2158
|
},
|
|
2158
2159
|
setup(e) {
|
|
2159
|
-
const s = e, t =
|
|
2160
|
+
const s = e, t = B(""), o = s.config.param || `filter[${s.config.key}]`;
|
|
2160
2161
|
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({
|
|
2161
2162
|
[o]: s.config.initialValue
|
|
2162
2163
|
}));
|
|
2163
|
-
const l = s.config.label || null, n =
|
|
2164
|
+
const l = s.config.label || null, n = C(() => [
|
|
2164
2165
|
{ label: s.config.placeholder || "All", value: "" },
|
|
2165
2166
|
...s.config.options
|
|
2166
2167
|
]);
|
|
2167
|
-
return
|
|
2168
|
+
return I(t, (a) => {
|
|
2168
2169
|
a ? s.sparkTable.methods.applyParams({
|
|
2169
2170
|
page: 1,
|
|
2170
2171
|
[o]: a
|
|
2171
2172
|
}) : s.sparkTable.methods.removeParam(o);
|
|
2172
|
-
}),
|
|
2173
|
+
}), I(
|
|
2173
2174
|
() => s.sparkTable.params[o],
|
|
2174
2175
|
(a) => {
|
|
2175
2176
|
a != null && a !== "" ? t.value !== a && (t.value = a) : t.value && (t.value = "");
|
|
2176
2177
|
}
|
|
2177
2178
|
), (a, c) => {
|
|
2178
2179
|
const r = A("FormKit");
|
|
2179
|
-
return m(),
|
|
2180
|
+
return m(), h("div", Xo, [
|
|
2180
2181
|
b(r, Z({
|
|
2181
2182
|
modelValue: t.value,
|
|
2182
2183
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2183
2184
|
type: "select",
|
|
2184
|
-
label:
|
|
2185
|
+
label: x(l),
|
|
2185
2186
|
options: n.value,
|
|
2186
2187
|
placeholder: e.config.placeholder || "All",
|
|
2187
2188
|
"outer-class": "!mb-0",
|
|
@@ -2190,10 +2191,10 @@ const vo = (e) => {
|
|
|
2190
2191
|
]);
|
|
2191
2192
|
};
|
|
2192
2193
|
}
|
|
2193
|
-
},
|
|
2194
|
+
}, Qo = /* @__PURE__ */ ee(Jo, [["__scopeId", "data-v-642dbc69"]]), ea = { class: "spark-table-filter-buttons" }, ta = {
|
|
2194
2195
|
key: 0,
|
|
2195
2196
|
class: "spark-table-filter-buttons-label"
|
|
2196
|
-
},
|
|
2197
|
+
}, sa = {
|
|
2197
2198
|
__name: "SparkTableFilterButtons",
|
|
2198
2199
|
props: {
|
|
2199
2200
|
/** SparkTable instance object */
|
|
@@ -2209,7 +2210,7 @@ const vo = (e) => {
|
|
|
2209
2210
|
}
|
|
2210
2211
|
},
|
|
2211
2212
|
setup(e) {
|
|
2212
|
-
const s = e, t =
|
|
2213
|
+
const s = e, t = B(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
|
|
2213
2214
|
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({
|
|
2214
2215
|
[l]: s.config.initialValue
|
|
2215
2216
|
}));
|
|
@@ -2219,23 +2220,23 @@ const vo = (e) => {
|
|
|
2219
2220
|
[l]: c
|
|
2220
2221
|
});
|
|
2221
2222
|
};
|
|
2222
|
-
return
|
|
2223
|
+
return I(
|
|
2223
2224
|
() => s.sparkTable.params[l],
|
|
2224
2225
|
(c) => {
|
|
2225
2226
|
(c == null || c === "") && t.value ? t.value = null : c !== t.value && (t.value = c);
|
|
2226
2227
|
}
|
|
2227
|
-
), (c, r) => (m(),
|
|
2228
|
-
|
|
2229
|
-
b(
|
|
2230
|
-
default:
|
|
2231
|
-
(m(!0),
|
|
2228
|
+
), (c, r) => (m(), h("div", ea, [
|
|
2229
|
+
x(o) ? (m(), h("span", ta, P(x(o)), 1)) : L("", !0),
|
|
2230
|
+
b(Us, { class: "isolate" }, {
|
|
2231
|
+
default: T(() => [
|
|
2232
|
+
(m(!0), h(R, null, D(e.config.options, (i) => (m(), V(G, {
|
|
2232
2233
|
key: i.value,
|
|
2233
2234
|
size: "xl",
|
|
2234
2235
|
variant: n(i.value) ? "primary" : "secondary",
|
|
2235
2236
|
onClick: (u) => a(i.value)
|
|
2236
2237
|
}, {
|
|
2237
|
-
default:
|
|
2238
|
-
|
|
2238
|
+
default: T(() => [
|
|
2239
|
+
E(P(i.label), 1)
|
|
2239
2240
|
]),
|
|
2240
2241
|
_: 2
|
|
2241
2242
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -2244,7 +2245,7 @@ const vo = (e) => {
|
|
|
2244
2245
|
})
|
|
2245
2246
|
]));
|
|
2246
2247
|
}
|
|
2247
|
-
},
|
|
2248
|
+
}, oa = /* @__PURE__ */ ee(sa, [["__scopeId", "data-v-0fcd0cce"]]), aa = { class: "spark-table-date-picker" }, ra = {
|
|
2248
2249
|
__name: "SparkTableDatePicker",
|
|
2249
2250
|
props: {
|
|
2250
2251
|
/** SparkTable instance object */
|
|
@@ -2260,15 +2261,15 @@ const vo = (e) => {
|
|
|
2260
2261
|
}
|
|
2261
2262
|
},
|
|
2262
2263
|
setup(e) {
|
|
2263
|
-
const s = e, t =
|
|
2264
|
+
const s = e, t = B(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = B(`${l}-0`);
|
|
2264
2265
|
return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
2265
2266
|
[l]: s.config.initialValue
|
|
2266
|
-
})) : t.value = null,
|
|
2267
|
+
})) : t.value = null, I(t, (a) => {
|
|
2267
2268
|
a ? s.sparkTable.methods.applyParams({
|
|
2268
2269
|
page: 1,
|
|
2269
2270
|
[l]: a
|
|
2270
2271
|
}) : s.sparkTable.methods.removeParam(l);
|
|
2271
|
-
}),
|
|
2272
|
+
}), I(
|
|
2272
2273
|
() => s.sparkTable.params[l],
|
|
2273
2274
|
(a) => {
|
|
2274
2275
|
if ((a == null || a === "") && t.value) {
|
|
@@ -2279,14 +2280,14 @@ const vo = (e) => {
|
|
|
2279
2280
|
}
|
|
2280
2281
|
), (a, c) => {
|
|
2281
2282
|
const r = A("FormKit");
|
|
2282
|
-
return m(),
|
|
2283
|
+
return m(), h("div", aa, [
|
|
2283
2284
|
(m(), V(r, Z({
|
|
2284
2285
|
key: n.value,
|
|
2285
2286
|
modelValue: t.value,
|
|
2286
2287
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
|
|
2287
2288
|
type: "datepicker",
|
|
2288
2289
|
"picker-only": "",
|
|
2289
|
-
label:
|
|
2290
|
+
label: x(o),
|
|
2290
2291
|
placeholder: e.config.placeholder || "Select date",
|
|
2291
2292
|
overlay: !0,
|
|
2292
2293
|
"value-format": "YYYY-MM-DD",
|
|
@@ -2297,7 +2298,7 @@ const vo = (e) => {
|
|
|
2297
2298
|
]);
|
|
2298
2299
|
};
|
|
2299
2300
|
}
|
|
2300
|
-
},
|
|
2301
|
+
}, na = /* @__PURE__ */ ee(ra, [["__scopeId", "data-v-44ef9cb8"]]), la = { class: "spark-table-reset" }, ia = { key: 1 }, ca = {
|
|
2301
2302
|
__name: "SparkTableReset",
|
|
2302
2303
|
props: {
|
|
2303
2304
|
/** SparkTable instance object */
|
|
@@ -2335,34 +2336,37 @@ const vo = (e) => {
|
|
|
2335
2336
|
};
|
|
2336
2337
|
return (o, l) => {
|
|
2337
2338
|
const n = A("font-awesome-icon");
|
|
2338
|
-
return m(),
|
|
2339
|
+
return m(), h("div", la, [
|
|
2339
2340
|
b(G, {
|
|
2340
2341
|
onClick: t,
|
|
2341
2342
|
variant: "secondary",
|
|
2342
2343
|
size: "xl"
|
|
2343
2344
|
}, {
|
|
2344
|
-
default:
|
|
2345
|
+
default: T(() => [
|
|
2345
2346
|
e.config.icon ? (m(), V(n, {
|
|
2346
2347
|
key: 0,
|
|
2347
2348
|
icon: ["far", e.config.icon],
|
|
2348
2349
|
class: H({ "mr-1.5": e.config.label })
|
|
2349
|
-
}, null, 8, ["icon", "class"])) :
|
|
2350
|
-
e.config.label ? (m(),
|
|
2350
|
+
}, null, 8, ["icon", "class"])) : L("", !0),
|
|
2351
|
+
e.config.label ? (m(), h("span", ia, P(e.config.label), 1)) : L("", !0)
|
|
2351
2352
|
]),
|
|
2352
2353
|
_: 1
|
|
2353
2354
|
})
|
|
2354
2355
|
]);
|
|
2355
2356
|
};
|
|
2356
2357
|
}
|
|
2357
|
-
},
|
|
2358
|
+
}, ua = /* @__PURE__ */ ee(ca, [["__scopeId", "data-v-45343158"]]), da = { class: "spark-table" }, pa = {
|
|
2358
2359
|
key: 1,
|
|
2359
2360
|
class: "pt-5"
|
|
2360
|
-
},
|
|
2361
|
+
}, fa = {
|
|
2362
|
+
key: 2,
|
|
2363
|
+
class: "flex flex-col items-center justify-center py-16 text-gray-500 rounded-md border border-gray-300 bg-white"
|
|
2364
|
+
}, ma = { class: "flex items-center gap-x-3 ml-auto" }, be = {
|
|
2361
2365
|
perPages: [15, 30, 50, 100, 200, 500],
|
|
2362
2366
|
limit: 15
|
|
2363
|
-
},
|
|
2367
|
+
}, ha = {
|
|
2364
2368
|
page: 1,
|
|
2365
|
-
limit:
|
|
2369
|
+
limit: be.limit
|
|
2366
2370
|
}, Me = {
|
|
2367
2371
|
colHeaders: !0,
|
|
2368
2372
|
filters: !1,
|
|
@@ -2373,7 +2377,7 @@ const vo = (e) => {
|
|
|
2373
2377
|
tableClassName: "spark-table-table",
|
|
2374
2378
|
readOnlyCellClassName: "read-only",
|
|
2375
2379
|
licenseKey: "non-commercial-and-evaluation"
|
|
2376
|
-
},
|
|
2380
|
+
}, gn = {
|
|
2377
2381
|
__name: "SparkTable",
|
|
2378
2382
|
props: {
|
|
2379
2383
|
url: {
|
|
@@ -2397,13 +2401,13 @@ const vo = (e) => {
|
|
|
2397
2401
|
params: {
|
|
2398
2402
|
type: Object,
|
|
2399
2403
|
default() {
|
|
2400
|
-
return
|
|
2404
|
+
return ha;
|
|
2401
2405
|
}
|
|
2402
2406
|
},
|
|
2403
2407
|
options: {
|
|
2404
2408
|
type: Object,
|
|
2405
2409
|
default() {
|
|
2406
|
-
return
|
|
2410
|
+
return be;
|
|
2407
2411
|
}
|
|
2408
2412
|
},
|
|
2409
2413
|
settings: {
|
|
@@ -2438,18 +2442,18 @@ const vo = (e) => {
|
|
|
2438
2442
|
],
|
|
2439
2443
|
setup(e, { expose: s, emit: t }) {
|
|
2440
2444
|
const o = e;
|
|
2441
|
-
|
|
2442
|
-
const l = t, n = Ve("axios"), a =
|
|
2445
|
+
Wt(), pe(qt), pe(Ut), pe(Kt), Y(o, "settings.nestedHeaders") && pe(Gt);
|
|
2446
|
+
const l = t, n = Ve("axios"), a = B(null), c = B(!1), r = B(null);
|
|
2443
2447
|
let i = !1;
|
|
2444
2448
|
const u = {
|
|
2445
|
-
search:
|
|
2446
|
-
filterSelect:
|
|
2447
|
-
filterButtons:
|
|
2448
|
-
datePicker:
|
|
2449
|
-
reset:
|
|
2449
|
+
search: Yo,
|
|
2450
|
+
filterSelect: Qo,
|
|
2451
|
+
filterButtons: oa,
|
|
2452
|
+
datePicker: na,
|
|
2453
|
+
reset: ua
|
|
2450
2454
|
}, d = q({
|
|
2451
2455
|
hotInstance: null,
|
|
2452
|
-
url:
|
|
2456
|
+
url: C(() => o.url),
|
|
2453
2457
|
plugins: o.plugins,
|
|
2454
2458
|
response: {},
|
|
2455
2459
|
params: {
|
|
@@ -2457,144 +2461,146 @@ const vo = (e) => {
|
|
|
2457
2461
|
limit: o.options.limit
|
|
2458
2462
|
},
|
|
2459
2463
|
methods: {
|
|
2460
|
-
applyParams: (
|
|
2461
|
-
|
|
2464
|
+
applyParams: (g) => {
|
|
2465
|
+
g && (d.params = {
|
|
2462
2466
|
...d.params,
|
|
2463
|
-
...
|
|
2467
|
+
...g
|
|
2464
2468
|
}, l("page-change", d.params));
|
|
2465
2469
|
},
|
|
2466
|
-
removeParam: async (
|
|
2467
|
-
d.params[
|
|
2470
|
+
removeParam: async (g) => {
|
|
2471
|
+
d.params[g] && (delete d.params[g], await d.methods.loadTable());
|
|
2468
2472
|
},
|
|
2469
|
-
loadTable: async (
|
|
2473
|
+
loadTable: async (g) => {
|
|
2470
2474
|
if (!(!a.value || !a.value.hotInstance)) {
|
|
2471
|
-
c.value = !0, r.value = null, l("loading", !0),
|
|
2475
|
+
c.value = !0, r.value = null, l("loading", !0), he.start(), d.hotInstance = a.value.hotInstance;
|
|
2472
2476
|
try {
|
|
2473
2477
|
if (o.dataProvider) {
|
|
2474
|
-
const
|
|
2475
|
-
d.response = o.dataTransformer(
|
|
2478
|
+
const y = await o.dataProvider(d.computed.params);
|
|
2479
|
+
d.response = o.dataTransformer(y, o);
|
|
2476
2480
|
} else if (o.url) {
|
|
2477
|
-
const
|
|
2481
|
+
const y = await n.get(o.url, {
|
|
2478
2482
|
params: d.computed.params
|
|
2479
2483
|
});
|
|
2480
|
-
d.response = o.dataTransformer(
|
|
2484
|
+
d.response = o.dataTransformer(y, o);
|
|
2481
2485
|
} else {
|
|
2482
|
-
console.error("No data provider or URL provided"), c.value = !1, l("loading", !1),
|
|
2486
|
+
console.error("No data provider or URL provided"), c.value = !1, l("loading", !1), he.done();
|
|
2483
2487
|
return;
|
|
2484
2488
|
}
|
|
2485
2489
|
if (i) return;
|
|
2486
2490
|
d.hotInstance.updateData(d.response.data), d.options.callback && typeof d.options.callback == "function" && await d.options.callback();
|
|
2487
|
-
const
|
|
2488
|
-
Y(o.settings, "columns", []).forEach((
|
|
2489
|
-
|
|
2491
|
+
const _ = d.hotInstance.getPlugin("autoColumnSize");
|
|
2492
|
+
Y(o.settings, "columns", []).forEach((y, S) => {
|
|
2493
|
+
y.width || _.calculateColumnsWidth(S, S, !0);
|
|
2490
2494
|
}), l("load", {
|
|
2491
2495
|
data: d.response.data,
|
|
2492
2496
|
meta: d.response.meta
|
|
2493
|
-
}),
|
|
2494
|
-
} catch (
|
|
2495
|
-
r.value =
|
|
2497
|
+
}), g && typeof g == "function" && g();
|
|
2498
|
+
} catch (_) {
|
|
2499
|
+
r.value = _, l("error", _), console.error("Error loading table data:", _);
|
|
2496
2500
|
} finally {
|
|
2497
|
-
c.value = !1, l("loading", !1),
|
|
2501
|
+
c.value = !1, l("loading", !1), he.done();
|
|
2498
2502
|
}
|
|
2499
2503
|
}
|
|
2500
2504
|
},
|
|
2501
2505
|
// can't use sparkTable.hotInstance here because the ref isn't ready
|
|
2502
|
-
colToProp: (
|
|
2503
|
-
fireEvent: (
|
|
2504
|
-
l(
|
|
2506
|
+
colToProp: (g) => a.value.hotInstance.colToProp(g),
|
|
2507
|
+
fireEvent: (g, _) => {
|
|
2508
|
+
l(g, _);
|
|
2505
2509
|
},
|
|
2506
|
-
getSettingsForProp: (
|
|
2510
|
+
getSettingsForProp: (g) => It(Y(d.tableSettings, "columns"), { data: g }),
|
|
2507
2511
|
// Helper methods for easier param access
|
|
2508
2512
|
getParams: () => d.computed.params,
|
|
2509
|
-
getParam: (
|
|
2510
|
-
setParam: (
|
|
2511
|
-
d.methods.applyParams({ [
|
|
2513
|
+
getParam: (g) => d.computed.params[g],
|
|
2514
|
+
setParam: (g, _) => {
|
|
2515
|
+
d.methods.applyParams({ [g]: _ });
|
|
2512
2516
|
},
|
|
2513
|
-
clearParam: (
|
|
2514
|
-
clearParams: (
|
|
2515
|
-
(Array.isArray(
|
|
2516
|
-
d.params[
|
|
2517
|
+
clearParam: (g) => d.methods.removeParam(g),
|
|
2518
|
+
clearParams: (g) => {
|
|
2519
|
+
(Array.isArray(g) ? g : [g]).forEach((w) => {
|
|
2520
|
+
d.params[w] !== void 0 && delete d.params[w];
|
|
2517
2521
|
}), d.methods.applyParams({ page: 1 });
|
|
2518
2522
|
}
|
|
2519
2523
|
},
|
|
2520
2524
|
computed: {
|
|
2521
|
-
params:
|
|
2525
|
+
params: C(() => ({
|
|
2522
2526
|
...o.params,
|
|
2523
2527
|
...d.params
|
|
2524
2528
|
})),
|
|
2525
|
-
ready:
|
|
2529
|
+
ready: C(() => Nt(d, "response.meta.last_page"))
|
|
2526
2530
|
},
|
|
2527
|
-
options:
|
|
2528
|
-
...
|
|
2531
|
+
options: C(() => ({
|
|
2532
|
+
...be,
|
|
2529
2533
|
...o.options
|
|
2530
2534
|
})),
|
|
2531
|
-
tableSettings:
|
|
2535
|
+
tableSettings: C(() => ({
|
|
2532
2536
|
...Me,
|
|
2533
2537
|
nestedHeaders: Y(o.settings, "nestedHeaders", []),
|
|
2534
2538
|
...!Y(o.settings, "nestedHeaders") && {
|
|
2535
|
-
afterGetColHeader: (
|
|
2539
|
+
afterGetColHeader: (g, _) => io(g, _, d)
|
|
2536
2540
|
},
|
|
2537
|
-
afterChange: (
|
|
2538
|
-
afterRender: () =>
|
|
2541
|
+
afterChange: (g, _) => Ho(),
|
|
2542
|
+
afterRender: () => co(d),
|
|
2539
2543
|
/**
|
|
2540
2544
|
* Prevent columns with explicit width from being stretched
|
|
2541
2545
|
* This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
|
|
2542
2546
|
* while letting others stretch normally
|
|
2543
2547
|
*/
|
|
2544
|
-
beforeStretchingColumnWidth: (
|
|
2545
|
-
const
|
|
2546
|
-
return
|
|
2548
|
+
beforeStretchingColumnWidth: (g, _) => {
|
|
2549
|
+
const y = Y(o.settings, "columns", [])[_];
|
|
2550
|
+
return y && y.width !== void 0 ? y.width : g;
|
|
2547
2551
|
},
|
|
2548
2552
|
/**
|
|
2549
2553
|
* Copy displayed cell content instead of raw data values
|
|
2550
2554
|
* This ensures custom renderers copy their visual output, not the underlying data
|
|
2551
2555
|
*/
|
|
2552
|
-
beforeCopy: (
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2555
|
-
for (let
|
|
2556
|
-
for (let
|
|
2557
|
-
const
|
|
2558
|
-
if (
|
|
2559
|
-
const
|
|
2560
|
-
|
|
2556
|
+
beforeCopy: (g, _) => {
|
|
2557
|
+
const w = a.value?.hotInstance;
|
|
2558
|
+
w && _.forEach((y) => {
|
|
2559
|
+
for (let S = y.startRow; S <= y.endRow; S++)
|
|
2560
|
+
for (let M = y.startCol; M <= y.endCol; M++) {
|
|
2561
|
+
const z = w.getCell(S, M);
|
|
2562
|
+
if (z) {
|
|
2563
|
+
const W = S - _[0].startRow, de = M - _[0].startCol;
|
|
2564
|
+
g[W][de] = z.dataset.copyValue ?? z.textContent ?? "";
|
|
2561
2565
|
}
|
|
2562
2566
|
}
|
|
2563
2567
|
});
|
|
2564
2568
|
},
|
|
2565
2569
|
...o.settings
|
|
2566
2570
|
}))
|
|
2567
|
-
}), p = (
|
|
2568
|
-
|
|
2569
|
-
|
|
2571
|
+
}), p = C(
|
|
2572
|
+
() => d.computed.ready && d.response.data?.length === 0
|
|
2573
|
+
), v = (g) => {
|
|
2574
|
+
if (!g) return null;
|
|
2575
|
+
switch (g.type) {
|
|
2570
2576
|
case "search":
|
|
2571
|
-
return
|
|
2577
|
+
return g.param || "search";
|
|
2572
2578
|
case "filterSelect":
|
|
2573
2579
|
case "filterButtons":
|
|
2574
2580
|
case "datePicker":
|
|
2575
|
-
return
|
|
2581
|
+
return g.param || `filter[${g.key}]`;
|
|
2576
2582
|
default:
|
|
2577
2583
|
return null;
|
|
2578
2584
|
}
|
|
2579
|
-
},
|
|
2580
|
-
if (
|
|
2585
|
+
}, k = (g) => g ? typeof g.enabled == "function" ? g.enabled(d.params) : g.enabled : !1, $ = C(() => Object.entries(o.plugins).filter(([g, _]) => k(_)).map(([g, _]) => ({ name: g, config: _ })));
|
|
2586
|
+
if (I(
|
|
2581
2587
|
() => ({ ...d.params }),
|
|
2582
2588
|
() => {
|
|
2583
|
-
const
|
|
2584
|
-
Object.values(o.plugins).forEach((
|
|
2585
|
-
const
|
|
2586
|
-
if (!
|
|
2587
|
-
const
|
|
2588
|
-
!
|
|
2589
|
-
}),
|
|
2590
|
-
delete d.params[
|
|
2589
|
+
const g = [];
|
|
2590
|
+
Object.values(o.plugins).forEach((_) => {
|
|
2591
|
+
const w = v(_);
|
|
2592
|
+
if (!w) return;
|
|
2593
|
+
const y = k(_), S = d.params[w] !== void 0;
|
|
2594
|
+
!y && S && g.push(w);
|
|
2595
|
+
}), g.length > 0 && g.forEach((_) => {
|
|
2596
|
+
delete d.params[_];
|
|
2591
2597
|
});
|
|
2592
2598
|
},
|
|
2593
2599
|
{ deep: !0, flush: "sync" }
|
|
2594
2600
|
), o.syncToRoute || o.persistToStorage) {
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2597
|
-
namespace:
|
|
2601
|
+
const g = typeof o.syncToRoute == "string";
|
|
2602
|
+
Vo(d, {
|
|
2603
|
+
namespace: g ? o.syncToRoute : null,
|
|
2598
2604
|
syncToRoute: !!o.syncToRoute,
|
|
2599
2605
|
persistToStorage: o.persistToStorage
|
|
2600
2606
|
});
|
|
@@ -2611,78 +2617,94 @@ const vo = (e) => {
|
|
|
2611
2617
|
await d.methods.loadTable();
|
|
2612
2618
|
},
|
|
2613
2619
|
{ debounce: 50, maxWait: 1e3 }
|
|
2614
|
-
),
|
|
2620
|
+
), I(
|
|
2615
2621
|
() => o.url,
|
|
2616
|
-
async (
|
|
2617
|
-
|
|
2622
|
+
async (g, _) => {
|
|
2623
|
+
g !== _ && (d.params.page = 1, await d.methods.loadTable());
|
|
2618
2624
|
}
|
|
2619
|
-
),
|
|
2625
|
+
), xe(async () => {
|
|
2620
2626
|
await d.methods.loadTable(), l("ready");
|
|
2621
2627
|
}), Ye(() => {
|
|
2622
2628
|
i = !0;
|
|
2623
|
-
}),
|
|
2629
|
+
}), Mo(d), s({
|
|
2624
2630
|
refresh: () => d.methods.loadTable(),
|
|
2625
2631
|
getParams: () => d.methods.getParams(),
|
|
2626
|
-
getParam: (
|
|
2627
|
-
setParam: (
|
|
2628
|
-
clearParam: (
|
|
2629
|
-
clearParams: (
|
|
2630
|
-
applyParams: (
|
|
2632
|
+
getParam: (g) => d.methods.getParam(g),
|
|
2633
|
+
setParam: (g, _) => d.methods.setParam(g, _),
|
|
2634
|
+
clearParam: (g) => d.methods.clearParam(g),
|
|
2635
|
+
clearParams: (g) => d.methods.clearParams(g),
|
|
2636
|
+
applyParams: (g) => d.methods.applyParams(g),
|
|
2631
2637
|
loading: c,
|
|
2632
2638
|
error: r,
|
|
2633
2639
|
sparkTable: d,
|
|
2634
2640
|
table: a
|
|
2635
|
-
}), (
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
2647
|
-
O(h.$slots, "header", {
|
|
2648
|
-
sparkTable: d,
|
|
2649
|
-
loading: c.value,
|
|
2650
|
-
error: r.value
|
|
2651
|
-
})
|
|
2652
|
-
]),
|
|
2653
|
-
_: 3
|
|
2654
|
-
})) : (m(), g("div", ca)),
|
|
2655
|
-
b(w(jt), {
|
|
2656
|
-
"theme-name": "ht-theme-classic",
|
|
2657
|
-
ref_key: "table",
|
|
2658
|
-
ref: a,
|
|
2659
|
-
settings: d.tableSettings
|
|
2660
|
-
}, null, 8, ["settings"]),
|
|
2661
|
-
d.computed.ready ? (m(), V(Pe, {
|
|
2662
|
-
key: 2,
|
|
2663
|
-
position: "footer"
|
|
2664
|
-
}, {
|
|
2665
|
-
default: C(() => [
|
|
2666
|
-
b(Ao, { "spark-table": d }, null, 8, ["spark-table"]),
|
|
2667
|
-
f("div", ua, [
|
|
2668
|
-
b(jo, {
|
|
2669
|
-
"spark-table": d,
|
|
2670
|
-
onPaginate: d.methods.applyParams
|
|
2671
|
-
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2672
|
-
b(Zo, {
|
|
2641
|
+
}), (g, _) => {
|
|
2642
|
+
const w = A("font-awesome-icon");
|
|
2643
|
+
return m(), h("div", da, [
|
|
2644
|
+
d.computed.ready && $.value && $.value.length ? (m(), V(Pe, {
|
|
2645
|
+
key: 0,
|
|
2646
|
+
position: "header"
|
|
2647
|
+
}, {
|
|
2648
|
+
default: T(() => [
|
|
2649
|
+
(m(!0), h(R, null, D($.value, (y) => (m(), V(N(u[y.config.type]), {
|
|
2650
|
+
key: y.name,
|
|
2651
|
+
class: H(y.config.align ? `self-${y.config.align}` : ""),
|
|
2673
2652
|
"spark-table": d,
|
|
2674
|
-
|
|
2675
|
-
}, null, 8, ["spark-table", "
|
|
2676
|
-
O(
|
|
2653
|
+
config: y.config
|
|
2654
|
+
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
2655
|
+
O(g.$slots, "header", {
|
|
2677
2656
|
sparkTable: d,
|
|
2678
2657
|
loading: c.value,
|
|
2679
2658
|
error: r.value
|
|
2680
2659
|
})
|
|
2681
|
-
])
|
|
2660
|
+
]),
|
|
2661
|
+
_: 3
|
|
2662
|
+
})) : (m(), h("div", pa)),
|
|
2663
|
+
Xe(b(x(Zt), {
|
|
2664
|
+
"theme-name": "ht-theme-classic",
|
|
2665
|
+
ref_key: "table",
|
|
2666
|
+
ref: a,
|
|
2667
|
+
settings: d.tableSettings
|
|
2668
|
+
}, null, 8, ["settings"]), [
|
|
2669
|
+
[Je, !p.value]
|
|
2682
2670
|
]),
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2671
|
+
p.value ? (m(), h("div", fa, [
|
|
2672
|
+
b(w, {
|
|
2673
|
+
icon: x(F).farInbox,
|
|
2674
|
+
class: "size-12 mb-4 text-gray-300"
|
|
2675
|
+
}, null, 8, ["icon"]),
|
|
2676
|
+
_[0] || (_[0] = f("p", { class: "text-sm" }, "No records found", -1))
|
|
2677
|
+
])) : L("", !0),
|
|
2678
|
+
d.computed.ready ? (m(), V(Pe, {
|
|
2679
|
+
key: 3,
|
|
2680
|
+
position: "footer"
|
|
2681
|
+
}, {
|
|
2682
|
+
default: T(() => [
|
|
2683
|
+
p.value ? L("", !0) : (m(), V(zo, {
|
|
2684
|
+
key: 0,
|
|
2685
|
+
"spark-table": d
|
|
2686
|
+
}, null, 8, ["spark-table"])),
|
|
2687
|
+
f("div", ma, [
|
|
2688
|
+
p.value ? L("", !0) : (m(), V(Zo, {
|
|
2689
|
+
key: 0,
|
|
2690
|
+
"spark-table": d,
|
|
2691
|
+
onPaginate: d.methods.applyParams
|
|
2692
|
+
}, null, 8, ["spark-table", "onPaginate"])),
|
|
2693
|
+
b(Ko, {
|
|
2694
|
+
"spark-table": d,
|
|
2695
|
+
onPaginate: d.methods.applyParams
|
|
2696
|
+
}, null, 8, ["spark-table", "onPaginate"]),
|
|
2697
|
+
O(g.$slots, "footer", {
|
|
2698
|
+
sparkTable: d,
|
|
2699
|
+
loading: c.value,
|
|
2700
|
+
error: r.value
|
|
2701
|
+
})
|
|
2702
|
+
])
|
|
2703
|
+
]),
|
|
2704
|
+
_: 3
|
|
2705
|
+
})) : L("", !0)
|
|
2706
|
+
]);
|
|
2707
|
+
};
|
|
2686
2708
|
}
|
|
2687
2709
|
};
|
|
2688
2710
|
function He() {
|
|
@@ -2699,7 +2721,7 @@ function He() {
|
|
|
2699
2721
|
}, o = () => {
|
|
2700
2722
|
e.isVisible = !0;
|
|
2701
2723
|
}, l = (a, c = {}, r = {}, i = {}) => {
|
|
2702
|
-
e.content =
|
|
2724
|
+
e.content = me(a), e.props = c, e.eventHandlers = r, e.size = i.size || "md";
|
|
2703
2725
|
};
|
|
2704
2726
|
return {
|
|
2705
2727
|
state: e,
|
|
@@ -2712,7 +2734,7 @@ function He() {
|
|
|
2712
2734
|
}
|
|
2713
2735
|
};
|
|
2714
2736
|
}
|
|
2715
|
-
class
|
|
2737
|
+
class ga {
|
|
2716
2738
|
constructor() {
|
|
2717
2739
|
this.left = He(), this.right = He();
|
|
2718
2740
|
}
|
|
@@ -2744,22 +2766,22 @@ class pa {
|
|
|
2744
2766
|
this.left.close(), this.right.close();
|
|
2745
2767
|
};
|
|
2746
2768
|
}
|
|
2747
|
-
const te = new
|
|
2769
|
+
const te = new ga(), ya = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va = { class: "flex flex-1 flex-col" }, ba = {
|
|
2748
2770
|
class: "flex flex-1 flex-col gap-y-7",
|
|
2749
2771
|
role: "list"
|
|
2750
|
-
},
|
|
2772
|
+
}, xa = { class: "flex flex-1 flex-col" }, ka = {
|
|
2751
2773
|
role: "list",
|
|
2752
2774
|
class: "flex flex-1 flex-col"
|
|
2753
|
-
},
|
|
2775
|
+
}, wa = { class: "flex items-center pb-8" }, _a = ["href", "onClick"], Sa = {
|
|
2754
2776
|
key: 2,
|
|
2755
2777
|
class: "w-full flex justify-center"
|
|
2756
|
-
},
|
|
2778
|
+
}, Ca = {
|
|
2757
2779
|
key: 0,
|
|
2758
2780
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
2759
|
-
},
|
|
2781
|
+
}, $a = ["href", "onClick"], Ta = {
|
|
2760
2782
|
key: 1,
|
|
2761
2783
|
class: "text-[13px]"
|
|
2762
|
-
},
|
|
2784
|
+
}, La = { class: "mt-auto" }, Pa = { class: "p-[10px] flex-shrink-0" }, Ma = { class: "flex flex-1 items-center gap-x-6" }, Ha = { class: "relative flex flex-1 items-center gap-4" }, Va = { class: "cursor-pointer" }, Ra = ["src"], Ea = { class: "ml-auto" }, Ba = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, yn = {
|
|
2763
2785
|
__name: "SparkDefaultContainer",
|
|
2764
2786
|
props: {
|
|
2765
2787
|
appStore: {
|
|
@@ -2777,16 +2799,16 @@ const te = new pa(), fa = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ma =
|
|
|
2777
2799
|
},
|
|
2778
2800
|
emits: ["overlayClose"],
|
|
2779
2801
|
setup(e, { emit: s }) {
|
|
2780
|
-
const t = e, o = s, l =
|
|
2802
|
+
const t = e, o = s, l = Ee(), n = ne(), a = Ne(), c = De(), r = C(() => c.getAppIcon(t.appStore.state.app)), i = C(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
|
|
2781
2803
|
const k = {};
|
|
2782
|
-
l["app-selector-bottom"] ? k.bottomSlot = () => ke("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (k.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? k.footerSlot = () => ke("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (k.footerSlot = t.appSelectorSlots.footerSlot), te.showRight(
|
|
2783
|
-
select: (
|
|
2804
|
+
l["app-selector-bottom"] ? k.bottomSlot = () => ke("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (k.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? k.footerSlot = () => ke("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (k.footerSlot = t.appSelectorSlots.footerSlot), te.showRight(ks, k, {
|
|
2805
|
+
select: ($) => {
|
|
2784
2806
|
te.closeRight();
|
|
2785
2807
|
}
|
|
2786
2808
|
});
|
|
2787
2809
|
}, d = () => {
|
|
2788
2810
|
te.showLeft(
|
|
2789
|
-
|
|
2811
|
+
Zs,
|
|
2790
2812
|
{},
|
|
2791
2813
|
{
|
|
2792
2814
|
select: (k) => {
|
|
@@ -2794,96 +2816,96 @@ const te = new pa(), fa = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ma =
|
|
|
2794
2816
|
}
|
|
2795
2817
|
}
|
|
2796
2818
|
);
|
|
2797
|
-
}, p =
|
|
2798
|
-
return (k,
|
|
2799
|
-
const
|
|
2800
|
-
return m(),
|
|
2819
|
+
}, 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
|
+
return (k, $) => {
|
|
2821
|
+
const g = A("font-awesome-icon"), _ = A("router-view");
|
|
2822
|
+
return m(), h(R, null, [
|
|
2801
2823
|
f("div", {
|
|
2802
2824
|
class: H([p.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
2803
2825
|
}, [
|
|
2804
|
-
f("div",
|
|
2805
|
-
f("nav",
|
|
2806
|
-
f("ul",
|
|
2807
|
-
f("li",
|
|
2808
|
-
f("ul",
|
|
2809
|
-
f("li",
|
|
2826
|
+
f("div", ya, [
|
|
2827
|
+
f("nav", va, [
|
|
2828
|
+
f("ul", ba, [
|
|
2829
|
+
f("li", xa, [
|
|
2830
|
+
f("ul", ka, [
|
|
2831
|
+
f("li", wa, [
|
|
2810
2832
|
f("a", {
|
|
2811
2833
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
2812
|
-
onClick:
|
|
2834
|
+
onClick: $[0] || ($[0] = Q((w) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
2813
2835
|
}, [
|
|
2814
|
-
b(
|
|
2815
|
-
icon:
|
|
2836
|
+
b(g, {
|
|
2837
|
+
icon: x(F)[r.value],
|
|
2816
2838
|
class: "size-5"
|
|
2817
2839
|
}, null, 8, ["icon"])
|
|
2818
2840
|
]),
|
|
2819
|
-
e.mainNavStore.state.collapsed ?
|
|
2841
|
+
e.mainNavStore.state.collapsed ? L("", !0) : (m(), h("a", {
|
|
2820
2842
|
key: 0,
|
|
2821
|
-
onClick:
|
|
2843
|
+
onClick: $[1] || ($[1] = Q((w) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
2822
2844
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
2823
|
-
},
|
|
2845
|
+
}, P(e.appStore.state.app), 1))
|
|
2824
2846
|
]),
|
|
2825
|
-
(m(!0),
|
|
2826
|
-
key:
|
|
2847
|
+
(m(!0), h(R, null, D(e.mainNavStore.state.menu, (w) => (m(), h("li", {
|
|
2848
|
+
key: w.name,
|
|
2827
2849
|
class: H({
|
|
2828
|
-
"mt-[10px]":
|
|
2829
|
-
"mt-auto":
|
|
2850
|
+
"mt-[10px]": w.children,
|
|
2851
|
+
"mt-auto": w.footerSection
|
|
2830
2852
|
})
|
|
2831
2853
|
}, [
|
|
2832
2854
|
f("a", {
|
|
2833
2855
|
class: H([{
|
|
2834
|
-
"bg-gray-100":
|
|
2835
|
-
"hover:bg-gray-100":
|
|
2856
|
+
"bg-gray-100": w.current,
|
|
2857
|
+
"hover:bg-gray-100": w?.href
|
|
2836
2858
|
}, "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"]),
|
|
2837
|
-
href:
|
|
2838
|
-
onClick: Q((
|
|
2859
|
+
href: w?.href,
|
|
2860
|
+
onClick: Q((y) => e.mainNavStore.goto(w.href), ["prevent"])
|
|
2839
2861
|
}, [
|
|
2840
|
-
|
|
2862
|
+
w.icon ? (m(), V(g, {
|
|
2841
2863
|
key: 0,
|
|
2842
|
-
icon:
|
|
2843
|
-
class: H([[(
|
|
2844
|
-
}, null, 8, ["icon", "class"])) :
|
|
2845
|
-
e.mainNavStore.state.collapsed ?
|
|
2864
|
+
icon: x(F)[w.icon],
|
|
2865
|
+
class: H([[(w.current, "text-gray-400")], "size-4"])
|
|
2866
|
+
}, null, 8, ["icon", "class"])) : L("", !0),
|
|
2867
|
+
e.mainNavStore.state.collapsed ? w?.children ? (m(), h("div", Sa, [...$[6] || ($[6] = [
|
|
2846
2868
|
f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
2847
|
-
])])) :
|
|
2869
|
+
])])) : L("", !0) : (m(), h("span", {
|
|
2848
2870
|
key: 1,
|
|
2849
2871
|
class: H({
|
|
2850
|
-
"text-[11px]":
|
|
2851
|
-
"text-[13px]": !
|
|
2852
|
-
"font-semibold":
|
|
2853
|
-
"text-gray-500":
|
|
2872
|
+
"text-[11px]": w?.children,
|
|
2873
|
+
"text-[13px]": !w?.children,
|
|
2874
|
+
"font-semibold": w?.children,
|
|
2875
|
+
"text-gray-500": w?.children
|
|
2854
2876
|
})
|
|
2855
|
-
},
|
|
2856
|
-
], 10,
|
|
2857
|
-
|
|
2858
|
-
(m(!0),
|
|
2859
|
-
key:
|
|
2877
|
+
}, P(w.name), 3))
|
|
2878
|
+
], 10, _a),
|
|
2879
|
+
w.children ? (m(), h("ul", Ca, [
|
|
2880
|
+
(m(!0), h(R, null, D(w.children, (y) => (m(), h("li", {
|
|
2881
|
+
key: y.name
|
|
2860
2882
|
}, [
|
|
2861
2883
|
f("a", {
|
|
2862
|
-
class: H([[
|
|
2863
|
-
href:
|
|
2864
|
-
onClick: Q((
|
|
2884
|
+
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
|
+
href: y.href,
|
|
2886
|
+
onClick: Q((S) => e.mainNavStore.goto(y.href), ["prevent"])
|
|
2865
2887
|
}, [
|
|
2866
|
-
|
|
2888
|
+
y.icon ? (m(), V(g, {
|
|
2867
2889
|
key: 0,
|
|
2868
|
-
icon:
|
|
2869
|
-
class: H([[(
|
|
2870
|
-
}, null, 8, ["icon", "class"])) :
|
|
2871
|
-
e.mainNavStore.state.collapsed ?
|
|
2872
|
-
], 10,
|
|
2890
|
+
icon: x(F)[y.icon],
|
|
2891
|
+
class: H([[(y.current, "text-gray-400")], "size-4"])
|
|
2892
|
+
}, null, 8, ["icon", "class"])) : L("", !0),
|
|
2893
|
+
e.mainNavStore.state.collapsed ? L("", !0) : (m(), h("span", Ta, P(y.name), 1))
|
|
2894
|
+
], 10, $a)
|
|
2873
2895
|
]))), 128))
|
|
2874
|
-
])) :
|
|
2896
|
+
])) : L("", !0)
|
|
2875
2897
|
], 2))), 128))
|
|
2876
2898
|
])
|
|
2877
2899
|
]),
|
|
2878
|
-
f("li",
|
|
2900
|
+
f("li", La, [
|
|
2879
2901
|
O(k.$slots, "sidebar-footer"),
|
|
2880
2902
|
f("a", {
|
|
2881
2903
|
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",
|
|
2882
2904
|
href: "#",
|
|
2883
|
-
onClick:
|
|
2905
|
+
onClick: $[2] || ($[2] = Q((w) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
2884
2906
|
}, [
|
|
2885
|
-
b(
|
|
2886
|
-
icon:
|
|
2907
|
+
b(g, {
|
|
2908
|
+
icon: x(F)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
2887
2909
|
class: "class-5"
|
|
2888
2910
|
}, null, 8, ["icon"])
|
|
2889
2911
|
])
|
|
@@ -2893,81 +2915,81 @@ const te = new pa(), fa = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ma =
|
|
|
2893
2915
|
])
|
|
2894
2916
|
], 2),
|
|
2895
2917
|
f("div", {
|
|
2896
|
-
class: H([
|
|
2918
|
+
class: H([v.value, "h-full transition-all flex flex-col"])
|
|
2897
2919
|
}, [
|
|
2898
|
-
f("div",
|
|
2899
|
-
f("div",
|
|
2900
|
-
f("div",
|
|
2920
|
+
f("div", Pa, [
|
|
2921
|
+
f("div", Ma, [
|
|
2922
|
+
f("div", Ha, [
|
|
2901
2923
|
O(k.$slots, "header-left", {}, () => [
|
|
2902
|
-
f("div",
|
|
2903
|
-
b(
|
|
2904
|
-
icon:
|
|
2924
|
+
f("div", Va, [
|
|
2925
|
+
b(g, {
|
|
2926
|
+
icon: x(F).farBarsSort,
|
|
2905
2927
|
class: "size-5",
|
|
2906
|
-
onClick:
|
|
2928
|
+
onClick: $[3] || ($[3] = (w) => e.mainNavStore.toggleHidden())
|
|
2907
2929
|
}, null, 8, ["icon"])
|
|
2908
2930
|
])
|
|
2909
2931
|
]),
|
|
2910
2932
|
O(k.$slots, "header-center", {}, () => [
|
|
2911
|
-
i.value ? (m(),
|
|
2933
|
+
i.value ? (m(), h("div", {
|
|
2912
2934
|
key: 0,
|
|
2913
2935
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
2914
2936
|
onClick: d
|
|
2915
2937
|
}, [
|
|
2916
|
-
|
|
2938
|
+
x(a).currentBrand ? (m(), h("img", {
|
|
2917
2939
|
key: 0,
|
|
2918
|
-
src:
|
|
2940
|
+
src: x(a).currentBrand.logo,
|
|
2919
2941
|
alt: "",
|
|
2920
2942
|
class: "h-[30px] w-auto"
|
|
2921
|
-
}, null, 8,
|
|
2922
|
-
])) :
|
|
2943
|
+
}, null, 8, Ra)) : L("", !0)
|
|
2944
|
+
])) : L("", !0)
|
|
2923
2945
|
]),
|
|
2924
|
-
f("div",
|
|
2946
|
+
f("div", Ea, [
|
|
2925
2947
|
O(k.$slots, "header-right", {}, () => [
|
|
2926
|
-
e.appStore.state.showAppSelector ? (m(),
|
|
2948
|
+
e.appStore.state.showAppSelector ? (m(), h("button", {
|
|
2927
2949
|
key: 0,
|
|
2928
2950
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
2929
2951
|
type: "button",
|
|
2930
2952
|
onClick: u
|
|
2931
2953
|
}, [
|
|
2932
|
-
b(
|
|
2933
|
-
icon:
|
|
2954
|
+
b(g, {
|
|
2955
|
+
icon: x(F).farGripDotsVertical,
|
|
2934
2956
|
class: "size-4 text-gray-400"
|
|
2935
2957
|
}, null, 8, ["icon"])
|
|
2936
|
-
])) :
|
|
2958
|
+
])) : L("", !0)
|
|
2937
2959
|
])
|
|
2938
2960
|
])
|
|
2939
2961
|
])
|
|
2940
2962
|
])
|
|
2941
2963
|
]),
|
|
2942
|
-
f("main",
|
|
2943
|
-
b(
|
|
2964
|
+
f("main", Ba, [
|
|
2965
|
+
b(_)
|
|
2944
2966
|
])
|
|
2945
2967
|
], 2),
|
|
2946
|
-
b(
|
|
2968
|
+
b(x(Se), {
|
|
2947
2969
|
position: "left",
|
|
2948
|
-
"overlay-instance":
|
|
2949
|
-
onClose:
|
|
2970
|
+
"overlay-instance": x(te).left,
|
|
2971
|
+
onClose: $[4] || ($[4] = (w) => o("overlayClose", "left"))
|
|
2950
2972
|
}, null, 8, ["overlay-instance"]),
|
|
2951
|
-
b(
|
|
2973
|
+
b(x(Se), {
|
|
2952
2974
|
position: "right",
|
|
2953
|
-
"overlay-instance":
|
|
2954
|
-
onClose:
|
|
2975
|
+
"overlay-instance": x(te).right,
|
|
2976
|
+
onClose: $[5] || ($[5] = (w) => o("overlayClose", "right"))
|
|
2955
2977
|
}, null, 8, ["overlay-instance"]),
|
|
2956
|
-
b(
|
|
2978
|
+
b(x(so))
|
|
2957
2979
|
], 64);
|
|
2958
2980
|
};
|
|
2959
2981
|
}
|
|
2960
|
-
},
|
|
2961
|
-
function
|
|
2982
|
+
}, Aa = {}, Fa = { class: "h-full" };
|
|
2983
|
+
function Oa(e, s) {
|
|
2962
2984
|
const t = A("router-view");
|
|
2963
|
-
return m(),
|
|
2985
|
+
return m(), h("main", Fa, [
|
|
2964
2986
|
b(t)
|
|
2965
2987
|
]);
|
|
2966
2988
|
}
|
|
2967
|
-
const
|
|
2989
|
+
const vn = /* @__PURE__ */ ee(Aa, [["render", Oa]]), za = (e) => {
|
|
2968
2990
|
const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2969
2991
|
return s ? s[2] : null;
|
|
2970
|
-
},
|
|
2992
|
+
}, Da = (e, s, t = {}) => {
|
|
2971
2993
|
const {
|
|
2972
2994
|
maxAge: o = 31536e3,
|
|
2973
2995
|
// 365 days in seconds
|
|
@@ -2978,7 +3000,7 @@ const mn = /* @__PURE__ */ ee(Va, [["render", Ba]]), Ea = (e) => {
|
|
|
2978
3000
|
} = t;
|
|
2979
3001
|
let r = `${e}=${s}; max-age=${o}; path=${c}; samesite=${a}`;
|
|
2980
3002
|
l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
|
|
2981
|
-
},
|
|
3003
|
+
}, ja = (e, s = {}) => {
|
|
2982
3004
|
const { domain: t = Ze(), path: o = "/" } = s;
|
|
2983
3005
|
let l = `${e}=; max-age=0; path=${o}`;
|
|
2984
3006
|
t && (l += `; domain=${t}`), document.cookie = l;
|
|
@@ -2986,15 +3008,15 @@ const mn = /* @__PURE__ */ ee(Va, [["render", Ba]]), Ea = (e) => {
|
|
|
2986
3008
|
const e = window.location.hostname;
|
|
2987
3009
|
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;
|
|
2988
3010
|
}, qe = [];
|
|
2989
|
-
function
|
|
3011
|
+
function Ia(e) {
|
|
2990
3012
|
qe.push(e);
|
|
2991
3013
|
}
|
|
2992
|
-
function
|
|
3014
|
+
function Na() {
|
|
2993
3015
|
qe.forEach((e) => e());
|
|
2994
3016
|
}
|
|
2995
|
-
function
|
|
3017
|
+
function bn(e) {
|
|
2996
3018
|
let s = !1;
|
|
2997
|
-
return
|
|
3019
|
+
return Ia(() => {
|
|
2998
3020
|
s = !1;
|
|
2999
3021
|
}), {
|
|
3000
3022
|
bootstrapApp: async () => {
|
|
@@ -3007,7 +3029,7 @@ function hn(e) {
|
|
|
3007
3029
|
}
|
|
3008
3030
|
};
|
|
3009
3031
|
}
|
|
3010
|
-
const
|
|
3032
|
+
const ve = "bolt-next-token", K = ue("auth", () => {
|
|
3011
3033
|
const e = q({
|
|
3012
3034
|
user: null,
|
|
3013
3035
|
token: null,
|
|
@@ -3043,10 +3065,10 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3043
3065
|
}), s = (i = {}) => {
|
|
3044
3066
|
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);
|
|
3045
3067
|
}, t = (i) => {
|
|
3046
|
-
|
|
3068
|
+
Da(ve, i), e.token = i;
|
|
3047
3069
|
}, o = () => {
|
|
3048
|
-
|
|
3049
|
-
}, l = () =>
|
|
3070
|
+
ja(ve), e.token = null;
|
|
3071
|
+
}, l = () => za(ve), n = async (i) => {
|
|
3050
3072
|
const u = await re.post(e.endpoints.login, i), d = u.headers.authorization;
|
|
3051
3073
|
return t(d), e.user = u.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(u.data), u.data;
|
|
3052
3074
|
}, a = async () => {
|
|
@@ -3063,7 +3085,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3063
3085
|
} catch (i) {
|
|
3064
3086
|
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
|
|
3065
3087
|
} finally {
|
|
3066
|
-
o(), e.user = null,
|
|
3088
|
+
o(), e.user = null, Na();
|
|
3067
3089
|
}
|
|
3068
3090
|
}, c = async () => {
|
|
3069
3091
|
const i = e.overrideToken || l();
|
|
@@ -3081,7 +3103,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3081
3103
|
} finally {
|
|
3082
3104
|
e.ready = !0;
|
|
3083
3105
|
}
|
|
3084
|
-
}, r =
|
|
3106
|
+
}, r = C(() => e.overrideToken ? !0 : !!e.token && !!e.user);
|
|
3085
3107
|
return {
|
|
3086
3108
|
state: e,
|
|
3087
3109
|
initialize: s,
|
|
@@ -3093,17 +3115,17 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3093
3115
|
clearTokenCookie: o,
|
|
3094
3116
|
getTokenCookie: l
|
|
3095
3117
|
};
|
|
3096
|
-
}),
|
|
3118
|
+
}), Za = { class: "h-full grid place-content-center relative" }, qa = { class: "absolute top-8 left-8" }, Ua = ["src"], Ka = {
|
|
3097
3119
|
key: 1,
|
|
3098
3120
|
width: "59",
|
|
3099
3121
|
height: "23",
|
|
3100
3122
|
viewBox: "0 0 59 23",
|
|
3101
3123
|
fill: "none",
|
|
3102
3124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3103
|
-
},
|
|
3125
|
+
}, Ga = { class: "max-w-sm grid gap-y-1 -mt-8" }, Wa = { class: "mb-7" }, Ya = { class: "text-gray-600" }, Xa = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Ja = {
|
|
3104
3126
|
key: 0,
|
|
3105
3127
|
class: "text-red-600 text-sm mb-2"
|
|
3106
|
-
},
|
|
3128
|
+
}, Qa = { key: 0 }, er = { key: 1 }, tr = {
|
|
3107
3129
|
__name: "SparkLoginView",
|
|
3108
3130
|
props: {
|
|
3109
3131
|
logo: {
|
|
@@ -3120,7 +3142,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3120
3142
|
}
|
|
3121
3143
|
},
|
|
3122
3144
|
setup(e) {
|
|
3123
|
-
const s = J(), t = ne(), o = je(), l = K(), n = e, a =
|
|
3145
|
+
const s = J(), t = ne(), o = je(), l = K(), n = e, a = B(!1), c = B(""), r = async (i) => {
|
|
3124
3146
|
a.value = !0, c.value = "";
|
|
3125
3147
|
try {
|
|
3126
3148
|
await l.login(i);
|
|
@@ -3141,14 +3163,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3141
3163
|
};
|
|
3142
3164
|
return (i, u) => {
|
|
3143
3165
|
const d = A("FormKit"), p = A("router-link");
|
|
3144
|
-
return m(),
|
|
3145
|
-
f("div",
|
|
3146
|
-
n.logo ? (m(),
|
|
3166
|
+
return m(), h("div", Za, [
|
|
3167
|
+
f("div", qa, [
|
|
3168
|
+
n.logo ? (m(), h("img", {
|
|
3147
3169
|
key: 0,
|
|
3148
3170
|
src: n.logo,
|
|
3149
3171
|
alt: "Logo",
|
|
3150
3172
|
class: "h-[23px] w-auto"
|
|
3151
|
-
}, null, 8,
|
|
3173
|
+
}, null, 8, Ua)) : (m(), h("svg", Ka, [...u[0] || (u[0] = [
|
|
3152
3174
|
f("path", {
|
|
3153
3175
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3154
3176
|
fill: "#1C64F2"
|
|
@@ -3167,17 +3189,17 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3167
3189
|
}, null, -1)
|
|
3168
3190
|
])]))
|
|
3169
3191
|
]),
|
|
3170
|
-
f("div",
|
|
3171
|
-
f("div",
|
|
3192
|
+
f("div", Ga, [
|
|
3193
|
+
f("div", Wa, [
|
|
3172
3194
|
u[1] || (u[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
3173
|
-
f("p",
|
|
3195
|
+
f("p", Ya, " Welcome back" + P(x(o).state.app ? ` to ${x(o).state.app}` : "") + "! Please enter your details. ", 1)
|
|
3174
3196
|
]),
|
|
3175
3197
|
b(d, {
|
|
3176
3198
|
type: "form",
|
|
3177
3199
|
onSubmit: r,
|
|
3178
3200
|
actions: !1
|
|
3179
3201
|
}, {
|
|
3180
|
-
default:
|
|
3202
|
+
default: T(() => [
|
|
3181
3203
|
b(d, {
|
|
3182
3204
|
label: "Email",
|
|
3183
3205
|
name: "email",
|
|
@@ -3185,7 +3207,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3185
3207
|
type: "email",
|
|
3186
3208
|
validation: "required|email",
|
|
3187
3209
|
"outer-class": "max-w-full",
|
|
3188
|
-
value:
|
|
3210
|
+
value: x(l).state.devCredentials.username
|
|
3189
3211
|
}, null, 8, ["value"]),
|
|
3190
3212
|
b(d, {
|
|
3191
3213
|
label: "Password",
|
|
@@ -3194,29 +3216,29 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3194
3216
|
type: "password",
|
|
3195
3217
|
validation: "required",
|
|
3196
3218
|
"outer-class": "max-w-full",
|
|
3197
|
-
value:
|
|
3219
|
+
value: x(l).state.devCredentials.password
|
|
3198
3220
|
}, null, 8, ["value"]),
|
|
3199
|
-
f("div",
|
|
3221
|
+
f("div", Xa, [
|
|
3200
3222
|
u[3] || (u[3] = f("span", null, null, -1)),
|
|
3201
3223
|
b(p, {
|
|
3202
3224
|
to: n.forgotPasswordRoute,
|
|
3203
3225
|
class: "text-sm text-primary-600 font-semibold"
|
|
3204
3226
|
}, {
|
|
3205
|
-
default:
|
|
3206
|
-
|
|
3227
|
+
default: T(() => [...u[2] || (u[2] = [
|
|
3228
|
+
E(" Forgot password ", -1)
|
|
3207
3229
|
])]),
|
|
3208
3230
|
_: 1
|
|
3209
3231
|
}, 8, ["to"])
|
|
3210
3232
|
]),
|
|
3211
|
-
c.value ? (m(),
|
|
3212
|
-
b(
|
|
3233
|
+
c.value ? (m(), h("div", Ja, P(c.value), 1)) : L("", !0),
|
|
3234
|
+
b(x(G), {
|
|
3213
3235
|
type: "submit",
|
|
3214
3236
|
size: "xl",
|
|
3215
3237
|
disabled: a.value,
|
|
3216
3238
|
"button-class": "w-full mb-2"
|
|
3217
3239
|
}, {
|
|
3218
|
-
default:
|
|
3219
|
-
a.value ? (m(),
|
|
3240
|
+
default: T(() => [
|
|
3241
|
+
a.value ? (m(), h("span", er, "Signing in...")) : (m(), h("span", Qa, "Sign in"))
|
|
3220
3242
|
]),
|
|
3221
3243
|
_: 1
|
|
3222
3244
|
}, 8, ["disabled"])
|
|
@@ -3227,7 +3249,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3227
3249
|
]);
|
|
3228
3250
|
};
|
|
3229
3251
|
}
|
|
3230
|
-
},
|
|
3252
|
+
}, sr = {
|
|
3231
3253
|
__name: "SparkLogoutView",
|
|
3232
3254
|
props: {
|
|
3233
3255
|
defaultRedirect: {
|
|
@@ -3237,26 +3259,26 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3237
3259
|
},
|
|
3238
3260
|
setup(e) {
|
|
3239
3261
|
const s = J(), t = ne(), o = K(), l = e;
|
|
3240
|
-
return
|
|
3262
|
+
return xe(async () => {
|
|
3241
3263
|
await o.logout();
|
|
3242
3264
|
const n = t.query.redirect;
|
|
3243
3265
|
n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
|
|
3244
3266
|
}), (n, a) => null;
|
|
3245
3267
|
}
|
|
3246
|
-
},
|
|
3268
|
+
}, or = { class: "h-full grid place-content-center relative" }, ar = { class: "absolute top-8 left-8" }, rr = ["src"], nr = {
|
|
3247
3269
|
key: 1,
|
|
3248
3270
|
width: "59",
|
|
3249
3271
|
height: "23",
|
|
3250
3272
|
viewBox: "0 0 59 23",
|
|
3251
3273
|
fill: "none",
|
|
3252
3274
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3253
|
-
},
|
|
3275
|
+
}, lr = { class: "max-w-sm grid gap-y-1 -mt-8" }, ir = {
|
|
3254
3276
|
key: 0,
|
|
3255
3277
|
class: "text-red-600 text-sm mb-2"
|
|
3256
|
-
},
|
|
3278
|
+
}, cr = {
|
|
3257
3279
|
key: 1,
|
|
3258
3280
|
class: "text-green-600 text-sm mb-2"
|
|
3259
|
-
},
|
|
3281
|
+
}, ur = { key: 0 }, dr = { key: 1 }, pr = {
|
|
3260
3282
|
__name: "SparkForgotPasswordView",
|
|
3261
3283
|
props: {
|
|
3262
3284
|
logo: {
|
|
@@ -3269,7 +3291,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3269
3291
|
}
|
|
3270
3292
|
},
|
|
3271
3293
|
setup(e) {
|
|
3272
|
-
const s = K(), t = e, o =
|
|
3294
|
+
const s = K(), t = e, o = B(!1), l = B(""), n = B(""), a = async ({ email: c }) => {
|
|
3273
3295
|
o.value = !0, l.value = "", n.value = "";
|
|
3274
3296
|
try {
|
|
3275
3297
|
await re.post(s.state.endpoints.passwordEmail, { email: c }), n.value = "Password reset link sent! Check your email.";
|
|
@@ -3281,14 +3303,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3281
3303
|
};
|
|
3282
3304
|
return (c, r) => {
|
|
3283
3305
|
const i = A("FormKit"), u = A("router-link");
|
|
3284
|
-
return m(),
|
|
3285
|
-
f("div",
|
|
3286
|
-
t.logo ? (m(),
|
|
3306
|
+
return m(), h("div", or, [
|
|
3307
|
+
f("div", ar, [
|
|
3308
|
+
t.logo ? (m(), h("img", {
|
|
3287
3309
|
key: 0,
|
|
3288
3310
|
src: t.logo,
|
|
3289
3311
|
alt: "Logo",
|
|
3290
3312
|
class: "h-[23px] w-auto"
|
|
3291
|
-
}, null, 8,
|
|
3313
|
+
}, null, 8, rr)) : (m(), h("svg", nr, [...r[0] || (r[0] = [
|
|
3292
3314
|
f("path", {
|
|
3293
3315
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3294
3316
|
fill: "#1C64F2"
|
|
@@ -3307,7 +3329,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3307
3329
|
}, null, -1)
|
|
3308
3330
|
])]))
|
|
3309
3331
|
]),
|
|
3310
|
-
f("div",
|
|
3332
|
+
f("div", lr, [
|
|
3311
3333
|
r[2] || (r[2] = f("div", { class: "mb-7" }, [
|
|
3312
3334
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
3313
3335
|
f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
@@ -3317,7 +3339,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3317
3339
|
onSubmit: a,
|
|
3318
3340
|
actions: !1
|
|
3319
3341
|
}, {
|
|
3320
|
-
default:
|
|
3342
|
+
default: T(() => [
|
|
3321
3343
|
b(i, {
|
|
3322
3344
|
label: "Email",
|
|
3323
3345
|
name: "email",
|
|
@@ -3326,16 +3348,16 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3326
3348
|
validation: "required|email",
|
|
3327
3349
|
"outer-class": "max-w-full"
|
|
3328
3350
|
}),
|
|
3329
|
-
l.value ? (m(),
|
|
3330
|
-
n.value ? (m(),
|
|
3331
|
-
b(
|
|
3351
|
+
l.value ? (m(), h("div", ir, P(l.value), 1)) : L("", !0),
|
|
3352
|
+
n.value ? (m(), h("div", cr, P(n.value), 1)) : L("", !0),
|
|
3353
|
+
b(x(G), {
|
|
3332
3354
|
type: "submit",
|
|
3333
3355
|
size: "xl",
|
|
3334
3356
|
disabled: o.value,
|
|
3335
3357
|
"button-class": "w-full mb-2"
|
|
3336
3358
|
}, {
|
|
3337
|
-
default:
|
|
3338
|
-
o.value ? (m(),
|
|
3359
|
+
default: T(() => [
|
|
3360
|
+
o.value ? (m(), h("span", dr, "Sending...")) : (m(), h("span", ur, "Send reset link"))
|
|
3339
3361
|
]),
|
|
3340
3362
|
_: 1
|
|
3341
3363
|
}, 8, ["disabled"]),
|
|
@@ -3343,8 +3365,8 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3343
3365
|
to: t.loginRoute,
|
|
3344
3366
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
3345
3367
|
}, {
|
|
3346
|
-
default:
|
|
3347
|
-
|
|
3368
|
+
default: T(() => [...r[1] || (r[1] = [
|
|
3369
|
+
E(" Back to login ", -1)
|
|
3348
3370
|
])]),
|
|
3349
3371
|
_: 1
|
|
3350
3372
|
}, 8, ["to"])
|
|
@@ -3355,17 +3377,17 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3355
3377
|
]);
|
|
3356
3378
|
};
|
|
3357
3379
|
}
|
|
3358
|
-
},
|
|
3380
|
+
}, fr = { class: "h-full grid place-content-center relative" }, mr = { class: "absolute top-8 left-8" }, hr = ["src"], gr = {
|
|
3359
3381
|
key: 1,
|
|
3360
3382
|
width: "59",
|
|
3361
3383
|
height: "23",
|
|
3362
3384
|
viewBox: "0 0 59 23",
|
|
3363
3385
|
fill: "none",
|
|
3364
3386
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3365
|
-
},
|
|
3387
|
+
}, yr = { class: "max-w-sm grid gap-y-1 -mt-8" }, vr = {
|
|
3366
3388
|
key: 0,
|
|
3367
3389
|
class: "text-red-600 text-sm mb-2"
|
|
3368
|
-
},
|
|
3390
|
+
}, br = { key: 0 }, xr = { key: 1 }, kr = {
|
|
3369
3391
|
__name: "SparkResetPasswordView",
|
|
3370
3392
|
props: {
|
|
3371
3393
|
logo: {
|
|
@@ -3378,7 +3400,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3378
3400
|
}
|
|
3379
3401
|
},
|
|
3380
3402
|
setup(e) {
|
|
3381
|
-
const s = J(), t = ne(), o = K(), l = e, n =
|
|
3403
|
+
const s = J(), t = ne(), o = K(), l = e, n = B(!1), a = B(""), c = async ({ password: r, password_confirmation: i }) => {
|
|
3382
3404
|
n.value = !0, a.value = "";
|
|
3383
3405
|
try {
|
|
3384
3406
|
await re.post(o.state.endpoints.passwordReset, {
|
|
@@ -3395,14 +3417,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3395
3417
|
};
|
|
3396
3418
|
return (r, i) => {
|
|
3397
3419
|
const u = A("FormKit");
|
|
3398
|
-
return m(),
|
|
3399
|
-
f("div",
|
|
3400
|
-
l.logo ? (m(),
|
|
3420
|
+
return m(), h("div", fr, [
|
|
3421
|
+
f("div", mr, [
|
|
3422
|
+
l.logo ? (m(), h("img", {
|
|
3401
3423
|
key: 0,
|
|
3402
3424
|
src: l.logo,
|
|
3403
3425
|
alt: "Logo",
|
|
3404
3426
|
class: "h-[23px] w-auto"
|
|
3405
|
-
}, null, 8,
|
|
3427
|
+
}, null, 8, hr)) : (m(), h("svg", gr, [...i[0] || (i[0] = [
|
|
3406
3428
|
f("path", {
|
|
3407
3429
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3408
3430
|
fill: "#1C64F2"
|
|
@@ -3421,7 +3443,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3421
3443
|
}, null, -1)
|
|
3422
3444
|
])]))
|
|
3423
3445
|
]),
|
|
3424
|
-
f("div",
|
|
3446
|
+
f("div", yr, [
|
|
3425
3447
|
i[1] || (i[1] = f("div", { class: "mb-7" }, [
|
|
3426
3448
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
3427
3449
|
f("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
@@ -3431,7 +3453,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3431
3453
|
onSubmit: c,
|
|
3432
3454
|
actions: !1
|
|
3433
3455
|
}, {
|
|
3434
|
-
default:
|
|
3456
|
+
default: T(() => [
|
|
3435
3457
|
b(u, {
|
|
3436
3458
|
label: "New Password",
|
|
3437
3459
|
name: "password",
|
|
@@ -3448,15 +3470,15 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3448
3470
|
validation: "required|confirm:password",
|
|
3449
3471
|
"outer-class": "max-w-full"
|
|
3450
3472
|
}),
|
|
3451
|
-
a.value ? (m(),
|
|
3452
|
-
b(
|
|
3473
|
+
a.value ? (m(), h("div", vr, P(a.value), 1)) : L("", !0),
|
|
3474
|
+
b(x(G), {
|
|
3453
3475
|
type: "submit",
|
|
3454
3476
|
size: "xl",
|
|
3455
3477
|
disabled: n.value,
|
|
3456
3478
|
"button-class": "w-full mb-2"
|
|
3457
3479
|
}, {
|
|
3458
|
-
default:
|
|
3459
|
-
n.value ? (m(),
|
|
3480
|
+
default: T(() => [
|
|
3481
|
+
n.value ? (m(), h("span", xr, "Resetting...")) : (m(), h("span", br, "Reset password"))
|
|
3460
3482
|
]),
|
|
3461
3483
|
_: 1
|
|
3462
3484
|
}, 8, ["disabled"])
|
|
@@ -3467,14 +3489,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3467
3489
|
]);
|
|
3468
3490
|
};
|
|
3469
3491
|
}
|
|
3470
|
-
},
|
|
3492
|
+
}, wr = { class: "h-full grid place-content-center relative" }, _r = { class: "absolute top-8 left-8" }, Sr = ["src"], Cr = {
|
|
3471
3493
|
key: 1,
|
|
3472
3494
|
width: "59",
|
|
3473
3495
|
height: "23",
|
|
3474
3496
|
viewBox: "0 0 59 23",
|
|
3475
3497
|
fill: "none",
|
|
3476
3498
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3477
|
-
},
|
|
3499
|
+
}, $r = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Tr = { class: "flex gap-4 justify-center" }, Lr = {
|
|
3478
3500
|
__name: "SparkError403View",
|
|
3479
3501
|
props: {
|
|
3480
3502
|
logo: {
|
|
@@ -3490,14 +3512,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3490
3512
|
const s = J(), t = e, o = () => {
|
|
3491
3513
|
s.push(t.homeRoute);
|
|
3492
3514
|
};
|
|
3493
|
-
return (l, n) => (m(),
|
|
3494
|
-
f("div",
|
|
3495
|
-
t.logo ? (m(),
|
|
3515
|
+
return (l, n) => (m(), h("div", wr, [
|
|
3516
|
+
f("div", _r, [
|
|
3517
|
+
t.logo ? (m(), h("img", {
|
|
3496
3518
|
key: 0,
|
|
3497
3519
|
src: t.logo,
|
|
3498
3520
|
alt: "Logo",
|
|
3499
3521
|
class: "h-[23px] w-auto"
|
|
3500
|
-
}, null, 8,
|
|
3522
|
+
}, null, 8, Sr)) : (m(), h("svg", Cr, [...n[0] || (n[0] = [
|
|
3501
3523
|
f("path", {
|
|
3502
3524
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3503
3525
|
fill: "#1C64F2"
|
|
@@ -3516,23 +3538,23 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3516
3538
|
}, null, -1)
|
|
3517
3539
|
])]))
|
|
3518
3540
|
]),
|
|
3519
|
-
f("div",
|
|
3541
|
+
f("div", $r, [
|
|
3520
3542
|
n[2] || (n[2] = f("div", null, [
|
|
3521
3543
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
3522
3544
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
3523
3545
|
f("p", { class: "text-gray-600" }, [
|
|
3524
|
-
|
|
3546
|
+
E(" You don't have permission to access this resource."),
|
|
3525
3547
|
f("br"),
|
|
3526
|
-
|
|
3548
|
+
E(" If you believe this is an error, please contact your administrator. ")
|
|
3527
3549
|
])
|
|
3528
3550
|
], -1)),
|
|
3529
|
-
f("div",
|
|
3530
|
-
b(
|
|
3551
|
+
f("div", Tr, [
|
|
3552
|
+
b(x(G), {
|
|
3531
3553
|
onClick: o,
|
|
3532
3554
|
size: "lg"
|
|
3533
3555
|
}, {
|
|
3534
|
-
default:
|
|
3535
|
-
|
|
3556
|
+
default: T(() => [...n[1] || (n[1] = [
|
|
3557
|
+
E(" Go to Home ", -1)
|
|
3536
3558
|
])]),
|
|
3537
3559
|
_: 1
|
|
3538
3560
|
})
|
|
@@ -3540,14 +3562,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3540
3562
|
])
|
|
3541
3563
|
]));
|
|
3542
3564
|
}
|
|
3543
|
-
},
|
|
3565
|
+
}, Pr = { class: "h-full grid place-content-center relative" }, Mr = { class: "absolute top-8 left-8" }, Hr = ["src"], Vr = {
|
|
3544
3566
|
key: 1,
|
|
3545
3567
|
width: "59",
|
|
3546
3568
|
height: "23",
|
|
3547
3569
|
viewBox: "0 0 59 23",
|
|
3548
3570
|
fill: "none",
|
|
3549
3571
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3550
|
-
},
|
|
3572
|
+
}, Rr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Er = { class: "flex gap-4 justify-center" }, Br = {
|
|
3551
3573
|
__name: "SparkError404View",
|
|
3552
3574
|
props: {
|
|
3553
3575
|
logo: {
|
|
@@ -3563,14 +3585,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3563
3585
|
const s = J(), t = e, o = () => {
|
|
3564
3586
|
s.push(t.homeRoute);
|
|
3565
3587
|
};
|
|
3566
|
-
return (l, n) => (m(),
|
|
3567
|
-
f("div",
|
|
3568
|
-
t.logo ? (m(),
|
|
3588
|
+
return (l, n) => (m(), h("div", Pr, [
|
|
3589
|
+
f("div", Mr, [
|
|
3590
|
+
t.logo ? (m(), h("img", {
|
|
3569
3591
|
key: 0,
|
|
3570
3592
|
src: t.logo,
|
|
3571
3593
|
alt: "Logo",
|
|
3572
3594
|
class: "h-[23px] w-auto"
|
|
3573
|
-
}, null, 8,
|
|
3595
|
+
}, null, 8, Hr)) : (m(), h("svg", Vr, [...n[0] || (n[0] = [
|
|
3574
3596
|
f("path", {
|
|
3575
3597
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3576
3598
|
fill: "#1C64F2"
|
|
@@ -3589,19 +3611,19 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3589
3611
|
}, null, -1)
|
|
3590
3612
|
])]))
|
|
3591
3613
|
]),
|
|
3592
|
-
f("div",
|
|
3614
|
+
f("div", Rr, [
|
|
3593
3615
|
n[2] || (n[2] = f("div", null, [
|
|
3594
3616
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
3595
3617
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
3596
3618
|
f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
3597
3619
|
], -1)),
|
|
3598
|
-
f("div",
|
|
3599
|
-
b(
|
|
3620
|
+
f("div", Er, [
|
|
3621
|
+
b(x(G), {
|
|
3600
3622
|
onClick: o,
|
|
3601
3623
|
size: "lg"
|
|
3602
3624
|
}, {
|
|
3603
|
-
default:
|
|
3604
|
-
|
|
3625
|
+
default: T(() => [...n[1] || (n[1] = [
|
|
3626
|
+
E(" Go to Home ", -1)
|
|
3605
3627
|
])]),
|
|
3606
3628
|
_: 1
|
|
3607
3629
|
})
|
|
@@ -3609,14 +3631,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3609
3631
|
])
|
|
3610
3632
|
]));
|
|
3611
3633
|
}
|
|
3612
|
-
},
|
|
3634
|
+
}, Ar = { class: "h-full grid place-content-center relative" }, Fr = { class: "absolute top-8 left-8" }, Or = ["src"], zr = {
|
|
3613
3635
|
key: 1,
|
|
3614
3636
|
width: "59",
|
|
3615
3637
|
height: "23",
|
|
3616
3638
|
viewBox: "0 0 59 23",
|
|
3617
3639
|
fill: "none",
|
|
3618
3640
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3619
|
-
},
|
|
3641
|
+
}, Dr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, jr = { class: "text-primary-600 text-7xl font-bold mb-4" }, Ir = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, Nr = { class: "text-gray-600" }, Zr = { class: "flex gap-4 justify-center" }, xn = {
|
|
3620
3642
|
__name: "SparkErrorGeneralView",
|
|
3621
3643
|
props: {
|
|
3622
3644
|
logo: {
|
|
@@ -3644,14 +3666,14 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3644
3666
|
const s = J(), t = e, o = () => {
|
|
3645
3667
|
s.push(t.homeRoute);
|
|
3646
3668
|
};
|
|
3647
|
-
return (l, n) => (m(),
|
|
3648
|
-
f("div",
|
|
3649
|
-
t.logo ? (m(),
|
|
3669
|
+
return (l, n) => (m(), h("div", Ar, [
|
|
3670
|
+
f("div", Fr, [
|
|
3671
|
+
t.logo ? (m(), h("img", {
|
|
3650
3672
|
key: 0,
|
|
3651
3673
|
src: t.logo,
|
|
3652
3674
|
alt: "Logo",
|
|
3653
3675
|
class: "h-[23px] w-auto"
|
|
3654
|
-
}, null, 8,
|
|
3676
|
+
}, null, 8, Or)) : (m(), h("svg", zr, [...n[0] || (n[0] = [
|
|
3655
3677
|
f("path", {
|
|
3656
3678
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3657
3679
|
fill: "#1C64F2"
|
|
@@ -3670,19 +3692,19 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3670
3692
|
}, null, -1)
|
|
3671
3693
|
])]))
|
|
3672
3694
|
]),
|
|
3673
|
-
f("div",
|
|
3695
|
+
f("div", Dr, [
|
|
3674
3696
|
f("div", null, [
|
|
3675
|
-
f("div",
|
|
3676
|
-
f("h1",
|
|
3677
|
-
f("p",
|
|
3697
|
+
f("div", jr, P(t.errorCode || "Error"), 1),
|
|
3698
|
+
f("h1", Ir, P(t.title || "Something went wrong"), 1),
|
|
3699
|
+
f("p", Nr, P(t.message || "An unexpected error occurred. Please try again later."), 1)
|
|
3678
3700
|
]),
|
|
3679
|
-
f("div",
|
|
3680
|
-
b(
|
|
3701
|
+
f("div", Zr, [
|
|
3702
|
+
b(x(G), {
|
|
3681
3703
|
onClick: o,
|
|
3682
3704
|
size: "lg"
|
|
3683
3705
|
}, {
|
|
3684
|
-
default:
|
|
3685
|
-
|
|
3706
|
+
default: T(() => [...n[1] || (n[1] = [
|
|
3707
|
+
E(" Go to Home ", -1)
|
|
3686
3708
|
])]),
|
|
3687
3709
|
_: 1
|
|
3688
3710
|
})
|
|
@@ -3691,7 +3713,7 @@ const ye = "bolt-next-token", K = ue("auth", () => {
|
|
|
3691
3713
|
]));
|
|
3692
3714
|
}
|
|
3693
3715
|
};
|
|
3694
|
-
function
|
|
3716
|
+
function kn(e = {}) {
|
|
3695
3717
|
const {
|
|
3696
3718
|
loginPath: s = "/login",
|
|
3697
3719
|
logoutPath: t = "/logout",
|
|
@@ -3704,41 +3726,41 @@ function yn(e = {}) {
|
|
|
3704
3726
|
{
|
|
3705
3727
|
path: s,
|
|
3706
3728
|
name: "login",
|
|
3707
|
-
component:
|
|
3729
|
+
component: tr,
|
|
3708
3730
|
props: { logo: n, defaultRedirect: a },
|
|
3709
3731
|
meta: { auth: !1 }
|
|
3710
3732
|
},
|
|
3711
3733
|
{
|
|
3712
3734
|
path: t,
|
|
3713
3735
|
name: "logout",
|
|
3714
|
-
component:
|
|
3736
|
+
component: sr,
|
|
3715
3737
|
props: { defaultRedirect: s },
|
|
3716
3738
|
meta: { auth: !1 }
|
|
3717
3739
|
},
|
|
3718
3740
|
{
|
|
3719
3741
|
path: o,
|
|
3720
3742
|
name: "forgot-password",
|
|
3721
|
-
component:
|
|
3743
|
+
component: pr,
|
|
3722
3744
|
props: { logo: n, loginRoute: s },
|
|
3723
3745
|
meta: { auth: !1 }
|
|
3724
3746
|
},
|
|
3725
3747
|
{
|
|
3726
3748
|
path: l,
|
|
3727
3749
|
name: "password-reset",
|
|
3728
|
-
component:
|
|
3750
|
+
component: kr,
|
|
3729
3751
|
props: { logo: n, loginRoute: s },
|
|
3730
3752
|
meta: { auth: !1 }
|
|
3731
3753
|
}
|
|
3732
3754
|
];
|
|
3733
3755
|
}
|
|
3734
|
-
function
|
|
3756
|
+
function wn(e, s = {}) {
|
|
3735
3757
|
const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
|
|
3736
3758
|
e.beforeEach(async (o, l, n) => {
|
|
3737
3759
|
const a = K();
|
|
3738
|
-
a.state.ready || await a.fetchUser(),
|
|
3760
|
+
a.state.ready || await a.fetchUser(), qr(o, n, a, t);
|
|
3739
3761
|
});
|
|
3740
3762
|
}
|
|
3741
|
-
function
|
|
3763
|
+
function qr(e, s, t, o) {
|
|
3742
3764
|
const l = e.meta.auth !== !1, n = t.check;
|
|
3743
3765
|
if (t.state.overrideToken && e.path === "/logout") {
|
|
3744
3766
|
s({ path: o });
|
|
@@ -3776,7 +3798,7 @@ function jr(e, s, t, o) {
|
|
|
3776
3798
|
s();
|
|
3777
3799
|
}
|
|
3778
3800
|
}
|
|
3779
|
-
function
|
|
3801
|
+
function _n(e = {}) {
|
|
3780
3802
|
const {
|
|
3781
3803
|
forbiddenPath: s = "/error/403",
|
|
3782
3804
|
logo: t = "",
|
|
@@ -3785,12 +3807,12 @@ function bn(e = {}) {
|
|
|
3785
3807
|
return {
|
|
3786
3808
|
path: s,
|
|
3787
3809
|
name: "error-403",
|
|
3788
|
-
component:
|
|
3810
|
+
component: Lr,
|
|
3789
3811
|
props: { logo: t, homeRoute: o },
|
|
3790
3812
|
meta: { auth: !1 }
|
|
3791
3813
|
};
|
|
3792
3814
|
}
|
|
3793
|
-
function
|
|
3815
|
+
function Sn(e = {}) {
|
|
3794
3816
|
const {
|
|
3795
3817
|
logo: s = "",
|
|
3796
3818
|
homeRoute: t = "/dashboard"
|
|
@@ -3798,12 +3820,12 @@ function xn(e = {}) {
|
|
|
3798
3820
|
return {
|
|
3799
3821
|
path: "/:pathMatch(.*)*",
|
|
3800
3822
|
name: "error-404",
|
|
3801
|
-
component:
|
|
3823
|
+
component: Br,
|
|
3802
3824
|
props: { logo: s, homeRoute: t },
|
|
3803
3825
|
meta: { auth: !1 }
|
|
3804
3826
|
};
|
|
3805
3827
|
}
|
|
3806
|
-
function
|
|
3828
|
+
function Cn(e, s) {
|
|
3807
3829
|
e.beforeResolve(async (t) => {
|
|
3808
3830
|
if (t.meta.auth !== !1) {
|
|
3809
3831
|
const o = K();
|
|
@@ -3811,7 +3833,7 @@ function kn(e, s) {
|
|
|
3811
3833
|
}
|
|
3812
3834
|
});
|
|
3813
3835
|
}
|
|
3814
|
-
function
|
|
3836
|
+
function Ur(e = {}) {
|
|
3815
3837
|
const s = re.create({
|
|
3816
3838
|
baseURL: e.baseURL || "",
|
|
3817
3839
|
timeout: e.timeout || 3e4,
|
|
@@ -3852,15 +3874,15 @@ function Nr(e = {}) {
|
|
|
3852
3874
|
), s;
|
|
3853
3875
|
}
|
|
3854
3876
|
let ae = null;
|
|
3855
|
-
function
|
|
3856
|
-
return ae =
|
|
3877
|
+
function $n(e, s = {}) {
|
|
3878
|
+
return ae = Ur(s), e.provide("axios", ae), e.config.globalProperties.$axios = ae, ae;
|
|
3857
3879
|
}
|
|
3858
|
-
function
|
|
3880
|
+
function Tn() {
|
|
3859
3881
|
if (!ae)
|
|
3860
3882
|
throw new Error("Axios instance not initialized. Call setupAxios() first.");
|
|
3861
3883
|
return ae;
|
|
3862
3884
|
}
|
|
3863
|
-
const
|
|
3885
|
+
const Ln = ue("sparkNav", () => {
|
|
3864
3886
|
const e = q({
|
|
3865
3887
|
menu: [],
|
|
3866
3888
|
collapsed: !1,
|
|
@@ -3900,7 +3922,7 @@ const Sn = ue("sparkNav", () => {
|
|
|
3900
3922
|
u(e.menu);
|
|
3901
3923
|
}
|
|
3902
3924
|
};
|
|
3903
|
-
return
|
|
3925
|
+
return I(
|
|
3904
3926
|
() => t.path,
|
|
3905
3927
|
() => {
|
|
3906
3928
|
r();
|
|
@@ -3918,62 +3940,62 @@ const Sn = ue("sparkNav", () => {
|
|
|
3918
3940
|
export {
|
|
3919
3941
|
F as Icons,
|
|
3920
3942
|
se as SparkAlert,
|
|
3921
|
-
|
|
3922
|
-
|
|
3943
|
+
ks as SparkAppSelector,
|
|
3944
|
+
Zs as SparkBrandSelector,
|
|
3923
3945
|
G as SparkButton,
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3946
|
+
Us as SparkButtonGroup,
|
|
3947
|
+
hn as SparkCard,
|
|
3948
|
+
yn as SparkDefaultContainer,
|
|
3949
|
+
Lr as SparkError403View,
|
|
3950
|
+
Br as SparkError404View,
|
|
3951
|
+
xn as SparkErrorGeneralView,
|
|
3952
|
+
pr as SparkForgotPasswordView,
|
|
3953
|
+
tr as SparkLoginView,
|
|
3954
|
+
sr as SparkLogoutView,
|
|
3955
|
+
so as SparkModalContainer,
|
|
3956
|
+
Js as SparkModalDialog,
|
|
3957
|
+
fn as SparkNotificationOutlet,
|
|
3936
3958
|
Se as SparkOverlay,
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3959
|
+
vn as SparkPublicContainer,
|
|
3960
|
+
kr as SparkResetPasswordView,
|
|
3961
|
+
gn as SparkTable,
|
|
3962
|
+
na as SparkTableDatePicker,
|
|
3963
|
+
oa as SparkTableFilterButtons,
|
|
3964
|
+
Qo as SparkTableFilterSelect,
|
|
3965
|
+
Zo as SparkTablePaginationPaging,
|
|
3966
|
+
Ko as SparkTablePaginationPerPage,
|
|
3967
|
+
ua as SparkTableReset,
|
|
3968
|
+
Yo as SparkTableSearch,
|
|
3947
3969
|
Pe as SparkTableToolbar,
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3970
|
+
mn as SparkToastContainer,
|
|
3971
|
+
dn as addIcons,
|
|
3972
|
+
_n as create403Route,
|
|
3973
|
+
Sn as create404Route,
|
|
3974
|
+
kn as createAuthRoutes,
|
|
3975
|
+
Ur as createAxiosInstance,
|
|
3976
|
+
bn as createBootstrapService,
|
|
3977
|
+
io as customiseHeader,
|
|
3978
|
+
ja as deleteCookie,
|
|
3979
|
+
$o as formatTemporal,
|
|
3980
|
+
Tn as getAxiosInstance,
|
|
3981
|
+
za as getCookie,
|
|
3960
3982
|
Ze as getDomain,
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3983
|
+
To as parseDatetime,
|
|
3984
|
+
ao as renderHeaderTitle,
|
|
3985
|
+
Da as setCookie,
|
|
3986
|
+
wn as setupAuthGuards,
|
|
3987
|
+
$n as setupAxios,
|
|
3988
|
+
Cn as setupBootstrapGuard,
|
|
3989
|
+
pn as setupFontAwesome,
|
|
3968
3990
|
oe as sparkModalService,
|
|
3969
3991
|
X as sparkNotificationService,
|
|
3970
3992
|
te as sparkOverlayService,
|
|
3971
|
-
|
|
3993
|
+
Ho as updateRow,
|
|
3972
3994
|
De as useSparkAppSelectorStore,
|
|
3973
3995
|
je as useSparkAppStore,
|
|
3974
3996
|
K as useSparkAuthStore,
|
|
3975
|
-
|
|
3976
|
-
|
|
3997
|
+
Ne as useSparkBrandFilterStore,
|
|
3998
|
+
Ln as useSparkNavStore,
|
|
3977
3999
|
He as useSparkOverlay,
|
|
3978
|
-
|
|
4000
|
+
Vo as useSparkTableRouteSync
|
|
3979
4001
|
};
|