mgv-backoffice 1.11.0 → 1.13.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 +11 -1
- package/dist/src/components/BaseButton.vue.d.ts +22 -0
- package/dist/src/components/BaseConfirmModal.vue.d.ts +16 -1
- package/dist/src/components/EarningsCard.vue.d.ts +11 -0
- package/dist/src/enums/BaseButtonEnum.d.ts +5 -1
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +391 -246
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +2 -1
- package/src/components/BaseButton.vue +172 -2
- package/src/components/BaseConfirmModal.vue +7 -0
- package/src/components/EarningsCard.test.ts +33 -0
- package/src/components/EarningsCard.vue +64 -10
- package/src/enums/BaseButtonEnum.ts +4 -0
- package/src/utils/pnl.test.ts +6 -0
- package/src/utils/pnl.ts +6 -1
- package/tailwind.safelist.css +17 -1
- package/tailwind.safelist.js +17 -0
package/dist/ui-lib.js
CHANGED
|
@@ -153,20 +153,46 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
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;
|
|
156
|
+
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.EMERALD = "EMERALD", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e.SKY = "SKY", e.GRAY = "GRAY", e.AMBER = "AMBER", e;
|
|
157
157
|
}({}), B = /* @__PURE__ */ function(e) {
|
|
158
158
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
159
|
-
}({}), xe =
|
|
159
|
+
}({}), V = v(!1), xe = !1, H = "mgv-theme";
|
|
160
|
+
function Se(e) {
|
|
161
|
+
if (!xe) {
|
|
162
|
+
if (xe = !0, H = e, typeof window < "u") {
|
|
163
|
+
let e = window.localStorage?.getItem(H);
|
|
164
|
+
e ? V.value = e === "dark" : typeof window.matchMedia == "function" && (V.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
165
|
+
}
|
|
166
|
+
typeof document < "u" && u(!0).run(() => {
|
|
167
|
+
O(V, (e) => {
|
|
168
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(H, e ? "dark" : "light");
|
|
169
|
+
}, { immediate: !0 });
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function U(e) {
|
|
174
|
+
Se(e?.storageKey ?? H);
|
|
175
|
+
function t() {
|
|
176
|
+
V.value = !V.value;
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
isDark: V,
|
|
180
|
+
toggleTheme: t
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/components/BaseButton.vue?vue&type=script&setup=true&lang.ts
|
|
185
|
+
var Ce = [
|
|
160
186
|
"type",
|
|
161
187
|
"disabled",
|
|
162
188
|
"onClick"
|
|
163
|
-
],
|
|
189
|
+
], we = {
|
|
164
190
|
key: 0,
|
|
165
191
|
class: "inline-flex items-center"
|
|
166
|
-
},
|
|
192
|
+
}, Te = { key: 1 }, Ee = { key: 2 }, De = ["type", "disabled"], Oe = {
|
|
167
193
|
key: 0,
|
|
168
194
|
class: "inline-flex items-center"
|
|
169
|
-
},
|
|
195
|
+
}, ke = { key: 1 }, Ae = { key: 2 }, je = /* @__PURE__ */ l({
|
|
170
196
|
__name: "BaseButton",
|
|
171
197
|
props: {
|
|
172
198
|
description: {
|
|
@@ -204,6 +230,16 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
204
230
|
type: Boolean,
|
|
205
231
|
required: !1
|
|
206
232
|
},
|
|
233
|
+
outline: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
required: !1,
|
|
236
|
+
default: !1
|
|
237
|
+
},
|
|
238
|
+
ghost: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
required: !1,
|
|
241
|
+
default: !1
|
|
242
|
+
},
|
|
207
243
|
isDisable: {
|
|
208
244
|
type: Boolean,
|
|
209
245
|
required: !1
|
|
@@ -218,37 +254,148 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
218
254
|
}
|
|
219
255
|
},
|
|
220
256
|
setup(e) {
|
|
221
|
-
let t = e;
|
|
222
|
-
function
|
|
223
|
-
let e =
|
|
224
|
-
|
|
257
|
+
let { isDark: t } = U(), n = e;
|
|
258
|
+
function s() {
|
|
259
|
+
let e = {
|
|
260
|
+
[z.BLUE]: {
|
|
261
|
+
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
262
|
+
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
263
|
+
},
|
|
264
|
+
[z.GREEN]: {
|
|
265
|
+
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
266
|
+
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
267
|
+
},
|
|
268
|
+
[z.EMERALD]: {
|
|
269
|
+
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
270
|
+
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
271
|
+
},
|
|
272
|
+
[z.RED]: {
|
|
273
|
+
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
274
|
+
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
275
|
+
},
|
|
276
|
+
[z.YELLOW]: {
|
|
277
|
+
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
278
|
+
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
279
|
+
},
|
|
280
|
+
[z.PURPLE]: {
|
|
281
|
+
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
282
|
+
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
283
|
+
},
|
|
284
|
+
[z.SKY]: {
|
|
285
|
+
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
286
|
+
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
287
|
+
},
|
|
288
|
+
[z.AMBER]: {
|
|
289
|
+
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
290
|
+
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
291
|
+
},
|
|
292
|
+
[z.GRAY]: {
|
|
293
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
294
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
295
|
+
},
|
|
296
|
+
[z.DARK]: {
|
|
297
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
298
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
299
|
+
},
|
|
300
|
+
[z.WHITE]: {
|
|
301
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
302
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
303
|
+
}
|
|
304
|
+
}, r = e[n.color] ?? e[z.BLUE], i = t.value ? r.dark : r.light;
|
|
305
|
+
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none border bg-transparent ${i}`;
|
|
306
|
+
}
|
|
307
|
+
function c() {
|
|
308
|
+
let e = {
|
|
309
|
+
[z.BLUE]: {
|
|
310
|
+
light: "text-blue-600 hover:bg-blue-50",
|
|
311
|
+
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
312
|
+
},
|
|
313
|
+
[z.GREEN]: {
|
|
314
|
+
light: "text-green-600 hover:bg-green-50",
|
|
315
|
+
dark: "text-green-400 hover:bg-green-500/10"
|
|
316
|
+
},
|
|
317
|
+
[z.EMERALD]: {
|
|
318
|
+
light: "text-emerald-600 hover:bg-emerald-50",
|
|
319
|
+
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
320
|
+
},
|
|
321
|
+
[z.SKY]: {
|
|
322
|
+
light: "text-sky-600 hover:bg-sky-50",
|
|
323
|
+
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
324
|
+
},
|
|
325
|
+
[z.RED]: {
|
|
326
|
+
light: "text-red-500 hover:bg-red-50",
|
|
327
|
+
dark: "text-red-400 hover:bg-red-500/10"
|
|
328
|
+
},
|
|
329
|
+
[z.AMBER]: {
|
|
330
|
+
light: "text-amber-700 hover:bg-amber-50",
|
|
331
|
+
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
332
|
+
},
|
|
333
|
+
[z.YELLOW]: {
|
|
334
|
+
light: "text-yellow-600 hover:bg-yellow-50",
|
|
335
|
+
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
336
|
+
},
|
|
337
|
+
[z.PURPLE]: {
|
|
338
|
+
light: "text-purple-600 hover:bg-purple-50",
|
|
339
|
+
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
340
|
+
},
|
|
341
|
+
[z.GRAY]: {
|
|
342
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
343
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
344
|
+
},
|
|
345
|
+
[z.DARK]: {
|
|
346
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
347
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
348
|
+
},
|
|
349
|
+
[z.WHITE]: {
|
|
350
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
351
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
352
|
+
}
|
|
353
|
+
}, r = e[n.color] ?? e[z.GRAY], i = t.value ? r.dark : r.light;
|
|
354
|
+
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none bg-transparent ${i} cursor-pointer`;
|
|
355
|
+
}
|
|
356
|
+
function l() {
|
|
357
|
+
let e = n.isDisable || n.isLoading, t;
|
|
358
|
+
switch (n.color) {
|
|
225
359
|
case z.BLUE:
|
|
226
|
-
|
|
360
|
+
t = 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
361
|
break;
|
|
228
362
|
case z.WHITE:
|
|
229
|
-
|
|
363
|
+
t = 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
364
|
break;
|
|
231
365
|
case z.DARK:
|
|
232
|
-
|
|
366
|
+
t = 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
367
|
break;
|
|
234
368
|
case z.GREEN:
|
|
235
|
-
|
|
369
|
+
t = 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";
|
|
370
|
+
break;
|
|
371
|
+
case z.EMERALD:
|
|
372
|
+
t = e ? "text-white bg-emerald-400 cursor-not-allowed" : "focus:outline-none text-white bg-emerald-600 hover:bg-emerald-700 focus:ring-4 focus:ring-emerald-300";
|
|
236
373
|
break;
|
|
237
374
|
case z.RED:
|
|
238
|
-
|
|
375
|
+
t = 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
376
|
break;
|
|
240
377
|
case z.YELLOW:
|
|
241
|
-
|
|
378
|
+
t = 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
379
|
break;
|
|
243
380
|
case z.PURPLE:
|
|
244
|
-
|
|
381
|
+
t = 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";
|
|
382
|
+
break;
|
|
383
|
+
case z.SKY:
|
|
384
|
+
t = e ? "text-white bg-sky-400 cursor-not-allowed" : "focus:outline-none text-white bg-sky-600 hover:bg-sky-700 focus:ring-4 focus:ring-sky-300";
|
|
385
|
+
break;
|
|
386
|
+
case z.AMBER:
|
|
387
|
+
t = e ? "text-white bg-amber-300 cursor-not-allowed" : "focus:outline-none text-white bg-amber-500 hover:bg-amber-600 focus:ring-4 focus:ring-amber-300";
|
|
388
|
+
break;
|
|
389
|
+
case z.GRAY:
|
|
390
|
+
t = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-600 hover:bg-gray-700 focus:ring-4 focus:ring-gray-300";
|
|
245
391
|
break;
|
|
246
392
|
default:
|
|
247
|
-
|
|
393
|
+
t = 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
394
|
break;
|
|
249
395
|
}
|
|
396
|
+
n.outline && (t = s()), n.ghost && (t = c());
|
|
250
397
|
let r = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
251
|
-
switch (
|
|
398
|
+
switch (n.size) {
|
|
252
399
|
case B.EXTRA_SMALL:
|
|
253
400
|
r = "px-3 py-2 text-xs";
|
|
254
401
|
break;
|
|
@@ -266,25 +413,25 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
266
413
|
break;
|
|
267
414
|
}
|
|
268
415
|
let i = "rounded-lg";
|
|
269
|
-
return
|
|
416
|
+
return n.isRounded && (i = "rounded-full"), "inline-flex items-center " + r + " " + t + " font-medium " + i;
|
|
270
417
|
}
|
|
271
|
-
return (
|
|
272
|
-
let
|
|
273
|
-
return e.to ? (_(), r(
|
|
418
|
+
return (t, s) => {
|
|
419
|
+
let c = x("router-link");
|
|
420
|
+
return e.to ? (_(), r(c, {
|
|
274
421
|
key: 0,
|
|
275
422
|
to: e.to,
|
|
276
423
|
custom: ""
|
|
277
424
|
}, {
|
|
278
425
|
default: k(({ navigate: r }) => [o("button", {
|
|
279
|
-
type:
|
|
280
|
-
class: f(
|
|
426
|
+
type: n.type,
|
|
427
|
+
class: f(l()),
|
|
281
428
|
disabled: e.isDisable || e.isLoading,
|
|
282
429
|
onClick: r
|
|
283
430
|
}, [
|
|
284
|
-
e.isLoading ? (_(), a("div",
|
|
431
|
+
e.isLoading ? (_(), a("div", we, [...s[0] ||= [o("svg", {
|
|
285
432
|
"aria-hidden": "true",
|
|
286
433
|
role: "status",
|
|
287
|
-
class: "inline w-4 h-4 me-3
|
|
434
|
+
class: "inline w-4 h-4 me-3 animate-spin",
|
|
288
435
|
viewBox: "0 0 100 101",
|
|
289
436
|
fill: "none",
|
|
290
437
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -295,21 +442,21 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
295
442
|
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
443
|
fill: "currentColor"
|
|
297
444
|
})], -1)]])) : i("", !0),
|
|
298
|
-
e.iconLeft ? i("", !0) : (_(), a("span",
|
|
299
|
-
b(
|
|
300
|
-
e.iconLeft ? (_(), a("span",
|
|
301
|
-
], 10,
|
|
445
|
+
e.iconLeft ? i("", !0) : (_(), a("span", Te, C(e.description), 1)),
|
|
446
|
+
b(t.$slots, "default"),
|
|
447
|
+
e.iconLeft ? (_(), a("span", Ee, C(e.description), 1)) : i("", !0)
|
|
448
|
+
], 10, Ce)]),
|
|
302
449
|
_: 3
|
|
303
450
|
}, 8, ["to"])) : (_(), a("button", {
|
|
304
451
|
key: 1,
|
|
305
|
-
type:
|
|
306
|
-
class: f(
|
|
452
|
+
type: n.type,
|
|
453
|
+
class: f(l()),
|
|
307
454
|
disabled: e.isDisable || e.isLoading
|
|
308
455
|
}, [
|
|
309
|
-
e.isLoading ? (_(), a("div",
|
|
456
|
+
e.isLoading ? (_(), a("div", Oe, [...s[1] ||= [o("svg", {
|
|
310
457
|
"aria-hidden": "true",
|
|
311
458
|
role: "status",
|
|
312
|
-
class: "inline w-4 h-4 me-3
|
|
459
|
+
class: "inline w-4 h-4 me-3 animate-spin",
|
|
313
460
|
viewBox: "0 0 100 101",
|
|
314
461
|
fill: "none",
|
|
315
462
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -320,58 +467,58 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
320
467
|
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
468
|
fill: "currentColor"
|
|
322
469
|
})], -1)]])) : i("", !0),
|
|
323
|
-
e.iconLeft ? i("", !0) : (_(), a("span",
|
|
324
|
-
b(
|
|
325
|
-
e.iconLeft ? (_(), a("span",
|
|
326
|
-
], 10,
|
|
470
|
+
e.iconLeft ? i("", !0) : (_(), a("span", ke, C(e.description), 1)),
|
|
471
|
+
b(t.$slots, "default"),
|
|
472
|
+
e.iconLeft ? (_(), a("span", Ae, C(e.description), 1)) : i("", !0)
|
|
473
|
+
], 10, De));
|
|
327
474
|
};
|
|
328
475
|
}
|
|
329
|
-
}),
|
|
476
|
+
}), W = /* @__PURE__ */ function(e) {
|
|
330
477
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
331
|
-
}({}),
|
|
478
|
+
}({}), Me = {
|
|
332
479
|
key: 0,
|
|
333
480
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
334
|
-
},
|
|
481
|
+
}, Ne = {
|
|
335
482
|
key: 1,
|
|
336
483
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
337
|
-
},
|
|
484
|
+
}, Pe = {
|
|
338
485
|
key: 2,
|
|
339
486
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
340
|
-
},
|
|
487
|
+
}, Fe = /* @__PURE__ */ l({
|
|
341
488
|
__name: "BaseLine",
|
|
342
489
|
props: { mode: {
|
|
343
490
|
type: String,
|
|
344
491
|
required: !1,
|
|
345
|
-
default:
|
|
492
|
+
default: W.BASE
|
|
346
493
|
} },
|
|
347
494
|
setup(t) {
|
|
348
495
|
return (n, r) => (_(), a(e, null, [
|
|
349
|
-
t.mode === w(
|
|
350
|
-
t.mode === w(
|
|
351
|
-
t.mode === w(
|
|
496
|
+
t.mode === w(W).BASE ? (_(), a("hr", Me)) : i("", !0),
|
|
497
|
+
t.mode === w(W).BASE_SHORTER ? (_(), a("hr", Ne)) : i("", !0),
|
|
498
|
+
t.mode === w(W).SQUARE ? (_(), a("hr", Pe)) : i("", !0)
|
|
352
499
|
], 64));
|
|
353
500
|
}
|
|
354
|
-
}),
|
|
501
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
355
502
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
356
|
-
}({}),
|
|
503
|
+
}({}), Ie = G, Le = ["height", "width"], Re = /* @__PURE__ */ l({
|
|
357
504
|
__name: "BaseLogo",
|
|
358
505
|
props: { size: {
|
|
359
506
|
type: String,
|
|
360
507
|
required: !1,
|
|
361
|
-
default:
|
|
508
|
+
default: G.MEDIUM
|
|
362
509
|
} },
|
|
363
510
|
setup(e) {
|
|
364
511
|
let t = e;
|
|
365
512
|
function n() {
|
|
366
513
|
let e = "";
|
|
367
514
|
switch (t.size) {
|
|
368
|
-
case
|
|
515
|
+
case G.SMALL:
|
|
369
516
|
e = "50px";
|
|
370
517
|
break;
|
|
371
|
-
case
|
|
518
|
+
case G.MEDIUM:
|
|
372
519
|
e = "100px";
|
|
373
520
|
break;
|
|
374
|
-
case
|
|
521
|
+
case G.LARGE:
|
|
375
522
|
e = "150px";
|
|
376
523
|
break;
|
|
377
524
|
}
|
|
@@ -533,17 +680,17 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
533
680
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
534
681
|
fill: "url(#k)"
|
|
535
682
|
}, null, -1)
|
|
536
|
-
]], 8,
|
|
683
|
+
]], 8, Le))]),
|
|
537
684
|
_: 1
|
|
538
685
|
});
|
|
539
686
|
};
|
|
540
687
|
}
|
|
541
|
-
}),
|
|
688
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
542
689
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
543
|
-
}({}),
|
|
690
|
+
}({}), ze = ["aria-labelledby"], Be = {
|
|
544
691
|
key: 0,
|
|
545
692
|
class: "p-6 text-center"
|
|
546
|
-
},
|
|
693
|
+
}, Ve = ["id"], He = { class: "flex justify-center" }, Ue = /* @__PURE__ */ l({
|
|
547
694
|
__name: "BaseModal",
|
|
548
695
|
props: {
|
|
549
696
|
title: {
|
|
@@ -562,7 +709,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
562
709
|
mode: {
|
|
563
710
|
type: String,
|
|
564
711
|
required: !1,
|
|
565
|
-
default:
|
|
712
|
+
default: K.SUCCESS
|
|
566
713
|
}
|
|
567
714
|
},
|
|
568
715
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -585,13 +732,13 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
585
732
|
role: "dialog",
|
|
586
733
|
"aria-modal": "true",
|
|
587
734
|
"aria-labelledby": "modal-title-" + t.title
|
|
588
|
-
}, [t.mode === w(
|
|
735
|
+
}, [t.mode === w(K).DELETE ? (_(), a("div", Be, [
|
|
589
736
|
c(w(ae), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
590
737
|
o("h3", {
|
|
591
738
|
id: "modal-title-" + t.title,
|
|
592
739
|
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,
|
|
594
|
-
o("div",
|
|
740
|
+
}, " Are you sure you want to delete this " + C(t.title) + "? ", 9, Ve),
|
|
741
|
+
o("div", He, [c(s, {
|
|
595
742
|
color: w(z).RED,
|
|
596
743
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
597
744
|
description: "Yes, I'm sure"
|
|
@@ -600,14 +747,14 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
600
747
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
601
748
|
description: "No, cancel"
|
|
602
749
|
}, null, 8, ["color"])])
|
|
603
|
-
])) : i("", !0)], 8,
|
|
750
|
+
])) : i("", !0)], 8, ze)], 64);
|
|
604
751
|
};
|
|
605
752
|
}
|
|
606
|
-
}),
|
|
753
|
+
}), q = (e, t) => {
|
|
607
754
|
let n = e.__vccOpts || e;
|
|
608
755
|
for (let [e, r] of t) n[e] = r;
|
|
609
756
|
return n;
|
|
610
|
-
},
|
|
757
|
+
}, We = /* @__PURE__ */ q(Ue, [["__scopeId", "data-v-1db4f0ac"]]), Ge = /* @__PURE__ */ l({
|
|
611
758
|
__name: "BaseRow",
|
|
612
759
|
props: { bgColor: {
|
|
613
760
|
type: String,
|
|
@@ -621,7 +768,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
621
768
|
}
|
|
622
769
|
return (e, t) => (_(), a("div", { class: f(n()) }, [b(e.$slots, "default")], 2));
|
|
623
770
|
}
|
|
624
|
-
}),
|
|
771
|
+
}), Ke = /* @__PURE__ */ l({
|
|
625
772
|
__name: "BaseSpinner",
|
|
626
773
|
props: {
|
|
627
774
|
size: { default: "sm" },
|
|
@@ -649,17 +796,17 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
649
796
|
"aria-label": "Loading"
|
|
650
797
|
}, null, 2));
|
|
651
798
|
}
|
|
652
|
-
}),
|
|
799
|
+
}), J = /* @__PURE__ */ function(e) {
|
|
653
800
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
654
|
-
}({}),
|
|
801
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
655
802
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
656
|
-
}({}),
|
|
803
|
+
}({}), qe = { 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" }, Je = { class: "ml-3 text-sm font-normal" }, Ye = {
|
|
657
804
|
key: 3,
|
|
658
805
|
type: "button",
|
|
659
806
|
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",
|
|
660
807
|
"data-dismiss-target": "#toast-danger",
|
|
661
808
|
"aria-label": "Close"
|
|
662
|
-
},
|
|
809
|
+
}, Xe = /* @__PURE__ */ l({
|
|
663
810
|
__name: "BaseToast",
|
|
664
811
|
props: {
|
|
665
812
|
mode: {
|
|
@@ -678,7 +825,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
678
825
|
positioning: {
|
|
679
826
|
type: String,
|
|
680
827
|
required: !1,
|
|
681
|
-
default:
|
|
828
|
+
default: Y.TOP_RIGHT
|
|
682
829
|
},
|
|
683
830
|
duration: {
|
|
684
831
|
type: Number,
|
|
@@ -699,13 +846,13 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
699
846
|
function l() {
|
|
700
847
|
let e = "";
|
|
701
848
|
switch (t.mode) {
|
|
702
|
-
case
|
|
849
|
+
case J.ERROR:
|
|
703
850
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
704
851
|
break;
|
|
705
|
-
case
|
|
852
|
+
case J.SUCCESS:
|
|
706
853
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
707
854
|
break;
|
|
708
|
-
case
|
|
855
|
+
case J.WARNING:
|
|
709
856
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
710
857
|
break;
|
|
711
858
|
default:
|
|
@@ -717,16 +864,16 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
717
864
|
function u() {
|
|
718
865
|
let e = "top-5 right-5";
|
|
719
866
|
switch (t.positioning) {
|
|
720
|
-
case
|
|
867
|
+
case Y.BOTTOM_LEFT:
|
|
721
868
|
e = "bottom-5 left-5";
|
|
722
869
|
break;
|
|
723
|
-
case
|
|
870
|
+
case Y.TOP_LEFT:
|
|
724
871
|
e = "top-5 left-5";
|
|
725
872
|
break;
|
|
726
|
-
case
|
|
873
|
+
case Y.TOP_RIGHT:
|
|
727
874
|
e = "top-5 right-5";
|
|
728
875
|
break;
|
|
729
|
-
case
|
|
876
|
+
case Y.BOTTOM_RIGHT:
|
|
730
877
|
e = "bottom-5 right-5";
|
|
731
878
|
break;
|
|
732
879
|
}
|
|
@@ -737,25 +884,25 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
737
884
|
id: "toast-top-right",
|
|
738
885
|
class: f(u()),
|
|
739
886
|
role: "alert"
|
|
740
|
-
}, [o("div",
|
|
741
|
-
e.mode == w(
|
|
887
|
+
}, [o("div", qe, [
|
|
888
|
+
e.mode == w(J).ERROR ? (_(), a("div", {
|
|
742
889
|
key: 0,
|
|
743
890
|
class: f(l())
|
|
744
|
-
}, [c(w(ae), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(
|
|
891
|
+
}, [c(w(ae), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(J).SUCCESS ? (_(), a("div", {
|
|
745
892
|
key: 1,
|
|
746
893
|
class: f(l())
|
|
747
|
-
}, [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(
|
|
894
|
+
}, [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(J).WARNING ? (_(), a("div", {
|
|
748
895
|
key: 2,
|
|
749
896
|
class: f(l())
|
|
750
897
|
}, [c(w(P), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= o("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : i("", !0),
|
|
751
|
-
o("div",
|
|
752
|
-
e.hasCloseIcon ? (_(), a("button",
|
|
898
|
+
o("div", Je, C(e.description), 1),
|
|
899
|
+
e.hasCloseIcon ? (_(), a("button", Ye, [r[3] ||= o("span", { class: "sr-only" }, "Close", -1), c(w(F), {
|
|
753
900
|
class: "h-6 w-6 text-gray-500 cursor-pointer",
|
|
754
901
|
onClick: s
|
|
755
902
|
})])) : i("", !0)
|
|
756
903
|
])], 2)) : i("", !0);
|
|
757
904
|
}
|
|
758
|
-
}),
|
|
905
|
+
}), Ze = { class: "w-13" }, Qe = /* @__PURE__ */ l({
|
|
759
906
|
__name: "ColoredSquares",
|
|
760
907
|
props: { color: {
|
|
761
908
|
type: String,
|
|
@@ -794,12 +941,9 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
794
941
|
}
|
|
795
942
|
return "font-bold bg-" + e + "-100 text-" + e + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
796
943
|
}
|
|
797
|
-
return (e, t) => (_(), a("div",
|
|
944
|
+
return (e, t) => (_(), a("div", Ze, [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)]));
|
|
798
945
|
}
|
|
799
|
-
}),
|
|
800
|
-
key: 0,
|
|
801
|
-
class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500 dark:bg-orange-900/40 dark:text-orange-400"
|
|
802
|
-
}, $e = { class: "flex items-start justify-between" }, et = { class: "text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, tt = { class: "mt-1 text-4xl font-bold text-gray-400 dark:text-slate-300" }, nt = { class: "mt-1 text-sm font-medium text-orange-400 dark:text-orange-400" }, rt = /* @__PURE__ */ l({
|
|
946
|
+
}), $e = { class: "flex items-start justify-between" }, et = { class: "text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, tt = /* @__PURE__ */ l({
|
|
803
947
|
__name: "EarningsCard",
|
|
804
948
|
props: {
|
|
805
949
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -807,31 +951,55 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
807
951
|
subtitle: { default: "Lifetime commission" },
|
|
808
952
|
badge: { default: "" },
|
|
809
953
|
currency: { default: "$" },
|
|
810
|
-
decimals: { default: 2 }
|
|
954
|
+
decimals: { default: 2 },
|
|
955
|
+
accent: { default: "orange" }
|
|
811
956
|
},
|
|
812
957
|
setup(e) {
|
|
813
|
-
let t = e, r =
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
958
|
+
let t = e, r = {
|
|
959
|
+
orange: {
|
|
960
|
+
border: "border-orange-300 dark:border-orange-700",
|
|
961
|
+
badge: "bg-orange-100 text-orange-500 dark:bg-orange-900/40 dark:text-orange-400",
|
|
962
|
+
amount: "text-gray-400 dark:text-slate-300",
|
|
963
|
+
subtitle: "text-orange-400 dark:text-orange-400",
|
|
964
|
+
iconBox: "bg-orange-50 dark:bg-orange-900/30",
|
|
965
|
+
icon: "text-orange-400"
|
|
966
|
+
},
|
|
967
|
+
emerald: {
|
|
968
|
+
border: "border-emerald-300 dark:border-emerald-700",
|
|
969
|
+
badge: "bg-emerald-100 text-emerald-600 dark:bg-emerald-900/40 dark:text-emerald-400",
|
|
970
|
+
amount: "text-emerald-500 dark:text-emerald-400",
|
|
971
|
+
subtitle: "text-emerald-500 dark:text-emerald-400",
|
|
972
|
+
iconBox: "bg-emerald-50 dark:bg-emerald-900/30",
|
|
973
|
+
icon: "text-emerald-500"
|
|
974
|
+
}
|
|
975
|
+
}, s = n(() => r[t.accent]), c = n(() => {
|
|
976
|
+
let e = Number.isFinite(t.amount) ? t.amount : 0;
|
|
977
|
+
return t.currency + e.toLocaleString("en-US", {
|
|
978
|
+
minimumFractionDigits: t.decimals,
|
|
979
|
+
maximumFractionDigits: t.decimals
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
return (t, n) => (_(), a("div", { class: f(["relative rounded-xl border-2 border-dashed bg-white p-6 dark:bg-slate-800", s.value.border]) }, [e.badge ? (_(), a("div", {
|
|
983
|
+
key: 0,
|
|
984
|
+
class: f(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", s.value.badge])
|
|
985
|
+
}, C(e.badge), 3)) : i("", !0), o("div", $e, [o("div", null, [
|
|
818
986
|
o("p", et, C(e.title), 1),
|
|
819
|
-
o("p",
|
|
820
|
-
o("p",
|
|
821
|
-
]),
|
|
822
|
-
class: "h-6 w-6
|
|
987
|
+
o("p", { class: f(["mt-1 text-4xl font-bold", s.value.amount]) }, C(c.value), 3),
|
|
988
|
+
o("p", { class: f(["mt-1 text-sm font-medium", s.value.subtitle]) }, C(e.subtitle), 3)
|
|
989
|
+
]), o("div", { class: f(["mt-6 flex h-12 w-12 items-center justify-center rounded-xl", s.value.iconBox]) }, [(_(), a("svg", {
|
|
990
|
+
class: f(["h-6 w-6", s.value.icon]),
|
|
823
991
|
viewBox: "0 0 24 24",
|
|
824
992
|
fill: "none",
|
|
825
993
|
stroke: "currentColor",
|
|
826
994
|
"stroke-width": "2.5",
|
|
827
995
|
"stroke-linecap": "round",
|
|
828
996
|
"stroke-linejoin": "round"
|
|
829
|
-
}, [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }), o("polyline", { points: "16 7 22 7 22 13" })])],
|
|
997
|
+
}, [...n[0] ||= [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), o("polyline", { points: "16 7 22 7 22 13" }, null, -1)]], 2))], 2)])], 2));
|
|
830
998
|
}
|
|
831
|
-
}),
|
|
999
|
+
}), nt = {
|
|
832
1000
|
key: 0,
|
|
833
1001
|
class: "font-bold text-green-800"
|
|
834
|
-
},
|
|
1002
|
+
}, rt = { key: 0 }, it = { key: 0 }, at = "font-bold", ot = /* @__PURE__ */ l({
|
|
835
1003
|
__name: "EuroAmount",
|
|
836
1004
|
props: {
|
|
837
1005
|
amount: {
|
|
@@ -851,15 +1019,15 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
851
1019
|
},
|
|
852
1020
|
setup(t) {
|
|
853
1021
|
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));
|
|
854
|
-
return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span",
|
|
1022
|
+
return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span", nt, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", rt, "€")) : i("", !0)])) : i("", !0), o.value && !d.value ? (_(), a("span", {
|
|
855
1023
|
key: 1,
|
|
856
|
-
class: f([
|
|
857
|
-
}, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span",
|
|
1024
|
+
class: f([at, u.value ? "text-red-800" : "text-gray-800"])
|
|
1025
|
+
}, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", it, "€")) : i("", !0)], 2)) : i("", !0)], 64));
|
|
858
1026
|
}
|
|
859
|
-
}),
|
|
1027
|
+
}), st = ["onClick", "onKeydown"], ct = {
|
|
860
1028
|
key: 1,
|
|
861
1029
|
style: { cursor: "not-allowed" }
|
|
862
|
-
},
|
|
1030
|
+
}, lt = /* @__PURE__ */ q(/* @__PURE__ */ l({
|
|
863
1031
|
__name: "Pagination",
|
|
864
1032
|
props: {
|
|
865
1033
|
totalItems: {
|
|
@@ -902,15 +1070,15 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
902
1070
|
onClick: (t) => d(e),
|
|
903
1071
|
onKeydown: j((t) => d(e), ["enter"]),
|
|
904
1072
|
class: f({ active: e === s.value })
|
|
905
|
-
}, C(e), 43,
|
|
1073
|
+
}, C(e), 43, st)), e === 0 ? (_(), a("span", ct, "...")) : i("", !0)]))), 128))])]));
|
|
906
1074
|
}
|
|
907
|
-
}), [["__scopeId", "data-v-d7ebb6ac"]]),
|
|
1075
|
+
}), [["__scopeId", "data-v-d7ebb6ac"]]), ut = { key: 0 }, dt = {
|
|
908
1076
|
key: 0,
|
|
909
1077
|
class: "flex items-center space-x-2"
|
|
910
|
-
},
|
|
1078
|
+
}, ft = {
|
|
911
1079
|
key: 1,
|
|
912
1080
|
class: "flex items-center space-x-2"
|
|
913
|
-
},
|
|
1081
|
+
}, pt = /* @__PURE__ */ l({
|
|
914
1082
|
__name: "TrendArrow",
|
|
915
1083
|
props: {
|
|
916
1084
|
number: {
|
|
@@ -924,42 +1092,19 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
924
1092
|
},
|
|
925
1093
|
setup(e) {
|
|
926
1094
|
let t = e, r = n(() => t.number !== null && t.number !== void 0 && t.number < 0);
|
|
927
|
-
return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div",
|
|
1095
|
+
return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div", ut, [r.value ? (_(), a("span", dt, [c(R, { color: w(L).RED }, {
|
|
928
1096
|
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
929
1097
|
_: 1
|
|
930
|
-
}, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span",
|
|
1098
|
+
}, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span", ft, [c(R, { color: w(L).GREEN }, {
|
|
931
1099
|
default: k(() => [s(C(e.number) + C(t.icon), 1)]),
|
|
932
1100
|
_: 1
|
|
933
1101
|
}, 8, ["color"]), c(w(te), { class: "h-5 w-5 text-green-500" })]))])) : i("", !0);
|
|
934
1102
|
}
|
|
935
|
-
})
|
|
936
|
-
function _t(e) {
|
|
937
|
-
if (!gt) {
|
|
938
|
-
if (gt = !0, J = e, typeof window < "u") {
|
|
939
|
-
let e = window.localStorage?.getItem(J);
|
|
940
|
-
e ? q.value = e === "dark" : typeof window.matchMedia == "function" && (q.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
941
|
-
}
|
|
942
|
-
typeof document < "u" && u(!0).run(() => {
|
|
943
|
-
O(q, (e) => {
|
|
944
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(J, e ? "dark" : "light");
|
|
945
|
-
}, { immediate: !0 });
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
function Y(e) {
|
|
950
|
-
_t(e?.storageKey ?? J);
|
|
951
|
-
function t() {
|
|
952
|
-
q.value = !q.value;
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
isDark: q,
|
|
956
|
-
toggleTheme: t
|
|
957
|
-
};
|
|
958
|
-
}
|
|
1103
|
+
});
|
|
959
1104
|
//#endregion
|
|
960
1105
|
//#region src/composables/useThemeClasses.ts
|
|
961
1106
|
function X() {
|
|
962
|
-
let { isDark: e } =
|
|
1107
|
+
let { isDark: e } = U();
|
|
963
1108
|
return {
|
|
964
1109
|
card: n(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
965
1110
|
cardAlt: n(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
@@ -994,7 +1139,7 @@ function Z(e) {
|
|
|
994
1139
|
}
|
|
995
1140
|
//#endregion
|
|
996
1141
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
997
|
-
var
|
|
1142
|
+
var mt = { class: "p-6" }, ht = { class: "flex items-start gap-4" }, gt = { class: "flex-1" }, _t = { class: "mt-4" }, vt = { class: "mt-6 flex gap-3 justify-end" }, Q = /* @__PURE__ */ l({
|
|
998
1143
|
__name: "BaseModalShell",
|
|
999
1144
|
props: {
|
|
1000
1145
|
title: {},
|
|
@@ -1006,7 +1151,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1006
1151
|
},
|
|
1007
1152
|
emits: ["cancel", "backdrop"],
|
|
1008
1153
|
setup(e, { emit: i }) {
|
|
1009
|
-
let a = e, s = i, { isDark: c } =
|
|
1154
|
+
let a = e, s = i, { isDark: c } = U(), 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");
|
|
1010
1155
|
function p() {
|
|
1011
1156
|
s("backdrop"), a.manualClose || s("cancel");
|
|
1012
1157
|
}
|
|
@@ -1021,16 +1166,16 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1021
1166
|
}, [o("div", {
|
|
1022
1167
|
class: f(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, d.value]]),
|
|
1023
1168
|
onClick: i[0] ||= M(() => {}, ["stop"])
|
|
1024
|
-
}, [o("div",
|
|
1025
|
-
o("div",
|
|
1169
|
+
}, [o("div", mt, [
|
|
1170
|
+
o("div", ht, [b(n.$slots, "icon"), o("div", gt, [o("h3", {
|
|
1026
1171
|
id: u,
|
|
1027
1172
|
class: f(["text-lg font-medium", w(l).primaryText])
|
|
1028
1173
|
}, C(e.title), 3)])]),
|
|
1029
|
-
o("div",
|
|
1030
|
-
o("div",
|
|
1174
|
+
o("div", _t, [b(n.$slots, "default")]),
|
|
1175
|
+
o("div", vt, [b(n.$slots, "footer")])
|
|
1031
1176
|
])], 2)])]));
|
|
1032
1177
|
}
|
|
1033
|
-
}),
|
|
1178
|
+
}), yt = ["aria-expanded"], bt = { class: "flex items-center gap-3" }, xt = /* @__PURE__ */ l({
|
|
1034
1179
|
__name: "BaseCollapsibleSection",
|
|
1035
1180
|
props: {
|
|
1036
1181
|
title: {},
|
|
@@ -1040,13 +1185,13 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1040
1185
|
},
|
|
1041
1186
|
emits: ["toggle"],
|
|
1042
1187
|
setup(e, { emit: t }) {
|
|
1043
|
-
let r = e, s = t, { isDark: c } =
|
|
1188
|
+
let r = e, s = t, { isDark: c } = U(), 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);
|
|
1044
1189
|
return (t, n) => (_(), a("section", { class: f(["rounded-xl border overflow-hidden transition-colors", w(l).cardAlt]) }, [o("button", {
|
|
1045
1190
|
type: "button",
|
|
1046
1191
|
class: f(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1047
1192
|
"aria-expanded": !e.collapsed,
|
|
1048
1193
|
onClick: n[0] ||= (e) => s("toggle")
|
|
1049
|
-
}, [o("div",
|
|
1194
|
+
}, [o("div", bt, [o("h2", { class: f(["text-base font-semibold", u.value]) }, C(e.title), 3), e.badge ? (_(), a("span", {
|
|
1050
1195
|
key: 0,
|
|
1051
1196
|
class: f(["text-xs px-2 py-0.5 rounded-full", p.value])
|
|
1052
1197
|
}, C(e.badge), 3)) : i("", !0)]), (_(), a("svg", {
|
|
@@ -1060,15 +1205,15 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1060
1205
|
"stroke-linecap": "round",
|
|
1061
1206
|
"stroke-linejoin": "round",
|
|
1062
1207
|
d: "M19 9l-7 7-7-7"
|
|
1063
|
-
}, null, -1)]], 2))], 10,
|
|
1208
|
+
}, null, -1)]], 2))], 10, yt), A(o("div", { class: f(["p-6 border-t", [w(l).border, m.value]]) }, [b(t.$slots, "default")], 2), [[D, !e.collapsed]])], 2));
|
|
1064
1209
|
}
|
|
1065
|
-
}),
|
|
1210
|
+
}), St = ["disabled"], Ct = ["disabled"], wt = {
|
|
1066
1211
|
key: 0,
|
|
1067
1212
|
class: "w-4 h-4 animate-spin",
|
|
1068
1213
|
fill: "none",
|
|
1069
1214
|
viewBox: "0 0 24 24",
|
|
1070
1215
|
"aria-hidden": "true"
|
|
1071
|
-
},
|
|
1216
|
+
}, Tt = /* @__PURE__ */ l({
|
|
1072
1217
|
__name: "BaseConfirmModal",
|
|
1073
1218
|
props: {
|
|
1074
1219
|
title: {},
|
|
@@ -1084,7 +1229,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1084
1229
|
},
|
|
1085
1230
|
emits: ["confirm", "cancel"],
|
|
1086
1231
|
setup(e, { emit: t }) {
|
|
1087
|
-
let n = e, l = t, { isDark: u } =
|
|
1232
|
+
let n = e, l = t, { isDark: u } = U(), d = X();
|
|
1088
1233
|
function p() {
|
|
1089
1234
|
n.submitting || l("confirm");
|
|
1090
1235
|
}
|
|
@@ -1105,12 +1250,12 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1105
1250
|
disabled: e.submitting,
|
|
1106
1251
|
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"]]),
|
|
1107
1252
|
onClick: m
|
|
1108
|
-
}, C(e.cancelText), 11,
|
|
1253
|
+
}, C(e.cancelText), 11, St), o("button", {
|
|
1109
1254
|
type: "button",
|
|
1110
1255
|
disabled: e.submitting,
|
|
1111
1256
|
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"]]),
|
|
1112
1257
|
onClick: p
|
|
1113
|
-
}, [e.submitting ? (_(), a("svg",
|
|
1258
|
+
}, [e.submitting ? (_(), a("svg", wt, [...n[0] ||= [o("circle", {
|
|
1114
1259
|
class: "opacity-25",
|
|
1115
1260
|
cx: "12",
|
|
1116
1261
|
cy: "12",
|
|
@@ -1121,12 +1266,12 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1121
1266
|
class: "opacity-75",
|
|
1122
1267
|
fill: "currentColor",
|
|
1123
1268
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1124
|
-
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10,
|
|
1125
|
-
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3)]),
|
|
1126
|
-
_:
|
|
1269
|
+
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Ct)]),
|
|
1270
|
+
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), b(t.$slots, "default")]),
|
|
1271
|
+
_: 3
|
|
1127
1272
|
}, 8, ["title", "manual-close"]));
|
|
1128
1273
|
}
|
|
1129
|
-
}),
|
|
1274
|
+
}), Et = { class: "mt-4" }, Dt = ["placeholder"], Ot = ["disabled"], kt = /* @__PURE__ */ l({
|
|
1130
1275
|
__name: "BaseTextInputModal",
|
|
1131
1276
|
props: {
|
|
1132
1277
|
title: {},
|
|
@@ -1144,7 +1289,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1144
1289
|
},
|
|
1145
1290
|
emits: ["confirm", "cancel"],
|
|
1146
1291
|
setup(e, { emit: t }) {
|
|
1147
|
-
let n = e, i = t, { isDark: a } =
|
|
1292
|
+
let n = e, i = t, { isDark: a } = U(), s = X(), l = v(n.initialValue), u = v(null);
|
|
1148
1293
|
m(async () => {
|
|
1149
1294
|
await d(), u.value?.focus();
|
|
1150
1295
|
});
|
|
@@ -1175,8 +1320,8 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1175
1320
|
disabled: !l.value.trim() || e.submitting,
|
|
1176
1321
|
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"]]),
|
|
1177
1322
|
onClick: p
|
|
1178
|
-
}, C(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1179
|
-
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div",
|
|
1323
|
+
}, C(e.submitting ? e.submittingText : e.confirmText), 11, Ot)]),
|
|
1324
|
+
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div", Et, [o("label", { class: f(["block text-sm font-medium mb-1", w(s).label]) }, C(e.inputLabel), 3), A(o("input", {
|
|
1180
1325
|
ref_key: "nameInput",
|
|
1181
1326
|
ref: u,
|
|
1182
1327
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
@@ -1184,11 +1329,11 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1184
1329
|
placeholder: e.placeholder,
|
|
1185
1330
|
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"]),
|
|
1186
1331
|
onKeyup: j(p, ["enter"])
|
|
1187
|
-
}, null, 42,
|
|
1332
|
+
}, null, 42, Dt), [[E, l.value]])])]),
|
|
1188
1333
|
_: 3
|
|
1189
1334
|
}, 8, ["title"]));
|
|
1190
1335
|
}
|
|
1191
|
-
}),
|
|
1336
|
+
}), At = { class: "flex items-center justify-center min-h-[60vh]" }, jt = { class: "text-center px-6" }, Mt = /* @__PURE__ */ l({
|
|
1192
1337
|
__name: "BaseNotFoundPage",
|
|
1193
1338
|
props: {
|
|
1194
1339
|
code: { default: "404" },
|
|
@@ -1197,11 +1342,11 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1197
1342
|
homeLabel: { default: "Go home" }
|
|
1198
1343
|
},
|
|
1199
1344
|
setup(e) {
|
|
1200
|
-
let t = e, n = de(), { isDark: r } =
|
|
1345
|
+
let t = e, n = de(), { isDark: r } = U(), i = X();
|
|
1201
1346
|
function s() {
|
|
1202
1347
|
n.push({ name: t.homeRouteName });
|
|
1203
1348
|
}
|
|
1204
|
-
return (t, n) => (_(), a("div",
|
|
1349
|
+
return (t, n) => (_(), a("div", At, [o("div", jt, [
|
|
1205
1350
|
c(w(P), { class: f(["w-16 h-16 mx-auto mb-4", w(i).illustration]) }, null, 8, ["class"]),
|
|
1206
1351
|
o("h1", { class: f(["text-4xl font-bold mb-2", w(r) ? "text-gray-200" : "text-gray-800"]) }, C(e.code), 3),
|
|
1207
1352
|
o("p", { class: f(["text-lg mb-6", w(i).dimTextAlt]) }, C(e.message), 3),
|
|
@@ -1212,7 +1357,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1212
1357
|
])]));
|
|
1213
1358
|
}
|
|
1214
1359
|
}), $ = v(!1);
|
|
1215
|
-
function
|
|
1360
|
+
function Nt() {
|
|
1216
1361
|
function e() {
|
|
1217
1362
|
$.value = !0;
|
|
1218
1363
|
}
|
|
@@ -1231,11 +1376,11 @@ function Lt() {
|
|
|
1231
1376
|
}
|
|
1232
1377
|
//#endregion
|
|
1233
1378
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1234
|
-
var
|
|
1379
|
+
var Pt = ["aria-label", "aria-expanded"], Ft = { class: "flex flex-col h-full" }, It = { class: "px-5 pt-5 pb-4 flex items-center justify-center relative" }, Lt = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Rt = { class: "px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500" }, zt = { class: "space-y-0.5" }, Bt = ["aria-current", "onClick"], Vt = [
|
|
1235
1380
|
"title",
|
|
1236
1381
|
"aria-label",
|
|
1237
1382
|
"aria-pressed"
|
|
1238
|
-
],
|
|
1383
|
+
], Ht = /* @__PURE__ */ q(/* @__PURE__ */ l({
|
|
1239
1384
|
__name: "BaseSidebar",
|
|
1240
1385
|
props: {
|
|
1241
1386
|
sections: {},
|
|
@@ -1248,7 +1393,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1248
1393
|
}
|
|
1249
1394
|
},
|
|
1250
1395
|
setup(t) {
|
|
1251
|
-
let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } =
|
|
1396
|
+
let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } = U(), { mobileOpen: x, close: T, toggle: E } = Nt(), D = v(null), k = null;
|
|
1252
1397
|
O(x, async (e) => {
|
|
1253
1398
|
e ? (k = document.activeElement instanceof HTMLElement ? document.activeElement : null, await d(), D.value?.focus()) : (k?.focus(), k = null);
|
|
1254
1399
|
}), m(() => {}), g(() => {});
|
|
@@ -1281,7 +1426,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1281
1426
|
key: 0,
|
|
1282
1427
|
class: "w-6 h-6",
|
|
1283
1428
|
"aria-hidden": "true"
|
|
1284
|
-
}))], 10,
|
|
1429
|
+
}))], 10, Pt)], 2),
|
|
1285
1430
|
w(x) ? (_(), a("div", {
|
|
1286
1431
|
key: 0,
|
|
1287
1432
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
@@ -1292,8 +1437,8 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1292
1437
|
role: "navigation",
|
|
1293
1438
|
"aria-label": "Main navigation",
|
|
1294
1439
|
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"]])
|
|
1295
|
-
}, [o("div",
|
|
1296
|
-
o("div",
|
|
1440
|
+
}, [o("div", Ft, [
|
|
1441
|
+
o("div", It, [o("button", {
|
|
1297
1442
|
type: "button",
|
|
1298
1443
|
onClick: A,
|
|
1299
1444
|
class: "cursor-pointer",
|
|
@@ -1309,12 +1454,12 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1309
1454
|
class: "w-5 h-5",
|
|
1310
1455
|
"aria-hidden": "true"
|
|
1311
1456
|
})], 2)]),
|
|
1312
|
-
o("nav",
|
|
1457
|
+
o("nav", Lt, [(_(!0), a(e, null, y(t.sections, (t) => (_(), a("div", { key: t.title }, [o("p", Rt, C(t.title), 1), o("ul", zt, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("li", { key: e.name }, [o("button", {
|
|
1313
1458
|
type: "button",
|
|
1314
1459
|
"aria-current": j(e.name) ? "page" : void 0,
|
|
1315
1460
|
onClick: (t) => M(e.name),
|
|
1316
1461
|
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"])
|
|
1317
|
-
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10,
|
|
1462
|
+
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10, Bt)]))), 128))])]))), 128))]),
|
|
1318
1463
|
o("div", { class: f(["px-4 py-4 border-t transition-colors space-y-3", w(p) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1319
1464
|
t.showThemeToggle ? (_(), a("button", {
|
|
1320
1465
|
key: 0,
|
|
@@ -1324,7 +1469,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1324
1469
|
"aria-label": w(p) ? "Switch to light mode" : "Switch to dark mode",
|
|
1325
1470
|
"aria-pressed": w(p),
|
|
1326
1471
|
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"])
|
|
1327
|
-
}, [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,
|
|
1472
|
+
}, [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, Vt)) : i("", !0),
|
|
1328
1473
|
b(n.$slots, "status", {}, void 0, !0),
|
|
1329
1474
|
b(n.$slots, "footer", {}, () => [t.appName || t.version ? (_(), a("div", {
|
|
1330
1475
|
key: 0,
|
|
@@ -1338,26 +1483,26 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1338
1483
|
])], 2)
|
|
1339
1484
|
]));
|
|
1340
1485
|
}
|
|
1341
|
-
}), [["__scopeId", "data-v-e27f267e"]]),
|
|
1486
|
+
}), [["__scopeId", "data-v-e27f267e"]]), Ut = {
|
|
1342
1487
|
key: 1,
|
|
1343
1488
|
class: "mt-4 flex justify-center py-6"
|
|
1344
|
-
},
|
|
1489
|
+
}, Wt = {
|
|
1345
1490
|
key: 2,
|
|
1346
1491
|
class: "mt-4 text-sm text-red-500",
|
|
1347
1492
|
role: "alert"
|
|
1348
|
-
},
|
|
1493
|
+
}, Gt = {
|
|
1349
1494
|
key: 3,
|
|
1350
1495
|
class: "mt-4"
|
|
1351
|
-
},
|
|
1496
|
+
}, Kt = { class: "relative" }, qt = ["placeholder"], Jt = {
|
|
1352
1497
|
key: 4,
|
|
1353
1498
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1354
|
-
},
|
|
1499
|
+
}, Yt = ["onClick"], Xt = { class: "flex-1 min-w-0" }, Zt = {
|
|
1355
1500
|
key: 0,
|
|
1356
1501
|
class: "text-center py-6"
|
|
1357
|
-
},
|
|
1502
|
+
}, Qt = {
|
|
1358
1503
|
key: 1,
|
|
1359
1504
|
class: "text-center py-6"
|
|
1360
|
-
},
|
|
1505
|
+
}, $t = ["disabled"], en = ["disabled"], tn = /* @__PURE__ */ l({
|
|
1361
1506
|
__name: "BaseEntityPickerModal",
|
|
1362
1507
|
props: {
|
|
1363
1508
|
title: {},
|
|
@@ -1379,7 +1524,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1379
1524
|
},
|
|
1380
1525
|
emits: ["confirm", "cancel"],
|
|
1381
1526
|
setup(t, { emit: s }) {
|
|
1382
|
-
let l = t, u = s, { isDark: p } =
|
|
1527
|
+
let l = t, u = s, { isDark: p } = U(), h = X(), g = v([]), x = v(!1), S = v(""), T = v(null), D = v(""), O = v(null), j = n(() => {
|
|
1383
1528
|
let e = l.loader ? g.value : l.items;
|
|
1384
1529
|
return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
|
|
1385
1530
|
}), M = n(() => j.value.filter((e) => e.label.toLowerCase().includes(D.value.toLowerCase()))), ee = {
|
|
@@ -1508,19 +1653,19 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1508
1653
|
disabled: t.submitting,
|
|
1509
1654
|
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]),
|
|
1510
1655
|
onClick: re
|
|
1511
|
-
}, C(t.cancelText), 11,
|
|
1656
|
+
}, C(t.cancelText), 11, $t), o("button", {
|
|
1512
1657
|
type: "button",
|
|
1513
1658
|
disabled: !T.value || t.submitting,
|
|
1514
1659
|
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]),
|
|
1515
1660
|
onClick: ne
|
|
1516
|
-
}, C(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
1661
|
+
}, C(t.submitting ? t.submittingText : t.confirmText), 11, en)]),
|
|
1517
1662
|
default: k(() => [
|
|
1518
1663
|
t.message ? (_(), a("p", {
|
|
1519
1664
|
key: 0,
|
|
1520
1665
|
class: f(["text-sm", w(p) ? "text-gray-300" : "text-gray-600"])
|
|
1521
1666
|
}, C(t.message), 3)) : i("", !0),
|
|
1522
|
-
x.value ? (_(), a("div",
|
|
1523
|
-
!x.value && !S.value && j.value.length > 0 ? (_(), a("div",
|
|
1667
|
+
x.value ? (_(), a("div", Ut, [c(Ke)])) : S.value ? (_(), a("div", Wt, C(S.value), 1)) : i("", !0),
|
|
1668
|
+
!x.value && !S.value && j.value.length > 0 ? (_(), a("div", Gt, [o("div", Kt, [c(w(ce), {
|
|
1524
1669
|
class: f(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", w(h).dimText]),
|
|
1525
1670
|
"aria-hidden": "true"
|
|
1526
1671
|
}, null, 8, ["class"]), A(o("input", {
|
|
@@ -1530,14 +1675,14 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1530
1675
|
type: "text",
|
|
1531
1676
|
placeholder: t.searchPlaceholder,
|
|
1532
1677
|
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]])
|
|
1533
|
-
}, null, 10,
|
|
1534
|
-
!x.value && !S.value ? (_(), a("div",
|
|
1678
|
+
}, null, 10, qt), [[E, D.value]])])])) : i("", !0),
|
|
1679
|
+
!x.value && !S.value ? (_(), a("div", Jt, [(_(!0), a(e, null, y(M.value, (e) => (_(), a("div", {
|
|
1535
1680
|
key: e.id,
|
|
1536
1681
|
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"]]),
|
|
1537
1682
|
onClick: (t) => T.value = e.id
|
|
1538
1683
|
}, [
|
|
1539
1684
|
c(w(oe), { class: f(["w-5 h-5 flex-shrink-0", w(h).dimText]) }, null, 8, ["class"]),
|
|
1540
|
-
o("div",
|
|
1685
|
+
o("div", Xt, [o("p", { class: f(["text-sm font-medium truncate", w(h).bodyText]) }, C(e.label), 3)]),
|
|
1541
1686
|
T.value === e.id ? (_(), a("div", {
|
|
1542
1687
|
key: 0,
|
|
1543
1688
|
class: f(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
|
|
@@ -1553,15 +1698,15 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1553
1698
|
"stroke-linejoin": "round",
|
|
1554
1699
|
d: "M5 13l4 4L19 7"
|
|
1555
1700
|
})], -1)]], 2)) : i("", !0)
|
|
1556
|
-
], 10,
|
|
1701
|
+
], 10, Yt))), 128)), j.value.length === 0 ? (_(), a("div", Zt, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.emptyMessage), 3)])) : M.value.length === 0 ? (_(), a("div", Qt, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.noMatchMessage), 3)])) : i("", !0)])) : i("", !0)
|
|
1557
1702
|
]),
|
|
1558
1703
|
_: 3
|
|
1559
1704
|
}, 8, ["title", "manual-close"]));
|
|
1560
1705
|
}
|
|
1561
|
-
}),
|
|
1706
|
+
}), nn = {
|
|
1562
1707
|
href: "#main-content",
|
|
1563
1708
|
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"
|
|
1564
|
-
},
|
|
1709
|
+
}, rn = ["inert"], an = /* @__PURE__ */ l({
|
|
1565
1710
|
__name: "BaseAppLayout",
|
|
1566
1711
|
props: {
|
|
1567
1712
|
showSidebar: {
|
|
@@ -1571,19 +1716,19 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1571
1716
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1572
1717
|
},
|
|
1573
1718
|
setup(e) {
|
|
1574
|
-
let t = e, { isDark: r } =
|
|
1719
|
+
let t = e, { isDark: r } = U(), { mobileOpen: s } = Nt(), c = n(() => t.showSidebar);
|
|
1575
1720
|
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"]) }, [
|
|
1576
|
-
o("a",
|
|
1721
|
+
o("a", nn, C(e.skipLinkLabel), 1),
|
|
1577
1722
|
c.value ? b(t.$slots, "sidebar", { key: 0 }) : i("", !0),
|
|
1578
1723
|
o("main", {
|
|
1579
1724
|
id: "main-content",
|
|
1580
1725
|
tabindex: "-1",
|
|
1581
1726
|
inert: c.value && w(s) ? !0 : void 0,
|
|
1582
1727
|
class: f(c.value ? "pt-14 lg:pt-0 lg:ml-60" : "")
|
|
1583
|
-
}, [b(t.$slots, "default")], 10,
|
|
1728
|
+
}, [b(t.$slots, "default")], 10, rn)
|
|
1584
1729
|
], 2));
|
|
1585
1730
|
}
|
|
1586
|
-
}),
|
|
1731
|
+
}), on = { class: "flex items-center justify-between mb-8" }, sn = { class: "flex items-center gap-3" }, cn = { class: "flex items-center gap-2" }, ln = /* @__PURE__ */ l({
|
|
1587
1732
|
__name: "BasePageHeader",
|
|
1588
1733
|
props: {
|
|
1589
1734
|
title: {},
|
|
@@ -1592,7 +1737,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1592
1737
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1593
1738
|
},
|
|
1594
1739
|
setup(e) {
|
|
1595
|
-
let t = e, { isDark: r } =
|
|
1740
|
+
let t = e, { isDark: r } = U(), s = X(), c = n(() => {
|
|
1596
1741
|
let e = {
|
|
1597
1742
|
emerald: {
|
|
1598
1743
|
dark: "bg-emerald-500/10",
|
|
@@ -1633,16 +1778,16 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1633
1778
|
}[t.iconColor];
|
|
1634
1779
|
return r.value ? e.dark : e.light;
|
|
1635
1780
|
});
|
|
1636
|
-
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div",
|
|
1781
|
+
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div", on, [o("div", sn, [o("div", { class: f(["w-10 h-10 rounded-lg flex items-center justify-center", c.value]) }, [b(t.$slots, "icon", { iconClass: l.value })], 2), o("div", null, [o("h1", { class: f(["text-2xl font-bold", w(s).primaryTextSoft]) }, C(e.title), 3), e.subtitle ? (_(), a("p", {
|
|
1637
1782
|
key: 0,
|
|
1638
1783
|
class: f(["text-sm", w(s).dimTextAlt])
|
|
1639
|
-
}, C(e.subtitle), 3)) : i("", !0)])]), o("div",
|
|
1784
|
+
}, C(e.subtitle), 3)) : i("", !0)])]), o("div", cn, [b(t.$slots, "actions")])])], 2));
|
|
1640
1785
|
}
|
|
1641
|
-
}),
|
|
1786
|
+
}), un = [
|
|
1642
1787
|
"type",
|
|
1643
1788
|
"disabled",
|
|
1644
1789
|
"title"
|
|
1645
|
-
],
|
|
1790
|
+
], dn = { key: 0 }, fn = /* @__PURE__ */ l({
|
|
1646
1791
|
__name: "BaseToolbarButton",
|
|
1647
1792
|
props: {
|
|
1648
1793
|
label: { default: "" },
|
|
@@ -1656,7 +1801,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1656
1801
|
},
|
|
1657
1802
|
emits: ["click"],
|
|
1658
1803
|
setup(e) {
|
|
1659
|
-
let t = e, { isDark: r } =
|
|
1804
|
+
let t = e, { isDark: r } = U(), o = n(() => {
|
|
1660
1805
|
let e = {
|
|
1661
1806
|
neutral: {
|
|
1662
1807
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -1675,14 +1820,14 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1675
1820
|
title: e.title,
|
|
1676
1821
|
class: f(["inline-flex shrink-0 items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap", o.value]),
|
|
1677
1822
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1678
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1823
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", dn, C(e.label), 1)) : i("", !0)], 10, un));
|
|
1679
1824
|
}
|
|
1680
|
-
}),
|
|
1825
|
+
}), pn = [
|
|
1681
1826
|
"type",
|
|
1682
1827
|
"disabled",
|
|
1683
1828
|
"title",
|
|
1684
1829
|
"aria-label"
|
|
1685
|
-
],
|
|
1830
|
+
], mn = { key: 0 }, hn = /* @__PURE__ */ l({
|
|
1686
1831
|
__name: "BaseActionButton",
|
|
1687
1832
|
props: {
|
|
1688
1833
|
label: { default: "" },
|
|
@@ -1701,7 +1846,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1701
1846
|
},
|
|
1702
1847
|
emits: ["click"],
|
|
1703
1848
|
setup(e) {
|
|
1704
|
-
let t = e, { isDark: r } =
|
|
1849
|
+
let t = e, { isDark: r } = U(), o = n(() => {
|
|
1705
1850
|
let e = {
|
|
1706
1851
|
emerald: {
|
|
1707
1852
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -1781,12 +1926,12 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1781
1926
|
"aria-label": e.ariaLabel,
|
|
1782
1927
|
class: f(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
1783
1928
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1784
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1929
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", mn, C(e.label), 1)) : i("", !0)], 10, pn));
|
|
1785
1930
|
}
|
|
1786
1931
|
});
|
|
1787
1932
|
//#endregion
|
|
1788
1933
|
//#region src/composables/useDebounce.ts
|
|
1789
|
-
function
|
|
1934
|
+
function gn(e, t = 300) {
|
|
1790
1935
|
let n = v(e.value), r = null;
|
|
1791
1936
|
return O(e, (e) => {
|
|
1792
1937
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -1798,12 +1943,12 @@ function bn(e, t = 300) {
|
|
|
1798
1943
|
}
|
|
1799
1944
|
//#endregion
|
|
1800
1945
|
//#region src/composables/useToast.ts
|
|
1801
|
-
function
|
|
1802
|
-
let t = v(!1), n = v(""), r = v(
|
|
1946
|
+
function _n(e = 3e3) {
|
|
1947
|
+
let t = v(!1), n = v(""), r = v(J.SUCCESS), i = null;
|
|
1803
1948
|
function a() {
|
|
1804
1949
|
i &&= (clearTimeout(i), null);
|
|
1805
1950
|
}
|
|
1806
|
-
function o(o, s =
|
|
1951
|
+
function o(o, s = J.SUCCESS, c = e) {
|
|
1807
1952
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
1808
1953
|
t.value = !1, i = null;
|
|
1809
1954
|
}, c);
|
|
@@ -1819,16 +1964,16 @@ function xn(e = 3e3) {
|
|
|
1819
1964
|
}
|
|
1820
1965
|
//#endregion
|
|
1821
1966
|
//#region src/enums/BaseBadgeEnum.ts
|
|
1822
|
-
var
|
|
1967
|
+
var vn = /* @__PURE__ */ function(e) {
|
|
1823
1968
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
1824
|
-
}({}),
|
|
1969
|
+
}({}), yn = {
|
|
1825
1970
|
GET: "bg-blue-600",
|
|
1826
1971
|
POST: "bg-emerald-600",
|
|
1827
1972
|
PUT: "bg-amber-600",
|
|
1828
1973
|
DELETE: "bg-red-600",
|
|
1829
1974
|
PATCH: "bg-purple-600",
|
|
1830
1975
|
HEAD: "bg-gray-600"
|
|
1831
|
-
},
|
|
1976
|
+
}, bn = {
|
|
1832
1977
|
GET: "bg-blue-500",
|
|
1833
1978
|
POST: "bg-green-500",
|
|
1834
1979
|
PUT: "bg-yellow-500",
|
|
@@ -1836,23 +1981,23 @@ var Sn = /* @__PURE__ */ function(e) {
|
|
|
1836
1981
|
PATCH: "bg-purple-500",
|
|
1837
1982
|
HEAD: "bg-gray-500"
|
|
1838
1983
|
};
|
|
1839
|
-
function
|
|
1840
|
-
return e ?
|
|
1984
|
+
function xn(e) {
|
|
1985
|
+
return e ? yn[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
1841
1986
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return e ?
|
|
1987
|
+
function Sn(e) {
|
|
1988
|
+
return e ? bn[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
1844
1989
|
}
|
|
1845
|
-
function
|
|
1990
|
+
function Cn(e) {
|
|
1846
1991
|
let t = e ?? 0;
|
|
1847
1992
|
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";
|
|
1848
1993
|
}
|
|
1849
|
-
function
|
|
1994
|
+
function wn(e, t) {
|
|
1850
1995
|
let n = e ?? 200;
|
|
1851
1996
|
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";
|
|
1852
1997
|
}
|
|
1853
1998
|
//#endregion
|
|
1854
1999
|
//#region src/utils/sanitizeHtml.ts
|
|
1855
|
-
var
|
|
2000
|
+
var Tn = new Set([
|
|
1856
2001
|
"A",
|
|
1857
2002
|
"B",
|
|
1858
2003
|
"STRONG",
|
|
@@ -1867,7 +2012,7 @@ var kn = new Set([
|
|
|
1867
2012
|
"LI",
|
|
1868
2013
|
"SPAN",
|
|
1869
2014
|
"DIV"
|
|
1870
|
-
]),
|
|
2015
|
+
]), En = new Set([
|
|
1871
2016
|
"SCRIPT",
|
|
1872
2017
|
"STYLE",
|
|
1873
2018
|
"IFRAME",
|
|
@@ -1875,53 +2020,53 @@ var kn = new Set([
|
|
|
1875
2020
|
"EMBED",
|
|
1876
2021
|
"NOSCRIPT",
|
|
1877
2022
|
"TEMPLATE"
|
|
1878
|
-
]),
|
|
1879
|
-
function
|
|
2023
|
+
]), Dn = { A: new Set(["href", "title"]) };
|
|
2024
|
+
function On(e) {
|
|
1880
2025
|
let t = e.trim().toLowerCase();
|
|
1881
2026
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
1882
2027
|
}
|
|
1883
|
-
function
|
|
2028
|
+
function kn(e) {
|
|
1884
2029
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
1885
2030
|
let t = e, n = t.tagName.toUpperCase();
|
|
1886
|
-
if (!
|
|
1887
|
-
|
|
2031
|
+
if (!Tn.has(n)) {
|
|
2032
|
+
En.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
1888
2033
|
return;
|
|
1889
2034
|
}
|
|
1890
|
-
let r =
|
|
2035
|
+
let r = Dn[n] ?? /* @__PURE__ */ new Set();
|
|
1891
2036
|
for (let e of Array.from(t.attributes)) {
|
|
1892
2037
|
if (!r.has(e.name.toLowerCase())) {
|
|
1893
2038
|
t.removeAttribute(e.name);
|
|
1894
2039
|
continue;
|
|
1895
2040
|
}
|
|
1896
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
2041
|
+
n === "A" && e.name.toLowerCase() === "href" && !On(e.value) && t.removeAttribute(e.name);
|
|
1897
2042
|
}
|
|
1898
2043
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
1899
|
-
for (let e of Array.from(t.childNodes))
|
|
2044
|
+
for (let e of Array.from(t.childNodes)) kn(e);
|
|
1900
2045
|
}
|
|
1901
|
-
function
|
|
2046
|
+
function An(e) {
|
|
1902
2047
|
if (!e) return "";
|
|
1903
2048
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
1904
2049
|
if (!t) return "";
|
|
1905
|
-
for (let e of Array.from(t.childNodes))
|
|
2050
|
+
for (let e of Array.from(t.childNodes)) kn(e);
|
|
1906
2051
|
return t.innerHTML;
|
|
1907
2052
|
}
|
|
1908
2053
|
//#endregion
|
|
1909
2054
|
//#region src/utils/format.ts
|
|
1910
|
-
var
|
|
1911
|
-
function
|
|
1912
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
2055
|
+
var jn = "—";
|
|
2056
|
+
function Mn(e, t = 4) {
|
|
2057
|
+
if (e == null || typeof e == "string" && e.trim() === "") return jn;
|
|
1913
2058
|
let n = typeof e == "string" ? Number(e) : e;
|
|
1914
2059
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
1915
2060
|
minimumFractionDigits: t,
|
|
1916
2061
|
maximumFractionDigits: t
|
|
1917
|
-
}) :
|
|
2062
|
+
}) : jn;
|
|
1918
2063
|
}
|
|
1919
|
-
function
|
|
1920
|
-
if (e == null || e === "") return
|
|
2064
|
+
function Nn(e) {
|
|
2065
|
+
if (e == null || e === "") return jn;
|
|
1921
2066
|
let t = new Date(e);
|
|
1922
2067
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
1923
2068
|
}
|
|
1924
|
-
function
|
|
2069
|
+
function Pn(e) {
|
|
1925
2070
|
return new Date(e).toLocaleString(void 0, {
|
|
1926
2071
|
month: "short",
|
|
1927
2072
|
day: "numeric",
|
|
@@ -1929,13 +2074,13 @@ function Rn(e) {
|
|
|
1929
2074
|
minute: "2-digit"
|
|
1930
2075
|
});
|
|
1931
2076
|
}
|
|
1932
|
-
function
|
|
2077
|
+
function Fn(e) {
|
|
1933
2078
|
return new Date(e).toLocaleDateString(void 0, {
|
|
1934
2079
|
month: "short",
|
|
1935
2080
|
day: "numeric"
|
|
1936
2081
|
});
|
|
1937
2082
|
}
|
|
1938
|
-
function
|
|
2083
|
+
function In(e) {
|
|
1939
2084
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
1940
2085
|
let t = Math.abs(e), n = 2;
|
|
1941
2086
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -1943,21 +2088,21 @@ function Bn(e) {
|
|
|
1943
2088
|
maximumFractionDigits: n
|
|
1944
2089
|
});
|
|
1945
2090
|
}
|
|
1946
|
-
function
|
|
2091
|
+
function Ln(e, t = 2) {
|
|
1947
2092
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
1948
2093
|
}
|
|
1949
|
-
function
|
|
2094
|
+
function Rn(e) {
|
|
1950
2095
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
1951
2096
|
}
|
|
1952
2097
|
//#endregion
|
|
1953
2098
|
//#region src/utils/pnl.ts
|
|
1954
|
-
function
|
|
2099
|
+
function zn(e) {
|
|
1955
2100
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
1956
2101
|
pnlUsd: null,
|
|
1957
2102
|
pnlPct: null
|
|
1958
2103
|
};
|
|
1959
2104
|
let t = Number(e.buyPrice), n = Number(e.lastPrice), r = Number(e.filledQty);
|
|
1960
|
-
return !isFinite(t) || !isFinite(n) || !isFinite(r) || t <= 0 ? {
|
|
2105
|
+
return !isFinite(t) || !isFinite(n) || !isFinite(r) || t <= 0 || n <= 0 ? {
|
|
1961
2106
|
pnlUsd: null,
|
|
1962
2107
|
pnlPct: null
|
|
1963
2108
|
} : {
|
|
@@ -1966,4 +2111,4 @@ function Un(e) {
|
|
|
1966
2111
|
};
|
|
1967
2112
|
}
|
|
1968
2113
|
//#endregion
|
|
1969
|
-
export { I as AlertEnum,
|
|
2114
|
+
export { I as AlertEnum, hn as BaseActionButton, he as BaseAlert, an as BaseAppLayout, R as BaseBadge, vn as BaseBadgeEnum, be as BaseBreadcrumb, je as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, xt as BaseCollapsibleSection, Tt as BaseConfirmModal, tn as BaseEntityPickerModal, Fe as BaseLine, Ie as BaseLoginEnum, Re as BaseLogo, G as BaseLogoEnum, We as BaseModal, K as BaseModalEnum, Q as BaseModalShell, Mt as BaseNotFoundPage, ln as BasePageHeader, Ge as BaseRow, Ht as BaseSidebar, Ke as BaseSpinner, kt as BaseTextInputModal, Xe as BaseToast, J as BaseToastEnum, fn as BaseToolbarButton, Qe as ColoredSquares, L as ColorsEnums, tt as EarningsCard, ot as EuroAmount, W as LineEnum, lt as Pagination, Y as PositioningEnum, pt as TrendArrow, zn as computePnL, Nn as fmtDate, Fn as fmtDateShort, Pn as fmtDateTime, Mn as fmtNumber, Ln as fmtPct, In as fmtPrice, Rn as fmtUsd, fe as getBaseColor, pe as getBaseColorOf, On as isSafeHref, Sn as methodBadgeBright, xn as methodBadgeSolid, An as sanitizeHtml, Cn as statusBadgeSolid, wn as statusBadgeTinted, gn as useDebouncedRef, Z as useEscapeKey, Nt as useMobileSidebar, U as useTheme, X as useThemeClasses, _n as useToast };
|