@ghentcdh/ui 0.8.2 → 0.8.3
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 +497 -479
- package/index.js +2 -2
- package/index.mjs +497 -479
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as w, computed as v, openBlock as a, createBlock as y, resolveDynamicComponent as ne, normalizeClass as
|
|
1
|
+
import { defineComponent as w, computed as v, openBlock as a, createBlock as y, resolveDynamicComponent as ne, normalizeClass as $, createCommentVNode as k, createElementBlock as p, createElementVNode as u, toDisplayString as h, unref as g, Fragment as x, renderList as P, mergeProps as B, resolveComponent as ue, withCtx as L, createTextVNode as z, ref as S, watch as X, onMounted as ke, renderSlot as M, createVNode as V, withDirectives as Y, vModelCheckbox as _e, normalizeStyle as G, useAttrs as Ve, getCurrentInstance as Ae, camelize as Ie, toHandlerKey as ae, withModifiers as ce, nextTick as $e, onUnmounted as Oe, normalizeProps as ee, guardReactiveProps as te, Transition as De, useModel as E, mergeModels as O, onBeforeUnmount as Re, vModelDynamic as Te, vModelText as Ce, useSlots as xe, 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 je, EyeIcon as qe, CheckIcon as Ee, LanguageIcon as Fe, ChevronDoubleRightIcon as Ue, ChevronDoubleLeftIcon as Ke, ChevronUpIcon as He, ChevronDownIcon as We, ChevronLeftIcon as Ge, ChevronRightIcon as Xe, Bars3Icon as Ze, PaperClipIcon as Je, PlusCircleIcon as Qe, XMarkIcon as Ye, FunnelIcon as et, BarsArrowUpIcon as tt, BarsArrowDownIcon as ot, TrashIcon as st, PencilSquareIcon as nt } from "@heroicons/vue/24/outline";
|
|
@@ -38,7 +38,7 @@ const dt = {
|
|
|
38
38
|
const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? dt[t.icon] : t.icon : null);
|
|
39
39
|
return (n, l) => o.value ? (a(), y(ne(o.value), {
|
|
40
40
|
key: 0,
|
|
41
|
-
class:
|
|
41
|
+
class: $([
|
|
42
42
|
{
|
|
43
43
|
"w-full h-full": !n.size,
|
|
44
44
|
"w-2 h-2": n.size === "xs",
|
|
@@ -52,7 +52,7 @@ const dt = {
|
|
|
52
52
|
}), ft = { class: "dropdown dropdown-end" }, mt = {
|
|
53
53
|
tabindex: "0",
|
|
54
54
|
class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
|
|
55
|
-
},
|
|
55
|
+
}, bt = { class: "min-w-max flex-no-wrap text-black" }, pe = /* @__PURE__ */ w({
|
|
56
56
|
__name: "sub-menu",
|
|
57
57
|
props: {
|
|
58
58
|
label: {},
|
|
@@ -64,20 +64,20 @@ const dt = {
|
|
|
64
64
|
},
|
|
65
65
|
setup(e) {
|
|
66
66
|
return (t, o) => (a(), p("div", ft, [
|
|
67
|
-
|
|
67
|
+
u("div", {
|
|
68
68
|
tabindex: "0",
|
|
69
69
|
role: "button",
|
|
70
|
-
class:
|
|
70
|
+
class: $([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
71
71
|
}, [
|
|
72
|
-
|
|
73
|
-
e.disableArrow ? k("", !0) : (a(), y(
|
|
72
|
+
u("span", null, h(e.label), 1),
|
|
73
|
+
e.disableArrow ? k("", !0) : (a(), y(g(q), {
|
|
74
74
|
key: 0,
|
|
75
|
-
icon:
|
|
75
|
+
icon: g(T).ChevronDown,
|
|
76
76
|
size: "sm"
|
|
77
77
|
}, null, 8, ["icon"]))
|
|
78
78
|
], 2),
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
u("ul", mt, [
|
|
80
|
+
u("li", bt, [
|
|
81
81
|
(a(!0), p(x, null, P(e.items, (n) => (a(), y(Le, B({
|
|
82
82
|
key: n.label
|
|
83
83
|
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
@@ -104,11 +104,11 @@ const dt = {
|
|
|
104
104
|
t.action?.();
|
|
105
105
|
};
|
|
106
106
|
return (d, f) => {
|
|
107
|
-
const
|
|
108
|
-
return l.value ? (a(), y(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (a(), y(
|
|
107
|
+
const i = ue("RouterLink");
|
|
108
|
+
return l.value ? (a(), y(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (a(), y(i, {
|
|
109
109
|
key: 1,
|
|
110
110
|
to: r.value,
|
|
111
|
-
class:
|
|
111
|
+
class: $(oe),
|
|
112
112
|
onClick: c
|
|
113
113
|
}, {
|
|
114
114
|
default: L(() => [
|
|
@@ -117,18 +117,18 @@ const dt = {
|
|
|
117
117
|
_: 1
|
|
118
118
|
}, 8, ["to"])) : n.value ? (a(), p("button", {
|
|
119
119
|
key: 2,
|
|
120
|
-
class:
|
|
120
|
+
class: $(oe),
|
|
121
121
|
onClick: c
|
|
122
122
|
}, h(e.label), 1)) : (a(), p("div", {
|
|
123
123
|
key: 3,
|
|
124
|
-
class:
|
|
124
|
+
class: $([oe, { "btn-disabled": e.disabled }])
|
|
125
125
|
}, h(e.label), 3));
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), gt = { class: "navbar bg-base-100 shadow-sm" }, vt = { class: "flex-1" }, ht = {
|
|
129
129
|
key: 0,
|
|
130
130
|
class: "breadcrumbs text-sm"
|
|
131
|
-
}, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" },
|
|
131
|
+
}, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" }, dn = /* @__PURE__ */ w({
|
|
132
132
|
__name: "menu",
|
|
133
133
|
props: {
|
|
134
134
|
menu: {},
|
|
@@ -137,30 +137,32 @@ const dt = {
|
|
|
137
137
|
setup(e) {
|
|
138
138
|
return (t, o) => {
|
|
139
139
|
const n = ue("RouterLink");
|
|
140
|
-
return a(), p("nav",
|
|
141
|
-
|
|
140
|
+
return a(), p("nav", gt, [
|
|
141
|
+
u("div", vt, [
|
|
142
142
|
e.breadcrumbs ? (a(), p("div", ht, [
|
|
143
|
-
|
|
143
|
+
u("ul", null, [
|
|
144
144
|
(a(!0), p(x, null, P(e.breadcrumbs, (l) => (a(), p("li", {
|
|
145
145
|
key: l.label
|
|
146
146
|
}, [
|
|
147
147
|
l.routerLink ? (a(), y(n, {
|
|
148
148
|
key: 0,
|
|
149
|
-
to: { name: l.routerLink, params: l.params }
|
|
149
|
+
to: { name: l.routerLink, params: l.params },
|
|
150
|
+
role: "navigation",
|
|
151
|
+
"area-label": l.label
|
|
150
152
|
}, {
|
|
151
153
|
default: L(() => [
|
|
152
154
|
z(h(l.label), 1)
|
|
153
155
|
]),
|
|
154
156
|
_: 2
|
|
155
|
-
}, 1032, ["to"])) : (a(), p(x, { key: 1 }, [
|
|
157
|
+
}, 1032, ["to", "area-label"])) : (a(), p(x, { key: 1 }, [
|
|
156
158
|
z(h(l.label), 1)
|
|
157
159
|
], 64))
|
|
158
160
|
]))), 128))
|
|
159
161
|
])
|
|
160
162
|
])) : k("", !0)
|
|
161
163
|
]),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
u("div", yt, [
|
|
165
|
+
u("div", wt, [
|
|
164
166
|
(a(!0), p(x, null, P(e.menu, (l) => (a(), y(Le, B({
|
|
165
167
|
key: l.label
|
|
166
168
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
@@ -169,7 +171,7 @@ const dt = {
|
|
|
169
171
|
]);
|
|
170
172
|
};
|
|
171
173
|
}
|
|
172
|
-
}),
|
|
174
|
+
}), pn = /* @__PURE__ */ w({
|
|
173
175
|
__name: "dropdown",
|
|
174
176
|
props: {
|
|
175
177
|
items: {}
|
|
@@ -184,7 +186,7 @@ const dt = {
|
|
|
184
186
|
"disable-arrow": !0
|
|
185
187
|
}, null, 8, ["items", "open"]));
|
|
186
188
|
}
|
|
187
|
-
}), kt = { class: "font-bold" }, _t = { class: "pt-4" },
|
|
189
|
+
}), kt = { class: "font-bold" }, _t = { class: "pt-4" }, $t = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" }, Ct = /* @__PURE__ */ w({
|
|
188
190
|
__name: "modal",
|
|
189
191
|
props: {
|
|
190
192
|
modalTitle: {},
|
|
@@ -209,17 +211,17 @@ const dt = {
|
|
|
209
211
|
};
|
|
210
212
|
return t({ closeModal: f, openModal: d }), X(
|
|
211
213
|
() => l.open,
|
|
212
|
-
(
|
|
214
|
+
(i, s, m) => {
|
|
213
215
|
l.open ? d() : f();
|
|
214
216
|
}
|
|
215
217
|
), ke(() => {
|
|
216
218
|
l.open && d();
|
|
217
|
-
}), (
|
|
219
|
+
}), (i, s) => (a(), p("dialog", {
|
|
218
220
|
id: r,
|
|
219
221
|
class: "modal"
|
|
220
222
|
}, [
|
|
221
|
-
|
|
222
|
-
class:
|
|
223
|
+
u("div", {
|
|
224
|
+
class: $(["modal-box bg-white", n[e.width]])
|
|
223
225
|
}, [
|
|
224
226
|
e.disableClose ? k("", !0) : (a(), p("button", {
|
|
225
227
|
key: 0,
|
|
@@ -227,12 +229,12 @@ const dt = {
|
|
|
227
229
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
228
230
|
onClick: f
|
|
229
231
|
}, " ✕ ")),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
M(
|
|
232
|
+
u("h3", kt, h(e.modalTitle), 1),
|
|
233
|
+
u("div", _t, [
|
|
234
|
+
M(i.$slots, "content")
|
|
233
235
|
]),
|
|
234
|
-
|
|
235
|
-
M(
|
|
236
|
+
u("div", $t, [
|
|
237
|
+
M(i.$slots, "actions")
|
|
236
238
|
])
|
|
237
239
|
], 2)
|
|
238
240
|
]));
|
|
@@ -283,10 +285,10 @@ const xt = {
|
|
|
283
285
|
setup(e, { emit: t }) {
|
|
284
286
|
const o = e, n = t;
|
|
285
287
|
return (l, r) => (a(), y(ne(o.as), {
|
|
286
|
-
class:
|
|
288
|
+
class: $([
|
|
287
289
|
"btn p-1 flex justify-center flex-nowrap",
|
|
288
|
-
|
|
289
|
-
|
|
290
|
+
g(xt)[o.color],
|
|
291
|
+
g(Vt)[o.size],
|
|
290
292
|
{ "btn-outline": o.outline, "btn-square": o.square, tooltip: o.tooltip }
|
|
291
293
|
]),
|
|
292
294
|
href: o.href,
|
|
@@ -296,7 +298,7 @@ const xt = {
|
|
|
296
298
|
onClick: r[0] || (r[0] = (c) => n("click"))
|
|
297
299
|
}, {
|
|
298
300
|
default: L(() => [
|
|
299
|
-
o.icon ? (a(), y(
|
|
301
|
+
o.icon ? (a(), y(g(q), {
|
|
300
302
|
key: 0,
|
|
301
303
|
icon: o.icon,
|
|
302
304
|
size: o.size
|
|
@@ -306,20 +308,20 @@ const xt = {
|
|
|
306
308
|
_: 3
|
|
307
309
|
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
308
310
|
}
|
|
309
|
-
}), It = ["type", "disabled"],
|
|
311
|
+
}), It = ["type", "disabled"], fn = /* @__PURE__ */ w({
|
|
310
312
|
__name: "btn-badge",
|
|
311
313
|
props: Mt,
|
|
312
314
|
emits: Bt,
|
|
313
315
|
setup(e, { emit: t }) {
|
|
314
316
|
const o = e, n = t;
|
|
315
317
|
return (l, r) => (a(), p("button", {
|
|
316
|
-
class:
|
|
318
|
+
class: $(["badge gap-1", g(At)[o.size], g(Lt)[o.color]]),
|
|
317
319
|
type: o.type,
|
|
318
320
|
disabled: o.disabled,
|
|
319
321
|
onClick: r[0] || (r[0] = (c) => n("click"))
|
|
320
322
|
}, [
|
|
321
323
|
M(l.$slots, "default"),
|
|
322
|
-
o.icon ? (a(), y(
|
|
324
|
+
o.icon ? (a(), y(g(q), {
|
|
323
325
|
key: 0,
|
|
324
326
|
icon: o.icon,
|
|
325
327
|
size: o.size
|
|
@@ -339,7 +341,7 @@ const xt = {
|
|
|
339
341
|
const o = t, n = (l) => {
|
|
340
342
|
o("closeModal", { confirmed: l });
|
|
341
343
|
};
|
|
342
|
-
return (l, r) => (a(), y(
|
|
344
|
+
return (l, r) => (a(), y(Ct, {
|
|
343
345
|
"modal-title": e.title,
|
|
344
346
|
open: !0,
|
|
345
347
|
"disable-close": !0
|
|
@@ -348,8 +350,8 @@ const xt = {
|
|
|
348
350
|
z(h(e.message), 1)
|
|
349
351
|
]),
|
|
350
352
|
actions: L(() => [
|
|
351
|
-
V(
|
|
352
|
-
color:
|
|
353
|
+
V(g(N), {
|
|
354
|
+
color: g(j).secondary,
|
|
353
355
|
outline: !0,
|
|
354
356
|
onClick: r[0] || (r[0] = (c) => n(!1))
|
|
355
357
|
}, {
|
|
@@ -358,7 +360,7 @@ const xt = {
|
|
|
358
360
|
]),
|
|
359
361
|
_: 1
|
|
360
362
|
}, 8, ["color"]),
|
|
361
|
-
V(
|
|
363
|
+
V(g(N), {
|
|
362
364
|
onClick: r[1] || (r[1] = (c) => n(!0))
|
|
363
365
|
}, {
|
|
364
366
|
default: L(() => [
|
|
@@ -430,13 +432,13 @@ const Dt = /* @__PURE__ */ w({
|
|
|
430
432
|
};
|
|
431
433
|
return (o, n) => (a(), p("div", {
|
|
432
434
|
role: "alert",
|
|
433
|
-
class:
|
|
435
|
+
class: $(`alert ${t[e.type]} `)
|
|
434
436
|
}, [
|
|
435
|
-
|
|
437
|
+
u("span", null, h(e.message), 1)
|
|
436
438
|
], 2));
|
|
437
439
|
}
|
|
438
440
|
}), Tt = 5e3;
|
|
439
|
-
class
|
|
441
|
+
class be {
|
|
440
442
|
constructor() {
|
|
441
443
|
this.notifications = S([]), this.addNotification = (t, o = "info") => {
|
|
442
444
|
const n = {
|
|
@@ -455,7 +457,7 @@ class ge {
|
|
|
455
457
|
};
|
|
456
458
|
}
|
|
457
459
|
static getInstance() {
|
|
458
|
-
return this.instance || (this.instance = new
|
|
460
|
+
return this.instance || (this.instance = new be()), this.instance;
|
|
459
461
|
}
|
|
460
462
|
static info(t) {
|
|
461
463
|
this.getInstance().addNotification(t, "info");
|
|
@@ -476,14 +478,14 @@ class ge {
|
|
|
476
478
|
const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__ */ w({
|
|
477
479
|
__name: "notifications",
|
|
478
480
|
setup(e) {
|
|
479
|
-
const t =
|
|
481
|
+
const t = be.getInstance();
|
|
480
482
|
return (o, n) => (a(), p("div", zt, [
|
|
481
|
-
(a(!0), p(x, null, P(
|
|
483
|
+
(a(!0), p(x, null, P(g(t).notifications.value, (l) => (a(), y(Rt, B({
|
|
482
484
|
key: l.id
|
|
483
485
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
484
486
|
]));
|
|
485
487
|
}
|
|
486
|
-
}), jt = { class: "flex h-screen flex-col" }, qt = { class: "shrink-0" }, Et = { class: "navbar bg-primary text-primary-content w-full z-100" }, Ft = { class: "navbar-start" }, Ut = { class: "navbar-center" }, Kt = ["href"], Ht = { class: "navbar-end" }, Wt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Gt = { class: "drawer-side h-full shadow-md" }, Xt = { class: "flex-grow overflow-y-auto" }, Zt = { class: "bg-base-200 p-4" },
|
|
488
|
+
}), jt = { class: "flex h-screen flex-col" }, qt = { class: "shrink-0" }, Et = { class: "navbar bg-primary text-primary-content w-full z-100" }, Ft = { class: "navbar-start" }, Ut = { class: "navbar-center" }, Kt = ["href"], Ht = { class: "navbar-end" }, Wt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Gt = { class: "drawer-side h-full shadow-md" }, Xt = { class: "flex-grow overflow-y-auto" }, Zt = { class: "bg-base-200 p-4" }, mn = /* @__PURE__ */ w({
|
|
487
489
|
__name: "shell.component",
|
|
488
490
|
props: {
|
|
489
491
|
title: {},
|
|
@@ -507,63 +509,63 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
507
509
|
}
|
|
508
510
|
]
|
|
509
511
|
} : null);
|
|
510
|
-
return (f,
|
|
512
|
+
return (f, i) => (a(), p(x, null, [
|
|
511
513
|
V(Nt),
|
|
512
|
-
V(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
514
|
+
V(g(Dt)),
|
|
515
|
+
u("div", jt, [
|
|
516
|
+
u("header", qt, [
|
|
517
|
+
u("nav", Et, [
|
|
518
|
+
u("div", Ft, [
|
|
519
|
+
u("button", {
|
|
518
520
|
"aria-label": "open sidebar",
|
|
519
521
|
class: "btn btn-square btn-ghost p-1",
|
|
520
522
|
onClick: r
|
|
521
523
|
}, [
|
|
522
|
-
V(
|
|
523
|
-
icon:
|
|
524
|
+
V(g(q), {
|
|
525
|
+
icon: g(T).Hamburger
|
|
524
526
|
}, null, 8, ["icon"])
|
|
525
527
|
])
|
|
526
528
|
]),
|
|
527
|
-
|
|
528
|
-
|
|
529
|
+
u("div", Ut, [
|
|
530
|
+
u("a", {
|
|
529
531
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
530
|
-
href:
|
|
532
|
+
href: g("/")
|
|
531
533
|
}, h(e.title), 9, Kt)
|
|
532
534
|
]),
|
|
533
|
-
|
|
534
|
-
d.value ? (a(), y(
|
|
535
|
+
u("div", Ht, [
|
|
536
|
+
d.value ? (a(), y(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : k("", !0)
|
|
535
537
|
])
|
|
536
538
|
])
|
|
537
539
|
]),
|
|
538
|
-
|
|
539
|
-
class:
|
|
540
|
+
u("div", {
|
|
541
|
+
class: $(["drawer flex-1 overflow-hidden", { "drawer-open": l.value }])
|
|
540
542
|
}, [
|
|
541
|
-
Y(
|
|
543
|
+
Y(u("input", {
|
|
542
544
|
id: "app-drawer",
|
|
543
|
-
"onUpdate:modelValue":
|
|
545
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => l.value = s),
|
|
544
546
|
type: "checkbox",
|
|
545
547
|
class: "drawer-toggle"
|
|
546
548
|
}, null, 512), [
|
|
547
549
|
[_e, l.value]
|
|
548
550
|
]),
|
|
549
|
-
|
|
551
|
+
u("main", Wt, [
|
|
550
552
|
M(f.$slots, "default")
|
|
551
553
|
]),
|
|
552
|
-
|
|
553
|
-
|
|
554
|
+
u("div", Gt, [
|
|
555
|
+
i[1] || (i[1] = u("label", {
|
|
554
556
|
for: "app-drawer",
|
|
555
557
|
"aria-label": "close sidebar",
|
|
556
558
|
class: "drawer-overlay"
|
|
557
559
|
}, null, -1)),
|
|
558
|
-
|
|
560
|
+
u("div", {
|
|
559
561
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
560
562
|
style: G({ width: e.widthSidebar + "px" })
|
|
561
563
|
}, [
|
|
562
|
-
|
|
564
|
+
u("ul", Xt, [
|
|
563
565
|
(a(!0), p(x, null, P(e.menu, (s) => (a(), p("li", {
|
|
564
566
|
key: s.label
|
|
565
567
|
}, [
|
|
566
|
-
V(
|
|
568
|
+
V(g(ze), {
|
|
567
569
|
to: { name: s.routerLink, params: s.params }
|
|
568
570
|
}, {
|
|
569
571
|
default: L(() => [
|
|
@@ -573,7 +575,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
573
575
|
}, 1032, ["to"])
|
|
574
576
|
]))), 128))
|
|
575
577
|
]),
|
|
576
|
-
|
|
578
|
+
u("div", Zt, " version: " + h(e.version), 1)
|
|
577
579
|
], 4)
|
|
578
580
|
])
|
|
579
581
|
], 2)
|
|
@@ -596,12 +598,12 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
596
598
|
), r = v(() => o.neverActive ? j.blank : l.value ? j.primary : j.secondary), c = () => {
|
|
597
599
|
n("updatePage", o.page);
|
|
598
600
|
};
|
|
599
|
-
return (d, f) => (a(), y(
|
|
601
|
+
return (d, f) => (a(), y(g(N), {
|
|
600
602
|
disabled: d.disabled,
|
|
601
603
|
square: !0,
|
|
602
604
|
size: "xs",
|
|
603
605
|
color: r.value,
|
|
604
|
-
onClick: f[0] || (f[0] = (
|
|
606
|
+
onClick: f[0] || (f[0] = (i) => c())
|
|
605
607
|
}, {
|
|
606
608
|
default: L(() => [
|
|
607
609
|
z(h(d.label), 1)
|
|
@@ -643,29 +645,29 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
643
645
|
}), f = v(() => {
|
|
644
646
|
let s = l.value;
|
|
645
647
|
s < 1 && (s = 1);
|
|
646
|
-
const m = o.currentPage,
|
|
648
|
+
const m = o.currentPage, b = [], { min: _, max: D } = c.value;
|
|
647
649
|
return Array.from({ length: s }, (K, A) => {
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
label: `${
|
|
650
|
+
const C = A + 1;
|
|
651
|
+
C !== 1 && C !== s && (C > D || C < _) || (C === s && s > 1 && D < s && b.push(d(m)), b.push({
|
|
652
|
+
label: `${C}`,
|
|
651
653
|
totalPages: s,
|
|
652
654
|
currentPage: m,
|
|
653
|
-
page:
|
|
654
|
-
}),
|
|
655
|
-
}),
|
|
656
|
-
}),
|
|
655
|
+
page: C
|
|
656
|
+
}), C === 1 && s > 1 && _ > 1 && b.push(d(m)));
|
|
657
|
+
}), b;
|
|
658
|
+
}), i = (s) => {
|
|
657
659
|
n("updatePage", s);
|
|
658
660
|
};
|
|
659
661
|
return (s, m) => (a(), p("div", to, [
|
|
660
|
-
|
|
661
|
-
|
|
662
|
+
u("div", oo, [
|
|
663
|
+
u("div", so, [
|
|
662
664
|
V(J, B(o, {
|
|
663
665
|
page: 1,
|
|
664
666
|
label: "<<",
|
|
665
667
|
"current-page": s.currentPage,
|
|
666
668
|
"never-active": !0,
|
|
667
669
|
disabled: s.currentPage === 1,
|
|
668
|
-
onUpdatePage:
|
|
670
|
+
onUpdatePage: i
|
|
669
671
|
}), null, 16, ["current-page", "disabled"]),
|
|
670
672
|
V(J, B(o, {
|
|
671
673
|
page: s.currentPage - 1,
|
|
@@ -673,19 +675,19 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
673
675
|
"current-page": s.currentPage,
|
|
674
676
|
"never-active": !0,
|
|
675
677
|
disabled: s.currentPage === 1,
|
|
676
|
-
onUpdatePage:
|
|
678
|
+
onUpdatePage: i
|
|
677
679
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
678
|
-
(a(!0), p(x, null, P(f.value, (
|
|
679
|
-
key:
|
|
680
|
+
(a(!0), p(x, null, P(f.value, (b) => (a(), y(J, B({
|
|
681
|
+
key: b.page,
|
|
680
682
|
ref_for: !0
|
|
681
|
-
},
|
|
683
|
+
}, b, { onUpdatePage: i }), null, 16))), 128)),
|
|
682
684
|
V(J, B(o, {
|
|
683
685
|
page: s.currentPage + 1,
|
|
684
686
|
label: ">",
|
|
685
687
|
"current-page": s.currentPage,
|
|
686
688
|
"never-active": !0,
|
|
687
689
|
disabled: o.currentPage === l.value,
|
|
688
|
-
onUpdatePage:
|
|
690
|
+
onUpdatePage: i
|
|
689
691
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
690
692
|
V(J, B(o, {
|
|
691
693
|
page: l.value,
|
|
@@ -693,18 +695,18 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
693
695
|
"current-page": s.currentPage,
|
|
694
696
|
"never-active": !0,
|
|
695
697
|
disabled: o.currentPage === l.value,
|
|
696
|
-
onUpdatePage:
|
|
698
|
+
onUpdatePage: i
|
|
697
699
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
698
700
|
])
|
|
699
701
|
]),
|
|
700
|
-
|
|
702
|
+
u("div", no, " page " + h(s.currentPage) + " of " + h(l.value), 1)
|
|
701
703
|
]));
|
|
702
704
|
}
|
|
703
705
|
}), ao = {
|
|
704
706
|
data: { type: Object, required: !0 },
|
|
705
707
|
column: { type: Object, required: !0 },
|
|
706
708
|
options: { type: Object }
|
|
707
|
-
},
|
|
709
|
+
}, bn = /* @__PURE__ */ w({
|
|
708
710
|
__name: "text.cell",
|
|
709
711
|
props: ao,
|
|
710
712
|
setup(e) {
|
|
@@ -732,9 +734,9 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
732
734
|
class: "flex items-center",
|
|
733
735
|
onClick: c
|
|
734
736
|
}, [
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
d.sortColumn === r.value ? (a(), y(
|
|
737
|
+
u("span", uo, h(d.column.label), 1),
|
|
738
|
+
u("div", co, [
|
|
739
|
+
d.sortColumn === r.value ? (a(), y(g(q), {
|
|
738
740
|
key: 0,
|
|
739
741
|
icon: l.value
|
|
740
742
|
}, null, 8, ["icon"])) : k("", !0)
|
|
@@ -748,7 +750,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
748
750
|
displayColumns: { type: Array, required: !0 },
|
|
749
751
|
page: { type: Object },
|
|
750
752
|
sort: { type: Object }
|
|
751
|
-
}, mo = ["updatePage", "sort"],
|
|
753
|
+
}, mo = ["updatePage", "sort"], bo = { class: "table w-full" }, go = { key: 0 }, vo = ["colspan"], ho = ["ui-id"], yo = { class: "flex gap-2" }, gn = /* @__PURE__ */ w({
|
|
752
754
|
__name: "table.component",
|
|
753
755
|
props: fo,
|
|
754
756
|
emits: mo,
|
|
@@ -759,69 +761,73 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
759
761
|
n.onDelete?.(s);
|
|
760
762
|
}, f = (s) => {
|
|
761
763
|
o("updatePage", s);
|
|
762
|
-
},
|
|
764
|
+
}, i = (s) => {
|
|
763
765
|
o("sort", s);
|
|
764
766
|
};
|
|
765
767
|
return (s, m) => (a(), p(x, null, [
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
(a(!0), p(x, null, P(s.displayColumns, (
|
|
770
|
-
key:
|
|
768
|
+
u("table", bo, [
|
|
769
|
+
u("thead", null, [
|
|
770
|
+
u("tr", null, [
|
|
771
|
+
(a(!0), p(x, null, P(s.displayColumns, (b) => (a(), p("th", {
|
|
772
|
+
key: b.scope
|
|
771
773
|
}, [
|
|
772
|
-
V(po, B({ column:
|
|
774
|
+
V(po, B({ column: b }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
|
|
773
775
|
]))), 128)),
|
|
774
|
-
m[0] || (m[0] =
|
|
776
|
+
m[0] || (m[0] = u("th", null, null, -1))
|
|
775
777
|
])
|
|
776
778
|
]),
|
|
777
|
-
|
|
778
|
-
s.loading ? (a(), p("tr",
|
|
779
|
-
|
|
779
|
+
u("tbody", null, [
|
|
780
|
+
s.loading ? (a(), p("tr", go, [
|
|
781
|
+
u("td", {
|
|
780
782
|
colspan: s.displayColumns.length + 1,
|
|
781
783
|
class: "text-center"
|
|
782
784
|
}, [...m[1] || (m[1] = [
|
|
783
|
-
|
|
785
|
+
u("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
784
786
|
])], 8, vo)
|
|
785
787
|
])) : k("", !0),
|
|
786
|
-
(a(!0), p(x, null, P(s.data, (
|
|
787
|
-
key:
|
|
788
|
+
(a(!0), p(x, null, P(s.data, (b) => (a(), p("tr", {
|
|
789
|
+
key: b.id,
|
|
790
|
+
"ui-id": `table_${b.id}`
|
|
788
791
|
}, [
|
|
789
792
|
(a(!0), p(x, null, P(s.displayColumns, (_) => (a(), p("td", {
|
|
790
793
|
key: _.scope
|
|
791
794
|
}, [
|
|
792
795
|
(a(), y(ne(_.component), B({ ref_for: !0 }, _, {
|
|
793
|
-
data:
|
|
796
|
+
data: b,
|
|
794
797
|
column: _
|
|
795
798
|
}), null, 16, ["data", "column"]))
|
|
796
799
|
]))), 128)),
|
|
797
|
-
|
|
798
|
-
|
|
800
|
+
u("td", null, [
|
|
801
|
+
u("span", yo, [
|
|
799
802
|
(a(!0), p(x, null, P(s.actions, (_) => (a(), y(N, {
|
|
803
|
+
"area-label": _.label,
|
|
800
804
|
key: _.label,
|
|
801
805
|
icon: _.icon,
|
|
802
806
|
outline: !0,
|
|
803
|
-
onClick: (D) => _.action(
|
|
807
|
+
onClick: (D) => _.action(b)
|
|
804
808
|
}, {
|
|
805
809
|
default: L(() => [
|
|
806
810
|
z(h(_.label), 1)
|
|
807
811
|
]),
|
|
808
812
|
_: 2
|
|
809
|
-
}, 1032, ["icon", "onClick"]))), 128)),
|
|
813
|
+
}, 1032, ["area-label", "icon", "onClick"]))), 128)),
|
|
810
814
|
l.value ? (a(), y(N, {
|
|
811
815
|
key: 0,
|
|
812
|
-
|
|
816
|
+
"area-label": "Edit",
|
|
817
|
+
icon: g(T).Edit,
|
|
813
818
|
outline: !0,
|
|
814
|
-
onClick: (_) => c(
|
|
819
|
+
onClick: (_) => c(b)
|
|
815
820
|
}, null, 8, ["icon", "onClick"])) : k("", !0),
|
|
816
821
|
r.value ? (a(), y(N, {
|
|
817
822
|
key: 1,
|
|
818
|
-
|
|
823
|
+
"area-label": "Delete",
|
|
824
|
+
icon: g(T).Delete,
|
|
819
825
|
outline: !0,
|
|
820
|
-
onClick: (_) => d(
|
|
826
|
+
onClick: (_) => d(b)
|
|
821
827
|
}, null, 8, ["icon", "onClick"])) : k("", !0)
|
|
822
828
|
])
|
|
823
829
|
])
|
|
824
|
-
]))), 128))
|
|
830
|
+
], 8, ho))), 128))
|
|
825
831
|
])
|
|
826
832
|
]),
|
|
827
833
|
s.page ? (a(), y(lo, {
|
|
@@ -834,43 +840,43 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
834
840
|
}, null, 8, ["total-items", "items-per-page", "current-page"])) : k("", !0)
|
|
835
841
|
], 64));
|
|
836
842
|
}
|
|
837
|
-
}),
|
|
843
|
+
}), wo = (e, t) => {
|
|
838
844
|
const o = e.__vccOpts || e;
|
|
839
845
|
for (const [n, l] of t)
|
|
840
846
|
o[n] = l;
|
|
841
847
|
return o;
|
|
842
|
-
},
|
|
848
|
+
}, ko = {}, _o = { class: "card bg-base-100 shadow-sm" }, $o = { class: "card-body" }, Co = {
|
|
843
849
|
key: 0,
|
|
844
850
|
class: "card-title"
|
|
845
|
-
},
|
|
851
|
+
}, xo = {
|
|
846
852
|
key: 1,
|
|
847
853
|
class: "card-actions justify-end"
|
|
848
854
|
};
|
|
849
|
-
function
|
|
850
|
-
return a(), p("div",
|
|
851
|
-
|
|
855
|
+
function Lo(e, t) {
|
|
856
|
+
return a(), p("div", _o, [
|
|
857
|
+
u("div", $o, [
|
|
852
858
|
e.$slots.title ? (a(), p("h2", Co, [
|
|
853
859
|
M(e.$slots, "title")
|
|
854
860
|
])) : k("", !0),
|
|
855
|
-
|
|
861
|
+
u("p", null, [
|
|
856
862
|
M(e.$slots, "default"),
|
|
857
863
|
M(e.$slots, "content")
|
|
858
864
|
]),
|
|
859
|
-
e.$slots.actions ? (a(), p("div",
|
|
865
|
+
e.$slots.actions ? (a(), p("div", xo, [
|
|
860
866
|
M(e.$slots, "actions")
|
|
861
867
|
])) : k("", !0)
|
|
862
868
|
])
|
|
863
869
|
]);
|
|
864
870
|
}
|
|
865
|
-
const
|
|
871
|
+
const vn = /* @__PURE__ */ wo(ko, [["render", Lo]]), hn = (e, t) => {
|
|
866
872
|
if (!e) return null;
|
|
867
873
|
const o = (n) => {
|
|
868
874
|
e.contains(n.target) || t();
|
|
869
875
|
};
|
|
870
876
|
return document.addEventListener("click", o), o;
|
|
871
|
-
},
|
|
877
|
+
}, yn = (e) => {
|
|
872
878
|
document.removeEventListener("click", e);
|
|
873
|
-
},
|
|
879
|
+
}, wn = {
|
|
874
880
|
beforeMount(e, t) {
|
|
875
881
|
e.clickOutsideEvent = function(o) {
|
|
876
882
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -880,17 +886,17 @@ const fn = /* @__PURE__ */ yo(wo, [["render", xo]]), mn = (e, t) => {
|
|
|
880
886
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
881
887
|
}
|
|
882
888
|
};
|
|
883
|
-
function
|
|
889
|
+
function So(e) {
|
|
884
890
|
return e.replace(/[:\s_-]+(.)/g, (t, o) => o.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
|
|
885
891
|
}
|
|
886
|
-
function
|
|
892
|
+
function kn(e) {
|
|
887
893
|
const t = Ae();
|
|
888
894
|
if (!t)
|
|
889
895
|
return !1;
|
|
890
896
|
const o = t.vnode.props;
|
|
891
897
|
if (!o)
|
|
892
898
|
return !1;
|
|
893
|
-
const n =
|
|
899
|
+
const n = So(e), l = Ie(e);
|
|
894
900
|
return [
|
|
895
901
|
ae(e),
|
|
896
902
|
ae(l),
|
|
@@ -902,7 +908,7 @@ function vn(e) {
|
|
|
902
908
|
(c) => !!o[c]
|
|
903
909
|
);
|
|
904
910
|
}
|
|
905
|
-
const
|
|
911
|
+
const Po = ["select"], ge = {
|
|
906
912
|
options: { type: Array, required: !1 },
|
|
907
913
|
isLoading: {
|
|
908
914
|
type: Boolean,
|
|
@@ -978,16 +984,16 @@ const So = ["select"], be = {
|
|
|
978
984
|
valueKey: { type: String, default: "value" },
|
|
979
985
|
/** add a new button next to the list*/
|
|
980
986
|
enableCreate: { type: Boolean, default: !1 }
|
|
981
|
-
},
|
|
982
|
-
...
|
|
987
|
+
}, Mo = ["select", "clear", "close", "create"], Pe = {
|
|
988
|
+
...ge,
|
|
983
989
|
...ve,
|
|
984
990
|
isOpen: { type: Boolean, default: !1 },
|
|
985
991
|
isActive: { type: Function, default: (e) => !1 }
|
|
986
|
-
},
|
|
992
|
+
}, Bo = {
|
|
987
993
|
key: 1,
|
|
988
994
|
tabindex: "-1",
|
|
989
995
|
class: "pointer-events-none"
|
|
990
|
-
},
|
|
996
|
+
}, Vo = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Ao = ["innerHTML"], Io = {
|
|
991
997
|
key: 0,
|
|
992
998
|
xmlns: "http://www.w3.org/2000/svg",
|
|
993
999
|
class: "h-4 w-4 shrink-0 opacity-80",
|
|
@@ -996,7 +1002,7 @@ const So = ["select"], be = {
|
|
|
996
1002
|
stroke: "currentColor",
|
|
997
1003
|
"stroke-width": "2.5"
|
|
998
1004
|
};
|
|
999
|
-
function
|
|
1005
|
+
function Oo(e, t) {
|
|
1000
1006
|
if (!t) return e;
|
|
1001
1007
|
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1002
1008
|
return e.replace(
|
|
@@ -1004,10 +1010,10 @@ function Io(e, t) {
|
|
|
1004
1010
|
'<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
|
|
1005
1011
|
);
|
|
1006
1012
|
}
|
|
1007
|
-
const
|
|
1013
|
+
const Do = /* @__PURE__ */ w({
|
|
1008
1014
|
__name: "ListResults",
|
|
1009
|
-
props:
|
|
1010
|
-
emits:
|
|
1015
|
+
props: ge,
|
|
1016
|
+
emits: Po,
|
|
1011
1017
|
setup(e, { expose: t, emit: o }) {
|
|
1012
1018
|
const n = e, l = S(-1), r = S(), c = o;
|
|
1013
1019
|
X(
|
|
@@ -1017,7 +1023,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1017
1023
|
}
|
|
1018
1024
|
);
|
|
1019
1025
|
function d() {
|
|
1020
|
-
|
|
1026
|
+
$e(() => {
|
|
1021
1027
|
r.value?.querySelector(
|
|
1022
1028
|
`[data-index="${l.value}"]`
|
|
1023
1029
|
)?.scrollIntoView({ block: "nearest" });
|
|
@@ -1034,11 +1040,11 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1034
1040
|
s.preventDefault(), l.value = l.value <= 0 ? m - 1 : l.value - 1, d();
|
|
1035
1041
|
break;
|
|
1036
1042
|
case "Enter":
|
|
1037
|
-
s.preventDefault(), l.value >= 0 && l.value < m &&
|
|
1043
|
+
s.preventDefault(), l.value >= 0 && l.value < m && i(n.options[l.value]);
|
|
1038
1044
|
break;
|
|
1039
1045
|
}
|
|
1040
1046
|
}
|
|
1041
|
-
function
|
|
1047
|
+
function i(s) {
|
|
1042
1048
|
l.value = -1, c("select", s);
|
|
1043
1049
|
}
|
|
1044
1050
|
return t({ handleKeydown: f }), (s, m) => (a(), p("ul", {
|
|
@@ -1047,79 +1053,79 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1047
1053
|
role: "listbox",
|
|
1048
1054
|
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"
|
|
1049
1055
|
}, [
|
|
1050
|
-
s.isLoading ? (a(), p(x, { key: 0 }, P(2, (
|
|
1051
|
-
key: `skel-${
|
|
1056
|
+
s.isLoading ? (a(), p(x, { key: 0 }, P(2, (b) => u("li", {
|
|
1057
|
+
key: `skel-${b}`,
|
|
1052
1058
|
class: "pointer-events-none px-3 py-2"
|
|
1053
1059
|
}, [...m[0] || (m[0] = [
|
|
1054
|
-
|
|
1055
|
-
|
|
1060
|
+
u("div", { class: "flex items-center gap-3" }, [
|
|
1061
|
+
u("div", { class: "skeleton h-3 w-3/4 rounded" })
|
|
1056
1062
|
], -1)
|
|
1057
|
-
])])), 64)) : s.options.length === 0 ? (a(), p("li",
|
|
1058
|
-
|
|
1059
|
-
])])) : (a(!0), p(x, { key: 2 }, P(s.options, (
|
|
1060
|
-
key:
|
|
1063
|
+
])])), 64)) : s.options.length === 0 ? (a(), p("li", Bo, [...m[1] || (m[1] = [
|
|
1064
|
+
u("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1065
|
+
])])) : (a(!0), p(x, { key: 2 }, P(s.options, (b, _) => (a(), p("li", {
|
|
1066
|
+
key: b.value,
|
|
1061
1067
|
"data-index": _,
|
|
1062
1068
|
role: "option",
|
|
1063
1069
|
"aria-selected": _ === l.value,
|
|
1064
|
-
onMousedown: ce((D) =>
|
|
1070
|
+
onMousedown: ce((D) => i(b), ["prevent"]),
|
|
1065
1071
|
onMousemove: (D) => l.value = _
|
|
1066
1072
|
}, [
|
|
1067
|
-
|
|
1068
|
-
class:
|
|
1073
|
+
u("a", {
|
|
1074
|
+
class: $(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1069
1075
|
"active bg-secondary text-primary-content": _ === l.value,
|
|
1070
1076
|
"hover:bg-base-200": _ !== l.value
|
|
1071
1077
|
}])
|
|
1072
1078
|
}, [
|
|
1073
|
-
|
|
1079
|
+
u("span", {
|
|
1074
1080
|
class: "whitespace-nowrap",
|
|
1075
|
-
innerHTML:
|
|
1076
|
-
}, null, 8,
|
|
1077
|
-
s.isActive(
|
|
1078
|
-
|
|
1081
|
+
innerHTML: Oo(b.label, s.query)
|
|
1082
|
+
}, null, 8, Ao),
|
|
1083
|
+
s.isActive(b) ? (a(), p("svg", Io, [...m[2] || (m[2] = [
|
|
1084
|
+
u("path", {
|
|
1079
1085
|
"stroke-linecap": "round",
|
|
1080
1086
|
"stroke-linejoin": "round",
|
|
1081
1087
|
d: "M5 13l4 4L19 7"
|
|
1082
1088
|
}, null, -1)
|
|
1083
1089
|
])])) : k("", !0)
|
|
1084
1090
|
], 2)
|
|
1085
|
-
], 40,
|
|
1091
|
+
], 40, Vo))), 128))
|
|
1086
1092
|
], 512));
|
|
1087
1093
|
}
|
|
1088
|
-
}), Me = ({ isTouched: e, errors: t }) => !!(e && t),
|
|
1094
|
+
}), Me = ({ isTouched: e, errors: t }) => !!(e && t), Ro = (e, t, o, n) => t === void 0 || t !== void 0 && !e || !n && !o, U = (e, t) => [e, { "input-error": Me(t) }], To = { key: 0 }, Z = /* @__PURE__ */ w({
|
|
1089
1095
|
__name: "ControlWrapper",
|
|
1090
1096
|
props: F,
|
|
1091
1097
|
setup(e) {
|
|
1092
|
-
const t = e, o = v(() => !
|
|
1098
|
+
const t = e, o = v(() => !Ro(
|
|
1093
1099
|
t.visible,
|
|
1094
1100
|
t.description,
|
|
1095
1101
|
t.isFocused,
|
|
1096
1102
|
!0
|
|
1097
1103
|
)), n = v(() => t.required), l = v(() => Me(t)), r = v(() => le(t.styles));
|
|
1098
1104
|
return (c, d) => (a(), p("fieldset", {
|
|
1099
|
-
class:
|
|
1105
|
+
class: $(["fieldset", [c.width, r.value.control.wrapper]])
|
|
1100
1106
|
}, [
|
|
1101
|
-
|
|
1102
|
-
class:
|
|
1107
|
+
u("legend", {
|
|
1108
|
+
class: $(r.value.control.label)
|
|
1103
1109
|
}, [
|
|
1104
1110
|
c.hideLabel ? k("", !0) : (a(), p(x, { key: 0 }, [
|
|
1105
|
-
|
|
1106
|
-
n.value ? (a(), p("span",
|
|
1111
|
+
u("span", null, h(c.label), 1),
|
|
1112
|
+
n.value ? (a(), p("span", To, "*")) : k("", !0)
|
|
1107
1113
|
], 64)),
|
|
1108
1114
|
d[0] || (d[0] = z(" ", -1))
|
|
1109
1115
|
], 2),
|
|
1110
1116
|
M(c.$slots, "default"),
|
|
1111
|
-
|
|
1112
|
-
class:
|
|
1117
|
+
u("p", {
|
|
1118
|
+
class: $(["fieldset-label h-4", { "text-error": l.value }])
|
|
1113
1119
|
}, h(l.value ? c.errors : o.value ? c.description : null), 3)
|
|
1114
1120
|
], 2));
|
|
1115
1121
|
}
|
|
1116
|
-
}),
|
|
1122
|
+
}), zo = { class: "flex items-center w-full" }, No = { class: "overflow-hidden w-full" }, jo = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, qo = {
|
|
1117
1123
|
key: 0,
|
|
1118
1124
|
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1119
1125
|
}, he = /* @__PURE__ */ w({
|
|
1120
1126
|
__name: "SelectWrapper",
|
|
1121
1127
|
props: Pe,
|
|
1122
|
-
emits:
|
|
1128
|
+
emits: Mo,
|
|
1123
1129
|
setup(e, { emit: t }) {
|
|
1124
1130
|
const o = e, n = S(), l = S(), r = t, c = () => {
|
|
1125
1131
|
d(), r("clear");
|
|
@@ -1131,29 +1137,29 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1131
1137
|
return;
|
|
1132
1138
|
}
|
|
1133
1139
|
l.value?.handleKeydown(s);
|
|
1134
|
-
},
|
|
1140
|
+
}, i = (s) => {
|
|
1135
1141
|
n.value && !n.value.contains(s.target) && d();
|
|
1136
1142
|
};
|
|
1137
1143
|
return ke(() => {
|
|
1138
|
-
document.addEventListener("click",
|
|
1144
|
+
document.addEventListener("click", i);
|
|
1139
1145
|
}), Oe(() => {
|
|
1140
|
-
document.removeEventListener("click",
|
|
1146
|
+
document.removeEventListener("click", i);
|
|
1141
1147
|
}), (s, m) => (a(), p("div", {
|
|
1142
1148
|
ref_key: "selectWrapperRef",
|
|
1143
1149
|
ref: n
|
|
1144
1150
|
}, [
|
|
1145
1151
|
V(Z, ee(te(o)), {
|
|
1146
1152
|
default: L(() => [
|
|
1147
|
-
|
|
1148
|
-
|
|
1153
|
+
u("div", zo, [
|
|
1154
|
+
u("div", {
|
|
1149
1155
|
class: "relative w-full",
|
|
1150
1156
|
onKeydown: f
|
|
1151
1157
|
}, [
|
|
1152
|
-
|
|
1158
|
+
u("div", No, [
|
|
1153
1159
|
M(s.$slots, "default")
|
|
1154
1160
|
]),
|
|
1155
|
-
|
|
1156
|
-
s.isLoading && !s.label ? (a(), p("span",
|
|
1161
|
+
u("div", jo, [
|
|
1162
|
+
s.isLoading && !s.label ? (a(), p("span", qo)) : k("", !0),
|
|
1157
1163
|
s.query && !s.isLoading ? (a(), p("button", {
|
|
1158
1164
|
key: 1,
|
|
1159
1165
|
type: "button",
|
|
@@ -1162,7 +1168,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1162
1168
|
"aria-label": "Clear",
|
|
1163
1169
|
onMousedown: ce(c, ["prevent"])
|
|
1164
1170
|
}, [...m[2] || (m[2] = [
|
|
1165
|
-
|
|
1171
|
+
u("svg", {
|
|
1166
1172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1167
1173
|
class: "h-3.5 w-3.5",
|
|
1168
1174
|
fill: "none",
|
|
@@ -1170,7 +1176,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1170
1176
|
stroke: "currentColor",
|
|
1171
1177
|
"stroke-width": "2.5"
|
|
1172
1178
|
}, [
|
|
1173
|
-
|
|
1179
|
+
u("path", {
|
|
1174
1180
|
"stroke-linecap": "round",
|
|
1175
1181
|
"stroke-linejoin": "round",
|
|
1176
1182
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -1179,13 +1185,13 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1179
1185
|
])], 32)) : k("", !0),
|
|
1180
1186
|
(a(), p("svg", {
|
|
1181
1187
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1182
|
-
class:
|
|
1188
|
+
class: $(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": s.isOpen }]),
|
|
1183
1189
|
fill: "none",
|
|
1184
1190
|
viewBox: "0 0 24 24",
|
|
1185
1191
|
stroke: "currentColor",
|
|
1186
1192
|
"stroke-width": "2"
|
|
1187
1193
|
}, [...m[3] || (m[3] = [
|
|
1188
|
-
|
|
1194
|
+
u("path", {
|
|
1189
1195
|
"stroke-linecap": "round",
|
|
1190
1196
|
"stroke-linejoin": "round",
|
|
1191
1197
|
d: "M19 9l-7 7-7-7"
|
|
@@ -1201,7 +1207,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1201
1207
|
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1202
1208
|
}, {
|
|
1203
1209
|
default: L(() => [
|
|
1204
|
-
s.isOpen ? (a(), y(
|
|
1210
|
+
s.isOpen ? (a(), y(Do, {
|
|
1205
1211
|
key: 0,
|
|
1206
1212
|
ref_key: "listResultsRef",
|
|
1207
1213
|
ref: l,
|
|
@@ -1209,7 +1215,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1209
1215
|
options: s.options,
|
|
1210
1216
|
"is-loading": s.isLoading,
|
|
1211
1217
|
"is-active": s.isActive,
|
|
1212
|
-
onSelect: m[0] || (m[0] = (
|
|
1218
|
+
onSelect: m[0] || (m[0] = (b) => r("select", b))
|
|
1213
1219
|
}, null, 8, ["query", "options", "is-loading", "is-active"])) : k("", !0)
|
|
1214
1220
|
]),
|
|
1215
1221
|
_: 1
|
|
@@ -1221,7 +1227,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1221
1227
|
color: "blank",
|
|
1222
1228
|
size: "lg",
|
|
1223
1229
|
tooltip: "Create new",
|
|
1224
|
-
onClick: m[1] || (m[1] = (
|
|
1230
|
+
onClick: m[1] || (m[1] = (b) => r("create"))
|
|
1225
1231
|
})) : k("", !0)
|
|
1226
1232
|
])
|
|
1227
1233
|
]),
|
|
@@ -1235,15 +1241,15 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1235
1241
|
}, re = (e, t) => {
|
|
1236
1242
|
if (e)
|
|
1237
1243
|
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1238
|
-
},
|
|
1244
|
+
}, Eo = (e) => {
|
|
1239
1245
|
const t = S([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
|
|
1240
1246
|
const m = [];
|
|
1241
|
-
o.clear(), n.clear(), s?.forEach((
|
|
1247
|
+
o.clear(), n.clear(), s?.forEach((b) => {
|
|
1242
1248
|
const _ = {
|
|
1243
|
-
value: re(
|
|
1244
|
-
label: ie(
|
|
1249
|
+
value: re(b, e),
|
|
1250
|
+
label: ie(b, e)
|
|
1245
1251
|
};
|
|
1246
|
-
o.set(_.value,
|
|
1252
|
+
o.set(_.value, b), m.push(_);
|
|
1247
1253
|
}), t.value = m;
|
|
1248
1254
|
}, r = (s) => o.get(s.value);
|
|
1249
1255
|
return {
|
|
@@ -1255,7 +1261,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1255
1261
|
getOption: (s) => n.get(re(s, e)),
|
|
1256
1262
|
getOriginals: (...s) => s.map(r).filter(Boolean)
|
|
1257
1263
|
};
|
|
1258
|
-
}, ye = (e) =>
|
|
1264
|
+
}, ye = (e) => Eo(e), Fo = ["aria-label"], _n = /* @__PURE__ */ w({
|
|
1259
1265
|
__name: "SelectComponent",
|
|
1260
1266
|
props: /* @__PURE__ */ O(ve, {
|
|
1261
1267
|
modelValue: {},
|
|
@@ -1273,41 +1279,43 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1273
1279
|
);
|
|
1274
1280
|
const f = (A) => {
|
|
1275
1281
|
l("change", A);
|
|
1276
|
-
},
|
|
1282
|
+
}, i = v(
|
|
1277
1283
|
() => r.value ? c.getLabels(r.value)[0] : ""
|
|
1278
1284
|
), s = v(() => le(n.styles)), m = v(
|
|
1279
1285
|
() => U(s.value.control.select, n)
|
|
1280
|
-
),
|
|
1281
|
-
const
|
|
1282
|
-
r.value =
|
|
1286
|
+
), b = (A) => {
|
|
1287
|
+
const C = c.getOriginal(A);
|
|
1288
|
+
r.value = C, f(C);
|
|
1283
1289
|
}, _ = () => {
|
|
1284
1290
|
o.value = !1, r.value = null, f(void 0);
|
|
1285
1291
|
}, D = (A) => c.getValues(r.value)?.[0] === A.value, K = () => {
|
|
1286
1292
|
o.value = !1;
|
|
1287
1293
|
};
|
|
1288
|
-
return (A,
|
|
1289
|
-
options:
|
|
1294
|
+
return (A, C) => (a(), y(he, B(n, {
|
|
1295
|
+
options: g(d),
|
|
1290
1296
|
disabled: !A.enabled,
|
|
1291
1297
|
"is-open": o.value,
|
|
1292
|
-
query:
|
|
1298
|
+
query: i.value,
|
|
1293
1299
|
"is-active": D,
|
|
1294
1300
|
onClose: K,
|
|
1295
|
-
onSelect:
|
|
1301
|
+
onSelect: b,
|
|
1296
1302
|
onClear: _
|
|
1297
1303
|
}), {
|
|
1298
1304
|
default: L(() => [
|
|
1299
|
-
|
|
1305
|
+
u("button", {
|
|
1300
1306
|
type: "button",
|
|
1301
|
-
class:
|
|
1302
|
-
onClick:
|
|
1303
|
-
|
|
1307
|
+
class: $(["truncate block text-left", [m.value, A.width]]),
|
|
1308
|
+
onClick: C[0] || (C[0] = (R) => o.value = !0),
|
|
1309
|
+
"aria-label": A.id,
|
|
1310
|
+
role: "combobox"
|
|
1311
|
+
}, h(i.value ?? "Select value"), 11, Fo)
|
|
1304
1312
|
]),
|
|
1305
1313
|
_: 1
|
|
1306
1314
|
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1307
1315
|
}
|
|
1308
|
-
}),
|
|
1316
|
+
}), Uo = {
|
|
1309
1317
|
...ve,
|
|
1310
|
-
...
|
|
1318
|
+
...ge,
|
|
1311
1319
|
/** v-model binding */
|
|
1312
1320
|
modelValue: {
|
|
1313
1321
|
type: [String, Object],
|
|
@@ -1338,7 +1346,7 @@ const Oo = /* @__PURE__ */ w({
|
|
|
1338
1346
|
default: !1
|
|
1339
1347
|
}
|
|
1340
1348
|
};
|
|
1341
|
-
function
|
|
1349
|
+
function Ko(e) {
|
|
1342
1350
|
const t = S([]), o = S(!1);
|
|
1343
1351
|
function n(r) {
|
|
1344
1352
|
if (!e.options) {
|
|
@@ -1355,16 +1363,16 @@ function Fo(e) {
|
|
|
1355
1363
|
}
|
|
1356
1364
|
return { results: t, isLoading: o, search: n, clear: l };
|
|
1357
1365
|
}
|
|
1358
|
-
function
|
|
1366
|
+
function Ho(e) {
|
|
1359
1367
|
const t = S([]), o = S(!1);
|
|
1360
1368
|
let n = null, l = null;
|
|
1361
1369
|
async function r(f) {
|
|
1362
1370
|
l && l.abort(), l = new AbortController(), o.value = !0;
|
|
1363
1371
|
try {
|
|
1364
|
-
const
|
|
1365
|
-
t.value = (
|
|
1366
|
-
} catch (
|
|
1367
|
-
|
|
1372
|
+
const i = await e.fetchOptions(f, l.signal);
|
|
1373
|
+
t.value = (i || []).slice(0, e.maxResults);
|
|
1374
|
+
} catch (i) {
|
|
1375
|
+
i.name !== "AbortError" && (t.value = []);
|
|
1368
1376
|
} finally {
|
|
1369
1377
|
o.value = !1;
|
|
1370
1378
|
}
|
|
@@ -1379,8 +1387,8 @@ function Uo(e) {
|
|
|
1379
1387
|
}
|
|
1380
1388
|
return { results: t, isLoading: o, search: c, clear: d };
|
|
1381
1389
|
}
|
|
1382
|
-
function
|
|
1383
|
-
const t = e.fetchOptions ?
|
|
1390
|
+
function Wo(e) {
|
|
1391
|
+
const t = e.fetchOptions ? Ho(e) : Ko(e);
|
|
1384
1392
|
function o(n) {
|
|
1385
1393
|
t.search(n);
|
|
1386
1394
|
}
|
|
@@ -1391,12 +1399,12 @@ function Ko(e) {
|
|
|
1391
1399
|
clear: t.clear
|
|
1392
1400
|
};
|
|
1393
1401
|
}
|
|
1394
|
-
const
|
|
1402
|
+
const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], $n = /* @__PURE__ */ w({
|
|
1395
1403
|
__name: "AutoComplete",
|
|
1396
|
-
props:
|
|
1404
|
+
props: Uo,
|
|
1397
1405
|
emits: ["update:modelValue", "change", "clear", "focus", "blur"],
|
|
1398
1406
|
setup(e, { emit: t }) {
|
|
1399
|
-
const o = e, n = t, l = S(null), r = S(""), c = S(!1), d =
|
|
1407
|
+
const o = e, n = t, l = S(null), r = S(""), c = S(!1), d = Wo(o), { isLoading: f, triggerSearch: i, clear: s } = d, m = ye(o), { options: b } = m;
|
|
1400
1408
|
X(
|
|
1401
1409
|
() => d.results.value,
|
|
1402
1410
|
() => {
|
|
@@ -1416,9 +1424,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1416
1424
|
{ immediate: !0 }
|
|
1417
1425
|
);
|
|
1418
1426
|
const _ = (I) => {
|
|
1419
|
-
r.value = I.target.value, o.freeText ? n("update:modelValue", r.value) : n("update:modelValue", ""),
|
|
1427
|
+
r.value = I.target.value, o.freeText ? n("update:modelValue", r.value) : n("update:modelValue", ""), i(r.value), c.value = !0;
|
|
1420
1428
|
}, D = () => {
|
|
1421
|
-
|
|
1429
|
+
i(r.value), c.value = !0;
|
|
1422
1430
|
};
|
|
1423
1431
|
function K() {
|
|
1424
1432
|
setTimeout(() => {
|
|
@@ -1428,47 +1436,48 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1428
1436
|
const A = (I) => {
|
|
1429
1437
|
const W = m.getOriginal(I);
|
|
1430
1438
|
r.value = I.label, c.value = !1, n("update:modelValue", W), n("change", W);
|
|
1431
|
-
},
|
|
1432
|
-
r.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"),
|
|
1439
|
+
}, C = () => {
|
|
1440
|
+
r.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), $e(() => l.value?.focus());
|
|
1433
1441
|
}, R = () => {
|
|
1434
1442
|
c.value = !1;
|
|
1435
1443
|
}, H = v(() => le(o.styles)), Be = v(
|
|
1436
1444
|
() => U(H.value.control.select, o)
|
|
1437
1445
|
);
|
|
1438
1446
|
return (I, W) => (a(), y(he, B(o, {
|
|
1439
|
-
options: b
|
|
1440
|
-
"is-loading":
|
|
1447
|
+
options: g(b),
|
|
1448
|
+
"is-loading": g(f),
|
|
1441
1449
|
"is-open": c.value,
|
|
1442
1450
|
query: r.value,
|
|
1443
1451
|
onClose: R,
|
|
1444
1452
|
onSelect: A,
|
|
1445
|
-
onClear:
|
|
1453
|
+
onClear: C
|
|
1446
1454
|
}), {
|
|
1447
1455
|
default: L(() => [
|
|
1448
|
-
|
|
1456
|
+
u("input", {
|
|
1449
1457
|
ref_key: "inputRef",
|
|
1450
1458
|
ref: l,
|
|
1451
1459
|
type: "text",
|
|
1452
1460
|
role: "combobox",
|
|
1461
|
+
"aria-label": I.id,
|
|
1453
1462
|
"aria-expanded": c.value,
|
|
1454
1463
|
"aria-autocomplete": "list",
|
|
1455
1464
|
"aria-haspopup": "listbox",
|
|
1456
1465
|
autocomplete: "off",
|
|
1457
1466
|
autocorrect: "off",
|
|
1458
1467
|
spellcheck: "false",
|
|
1459
|
-
class:
|
|
1468
|
+
class: $([Be.value, "w-full"]),
|
|
1460
1469
|
value: r.value,
|
|
1461
1470
|
placeholder: I.placeholder,
|
|
1462
1471
|
disabled: !I.enabled,
|
|
1463
1472
|
onInput: _,
|
|
1464
1473
|
onFocus: D,
|
|
1465
1474
|
onBlur: K
|
|
1466
|
-
}, null, 42,
|
|
1475
|
+
}, null, 42, Go)
|
|
1467
1476
|
]),
|
|
1468
1477
|
_: 1
|
|
1469
1478
|
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1470
1479
|
}
|
|
1471
|
-
}),
|
|
1480
|
+
}), Xo = ["aria-label"], Cn = /* @__PURE__ */ w({
|
|
1472
1481
|
__name: "MultiSelect",
|
|
1473
1482
|
props: /* @__PURE__ */ O(Pe, {
|
|
1474
1483
|
modelValue: {},
|
|
@@ -1476,8 +1485,8 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1476
1485
|
}),
|
|
1477
1486
|
emits: /* @__PURE__ */ O(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1478
1487
|
setup(e, { emit: t }) {
|
|
1479
|
-
const o = S(!1), n = e, l = t, r = E(e, "modelValue"), c = (
|
|
1480
|
-
l("change",
|
|
1488
|
+
const o = S(!1), n = e, l = t, r = E(e, "modelValue"), c = (C) => {
|
|
1489
|
+
l("change", C);
|
|
1481
1490
|
}, d = ye(n), { options: f } = d;
|
|
1482
1491
|
X(
|
|
1483
1492
|
() => n.options,
|
|
@@ -1486,49 +1495,51 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1486
1495
|
},
|
|
1487
1496
|
{ immediate: !0 }
|
|
1488
1497
|
);
|
|
1489
|
-
const
|
|
1498
|
+
const i = v(
|
|
1490
1499
|
() => r.value ? d.getLabels(...r.value).join(", ") : void 0
|
|
1491
1500
|
), s = v(
|
|
1492
1501
|
() => d.getValues(...r.value ?? [])
|
|
1493
|
-
), m = (
|
|
1502
|
+
), m = (C) => {
|
|
1494
1503
|
let R = r.value ?? [];
|
|
1495
|
-
if (D(
|
|
1504
|
+
if (D(C))
|
|
1496
1505
|
R = R.filter(
|
|
1497
|
-
(H) => d.getOption(H) !==
|
|
1506
|
+
(H) => d.getOption(H) !== C.value
|
|
1498
1507
|
);
|
|
1499
1508
|
else {
|
|
1500
|
-
const H = d.getOriginal(
|
|
1509
|
+
const H = d.getOriginal(C);
|
|
1501
1510
|
R.push(H);
|
|
1502
1511
|
}
|
|
1503
1512
|
r.value = R, c(R);
|
|
1504
|
-
},
|
|
1513
|
+
}, b = () => {
|
|
1505
1514
|
o.value = !1, r.value = [], c([]);
|
|
1506
1515
|
}, _ = () => {
|
|
1507
1516
|
o.value = !1;
|
|
1508
|
-
}, D = (
|
|
1517
|
+
}, D = (C) => s.value?.includes(C.value) ?? !1, K = v(() => le(n.styles)), A = v(
|
|
1509
1518
|
() => U(K.value.control.select, n)
|
|
1510
1519
|
);
|
|
1511
|
-
return (
|
|
1512
|
-
options:
|
|
1520
|
+
return (C, R) => (a(), y(he, B(n, {
|
|
1521
|
+
options: g(f),
|
|
1513
1522
|
"is-open": o.value,
|
|
1514
|
-
disabled:
|
|
1515
|
-
query:
|
|
1523
|
+
disabled: !C.enabled,
|
|
1524
|
+
query: i.value,
|
|
1516
1525
|
"is-active": D,
|
|
1517
1526
|
onClose: _,
|
|
1518
1527
|
onSelect: m,
|
|
1519
|
-
onClear:
|
|
1528
|
+
onClear: b
|
|
1520
1529
|
}), {
|
|
1521
1530
|
default: L(() => [
|
|
1522
|
-
|
|
1531
|
+
u("button", {
|
|
1523
1532
|
type: "button",
|
|
1524
|
-
class:
|
|
1525
|
-
onClick: R[0] || (R[0] = (H) => o.value = !0)
|
|
1526
|
-
|
|
1533
|
+
class: $(["truncate block text-left", [A.value, C.width]]),
|
|
1534
|
+
onClick: R[0] || (R[0] = (H) => o.value = !0),
|
|
1535
|
+
"aria-label": C.id,
|
|
1536
|
+
role: "combobox"
|
|
1537
|
+
}, h(i.value ?? "Select value"), 11, Xo)
|
|
1527
1538
|
]),
|
|
1528
1539
|
_: 1
|
|
1529
1540
|
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1530
1541
|
}
|
|
1531
|
-
}),
|
|
1542
|
+
}), Zo = ["change"], Jo = {
|
|
1532
1543
|
...F,
|
|
1533
1544
|
width: { type: String, default: "w-48" },
|
|
1534
1545
|
minHeight: { type: String, default: "min-h-96" },
|
|
@@ -1547,13 +1558,13 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1547
1558
|
}
|
|
1548
1559
|
]
|
|
1549
1560
|
}
|
|
1550
|
-
},
|
|
1561
|
+
}, Qo = ["aria-label"], Yo = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, es = ["title", "onClick"], ts = ["innerHTML"], os = { class: "card-body p-3" }, xn = /* @__PURE__ */ w({
|
|
1551
1562
|
__name: "Markdown",
|
|
1552
|
-
props: /* @__PURE__ */ O(
|
|
1563
|
+
props: /* @__PURE__ */ O(Jo, {
|
|
1553
1564
|
modelValue: {},
|
|
1554
1565
|
modelModifiers: {}
|
|
1555
1566
|
}),
|
|
1556
|
-
emits: /* @__PURE__ */ O(
|
|
1567
|
+
emits: /* @__PURE__ */ O(Zo, ["update:modelValue"]),
|
|
1557
1568
|
setup(e, { emit: t }) {
|
|
1558
1569
|
const o = e, n = t, l = E(e, "modelValue"), r = at({
|
|
1559
1570
|
content: l.value ?? "",
|
|
@@ -1583,212 +1594,219 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1583
1594
|
r.value?.destroy();
|
|
1584
1595
|
}), (c, d) => (a(), y(Z, ee(te(o)), {
|
|
1585
1596
|
default: L(() => [
|
|
1586
|
-
|
|
1587
|
-
class:
|
|
1597
|
+
u("div", {
|
|
1598
|
+
class: $([[c.minHeight], "card bg-base-100 border border-base-300 w-full"]),
|
|
1599
|
+
"aria-label": c.id,
|
|
1600
|
+
role: "textbox"
|
|
1588
1601
|
}, [
|
|
1589
|
-
|
|
1602
|
+
u("div", Yo, [
|
|
1590
1603
|
(a(!0), p(x, null, P(c.actions, (f) => (a(), p("button", {
|
|
1591
1604
|
key: f.name,
|
|
1592
1605
|
tabindex: "-1",
|
|
1593
1606
|
type: "button",
|
|
1594
|
-
class:
|
|
1607
|
+
class: $(["btn btn-sm btn-ghost", { "btn-active": g(r)?.isActive(f.name) }]),
|
|
1595
1608
|
title: f.label,
|
|
1596
|
-
onClick: (
|
|
1609
|
+
onClick: (i) => f.action(g(r))
|
|
1597
1610
|
}, [
|
|
1598
|
-
|
|
1611
|
+
u("span", {
|
|
1599
1612
|
innerHTML: f.label
|
|
1600
|
-
}, null, 8,
|
|
1601
|
-
], 10,
|
|
1613
|
+
}, null, 8, ts)
|
|
1614
|
+
], 10, es))), 128))
|
|
1602
1615
|
]),
|
|
1603
|
-
|
|
1604
|
-
V(
|
|
1605
|
-
editor:
|
|
1616
|
+
u("div", os, [
|
|
1617
|
+
V(g(rt), {
|
|
1618
|
+
editor: g(r),
|
|
1606
1619
|
class: "prose prose-sm max-w-none h-full"
|
|
1607
1620
|
}, null, 8, ["editor"])
|
|
1608
1621
|
])
|
|
1609
|
-
],
|
|
1622
|
+
], 10, Qo)
|
|
1610
1623
|
]),
|
|
1611
1624
|
_: 1
|
|
1612
1625
|
}, 16));
|
|
1613
1626
|
}
|
|
1614
|
-
}),
|
|
1627
|
+
}), ss = {
|
|
1615
1628
|
...F
|
|
1616
|
-
},
|
|
1629
|
+
}, ns = ["change", "focus", "blur"], ls = { class: "flex items-center justify-center h-full" }, as = { class: "fieldset-label" }, rs = ["aria-label", "disabled"], is = { class: "font-bold text-gray-500 text-sm" }, Ln = /* @__PURE__ */ w({
|
|
1617
1630
|
__name: "Checkbox",
|
|
1618
|
-
props: /* @__PURE__ */ O(
|
|
1631
|
+
props: /* @__PURE__ */ O(ss, {
|
|
1619
1632
|
modelValue: {},
|
|
1620
1633
|
modelModifiers: {}
|
|
1621
1634
|
}),
|
|
1622
|
-
emits: /* @__PURE__ */ O(
|
|
1635
|
+
emits: /* @__PURE__ */ O(ns, ["update:modelValue"]),
|
|
1623
1636
|
setup(e, { emit: t }) {
|
|
1624
|
-
const o = e, n = t, l = E(e, "modelValue"), r = (
|
|
1625
|
-
n("change",
|
|
1626
|
-
}, c = (
|
|
1627
|
-
n("focus",
|
|
1628
|
-
}, d = (
|
|
1629
|
-
n("blur",
|
|
1637
|
+
const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
|
|
1638
|
+
n("change", i);
|
|
1639
|
+
}, c = (i) => {
|
|
1640
|
+
n("focus", i);
|
|
1641
|
+
}, d = (i) => {
|
|
1642
|
+
n("blur", i);
|
|
1630
1643
|
}, f = v(
|
|
1631
1644
|
() => U(o.styles.control.checkbox, o)
|
|
1632
1645
|
);
|
|
1633
|
-
return (
|
|
1646
|
+
return (i, s) => (a(), p("div", ls, [
|
|
1634
1647
|
V(Z, B(o, { "hide-label": !0 }), {
|
|
1635
1648
|
default: L(() => [
|
|
1636
|
-
|
|
1637
|
-
Y(
|
|
1649
|
+
u("label", as, [
|
|
1650
|
+
Y(u("input", {
|
|
1638
1651
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1652
|
+
"aria-label": i.id,
|
|
1653
|
+
role: "checkbox",
|
|
1639
1654
|
type: "checkbox",
|
|
1640
|
-
class:
|
|
1641
|
-
disabled: !
|
|
1655
|
+
class: $(f.value),
|
|
1656
|
+
disabled: !i.enabled,
|
|
1642
1657
|
onChange: r,
|
|
1643
1658
|
onFocus: c,
|
|
1644
1659
|
onBlur: d
|
|
1645
|
-
}, null, 42,
|
|
1660
|
+
}, null, 42, rs), [
|
|
1646
1661
|
[_e, l.value]
|
|
1647
1662
|
]),
|
|
1648
|
-
|
|
1663
|
+
u("span", is, h(i.label), 1)
|
|
1649
1664
|
])
|
|
1650
1665
|
]),
|
|
1651
1666
|
_: 1
|
|
1652
1667
|
}, 16)
|
|
1653
1668
|
]));
|
|
1654
1669
|
}
|
|
1655
|
-
}),
|
|
1670
|
+
}), us = {
|
|
1656
1671
|
...F,
|
|
1657
1672
|
type: { type: String, default: "text" }
|
|
1658
|
-
},
|
|
1673
|
+
}, cs = ["change", "focus", "blur"], ds = ["aria-label", "type", "disabled", "autofocus", "placeholder"], Sn = /* @__PURE__ */ w({
|
|
1659
1674
|
__name: "Input",
|
|
1660
|
-
props: /* @__PURE__ */ O(
|
|
1675
|
+
props: /* @__PURE__ */ O(us, {
|
|
1661
1676
|
modelValue: {},
|
|
1662
1677
|
modelModifiers: {}
|
|
1663
1678
|
}),
|
|
1664
|
-
emits: /* @__PURE__ */ O(
|
|
1679
|
+
emits: /* @__PURE__ */ O(cs, ["update:modelValue"]),
|
|
1665
1680
|
setup(e, { emit: t }) {
|
|
1666
|
-
const o = e, n = t, l = E(e, "modelValue"), r = (
|
|
1667
|
-
n("change",
|
|
1668
|
-
}, c = (
|
|
1669
|
-
n("focus",
|
|
1670
|
-
}, d = (
|
|
1671
|
-
n("blur",
|
|
1681
|
+
const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
|
|
1682
|
+
n("change", i);
|
|
1683
|
+
}, c = (i) => {
|
|
1684
|
+
n("focus", i);
|
|
1685
|
+
}, d = (i) => {
|
|
1686
|
+
n("blur", i);
|
|
1672
1687
|
}, f = v(
|
|
1673
1688
|
() => U(o.styles.control.input, o)
|
|
1674
1689
|
);
|
|
1675
|
-
return (
|
|
1690
|
+
return (i, s) => (a(), y(Z, ee(te(o)), {
|
|
1676
1691
|
default: L(() => [
|
|
1677
|
-
Y(
|
|
1692
|
+
Y(u("input", {
|
|
1678
1693
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1694
|
+
"aria-label": i.id,
|
|
1679
1695
|
autocomplete: "off",
|
|
1680
|
-
type:
|
|
1681
|
-
class:
|
|
1682
|
-
disabled: !
|
|
1683
|
-
autofocus:
|
|
1684
|
-
placeholder:
|
|
1696
|
+
type: i.type,
|
|
1697
|
+
class: $(["w-full", f.value]),
|
|
1698
|
+
disabled: !i.enabled,
|
|
1699
|
+
autofocus: i.isFocused,
|
|
1700
|
+
placeholder: i.placeholder,
|
|
1685
1701
|
onChange: r,
|
|
1686
1702
|
onFocus: c,
|
|
1687
1703
|
onBlur: d
|
|
1688
|
-
}, null, 42,
|
|
1704
|
+
}, null, 42, ds), [
|
|
1689
1705
|
[Te, l.value]
|
|
1690
1706
|
])
|
|
1691
1707
|
]),
|
|
1692
1708
|
_: 1
|
|
1693
1709
|
}, 16));
|
|
1694
1710
|
}
|
|
1695
|
-
}),
|
|
1711
|
+
}), ps = {
|
|
1696
1712
|
...F,
|
|
1697
1713
|
steps: { type: Number, default: 1 }
|
|
1698
|
-
},
|
|
1714
|
+
}, fs = ["change", "focus", "blur"], ms = ["aria-label", "disabled", "step", "autofocus", "placeholder"], Pn = /* @__PURE__ */ w({
|
|
1699
1715
|
__name: "InputNumber",
|
|
1700
|
-
props: /* @__PURE__ */ O(
|
|
1716
|
+
props: /* @__PURE__ */ O(ps, {
|
|
1701
1717
|
modelValue: {},
|
|
1702
1718
|
modelModifiers: {}
|
|
1703
1719
|
}),
|
|
1704
|
-
emits: /* @__PURE__ */ O(
|
|
1720
|
+
emits: /* @__PURE__ */ O(fs, ["update:modelValue"]),
|
|
1705
1721
|
setup(e, { emit: t }) {
|
|
1706
|
-
const o = e, n = t, l = E(e, "modelValue"), r = (
|
|
1707
|
-
n("change",
|
|
1708
|
-
}, c = (
|
|
1709
|
-
n("focus",
|
|
1710
|
-
}, d = (
|
|
1711
|
-
n("blur",
|
|
1722
|
+
const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
|
|
1723
|
+
n("change", i);
|
|
1724
|
+
}, c = (i) => {
|
|
1725
|
+
n("focus", i);
|
|
1726
|
+
}, d = (i) => {
|
|
1727
|
+
n("blur", i);
|
|
1712
1728
|
}, f = v(
|
|
1713
1729
|
() => U(o.styles.control.input, o)
|
|
1714
1730
|
);
|
|
1715
|
-
return (
|
|
1731
|
+
return (i, s) => (a(), y(Z, ee(te(o)), {
|
|
1716
1732
|
default: L(() => [
|
|
1717
|
-
Y(
|
|
1733
|
+
Y(u("input", {
|
|
1718
1734
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1719
1735
|
autocomplete: "off",
|
|
1736
|
+
"aria-label": i.id,
|
|
1720
1737
|
type: "number",
|
|
1721
|
-
class:
|
|
1722
|
-
disabled: !
|
|
1723
|
-
step:
|
|
1724
|
-
autofocus:
|
|
1725
|
-
placeholder:
|
|
1738
|
+
class: $(["w-full", [f.value]]),
|
|
1739
|
+
disabled: !i.enabled,
|
|
1740
|
+
step: i.steps,
|
|
1741
|
+
autofocus: i.isFocused,
|
|
1742
|
+
placeholder: i.placeholder,
|
|
1726
1743
|
onChange: r,
|
|
1727
1744
|
onFocus: c,
|
|
1728
1745
|
onBlur: d
|
|
1729
|
-
}, null, 42,
|
|
1730
|
-
[
|
|
1746
|
+
}, null, 42, ms), [
|
|
1747
|
+
[Ce, l.value]
|
|
1731
1748
|
])
|
|
1732
1749
|
]),
|
|
1733
1750
|
_: 1
|
|
1734
1751
|
}, 16));
|
|
1735
1752
|
}
|
|
1736
|
-
}),
|
|
1753
|
+
}), bs = {
|
|
1737
1754
|
...F,
|
|
1738
1755
|
rows: { type: Number, default: 4 }
|
|
1739
|
-
},
|
|
1756
|
+
}, gs = ["change", "focus", "blur"], vs = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], Mn = /* @__PURE__ */ w({
|
|
1740
1757
|
__name: "Textarea",
|
|
1741
|
-
props: /* @__PURE__ */ O(
|
|
1758
|
+
props: /* @__PURE__ */ O(bs, {
|
|
1742
1759
|
modelValue: {},
|
|
1743
1760
|
modelModifiers: {}
|
|
1744
1761
|
}),
|
|
1745
|
-
emits: /* @__PURE__ */ O(
|
|
1762
|
+
emits: /* @__PURE__ */ O(gs, ["update:modelValue"]),
|
|
1746
1763
|
setup(e, { emit: t }) {
|
|
1747
|
-
const o = e, n = t, l = E(e, "modelValue"), r = (
|
|
1748
|
-
n("change",
|
|
1749
|
-
}, c = (
|
|
1750
|
-
n("focus",
|
|
1751
|
-
}, d = (
|
|
1752
|
-
n("blur",
|
|
1764
|
+
const o = e, n = t, l = E(e, "modelValue"), r = (i) => {
|
|
1765
|
+
n("change", i);
|
|
1766
|
+
}, c = (i) => {
|
|
1767
|
+
n("focus", i);
|
|
1768
|
+
}, d = (i) => {
|
|
1769
|
+
n("blur", i);
|
|
1753
1770
|
}, f = v(
|
|
1754
1771
|
() => U(o.styles.control.textarea, o)
|
|
1755
1772
|
);
|
|
1756
|
-
return (
|
|
1773
|
+
return (i, s) => (a(), y(Z, ee(te(o)), {
|
|
1757
1774
|
default: L(() => [
|
|
1758
|
-
Y(
|
|
1775
|
+
Y(u("textarea", {
|
|
1759
1776
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1760
1777
|
autocomplete: "off",
|
|
1761
1778
|
type: "text",
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1779
|
+
"aria-label": i.id,
|
|
1780
|
+
class: $(["w-full", f.value]),
|
|
1781
|
+
disabled: !i.enabled,
|
|
1782
|
+
rows: i.rows,
|
|
1783
|
+
autofocus: i.isFocused,
|
|
1784
|
+
placeholder: i.placeholder,
|
|
1767
1785
|
onChange: r,
|
|
1768
1786
|
onFocus: c,
|
|
1769
1787
|
onBlur: d
|
|
1770
|
-
}, null, 42,
|
|
1771
|
-
[
|
|
1788
|
+
}, null, 42, vs), [
|
|
1789
|
+
[Ce, l.value]
|
|
1772
1790
|
])
|
|
1773
1791
|
]),
|
|
1774
1792
|
_: 1
|
|
1775
1793
|
}, 16));
|
|
1776
1794
|
}
|
|
1777
|
-
}),
|
|
1795
|
+
}), hs = {
|
|
1778
1796
|
widthLeft: { type: Number, default: 200 },
|
|
1779
1797
|
widthRight: { type: Number, default: 200 },
|
|
1780
1798
|
initialLeftOpen: { type: Boolean, default: !0 },
|
|
1781
1799
|
initialRightOpen: { type: Boolean, default: !0 }
|
|
1782
|
-
},
|
|
1800
|
+
}, ys = { class: "flex h-full overflow-hidden gap-2" }, ws = {
|
|
1783
1801
|
key: 0,
|
|
1784
1802
|
id: "drawer-left",
|
|
1785
1803
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1786
|
-
},
|
|
1804
|
+
}, ks = { class: "flex-1 overflow-y-auto bg-white" }, _s = {
|
|
1787
1805
|
key: 1,
|
|
1788
1806
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1789
|
-
},
|
|
1807
|
+
}, Bn = /* @__PURE__ */ w({
|
|
1790
1808
|
__name: "drawer",
|
|
1791
|
-
props:
|
|
1809
|
+
props: hs,
|
|
1792
1810
|
setup(e) {
|
|
1793
1811
|
const t = e, o = xe(), n = v(() => !!o["left-drawer"]), l = v(() => !!o["right-drawer"]), r = S({
|
|
1794
1812
|
left: t.initialLeftOpen,
|
|
@@ -1796,47 +1814,47 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1796
1814
|
}), c = (d) => {
|
|
1797
1815
|
r.value[d] = !r.value[d];
|
|
1798
1816
|
};
|
|
1799
|
-
return (d, f) => (a(), p("main",
|
|
1800
|
-
n.value ? (a(), p("aside",
|
|
1801
|
-
|
|
1817
|
+
return (d, f) => (a(), p("main", ys, [
|
|
1818
|
+
n.value ? (a(), p("aside", ws, [
|
|
1819
|
+
u("div", {
|
|
1802
1820
|
style: G({ width: r.value.left ? d.widthLeft + "px" : "0px" }),
|
|
1803
1821
|
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1804
1822
|
}, [
|
|
1805
|
-
|
|
1823
|
+
u("div", {
|
|
1806
1824
|
style: G({ width: d.widthLeft + "px" }),
|
|
1807
1825
|
class: "h-full overflow-y-auto p-4"
|
|
1808
1826
|
}, [
|
|
1809
1827
|
M(d.$slots, "left-drawer")
|
|
1810
1828
|
], 4)
|
|
1811
1829
|
], 4),
|
|
1812
|
-
|
|
1830
|
+
u("button", {
|
|
1813
1831
|
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
1814
|
-
onClick: f[0] || (f[0] = (
|
|
1832
|
+
onClick: f[0] || (f[0] = (i) => c("left"))
|
|
1815
1833
|
}, [
|
|
1816
|
-
V(
|
|
1834
|
+
V(g(q), {
|
|
1817
1835
|
size: "lg",
|
|
1818
|
-
icon: r.value.left ?
|
|
1836
|
+
icon: r.value.left ? g(T).ChevronLeft : g(T).ChevronRight
|
|
1819
1837
|
}, null, 8, ["icon"])
|
|
1820
1838
|
])
|
|
1821
1839
|
])) : k("", !0),
|
|
1822
|
-
|
|
1840
|
+
u("div", ks, [
|
|
1823
1841
|
M(d.$slots, "default")
|
|
1824
1842
|
]),
|
|
1825
|
-
l.value ? (a(), p("aside",
|
|
1826
|
-
|
|
1843
|
+
l.value ? (a(), p("aside", _s, [
|
|
1844
|
+
u("button", {
|
|
1827
1845
|
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
1828
|
-
onClick: f[1] || (f[1] = (
|
|
1846
|
+
onClick: f[1] || (f[1] = (i) => c("right"))
|
|
1829
1847
|
}, [
|
|
1830
|
-
V(
|
|
1848
|
+
V(g(q), {
|
|
1831
1849
|
size: "lg",
|
|
1832
|
-
icon: r.value.right ?
|
|
1850
|
+
icon: r.value.right ? g(T).ChevronRight : g(T).ChevronLeft
|
|
1833
1851
|
}, null, 8, ["icon"])
|
|
1834
1852
|
]),
|
|
1835
|
-
|
|
1853
|
+
u("div", {
|
|
1836
1854
|
style: G({ width: r.value.right ? d.widthRight + "px" : "0px" }),
|
|
1837
1855
|
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1838
1856
|
}, [
|
|
1839
|
-
|
|
1857
|
+
u("div", {
|
|
1840
1858
|
style: G({ width: d.widthRight + "px" }),
|
|
1841
1859
|
class: "h-full overflow-y-auto p-4"
|
|
1842
1860
|
}, [
|
|
@@ -1846,10 +1864,10 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1846
1864
|
])) : k("", !0)
|
|
1847
1865
|
]));
|
|
1848
1866
|
}
|
|
1849
|
-
}),
|
|
1867
|
+
}), $s = { class: "ml-1" }, Cs = { class: "truncate flex-1 min-w-0 text-left" }, xs = {
|
|
1850
1868
|
key: 0,
|
|
1851
1869
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1852
|
-
},
|
|
1870
|
+
}, Ls = /* @__PURE__ */ w({
|
|
1853
1871
|
__name: "TreeItem",
|
|
1854
1872
|
props: {
|
|
1855
1873
|
active: {},
|
|
@@ -1862,9 +1880,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1862
1880
|
const o = e, n = t, l = v(() => o.active === o.node.id);
|
|
1863
1881
|
return (r, c) => {
|
|
1864
1882
|
const d = ue("TreeItem", !0);
|
|
1865
|
-
return a(), p("li",
|
|
1866
|
-
|
|
1867
|
-
class:
|
|
1883
|
+
return a(), p("li", $s, [
|
|
1884
|
+
u("div", {
|
|
1885
|
+
class: $([
|
|
1868
1886
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1869
1887
|
hover:bg-gray-100`,
|
|
1870
1888
|
l.value ? "text-primary" : ""
|
|
@@ -1875,25 +1893,25 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1875
1893
|
class: "flex items-center justify-center",
|
|
1876
1894
|
onClick: c[0] || (c[0] = (f) => n("toggle", e.node))
|
|
1877
1895
|
}, [
|
|
1878
|
-
e.node.children && e.isExpanded(e.node.id) ? (a(), y(
|
|
1896
|
+
e.node.children && e.isExpanded(e.node.id) ? (a(), y(g(ut), {
|
|
1879
1897
|
key: 0,
|
|
1880
1898
|
class: "w-3 h-3"
|
|
1881
|
-
})) : (a(), y(
|
|
1899
|
+
})) : (a(), y(g(ct), {
|
|
1882
1900
|
key: 1,
|
|
1883
1901
|
class: "w-3 h-3"
|
|
1884
1902
|
}))
|
|
1885
1903
|
])) : k("", !0),
|
|
1886
|
-
|
|
1904
|
+
u("div", {
|
|
1887
1905
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1888
1906
|
onClick: c[1] || (c[1] = (f) => n("select", e.node))
|
|
1889
1907
|
}, [
|
|
1890
|
-
|
|
1891
|
-
e.node.tag ? (a(), p("div",
|
|
1908
|
+
u("div", Cs, h(e.node.label), 1),
|
|
1909
|
+
e.node.tag ? (a(), p("div", xs, h(e.node.tag), 1)) : k("", !0)
|
|
1892
1910
|
])
|
|
1893
1911
|
], 2),
|
|
1894
1912
|
e.node.children && e.isExpanded(e.node.id) ? (a(), p("ul", {
|
|
1895
1913
|
key: 0,
|
|
1896
|
-
class:
|
|
1914
|
+
class: $([
|
|
1897
1915
|
"ml-4 border-l pl-2",
|
|
1898
1916
|
{ "border-gray-200": !l.value, "border-primary": l.value }
|
|
1899
1917
|
])
|
|
@@ -1904,14 +1922,14 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1904
1922
|
expanded: e.expanded,
|
|
1905
1923
|
active: e.active,
|
|
1906
1924
|
"is-expanded": e.isExpanded,
|
|
1907
|
-
onToggle: c[2] || (c[2] = (
|
|
1908
|
-
onSelect: c[3] || (c[3] = (
|
|
1925
|
+
onToggle: c[2] || (c[2] = (i) => n("toggle", i)),
|
|
1926
|
+
onSelect: c[3] || (c[3] = (i) => n("select", i))
|
|
1909
1927
|
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1910
1928
|
], 2)) : k("", !0)
|
|
1911
1929
|
]);
|
|
1912
1930
|
};
|
|
1913
1931
|
}
|
|
1914
|
-
}),
|
|
1932
|
+
}), Ss = { class: "select-none text-sm" }, Vn = /* @__PURE__ */ w({
|
|
1915
1933
|
__name: "TreeView",
|
|
1916
1934
|
props: {
|
|
1917
1935
|
data: {},
|
|
@@ -1920,17 +1938,17 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1920
1938
|
emits: ["select"],
|
|
1921
1939
|
setup(e, { emit: t }) {
|
|
1922
1940
|
const o = e, n = t, l = S(/* @__PURE__ */ new Set()), r = (f) => {
|
|
1923
|
-
const
|
|
1941
|
+
const i = f.id;
|
|
1924
1942
|
if (!f.children || f.children.length === 0) {
|
|
1925
1943
|
n("select", f);
|
|
1926
1944
|
return;
|
|
1927
1945
|
}
|
|
1928
|
-
l.value.has(
|
|
1946
|
+
l.value.has(i) ? l.value.delete(i) : l.value.add(i);
|
|
1929
1947
|
}, c = (f) => {
|
|
1930
1948
|
n("select", f), l.value.add(f.id);
|
|
1931
1949
|
}, d = (f) => l.value.has(f);
|
|
1932
|
-
return (f,
|
|
1933
|
-
(a(!0), p(x, null, P(o.data, (s) => (a(), y(
|
|
1950
|
+
return (f, i) => (a(), p("ul", Ss, [
|
|
1951
|
+
(a(!0), p(x, null, P(o.data, (s) => (a(), y(Ls, {
|
|
1934
1952
|
key: s.id,
|
|
1935
1953
|
node: s,
|
|
1936
1954
|
expanded: l.value,
|
|
@@ -1941,20 +1959,20 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1941
1959
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1942
1960
|
]));
|
|
1943
1961
|
}
|
|
1944
|
-
}),
|
|
1962
|
+
}), Ps = {
|
|
1945
1963
|
key: 0,
|
|
1946
1964
|
class: "flex items-center justify-center h-20"
|
|
1947
|
-
},
|
|
1965
|
+
}, An = /* @__PURE__ */ w({
|
|
1948
1966
|
__name: "loading",
|
|
1949
1967
|
props: {
|
|
1950
1968
|
loading: { type: Boolean }
|
|
1951
1969
|
},
|
|
1952
1970
|
setup(e) {
|
|
1953
|
-
return (t, o) => e.loading ? (a(), p("div",
|
|
1954
|
-
|
|
1971
|
+
return (t, o) => e.loading ? (a(), p("div", Ps, [...o[0] || (o[0] = [
|
|
1972
|
+
u("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
|
|
1955
1973
|
])])) : k("", !0);
|
|
1956
1974
|
}
|
|
1957
|
-
}),
|
|
1975
|
+
}), Ms = {
|
|
1958
1976
|
title: { type: String, required: !0 },
|
|
1959
1977
|
opened: { type: Boolean, default: !0 },
|
|
1960
1978
|
heightFull: { type: Boolean, default: !1 },
|
|
@@ -1963,16 +1981,16 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1963
1981
|
type: Array,
|
|
1964
1982
|
default: () => []
|
|
1965
1983
|
}
|
|
1966
|
-
},
|
|
1984
|
+
}, Bs = ["checked"], Vs = { class: "collapse-title text-gray-500 text-xs font-medium" }, As = { class: "flex items-center justify-between" }, Is = {
|
|
1967
1985
|
key: 0,
|
|
1968
1986
|
class: "list bg-base-100"
|
|
1969
|
-
},
|
|
1987
|
+
}, Os = /* @__PURE__ */ w({
|
|
1970
1988
|
__name: "Collapse",
|
|
1971
|
-
props:
|
|
1989
|
+
props: Ms,
|
|
1972
1990
|
setup(e) {
|
|
1973
1991
|
const t = xe(), o = e, n = S(o.opened), l = S(o.opened || o.disabled);
|
|
1974
1992
|
return (r, c) => (a(), p("div", {
|
|
1975
|
-
class:
|
|
1993
|
+
class: $([
|
|
1976
1994
|
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
1977
1995
|
r.heightFull ? "h-full" : "",
|
|
1978
1996
|
r.disabled ? "collapse-open" : "",
|
|
@@ -1985,19 +2003,19 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
1985
2003
|
checked: n.value,
|
|
1986
2004
|
tabindex: "-1",
|
|
1987
2005
|
onChange: c[0] || (c[0] = (d) => l.value = d.target.checked)
|
|
1988
|
-
}, null, 40,
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2006
|
+
}, null, 40, Bs)),
|
|
2007
|
+
u("div", Vs, [
|
|
2008
|
+
u("div", As, [
|
|
2009
|
+
u("span", null, h(r.title), 1),
|
|
1992
2010
|
o.actions.length > 0 ? (a(), p("div", {
|
|
1993
2011
|
key: 0,
|
|
1994
2012
|
class: "relative z-10 flex gap-1",
|
|
1995
2013
|
onClick: c[1] || (c[1] = ce(() => {
|
|
1996
2014
|
}, ["stop"]))
|
|
1997
2015
|
}, [
|
|
1998
|
-
(a(!0), p(x, null, P(o.actions, (d, f) => (a(), y(
|
|
2016
|
+
(a(!0), p(x, null, P(o.actions, (d, f) => (a(), y(g(N), {
|
|
1999
2017
|
key: f,
|
|
2000
|
-
color:
|
|
2018
|
+
color: g(j).blank,
|
|
2001
2019
|
size: "xs",
|
|
2002
2020
|
icon: d.icon,
|
|
2003
2021
|
tooltip: d.tooltip,
|
|
@@ -2012,54 +2030,54 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
2012
2030
|
])) : k("", !0)
|
|
2013
2031
|
])
|
|
2014
2032
|
]),
|
|
2015
|
-
|
|
2016
|
-
class:
|
|
2033
|
+
u("div", {
|
|
2034
|
+
class: $(["collapse-content", g(t).list ? "p-0" : ""])
|
|
2017
2035
|
}, [
|
|
2018
2036
|
M(r.$slots, "default"),
|
|
2019
|
-
|
|
2037
|
+
g(t).list ? (a(), p("ul", Is, [
|
|
2020
2038
|
M(r.$slots, "list")
|
|
2021
2039
|
])) : k("", !0)
|
|
2022
2040
|
], 2)
|
|
2023
2041
|
], 2));
|
|
2024
2042
|
}
|
|
2025
|
-
}),
|
|
2043
|
+
}), Ds = {
|
|
2026
2044
|
title: { type: String },
|
|
2027
2045
|
label: { type: String },
|
|
2028
2046
|
labelLink: { type: String },
|
|
2029
2047
|
description: { type: String },
|
|
2030
2048
|
descriptionLink: { type: String }
|
|
2031
|
-
},
|
|
2049
|
+
}, Rs = { class: "list-row" }, Ts = { class: "list-col-grow" }, zs = { key: 0 }, Ns = {
|
|
2032
2050
|
key: 1,
|
|
2033
2051
|
class: "text-xs text-gray-600"
|
|
2034
|
-
},
|
|
2052
|
+
}, js = ["href"], qs = { key: 1 }, Es = {
|
|
2035
2053
|
key: 0,
|
|
2036
2054
|
class: "text-xs text-gray-500"
|
|
2037
|
-
},
|
|
2055
|
+
}, Fs = ["href"], Us = { key: 1 }, In = /* @__PURE__ */ w({
|
|
2038
2056
|
__name: "CollapseRow",
|
|
2039
|
-
props:
|
|
2057
|
+
props: Ds,
|
|
2040
2058
|
setup(e) {
|
|
2041
|
-
return (t, o) => (a(), p("li",
|
|
2042
|
-
|
|
2043
|
-
t.title ? (a(), p("div",
|
|
2044
|
-
t.description || t.descriptionLink ? (a(), p("div",
|
|
2059
|
+
return (t, o) => (a(), p("li", Rs, [
|
|
2060
|
+
u("div", Ts, [
|
|
2061
|
+
t.title ? (a(), p("div", zs, h(t.title), 1)) : k("", !0),
|
|
2062
|
+
t.description || t.descriptionLink ? (a(), p("div", Ns, [
|
|
2045
2063
|
t.descriptionLink ? (a(), p("a", {
|
|
2046
2064
|
key: 0,
|
|
2047
2065
|
href: t.descriptionLink,
|
|
2048
2066
|
target: "_blank"
|
|
2049
|
-
}, h(t.description ?? t.descriptionLink), 9,
|
|
2067
|
+
}, h(t.description ?? t.descriptionLink), 9, js)) : (a(), p("span", qs, h(t.description), 1))
|
|
2050
2068
|
])) : k("", !0)
|
|
2051
2069
|
]),
|
|
2052
|
-
t.label ? (a(), p("div",
|
|
2070
|
+
t.label ? (a(), p("div", Es, [
|
|
2053
2071
|
t.labelLink ? (a(), p("a", {
|
|
2054
2072
|
key: 0,
|
|
2055
2073
|
href: t.labelLink,
|
|
2056
2074
|
target: "_blank"
|
|
2057
|
-
}, h(t.label), 9,
|
|
2075
|
+
}, h(t.label), 9, Fs)) : (a(), p("span", Us, h(t.label), 1))
|
|
2058
2076
|
])) : k("", !0),
|
|
2059
2077
|
M(t.$slots, "default")
|
|
2060
2078
|
]));
|
|
2061
2079
|
}
|
|
2062
|
-
}),
|
|
2080
|
+
}), Ks = { class: "text-gray-800" }, On = /* @__PURE__ */ w({
|
|
2063
2081
|
__name: "alert",
|
|
2064
2082
|
props: {
|
|
2065
2083
|
message: {},
|
|
@@ -2074,13 +2092,13 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
2074
2092
|
};
|
|
2075
2093
|
return (o, n) => (a(), p("div", {
|
|
2076
2094
|
role: "alert",
|
|
2077
|
-
class:
|
|
2095
|
+
class: $(`alert alert-soft ${t[e.type]} `)
|
|
2078
2096
|
}, [
|
|
2079
|
-
|
|
2097
|
+
u("span", Ks, h(e.message), 1),
|
|
2080
2098
|
M(o.$slots, "default")
|
|
2081
2099
|
], 2));
|
|
2082
2100
|
}
|
|
2083
|
-
}),
|
|
2101
|
+
}), Hs = {
|
|
2084
2102
|
title: { type: String, required: !0 },
|
|
2085
2103
|
items: {
|
|
2086
2104
|
type: Array,
|
|
@@ -2099,7 +2117,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
2099
2117
|
default: void 0
|
|
2100
2118
|
},
|
|
2101
2119
|
opened: { type: Boolean, default: !0 }
|
|
2102
|
-
},
|
|
2120
|
+
}, Ws = ["update:modelValue"], Gs = (e, t, o, n) => {
|
|
2103
2121
|
const l = v(
|
|
2104
2122
|
() => e.value.map((s) => s[o.value])
|
|
2105
2123
|
), r = (s) => t.value.includes(s), c = v(() => {
|
|
@@ -2109,63 +2127,63 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
2109
2127
|
return { isSelected: r, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s, m) => {
|
|
2110
2128
|
m ? n("update:modelValue", [...t.value, s]) : n(
|
|
2111
2129
|
"update:modelValue",
|
|
2112
|
-
t.value.filter((
|
|
2130
|
+
t.value.filter((b) => b !== s)
|
|
2113
2131
|
);
|
|
2114
2132
|
} };
|
|
2115
|
-
},
|
|
2133
|
+
}, Xs = { class: "flex items-center justify-between mb-2" }, Zs = { class: "text-xs text-base-content/50" }, Js = { class: "flex gap-1" }, Qs = { class: "flex flex-col gap-1" }, Ys = ["checked", "onChange"], en = { class: "text-sm flex-1 select-none" }, tn = {
|
|
2116
2134
|
key: 1,
|
|
2117
2135
|
class: "badge badge-sm badge-ghost"
|
|
2118
|
-
},
|
|
2136
|
+
}, Dn = /* @__PURE__ */ w({
|
|
2119
2137
|
__name: "filter",
|
|
2120
|
-
props:
|
|
2121
|
-
emits:
|
|
2138
|
+
props: Hs,
|
|
2139
|
+
emits: Ws,
|
|
2122
2140
|
setup(e, { emit: t }) {
|
|
2123
|
-
const o = e, n = t, l = v(() => o.items ?? []), { isSelected: r, selectedLabel: c, selectAll: d, selectNone: f, toggleItem:
|
|
2124
|
-
return (s, m) => (a(), y(
|
|
2141
|
+
const o = e, n = t, l = v(() => o.items ?? []), { isSelected: r, selectedLabel: c, selectAll: d, selectNone: f, toggleItem: i } = Gs(l, we(o, "modelValue"), we(o, "valueKey"), n);
|
|
2142
|
+
return (s, m) => (a(), y(g(Os), {
|
|
2125
2143
|
title: s.title,
|
|
2126
2144
|
opened: s.opened
|
|
2127
2145
|
}, {
|
|
2128
2146
|
default: L(() => [
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2147
|
+
u("div", Xs, [
|
|
2148
|
+
u("span", Zs, h(g(c)) + " of " + h(l.value.length) + " items ", 1),
|
|
2149
|
+
u("div", Js, [
|
|
2150
|
+
u("button", {
|
|
2133
2151
|
class: "btn btn-ghost btn-xs",
|
|
2134
2152
|
type: "button",
|
|
2135
2153
|
tabindex: "-1",
|
|
2136
2154
|
onClick: m[0] || (m[0] = //@ts-ignore
|
|
2137
|
-
(...
|
|
2155
|
+
(...b) => g(d) && g(d)(...b))
|
|
2138
2156
|
}, " All "),
|
|
2139
|
-
|
|
2157
|
+
u("button", {
|
|
2140
2158
|
class: "btn btn-ghost btn-xs",
|
|
2141
2159
|
type: "button",
|
|
2142
2160
|
tabindex: "-1",
|
|
2143
2161
|
onClick: m[1] || (m[1] = //@ts-ignore
|
|
2144
|
-
(...
|
|
2162
|
+
(...b) => g(f) && g(f)(...b))
|
|
2145
2163
|
}, " None ")
|
|
2146
2164
|
])
|
|
2147
2165
|
]),
|
|
2148
|
-
|
|
2149
|
-
(a(!0), p(x, null, P(l.value, (
|
|
2150
|
-
key:
|
|
2151
|
-
class:
|
|
2166
|
+
u("div", Qs, [
|
|
2167
|
+
(a(!0), p(x, null, P(l.value, (b) => (a(), p("label", {
|
|
2168
|
+
key: b[s.valueKey],
|
|
2169
|
+
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(r)(b[s.valueKey]) }])
|
|
2152
2170
|
}, [
|
|
2153
|
-
|
|
2171
|
+
u("input", {
|
|
2154
2172
|
type: "checkbox",
|
|
2155
2173
|
class: "checkbox checkbox-sm",
|
|
2156
|
-
checked:
|
|
2157
|
-
onChange: (_) =>
|
|
2158
|
-
|
|
2174
|
+
checked: g(r)(b[s.valueKey]),
|
|
2175
|
+
onChange: (_) => g(i)(
|
|
2176
|
+
b[s.valueKey],
|
|
2159
2177
|
_.target.checked
|
|
2160
2178
|
)
|
|
2161
|
-
}, null, 40,
|
|
2162
|
-
s.colorKey &&
|
|
2179
|
+
}, null, 40, Ys),
|
|
2180
|
+
s.colorKey && b[s.colorKey] ? (a(), p("span", {
|
|
2163
2181
|
key: 0,
|
|
2164
2182
|
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2165
|
-
style: G({ backgroundColor:
|
|
2183
|
+
style: G({ backgroundColor: b[s.colorKey] })
|
|
2166
2184
|
}, null, 4)) : k("", !0),
|
|
2167
|
-
|
|
2168
|
-
|
|
2185
|
+
u("span", en, h(b[s.labelKey]), 1),
|
|
2186
|
+
b[s.countKey] > 0 ? (a(), p("span", tn, h(b[s.countKey]), 1)) : k("", !0)
|
|
2169
2187
|
], 2))), 128))
|
|
2170
2188
|
])
|
|
2171
2189
|
]),
|
|
@@ -2174,11 +2192,11 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], yn = /* @__PUR
|
|
|
2174
2192
|
}
|
|
2175
2193
|
});
|
|
2176
2194
|
export {
|
|
2177
|
-
|
|
2178
|
-
|
|
2195
|
+
On as Alert,
|
|
2196
|
+
$n as Autocomplete,
|
|
2179
2197
|
At as BadgeSize,
|
|
2180
2198
|
N as Btn,
|
|
2181
|
-
|
|
2199
|
+
fn as BtnBadge,
|
|
2182
2200
|
Bt as BtnBadgeEmits,
|
|
2183
2201
|
Mt as BtnBadgeProperties,
|
|
2184
2202
|
Pt as BtnEmits,
|
|
@@ -2186,51 +2204,51 @@ export {
|
|
|
2186
2204
|
Vt as ButtonSize,
|
|
2187
2205
|
Se as ButtonTag,
|
|
2188
2206
|
fe as ButtonType,
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2207
|
+
vn as Card,
|
|
2208
|
+
Ln as Checkbox,
|
|
2209
|
+
wn as ClickOutside,
|
|
2210
|
+
Os as Collapse,
|
|
2211
|
+
In as CollapseRow,
|
|
2194
2212
|
j as Color,
|
|
2195
2213
|
Ot as ConfirmModal,
|
|
2196
2214
|
Z as ControlWrapper,
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2215
|
+
Bn as Drawer,
|
|
2216
|
+
pn as Dropdown,
|
|
2217
|
+
Dn as Filter,
|
|
2218
|
+
Ws as FilterEmits,
|
|
2219
|
+
Hs as FilterProperties,
|
|
2202
2220
|
q as Icon,
|
|
2203
2221
|
T as IconEnum,
|
|
2204
2222
|
dt as IconMap,
|
|
2205
2223
|
pt as IconProperties,
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2224
|
+
Sn as Input,
|
|
2225
|
+
Pn as InputNumber,
|
|
2226
|
+
An as Loading,
|
|
2227
|
+
xn as Markdown,
|
|
2228
|
+
dn as Menu,
|
|
2229
|
+
Ct as Modal,
|
|
2212
2230
|
me as ModalService,
|
|
2213
2231
|
Dt as ModalWrapper,
|
|
2214
|
-
|
|
2232
|
+
Cn as MultiSelect,
|
|
2215
2233
|
Rt as NotificationMessage,
|
|
2216
|
-
|
|
2234
|
+
be as NotificationService,
|
|
2217
2235
|
Nt as Notifications,
|
|
2218
2236
|
lo as PaginationComponent,
|
|
2219
|
-
|
|
2220
|
-
|
|
2237
|
+
_n as SelectComponent,
|
|
2238
|
+
mn as ShellComponent,
|
|
2221
2239
|
pe as SubMenu,
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2240
|
+
gn as Table,
|
|
2241
|
+
gn as TableComponent,
|
|
2242
|
+
bn as TextCell,
|
|
2243
|
+
Mn as Textarea,
|
|
2244
|
+
Vn as TreeView,
|
|
2245
|
+
hn as addClickOutsideEventListener,
|
|
2228
2246
|
U as buildInputStyle,
|
|
2229
|
-
|
|
2230
|
-
|
|
2247
|
+
kn as hasCustomEventListener,
|
|
2248
|
+
Ro as isDescriptionHidden,
|
|
2231
2249
|
le as mergeStyles,
|
|
2232
2250
|
se as myStyles,
|
|
2233
|
-
|
|
2251
|
+
yn as removeClickOutsideEventListener,
|
|
2234
2252
|
Me as showErrors,
|
|
2235
|
-
|
|
2253
|
+
Gs as useFilter
|
|
2236
2254
|
};
|