@ghentcdh/ui 0.8.5 → 0.8.6
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.esm.js +485 -486
- package/index.js +2 -2
- package/index.mjs +485 -486
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, computed as
|
|
1
|
+
import { defineComponent as k, computed as h, openBlock as r, createBlock as w, resolveDynamicComponent as ne, normalizeClass as $, createCommentVNode as _, createElementBlock as f, createElementVNode as u, toDisplayString as y, unref as g, Fragment as L, renderList as P, mergeProps as B, resolveComponent as ce, withCtx as S, createTextVNode as E, ref as x, watch as q, onUnmounted as _e, onMounted as $e, withModifiers as le, renderSlot as M, createVNode as V, withDirectives as Y, vModelCheckbox as Ce, normalizeStyle as X, useAttrs as Oe, getCurrentInstance as Ie, camelize as De, toHandlerKey as re, nextTick as xe, normalizeProps as ee, guardReactiveProps as te, Transition as Te, useModel as F, mergeModels as I, onBeforeUnmount as Re, vModelDynamic as Ee, vModelText as Le, useSlots as Se, toRef as we } from "vue";
|
|
2
2
|
import { RouterLink as ze } from "vue-router";
|
|
3
3
|
import { v4 as de } from "uuid";
|
|
4
4
|
import { LinkIcon as Ne, DocumentTextIcon as qe, EyeIcon as je, CheckIcon as Fe, LanguageIcon as Ke, ChevronDoubleRightIcon as Ue, ChevronDoubleLeftIcon as He, ChevronUpIcon as We, ChevronDownIcon as Ge, ChevronLeftIcon as Xe, ChevronRightIcon as Ze, Bars3Icon as Je, PaperClipIcon as Qe, PlusCircleIcon as Ye, XMarkIcon as et, FunnelIcon as tt, BarsArrowUpIcon as ot, BarsArrowDownIcon as st, TrashIcon as nt, PencilSquareIcon as lt } from "@heroicons/vue/24/outline";
|
|
@@ -6,7 +6,7 @@ import at from "@tiptap/starter-kit";
|
|
|
6
6
|
import { useEditor as rt, EditorContent as it } from "@tiptap/vue-3";
|
|
7
7
|
import { Markdown as ut } from "tiptap-markdown";
|
|
8
8
|
import { ChevronDownIcon as ct, ChevronRightIcon as dt } 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 pt = {
|
|
11
11
|
Edit: lt,
|
|
12
12
|
Delete: nt,
|
|
@@ -35,11 +35,11 @@ const pt = {
|
|
|
35
35
|
__name: "icon",
|
|
36
36
|
props: ft,
|
|
37
37
|
setup(e) {
|
|
38
|
-
const t = e, o =
|
|
38
|
+
const t = e, o = h(() => t.icon ? typeof t.icon == "string" ? pt[t.icon] : t.icon : null);
|
|
39
39
|
return (n, l) => o.value ? (r(), w(ne(o.value), {
|
|
40
40
|
key: 0,
|
|
41
41
|
"aria-hidden": "true",
|
|
42
|
-
class:
|
|
42
|
+
class: $([
|
|
43
43
|
{
|
|
44
44
|
"w-full h-full": !n.size,
|
|
45
45
|
"w-2 h-2": n.size === "xs",
|
|
@@ -50,7 +50,7 @@ const pt = {
|
|
|
50
50
|
])
|
|
51
51
|
}, null, 8, ["class"])) : _("", !0);
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), bt = { class: "dropdown dropdown-end" }, mt = {
|
|
54
54
|
tabindex: "0",
|
|
55
55
|
role: "menu",
|
|
56
56
|
class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
|
|
@@ -65,21 +65,21 @@ const pt = {
|
|
|
65
65
|
disableArrow: { type: Boolean }
|
|
66
66
|
},
|
|
67
67
|
setup(e) {
|
|
68
|
-
return (t, o) => (r(), f("div",
|
|
68
|
+
return (t, o) => (r(), f("div", bt, [
|
|
69
69
|
u("div", {
|
|
70
70
|
tabindex: "0",
|
|
71
71
|
role: "button",
|
|
72
72
|
"aria-haspopup": "menu",
|
|
73
|
-
class:
|
|
73
|
+
class: $([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
74
74
|
}, [
|
|
75
|
-
u("span", null,
|
|
75
|
+
u("span", null, y(e.label), 1),
|
|
76
76
|
e.disableArrow ? _("", !0) : (r(), w(g(j), {
|
|
77
77
|
key: 0,
|
|
78
|
-
icon: g(
|
|
78
|
+
icon: g(R).ChevronDown,
|
|
79
79
|
size: "sm"
|
|
80
80
|
}, null, 8, ["icon"]))
|
|
81
81
|
], 2),
|
|
82
|
-
u("ul",
|
|
82
|
+
u("ul", mt, [
|
|
83
83
|
u("li", gt, [
|
|
84
84
|
(r(!0), f(L, null, P(e.items, (n) => (r(), w(Pe, B({
|
|
85
85
|
key: n.label
|
|
@@ -97,7 +97,7 @@ const pt = {
|
|
|
97
97
|
disabled: { type: Boolean, default: !1 }
|
|
98
98
|
},
|
|
99
99
|
setup(e) {
|
|
100
|
-
const t = e, o =
|
|
100
|
+
const t = e, o = h(() => !t.disabled && t.action && "routerLink" in t.action), n = h(() => !t.disabled && t.action), l = h(() => t.items?.length), a = h(() => {
|
|
101
101
|
const d = t.action;
|
|
102
102
|
return d && "routerLink" in d && "params" in d ? {
|
|
103
103
|
name: d.routerLink,
|
|
@@ -111,27 +111,27 @@ const pt = {
|
|
|
111
111
|
return l.value ? (r(), w(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (r(), w(i, {
|
|
112
112
|
key: 1,
|
|
113
113
|
to: a.value,
|
|
114
|
-
class:
|
|
114
|
+
class: $(oe),
|
|
115
115
|
onClick: c
|
|
116
116
|
}, {
|
|
117
117
|
default: S(() => [
|
|
118
|
-
E(
|
|
118
|
+
E(y(e.label), 1)
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
121
|
}, 8, ["to"])) : n.value ? (r(), f("button", {
|
|
122
122
|
key: 2,
|
|
123
|
-
class:
|
|
123
|
+
class: $(oe),
|
|
124
124
|
onClick: c
|
|
125
|
-
},
|
|
125
|
+
}, y(e.label), 1)) : (r(), f("div", {
|
|
126
126
|
key: 3,
|
|
127
|
-
class:
|
|
128
|
-
},
|
|
127
|
+
class: $([oe, { "btn-disabled": e.disabled }])
|
|
128
|
+
}, y(e.label), 3));
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
}), vt = { class: "navbar bg-base-100 shadow-sm" }, ht = { class: "flex-1" }, yt = {
|
|
132
132
|
key: 0,
|
|
133
133
|
class: "breadcrumbs text-sm"
|
|
134
|
-
}, wt = { class: "flex grow justify-end px-2" }, kt = { class: "flex items-stretch" },
|
|
134
|
+
}, wt = { class: "flex grow justify-end px-2" }, kt = { class: "flex items-stretch" }, yn = /* @__PURE__ */ k({
|
|
135
135
|
__name: "menu",
|
|
136
136
|
props: {
|
|
137
137
|
menu: {},
|
|
@@ -154,11 +154,11 @@ const pt = {
|
|
|
154
154
|
"aria-label": l.label
|
|
155
155
|
}, {
|
|
156
156
|
default: S(() => [
|
|
157
|
-
E(
|
|
157
|
+
E(y(l.label), 1)
|
|
158
158
|
]),
|
|
159
159
|
_: 2
|
|
160
160
|
}, 1032, ["to", "aria-label"])) : (r(), f(L, { key: 1 }, [
|
|
161
|
-
E(
|
|
161
|
+
E(y(l.label), 1)
|
|
162
162
|
], 64))
|
|
163
163
|
]))), 128))
|
|
164
164
|
])
|
|
@@ -174,7 +174,7 @@ const pt = {
|
|
|
174
174
|
]);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
}),
|
|
177
|
+
}), wn = /* @__PURE__ */ k({
|
|
178
178
|
__name: "dropdown",
|
|
179
179
|
props: {
|
|
180
180
|
items: {}
|
|
@@ -196,9 +196,8 @@ const pt = {
|
|
|
196
196
|
data: { default: void 0 },
|
|
197
197
|
open: { type: Boolean, default: !1 },
|
|
198
198
|
disableClose: { type: Boolean, default: !1 },
|
|
199
|
-
width: { type: String, default: "sm" }
|
|
200
|
-
|
|
201
|
-
}, Ct = ["closeModal"], $t = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])', ke = (e) => Array.from(e.querySelectorAll($t)), xt = ({
|
|
199
|
+
width: { type: String, default: "sm" }
|
|
200
|
+
}, $t = ["closeModal"], Ct = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])', ke = (e) => Array.from(e.querySelectorAll(Ct)), xt = ({
|
|
202
201
|
containerRef: e,
|
|
203
202
|
isActive: t,
|
|
204
203
|
onEscape: o,
|
|
@@ -215,8 +214,8 @@ const pt = {
|
|
|
215
214
|
if (p.key !== "Tab") return;
|
|
216
215
|
const s = ke(i);
|
|
217
216
|
if (s.length === 0) return;
|
|
218
|
-
const
|
|
219
|
-
p.shiftKey ? document.activeElement ===
|
|
217
|
+
const b = s[0], m = s[s.length - 1];
|
|
218
|
+
p.shiftKey ? document.activeElement === b && (p.preventDefault(), m.focus()) : document.activeElement === m && (p.preventDefault(), b.focus());
|
|
220
219
|
}, c = () => {
|
|
221
220
|
const p = e.value;
|
|
222
221
|
if (!p) return;
|
|
@@ -246,80 +245,80 @@ const pt = {
|
|
|
246
245
|
sm: "badge-sm text-xs",
|
|
247
246
|
lg: "badge-sm text-xs",
|
|
248
247
|
xl: "badge text-xs"
|
|
249
|
-
}, Mt = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" },
|
|
248
|
+
}, Mt = ["aria-labelledby", "aria-describedby"], Bt = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" }, Vt = /* @__PURE__ */ k({
|
|
250
249
|
__name: "modal",
|
|
251
250
|
props: _t,
|
|
252
|
-
emits:
|
|
251
|
+
emits: $t,
|
|
253
252
|
setup(e, { expose: t, emit: o }) {
|
|
254
253
|
const n = e, l = `modal_${de()}`, a = `${l}_title`, c = `${l}_content`, d = x(null), p = x(!1), i = o, s = () => {
|
|
255
254
|
d.value?.showModal(), p.value = !0;
|
|
256
|
-
}, m = () => {
|
|
257
|
-
d.value?.close(), p.value = !1, i("closeModal");
|
|
258
255
|
}, b = () => {
|
|
259
|
-
|
|
256
|
+
d.value?.close(), p.value = !1, i("closeModal");
|
|
257
|
+
}, m = () => {
|
|
258
|
+
n.disableClose || b();
|
|
260
259
|
};
|
|
261
260
|
return xt({
|
|
262
261
|
containerRef: d,
|
|
263
262
|
isActive: p,
|
|
264
263
|
onEscape: () => {
|
|
265
|
-
n.disableClose ||
|
|
264
|
+
n.disableClose || b();
|
|
266
265
|
}
|
|
267
|
-
}), t({ closeModal:
|
|
266
|
+
}), t({ closeModal: b, openModal: s }), q(
|
|
268
267
|
() => n.open,
|
|
269
268
|
() => {
|
|
270
|
-
n.open ? s() :
|
|
269
|
+
n.open ? s() : b();
|
|
271
270
|
}
|
|
272
|
-
),
|
|
271
|
+
), $e(() => {
|
|
273
272
|
n.open && s();
|
|
274
|
-
}), (
|
|
273
|
+
}), (v, D) => (r(), f("dialog", {
|
|
275
274
|
ref_key: "dialogRef",
|
|
276
275
|
ref: d,
|
|
277
276
|
class: "modal",
|
|
278
277
|
role: "dialog",
|
|
279
278
|
"aria-modal": "true",
|
|
280
|
-
"aria-labelledby":
|
|
281
|
-
"aria-describedby":
|
|
282
|
-
onCancel: le(
|
|
279
|
+
"aria-labelledby": v.modalTitle,
|
|
280
|
+
"aria-describedby": v.modalTitle,
|
|
281
|
+
onCancel: le(m, ["prevent"])
|
|
283
282
|
}, [
|
|
284
283
|
u("div", {
|
|
285
|
-
class:
|
|
284
|
+
class: $(["modal-box bg-white", g(Lt)[v.width]])
|
|
286
285
|
}, [
|
|
287
|
-
|
|
286
|
+
v.disableClose ? _("", !0) : (r(), f("button", {
|
|
288
287
|
key: 0,
|
|
289
288
|
type: "button",
|
|
290
289
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
291
290
|
"aria-label": "Close",
|
|
292
|
-
onClick:
|
|
291
|
+
onClick: b
|
|
293
292
|
}, " ✕ ")),
|
|
294
293
|
u("h3", {
|
|
295
294
|
id: a,
|
|
296
295
|
class: "font-bold"
|
|
297
|
-
},
|
|
296
|
+
}, y(v.modalTitle), 1),
|
|
298
297
|
u("div", {
|
|
299
298
|
id: c,
|
|
300
299
|
class: "pt-4"
|
|
301
300
|
}, [
|
|
302
|
-
M(
|
|
301
|
+
M(v.$slots, "content")
|
|
303
302
|
]),
|
|
304
|
-
u("div",
|
|
305
|
-
M(
|
|
303
|
+
u("div", Bt, [
|
|
304
|
+
M(v.$slots, "actions")
|
|
306
305
|
])
|
|
307
306
|
], 2)
|
|
308
|
-
],
|
|
307
|
+
], 40, Mt));
|
|
309
308
|
}
|
|
310
309
|
});
|
|
311
310
|
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 || {}), N = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(N || {});
|
|
312
|
-
const
|
|
311
|
+
const At = {
|
|
313
312
|
blank: "btn-ghost",
|
|
314
313
|
primary: "btn-primary",
|
|
315
314
|
secondary: "btn-soft btn-primary",
|
|
316
315
|
error: "btn-error"
|
|
317
|
-
},
|
|
316
|
+
}, Ot = {
|
|
318
317
|
blank: "badge-ghost",
|
|
319
318
|
primary: "badge-primary",
|
|
320
319
|
secondary: "badge-soft badge-primary",
|
|
321
320
|
error: "badge-error"
|
|
322
|
-
},
|
|
321
|
+
}, It = {
|
|
323
322
|
href: { type: String },
|
|
324
323
|
disabled: { type: Boolean, default: !1 },
|
|
325
324
|
tooltip: { type: String },
|
|
@@ -330,7 +329,7 @@ const Vt = {
|
|
|
330
329
|
color: { type: String, default: N.primary },
|
|
331
330
|
size: { type: String, default: "sm" },
|
|
332
331
|
square: { type: Boolean, default: !1 }
|
|
333
|
-
},
|
|
332
|
+
}, Dt = ["click"], Tt = {
|
|
334
333
|
icon: { type: [String, Object, Function] },
|
|
335
334
|
type: { type: String, default: fe.button },
|
|
336
335
|
color: { type: String },
|
|
@@ -338,14 +337,14 @@ const Vt = {
|
|
|
338
337
|
size: { type: String, default: "sm" }
|
|
339
338
|
}, Rt = ["click"], z = /* @__PURE__ */ k({
|
|
340
339
|
__name: "btn",
|
|
341
|
-
props:
|
|
342
|
-
emits:
|
|
340
|
+
props: It,
|
|
341
|
+
emits: Dt,
|
|
343
342
|
setup(e, { emit: t }) {
|
|
344
343
|
const o = e, n = t;
|
|
345
344
|
return (l, a) => (r(), w(ne(o.as), {
|
|
346
|
-
class:
|
|
345
|
+
class: $([
|
|
347
346
|
"btn p-1 flex justify-center flex-nowrap",
|
|
348
|
-
g(
|
|
347
|
+
g(At)[o.color],
|
|
349
348
|
g(St)[o.size],
|
|
350
349
|
{ "btn-outline": o.outline, "btn-square": o.square, tooltip: o.tooltip }
|
|
351
350
|
]),
|
|
@@ -366,14 +365,14 @@ const Vt = {
|
|
|
366
365
|
_: 3
|
|
367
366
|
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
368
367
|
}
|
|
369
|
-
}),
|
|
368
|
+
}), Et = ["type", "disabled"], kn = /* @__PURE__ */ k({
|
|
370
369
|
__name: "btn-badge",
|
|
371
|
-
props:
|
|
370
|
+
props: Tt,
|
|
372
371
|
emits: Rt,
|
|
373
372
|
setup(e, { emit: t }) {
|
|
374
373
|
const o = e, n = t;
|
|
375
374
|
return (l, a) => (r(), f("button", {
|
|
376
|
-
class:
|
|
375
|
+
class: $(["badge gap-1", g(Pt)[o.size], g(Ot)[o.color]]),
|
|
377
376
|
type: o.type,
|
|
378
377
|
disabled: o.disabled,
|
|
379
378
|
onClick: a[0] || (a[0] = (c) => n("click"))
|
|
@@ -384,9 +383,9 @@ const Vt = {
|
|
|
384
383
|
icon: o.icon,
|
|
385
384
|
size: o.size
|
|
386
385
|
}, null, 8, ["icon", "size"])) : _("", !0)
|
|
387
|
-
], 10,
|
|
386
|
+
], 10, Et));
|
|
388
387
|
}
|
|
389
|
-
}),
|
|
388
|
+
}), zt = /* @__PURE__ */ k({
|
|
390
389
|
__name: "confirmModal",
|
|
391
390
|
props: {
|
|
392
391
|
title: {},
|
|
@@ -399,13 +398,13 @@ const Vt = {
|
|
|
399
398
|
const o = t, n = (l) => {
|
|
400
399
|
o("closeModal", { confirmed: l });
|
|
401
400
|
};
|
|
402
|
-
return (l, a) => (r(), w(
|
|
401
|
+
return (l, a) => (r(), w(Vt, {
|
|
403
402
|
"modal-title": e.title,
|
|
404
403
|
open: !0,
|
|
405
404
|
"disable-close": !0
|
|
406
405
|
}, {
|
|
407
406
|
content: S(() => [
|
|
408
|
-
E(
|
|
407
|
+
E(y(e.message), 1)
|
|
409
408
|
]),
|
|
410
409
|
actions: S(() => [
|
|
411
410
|
V(g(z), {
|
|
@@ -415,7 +414,7 @@ const Vt = {
|
|
|
415
414
|
onClick: a[0] || (a[0] = (c) => n(!1))
|
|
416
415
|
}, {
|
|
417
416
|
default: S(() => [
|
|
418
|
-
E(
|
|
417
|
+
E(y(e.cancelLabel), 1)
|
|
419
418
|
]),
|
|
420
419
|
_: 1
|
|
421
420
|
}, 8, ["color", "aria-label"]),
|
|
@@ -424,7 +423,7 @@ const Vt = {
|
|
|
424
423
|
onClick: a[1] || (a[1] = (c) => n(!0))
|
|
425
424
|
}, {
|
|
426
425
|
default: S(() => [
|
|
427
|
-
E(
|
|
426
|
+
E(y(e.confirmLabel), 1)
|
|
428
427
|
]),
|
|
429
428
|
_: 1
|
|
430
429
|
}, 8, ["aria-label"])
|
|
@@ -433,7 +432,7 @@ const Vt = {
|
|
|
433
432
|
}, 8, ["modal-title"]));
|
|
434
433
|
}
|
|
435
434
|
});
|
|
436
|
-
class
|
|
435
|
+
class be {
|
|
437
436
|
constructor() {
|
|
438
437
|
this.showModal = x(!1), this.modals = [];
|
|
439
438
|
}
|
|
@@ -448,7 +447,7 @@ class me {
|
|
|
448
447
|
}
|
|
449
448
|
static showConfirm(t) {
|
|
450
449
|
this.getInstance().openModal({
|
|
451
|
-
component:
|
|
450
|
+
component: zt,
|
|
452
451
|
props: t
|
|
453
452
|
});
|
|
454
453
|
}
|
|
@@ -456,7 +455,7 @@ class me {
|
|
|
456
455
|
this.getInstance().openModal(t);
|
|
457
456
|
}
|
|
458
457
|
static getInstance() {
|
|
459
|
-
return this.instance || (this.instance = new
|
|
458
|
+
return this.instance || (this.instance = new be()), this.instance;
|
|
460
459
|
}
|
|
461
460
|
static closeAll() {
|
|
462
461
|
this.instance.closeAll();
|
|
@@ -465,10 +464,10 @@ class me {
|
|
|
465
464
|
this.modals = [], this.showModal.value = !1;
|
|
466
465
|
}
|
|
467
466
|
}
|
|
468
|
-
const
|
|
467
|
+
const Nt = /* @__PURE__ */ k({
|
|
469
468
|
__name: "modalWrapper",
|
|
470
469
|
setup(e) {
|
|
471
|
-
const t =
|
|
470
|
+
const t = be.getInstance(), o = h(() => t.showModal.value ? t.modals : []);
|
|
472
471
|
return (n, l) => (r(!0), f(L, null, P(o.value, (a) => (r(), w(ne(a?.component), B({
|
|
473
472
|
key: a.id,
|
|
474
473
|
ref_for: !0
|
|
@@ -477,7 +476,7 @@ const zt = /* @__PURE__ */ k({
|
|
|
477
476
|
onCloseModal: a?.props?.onClose
|
|
478
477
|
}), null, 16, ["onCloseModal"]))), 128));
|
|
479
478
|
}
|
|
480
|
-
}),
|
|
479
|
+
}), qt = /* @__PURE__ */ k({
|
|
481
480
|
__name: "notification-message",
|
|
482
481
|
props: {
|
|
483
482
|
message: {},
|
|
@@ -492,18 +491,18 @@ const zt = /* @__PURE__ */ k({
|
|
|
492
491
|
};
|
|
493
492
|
return (o, n) => (r(), f("div", {
|
|
494
493
|
role: "alert",
|
|
495
|
-
class:
|
|
494
|
+
class: $(`alert ${t[e.type]} `)
|
|
496
495
|
}, [
|
|
497
|
-
u("span", null,
|
|
496
|
+
u("span", null, y(e.message), 1)
|
|
498
497
|
], 2));
|
|
499
498
|
}
|
|
500
|
-
}),
|
|
501
|
-
class
|
|
499
|
+
}), jt = 5e3;
|
|
500
|
+
class me {
|
|
502
501
|
constructor() {
|
|
503
502
|
this.notifications = x([]), this.addNotification = (t, o = "info") => {
|
|
504
503
|
const n = {
|
|
505
504
|
id: de(),
|
|
506
|
-
duration:
|
|
505
|
+
duration: jt,
|
|
507
506
|
message: t,
|
|
508
507
|
type: o
|
|
509
508
|
};
|
|
@@ -517,7 +516,7 @@ class be {
|
|
|
517
516
|
};
|
|
518
517
|
}
|
|
519
518
|
static getInstance() {
|
|
520
|
-
return this.instance || (this.instance = new
|
|
519
|
+
return this.instance || (this.instance = new me()), this.instance;
|
|
521
520
|
}
|
|
522
521
|
static info(t) {
|
|
523
522
|
this.getInstance().addNotification(t, "info");
|
|
@@ -535,17 +534,17 @@ class be {
|
|
|
535
534
|
this.getInstance().removeNotification(t);
|
|
536
535
|
}
|
|
537
536
|
}
|
|
538
|
-
const
|
|
537
|
+
const Ft = { class: "toast toast-top toast-center z-[999]" }, Kt = /* @__PURE__ */ k({
|
|
539
538
|
__name: "notifications",
|
|
540
539
|
setup(e) {
|
|
541
|
-
const t =
|
|
542
|
-
return (o, n) => (r(), f("div",
|
|
543
|
-
(r(!0), f(L, null, P(g(t).notifications.value, (l) => (r(), w(
|
|
540
|
+
const t = me.getInstance();
|
|
541
|
+
return (o, n) => (r(), f("div", Ft, [
|
|
542
|
+
(r(!0), f(L, null, P(g(t).notifications.value, (l) => (r(), w(qt, B({
|
|
544
543
|
key: l.id
|
|
545
544
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
546
545
|
]));
|
|
547
546
|
}
|
|
548
|
-
}),
|
|
547
|
+
}), 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({
|
|
549
548
|
__name: "shell.component",
|
|
550
549
|
props: {
|
|
551
550
|
title: {},
|
|
@@ -558,7 +557,7 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
558
557
|
setup(e, { emit: t }) {
|
|
559
558
|
const n = e, l = x(!1), a = () => {
|
|
560
559
|
l.value = !l.value;
|
|
561
|
-
}, c = t, d =
|
|
560
|
+
}, c = t, d = h(() => n.user ? {
|
|
562
561
|
label: n.user.name,
|
|
563
562
|
items: [
|
|
564
563
|
{
|
|
@@ -570,35 +569,35 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
570
569
|
]
|
|
571
570
|
} : null);
|
|
572
571
|
return (p, i) => (r(), f(L, null, [
|
|
573
|
-
V(
|
|
574
|
-
V(g(
|
|
575
|
-
u("div",
|
|
576
|
-
u("header",
|
|
577
|
-
u("nav",
|
|
578
|
-
u("div",
|
|
572
|
+
V(Kt),
|
|
573
|
+
V(g(Nt)),
|
|
574
|
+
u("div", Ut, [
|
|
575
|
+
u("header", Ht, [
|
|
576
|
+
u("nav", Wt, [
|
|
577
|
+
u("div", Gt, [
|
|
579
578
|
u("button", {
|
|
580
579
|
"aria-label": "open sidebar",
|
|
581
580
|
class: "btn btn-square btn-ghost p-1",
|
|
582
581
|
onClick: a
|
|
583
582
|
}, [
|
|
584
583
|
V(g(j), {
|
|
585
|
-
icon: g(
|
|
584
|
+
icon: g(R).Hamburger
|
|
586
585
|
}, null, 8, ["icon"])
|
|
587
586
|
])
|
|
588
587
|
]),
|
|
589
|
-
u("div",
|
|
588
|
+
u("div", Xt, [
|
|
590
589
|
u("a", {
|
|
591
590
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
592
591
|
href: g("/")
|
|
593
|
-
},
|
|
592
|
+
}, y(e.title), 9, Zt)
|
|
594
593
|
]),
|
|
595
|
-
u("div",
|
|
594
|
+
u("div", Jt, [
|
|
596
595
|
d.value ? (r(), w(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : _("", !0)
|
|
597
596
|
])
|
|
598
597
|
])
|
|
599
598
|
]),
|
|
600
599
|
u("div", {
|
|
601
|
-
class:
|
|
600
|
+
class: $(["drawer flex-1 overflow-hidden", { "drawer-open": l.value }])
|
|
602
601
|
}, [
|
|
603
602
|
Y(u("input", {
|
|
604
603
|
id: "app-drawer",
|
|
@@ -606,12 +605,12 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
606
605
|
type: "checkbox",
|
|
607
606
|
class: "drawer-toggle"
|
|
608
607
|
}, null, 512), [
|
|
609
|
-
[
|
|
608
|
+
[Ce, l.value]
|
|
610
609
|
]),
|
|
611
|
-
u("main",
|
|
610
|
+
u("main", Qt, [
|
|
612
611
|
M(p.$slots, "default")
|
|
613
612
|
]),
|
|
614
|
-
u("div",
|
|
613
|
+
u("div", Yt, [
|
|
615
614
|
i[1] || (i[1] = u("label", {
|
|
616
615
|
for: "app-drawer",
|
|
617
616
|
"aria-label": "close sidebar",
|
|
@@ -621,7 +620,7 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
621
620
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
622
621
|
style: X({ width: e.widthSidebar + "px" })
|
|
623
622
|
}, [
|
|
624
|
-
u("ul",
|
|
623
|
+
u("ul", eo, [
|
|
625
624
|
(r(!0), f(L, null, P(e.menu, (s) => (r(), f("li", {
|
|
626
625
|
key: s.label
|
|
627
626
|
}, [
|
|
@@ -629,33 +628,33 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
629
628
|
to: { name: s.routerLink, params: s.params }
|
|
630
629
|
}, {
|
|
631
630
|
default: S(() => [
|
|
632
|
-
E(
|
|
631
|
+
E(y(s.label), 1)
|
|
633
632
|
]),
|
|
634
633
|
_: 2
|
|
635
634
|
}, 1032, ["to"])
|
|
636
635
|
]))), 128))
|
|
637
636
|
]),
|
|
638
|
-
u("div",
|
|
637
|
+
u("div", to, " version: " + y(e.version), 1)
|
|
639
638
|
], 4)
|
|
640
639
|
])
|
|
641
640
|
], 2)
|
|
642
641
|
])
|
|
643
642
|
], 64));
|
|
644
643
|
}
|
|
645
|
-
}),
|
|
644
|
+
}), oo = {
|
|
646
645
|
currentPage: { type: Number, required: !0 },
|
|
647
646
|
page: { type: Number, required: !0 },
|
|
648
647
|
label: { type: String, required: !0 },
|
|
649
648
|
neverActive: { type: Boolean, default: !1 },
|
|
650
649
|
disabled: { type: Boolean, default: !1 }
|
|
651
|
-
},
|
|
650
|
+
}, so = ["updatePage", "updatePageSize"], J = /* @__PURE__ */ k({
|
|
652
651
|
__name: "pagination-button.component",
|
|
653
|
-
props:
|
|
654
|
-
emits:
|
|
652
|
+
props: oo,
|
|
653
|
+
emits: so,
|
|
655
654
|
setup(e, { emit: t }) {
|
|
656
|
-
const o = e, n = t, l =
|
|
655
|
+
const o = e, n = t, l = h(
|
|
657
656
|
() => o.neverActive ? !1 : o.page === o.currentPage
|
|
658
|
-
), a =
|
|
657
|
+
), a = h(() => o.neverActive ? N.blank : l.value ? N.primary : N.secondary), c = () => {
|
|
659
658
|
n("updatePage", o.page);
|
|
660
659
|
};
|
|
661
660
|
return (d, p) => (r(), w(g(z), {
|
|
@@ -666,24 +665,24 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
666
665
|
onClick: p[0] || (p[0] = (i) => c())
|
|
667
666
|
}, {
|
|
668
667
|
default: S(() => [
|
|
669
|
-
E(
|
|
668
|
+
E(y(d.label), 1)
|
|
670
669
|
]),
|
|
671
670
|
_: 1
|
|
672
671
|
}, 8, ["disabled", "color"]));
|
|
673
672
|
}
|
|
674
|
-
}),
|
|
673
|
+
}), no = {
|
|
675
674
|
totalItems: { type: Number, default: 0 },
|
|
676
675
|
itemsPerPage: { type: Number, default: 1 },
|
|
677
676
|
currentPage: { type: Number, default: 1 }
|
|
678
|
-
},
|
|
677
|
+
}, 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({
|
|
679
678
|
__name: "pagination.component",
|
|
680
|
-
props:
|
|
681
|
-
emits:
|
|
679
|
+
props: no,
|
|
680
|
+
emits: lo,
|
|
682
681
|
setup(e, { emit: t }) {
|
|
683
|
-
const o = e, n = t, l =
|
|
682
|
+
const o = e, n = t, l = h(() => {
|
|
684
683
|
let s = Math.ceil(o.totalItems / o.itemsPerPage);
|
|
685
684
|
return s < 1 ? 1 : s;
|
|
686
|
-
}), a = Q / 2, c =
|
|
685
|
+
}), a = Q / 2, c = h(() => {
|
|
687
686
|
if (l.value <= Q)
|
|
688
687
|
return {
|
|
689
688
|
min: 1,
|
|
@@ -691,10 +690,10 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
691
690
|
};
|
|
692
691
|
let s = o.currentPage - a;
|
|
693
692
|
s <= 1 ? s = 1 : s + Q > l.value && (s = l.value - Q);
|
|
694
|
-
let
|
|
693
|
+
let b = s + Q;
|
|
695
694
|
return {
|
|
696
695
|
min: s,
|
|
697
|
-
max:
|
|
696
|
+
max: b
|
|
698
697
|
};
|
|
699
698
|
}), d = (s) => ({
|
|
700
699
|
label: "...",
|
|
@@ -702,25 +701,25 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
702
701
|
page: -10,
|
|
703
702
|
disabled: !0,
|
|
704
703
|
neverActive: !0
|
|
705
|
-
}), p =
|
|
704
|
+
}), p = h(() => {
|
|
706
705
|
let s = l.value;
|
|
707
706
|
s < 1 && (s = 1);
|
|
708
|
-
const
|
|
707
|
+
const b = o.currentPage, m = [], { min: v, max: D } = c.value;
|
|
709
708
|
return Array.from({ length: s }, (H, A) => {
|
|
710
|
-
const
|
|
711
|
-
|
|
712
|
-
label: `${
|
|
709
|
+
const C = A + 1;
|
|
710
|
+
C !== 1 && C !== s && (C > D || C < v) || (C === s && s > 1 && D < s && m.push(d(b)), m.push({
|
|
711
|
+
label: `${C}`,
|
|
713
712
|
totalPages: s,
|
|
714
|
-
currentPage:
|
|
715
|
-
page:
|
|
716
|
-
}),
|
|
717
|
-
}),
|
|
713
|
+
currentPage: b,
|
|
714
|
+
page: C
|
|
715
|
+
}), C === 1 && s > 1 && v > 1 && m.push(d(b)));
|
|
716
|
+
}), m;
|
|
718
717
|
}), i = (s) => {
|
|
719
718
|
n("updatePage", s);
|
|
720
719
|
};
|
|
721
|
-
return (s,
|
|
722
|
-
u("div",
|
|
723
|
-
u("div",
|
|
720
|
+
return (s, b) => (r(), f("div", ao, [
|
|
721
|
+
u("div", ro, [
|
|
722
|
+
u("div", io, [
|
|
724
723
|
V(J, B(o, {
|
|
725
724
|
page: 1,
|
|
726
725
|
label: "<<",
|
|
@@ -737,10 +736,10 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
737
736
|
disabled: s.currentPage === 1,
|
|
738
737
|
onUpdatePage: i
|
|
739
738
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
740
|
-
(r(!0), f(L, null, P(p.value, (
|
|
741
|
-
key:
|
|
739
|
+
(r(!0), f(L, null, P(p.value, (m) => (r(), w(J, B({
|
|
740
|
+
key: m.page,
|
|
742
741
|
ref_for: !0
|
|
743
|
-
},
|
|
742
|
+
}, m, { onUpdatePage: i }), null, 16))), 128)),
|
|
744
743
|
V(J, B(o, {
|
|
745
744
|
page: s.currentPage + 1,
|
|
746
745
|
label: ">",
|
|
@@ -759,43 +758,43 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
759
758
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
760
759
|
])
|
|
761
760
|
]),
|
|
762
|
-
u("div",
|
|
761
|
+
u("div", uo, " page " + y(s.currentPage) + " of " + y(l.value), 1)
|
|
763
762
|
]));
|
|
764
763
|
}
|
|
765
|
-
}),
|
|
764
|
+
}), po = {
|
|
766
765
|
data: { type: Object, required: !0 },
|
|
767
766
|
column: { type: Object, required: !0 },
|
|
768
767
|
options: { type: Object }
|
|
769
|
-
},
|
|
768
|
+
}, $n = /* @__PURE__ */ k({
|
|
770
769
|
__name: "text.cell",
|
|
771
|
-
props:
|
|
770
|
+
props: po,
|
|
772
771
|
setup(e) {
|
|
773
|
-
const t = e, o =
|
|
772
|
+
const t = e, o = h(() => {
|
|
774
773
|
const n = t.data[t.column.id];
|
|
775
774
|
return n ? t.column.options?.format === "keyValue" ? n[t.column.options.key] : n : null;
|
|
776
775
|
});
|
|
777
|
-
return (n, l) =>
|
|
776
|
+
return (n, l) => y(o.value);
|
|
778
777
|
}
|
|
779
|
-
}),
|
|
778
|
+
}), fo = {
|
|
780
779
|
column: { type: Object, required: !0 },
|
|
781
780
|
sortColumn: { type: String },
|
|
782
781
|
sortDirection: { type: String }
|
|
783
|
-
},
|
|
782
|
+
}, bo = ["sort"], mo = { class: "flex-grow pr-2" }, go = { class: "h-4 w-4" }, vo = /* @__PURE__ */ k({
|
|
784
783
|
__name: "sort.header",
|
|
785
|
-
props:
|
|
786
|
-
emits:
|
|
784
|
+
props: fo,
|
|
785
|
+
emits: bo,
|
|
787
786
|
setup(e, { emit: t }) {
|
|
788
|
-
const o = e, n = t, l =
|
|
789
|
-
() => o.sortDirection === "asc" ?
|
|
790
|
-
), a =
|
|
787
|
+
const o = e, n = t, l = h(
|
|
788
|
+
() => o.sortDirection === "asc" ? R.BarsArrowUp : R.BarsArrowDown
|
|
789
|
+
), a = h(() => o.column.options?.sortId ?? o.column.id), c = () => {
|
|
791
790
|
n("sort", a.value);
|
|
792
791
|
};
|
|
793
792
|
return (d, p) => (r(), f("button", {
|
|
794
793
|
class: "flex items-center",
|
|
795
794
|
onClick: c
|
|
796
795
|
}, [
|
|
797
|
-
u("span", mo,
|
|
798
|
-
u("div",
|
|
796
|
+
u("span", mo, y(d.column.label), 1),
|
|
797
|
+
u("div", go, [
|
|
799
798
|
d.sortColumn === a.value ? (r(), w(g(j), {
|
|
800
799
|
key: 0,
|
|
801
800
|
icon: l.value
|
|
@@ -803,19 +802,19 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
803
802
|
])
|
|
804
803
|
]));
|
|
805
804
|
}
|
|
806
|
-
}),
|
|
805
|
+
}), ho = {
|
|
807
806
|
loading: { type: Boolean, default: !1 },
|
|
808
807
|
actions: { type: Array },
|
|
809
808
|
data: { type: Array },
|
|
810
809
|
displayColumns: { type: Array, required: !0 },
|
|
811
810
|
page: { type: Object },
|
|
812
811
|
sort: { type: Object }
|
|
813
|
-
},
|
|
812
|
+
}, yo = ["updatePage", "sort"], wo = { class: "table w-full" }, ko = { key: 0 }, _o = ["colspan"], $o = ["ui-id"], Co = { class: "flex gap-2" }, Cn = /* @__PURE__ */ k({
|
|
814
813
|
__name: "table.component",
|
|
815
|
-
props:
|
|
816
|
-
emits:
|
|
814
|
+
props: ho,
|
|
815
|
+
emits: yo,
|
|
817
816
|
setup(e, { emit: t }) {
|
|
818
|
-
const o = t, n = Oe(), l =
|
|
817
|
+
const o = t, n = Oe(), l = h(() => "onEdit" in n), a = h(() => "onDelete" in n), c = (s) => {
|
|
819
818
|
n.onEdit?.(s);
|
|
820
819
|
}, d = (s) => {
|
|
821
820
|
n.onDelete?.(s);
|
|
@@ -824,73 +823,73 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
824
823
|
}, i = (s) => {
|
|
825
824
|
o("sort", s);
|
|
826
825
|
};
|
|
827
|
-
return (s,
|
|
828
|
-
u("table",
|
|
826
|
+
return (s, b) => (r(), f(L, null, [
|
|
827
|
+
u("table", wo, [
|
|
829
828
|
u("thead", null, [
|
|
830
829
|
u("tr", null, [
|
|
831
|
-
(r(!0), f(L, null, P(s.displayColumns, (
|
|
832
|
-
key:
|
|
830
|
+
(r(!0), f(L, null, P(s.displayColumns, (m) => (r(), f("th", {
|
|
831
|
+
key: m.scope
|
|
833
832
|
}, [
|
|
834
|
-
V(
|
|
833
|
+
V(vo, B({ column: m }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
|
|
835
834
|
]))), 128)),
|
|
836
|
-
|
|
835
|
+
b[0] || (b[0] = u("th", null, null, -1))
|
|
837
836
|
])
|
|
838
837
|
]),
|
|
839
838
|
u("tbody", null, [
|
|
840
|
-
s.loading ? (r(), f("tr",
|
|
839
|
+
s.loading ? (r(), f("tr", ko, [
|
|
841
840
|
u("td", {
|
|
842
841
|
colspan: s.displayColumns.length + 1,
|
|
843
842
|
class: "text-center"
|
|
844
|
-
}, [...
|
|
843
|
+
}, [...b[1] || (b[1] = [
|
|
845
844
|
u("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
846
|
-
])], 8,
|
|
845
|
+
])], 8, _o)
|
|
847
846
|
])) : _("", !0),
|
|
848
|
-
(r(!0), f(L, null, P(s.data, (
|
|
849
|
-
key:
|
|
850
|
-
"ui-id": `table_${
|
|
847
|
+
(r(!0), f(L, null, P(s.data, (m) => (r(), f("tr", {
|
|
848
|
+
key: m.id,
|
|
849
|
+
"ui-id": `table_${m.id}`
|
|
851
850
|
}, [
|
|
852
|
-
(r(!0), f(L, null, P(s.displayColumns, (
|
|
853
|
-
key:
|
|
851
|
+
(r(!0), f(L, null, P(s.displayColumns, (v) => (r(), f("td", {
|
|
852
|
+
key: v.scope
|
|
854
853
|
}, [
|
|
855
|
-
(r(), w(ne(
|
|
856
|
-
data:
|
|
857
|
-
column:
|
|
854
|
+
(r(), w(ne(v.component), B({ ref_for: !0 }, v, {
|
|
855
|
+
data: m,
|
|
856
|
+
column: v
|
|
858
857
|
}), null, 16, ["data", "column"]))
|
|
859
858
|
]))), 128)),
|
|
860
859
|
u("td", null, [
|
|
861
860
|
u("span", Co, [
|
|
862
|
-
(r(!0), f(L, null, P(s.actions, (
|
|
863
|
-
key:
|
|
864
|
-
"aria-label":
|
|
865
|
-
icon:
|
|
861
|
+
(r(!0), f(L, null, P(s.actions, (v) => (r(), w(z, {
|
|
862
|
+
key: v.label,
|
|
863
|
+
"aria-label": v.label,
|
|
864
|
+
icon: v.icon,
|
|
866
865
|
outline: !0,
|
|
867
|
-
onClick: (D) =>
|
|
866
|
+
onClick: (D) => v.action(m)
|
|
868
867
|
}, {
|
|
869
868
|
default: S(() => [
|
|
870
|
-
E(
|
|
869
|
+
E(y(v.label), 1)
|
|
871
870
|
]),
|
|
872
871
|
_: 2
|
|
873
872
|
}, 1032, ["aria-label", "icon", "onClick"]))), 128)),
|
|
874
873
|
l.value ? (r(), w(z, {
|
|
875
874
|
key: 0,
|
|
876
875
|
"aria-label": "Edit",
|
|
877
|
-
icon: g(
|
|
876
|
+
icon: g(R).Edit,
|
|
878
877
|
outline: !0,
|
|
879
|
-
onClick: (
|
|
878
|
+
onClick: (v) => c(m)
|
|
880
879
|
}, null, 8, ["icon", "onClick"])) : _("", !0),
|
|
881
880
|
a.value ? (r(), w(z, {
|
|
882
881
|
key: 1,
|
|
883
882
|
"aria-label": "Delete",
|
|
884
|
-
icon: g(
|
|
883
|
+
icon: g(R).Delete,
|
|
885
884
|
outline: !0,
|
|
886
|
-
onClick: (
|
|
885
|
+
onClick: (v) => d(m)
|
|
887
886
|
}, null, 8, ["icon", "onClick"])) : _("", !0)
|
|
888
887
|
])
|
|
889
888
|
])
|
|
890
|
-
], 8,
|
|
889
|
+
], 8, $o))), 128))
|
|
891
890
|
])
|
|
892
891
|
]),
|
|
893
|
-
s.page ? (r(), w(
|
|
892
|
+
s.page ? (r(), w(co, {
|
|
894
893
|
key: 0,
|
|
895
894
|
class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
|
|
896
895
|
"total-items": s.page.count,
|
|
@@ -900,43 +899,43 @@ const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__
|
|
|
900
899
|
}, null, 8, ["total-items", "items-per-page", "current-page"])) : _("", !0)
|
|
901
900
|
], 64));
|
|
902
901
|
}
|
|
903
|
-
}),
|
|
902
|
+
}), xo = (e, t) => {
|
|
904
903
|
const o = e.__vccOpts || e;
|
|
905
904
|
for (const [n, l] of t)
|
|
906
905
|
o[n] = l;
|
|
907
906
|
return o;
|
|
908
|
-
},
|
|
907
|
+
}, Lo = {}, So = { class: "card bg-base-100 shadow-sm" }, Po = { class: "card-body" }, Mo = {
|
|
909
908
|
key: 0,
|
|
910
909
|
class: "card-title"
|
|
911
|
-
},
|
|
910
|
+
}, Bo = {
|
|
912
911
|
key: 1,
|
|
913
912
|
class: "card-actions justify-end"
|
|
914
913
|
};
|
|
915
|
-
function
|
|
916
|
-
return r(), f("div",
|
|
917
|
-
u("div",
|
|
918
|
-
e.$slots.title ? (r(), f("h2",
|
|
914
|
+
function Vo(e, t) {
|
|
915
|
+
return r(), f("div", So, [
|
|
916
|
+
u("div", Po, [
|
|
917
|
+
e.$slots.title ? (r(), f("h2", Mo, [
|
|
919
918
|
M(e.$slots, "title")
|
|
920
919
|
])) : _("", !0),
|
|
921
920
|
u("p", null, [
|
|
922
921
|
M(e.$slots, "default"),
|
|
923
922
|
M(e.$slots, "content")
|
|
924
923
|
]),
|
|
925
|
-
e.$slots.actions ? (r(), f("div",
|
|
924
|
+
e.$slots.actions ? (r(), f("div", Bo, [
|
|
926
925
|
M(e.$slots, "actions")
|
|
927
926
|
])) : _("", !0)
|
|
928
927
|
])
|
|
929
928
|
]);
|
|
930
929
|
}
|
|
931
|
-
const
|
|
930
|
+
const xn = /* @__PURE__ */ xo(Lo, [["render", Vo]]), Ln = (e, t) => {
|
|
932
931
|
if (!e) return null;
|
|
933
932
|
const o = (n) => {
|
|
934
933
|
e.contains(n.target) || t();
|
|
935
934
|
};
|
|
936
935
|
return document.addEventListener("click", o), o;
|
|
937
|
-
},
|
|
936
|
+
}, Sn = (e) => {
|
|
938
937
|
document.removeEventListener("click", e);
|
|
939
|
-
},
|
|
938
|
+
}, Pn = {
|
|
940
939
|
beforeMount(e, t) {
|
|
941
940
|
e.clickOutsideEvent = function(o) {
|
|
942
941
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -946,17 +945,17 @@ const $n = /* @__PURE__ */ $o(xo, [["render", Bo]]), xn = (e, t) => {
|
|
|
946
945
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
947
946
|
}
|
|
948
947
|
};
|
|
949
|
-
function
|
|
948
|
+
function Ao(e) {
|
|
950
949
|
return e.replace(/[:\s_-]+(.)/g, (t, o) => o.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
|
|
951
950
|
}
|
|
952
|
-
function
|
|
951
|
+
function Mn(e) {
|
|
953
952
|
const t = Ie();
|
|
954
953
|
if (!t)
|
|
955
954
|
return !1;
|
|
956
955
|
const o = t.vnode.props;
|
|
957
956
|
if (!o)
|
|
958
957
|
return !1;
|
|
959
|
-
const n =
|
|
958
|
+
const n = Ao(e), l = De(e);
|
|
960
959
|
return [
|
|
961
960
|
re(e),
|
|
962
961
|
re(l),
|
|
@@ -968,7 +967,7 @@ function Pn(e) {
|
|
|
968
967
|
(c) => !!o[c]
|
|
969
968
|
);
|
|
970
969
|
}
|
|
971
|
-
const
|
|
970
|
+
const Oo = ["select"], ge = {
|
|
972
971
|
options: { type: Array, required: !1 },
|
|
973
972
|
isLoading: {
|
|
974
973
|
type: Boolean,
|
|
@@ -1044,16 +1043,16 @@ const Ao = ["select"], ge = {
|
|
|
1044
1043
|
valueKey: { type: String, default: "value" },
|
|
1045
1044
|
/** add a new button next to the list*/
|
|
1046
1045
|
enableCreate: { type: Boolean, default: !1 }
|
|
1047
|
-
},
|
|
1046
|
+
}, Io = ["select", "clear", "close", "create"], Be = {
|
|
1048
1047
|
...ge,
|
|
1049
1048
|
...ve,
|
|
1050
1049
|
isOpen: { type: Boolean, default: !1 },
|
|
1051
1050
|
isActive: { type: Function, default: (e) => !1 }
|
|
1052
|
-
},
|
|
1051
|
+
}, Do = {
|
|
1053
1052
|
key: 1,
|
|
1054
1053
|
tabindex: "-1",
|
|
1055
1054
|
class: "pointer-events-none"
|
|
1056
|
-
},
|
|
1055
|
+
}, To = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Ro = ["innerHTML"], Eo = {
|
|
1057
1056
|
key: 0,
|
|
1058
1057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1059
1058
|
class: "h-4 w-4 shrink-0 opacity-80",
|
|
@@ -1062,7 +1061,7 @@ const Ao = ["select"], ge = {
|
|
|
1062
1061
|
stroke: "currentColor",
|
|
1063
1062
|
"stroke-width": "2.5"
|
|
1064
1063
|
};
|
|
1065
|
-
function
|
|
1064
|
+
function zo(e, t) {
|
|
1066
1065
|
if (!t) return e;
|
|
1067
1066
|
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1068
1067
|
return e.replace(
|
|
@@ -1070,10 +1069,10 @@ function Eo(e, t) {
|
|
|
1070
1069
|
'<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
|
|
1071
1070
|
);
|
|
1072
1071
|
}
|
|
1073
|
-
const
|
|
1072
|
+
const No = /* @__PURE__ */ k({
|
|
1074
1073
|
__name: "ListResults",
|
|
1075
1074
|
props: ge,
|
|
1076
|
-
emits:
|
|
1075
|
+
emits: Oo,
|
|
1077
1076
|
setup(e, { expose: t, emit: o }) {
|
|
1078
1077
|
const n = e, l = x(-1), a = x(), c = o;
|
|
1079
1078
|
q(
|
|
@@ -1090,57 +1089,57 @@ const zo = /* @__PURE__ */ k({
|
|
|
1090
1089
|
});
|
|
1091
1090
|
}
|
|
1092
1091
|
function p(s) {
|
|
1093
|
-
const
|
|
1094
|
-
if (
|
|
1092
|
+
const b = n.options?.length ?? 0;
|
|
1093
|
+
if (b)
|
|
1095
1094
|
switch (s.key) {
|
|
1096
1095
|
case "ArrowDown":
|
|
1097
|
-
s.preventDefault(), l.value = (l.value + 1) %
|
|
1096
|
+
s.preventDefault(), l.value = (l.value + 1) % b, d();
|
|
1098
1097
|
break;
|
|
1099
1098
|
case "ArrowUp":
|
|
1100
|
-
s.preventDefault(), l.value = l.value <= 0 ?
|
|
1099
|
+
s.preventDefault(), l.value = l.value <= 0 ? b - 1 : l.value - 1, d();
|
|
1101
1100
|
break;
|
|
1102
1101
|
case "Enter":
|
|
1103
|
-
s.preventDefault(), l.value >= 0 && l.value <
|
|
1102
|
+
s.preventDefault(), l.value >= 0 && l.value < b && i(n.options[l.value]);
|
|
1104
1103
|
break;
|
|
1105
1104
|
}
|
|
1106
1105
|
}
|
|
1107
1106
|
function i(s) {
|
|
1108
1107
|
l.value = -1, c("select", s);
|
|
1109
1108
|
}
|
|
1110
|
-
return t({ handleKeydown: p }), (s,
|
|
1109
|
+
return t({ handleKeydown: p }), (s, b) => (r(), f("ul", {
|
|
1111
1110
|
ref_key: "listRef",
|
|
1112
1111
|
ref: a,
|
|
1113
1112
|
role: "listbox",
|
|
1114
1113
|
class: "absolute z-50 w-full mt-1 bg-base-100 border border-base-300 rounded-box shadow-xl overflow-auto max-h-64 origin-top p-1"
|
|
1115
1114
|
}, [
|
|
1116
|
-
s.isLoading ? (r(), f(L, { key: 0 }, P(2, (
|
|
1117
|
-
key: `skel-${
|
|
1115
|
+
s.isLoading ? (r(), f(L, { key: 0 }, P(2, (m) => u("li", {
|
|
1116
|
+
key: `skel-${m}`,
|
|
1118
1117
|
class: "pointer-events-none px-3 py-2"
|
|
1119
|
-
}, [...
|
|
1118
|
+
}, [...b[0] || (b[0] = [
|
|
1120
1119
|
u("div", { class: "flex items-center gap-3" }, [
|
|
1121
1120
|
u("div", { class: "skeleton h-3 w-3/4 rounded" })
|
|
1122
1121
|
], -1)
|
|
1123
|
-
])])), 64)) : s.options.length === 0 ? (r(), f("li",
|
|
1122
|
+
])])), 64)) : s.options.length === 0 ? (r(), f("li", Do, [...b[1] || (b[1] = [
|
|
1124
1123
|
u("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1125
|
-
])])) : (r(!0), f(L, { key: 2 }, P(s.options, (
|
|
1126
|
-
key:
|
|
1127
|
-
"data-index":
|
|
1124
|
+
])])) : (r(!0), f(L, { key: 2 }, P(s.options, (m, v) => (r(), f("li", {
|
|
1125
|
+
key: m.value,
|
|
1126
|
+
"data-index": v,
|
|
1128
1127
|
role: "option",
|
|
1129
|
-
"aria-selected":
|
|
1130
|
-
onMousedown: le((D) => i(
|
|
1131
|
-
onMousemove: (D) => l.value =
|
|
1128
|
+
"aria-selected": v === l.value,
|
|
1129
|
+
onMousedown: le((D) => i(m), ["prevent"]),
|
|
1130
|
+
onMousemove: (D) => l.value = v
|
|
1132
1131
|
}, [
|
|
1133
1132
|
u("a", {
|
|
1134
|
-
class:
|
|
1135
|
-
"active bg-secondary text-primary-content":
|
|
1136
|
-
"hover:bg-base-200":
|
|
1133
|
+
class: $(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1134
|
+
"active bg-secondary text-primary-content": v === l.value,
|
|
1135
|
+
"hover:bg-base-200": v !== l.value
|
|
1137
1136
|
}])
|
|
1138
1137
|
}, [
|
|
1139
1138
|
u("span", {
|
|
1140
1139
|
class: "whitespace-nowrap",
|
|
1141
|
-
innerHTML:
|
|
1140
|
+
innerHTML: zo(m.label, s.query)
|
|
1142
1141
|
}, null, 8, Ro),
|
|
1143
|
-
s.isActive(
|
|
1142
|
+
s.isActive(m) ? (r(), f("svg", Eo, [...b[2] || (b[2] = [
|
|
1144
1143
|
u("path", {
|
|
1145
1144
|
"stroke-linecap": "round",
|
|
1146
1145
|
"stroke-linejoin": "round",
|
|
@@ -1148,44 +1147,44 @@ const zo = /* @__PURE__ */ k({
|
|
|
1148
1147
|
}, null, -1)
|
|
1149
1148
|
])])) : _("", !0)
|
|
1150
1149
|
], 2)
|
|
1151
|
-
], 40,
|
|
1150
|
+
], 40, To))), 128))
|
|
1152
1151
|
], 512));
|
|
1153
1152
|
}
|
|
1154
|
-
}), Ve = ({ isTouched: e, errors: t }) => !!(e && t),
|
|
1153
|
+
}), Ve = ({ 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": Ve(t) }], jo = { key: 0 }, Z = /* @__PURE__ */ k({
|
|
1155
1154
|
__name: "ControlWrapper",
|
|
1156
1155
|
props: K,
|
|
1157
1156
|
setup(e) {
|
|
1158
|
-
const t = e, o =
|
|
1157
|
+
const t = e, o = h(() => !qo(
|
|
1159
1158
|
t.visible,
|
|
1160
1159
|
t.description,
|
|
1161
1160
|
t.isFocused,
|
|
1162
1161
|
!0
|
|
1163
|
-
)), n =
|
|
1162
|
+
)), n = h(() => t.required), l = h(() => Ve(t)), a = h(() => ae(t.styles));
|
|
1164
1163
|
return (c, d) => (r(), f("fieldset", {
|
|
1165
|
-
class:
|
|
1164
|
+
class: $(["fieldset", [c.width, a.value.control.wrapper]])
|
|
1166
1165
|
}, [
|
|
1167
1166
|
u("legend", {
|
|
1168
|
-
class:
|
|
1167
|
+
class: $(a.value.control.label)
|
|
1169
1168
|
}, [
|
|
1170
1169
|
c.hideLabel ? _("", !0) : (r(), f(L, { key: 0 }, [
|
|
1171
|
-
u("span", null,
|
|
1172
|
-
n.value ? (r(), f("span",
|
|
1170
|
+
u("span", null, y(c.label), 1),
|
|
1171
|
+
n.value ? (r(), f("span", jo, "*")) : _("", !0)
|
|
1173
1172
|
], 64)),
|
|
1174
1173
|
d[0] || (d[0] = E(" ", -1))
|
|
1175
1174
|
], 2),
|
|
1176
1175
|
M(c.$slots, "default"),
|
|
1177
1176
|
u("p", {
|
|
1178
|
-
class:
|
|
1179
|
-
},
|
|
1177
|
+
class: $(["fieldset-label h-4", { "text-error": l.value }])
|
|
1178
|
+
}, y(l.value ? c.errors : o.value ? c.description : null), 3)
|
|
1180
1179
|
], 2));
|
|
1181
1180
|
}
|
|
1182
|
-
}),
|
|
1181
|
+
}), 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 = {
|
|
1183
1182
|
key: 0,
|
|
1184
1183
|
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1185
1184
|
}, he = /* @__PURE__ */ k({
|
|
1186
1185
|
__name: "SelectWrapper",
|
|
1187
1186
|
props: Be,
|
|
1188
|
-
emits:
|
|
1187
|
+
emits: Io,
|
|
1189
1188
|
setup(e, { emit: t }) {
|
|
1190
1189
|
const o = e, n = x(), l = x(), a = t, c = () => {
|
|
1191
1190
|
d(), a("clear");
|
|
@@ -1200,11 +1199,11 @@ const zo = /* @__PURE__ */ k({
|
|
|
1200
1199
|
}, i = (s) => {
|
|
1201
1200
|
n.value && !n.value.contains(s.target) && d();
|
|
1202
1201
|
};
|
|
1203
|
-
return
|
|
1202
|
+
return $e(() => {
|
|
1204
1203
|
document.addEventListener("click", i);
|
|
1205
1204
|
}), _e(() => {
|
|
1206
1205
|
document.removeEventListener("click", i);
|
|
1207
|
-
}), (s,
|
|
1206
|
+
}), (s, b) => (r(), f("div", {
|
|
1208
1207
|
ref_key: "selectWrapperRef",
|
|
1209
1208
|
ref: n,
|
|
1210
1209
|
"aria-label": s.id,
|
|
@@ -1212,16 +1211,16 @@ const zo = /* @__PURE__ */ k({
|
|
|
1212
1211
|
}, [
|
|
1213
1212
|
V(Z, ee(te(o)), {
|
|
1214
1213
|
default: S(() => [
|
|
1215
|
-
u("div",
|
|
1214
|
+
u("div", Ko, [
|
|
1216
1215
|
u("div", {
|
|
1217
1216
|
class: "relative w-full",
|
|
1218
1217
|
onKeydown: p
|
|
1219
1218
|
}, [
|
|
1220
|
-
u("div",
|
|
1219
|
+
u("div", Uo, [
|
|
1221
1220
|
M(s.$slots, "default")
|
|
1222
1221
|
]),
|
|
1223
|
-
u("div",
|
|
1224
|
-
s.isLoading && !s.label ? (r(), f("span",
|
|
1222
|
+
u("div", Ho, [
|
|
1223
|
+
s.isLoading && !s.label ? (r(), f("span", Wo)) : _("", !0),
|
|
1225
1224
|
s.query && !s.isLoading ? (r(), f("button", {
|
|
1226
1225
|
key: 1,
|
|
1227
1226
|
type: "button",
|
|
@@ -1229,7 +1228,7 @@ const zo = /* @__PURE__ */ k({
|
|
|
1229
1228
|
tabindex: "-1",
|
|
1230
1229
|
"aria-label": "Clear",
|
|
1231
1230
|
onMousedown: le(c, ["prevent"])
|
|
1232
|
-
}, [...
|
|
1231
|
+
}, [...b[2] || (b[2] = [
|
|
1233
1232
|
u("svg", {
|
|
1234
1233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1235
1234
|
class: "h-3.5 w-3.5",
|
|
@@ -1247,12 +1246,12 @@ const zo = /* @__PURE__ */ k({
|
|
|
1247
1246
|
])], 32)) : _("", !0),
|
|
1248
1247
|
(r(), f("svg", {
|
|
1249
1248
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1250
|
-
class:
|
|
1249
|
+
class: $(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": s.isOpen }]),
|
|
1251
1250
|
fill: "none",
|
|
1252
1251
|
viewBox: "0 0 24 24",
|
|
1253
1252
|
stroke: "currentColor",
|
|
1254
1253
|
"stroke-width": "2"
|
|
1255
|
-
}, [...
|
|
1254
|
+
}, [...b[3] || (b[3] = [
|
|
1256
1255
|
u("path", {
|
|
1257
1256
|
"stroke-linecap": "round",
|
|
1258
1257
|
"stroke-linejoin": "round",
|
|
@@ -1260,7 +1259,7 @@ const zo = /* @__PURE__ */ k({
|
|
|
1260
1259
|
}, null, -1)
|
|
1261
1260
|
])], 2))
|
|
1262
1261
|
]),
|
|
1263
|
-
V(
|
|
1262
|
+
V(Te, {
|
|
1264
1263
|
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1265
1264
|
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1266
1265
|
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
@@ -1269,7 +1268,7 @@ const zo = /* @__PURE__ */ k({
|
|
|
1269
1268
|
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1270
1269
|
}, {
|
|
1271
1270
|
default: S(() => [
|
|
1272
|
-
s.isOpen ? (r(), w(
|
|
1271
|
+
s.isOpen ? (r(), w(No, {
|
|
1273
1272
|
key: 0,
|
|
1274
1273
|
ref_key: "listResultsRef",
|
|
1275
1274
|
ref: l,
|
|
@@ -1277,7 +1276,7 @@ const zo = /* @__PURE__ */ k({
|
|
|
1277
1276
|
options: s.options,
|
|
1278
1277
|
"is-loading": s.isLoading,
|
|
1279
1278
|
"is-active": s.isActive,
|
|
1280
|
-
onSelect:
|
|
1279
|
+
onSelect: b[0] || (b[0] = (m) => a("select", m))
|
|
1281
1280
|
}, null, 8, ["query", "options", "is-loading", "is-active"])) : _("", !0)
|
|
1282
1281
|
]),
|
|
1283
1282
|
_: 1
|
|
@@ -1290,13 +1289,13 @@ const zo = /* @__PURE__ */ k({
|
|
|
1290
1289
|
size: "lg",
|
|
1291
1290
|
tooltip: "Create new",
|
|
1292
1291
|
"aria-label": "create",
|
|
1293
|
-
onClick:
|
|
1292
|
+
onClick: b[1] || (b[1] = (m) => a("create"))
|
|
1294
1293
|
})) : _("", !0)
|
|
1295
1294
|
])
|
|
1296
1295
|
]),
|
|
1297
1296
|
_: 3
|
|
1298
1297
|
}, 16)
|
|
1299
|
-
], 8,
|
|
1298
|
+
], 8, Fo));
|
|
1300
1299
|
}
|
|
1301
1300
|
}), ue = (e, t) => {
|
|
1302
1301
|
if (e)
|
|
@@ -1304,27 +1303,27 @@ const zo = /* @__PURE__ */ k({
|
|
|
1304
1303
|
}, ie = (e, t) => {
|
|
1305
1304
|
if (e)
|
|
1306
1305
|
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1307
|
-
},
|
|
1306
|
+
}, Go = (e) => {
|
|
1308
1307
|
const t = x([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
|
|
1309
|
-
const
|
|
1310
|
-
o.clear(), n.clear(), s?.forEach((
|
|
1311
|
-
const
|
|
1312
|
-
value: ie(
|
|
1313
|
-
label: ue(
|
|
1308
|
+
const b = [];
|
|
1309
|
+
o.clear(), n.clear(), s?.forEach((m) => {
|
|
1310
|
+
const v = {
|
|
1311
|
+
value: ie(m, e),
|
|
1312
|
+
label: ue(m, e)
|
|
1314
1313
|
};
|
|
1315
|
-
o.set(
|
|
1316
|
-
}), t.value =
|
|
1314
|
+
o.set(v.value, m), b.push(v);
|
|
1315
|
+
}), t.value = b;
|
|
1317
1316
|
}, a = (s) => o.get(s.value);
|
|
1318
1317
|
return {
|
|
1319
1318
|
options: t,
|
|
1320
1319
|
setOptions: l,
|
|
1321
1320
|
getOriginal: a,
|
|
1322
|
-
getLabels: (...s) => s.map((
|
|
1323
|
-
getValues: (...s) => s.map((
|
|
1321
|
+
getLabels: (...s) => s.map((b) => ue(b, e)),
|
|
1322
|
+
getValues: (...s) => s.map((b) => ie(b, e)),
|
|
1324
1323
|
getOption: (s) => n.get(ie(s, e)),
|
|
1325
1324
|
getOriginals: (...s) => s.map(a).filter(Boolean)
|
|
1326
1325
|
};
|
|
1327
|
-
}, ye = (e) =>
|
|
1326
|
+
}, ye = (e) => Go(e), Xo = ["aria-label"], Bn = /* @__PURE__ */ k({
|
|
1328
1327
|
__name: "SelectComponent",
|
|
1329
1328
|
props: /* @__PURE__ */ I(ve, {
|
|
1330
1329
|
modelValue: {},
|
|
@@ -1342,41 +1341,41 @@ const zo = /* @__PURE__ */ k({
|
|
|
1342
1341
|
);
|
|
1343
1342
|
const p = (A) => {
|
|
1344
1343
|
l("change", A);
|
|
1345
|
-
}, i =
|
|
1344
|
+
}, i = h(
|
|
1346
1345
|
() => a.value ? c.getLabels(a.value)[0] : ""
|
|
1347
|
-
), s =
|
|
1346
|
+
), s = h(() => ae(n.styles)), b = h(
|
|
1348
1347
|
() => U(s.value.control.select, n)
|
|
1349
|
-
),
|
|
1350
|
-
const
|
|
1351
|
-
a.value =
|
|
1352
|
-
},
|
|
1348
|
+
), m = (A) => {
|
|
1349
|
+
const C = c.getOriginal(A);
|
|
1350
|
+
a.value = C, p(C);
|
|
1351
|
+
}, v = () => {
|
|
1353
1352
|
o.value = !1, a.value = null, p(void 0);
|
|
1354
1353
|
}, D = (A) => c.getValues(a.value)?.[0] === A.value, H = () => {
|
|
1355
1354
|
o.value = !1;
|
|
1356
1355
|
};
|
|
1357
|
-
return (A,
|
|
1356
|
+
return (A, C) => (r(), w(he, B(n, {
|
|
1358
1357
|
options: g(d),
|
|
1359
1358
|
disabled: !A.enabled,
|
|
1360
1359
|
"is-open": o.value,
|
|
1361
1360
|
query: i.value,
|
|
1362
1361
|
"is-active": D,
|
|
1363
1362
|
onClose: H,
|
|
1364
|
-
onSelect:
|
|
1365
|
-
onClear:
|
|
1363
|
+
onSelect: m,
|
|
1364
|
+
onClear: v
|
|
1366
1365
|
}), {
|
|
1367
1366
|
default: S(() => [
|
|
1368
1367
|
u("button", {
|
|
1369
1368
|
type: "button",
|
|
1370
|
-
class:
|
|
1369
|
+
class: $(["truncate block text-left", [b.value, A.width]]),
|
|
1371
1370
|
"aria-label": A.id,
|
|
1372
1371
|
role: "combobox",
|
|
1373
|
-
onClick:
|
|
1374
|
-
},
|
|
1372
|
+
onClick: C[0] || (C[0] = (T) => o.value = !0)
|
|
1373
|
+
}, y(i.value ?? "Select value"), 11, Xo)
|
|
1375
1374
|
]),
|
|
1376
1375
|
_: 1
|
|
1377
1376
|
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1378
1377
|
}
|
|
1379
|
-
}),
|
|
1378
|
+
}), Zo = {
|
|
1380
1379
|
...ve,
|
|
1381
1380
|
...ge,
|
|
1382
1381
|
/** v-model binding */
|
|
@@ -1409,7 +1408,7 @@ const zo = /* @__PURE__ */ k({
|
|
|
1409
1408
|
default: !1
|
|
1410
1409
|
}
|
|
1411
1410
|
};
|
|
1412
|
-
function
|
|
1411
|
+
function Jo(e) {
|
|
1413
1412
|
const t = x([]), o = x(!1);
|
|
1414
1413
|
function n(a) {
|
|
1415
1414
|
if (!e.options) {
|
|
@@ -1426,7 +1425,7 @@ function Zo(e) {
|
|
|
1426
1425
|
}
|
|
1427
1426
|
return { results: t, isLoading: o, search: n, clear: l };
|
|
1428
1427
|
}
|
|
1429
|
-
function
|
|
1428
|
+
function Qo(e) {
|
|
1430
1429
|
const t = x([]), o = x(!1);
|
|
1431
1430
|
let n = null, l = null;
|
|
1432
1431
|
async function a(p) {
|
|
@@ -1450,8 +1449,8 @@ function Jo(e) {
|
|
|
1450
1449
|
}
|
|
1451
1450
|
return { results: t, isLoading: o, search: c, clear: d };
|
|
1452
1451
|
}
|
|
1453
|
-
function
|
|
1454
|
-
const t = e.fetchOptions ?
|
|
1452
|
+
function Yo(e) {
|
|
1453
|
+
const t = e.fetchOptions ? Qo(e) : Jo(e);
|
|
1455
1454
|
function o(n) {
|
|
1456
1455
|
t.search(n);
|
|
1457
1456
|
}
|
|
@@ -1462,16 +1461,16 @@ function Qo(e) {
|
|
|
1462
1461
|
clear: t.clear
|
|
1463
1462
|
};
|
|
1464
1463
|
}
|
|
1465
|
-
const
|
|
1464
|
+
const es = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], Vn = /* @__PURE__ */ k({
|
|
1466
1465
|
__name: "AutoComplete",
|
|
1467
|
-
props:
|
|
1466
|
+
props: Zo,
|
|
1468
1467
|
emits: ["update:modelValue", "change", "clear", "focus", "blur"],
|
|
1469
1468
|
setup(e, { emit: t }) {
|
|
1470
|
-
const o = e, n = t, l = x(null), a = x(""), c = x(!1), d =
|
|
1469
|
+
const o = e, n = t, l = x(null), a = x(""), c = x(!1), d = Yo(o), { isLoading: p, triggerSearch: i, clear: s } = d, b = ye(o), { options: m } = b;
|
|
1471
1470
|
q(
|
|
1472
1471
|
() => d.results.value,
|
|
1473
1472
|
() => {
|
|
1474
|
-
|
|
1473
|
+
b.setOptions(d.results.value);
|
|
1475
1474
|
},
|
|
1476
1475
|
{ immediate: !0 }
|
|
1477
1476
|
), q(
|
|
@@ -1486,7 +1485,7 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1486
1485
|
},
|
|
1487
1486
|
{ immediate: !0 }
|
|
1488
1487
|
);
|
|
1489
|
-
const
|
|
1488
|
+
const v = (O) => {
|
|
1490
1489
|
a.value = O.target.value, o.freeText ? n("update:modelValue", a.value) : n("update:modelValue", ""), i(a.value), c.value = !0;
|
|
1491
1490
|
}, D = () => {
|
|
1492
1491
|
i(a.value), c.value = !0;
|
|
@@ -1497,23 +1496,23 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1497
1496
|
}, 150);
|
|
1498
1497
|
}
|
|
1499
1498
|
const A = (O) => {
|
|
1500
|
-
const G =
|
|
1499
|
+
const G = b.getOriginal(O);
|
|
1501
1500
|
a.value = O.label, c.value = !1, n("update:modelValue", G), n("change", G);
|
|
1502
|
-
},
|
|
1501
|
+
}, C = () => {
|
|
1503
1502
|
a.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), xe(() => l.value?.focus());
|
|
1504
|
-
},
|
|
1503
|
+
}, T = () => {
|
|
1505
1504
|
c.value = !1;
|
|
1506
|
-
}, W =
|
|
1505
|
+
}, W = h(() => ae(o.styles)), Ae = h(
|
|
1507
1506
|
() => U(W.value.control.select, o)
|
|
1508
1507
|
);
|
|
1509
1508
|
return (O, G) => (r(), w(he, B(o, {
|
|
1510
|
-
options: g(
|
|
1509
|
+
options: g(m),
|
|
1511
1510
|
"is-loading": g(p),
|
|
1512
1511
|
"is-open": c.value,
|
|
1513
1512
|
query: a.value,
|
|
1514
|
-
onClose:
|
|
1513
|
+
onClose: T,
|
|
1515
1514
|
onSelect: A,
|
|
1516
|
-
onClear:
|
|
1515
|
+
onClear: C
|
|
1517
1516
|
}), {
|
|
1518
1517
|
default: S(() => [
|
|
1519
1518
|
u("input", {
|
|
@@ -1528,19 +1527,19 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1528
1527
|
autocomplete: "off",
|
|
1529
1528
|
autocorrect: "off",
|
|
1530
1529
|
spellcheck: "false",
|
|
1531
|
-
class:
|
|
1530
|
+
class: $([Ae.value, "w-full"]),
|
|
1532
1531
|
value: a.value,
|
|
1533
1532
|
placeholder: O.placeholder,
|
|
1534
1533
|
disabled: !O.enabled,
|
|
1535
|
-
onInput:
|
|
1534
|
+
onInput: v,
|
|
1536
1535
|
onFocus: D,
|
|
1537
1536
|
onBlur: H
|
|
1538
|
-
}, null, 42,
|
|
1537
|
+
}, null, 42, es)
|
|
1539
1538
|
]),
|
|
1540
1539
|
_: 1
|
|
1541
1540
|
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1542
1541
|
}
|
|
1543
|
-
}),
|
|
1542
|
+
}), ts = ["aria-label"], An = /* @__PURE__ */ k({
|
|
1544
1543
|
__name: "MultiSelect",
|
|
1545
1544
|
props: /* @__PURE__ */ I(Be, {
|
|
1546
1545
|
modelValue: {},
|
|
@@ -1548,8 +1547,8 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1548
1547
|
}),
|
|
1549
1548
|
emits: /* @__PURE__ */ I(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1550
1549
|
setup(e, { emit: t }) {
|
|
1551
|
-
const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = (
|
|
1552
|
-
l("change",
|
|
1550
|
+
const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = (C) => {
|
|
1551
|
+
l("change", C);
|
|
1553
1552
|
}, d = ye(n), { options: p } = d;
|
|
1554
1553
|
q(
|
|
1555
1554
|
() => n.options,
|
|
@@ -1558,51 +1557,51 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1558
1557
|
},
|
|
1559
1558
|
{ immediate: !0 }
|
|
1560
1559
|
);
|
|
1561
|
-
const i =
|
|
1560
|
+
const i = h(
|
|
1562
1561
|
() => a.value ? d.getLabels(...a.value).join(", ") : void 0
|
|
1563
|
-
), s =
|
|
1562
|
+
), s = h(
|
|
1564
1563
|
() => d.getValues(...a.value ?? [])
|
|
1565
|
-
),
|
|
1566
|
-
let
|
|
1567
|
-
if (D(
|
|
1568
|
-
|
|
1569
|
-
(W) => d.getOption(W) !==
|
|
1564
|
+
), b = (C) => {
|
|
1565
|
+
let T = a.value ?? [];
|
|
1566
|
+
if (D(C))
|
|
1567
|
+
T = T.filter(
|
|
1568
|
+
(W) => d.getOption(W) !== C.value
|
|
1570
1569
|
);
|
|
1571
1570
|
else {
|
|
1572
|
-
const W = d.getOriginal(
|
|
1573
|
-
|
|
1571
|
+
const W = d.getOriginal(C);
|
|
1572
|
+
T.push(W);
|
|
1574
1573
|
}
|
|
1575
|
-
a.value =
|
|
1576
|
-
},
|
|
1574
|
+
a.value = T, c(T);
|
|
1575
|
+
}, m = () => {
|
|
1577
1576
|
o.value = !1, a.value = [], c([]);
|
|
1578
|
-
},
|
|
1577
|
+
}, v = () => {
|
|
1579
1578
|
o.value = !1;
|
|
1580
|
-
}, D = (
|
|
1579
|
+
}, D = (C) => s.value?.includes(C.value) ?? !1, H = h(() => ae(n.styles)), A = h(
|
|
1581
1580
|
() => U(H.value.control.select, n)
|
|
1582
1581
|
);
|
|
1583
|
-
return (
|
|
1582
|
+
return (C, T) => (r(), w(he, B(n, {
|
|
1584
1583
|
options: g(p),
|
|
1585
1584
|
"is-open": o.value,
|
|
1586
|
-
disabled:
|
|
1585
|
+
disabled: !C.enabled,
|
|
1587
1586
|
query: i.value,
|
|
1588
1587
|
"is-active": D,
|
|
1589
|
-
onClose:
|
|
1590
|
-
onSelect:
|
|
1591
|
-
onClear:
|
|
1588
|
+
onClose: v,
|
|
1589
|
+
onSelect: b,
|
|
1590
|
+
onClear: m
|
|
1592
1591
|
}), {
|
|
1593
1592
|
default: S(() => [
|
|
1594
1593
|
u("button", {
|
|
1595
1594
|
type: "button",
|
|
1596
|
-
class:
|
|
1597
|
-
"aria-label":
|
|
1595
|
+
class: $(["truncate block text-left", [A.value, C.width]]),
|
|
1596
|
+
"aria-label": C.id,
|
|
1598
1597
|
role: "combobox",
|
|
1599
|
-
onClick:
|
|
1600
|
-
},
|
|
1598
|
+
onClick: T[0] || (T[0] = (W) => o.value = !0)
|
|
1599
|
+
}, y(i.value ?? "Select value"), 11, ts)
|
|
1601
1600
|
]),
|
|
1602
1601
|
_: 1
|
|
1603
1602
|
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1604
1603
|
}
|
|
1605
|
-
}),
|
|
1604
|
+
}), os = ["change"], ss = {
|
|
1606
1605
|
...K,
|
|
1607
1606
|
width: { type: String, default: "w-48" },
|
|
1608
1607
|
minHeight: { type: String, default: "min-h-96" },
|
|
@@ -1621,13 +1620,13 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1621
1620
|
}
|
|
1622
1621
|
]
|
|
1623
1622
|
}
|
|
1624
|
-
},
|
|
1623
|
+
}, 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" }, On = /* @__PURE__ */ k({
|
|
1625
1624
|
__name: "Markdown",
|
|
1626
|
-
props: /* @__PURE__ */ I(
|
|
1625
|
+
props: /* @__PURE__ */ I(ss, {
|
|
1627
1626
|
modelValue: {},
|
|
1628
1627
|
modelModifiers: {}
|
|
1629
1628
|
}),
|
|
1630
|
-
emits: /* @__PURE__ */ I(
|
|
1629
|
+
emits: /* @__PURE__ */ I(os, ["update:modelValue"]),
|
|
1631
1630
|
setup(e, { emit: t }) {
|
|
1632
1631
|
const o = e, n = t, l = F(e, "modelValue"), a = rt({
|
|
1633
1632
|
content: l.value ?? "",
|
|
@@ -1653,77 +1652,77 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1653
1652
|
n("change", c.storage.markdown.getMarkdown());
|
|
1654
1653
|
}
|
|
1655
1654
|
});
|
|
1656
|
-
return
|
|
1655
|
+
return Re(() => {
|
|
1657
1656
|
a.value?.destroy();
|
|
1658
1657
|
}), (c, d) => (r(), w(Z, ee(te(o)), {
|
|
1659
1658
|
default: S(() => [
|
|
1660
1659
|
u("div", {
|
|
1661
|
-
class:
|
|
1660
|
+
class: $([[c.minHeight], "card bg-base-100 border border-base-300 w-full"]),
|
|
1662
1661
|
"aria-label": c.id,
|
|
1663
1662
|
role: "textbox"
|
|
1664
1663
|
}, [
|
|
1665
|
-
u("div",
|
|
1664
|
+
u("div", ls, [
|
|
1666
1665
|
(r(!0), f(L, null, P(c.actions, (p) => (r(), f("button", {
|
|
1667
1666
|
key: p.name,
|
|
1668
1667
|
tabindex: "-1",
|
|
1669
1668
|
type: "button",
|
|
1670
|
-
class:
|
|
1669
|
+
class: $(["btn btn-sm btn-ghost", { "btn-active": g(a)?.isActive(p.name) }]),
|
|
1671
1670
|
title: p.label,
|
|
1672
1671
|
onClick: (i) => p.action(g(a))
|
|
1673
1672
|
}, [
|
|
1674
1673
|
u("span", {
|
|
1675
1674
|
innerHTML: p.label
|
|
1676
|
-
}, null, 8,
|
|
1677
|
-
], 10,
|
|
1675
|
+
}, null, 8, rs)
|
|
1676
|
+
], 10, as))), 128))
|
|
1678
1677
|
]),
|
|
1679
|
-
u("div",
|
|
1678
|
+
u("div", is, [
|
|
1680
1679
|
V(g(it), {
|
|
1681
1680
|
editor: g(a),
|
|
1682
1681
|
class: "prose prose-sm max-w-none h-full"
|
|
1683
1682
|
}, null, 8, ["editor"])
|
|
1684
1683
|
])
|
|
1685
|
-
], 10,
|
|
1684
|
+
], 10, ns)
|
|
1686
1685
|
]),
|
|
1687
1686
|
_: 1
|
|
1688
1687
|
}, 16));
|
|
1689
1688
|
}
|
|
1690
|
-
}),
|
|
1689
|
+
}), us = {
|
|
1691
1690
|
...K
|
|
1692
|
-
},
|
|
1691
|
+
}, cs = ["change", "focus", "blur"], ds = { class: "flex items-center justify-center h-full" }, ps = { class: "fieldset-label" }, fs = ["aria-label", "disabled"], bs = { class: "font-bold text-gray-500 text-sm" }, In = /* @__PURE__ */ k({
|
|
1693
1692
|
__name: "Checkbox",
|
|
1694
|
-
props: /* @__PURE__ */ I(
|
|
1693
|
+
props: /* @__PURE__ */ I(us, {
|
|
1695
1694
|
modelValue: {},
|
|
1696
1695
|
modelModifiers: {}
|
|
1697
1696
|
}),
|
|
1698
|
-
emits: /* @__PURE__ */ I(
|
|
1697
|
+
emits: /* @__PURE__ */ I(cs, ["update:modelValue"]),
|
|
1699
1698
|
setup(e, { emit: t }) {
|
|
1700
1699
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1701
|
-
n("change",
|
|
1700
|
+
n("change", l.value);
|
|
1702
1701
|
}, c = (i) => {
|
|
1703
1702
|
n("focus", i);
|
|
1704
1703
|
}, d = (i) => {
|
|
1705
1704
|
n("blur", i);
|
|
1706
|
-
}, p =
|
|
1705
|
+
}, p = h(
|
|
1707
1706
|
() => U(o.styles.control.checkbox, o)
|
|
1708
1707
|
);
|
|
1709
|
-
return (i, s) => (r(), f("div",
|
|
1708
|
+
return (i, s) => (r(), f("div", ds, [
|
|
1710
1709
|
V(Z, B(o, { "hide-label": !0 }), {
|
|
1711
1710
|
default: S(() => [
|
|
1712
|
-
u("label",
|
|
1711
|
+
u("label", ps, [
|
|
1713
1712
|
Y(u("input", {
|
|
1714
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1713
|
+
"onUpdate:modelValue": s[0] || (s[0] = (b) => l.value = b),
|
|
1715
1714
|
"aria-label": i.id,
|
|
1716
1715
|
role: "checkbox",
|
|
1717
1716
|
type: "checkbox",
|
|
1718
|
-
class:
|
|
1717
|
+
class: $(p.value),
|
|
1719
1718
|
disabled: !i.enabled,
|
|
1720
1719
|
onChange: a,
|
|
1721
1720
|
onFocus: c,
|
|
1722
1721
|
onBlur: d
|
|
1723
|
-
}, null, 42,
|
|
1724
|
-
[
|
|
1722
|
+
}, null, 42, fs), [
|
|
1723
|
+
[Ce, l.value]
|
|
1725
1724
|
]),
|
|
1726
|
-
u("span",
|
|
1725
|
+
u("span", bs, y(i.label), 1)
|
|
1727
1726
|
])
|
|
1728
1727
|
]),
|
|
1729
1728
|
_: 1
|
|
@@ -1733,13 +1732,13 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1733
1732
|
}), ms = {
|
|
1734
1733
|
...K,
|
|
1735
1734
|
type: { type: String, default: "text" }
|
|
1736
|
-
},
|
|
1735
|
+
}, gs = ["change", "focus", "blur"], vs = ["aria-label", "type", "disabled", "autofocus", "placeholder"], Dn = /* @__PURE__ */ k({
|
|
1737
1736
|
__name: "Input",
|
|
1738
1737
|
props: /* @__PURE__ */ I(ms, {
|
|
1739
1738
|
modelValue: {},
|
|
1740
1739
|
modelModifiers: {}
|
|
1741
1740
|
}),
|
|
1742
|
-
emits: /* @__PURE__ */ I(
|
|
1741
|
+
emits: /* @__PURE__ */ I(gs, ["update:modelValue"]),
|
|
1743
1742
|
setup(e, { emit: t }) {
|
|
1744
1743
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1745
1744
|
n("change", i);
|
|
@@ -1747,40 +1746,40 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1747
1746
|
n("focus", i);
|
|
1748
1747
|
}, d = (i) => {
|
|
1749
1748
|
n("blur", i);
|
|
1750
|
-
}, p =
|
|
1749
|
+
}, p = h(
|
|
1751
1750
|
() => U(o.styles.control.input, o)
|
|
1752
1751
|
);
|
|
1753
1752
|
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1754
1753
|
default: S(() => [
|
|
1755
1754
|
Y(u("input", {
|
|
1756
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1755
|
+
"onUpdate:modelValue": s[0] || (s[0] = (b) => l.value = b),
|
|
1757
1756
|
"aria-label": i.id,
|
|
1758
1757
|
autocomplete: "off",
|
|
1759
1758
|
type: i.type,
|
|
1760
|
-
class:
|
|
1759
|
+
class: $(["w-full", p.value]),
|
|
1761
1760
|
disabled: !i.enabled,
|
|
1762
1761
|
autofocus: i.isFocused,
|
|
1763
1762
|
placeholder: i.placeholder,
|
|
1764
1763
|
onChange: a,
|
|
1765
1764
|
onFocus: c,
|
|
1766
1765
|
onBlur: d
|
|
1767
|
-
}, null, 42,
|
|
1766
|
+
}, null, 42, vs), [
|
|
1768
1767
|
[Ee, l.value]
|
|
1769
1768
|
])
|
|
1770
1769
|
]),
|
|
1771
1770
|
_: 1
|
|
1772
1771
|
}, 16));
|
|
1773
1772
|
}
|
|
1774
|
-
}),
|
|
1773
|
+
}), hs = {
|
|
1775
1774
|
...K,
|
|
1776
1775
|
steps: { type: Number, default: 1 }
|
|
1777
|
-
},
|
|
1776
|
+
}, ys = ["change", "focus", "blur"], ws = ["aria-label", "disabled", "step", "autofocus", "placeholder"], Tn = /* @__PURE__ */ k({
|
|
1778
1777
|
__name: "InputNumber",
|
|
1779
|
-
props: /* @__PURE__ */ I(
|
|
1778
|
+
props: /* @__PURE__ */ I(hs, {
|
|
1780
1779
|
modelValue: {},
|
|
1781
1780
|
modelModifiers: {}
|
|
1782
1781
|
}),
|
|
1783
|
-
emits: /* @__PURE__ */ I(
|
|
1782
|
+
emits: /* @__PURE__ */ I(ys, ["update:modelValue"]),
|
|
1784
1783
|
setup(e, { emit: t }) {
|
|
1785
1784
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1786
1785
|
n("change", i);
|
|
@@ -1788,17 +1787,17 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1788
1787
|
n("focus", i);
|
|
1789
1788
|
}, d = (i) => {
|
|
1790
1789
|
n("blur", i);
|
|
1791
|
-
}, p =
|
|
1790
|
+
}, p = h(
|
|
1792
1791
|
() => U(o.styles.control.input, o)
|
|
1793
1792
|
);
|
|
1794
1793
|
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1795
1794
|
default: S(() => [
|
|
1796
1795
|
Y(u("input", {
|
|
1797
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1796
|
+
"onUpdate:modelValue": s[0] || (s[0] = (b) => l.value = b),
|
|
1798
1797
|
autocomplete: "off",
|
|
1799
1798
|
"aria-label": i.id,
|
|
1800
1799
|
type: "number",
|
|
1801
|
-
class:
|
|
1800
|
+
class: $(["w-full", [p.value]]),
|
|
1802
1801
|
disabled: !i.enabled,
|
|
1803
1802
|
step: i.steps,
|
|
1804
1803
|
autofocus: i.isFocused,
|
|
@@ -1806,23 +1805,23 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1806
1805
|
onChange: a,
|
|
1807
1806
|
onFocus: c,
|
|
1808
1807
|
onBlur: d
|
|
1809
|
-
}, null, 42,
|
|
1808
|
+
}, null, 42, ws), [
|
|
1810
1809
|
[Le, l.value]
|
|
1811
1810
|
])
|
|
1812
1811
|
]),
|
|
1813
1812
|
_: 1
|
|
1814
1813
|
}, 16));
|
|
1815
1814
|
}
|
|
1816
|
-
}),
|
|
1815
|
+
}), ks = {
|
|
1817
1816
|
...K,
|
|
1818
1817
|
rows: { type: Number, default: 4 }
|
|
1819
|
-
},
|
|
1818
|
+
}, _s = ["change", "focus", "blur"], $s = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], Rn = /* @__PURE__ */ k({
|
|
1820
1819
|
__name: "Textarea",
|
|
1821
|
-
props: /* @__PURE__ */ I(
|
|
1820
|
+
props: /* @__PURE__ */ I(ks, {
|
|
1822
1821
|
modelValue: {},
|
|
1823
1822
|
modelModifiers: {}
|
|
1824
1823
|
}),
|
|
1825
|
-
emits: /* @__PURE__ */ I(
|
|
1824
|
+
emits: /* @__PURE__ */ I(_s, ["update:modelValue"]),
|
|
1826
1825
|
setup(e, { emit: t }) {
|
|
1827
1826
|
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1828
1827
|
n("change", i);
|
|
@@ -1830,17 +1829,17 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1830
1829
|
n("focus", i);
|
|
1831
1830
|
}, d = (i) => {
|
|
1832
1831
|
n("blur", i);
|
|
1833
|
-
}, p =
|
|
1832
|
+
}, p = h(
|
|
1834
1833
|
() => U(o.styles.control.textarea, o)
|
|
1835
1834
|
);
|
|
1836
1835
|
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1837
1836
|
default: S(() => [
|
|
1838
1837
|
Y(u("textarea", {
|
|
1839
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1838
|
+
"onUpdate:modelValue": s[0] || (s[0] = (b) => l.value = b),
|
|
1840
1839
|
autocomplete: "off",
|
|
1841
1840
|
type: "text",
|
|
1842
1841
|
"aria-label": i.id,
|
|
1843
|
-
class:
|
|
1842
|
+
class: $(["w-full", p.value]),
|
|
1844
1843
|
disabled: !i.enabled,
|
|
1845
1844
|
rows: i.rows,
|
|
1846
1845
|
autofocus: i.isFocused,
|
|
@@ -1848,7 +1847,7 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1848
1847
|
onChange: a,
|
|
1849
1848
|
onFocus: c,
|
|
1850
1849
|
onBlur: d
|
|
1851
|
-
}, null, 42,
|
|
1850
|
+
}, null, 42, $s), [
|
|
1852
1851
|
[Le, l.value]
|
|
1853
1852
|
])
|
|
1854
1853
|
]),
|
|
@@ -1860,25 +1859,25 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1860
1859
|
widthRight: { type: Number, default: 200 },
|
|
1861
1860
|
initialLeftOpen: { type: Boolean, default: !0 },
|
|
1862
1861
|
initialRightOpen: { type: Boolean, default: !0 }
|
|
1863
|
-
},
|
|
1862
|
+
}, xs = { class: "flex h-full overflow-hidden gap-2" }, Ls = {
|
|
1864
1863
|
key: 0,
|
|
1865
1864
|
id: "drawer-left",
|
|
1866
1865
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1867
|
-
},
|
|
1866
|
+
}, Ss = ["aria-expanded", "aria-label"], Ps = { class: "flex-1 overflow-y-auto bg-white" }, Ms = {
|
|
1868
1867
|
key: 1,
|
|
1869
1868
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1870
|
-
},
|
|
1869
|
+
}, Bs = ["aria-expanded", "aria-label"], En = /* @__PURE__ */ k({
|
|
1871
1870
|
__name: "drawer",
|
|
1872
1871
|
props: Cs,
|
|
1873
1872
|
setup(e) {
|
|
1874
|
-
const t = e, o = Se(), n =
|
|
1873
|
+
const t = e, o = Se(), n = h(() => !!o["left-drawer"]), l = h(() => !!o["right-drawer"]), a = x({
|
|
1875
1874
|
left: t.initialLeftOpen,
|
|
1876
1875
|
right: t.initialRightOpen
|
|
1877
1876
|
}), c = (d) => {
|
|
1878
1877
|
a.value[d] = !a.value[d];
|
|
1879
1878
|
};
|
|
1880
|
-
return (d, p) => (r(), f("main",
|
|
1881
|
-
n.value ? (r(), f("aside",
|
|
1879
|
+
return (d, p) => (r(), f("main", xs, [
|
|
1880
|
+
n.value ? (r(), f("aside", Ls, [
|
|
1882
1881
|
u("div", {
|
|
1883
1882
|
id: "drawer-left-panel",
|
|
1884
1883
|
style: X({ width: a.value.left ? d.widthLeft + "px" : "0px" }),
|
|
@@ -1900,14 +1899,14 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1900
1899
|
}, [
|
|
1901
1900
|
V(g(j), {
|
|
1902
1901
|
size: "lg",
|
|
1903
|
-
icon: a.value.left ? g(
|
|
1902
|
+
icon: a.value.left ? g(R).ChevronLeft : g(R).ChevronRight
|
|
1904
1903
|
}, null, 8, ["icon"])
|
|
1905
|
-
], 8,
|
|
1904
|
+
], 8, Ss)
|
|
1906
1905
|
])) : _("", !0),
|
|
1907
|
-
u("div",
|
|
1906
|
+
u("div", Ps, [
|
|
1908
1907
|
M(d.$slots, "default")
|
|
1909
1908
|
]),
|
|
1910
|
-
l.value ? (r(), f("aside",
|
|
1909
|
+
l.value ? (r(), f("aside", Ms, [
|
|
1911
1910
|
u("button", {
|
|
1912
1911
|
"aria-expanded": a.value.right,
|
|
1913
1912
|
"aria-controls": "drawer-right-panel",
|
|
@@ -1917,9 +1916,9 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1917
1916
|
}, [
|
|
1918
1917
|
V(g(j), {
|
|
1919
1918
|
size: "lg",
|
|
1920
|
-
icon: a.value.right ? g(
|
|
1919
|
+
icon: a.value.right ? g(R).ChevronRight : g(R).ChevronLeft
|
|
1921
1920
|
}, null, 8, ["icon"])
|
|
1922
|
-
], 8,
|
|
1921
|
+
], 8, Bs),
|
|
1923
1922
|
u("div", {
|
|
1924
1923
|
id: "drawer-right-panel",
|
|
1925
1924
|
style: X({ width: a.value.right ? d.widthRight + "px" : "0px" }),
|
|
@@ -1935,10 +1934,10 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1935
1934
|
])) : _("", !0)
|
|
1936
1935
|
]));
|
|
1937
1936
|
}
|
|
1938
|
-
}),
|
|
1937
|
+
}), Vs = { class: "ml-1" }, As = { class: "truncate flex-1 min-w-0 text-left" }, Os = {
|
|
1939
1938
|
key: 0,
|
|
1940
1939
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1941
|
-
},
|
|
1940
|
+
}, Is = /* @__PURE__ */ k({
|
|
1942
1941
|
__name: "TreeItem",
|
|
1943
1942
|
props: {
|
|
1944
1943
|
active: {},
|
|
@@ -1948,12 +1947,12 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1948
1947
|
},
|
|
1949
1948
|
emits: ["toggle", "select"],
|
|
1950
1949
|
setup(e, { emit: t }) {
|
|
1951
|
-
const o = e, n = t, l =
|
|
1950
|
+
const o = e, n = t, l = h(() => o.active === o.node.id);
|
|
1952
1951
|
return (a, c) => {
|
|
1953
1952
|
const d = ce("TreeItem", !0);
|
|
1954
|
-
return r(), f("li",
|
|
1953
|
+
return r(), f("li", Vs, [
|
|
1955
1954
|
u("div", {
|
|
1956
|
-
class:
|
|
1955
|
+
class: $([
|
|
1957
1956
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1958
1957
|
hover:bg-gray-100`,
|
|
1959
1958
|
l.value ? "text-primary" : ""
|
|
@@ -1976,13 +1975,13 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1976
1975
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1977
1976
|
onClick: c[1] || (c[1] = (p) => n("select", e.node))
|
|
1978
1977
|
}, [
|
|
1979
|
-
u("div",
|
|
1980
|
-
e.node.tag ? (r(), f("div",
|
|
1978
|
+
u("div", As, y(e.node.label), 1),
|
|
1979
|
+
e.node.tag ? (r(), f("div", Os, y(e.node.tag), 1)) : _("", !0)
|
|
1981
1980
|
])
|
|
1982
1981
|
], 2),
|
|
1983
1982
|
e.node.children && e.isExpanded(e.node.id) ? (r(), f("ul", {
|
|
1984
1983
|
key: 0,
|
|
1985
|
-
class:
|
|
1984
|
+
class: $([
|
|
1986
1985
|
"ml-4 border-l pl-2",
|
|
1987
1986
|
{ "border-gray-200": !l.value, "border-primary": l.value }
|
|
1988
1987
|
])
|
|
@@ -2000,7 +1999,7 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2000
1999
|
]);
|
|
2001
2000
|
};
|
|
2002
2001
|
}
|
|
2003
|
-
}),
|
|
2002
|
+
}), Ds = { class: "select-none text-sm" }, zn = /* @__PURE__ */ k({
|
|
2004
2003
|
__name: "TreeView",
|
|
2005
2004
|
props: {
|
|
2006
2005
|
data: {},
|
|
@@ -2018,8 +2017,8 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2018
2017
|
}, c = (p) => {
|
|
2019
2018
|
n("select", p), l.value.add(p.id);
|
|
2020
2019
|
}, d = (p) => l.value.has(p);
|
|
2021
|
-
return (p, i) => (r(), f("ul",
|
|
2022
|
-
(r(!0), f(L, null, P(o.data, (s) => (r(), w(
|
|
2020
|
+
return (p, i) => (r(), f("ul", Ds, [
|
|
2021
|
+
(r(!0), f(L, null, P(o.data, (s) => (r(), w(Is, {
|
|
2023
2022
|
key: s.id,
|
|
2024
2023
|
node: s,
|
|
2025
2024
|
expanded: l.value,
|
|
@@ -2030,18 +2029,18 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2030
2029
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
2031
2030
|
]));
|
|
2032
2031
|
}
|
|
2033
|
-
}),
|
|
2032
|
+
}), Ts = {
|
|
2034
2033
|
key: 0,
|
|
2035
2034
|
role: "status",
|
|
2036
2035
|
"aria-live": "polite",
|
|
2037
2036
|
class: "flex items-center justify-center h-20"
|
|
2038
|
-
},
|
|
2037
|
+
}, Nn = /* @__PURE__ */ k({
|
|
2039
2038
|
__name: "loading",
|
|
2040
2039
|
props: {
|
|
2041
2040
|
loading: { type: Boolean }
|
|
2042
2041
|
},
|
|
2043
2042
|
setup(e) {
|
|
2044
|
-
return (t, o) => e.loading ? (r(), f("div",
|
|
2043
|
+
return (t, o) => e.loading ? (r(), f("div", Ts, [...o[0] || (o[0] = [
|
|
2045
2044
|
u("span", {
|
|
2046
2045
|
"aria-hidden": "true",
|
|
2047
2046
|
class: "loading loading-bars loading-md text-primary"
|
|
@@ -2058,16 +2057,16 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2058
2057
|
type: Array,
|
|
2059
2058
|
default: () => []
|
|
2060
2059
|
}
|
|
2061
|
-
},
|
|
2060
|
+
}, Es = ["checked", "aria-label"], zs = { class: "collapse-title text-gray-500 text-xs font-medium" }, Ns = { class: "flex items-center justify-between" }, qs = {
|
|
2062
2061
|
key: 0,
|
|
2063
2062
|
class: "list bg-base-100"
|
|
2064
|
-
},
|
|
2063
|
+
}, js = /* @__PURE__ */ k({
|
|
2065
2064
|
__name: "Collapse",
|
|
2066
2065
|
props: Rs,
|
|
2067
2066
|
setup(e) {
|
|
2068
2067
|
const t = Se(), o = e, n = x(o.opened), l = x(o.opened || o.disabled);
|
|
2069
2068
|
return (a, c) => (r(), f("div", {
|
|
2070
|
-
class:
|
|
2069
|
+
class: $([
|
|
2071
2070
|
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
2072
2071
|
a.heightFull ? "h-full" : "",
|
|
2073
2072
|
a.disabled ? "collapse-open" : "",
|
|
@@ -2081,10 +2080,10 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2081
2080
|
tabindex: "-1",
|
|
2082
2081
|
"aria-label": "Toggle " + a.title,
|
|
2083
2082
|
onChange: c[0] || (c[0] = (d) => l.value = d.target.checked)
|
|
2084
|
-
}, null, 40,
|
|
2085
|
-
u("div",
|
|
2086
|
-
u("div",
|
|
2087
|
-
u("span", null,
|
|
2083
|
+
}, null, 40, Es)),
|
|
2084
|
+
u("div", zs, [
|
|
2085
|
+
u("div", Ns, [
|
|
2086
|
+
u("span", null, y(a.title), 1),
|
|
2088
2087
|
o.actions.length > 0 ? (r(), f("div", {
|
|
2089
2088
|
key: 0,
|
|
2090
2089
|
class: "relative z-10 flex gap-1",
|
|
@@ -2101,7 +2100,7 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2101
2100
|
onClick: d.onClick
|
|
2102
2101
|
}, {
|
|
2103
2102
|
default: S(() => [
|
|
2104
|
-
E(
|
|
2103
|
+
E(y(d.label), 1)
|
|
2105
2104
|
]),
|
|
2106
2105
|
_: 2
|
|
2107
2106
|
}, 1032, ["color", "icon", "tooltip", "disabled", "onClick"]))), 128))
|
|
@@ -2109,53 +2108,53 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2109
2108
|
])
|
|
2110
2109
|
]),
|
|
2111
2110
|
u("div", {
|
|
2112
|
-
class:
|
|
2111
|
+
class: $(["collapse-content", g(t).list ? "p-0" : ""])
|
|
2113
2112
|
}, [
|
|
2114
2113
|
M(a.$slots, "default"),
|
|
2115
|
-
g(t).list ? (r(), f("ul",
|
|
2114
|
+
g(t).list ? (r(), f("ul", qs, [
|
|
2116
2115
|
M(a.$slots, "list")
|
|
2117
2116
|
])) : _("", !0)
|
|
2118
2117
|
], 2)
|
|
2119
2118
|
], 2));
|
|
2120
2119
|
}
|
|
2121
|
-
}),
|
|
2120
|
+
}), Fs = {
|
|
2122
2121
|
title: { type: String },
|
|
2123
2122
|
label: { type: String },
|
|
2124
2123
|
labelLink: { type: String },
|
|
2125
2124
|
description: { type: String },
|
|
2126
2125
|
descriptionLink: { type: String }
|
|
2127
|
-
},
|
|
2126
|
+
}, Ks = { class: "list-row" }, Us = { class: "list-col-grow" }, Hs = { key: 0 }, Ws = {
|
|
2128
2127
|
key: 1,
|
|
2129
2128
|
class: "text-xs text-gray-600"
|
|
2130
|
-
},
|
|
2129
|
+
}, Gs = ["href"], Xs = { key: 1 }, Zs = {
|
|
2131
2130
|
key: 0,
|
|
2132
2131
|
class: "text-xs text-gray-500"
|
|
2133
|
-
},
|
|
2132
|
+
}, Js = ["href"], Qs = { key: 1 }, qn = /* @__PURE__ */ k({
|
|
2134
2133
|
__name: "CollapseRow",
|
|
2135
|
-
props:
|
|
2134
|
+
props: Fs,
|
|
2136
2135
|
setup(e) {
|
|
2137
|
-
return (t, o) => (r(), f("li",
|
|
2138
|
-
u("div",
|
|
2139
|
-
t.title ? (r(), f("div",
|
|
2140
|
-
t.description || t.descriptionLink ? (r(), f("div",
|
|
2136
|
+
return (t, o) => (r(), f("li", Ks, [
|
|
2137
|
+
u("div", Us, [
|
|
2138
|
+
t.title ? (r(), f("div", Hs, y(t.title), 1)) : _("", !0),
|
|
2139
|
+
t.description || t.descriptionLink ? (r(), f("div", Ws, [
|
|
2141
2140
|
t.descriptionLink ? (r(), f("a", {
|
|
2142
2141
|
key: 0,
|
|
2143
2142
|
href: t.descriptionLink,
|
|
2144
2143
|
target: "_blank"
|
|
2145
|
-
},
|
|
2144
|
+
}, y(t.description ?? t.descriptionLink), 9, Gs)) : (r(), f("span", Xs, y(t.description), 1))
|
|
2146
2145
|
])) : _("", !0)
|
|
2147
2146
|
]),
|
|
2148
|
-
t.label ? (r(), f("div",
|
|
2147
|
+
t.label ? (r(), f("div", Zs, [
|
|
2149
2148
|
t.labelLink ? (r(), f("a", {
|
|
2150
2149
|
key: 0,
|
|
2151
2150
|
href: t.labelLink,
|
|
2152
2151
|
target: "_blank"
|
|
2153
|
-
},
|
|
2152
|
+
}, y(t.label), 9, Js)) : (r(), f("span", Qs, y(t.label), 1))
|
|
2154
2153
|
])) : _("", !0),
|
|
2155
2154
|
M(t.$slots, "default")
|
|
2156
2155
|
]));
|
|
2157
2156
|
}
|
|
2158
|
-
}),
|
|
2157
|
+
}), Ys = { class: "text-gray-800" }, jn = /* @__PURE__ */ k({
|
|
2159
2158
|
__name: "alert",
|
|
2160
2159
|
props: {
|
|
2161
2160
|
message: {},
|
|
@@ -2170,13 +2169,13 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2170
2169
|
};
|
|
2171
2170
|
return (o, n) => (r(), f("div", {
|
|
2172
2171
|
role: "alert",
|
|
2173
|
-
class:
|
|
2172
|
+
class: $(`alert alert-soft ${t[e.type]} `)
|
|
2174
2173
|
}, [
|
|
2175
|
-
u("span",
|
|
2174
|
+
u("span", Ys, y(e.message), 1),
|
|
2176
2175
|
M(o.$slots, "default")
|
|
2177
2176
|
], 2));
|
|
2178
2177
|
}
|
|
2179
|
-
}),
|
|
2178
|
+
}), en = {
|
|
2180
2179
|
title: { type: String, required: !0 },
|
|
2181
2180
|
items: {
|
|
2182
2181
|
type: Array,
|
|
@@ -2195,73 +2194,73 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2195
2194
|
default: void 0
|
|
2196
2195
|
},
|
|
2197
2196
|
opened: { type: Boolean, default: !0 }
|
|
2198
|
-
},
|
|
2199
|
-
const l =
|
|
2197
|
+
}, tn = ["update:modelValue"], on = (e, t, o, n) => {
|
|
2198
|
+
const l = h(
|
|
2200
2199
|
() => e.value.map((s) => s[o.value])
|
|
2201
|
-
), a = (s) => t.value.includes(s), c =
|
|
2200
|
+
), a = (s) => t.value.includes(s), c = h(() => {
|
|
2202
2201
|
const s = t.value.length;
|
|
2203
2202
|
return s === 0 ? "None" : s === l.value.length ? "All" : `${s}`;
|
|
2204
2203
|
});
|
|
2205
|
-
return { isSelected: a, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s,
|
|
2206
|
-
|
|
2204
|
+
return { isSelected: a, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s, b) => {
|
|
2205
|
+
b ? n("update:modelValue", [...t.value, s]) : n(
|
|
2207
2206
|
"update:modelValue",
|
|
2208
|
-
t.value.filter((
|
|
2207
|
+
t.value.filter((m) => m !== s)
|
|
2209
2208
|
);
|
|
2210
2209
|
} };
|
|
2211
|
-
},
|
|
2210
|
+
}, sn = { class: "flex items-center justify-between mb-2" }, nn = { class: "text-xs text-base-content/50" }, ln = { class: "flex gap-1" }, an = { class: "flex flex-col gap-1" }, rn = ["checked", "onChange"], un = { class: "text-sm flex-1 select-none" }, cn = {
|
|
2212
2211
|
key: 1,
|
|
2213
2212
|
class: "badge badge-sm badge-ghost"
|
|
2214
|
-
},
|
|
2213
|
+
}, Fn = /* @__PURE__ */ k({
|
|
2215
2214
|
__name: "filter",
|
|
2216
|
-
props:
|
|
2217
|
-
emits:
|
|
2215
|
+
props: en,
|
|
2216
|
+
emits: tn,
|
|
2218
2217
|
setup(e, { emit: t }) {
|
|
2219
|
-
const o = e, n = t, l =
|
|
2220
|
-
return (s,
|
|
2218
|
+
const o = e, n = t, l = h(() => o.items ?? []), { isSelected: a, selectedLabel: c, selectAll: d, selectNone: p, toggleItem: i } = on(l, we(o, "modelValue"), we(o, "valueKey"), n);
|
|
2219
|
+
return (s, b) => (r(), w(g(js), {
|
|
2221
2220
|
title: s.title,
|
|
2222
2221
|
opened: s.opened
|
|
2223
2222
|
}, {
|
|
2224
2223
|
default: S(() => [
|
|
2225
|
-
u("div",
|
|
2226
|
-
u("span",
|
|
2227
|
-
u("div",
|
|
2224
|
+
u("div", sn, [
|
|
2225
|
+
u("span", nn, y(g(c)) + " of " + y(l.value.length) + " items ", 1),
|
|
2226
|
+
u("div", ln, [
|
|
2228
2227
|
u("button", {
|
|
2229
2228
|
class: "btn btn-ghost btn-xs",
|
|
2230
2229
|
type: "button",
|
|
2231
2230
|
tabindex: "-1",
|
|
2232
|
-
onClick:
|
|
2233
|
-
(...
|
|
2231
|
+
onClick: b[0] || (b[0] = //@ts-ignore
|
|
2232
|
+
(...m) => g(d) && g(d)(...m))
|
|
2234
2233
|
}, " All "),
|
|
2235
2234
|
u("button", {
|
|
2236
2235
|
class: "btn btn-ghost btn-xs",
|
|
2237
2236
|
type: "button",
|
|
2238
2237
|
tabindex: "-1",
|
|
2239
|
-
onClick:
|
|
2240
|
-
(...
|
|
2238
|
+
onClick: b[1] || (b[1] = //@ts-ignore
|
|
2239
|
+
(...m) => g(p) && g(p)(...m))
|
|
2241
2240
|
}, " None ")
|
|
2242
2241
|
])
|
|
2243
2242
|
]),
|
|
2244
|
-
u("div",
|
|
2245
|
-
(r(!0), f(L, null, P(l.value, (
|
|
2246
|
-
key:
|
|
2247
|
-
class:
|
|
2243
|
+
u("div", an, [
|
|
2244
|
+
(r(!0), f(L, null, P(l.value, (m) => (r(), f("label", {
|
|
2245
|
+
key: m[s.valueKey],
|
|
2246
|
+
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)(m[s.valueKey]) }])
|
|
2248
2247
|
}, [
|
|
2249
2248
|
u("input", {
|
|
2250
2249
|
type: "checkbox",
|
|
2251
2250
|
class: "checkbox checkbox-sm",
|
|
2252
|
-
checked: g(a)(
|
|
2253
|
-
onChange: (
|
|
2254
|
-
|
|
2255
|
-
|
|
2251
|
+
checked: g(a)(m[s.valueKey]),
|
|
2252
|
+
onChange: (v) => g(i)(
|
|
2253
|
+
m[s.valueKey],
|
|
2254
|
+
v.target.checked
|
|
2256
2255
|
)
|
|
2257
|
-
}, null, 40,
|
|
2258
|
-
s.colorKey &&
|
|
2256
|
+
}, null, 40, rn),
|
|
2257
|
+
s.colorKey && m[s.colorKey] ? (r(), f("span", {
|
|
2259
2258
|
key: 0,
|
|
2260
2259
|
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2261
|
-
style: X({ backgroundColor:
|
|
2260
|
+
style: X({ backgroundColor: m[s.colorKey] })
|
|
2262
2261
|
}, null, 4)) : _("", !0),
|
|
2263
|
-
u("span",
|
|
2264
|
-
|
|
2262
|
+
u("span", un, y(m[s.labelKey]), 1),
|
|
2263
|
+
m[s.countKey] > 0 ? (r(), f("span", cn, y(m[s.countKey]), 1)) : _("", !0)
|
|
2265
2264
|
], 2))), 128))
|
|
2266
2265
|
])
|
|
2267
2266
|
]),
|
|
@@ -2270,66 +2269,66 @@ const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2270
2269
|
}
|
|
2271
2270
|
});
|
|
2272
2271
|
export {
|
|
2273
|
-
|
|
2274
|
-
|
|
2272
|
+
jn as Alert,
|
|
2273
|
+
Vn as Autocomplete,
|
|
2275
2274
|
Pt as BadgeSize,
|
|
2276
2275
|
z as Btn,
|
|
2277
|
-
|
|
2276
|
+
kn as BtnBadge,
|
|
2278
2277
|
Rt as BtnBadgeEmits,
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2278
|
+
Tt as BtnBadgeProperties,
|
|
2279
|
+
Dt as BtnEmits,
|
|
2280
|
+
It as BtnProperties,
|
|
2282
2281
|
St as ButtonSize,
|
|
2283
2282
|
Me as ButtonTag,
|
|
2284
2283
|
fe as ButtonType,
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2284
|
+
xn as Card,
|
|
2285
|
+
In as Checkbox,
|
|
2286
|
+
Pn as ClickOutside,
|
|
2287
|
+
js as Collapse,
|
|
2288
|
+
qn as CollapseRow,
|
|
2290
2289
|
N as Color,
|
|
2291
|
-
|
|
2290
|
+
zt as ConfirmModal,
|
|
2292
2291
|
Z as ControlWrapper,
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2292
|
+
En as Drawer,
|
|
2293
|
+
wn as Dropdown,
|
|
2294
|
+
Fn as Filter,
|
|
2295
|
+
tn as FilterEmits,
|
|
2296
|
+
en as FilterProperties,
|
|
2298
2297
|
j as Icon,
|
|
2299
|
-
|
|
2298
|
+
R as IconEnum,
|
|
2300
2299
|
pt as IconMap,
|
|
2301
2300
|
ft as IconProperties,
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2301
|
+
Dn as Input,
|
|
2302
|
+
Tn as InputNumber,
|
|
2303
|
+
Nn as Loading,
|
|
2304
|
+
On as Markdown,
|
|
2305
|
+
yn as Menu,
|
|
2306
|
+
Vt as Modal,
|
|
2307
|
+
$t as ModalEmits,
|
|
2309
2308
|
_t as ModalProperties,
|
|
2310
|
-
|
|
2309
|
+
be as ModalService,
|
|
2311
2310
|
Lt as ModalSize,
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2311
|
+
Nt as ModalWrapper,
|
|
2312
|
+
An as MultiSelect,
|
|
2313
|
+
qt as NotificationMessage,
|
|
2314
|
+
me as NotificationService,
|
|
2315
|
+
Kt as Notifications,
|
|
2316
|
+
co as PaginationComponent,
|
|
2317
|
+
Bn as SelectComponent,
|
|
2318
|
+
_n as ShellComponent,
|
|
2320
2319
|
pe as SubMenu,
|
|
2321
2320
|
Cn as Table,
|
|
2322
2321
|
Cn as TableComponent,
|
|
2323
|
-
|
|
2322
|
+
$n as TextCell,
|
|
2324
2323
|
Rn as Textarea,
|
|
2325
|
-
|
|
2326
|
-
|
|
2324
|
+
zn as TreeView,
|
|
2325
|
+
Ln as addClickOutsideEventListener,
|
|
2327
2326
|
U as buildInputStyle,
|
|
2328
|
-
|
|
2329
|
-
|
|
2327
|
+
Mn as hasCustomEventListener,
|
|
2328
|
+
qo as isDescriptionHidden,
|
|
2330
2329
|
ae as mergeStyles,
|
|
2331
2330
|
se as myStyles,
|
|
2332
|
-
|
|
2331
|
+
Sn as removeClickOutsideEventListener,
|
|
2333
2332
|
Ve as showErrors,
|
|
2334
|
-
|
|
2333
|
+
on as useFilter
|
|
2335
2334
|
};
|