@wishbone-media/spark 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +1274 -1092
- package/formkit.theme.mjs +4 -4
- package/package.json +1 -1
- package/src/assets/css/spark-table.css +31 -6
- package/src/assets/images/brands/mr-antenna.png +0 -0
- package/src/assets/images/brands/mr-group.png +0 -0
- package/src/assets/images/brands/mr-gutter-cleaning.png +0 -0
- package/src/assets/images/brands/mr-pest-controller.png +0 -0
- package/src/components/SparkBrandSelector.vue +9 -9
- package/src/components/SparkModalContainer.vue +1 -1
- package/src/components/SparkOverlay.vue +1 -1
- package/src/components/SparkTable.vue +145 -13
- package/src/components/SparkTablePaginationDetails.vue +1 -1
- package/src/components/SparkTableToolbar.vue +1 -1
- package/src/components/plugins/SparkTableFilterSelect.vue +8 -2
- package/src/components/plugins/SparkTableReset.vue +43 -14
- package/src/components/plugins/SparkTableSearch.vue +10 -5
- package/src/composables/index.js +2 -1
- package/src/composables/useSparkTableRouteSync.js +291 -0
- package/src/containers/SparkDefaultContainer.vue +11 -1
- package/src/plugins/fontawesome.js +5 -0
- package/src/stores/app-selector.js +8 -2
- package/src/stores/brand-filter.js +1 -1
- package/src/stores/navigation.js +1 -0
package/dist/index.js
CHANGED
|
@@ -1,83 +1,85 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { library as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faUndo as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { TransitionRoot as
|
|
7
|
-
import
|
|
8
|
-
import { range as
|
|
9
|
-
import { HotTable as
|
|
1
|
+
import { computed as S, resolveComponent as R, createElementBlock as g, openBlock as f, normalizeClass as $, createElementVNode as d, createVNode as v, unref as b, renderSlot as M, reactive as D, Fragment as j, renderList as N, createCommentVNode as C, toDisplayString as L, createBlock as E, resolveDynamicComponent as te, ref as V, inject as ke, provide as Ee, markRaw as _e, withCtx as T, mergeProps as se, toHandlers as we, createTextVNode as F, watch as A, onMounted as ue, withModifiers as K, useSlots as Se, onUnmounted as Fe, h as fe } from "vue";
|
|
2
|
+
import { library as Ce, icon as re } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import { FontAwesomeIcon as Ae } from "@fortawesome/vue-fontawesome";
|
|
4
|
+
import { faCloudDownload as je, faBolt as Oe, faUndo as ze, faEye as Ie, faSignOut as Ne, faXmark as De, faTrash as qe, faTimes as Ze, faStreetView as Ke, faSortUp as Ue, faSortDown as Ge, faSort as We, faScaleBalanced as Ye, faSatelliteDish as Xe, faLayerPlus as Je, faLaptopMobile as Qe, faInfoCircle as et, faGripDotsVertical as tt, faGearComplex as st, faFlag as at, faFaceSmileWink as ot, faFaceSmileRelaxed as rt, faExclamationTriangle as nt, faEllipsisVertical as lt, faEllipsis as it, faEdit as ct, faComments as dt, faCircleXmark as ut, faCircleUser as pt, faChevronUp as ft, faChevronRight as mt, faChevronLeft as gt, faChevronDown as ht, faCheckCircle as yt, faCheck as bt, faBullhorn as vt, faBellRing as xt, faBarsSort as kt, faArrowRightToLine as _t, faArrowLeftToLine as wt } from "@fortawesome/pro-regular-svg-icons";
|
|
5
|
+
import { defineStore as ae } from "pinia";
|
|
6
|
+
import { TransitionRoot as $e, Dialog as Te, TransitionChild as ne, DialogPanel as Le } from "@headlessui/vue";
|
|
7
|
+
import le from "nprogress";
|
|
8
|
+
import { range as St, get as I, find as Ct, has as $t } from "lodash";
|
|
9
|
+
import { HotTable as Tt } 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
|
|
14
|
-
import { useDebounceFn as
|
|
15
|
-
import { registerRenderer as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
var
|
|
12
|
+
import { registerPlugin as oe, AutoColumnSize as Lt, CopyPaste as Ht, StretchColumns as Pt, NestedHeaders as Vt } from "handsontable/plugins";
|
|
13
|
+
import { registerAllCellTypes as Rt } from "handsontable/cellTypes";
|
|
14
|
+
import { useDebounceFn as He, watchDebounced as me } from "@vueuse/core";
|
|
15
|
+
import { registerRenderer as Bt, baseRenderer as Mt } from "handsontable/renderers";
|
|
16
|
+
import { useRouter as q, useRoute as Q } from "vue-router";
|
|
17
|
+
import J from "axios";
|
|
18
|
+
var Et = {
|
|
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
|
+
}, Ft = {
|
|
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
|
+
}, At = {
|
|
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
|
-
const
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
31
|
+
const B = {
|
|
32
|
+
farArrowLeftToLine: wt,
|
|
33
|
+
farArrowRightToLine: _t,
|
|
34
|
+
farBarsSort: kt,
|
|
35
|
+
farBellRing: xt,
|
|
36
|
+
farBullhorn: vt,
|
|
37
|
+
farCheck: bt,
|
|
38
|
+
farCheckCircle: yt,
|
|
39
|
+
farChevronDown: ht,
|
|
40
|
+
farChevronLeft: gt,
|
|
41
|
+
farChevronRight: mt,
|
|
42
|
+
farChevronUp: ft,
|
|
43
|
+
farCircleUser: pt,
|
|
44
|
+
farCircleXmark: ut,
|
|
45
|
+
farComments: dt,
|
|
46
|
+
farEdit: ct,
|
|
47
|
+
farEllipsis: it,
|
|
48
|
+
farEllipsisVertical: lt,
|
|
49
|
+
farExclamationTriangle: nt,
|
|
50
|
+
farFaceSmileRelaxed: rt,
|
|
51
|
+
farFaceSmileWink: ot,
|
|
52
|
+
farFlag: at,
|
|
53
|
+
farGearComplex: st,
|
|
54
|
+
farGripDotsVertical: tt,
|
|
55
|
+
farInfoCircle: et,
|
|
56
|
+
farLaptopMobile: Qe,
|
|
57
|
+
farLayerPlus: Je,
|
|
58
|
+
farSatelliteDish: Xe,
|
|
59
|
+
farScaleBalanced: Ye,
|
|
60
|
+
farSort: We,
|
|
61
|
+
farSortDown: Ge,
|
|
62
|
+
farSortUp: Ue,
|
|
63
|
+
farStreetView: Ke,
|
|
64
|
+
farTimes: Ze,
|
|
65
|
+
farTrash: qe,
|
|
66
|
+
farXmark: De,
|
|
67
|
+
farSignOut: Ne,
|
|
68
|
+
farEye: Ie,
|
|
69
|
+
farUndo: ze,
|
|
70
|
+
farBolt: Oe,
|
|
71
|
+
farCloudDownload: je,
|
|
72
|
+
fadSort: Ft,
|
|
73
|
+
fadSortDown: At,
|
|
74
|
+
fadSortUp: Et
|
|
73
75
|
};
|
|
74
|
-
function
|
|
75
|
-
Object.assign(
|
|
76
|
+
function $r(e) {
|
|
77
|
+
Object.assign(B, e), Ce.add(...Object.values(e));
|
|
76
78
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
+
function Tr(e) {
|
|
80
|
+
Ce.add(...Object.values(B)), e.component("FontAwesomeIcon", Ae);
|
|
79
81
|
}
|
|
80
|
-
const
|
|
82
|
+
const jt = { class: "flex items-center" }, Ot = { class: "shrink-0 self-start" }, zt = { class: "ml-3" }, It = { class: "ml-auto pl-3 pt-1 self-start" }, Nt = { class: "-mx-1.5 -my-1.5" }, Lr = {
|
|
81
83
|
__name: "SparkAlert",
|
|
82
84
|
props: {
|
|
83
85
|
type: {
|
|
@@ -88,51 +90,51 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
88
90
|
},
|
|
89
91
|
emits: ["close"],
|
|
90
92
|
setup(e) {
|
|
91
|
-
const s = e, t =
|
|
93
|
+
const s = e, t = S(() => ({
|
|
92
94
|
success: "bg-green-50 border-green-200 text-green-700",
|
|
93
95
|
warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
|
|
94
96
|
danger: "bg-red-50 border-red-200 text-red-700",
|
|
95
97
|
info: "bg-blue-50 border-blue-200 text-blue-700"
|
|
96
|
-
})[s.type]), a =
|
|
98
|
+
})[s.type]), a = S(() => ({
|
|
97
99
|
success: "text-green-400",
|
|
98
100
|
warning: "text-yellow-400",
|
|
99
101
|
danger: "text-red-400",
|
|
100
102
|
info: "text-blue-400"
|
|
101
|
-
})[s.type]), l =
|
|
103
|
+
})[s.type]), l = S(() => ({
|
|
102
104
|
success: "farCheckCircle",
|
|
103
105
|
warning: "farExclamationTriangle",
|
|
104
106
|
danger: "farCircleXmark",
|
|
105
107
|
info: "farInfoCircle"
|
|
106
|
-
})[s.type]),
|
|
108
|
+
})[s.type]), r = S(() => ({
|
|
107
109
|
success: "text-green-400 hover:bg-green-100",
|
|
108
110
|
warning: "text-yellow-400 hover:bg-yellow-100",
|
|
109
111
|
danger: "text-red-400 hover:bg-red-100",
|
|
110
112
|
info: "text-blue-400 hover:bg-blue-100"
|
|
111
113
|
})[s.type]);
|
|
112
114
|
return (o, i) => {
|
|
113
|
-
const
|
|
115
|
+
const n = R("font-awesome-icon");
|
|
114
116
|
return f(), g("div", {
|
|
115
|
-
class:
|
|
117
|
+
class: $(["rounded-md border p-4", t.value])
|
|
116
118
|
}, [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
v(
|
|
120
|
-
icon:
|
|
121
|
-
class:
|
|
119
|
+
d("div", jt, [
|
|
120
|
+
d("div", Ot, [
|
|
121
|
+
v(n, {
|
|
122
|
+
icon: b(B)[l.value],
|
|
123
|
+
class: $(a.value)
|
|
122
124
|
}, null, 8, ["icon", "class"])
|
|
123
125
|
]),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
d("div", zt, [
|
|
127
|
+
M(o.$slots, "default")
|
|
126
128
|
]),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
d("div", It, [
|
|
130
|
+
d("div", Nt, [
|
|
131
|
+
d("button", {
|
|
130
132
|
type: "button",
|
|
131
|
-
class:
|
|
132
|
-
onClick: i[0] || (i[0] = (
|
|
133
|
+
class: $(["inline-flex rounded-md px-2 py-1.5", r.value]),
|
|
134
|
+
onClick: i[0] || (i[0] = (c) => o.$emit("close"))
|
|
133
135
|
}, [
|
|
134
|
-
v(
|
|
135
|
-
icon:
|
|
136
|
+
v(n, {
|
|
137
|
+
icon: b(B).farXmark
|
|
136
138
|
}, null, 8, ["icon"])
|
|
137
139
|
], 2)
|
|
138
140
|
])
|
|
@@ -141,7 +143,13 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
141
143
|
], 2);
|
|
142
144
|
};
|
|
143
145
|
}
|
|
144
|
-
},
|
|
146
|
+
}, ie = [
|
|
147
|
+
{
|
|
148
|
+
name: "Bolt",
|
|
149
|
+
description: "Job management",
|
|
150
|
+
href: "https://bolt-next.letsbolt.io",
|
|
151
|
+
icon: "farBolt"
|
|
152
|
+
},
|
|
145
153
|
{
|
|
146
154
|
name: "3CX",
|
|
147
155
|
description: "VOIP Phone",
|
|
@@ -174,24 +182,24 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
174
182
|
},
|
|
175
183
|
{
|
|
176
184
|
name: "ReVuze",
|
|
177
|
-
description: "Get
|
|
185
|
+
description: "Get customer feedback",
|
|
178
186
|
href: "https://revuze-next.letsbolt.io",
|
|
179
187
|
icon: "farComments"
|
|
180
188
|
},
|
|
181
189
|
{
|
|
182
190
|
name: "Tabula",
|
|
183
|
-
description: "Admin interface",
|
|
191
|
+
description: "Admin interface template",
|
|
184
192
|
href: "https://tabula.letsbolt.io",
|
|
185
193
|
icon: "farCompass"
|
|
186
194
|
}
|
|
187
|
-
],
|
|
188
|
-
const e =
|
|
189
|
-
apps: [...
|
|
190
|
-
}), s = (
|
|
191
|
-
if (
|
|
192
|
-
const o =
|
|
193
|
-
const
|
|
194
|
-
return
|
|
195
|
+
], Pe = ae("sparkAppSelector", () => {
|
|
196
|
+
const e = D({
|
|
197
|
+
apps: [...ie]
|
|
198
|
+
}), s = (r = {}) => {
|
|
199
|
+
if (r.apps && Array.isArray(r.apps)) {
|
|
200
|
+
const o = r.apps.filter((i) => {
|
|
201
|
+
const n = i.name && i.description && i.icon && i.href;
|
|
202
|
+
return n || console.warn("useSparkAppSelectorStore: Invalid app object", i), n;
|
|
195
203
|
});
|
|
196
204
|
e.apps = o.map((i) => ({
|
|
197
205
|
name: i.name,
|
|
@@ -201,23 +209,23 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
201
209
|
}));
|
|
202
210
|
return;
|
|
203
211
|
}
|
|
204
|
-
if (
|
|
212
|
+
if (r.appHrefs && typeof r.appHrefs == "object") {
|
|
205
213
|
const o = /* @__PURE__ */ new Map();
|
|
206
|
-
Object.keys(
|
|
207
|
-
o.set(i.toLowerCase(),
|
|
208
|
-
}), e.apps =
|
|
209
|
-
const
|
|
214
|
+
Object.keys(r.appHrefs).forEach((i) => {
|
|
215
|
+
o.set(i.toLowerCase(), r.appHrefs[i]);
|
|
216
|
+
}), e.apps = ie.map((i) => {
|
|
217
|
+
const n = o.get(i.name.toLowerCase());
|
|
210
218
|
return {
|
|
211
219
|
...i,
|
|
212
|
-
href:
|
|
220
|
+
href: n || i.href
|
|
213
221
|
};
|
|
214
222
|
});
|
|
215
223
|
return;
|
|
216
224
|
}
|
|
217
|
-
e.apps = [...
|
|
218
|
-
}, t =
|
|
219
|
-
if (!
|
|
220
|
-
const o =
|
|
225
|
+
e.apps = [...ie];
|
|
226
|
+
}, t = S(() => e.apps), a = (r) => {
|
|
227
|
+
if (!r) return null;
|
|
228
|
+
const o = r.toLowerCase();
|
|
221
229
|
return e.apps.find((i) => i.name.toLowerCase() === o) || null;
|
|
222
230
|
};
|
|
223
231
|
return {
|
|
@@ -225,13 +233,13 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
225
233
|
initialize: s,
|
|
226
234
|
allApps: t,
|
|
227
235
|
getAppByName: a,
|
|
228
|
-
getAppIcon: (
|
|
229
|
-
const o = a(
|
|
236
|
+
getAppIcon: (r) => {
|
|
237
|
+
const o = a(r);
|
|
230
238
|
return o ? o.icon : "";
|
|
231
239
|
}
|
|
232
240
|
};
|
|
233
|
-
}),
|
|
234
|
-
const e =
|
|
241
|
+
}), Ve = ae("sparkApp", () => {
|
|
242
|
+
const e = D({
|
|
235
243
|
app: "",
|
|
236
244
|
homeRoute: "dashboard",
|
|
237
245
|
showBrandSelector: !0,
|
|
@@ -243,16 +251,16 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
243
251
|
e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
|
|
244
252
|
}
|
|
245
253
|
};
|
|
246
|
-
}),
|
|
254
|
+
}), Dt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, qt = { class: "flex flex-1 flex-col" }, Zt = { class: "divide-y divide-gray-200" }, Kt = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ut = { class: "ml-auto flex items-center" }, Gt = ["href", "onClick"], Wt = { class: "gap-y-1" }, Yt = { class: "text-base text-gray-800 flex items-center" }, Xt = { class: "font-medium" }, Jt = {
|
|
247
255
|
key: 0,
|
|
248
256
|
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"
|
|
249
|
-
},
|
|
257
|
+
}, Qt = { class: "text-sm text-gray-500" }, es = { class: "ml-auto flex items-center" }, ts = { class: "mt-auto" }, ss = {
|
|
250
258
|
key: 0,
|
|
251
259
|
class: "p-6"
|
|
252
|
-
},
|
|
260
|
+
}, as = {
|
|
253
261
|
key: 1,
|
|
254
262
|
class: "bg-gray-50 p-6"
|
|
255
|
-
},
|
|
263
|
+
}, os = {
|
|
256
264
|
__name: "SparkAppSelector",
|
|
257
265
|
props: {
|
|
258
266
|
bottomSlot: {
|
|
@@ -266,104 +274,104 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
266
274
|
},
|
|
267
275
|
emits: ["close", "select"],
|
|
268
276
|
setup(e, { emit: s }) {
|
|
269
|
-
const t = s, a =
|
|
277
|
+
const t = s, a = Pe(), l = Ve(), r = S(() => {
|
|
270
278
|
const i = l.state.app;
|
|
271
|
-
return a.state.apps.map((
|
|
272
|
-
...
|
|
273
|
-
current: i &&
|
|
279
|
+
return a.state.apps.map((n) => ({
|
|
280
|
+
...n,
|
|
281
|
+
current: i && n.name.toLowerCase() === i.toLowerCase()
|
|
274
282
|
}));
|
|
275
|
-
}), o = (i,
|
|
283
|
+
}), o = (i, n) => {
|
|
276
284
|
t("select", i);
|
|
277
285
|
};
|
|
278
|
-
return (i,
|
|
279
|
-
const
|
|
280
|
-
return f(), g("div",
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
v(
|
|
287
|
-
icon:
|
|
286
|
+
return (i, n) => {
|
|
287
|
+
const c = R("font-awesome-icon");
|
|
288
|
+
return f(), g("div", Dt, [
|
|
289
|
+
d("div", qt, [
|
|
290
|
+
d("div", Zt, [
|
|
291
|
+
d("div", Kt, [
|
|
292
|
+
n[1] || (n[1] = d("div", null, "Mr Group Network", -1)),
|
|
293
|
+
d("div", Ut, [
|
|
294
|
+
v(c, {
|
|
295
|
+
icon: b(B).farTimes,
|
|
288
296
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
289
|
-
onClick:
|
|
297
|
+
onClick: n[0] || (n[0] = (p) => t("close"))
|
|
290
298
|
}, null, 8, ["icon"])
|
|
291
299
|
])
|
|
292
300
|
]),
|
|
293
|
-
(f(!0), g(
|
|
294
|
-
key:
|
|
295
|
-
href:
|
|
301
|
+
(f(!0), g(j, null, N(r.value, (p) => (f(), g("a", {
|
|
302
|
+
key: p.name,
|
|
303
|
+
href: p.href,
|
|
296
304
|
target: "_blank",
|
|
297
|
-
class:
|
|
298
|
-
onClick: (u) =>
|
|
305
|
+
class: $([p.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
306
|
+
onClick: (u) => p.current ? u.preventDefault() : o(p)
|
|
299
307
|
}, [
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
d("div", Wt, [
|
|
309
|
+
d("div", Yt, [
|
|
310
|
+
d("div", Xt, L(p.name), 1),
|
|
311
|
+
p.current ? (f(), g("span", Jt, " Active ")) : C("", !0)
|
|
304
312
|
]),
|
|
305
|
-
|
|
313
|
+
d("div", Qt, L(p.description), 1)
|
|
306
314
|
]),
|
|
307
|
-
|
|
308
|
-
v(
|
|
309
|
-
class:
|
|
310
|
-
icon:
|
|
315
|
+
d("div", es, [
|
|
316
|
+
v(c, {
|
|
317
|
+
class: $([p.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
318
|
+
icon: b(B)[p.icon]
|
|
311
319
|
}, null, 8, ["class", "icon"])
|
|
312
320
|
])
|
|
313
|
-
], 10,
|
|
314
|
-
|
|
321
|
+
], 10, Gt))), 128)),
|
|
322
|
+
n[2] || (n[2] = d("div", null, null, -1))
|
|
315
323
|
]),
|
|
316
|
-
|
|
317
|
-
i.$slots.bottom || e.bottomSlot ? (f(), g("div",
|
|
318
|
-
|
|
319
|
-
e.bottomSlot ? (f(),
|
|
324
|
+
d("div", ts, [
|
|
325
|
+
i.$slots.bottom || e.bottomSlot ? (f(), g("div", ss, [
|
|
326
|
+
M(i.$slots, "bottom", {}, () => [
|
|
327
|
+
e.bottomSlot ? (f(), E(te(e.bottomSlot), { key: 0 })) : C("", !0)
|
|
320
328
|
])
|
|
321
|
-
])) :
|
|
322
|
-
i.$slots.footer || e.footerSlot ? (f(), g("div",
|
|
323
|
-
|
|
324
|
-
e.footerSlot ? (f(),
|
|
329
|
+
])) : C("", !0),
|
|
330
|
+
i.$slots.footer || e.footerSlot ? (f(), g("div", as, [
|
|
331
|
+
M(i.$slots, "footer", {}, () => [
|
|
332
|
+
e.footerSlot ? (f(), E(te(e.footerSlot), { key: 0 })) : C("", !0)
|
|
325
333
|
])
|
|
326
|
-
])) :
|
|
334
|
+
])) : C("", !0)
|
|
327
335
|
])
|
|
328
336
|
])
|
|
329
337
|
]);
|
|
330
338
|
};
|
|
331
339
|
}
|
|
332
|
-
},
|
|
340
|
+
}, Re = ae(
|
|
333
341
|
"brandFilter",
|
|
334
342
|
() => {
|
|
335
|
-
const e =
|
|
343
|
+
const e = D({
|
|
336
344
|
brands: []
|
|
337
|
-
}), s = (
|
|
338
|
-
if (!
|
|
345
|
+
}), s = (r = {}) => {
|
|
346
|
+
if (!r.brands || !Array.isArray(r.brands)) {
|
|
339
347
|
console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
|
|
340
348
|
return;
|
|
341
349
|
}
|
|
342
|
-
const o =
|
|
343
|
-
const
|
|
344
|
-
return
|
|
345
|
-
}), i = o.filter((
|
|
346
|
-
i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((
|
|
347
|
-
|
|
348
|
-
}), e.brands = o.map((
|
|
349
|
-
id:
|
|
350
|
-
name:
|
|
351
|
-
logo:
|
|
352
|
-
current:
|
|
350
|
+
const o = r.brands.filter((n) => {
|
|
351
|
+
const c = n.name && n.logo;
|
|
352
|
+
return c || console.warn("useSparkBrandFilterStore: Invalid brand object", n), c;
|
|
353
|
+
}), i = o.filter((n) => n.current);
|
|
354
|
+
i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((n) => {
|
|
355
|
+
n.current = n === i[0];
|
|
356
|
+
}), e.brands = o.map((n) => ({
|
|
357
|
+
id: n.id,
|
|
358
|
+
name: n.name,
|
|
359
|
+
logo: n.logo,
|
|
360
|
+
current: n.current || !1
|
|
353
361
|
}));
|
|
354
|
-
}, t =
|
|
362
|
+
}, t = S(() => e.brands.find((r) => r.current) || null), a = S(() => e.brands);
|
|
355
363
|
return {
|
|
356
364
|
state: e,
|
|
357
365
|
initialize: s,
|
|
358
366
|
currentBrand: t,
|
|
359
367
|
allBrands: a,
|
|
360
|
-
toggleBrand: (
|
|
361
|
-
if (!
|
|
368
|
+
toggleBrand: (r) => {
|
|
369
|
+
if (!r || !e.brands.includes(r)) {
|
|
362
370
|
console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
|
|
363
371
|
return;
|
|
364
372
|
}
|
|
365
373
|
e.brands.forEach((o) => {
|
|
366
|
-
o.current = o ===
|
|
374
|
+
o.current = o === r;
|
|
367
375
|
});
|
|
368
376
|
}
|
|
369
377
|
};
|
|
@@ -373,65 +381,65 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
373
381
|
paths: ["state.brands"]
|
|
374
382
|
}
|
|
375
383
|
}
|
|
376
|
-
),
|
|
384
|
+
), rs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ns = { class: "flex flex-1 flex-col" }, ls = { class: "divide-y divide-gray-200" }, is = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, cs = { class: "ml-auto flex items-center" }, ds = {
|
|
377
385
|
key: 0,
|
|
378
386
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
379
|
-
},
|
|
387
|
+
}, us = ["onClick"], ps = { class: "w-full gap-y-1 flex justify-between" }, fs = { class: "flex flex-col" }, ms = { class: "flex items-center" }, gs = { class: "font-medium text-base text-gray-900" }, hs = {
|
|
380
388
|
key: 0,
|
|
381
|
-
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-
|
|
382
|
-
},
|
|
389
|
+
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"
|
|
390
|
+
}, ys = { class: "text-sm text-gray-500 font-normal" }, bs = { class: "flex items-center" }, vs = ["src", "alt"], xs = {
|
|
383
391
|
__name: "SparkBrandSelector",
|
|
384
392
|
emits: ["close", "select"],
|
|
385
393
|
setup(e, { emit: s }) {
|
|
386
|
-
const t = s, a =
|
|
387
|
-
t("select",
|
|
394
|
+
const t = s, a = Re(), l = (r) => {
|
|
395
|
+
t("select", r);
|
|
388
396
|
};
|
|
389
|
-
return (
|
|
390
|
-
const i =
|
|
391
|
-
return f(), g("div",
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
o[1] || (o[1] =
|
|
396
|
-
|
|
397
|
+
return (r, o) => {
|
|
398
|
+
const i = R("font-awesome-icon");
|
|
399
|
+
return f(), g("div", rs, [
|
|
400
|
+
d("div", ns, [
|
|
401
|
+
d("div", ls, [
|
|
402
|
+
d("div", is, [
|
|
403
|
+
o[1] || (o[1] = d("div", null, "Filter by Brand", -1)),
|
|
404
|
+
d("div", cs, [
|
|
397
405
|
v(i, {
|
|
398
|
-
icon:
|
|
406
|
+
icon: b(B).farTimes,
|
|
399
407
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
400
|
-
onClick: o[0] || (o[0] = (
|
|
408
|
+
onClick: o[0] || (o[0] = (n) => t("close"))
|
|
401
409
|
}, null, 8, ["icon"])
|
|
402
410
|
])
|
|
403
411
|
]),
|
|
404
|
-
|
|
405
|
-
(f(!0), g(
|
|
406
|
-
key:
|
|
407
|
-
class:
|
|
408
|
-
onClick: (
|
|
412
|
+
b(a).allBrands.length === 0 ? (f(), g("div", ds, " No brands configured ")) : C("", !0),
|
|
413
|
+
(f(!0), g(j, null, N(b(a).allBrands, (n) => (f(), g("div", {
|
|
414
|
+
key: n.id,
|
|
415
|
+
class: $([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
416
|
+
onClick: (c) => l(n)
|
|
409
417
|
}, [
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
class: "h-8 w-auto"
|
|
416
|
-
}, null, 8, ns)
|
|
417
|
-
]),
|
|
418
|
-
c("div", ls, [
|
|
419
|
-
c("div", is, [
|
|
420
|
-
c("div", cs, S(r.name), 1),
|
|
421
|
-
r.current ? (f(), g("span", ds, " Current ")) : x("", !0)
|
|
418
|
+
d("div", ps, [
|
|
419
|
+
d("div", fs, [
|
|
420
|
+
d("div", ms, [
|
|
421
|
+
d("div", gs, L(n.name), 1),
|
|
422
|
+
n.current ? (f(), g("span", hs, " Current ")) : C("", !0)
|
|
422
423
|
]),
|
|
423
|
-
|
|
424
|
+
d("div", ys, L(n.current ? "Current Brand" : "Change to"), 1)
|
|
425
|
+
]),
|
|
426
|
+
d("div", bs, [
|
|
427
|
+
d("img", {
|
|
428
|
+
src: n.logo,
|
|
429
|
+
alt: `${n.name} logo`,
|
|
430
|
+
class: "h-8 w-auto"
|
|
431
|
+
}, null, 8, vs)
|
|
424
432
|
])
|
|
425
433
|
])
|
|
426
|
-
], 10,
|
|
427
|
-
o[2] || (o[2] =
|
|
434
|
+
], 10, us))), 128)),
|
|
435
|
+
o[2] || (o[2] = d("div", null, null, -1))
|
|
428
436
|
]),
|
|
429
|
-
o[3] || (o[3] =
|
|
437
|
+
o[3] || (o[3] = d("div", { class: "mt-auto" }, null, -1))
|
|
430
438
|
])
|
|
431
439
|
]);
|
|
432
440
|
};
|
|
433
441
|
}
|
|
434
|
-
},
|
|
442
|
+
}, ks = ["disabled"], z = {
|
|
435
443
|
__name: "SparkButton",
|
|
436
444
|
props: {
|
|
437
445
|
size: {
|
|
@@ -453,16 +461,16 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
453
461
|
}
|
|
454
462
|
},
|
|
455
463
|
setup(e) {
|
|
456
|
-
const s = e, t =
|
|
464
|
+
const s = e, t = V(null), a = ke("buttonGroup", null), l = S(() => {
|
|
457
465
|
if (!a?.isInGroup || !t.value) return null;
|
|
458
|
-
const
|
|
466
|
+
const n = a.getButtonIndex(t.value), c = a.getButtonCount();
|
|
459
467
|
return {
|
|
460
|
-
isFirst:
|
|
461
|
-
isLast:
|
|
462
|
-
index:
|
|
463
|
-
total:
|
|
468
|
+
isFirst: n === 0,
|
|
469
|
+
isLast: n === c - 1,
|
|
470
|
+
index: n,
|
|
471
|
+
total: c
|
|
464
472
|
};
|
|
465
|
-
}),
|
|
473
|
+
}), r = {
|
|
466
474
|
paddingX: /^px-/,
|
|
467
475
|
paddingY: /^py-/,
|
|
468
476
|
paddingAll: /^p-/,
|
|
@@ -472,99 +480,99 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
472
480
|
borderRadius: /^rounded-/,
|
|
473
481
|
background: /^bg-/,
|
|
474
482
|
text: /^text-(?!white|black)/
|
|
475
|
-
}, o = (
|
|
476
|
-
if (!
|
|
477
|
-
const
|
|
478
|
-
return [...
|
|
479
|
-
const
|
|
480
|
-
([
|
|
481
|
-
)?.[0],
|
|
482
|
-
([
|
|
483
|
+
}, o = (n, c) => {
|
|
484
|
+
if (!c) return n;
|
|
485
|
+
const p = n.split(" ").filter(Boolean), u = c.split(" ").filter(Boolean);
|
|
486
|
+
return [...p.filter((_) => !u.some((k) => {
|
|
487
|
+
const m = Object.entries(r).find(
|
|
488
|
+
([H, h]) => h.test(_)
|
|
489
|
+
)?.[0], x = Object.entries(r).find(
|
|
490
|
+
([H, h]) => h.test(k)
|
|
483
491
|
)?.[0];
|
|
484
|
-
return
|
|
492
|
+
return m && m === x;
|
|
485
493
|
})), ...u].join(" ");
|
|
486
|
-
}, i =
|
|
487
|
-
let
|
|
494
|
+
}, i = S(() => {
|
|
495
|
+
let n = "", c = "";
|
|
488
496
|
switch (s.size) {
|
|
489
497
|
case "xs":
|
|
490
|
-
|
|
498
|
+
n += " px-2 py-1 text-xs", c = "sm";
|
|
491
499
|
break;
|
|
492
500
|
case "sm":
|
|
493
|
-
|
|
501
|
+
n += " px-2 py-1 text-sm", c = "sm";
|
|
494
502
|
break;
|
|
495
503
|
case "md":
|
|
496
|
-
|
|
504
|
+
n += " px-2.5 py-1.5 text-sm", c = "md";
|
|
497
505
|
break;
|
|
498
506
|
case "lg":
|
|
499
|
-
|
|
507
|
+
n += " px-3 py-2 text-sm", c = "md";
|
|
500
508
|
break;
|
|
501
509
|
case "xl":
|
|
502
|
-
|
|
510
|
+
n += " px-3.5 py-2.5 min-h-[42px] text-sm", c = "md";
|
|
503
511
|
break;
|
|
504
512
|
}
|
|
505
513
|
if (a?.isInGroup && l.value) {
|
|
506
|
-
const { isFirst:
|
|
507
|
-
|
|
514
|
+
const { isFirst: p, isLast: u } = l.value;
|
|
515
|
+
n += " relative inline-flex items-center focus:z-10", p && u ? n += ` rounded-${c}` : p ? n += ` rounded-l-${c} rounded-r-none` : u ? n += ` rounded-r-${c} rounded-l-none -ml-px` : n += " rounded-none -ml-px";
|
|
508
516
|
} else
|
|
509
|
-
|
|
517
|
+
n += ` shadow-xs rounded-${c}`;
|
|
510
518
|
switch (s.variant) {
|
|
511
519
|
case "primary":
|
|
512
|
-
|
|
520
|
+
n += " bg-primary-600 hover:bg-primary-500 text-white";
|
|
513
521
|
break;
|
|
514
522
|
case "secondary":
|
|
515
|
-
|
|
523
|
+
n += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
|
|
516
524
|
break;
|
|
517
525
|
case "success":
|
|
518
|
-
|
|
526
|
+
n += " bg-green-600 hover:bg-green-500 text-white";
|
|
519
527
|
break;
|
|
520
528
|
case "warning":
|
|
521
|
-
|
|
529
|
+
n += " bg-amber-600 hover:bg-amber-500 text-white";
|
|
522
530
|
break;
|
|
523
531
|
case "danger":
|
|
524
|
-
|
|
532
|
+
n += " bg-red-600 hover:bg-red-500 text-white";
|
|
525
533
|
break;
|
|
526
534
|
case "info":
|
|
527
|
-
|
|
535
|
+
n += " bg-cyan-600 hover:bg-cyan-500 text-white";
|
|
528
536
|
break;
|
|
529
537
|
default:
|
|
530
|
-
|
|
538
|
+
n += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
|
|
531
539
|
}
|
|
532
|
-
return
|
|
540
|
+
return n = o(n, s.buttonClass), n;
|
|
533
541
|
});
|
|
534
|
-
return (
|
|
542
|
+
return (n, c) => (f(), g("button", {
|
|
535
543
|
type: "button",
|
|
536
544
|
ref_key: "buttonRef",
|
|
537
545
|
ref: t,
|
|
538
|
-
class:
|
|
546
|
+
class: $(i.value),
|
|
539
547
|
disabled: e.disabled,
|
|
540
|
-
onClick:
|
|
548
|
+
onClick: c[0] || (c[0] = (p) => n.$emit("click"))
|
|
541
549
|
}, [
|
|
542
|
-
|
|
543
|
-
], 10,
|
|
550
|
+
M(n.$slots, "default")
|
|
551
|
+
], 10, ks));
|
|
544
552
|
}
|
|
545
|
-
},
|
|
553
|
+
}, _s = {
|
|
546
554
|
__name: "SparkButtonGroup",
|
|
547
555
|
setup(e) {
|
|
548
|
-
const s =
|
|
549
|
-
return
|
|
556
|
+
const s = V(null);
|
|
557
|
+
return Ee("buttonGroup", {
|
|
550
558
|
isInGroup: !0,
|
|
551
559
|
getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
|
|
552
560
|
getButtonCount: () => s.value?.children.length || 0
|
|
553
|
-
}), (l,
|
|
561
|
+
}), (l, r) => (f(), g("div", {
|
|
554
562
|
class: "inline-flex rounded-md shadow-xs",
|
|
555
563
|
ref_key: "groupRef",
|
|
556
564
|
ref: s
|
|
557
565
|
}, [
|
|
558
|
-
|
|
566
|
+
M(l.$slots, "default")
|
|
559
567
|
], 512));
|
|
560
568
|
}
|
|
561
|
-
},
|
|
569
|
+
}, ws = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, Ss = {
|
|
562
570
|
key: 0,
|
|
563
571
|
class: "p-5"
|
|
564
|
-
},
|
|
572
|
+
}, Cs = {
|
|
565
573
|
key: 1,
|
|
566
574
|
class: "p-5"
|
|
567
|
-
},
|
|
575
|
+
}, Hr = {
|
|
568
576
|
__name: "SparkCard",
|
|
569
577
|
props: {
|
|
570
578
|
padded: {
|
|
@@ -578,24 +586,24 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
|
|
|
578
586
|
},
|
|
579
587
|
setup(e) {
|
|
580
588
|
const s = e;
|
|
581
|
-
return (t, a) => (f(), g("div",
|
|
582
|
-
t.$slots.header ? (f(), g("div",
|
|
583
|
-
|
|
584
|
-
])) :
|
|
585
|
-
|
|
586
|
-
class:
|
|
589
|
+
return (t, a) => (f(), g("div", ws, [
|
|
590
|
+
t.$slots.header ? (f(), g("div", Ss, [
|
|
591
|
+
M(t.$slots, "header")
|
|
592
|
+
])) : C("", !0),
|
|
593
|
+
d("div", {
|
|
594
|
+
class: $([s.padded ? s.paddedClass : ""])
|
|
587
595
|
}, [
|
|
588
|
-
|
|
596
|
+
M(t.$slots, "default")
|
|
589
597
|
], 2),
|
|
590
|
-
t.$slots.footer ? (f(), g("div",
|
|
591
|
-
|
|
592
|
-
])) :
|
|
598
|
+
t.$slots.footer ? (f(), g("div", Cs, [
|
|
599
|
+
M(t.$slots, "footer")
|
|
600
|
+
])) : C("", !0)
|
|
593
601
|
]));
|
|
594
602
|
}
|
|
595
603
|
};
|
|
596
|
-
class
|
|
604
|
+
class $s {
|
|
597
605
|
constructor() {
|
|
598
|
-
this.state =
|
|
606
|
+
this.state = D({
|
|
599
607
|
isVisible: !1,
|
|
600
608
|
content: null,
|
|
601
609
|
props: {},
|
|
@@ -603,26 +611,26 @@ class vs {
|
|
|
603
611
|
});
|
|
604
612
|
}
|
|
605
613
|
show = (s, t = {}, a = {}) => {
|
|
606
|
-
this.state.content =
|
|
614
|
+
this.state.content = _e(s), this.state.props = t, this.state.eventHandlers = a, this.state.isVisible = !0;
|
|
607
615
|
};
|
|
608
616
|
hide = () => {
|
|
609
617
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
610
618
|
};
|
|
611
619
|
}
|
|
612
|
-
const
|
|
620
|
+
const ee = new $s(), Ts = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Ls = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Hs = {
|
|
613
621
|
__name: "SparkModalContainer",
|
|
614
622
|
setup(e) {
|
|
615
|
-
return (s, t) => (f(),
|
|
623
|
+
return (s, t) => (f(), E(b($e), {
|
|
616
624
|
as: "template",
|
|
617
|
-
show:
|
|
625
|
+
show: b(ee).state.isVisible
|
|
618
626
|
}, {
|
|
619
|
-
default:
|
|
620
|
-
v(
|
|
621
|
-
class: "relative z-
|
|
622
|
-
onClose:
|
|
627
|
+
default: T(() => [
|
|
628
|
+
v(b(Te), {
|
|
629
|
+
class: "relative z-1000",
|
|
630
|
+
onClose: b(ee).hide
|
|
623
631
|
}, {
|
|
624
|
-
default:
|
|
625
|
-
v(
|
|
632
|
+
default: T(() => [
|
|
633
|
+
v(b(ne), {
|
|
626
634
|
as: "template",
|
|
627
635
|
enter: "ease-out duration-300",
|
|
628
636
|
"enter-from": "opacity-0",
|
|
@@ -631,14 +639,14 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
631
639
|
"leave-from": "opacity-100",
|
|
632
640
|
"leave-to": "opacity-0"
|
|
633
641
|
}, {
|
|
634
|
-
default:
|
|
635
|
-
|
|
642
|
+
default: T(() => [...t[0] || (t[0] = [
|
|
643
|
+
d("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
636
644
|
])]),
|
|
637
645
|
_: 1
|
|
638
646
|
}),
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
v(
|
|
647
|
+
d("div", Ts, [
|
|
648
|
+
d("div", Ls, [
|
|
649
|
+
v(b(ne), {
|
|
642
650
|
as: "template",
|
|
643
651
|
enter: "ease-out duration-300",
|
|
644
652
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -647,10 +655,10 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
647
655
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
648
656
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
649
657
|
}, {
|
|
650
|
-
default:
|
|
651
|
-
v(
|
|
652
|
-
default:
|
|
653
|
-
(f(),
|
|
658
|
+
default: T(() => [
|
|
659
|
+
v(b(Le), { 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" }, {
|
|
660
|
+
default: T(() => [
|
|
661
|
+
(f(), E(te(b(ee).state.content), se(b(ee).state.props, we(b(ee).state.eventHandlers)), null, 16))
|
|
654
662
|
]),
|
|
655
663
|
_: 1
|
|
656
664
|
})
|
|
@@ -666,10 +674,10 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
666
674
|
_: 1
|
|
667
675
|
}, 8, ["show"]));
|
|
668
676
|
}
|
|
669
|
-
},
|
|
677
|
+
}, Ps = { class: "px-4 pt-5 pb-4 sm:p-6" }, Vs = {
|
|
670
678
|
key: 0,
|
|
671
679
|
class: "text-lg font-medium text-gray-900"
|
|
672
|
-
},
|
|
680
|
+
}, Pr = {
|
|
673
681
|
__name: "SparkModalDialog",
|
|
674
682
|
props: {
|
|
675
683
|
title: {
|
|
@@ -719,7 +727,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
719
727
|
"input"
|
|
720
728
|
],
|
|
721
729
|
setup(e) {
|
|
722
|
-
const s = e, t =
|
|
730
|
+
const s = e, t = S(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), a = S(() => {
|
|
723
731
|
switch (t.value.length) {
|
|
724
732
|
case 1:
|
|
725
733
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -735,48 +743,48 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
735
743
|
success: "farCheckCircle",
|
|
736
744
|
warning: "farExclamationTriangle",
|
|
737
745
|
danger: "farCircleXmark"
|
|
738
|
-
},
|
|
746
|
+
}, r = S(() => s.icon || l[s.type]), o = S(() => ({
|
|
739
747
|
info: "bg-blue-100",
|
|
740
748
|
success: "bg-green-100",
|
|
741
749
|
warning: "bg-yellow-100",
|
|
742
750
|
danger: "bg-red-100"
|
|
743
|
-
})[s.type]), i =
|
|
751
|
+
})[s.type]), i = S(() => ({
|
|
744
752
|
info: "text-blue-400",
|
|
745
753
|
success: "text-green-400",
|
|
746
754
|
warning: "text-yellow-400",
|
|
747
755
|
danger: "text-red-400"
|
|
748
756
|
})[s.type]);
|
|
749
|
-
return (
|
|
750
|
-
const
|
|
751
|
-
return f(), g("div",
|
|
752
|
-
|
|
757
|
+
return (n, c) => {
|
|
758
|
+
const p = R("font-awesome-icon");
|
|
759
|
+
return f(), g("div", Ps, [
|
|
760
|
+
r.value ? (f(), g("div", {
|
|
753
761
|
key: 0,
|
|
754
|
-
class:
|
|
762
|
+
class: $(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
|
|
755
763
|
}, [
|
|
756
|
-
v(
|
|
757
|
-
icon:
|
|
758
|
-
class:
|
|
764
|
+
v(p, {
|
|
765
|
+
icon: b(B)[r.value],
|
|
766
|
+
class: $(["h-5 w-5", i.value])
|
|
759
767
|
}, null, 8, ["icon", "class"])
|
|
760
|
-
], 2)) :
|
|
761
|
-
|
|
762
|
-
class:
|
|
768
|
+
], 2)) : C("", !0),
|
|
769
|
+
d("div", {
|
|
770
|
+
class: $(["text-center", { "mt-3 sm:mt-5": r.value }])
|
|
763
771
|
}, [
|
|
764
|
-
e.title ? (f(), g("h3",
|
|
772
|
+
e.title ? (f(), g("h3", Vs, L(e.title), 1)) : C("", !0),
|
|
765
773
|
e.message ? (f(), g("div", {
|
|
766
774
|
key: 1,
|
|
767
|
-
class:
|
|
768
|
-
},
|
|
775
|
+
class: $([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
776
|
+
}, L(e.message), 3)) : C("", !0)
|
|
769
777
|
], 2),
|
|
770
|
-
|
|
771
|
-
class:
|
|
778
|
+
d("div", {
|
|
779
|
+
class: $(["mt-5 sm:mt-6", a.value])
|
|
772
780
|
}, [
|
|
773
|
-
(f(!0), g(
|
|
774
|
-
key:
|
|
781
|
+
(f(!0), g(j, null, N(t.value, (u, y) => (f(), E(b(z), {
|
|
782
|
+
key: y,
|
|
775
783
|
variant: u.variant,
|
|
776
|
-
onClick: (
|
|
784
|
+
onClick: (_) => n.$emit(u.event, u)
|
|
777
785
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
|
|
786
|
+
default: T(() => [
|
|
787
|
+
F(L(u.text), 1)
|
|
780
788
|
]),
|
|
781
789
|
_: 2
|
|
782
790
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -784,7 +792,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
784
792
|
]);
|
|
785
793
|
};
|
|
786
794
|
}
|
|
787
|
-
},
|
|
795
|
+
}, Rs = { class: "fixed inset-0 flex" }, ge = {
|
|
788
796
|
__name: "SparkOverlay",
|
|
789
797
|
props: {
|
|
790
798
|
position: {
|
|
@@ -799,21 +807,21 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
799
807
|
},
|
|
800
808
|
emits: ["close"],
|
|
801
809
|
setup(e, { emit: s }) {
|
|
802
|
-
const t =
|
|
810
|
+
const t = V(null), a = e, l = s, r = () => {
|
|
803
811
|
a.overlayInstance.close(), l("close");
|
|
804
812
|
};
|
|
805
|
-
return (o, i) => (f(),
|
|
813
|
+
return (o, i) => (f(), E(b($e), {
|
|
806
814
|
show: e.overlayInstance.state.isVisible,
|
|
807
815
|
as: "template"
|
|
808
816
|
}, {
|
|
809
|
-
default:
|
|
810
|
-
v(
|
|
817
|
+
default: T(() => [
|
|
818
|
+
v(b(Te), {
|
|
811
819
|
initialFocus: t.value,
|
|
812
|
-
class: "relative z-
|
|
813
|
-
onClose:
|
|
820
|
+
class: "relative z-1000",
|
|
821
|
+
onClose: r
|
|
814
822
|
}, {
|
|
815
|
-
default:
|
|
816
|
-
v(
|
|
823
|
+
default: T(() => [
|
|
824
|
+
v(b(ne), {
|
|
817
825
|
as: "template",
|
|
818
826
|
enter: "transition-opacity ease-linear duration-150",
|
|
819
827
|
"enter-from": "opacity-0",
|
|
@@ -822,13 +830,13 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
822
830
|
"leave-from": "opacity-100",
|
|
823
831
|
"leave-to": "opacity-0"
|
|
824
832
|
}, {
|
|
825
|
-
default:
|
|
826
|
-
|
|
833
|
+
default: T(() => [...i[0] || (i[0] = [
|
|
834
|
+
d("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
|
|
827
835
|
])]),
|
|
828
836
|
_: 1
|
|
829
837
|
}),
|
|
830
|
-
|
|
831
|
-
v(
|
|
838
|
+
d("div", Rs, [
|
|
839
|
+
v(b(ne), {
|
|
832
840
|
as: "template",
|
|
833
841
|
enter: "transition ease-in-out duration-150 transform",
|
|
834
842
|
"enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
@@ -837,17 +845,17 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
837
845
|
"leave-from": "translate-x-0 opacity-100",
|
|
838
846
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
839
847
|
}, {
|
|
840
|
-
default:
|
|
841
|
-
v(
|
|
848
|
+
default: T(() => [
|
|
849
|
+
v(b(Le), {
|
|
842
850
|
ref_key: "panelRef",
|
|
843
851
|
ref: t,
|
|
844
|
-
class:
|
|
852
|
+
class: $([
|
|
845
853
|
"flex w-[400px] py-2.5",
|
|
846
854
|
e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
|
|
847
855
|
])
|
|
848
856
|
}, {
|
|
849
|
-
default:
|
|
850
|
-
(f(),
|
|
857
|
+
default: T(() => [
|
|
858
|
+
(f(), E(te(e.overlayInstance.state.content), se(e.overlayInstance.state.props, we(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
851
859
|
]),
|
|
852
860
|
_: 1
|
|
853
861
|
}, 8, ["class"])
|
|
@@ -862,92 +870,92 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
862
870
|
_: 1
|
|
863
871
|
}, 8, ["show"]));
|
|
864
872
|
}
|
|
865
|
-
},
|
|
873
|
+
}, Bs = (e) => {
|
|
866
874
|
if (e.includes(".")) {
|
|
867
875
|
const s = e.split(".");
|
|
868
876
|
e = s[s.length - 1];
|
|
869
877
|
}
|
|
870
878
|
return e.replace(/_/g, " ");
|
|
871
|
-
},
|
|
879
|
+
}, Ms = (e, s, t) => {
|
|
872
880
|
const a = s.querySelector(".relative");
|
|
873
881
|
if (!a || a.querySelector(".spark-table-head-sorting"))
|
|
874
882
|
return;
|
|
875
883
|
const l = document.createElement("span");
|
|
876
|
-
l.classList.add("spark-table-head-sorting"), l.innerHTML =
|
|
877
|
-
const
|
|
878
|
-
return
|
|
884
|
+
l.classList.add("spark-table-head-sorting"), l.innerHTML = re({ prefix: "fad", iconName: "sort" }).html + re({ prefix: "fad", iconName: "sort-up" }).html + re({ prefix: "fad", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
|
|
885
|
+
const r = t.params.orderBy, o = t.params.sortedBy;
|
|
886
|
+
return r === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
|
|
879
887
|
orderBy: e,
|
|
880
888
|
sortedBy: "desc"
|
|
881
|
-
})) :
|
|
889
|
+
})) : r === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
|
|
882
890
|
orderBy: e,
|
|
883
891
|
sortedBy: "asc"
|
|
884
892
|
}));
|
|
885
893
|
});
|
|
886
|
-
},
|
|
894
|
+
}, Es = (e, s, t) => {
|
|
887
895
|
if (s.querySelector(".spark-table-head-filter"))
|
|
888
896
|
return;
|
|
889
897
|
const a = document.createElement("div"), l = document.createElement("input");
|
|
890
898
|
l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
|
|
891
|
-
const
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
894
|
-
return t.params[
|
|
899
|
+
const r = He(async (o, i) => {
|
|
900
|
+
const n = i.target.value, c = `filter[${o}]`;
|
|
901
|
+
if (n)
|
|
902
|
+
return t.params[c] && t.params[c] === n ? void 0 : t.methods.applyParams({
|
|
895
903
|
page: 1,
|
|
896
|
-
[
|
|
904
|
+
[c]: n
|
|
897
905
|
});
|
|
898
|
-
await t.methods.removeParam(
|
|
906
|
+
await t.methods.removeParam(c);
|
|
899
907
|
}, 200);
|
|
900
|
-
l.addEventListener("keyup", (o) =>
|
|
901
|
-
},
|
|
908
|
+
l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
|
|
909
|
+
}, Fs = (e, s, t) => {
|
|
902
910
|
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");
|
|
903
911
|
const l = e.querySelector(".colHeader");
|
|
904
|
-
l.classList.add("spark-table-head-title"), l.innerHTML =
|
|
905
|
-
},
|
|
912
|
+
l.classList.add("spark-table-head-title"), l.innerHTML = Bs(s);
|
|
913
|
+
}, As = (e, s, t) => {
|
|
906
914
|
if (typeof e != "number")
|
|
907
915
|
return e;
|
|
908
916
|
if (e < 0)
|
|
909
917
|
return;
|
|
910
918
|
let a = 2;
|
|
911
|
-
const l = t.methods.colToProp(e),
|
|
912
|
-
s.childElementCount === 1 && ((!
|
|
913
|
-
},
|
|
919
|
+
const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
|
|
920
|
+
s.childElementCount === 1 && ((!r || !r.columnSort) && a--, (!r || !r.columnFilter) && a--, r && r.columnSort && Ms(l, s, t), r && r.columnFilter && Es(l, s, t)), (s.childElementCount === a || a === 0) && Fs(s, l, r);
|
|
921
|
+
}, js = (e) => {
|
|
914
922
|
if (!e.hotInstance || !e.hotInstance.rootElement)
|
|
915
923
|
return;
|
|
916
924
|
const s = e.params.orderBy, t = e.params.sortedBy, a = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
|
|
917
925
|
a.forEach((l) => {
|
|
918
926
|
l.classList.remove("asc", "desc");
|
|
919
927
|
}), s && t && a.forEach((l) => {
|
|
920
|
-
const
|
|
928
|
+
const r = l.closest("th"), o = Array.from(r.parentElement.children).indexOf(r);
|
|
921
929
|
e.methods.colToProp(o) === s && l.classList.add(t);
|
|
922
930
|
});
|
|
923
|
-
},
|
|
931
|
+
}, Os = (e) => (s, t, a, l, r, o, i) => {
|
|
924
932
|
t.innerHTML = "", t.classList.add("spark-table-cell-actions");
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
933
|
+
const c = (i.rendererConfig || {}).actions || [];
|
|
934
|
+
if (c.length === 0)
|
|
927
935
|
return;
|
|
928
|
-
const
|
|
929
|
-
u.classList.add("flex", "items-center", "gap-2"),
|
|
930
|
-
if (
|
|
936
|
+
const p = s.getSourceDataAtRow(s.toPhysicalRow(a)), u = document.createElement("div");
|
|
937
|
+
u.classList.add("flex", "items-center", "gap-2"), c.forEach((y) => {
|
|
938
|
+
if (y.condition && typeof y.condition == "function" && !y.condition(p))
|
|
931
939
|
return;
|
|
932
|
-
const
|
|
933
|
-
if (
|
|
934
|
-
const
|
|
935
|
-
|
|
940
|
+
const _ = document.createElement("button");
|
|
941
|
+
if (_.type = "button", _.classList.add("spark-table-action-button"), y.icon) {
|
|
942
|
+
const k = document.createElement("span");
|
|
943
|
+
k.innerHTML = re({ prefix: "far", iconName: y.icon }).html, k.classList.add("size-4"), _.appendChild(k);
|
|
936
944
|
}
|
|
937
|
-
if (
|
|
938
|
-
const
|
|
939
|
-
|
|
945
|
+
if (y.label) {
|
|
946
|
+
const k = document.createElement("span");
|
|
947
|
+
k.textContent = y.label, _.appendChild(k);
|
|
940
948
|
}
|
|
941
|
-
|
|
942
|
-
if (
|
|
943
|
-
const
|
|
944
|
-
if (!window.confirm(
|
|
949
|
+
_.addEventListener("click", (k) => {
|
|
950
|
+
if (k.preventDefault(), k.stopPropagation(), y.confirm) {
|
|
951
|
+
const m = typeof y.confirm == "string" ? y.confirm : `Are you sure you want to ${y.label?.toLowerCase() || "perform this action"}?`;
|
|
952
|
+
if (!window.confirm(m))
|
|
945
953
|
return;
|
|
946
954
|
}
|
|
947
|
-
|
|
948
|
-
}), u.appendChild(
|
|
955
|
+
y.event && e.methods.fireEvent(y.event, p), y.handler && typeof y.handler == "function" && y.handler(p);
|
|
956
|
+
}), u.appendChild(_);
|
|
949
957
|
}), t.appendChild(u);
|
|
950
|
-
},
|
|
958
|
+
}, he = {
|
|
951
959
|
green: "bg-green-100 text-green-800",
|
|
952
960
|
red: "bg-red-100 text-red-800",
|
|
953
961
|
yellow: "bg-yellow-100 text-yellow-800",
|
|
@@ -956,11 +964,11 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
956
964
|
purple: "bg-purple-100 text-purple-800",
|
|
957
965
|
pink: "bg-pink-100 text-pink-800",
|
|
958
966
|
indigo: "bg-indigo-100 text-indigo-800"
|
|
959
|
-
},
|
|
967
|
+
}, zs = (e) => (s, t, a, l, r, o, i) => {
|
|
960
968
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
|
|
961
969
|
return;
|
|
962
|
-
const
|
|
963
|
-
|
|
970
|
+
const c = (i.rendererConfig || {}).colorMap || {}, p = c[o] || c[o?.toLowerCase()] || "gray", u = he[p] || he.gray, y = document.createElement("span");
|
|
971
|
+
y.classList.add(
|
|
964
972
|
"inline-flex",
|
|
965
973
|
"items-center",
|
|
966
974
|
"px-2.5",
|
|
@@ -970,57 +978,57 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
970
978
|
"font-medium",
|
|
971
979
|
"capitalize",
|
|
972
980
|
...u.split(" ")
|
|
973
|
-
),
|
|
974
|
-
},
|
|
981
|
+
), y.textContent = o, t.appendChild(y);
|
|
982
|
+
}, Is = (e) => (s, t, a, l, r, o, i) => {
|
|
975
983
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
|
|
976
984
|
return;
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
|
|
985
|
+
const n = i.rendererConfig || {}, c = s.getSourceDataAtRow(s.toPhysicalRow(a));
|
|
986
|
+
let p = o;
|
|
987
|
+
n.href && (typeof n.href == "function" ? p = n.href(c) : n.href === "email" ? p = `mailto:${o}` : n.href === "tel" ? p = `tel:${o}` : typeof n.href == "string" && (p = c[n.href] || o));
|
|
980
988
|
const u = document.createElement("a");
|
|
981
|
-
u.href =
|
|
982
|
-
|
|
989
|
+
u.href = p, u.textContent = o, u.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), n.target && (u.target = n.target), n.rel && (u.rel = n.rel), u.addEventListener("click", (y) => {
|
|
990
|
+
y.stopPropagation();
|
|
983
991
|
}), t.appendChild(u);
|
|
984
|
-
},
|
|
992
|
+
}, ye = {
|
|
985
993
|
sm: "h-6 w-6",
|
|
986
994
|
md: "h-8 w-8",
|
|
987
995
|
lg: "h-12 w-12"
|
|
988
|
-
},
|
|
996
|
+
}, Ns = (e) => (s, t, a, l, r, o, i) => {
|
|
989
997
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
|
|
990
998
|
return;
|
|
991
|
-
const
|
|
992
|
-
let
|
|
993
|
-
typeof
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
},
|
|
999
|
+
const n = i.rendererConfig || {}, c = s.getSourceDataAtRow(s.toPhysicalRow(a)), p = n.size || "md", u = ye[p] || ye.md, y = n.rounded !== !1;
|
|
1000
|
+
let _ = n.alt || "";
|
|
1001
|
+
typeof n.alt == "string" && c[n.alt] && (_ = c[n.alt]);
|
|
1002
|
+
const k = document.createElement("img");
|
|
1003
|
+
k.src = o, k.alt = _, k.classList.add(...u.split(" "), "object-cover"), y ? k.classList.add("rounded-full") : k.classList.add("rounded"), t.appendChild(k);
|
|
1004
|
+
}, Ds = (e) => (s, t, a, l, r, o, i) => {
|
|
997
1005
|
if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
|
|
998
1006
|
return;
|
|
999
|
-
const
|
|
1007
|
+
const n = i.rendererConfig || {}, c = n.format || "short", p = n.locale || "en-US";
|
|
1000
1008
|
let u = o;
|
|
1001
1009
|
try {
|
|
1002
|
-
const
|
|
1003
|
-
isNaN(
|
|
1010
|
+
const _ = new Date(o);
|
|
1011
|
+
isNaN(_.getTime()) ? u = o : typeof c == "function" ? u = c(_) : c === "short" ? u = _.toLocaleDateString(p) : c === "long" ? u = _.toLocaleDateString(p, {
|
|
1004
1012
|
year: "numeric",
|
|
1005
1013
|
month: "long",
|
|
1006
1014
|
day: "numeric"
|
|
1007
|
-
}) :
|
|
1008
|
-
} catch (
|
|
1009
|
-
console.error("Error formatting date:",
|
|
1015
|
+
}) : c === "relative" ? u = qs(_) : c === "datetime" ? u = _.toLocaleString(p) : u = _.toLocaleDateString(p);
|
|
1016
|
+
} catch (_) {
|
|
1017
|
+
console.error("Error formatting date:", _), u = o;
|
|
1010
1018
|
}
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1019
|
+
const y = document.createElement("span");
|
|
1020
|
+
y.textContent = u, t.appendChild(y);
|
|
1013
1021
|
};
|
|
1014
|
-
function
|
|
1015
|
-
const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60),
|
|
1016
|
-
return a < 60 ?
|
|
1022
|
+
function qs(e) {
|
|
1023
|
+
const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), r = Math.floor(l / 60), o = Math.floor(r / 24), i = Math.floor(o / 30), n = Math.floor(o / 365), c = t > 0;
|
|
1024
|
+
return a < 60 ? c ? "just now" : "in a moment" : l < 60 ? c ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : r < 24 ? c ? `${r} hour${r > 1 ? "s" : ""} ago` : `in ${r} hour${r > 1 ? "s" : ""}` : o < 30 ? c ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 1 ? "s" : ""}` : i < 12 ? c ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : c ? `${n} year${n > 1 ? "s" : ""} ago` : `in ${n} year${n > 1 ? "s" : ""}`;
|
|
1017
1025
|
}
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
}),
|
|
1022
|
-
},
|
|
1023
|
-
|
|
1026
|
+
const Zs = /* @__PURE__ */ new Map(), W = (e, s) => {
|
|
1027
|
+
Bt(e, (t, a, l, r, o, i, n) => {
|
|
1028
|
+
Mt.apply(null, [t, a, l, r, o, i, n]), s(t, a, l, r, o, i, n);
|
|
1029
|
+
}), Zs.set(e, s);
|
|
1030
|
+
}, Ks = (e) => {
|
|
1031
|
+
W("spark.actions", Os(e)), W("spark.badge", zs()), W("spark.link", Is()), W("spark.image", Ns()), W("spark.date", Ds()), W("style.capitalize", (s, t, a, l, r, o) => {
|
|
1024
1032
|
if (!o || o.length === 0) {
|
|
1025
1033
|
t.innerText = "";
|
|
1026
1034
|
return;
|
|
@@ -1028,8 +1036,110 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1028
1036
|
const i = document.createElement("span");
|
|
1029
1037
|
i.innerHTML = o, i.classList.add("capitalize"), t.replaceChildren(i);
|
|
1030
1038
|
});
|
|
1031
|
-
},
|
|
1032
|
-
},
|
|
1039
|
+
}, Us = () => {
|
|
1040
|
+
}, Gs = (e, s = {}) => {
|
|
1041
|
+
const t = q(), a = Q(), l = s.namespace, r = l === null, o = s.syncToRoute !== !1, i = s.persistToStorage === !0, n = s.restoreOnMount !== !1, c = s.storageTTL || 7, p = r ? `spark-table:${a.path}` : `spark-table:${l}`, u = (h, w = "") => {
|
|
1042
|
+
const P = {};
|
|
1043
|
+
return Object.keys(h).forEach((Z) => {
|
|
1044
|
+
const G = h[Z], pe = w ? `${w}[${Z}]` : Z;
|
|
1045
|
+
G != null && (typeof G == "object" && !Array.isArray(G) ? Object.assign(P, u(G, pe)) : P[pe] = String(G));
|
|
1046
|
+
}), P;
|
|
1047
|
+
}, y = () => {
|
|
1048
|
+
if (i)
|
|
1049
|
+
try {
|
|
1050
|
+
const h = {
|
|
1051
|
+
params: e.params,
|
|
1052
|
+
timestamp: Date.now()
|
|
1053
|
+
};
|
|
1054
|
+
localStorage.setItem(p, JSON.stringify(h));
|
|
1055
|
+
} catch (h) {
|
|
1056
|
+
console.warn("Failed to save table state to localStorage:", h);
|
|
1057
|
+
}
|
|
1058
|
+
}, _ = () => {
|
|
1059
|
+
if (!i) return null;
|
|
1060
|
+
try {
|
|
1061
|
+
const h = localStorage.getItem(p);
|
|
1062
|
+
if (!h) return null;
|
|
1063
|
+
const w = JSON.parse(h);
|
|
1064
|
+
if (c > 0) {
|
|
1065
|
+
const P = Date.now() - w.timestamp, Z = c * 24 * 60 * 60 * 1e3;
|
|
1066
|
+
if (P > Z)
|
|
1067
|
+
return localStorage.removeItem(p), null;
|
|
1068
|
+
}
|
|
1069
|
+
return w.params;
|
|
1070
|
+
} catch (h) {
|
|
1071
|
+
return console.warn("Failed to load table state from localStorage:", h), null;
|
|
1072
|
+
}
|
|
1073
|
+
}, k = () => {
|
|
1074
|
+
try {
|
|
1075
|
+
localStorage.removeItem(p);
|
|
1076
|
+
} catch (h) {
|
|
1077
|
+
console.warn("Failed to clear table state from localStorage:", h);
|
|
1078
|
+
}
|
|
1079
|
+
}, m = () => {
|
|
1080
|
+
if (!o) return;
|
|
1081
|
+
const h = { ...a.query };
|
|
1082
|
+
if (r) {
|
|
1083
|
+
Object.keys(h).forEach((P) => {
|
|
1084
|
+
x(P) && delete h[P];
|
|
1085
|
+
});
|
|
1086
|
+
const w = u(e.params);
|
|
1087
|
+
Object.assign(h, w);
|
|
1088
|
+
} else {
|
|
1089
|
+
Object.keys(h).forEach((P) => {
|
|
1090
|
+
(P.startsWith(`${l}[`) || P === l) && delete h[P];
|
|
1091
|
+
});
|
|
1092
|
+
const w = u(e.params, l);
|
|
1093
|
+
Object.assign(h, w);
|
|
1094
|
+
}
|
|
1095
|
+
t.replace({ query: h });
|
|
1096
|
+
}, x = (h) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(h) || h.includes("[")), H = () => {
|
|
1097
|
+
if (r)
|
|
1098
|
+
Object.keys(a.query).forEach((h) => {
|
|
1099
|
+
x(h) && (e.params[h] = a.query[h]);
|
|
1100
|
+
});
|
|
1101
|
+
else {
|
|
1102
|
+
const h = `${l}[`;
|
|
1103
|
+
Object.keys(a.query).forEach((w) => {
|
|
1104
|
+
if (w.startsWith(h)) {
|
|
1105
|
+
const P = w.slice(h.length, -1);
|
|
1106
|
+
e.params[P] = a.query[w];
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
return A(
|
|
1112
|
+
() => e.params,
|
|
1113
|
+
() => {
|
|
1114
|
+
o && m(), i && y();
|
|
1115
|
+
},
|
|
1116
|
+
{ deep: !0 }
|
|
1117
|
+
), n && ue(() => {
|
|
1118
|
+
let h = !1;
|
|
1119
|
+
if (o) {
|
|
1120
|
+
let w = !1;
|
|
1121
|
+
if (r)
|
|
1122
|
+
w = Object.keys(a.query).some((P) => x(P));
|
|
1123
|
+
else {
|
|
1124
|
+
const P = `${l}[`;
|
|
1125
|
+
w = Object.keys(a.query).some(
|
|
1126
|
+
(Z) => Z.startsWith(P)
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
w && (h = !0, H());
|
|
1130
|
+
}
|
|
1131
|
+
if (!h && i) {
|
|
1132
|
+
const w = _();
|
|
1133
|
+
w && Object.keys(w).length > 0 && Object.assign(e.params, w);
|
|
1134
|
+
}
|
|
1135
|
+
}), {
|
|
1136
|
+
syncToRoute: m,
|
|
1137
|
+
restoreFromRoute: H,
|
|
1138
|
+
saveToStorage: y,
|
|
1139
|
+
loadFromStorage: _,
|
|
1140
|
+
clearStorage: k
|
|
1141
|
+
};
|
|
1142
|
+
}, Ws = { class: "flex items-center gap-4 py-3" }, Ys = { class: "shrink-0" }, Xs = { class: "text-sm text-gray-700" }, Js = { class: "font-medium" }, Qs = { class: "font-medium" }, ea = { class: "font-medium" }, ta = {
|
|
1033
1143
|
__name: "SparkTablePaginationDetails",
|
|
1034
1144
|
props: {
|
|
1035
1145
|
sparkTable: {
|
|
@@ -1040,28 +1150,28 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1040
1150
|
setup(e) {
|
|
1041
1151
|
const s = e;
|
|
1042
1152
|
return (t, a) => (f(), g("div", null, [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
a[0] || (a[0] =
|
|
1047
|
-
|
|
1048
|
-
a[1] || (a[1] =
|
|
1049
|
-
|
|
1050
|
-
a[2] || (a[2] =
|
|
1051
|
-
|
|
1052
|
-
a[3] || (a[3] =
|
|
1153
|
+
d("div", Ws, [
|
|
1154
|
+
d("div", Ys, [
|
|
1155
|
+
d("div", Xs, [
|
|
1156
|
+
a[0] || (a[0] = F(" Showing ", -1)),
|
|
1157
|
+
d("span", Js, L(s.sparkTable.response.meta.from), 1),
|
|
1158
|
+
a[1] || (a[1] = F(" to ", -1)),
|
|
1159
|
+
d("span", Qs, L(s.sparkTable.response.meta.to), 1),
|
|
1160
|
+
a[2] || (a[2] = F(" of ", -1)),
|
|
1161
|
+
d("span", ea, L(s.sparkTable.response.meta.total), 1),
|
|
1162
|
+
a[3] || (a[3] = F(" results ", -1))
|
|
1053
1163
|
])
|
|
1054
1164
|
])
|
|
1055
1165
|
])
|
|
1056
1166
|
]));
|
|
1057
1167
|
}
|
|
1058
|
-
},
|
|
1168
|
+
}, sa = { class: "flex items-center gap-4 px-4 py-3" }, aa = {
|
|
1059
1169
|
key: 0,
|
|
1060
1170
|
class: "shrink-0 ml-auto"
|
|
1061
|
-
},
|
|
1171
|
+
}, oa = {
|
|
1062
1172
|
class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
|
|
1063
1173
|
"aria-label": "Pagination"
|
|
1064
|
-
},
|
|
1174
|
+
}, ra = ["onClick"], na = {
|
|
1065
1175
|
__name: "SparkTablePaginationPaging",
|
|
1066
1176
|
props: {
|
|
1067
1177
|
sparkTable: {
|
|
@@ -1071,67 +1181,67 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1071
1181
|
},
|
|
1072
1182
|
emits: ["paginate"],
|
|
1073
1183
|
setup(e, { emit: s }) {
|
|
1074
|
-
const t = e, a = s, l = (
|
|
1075
|
-
|
|
1076
|
-
},
|
|
1077
|
-
|
|
1078
|
-
page:
|
|
1184
|
+
const t = e, a = s, l = (p) => {
|
|
1185
|
+
r(t.sparkTable.params.page + p);
|
|
1186
|
+
}, r = (p) => {
|
|
1187
|
+
p < 1 || p > t.sparkTable.response.meta.last_page || a("paginate", {
|
|
1188
|
+
page: p
|
|
1079
1189
|
});
|
|
1080
|
-
}, o =
|
|
1190
|
+
}, o = S(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = S(() => t.sparkTable.computed.ready ? St(
|
|
1081
1191
|
Math.floor((o.value - 1) / 10) * 10 + 1,
|
|
1082
1192
|
o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
|
|
1083
|
-
) : []),
|
|
1084
|
-
() => t.sparkTable.params.page <
|
|
1085
|
-
),
|
|
1086
|
-
return (
|
|
1087
|
-
const
|
|
1193
|
+
) : []), n = S(
|
|
1194
|
+
() => t.sparkTable.params.page < I(t.sparkTable.response.meta, "last_page", 1)
|
|
1195
|
+
), c = S(() => t.sparkTable.params.page > 1);
|
|
1196
|
+
return (p, u) => {
|
|
1197
|
+
const y = R("font-awesome-icon");
|
|
1088
1198
|
return f(), g("div", null, [
|
|
1089
|
-
|
|
1090
|
-
i.value.length > 1 ? (f(), g("div",
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
class:
|
|
1199
|
+
d("div", sa, [
|
|
1200
|
+
i.value.length > 1 ? (f(), g("div", aa, [
|
|
1201
|
+
d("div", null, [
|
|
1202
|
+
d("nav", oa, [
|
|
1203
|
+
d("a", {
|
|
1204
|
+
class: $([c.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"]),
|
|
1095
1205
|
href: "#",
|
|
1096
|
-
onClick: u[0] || (u[0] =
|
|
1206
|
+
onClick: u[0] || (u[0] = K((_) => l(-1), ["prevent"]))
|
|
1097
1207
|
}, [
|
|
1098
|
-
v(
|
|
1099
|
-
icon:
|
|
1208
|
+
v(y, {
|
|
1209
|
+
icon: b(B).farChevronLeft,
|
|
1100
1210
|
class: "size-5"
|
|
1101
1211
|
}, null, 8, ["icon"])
|
|
1102
1212
|
], 2),
|
|
1103
|
-
(f(!0), g(
|
|
1104
|
-
key: `page-${
|
|
1213
|
+
(f(!0), g(j, null, N(i.value, (_) => (f(), g("a", {
|
|
1214
|
+
key: `page-${_}`,
|
|
1105
1215
|
href: "#",
|
|
1106
|
-
class:
|
|
1216
|
+
class: $([
|
|
1107
1217
|
"relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
|
|
1108
|
-
e.sparkTable.params.page ===
|
|
1218
|
+
e.sparkTable.params.page === _ ? "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"
|
|
1109
1219
|
]),
|
|
1110
|
-
onClick: (
|
|
1111
|
-
},
|
|
1112
|
-
|
|
1113
|
-
class:
|
|
1114
|
-
onClick: u[1] || (u[1] =
|
|
1220
|
+
onClick: (k) => r(_)
|
|
1221
|
+
}, L(_), 11, ra))), 128)),
|
|
1222
|
+
d("a", {
|
|
1223
|
+
class: $([n.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"]),
|
|
1224
|
+
onClick: u[1] || (u[1] = K((_) => l(1), ["prevent"])),
|
|
1115
1225
|
href: "#"
|
|
1116
1226
|
}, [
|
|
1117
|
-
v(
|
|
1118
|
-
icon:
|
|
1227
|
+
v(y, {
|
|
1228
|
+
icon: b(B).farChevronRight,
|
|
1119
1229
|
class: "size-5"
|
|
1120
1230
|
}, null, 8, ["icon"])
|
|
1121
1231
|
], 2)
|
|
1122
1232
|
])
|
|
1123
1233
|
])
|
|
1124
|
-
])) :
|
|
1234
|
+
])) : C("", !0)
|
|
1125
1235
|
])
|
|
1126
1236
|
]);
|
|
1127
1237
|
};
|
|
1128
1238
|
}
|
|
1129
|
-
},
|
|
1239
|
+
}, U = (e, s) => {
|
|
1130
1240
|
const t = e.__vccOpts || e;
|
|
1131
1241
|
for (const [a, l] of s)
|
|
1132
1242
|
t[a] = l;
|
|
1133
1243
|
return t;
|
|
1134
|
-
},
|
|
1244
|
+
}, la = { class: "spark-table-pagination-per-page" }, ia = {
|
|
1135
1245
|
__name: "SparkTablePaginationPerPage",
|
|
1136
1246
|
props: {
|
|
1137
1247
|
sparkTable: {
|
|
@@ -1141,31 +1251,31 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1141
1251
|
},
|
|
1142
1252
|
emits: ["paginate"],
|
|
1143
1253
|
setup(e, { emit: s }) {
|
|
1144
|
-
const t = e, a = s, l =
|
|
1254
|
+
const t = e, a = s, l = S(() => t.sparkTable.options.perPages.map((o) => ({
|
|
1145
1255
|
label: String(o),
|
|
1146
1256
|
value: o
|
|
1147
|
-
}))),
|
|
1257
|
+
}))), r = (o) => {
|
|
1148
1258
|
a("paginate", {
|
|
1149
1259
|
page: 1,
|
|
1150
1260
|
limit: parseInt(o)
|
|
1151
1261
|
});
|
|
1152
1262
|
};
|
|
1153
1263
|
return (o, i) => {
|
|
1154
|
-
const
|
|
1155
|
-
return f(), g("div",
|
|
1156
|
-
v(
|
|
1264
|
+
const n = R("FormKit");
|
|
1265
|
+
return f(), g("div", la, [
|
|
1266
|
+
v(n, {
|
|
1157
1267
|
"model-value": e.sparkTable.params.limit,
|
|
1158
1268
|
type: "select",
|
|
1159
1269
|
options: l.value,
|
|
1160
1270
|
"outer-class": "!mb-0",
|
|
1161
1271
|
"wrapper-class": "!mb-0",
|
|
1162
1272
|
"input-class": "!py-2",
|
|
1163
|
-
onInput:
|
|
1273
|
+
onInput: r
|
|
1164
1274
|
}, null, 8, ["model-value", "options"])
|
|
1165
1275
|
]);
|
|
1166
1276
|
};
|
|
1167
1277
|
}
|
|
1168
|
-
},
|
|
1278
|
+
}, ca = /* @__PURE__ */ U(ia, [["__scopeId", "data-v-9ef8544b"]]), be = {
|
|
1169
1279
|
__name: "SparkTableToolbar",
|
|
1170
1280
|
props: {
|
|
1171
1281
|
position: {
|
|
@@ -1175,18 +1285,18 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1175
1285
|
}
|
|
1176
1286
|
},
|
|
1177
1287
|
setup(e) {
|
|
1178
|
-
const s = e, t =
|
|
1179
|
-
const
|
|
1180
|
-
return s.position === "footer" ? `${
|
|
1288
|
+
const s = e, t = Se(), a = S(() => !!t.default), l = S(() => {
|
|
1289
|
+
const r = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
|
|
1290
|
+
return s.position === "footer" ? `${r} spark-table-toolbar-footer justify-between` : `${r} spark-table-toolbar-header gap-y-5 py-5`;
|
|
1181
1291
|
});
|
|
1182
|
-
return (
|
|
1292
|
+
return (r, o) => a.value ? (f(), g("div", {
|
|
1183
1293
|
key: 0,
|
|
1184
|
-
class:
|
|
1294
|
+
class: $(l.value)
|
|
1185
1295
|
}, [
|
|
1186
|
-
|
|
1187
|
-
], 2)) :
|
|
1296
|
+
M(r.$slots, "default")
|
|
1297
|
+
], 2)) : C("", !0);
|
|
1188
1298
|
}
|
|
1189
|
-
},
|
|
1299
|
+
}, da = { class: "spark-table-search" }, ua = {
|
|
1190
1300
|
__name: "SparkTableSearch",
|
|
1191
1301
|
props: {
|
|
1192
1302
|
/** SparkTable instance object */
|
|
@@ -1200,46 +1310,47 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1200
1310
|
default: () => ({
|
|
1201
1311
|
placeholder: "Search...",
|
|
1202
1312
|
param: "search",
|
|
1203
|
-
debounce:
|
|
1313
|
+
debounce: 400
|
|
1204
1314
|
})
|
|
1205
1315
|
}
|
|
1206
1316
|
},
|
|
1207
1317
|
setup(e) {
|
|
1208
|
-
const s = e, t =
|
|
1318
|
+
const s = e, t = V(""), a = s.config.param || "search";
|
|
1209
1319
|
s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
1210
1320
|
[a]: s.config.initialValue
|
|
1211
1321
|
}));
|
|
1212
|
-
const l =
|
|
1322
|
+
const l = He((o) => {
|
|
1213
1323
|
o ? s.sparkTable.methods.applyParams({
|
|
1214
1324
|
page: 1,
|
|
1215
1325
|
[a]: o
|
|
1216
1326
|
}) : s.sparkTable.methods.removeParam(a);
|
|
1217
1327
|
}, s.config.debounce || 300);
|
|
1218
|
-
|
|
1328
|
+
A(t, (o) => {
|
|
1219
1329
|
l(o);
|
|
1220
1330
|
});
|
|
1221
|
-
const
|
|
1222
|
-
return
|
|
1331
|
+
const r = s.config.placeholder || "Search...";
|
|
1332
|
+
return A(
|
|
1223
1333
|
() => s.sparkTable.params[a],
|
|
1224
1334
|
(o) => {
|
|
1225
|
-
!o && t.value && (t.value = "");
|
|
1335
|
+
o && o !== t.value ? t.value = o : !o && t.value && (t.value = "");
|
|
1226
1336
|
}
|
|
1227
1337
|
), (o, i) => {
|
|
1228
|
-
const
|
|
1229
|
-
return f(), g("div",
|
|
1230
|
-
v(
|
|
1338
|
+
const n = R("FormKit");
|
|
1339
|
+
return f(), g("div", da, [
|
|
1340
|
+
v(n, se({
|
|
1231
1341
|
modelValue: t.value,
|
|
1232
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1342
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
|
|
1233
1343
|
type: "text",
|
|
1234
|
-
placeholder:
|
|
1344
|
+
placeholder: b(r),
|
|
1345
|
+
suffixIcon: "search",
|
|
1235
1346
|
"outer-class": "!mb-0",
|
|
1236
1347
|
"wrapper-class": "!mb-0",
|
|
1237
|
-
"input-class": "!w-
|
|
1348
|
+
"input-class": "!w-44 !pr-8"
|
|
1238
1349
|
}, s.config.formkitProps || {}), null, 16, ["modelValue", "placeholder"])
|
|
1239
1350
|
]);
|
|
1240
1351
|
};
|
|
1241
1352
|
}
|
|
1242
|
-
},
|
|
1353
|
+
}, pa = /* @__PURE__ */ U(ua, [["__scopeId", "data-v-976170dc"]]), fa = { class: "spark-table-filter-select" }, ma = {
|
|
1243
1354
|
__name: "SparkTableFilterSelect",
|
|
1244
1355
|
props: {
|
|
1245
1356
|
/** SparkTable instance object */
|
|
@@ -1255,33 +1366,33 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1255
1366
|
}
|
|
1256
1367
|
},
|
|
1257
1368
|
setup(e) {
|
|
1258
|
-
const s = e, t =
|
|
1369
|
+
const s = e, t = V(""), a = s.config.param || `filter[${s.config.key}]`;
|
|
1259
1370
|
s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
1260
1371
|
[a]: s.config.initialValue
|
|
1261
1372
|
}));
|
|
1262
|
-
const l = s.config.label || null,
|
|
1373
|
+
const l = s.config.label || null, r = S(() => [
|
|
1263
1374
|
{ label: s.config.placeholder || "All", value: "" },
|
|
1264
1375
|
...s.config.options
|
|
1265
1376
|
]);
|
|
1266
|
-
return
|
|
1377
|
+
return A(t, (o) => {
|
|
1267
1378
|
o ? s.sparkTable.methods.applyParams({
|
|
1268
1379
|
page: 1,
|
|
1269
1380
|
[a]: o
|
|
1270
1381
|
}) : s.sparkTable.methods.removeParam(a);
|
|
1271
|
-
}),
|
|
1382
|
+
}), A(
|
|
1272
1383
|
() => s.sparkTable.params[a],
|
|
1273
1384
|
(o) => {
|
|
1274
|
-
|
|
1385
|
+
o != null && o !== "" ? t.value !== o && (t.value = o) : t.value && (t.value = "");
|
|
1275
1386
|
}
|
|
1276
1387
|
), (o, i) => {
|
|
1277
|
-
const
|
|
1278
|
-
return f(), g("div",
|
|
1279
|
-
v(
|
|
1388
|
+
const n = R("FormKit");
|
|
1389
|
+
return f(), g("div", fa, [
|
|
1390
|
+
v(n, se({
|
|
1280
1391
|
modelValue: t.value,
|
|
1281
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1392
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
|
|
1282
1393
|
type: "select",
|
|
1283
|
-
label:
|
|
1284
|
-
options:
|
|
1394
|
+
label: b(l),
|
|
1395
|
+
options: r.value,
|
|
1285
1396
|
placeholder: e.config.placeholder || "All",
|
|
1286
1397
|
"outer-class": "!mb-0",
|
|
1287
1398
|
"wrapper-class": "!mb-0"
|
|
@@ -1289,10 +1400,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1289
1400
|
]);
|
|
1290
1401
|
};
|
|
1291
1402
|
}
|
|
1292
|
-
},
|
|
1403
|
+
}, ga = /* @__PURE__ */ U(ma, [["__scopeId", "data-v-642dbc69"]]), ha = { class: "spark-table-filter-buttons" }, ya = {
|
|
1293
1404
|
key: 0,
|
|
1294
1405
|
class: "spark-table-filter-buttons-label"
|
|
1295
|
-
},
|
|
1406
|
+
}, ba = {
|
|
1296
1407
|
__name: "SparkTableFilterButtons",
|
|
1297
1408
|
props: {
|
|
1298
1409
|
/** SparkTable instance object */
|
|
@@ -1308,33 +1419,33 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1308
1419
|
}
|
|
1309
1420
|
},
|
|
1310
1421
|
setup(e) {
|
|
1311
|
-
const s = e, t =
|
|
1422
|
+
const s = e, t = V(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
|
|
1312
1423
|
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({
|
|
1313
1424
|
[l]: s.config.initialValue
|
|
1314
1425
|
}));
|
|
1315
|
-
const
|
|
1426
|
+
const r = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, o = (i) => {
|
|
1316
1427
|
t.value = i, i == null || i === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
|
|
1317
1428
|
page: 1,
|
|
1318
1429
|
[l]: i
|
|
1319
1430
|
});
|
|
1320
1431
|
};
|
|
1321
|
-
return
|
|
1432
|
+
return A(
|
|
1322
1433
|
() => s.sparkTable.params[l],
|
|
1323
1434
|
(i) => {
|
|
1324
1435
|
(i == null || i === "") && t.value ? t.value = null : i !== t.value && (t.value = i);
|
|
1325
1436
|
}
|
|
1326
|
-
), (i,
|
|
1327
|
-
|
|
1328
|
-
v(
|
|
1329
|
-
default:
|
|
1330
|
-
(f(!0), g(
|
|
1331
|
-
key:
|
|
1437
|
+
), (i, n) => (f(), g("div", ha, [
|
|
1438
|
+
b(a) ? (f(), g("span", ya, L(b(a)), 1)) : C("", !0),
|
|
1439
|
+
v(_s, { class: "isolate" }, {
|
|
1440
|
+
default: T(() => [
|
|
1441
|
+
(f(!0), g(j, null, N(e.config.options, (c) => (f(), E(z, {
|
|
1442
|
+
key: c.value,
|
|
1332
1443
|
size: "xl",
|
|
1333
|
-
variant:
|
|
1334
|
-
onClick: (
|
|
1444
|
+
variant: r(c.value) ? "primary" : "secondary",
|
|
1445
|
+
onClick: (p) => o(c.value)
|
|
1335
1446
|
}, {
|
|
1336
|
-
default:
|
|
1337
|
-
|
|
1447
|
+
default: T(() => [
|
|
1448
|
+
F(L(c.label), 1)
|
|
1338
1449
|
]),
|
|
1339
1450
|
_: 2
|
|
1340
1451
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -1343,7 +1454,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1343
1454
|
})
|
|
1344
1455
|
]));
|
|
1345
1456
|
}
|
|
1346
|
-
},
|
|
1457
|
+
}, va = /* @__PURE__ */ U(ba, [["__scopeId", "data-v-0fcd0cce"]]), xa = { class: "spark-table-date-picker" }, ka = {
|
|
1347
1458
|
__name: "SparkTableDatePicker",
|
|
1348
1459
|
props: {
|
|
1349
1460
|
/** SparkTable instance object */
|
|
@@ -1359,33 +1470,33 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1359
1470
|
}
|
|
1360
1471
|
},
|
|
1361
1472
|
setup(e) {
|
|
1362
|
-
const s = e, t =
|
|
1473
|
+
const s = e, t = V(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, r = V(`${l}-0`);
|
|
1363
1474
|
return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
|
|
1364
1475
|
[l]: s.config.initialValue
|
|
1365
|
-
})) : t.value = null,
|
|
1476
|
+
})) : t.value = null, A(t, (o) => {
|
|
1366
1477
|
o ? s.sparkTable.methods.applyParams({
|
|
1367
1478
|
page: 1,
|
|
1368
1479
|
[l]: o
|
|
1369
1480
|
}) : s.sparkTable.methods.removeParam(l);
|
|
1370
|
-
}),
|
|
1481
|
+
}), A(
|
|
1371
1482
|
() => s.sparkTable.params[l],
|
|
1372
1483
|
(o) => {
|
|
1373
1484
|
if ((o == null || o === "") && t.value) {
|
|
1374
1485
|
t.value = null;
|
|
1375
|
-
const i = parseInt(
|
|
1376
|
-
|
|
1486
|
+
const i = parseInt(r.value.split("-").pop()) || 0;
|
|
1487
|
+
r.value = `${l}-${i + 1}`;
|
|
1377
1488
|
} else o && o !== t.value && (t.value = o);
|
|
1378
1489
|
}
|
|
1379
1490
|
), (o, i) => {
|
|
1380
|
-
const
|
|
1381
|
-
return f(), g("div",
|
|
1382
|
-
(f(),
|
|
1383
|
-
key:
|
|
1491
|
+
const n = R("FormKit");
|
|
1492
|
+
return f(), g("div", xa, [
|
|
1493
|
+
(f(), E(n, se({
|
|
1494
|
+
key: r.value,
|
|
1384
1495
|
modelValue: t.value,
|
|
1385
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1496
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
|
|
1386
1497
|
type: "datepicker",
|
|
1387
1498
|
"picker-only": "",
|
|
1388
|
-
label:
|
|
1499
|
+
label: b(a),
|
|
1389
1500
|
placeholder: e.config.placeholder || "Select date",
|
|
1390
1501
|
overlay: !0,
|
|
1391
1502
|
"value-format": "YYYY-MM-DD",
|
|
@@ -1396,7 +1507,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1396
1507
|
]);
|
|
1397
1508
|
};
|
|
1398
1509
|
}
|
|
1399
|
-
},
|
|
1510
|
+
}, _a = /* @__PURE__ */ U(ka, [["__scopeId", "data-v-44ef9cb8"]]), wa = { class: "spark-table-reset" }, Sa = { key: 1 }, Ca = {
|
|
1400
1511
|
__name: "SparkTableReset",
|
|
1401
1512
|
props: {
|
|
1402
1513
|
/** SparkTable instance object */
|
|
@@ -1412,53 +1523,57 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1412
1523
|
},
|
|
1413
1524
|
setup(e) {
|
|
1414
1525
|
const s = e, t = () => {
|
|
1415
|
-
const a = s.sparkTable.plugins || {}, l = [];
|
|
1416
|
-
Object.entries(a).forEach(([
|
|
1417
|
-
if (!
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
const r = i.param || `filter[${i.key}]`;
|
|
1422
|
-
l.push(r);
|
|
1423
|
-
} else if (i.type === "datePicker") {
|
|
1424
|
-
const r = i.param || `filter[${i.key}]`;
|
|
1425
|
-
l.push(r);
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1526
|
+
const a = s.sparkTable.plugins || {}, l = [], r = {};
|
|
1527
|
+
Object.entries(a).forEach(([c, p]) => {
|
|
1528
|
+
if (!p || p.type === "reset" || !(typeof p.enabled == "function" ? p.enabled(s.sparkTable.params) : p.enabled))
|
|
1529
|
+
return;
|
|
1530
|
+
let y = null;
|
|
1531
|
+
p.type === "search" ? y = p.param || "search" : p.type === "filterSelect" || p.type === "filterButtons" ? y = p.param || `filter[${p.key}]` : p.type === "datePicker" && (y = p.param || `filter[${p.key}]`), y && (p.initialValue !== void 0 && p.initialValue !== null ? r[y] = p.initialValue : l.push(y));
|
|
1428
1532
|
});
|
|
1429
|
-
const
|
|
1430
|
-
(
|
|
1533
|
+
const o = l.filter(
|
|
1534
|
+
(c) => s.sparkTable.params[c] !== void 0 && s.sparkTable.params[c] !== null && s.sparkTable.params[c] !== ""
|
|
1535
|
+
), i = Object.entries(r).filter(
|
|
1536
|
+
([c, p]) => s.sparkTable.params[c] !== p
|
|
1431
1537
|
);
|
|
1432
|
-
|
|
1538
|
+
if (o.length === 0 && i.length === 0)
|
|
1539
|
+
return;
|
|
1540
|
+
o.forEach((c) => {
|
|
1541
|
+
delete s.sparkTable.params[c];
|
|
1542
|
+
});
|
|
1543
|
+
const n = Object.fromEntries(i);
|
|
1544
|
+
s.sparkTable.methods.applyParams({ ...n, page: 1 });
|
|
1433
1545
|
};
|
|
1434
1546
|
return (a, l) => {
|
|
1435
|
-
const
|
|
1436
|
-
return f(), g("div",
|
|
1437
|
-
v(
|
|
1547
|
+
const r = R("font-awesome-icon");
|
|
1548
|
+
return f(), g("div", wa, [
|
|
1549
|
+
v(z, {
|
|
1438
1550
|
onClick: t,
|
|
1439
1551
|
variant: "secondary",
|
|
1440
1552
|
size: "xl"
|
|
1441
1553
|
}, {
|
|
1442
|
-
default:
|
|
1443
|
-
e.config.icon ? (f(),
|
|
1554
|
+
default: T(() => [
|
|
1555
|
+
e.config.icon ? (f(), E(r, {
|
|
1444
1556
|
key: 0,
|
|
1445
1557
|
icon: ["far", e.config.icon],
|
|
1446
|
-
class:
|
|
1447
|
-
}, null, 8, ["icon", "class"])) :
|
|
1448
|
-
e.config.label ? (f(), g("span",
|
|
1558
|
+
class: $({ "mr-1.5": e.config.label })
|
|
1559
|
+
}, null, 8, ["icon", "class"])) : C("", !0),
|
|
1560
|
+
e.config.label ? (f(), g("span", Sa, L(e.config.label), 1)) : C("", !0)
|
|
1449
1561
|
]),
|
|
1450
1562
|
_: 1
|
|
1451
1563
|
})
|
|
1452
1564
|
]);
|
|
1453
1565
|
};
|
|
1454
1566
|
}
|
|
1455
|
-
},
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
},
|
|
1567
|
+
}, $a = /* @__PURE__ */ U(Ca, [["__scopeId", "data-v-45343158"]]), Ta = { class: "spark-table" }, La = {
|
|
1568
|
+
key: 1,
|
|
1569
|
+
class: "pt-5"
|
|
1570
|
+
}, Ha = { class: "flex items-center gap-x-3" }, de = {
|
|
1571
|
+
perPages: [15, 30, 50, 100, 200, 500],
|
|
1572
|
+
limit: 15
|
|
1573
|
+
}, Pa = {
|
|
1459
1574
|
page: 1,
|
|
1460
|
-
limit:
|
|
1461
|
-
},
|
|
1575
|
+
limit: de.limit
|
|
1576
|
+
}, ve = {
|
|
1462
1577
|
colHeaders: !0,
|
|
1463
1578
|
filters: !1,
|
|
1464
1579
|
stretchH: "all",
|
|
@@ -1468,7 +1583,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1468
1583
|
tableClassName: "spark-table-table",
|
|
1469
1584
|
readOnlyCellClassName: "read-only",
|
|
1470
1585
|
licenseKey: "non-commercial-and-evaluation"
|
|
1471
|
-
},
|
|
1586
|
+
}, Vr = {
|
|
1472
1587
|
__name: "SparkTable",
|
|
1473
1588
|
props: {
|
|
1474
1589
|
url: {
|
|
@@ -1480,7 +1595,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1480
1595
|
dataTransformer: {
|
|
1481
1596
|
type: Function,
|
|
1482
1597
|
default: (e, s) => ({
|
|
1483
|
-
data:
|
|
1598
|
+
data: I(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((r) => a[r])) : e.data.data,
|
|
1484
1599
|
meta: {
|
|
1485
1600
|
last_page: e.data.last_page,
|
|
1486
1601
|
from: e.data.from,
|
|
@@ -1492,30 +1607,39 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1492
1607
|
params: {
|
|
1493
1608
|
type: Object,
|
|
1494
1609
|
default() {
|
|
1495
|
-
return
|
|
1610
|
+
return Pa;
|
|
1496
1611
|
}
|
|
1497
1612
|
},
|
|
1498
1613
|
options: {
|
|
1499
1614
|
type: Object,
|
|
1500
1615
|
default() {
|
|
1501
|
-
return
|
|
1616
|
+
return de;
|
|
1502
1617
|
}
|
|
1503
1618
|
},
|
|
1504
1619
|
settings: {
|
|
1505
1620
|
type: Object,
|
|
1506
1621
|
default() {
|
|
1507
|
-
return
|
|
1622
|
+
return ve;
|
|
1508
1623
|
}
|
|
1509
1624
|
},
|
|
1510
1625
|
plugins: {
|
|
1511
1626
|
type: Object,
|
|
1512
1627
|
default: () => ({})
|
|
1628
|
+
},
|
|
1629
|
+
syncToRoute: {
|
|
1630
|
+
type: [Boolean, String],
|
|
1631
|
+
default: !1
|
|
1632
|
+
},
|
|
1633
|
+
persistToStorage: {
|
|
1634
|
+
type: Boolean,
|
|
1635
|
+
default: !1
|
|
1513
1636
|
}
|
|
1514
1637
|
},
|
|
1515
1638
|
emits: [
|
|
1516
1639
|
"viewRow",
|
|
1517
1640
|
"editRow",
|
|
1518
1641
|
"deleteRow",
|
|
1642
|
+
"downloadRow",
|
|
1519
1643
|
"ready",
|
|
1520
1644
|
"loading",
|
|
1521
1645
|
"load",
|
|
@@ -1524,16 +1648,18 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1524
1648
|
],
|
|
1525
1649
|
setup(e, { expose: s, emit: t }) {
|
|
1526
1650
|
const a = e;
|
|
1527
|
-
|
|
1528
|
-
const l = t,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1651
|
+
Rt(), oe(Lt), oe(Ht), oe(Pt), I(a, "settings.nestedHeaders") && oe(Vt);
|
|
1652
|
+
const l = t, r = ke("axios"), o = V(null), i = V(!1), n = V(null);
|
|
1653
|
+
let c = !1;
|
|
1654
|
+
const p = {
|
|
1655
|
+
search: pa,
|
|
1656
|
+
filterSelect: ga,
|
|
1657
|
+
filterButtons: va,
|
|
1658
|
+
datePicker: _a,
|
|
1659
|
+
reset: $a
|
|
1660
|
+
}, u = D({
|
|
1535
1661
|
hotInstance: null,
|
|
1536
|
-
url: a.url,
|
|
1662
|
+
url: S(() => a.url),
|
|
1537
1663
|
plugins: a.plugins,
|
|
1538
1664
|
response: {},
|
|
1539
1665
|
params: {
|
|
@@ -1541,164 +1667,219 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
|
|
|
1541
1667
|
limit: a.options.limit
|
|
1542
1668
|
},
|
|
1543
1669
|
methods: {
|
|
1544
|
-
applyParams: (
|
|
1545
|
-
|
|
1670
|
+
applyParams: (m) => {
|
|
1671
|
+
m && (u.params = {
|
|
1546
1672
|
...u.params,
|
|
1547
|
-
...
|
|
1673
|
+
...m
|
|
1548
1674
|
}, l("page-change", u.params));
|
|
1549
1675
|
},
|
|
1550
|
-
removeParam: async (
|
|
1551
|
-
u.params[
|
|
1676
|
+
removeParam: async (m) => {
|
|
1677
|
+
u.params[m] && (delete u.params[m], await u.methods.loadTable());
|
|
1552
1678
|
},
|
|
1553
|
-
loadTable: async (
|
|
1679
|
+
loadTable: async (m) => {
|
|
1554
1680
|
if (!(!o.value || !o.value.hotInstance)) {
|
|
1555
|
-
i.value = !0,
|
|
1681
|
+
i.value = !0, n.value = null, l("loading", !0), le.start(), u.hotInstance = o.value.hotInstance;
|
|
1556
1682
|
try {
|
|
1557
1683
|
if (a.dataProvider) {
|
|
1558
|
-
const
|
|
1559
|
-
u.response = a.dataTransformer(
|
|
1684
|
+
const h = await a.dataProvider(u.computed.params);
|
|
1685
|
+
u.response = a.dataTransformer(h, a);
|
|
1560
1686
|
} else if (a.url) {
|
|
1561
|
-
const
|
|
1687
|
+
const h = await r.get(a.url, {
|
|
1562
1688
|
params: u.computed.params
|
|
1563
1689
|
});
|
|
1564
|
-
u.response = a.dataTransformer(
|
|
1690
|
+
u.response = a.dataTransformer(h, a);
|
|
1565
1691
|
} else {
|
|
1566
|
-
console.error("No data provider or URL provided"), i.value = !1, l("loading", !1),
|
|
1692
|
+
console.error("No data provider or URL provided"), i.value = !1, l("loading", !1), le.done();
|
|
1567
1693
|
return;
|
|
1568
1694
|
}
|
|
1569
|
-
|
|
1695
|
+
if (c) return;
|
|
1696
|
+
u.hotInstance.updateData(u.response.data), u.options.callback && typeof u.options.callback == "function" && await u.options.callback();
|
|
1697
|
+
const x = u.hotInstance.getPlugin("autoColumnSize");
|
|
1698
|
+
I(a.settings, "columns", []).forEach((h, w) => {
|
|
1699
|
+
h.width || x.calculateColumnsWidth(w, w, !0);
|
|
1700
|
+
}), l("load", {
|
|
1570
1701
|
data: u.response.data,
|
|
1571
1702
|
meta: u.response.meta
|
|
1572
|
-
}),
|
|
1573
|
-
} catch (
|
|
1574
|
-
|
|
1703
|
+
}), m && typeof m == "function" && m();
|
|
1704
|
+
} catch (x) {
|
|
1705
|
+
n.value = x, l("error", x), console.error("Error loading table data:", x);
|
|
1575
1706
|
} finally {
|
|
1576
|
-
i.value = !1, l("loading", !1),
|
|
1707
|
+
i.value = !1, l("loading", !1), le.done();
|
|
1577
1708
|
}
|
|
1578
1709
|
}
|
|
1579
1710
|
},
|
|
1580
1711
|
// can't use sparkTable.hotInstance here because the ref isn't ready
|
|
1581
|
-
colToProp: (
|
|
1582
|
-
fireEvent: (
|
|
1583
|
-
l(
|
|
1712
|
+
colToProp: (m) => o.value.hotInstance.colToProp(m),
|
|
1713
|
+
fireEvent: (m, x) => {
|
|
1714
|
+
l(m, x);
|
|
1584
1715
|
},
|
|
1585
|
-
getSettingsForProp: (
|
|
1716
|
+
getSettingsForProp: (m) => Ct(I(u.tableSettings, "columns"), { data: m }),
|
|
1586
1717
|
// Helper methods for easier param access
|
|
1587
1718
|
getParams: () => u.computed.params,
|
|
1588
|
-
getParam: (
|
|
1589
|
-
setParam: (
|
|
1590
|
-
u.methods.applyParams({ [
|
|
1719
|
+
getParam: (m) => u.computed.params[m],
|
|
1720
|
+
setParam: (m, x) => {
|
|
1721
|
+
u.methods.applyParams({ [m]: x });
|
|
1591
1722
|
},
|
|
1592
|
-
clearParam: (
|
|
1593
|
-
clearParams: (
|
|
1594
|
-
(Array.isArray(
|
|
1595
|
-
u.params[
|
|
1723
|
+
clearParam: (m) => u.methods.removeParam(m),
|
|
1724
|
+
clearParams: (m) => {
|
|
1725
|
+
(Array.isArray(m) ? m : [m]).forEach((H) => {
|
|
1726
|
+
u.params[H] !== void 0 && delete u.params[H];
|
|
1596
1727
|
}), u.methods.applyParams({ page: 1 });
|
|
1597
1728
|
}
|
|
1598
1729
|
},
|
|
1599
1730
|
computed: {
|
|
1600
|
-
params:
|
|
1731
|
+
params: S(() => ({
|
|
1601
1732
|
...a.params,
|
|
1602
1733
|
...u.params
|
|
1603
1734
|
})),
|
|
1604
|
-
ready:
|
|
1735
|
+
ready: S(() => $t(u, "response.meta.last_page"))
|
|
1605
1736
|
},
|
|
1606
|
-
options:
|
|
1607
|
-
...
|
|
1737
|
+
options: S(() => ({
|
|
1738
|
+
...de,
|
|
1608
1739
|
...a.options
|
|
1609
1740
|
})),
|
|
1610
|
-
tableSettings:
|
|
1611
|
-
...
|
|
1612
|
-
nestedHeaders:
|
|
1613
|
-
...!
|
|
1614
|
-
afterGetColHeader: (
|
|
1741
|
+
tableSettings: S(() => ({
|
|
1742
|
+
...ve,
|
|
1743
|
+
nestedHeaders: I(a.settings, "nestedHeaders", []),
|
|
1744
|
+
...!I(a.settings, "nestedHeaders") && {
|
|
1745
|
+
afterGetColHeader: (m, x) => As(m, x, u)
|
|
1746
|
+
},
|
|
1747
|
+
afterChange: (m, x) => Us(),
|
|
1748
|
+
afterRender: () => js(u),
|
|
1749
|
+
/**
|
|
1750
|
+
* Prevent columns with explicit width from being stretched
|
|
1751
|
+
* This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
|
|
1752
|
+
* while letting others stretch normally
|
|
1753
|
+
*/
|
|
1754
|
+
beforeStretchingColumnWidth: (m, x) => {
|
|
1755
|
+
const h = I(a.settings, "columns", [])[x];
|
|
1756
|
+
return h && h.width !== void 0 ? h.width : m;
|
|
1615
1757
|
},
|
|
1616
|
-
afterChange: (p, h) => js(),
|
|
1617
|
-
afterRender: () => Vs(u),
|
|
1618
1758
|
...a.settings
|
|
1619
1759
|
}))
|
|
1620
|
-
})
|
|
1621
|
-
|
|
1760
|
+
}), y = (m) => {
|
|
1761
|
+
if (!m) return null;
|
|
1762
|
+
switch (m.type) {
|
|
1763
|
+
case "search":
|
|
1764
|
+
return m.param || "search";
|
|
1765
|
+
case "filterSelect":
|
|
1766
|
+
case "filterButtons":
|
|
1767
|
+
case "datePicker":
|
|
1768
|
+
return m.param || `filter[${m.key}]`;
|
|
1769
|
+
default:
|
|
1770
|
+
return null;
|
|
1771
|
+
}
|
|
1772
|
+
}, _ = (m) => m ? typeof m.enabled == "function" ? m.enabled(u.params) : m.enabled : !1, k = S(() => Object.entries(a.plugins).filter(([m, x]) => _(x)).map(([m, x]) => ({ name: m, config: x })));
|
|
1773
|
+
if (A(
|
|
1774
|
+
() => ({ ...u.params }),
|
|
1775
|
+
() => {
|
|
1776
|
+
const m = [];
|
|
1777
|
+
Object.values(a.plugins).forEach((x) => {
|
|
1778
|
+
const H = y(x);
|
|
1779
|
+
if (!H) return;
|
|
1780
|
+
const h = _(x), w = u.params[H] !== void 0;
|
|
1781
|
+
!h && w && m.push(H);
|
|
1782
|
+
}), m.length > 0 && m.forEach((x) => {
|
|
1783
|
+
delete u.params[x];
|
|
1784
|
+
});
|
|
1785
|
+
},
|
|
1786
|
+
{ deep: !0, flush: "sync" }
|
|
1787
|
+
), a.syncToRoute || a.persistToStorage) {
|
|
1788
|
+
const m = typeof a.syncToRoute == "string";
|
|
1789
|
+
Gs(u, {
|
|
1790
|
+
namespace: m ? a.syncToRoute : null,
|
|
1791
|
+
syncToRoute: !!a.syncToRoute,
|
|
1792
|
+
persistToStorage: a.persistToStorage
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
return me(
|
|
1622
1796
|
() => a.params,
|
|
1623
1797
|
async () => {
|
|
1624
1798
|
u.params.page = 1, await u.methods.loadTable();
|
|
1625
1799
|
},
|
|
1626
1800
|
{ debounce: 50, maxWait: 1e3 }
|
|
1627
|
-
),
|
|
1801
|
+
), me(
|
|
1628
1802
|
() => u.params,
|
|
1629
1803
|
async () => {
|
|
1630
1804
|
await u.methods.loadTable();
|
|
1631
1805
|
},
|
|
1632
1806
|
{ debounce: 50, maxWait: 1e3 }
|
|
1633
|
-
),
|
|
1807
|
+
), A(
|
|
1808
|
+
() => a.url,
|
|
1809
|
+
async (m, x) => {
|
|
1810
|
+
m !== x && (u.params.page = 1, await u.methods.loadTable());
|
|
1811
|
+
}
|
|
1812
|
+
), ue(async () => {
|
|
1634
1813
|
await u.methods.loadTable(), l("ready");
|
|
1635
|
-
}),
|
|
1814
|
+
}), Fe(() => {
|
|
1815
|
+
c = !0;
|
|
1816
|
+
}), Ks(u), s({
|
|
1636
1817
|
refresh: () => u.methods.loadTable(),
|
|
1637
1818
|
getParams: () => u.methods.getParams(),
|
|
1638
|
-
getParam: (
|
|
1639
|
-
setParam: (
|
|
1640
|
-
clearParam: (
|
|
1641
|
-
clearParams: (
|
|
1642
|
-
applyParams: (
|
|
1819
|
+
getParam: (m) => u.methods.getParam(m),
|
|
1820
|
+
setParam: (m, x) => u.methods.setParam(m, x),
|
|
1821
|
+
clearParam: (m) => u.methods.clearParam(m),
|
|
1822
|
+
clearParams: (m) => u.methods.clearParams(m),
|
|
1823
|
+
applyParams: (m) => u.methods.applyParams(m),
|
|
1643
1824
|
loading: i,
|
|
1644
|
-
error:
|
|
1825
|
+
error: n,
|
|
1645
1826
|
sparkTable: u,
|
|
1646
1827
|
table: o
|
|
1647
|
-
}), (
|
|
1648
|
-
u.computed.ready ? (f(),
|
|
1828
|
+
}), (m, x) => (f(), g("div", Ta, [
|
|
1829
|
+
u.computed.ready && k.value && k.value.length ? (f(), E(be, {
|
|
1649
1830
|
key: 0,
|
|
1650
1831
|
position: "header"
|
|
1651
1832
|
}, {
|
|
1652
|
-
default:
|
|
1653
|
-
(f(!0), g(
|
|
1654
|
-
key:
|
|
1655
|
-
class:
|
|
1833
|
+
default: T(() => [
|
|
1834
|
+
(f(!0), g(j, null, N(k.value, (H) => (f(), E(te(p[H.config.type]), {
|
|
1835
|
+
key: H.name,
|
|
1836
|
+
class: $(H.config.align ? `self-${H.config.align}` : ""),
|
|
1656
1837
|
"spark-table": u,
|
|
1657
|
-
config:
|
|
1838
|
+
config: H.config
|
|
1658
1839
|
}, null, 8, ["class", "spark-table", "config"]))), 128)),
|
|
1659
|
-
|
|
1840
|
+
M(m.$slots, "header", {
|
|
1660
1841
|
sparkTable: u,
|
|
1661
1842
|
loading: i.value,
|
|
1662
|
-
error:
|
|
1843
|
+
error: n.value
|
|
1663
1844
|
})
|
|
1664
1845
|
]),
|
|
1665
1846
|
_: 3
|
|
1666
|
-
})) :
|
|
1667
|
-
v(
|
|
1847
|
+
})) : (f(), g("div", La)),
|
|
1848
|
+
v(b(Tt), {
|
|
1668
1849
|
"theme-name": "ht-theme-classic",
|
|
1669
1850
|
ref_key: "table",
|
|
1670
1851
|
ref: o,
|
|
1671
1852
|
settings: u.tableSettings
|
|
1672
1853
|
}, null, 8, ["settings"]),
|
|
1673
|
-
u.computed.ready ? (f(),
|
|
1674
|
-
key:
|
|
1854
|
+
u.computed.ready ? (f(), E(be, {
|
|
1855
|
+
key: 2,
|
|
1675
1856
|
position: "footer"
|
|
1676
1857
|
}, {
|
|
1677
|
-
default:
|
|
1678
|
-
v(
|
|
1679
|
-
|
|
1680
|
-
v(
|
|
1858
|
+
default: T(() => [
|
|
1859
|
+
v(ta, { "spark-table": u }, null, 8, ["spark-table"]),
|
|
1860
|
+
d("div", Ha, [
|
|
1861
|
+
v(na, {
|
|
1681
1862
|
"spark-table": u,
|
|
1682
1863
|
onPaginate: u.methods.applyParams
|
|
1683
1864
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
1684
|
-
v(
|
|
1865
|
+
v(ca, {
|
|
1685
1866
|
"spark-table": u,
|
|
1686
1867
|
onPaginate: u.methods.applyParams
|
|
1687
1868
|
}, null, 8, ["spark-table", "onPaginate"]),
|
|
1688
|
-
|
|
1869
|
+
M(m.$slots, "footer", {
|
|
1689
1870
|
sparkTable: u,
|
|
1690
1871
|
loading: i.value,
|
|
1691
|
-
error:
|
|
1872
|
+
error: n.value
|
|
1692
1873
|
})
|
|
1693
1874
|
])
|
|
1694
1875
|
]),
|
|
1695
1876
|
_: 3
|
|
1696
|
-
})) :
|
|
1877
|
+
})) : C("", !0)
|
|
1697
1878
|
]));
|
|
1698
1879
|
}
|
|
1699
1880
|
};
|
|
1700
|
-
function
|
|
1701
|
-
const e =
|
|
1881
|
+
function xe() {
|
|
1882
|
+
const e = D({
|
|
1702
1883
|
isVisible: !1,
|
|
1703
1884
|
content: null,
|
|
1704
1885
|
props: {},
|
|
@@ -1709,8 +1890,8 @@ function me() {
|
|
|
1709
1890
|
e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {};
|
|
1710
1891
|
}, a = () => {
|
|
1711
1892
|
e.isVisible = !0;
|
|
1712
|
-
}, l = (o, i = {},
|
|
1713
|
-
e.content =
|
|
1893
|
+
}, l = (o, i = {}, n = {}) => {
|
|
1894
|
+
e.content = _e(o), e.props = i, e.eventHandlers = n;
|
|
1714
1895
|
};
|
|
1715
1896
|
return {
|
|
1716
1897
|
state: e,
|
|
@@ -1718,14 +1899,14 @@ function me() {
|
|
|
1718
1899
|
close: t,
|
|
1719
1900
|
open: a,
|
|
1720
1901
|
setContent: l,
|
|
1721
|
-
show: (o, i = {},
|
|
1722
|
-
o && l(o, i,
|
|
1902
|
+
show: (o, i = {}, n = {}) => {
|
|
1903
|
+
o && l(o, i, n), a();
|
|
1723
1904
|
}
|
|
1724
1905
|
};
|
|
1725
1906
|
}
|
|
1726
|
-
class
|
|
1907
|
+
class Va {
|
|
1727
1908
|
constructor() {
|
|
1728
|
-
this.left =
|
|
1909
|
+
this.left = xe(), this.right = xe();
|
|
1729
1910
|
}
|
|
1730
1911
|
showLeft = (s, t = {}, a = {}) => {
|
|
1731
1912
|
const l = {
|
|
@@ -1755,22 +1936,22 @@ class ka {
|
|
|
1755
1936
|
this.left.close(), this.right.close();
|
|
1756
1937
|
};
|
|
1757
1938
|
}
|
|
1758
|
-
const
|
|
1939
|
+
const Y = new Va(), Ra = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ba = { class: "flex flex-1 flex-col" }, Ma = {
|
|
1759
1940
|
class: "flex flex-1 flex-col gap-y-7",
|
|
1760
1941
|
role: "list"
|
|
1761
|
-
},
|
|
1942
|
+
}, Ea = { class: "flex flex-1 flex-col" }, Fa = {
|
|
1762
1943
|
role: "list",
|
|
1763
1944
|
class: "flex flex-1 flex-col"
|
|
1764
|
-
},
|
|
1945
|
+
}, Aa = { class: "flex items-center pb-8" }, ja = ["href", "onClick"], Oa = {
|
|
1765
1946
|
key: 2,
|
|
1766
1947
|
class: "w-full flex justify-center"
|
|
1767
|
-
},
|
|
1948
|
+
}, za = {
|
|
1768
1949
|
key: 0,
|
|
1769
1950
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
1770
|
-
},
|
|
1951
|
+
}, Ia = ["href", "onClick"], Na = {
|
|
1771
1952
|
key: 1,
|
|
1772
1953
|
class: "text-[13px]"
|
|
1773
|
-
},
|
|
1954
|
+
}, Da = { class: "mt-auto" }, qa = { class: "p-[10px] flex-shrink-0" }, Za = { class: "flex flex-1 items-center gap-x-6" }, Ka = { class: "relative flex flex-1 items-center gap-4" }, Ua = { class: "cursor-pointer" }, Ga = ["src"], Wa = { class: "ml-auto" }, Ya = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Rr = {
|
|
1774
1955
|
__name: "SparkDefaultContainer",
|
|
1775
1956
|
props: {
|
|
1776
1957
|
appStore: {
|
|
@@ -1788,113 +1969,113 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
|
|
|
1788
1969
|
},
|
|
1789
1970
|
emits: ["overlayClose"],
|
|
1790
1971
|
setup(e, { emit: s }) {
|
|
1791
|
-
const t = e, a = s, l =
|
|
1792
|
-
const
|
|
1793
|
-
l["app-selector-bottom"] ?
|
|
1794
|
-
select: (
|
|
1795
|
-
|
|
1972
|
+
const t = e, a = s, l = Se(), r = Q(), o = Re(), i = Pe(), n = S(() => i.getAppIcon(t.appStore.state.app)), c = S(() => r.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), p = () => {
|
|
1973
|
+
const k = {};
|
|
1974
|
+
l["app-selector-bottom"] ? k.bottomSlot = () => fe("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (k.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? k.footerSlot = () => fe("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (k.footerSlot = t.appSelectorSlots.footerSlot), Y.showRight(os, k, {
|
|
1975
|
+
select: (m) => {
|
|
1976
|
+
Y.closeRight();
|
|
1796
1977
|
}
|
|
1797
1978
|
});
|
|
1798
|
-
},
|
|
1799
|
-
|
|
1800
|
-
|
|
1979
|
+
}, u = () => {
|
|
1980
|
+
Y.showLeft(
|
|
1981
|
+
xs,
|
|
1801
1982
|
{},
|
|
1802
1983
|
{
|
|
1803
|
-
select: (
|
|
1804
|
-
|
|
1984
|
+
select: (k) => {
|
|
1985
|
+
o.toggleBrand(k), Y.closeLeft();
|
|
1805
1986
|
}
|
|
1806
1987
|
}
|
|
1807
1988
|
);
|
|
1808
|
-
},
|
|
1809
|
-
return (
|
|
1810
|
-
const
|
|
1811
|
-
return f(), g(
|
|
1812
|
-
|
|
1813
|
-
class:
|
|
1989
|
+
}, y = S(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), _ = S(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
1990
|
+
return (k, m) => {
|
|
1991
|
+
const x = R("font-awesome-icon"), H = R("router-view");
|
|
1992
|
+
return f(), g(j, null, [
|
|
1993
|
+
d("div", {
|
|
1994
|
+
class: $([y.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
1814
1995
|
}, [
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1996
|
+
d("div", Ra, [
|
|
1997
|
+
d("nav", Ba, [
|
|
1998
|
+
d("ul", Ma, [
|
|
1999
|
+
d("li", Ea, [
|
|
2000
|
+
d("ul", Fa, [
|
|
2001
|
+
d("li", Aa, [
|
|
2002
|
+
d("a", {
|
|
1822
2003
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
1823
|
-
onClick:
|
|
2004
|
+
onClick: m[0] || (m[0] = K((h) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
1824
2005
|
}, [
|
|
1825
|
-
v(
|
|
1826
|
-
icon:
|
|
2006
|
+
v(x, {
|
|
2007
|
+
icon: b(B)[n.value],
|
|
1827
2008
|
class: "size-5"
|
|
1828
2009
|
}, null, 8, ["icon"])
|
|
1829
2010
|
]),
|
|
1830
|
-
e.mainNavStore.state.collapsed ?
|
|
2011
|
+
e.mainNavStore.state.collapsed ? C("", !0) : (f(), g("a", {
|
|
1831
2012
|
key: 0,
|
|
1832
|
-
onClick:
|
|
2013
|
+
onClick: m[1] || (m[1] = K((h) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
1833
2014
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
1834
|
-
},
|
|
2015
|
+
}, L(e.appStore.state.app), 1))
|
|
1835
2016
|
]),
|
|
1836
|
-
(f(!0), g(
|
|
1837
|
-
key:
|
|
1838
|
-
class:
|
|
1839
|
-
"mt-[10px]":
|
|
1840
|
-
"mt-auto":
|
|
2017
|
+
(f(!0), g(j, null, N(e.mainNavStore.state.menu, (h) => (f(), g("li", {
|
|
2018
|
+
key: h.name,
|
|
2019
|
+
class: $({
|
|
2020
|
+
"mt-[10px]": h.children,
|
|
2021
|
+
"mt-auto": h.footerSection
|
|
1841
2022
|
})
|
|
1842
2023
|
}, [
|
|
1843
|
-
|
|
1844
|
-
class:
|
|
1845
|
-
"bg-gray-100":
|
|
1846
|
-
"hover:bg-gray-100":
|
|
2024
|
+
d("a", {
|
|
2025
|
+
class: $([{
|
|
2026
|
+
"bg-gray-100": h.current,
|
|
2027
|
+
"hover:bg-gray-100": h?.href
|
|
1847
2028
|
}, "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"]),
|
|
1848
|
-
href:
|
|
1849
|
-
onClick:
|
|
2029
|
+
href: h?.href,
|
|
2030
|
+
onClick: K((w) => e.mainNavStore.goto(h.href), ["prevent"])
|
|
1850
2031
|
}, [
|
|
1851
|
-
|
|
2032
|
+
h.icon ? (f(), E(x, {
|
|
1852
2033
|
key: 0,
|
|
1853
|
-
icon:
|
|
1854
|
-
class:
|
|
1855
|
-
}, null, 8, ["icon", "class"])) :
|
|
1856
|
-
e.mainNavStore.state.collapsed ?
|
|
1857
|
-
|
|
1858
|
-
])])) :
|
|
2034
|
+
icon: b(B)[h.icon],
|
|
2035
|
+
class: $([[(h.current, "text-gray-400")], "size-4"])
|
|
2036
|
+
}, null, 8, ["icon", "class"])) : C("", !0),
|
|
2037
|
+
e.mainNavStore.state.collapsed ? h?.children ? (f(), g("div", Oa, [...m[6] || (m[6] = [
|
|
2038
|
+
d("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
2039
|
+
])])) : C("", !0) : (f(), g("span", {
|
|
1859
2040
|
key: 1,
|
|
1860
|
-
class:
|
|
1861
|
-
"text-[11px]":
|
|
1862
|
-
"text-[13px]": !
|
|
1863
|
-
"font-semibold":
|
|
1864
|
-
"text-gray-500":
|
|
2041
|
+
class: $({
|
|
2042
|
+
"text-[11px]": h?.children,
|
|
2043
|
+
"text-[13px]": !h?.children,
|
|
2044
|
+
"font-semibold": h?.children,
|
|
2045
|
+
"text-gray-500": h?.children
|
|
1865
2046
|
})
|
|
1866
|
-
},
|
|
1867
|
-
], 10,
|
|
1868
|
-
|
|
1869
|
-
(f(!0), g(
|
|
1870
|
-
key:
|
|
2047
|
+
}, L(h.name), 3))
|
|
2048
|
+
], 10, ja),
|
|
2049
|
+
h.children ? (f(), g("ul", za, [
|
|
2050
|
+
(f(!0), g(j, null, N(h.children, (w) => (f(), g("li", {
|
|
2051
|
+
key: w.name
|
|
1871
2052
|
}, [
|
|
1872
|
-
|
|
1873
|
-
class:
|
|
1874
|
-
href:
|
|
1875
|
-
onClick:
|
|
2053
|
+
d("a", {
|
|
2054
|
+
class: $([[w.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"]),
|
|
2055
|
+
href: w.href,
|
|
2056
|
+
onClick: K((P) => e.mainNavStore.goto(w.href), ["prevent"])
|
|
1876
2057
|
}, [
|
|
1877
|
-
|
|
2058
|
+
w.icon ? (f(), E(x, {
|
|
1878
2059
|
key: 0,
|
|
1879
|
-
icon:
|
|
1880
|
-
class:
|
|
1881
|
-
}, null, 8, ["icon", "class"])) :
|
|
1882
|
-
e.mainNavStore.state.collapsed ?
|
|
1883
|
-
], 10,
|
|
2060
|
+
icon: b(B)[w.icon],
|
|
2061
|
+
class: $([[(w.current, "text-gray-400")], "size-4"])
|
|
2062
|
+
}, null, 8, ["icon", "class"])) : C("", !0),
|
|
2063
|
+
e.mainNavStore.state.collapsed ? C("", !0) : (f(), g("span", Na, L(w.name), 1))
|
|
2064
|
+
], 10, Ia)
|
|
1884
2065
|
]))), 128))
|
|
1885
|
-
])) :
|
|
2066
|
+
])) : C("", !0)
|
|
1886
2067
|
], 2))), 128))
|
|
1887
2068
|
])
|
|
1888
2069
|
]),
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
2070
|
+
d("li", Da, [
|
|
2071
|
+
M(k.$slots, "sidebar-footer"),
|
|
2072
|
+
d("a", {
|
|
1892
2073
|
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",
|
|
1893
2074
|
href: "#",
|
|
1894
|
-
onClick:
|
|
2075
|
+
onClick: m[2] || (m[2] = K((h) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
1895
2076
|
}, [
|
|
1896
|
-
v(
|
|
1897
|
-
icon:
|
|
2077
|
+
v(x, {
|
|
2078
|
+
icon: b(B)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
1898
2079
|
class: "class-5"
|
|
1899
2080
|
}, null, 8, ["icon"])
|
|
1900
2081
|
])
|
|
@@ -1903,109 +2084,109 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
|
|
|
1903
2084
|
])
|
|
1904
2085
|
])
|
|
1905
2086
|
], 2),
|
|
1906
|
-
|
|
1907
|
-
class:
|
|
2087
|
+
d("div", {
|
|
2088
|
+
class: $([_.value, "h-full transition-all flex flex-col"])
|
|
1908
2089
|
}, [
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
v(
|
|
1915
|
-
icon:
|
|
2090
|
+
d("div", qa, [
|
|
2091
|
+
d("div", Za, [
|
|
2092
|
+
d("div", Ka, [
|
|
2093
|
+
M(k.$slots, "header-left", {}, () => [
|
|
2094
|
+
d("div", Ua, [
|
|
2095
|
+
v(x, {
|
|
2096
|
+
icon: b(B).farBarsSort,
|
|
1916
2097
|
class: "size-5",
|
|
1917
|
-
onClick:
|
|
2098
|
+
onClick: m[3] || (m[3] = (h) => e.mainNavStore.toggleHidden())
|
|
1918
2099
|
}, null, 8, ["icon"])
|
|
1919
2100
|
])
|
|
1920
2101
|
]),
|
|
1921
|
-
|
|
1922
|
-
|
|
2102
|
+
M(k.$slots, "header-center", {}, () => [
|
|
2103
|
+
c.value ? (f(), g("div", {
|
|
1923
2104
|
key: 0,
|
|
1924
2105
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
1925
|
-
onClick:
|
|
2106
|
+
onClick: u
|
|
1926
2107
|
}, [
|
|
1927
|
-
|
|
2108
|
+
b(o).currentBrand ? (f(), g("img", {
|
|
1928
2109
|
key: 0,
|
|
1929
|
-
src:
|
|
2110
|
+
src: b(o).currentBrand.logo,
|
|
1930
2111
|
alt: "",
|
|
1931
2112
|
class: "h-[30px] w-auto"
|
|
1932
|
-
}, null, 8,
|
|
1933
|
-
])) :
|
|
2113
|
+
}, null, 8, Ga)) : C("", !0)
|
|
2114
|
+
])) : C("", !0)
|
|
1934
2115
|
]),
|
|
1935
|
-
|
|
1936
|
-
|
|
2116
|
+
d("div", Wa, [
|
|
2117
|
+
M(k.$slots, "header-right", {}, () => [
|
|
1937
2118
|
e.appStore.state.showAppSelector ? (f(), g("button", {
|
|
1938
2119
|
key: 0,
|
|
1939
2120
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
1940
2121
|
type: "button",
|
|
1941
|
-
onClick:
|
|
2122
|
+
onClick: p
|
|
1942
2123
|
}, [
|
|
1943
|
-
v(
|
|
1944
|
-
icon:
|
|
2124
|
+
v(x, {
|
|
2125
|
+
icon: b(B).farGripDotsVertical,
|
|
1945
2126
|
class: "size-4 text-gray-400"
|
|
1946
2127
|
}, null, 8, ["icon"])
|
|
1947
|
-
])) :
|
|
2128
|
+
])) : C("", !0)
|
|
1948
2129
|
])
|
|
1949
2130
|
])
|
|
1950
2131
|
])
|
|
1951
2132
|
])
|
|
1952
2133
|
]),
|
|
1953
|
-
|
|
1954
|
-
v(
|
|
2134
|
+
d("main", Ya, [
|
|
2135
|
+
v(H)
|
|
1955
2136
|
])
|
|
1956
2137
|
], 2),
|
|
1957
|
-
v(
|
|
2138
|
+
v(b(ge), {
|
|
1958
2139
|
position: "left",
|
|
1959
|
-
"overlay-instance":
|
|
1960
|
-
onClose:
|
|
2140
|
+
"overlay-instance": b(Y).left,
|
|
2141
|
+
onClose: m[4] || (m[4] = (h) => a("overlayClose", "left"))
|
|
1961
2142
|
}, null, 8, ["overlay-instance"]),
|
|
1962
|
-
v(
|
|
2143
|
+
v(b(ge), {
|
|
1963
2144
|
position: "right",
|
|
1964
|
-
"overlay-instance":
|
|
1965
|
-
onClose:
|
|
2145
|
+
"overlay-instance": b(Y).right,
|
|
2146
|
+
onClose: m[5] || (m[5] = (h) => a("overlayClose", "right"))
|
|
1966
2147
|
}, null, 8, ["overlay-instance"]),
|
|
1967
|
-
v(
|
|
2148
|
+
v(b(Hs))
|
|
1968
2149
|
], 64);
|
|
1969
2150
|
};
|
|
1970
2151
|
}
|
|
1971
|
-
},
|
|
1972
|
-
function
|
|
1973
|
-
const t =
|
|
1974
|
-
return f(), g("main",
|
|
2152
|
+
}, Xa = {}, Ja = { class: "h-full" };
|
|
2153
|
+
function Qa(e, s) {
|
|
2154
|
+
const t = R("router-view");
|
|
2155
|
+
return f(), g("main", Ja, [
|
|
1975
2156
|
v(t)
|
|
1976
2157
|
]);
|
|
1977
2158
|
}
|
|
1978
|
-
const
|
|
2159
|
+
const Br = /* @__PURE__ */ U(Xa, [["render", Qa]]), eo = (e) => {
|
|
1979
2160
|
const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
1980
2161
|
return s ? s[2] : null;
|
|
1981
|
-
},
|
|
2162
|
+
}, to = (e, s, t = {}) => {
|
|
1982
2163
|
const {
|
|
1983
2164
|
maxAge: a = 31536e3,
|
|
1984
2165
|
// 365 days in seconds
|
|
1985
|
-
domain: l =
|
|
1986
|
-
secure:
|
|
2166
|
+
domain: l = Be(),
|
|
2167
|
+
secure: r = !0,
|
|
1987
2168
|
sameSite: o = "Lax",
|
|
1988
2169
|
path: i = "/"
|
|
1989
2170
|
} = t;
|
|
1990
|
-
let
|
|
1991
|
-
l && (
|
|
1992
|
-
},
|
|
1993
|
-
const { domain: t =
|
|
2171
|
+
let n = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
|
|
2172
|
+
l && (n += `; domain=${l}`), r && (n += "; secure"), document.cookie = n;
|
|
2173
|
+
}, so = (e, s = {}) => {
|
|
2174
|
+
const { domain: t = Be(), path: a = "/" } = s;
|
|
1994
2175
|
let l = `${e}=; max-age=0; path=${a}`;
|
|
1995
2176
|
t && (l += `; domain=${t}`), document.cookie = l;
|
|
1996
|
-
},
|
|
2177
|
+
}, Be = () => {
|
|
1997
2178
|
const e = window.location.hostname;
|
|
1998
2179
|
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;
|
|
1999
|
-
},
|
|
2000
|
-
function
|
|
2001
|
-
|
|
2180
|
+
}, Me = [];
|
|
2181
|
+
function ao(e) {
|
|
2182
|
+
Me.push(e);
|
|
2002
2183
|
}
|
|
2003
|
-
function
|
|
2004
|
-
|
|
2184
|
+
function oo() {
|
|
2185
|
+
Me.forEach((e) => e());
|
|
2005
2186
|
}
|
|
2006
|
-
function
|
|
2187
|
+
function Mr(e) {
|
|
2007
2188
|
let s = !1;
|
|
2008
|
-
return
|
|
2189
|
+
return ao(() => {
|
|
2009
2190
|
s = !1;
|
|
2010
2191
|
}), {
|
|
2011
2192
|
bootstrapApp: async () => {
|
|
@@ -2018,8 +2199,8 @@ function Cr(e) {
|
|
|
2018
2199
|
}
|
|
2019
2200
|
};
|
|
2020
2201
|
}
|
|
2021
|
-
const
|
|
2022
|
-
const e =
|
|
2202
|
+
const ce = "bolt-next-token", O = ae("auth", () => {
|
|
2203
|
+
const e = D({
|
|
2023
2204
|
user: null,
|
|
2024
2205
|
token: null,
|
|
2025
2206
|
ready: !1,
|
|
@@ -2051,18 +2232,18 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2051
2232
|
onLogoutSuccess: null,
|
|
2052
2233
|
onLogoutError: null
|
|
2053
2234
|
}
|
|
2054
|
-
}), s = (
|
|
2055
|
-
|
|
2056
|
-
}, t = (
|
|
2057
|
-
|
|
2235
|
+
}), s = (c = {}) => {
|
|
2236
|
+
c.endpoints && Object.assign(e.endpoints, c.endpoints), c.routes && Object.assign(e.routes, c.routes), c.devCredentials && Object.assign(e.devCredentials, c.devCredentials), c.callbacks && Object.assign(e.callbacks, c.callbacks), c.overrideToken && (e.overrideToken = c.overrideToken);
|
|
2237
|
+
}, t = (c) => {
|
|
2238
|
+
to(ce, c), e.token = c;
|
|
2058
2239
|
}, a = () => {
|
|
2059
|
-
|
|
2060
|
-
}, l = () =>
|
|
2061
|
-
const
|
|
2062
|
-
return t(u), e.user =
|
|
2240
|
+
so(ce), e.token = null;
|
|
2241
|
+
}, l = () => eo(ce), r = async (c) => {
|
|
2242
|
+
const p = await J.post(e.endpoints.login, c), u = p.headers.authorization;
|
|
2243
|
+
return t(u), e.user = p.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(p.data), p.data;
|
|
2063
2244
|
}, o = async () => {
|
|
2064
2245
|
try {
|
|
2065
|
-
await
|
|
2246
|
+
await J.post(
|
|
2066
2247
|
e.endpoints.logout,
|
|
2067
2248
|
{},
|
|
2068
2249
|
{
|
|
@@ -2071,50 +2252,50 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2071
2252
|
}
|
|
2072
2253
|
}
|
|
2073
2254
|
), e.callbacks.onLogoutSuccess && await e.callbacks.onLogoutSuccess();
|
|
2074
|
-
} catch (
|
|
2075
|
-
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(
|
|
2255
|
+
} catch (c) {
|
|
2256
|
+
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(c), c;
|
|
2076
2257
|
} finally {
|
|
2077
|
-
a(), e.user = null,
|
|
2258
|
+
a(), e.user = null, oo();
|
|
2078
2259
|
}
|
|
2079
2260
|
}, i = async () => {
|
|
2080
|
-
const
|
|
2081
|
-
if (!
|
|
2261
|
+
const c = e.overrideToken || l();
|
|
2262
|
+
if (!c)
|
|
2082
2263
|
return e.ready = !0, null;
|
|
2083
2264
|
try {
|
|
2084
|
-
const { data:
|
|
2265
|
+
const { data: p } = await J.get(e.endpoints.fetch, {
|
|
2085
2266
|
headers: {
|
|
2086
|
-
Authorization: `Bearer ${
|
|
2267
|
+
Authorization: `Bearer ${c}`
|
|
2087
2268
|
}
|
|
2088
2269
|
});
|
|
2089
|
-
e.user =
|
|
2270
|
+
e.user = p, e.overrideToken || (e.token = c);
|
|
2090
2271
|
} catch {
|
|
2091
2272
|
e.overrideToken || a();
|
|
2092
2273
|
} finally {
|
|
2093
2274
|
e.ready = !0;
|
|
2094
2275
|
}
|
|
2095
|
-
},
|
|
2276
|
+
}, n = S(() => e.overrideToken ? !0 : !!e.token && !!e.user);
|
|
2096
2277
|
return {
|
|
2097
2278
|
state: e,
|
|
2098
2279
|
initialize: s,
|
|
2099
|
-
login:
|
|
2280
|
+
login: r,
|
|
2100
2281
|
logout: o,
|
|
2101
2282
|
fetchUser: i,
|
|
2102
|
-
check:
|
|
2283
|
+
check: n,
|
|
2103
2284
|
setTokenCookie: t,
|
|
2104
2285
|
clearTokenCookie: a,
|
|
2105
2286
|
getTokenCookie: l
|
|
2106
2287
|
};
|
|
2107
|
-
}),
|
|
2288
|
+
}), ro = { class: "h-full grid place-content-center relative" }, no = { class: "absolute top-8 left-8" }, lo = ["src"], io = {
|
|
2108
2289
|
key: 1,
|
|
2109
2290
|
width: "59",
|
|
2110
2291
|
height: "23",
|
|
2111
2292
|
viewBox: "0 0 59 23",
|
|
2112
2293
|
fill: "none",
|
|
2113
2294
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2114
|
-
},
|
|
2295
|
+
}, co = { class: "max-w-sm grid gap-y-1 -mt-8" }, uo = { class: "mb-7" }, po = { class: "text-gray-600" }, fo = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, mo = {
|
|
2115
2296
|
key: 0,
|
|
2116
2297
|
class: "text-red-600 text-sm mb-2"
|
|
2117
|
-
},
|
|
2298
|
+
}, go = { key: 0 }, ho = { key: 1 }, yo = {
|
|
2118
2299
|
__name: "SparkLoginView",
|
|
2119
2300
|
props: {
|
|
2120
2301
|
logo: {
|
|
@@ -2131,64 +2312,64 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2131
2312
|
}
|
|
2132
2313
|
},
|
|
2133
2314
|
setup(e) {
|
|
2134
|
-
const s =
|
|
2315
|
+
const s = q(), t = Q(), a = Ve(), l = O(), r = e, o = V(!1), i = V(""), n = async (c) => {
|
|
2135
2316
|
o.value = !0, i.value = "";
|
|
2136
2317
|
try {
|
|
2137
|
-
await l.login(
|
|
2138
|
-
const
|
|
2139
|
-
if (
|
|
2140
|
-
if (
|
|
2141
|
-
window.location.href =
|
|
2318
|
+
await l.login(c);
|
|
2319
|
+
const p = t.query.redirect;
|
|
2320
|
+
if (p) {
|
|
2321
|
+
if (p.startsWith("http")) {
|
|
2322
|
+
window.location.href = p;
|
|
2142
2323
|
return;
|
|
2143
2324
|
}
|
|
2144
|
-
await s.push(
|
|
2325
|
+
await s.push(p);
|
|
2145
2326
|
} else
|
|
2146
|
-
await s.push(
|
|
2147
|
-
} catch (
|
|
2148
|
-
i.value =
|
|
2327
|
+
await s.push(r.defaultRedirect);
|
|
2328
|
+
} catch (p) {
|
|
2329
|
+
i.value = p.response?.data?.message || p.message || "Login failed. Please try again.";
|
|
2149
2330
|
} finally {
|
|
2150
2331
|
o.value = !1;
|
|
2151
2332
|
}
|
|
2152
2333
|
};
|
|
2153
|
-
return (
|
|
2154
|
-
const u =
|
|
2155
|
-
return f(), g("div",
|
|
2156
|
-
|
|
2157
|
-
|
|
2334
|
+
return (c, p) => {
|
|
2335
|
+
const u = R("FormKit"), y = R("router-link");
|
|
2336
|
+
return f(), g("div", ro, [
|
|
2337
|
+
d("div", no, [
|
|
2338
|
+
r.logo ? (f(), g("img", {
|
|
2158
2339
|
key: 0,
|
|
2159
|
-
src:
|
|
2340
|
+
src: r.logo,
|
|
2160
2341
|
alt: "Logo",
|
|
2161
2342
|
class: "h-[23px] w-auto"
|
|
2162
|
-
}, null, 8,
|
|
2163
|
-
|
|
2343
|
+
}, null, 8, lo)) : (f(), g("svg", io, [...p[0] || (p[0] = [
|
|
2344
|
+
d("path", {
|
|
2164
2345
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2165
2346
|
fill: "#1C64F2"
|
|
2166
2347
|
}, null, -1),
|
|
2167
|
-
|
|
2348
|
+
d("path", {
|
|
2168
2349
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2169
2350
|
fill: "#1C64F2"
|
|
2170
2351
|
}, null, -1),
|
|
2171
|
-
|
|
2352
|
+
d("path", {
|
|
2172
2353
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2173
2354
|
fill: "#1C64F2"
|
|
2174
2355
|
}, null, -1),
|
|
2175
|
-
|
|
2356
|
+
d("path", {
|
|
2176
2357
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2177
2358
|
fill: "#1C64F2"
|
|
2178
2359
|
}, null, -1)
|
|
2179
2360
|
])]))
|
|
2180
2361
|
]),
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2362
|
+
d("div", co, [
|
|
2363
|
+
d("div", uo, [
|
|
2364
|
+
p[1] || (p[1] = d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
2365
|
+
d("p", po, " Welcome back" + L(b(a).state.app ? ` to ${b(a).state.app}` : "") + "! Please enter your details. ", 1)
|
|
2185
2366
|
]),
|
|
2186
2367
|
v(u, {
|
|
2187
2368
|
type: "form",
|
|
2188
|
-
onSubmit:
|
|
2369
|
+
onSubmit: n,
|
|
2189
2370
|
actions: !1
|
|
2190
2371
|
}, {
|
|
2191
|
-
default:
|
|
2372
|
+
default: T(() => [
|
|
2192
2373
|
v(u, {
|
|
2193
2374
|
label: "Email",
|
|
2194
2375
|
name: "email",
|
|
@@ -2196,7 +2377,7 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2196
2377
|
type: "email",
|
|
2197
2378
|
validation: "required|email",
|
|
2198
2379
|
"outer-class": "max-w-full",
|
|
2199
|
-
value:
|
|
2380
|
+
value: b(l).state.devCredentials.username
|
|
2200
2381
|
}, null, 8, ["value"]),
|
|
2201
2382
|
v(u, {
|
|
2202
2383
|
label: "Password",
|
|
@@ -2205,29 +2386,29 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2205
2386
|
type: "password",
|
|
2206
2387
|
validation: "required",
|
|
2207
2388
|
"outer-class": "max-w-full",
|
|
2208
|
-
value:
|
|
2389
|
+
value: b(l).state.devCredentials.password
|
|
2209
2390
|
}, null, 8, ["value"]),
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
v(
|
|
2213
|
-
to:
|
|
2391
|
+
d("div", fo, [
|
|
2392
|
+
p[3] || (p[3] = d("span", null, null, -1)),
|
|
2393
|
+
v(y, {
|
|
2394
|
+
to: r.forgotPasswordRoute,
|
|
2214
2395
|
class: "text-sm text-primary-600 font-semibold"
|
|
2215
2396
|
}, {
|
|
2216
|
-
default:
|
|
2217
|
-
|
|
2397
|
+
default: T(() => [...p[2] || (p[2] = [
|
|
2398
|
+
F(" Forgot password ", -1)
|
|
2218
2399
|
])]),
|
|
2219
2400
|
_: 1
|
|
2220
2401
|
}, 8, ["to"])
|
|
2221
2402
|
]),
|
|
2222
|
-
i.value ? (f(), g("div",
|
|
2223
|
-
v(
|
|
2403
|
+
i.value ? (f(), g("div", mo, L(i.value), 1)) : C("", !0),
|
|
2404
|
+
v(b(z), {
|
|
2224
2405
|
type: "submit",
|
|
2225
2406
|
size: "xl",
|
|
2226
2407
|
disabled: o.value,
|
|
2227
2408
|
"button-class": "w-full mb-2"
|
|
2228
2409
|
}, {
|
|
2229
|
-
default:
|
|
2230
|
-
o.value ? (f(), g("span",
|
|
2410
|
+
default: T(() => [
|
|
2411
|
+
o.value ? (f(), g("span", ho, "Signing in...")) : (f(), g("span", go, "Sign in"))
|
|
2231
2412
|
]),
|
|
2232
2413
|
_: 1
|
|
2233
2414
|
}, 8, ["disabled"])
|
|
@@ -2238,7 +2419,7 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2238
2419
|
]);
|
|
2239
2420
|
};
|
|
2240
2421
|
}
|
|
2241
|
-
},
|
|
2422
|
+
}, bo = {
|
|
2242
2423
|
__name: "SparkLogoutView",
|
|
2243
2424
|
props: {
|
|
2244
2425
|
defaultRedirect: {
|
|
@@ -2247,27 +2428,27 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2247
2428
|
}
|
|
2248
2429
|
},
|
|
2249
2430
|
setup(e) {
|
|
2250
|
-
const s =
|
|
2251
|
-
return
|
|
2431
|
+
const s = q(), t = Q(), a = O(), l = e;
|
|
2432
|
+
return ue(async () => {
|
|
2252
2433
|
await a.logout();
|
|
2253
|
-
const
|
|
2254
|
-
|
|
2255
|
-
}), (
|
|
2434
|
+
const r = t.query.redirect;
|
|
2435
|
+
r && r.startsWith("http") ? window.location.href = r : await s.push(r || l.defaultRedirect);
|
|
2436
|
+
}), (r, o) => null;
|
|
2256
2437
|
}
|
|
2257
|
-
},
|
|
2438
|
+
}, vo = { class: "h-full grid place-content-center relative" }, xo = { class: "absolute top-8 left-8" }, ko = ["src"], _o = {
|
|
2258
2439
|
key: 1,
|
|
2259
2440
|
width: "59",
|
|
2260
2441
|
height: "23",
|
|
2261
2442
|
viewBox: "0 0 59 23",
|
|
2262
2443
|
fill: "none",
|
|
2263
2444
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2264
|
-
},
|
|
2445
|
+
}, wo = { class: "max-w-sm grid gap-y-1 -mt-8" }, So = {
|
|
2265
2446
|
key: 0,
|
|
2266
2447
|
class: "text-red-600 text-sm mb-2"
|
|
2267
|
-
},
|
|
2448
|
+
}, Co = {
|
|
2268
2449
|
key: 1,
|
|
2269
2450
|
class: "text-green-600 text-sm mb-2"
|
|
2270
|
-
},
|
|
2451
|
+
}, $o = { key: 0 }, To = { key: 1 }, Lo = {
|
|
2271
2452
|
__name: "SparkForgotPasswordView",
|
|
2272
2453
|
props: {
|
|
2273
2454
|
logo: {
|
|
@@ -2280,56 +2461,56 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2280
2461
|
}
|
|
2281
2462
|
},
|
|
2282
2463
|
setup(e) {
|
|
2283
|
-
const s =
|
|
2284
|
-
a.value = !0, l.value = "",
|
|
2464
|
+
const s = O(), t = e, a = V(!1), l = V(""), r = V(""), o = async ({ email: i }) => {
|
|
2465
|
+
a.value = !0, l.value = "", r.value = "";
|
|
2285
2466
|
try {
|
|
2286
|
-
await
|
|
2287
|
-
} catch (
|
|
2288
|
-
l.value =
|
|
2467
|
+
await J.post(s.state.endpoints.passwordEmail, { email: i }), r.value = "Password reset link sent! Check your email.";
|
|
2468
|
+
} catch (n) {
|
|
2469
|
+
l.value = n.response?.data?.message || "Failed to send reset link.";
|
|
2289
2470
|
} finally {
|
|
2290
2471
|
a.value = !1;
|
|
2291
2472
|
}
|
|
2292
2473
|
};
|
|
2293
|
-
return (i,
|
|
2294
|
-
const
|
|
2295
|
-
return f(), g("div",
|
|
2296
|
-
|
|
2474
|
+
return (i, n) => {
|
|
2475
|
+
const c = R("FormKit"), p = R("router-link");
|
|
2476
|
+
return f(), g("div", vo, [
|
|
2477
|
+
d("div", xo, [
|
|
2297
2478
|
t.logo ? (f(), g("img", {
|
|
2298
2479
|
key: 0,
|
|
2299
2480
|
src: t.logo,
|
|
2300
2481
|
alt: "Logo",
|
|
2301
2482
|
class: "h-[23px] w-auto"
|
|
2302
|
-
}, null, 8,
|
|
2303
|
-
|
|
2483
|
+
}, null, 8, ko)) : (f(), g("svg", _o, [...n[0] || (n[0] = [
|
|
2484
|
+
d("path", {
|
|
2304
2485
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2305
2486
|
fill: "#1C64F2"
|
|
2306
2487
|
}, null, -1),
|
|
2307
|
-
|
|
2488
|
+
d("path", {
|
|
2308
2489
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2309
2490
|
fill: "#1C64F2"
|
|
2310
2491
|
}, null, -1),
|
|
2311
|
-
|
|
2492
|
+
d("path", {
|
|
2312
2493
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2313
2494
|
fill: "#1C64F2"
|
|
2314
2495
|
}, null, -1),
|
|
2315
|
-
|
|
2496
|
+
d("path", {
|
|
2316
2497
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2317
2498
|
fill: "#1C64F2"
|
|
2318
2499
|
}, null, -1)
|
|
2319
2500
|
])]))
|
|
2320
2501
|
]),
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2502
|
+
d("div", wo, [
|
|
2503
|
+
n[2] || (n[2] = d("div", { class: "mb-7" }, [
|
|
2504
|
+
d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
2505
|
+
d("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
2325
2506
|
], -1)),
|
|
2326
|
-
v(
|
|
2507
|
+
v(c, {
|
|
2327
2508
|
type: "form",
|
|
2328
2509
|
onSubmit: o,
|
|
2329
2510
|
actions: !1
|
|
2330
2511
|
}, {
|
|
2331
|
-
default:
|
|
2332
|
-
v(
|
|
2512
|
+
default: T(() => [
|
|
2513
|
+
v(c, {
|
|
2333
2514
|
label: "Email",
|
|
2334
2515
|
name: "email",
|
|
2335
2516
|
placeholder: "Enter your email",
|
|
@@ -2337,25 +2518,25 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2337
2518
|
validation: "required|email",
|
|
2338
2519
|
"outer-class": "max-w-full"
|
|
2339
2520
|
}),
|
|
2340
|
-
l.value ? (f(), g("div",
|
|
2341
|
-
|
|
2342
|
-
v(
|
|
2521
|
+
l.value ? (f(), g("div", So, L(l.value), 1)) : C("", !0),
|
|
2522
|
+
r.value ? (f(), g("div", Co, L(r.value), 1)) : C("", !0),
|
|
2523
|
+
v(b(z), {
|
|
2343
2524
|
type: "submit",
|
|
2344
2525
|
size: "xl",
|
|
2345
2526
|
disabled: a.value,
|
|
2346
2527
|
"button-class": "w-full mb-2"
|
|
2347
2528
|
}, {
|
|
2348
|
-
default:
|
|
2349
|
-
a.value ? (f(), g("span",
|
|
2529
|
+
default: T(() => [
|
|
2530
|
+
a.value ? (f(), g("span", To, "Sending...")) : (f(), g("span", $o, "Send reset link"))
|
|
2350
2531
|
]),
|
|
2351
2532
|
_: 1
|
|
2352
2533
|
}, 8, ["disabled"]),
|
|
2353
|
-
v(
|
|
2534
|
+
v(p, {
|
|
2354
2535
|
to: t.loginRoute,
|
|
2355
2536
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
2356
2537
|
}, {
|
|
2357
|
-
default:
|
|
2358
|
-
|
|
2538
|
+
default: T(() => [...n[1] || (n[1] = [
|
|
2539
|
+
F(" Back to login ", -1)
|
|
2359
2540
|
])]),
|
|
2360
2541
|
_: 1
|
|
2361
2542
|
}, 8, ["to"])
|
|
@@ -2366,17 +2547,17 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2366
2547
|
]);
|
|
2367
2548
|
};
|
|
2368
2549
|
}
|
|
2369
|
-
},
|
|
2550
|
+
}, Ho = { class: "h-full grid place-content-center relative" }, Po = { class: "absolute top-8 left-8" }, Vo = ["src"], Ro = {
|
|
2370
2551
|
key: 1,
|
|
2371
2552
|
width: "59",
|
|
2372
2553
|
height: "23",
|
|
2373
2554
|
viewBox: "0 0 59 23",
|
|
2374
2555
|
fill: "none",
|
|
2375
2556
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2376
|
-
},
|
|
2557
|
+
}, Bo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Mo = {
|
|
2377
2558
|
key: 0,
|
|
2378
2559
|
class: "text-red-600 text-sm mb-2"
|
|
2379
|
-
},
|
|
2560
|
+
}, Eo = { key: 0 }, Fo = { key: 1 }, Ao = {
|
|
2380
2561
|
__name: "SparkResetPasswordView",
|
|
2381
2562
|
props: {
|
|
2382
2563
|
logo: {
|
|
@@ -2389,61 +2570,61 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2389
2570
|
}
|
|
2390
2571
|
},
|
|
2391
2572
|
setup(e) {
|
|
2392
|
-
const s =
|
|
2393
|
-
|
|
2573
|
+
const s = q(), t = Q(), a = O(), l = e, r = V(!1), o = V(""), i = async ({ password: n, password_confirmation: c }) => {
|
|
2574
|
+
r.value = !0, o.value = "";
|
|
2394
2575
|
try {
|
|
2395
|
-
await
|
|
2576
|
+
await J.post(a.state.endpoints.passwordReset, {
|
|
2396
2577
|
email: t.query.email,
|
|
2397
2578
|
token: t.query.token,
|
|
2398
|
-
password:
|
|
2399
|
-
password_confirmation:
|
|
2579
|
+
password: n,
|
|
2580
|
+
password_confirmation: c
|
|
2400
2581
|
}), await s.push(l.loginRoute);
|
|
2401
|
-
} catch (
|
|
2402
|
-
o.value =
|
|
2582
|
+
} catch (p) {
|
|
2583
|
+
o.value = p.response?.data?.message || "Failed to reset password.";
|
|
2403
2584
|
} finally {
|
|
2404
|
-
|
|
2585
|
+
r.value = !1;
|
|
2405
2586
|
}
|
|
2406
2587
|
};
|
|
2407
|
-
return (
|
|
2408
|
-
const
|
|
2409
|
-
return f(), g("div",
|
|
2410
|
-
|
|
2588
|
+
return (n, c) => {
|
|
2589
|
+
const p = R("FormKit");
|
|
2590
|
+
return f(), g("div", Ho, [
|
|
2591
|
+
d("div", Po, [
|
|
2411
2592
|
l.logo ? (f(), g("img", {
|
|
2412
2593
|
key: 0,
|
|
2413
2594
|
src: l.logo,
|
|
2414
2595
|
alt: "Logo",
|
|
2415
2596
|
class: "h-[23px] w-auto"
|
|
2416
|
-
}, null, 8,
|
|
2417
|
-
|
|
2597
|
+
}, null, 8, Vo)) : (f(), g("svg", Ro, [...c[0] || (c[0] = [
|
|
2598
|
+
d("path", {
|
|
2418
2599
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2419
2600
|
fill: "#1C64F2"
|
|
2420
2601
|
}, null, -1),
|
|
2421
|
-
|
|
2602
|
+
d("path", {
|
|
2422
2603
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2423
2604
|
fill: "#1C64F2"
|
|
2424
2605
|
}, null, -1),
|
|
2425
|
-
|
|
2606
|
+
d("path", {
|
|
2426
2607
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2427
2608
|
fill: "#1C64F2"
|
|
2428
2609
|
}, null, -1),
|
|
2429
|
-
|
|
2610
|
+
d("path", {
|
|
2430
2611
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2431
2612
|
fill: "#1C64F2"
|
|
2432
2613
|
}, null, -1)
|
|
2433
2614
|
])]))
|
|
2434
2615
|
]),
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2616
|
+
d("div", Bo, [
|
|
2617
|
+
c[1] || (c[1] = d("div", { class: "mb-7" }, [
|
|
2618
|
+
d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
2619
|
+
d("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
2439
2620
|
], -1)),
|
|
2440
|
-
v(
|
|
2621
|
+
v(p, {
|
|
2441
2622
|
type: "form",
|
|
2442
2623
|
onSubmit: i,
|
|
2443
2624
|
actions: !1
|
|
2444
2625
|
}, {
|
|
2445
|
-
default:
|
|
2446
|
-
v(
|
|
2626
|
+
default: T(() => [
|
|
2627
|
+
v(p, {
|
|
2447
2628
|
label: "New Password",
|
|
2448
2629
|
name: "password",
|
|
2449
2630
|
placeholder: "••••••••",
|
|
@@ -2451,7 +2632,7 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2451
2632
|
validation: "required|length:8",
|
|
2452
2633
|
"outer-class": "max-w-full"
|
|
2453
2634
|
}),
|
|
2454
|
-
v(
|
|
2635
|
+
v(p, {
|
|
2455
2636
|
label: "Confirm Password",
|
|
2456
2637
|
name: "password_confirmation",
|
|
2457
2638
|
placeholder: "••••••••",
|
|
@@ -2459,15 +2640,15 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2459
2640
|
validation: "required|confirm:password",
|
|
2460
2641
|
"outer-class": "max-w-full"
|
|
2461
2642
|
}),
|
|
2462
|
-
o.value ? (f(), g("div",
|
|
2463
|
-
v(
|
|
2643
|
+
o.value ? (f(), g("div", Mo, L(o.value), 1)) : C("", !0),
|
|
2644
|
+
v(b(z), {
|
|
2464
2645
|
type: "submit",
|
|
2465
2646
|
size: "xl",
|
|
2466
|
-
disabled:
|
|
2647
|
+
disabled: r.value,
|
|
2467
2648
|
"button-class": "w-full mb-2"
|
|
2468
2649
|
}, {
|
|
2469
|
-
default:
|
|
2470
|
-
|
|
2650
|
+
default: T(() => [
|
|
2651
|
+
r.value ? (f(), g("span", Fo, "Resetting...")) : (f(), g("span", Eo, "Reset password"))
|
|
2471
2652
|
]),
|
|
2472
2653
|
_: 1
|
|
2473
2654
|
}, 8, ["disabled"])
|
|
@@ -2478,14 +2659,14 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2478
2659
|
]);
|
|
2479
2660
|
};
|
|
2480
2661
|
}
|
|
2481
|
-
},
|
|
2662
|
+
}, jo = { class: "h-full grid place-content-center relative" }, Oo = { class: "absolute top-8 left-8" }, zo = ["src"], Io = {
|
|
2482
2663
|
key: 1,
|
|
2483
2664
|
width: "59",
|
|
2484
2665
|
height: "23",
|
|
2485
2666
|
viewBox: "0 0 59 23",
|
|
2486
2667
|
fill: "none",
|
|
2487
2668
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2488
|
-
},
|
|
2669
|
+
}, No = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Do = { class: "flex gap-4 justify-center" }, qo = {
|
|
2489
2670
|
__name: "SparkError403View",
|
|
2490
2671
|
props: {
|
|
2491
2672
|
logo: {
|
|
@@ -2498,52 +2679,52 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2498
2679
|
}
|
|
2499
2680
|
},
|
|
2500
2681
|
setup(e) {
|
|
2501
|
-
const s =
|
|
2682
|
+
const s = q(), t = e, a = () => {
|
|
2502
2683
|
s.push(t.homeRoute);
|
|
2503
2684
|
};
|
|
2504
|
-
return (l,
|
|
2505
|
-
|
|
2685
|
+
return (l, r) => (f(), g("div", jo, [
|
|
2686
|
+
d("div", Oo, [
|
|
2506
2687
|
t.logo ? (f(), g("img", {
|
|
2507
2688
|
key: 0,
|
|
2508
2689
|
src: t.logo,
|
|
2509
2690
|
alt: "Logo",
|
|
2510
2691
|
class: "h-[23px] w-auto"
|
|
2511
|
-
}, null, 8,
|
|
2512
|
-
|
|
2692
|
+
}, null, 8, zo)) : (f(), g("svg", Io, [...r[0] || (r[0] = [
|
|
2693
|
+
d("path", {
|
|
2513
2694
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2514
2695
|
fill: "#1C64F2"
|
|
2515
2696
|
}, null, -1),
|
|
2516
|
-
|
|
2697
|
+
d("path", {
|
|
2517
2698
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2518
2699
|
fill: "#1C64F2"
|
|
2519
2700
|
}, null, -1),
|
|
2520
|
-
|
|
2701
|
+
d("path", {
|
|
2521
2702
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2522
2703
|
fill: "#1C64F2"
|
|
2523
2704
|
}, null, -1),
|
|
2524
|
-
|
|
2705
|
+
d("path", {
|
|
2525
2706
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2526
2707
|
fill: "#1C64F2"
|
|
2527
2708
|
}, null, -1)
|
|
2528
2709
|
])]))
|
|
2529
2710
|
]),
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2711
|
+
d("div", No, [
|
|
2712
|
+
r[2] || (r[2] = d("div", null, [
|
|
2713
|
+
d("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
2714
|
+
d("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
2715
|
+
d("p", { class: "text-gray-600" }, [
|
|
2716
|
+
F(" You don't have permission to access this resource."),
|
|
2717
|
+
d("br"),
|
|
2718
|
+
F(" If you believe this is an error, please contact your administrator. ")
|
|
2538
2719
|
])
|
|
2539
2720
|
], -1)),
|
|
2540
|
-
|
|
2541
|
-
v(
|
|
2721
|
+
d("div", Do, [
|
|
2722
|
+
v(b(z), {
|
|
2542
2723
|
onClick: a,
|
|
2543
2724
|
size: "lg"
|
|
2544
2725
|
}, {
|
|
2545
|
-
default:
|
|
2546
|
-
|
|
2726
|
+
default: T(() => [...r[1] || (r[1] = [
|
|
2727
|
+
F(" Go to Home ", -1)
|
|
2547
2728
|
])]),
|
|
2548
2729
|
_: 1
|
|
2549
2730
|
})
|
|
@@ -2551,14 +2732,14 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2551
2732
|
])
|
|
2552
2733
|
]));
|
|
2553
2734
|
}
|
|
2554
|
-
},
|
|
2735
|
+
}, Zo = { class: "h-full grid place-content-center relative" }, Ko = { class: "absolute top-8 left-8" }, Uo = ["src"], Go = {
|
|
2555
2736
|
key: 1,
|
|
2556
2737
|
width: "59",
|
|
2557
2738
|
height: "23",
|
|
2558
2739
|
viewBox: "0 0 59 23",
|
|
2559
2740
|
fill: "none",
|
|
2560
2741
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2561
|
-
},
|
|
2742
|
+
}, Wo = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Yo = { class: "flex gap-4 justify-center" }, Xo = {
|
|
2562
2743
|
__name: "SparkError404View",
|
|
2563
2744
|
props: {
|
|
2564
2745
|
logo: {
|
|
@@ -2571,48 +2752,48 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2571
2752
|
}
|
|
2572
2753
|
},
|
|
2573
2754
|
setup(e) {
|
|
2574
|
-
const s =
|
|
2755
|
+
const s = q(), t = e, a = () => {
|
|
2575
2756
|
s.push(t.homeRoute);
|
|
2576
2757
|
};
|
|
2577
|
-
return (l,
|
|
2578
|
-
|
|
2758
|
+
return (l, r) => (f(), g("div", Zo, [
|
|
2759
|
+
d("div", Ko, [
|
|
2579
2760
|
t.logo ? (f(), g("img", {
|
|
2580
2761
|
key: 0,
|
|
2581
2762
|
src: t.logo,
|
|
2582
2763
|
alt: "Logo",
|
|
2583
2764
|
class: "h-[23px] w-auto"
|
|
2584
|
-
}, null, 8,
|
|
2585
|
-
|
|
2765
|
+
}, null, 8, Uo)) : (f(), g("svg", Go, [...r[0] || (r[0] = [
|
|
2766
|
+
d("path", {
|
|
2586
2767
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2587
2768
|
fill: "#1C64F2"
|
|
2588
2769
|
}, null, -1),
|
|
2589
|
-
|
|
2770
|
+
d("path", {
|
|
2590
2771
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2591
2772
|
fill: "#1C64F2"
|
|
2592
2773
|
}, null, -1),
|
|
2593
|
-
|
|
2774
|
+
d("path", {
|
|
2594
2775
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2595
2776
|
fill: "#1C64F2"
|
|
2596
2777
|
}, null, -1),
|
|
2597
|
-
|
|
2778
|
+
d("path", {
|
|
2598
2779
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2599
2780
|
fill: "#1C64F2"
|
|
2600
2781
|
}, null, -1)
|
|
2601
2782
|
])]))
|
|
2602
2783
|
]),
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2784
|
+
d("div", Wo, [
|
|
2785
|
+
r[2] || (r[2] = d("div", null, [
|
|
2786
|
+
d("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
2787
|
+
d("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
2788
|
+
d("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
2608
2789
|
], -1)),
|
|
2609
|
-
|
|
2610
|
-
v(
|
|
2790
|
+
d("div", Yo, [
|
|
2791
|
+
v(b(z), {
|
|
2611
2792
|
onClick: a,
|
|
2612
2793
|
size: "lg"
|
|
2613
2794
|
}, {
|
|
2614
|
-
default:
|
|
2615
|
-
|
|
2795
|
+
default: T(() => [...r[1] || (r[1] = [
|
|
2796
|
+
F(" Go to Home ", -1)
|
|
2616
2797
|
])]),
|
|
2617
2798
|
_: 1
|
|
2618
2799
|
})
|
|
@@ -2620,14 +2801,14 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2620
2801
|
])
|
|
2621
2802
|
]));
|
|
2622
2803
|
}
|
|
2623
|
-
},
|
|
2804
|
+
}, Jo = { class: "h-full grid place-content-center relative" }, Qo = { class: "absolute top-8 left-8" }, er = ["src"], tr = {
|
|
2624
2805
|
key: 1,
|
|
2625
2806
|
width: "59",
|
|
2626
2807
|
height: "23",
|
|
2627
2808
|
viewBox: "0 0 59 23",
|
|
2628
2809
|
fill: "none",
|
|
2629
2810
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2630
|
-
},
|
|
2811
|
+
}, sr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, ar = { class: "text-primary-600 text-7xl font-bold mb-4" }, or = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, rr = { class: "text-gray-600" }, nr = { class: "flex gap-4 justify-center" }, Er = {
|
|
2631
2812
|
__name: "SparkErrorGeneralView",
|
|
2632
2813
|
props: {
|
|
2633
2814
|
logo: {
|
|
@@ -2652,48 +2833,48 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2652
2833
|
}
|
|
2653
2834
|
},
|
|
2654
2835
|
setup(e) {
|
|
2655
|
-
const s =
|
|
2836
|
+
const s = q(), t = e, a = () => {
|
|
2656
2837
|
s.push(t.homeRoute);
|
|
2657
2838
|
};
|
|
2658
|
-
return (l,
|
|
2659
|
-
|
|
2839
|
+
return (l, r) => (f(), g("div", Jo, [
|
|
2840
|
+
d("div", Qo, [
|
|
2660
2841
|
t.logo ? (f(), g("img", {
|
|
2661
2842
|
key: 0,
|
|
2662
2843
|
src: t.logo,
|
|
2663
2844
|
alt: "Logo",
|
|
2664
2845
|
class: "h-[23px] w-auto"
|
|
2665
|
-
}, null, 8,
|
|
2666
|
-
|
|
2846
|
+
}, null, 8, er)) : (f(), g("svg", tr, [...r[0] || (r[0] = [
|
|
2847
|
+
d("path", {
|
|
2667
2848
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2668
2849
|
fill: "#1C64F2"
|
|
2669
2850
|
}, null, -1),
|
|
2670
|
-
|
|
2851
|
+
d("path", {
|
|
2671
2852
|
d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
|
|
2672
2853
|
fill: "#1C64F2"
|
|
2673
2854
|
}, null, -1),
|
|
2674
|
-
|
|
2855
|
+
d("path", {
|
|
2675
2856
|
d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
|
|
2676
2857
|
fill: "#1C64F2"
|
|
2677
2858
|
}, null, -1),
|
|
2678
|
-
|
|
2859
|
+
d("path", {
|
|
2679
2860
|
d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
|
|
2680
2861
|
fill: "#1C64F2"
|
|
2681
2862
|
}, null, -1)
|
|
2682
2863
|
])]))
|
|
2683
2864
|
]),
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2865
|
+
d("div", sr, [
|
|
2866
|
+
d("div", null, [
|
|
2867
|
+
d("div", ar, L(t.errorCode || "Error"), 1),
|
|
2868
|
+
d("h1", or, L(t.title || "Something went wrong"), 1),
|
|
2869
|
+
d("p", rr, L(t.message || "An unexpected error occurred. Please try again later."), 1)
|
|
2689
2870
|
]),
|
|
2690
|
-
|
|
2691
|
-
v(
|
|
2871
|
+
d("div", nr, [
|
|
2872
|
+
v(b(z), {
|
|
2692
2873
|
onClick: a,
|
|
2693
2874
|
size: "lg"
|
|
2694
2875
|
}, {
|
|
2695
|
-
default:
|
|
2696
|
-
|
|
2876
|
+
default: T(() => [...r[1] || (r[1] = [
|
|
2877
|
+
F(" Go to Home ", -1)
|
|
2697
2878
|
])]),
|
|
2698
2879
|
_: 1
|
|
2699
2880
|
})
|
|
@@ -2702,60 +2883,60 @@ const re = "bolt-next-token", M = X("auth", () => {
|
|
|
2702
2883
|
]));
|
|
2703
2884
|
}
|
|
2704
2885
|
};
|
|
2705
|
-
function
|
|
2886
|
+
function Fr(e = {}) {
|
|
2706
2887
|
const {
|
|
2707
2888
|
loginPath: s = "/login",
|
|
2708
2889
|
logoutPath: t = "/logout",
|
|
2709
2890
|
forgotPasswordPath: a = "/forgot-password",
|
|
2710
2891
|
resetPasswordPath: l = "/password/reset",
|
|
2711
|
-
logo:
|
|
2892
|
+
logo: r = "",
|
|
2712
2893
|
defaultRedirect: o = "/dashboard"
|
|
2713
2894
|
} = e;
|
|
2714
2895
|
return [
|
|
2715
2896
|
{
|
|
2716
2897
|
path: s,
|
|
2717
2898
|
name: "login",
|
|
2718
|
-
component:
|
|
2719
|
-
props: { logo:
|
|
2899
|
+
component: yo,
|
|
2900
|
+
props: { logo: r, defaultRedirect: o },
|
|
2720
2901
|
meta: { auth: !1 }
|
|
2721
2902
|
},
|
|
2722
2903
|
{
|
|
2723
2904
|
path: t,
|
|
2724
2905
|
name: "logout",
|
|
2725
|
-
component:
|
|
2906
|
+
component: bo,
|
|
2726
2907
|
props: { defaultRedirect: s },
|
|
2727
2908
|
meta: { auth: !1 }
|
|
2728
2909
|
},
|
|
2729
2910
|
{
|
|
2730
2911
|
path: a,
|
|
2731
2912
|
name: "forgot-password",
|
|
2732
|
-
component:
|
|
2733
|
-
props: { logo:
|
|
2913
|
+
component: Lo,
|
|
2914
|
+
props: { logo: r, loginRoute: s },
|
|
2734
2915
|
meta: { auth: !1 }
|
|
2735
2916
|
},
|
|
2736
2917
|
{
|
|
2737
2918
|
path: l,
|
|
2738
2919
|
name: "password-reset",
|
|
2739
|
-
component:
|
|
2740
|
-
props: { logo:
|
|
2920
|
+
component: Ao,
|
|
2921
|
+
props: { logo: r, loginRoute: s },
|
|
2741
2922
|
meta: { auth: !1 }
|
|
2742
2923
|
}
|
|
2743
2924
|
];
|
|
2744
2925
|
}
|
|
2745
|
-
function
|
|
2926
|
+
function Ar(e, s = {}) {
|
|
2746
2927
|
const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
|
|
2747
|
-
e.beforeEach(async (a, l,
|
|
2748
|
-
const o =
|
|
2749
|
-
o.state.ready || await o.fetchUser(),
|
|
2928
|
+
e.beforeEach(async (a, l, r) => {
|
|
2929
|
+
const o = O();
|
|
2930
|
+
o.state.ready || await o.fetchUser(), lr(a, r, o, t);
|
|
2750
2931
|
});
|
|
2751
2932
|
}
|
|
2752
|
-
function
|
|
2753
|
-
const l = e.meta.auth !== !1,
|
|
2933
|
+
function lr(e, s, t, a) {
|
|
2934
|
+
const l = e.meta.auth !== !1, r = t.check;
|
|
2754
2935
|
if (t.state.overrideToken && e.path === "/logout") {
|
|
2755
2936
|
s({ path: a });
|
|
2756
2937
|
return;
|
|
2757
2938
|
}
|
|
2758
|
-
if (!
|
|
2939
|
+
if (!r) {
|
|
2759
2940
|
if (!l) {
|
|
2760
2941
|
if (e.path === "/logout") {
|
|
2761
2942
|
s({ path: t.state.routes.auth });
|
|
@@ -2775,7 +2956,7 @@ function Xo(e, s, t, a) {
|
|
|
2775
2956
|
});
|
|
2776
2957
|
return;
|
|
2777
2958
|
}
|
|
2778
|
-
if (
|
|
2959
|
+
if (r) {
|
|
2779
2960
|
if (!l && e.path === t.state.routes.auth) {
|
|
2780
2961
|
s({ path: a });
|
|
2781
2962
|
return;
|
|
@@ -2787,7 +2968,7 @@ function Xo(e, s, t, a) {
|
|
|
2787
2968
|
s();
|
|
2788
2969
|
}
|
|
2789
2970
|
}
|
|
2790
|
-
function
|
|
2971
|
+
function jr(e = {}) {
|
|
2791
2972
|
const {
|
|
2792
2973
|
forbiddenPath: s = "/error/403",
|
|
2793
2974
|
logo: t = "",
|
|
@@ -2796,12 +2977,12 @@ function Hr(e = {}) {
|
|
|
2796
2977
|
return {
|
|
2797
2978
|
path: s,
|
|
2798
2979
|
name: "error-403",
|
|
2799
|
-
component:
|
|
2980
|
+
component: qo,
|
|
2800
2981
|
props: { logo: t, homeRoute: a },
|
|
2801
2982
|
meta: { auth: !1 }
|
|
2802
2983
|
};
|
|
2803
2984
|
}
|
|
2804
|
-
function
|
|
2985
|
+
function Or(e = {}) {
|
|
2805
2986
|
const {
|
|
2806
2987
|
logo: s = "",
|
|
2807
2988
|
homeRoute: t = "/dashboard"
|
|
@@ -2809,21 +2990,21 @@ function Tr(e = {}) {
|
|
|
2809
2990
|
return {
|
|
2810
2991
|
path: "/:pathMatch(.*)*",
|
|
2811
2992
|
name: "error-404",
|
|
2812
|
-
component:
|
|
2993
|
+
component: Xo,
|
|
2813
2994
|
props: { logo: s, homeRoute: t },
|
|
2814
2995
|
meta: { auth: !1 }
|
|
2815
2996
|
};
|
|
2816
2997
|
}
|
|
2817
|
-
function
|
|
2998
|
+
function zr(e, s) {
|
|
2818
2999
|
e.beforeResolve(async (t) => {
|
|
2819
3000
|
if (t.meta.auth !== !1) {
|
|
2820
|
-
const a =
|
|
3001
|
+
const a = O();
|
|
2821
3002
|
a.state.ready && a.check && await s();
|
|
2822
3003
|
}
|
|
2823
3004
|
});
|
|
2824
3005
|
}
|
|
2825
|
-
function
|
|
2826
|
-
const s =
|
|
3006
|
+
function ir(e = {}) {
|
|
3007
|
+
const s = J.create({
|
|
2827
3008
|
baseURL: e.baseURL || "",
|
|
2828
3009
|
timeout: e.timeout || 3e4,
|
|
2829
3010
|
headers: {
|
|
@@ -2834,7 +3015,7 @@ function Jo(e = {}) {
|
|
|
2834
3015
|
return s.interceptors.request.use(
|
|
2835
3016
|
(t) => {
|
|
2836
3017
|
try {
|
|
2837
|
-
const a =
|
|
3018
|
+
const a = O();
|
|
2838
3019
|
a.state.overrideToken ? t.headers.Authorization = `Bearer ${a.state.overrideToken}` : a.state.token && (t.headers.Authorization = `Bearer ${a.state.token}`);
|
|
2839
3020
|
} catch {
|
|
2840
3021
|
}
|
|
@@ -2846,14 +3027,14 @@ function Jo(e = {}) {
|
|
|
2846
3027
|
async (t) => {
|
|
2847
3028
|
if (t.response?.status === 401)
|
|
2848
3029
|
try {
|
|
2849
|
-
const a =
|
|
3030
|
+
const a = O();
|
|
2850
3031
|
await a.logout(), window.location.href = a.state.routes.auth;
|
|
2851
3032
|
} catch (a) {
|
|
2852
3033
|
console.error("Error during auto-logout:", a), window.location.href = "/login";
|
|
2853
3034
|
}
|
|
2854
3035
|
if (t.response?.status === 403)
|
|
2855
3036
|
try {
|
|
2856
|
-
const a =
|
|
3037
|
+
const a = O();
|
|
2857
3038
|
window.location.href = a.state.routes.forbidden;
|
|
2858
3039
|
} catch (a) {
|
|
2859
3040
|
console.error("Error during 403 redirect:", a), window.location.href = "/error/403";
|
|
@@ -2862,123 +3043,124 @@ function Jo(e = {}) {
|
|
|
2862
3043
|
}
|
|
2863
3044
|
), s;
|
|
2864
3045
|
}
|
|
2865
|
-
let
|
|
2866
|
-
function
|
|
2867
|
-
return
|
|
3046
|
+
let X = null;
|
|
3047
|
+
function Ir(e, s = {}) {
|
|
3048
|
+
return X = ir(s), e.provide("axios", X), e.config.globalProperties.$axios = X, X;
|
|
2868
3049
|
}
|
|
2869
|
-
function
|
|
2870
|
-
if (!
|
|
3050
|
+
function Nr() {
|
|
3051
|
+
if (!X)
|
|
2871
3052
|
throw new Error("Axios instance not initialized. Call setupAxios() first.");
|
|
2872
|
-
return
|
|
3053
|
+
return X;
|
|
2873
3054
|
}
|
|
2874
|
-
const
|
|
2875
|
-
const e =
|
|
3055
|
+
const Dr = ae("sparkNav", () => {
|
|
3056
|
+
const e = D({
|
|
2876
3057
|
menu: [],
|
|
2877
3058
|
collapsed: !1,
|
|
2878
3059
|
hidden: !1
|
|
2879
|
-
}), s =
|
|
2880
|
-
e.menu =
|
|
2881
|
-
}, l = (
|
|
2882
|
-
for (const u of
|
|
2883
|
-
if (u.href ===
|
|
3060
|
+
}), s = q(), t = Q(), a = (c = []) => {
|
|
3061
|
+
e.menu = c, n();
|
|
3062
|
+
}, l = (c, p) => {
|
|
3063
|
+
for (const u of c) {
|
|
3064
|
+
if (u.href === p) return u;
|
|
2884
3065
|
if (u.children) {
|
|
2885
|
-
const
|
|
2886
|
-
if (
|
|
3066
|
+
const y = l(u.children, p);
|
|
3067
|
+
if (y) return y;
|
|
2887
3068
|
}
|
|
2888
3069
|
}
|
|
2889
3070
|
return null;
|
|
2890
|
-
},
|
|
2891
|
-
if (
|
|
2892
|
-
const
|
|
2893
|
-
if (
|
|
2894
|
-
|
|
3071
|
+
}, r = async (c) => {
|
|
3072
|
+
if (c) {
|
|
3073
|
+
const p = l(e.menu, c);
|
|
3074
|
+
if (p && typeof p.action == "function") {
|
|
3075
|
+
p.action();
|
|
2895
3076
|
return;
|
|
2896
3077
|
}
|
|
2897
|
-
await s.push(
|
|
3078
|
+
await s.push(c);
|
|
2898
3079
|
}
|
|
2899
3080
|
}, o = () => {
|
|
2900
3081
|
e.collapsed = !e.collapsed;
|
|
2901
3082
|
}, i = () => {
|
|
2902
3083
|
e.hidden = !e.hidden;
|
|
2903
|
-
},
|
|
2904
|
-
const
|
|
2905
|
-
if (
|
|
2906
|
-
const
|
|
2907
|
-
u.forEach((
|
|
2908
|
-
|
|
3084
|
+
}, n = () => {
|
|
3085
|
+
const c = t.name || t.path.replace("/", "");
|
|
3086
|
+
if (c) {
|
|
3087
|
+
const p = (u) => {
|
|
3088
|
+
u.forEach((y) => {
|
|
3089
|
+
y.current = y.href === c, y.children && p(y.children);
|
|
2909
3090
|
});
|
|
2910
3091
|
};
|
|
2911
|
-
|
|
3092
|
+
p(e.menu);
|
|
2912
3093
|
}
|
|
2913
3094
|
};
|
|
2914
|
-
return
|
|
3095
|
+
return A(
|
|
2915
3096
|
() => t.path,
|
|
2916
3097
|
() => {
|
|
2917
|
-
|
|
3098
|
+
n();
|
|
2918
3099
|
},
|
|
2919
3100
|
{ immediate: !0 }
|
|
2920
3101
|
), {
|
|
2921
3102
|
state: e,
|
|
2922
3103
|
initialize: a,
|
|
2923
|
-
goto:
|
|
3104
|
+
goto: r,
|
|
2924
3105
|
toggleCollapsed: o,
|
|
2925
3106
|
toggleHidden: i,
|
|
2926
|
-
syncWithRoute:
|
|
3107
|
+
syncWithRoute: n
|
|
2927
3108
|
};
|
|
2928
3109
|
});
|
|
2929
3110
|
export {
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
3111
|
+
B as Icons,
|
|
3112
|
+
Lr as SparkAlert,
|
|
3113
|
+
os as SparkAppSelector,
|
|
3114
|
+
xs as SparkBrandSelector,
|
|
3115
|
+
z as SparkButton,
|
|
3116
|
+
_s as SparkButtonGroup,
|
|
3117
|
+
Hr as SparkCard,
|
|
3118
|
+
Rr as SparkDefaultContainer,
|
|
3119
|
+
qo as SparkError403View,
|
|
3120
|
+
Xo as SparkError404View,
|
|
3121
|
+
Er as SparkErrorGeneralView,
|
|
3122
|
+
Lo as SparkForgotPasswordView,
|
|
3123
|
+
yo as SparkLoginView,
|
|
3124
|
+
bo as SparkLogoutView,
|
|
3125
|
+
Hs as SparkModalContainer,
|
|
3126
|
+
Pr as SparkModalDialog,
|
|
3127
|
+
ge as SparkOverlay,
|
|
3128
|
+
Br as SparkPublicContainer,
|
|
3129
|
+
Ao as SparkResetPasswordView,
|
|
3130
|
+
Vr as SparkTable,
|
|
3131
|
+
_a as SparkTableDatePicker,
|
|
3132
|
+
va as SparkTableFilterButtons,
|
|
3133
|
+
ga as SparkTableFilterSelect,
|
|
3134
|
+
na as SparkTablePaginationPaging,
|
|
3135
|
+
ca as SparkTablePaginationPerPage,
|
|
3136
|
+
$a as SparkTableReset,
|
|
3137
|
+
pa as SparkTableSearch,
|
|
3138
|
+
be as SparkTableToolbar,
|
|
3139
|
+
$r as addIcons,
|
|
3140
|
+
jr as create403Route,
|
|
3141
|
+
Or as create404Route,
|
|
3142
|
+
Fr as createAuthRoutes,
|
|
3143
|
+
ir as createAxiosInstance,
|
|
3144
|
+
Mr as createBootstrapService,
|
|
3145
|
+
As as customiseHeader,
|
|
3146
|
+
so as deleteCookie,
|
|
3147
|
+
Nr as getAxiosInstance,
|
|
3148
|
+
eo as getCookie,
|
|
3149
|
+
Be as getDomain,
|
|
3150
|
+
Bs as renderHeaderTitle,
|
|
3151
|
+
to as setCookie,
|
|
3152
|
+
Ar as setupAuthGuards,
|
|
3153
|
+
Ir as setupAxios,
|
|
3154
|
+
zr as setupBootstrapGuard,
|
|
3155
|
+
Tr as setupFontAwesome,
|
|
3156
|
+
ee as sparkModalService,
|
|
3157
|
+
Y as sparkOverlayService,
|
|
3158
|
+
Us as updateRow,
|
|
3159
|
+
Pe as useSparkAppSelectorStore,
|
|
3160
|
+
Ve as useSparkAppStore,
|
|
3161
|
+
O as useSparkAuthStore,
|
|
3162
|
+
Re as useSparkBrandFilterStore,
|
|
3163
|
+
Dr as useSparkNavStore,
|
|
3164
|
+
xe as useSparkOverlay,
|
|
3165
|
+
Gs as useSparkTableRouteSync
|
|
2984
3166
|
};
|