@ghentcdh/ui 1.0.4 → 1.1.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/index.css +1 -1
- package/index.js +2 -2
- package/index.mjs +347 -346
- package/package.json +14 -1
- package/testing/AlertHarness.d.ts +16 -0
- package/testing/AutocompleteHarness.d.ts +29 -0
- package/testing/BooleanHarness.d.ts +14 -0
- package/testing/ButtonHarness.d.ts +16 -0
- package/testing/CollapseHarness.d.ts +22 -0
- package/testing/DrawerHarness.d.ts +21 -0
- package/testing/Harness.d.ts +27 -0
- package/testing/MarkdownHarness.d.ts +24 -0
- package/testing/ModalHarness.d.ts +35 -0
- package/testing/MultiSelectHarness.d.ts +16 -0
- package/testing/NumberHarness.d.ts +14 -0
- package/testing/SelectHarness.d.ts +24 -0
- package/testing/TextAreaHarness.d.ts +14 -0
- package/testing/TextHarness.d.ts +19 -0
- package/testing/index.d.ts +14 -0
- package/testing.js +1 -0
- package/testing.mjs +420 -0
- package/index.esm.js +0 -2371
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, computed as
|
|
1
|
+
import { defineComponent as k, computed as v, openBlock as r, createBlock as y, resolveDynamicComponent as ne, normalizeClass as $, createCommentVNode as _, createElementBlock as f, createElementVNode as u, toDisplayString as w, unref as g, Fragment as L, renderList as M, mergeProps as B, resolveComponent as ce, withCtx as S, createTextVNode as E, ref as x, watch as j, onUnmounted as _e, onMounted as $e, withModifiers as le, renderSlot as P, createVNode as V, withDirectives as Y, vModelCheckbox as Ce, normalizeStyle as X, useAttrs as Ie, getCurrentInstance as De, camelize as Re, toHandlerKey as re, nextTick as xe, normalizeProps as ee, guardReactiveProps as te, Transition as Te, useModel as F, mergeModels as I, onBeforeUnmount as Ee, vModelDynamic as ze, vModelText as Le, useSlots as Se, toRef as we } from "vue";
|
|
2
2
|
import { RouterLink as Ne } from "vue-router";
|
|
3
3
|
import { v4 as de } from "uuid";
|
|
4
4
|
import { LinkIcon as qe, DocumentTextIcon as je, EyeIcon as Fe, CheckIcon as Ke, LanguageIcon as Ue, ChevronDoubleRightIcon as He, ChevronDoubleLeftIcon as We, ChevronUpIcon as Ge, ChevronDownIcon as Xe, ChevronLeftIcon as Ze, ChevronRightIcon as Je, Bars3Icon as Qe, PaperClipIcon as Ye, PlusCircleIcon as et, XMarkIcon as tt, FunnelIcon as ot, BarsArrowUpIcon as st, BarsArrowDownIcon as nt, TrashIcon as lt, PencilSquareIcon as at } from "@heroicons/vue/24/outline";
|
|
@@ -6,7 +6,7 @@ import rt from "@tiptap/starter-kit";
|
|
|
6
6
|
import { useEditor as it, EditorContent as ut } from "@tiptap/vue-3";
|
|
7
7
|
import { Markdown as ct } from "tiptap-markdown";
|
|
8
8
|
import { ChevronDownIcon as dt, ChevronRightIcon as pt } from "@heroicons/vue/24/solid";
|
|
9
|
-
var
|
|
9
|
+
var R = /* @__PURE__ */ ((e) => (e.Edit = "Edit", e.Delete = "Delete", e.BarsArrowDown = "BarsArrowDown", e.BarsArrowUp = "BarsArrowUp", e.Funnel = "Funnel", e.Close = "Close", e.Plus = "Plus", e.PaperClip = "PaperClip", e.Hamburger = "Hamburger", e.ChevronRight = "ChevronRight", e.ChevronLeft = "ChevronLeft", e.ChevronDown = "ChevronDown", e.ChevronUp = "ChevronUp", e.DblChevronLeft = "DblChevronLeft", e.DblChevronRight = "DblChevronRight", e.Language = "Language", e.Check = "Check", e.View = "View", e.Text = "Text", e.Link = "Link", e))(R || {});
|
|
10
10
|
const ft = {
|
|
11
11
|
Edit: at,
|
|
12
12
|
Delete: lt,
|
|
@@ -35,7 +35,7 @@ const ft = {
|
|
|
35
35
|
__name: "icon",
|
|
36
36
|
props: mt,
|
|
37
37
|
setup(e) {
|
|
38
|
-
const t = e, o =
|
|
38
|
+
const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? ft[t.icon] : t.icon : null);
|
|
39
39
|
return (n, l) => o.value ? (r(), y(ne(o.value), {
|
|
40
40
|
key: 0,
|
|
41
41
|
"aria-hidden": "true",
|
|
@@ -75,7 +75,7 @@ const ft = {
|
|
|
75
75
|
u("span", null, w(e.label), 1),
|
|
76
76
|
e.disableArrow ? _("", !0) : (r(), y(g(q), {
|
|
77
77
|
key: 0,
|
|
78
|
-
icon: g(
|
|
78
|
+
icon: g(R).ChevronDown,
|
|
79
79
|
size: "sm"
|
|
80
80
|
}, null, 8, ["icon"]))
|
|
81
81
|
], 2),
|
|
@@ -97,7 +97,7 @@ const ft = {
|
|
|
97
97
|
disabled: { type: Boolean, default: !1 }
|
|
98
98
|
},
|
|
99
99
|
setup(e) {
|
|
100
|
-
const t = e, o =
|
|
100
|
+
const t = e, o = v(() => !t.disabled && t.action && "routerLink" in t.action), n = v(() => !t.disabled && t.action), l = v(() => t.items?.length), a = v(() => {
|
|
101
101
|
const d = t.action;
|
|
102
102
|
return d && "routerLink" in d && "params" in d ? {
|
|
103
103
|
name: d.routerLink,
|
|
@@ -131,7 +131,7 @@ const ft = {
|
|
|
131
131
|
}), ht = { class: "navbar bg-base-100 shadow-sm" }, yt = { class: "flex-1" }, wt = {
|
|
132
132
|
key: 0,
|
|
133
133
|
class: "breadcrumbs text-sm"
|
|
134
|
-
}, kt = { class: "flex grow justify-end px-2" }, _t = { class: "flex items-stretch" },
|
|
134
|
+
}, kt = { class: "flex grow justify-end px-2" }, _t = { class: "flex items-stretch" }, wn = /* @__PURE__ */ k({
|
|
135
135
|
__name: "menu",
|
|
136
136
|
props: {
|
|
137
137
|
menu: {},
|
|
@@ -174,7 +174,7 @@ const ft = {
|
|
|
174
174
|
]);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
}),
|
|
177
|
+
}), kn = /* @__PURE__ */ k({
|
|
178
178
|
__name: "dropdown",
|
|
179
179
|
props: {
|
|
180
180
|
items: {}
|
|
@@ -227,7 +227,7 @@ const ft = {
|
|
|
227
227
|
};
|
|
228
228
|
j(t, (p) => {
|
|
229
229
|
p ? c() : d();
|
|
230
|
-
}), _e(() => {
|
|
230
|
+
}, { immediate: !0 }), _e(() => {
|
|
231
231
|
d();
|
|
232
232
|
});
|
|
233
233
|
}, St = {
|
|
@@ -245,7 +245,7 @@ const ft = {
|
|
|
245
245
|
sm: "badge-sm text-xs",
|
|
246
246
|
lg: "badge-sm text-xs",
|
|
247
247
|
xl: "badge text-xs"
|
|
248
|
-
}, Bt =
|
|
248
|
+
}, Bt = { class: "flex justify-end gap-2 pt-2 mt-2 border-t border-gray-300 shrink-0" }, Vt = /* @__PURE__ */ k({
|
|
249
249
|
__name: "modal",
|
|
250
250
|
props: $t,
|
|
251
251
|
emits: Ct,
|
|
@@ -270,23 +270,23 @@ const ft = {
|
|
|
270
270
|
}
|
|
271
271
|
), $e(() => {
|
|
272
272
|
n.open && s();
|
|
273
|
-
}), (
|
|
273
|
+
}), (h, D) => (r(), f("dialog", {
|
|
274
274
|
ref_key: "dialogRef",
|
|
275
275
|
ref: d,
|
|
276
276
|
class: "modal",
|
|
277
277
|
role: "dialog",
|
|
278
278
|
"aria-modal": "true",
|
|
279
|
-
"aria-labelledby":
|
|
280
|
-
"aria-describedby":
|
|
279
|
+
"aria-labelledby": a,
|
|
280
|
+
"aria-describedby": c,
|
|
281
281
|
onCancel: le(b, ["prevent"])
|
|
282
282
|
}, [
|
|
283
283
|
u("div", {
|
|
284
284
|
class: $([
|
|
285
285
|
"modal-box bg-white min-h-0 max-h-[90vh] flex flex-col overflow-hidden",
|
|
286
|
-
g(St)[
|
|
286
|
+
g(St)[h.width]
|
|
287
287
|
])
|
|
288
288
|
}, [
|
|
289
|
-
|
|
289
|
+
h.disableClose ? _("", !0) : (r(), f("button", {
|
|
290
290
|
key: 0,
|
|
291
291
|
type: "button",
|
|
292
292
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
@@ -296,32 +296,32 @@ const ft = {
|
|
|
296
296
|
u("h3", {
|
|
297
297
|
id: a,
|
|
298
298
|
class: "font-bold shrink-0"
|
|
299
|
-
}, w(
|
|
299
|
+
}, w(h.modalTitle), 1),
|
|
300
300
|
u("div", {
|
|
301
301
|
id: c,
|
|
302
302
|
class: "pt-4 flex-1 min-h-0 flex flex-col"
|
|
303
303
|
}, [
|
|
304
|
-
P(
|
|
304
|
+
P(h.$slots, "content")
|
|
305
305
|
]),
|
|
306
|
-
u("div",
|
|
307
|
-
P(
|
|
306
|
+
u("div", Bt, [
|
|
307
|
+
P(h.$slots, "actions")
|
|
308
308
|
])
|
|
309
309
|
], 2)
|
|
310
|
-
],
|
|
310
|
+
], 544));
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
var fe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(fe || {}), Me = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(Me || {}), z = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(z || {});
|
|
314
|
-
const
|
|
314
|
+
const At = {
|
|
315
315
|
blank: "btn-ghost",
|
|
316
316
|
primary: "btn-primary",
|
|
317
317
|
secondary: "btn-soft btn-primary",
|
|
318
318
|
error: "btn-error"
|
|
319
|
-
},
|
|
319
|
+
}, Ot = {
|
|
320
320
|
blank: "badge-ghost",
|
|
321
321
|
primary: "badge-primary",
|
|
322
322
|
secondary: "badge-soft badge-primary",
|
|
323
323
|
error: "badge-error"
|
|
324
|
-
},
|
|
324
|
+
}, It = {
|
|
325
325
|
href: { type: String },
|
|
326
326
|
disabled: { type: Boolean, default: !1 },
|
|
327
327
|
tooltip: { type: String },
|
|
@@ -332,22 +332,22 @@ const Ot = {
|
|
|
332
332
|
color: { type: String, default: z.primary },
|
|
333
333
|
size: { type: String, default: "sm" },
|
|
334
334
|
square: { type: Boolean, default: !1 }
|
|
335
|
-
},
|
|
335
|
+
}, Dt = ["click"], Rt = {
|
|
336
336
|
icon: { type: [String, Object, Function] },
|
|
337
337
|
type: { type: String, default: fe.button },
|
|
338
338
|
color: { type: String, default: z.primary },
|
|
339
339
|
disabled: { type: Boolean, default: !1 },
|
|
340
340
|
size: { type: String, default: "sm" }
|
|
341
|
-
},
|
|
341
|
+
}, Tt = ["click"], N = /* @__PURE__ */ k({
|
|
342
342
|
__name: "btn",
|
|
343
|
-
props:
|
|
344
|
-
emits:
|
|
343
|
+
props: It,
|
|
344
|
+
emits: Dt,
|
|
345
345
|
setup(e, { emit: t }) {
|
|
346
346
|
const o = e, n = t;
|
|
347
347
|
return (l, a) => (r(), y(ne(o.as), {
|
|
348
348
|
class: $([
|
|
349
349
|
"btn p-1 flex justify-center flex-nowrap",
|
|
350
|
-
g(
|
|
350
|
+
g(At)[o.color],
|
|
351
351
|
g(Pt)[o.size],
|
|
352
352
|
{ "btn-outline": o.outline, "btn-square": o.square, tooltip: o.tooltip }
|
|
353
353
|
]),
|
|
@@ -368,14 +368,14 @@ const Ot = {
|
|
|
368
368
|
_: 3
|
|
369
369
|
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
370
370
|
}
|
|
371
|
-
}),
|
|
371
|
+
}), Et = ["type", "disabled"], _n = /* @__PURE__ */ k({
|
|
372
372
|
__name: "btn-badge",
|
|
373
373
|
props: Rt,
|
|
374
|
-
emits:
|
|
374
|
+
emits: Tt,
|
|
375
375
|
setup(e, { emit: t }) {
|
|
376
376
|
const o = e, n = t;
|
|
377
377
|
return (l, a) => (r(), f("button", {
|
|
378
|
-
class: $(["badge gap-1", g(Mt)[o.size], g(
|
|
378
|
+
class: $(["badge gap-1", g(Mt)[o.size], g(Ot)[o.color]]),
|
|
379
379
|
type: o.type,
|
|
380
380
|
disabled: o.disabled,
|
|
381
381
|
onClick: a[0] || (a[0] = (c) => n("click"))
|
|
@@ -386,9 +386,9 @@ const Ot = {
|
|
|
386
386
|
icon: o.icon,
|
|
387
387
|
size: o.size
|
|
388
388
|
}, null, 8, ["icon", "size"])) : _("", !0)
|
|
389
|
-
], 10,
|
|
389
|
+
], 10, Et));
|
|
390
390
|
}
|
|
391
|
-
}),
|
|
391
|
+
}), zt = /* @__PURE__ */ k({
|
|
392
392
|
__name: "confirmModal",
|
|
393
393
|
props: {
|
|
394
394
|
title: {},
|
|
@@ -401,7 +401,7 @@ const Ot = {
|
|
|
401
401
|
const o = t, n = (l) => {
|
|
402
402
|
o("closeModal", { confirmed: l });
|
|
403
403
|
};
|
|
404
|
-
return (l, a) => (r(), y(
|
|
404
|
+
return (l, a) => (r(), y(Vt, {
|
|
405
405
|
"modal-title": e.title,
|
|
406
406
|
open: !0,
|
|
407
407
|
"disable-close": !0
|
|
@@ -450,7 +450,7 @@ class me {
|
|
|
450
450
|
}
|
|
451
451
|
static showConfirm(t) {
|
|
452
452
|
this.getInstance().openModal({
|
|
453
|
-
component:
|
|
453
|
+
component: zt,
|
|
454
454
|
props: t
|
|
455
455
|
});
|
|
456
456
|
}
|
|
@@ -467,10 +467,10 @@ class me {
|
|
|
467
467
|
this.modals = [], this.showModal.value = !1;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const Nt = /* @__PURE__ */ k({
|
|
471
471
|
__name: "modalWrapper",
|
|
472
472
|
setup(e) {
|
|
473
|
-
const t = me.getInstance(), o =
|
|
473
|
+
const t = me.getInstance(), o = v(() => t.showModal.value ? t.modals : []);
|
|
474
474
|
return (n, l) => (r(!0), f(L, null, M(o.value, (a) => (r(), y(ne(a?.component), B({
|
|
475
475
|
key: a.id,
|
|
476
476
|
ref_for: !0
|
|
@@ -479,7 +479,7 @@ const qt = /* @__PURE__ */ k({
|
|
|
479
479
|
onCloseModal: a?.props?.onClose
|
|
480
480
|
}), null, 16, ["onCloseModal"]))), 128));
|
|
481
481
|
}
|
|
482
|
-
}),
|
|
482
|
+
}), qt = /* @__PURE__ */ k({
|
|
483
483
|
__name: "notification-message",
|
|
484
484
|
props: {
|
|
485
485
|
message: {},
|
|
@@ -499,13 +499,13 @@ const qt = /* @__PURE__ */ k({
|
|
|
499
499
|
u("span", null, w(e.message), 1)
|
|
500
500
|
], 2));
|
|
501
501
|
}
|
|
502
|
-
}),
|
|
502
|
+
}), jt = 5e3;
|
|
503
503
|
class be {
|
|
504
504
|
constructor() {
|
|
505
505
|
this.notifications = x([]), this.addNotification = (t, o = "info") => {
|
|
506
506
|
const n = {
|
|
507
507
|
id: de(),
|
|
508
|
-
duration:
|
|
508
|
+
duration: jt,
|
|
509
509
|
message: t,
|
|
510
510
|
type: o
|
|
511
511
|
};
|
|
@@ -537,17 +537,17 @@ class be {
|
|
|
537
537
|
this.getInstance().removeNotification(t);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
const
|
|
540
|
+
const Ft = { class: "toast toast-top toast-center z-[999]" }, Kt = /* @__PURE__ */ k({
|
|
541
541
|
__name: "notifications",
|
|
542
542
|
setup(e) {
|
|
543
543
|
const t = be.getInstance();
|
|
544
|
-
return (o, n) => (r(), f("div",
|
|
545
|
-
(r(!0), f(L, null, M(g(t).notifications.value, (l) => (r(), y(
|
|
544
|
+
return (o, n) => (r(), f("div", Ft, [
|
|
545
|
+
(r(!0), f(L, null, M(g(t).notifications.value, (l) => (r(), y(qt, B({
|
|
546
546
|
key: l.id
|
|
547
547
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
548
548
|
]));
|
|
549
549
|
}
|
|
550
|
-
}),
|
|
550
|
+
}), Ut = { class: "flex h-screen flex-col" }, Ht = { class: "shrink-0" }, Wt = { class: "navbar bg-primary text-primary-content w-full z-100" }, Gt = { class: "navbar-start" }, Xt = { class: "navbar-center" }, Zt = ["href"], Jt = { class: "navbar-end" }, Qt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Yt = { class: "drawer-side h-full shadow-md" }, eo = { class: "flex-grow overflow-y-auto" }, to = { class: "bg-base-200 p-4" }, $n = /* @__PURE__ */ k({
|
|
551
551
|
__name: "shell.component",
|
|
552
552
|
props: {
|
|
553
553
|
title: {},
|
|
@@ -560,7 +560,7 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
560
560
|
setup(e, { emit: t }) {
|
|
561
561
|
const n = e, l = x(!1), a = () => {
|
|
562
562
|
l.value = !l.value;
|
|
563
|
-
}, c = t, d =
|
|
563
|
+
}, c = t, d = v(() => n.user ? {
|
|
564
564
|
label: n.user.name,
|
|
565
565
|
items: [
|
|
566
566
|
{
|
|
@@ -572,29 +572,29 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
572
572
|
]
|
|
573
573
|
} : null);
|
|
574
574
|
return (p, i) => (r(), f(L, null, [
|
|
575
|
-
V(
|
|
576
|
-
V(g(
|
|
577
|
-
u("div",
|
|
578
|
-
u("header",
|
|
579
|
-
u("nav",
|
|
580
|
-
u("div",
|
|
575
|
+
V(Kt),
|
|
576
|
+
V(g(Nt)),
|
|
577
|
+
u("div", Ut, [
|
|
578
|
+
u("header", Ht, [
|
|
579
|
+
u("nav", Wt, [
|
|
580
|
+
u("div", Gt, [
|
|
581
581
|
u("button", {
|
|
582
582
|
"aria-label": "open sidebar",
|
|
583
583
|
class: "btn btn-square btn-ghost p-1",
|
|
584
584
|
onClick: a
|
|
585
585
|
}, [
|
|
586
586
|
V(g(q), {
|
|
587
|
-
icon: g(
|
|
587
|
+
icon: g(R).Hamburger
|
|
588
588
|
}, null, 8, ["icon"])
|
|
589
589
|
])
|
|
590
590
|
]),
|
|
591
|
-
u("div",
|
|
591
|
+
u("div", Xt, [
|
|
592
592
|
u("a", {
|
|
593
593
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
594
594
|
href: g("/")
|
|
595
|
-
}, w(e.title), 9,
|
|
595
|
+
}, w(e.title), 9, Zt)
|
|
596
596
|
]),
|
|
597
|
-
u("div",
|
|
597
|
+
u("div", Jt, [
|
|
598
598
|
d.value ? (r(), y(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : _("", !0)
|
|
599
599
|
])
|
|
600
600
|
])
|
|
@@ -610,10 +610,10 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
610
610
|
}, null, 512), [
|
|
611
611
|
[Ce, l.value]
|
|
612
612
|
]),
|
|
613
|
-
u("main",
|
|
613
|
+
u("main", Qt, [
|
|
614
614
|
P(p.$slots, "default")
|
|
615
615
|
]),
|
|
616
|
-
u("div",
|
|
616
|
+
u("div", Yt, [
|
|
617
617
|
i[1] || (i[1] = u("label", {
|
|
618
618
|
for: "app-drawer",
|
|
619
619
|
"aria-label": "close sidebar",
|
|
@@ -623,7 +623,7 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
623
623
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
624
624
|
style: X({ width: e.widthSidebar + "px" })
|
|
625
625
|
}, [
|
|
626
|
-
u("ul",
|
|
626
|
+
u("ul", eo, [
|
|
627
627
|
(r(!0), f(L, null, M(e.menu, (s) => (r(), f("li", {
|
|
628
628
|
key: s.label
|
|
629
629
|
}, [
|
|
@@ -637,27 +637,27 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
637
637
|
}, 1032, ["to"])
|
|
638
638
|
]))), 128))
|
|
639
639
|
]),
|
|
640
|
-
u("div",
|
|
640
|
+
u("div", to, " version: " + w(e.version), 1)
|
|
641
641
|
], 4)
|
|
642
642
|
])
|
|
643
643
|
], 2)
|
|
644
644
|
])
|
|
645
645
|
], 64));
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
647
|
+
}), oo = {
|
|
648
648
|
currentPage: { type: Number, required: !0 },
|
|
649
649
|
page: { type: Number, required: !0 },
|
|
650
650
|
label: { type: String, required: !0 },
|
|
651
651
|
neverActive: { type: Boolean, default: !1 },
|
|
652
652
|
disabled: { type: Boolean, default: !1 }
|
|
653
|
-
},
|
|
653
|
+
}, so = ["updatePage", "updatePageSize"], J = /* @__PURE__ */ k({
|
|
654
654
|
__name: "pagination-button.component",
|
|
655
|
-
props:
|
|
656
|
-
emits:
|
|
655
|
+
props: oo,
|
|
656
|
+
emits: so,
|
|
657
657
|
setup(e, { emit: t }) {
|
|
658
|
-
const o = e, n = t, l =
|
|
658
|
+
const o = e, n = t, l = v(
|
|
659
659
|
() => o.neverActive ? !1 : o.page === o.currentPage
|
|
660
|
-
), a =
|
|
660
|
+
), a = v(() => o.neverActive ? z.blank : l.value ? z.primary : z.secondary), c = () => {
|
|
661
661
|
n("updatePage", o.page);
|
|
662
662
|
};
|
|
663
663
|
return (d, p) => (r(), y(g(N), {
|
|
@@ -673,19 +673,19 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
673
673
|
_: 1
|
|
674
674
|
}, 8, ["disabled", "color"]));
|
|
675
675
|
}
|
|
676
|
-
}),
|
|
676
|
+
}), no = {
|
|
677
677
|
totalItems: { type: Number, default: 0 },
|
|
678
678
|
itemsPerPage: { type: Number, default: 1 },
|
|
679
679
|
currentPage: { type: Number, default: 1 }
|
|
680
|
-
},
|
|
680
|
+
}, lo = ["updatePage", "updatePageSize"], ao = { class: "flex gap-2" }, ro = { class: "flex flex-1 justify-center items-center" }, io = { class: "flex gap-1" }, uo = { class: "text-sm" }, Q = 6, co = /* @__PURE__ */ k({
|
|
681
681
|
__name: "pagination.component",
|
|
682
|
-
props:
|
|
683
|
-
emits:
|
|
682
|
+
props: no,
|
|
683
|
+
emits: lo,
|
|
684
684
|
setup(e, { emit: t }) {
|
|
685
|
-
const o = e, n = t, l =
|
|
685
|
+
const o = e, n = t, l = v(() => {
|
|
686
686
|
let s = Math.ceil(o.totalItems / o.itemsPerPage);
|
|
687
687
|
return s < 1 ? 1 : s;
|
|
688
|
-
}), a = Q / 2, c =
|
|
688
|
+
}), a = Q / 2, c = v(() => {
|
|
689
689
|
if (l.value <= Q)
|
|
690
690
|
return {
|
|
691
691
|
min: 1,
|
|
@@ -704,25 +704,25 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
704
704
|
page: -10,
|
|
705
705
|
disabled: !0,
|
|
706
706
|
neverActive: !0
|
|
707
|
-
}), p =
|
|
707
|
+
}), p = v(() => {
|
|
708
708
|
let s = l.value;
|
|
709
709
|
s < 1 && (s = 1);
|
|
710
|
-
const m = o.currentPage, b = [], { min:
|
|
710
|
+
const m = o.currentPage, b = [], { min: h, max: D } = c.value;
|
|
711
711
|
return Array.from({ length: s }, (H, A) => {
|
|
712
712
|
const C = A + 1;
|
|
713
|
-
C !== 1 && C !== s && (C > D || C <
|
|
713
|
+
C !== 1 && C !== s && (C > D || C < h) || (C === s && s > 1 && D < s && b.push(d(m)), b.push({
|
|
714
714
|
label: `${C}`,
|
|
715
715
|
totalPages: s,
|
|
716
716
|
currentPage: m,
|
|
717
717
|
page: C
|
|
718
|
-
}), C === 1 && s > 1 &&
|
|
718
|
+
}), C === 1 && s > 1 && h > 1 && b.push(d(m)));
|
|
719
719
|
}), b;
|
|
720
720
|
}), i = (s) => {
|
|
721
721
|
n("updatePage", s);
|
|
722
722
|
};
|
|
723
|
-
return (s, m) => (r(), f("div",
|
|
724
|
-
u("div",
|
|
725
|
-
u("div",
|
|
723
|
+
return (s, m) => (r(), f("div", ao, [
|
|
724
|
+
u("div", ro, [
|
|
725
|
+
u("div", io, [
|
|
726
726
|
V(J, B(o, {
|
|
727
727
|
page: 1,
|
|
728
728
|
label: "<<",
|
|
@@ -761,43 +761,43 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
761
761
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
762
762
|
])
|
|
763
763
|
]),
|
|
764
|
-
u("div",
|
|
764
|
+
u("div", uo, " page " + w(s.currentPage) + " of " + w(l.value), 1)
|
|
765
765
|
]));
|
|
766
766
|
}
|
|
767
767
|
}), Be = {
|
|
768
768
|
data: { type: Object, required: !0 },
|
|
769
769
|
column: { type: Object, required: !0 },
|
|
770
770
|
options: { type: Object }
|
|
771
|
-
},
|
|
771
|
+
}, Cn = /* @__PURE__ */ k({
|
|
772
772
|
__name: "text.cell",
|
|
773
773
|
props: Be,
|
|
774
774
|
setup(e) {
|
|
775
|
-
const t = e, o =
|
|
775
|
+
const t = e, o = v(() => {
|
|
776
776
|
const n = t.data[t.column.id];
|
|
777
777
|
return n ? t.column.options?.format === "keyValue" ? n[t.column.options.key] : n : null;
|
|
778
778
|
});
|
|
779
779
|
return (n, l) => w(o.value);
|
|
780
780
|
}
|
|
781
|
-
}),
|
|
781
|
+
}), po = {
|
|
782
782
|
column: { type: Object, required: !0 },
|
|
783
783
|
sortColumn: { type: String },
|
|
784
784
|
sortDirection: { type: String }
|
|
785
|
-
},
|
|
785
|
+
}, fo = ["sort"], mo = { class: "flex-grow pr-2" }, bo = { class: "h-4 w-4" }, go = /* @__PURE__ */ k({
|
|
786
786
|
__name: "sort.header",
|
|
787
|
-
props:
|
|
788
|
-
emits:
|
|
787
|
+
props: po,
|
|
788
|
+
emits: fo,
|
|
789
789
|
setup(e, { emit: t }) {
|
|
790
|
-
const o = e, n = t, l =
|
|
791
|
-
() => o.sortDirection === "asc" ?
|
|
792
|
-
), a =
|
|
790
|
+
const o = e, n = t, l = v(
|
|
791
|
+
() => o.sortDirection === "asc" ? R.BarsArrowUp : R.BarsArrowDown
|
|
792
|
+
), a = v(() => o.column.options?.sortId ?? o.column.id), c = () => {
|
|
793
793
|
n("sort", a.value);
|
|
794
794
|
};
|
|
795
795
|
return (d, p) => (r(), f("button", {
|
|
796
796
|
class: "flex items-center",
|
|
797
797
|
onClick: c
|
|
798
798
|
}, [
|
|
799
|
-
u("span",
|
|
800
|
-
u("div",
|
|
799
|
+
u("span", mo, w(d.column.label), 1),
|
|
800
|
+
u("div", bo, [
|
|
801
801
|
d.sortColumn === a.value ? (r(), y(g(q), {
|
|
802
802
|
key: 0,
|
|
803
803
|
icon: l.value
|
|
@@ -805,7 +805,7 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
805
805
|
])
|
|
806
806
|
]));
|
|
807
807
|
}
|
|
808
|
-
}),
|
|
808
|
+
}), vo = {
|
|
809
809
|
loading: { type: Boolean, default: !1 },
|
|
810
810
|
actions: { type: Array },
|
|
811
811
|
data: { type: Array },
|
|
@@ -815,12 +815,12 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
815
815
|
},
|
|
816
816
|
page: { type: Object },
|
|
817
817
|
sort: { type: Object }
|
|
818
|
-
},
|
|
818
|
+
}, ho = ["updatePage", "sort"], yo = { class: "table w-full" }, wo = { key: 0 }, ko = ["colspan"], _o = ["ui-id"], $o = { class: "flex gap-2" }, xn = /* @__PURE__ */ k({
|
|
819
819
|
__name: "table.component",
|
|
820
|
-
props:
|
|
821
|
-
emits:
|
|
820
|
+
props: vo,
|
|
821
|
+
emits: ho,
|
|
822
822
|
setup(e, { emit: t }) {
|
|
823
|
-
const o = t, n = Ie(), l =
|
|
823
|
+
const o = t, n = Ie(), l = v(() => "onEdit" in n), a = v(() => "onDelete" in n), c = (s) => {
|
|
824
824
|
n.onEdit?.(s);
|
|
825
825
|
}, d = (s) => {
|
|
826
826
|
n.onDelete?.(s);
|
|
@@ -830,72 +830,72 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
830
830
|
o("sort", s);
|
|
831
831
|
};
|
|
832
832
|
return (s, m) => (r(), f(L, null, [
|
|
833
|
-
u("table",
|
|
833
|
+
u("table", yo, [
|
|
834
834
|
u("thead", null, [
|
|
835
835
|
u("tr", null, [
|
|
836
836
|
(r(!0), f(L, null, M(s.displayColumns, (b) => (r(), f("th", {
|
|
837
837
|
key: b.scope
|
|
838
838
|
}, [
|
|
839
|
-
V(
|
|
839
|
+
V(go, B({ column: b }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
|
|
840
840
|
]))), 128)),
|
|
841
841
|
m[0] || (m[0] = u("th", null, null, -1))
|
|
842
842
|
])
|
|
843
843
|
]),
|
|
844
844
|
u("tbody", null, [
|
|
845
|
-
s.loading ? (r(), f("tr",
|
|
845
|
+
s.loading ? (r(), f("tr", wo, [
|
|
846
846
|
u("td", {
|
|
847
847
|
colspan: s.displayColumns.length + 1,
|
|
848
848
|
class: "text-center"
|
|
849
849
|
}, [...m[1] || (m[1] = [
|
|
850
850
|
u("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
851
|
-
])], 8,
|
|
851
|
+
])], 8, ko)
|
|
852
852
|
])) : _("", !0),
|
|
853
853
|
(r(!0), f(L, null, M(s.data, (b) => (r(), f("tr", {
|
|
854
854
|
key: b.id,
|
|
855
855
|
"ui-id": `table_${b.id}`
|
|
856
856
|
}, [
|
|
857
|
-
(r(!0), f(L, null, M(s.displayColumns, (
|
|
858
|
-
key:
|
|
857
|
+
(r(!0), f(L, null, M(s.displayColumns, (h) => (r(), f("td", {
|
|
858
|
+
key: h.scope
|
|
859
859
|
}, [
|
|
860
|
-
(r(), y(ne(
|
|
860
|
+
(r(), y(ne(h.component), B({ ref_for: !0 }, h, {
|
|
861
861
|
data: b,
|
|
862
|
-
column:
|
|
862
|
+
column: h
|
|
863
863
|
}), null, 16, ["data", "column"]))
|
|
864
864
|
]))), 128)),
|
|
865
865
|
u("td", null, [
|
|
866
|
-
u("span",
|
|
867
|
-
(r(!0), f(L, null, M(s.actions, (
|
|
868
|
-
key:
|
|
869
|
-
"aria-label":
|
|
870
|
-
icon:
|
|
866
|
+
u("span", $o, [
|
|
867
|
+
(r(!0), f(L, null, M(s.actions, (h) => (r(), y(N, {
|
|
868
|
+
key: h.label,
|
|
869
|
+
"aria-label": h.label,
|
|
870
|
+
icon: h.icon,
|
|
871
871
|
outline: !0,
|
|
872
|
-
onClick: (D) =>
|
|
872
|
+
onClick: (D) => h.action(b)
|
|
873
873
|
}, {
|
|
874
874
|
default: S(() => [
|
|
875
|
-
E(w(
|
|
875
|
+
E(w(h.label), 1)
|
|
876
876
|
]),
|
|
877
877
|
_: 2
|
|
878
878
|
}, 1032, ["aria-label", "icon", "onClick"]))), 128)),
|
|
879
879
|
l.value ? (r(), y(N, {
|
|
880
880
|
key: 0,
|
|
881
881
|
"aria-label": "Edit",
|
|
882
|
-
icon: g(
|
|
882
|
+
icon: g(R).Edit,
|
|
883
883
|
outline: !0,
|
|
884
|
-
onClick: (
|
|
884
|
+
onClick: (h) => c(b)
|
|
885
885
|
}, null, 8, ["icon", "onClick"])) : _("", !0),
|
|
886
886
|
a.value ? (r(), y(N, {
|
|
887
887
|
key: 1,
|
|
888
888
|
"aria-label": "Delete",
|
|
889
|
-
icon: g(
|
|
889
|
+
icon: g(R).Delete,
|
|
890
890
|
outline: !0,
|
|
891
|
-
onClick: (
|
|
891
|
+
onClick: (h) => d(b)
|
|
892
892
|
}, null, 8, ["icon", "onClick"])) : _("", !0)
|
|
893
893
|
])
|
|
894
894
|
])
|
|
895
|
-
], 8,
|
|
895
|
+
], 8, _o))), 128))
|
|
896
896
|
])
|
|
897
897
|
]),
|
|
898
|
-
s.page ? (r(), y(
|
|
898
|
+
s.page ? (r(), y(co, {
|
|
899
899
|
key: 0,
|
|
900
900
|
class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
|
|
901
901
|
"total-items": s.page.count,
|
|
@@ -905,59 +905,59 @@ const Kt = { class: "toast toast-top toast-center z-[999]" }, Ut = /* @__PURE__
|
|
|
905
905
|
}, null, 8, ["total-items", "items-per-page", "current-page"])) : _("", !0)
|
|
906
906
|
], 64));
|
|
907
907
|
}
|
|
908
|
-
}),
|
|
908
|
+
}), Co = { class: "flex justify-center" }, Ln = /* @__PURE__ */ k({
|
|
909
909
|
__name: "boolean.cell",
|
|
910
910
|
props: Be,
|
|
911
911
|
setup(e) {
|
|
912
|
-
const t = e, o =
|
|
912
|
+
const t = e, o = v(() => {
|
|
913
913
|
const n = t.data[t.column.id];
|
|
914
914
|
return n ? t.column.options?.format === "keyValue" ? n[t.column.options.key] : n : null;
|
|
915
915
|
});
|
|
916
|
-
return (n, l) => (r(), f("div",
|
|
916
|
+
return (n, l) => (r(), f("div", Co, [
|
|
917
917
|
o.value === !0 ? (r(), y(q, {
|
|
918
918
|
key: 0,
|
|
919
|
-
icon: g(
|
|
919
|
+
icon: g(R).Check,
|
|
920
920
|
size: "sm"
|
|
921
921
|
}, null, 8, ["icon"])) : _("", !0)
|
|
922
922
|
]));
|
|
923
923
|
}
|
|
924
|
-
}),
|
|
924
|
+
}), xo = (e, t) => {
|
|
925
925
|
const o = e.__vccOpts || e;
|
|
926
926
|
for (const [n, l] of t)
|
|
927
927
|
o[n] = l;
|
|
928
928
|
return o;
|
|
929
|
-
},
|
|
929
|
+
}, Lo = {}, So = { class: "card bg-base-100 shadow-sm" }, Po = { class: "card-body" }, Mo = {
|
|
930
930
|
key: 0,
|
|
931
931
|
class: "card-title"
|
|
932
|
-
},
|
|
932
|
+
}, Bo = {
|
|
933
933
|
key: 1,
|
|
934
934
|
class: "card-actions justify-end"
|
|
935
935
|
};
|
|
936
|
-
function
|
|
937
|
-
return r(), f("div",
|
|
938
|
-
u("div",
|
|
939
|
-
e.$slots.title ? (r(), f("h2",
|
|
936
|
+
function Vo(e, t) {
|
|
937
|
+
return r(), f("div", So, [
|
|
938
|
+
u("div", Po, [
|
|
939
|
+
e.$slots.title ? (r(), f("h2", Mo, [
|
|
940
940
|
P(e.$slots, "title")
|
|
941
941
|
])) : _("", !0),
|
|
942
942
|
u("p", null, [
|
|
943
943
|
P(e.$slots, "default"),
|
|
944
944
|
P(e.$slots, "content")
|
|
945
945
|
]),
|
|
946
|
-
e.$slots.actions ? (r(), f("div",
|
|
946
|
+
e.$slots.actions ? (r(), f("div", Bo, [
|
|
947
947
|
P(e.$slots, "actions")
|
|
948
948
|
])) : _("", !0)
|
|
949
949
|
])
|
|
950
950
|
]);
|
|
951
951
|
}
|
|
952
|
-
const
|
|
952
|
+
const Sn = /* @__PURE__ */ xo(Lo, [["render", Vo]]), Pn = (e, t) => {
|
|
953
953
|
if (!e) return null;
|
|
954
954
|
const o = (n) => {
|
|
955
955
|
e.contains(n.target) || t();
|
|
956
956
|
};
|
|
957
957
|
return document.addEventListener("click", o), o;
|
|
958
|
-
},
|
|
958
|
+
}, Mn = (e) => {
|
|
959
959
|
document.removeEventListener("click", e);
|
|
960
|
-
},
|
|
960
|
+
}, Bn = {
|
|
961
961
|
beforeMount(e, t) {
|
|
962
962
|
e.clickOutsideEvent = function(o) {
|
|
963
963
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -967,17 +967,17 @@ const Pn = /* @__PURE__ */ Lo(So, [["render", Ao]]), Mn = (e, t) => {
|
|
|
967
967
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
function
|
|
970
|
+
function Ao(e) {
|
|
971
971
|
return e.replace(/[:\s_-]+(.)/g, (t, o) => o.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function Vn(e) {
|
|
974
974
|
const t = De();
|
|
975
975
|
if (!t)
|
|
976
976
|
return !1;
|
|
977
977
|
const o = t.vnode.props;
|
|
978
978
|
if (!o)
|
|
979
979
|
return !1;
|
|
980
|
-
const n =
|
|
980
|
+
const n = Ao(e), l = Re(e);
|
|
981
981
|
return [
|
|
982
982
|
re(e),
|
|
983
983
|
re(l),
|
|
@@ -989,7 +989,7 @@ function An(e) {
|
|
|
989
989
|
(c) => !!o[c]
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
const
|
|
992
|
+
const Oo = ["select"], ge = {
|
|
993
993
|
options: { type: Array, required: !1 },
|
|
994
994
|
isLoading: {
|
|
995
995
|
type: Boolean,
|
|
@@ -1065,16 +1065,16 @@ const Io = ["select"], ge = {
|
|
|
1065
1065
|
valueKey: { type: String, default: "value" },
|
|
1066
1066
|
/** add a new button next to the list*/
|
|
1067
1067
|
enableCreate: { type: Boolean, default: !1 }
|
|
1068
|
-
},
|
|
1068
|
+
}, Io = ["select", "clear", "close", "create"], Ve = {
|
|
1069
1069
|
...ge,
|
|
1070
1070
|
...ve,
|
|
1071
1071
|
isOpen: { type: Boolean, default: !1 },
|
|
1072
1072
|
isActive: { type: Function, default: (e) => !1 }
|
|
1073
|
-
},
|
|
1073
|
+
}, Do = {
|
|
1074
1074
|
key: 1,
|
|
1075
1075
|
tabindex: "-1",
|
|
1076
1076
|
class: "pointer-events-none"
|
|
1077
|
-
}, Ro = ["data-index", "aria-selected", "onMousedown", "onMousemove"],
|
|
1077
|
+
}, Ro = ["data-index", "aria-selected", "onMousedown", "onMousemove"], To = ["innerHTML"], Eo = {
|
|
1078
1078
|
key: 0,
|
|
1079
1079
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1080
1080
|
class: "h-4 w-4 shrink-0 opacity-80",
|
|
@@ -1083,7 +1083,7 @@ const Io = ["select"], ge = {
|
|
|
1083
1083
|
stroke: "currentColor",
|
|
1084
1084
|
"stroke-width": "2.5"
|
|
1085
1085
|
};
|
|
1086
|
-
function
|
|
1086
|
+
function zo(e, t) {
|
|
1087
1087
|
if (!t) return e;
|
|
1088
1088
|
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1089
1089
|
return e.replace(
|
|
@@ -1091,10 +1091,10 @@ function No(e, t) {
|
|
|
1091
1091
|
'<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
|
|
1092
1092
|
);
|
|
1093
1093
|
}
|
|
1094
|
-
const
|
|
1094
|
+
const No = /* @__PURE__ */ k({
|
|
1095
1095
|
__name: "ListResults",
|
|
1096
1096
|
props: ge,
|
|
1097
|
-
emits:
|
|
1097
|
+
emits: Oo,
|
|
1098
1098
|
setup(e, { expose: t, emit: o }) {
|
|
1099
1099
|
const n = e, l = x(-1), a = x(), c = o;
|
|
1100
1100
|
j(
|
|
@@ -1141,27 +1141,27 @@ const qo = /* @__PURE__ */ k({
|
|
|
1141
1141
|
u("div", { class: "flex items-center gap-3" }, [
|
|
1142
1142
|
u("div", { class: "skeleton h-3 w-3/4 rounded" })
|
|
1143
1143
|
], -1)
|
|
1144
|
-
])])), 64)) : s.options?.length === 0 ? (r(), f("li",
|
|
1144
|
+
])])), 64)) : s.options?.length === 0 ? (r(), f("li", Do, [...m[1] || (m[1] = [
|
|
1145
1145
|
u("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1146
|
-
])])) : (r(!0), f(L, { key: 2 }, M(s.options, (b,
|
|
1146
|
+
])])) : (r(!0), f(L, { key: 2 }, M(s.options, (b, h) => (r(), f("li", {
|
|
1147
1147
|
key: b.value,
|
|
1148
|
-
"data-index":
|
|
1148
|
+
"data-index": h,
|
|
1149
1149
|
role: "option",
|
|
1150
|
-
"aria-selected":
|
|
1150
|
+
"aria-selected": h === l.value,
|
|
1151
1151
|
onMousedown: le((D) => i(b), ["prevent"]),
|
|
1152
|
-
onMousemove: (D) => l.value =
|
|
1152
|
+
onMousemove: (D) => l.value = h
|
|
1153
1153
|
}, [
|
|
1154
1154
|
u("a", {
|
|
1155
1155
|
class: $(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1156
|
-
"active bg-secondary text-primary-content":
|
|
1157
|
-
"hover:bg-base-200":
|
|
1156
|
+
"active bg-secondary text-primary-content": h === l.value,
|
|
1157
|
+
"hover:bg-base-200": h !== l.value
|
|
1158
1158
|
}])
|
|
1159
1159
|
}, [
|
|
1160
1160
|
u("span", {
|
|
1161
1161
|
class: "whitespace-nowrap",
|
|
1162
|
-
innerHTML:
|
|
1163
|
-
}, null, 8,
|
|
1164
|
-
s.isActive(b) ? (r(), f("svg",
|
|
1162
|
+
innerHTML: zo(b.label, s.query)
|
|
1163
|
+
}, null, 8, To),
|
|
1164
|
+
s.isActive(b) ? (r(), f("svg", Eo, [...m[2] || (m[2] = [
|
|
1165
1165
|
u("path", {
|
|
1166
1166
|
"stroke-linecap": "round",
|
|
1167
1167
|
"stroke-linejoin": "round",
|
|
@@ -1172,16 +1172,16 @@ const qo = /* @__PURE__ */ k({
|
|
|
1172
1172
|
], 40, Ro))), 128))
|
|
1173
1173
|
], 512));
|
|
1174
1174
|
}
|
|
1175
|
-
}), Ae = ({ isTouched: e, errors: t }) => !!(e && t),
|
|
1175
|
+
}), Ae = ({ isTouched: e, errors: t }) => !!(e && t), qo = (e, t, o, n) => t === void 0 || t !== void 0 && !e || !n && !o, U = (e, t) => [e, { "input-error": Ae(t) }], jo = { key: 0 }, Z = /* @__PURE__ */ k({
|
|
1176
1176
|
__name: "ControlWrapper",
|
|
1177
1177
|
props: K,
|
|
1178
1178
|
setup(e) {
|
|
1179
|
-
const t = e, o =
|
|
1179
|
+
const t = e, o = v(() => !qo(
|
|
1180
1180
|
t.visible,
|
|
1181
1181
|
t.description,
|
|
1182
1182
|
t.isFocused,
|
|
1183
1183
|
!0
|
|
1184
|
-
)), n =
|
|
1184
|
+
)), n = v(() => t.required), l = v(() => Ae(t)), a = v(() => ae(t.styles));
|
|
1185
1185
|
return (c, d) => (r(), f("fieldset", {
|
|
1186
1186
|
class: $(["fieldset", [c.width, a.value.control.wrapper]])
|
|
1187
1187
|
}, [
|
|
@@ -1190,7 +1190,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1190
1190
|
}, [
|
|
1191
1191
|
c.hideLabel ? _("", !0) : (r(), f(L, { key: 0 }, [
|
|
1192
1192
|
u("span", null, w(c.label), 1),
|
|
1193
|
-
n.value ? (r(), f("span",
|
|
1193
|
+
n.value ? (r(), f("span", jo, "*")) : _("", !0)
|
|
1194
1194
|
], 64)),
|
|
1195
1195
|
d[0] || (d[0] = E(" ", -1))
|
|
1196
1196
|
], 2),
|
|
@@ -1200,13 +1200,13 @@ const qo = /* @__PURE__ */ k({
|
|
|
1200
1200
|
}, w(l.value ? c.errors : o.value ? c.description : null), 3)
|
|
1201
1201
|
], 2));
|
|
1202
1202
|
}
|
|
1203
|
-
}),
|
|
1203
|
+
}), Fo = ["aria-label"], Ko = { class: "flex items-center w-full" }, Uo = { class: "overflow-hidden w-full" }, Ho = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, Wo = {
|
|
1204
1204
|
key: 0,
|
|
1205
1205
|
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1206
1206
|
}, he = /* @__PURE__ */ k({
|
|
1207
1207
|
__name: "SelectWrapper",
|
|
1208
1208
|
props: Ve,
|
|
1209
|
-
emits:
|
|
1209
|
+
emits: Io,
|
|
1210
1210
|
setup(e, { emit: t }) {
|
|
1211
1211
|
const o = e, n = x(), l = x(), a = t, c = () => {
|
|
1212
1212
|
d(), a("clear");
|
|
@@ -1233,16 +1233,16 @@ const qo = /* @__PURE__ */ k({
|
|
|
1233
1233
|
}, [
|
|
1234
1234
|
V(Z, ee(te(o)), {
|
|
1235
1235
|
default: S(() => [
|
|
1236
|
-
u("div",
|
|
1236
|
+
u("div", Ko, [
|
|
1237
1237
|
u("div", {
|
|
1238
1238
|
class: "relative w-full",
|
|
1239
1239
|
onKeydown: p
|
|
1240
1240
|
}, [
|
|
1241
|
-
u("div",
|
|
1241
|
+
u("div", Uo, [
|
|
1242
1242
|
P(s.$slots, "default")
|
|
1243
1243
|
]),
|
|
1244
|
-
u("div",
|
|
1245
|
-
s.isLoading && !s.label ? (r(), f("span",
|
|
1244
|
+
u("div", Ho, [
|
|
1245
|
+
s.isLoading && !s.label ? (r(), f("span", Wo)) : _("", !0),
|
|
1246
1246
|
s.query && !s.isLoading ? (r(), f("button", {
|
|
1247
1247
|
key: 1,
|
|
1248
1248
|
type: "button",
|
|
@@ -1281,7 +1281,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1281
1281
|
}, null, -1)
|
|
1282
1282
|
])], 2))
|
|
1283
1283
|
]),
|
|
1284
|
-
V(
|
|
1284
|
+
V(Te, {
|
|
1285
1285
|
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1286
1286
|
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1287
1287
|
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
@@ -1290,7 +1290,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1290
1290
|
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1291
1291
|
}, {
|
|
1292
1292
|
default: S(() => [
|
|
1293
|
-
s.isOpen ? (r(), y(
|
|
1293
|
+
s.isOpen ? (r(), y(No, {
|
|
1294
1294
|
key: 0,
|
|
1295
1295
|
ref_key: "listResultsRef",
|
|
1296
1296
|
ref: l,
|
|
@@ -1306,7 +1306,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1306
1306
|
], 32),
|
|
1307
1307
|
s.enableCreate ? (r(), y(N, {
|
|
1308
1308
|
key: 0,
|
|
1309
|
-
icon: g(
|
|
1309
|
+
icon: g(R).Plus,
|
|
1310
1310
|
color: g(z).blank,
|
|
1311
1311
|
size: "lg",
|
|
1312
1312
|
tooltip: "Create new",
|
|
@@ -1317,7 +1317,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1317
1317
|
]),
|
|
1318
1318
|
_: 3
|
|
1319
1319
|
}, 16)
|
|
1320
|
-
], 8,
|
|
1320
|
+
], 8, Fo));
|
|
1321
1321
|
}
|
|
1322
1322
|
}), ue = (e, t) => {
|
|
1323
1323
|
if (e)
|
|
@@ -1325,15 +1325,15 @@ const qo = /* @__PURE__ */ k({
|
|
|
1325
1325
|
}, ie = (e, t) => {
|
|
1326
1326
|
if (e)
|
|
1327
1327
|
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1328
|
-
},
|
|
1328
|
+
}, Go = (e) => {
|
|
1329
1329
|
const t = x([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
|
|
1330
1330
|
const m = [];
|
|
1331
1331
|
o.clear(), n.clear(), s?.forEach((b) => {
|
|
1332
|
-
const
|
|
1332
|
+
const h = {
|
|
1333
1333
|
value: ie(b, e),
|
|
1334
1334
|
label: ue(b, e)
|
|
1335
1335
|
};
|
|
1336
|
-
o.set(
|
|
1336
|
+
o.set(h.value, b), n.set(h.value, h), m.push(h);
|
|
1337
1337
|
}), t.value = m;
|
|
1338
1338
|
}, a = (s) => o.get(s.value);
|
|
1339
1339
|
return {
|
|
@@ -1345,7 +1345,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1345
1345
|
getOption: (s) => n.get(ie(s, e)),
|
|
1346
1346
|
getOriginals: (...s) => s.map(a).filter(Boolean)
|
|
1347
1347
|
};
|
|
1348
|
-
}, ye = (e) =>
|
|
1348
|
+
}, ye = (e) => Go(e), Xo = ["aria-label"], An = /* @__PURE__ */ k({
|
|
1349
1349
|
__name: "SelectComponent",
|
|
1350
1350
|
props: /* @__PURE__ */ I(ve, {
|
|
1351
1351
|
modelValue: {},
|
|
@@ -1363,14 +1363,14 @@ const qo = /* @__PURE__ */ k({
|
|
|
1363
1363
|
);
|
|
1364
1364
|
const p = (A) => {
|
|
1365
1365
|
l("change", A);
|
|
1366
|
-
}, i =
|
|
1366
|
+
}, i = v(
|
|
1367
1367
|
() => a.value ? c.getLabels(a.value)[0] : ""
|
|
1368
|
-
), s =
|
|
1368
|
+
), s = v(() => ae(n.styles)), m = v(
|
|
1369
1369
|
() => U(s.value.control.select, n)
|
|
1370
1370
|
), b = (A) => {
|
|
1371
1371
|
const C = c.getOriginal(A);
|
|
1372
1372
|
a.value = C, p(C);
|
|
1373
|
-
},
|
|
1373
|
+
}, h = () => {
|
|
1374
1374
|
o.value = !1, a.value = null, p(void 0);
|
|
1375
1375
|
}, D = (A) => c.getValues(a.value)?.[0] === A.value, H = () => {
|
|
1376
1376
|
o.value = !1;
|
|
@@ -1383,7 +1383,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1383
1383
|
"is-active": D,
|
|
1384
1384
|
onClose: H,
|
|
1385
1385
|
onSelect: b,
|
|
1386
|
-
onClear:
|
|
1386
|
+
onClear: h
|
|
1387
1387
|
}), {
|
|
1388
1388
|
default: S(() => [
|
|
1389
1389
|
u("button", {
|
|
@@ -1391,13 +1391,13 @@ const qo = /* @__PURE__ */ k({
|
|
|
1391
1391
|
class: $(["truncate block text-left", [m.value, A.width]]),
|
|
1392
1392
|
"aria-label": A.id,
|
|
1393
1393
|
role: "combobox",
|
|
1394
|
-
onClick: C[0] || (C[0] = (
|
|
1395
|
-
}, w(i.value ?? "Select value"), 11,
|
|
1394
|
+
onClick: C[0] || (C[0] = (T) => o.value = !0)
|
|
1395
|
+
}, w(i.value ?? "Select value"), 11, Xo)
|
|
1396
1396
|
]),
|
|
1397
1397
|
_: 1
|
|
1398
1398
|
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1399
1399
|
}
|
|
1400
|
-
}),
|
|
1400
|
+
}), Zo = {
|
|
1401
1401
|
...ve,
|
|
1402
1402
|
...ge,
|
|
1403
1403
|
/** v-model binding */
|
|
@@ -1430,7 +1430,7 @@ const qo = /* @__PURE__ */ k({
|
|
|
1430
1430
|
default: !1
|
|
1431
1431
|
}
|
|
1432
1432
|
};
|
|
1433
|
-
function
|
|
1433
|
+
function Jo(e) {
|
|
1434
1434
|
const t = x([]), o = x(!1);
|
|
1435
1435
|
function n(a) {
|
|
1436
1436
|
if (!e.options) {
|
|
@@ -1447,7 +1447,7 @@ function Qo(e) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
return { results: t, isLoading: o, search: n, clear: l };
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function Qo(e) {
|
|
1451
1451
|
const t = x([]), o = x(!1);
|
|
1452
1452
|
let n = null, l = null;
|
|
1453
1453
|
async function a(p) {
|
|
@@ -1471,8 +1471,8 @@ function Yo(e) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
return { results: t, isLoading: o, search: c, clear: d };
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const t = e.fetchOptions ?
|
|
1474
|
+
function Yo(e) {
|
|
1475
|
+
const t = e.fetchOptions ? Qo(e) : Jo(e);
|
|
1476
1476
|
function o(n) {
|
|
1477
1477
|
t.search(n);
|
|
1478
1478
|
}
|
|
@@ -1483,12 +1483,12 @@ function es(e) {
|
|
|
1483
1483
|
clear: t.clear
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
|
-
const
|
|
1486
|
+
const es = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], On = /* @__PURE__ */ k({
|
|
1487
1487
|
__name: "AutoComplete",
|
|
1488
|
-
props:
|
|
1488
|
+
props: Zo,
|
|
1489
1489
|
emits: ["update:modelValue", "change", "clear", "focus", "blur"],
|
|
1490
1490
|
setup(e, { emit: t }) {
|
|
1491
|
-
const o = e, n = t, l = x(null), a = x(""), c = x(!1), d =
|
|
1491
|
+
const o = e, n = t, l = x(null), a = x(""), c = x(!1), d = Yo(o), { isLoading: p, triggerSearch: i, clear: s } = d, m = ye(o), { options: b } = m;
|
|
1492
1492
|
j(
|
|
1493
1493
|
() => d.results.value,
|
|
1494
1494
|
() => {
|
|
@@ -1507,7 +1507,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1507
1507
|
},
|
|
1508
1508
|
{ immediate: !0 }
|
|
1509
1509
|
);
|
|
1510
|
-
const
|
|
1510
|
+
const h = (O) => {
|
|
1511
1511
|
a.value = O.target.value, o.freeText ? n("update:modelValue", a.value) : n("update:modelValue", ""), i(a.value), c.value = !0;
|
|
1512
1512
|
}, D = () => {
|
|
1513
1513
|
i(a.value), c.value = !0;
|
|
@@ -1522,9 +1522,9 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1522
1522
|
a.value = O.label, c.value = !1, n("update:modelValue", G), n("change", G);
|
|
1523
1523
|
}, C = () => {
|
|
1524
1524
|
a.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), xe(() => l.value?.focus());
|
|
1525
|
-
},
|
|
1525
|
+
}, T = () => {
|
|
1526
1526
|
c.value = !1;
|
|
1527
|
-
}, W =
|
|
1527
|
+
}, W = v(() => ae(o.styles)), Oe = v(
|
|
1528
1528
|
() => U(W.value.control.select, o)
|
|
1529
1529
|
);
|
|
1530
1530
|
return (O, G) => (r(), y(he, B(o, {
|
|
@@ -1532,7 +1532,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1532
1532
|
"is-loading": g(p),
|
|
1533
1533
|
"is-open": c.value,
|
|
1534
1534
|
query: a.value,
|
|
1535
|
-
onClose:
|
|
1535
|
+
onClose: T,
|
|
1536
1536
|
onSelect: A,
|
|
1537
1537
|
onClear: C
|
|
1538
1538
|
}), {
|
|
@@ -1553,15 +1553,15 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1553
1553
|
value: a.value,
|
|
1554
1554
|
placeholder: O.placeholder,
|
|
1555
1555
|
disabled: !O.enabled,
|
|
1556
|
-
onInput:
|
|
1556
|
+
onInput: h,
|
|
1557
1557
|
onFocus: D,
|
|
1558
1558
|
onBlur: H
|
|
1559
|
-
}, null, 42,
|
|
1559
|
+
}, null, 42, es)
|
|
1560
1560
|
]),
|
|
1561
1561
|
_: 1
|
|
1562
1562
|
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1563
1563
|
}
|
|
1564
|
-
}),
|
|
1564
|
+
}), ts = ["aria-label"], In = /* @__PURE__ */ k({
|
|
1565
1565
|
__name: "MultiSelect",
|
|
1566
1566
|
props: /* @__PURE__ */ I(Ve, {
|
|
1567
1567
|
modelValue: {},
|
|
@@ -1579,35 +1579,35 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1579
1579
|
},
|
|
1580
1580
|
{ immediate: !0 }
|
|
1581
1581
|
);
|
|
1582
|
-
const i =
|
|
1582
|
+
const i = v(
|
|
1583
1583
|
() => a.value ? d.getLabels(...a.value).join(", ") : void 0
|
|
1584
|
-
), s =
|
|
1584
|
+
), s = v(
|
|
1585
1585
|
() => d.getValues(...a.value ?? [])
|
|
1586
1586
|
), m = (C) => {
|
|
1587
|
-
let
|
|
1587
|
+
let T = a.value ?? [];
|
|
1588
1588
|
if (D(C))
|
|
1589
|
-
|
|
1589
|
+
T = T.filter(
|
|
1590
1590
|
(W) => d.getOption(W)?.value !== C.value
|
|
1591
1591
|
);
|
|
1592
1592
|
else {
|
|
1593
1593
|
const W = d.getOriginal(C);
|
|
1594
|
-
|
|
1594
|
+
T.push(W);
|
|
1595
1595
|
}
|
|
1596
|
-
a.value =
|
|
1596
|
+
a.value = T, c(T);
|
|
1597
1597
|
}, b = () => {
|
|
1598
1598
|
o.value = !1, a.value = [], c([]);
|
|
1599
|
-
},
|
|
1599
|
+
}, h = () => {
|
|
1600
1600
|
o.value = !1;
|
|
1601
|
-
}, D = (C) => s.value?.includes(C.value) ?? !1, H =
|
|
1601
|
+
}, D = (C) => s.value?.includes(C.value) ?? !1, H = v(() => ae(n.styles)), A = v(
|
|
1602
1602
|
() => U(H.value.control.select, n)
|
|
1603
1603
|
);
|
|
1604
|
-
return (C,
|
|
1604
|
+
return (C, T) => (r(), y(he, B(n, {
|
|
1605
1605
|
options: g(p),
|
|
1606
1606
|
"is-open": o.value,
|
|
1607
1607
|
disabled: !C.enabled,
|
|
1608
1608
|
query: i.value,
|
|
1609
1609
|
"is-active": D,
|
|
1610
|
-
onClose:
|
|
1610
|
+
onClose: h,
|
|
1611
1611
|
onSelect: m,
|
|
1612
1612
|
onClear: b
|
|
1613
1613
|
}), {
|
|
@@ -1617,13 +1617,13 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1617
1617
|
class: $(["truncate block text-left", [A.value, C.width]]),
|
|
1618
1618
|
"aria-label": C.id,
|
|
1619
1619
|
role: "combobox",
|
|
1620
|
-
onClick:
|
|
1621
|
-
}, w(i.value ?? "Select value"), 11,
|
|
1620
|
+
onClick: T[0] || (T[0] = (W) => o.value = !0)
|
|
1621
|
+
}, w(i.value ?? "Select value"), 11, ts)
|
|
1622
1622
|
]),
|
|
1623
1623
|
_: 1
|
|
1624
1624
|
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1625
1625
|
}
|
|
1626
|
-
}),
|
|
1626
|
+
}), os = ["change"], ss = {
|
|
1627
1627
|
...K,
|
|
1628
1628
|
width: { type: String, default: "w-48" },
|
|
1629
1629
|
minHeight: { type: String, default: "min-h-[50vh]" },
|
|
@@ -1642,13 +1642,13 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1642
1642
|
}
|
|
1643
1643
|
]
|
|
1644
1644
|
}
|
|
1645
|
-
},
|
|
1645
|
+
}, ns = ["aria-label"], ls = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, as = ["title", "onClick"], rs = ["innerHTML"], is = { class: "card-body p-3" }, Dn = /* @__PURE__ */ k({
|
|
1646
1646
|
__name: "Markdown",
|
|
1647
|
-
props: /* @__PURE__ */ I(
|
|
1647
|
+
props: /* @__PURE__ */ I(ss, {
|
|
1648
1648
|
modelValue: {},
|
|
1649
1649
|
modelModifiers: {}
|
|
1650
1650
|
}),
|
|
1651
|
-
emits: /* @__PURE__ */ I(
|
|
1651
|
+
emits: /* @__PURE__ */ I(os, ["update:modelValue"]),
|
|
1652
1652
|
setup(e, { emit: t }) {
|
|
1653
1653
|
const o = e, n = t, l = F(e, "modelValue"), a = it({
|
|
1654
1654
|
content: l.value ?? "",
|
|
@@ -1671,7 +1671,8 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1671
1671
|
})
|
|
1672
1672
|
],
|
|
1673
1673
|
onUpdate({ editor: c }) {
|
|
1674
|
-
|
|
1674
|
+
const d = c.storage.markdown.getMarkdown();
|
|
1675
|
+
l.value = d, n("change", d);
|
|
1675
1676
|
}
|
|
1676
1677
|
});
|
|
1677
1678
|
return Ee(() => {
|
|
@@ -1683,7 +1684,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1683
1684
|
"aria-label": c.id,
|
|
1684
1685
|
role: "textbox"
|
|
1685
1686
|
}, [
|
|
1686
|
-
u("div",
|
|
1687
|
+
u("div", ls, [
|
|
1687
1688
|
(r(!0), f(L, null, M(c.actions, (p) => (r(), f("button", {
|
|
1688
1689
|
key: p.name,
|
|
1689
1690
|
tabindex: "-1",
|
|
@@ -1694,29 +1695,29 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1694
1695
|
}, [
|
|
1695
1696
|
u("span", {
|
|
1696
1697
|
innerHTML: p.label
|
|
1697
|
-
}, null, 8,
|
|
1698
|
-
], 10,
|
|
1698
|
+
}, null, 8, rs)
|
|
1699
|
+
], 10, as))), 128))
|
|
1699
1700
|
]),
|
|
1700
|
-
u("div",
|
|
1701
|
+
u("div", is, [
|
|
1701
1702
|
V(g(ut), {
|
|
1702
1703
|
editor: g(a),
|
|
1703
1704
|
class: "prose prose-sm max-w-none h-full"
|
|
1704
1705
|
}, null, 8, ["editor"])
|
|
1705
1706
|
])
|
|
1706
|
-
], 10,
|
|
1707
|
+
], 10, ns)
|
|
1707
1708
|
]),
|
|
1708
1709
|
_: 1
|
|
1709
1710
|
}, 16));
|
|
1710
1711
|
}
|
|
1711
|
-
}),
|
|
1712
|
+
}), us = {
|
|
1712
1713
|
...K
|
|
1713
|
-
},
|
|
1714
|
+
}, cs = ["change", "focus", "blur"], ds = { class: "flex items-center justify-center h-full" }, ps = { class: "fieldset-label" }, fs = ["aria-label", "disabled"], ms = { class: "font-bold text-gray-500 text-sm" }, Rn = /* @__PURE__ */ k({
|
|
1714
1715
|
__name: "Checkbox",
|
|
1715
|
-
props: /* @__PURE__ */ I(
|
|
1716
|
+
props: /* @__PURE__ */ I(us, {
|
|
1716
1717
|
modelValue: {},
|
|
1717
1718
|
modelModifiers: {}
|
|
1718
1719
|
}),
|
|
1719
|
-
emits: /* @__PURE__ */ I(
|
|
1720
|
+
emits: /* @__PURE__ */ I(cs, ["update:modelValue"]),
|
|
1720
1721
|
setup(e, { emit: t }) {
|
|
1721
1722
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1722
1723
|
n("change", l.value);
|
|
@@ -1724,13 +1725,13 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1724
1725
|
n("focus", i);
|
|
1725
1726
|
}, d = (i) => {
|
|
1726
1727
|
n("blur", i);
|
|
1727
|
-
}, p =
|
|
1728
|
+
}, p = v(
|
|
1728
1729
|
() => U(o.styles.control.checkbox, o)
|
|
1729
1730
|
);
|
|
1730
|
-
return (i, s) => (r(), f("div",
|
|
1731
|
+
return (i, s) => (r(), f("div", ds, [
|
|
1731
1732
|
V(Z, B(o, { "hide-label": !0 }), {
|
|
1732
1733
|
default: S(() => [
|
|
1733
|
-
u("label",
|
|
1734
|
+
u("label", ps, [
|
|
1734
1735
|
Y(u("input", {
|
|
1735
1736
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1736
1737
|
"aria-label": i.id,
|
|
@@ -1741,26 +1742,26 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1741
1742
|
onChange: a,
|
|
1742
1743
|
onFocus: c,
|
|
1743
1744
|
onBlur: d
|
|
1744
|
-
}, null, 42,
|
|
1745
|
+
}, null, 42, fs), [
|
|
1745
1746
|
[Ce, l.value]
|
|
1746
1747
|
]),
|
|
1747
|
-
u("span",
|
|
1748
|
+
u("span", ms, w(i.label), 1)
|
|
1748
1749
|
])
|
|
1749
1750
|
]),
|
|
1750
1751
|
_: 1
|
|
1751
1752
|
}, 16)
|
|
1752
1753
|
]));
|
|
1753
1754
|
}
|
|
1754
|
-
}),
|
|
1755
|
+
}), bs = {
|
|
1755
1756
|
...K,
|
|
1756
1757
|
type: { type: String, default: "text" }
|
|
1757
|
-
},
|
|
1758
|
+
}, gs = ["change", "focus", "blur"], vs = ["aria-label", "type", "disabled", "autofocus", "placeholder"], Tn = /* @__PURE__ */ k({
|
|
1758
1759
|
__name: "Input",
|
|
1759
|
-
props: /* @__PURE__ */ I(
|
|
1760
|
+
props: /* @__PURE__ */ I(bs, {
|
|
1760
1761
|
modelValue: {},
|
|
1761
1762
|
modelModifiers: {}
|
|
1762
1763
|
}),
|
|
1763
|
-
emits: /* @__PURE__ */ I(
|
|
1764
|
+
emits: /* @__PURE__ */ I(gs, ["update:modelValue"]),
|
|
1764
1765
|
setup(e, { emit: t }) {
|
|
1765
1766
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1766
1767
|
n("change", i);
|
|
@@ -1768,7 +1769,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1768
1769
|
n("focus", i);
|
|
1769
1770
|
}, d = (i) => {
|
|
1770
1771
|
n("blur", i);
|
|
1771
|
-
}, p =
|
|
1772
|
+
}, p = v(
|
|
1772
1773
|
() => U(o.styles.control.input, o)
|
|
1773
1774
|
);
|
|
1774
1775
|
return (i, s) => (r(), y(Z, ee(te(o)), {
|
|
@@ -1785,23 +1786,23 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1785
1786
|
onChange: a,
|
|
1786
1787
|
onFocus: c,
|
|
1787
1788
|
onBlur: d
|
|
1788
|
-
}, null, 42,
|
|
1789
|
+
}, null, 42, vs), [
|
|
1789
1790
|
[ze, l.value]
|
|
1790
1791
|
])
|
|
1791
1792
|
]),
|
|
1792
1793
|
_: 1
|
|
1793
1794
|
}, 16));
|
|
1794
1795
|
}
|
|
1795
|
-
}),
|
|
1796
|
+
}), hs = {
|
|
1796
1797
|
...K,
|
|
1797
1798
|
steps: { type: Number, default: 1 }
|
|
1798
|
-
},
|
|
1799
|
+
}, ys = ["change", "focus", "blur"], ws = ["aria-label", "disabled", "step", "autofocus", "placeholder"], En = /* @__PURE__ */ k({
|
|
1799
1800
|
__name: "InputNumber",
|
|
1800
|
-
props: /* @__PURE__ */ I(
|
|
1801
|
+
props: /* @__PURE__ */ I(hs, {
|
|
1801
1802
|
modelValue: {},
|
|
1802
1803
|
modelModifiers: {}
|
|
1803
1804
|
}),
|
|
1804
|
-
emits: /* @__PURE__ */ I(
|
|
1805
|
+
emits: /* @__PURE__ */ I(ys, ["update:modelValue"]),
|
|
1805
1806
|
setup(e, { emit: t }) {
|
|
1806
1807
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1807
1808
|
n("change", i);
|
|
@@ -1809,7 +1810,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1809
1810
|
n("focus", i);
|
|
1810
1811
|
}, d = (i) => {
|
|
1811
1812
|
n("blur", i);
|
|
1812
|
-
}, p =
|
|
1813
|
+
}, p = v(
|
|
1813
1814
|
() => U(o.styles?.control?.input, o)
|
|
1814
1815
|
);
|
|
1815
1816
|
return (i, s) => (r(), y(Z, ee(te(o)), {
|
|
@@ -1827,23 +1828,23 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1827
1828
|
onChange: a,
|
|
1828
1829
|
onFocus: c,
|
|
1829
1830
|
onBlur: d
|
|
1830
|
-
}, null, 42,
|
|
1831
|
+
}, null, 42, ws), [
|
|
1831
1832
|
[Le, l.value]
|
|
1832
1833
|
])
|
|
1833
1834
|
]),
|
|
1834
1835
|
_: 1
|
|
1835
1836
|
}, 16));
|
|
1836
1837
|
}
|
|
1837
|
-
}),
|
|
1838
|
+
}), ks = {
|
|
1838
1839
|
...K,
|
|
1839
1840
|
rows: { type: Number, default: 4 }
|
|
1840
|
-
},
|
|
1841
|
+
}, _s = ["change", "focus", "blur"], $s = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], zn = /* @__PURE__ */ k({
|
|
1841
1842
|
__name: "Textarea",
|
|
1842
|
-
props: /* @__PURE__ */ I(
|
|
1843
|
+
props: /* @__PURE__ */ I(ks, {
|
|
1843
1844
|
modelValue: {},
|
|
1844
1845
|
modelModifiers: {}
|
|
1845
1846
|
}),
|
|
1846
|
-
emits: /* @__PURE__ */ I(
|
|
1847
|
+
emits: /* @__PURE__ */ I(_s, ["update:modelValue"]),
|
|
1847
1848
|
setup(e, { emit: t }) {
|
|
1848
1849
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1849
1850
|
n("change", i);
|
|
@@ -1851,7 +1852,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1851
1852
|
n("focus", i);
|
|
1852
1853
|
}, d = (i) => {
|
|
1853
1854
|
n("blur", i);
|
|
1854
|
-
}, p =
|
|
1855
|
+
}, p = v(
|
|
1855
1856
|
() => U(o.styles.control.textarea, o)
|
|
1856
1857
|
);
|
|
1857
1858
|
return (i, s) => (r(), y(Z, ee(te(o)), {
|
|
@@ -1869,37 +1870,37 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1869
1870
|
onChange: a,
|
|
1870
1871
|
onFocus: c,
|
|
1871
1872
|
onBlur: d
|
|
1872
|
-
}, null, 42,
|
|
1873
|
+
}, null, 42, $s), [
|
|
1873
1874
|
[Le, l.value]
|
|
1874
1875
|
])
|
|
1875
1876
|
]),
|
|
1876
1877
|
_: 1
|
|
1877
1878
|
}, 16));
|
|
1878
1879
|
}
|
|
1879
|
-
}),
|
|
1880
|
+
}), Cs = {
|
|
1880
1881
|
widthLeft: { type: Number, default: 200 },
|
|
1881
1882
|
widthRight: { type: Number, default: 200 },
|
|
1882
1883
|
initialLeftOpen: { type: Boolean, default: !0 },
|
|
1883
1884
|
initialRightOpen: { type: Boolean, default: !0 }
|
|
1884
|
-
},
|
|
1885
|
+
}, xs = { class: "flex h-full overflow-hidden gap-2" }, Ls = {
|
|
1885
1886
|
key: 0,
|
|
1886
1887
|
id: "drawer-left",
|
|
1887
1888
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1888
|
-
},
|
|
1889
|
+
}, Ss = ["aria-expanded", "aria-label"], Ps = { class: "flex-1 overflow-y-auto bg-white" }, Ms = {
|
|
1889
1890
|
key: 1,
|
|
1890
1891
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1891
|
-
},
|
|
1892
|
+
}, Bs = ["aria-expanded", "aria-label"], Nn = /* @__PURE__ */ k({
|
|
1892
1893
|
__name: "drawer",
|
|
1893
|
-
props:
|
|
1894
|
+
props: Cs,
|
|
1894
1895
|
setup(e) {
|
|
1895
|
-
const t = e, o = Se(), n =
|
|
1896
|
+
const t = e, o = Se(), n = v(() => !!o["left-drawer"]), l = v(() => !!o["right-drawer"]), a = x({
|
|
1896
1897
|
left: t.initialLeftOpen,
|
|
1897
1898
|
right: t.initialRightOpen
|
|
1898
1899
|
}), c = (d) => {
|
|
1899
1900
|
a.value[d] = !a.value[d];
|
|
1900
1901
|
};
|
|
1901
|
-
return (d, p) => (r(), f("main",
|
|
1902
|
-
n.value ? (r(), f("aside",
|
|
1902
|
+
return (d, p) => (r(), f("main", xs, [
|
|
1903
|
+
n.value ? (r(), f("aside", Ls, [
|
|
1903
1904
|
u("div", {
|
|
1904
1905
|
id: "drawer-left-panel",
|
|
1905
1906
|
style: X({ width: a.value.left ? d.widthLeft + "px" : "0px" }),
|
|
@@ -1921,14 +1922,14 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1921
1922
|
}, [
|
|
1922
1923
|
V(g(q), {
|
|
1923
1924
|
size: "lg",
|
|
1924
|
-
icon: a.value.left ? g(
|
|
1925
|
+
icon: a.value.left ? g(R).ChevronLeft : g(R).ChevronRight
|
|
1925
1926
|
}, null, 8, ["icon"])
|
|
1926
|
-
], 8,
|
|
1927
|
+
], 8, Ss)
|
|
1927
1928
|
])) : _("", !0),
|
|
1928
|
-
u("div",
|
|
1929
|
+
u("div", Ps, [
|
|
1929
1930
|
P(d.$slots, "default")
|
|
1930
1931
|
]),
|
|
1931
|
-
l.value ? (r(), f("aside",
|
|
1932
|
+
l.value ? (r(), f("aside", Ms, [
|
|
1932
1933
|
u("button", {
|
|
1933
1934
|
"aria-expanded": a.value.right,
|
|
1934
1935
|
"aria-controls": "drawer-right-panel",
|
|
@@ -1938,9 +1939,9 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1938
1939
|
}, [
|
|
1939
1940
|
V(g(q), {
|
|
1940
1941
|
size: "lg",
|
|
1941
|
-
icon: a.value.right ? g(
|
|
1942
|
+
icon: a.value.right ? g(R).ChevronRight : g(R).ChevronLeft
|
|
1942
1943
|
}, null, 8, ["icon"])
|
|
1943
|
-
], 8,
|
|
1944
|
+
], 8, Bs),
|
|
1944
1945
|
u("div", {
|
|
1945
1946
|
id: "drawer-right-panel",
|
|
1946
1947
|
style: X({ width: a.value.right ? d.widthRight + "px" : "0px" }),
|
|
@@ -1956,10 +1957,10 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1956
1957
|
])) : _("", !0)
|
|
1957
1958
|
]));
|
|
1958
1959
|
}
|
|
1959
|
-
}),
|
|
1960
|
+
}), Vs = { class: "ml-1" }, As = { class: "truncate flex-1 min-w-0 text-left" }, Os = {
|
|
1960
1961
|
key: 0,
|
|
1961
1962
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1962
|
-
},
|
|
1963
|
+
}, Is = /* @__PURE__ */ k({
|
|
1963
1964
|
__name: "TreeItem",
|
|
1964
1965
|
props: {
|
|
1965
1966
|
active: {},
|
|
@@ -1969,10 +1970,10 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1969
1970
|
},
|
|
1970
1971
|
emits: ["toggle", "select"],
|
|
1971
1972
|
setup(e, { emit: t }) {
|
|
1972
|
-
const o = e, n = t, l =
|
|
1973
|
+
const o = e, n = t, l = v(() => o.active === o.node.id);
|
|
1973
1974
|
return (a, c) => {
|
|
1974
1975
|
const d = ce("TreeItem", !0);
|
|
1975
|
-
return r(), f("li",
|
|
1976
|
+
return r(), f("li", Vs, [
|
|
1976
1977
|
u("div", {
|
|
1977
1978
|
class: $([
|
|
1978
1979
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
@@ -1997,8 +1998,8 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1997
1998
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1998
1999
|
onClick: c[1] || (c[1] = (p) => n("select", e.node))
|
|
1999
2000
|
}, [
|
|
2000
|
-
u("div",
|
|
2001
|
-
e.node.tag ? (r(), f("div",
|
|
2001
|
+
u("div", As, w(e.node.label), 1),
|
|
2002
|
+
e.node.tag ? (r(), f("div", Os, w(e.node.tag), 1)) : _("", !0)
|
|
2002
2003
|
])
|
|
2003
2004
|
], 2),
|
|
2004
2005
|
e.node.children && e.isExpanded(e.node.id) ? (r(), f("ul", {
|
|
@@ -2021,7 +2022,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2021
2022
|
]);
|
|
2022
2023
|
};
|
|
2023
2024
|
}
|
|
2024
|
-
}),
|
|
2025
|
+
}), Ds = { class: "select-none text-sm" }, qn = /* @__PURE__ */ k({
|
|
2025
2026
|
__name: "TreeView",
|
|
2026
2027
|
props: {
|
|
2027
2028
|
data: {},
|
|
@@ -2039,8 +2040,8 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2039
2040
|
}, c = (p) => {
|
|
2040
2041
|
n("select", p), l.value.add(p.id);
|
|
2041
2042
|
}, d = (p) => l.value.has(p);
|
|
2042
|
-
return (p, i) => (r(), f("ul",
|
|
2043
|
-
(r(!0), f(L, null, M(o.data, (s) => (r(), y(
|
|
2043
|
+
return (p, i) => (r(), f("ul", Ds, [
|
|
2044
|
+
(r(!0), f(L, null, M(o.data, (s) => (r(), y(Is, {
|
|
2044
2045
|
key: s.id,
|
|
2045
2046
|
node: s,
|
|
2046
2047
|
expanded: l.value,
|
|
@@ -2056,7 +2057,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2056
2057
|
role: "status",
|
|
2057
2058
|
"aria-live": "polite",
|
|
2058
2059
|
class: "flex items-center justify-center h-20"
|
|
2059
|
-
},
|
|
2060
|
+
}, jn = /* @__PURE__ */ k({
|
|
2060
2061
|
__name: "loading",
|
|
2061
2062
|
props: {
|
|
2062
2063
|
loading: { type: Boolean }
|
|
@@ -2070,7 +2071,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2070
2071
|
u("span", { class: "sr-only" }, "Loading...", -1)
|
|
2071
2072
|
])])) : _("", !0);
|
|
2072
2073
|
}
|
|
2073
|
-
}),
|
|
2074
|
+
}), Ts = {
|
|
2074
2075
|
title: { type: String, required: !0 },
|
|
2075
2076
|
opened: { type: Boolean, default: !0 },
|
|
2076
2077
|
heightFull: { type: Boolean, default: !1 },
|
|
@@ -2080,15 +2081,15 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2080
2081
|
type: Array,
|
|
2081
2082
|
default: () => []
|
|
2082
2083
|
}
|
|
2083
|
-
},
|
|
2084
|
+
}, Es = ["checked", "aria-label"], zs = { class: "collapse-title text-gray-500 text-xs font-medium" }, Ns = { class: "flex items-center justify-between" }, qs = {
|
|
2084
2085
|
key: 0,
|
|
2085
2086
|
class: "list bg-base-100"
|
|
2086
|
-
},
|
|
2087
|
+
}, js = {
|
|
2087
2088
|
key: 1,
|
|
2088
2089
|
class: "shrink-0 pt-2"
|
|
2089
|
-
},
|
|
2090
|
+
}, Fs = /* @__PURE__ */ k({
|
|
2090
2091
|
__name: "Collapse",
|
|
2091
|
-
props:
|
|
2092
|
+
props: Ts,
|
|
2092
2093
|
setup(e) {
|
|
2093
2094
|
const t = Se(), o = e, n = x(o.opened), l = x(o.opened || o.disabled);
|
|
2094
2095
|
return (a, c) => (r(), f("div", {
|
|
@@ -2106,9 +2107,9 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2106
2107
|
tabindex: "-1",
|
|
2107
2108
|
"aria-label": "Toggle " + a.title,
|
|
2108
2109
|
onChange: c[0] || (c[0] = (d) => l.value = d.target.checked)
|
|
2109
|
-
}, null, 40,
|
|
2110
|
-
u("div",
|
|
2111
|
-
u("div",
|
|
2110
|
+
}, null, 40, Es)),
|
|
2111
|
+
u("div", zs, [
|
|
2112
|
+
u("div", Ns, [
|
|
2112
2113
|
u("span", null, w(a.title), 1),
|
|
2113
2114
|
o.actions.length > 0 ? (r(), f("div", {
|
|
2114
2115
|
key: 0,
|
|
@@ -2144,53 +2145,53 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2144
2145
|
}, [
|
|
2145
2146
|
P(a.$slots, "default")
|
|
2146
2147
|
], 2),
|
|
2147
|
-
g(t).list ? (r(), f("ul",
|
|
2148
|
+
g(t).list ? (r(), f("ul", qs, [
|
|
2148
2149
|
P(a.$slots, "list")
|
|
2149
2150
|
])) : _("", !0),
|
|
2150
|
-
g(t).footer ? (r(), f("div",
|
|
2151
|
+
g(t).footer ? (r(), f("div", js, [
|
|
2151
2152
|
P(a.$slots, "footer")
|
|
2152
2153
|
])) : _("", !0)
|
|
2153
2154
|
], 2)
|
|
2154
2155
|
], 2));
|
|
2155
2156
|
}
|
|
2156
|
-
}),
|
|
2157
|
+
}), Ks = {
|
|
2157
2158
|
title: { type: String },
|
|
2158
2159
|
label: { type: String },
|
|
2159
2160
|
labelLink: { type: String },
|
|
2160
2161
|
description: { type: String },
|
|
2161
2162
|
descriptionLink: { type: String }
|
|
2162
|
-
},
|
|
2163
|
+
}, Us = { class: "list-row" }, Hs = { class: "list-col-grow" }, Ws = { key: 0 }, Gs = {
|
|
2163
2164
|
key: 1,
|
|
2164
2165
|
class: "text-xs text-gray-600"
|
|
2165
|
-
},
|
|
2166
|
+
}, Xs = ["href"], Zs = { key: 1 }, Js = {
|
|
2166
2167
|
key: 0,
|
|
2167
2168
|
class: "text-xs text-gray-500"
|
|
2168
|
-
},
|
|
2169
|
+
}, Qs = ["href"], Ys = { key: 1 }, Fn = /* @__PURE__ */ k({
|
|
2169
2170
|
__name: "CollapseRow",
|
|
2170
|
-
props:
|
|
2171
|
+
props: Ks,
|
|
2171
2172
|
setup(e) {
|
|
2172
|
-
return (t, o) => (r(), f("li",
|
|
2173
|
-
u("div",
|
|
2174
|
-
t.title ? (r(), f("div",
|
|
2175
|
-
t.description || t.descriptionLink ? (r(), f("div",
|
|
2173
|
+
return (t, o) => (r(), f("li", Us, [
|
|
2174
|
+
u("div", Hs, [
|
|
2175
|
+
t.title ? (r(), f("div", Ws, w(t.title), 1)) : _("", !0),
|
|
2176
|
+
t.description || t.descriptionLink ? (r(), f("div", Gs, [
|
|
2176
2177
|
t.descriptionLink ? (r(), f("a", {
|
|
2177
2178
|
key: 0,
|
|
2178
2179
|
href: t.descriptionLink,
|
|
2179
2180
|
target: "_blank"
|
|
2180
|
-
}, w(t.description ?? t.descriptionLink), 9,
|
|
2181
|
+
}, w(t.description ?? t.descriptionLink), 9, Xs)) : (r(), f("span", Zs, w(t.description), 1))
|
|
2181
2182
|
])) : _("", !0)
|
|
2182
2183
|
]),
|
|
2183
|
-
t.label ? (r(), f("div",
|
|
2184
|
+
t.label ? (r(), f("div", Js, [
|
|
2184
2185
|
t.labelLink ? (r(), f("a", {
|
|
2185
2186
|
key: 0,
|
|
2186
2187
|
href: t.labelLink,
|
|
2187
2188
|
target: "_blank"
|
|
2188
|
-
}, w(t.label), 9,
|
|
2189
|
+
}, w(t.label), 9, Qs)) : (r(), f("span", Ys, w(t.label), 1))
|
|
2189
2190
|
])) : _("", !0),
|
|
2190
2191
|
P(t.$slots, "default")
|
|
2191
2192
|
]));
|
|
2192
2193
|
}
|
|
2193
|
-
}),
|
|
2194
|
+
}), en = { class: "text-gray-800" }, Kn = /* @__PURE__ */ k({
|
|
2194
2195
|
__name: "alert",
|
|
2195
2196
|
props: {
|
|
2196
2197
|
message: {},
|
|
@@ -2207,11 +2208,11 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2207
2208
|
role: "alert",
|
|
2208
2209
|
class: $(`alert alert-soft ${t[e.type]} `)
|
|
2209
2210
|
}, [
|
|
2210
|
-
u("span",
|
|
2211
|
+
u("span", en, w(e.message), 1),
|
|
2211
2212
|
P(o.$slots, "default")
|
|
2212
2213
|
], 2));
|
|
2213
2214
|
}
|
|
2214
|
-
}),
|
|
2215
|
+
}), tn = {
|
|
2215
2216
|
title: { type: String, required: !0 },
|
|
2216
2217
|
items: {
|
|
2217
2218
|
type: Array,
|
|
@@ -2230,10 +2231,10 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2230
2231
|
default: void 0
|
|
2231
2232
|
},
|
|
2232
2233
|
opened: { type: Boolean, default: !0 }
|
|
2233
|
-
},
|
|
2234
|
-
const l =
|
|
2234
|
+
}, on = ["update:modelValue"], sn = (e, t, o, n) => {
|
|
2235
|
+
const l = v(
|
|
2235
2236
|
() => e.value.map((s) => s[o.value])
|
|
2236
|
-
), a = (s) => t.value.includes(s), c =
|
|
2237
|
+
), a = (s) => t.value.includes(s), c = v(() => {
|
|
2237
2238
|
const s = t.value.length;
|
|
2238
2239
|
return s === 0 ? "None" : s === l.value.length ? "All" : `${s}`;
|
|
2239
2240
|
});
|
|
@@ -2243,23 +2244,23 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2243
2244
|
t.value.filter((b) => b !== s)
|
|
2244
2245
|
);
|
|
2245
2246
|
} };
|
|
2246
|
-
},
|
|
2247
|
+
}, nn = { class: "flex items-center justify-between mb-2" }, ln = { class: "text-xs text-base-content/50" }, an = { class: "flex gap-1" }, rn = { class: "flex flex-col gap-1" }, un = ["checked", "onChange"], cn = { class: "text-sm flex-1 select-none" }, dn = {
|
|
2247
2248
|
key: 1,
|
|
2248
2249
|
class: "badge badge-sm badge-ghost"
|
|
2249
|
-
},
|
|
2250
|
+
}, Un = /* @__PURE__ */ k({
|
|
2250
2251
|
__name: "filter",
|
|
2251
|
-
props:
|
|
2252
|
-
emits:
|
|
2252
|
+
props: tn,
|
|
2253
|
+
emits: on,
|
|
2253
2254
|
setup(e, { emit: t }) {
|
|
2254
|
-
const o = e, n = t, l =
|
|
2255
|
-
return (s, m) => (r(), y(g(
|
|
2255
|
+
const o = e, n = t, l = v(() => o.items ?? []), { isSelected: a, selectedLabel: c, selectAll: d, selectNone: p, toggleItem: i } = sn(l, we(o, "modelValue"), we(o, "valueKey"), n);
|
|
2256
|
+
return (s, m) => (r(), y(g(Fs), {
|
|
2256
2257
|
title: s.title,
|
|
2257
2258
|
opened: s.opened
|
|
2258
2259
|
}, {
|
|
2259
2260
|
default: S(() => [
|
|
2260
|
-
u("div",
|
|
2261
|
-
u("span",
|
|
2262
|
-
u("div",
|
|
2261
|
+
u("div", nn, [
|
|
2262
|
+
u("span", ln, w(g(c)) + " of " + w(l.value.length) + " items ", 1),
|
|
2263
|
+
u("div", an, [
|
|
2263
2264
|
u("button", {
|
|
2264
2265
|
class: "btn btn-ghost btn-xs",
|
|
2265
2266
|
type: "button",
|
|
@@ -2276,7 +2277,7 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2276
2277
|
}, " None ")
|
|
2277
2278
|
])
|
|
2278
2279
|
]),
|
|
2279
|
-
u("div",
|
|
2280
|
+
u("div", rn, [
|
|
2280
2281
|
(r(!0), f(L, null, M(l.value, (b) => (r(), f("label", {
|
|
2281
2282
|
key: b[s.valueKey],
|
|
2282
2283
|
class: $(["flex items-center gap-3 px-2 py-1.5 rounded-lg cursor-pointer transition-colors hover:bg-base-200", { "bg-base-200/60": g(a)(b[s.valueKey]) }])
|
|
@@ -2285,18 +2286,18 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2285
2286
|
type: "checkbox",
|
|
2286
2287
|
class: "checkbox checkbox-sm",
|
|
2287
2288
|
checked: g(a)(b[s.valueKey]),
|
|
2288
|
-
onChange: (
|
|
2289
|
+
onChange: (h) => g(i)(
|
|
2289
2290
|
b[s.valueKey],
|
|
2290
|
-
|
|
2291
|
+
h.target.checked
|
|
2291
2292
|
)
|
|
2292
|
-
}, null, 40,
|
|
2293
|
+
}, null, 40, un),
|
|
2293
2294
|
s.colorKey && b[s.colorKey] ? (r(), f("span", {
|
|
2294
2295
|
key: 0,
|
|
2295
2296
|
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2296
2297
|
style: X({ backgroundColor: b[s.colorKey] })
|
|
2297
2298
|
}, null, 4)) : _("", !0),
|
|
2298
|
-
u("span",
|
|
2299
|
-
b[s.countKey] > 0 ? (r(), f("span",
|
|
2299
|
+
u("span", cn, w(b[s.labelKey]), 1),
|
|
2300
|
+
b[s.countKey] > 0 ? (r(), f("span", dn, w(b[s.countKey]), 1)) : _("", !0)
|
|
2300
2301
|
], 2))), 128))
|
|
2301
2302
|
])
|
|
2302
2303
|
]),
|
|
@@ -2305,67 +2306,67 @@ const ts = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2305
2306
|
}
|
|
2306
2307
|
});
|
|
2307
2308
|
export {
|
|
2308
|
-
|
|
2309
|
-
|
|
2309
|
+
Kn as Alert,
|
|
2310
|
+
On as Autocomplete,
|
|
2310
2311
|
Mt as BadgeSize,
|
|
2311
|
-
|
|
2312
|
+
Ln as BooleanCell,
|
|
2312
2313
|
N as Btn,
|
|
2313
|
-
|
|
2314
|
-
|
|
2314
|
+
_n as BtnBadge,
|
|
2315
|
+
Tt as BtnBadgeEmits,
|
|
2315
2316
|
Rt as BtnBadgeProperties,
|
|
2316
|
-
|
|
2317
|
-
|
|
2317
|
+
Dt as BtnEmits,
|
|
2318
|
+
It as BtnProperties,
|
|
2318
2319
|
Pt as ButtonSize,
|
|
2319
2320
|
Me as ButtonTag,
|
|
2320
2321
|
fe as ButtonType,
|
|
2321
|
-
|
|
2322
|
+
Sn as Card,
|
|
2322
2323
|
Rn as Checkbox,
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2324
|
+
Bn as ClickOutside,
|
|
2325
|
+
Fs as Collapse,
|
|
2326
|
+
Fn as CollapseRow,
|
|
2326
2327
|
z as Color,
|
|
2327
|
-
|
|
2328
|
+
zt as ConfirmModal,
|
|
2328
2329
|
Z as ControlWrapper,
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2330
|
+
Nn as Drawer,
|
|
2331
|
+
kn as Dropdown,
|
|
2332
|
+
Un as Filter,
|
|
2333
|
+
on as FilterEmits,
|
|
2334
|
+
tn as FilterProperties,
|
|
2334
2335
|
q as Icon,
|
|
2335
|
-
|
|
2336
|
+
R as IconEnum,
|
|
2336
2337
|
ft as IconMap,
|
|
2337
2338
|
mt as IconProperties,
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2339
|
+
Tn as Input,
|
|
2340
|
+
En as InputNumber,
|
|
2341
|
+
jn as Loading,
|
|
2342
|
+
Dn as Markdown,
|
|
2343
|
+
wn as Menu,
|
|
2344
|
+
Vt as Modal,
|
|
2344
2345
|
Ct as ModalEmits,
|
|
2345
2346
|
$t as ModalProperties,
|
|
2346
2347
|
me as ModalService,
|
|
2347
2348
|
St as ModalSize,
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2349
|
+
Nt as ModalWrapper,
|
|
2350
|
+
In as MultiSelect,
|
|
2351
|
+
qt as NotificationMessage,
|
|
2351
2352
|
be as NotificationService,
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2353
|
+
Kt as Notifications,
|
|
2354
|
+
co as PaginationComponent,
|
|
2355
|
+
An as SelectComponent,
|
|
2356
|
+
$n as ShellComponent,
|
|
2356
2357
|
pe as SubMenu,
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2358
|
+
xn as Table,
|
|
2359
|
+
xn as TableComponent,
|
|
2360
|
+
Cn as TextCell,
|
|
2361
|
+
zn as Textarea,
|
|
2362
|
+
qn as TreeView,
|
|
2363
|
+
Pn as addClickOutsideEventListener,
|
|
2363
2364
|
U as buildInputStyle,
|
|
2364
|
-
|
|
2365
|
-
|
|
2365
|
+
Vn as hasCustomEventListener,
|
|
2366
|
+
qo as isDescriptionHidden,
|
|
2366
2367
|
ae as mergeStyles,
|
|
2367
2368
|
se as myStyles,
|
|
2368
|
-
|
|
2369
|
+
Mn as removeClickOutsideEventListener,
|
|
2369
2370
|
Ae as showErrors,
|
|
2370
|
-
|
|
2371
|
+
sn as useFilter
|
|
2371
2372
|
};
|