mgv-backoffice 1.0.13 → 1.2.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/README.md +735 -70
- package/dist/index.d.ts +1 -27
- package/dist/{components → src/components}/BaseAlert.vue.d.ts +2 -2
- package/dist/src/components/BaseAppLayout.vue.d.ts +31 -0
- package/dist/{components → src/components}/BaseButton.vue.d.ts +5 -2
- package/dist/src/components/BaseCollapsibleSection.vue.d.ts +35 -0
- package/dist/src/components/BaseConfirmModal.vue.d.ts +23 -0
- package/dist/src/components/BaseEntityPickerModal.vue.d.ts +58 -0
- package/dist/{components → src/components}/BaseLogo.vue.d.ts +3 -3
- package/dist/{components → src/components}/BaseModal.vue.d.ts +4 -3
- package/dist/src/components/BaseModalShell.vue.d.ts +43 -0
- package/dist/src/components/BaseNotFoundPage.vue.d.ts +17 -0
- package/dist/src/components/BaseSidebar.vue.d.ts +46 -0
- package/dist/src/components/BaseTextInputModal.vue.d.ts +46 -0
- package/dist/{components → src/components}/BaseToast.vue.d.ts +14 -2
- package/dist/{components → src/components}/Pagination.vue.d.ts +0 -3
- package/dist/src/composables/useDebounce.d.ts +10 -0
- package/dist/src/composables/useEscapeKey.d.ts +6 -0
- package/dist/src/composables/useMobileSidebar.d.ts +6 -0
- package/dist/src/composables/useTheme.d.ts +19 -0
- package/dist/src/composables/useThemeClasses.d.ts +62 -0
- package/dist/src/composables/useToast.d.ts +19 -0
- package/dist/{enums → src/enums}/AlertEnum.d.ts +1 -1
- package/dist/{enums → src/enums}/BaseButtonSizeEnum.d.ts +1 -1
- package/dist/src/enums/BaseLogoEnum.d.ts +7 -0
- package/dist/src/index.d.ts +46 -0
- package/dist/src/types/entityPicker.d.ts +11 -0
- package/dist/src/types/sidebar.d.ts +22 -0
- package/dist/src/utils/httpColors.d.ts +19 -0
- package/dist/ui-lib.css +3 -0
- package/dist/ui-lib.js +1624 -1011
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +14 -14
- package/src/components/BaseAlert.vue +2 -2
- package/src/components/BaseAppLayout.vue +65 -0
- package/src/components/BaseBreadcrumb.vue +2 -1
- package/src/components/BaseButton.vue +152 -132
- package/src/components/BaseCollapsibleSection.vue +107 -0
- package/src/components/BaseConfirmModal.vue +110 -0
- package/src/components/BaseEntityPickerModal.vue +330 -0
- package/src/components/BaseLogo.vue +5 -5
- package/src/components/BaseModal.vue +95 -75
- package/src/components/BaseModalShell.vue +115 -0
- package/src/components/BaseNotFoundPage.vue +51 -0
- package/src/components/BaseSidebar.vue +223 -0
- package/src/components/BaseTextInputModal.vue +144 -0
- package/src/components/BaseToast.vue +41 -20
- package/src/components/ColoredSquares.vue +2 -4
- package/src/components/Pagination.vue +137 -136
- package/src/components/TrendArrow.vue +1 -1
- package/src/composables/useDebounce.ts +32 -0
- package/src/composables/useEscapeKey.ts +15 -0
- package/src/composables/useMobileSidebar.ts +23 -0
- package/src/composables/useTheme.ts +69 -0
- package/src/composables/useThemeClasses.ts +133 -0
- package/src/composables/useToast.ts +56 -0
- package/src/enums/AlertEnum.ts +1 -1
- package/src/enums/BaseButtonSizeEnum.ts +1 -1
- package/src/enums/BaseLogoEnum.ts +4 -1
- package/src/index.ts +64 -36
- package/src/types/entityPicker.ts +11 -0
- package/src/types/sidebar.ts +24 -0
- package/src/utils/httpColors.ts +68 -0
- package/src/utils/util.ts +61 -53
- package/dist/enums/BaseLogoEnum.d.ts +0 -5
- package/dist/style.css +0 -1
- /package/dist/{components → src/components}/BaseBadge.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseBreadcrumb.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseLine.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseRow.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseSpinner.vue.d.ts +0 -0
- /package/dist/{components → src/components}/ColoredSquares.vue.d.ts +0 -0
- /package/dist/{components → src/components}/EarningsCard.vue.d.ts +0 -0
- /package/dist/{components → src/components}/EuroAmount.vue.d.ts +0 -0
- /package/dist/{components → src/components}/TrendArrow.vue.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseBadgeEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseButtonEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseModalEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseToastEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/ColorsEnums.d.ts +0 -0
- /package/dist/{enums → src/enums}/LineEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/PositioningEnum.d.ts +0 -0
- /package/dist/{utils → src/utils}/util.d.ts +0 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,1016 +1,1629 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, nextTick as d, normalizeClass as f, onBeforeUnmount as p, onMounted as m, onScopeDispose as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useSlots as T, vModelText as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
|
|
2
|
+
import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as P, DocumentDuplicateIcon as re, ExclamationCircleIcon as ie, ExclamationTriangleIcon as ae, FolderIcon as oe, InformationCircleIcon as se, MagnifyingGlassIcon as ce, XMarkIcon as F } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as le } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as ue, useRouter as de } from "vue-router";
|
|
5
|
+
//#region src/enums/AlertEnum.ts
|
|
6
|
+
var I = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
+
}({}), L = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
10
|
+
}({});
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/utils/util.ts
|
|
13
|
+
function fe(e) {
|
|
14
|
+
let t = "red";
|
|
15
|
+
switch (e) {
|
|
16
|
+
case I.ERROR:
|
|
17
|
+
t = "red";
|
|
18
|
+
break;
|
|
19
|
+
case I.SUCCESS:
|
|
20
|
+
t = "green";
|
|
21
|
+
break;
|
|
22
|
+
case I.INFO:
|
|
23
|
+
t = "gray";
|
|
24
|
+
break;
|
|
25
|
+
case I.WARNING:
|
|
26
|
+
t = "yellow";
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
22
30
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
function pe(e) {
|
|
32
|
+
let t = "red";
|
|
33
|
+
switch (e) {
|
|
34
|
+
case L.GREEN:
|
|
35
|
+
t = "green";
|
|
36
|
+
break;
|
|
37
|
+
case L.RED:
|
|
38
|
+
t = "red";
|
|
39
|
+
break;
|
|
40
|
+
case L.BLUE:
|
|
41
|
+
t = "blue";
|
|
42
|
+
break;
|
|
43
|
+
case L.YELLOW:
|
|
44
|
+
t = "yellow";
|
|
45
|
+
break;
|
|
46
|
+
case L.BLACK:
|
|
47
|
+
t = "black";
|
|
48
|
+
break;
|
|
49
|
+
case L.GRAY:
|
|
50
|
+
t = "gray";
|
|
51
|
+
break;
|
|
52
|
+
case L.NONE:
|
|
53
|
+
t = "";
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
48
57
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
60
|
+
var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
61
|
+
__name: "BaseAlert",
|
|
62
|
+
props: {
|
|
63
|
+
title: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: !1,
|
|
66
|
+
default: ""
|
|
67
|
+
},
|
|
68
|
+
color: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: !1,
|
|
71
|
+
default: I.ERROR
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
setup(e) {
|
|
75
|
+
let t = e;
|
|
76
|
+
function n() {
|
|
77
|
+
let e = fe(t.color);
|
|
78
|
+
return "flex items-center p-4 mb-4 text-sm text-" + e + "-800 border border-" + e + "-300 rounded-lg bg-" + e + "-50 dark:bg-gray-800 dark:text-" + e + "-400 dark:border-" + e + "-800";
|
|
79
|
+
}
|
|
80
|
+
return (t, r) => (_(), a("div", {
|
|
81
|
+
class: f(n()),
|
|
82
|
+
role: "alert"
|
|
83
|
+
}, [c(w(se), { class: "w-6 h-6 text-gray-400" }), o("div", null, [o("span", me, C(e.title), 1)])], 2));
|
|
84
|
+
}
|
|
85
|
+
}), ge = "bg-red-100 text-red-700 border-red-200", R = /* @__PURE__ */ l({
|
|
86
|
+
__name: "BaseBadge",
|
|
87
|
+
props: { color: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: !1
|
|
90
|
+
} },
|
|
91
|
+
setup(e) {
|
|
92
|
+
let t = T(), r = n(() => !!t.default), o = e, s = {
|
|
93
|
+
[L.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
94
|
+
[L.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
95
|
+
[L.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
96
|
+
[L.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
97
|
+
[L.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
98
|
+
[L.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
99
|
+
}, c = n(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${o.color && s[o.color] || ge}`);
|
|
100
|
+
return (e, t) => r.value ? (_(), a("span", {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: f(c.value)
|
|
103
|
+
}, [b(e.$slots, "default")], 2)) : i("", !0);
|
|
104
|
+
}
|
|
105
|
+
}), _e = {
|
|
106
|
+
class: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700",
|
|
107
|
+
"aria-label": "Breadcrumb"
|
|
108
|
+
}, ve = { class: "inline-flex items-center space-x-1 md:space-x-3" }, ye = {
|
|
109
|
+
class: "inline-flex items-center",
|
|
110
|
+
style: { "margin-left": "0" }
|
|
111
|
+
}, be = /* @__PURE__ */ l({
|
|
112
|
+
__name: "BaseBreadcrumb",
|
|
113
|
+
props: {
|
|
114
|
+
items: {
|
|
115
|
+
type: Array,
|
|
116
|
+
required: !1,
|
|
117
|
+
default: void 0
|
|
118
|
+
},
|
|
119
|
+
path: {
|
|
120
|
+
type: String,
|
|
121
|
+
required: !1,
|
|
122
|
+
default: void 0
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
setup(t) {
|
|
126
|
+
let r = t, i = n(() => {
|
|
127
|
+
if (r.items && r.items.length > 0) return r.items;
|
|
128
|
+
let e = (r.path ?? (typeof window < "u" ? window.location.pathname : "/")).split("/").filter((e) => e !== ""), t = "";
|
|
129
|
+
return e.map((e) => (t += "/" + e, {
|
|
130
|
+
name: Number.isNaN(Number(e)) ? (e.charAt(0).toUpperCase() + e.slice(1)).replaceAll("-", " ") : e,
|
|
131
|
+
url: t
|
|
132
|
+
}));
|
|
133
|
+
});
|
|
134
|
+
return (t, n) => {
|
|
135
|
+
let r = x("router-link");
|
|
136
|
+
return _(), a("nav", _e, [o("ol", ve, [o("li", ye, [c(r, {
|
|
137
|
+
to: "/",
|
|
138
|
+
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"
|
|
139
|
+
}, {
|
|
140
|
+
default: k(() => [c(w(le), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= s(" Home ", -1)]),
|
|
141
|
+
_: 1
|
|
142
|
+
})]), (_(!0), a(e, null, y(i.value, (e, t) => (_(), a("li", {
|
|
143
|
+
key: t,
|
|
144
|
+
class: "inline-flex items-center",
|
|
145
|
+
style: { "margin-left": "0" }
|
|
146
|
+
}, [c(w(P), { class: "h-4 w-4 text-gray-500" }), c(r, {
|
|
147
|
+
to: e.url,
|
|
148
|
+
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white"
|
|
149
|
+
}, {
|
|
150
|
+
default: k(() => [s(C(e.name), 1)]),
|
|
151
|
+
_: 2
|
|
152
|
+
}, 1032, ["to"])]))), 128))])]);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}), z = /* @__PURE__ */ function(e) {
|
|
156
|
+
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e;
|
|
157
|
+
}({}), B = /* @__PURE__ */ function(e) {
|
|
158
|
+
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
159
|
+
}({}), xe = [
|
|
160
|
+
"type",
|
|
161
|
+
"disabled",
|
|
162
|
+
"onClick"
|
|
163
|
+
], Se = {
|
|
164
|
+
key: 0,
|
|
165
|
+
class: "inline-flex items-center"
|
|
166
|
+
}, Ce = { key: 1 }, we = { key: 2 }, Te = ["type", "disabled"], Ee = {
|
|
167
|
+
key: 0,
|
|
168
|
+
class: "inline-flex items-center"
|
|
169
|
+
}, De = { key: 1 }, Oe = { key: 2 }, ke = /* @__PURE__ */ l({
|
|
170
|
+
__name: "BaseButton",
|
|
171
|
+
props: {
|
|
172
|
+
description: {
|
|
173
|
+
type: String,
|
|
174
|
+
required: !0
|
|
175
|
+
},
|
|
176
|
+
color: {
|
|
177
|
+
type: String,
|
|
178
|
+
required: !1,
|
|
179
|
+
default: z.BLUE
|
|
180
|
+
},
|
|
181
|
+
to: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: !1
|
|
184
|
+
},
|
|
185
|
+
type: {
|
|
186
|
+
type: String,
|
|
187
|
+
required: !1,
|
|
188
|
+
default: "button"
|
|
189
|
+
},
|
|
190
|
+
icon: {
|
|
191
|
+
type: String,
|
|
192
|
+
required: !1
|
|
193
|
+
},
|
|
194
|
+
iconSize: {
|
|
195
|
+
type: String,
|
|
196
|
+
required: !1
|
|
197
|
+
},
|
|
198
|
+
iconLeft: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
required: !1,
|
|
201
|
+
default: !1
|
|
202
|
+
},
|
|
203
|
+
isRounded: {
|
|
204
|
+
type: Boolean,
|
|
205
|
+
required: !1
|
|
206
|
+
},
|
|
207
|
+
isDisable: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
required: !1
|
|
210
|
+
},
|
|
211
|
+
size: {
|
|
212
|
+
type: String,
|
|
213
|
+
required: !1
|
|
214
|
+
},
|
|
215
|
+
isLoading: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
required: !1
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
setup(e) {
|
|
221
|
+
let t = e;
|
|
222
|
+
function n() {
|
|
223
|
+
let e = t.isDisable || t.isLoading, n;
|
|
224
|
+
switch (t.color) {
|
|
225
|
+
case z.BLUE:
|
|
226
|
+
n = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
227
|
+
break;
|
|
228
|
+
case z.WHITE:
|
|
229
|
+
n = e ? "text-gray-900 bg-gray-200 border border-gray-200 cursor-not-allowed" : "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200";
|
|
230
|
+
break;
|
|
231
|
+
case z.DARK:
|
|
232
|
+
n = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300";
|
|
233
|
+
break;
|
|
234
|
+
case z.GREEN:
|
|
235
|
+
n = e ? "text-white bg-green-400 cursor-not-allowed" : "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300";
|
|
236
|
+
break;
|
|
237
|
+
case z.RED:
|
|
238
|
+
n = e ? "text-white bg-red-400 cursor-not-allowed" : "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300";
|
|
239
|
+
break;
|
|
240
|
+
case z.YELLOW:
|
|
241
|
+
n = e ? "text-white bg-yellow-300 cursor-not-allowed" : "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300";
|
|
242
|
+
break;
|
|
243
|
+
case z.PURPLE:
|
|
244
|
+
n = e ? "text-white bg-purple-400 cursor-not-allowed" : "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 px-5 py-2.5 mb-2";
|
|
245
|
+
break;
|
|
246
|
+
default:
|
|
247
|
+
n = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
let r = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
251
|
+
switch (t.size) {
|
|
252
|
+
case B.EXTRA_SMALL:
|
|
253
|
+
r = "px-3 py-2 text-xs";
|
|
254
|
+
break;
|
|
255
|
+
case B.SMALL:
|
|
256
|
+
r = "px-3 py-2 text-sm";
|
|
257
|
+
break;
|
|
258
|
+
case B.BASE:
|
|
259
|
+
r = "px-5 py-2.5 text-sm";
|
|
260
|
+
break;
|
|
261
|
+
case B.LARGE:
|
|
262
|
+
r = "px-5 py-3 text-base";
|
|
263
|
+
break;
|
|
264
|
+
case B.EXTRA_LARGE:
|
|
265
|
+
r = "px-6 py-3.5 text-base";
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
let i = "rounded-lg";
|
|
269
|
+
return t.isRounded && (i = "rounded-full"), "inline-flex items-center " + r + " " + n + " font-medium " + i;
|
|
270
|
+
}
|
|
271
|
+
return (s, c) => {
|
|
272
|
+
let l = x("router-link");
|
|
273
|
+
return e.to ? (_(), r(l, {
|
|
274
|
+
key: 0,
|
|
275
|
+
to: e.to,
|
|
276
|
+
custom: ""
|
|
277
|
+
}, {
|
|
278
|
+
default: k(({ navigate: r }) => [o("button", {
|
|
279
|
+
type: t.type,
|
|
280
|
+
class: f(n()),
|
|
281
|
+
disabled: e.isDisable || e.isLoading,
|
|
282
|
+
onClick: r
|
|
283
|
+
}, [
|
|
284
|
+
e.isLoading ? (_(), a("div", Se, [...c[0] ||= [o("svg", {
|
|
285
|
+
"aria-hidden": "true",
|
|
286
|
+
role: "status",
|
|
287
|
+
class: "inline w-4 h-4 me-3 text-white animate-spin",
|
|
288
|
+
viewBox: "0 0 100 101",
|
|
289
|
+
fill: "none",
|
|
290
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
291
|
+
}, [o("path", {
|
|
292
|
+
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
293
|
+
fill: "#E5E7EB"
|
|
294
|
+
}), o("path", {
|
|
295
|
+
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
296
|
+
fill: "currentColor"
|
|
297
|
+
})], -1)]])) : i("", !0),
|
|
298
|
+
e.iconLeft ? i("", !0) : (_(), a("span", Ce, C(e.description), 1)),
|
|
299
|
+
b(s.$slots, "default"),
|
|
300
|
+
e.iconLeft ? (_(), a("span", we, C(e.description), 1)) : i("", !0)
|
|
301
|
+
], 10, xe)]),
|
|
302
|
+
_: 3
|
|
303
|
+
}, 8, ["to"])) : (_(), a("button", {
|
|
304
|
+
key: 1,
|
|
305
|
+
type: t.type,
|
|
306
|
+
class: f(n()),
|
|
307
|
+
disabled: e.isDisable || e.isLoading
|
|
308
|
+
}, [
|
|
309
|
+
e.isLoading ? (_(), a("div", Ee, [...c[1] ||= [o("svg", {
|
|
310
|
+
"aria-hidden": "true",
|
|
311
|
+
role: "status",
|
|
312
|
+
class: "inline w-4 h-4 me-3 text-white animate-spin",
|
|
313
|
+
viewBox: "0 0 100 101",
|
|
314
|
+
fill: "none",
|
|
315
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
316
|
+
}, [o("path", {
|
|
317
|
+
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
318
|
+
fill: "#E5E7EB"
|
|
319
|
+
}), o("path", {
|
|
320
|
+
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
321
|
+
fill: "currentColor"
|
|
322
|
+
})], -1)]])) : i("", !0),
|
|
323
|
+
e.iconLeft ? i("", !0) : (_(), a("span", De, C(e.description), 1)),
|
|
324
|
+
b(s.$slots, "default"),
|
|
325
|
+
e.iconLeft ? (_(), a("span", Oe, C(e.description), 1)) : i("", !0)
|
|
326
|
+
], 10, Te));
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
}), V = /* @__PURE__ */ function(e) {
|
|
330
|
+
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
331
|
+
}({}), Ae = {
|
|
332
|
+
key: 0,
|
|
333
|
+
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
334
|
+
}, je = {
|
|
335
|
+
key: 1,
|
|
336
|
+
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
337
|
+
}, Me = {
|
|
338
|
+
key: 2,
|
|
339
|
+
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
340
|
+
}, Ne = /* @__PURE__ */ l({
|
|
341
|
+
__name: "BaseLine",
|
|
342
|
+
props: { mode: {
|
|
343
|
+
type: String,
|
|
344
|
+
required: !1,
|
|
345
|
+
default: V.BASE
|
|
346
|
+
} },
|
|
347
|
+
setup(t) {
|
|
348
|
+
return (n, r) => (_(), a(e, null, [
|
|
349
|
+
t.mode === w(V).BASE ? (_(), a("hr", Ae)) : i("", !0),
|
|
350
|
+
t.mode === w(V).BASE_SHORTER ? (_(), a("hr", je)) : i("", !0),
|
|
351
|
+
t.mode === w(V).SQUARE ? (_(), a("hr", Me)) : i("", !0)
|
|
352
|
+
], 64));
|
|
353
|
+
}
|
|
354
|
+
}), H = /* @__PURE__ */ function(e) {
|
|
355
|
+
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
356
|
+
}({}), Pe = H, Fe = ["height", "width"], Ie = /* @__PURE__ */ l({
|
|
357
|
+
__name: "BaseLogo",
|
|
358
|
+
props: { size: {
|
|
359
|
+
type: String,
|
|
360
|
+
required: !1,
|
|
361
|
+
default: H.MEDIUM
|
|
362
|
+
} },
|
|
363
|
+
setup(e) {
|
|
364
|
+
let t = e;
|
|
365
|
+
function n() {
|
|
366
|
+
let e = "";
|
|
367
|
+
switch (t.size) {
|
|
368
|
+
case H.SMALL:
|
|
369
|
+
e = "50px";
|
|
370
|
+
break;
|
|
371
|
+
case H.MEDIUM:
|
|
372
|
+
e = "100px";
|
|
373
|
+
break;
|
|
374
|
+
case H.LARGE:
|
|
375
|
+
e = "150px";
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
return e;
|
|
379
|
+
}
|
|
380
|
+
return (e, t) => {
|
|
381
|
+
let i = x("router-link");
|
|
382
|
+
return _(), r(i, {
|
|
383
|
+
to: "/",
|
|
384
|
+
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
385
|
+
}, {
|
|
386
|
+
default: k(() => [(_(), a("svg", {
|
|
387
|
+
height: n(),
|
|
388
|
+
width: n(),
|
|
389
|
+
viewBox: "33.6 130.6 499.7 242.9",
|
|
390
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
391
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
392
|
+
}, [...t[0] ||= [
|
|
393
|
+
o("linearGradient", { id: "a" }, [o("stop", {
|
|
394
|
+
offset: ".085",
|
|
395
|
+
"stop-color": "#469e43"
|
|
396
|
+
}), o("stop", {
|
|
397
|
+
offset: "1",
|
|
398
|
+
"stop-color": "#132d13"
|
|
399
|
+
})], -1),
|
|
400
|
+
o("linearGradient", {
|
|
401
|
+
id: "b",
|
|
402
|
+
gradientUnits: "userSpaceOnUse",
|
|
403
|
+
x1: "64.863",
|
|
404
|
+
x2: "64.863",
|
|
405
|
+
"xlink:href": "#a",
|
|
406
|
+
y1: "288.291",
|
|
407
|
+
y2: "369.4"
|
|
408
|
+
}, null, -1),
|
|
409
|
+
o("linearGradient", {
|
|
410
|
+
id: "c",
|
|
411
|
+
gradientUnits: "userSpaceOnUse",
|
|
412
|
+
x1: "138.367",
|
|
413
|
+
x2: "138.367",
|
|
414
|
+
"xlink:href": "#a",
|
|
415
|
+
y1: "308.454",
|
|
416
|
+
y2: "370.601"
|
|
417
|
+
}, null, -1),
|
|
418
|
+
o("linearGradient", {
|
|
419
|
+
id: "d",
|
|
420
|
+
gradientUnits: "userSpaceOnUse",
|
|
421
|
+
x1: "195.475",
|
|
422
|
+
x2: "195.475",
|
|
423
|
+
"xlink:href": "#a",
|
|
424
|
+
y1: "288.291",
|
|
425
|
+
y2: "369.85"
|
|
426
|
+
}, null, -1),
|
|
427
|
+
o("linearGradient", {
|
|
428
|
+
id: "e",
|
|
429
|
+
gradientUnits: "userSpaceOnUse",
|
|
430
|
+
x1: "249.634",
|
|
431
|
+
x2: "249.634",
|
|
432
|
+
"xlink:href": "#a",
|
|
433
|
+
y1: "307.312",
|
|
434
|
+
y2: "369.511"
|
|
435
|
+
}, null, -1),
|
|
436
|
+
o("linearGradient", {
|
|
437
|
+
id: "f",
|
|
438
|
+
gradientUnits: "userSpaceOnUse",
|
|
439
|
+
x1: "302.884",
|
|
440
|
+
x2: "302.884",
|
|
441
|
+
"xlink:href": "#a",
|
|
442
|
+
y1: "288.291",
|
|
443
|
+
y2: "367.857"
|
|
444
|
+
}, null, -1),
|
|
445
|
+
o("linearGradient", {
|
|
446
|
+
id: "g",
|
|
447
|
+
gradientUnits: "userSpaceOnUse",
|
|
448
|
+
x1: "354.118",
|
|
449
|
+
x2: "354.118",
|
|
450
|
+
"xlink:href": "#a",
|
|
451
|
+
y1: "307.312",
|
|
452
|
+
y2: "369.511"
|
|
453
|
+
}, null, -1),
|
|
454
|
+
o("linearGradient", {
|
|
455
|
+
id: "h",
|
|
456
|
+
gradientUnits: "userSpaceOnUse",
|
|
457
|
+
x1: "428.02",
|
|
458
|
+
x2: "428.02",
|
|
459
|
+
"xlink:href": "#a",
|
|
460
|
+
y1: "306.156",
|
|
461
|
+
y2: "367.742"
|
|
462
|
+
}, null, -1),
|
|
463
|
+
o("linearGradient", {
|
|
464
|
+
id: "i",
|
|
465
|
+
gradientUnits: "userSpaceOnUse",
|
|
466
|
+
x1: "502.066",
|
|
467
|
+
x2: "502.066",
|
|
468
|
+
"xlink:href": "#a",
|
|
469
|
+
y1: "288.291",
|
|
470
|
+
y2: "369.4"
|
|
471
|
+
}, null, -1),
|
|
472
|
+
o("linearGradient", {
|
|
473
|
+
id: "j",
|
|
474
|
+
gradientUnits: "userSpaceOnUse",
|
|
475
|
+
x1: "283.264",
|
|
476
|
+
x2: "283.264",
|
|
477
|
+
"xlink:href": "#a",
|
|
478
|
+
y1: "131.629",
|
|
479
|
+
y2: "232.559"
|
|
480
|
+
}, null, -1),
|
|
481
|
+
o("linearGradient", {
|
|
482
|
+
id: "k",
|
|
483
|
+
gradientUnits: "userSpaceOnUse",
|
|
484
|
+
x1: "283.46",
|
|
485
|
+
x2: "283.46",
|
|
486
|
+
y1: "202.275",
|
|
487
|
+
y2: "183.785"
|
|
488
|
+
}, [o("stop", {
|
|
489
|
+
offset: "0",
|
|
490
|
+
"stop-color": "#969799",
|
|
491
|
+
"stop-opacity": "0"
|
|
492
|
+
}), o("stop", {
|
|
493
|
+
offset: "1",
|
|
494
|
+
"stop-color": "#808183"
|
|
495
|
+
})], -1),
|
|
496
|
+
o("path", {
|
|
497
|
+
d: "m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",
|
|
498
|
+
fill: "url(#b)"
|
|
499
|
+
}, null, -1),
|
|
500
|
+
o("path", {
|
|
501
|
+
d: "m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",
|
|
502
|
+
fill: "url(#c)"
|
|
503
|
+
}, null, -1),
|
|
504
|
+
o("path", {
|
|
505
|
+
d: "m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",
|
|
506
|
+
fill: "url(#d)"
|
|
507
|
+
}, null, -1),
|
|
508
|
+
o("path", {
|
|
509
|
+
d: "m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
510
|
+
fill: "url(#e)"
|
|
511
|
+
}, null, -1),
|
|
512
|
+
o("path", {
|
|
513
|
+
d: "m296.4 288.3h13v79.6h-13z",
|
|
514
|
+
fill: "url(#f)"
|
|
515
|
+
}, null, -1),
|
|
516
|
+
o("path", {
|
|
517
|
+
d: "m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
518
|
+
fill: "url(#g)"
|
|
519
|
+
}, null, -1),
|
|
520
|
+
o("path", {
|
|
521
|
+
d: "m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",
|
|
522
|
+
fill: "url(#h)"
|
|
523
|
+
}, null, -1),
|
|
524
|
+
o("path", {
|
|
525
|
+
d: "m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",
|
|
526
|
+
fill: "url(#i)"
|
|
527
|
+
}, null, -1),
|
|
528
|
+
o("path", {
|
|
529
|
+
d: "m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",
|
|
530
|
+
fill: "url(#j)"
|
|
531
|
+
}, null, -1),
|
|
532
|
+
o("path", {
|
|
533
|
+
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
534
|
+
fill: "url(#k)"
|
|
535
|
+
}, null, -1)
|
|
536
|
+
]], 8, Fe))]),
|
|
537
|
+
_: 1
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
}), U = /* @__PURE__ */ function(e) {
|
|
542
|
+
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
543
|
+
}({}), Le = ["aria-labelledby"], Re = {
|
|
544
|
+
key: 0,
|
|
545
|
+
class: "p-6 text-center"
|
|
546
|
+
}, ze = ["id"], Be = { class: "flex justify-center" }, Ve = /* @__PURE__ */ l({
|
|
547
|
+
__name: "BaseModal",
|
|
548
|
+
props: {
|
|
549
|
+
title: {
|
|
550
|
+
type: String,
|
|
551
|
+
required: !0
|
|
552
|
+
},
|
|
553
|
+
description: {
|
|
554
|
+
type: String,
|
|
555
|
+
required: !1
|
|
556
|
+
},
|
|
557
|
+
to: {
|
|
558
|
+
type: String,
|
|
559
|
+
required: !1,
|
|
560
|
+
default: "/"
|
|
561
|
+
},
|
|
562
|
+
mode: {
|
|
563
|
+
type: String,
|
|
564
|
+
required: !1,
|
|
565
|
+
default: U.SUCCESS
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
emits: ["closeModal", "confirmModal"],
|
|
569
|
+
setup(t, { emit: n }) {
|
|
570
|
+
let r = n;
|
|
571
|
+
function s(e) {
|
|
572
|
+
e.key === "Escape" && r("closeModal");
|
|
573
|
+
}
|
|
574
|
+
return m(() => {
|
|
575
|
+
document.addEventListener("keydown", s);
|
|
576
|
+
}), g(() => {
|
|
577
|
+
document.removeEventListener("keydown", s);
|
|
578
|
+
}), (n, r) => {
|
|
579
|
+
let s = x("base-button");
|
|
580
|
+
return _(), a(e, null, [o("div", {
|
|
581
|
+
class: "outside",
|
|
582
|
+
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
583
|
+
}), o("div", {
|
|
584
|
+
class: "dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white",
|
|
585
|
+
role: "dialog",
|
|
586
|
+
"aria-modal": "true",
|
|
587
|
+
"aria-labelledby": "modal-title-" + t.title
|
|
588
|
+
}, [t.mode === w(U).DELETE ? (_(), a("div", Re, [
|
|
589
|
+
c(w(ie), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
590
|
+
o("h3", {
|
|
591
|
+
id: "modal-title-" + t.title,
|
|
592
|
+
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
593
|
+
}, " Are you sure you want to delete this " + C(t.title) + "? ", 9, ze),
|
|
594
|
+
o("div", Be, [c(s, {
|
|
595
|
+
color: w(z).RED,
|
|
596
|
+
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
597
|
+
description: "Yes, I'm sure"
|
|
598
|
+
}, null, 8, ["color"]), c(s, {
|
|
599
|
+
color: w(z).WHITE,
|
|
600
|
+
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
601
|
+
description: "No, cancel"
|
|
602
|
+
}, null, 8, ["color"])])
|
|
603
|
+
])) : i("", !0)], 8, Le)], 64);
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
}), W = (e, t) => {
|
|
607
|
+
let n = e.__vccOpts || e;
|
|
608
|
+
for (let [e, r] of t) n[e] = r;
|
|
609
|
+
return n;
|
|
610
|
+
}, He = /* @__PURE__ */ W(Ve, [["__scopeId", "data-v-1db4f0ac"]]), Ue = /* @__PURE__ */ l({
|
|
611
|
+
__name: "BaseRow",
|
|
612
|
+
props: { bgColor: {
|
|
613
|
+
type: String,
|
|
614
|
+
required: !1,
|
|
615
|
+
default: "white"
|
|
616
|
+
} },
|
|
617
|
+
setup(e) {
|
|
618
|
+
let t = e;
|
|
619
|
+
function n() {
|
|
620
|
+
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
621
|
+
}
|
|
622
|
+
return (e, t) => (_(), a("div", { class: f(n()) }, [b(e.$slots, "default")], 2));
|
|
623
|
+
}
|
|
624
|
+
}), We = {}, Ge = { class: "w-4 h-4 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin" };
|
|
625
|
+
function Ke(e, t) {
|
|
626
|
+
return _(), a("div", Ge);
|
|
627
|
+
}
|
|
628
|
+
var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e) {
|
|
629
|
+
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
630
|
+
}({}), K = /* @__PURE__ */ function(e) {
|
|
631
|
+
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
632
|
+
}({}), Je = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, Ye = { class: "ml-3 text-sm font-normal" }, Xe = {
|
|
633
|
+
key: 3,
|
|
634
|
+
type: "button",
|
|
635
|
+
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700",
|
|
636
|
+
"data-dismiss-target": "#toast-danger",
|
|
637
|
+
"aria-label": "Close"
|
|
638
|
+
}, Ze = /* @__PURE__ */ l({
|
|
639
|
+
__name: "BaseToast",
|
|
640
|
+
props: {
|
|
641
|
+
mode: {
|
|
642
|
+
type: Object,
|
|
643
|
+
required: !0
|
|
644
|
+
},
|
|
645
|
+
description: {
|
|
646
|
+
type: String,
|
|
647
|
+
required: !0
|
|
648
|
+
},
|
|
649
|
+
hasCloseIcon: {
|
|
650
|
+
type: Boolean,
|
|
651
|
+
required: !1,
|
|
652
|
+
default: !0
|
|
653
|
+
},
|
|
654
|
+
positioning: {
|
|
655
|
+
type: String,
|
|
656
|
+
required: !1,
|
|
657
|
+
default: K.TOP_RIGHT
|
|
658
|
+
},
|
|
659
|
+
duration: {
|
|
660
|
+
type: Number,
|
|
661
|
+
required: !1,
|
|
662
|
+
default: 5e3
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
setup(e) {
|
|
666
|
+
let t = e, n = v(!0), r = null;
|
|
667
|
+
function s() {
|
|
668
|
+
n.value = !1, r &&= (clearTimeout(r), null);
|
|
669
|
+
}
|
|
670
|
+
m(() => {
|
|
671
|
+
r = setTimeout(() => n.value = !1, t.duration);
|
|
672
|
+
}), g(() => {
|
|
673
|
+
r && clearTimeout(r);
|
|
674
|
+
});
|
|
675
|
+
function l() {
|
|
676
|
+
let e = "";
|
|
677
|
+
switch (t.mode) {
|
|
678
|
+
case G.ERROR:
|
|
679
|
+
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
680
|
+
break;
|
|
681
|
+
case G.SUCCESS:
|
|
682
|
+
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
683
|
+
break;
|
|
684
|
+
case G.WARNING:
|
|
685
|
+
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
686
|
+
break;
|
|
687
|
+
default:
|
|
688
|
+
e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + e;
|
|
692
|
+
}
|
|
693
|
+
function u() {
|
|
694
|
+
let e = "top-5 right-5";
|
|
695
|
+
switch (t.positioning) {
|
|
696
|
+
case K.BOTTOM_LEFT:
|
|
697
|
+
e = "bottom-5 left-5";
|
|
698
|
+
break;
|
|
699
|
+
case K.TOP_LEFT:
|
|
700
|
+
e = "top-5 left-5";
|
|
701
|
+
break;
|
|
702
|
+
case K.TOP_RIGHT:
|
|
703
|
+
e = "top-5 right-5";
|
|
704
|
+
break;
|
|
705
|
+
case K.BOTTOM_RIGHT:
|
|
706
|
+
e = "bottom-5 right-5";
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
710
|
+
}
|
|
711
|
+
return (t, r) => n.value ? (_(), a("div", {
|
|
712
|
+
key: 0,
|
|
713
|
+
id: "toast-top-right",
|
|
714
|
+
class: f(u()),
|
|
715
|
+
role: "alert"
|
|
716
|
+
}, [o("div", Je, [
|
|
717
|
+
e.mode == w(G).ERROR ? (_(), a("div", {
|
|
718
|
+
key: 0,
|
|
719
|
+
class: f(l())
|
|
720
|
+
}, [c(w(ie), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(G).SUCCESS ? (_(), a("div", {
|
|
721
|
+
key: 1,
|
|
722
|
+
class: f(l())
|
|
723
|
+
}, [c(w(ne), { class: "h-6 w-6 text-green-500" }), r[1] ||= o("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == w(G).WARNING ? (_(), a("div", {
|
|
724
|
+
key: 2,
|
|
725
|
+
class: f(l())
|
|
726
|
+
}, [c(w(ae), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= o("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : i("", !0),
|
|
727
|
+
o("div", Ye, C(e.description), 1),
|
|
728
|
+
e.hasCloseIcon ? (_(), a("button", Xe, [r[3] ||= o("span", { class: "sr-only" }, "Close", -1), c(w(F), {
|
|
729
|
+
class: "h-6 w-6 text-gray-500 cursor-pointer",
|
|
730
|
+
onClick: s
|
|
731
|
+
})])) : i("", !0)
|
|
732
|
+
])], 2)) : i("", !0);
|
|
733
|
+
}
|
|
734
|
+
}), Qe = { class: "w-13" }, $e = /* @__PURE__ */ l({
|
|
735
|
+
__name: "ColoredSquares",
|
|
736
|
+
props: { color: {
|
|
737
|
+
type: String,
|
|
738
|
+
required: !1
|
|
739
|
+
} },
|
|
740
|
+
setup(e) {
|
|
741
|
+
let t = e, n = [
|
|
742
|
+
"bg-slate-300",
|
|
743
|
+
"bg-zinc-300",
|
|
744
|
+
"bg-neutral-300",
|
|
745
|
+
"bg-stone-300",
|
|
746
|
+
"bg-blue-300",
|
|
747
|
+
"bg-green-300",
|
|
748
|
+
"bg-yellow-300",
|
|
749
|
+
"bg-purple-300",
|
|
750
|
+
"bg-pink-300"
|
|
751
|
+
], r = v(n[Math.floor(Math.random() * n.length)]);
|
|
752
|
+
function i() {
|
|
753
|
+
let e = "gray";
|
|
754
|
+
switch (t.color) {
|
|
755
|
+
case L.GREEN:
|
|
756
|
+
e = "green";
|
|
757
|
+
break;
|
|
758
|
+
case L.RED:
|
|
759
|
+
e = "red";
|
|
760
|
+
break;
|
|
761
|
+
case L.BLUE:
|
|
762
|
+
e = "blue";
|
|
763
|
+
break;
|
|
764
|
+
case L.YELLOW:
|
|
765
|
+
e = "yellow";
|
|
766
|
+
break;
|
|
767
|
+
case L.NONE:
|
|
768
|
+
e = "";
|
|
769
|
+
break;
|
|
770
|
+
}
|
|
771
|
+
return "font-bold bg-" + e + "-100 text-" + e + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
772
|
+
}
|
|
773
|
+
return (e, t) => (_(), a("div", Qe, [o("div", { class: f(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [b(e.$slots, "default"), o("div", { class: f(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
774
|
+
}
|
|
775
|
+
}), et = { class: "relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6" }, tt = {
|
|
776
|
+
key: 0,
|
|
777
|
+
class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500"
|
|
778
|
+
}, nt = { class: "flex items-start justify-between" }, rt = { class: "text-sm font-bold tracking-wide text-gray-800" }, it = { class: "mt-1 text-4xl font-bold text-gray-400" }, at = { class: "mt-1 text-sm font-medium text-orange-400" }, ot = /* @__PURE__ */ l({
|
|
779
|
+
__name: "EarningsCard",
|
|
780
|
+
props: {
|
|
781
|
+
title: { default: "TOTAL EARNINGS" },
|
|
782
|
+
amount: { default: 0 },
|
|
783
|
+
subtitle: { default: "Lifetime commission" },
|
|
784
|
+
badge: { default: "" },
|
|
785
|
+
currency: { default: "$" }
|
|
786
|
+
},
|
|
787
|
+
setup(e) {
|
|
788
|
+
let t = e, r = n(() => t.currency + t.amount.toLocaleString("en-US", {
|
|
789
|
+
minimumFractionDigits: 2,
|
|
790
|
+
maximumFractionDigits: 2
|
|
791
|
+
}));
|
|
792
|
+
return (t, n) => (_(), a("div", et, [e.badge ? (_(), a("div", tt, C(e.badge), 1)) : i("", !0), o("div", nt, [o("div", null, [
|
|
793
|
+
o("p", rt, C(e.title), 1),
|
|
794
|
+
o("p", it, C(r.value), 1),
|
|
795
|
+
o("p", at, C(e.subtitle), 1)
|
|
796
|
+
]), n[0] ||= o("div", { class: "mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50" }, [o("svg", {
|
|
797
|
+
class: "h-6 w-6 text-orange-400",
|
|
798
|
+
viewBox: "0 0 24 24",
|
|
799
|
+
fill: "none",
|
|
800
|
+
stroke: "currentColor",
|
|
801
|
+
"stroke-width": "2.5",
|
|
802
|
+
"stroke-linecap": "round",
|
|
803
|
+
"stroke-linejoin": "round"
|
|
804
|
+
}, [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }), o("polyline", { points: "16 7 22 7 22 13" })])], -1)])]));
|
|
805
|
+
}
|
|
806
|
+
}), st = {
|
|
807
|
+
key: 0,
|
|
808
|
+
class: "font-bold text-green-800"
|
|
809
|
+
}, ct = { key: 0 }, lt = { key: 0 }, ut = "font-bold", dt = /* @__PURE__ */ l({
|
|
810
|
+
__name: "EuroAmount",
|
|
811
|
+
props: {
|
|
812
|
+
amount: {
|
|
813
|
+
type: Number,
|
|
814
|
+
required: !1
|
|
815
|
+
},
|
|
816
|
+
beforeAmount: {
|
|
817
|
+
type: Number,
|
|
818
|
+
default: null,
|
|
819
|
+
required: !1
|
|
820
|
+
},
|
|
821
|
+
showCurrency: {
|
|
822
|
+
type: Boolean,
|
|
823
|
+
default: !0,
|
|
824
|
+
required: !1
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
setup(t) {
|
|
828
|
+
let r = t, o = n(() => r.amount !== null && r.amount !== void 0), c = n(() => o.value && r.amount < 0), l = n(() => r.beforeAmount === null || r.beforeAmount === void 0 ? !1 : r.amount < r.beforeAmount), u = n(() => c.value || l.value), d = n(() => !c.value && !l.value && !(r.beforeAmount === null || r.beforeAmount === void 0));
|
|
829
|
+
return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span", st, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", ct, "€")) : i("", !0)])) : i("", !0), o.value && !d.value ? (_(), a("span", {
|
|
830
|
+
key: 1,
|
|
831
|
+
class: f([ut, u.value ? "text-red-800" : "text-gray-800"])
|
|
832
|
+
}, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", lt, "€")) : i("", !0)], 2)) : i("", !0)], 64));
|
|
833
|
+
}
|
|
834
|
+
}), ft = ["onClick", "onKeydown"], pt = {
|
|
835
|
+
key: 1,
|
|
836
|
+
style: { cursor: "not-allowed" }
|
|
837
|
+
}, mt = /* @__PURE__ */ W(/* @__PURE__ */ l({
|
|
838
|
+
__name: "Pagination",
|
|
839
|
+
props: {
|
|
840
|
+
totalItems: {
|
|
841
|
+
type: Number,
|
|
842
|
+
required: !0
|
|
843
|
+
},
|
|
844
|
+
itemsPerPage: {
|
|
845
|
+
type: Number,
|
|
846
|
+
default: 20
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
emits: ["page-changed"],
|
|
850
|
+
setup(t, { emit: n }) {
|
|
851
|
+
let r = t, s = v(1), c = v(0), l = v([]), u = n;
|
|
852
|
+
function d(e) {
|
|
853
|
+
if (e !== s.value && e >= 1 && e <= c.value && (s.value = e), c.value > 5) {
|
|
854
|
+
l.value = [], e - 3 > 0 && (l.value.push(1), l.value.push(0));
|
|
855
|
+
for (let t = 1; t <= 2; t++) {
|
|
856
|
+
let n = e - t;
|
|
857
|
+
n > 0 && l.value.push(n);
|
|
858
|
+
}
|
|
859
|
+
l.value.length, l.value.push(s.value);
|
|
860
|
+
let t = c.value - e;
|
|
861
|
+
if (t > 2) {
|
|
862
|
+
for (let t = 1; t <= 2; t++) l.value.push(e + t);
|
|
863
|
+
l.value.push(0), l.value.push(c.value);
|
|
864
|
+
} else for (let n = 1; n <= t; n++) l.value.push(e + n);
|
|
865
|
+
}
|
|
866
|
+
u("page-changed", e);
|
|
867
|
+
}
|
|
868
|
+
return O(() => r.totalItems, () => {
|
|
869
|
+
if (c.value = Math.ceil(r.totalItems / r.itemsPerPage), l.value = [], c.value > 5) {
|
|
870
|
+
for (let e = 1; e < 5; e++) l.value.push(e);
|
|
871
|
+
l.value.push(0), l.value.push(c.value);
|
|
872
|
+
} else for (let e = 1; e <= c.value; e++) l.value.push(e);
|
|
873
|
+
}, { immediate: !0 }), (t, n) => (_(), a("div", null, [o("ul", null, [(_(!0), a(e, null, y(l.value, (e, t) => (_(), a("li", { key: t }, [e === 0 ? i("", !0) : (_(), a("a", {
|
|
874
|
+
key: 0,
|
|
875
|
+
role: "button",
|
|
876
|
+
tabindex: "0",
|
|
877
|
+
onClick: (t) => d(e),
|
|
878
|
+
onKeydown: j((t) => d(e), ["enter"]),
|
|
879
|
+
class: f({ active: e === s.value })
|
|
880
|
+
}, C(e), 43, ft)), e === 0 ? (_(), a("span", pt, "...")) : i("", !0)]))), 128))])]));
|
|
881
|
+
}
|
|
882
|
+
}), [["__scopeId", "data-v-d7ebb6ac"]]), ht = { key: 0 }, gt = {
|
|
883
|
+
key: 0,
|
|
884
|
+
class: "flex items-center space-x-2"
|
|
885
|
+
}, _t = {
|
|
886
|
+
key: 1,
|
|
887
|
+
class: "flex items-center space-x-2"
|
|
888
|
+
}, vt = /* @__PURE__ */ l({
|
|
889
|
+
__name: "TrendArrow",
|
|
890
|
+
props: {
|
|
891
|
+
number: {
|
|
892
|
+
type: Number,
|
|
893
|
+
required: !1
|
|
894
|
+
},
|
|
895
|
+
icon: {
|
|
896
|
+
type: String,
|
|
897
|
+
required: !1
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
setup(e) {
|
|
901
|
+
let t = e, r = n(() => t.number !== null && t.number !== void 0 && t.number < 0);
|
|
902
|
+
return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div", ht, [r.value ? (_(), a("span", gt, [c(R, { color: w(L).RED }, {
|
|
903
|
+
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
904
|
+
_: 1
|
|
905
|
+
}, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span", _t, [c(R, { color: w(L).GREEN }, {
|
|
906
|
+
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
907
|
+
_: 1
|
|
908
|
+
}, 8, ["color"]), c(w(te), { class: "h-5 w-5 text-green-500" })]))])) : i("", !0);
|
|
909
|
+
}
|
|
910
|
+
}), q = v(!1), yt = !1, J = "mgv-theme";
|
|
911
|
+
function bt(e) {
|
|
912
|
+
if (!yt) {
|
|
913
|
+
if (yt = !0, J = e, typeof window < "u") {
|
|
914
|
+
let e = window.localStorage?.getItem(J);
|
|
915
|
+
e ? q.value = e === "dark" : typeof window.matchMedia == "function" && (q.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
916
|
+
}
|
|
917
|
+
typeof document < "u" && u(!0).run(() => {
|
|
918
|
+
O(q, (e) => {
|
|
919
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(J, e ? "dark" : "light");
|
|
920
|
+
}, { immediate: !0 });
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function Y(e) {
|
|
925
|
+
bt(e?.storageKey ?? J);
|
|
926
|
+
function t() {
|
|
927
|
+
q.value = !q.value;
|
|
928
|
+
}
|
|
929
|
+
return {
|
|
930
|
+
isDark: q,
|
|
931
|
+
toggleTheme: t
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/composables/useThemeClasses.ts
|
|
936
|
+
function X() {
|
|
937
|
+
let { isDark: e } = Y();
|
|
938
|
+
return {
|
|
939
|
+
card: n(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
940
|
+
cardAlt: n(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
941
|
+
pageBg: n(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
942
|
+
border: n(() => e.value ? "border-gray-700" : "border-gray-200"),
|
|
943
|
+
divider: n(() => e.value ? "border-gray-800" : "border-gray-100"),
|
|
944
|
+
primaryText: n(() => e.value ? "text-white" : "text-gray-900"),
|
|
945
|
+
primaryTextSoft: n(() => e.value ? "text-gray-100" : "text-gray-800"),
|
|
946
|
+
bodyText: n(() => e.value ? "text-gray-200" : "text-gray-700"),
|
|
947
|
+
label: n(() => e.value ? "text-gray-300" : "text-gray-700"),
|
|
948
|
+
mutedText: n(() => e.value ? "text-gray-400" : "text-gray-600"),
|
|
949
|
+
subtleText: n(() => e.value ? "text-gray-500" : "text-gray-600"),
|
|
950
|
+
dimText: n(() => e.value ? "text-gray-500" : "text-gray-400"),
|
|
951
|
+
dimTextAlt: n(() => e.value ? "text-gray-400" : "text-gray-500"),
|
|
952
|
+
illustration: n(() => e.value ? "text-gray-600" : "text-gray-300"),
|
|
953
|
+
input: n(() => e.value ? "bg-gray-700 border-gray-600 text-white" : "bg-gray-50 border-gray-300 text-gray-900"),
|
|
954
|
+
inputWithPlaceholder: n(() => e.value ? "bg-gray-700 border-gray-600 text-white placeholder-gray-400" : "bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"),
|
|
955
|
+
ghostButton: n(() => e.value ? "bg-gray-800 text-gray-200 border-gray-600 hover:bg-gray-700" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),
|
|
956
|
+
emeraldText: n(() => e.value ? "text-emerald-400" : "text-emerald-600"),
|
|
957
|
+
amberText: n(() => e.value ? "text-amber-400" : "text-amber-600"),
|
|
958
|
+
amberTextStrong: n(() => e.value ? "text-amber-300" : "text-amber-700"),
|
|
959
|
+
redText: n(() => e.value ? "text-red-400" : "text-red-500")
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
//#endregion
|
|
963
|
+
//#region src/composables/useEscapeKey.ts
|
|
964
|
+
function Z(e) {
|
|
965
|
+
function t(t) {
|
|
966
|
+
t.key === "Escape" && e();
|
|
967
|
+
}
|
|
968
|
+
m(() => document.addEventListener("keydown", t)), p(() => document.removeEventListener("keydown", t));
|
|
640
969
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
970
|
+
//#endregion
|
|
971
|
+
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
972
|
+
var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { class: "flex-1" }, wt = { class: "mt-4" }, Tt = { class: "mt-6 flex gap-3 justify-end" }, Q = /* @__PURE__ */ l({
|
|
973
|
+
__name: "BaseModalShell",
|
|
974
|
+
props: {
|
|
975
|
+
title: {},
|
|
976
|
+
maxWidthClass: { default: "max-w-md" },
|
|
977
|
+
manualClose: {
|
|
978
|
+
type: Boolean,
|
|
979
|
+
default: !1
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
emits: ["cancel", "backdrop"],
|
|
983
|
+
setup(e, { emit: i }) {
|
|
984
|
+
let a = e, s = i, { isDark: c } = Y(), l = X(), u = `modal-title-${Math.random().toString(36).slice(2, 9)}`, d = n(() => c.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200");
|
|
985
|
+
function p() {
|
|
986
|
+
s("backdrop"), a.manualClose || s("cancel");
|
|
987
|
+
}
|
|
988
|
+
return Z(() => {
|
|
989
|
+
a.manualClose || s("cancel");
|
|
990
|
+
}), (n, i) => (_(), r(t, { to: "body" }, [o("div", {
|
|
991
|
+
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
992
|
+
role: "dialog",
|
|
993
|
+
"aria-modal": "true",
|
|
994
|
+
"aria-labelledby": u,
|
|
995
|
+
onClick: p
|
|
996
|
+
}, [o("div", {
|
|
997
|
+
class: f(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, d.value]]),
|
|
998
|
+
onClick: i[0] ||= M(() => {}, ["stop"])
|
|
999
|
+
}, [o("div", xt, [
|
|
1000
|
+
o("div", St, [b(n.$slots, "icon"), o("div", Ct, [o("h3", {
|
|
1001
|
+
id: u,
|
|
1002
|
+
class: f(["text-lg font-medium", w(l).primaryText])
|
|
1003
|
+
}, C(e.title), 3)])]),
|
|
1004
|
+
o("div", wt, [b(n.$slots, "default")]),
|
|
1005
|
+
o("div", Tt, [b(n.$slots, "footer")])
|
|
1006
|
+
])], 2)])]));
|
|
1007
|
+
}
|
|
1008
|
+
}), Et = ["aria-expanded"], Dt = { class: "flex items-center gap-3" }, Ot = /* @__PURE__ */ l({
|
|
1009
|
+
__name: "BaseCollapsibleSection",
|
|
1010
|
+
props: {
|
|
1011
|
+
title: {},
|
|
1012
|
+
collapsed: { type: Boolean },
|
|
1013
|
+
badge: {},
|
|
1014
|
+
bodyClass: {}
|
|
1015
|
+
},
|
|
1016
|
+
emits: ["toggle"],
|
|
1017
|
+
setup(e, { emit: t }) {
|
|
1018
|
+
let r = e, s = t, { isDark: c } = Y(), l = X(), u = n(() => c.value ? "text-gray-100" : "text-gray-700"), d = n(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), p = n(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), m = n(() => r.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : r.bodyClass);
|
|
1019
|
+
return (t, n) => (_(), a("section", { class: f(["rounded-xl border overflow-hidden transition-colors", w(l).cardAlt]) }, [o("button", {
|
|
1020
|
+
type: "button",
|
|
1021
|
+
class: f(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1022
|
+
"aria-expanded": !e.collapsed,
|
|
1023
|
+
onClick: n[0] ||= (e) => s("toggle")
|
|
1024
|
+
}, [o("div", Dt, [o("h2", { class: f(["text-base font-semibold", u.value]) }, C(e.title), 3), e.badge ? (_(), a("span", {
|
|
1025
|
+
key: 0,
|
|
1026
|
+
class: f(["text-xs px-2 py-0.5 rounded-full", p.value])
|
|
1027
|
+
}, C(e.badge), 3)) : i("", !0)]), (_(), a("svg", {
|
|
1028
|
+
class: f(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", w(l).dimTextAlt]]),
|
|
1029
|
+
fill: "none",
|
|
1030
|
+
viewBox: "0 0 24 24",
|
|
1031
|
+
stroke: "currentColor",
|
|
1032
|
+
"stroke-width": "2",
|
|
1033
|
+
"aria-hidden": "true"
|
|
1034
|
+
}, [...n[1] ||= [o("path", {
|
|
1035
|
+
"stroke-linecap": "round",
|
|
1036
|
+
"stroke-linejoin": "round",
|
|
1037
|
+
d: "M19 9l-7 7-7-7"
|
|
1038
|
+
}, null, -1)]], 2))], 10, Et), A(o("div", { class: f(["p-6 border-t", [w(l).border, m.value]]) }, [b(t.$slots, "default")], 2), [[D, !e.collapsed]])], 2));
|
|
1039
|
+
}
|
|
1040
|
+
}), kt = ["disabled"], At = ["disabled"], jt = {
|
|
1041
|
+
key: 0,
|
|
1042
|
+
class: "w-4 h-4 animate-spin",
|
|
1043
|
+
fill: "none",
|
|
1044
|
+
viewBox: "0 0 24 24",
|
|
1045
|
+
"aria-hidden": "true"
|
|
1046
|
+
}, Mt = /* @__PURE__ */ l({
|
|
1047
|
+
__name: "BaseConfirmModal",
|
|
1048
|
+
props: {
|
|
1049
|
+
title: {},
|
|
1050
|
+
message: {},
|
|
1051
|
+
confirmText: { default: "Yes, I'm sure" },
|
|
1052
|
+
cancelText: { default: "No, cancel" },
|
|
1053
|
+
submittingText: { default: "Working..." },
|
|
1054
|
+
variant: { default: "danger" },
|
|
1055
|
+
submitting: {
|
|
1056
|
+
type: Boolean,
|
|
1057
|
+
default: !1
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
emits: ["confirm", "cancel"],
|
|
1061
|
+
setup(e, { emit: t }) {
|
|
1062
|
+
let n = e, l = t, { isDark: u } = Y(), d = X();
|
|
1063
|
+
function p() {
|
|
1064
|
+
n.submitting || l("confirm");
|
|
1065
|
+
}
|
|
1066
|
+
function m() {
|
|
1067
|
+
n.submitting || l("cancel");
|
|
1068
|
+
}
|
|
1069
|
+
return (t, n) => (_(), r(Q, {
|
|
1070
|
+
title: e.title,
|
|
1071
|
+
"manual-close": e.submitting,
|
|
1072
|
+
onCancel: m
|
|
1073
|
+
}, {
|
|
1074
|
+
icon: k(() => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? w(u) ? "bg-red-900/30" : "bg-red-50" : w(u) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [c(w(ae), {
|
|
1075
|
+
class: f(["h-6 w-6", e.variant === "danger" ? "text-red-600" : "text-amber-600"]),
|
|
1076
|
+
"aria-hidden": "true"
|
|
1077
|
+
}, null, 8, ["class"])], 2)]),
|
|
1078
|
+
footer: k(() => [o("button", {
|
|
1079
|
+
type: "button",
|
|
1080
|
+
disabled: e.submitting,
|
|
1081
|
+
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", [w(d).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1082
|
+
onClick: m
|
|
1083
|
+
}, C(e.cancelText), 11, kt), o("button", {
|
|
1084
|
+
type: "button",
|
|
1085
|
+
disabled: e.submitting,
|
|
1086
|
+
class: f(["inline-flex items-center justify-center gap-2 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", [e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1087
|
+
onClick: p
|
|
1088
|
+
}, [e.submitting ? (_(), a("svg", jt, [...n[0] ||= [o("circle", {
|
|
1089
|
+
class: "opacity-25",
|
|
1090
|
+
cx: "12",
|
|
1091
|
+
cy: "12",
|
|
1092
|
+
r: "10",
|
|
1093
|
+
stroke: "currentColor",
|
|
1094
|
+
"stroke-width": "4"
|
|
1095
|
+
}, null, -1), o("path", {
|
|
1096
|
+
class: "opacity-75",
|
|
1097
|
+
fill: "currentColor",
|
|
1098
|
+
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1099
|
+
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10, At)]),
|
|
1100
|
+
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3)]),
|
|
1101
|
+
_: 1
|
|
1102
|
+
}, 8, ["title", "manual-close"]));
|
|
1103
|
+
}
|
|
1104
|
+
}), Nt = { class: "mt-4" }, Pt = ["placeholder"], Ft = ["disabled"], It = /* @__PURE__ */ l({
|
|
1105
|
+
__name: "BaseTextInputModal",
|
|
1106
|
+
props: {
|
|
1107
|
+
title: {},
|
|
1108
|
+
message: {},
|
|
1109
|
+
initialValue: { default: "" },
|
|
1110
|
+
placeholder: { default: "Enter value..." },
|
|
1111
|
+
inputLabel: { default: "Name" },
|
|
1112
|
+
confirmText: { default: "Confirm" },
|
|
1113
|
+
cancelText: { default: "Cancel" },
|
|
1114
|
+
submittingText: { default: "Working..." },
|
|
1115
|
+
submitting: {
|
|
1116
|
+
type: Boolean,
|
|
1117
|
+
default: !1
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
emits: ["confirm", "cancel"],
|
|
1121
|
+
setup(e, { emit: t }) {
|
|
1122
|
+
let n = e, i = t, { isDark: a } = Y(), s = X(), l = v(n.initialValue), u = v(null);
|
|
1123
|
+
m(async () => {
|
|
1124
|
+
await d(), u.value?.focus();
|
|
1125
|
+
});
|
|
1126
|
+
function p() {
|
|
1127
|
+
!l.value.trim() || n.submitting || i("confirm", l.value.trim());
|
|
1128
|
+
}
|
|
1129
|
+
function h() {
|
|
1130
|
+
i("cancel");
|
|
1131
|
+
}
|
|
1132
|
+
function g() {
|
|
1133
|
+
l.value.trim() === (n.initialValue ?? "").trim() && h();
|
|
1134
|
+
}
|
|
1135
|
+
return Z(h), (t, n) => (_(), r(Q, {
|
|
1136
|
+
title: e.title,
|
|
1137
|
+
"manual-close": "",
|
|
1138
|
+
onBackdrop: g
|
|
1139
|
+
}, {
|
|
1140
|
+
icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(re), {
|
|
1141
|
+
class: "h-6 w-6 text-emerald-600",
|
|
1142
|
+
"aria-hidden": "true"
|
|
1143
|
+
})], 2)])]),
|
|
1144
|
+
footer: k(() => [o("button", {
|
|
1145
|
+
type: "button",
|
|
1146
|
+
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", w(s).ghostButton]),
|
|
1147
|
+
onClick: h
|
|
1148
|
+
}, C(e.cancelText), 3), o("button", {
|
|
1149
|
+
type: "button",
|
|
1150
|
+
disabled: !l.value.trim() || e.submitting,
|
|
1151
|
+
class: f(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1152
|
+
onClick: p
|
|
1153
|
+
}, C(e.submitting ? e.submittingText : e.confirmText), 11, Ft)]),
|
|
1154
|
+
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div", Nt, [o("label", { class: f(["block text-sm font-medium mb-1", w(s).label]) }, C(e.inputLabel), 3), A(o("input", {
|
|
1155
|
+
ref_key: "nameInput",
|
|
1156
|
+
ref: u,
|
|
1157
|
+
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
1158
|
+
type: "text",
|
|
1159
|
+
placeholder: e.placeholder,
|
|
1160
|
+
class: f(["w-full px-3 py-2 rounded-md border text-sm transition-colors", w(a) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1161
|
+
onKeyup: j(p, ["enter"])
|
|
1162
|
+
}, null, 42, Pt), [[E, l.value]])])]),
|
|
1163
|
+
_: 3
|
|
1164
|
+
}, 8, ["title"]));
|
|
1165
|
+
}
|
|
1166
|
+
}), Lt = { class: "flex items-center justify-center min-h-[60vh]" }, Rt = { class: "text-center px-6" }, zt = /* @__PURE__ */ l({
|
|
1167
|
+
__name: "BaseNotFoundPage",
|
|
1168
|
+
props: {
|
|
1169
|
+
code: { default: "404" },
|
|
1170
|
+
message: { default: "Page not found" },
|
|
1171
|
+
homeRouteName: { default: "home" },
|
|
1172
|
+
homeLabel: { default: "Go home" }
|
|
1173
|
+
},
|
|
1174
|
+
setup(e) {
|
|
1175
|
+
let t = e, n = de(), { isDark: r } = Y(), i = X();
|
|
1176
|
+
function s() {
|
|
1177
|
+
n.push({ name: t.homeRouteName });
|
|
1178
|
+
}
|
|
1179
|
+
return (t, n) => (_(), a("div", Lt, [o("div", Rt, [
|
|
1180
|
+
c(w(ae), { class: f(["w-16 h-16 mx-auto mb-4", w(i).illustration]) }, null, 8, ["class"]),
|
|
1181
|
+
o("h1", { class: f(["text-4xl font-bold mb-2", w(r) ? "text-gray-200" : "text-gray-800"]) }, C(e.code), 3),
|
|
1182
|
+
o("p", { class: f(["text-lg mb-6", w(i).dimTextAlt]) }, C(e.message), 3),
|
|
1183
|
+
o("button", {
|
|
1184
|
+
onClick: s,
|
|
1185
|
+
class: f(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer", w(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1186
|
+
}, C(e.homeLabel), 3)
|
|
1187
|
+
])]));
|
|
1188
|
+
}
|
|
1189
|
+
}), $ = v(!1);
|
|
1190
|
+
function Bt() {
|
|
1191
|
+
function e() {
|
|
1192
|
+
$.value = !0;
|
|
1193
|
+
}
|
|
1194
|
+
function t() {
|
|
1195
|
+
$.value = !1;
|
|
1196
|
+
}
|
|
1197
|
+
function n() {
|
|
1198
|
+
$.value = !$.value;
|
|
1199
|
+
}
|
|
1200
|
+
return {
|
|
1201
|
+
mobileOpen: $,
|
|
1202
|
+
open: e,
|
|
1203
|
+
close: t,
|
|
1204
|
+
toggle: n
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
//#endregion
|
|
1208
|
+
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1209
|
+
var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }, Ut = { class: "px-5 pt-5 pb-4 flex items-center justify-center relative" }, Wt = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Gt = { class: "px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500" }, Kt = { class: "space-y-0.5" }, qt = ["aria-current", "onClick"], Jt = [
|
|
1210
|
+
"title",
|
|
1211
|
+
"aria-label",
|
|
1212
|
+
"aria-pressed"
|
|
1213
|
+
], Yt = /* @__PURE__ */ W(/* @__PURE__ */ l({
|
|
1214
|
+
__name: "BaseSidebar",
|
|
1215
|
+
props: {
|
|
1216
|
+
sections: {},
|
|
1217
|
+
homeRouteName: { default: "home" },
|
|
1218
|
+
appName: { default: "" },
|
|
1219
|
+
version: { default: "" },
|
|
1220
|
+
showThemeToggle: {
|
|
1221
|
+
type: Boolean,
|
|
1222
|
+
default: !0
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
setup(t) {
|
|
1226
|
+
let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } = Y(), { mobileOpen: x, close: T, toggle: E } = Bt(), D = v(null), k = null;
|
|
1227
|
+
O(x, async (e) => {
|
|
1228
|
+
e ? (k = document.activeElement instanceof HTMLElement ? document.activeElement : null, await d(), D.value?.focus()) : (k?.focus(), k = null);
|
|
1229
|
+
}), m(() => {}), g(() => {});
|
|
1230
|
+
function A() {
|
|
1231
|
+
l.push({ name: n.homeRouteName }), T();
|
|
1232
|
+
}
|
|
1233
|
+
function j(e) {
|
|
1234
|
+
return u.name === e;
|
|
1235
|
+
}
|
|
1236
|
+
function M(e) {
|
|
1237
|
+
l.push({ name: e }), T();
|
|
1238
|
+
}
|
|
1239
|
+
return (n, l) => (_(), a("div", null, [
|
|
1240
|
+
o("div", { class: f(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [o("button", {
|
|
1241
|
+
type: "button",
|
|
1242
|
+
onClick: A,
|
|
1243
|
+
class: "cursor-pointer",
|
|
1244
|
+
"aria-label": "Go to home"
|
|
1245
|
+
}, [b(n.$slots, "logo", { size: 28 }, void 0, !0)]), o("button", {
|
|
1246
|
+
type: "button",
|
|
1247
|
+
onClick: l[0] ||= (...e) => w(E) && w(E)(...e),
|
|
1248
|
+
class: f(["p-2 rounded-lg cursor-pointer", w(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1249
|
+
"aria-label": w(x) ? "Close navigation menu" : "Open navigation menu",
|
|
1250
|
+
"aria-expanded": w(x)
|
|
1251
|
+
}, [w(x) ? (_(), r(w(F), {
|
|
1252
|
+
key: 1,
|
|
1253
|
+
class: "w-6 h-6",
|
|
1254
|
+
"aria-hidden": "true"
|
|
1255
|
+
})) : (_(), r(w(N), {
|
|
1256
|
+
key: 0,
|
|
1257
|
+
class: "w-6 h-6",
|
|
1258
|
+
"aria-hidden": "true"
|
|
1259
|
+
}))], 10, Vt)], 2),
|
|
1260
|
+
w(x) ? (_(), a("div", {
|
|
1261
|
+
key: 0,
|
|
1262
|
+
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1263
|
+
"aria-hidden": "true",
|
|
1264
|
+
onClick: l[1] ||= (...e) => w(T) && w(T)(...e)
|
|
1265
|
+
})) : i("", !0),
|
|
1266
|
+
o("aside", {
|
|
1267
|
+
role: "navigation",
|
|
1268
|
+
"aria-label": "Main navigation",
|
|
1269
|
+
class: f(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-transform duration-300 lg:pointer-events-auto", [w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200", w(x) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50"]])
|
|
1270
|
+
}, [o("div", Ht, [
|
|
1271
|
+
o("div", Ut, [o("button", {
|
|
1272
|
+
type: "button",
|
|
1273
|
+
onClick: A,
|
|
1274
|
+
class: "cursor-pointer",
|
|
1275
|
+
"aria-label": "Go to home"
|
|
1276
|
+
}, [b(n.$slots, "logo", { size: 52 }, void 0, !0)]), o("button", {
|
|
1277
|
+
ref_key: "closeMobileButton",
|
|
1278
|
+
ref: D,
|
|
1279
|
+
type: "button",
|
|
1280
|
+
onClick: l[2] ||= (...e) => w(T) && w(T)(...e),
|
|
1281
|
+
class: f(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", w(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1282
|
+
"aria-label": "Close navigation menu"
|
|
1283
|
+
}, [c(w(F), {
|
|
1284
|
+
class: "w-5 h-5",
|
|
1285
|
+
"aria-hidden": "true"
|
|
1286
|
+
})], 2)]),
|
|
1287
|
+
o("nav", Wt, [(_(!0), a(e, null, y(t.sections, (t) => (_(), a("div", { key: t.title }, [o("p", Gt, C(t.title), 1), o("ul", Kt, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("li", { key: e.name }, [o("button", {
|
|
1288
|
+
type: "button",
|
|
1289
|
+
"aria-current": j(e.name) ? "page" : void 0,
|
|
1290
|
+
onClick: (t) => M(e.name),
|
|
1291
|
+
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(e.name) ? w(p) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1292
|
+
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10, qt)]))), 128))])]))), 128))]),
|
|
1293
|
+
o("div", { class: f(["px-4 py-4 border-t transition-colors space-y-3", w(p) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1294
|
+
t.showThemeToggle ? (_(), a("button", {
|
|
1295
|
+
key: 0,
|
|
1296
|
+
type: "button",
|
|
1297
|
+
onClick: l[3] ||= (...e) => w(h) && w(h)(...e),
|
|
1298
|
+
title: w(p) ? "Switch to light mode" : "Switch to dark mode",
|
|
1299
|
+
"aria-label": w(p) ? "Switch to light mode" : "Switch to dark mode",
|
|
1300
|
+
"aria-pressed": w(p),
|
|
1301
|
+
class: f(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1302
|
+
}, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10, Jt)) : i("", !0),
|
|
1303
|
+
b(n.$slots, "status", {}, void 0, !0),
|
|
1304
|
+
b(n.$slots, "footer", {}, () => [t.appName || t.version ? (_(), a("div", {
|
|
1305
|
+
key: 0,
|
|
1306
|
+
class: f(["flex items-center justify-center gap-2 text-xs", (w(p), "text-gray-500")])
|
|
1307
|
+
}, [o("span", null, [
|
|
1308
|
+
s(C(t.appName), 1),
|
|
1309
|
+
t.appName && t.version ? (_(), a(e, { key: 0 }, [], 64)) : i("", !0),
|
|
1310
|
+
t.version ? (_(), a(e, { key: 1 }, [s("v" + C(t.version), 1)], 64)) : i("", !0)
|
|
1311
|
+
])], 2)) : i("", !0)], !0)
|
|
1312
|
+
], 2)
|
|
1313
|
+
])], 2)
|
|
1314
|
+
]));
|
|
1315
|
+
}
|
|
1316
|
+
}), [["__scopeId", "data-v-e27f267e"]]), Xt = {
|
|
1317
|
+
key: 1,
|
|
1318
|
+
class: "mt-4 flex justify-center py-6"
|
|
1319
|
+
}, Zt = {
|
|
1320
|
+
key: 2,
|
|
1321
|
+
class: "mt-4 text-sm text-red-500",
|
|
1322
|
+
role: "alert"
|
|
1323
|
+
}, Qt = {
|
|
1324
|
+
key: 3,
|
|
1325
|
+
class: "mt-4"
|
|
1326
|
+
}, $t = { class: "relative" }, en = ["placeholder"], tn = {
|
|
1327
|
+
key: 4,
|
|
1328
|
+
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1329
|
+
}, nn = ["onClick"], rn = { class: "flex-1 min-w-0" }, an = {
|
|
1330
|
+
key: 0,
|
|
1331
|
+
class: "text-center py-6"
|
|
1332
|
+
}, on = {
|
|
1333
|
+
key: 1,
|
|
1334
|
+
class: "text-center py-6"
|
|
1335
|
+
}, sn = ["disabled"], cn = ["disabled"], ln = /* @__PURE__ */ l({
|
|
1336
|
+
__name: "BaseEntityPickerModal",
|
|
1337
|
+
props: {
|
|
1338
|
+
title: {},
|
|
1339
|
+
message: {},
|
|
1340
|
+
items: { default: () => [] },
|
|
1341
|
+
loader: {},
|
|
1342
|
+
excludeId: {},
|
|
1343
|
+
variant: { default: "emerald" },
|
|
1344
|
+
searchPlaceholder: { default: "Search..." },
|
|
1345
|
+
emptyMessage: { default: "No items available." },
|
|
1346
|
+
noMatchMessage: { default: "No items match your search." },
|
|
1347
|
+
confirmText: { default: "Select" },
|
|
1348
|
+
cancelText: { default: "Cancel" },
|
|
1349
|
+
submittingText: { default: "Working..." },
|
|
1350
|
+
submitting: {
|
|
1351
|
+
type: Boolean,
|
|
1352
|
+
default: !1
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
emits: ["confirm", "cancel"],
|
|
1356
|
+
setup(t, { emit: s }) {
|
|
1357
|
+
let l = t, u = s, { isDark: p } = Y(), h = X(), g = v([]), x = v(!1), S = v(""), T = v(null), D = v(""), O = v(null), j = n(() => {
|
|
1358
|
+
let e = l.loader ? g.value : l.items;
|
|
1359
|
+
return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
|
|
1360
|
+
}), M = n(() => j.value.filter((e) => e.label.toLowerCase().includes(D.value.toLowerCase()))), ee = {
|
|
1361
|
+
emerald: {
|
|
1362
|
+
iconBg: "bg-emerald-50",
|
|
1363
|
+
iconText: "text-emerald-600",
|
|
1364
|
+
inputFocus: "focus:border-emerald-500",
|
|
1365
|
+
selectedRow: "bg-emerald-50 border border-emerald-200",
|
|
1366
|
+
checkBg: "bg-emerald-600",
|
|
1367
|
+
confirmActive: "bg-emerald-600 hover:bg-emerald-700 cursor-pointer",
|
|
1368
|
+
confirmDisabled: "bg-emerald-400 cursor-not-allowed"
|
|
1369
|
+
},
|
|
1370
|
+
purple: {
|
|
1371
|
+
iconBg: "bg-purple-50",
|
|
1372
|
+
iconText: "text-purple-600",
|
|
1373
|
+
inputFocus: "focus:border-purple-500",
|
|
1374
|
+
selectedRow: "bg-purple-50 border border-purple-200",
|
|
1375
|
+
checkBg: "bg-purple-600",
|
|
1376
|
+
confirmActive: "bg-purple-600 hover:bg-purple-700 cursor-pointer",
|
|
1377
|
+
confirmDisabled: "bg-purple-400 cursor-not-allowed"
|
|
1378
|
+
},
|
|
1379
|
+
blue: {
|
|
1380
|
+
iconBg: "bg-blue-50",
|
|
1381
|
+
iconText: "text-blue-600",
|
|
1382
|
+
inputFocus: "focus:border-blue-500",
|
|
1383
|
+
selectedRow: "bg-blue-50 border border-blue-200",
|
|
1384
|
+
checkBg: "bg-blue-600",
|
|
1385
|
+
confirmActive: "bg-blue-600 hover:bg-blue-700 cursor-pointer",
|
|
1386
|
+
confirmDisabled: "bg-blue-400 cursor-not-allowed"
|
|
1387
|
+
},
|
|
1388
|
+
red: {
|
|
1389
|
+
iconBg: "bg-red-50",
|
|
1390
|
+
iconText: "text-red-600",
|
|
1391
|
+
inputFocus: "focus:border-red-500",
|
|
1392
|
+
selectedRow: "bg-red-50 border border-red-200",
|
|
1393
|
+
checkBg: "bg-red-600",
|
|
1394
|
+
confirmActive: "bg-red-600 hover:bg-red-700 cursor-pointer",
|
|
1395
|
+
confirmDisabled: "bg-red-400 cursor-not-allowed"
|
|
1396
|
+
},
|
|
1397
|
+
amber: {
|
|
1398
|
+
iconBg: "bg-amber-50",
|
|
1399
|
+
iconText: "text-amber-600",
|
|
1400
|
+
inputFocus: "focus:border-amber-500",
|
|
1401
|
+
selectedRow: "bg-amber-50 border border-amber-200",
|
|
1402
|
+
checkBg: "bg-amber-600",
|
|
1403
|
+
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1404
|
+
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1405
|
+
}
|
|
1406
|
+
}, te = {
|
|
1407
|
+
emerald: {
|
|
1408
|
+
iconBg: "bg-emerald-900/30",
|
|
1409
|
+
iconText: "text-emerald-400",
|
|
1410
|
+
inputFocus: "focus:border-emerald-500",
|
|
1411
|
+
selectedRow: "bg-emerald-500/15 border border-emerald-500/30",
|
|
1412
|
+
checkBg: "bg-emerald-600",
|
|
1413
|
+
confirmActive: "bg-emerald-600 hover:bg-emerald-700 cursor-pointer",
|
|
1414
|
+
confirmDisabled: "bg-emerald-400 cursor-not-allowed"
|
|
1415
|
+
},
|
|
1416
|
+
purple: {
|
|
1417
|
+
iconBg: "bg-purple-900/30",
|
|
1418
|
+
iconText: "text-purple-400",
|
|
1419
|
+
inputFocus: "focus:border-purple-500",
|
|
1420
|
+
selectedRow: "bg-purple-500/15 border border-purple-500/30",
|
|
1421
|
+
checkBg: "bg-purple-600",
|
|
1422
|
+
confirmActive: "bg-purple-600 hover:bg-purple-700 cursor-pointer",
|
|
1423
|
+
confirmDisabled: "bg-purple-400 cursor-not-allowed"
|
|
1424
|
+
},
|
|
1425
|
+
blue: {
|
|
1426
|
+
iconBg: "bg-blue-900/30",
|
|
1427
|
+
iconText: "text-blue-400",
|
|
1428
|
+
inputFocus: "focus:border-blue-500",
|
|
1429
|
+
selectedRow: "bg-blue-500/15 border border-blue-500/30",
|
|
1430
|
+
checkBg: "bg-blue-600",
|
|
1431
|
+
confirmActive: "bg-blue-600 hover:bg-blue-700 cursor-pointer",
|
|
1432
|
+
confirmDisabled: "bg-blue-400 cursor-not-allowed"
|
|
1433
|
+
},
|
|
1434
|
+
red: {
|
|
1435
|
+
iconBg: "bg-red-900/30",
|
|
1436
|
+
iconText: "text-red-400",
|
|
1437
|
+
inputFocus: "focus:border-red-500",
|
|
1438
|
+
selectedRow: "bg-red-500/15 border border-red-500/30",
|
|
1439
|
+
checkBg: "bg-red-600",
|
|
1440
|
+
confirmActive: "bg-red-600 hover:bg-red-700 cursor-pointer",
|
|
1441
|
+
confirmDisabled: "bg-red-400 cursor-not-allowed"
|
|
1442
|
+
},
|
|
1443
|
+
amber: {
|
|
1444
|
+
iconBg: "bg-amber-900/30",
|
|
1445
|
+
iconText: "text-amber-400",
|
|
1446
|
+
inputFocus: "focus:border-amber-500",
|
|
1447
|
+
selectedRow: "bg-amber-500/15 border border-amber-500/30",
|
|
1448
|
+
checkBg: "bg-amber-600",
|
|
1449
|
+
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1450
|
+
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1451
|
+
}
|
|
1452
|
+
}, N = n(() => (p.value ? te : ee)[l.variant]);
|
|
1453
|
+
m(async () => {
|
|
1454
|
+
if (l.loader) {
|
|
1455
|
+
x.value = !0;
|
|
1456
|
+
try {
|
|
1457
|
+
g.value = await l.loader();
|
|
1458
|
+
} catch {
|
|
1459
|
+
S.value = "Failed to load items";
|
|
1460
|
+
} finally {
|
|
1461
|
+
x.value = !1;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
await d(), O.value?.focus();
|
|
1465
|
+
});
|
|
1466
|
+
function ne() {
|
|
1467
|
+
!T.value || l.submitting || u("confirm", T.value);
|
|
1468
|
+
}
|
|
1469
|
+
function P() {
|
|
1470
|
+
l.submitting || u("cancel");
|
|
1471
|
+
}
|
|
1472
|
+
return (n, s) => (_(), r(Q, {
|
|
1473
|
+
title: t.title,
|
|
1474
|
+
"manual-close": t.submitting,
|
|
1475
|
+
onCancel: P
|
|
1476
|
+
}, {
|
|
1477
|
+
icon: k(() => [b(n.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", N.value.iconBg]) }, [c(w(oe), {
|
|
1478
|
+
class: f(["h-6 w-6", N.value.iconText]),
|
|
1479
|
+
"aria-hidden": "true"
|
|
1480
|
+
}, null, 8, ["class"])], 2)])]),
|
|
1481
|
+
footer: k(() => [o("button", {
|
|
1482
|
+
type: "button",
|
|
1483
|
+
disabled: t.submitting,
|
|
1484
|
+
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 disabled:opacity-50 disabled:cursor-not-allowed", w(h).ghostButton]),
|
|
1485
|
+
onClick: P
|
|
1486
|
+
}, C(t.cancelText), 11, sn), o("button", {
|
|
1487
|
+
type: "button",
|
|
1488
|
+
disabled: !T.value || t.submitting,
|
|
1489
|
+
class: f(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150", !T.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
|
|
1490
|
+
onClick: ne
|
|
1491
|
+
}, C(t.submitting ? t.submittingText : t.confirmText), 11, cn)]),
|
|
1492
|
+
default: k(() => [
|
|
1493
|
+
t.message ? (_(), a("p", {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
class: f(["text-sm", w(p) ? "text-gray-300" : "text-gray-600"])
|
|
1496
|
+
}, C(t.message), 3)) : i("", !0),
|
|
1497
|
+
x.value ? (_(), a("div", Xt, [c(qe)])) : S.value ? (_(), a("div", Zt, C(S.value), 1)) : i("", !0),
|
|
1498
|
+
!x.value && !S.value && j.value.length > 0 ? (_(), a("div", Qt, [o("div", $t, [c(w(ce), {
|
|
1499
|
+
class: f(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", w(h).dimText]),
|
|
1500
|
+
"aria-hidden": "true"
|
|
1501
|
+
}, null, 8, ["class"]), A(o("input", {
|
|
1502
|
+
ref_key: "searchInputRef",
|
|
1503
|
+
ref: O,
|
|
1504
|
+
"onUpdate:modelValue": s[0] ||= (e) => D.value = e,
|
|
1505
|
+
type: "text",
|
|
1506
|
+
placeholder: t.searchPlaceholder,
|
|
1507
|
+
class: f(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [w(p) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", N.value.inputFocus]])
|
|
1508
|
+
}, null, 10, en), [[E, D.value]])])])) : i("", !0),
|
|
1509
|
+
!x.value && !S.value ? (_(), a("div", tn, [(_(!0), a(e, null, y(M.value, (e) => (_(), a("div", {
|
|
1510
|
+
key: e.id,
|
|
1511
|
+
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors", [T.value === e.id ? N.value.selectedRow : w(p) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1512
|
+
onClick: (t) => T.value = e.id
|
|
1513
|
+
}, [
|
|
1514
|
+
c(w(oe), { class: f(["w-5 h-5 flex-shrink-0", w(h).dimText]) }, null, 8, ["class"]),
|
|
1515
|
+
o("div", rn, [o("p", { class: f(["text-sm font-medium truncate", w(h).bodyText]) }, C(e.label), 3)]),
|
|
1516
|
+
T.value === e.id ? (_(), a("div", {
|
|
1517
|
+
key: 0,
|
|
1518
|
+
class: f(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
|
|
1519
|
+
}, [...s[1] ||= [o("svg", {
|
|
1520
|
+
class: "w-3 h-3 text-white",
|
|
1521
|
+
fill: "none",
|
|
1522
|
+
viewBox: "0 0 24 24",
|
|
1523
|
+
stroke: "currentColor",
|
|
1524
|
+
"stroke-width": "3",
|
|
1525
|
+
"aria-hidden": "true"
|
|
1526
|
+
}, [o("path", {
|
|
1527
|
+
"stroke-linecap": "round",
|
|
1528
|
+
"stroke-linejoin": "round",
|
|
1529
|
+
d: "M5 13l4 4L19 7"
|
|
1530
|
+
})], -1)]], 2)) : i("", !0)
|
|
1531
|
+
], 10, nn))), 128)), j.value.length === 0 ? (_(), a("div", an, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.emptyMessage), 3)])) : M.value.length === 0 ? (_(), a("div", on, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.noMatchMessage), 3)])) : i("", !0)])) : i("", !0)
|
|
1532
|
+
]),
|
|
1533
|
+
_: 3
|
|
1534
|
+
}, 8, ["title", "manual-close"]));
|
|
1535
|
+
}
|
|
1536
|
+
}), un = {
|
|
1537
|
+
href: "#main-content",
|
|
1538
|
+
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1539
|
+
}, dn = ["inert"], fn = /* @__PURE__ */ l({
|
|
1540
|
+
__name: "BaseAppLayout",
|
|
1541
|
+
props: {
|
|
1542
|
+
showSidebar: {
|
|
1543
|
+
type: Boolean,
|
|
1544
|
+
default: !0
|
|
1545
|
+
},
|
|
1546
|
+
skipLinkLabel: { default: "Skip to main content" }
|
|
1547
|
+
},
|
|
1548
|
+
setup(e) {
|
|
1549
|
+
let t = e, { isDark: r } = Y(), { mobileOpen: s } = Bt(), c = n(() => t.showSidebar);
|
|
1550
|
+
return (t, n) => (_(), a("div", { class: f(["min-h-screen transition-colors duration-300", w(r) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1551
|
+
o("a", un, C(e.skipLinkLabel), 1),
|
|
1552
|
+
c.value ? b(t.$slots, "sidebar", { key: 0 }) : i("", !0),
|
|
1553
|
+
o("main", {
|
|
1554
|
+
id: "main-content",
|
|
1555
|
+
tabindex: "-1",
|
|
1556
|
+
inert: c.value && w(s) ? !0 : void 0,
|
|
1557
|
+
class: f(c.value ? "pt-14 lg:pt-0 lg:ml-60" : "")
|
|
1558
|
+
}, [b(t.$slots, "default")], 10, dn)
|
|
1559
|
+
], 2));
|
|
1560
|
+
}
|
|
986
1561
|
});
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1562
|
+
//#endregion
|
|
1563
|
+
//#region src/composables/useDebounce.ts
|
|
1564
|
+
function pn(e, t = 300) {
|
|
1565
|
+
let n = v(e.value), r = null;
|
|
1566
|
+
return O(e, (e) => {
|
|
1567
|
+
r && clearTimeout(r), r = setTimeout(() => {
|
|
1568
|
+
n.value = e, r = null;
|
|
1569
|
+
}, t);
|
|
1570
|
+
}), h(() => {
|
|
1571
|
+
r &&= (clearTimeout(r), null);
|
|
1572
|
+
}), n;
|
|
1573
|
+
}
|
|
1574
|
+
//#endregion
|
|
1575
|
+
//#region src/composables/useToast.ts
|
|
1576
|
+
function mn(e = 3e3) {
|
|
1577
|
+
let t = v(!1), n = v(""), r = v(G.SUCCESS), i = null;
|
|
1578
|
+
function a() {
|
|
1579
|
+
i &&= (clearTimeout(i), null);
|
|
1580
|
+
}
|
|
1581
|
+
function o(o, s = G.SUCCESS, c = e) {
|
|
1582
|
+
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
1583
|
+
t.value = !1, i = null;
|
|
1584
|
+
}, c);
|
|
1585
|
+
}
|
|
1586
|
+
return h(() => {
|
|
1587
|
+
a();
|
|
1588
|
+
}), {
|
|
1589
|
+
showToast: t,
|
|
1590
|
+
toastMessage: n,
|
|
1591
|
+
toastType: r,
|
|
1592
|
+
showToastMessage: o
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1595
|
+
//#endregion
|
|
1596
|
+
//#region src/enums/BaseBadgeEnum.ts
|
|
1597
|
+
var hn = /* @__PURE__ */ function(e) {
|
|
1598
|
+
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
1599
|
+
}({}), gn = {
|
|
1600
|
+
GET: "bg-blue-600",
|
|
1601
|
+
POST: "bg-emerald-600",
|
|
1602
|
+
PUT: "bg-amber-600",
|
|
1603
|
+
DELETE: "bg-red-600",
|
|
1604
|
+
PATCH: "bg-purple-600",
|
|
1605
|
+
HEAD: "bg-gray-600"
|
|
1606
|
+
}, _n = {
|
|
1607
|
+
GET: "bg-blue-500",
|
|
1608
|
+
POST: "bg-green-500",
|
|
1609
|
+
PUT: "bg-yellow-500",
|
|
1610
|
+
DELETE: "bg-red-500",
|
|
1611
|
+
PATCH: "bg-purple-500",
|
|
1612
|
+
HEAD: "bg-gray-500"
|
|
1016
1613
|
};
|
|
1614
|
+
function vn(e) {
|
|
1615
|
+
return e ? gn[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
1616
|
+
}
|
|
1617
|
+
function yn(e) {
|
|
1618
|
+
return e ? _n[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
1619
|
+
}
|
|
1620
|
+
function bn(e) {
|
|
1621
|
+
let t = e ?? 0;
|
|
1622
|
+
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
1623
|
+
}
|
|
1624
|
+
function xn(e, t) {
|
|
1625
|
+
let n = e ?? 200;
|
|
1626
|
+
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
1627
|
+
}
|
|
1628
|
+
//#endregion
|
|
1629
|
+
export { I as AlertEnum, he as BaseAlert, fn as BaseAppLayout, R as BaseBadge, hn as BaseBadgeEnum, be as BaseBreadcrumb, ke as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, Ot as BaseCollapsibleSection, Mt as BaseConfirmModal, ln as BaseEntityPickerModal, Ne as BaseLine, Pe as BaseLoginEnum, Ie as BaseLogo, H as BaseLogoEnum, He as BaseModal, U as BaseModalEnum, Q as BaseModalShell, zt as BaseNotFoundPage, Ue as BaseRow, Yt as BaseSidebar, qe as BaseSpinner, It as BaseTextInputModal, Ze as BaseToast, G as BaseToastEnum, $e as ColoredSquares, L as ColorsEnums, ot as EarningsCard, dt as EuroAmount, V as LineEnum, mt as Pagination, K as PositioningEnum, vt as TrendArrow, fe as getBaseColor, pe as getBaseColorOf, yn as methodBadgeBright, vn as methodBadgeSolid, bn as statusBadgeSolid, xn as statusBadgeTinted, pn as useDebouncedRef, Z as useEscapeKey, Bt as useMobileSidebar, Y as useTheme, X as useThemeClasses, mn as useToast };
|