@ghentcdh/ui 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.esm.js +847 -766
- package/index.js +2 -2
- package/index.mjs +847 -766
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, computed as v, openBlock as r, createBlock as w, resolveDynamicComponent as ne, normalizeClass as C, createCommentVNode as _, createElementBlock as f, createElementVNode as u, toDisplayString as h, 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 Ce, withModifiers as le, renderSlot as M, createVNode as V, withDirectives as Y, vModelCheckbox as $e, 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 Re, useModel as F, mergeModels as I, onBeforeUnmount as Te, 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
|
-
import { LinkIcon as Ne, DocumentTextIcon as
|
|
5
|
-
import
|
|
6
|
-
import { useEditor as
|
|
7
|
-
import { Markdown as
|
|
8
|
-
import { ChevronDownIcon as
|
|
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";
|
|
5
|
+
import at from "@tiptap/starter-kit";
|
|
6
|
+
import { useEditor as rt, EditorContent as it } from "@tiptap/vue-3";
|
|
7
|
+
import { Markdown as ut } from "tiptap-markdown";
|
|
8
|
+
import { ChevronDownIcon as ct, ChevronRightIcon as dt } from "@heroicons/vue/24/solid";
|
|
9
9
|
var T = /* @__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))(T || {});
|
|
10
|
-
const
|
|
11
|
-
Edit:
|
|
12
|
-
Delete:
|
|
13
|
-
BarsArrowDown:
|
|
14
|
-
BarsArrowUp:
|
|
15
|
-
Funnel:
|
|
16
|
-
Close:
|
|
17
|
-
Plus:
|
|
18
|
-
PaperClip:
|
|
19
|
-
Hamburger:
|
|
20
|
-
ChevronRight:
|
|
21
|
-
ChevronLeft:
|
|
22
|
-
ChevronDown:
|
|
23
|
-
ChevronUp:
|
|
24
|
-
DblChevronLeft:
|
|
10
|
+
const pt = {
|
|
11
|
+
Edit: lt,
|
|
12
|
+
Delete: nt,
|
|
13
|
+
BarsArrowDown: st,
|
|
14
|
+
BarsArrowUp: ot,
|
|
15
|
+
Funnel: tt,
|
|
16
|
+
Close: et,
|
|
17
|
+
Plus: Ye,
|
|
18
|
+
PaperClip: Qe,
|
|
19
|
+
Hamburger: Je,
|
|
20
|
+
ChevronRight: Ze,
|
|
21
|
+
ChevronLeft: Xe,
|
|
22
|
+
ChevronDown: Ge,
|
|
23
|
+
ChevronUp: We,
|
|
24
|
+
DblChevronLeft: He,
|
|
25
25
|
DblChevronRight: Ue,
|
|
26
|
-
Language:
|
|
27
|
-
Check:
|
|
28
|
-
View:
|
|
29
|
-
Text:
|
|
26
|
+
Language: Ke,
|
|
27
|
+
Check: Fe,
|
|
28
|
+
View: je,
|
|
29
|
+
Text: qe,
|
|
30
30
|
Link: Ne
|
|
31
|
-
},
|
|
31
|
+
}, ft = {
|
|
32
32
|
icon: { type: [String, Object, Function] },
|
|
33
33
|
size: { type: String }
|
|
34
|
-
},
|
|
34
|
+
}, j = /* @__PURE__ */ k({
|
|
35
35
|
__name: "icon",
|
|
36
|
-
props:
|
|
36
|
+
props: ft,
|
|
37
37
|
setup(e) {
|
|
38
|
-
const t = e, o = v(() => t.icon ? typeof t.icon == "string" ?
|
|
39
|
-
return (n, l) => o.value ? (
|
|
38
|
+
const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? pt[t.icon] : t.icon : null);
|
|
39
|
+
return (n, l) => o.value ? (r(), w(ne(o.value), {
|
|
40
40
|
key: 0,
|
|
41
|
-
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
class: C([
|
|
42
43
|
{
|
|
43
44
|
"w-full h-full": !n.size,
|
|
44
45
|
"w-2 h-2": n.size === "xs",
|
|
@@ -47,12 +48,13 @@ const dt = {
|
|
|
47
48
|
"w-8 h-8": n.size === "xl"
|
|
48
49
|
}
|
|
49
50
|
])
|
|
50
|
-
}, null, 8, ["class"])) :
|
|
51
|
+
}, null, 8, ["class"])) : _("", !0);
|
|
51
52
|
}
|
|
52
|
-
}),
|
|
53
|
+
}), mt = { class: "dropdown dropdown-end" }, bt = {
|
|
53
54
|
tabindex: "0",
|
|
55
|
+
role: "menu",
|
|
54
56
|
class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
|
|
55
|
-
},
|
|
57
|
+
}, gt = { class: "min-w-max flex-no-wrap text-black" }, pe = /* @__PURE__ */ k({
|
|
56
58
|
__name: "sub-menu",
|
|
57
59
|
props: {
|
|
58
60
|
label: {},
|
|
@@ -63,29 +65,30 @@ const dt = {
|
|
|
63
65
|
disableArrow: { type: Boolean }
|
|
64
66
|
},
|
|
65
67
|
setup(e) {
|
|
66
|
-
return (t, o) => (
|
|
68
|
+
return (t, o) => (r(), f("div", mt, [
|
|
67
69
|
u("div", {
|
|
68
70
|
tabindex: "0",
|
|
69
71
|
role: "button",
|
|
70
|
-
|
|
72
|
+
"aria-haspopup": "menu",
|
|
73
|
+
class: C([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
71
74
|
}, [
|
|
72
75
|
u("span", null, h(e.label), 1),
|
|
73
|
-
e.disableArrow ?
|
|
76
|
+
e.disableArrow ? _("", !0) : (r(), w(g(j), {
|
|
74
77
|
key: 0,
|
|
75
78
|
icon: g(T).ChevronDown,
|
|
76
79
|
size: "sm"
|
|
77
80
|
}, null, 8, ["icon"]))
|
|
78
81
|
], 2),
|
|
79
|
-
u("ul",
|
|
80
|
-
u("li",
|
|
81
|
-
(
|
|
82
|
+
u("ul", bt, [
|
|
83
|
+
u("li", gt, [
|
|
84
|
+
(r(!0), f(L, null, P(e.items, (n) => (r(), w(Pe, B({
|
|
82
85
|
key: n.label
|
|
83
86
|
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
84
87
|
])
|
|
85
88
|
])
|
|
86
89
|
]));
|
|
87
90
|
}
|
|
88
|
-
}), oe = "btn btn-ghost text-left justify-between min-w-max font-normal",
|
|
91
|
+
}), oe = "btn btn-ghost text-left justify-between min-w-max font-normal", Pe = /* @__PURE__ */ k({
|
|
89
92
|
__name: "menu-item",
|
|
90
93
|
props: {
|
|
91
94
|
label: {},
|
|
@@ -94,7 +97,7 @@ const dt = {
|
|
|
94
97
|
disabled: { type: Boolean, default: !1 }
|
|
95
98
|
},
|
|
96
99
|
setup(e) {
|
|
97
|
-
const t = e, o = v(() => !t.disabled && t.action && "routerLink" in t.action), n = v(() => !t.disabled && t.action), l = v(() => t.items?.length),
|
|
100
|
+
const t = e, o = v(() => !t.disabled && t.action && "routerLink" in t.action), n = v(() => !t.disabled && t.action), l = v(() => t.items?.length), a = v(() => {
|
|
98
101
|
const d = t.action;
|
|
99
102
|
return d && "routerLink" in d && "params" in d ? {
|
|
100
103
|
name: d.routerLink,
|
|
@@ -103,32 +106,32 @@ const dt = {
|
|
|
103
106
|
}), c = () => {
|
|
104
107
|
t.action?.();
|
|
105
108
|
};
|
|
106
|
-
return (d,
|
|
107
|
-
const i =
|
|
108
|
-
return l.value ? (
|
|
109
|
+
return (d, p) => {
|
|
110
|
+
const i = ce("RouterLink");
|
|
111
|
+
return l.value ? (r(), w(pe, B({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (r(), w(i, {
|
|
109
112
|
key: 1,
|
|
110
|
-
to:
|
|
111
|
-
class:
|
|
113
|
+
to: a.value,
|
|
114
|
+
class: C(oe),
|
|
112
115
|
onClick: c
|
|
113
116
|
}, {
|
|
114
|
-
default:
|
|
115
|
-
|
|
117
|
+
default: S(() => [
|
|
118
|
+
E(h(e.label), 1)
|
|
116
119
|
]),
|
|
117
120
|
_: 1
|
|
118
|
-
}, 8, ["to"])) : n.value ? (
|
|
121
|
+
}, 8, ["to"])) : n.value ? (r(), f("button", {
|
|
119
122
|
key: 2,
|
|
120
|
-
class:
|
|
123
|
+
class: C(oe),
|
|
121
124
|
onClick: c
|
|
122
|
-
}, h(e.label), 1)) : (
|
|
125
|
+
}, h(e.label), 1)) : (r(), f("div", {
|
|
123
126
|
key: 3,
|
|
124
|
-
class:
|
|
127
|
+
class: C([oe, { "btn-disabled": e.disabled }])
|
|
125
128
|
}, h(e.label), 3));
|
|
126
129
|
};
|
|
127
130
|
}
|
|
128
|
-
}),
|
|
131
|
+
}), vt = { class: "navbar bg-base-100 shadow-sm" }, ht = { class: "flex-1" }, yt = {
|
|
129
132
|
key: 0,
|
|
130
133
|
class: "breadcrumbs text-sm"
|
|
131
|
-
},
|
|
134
|
+
}, wt = { class: "flex grow justify-end px-2" }, kt = { class: "flex items-stretch" }, hn = /* @__PURE__ */ k({
|
|
132
135
|
__name: "menu",
|
|
133
136
|
props: {
|
|
134
137
|
menu: {},
|
|
@@ -136,34 +139,34 @@ const dt = {
|
|
|
136
139
|
},
|
|
137
140
|
setup(e) {
|
|
138
141
|
return (t, o) => {
|
|
139
|
-
const n =
|
|
140
|
-
return
|
|
141
|
-
u("div",
|
|
142
|
-
e.breadcrumbs ? (
|
|
142
|
+
const n = ce("RouterLink");
|
|
143
|
+
return r(), f("nav", vt, [
|
|
144
|
+
u("div", ht, [
|
|
145
|
+
e.breadcrumbs ? (r(), f("div", yt, [
|
|
143
146
|
u("ul", null, [
|
|
144
|
-
(
|
|
147
|
+
(r(!0), f(L, null, P(e.breadcrumbs, (l) => (r(), f("li", {
|
|
145
148
|
key: l.label
|
|
146
149
|
}, [
|
|
147
|
-
l.routerLink ? (
|
|
150
|
+
l.routerLink ? (r(), w(n, {
|
|
148
151
|
key: 0,
|
|
149
152
|
to: { name: l.routerLink, params: l.params },
|
|
150
153
|
role: "navigation",
|
|
151
|
-
"
|
|
154
|
+
"aria-label": l.label
|
|
152
155
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
|
|
156
|
+
default: S(() => [
|
|
157
|
+
E(h(l.label), 1)
|
|
155
158
|
]),
|
|
156
159
|
_: 2
|
|
157
|
-
}, 1032, ["to", "
|
|
158
|
-
|
|
160
|
+
}, 1032, ["to", "aria-label"])) : (r(), f(L, { key: 1 }, [
|
|
161
|
+
E(h(l.label), 1)
|
|
159
162
|
], 64))
|
|
160
163
|
]))), 128))
|
|
161
164
|
])
|
|
162
|
-
])) :
|
|
165
|
+
])) : _("", !0)
|
|
163
166
|
]),
|
|
164
|
-
u("div",
|
|
165
|
-
u("div",
|
|
166
|
-
(
|
|
167
|
+
u("div", wt, [
|
|
168
|
+
u("div", kt, [
|
|
169
|
+
(r(!0), f(L, null, P(e.menu, (l) => (r(), w(Pe, B({
|
|
167
170
|
key: l.label
|
|
168
171
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
169
172
|
])
|
|
@@ -171,14 +174,14 @@ const dt = {
|
|
|
171
174
|
]);
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
|
-
}),
|
|
177
|
+
}), yn = /* @__PURE__ */ k({
|
|
175
178
|
__name: "dropdown",
|
|
176
179
|
props: {
|
|
177
180
|
items: {}
|
|
178
181
|
},
|
|
179
182
|
setup(e) {
|
|
180
|
-
const t =
|
|
181
|
-
return (o, n) => (
|
|
183
|
+
const t = x(!0);
|
|
184
|
+
return (o, n) => (r(), w(pe, {
|
|
182
185
|
items: e.items,
|
|
183
186
|
label: "test",
|
|
184
187
|
open: t.value,
|
|
@@ -186,149 +189,204 @@ const dt = {
|
|
|
186
189
|
"disable-arrow": !0
|
|
187
190
|
}, null, 8, ["items", "open"]));
|
|
188
191
|
}
|
|
189
|
-
}),
|
|
192
|
+
}), _t = {
|
|
193
|
+
modalTitle: { type: String, required: !0 },
|
|
194
|
+
buttonLabel: { type: String },
|
|
195
|
+
buttonSaveLabel: { type: String },
|
|
196
|
+
data: { default: void 0 },
|
|
197
|
+
open: { type: Boolean, default: !1 },
|
|
198
|
+
disableClose: { type: Boolean, default: !1 },
|
|
199
|
+
width: { type: String, default: "sm" },
|
|
200
|
+
name: { type: String, required: !0 }
|
|
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 = ({
|
|
202
|
+
containerRef: e,
|
|
203
|
+
isActive: t,
|
|
204
|
+
onEscape: o,
|
|
205
|
+
restoreFocus: n = !0
|
|
206
|
+
}) => {
|
|
207
|
+
let l = null;
|
|
208
|
+
const a = (p) => {
|
|
209
|
+
const i = e.value;
|
|
210
|
+
if (!i) return;
|
|
211
|
+
if (p.key === "Escape") {
|
|
212
|
+
o?.();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (p.key !== "Tab") return;
|
|
216
|
+
const s = ke(i);
|
|
217
|
+
if (s.length === 0) return;
|
|
218
|
+
const m = s[0], b = s[s.length - 1];
|
|
219
|
+
p.shiftKey ? document.activeElement === m && (p.preventDefault(), b.focus()) : document.activeElement === b && (p.preventDefault(), m.focus());
|
|
220
|
+
}, c = () => {
|
|
221
|
+
const p = e.value;
|
|
222
|
+
if (!p) return;
|
|
223
|
+
l = document.activeElement, document.addEventListener("keydown", a);
|
|
224
|
+
const i = ke(p);
|
|
225
|
+
i.length > 0 && i[0].focus();
|
|
226
|
+
}, d = () => {
|
|
227
|
+
document.removeEventListener("keydown", a), n && l && (l.focus(), l = null);
|
|
228
|
+
};
|
|
229
|
+
q(t, (p) => {
|
|
230
|
+
p ? c() : d();
|
|
231
|
+
}), _e(() => {
|
|
232
|
+
d();
|
|
233
|
+
});
|
|
234
|
+
}, Lt = {
|
|
235
|
+
xs: "max-w-xs w-[50VW]",
|
|
236
|
+
sm: "max-w-sm w-[50VW]",
|
|
237
|
+
lg: "max-w-2xl w-[80VW]",
|
|
238
|
+
xl: "max-w-[80VW] w-[80VW]"
|
|
239
|
+
}, St = {
|
|
240
|
+
xs: "btn-xs",
|
|
241
|
+
sm: "btn-sm",
|
|
242
|
+
lg: "btn-sm",
|
|
243
|
+
xl: "btn"
|
|
244
|
+
}, Pt = {
|
|
245
|
+
xs: "badge-xs text-xxs",
|
|
246
|
+
sm: "badge-sm text-xs",
|
|
247
|
+
lg: "badge-sm text-xs",
|
|
248
|
+
xl: "badge text-xs"
|
|
249
|
+
}, Mt = { class: "flex justify-end gap-2 p-2 mt-2 border-t border-gray-300" }, Bt = /* @__PURE__ */ k({
|
|
190
250
|
__name: "modal",
|
|
191
|
-
props:
|
|
192
|
-
|
|
193
|
-
buttonLabel: {},
|
|
194
|
-
buttonSaveLabel: {},
|
|
195
|
-
data: {},
|
|
196
|
-
open: { type: Boolean, default: !1 },
|
|
197
|
-
disableClose: { type: Boolean, default: !1 },
|
|
198
|
-
width: { default: "sm" }
|
|
199
|
-
},
|
|
200
|
-
emits: ["closeModal"],
|
|
251
|
+
props: _t,
|
|
252
|
+
emits: Ct,
|
|
201
253
|
setup(e, { expose: t, emit: o }) {
|
|
202
|
-
const n = {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
document.getElementById(r)?.showModal();
|
|
209
|
-
}, f = () => {
|
|
210
|
-
document.getElementById(r)?.close(), c("closeModal");
|
|
254
|
+
const n = e, l = `modal_${de()}`, a = `${l}_title`, c = `${l}_content`, d = x(null), p = x(!1), i = o, s = () => {
|
|
255
|
+
d.value?.showModal(), p.value = !0;
|
|
256
|
+
}, m = () => {
|
|
257
|
+
d.value?.close(), p.value = !1, i("closeModal");
|
|
258
|
+
}, b = () => {
|
|
259
|
+
n.disableClose || m();
|
|
211
260
|
};
|
|
212
|
-
return
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
261
|
+
return xt({
|
|
262
|
+
containerRef: d,
|
|
263
|
+
isActive: p,
|
|
264
|
+
onEscape: () => {
|
|
265
|
+
n.disableClose || m();
|
|
266
|
+
}
|
|
267
|
+
}), t({ closeModal: m, openModal: s }), q(
|
|
268
|
+
() => n.open,
|
|
269
|
+
() => {
|
|
270
|
+
n.open ? s() : m();
|
|
216
271
|
}
|
|
217
|
-
),
|
|
218
|
-
|
|
219
|
-
}), (
|
|
220
|
-
|
|
221
|
-
|
|
272
|
+
), Ce(() => {
|
|
273
|
+
n.open && s();
|
|
274
|
+
}), (y, D) => (r(), f("dialog", {
|
|
275
|
+
ref_key: "dialogRef",
|
|
276
|
+
ref: d,
|
|
277
|
+
class: "modal",
|
|
278
|
+
role: "dialog",
|
|
279
|
+
"aria-modal": "true",
|
|
280
|
+
"aria-labelledby": a,
|
|
281
|
+
"aria-describedby": c,
|
|
282
|
+
onCancel: le(b, ["prevent"])
|
|
222
283
|
}, [
|
|
223
284
|
u("div", {
|
|
224
|
-
class:
|
|
285
|
+
class: C(["modal-box bg-white", g(Lt)[y.width]])
|
|
225
286
|
}, [
|
|
226
|
-
|
|
287
|
+
y.disableClose ? _("", !0) : (r(), f("button", {
|
|
227
288
|
key: 0,
|
|
228
289
|
type: "button",
|
|
229
290
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
230
|
-
|
|
291
|
+
"aria-label": "Close",
|
|
292
|
+
onClick: m
|
|
231
293
|
}, " ✕ ")),
|
|
232
|
-
u("h3",
|
|
233
|
-
|
|
234
|
-
|
|
294
|
+
u("h3", {
|
|
295
|
+
id: a,
|
|
296
|
+
class: "font-bold"
|
|
297
|
+
}, h(y.modalTitle), 1),
|
|
298
|
+
u("div", {
|
|
299
|
+
id: c,
|
|
300
|
+
class: "pt-4"
|
|
301
|
+
}, [
|
|
302
|
+
M(y.$slots, "content")
|
|
235
303
|
]),
|
|
236
|
-
u("div",
|
|
237
|
-
M(
|
|
304
|
+
u("div", Mt, [
|
|
305
|
+
M(y.$slots, "actions")
|
|
238
306
|
])
|
|
239
307
|
], 2)
|
|
240
|
-
]));
|
|
308
|
+
], 544));
|
|
241
309
|
}
|
|
242
310
|
});
|
|
243
|
-
var fe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(fe || {}),
|
|
244
|
-
const
|
|
311
|
+
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 Vt = {
|
|
245
313
|
blank: "btn-ghost",
|
|
246
314
|
primary: "btn-primary",
|
|
247
315
|
secondary: "btn-soft btn-primary",
|
|
248
316
|
error: "btn-error"
|
|
249
|
-
},
|
|
317
|
+
}, At = {
|
|
250
318
|
blank: "badge-ghost",
|
|
251
319
|
primary: "badge-primary",
|
|
252
320
|
secondary: "badge-soft badge-primary",
|
|
253
321
|
error: "badge-error"
|
|
254
|
-
},
|
|
322
|
+
}, Ot = {
|
|
255
323
|
href: { type: String },
|
|
256
324
|
disabled: { type: Boolean, default: !1 },
|
|
257
325
|
tooltip: { type: String },
|
|
258
|
-
as: { type: String, default:
|
|
326
|
+
as: { type: String, default: Me.button },
|
|
259
327
|
icon: { type: [String, Object, Function] },
|
|
260
328
|
type: { type: String, default: fe.button },
|
|
261
329
|
outline: { type: Boolean, default: !1 },
|
|
262
|
-
color: { type: String, default:
|
|
330
|
+
color: { type: String, default: N.primary },
|
|
263
331
|
size: { type: String, default: "sm" },
|
|
264
332
|
square: { type: Boolean, default: !1 }
|
|
265
|
-
},
|
|
333
|
+
}, It = ["click"], Dt = {
|
|
266
334
|
icon: { type: [String, Object, Function] },
|
|
267
335
|
type: { type: String, default: fe.button },
|
|
268
336
|
color: { type: String },
|
|
269
337
|
disabled: { type: Boolean, default: !1 },
|
|
270
338
|
size: { type: String, default: "sm" }
|
|
271
|
-
},
|
|
272
|
-
xs: "btn-xs",
|
|
273
|
-
sm: "btn-sm",
|
|
274
|
-
lg: "btn-sm",
|
|
275
|
-
xl: "btn"
|
|
276
|
-
}, At = {
|
|
277
|
-
xs: "badge-xs text-xxs",
|
|
278
|
-
sm: "badge-sm text-xs",
|
|
279
|
-
lg: "badge-sm text-xs",
|
|
280
|
-
xl: "badge text-xs"
|
|
281
|
-
}, N = /* @__PURE__ */ w({
|
|
339
|
+
}, Rt = ["click"], z = /* @__PURE__ */ k({
|
|
282
340
|
__name: "btn",
|
|
283
|
-
props:
|
|
284
|
-
emits:
|
|
341
|
+
props: Ot,
|
|
342
|
+
emits: It,
|
|
285
343
|
setup(e, { emit: t }) {
|
|
286
344
|
const o = e, n = t;
|
|
287
|
-
return (l,
|
|
288
|
-
class:
|
|
345
|
+
return (l, a) => (r(), w(ne(o.as), {
|
|
346
|
+
class: C([
|
|
289
347
|
"btn p-1 flex justify-center flex-nowrap",
|
|
290
|
-
g(
|
|
291
|
-
g(
|
|
348
|
+
g(Vt)[o.color],
|
|
349
|
+
g(St)[o.size],
|
|
292
350
|
{ "btn-outline": o.outline, "btn-square": o.square, tooltip: o.tooltip }
|
|
293
351
|
]),
|
|
294
352
|
href: o.href,
|
|
295
353
|
type: o.type,
|
|
296
354
|
disabled: o.disabled,
|
|
297
355
|
"data-tip": o.tooltip,
|
|
298
|
-
onClick:
|
|
356
|
+
onClick: a[0] || (a[0] = (c) => n("click"))
|
|
299
357
|
}, {
|
|
300
|
-
default:
|
|
301
|
-
o.icon ? (
|
|
358
|
+
default: S(() => [
|
|
359
|
+
o.icon ? (r(), w(g(j), {
|
|
302
360
|
key: 0,
|
|
303
361
|
icon: o.icon,
|
|
304
362
|
size: o.size
|
|
305
|
-
}, null, 8, ["icon", "size"])) :
|
|
363
|
+
}, null, 8, ["icon", "size"])) : _("", !0),
|
|
306
364
|
M(l.$slots, "default")
|
|
307
365
|
]),
|
|
308
366
|
_: 3
|
|
309
367
|
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
310
368
|
}
|
|
311
|
-
}),
|
|
369
|
+
}), Tt = ["type", "disabled"], wn = /* @__PURE__ */ k({
|
|
312
370
|
__name: "btn-badge",
|
|
313
|
-
props:
|
|
314
|
-
emits:
|
|
371
|
+
props: Dt,
|
|
372
|
+
emits: Rt,
|
|
315
373
|
setup(e, { emit: t }) {
|
|
316
374
|
const o = e, n = t;
|
|
317
|
-
return (l,
|
|
318
|
-
class:
|
|
375
|
+
return (l, a) => (r(), f("button", {
|
|
376
|
+
class: C(["badge gap-1", g(Pt)[o.size], g(At)[o.color]]),
|
|
319
377
|
type: o.type,
|
|
320
378
|
disabled: o.disabled,
|
|
321
|
-
onClick:
|
|
379
|
+
onClick: a[0] || (a[0] = (c) => n("click"))
|
|
322
380
|
}, [
|
|
323
381
|
M(l.$slots, "default"),
|
|
324
|
-
o.icon ? (
|
|
382
|
+
o.icon ? (r(), w(g(j), {
|
|
325
383
|
key: 0,
|
|
326
384
|
icon: o.icon,
|
|
327
385
|
size: o.size
|
|
328
|
-
}, null, 8, ["icon", "size"])) :
|
|
329
|
-
], 10,
|
|
386
|
+
}, null, 8, ["icon", "size"])) : _("", !0)
|
|
387
|
+
], 10, Tt));
|
|
330
388
|
}
|
|
331
|
-
}),
|
|
389
|
+
}), Et = /* @__PURE__ */ k({
|
|
332
390
|
__name: "confirmModal",
|
|
333
391
|
props: {
|
|
334
392
|
title: {},
|
|
@@ -341,33 +399,35 @@ const xt = {
|
|
|
341
399
|
const o = t, n = (l) => {
|
|
342
400
|
o("closeModal", { confirmed: l });
|
|
343
401
|
};
|
|
344
|
-
return (l,
|
|
402
|
+
return (l, a) => (r(), w(Bt, {
|
|
345
403
|
"modal-title": e.title,
|
|
346
404
|
open: !0,
|
|
347
405
|
"disable-close": !0
|
|
348
406
|
}, {
|
|
349
|
-
content:
|
|
350
|
-
|
|
407
|
+
content: S(() => [
|
|
408
|
+
E(h(e.message), 1)
|
|
351
409
|
]),
|
|
352
|
-
actions:
|
|
353
|
-
V(g(
|
|
354
|
-
color: g(
|
|
410
|
+
actions: S(() => [
|
|
411
|
+
V(g(z), {
|
|
412
|
+
color: g(N).secondary,
|
|
355
413
|
outline: !0,
|
|
356
|
-
|
|
414
|
+
"aria-label": e.cancelLabel,
|
|
415
|
+
onClick: a[0] || (a[0] = (c) => n(!1))
|
|
357
416
|
}, {
|
|
358
|
-
default:
|
|
359
|
-
|
|
417
|
+
default: S(() => [
|
|
418
|
+
E(h(e.cancelLabel), 1)
|
|
360
419
|
]),
|
|
361
420
|
_: 1
|
|
362
|
-
}, 8, ["color"]),
|
|
363
|
-
V(g(
|
|
364
|
-
|
|
421
|
+
}, 8, ["color", "aria-label"]),
|
|
422
|
+
V(g(z), {
|
|
423
|
+
"aria-label": e.confirmLabel,
|
|
424
|
+
onClick: a[1] || (a[1] = (c) => n(!0))
|
|
365
425
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
|
|
426
|
+
default: S(() => [
|
|
427
|
+
E(h(e.confirmLabel), 1)
|
|
368
428
|
]),
|
|
369
429
|
_: 1
|
|
370
|
-
})
|
|
430
|
+
}, 8, ["aria-label"])
|
|
371
431
|
]),
|
|
372
432
|
_: 1
|
|
373
433
|
}, 8, ["modal-title"]));
|
|
@@ -375,12 +435,12 @@ const xt = {
|
|
|
375
435
|
});
|
|
376
436
|
class me {
|
|
377
437
|
constructor() {
|
|
378
|
-
this.showModal =
|
|
438
|
+
this.showModal = x(!1), this.modals = [];
|
|
379
439
|
}
|
|
380
440
|
openModal(t) {
|
|
381
441
|
const o = t.props.onClose, n = de(), l = t;
|
|
382
|
-
t.props.onClose = (
|
|
383
|
-
o(
|
|
442
|
+
t.props.onClose = (a) => {
|
|
443
|
+
o(a), this.closeModal(n);
|
|
384
444
|
}, l.id = n, this.modals = [...this.modals, l], this.showModal.value = Date.now();
|
|
385
445
|
}
|
|
386
446
|
closeModal(t) {
|
|
@@ -388,7 +448,7 @@ class me {
|
|
|
388
448
|
}
|
|
389
449
|
static showConfirm(t) {
|
|
390
450
|
this.getInstance().openModal({
|
|
391
|
-
component:
|
|
451
|
+
component: Et,
|
|
392
452
|
props: t
|
|
393
453
|
});
|
|
394
454
|
}
|
|
@@ -405,19 +465,19 @@ class me {
|
|
|
405
465
|
this.modals = [], this.showModal.value = !1;
|
|
406
466
|
}
|
|
407
467
|
}
|
|
408
|
-
const
|
|
468
|
+
const zt = /* @__PURE__ */ k({
|
|
409
469
|
__name: "modalWrapper",
|
|
410
470
|
setup(e) {
|
|
411
471
|
const t = me.getInstance(), o = v(() => t.showModal.value ? t.modals : []);
|
|
412
|
-
return (n, l) => (
|
|
413
|
-
key:
|
|
472
|
+
return (n, l) => (r(!0), f(L, null, P(o.value, (a) => (r(), w(ne(a?.component), B({
|
|
473
|
+
key: a.id,
|
|
414
474
|
ref_for: !0
|
|
415
|
-
},
|
|
475
|
+
}, a?.props, {
|
|
416
476
|
open: !0,
|
|
417
|
-
onCloseModal:
|
|
477
|
+
onCloseModal: a?.props?.onClose
|
|
418
478
|
}), null, 16, ["onCloseModal"]))), 128));
|
|
419
479
|
}
|
|
420
|
-
}),
|
|
480
|
+
}), Nt = /* @__PURE__ */ k({
|
|
421
481
|
__name: "notification-message",
|
|
422
482
|
props: {
|
|
423
483
|
message: {},
|
|
@@ -430,20 +490,20 @@ const Dt = /* @__PURE__ */ w({
|
|
|
430
490
|
warning: "alert-warning",
|
|
431
491
|
info: "alert-info"
|
|
432
492
|
};
|
|
433
|
-
return (o, n) => (
|
|
493
|
+
return (o, n) => (r(), f("div", {
|
|
434
494
|
role: "alert",
|
|
435
|
-
class:
|
|
495
|
+
class: C(`alert ${t[e.type]} `)
|
|
436
496
|
}, [
|
|
437
497
|
u("span", null, h(e.message), 1)
|
|
438
498
|
], 2));
|
|
439
499
|
}
|
|
440
|
-
}),
|
|
500
|
+
}), qt = 5e3;
|
|
441
501
|
class be {
|
|
442
502
|
constructor() {
|
|
443
|
-
this.notifications =
|
|
503
|
+
this.notifications = x([]), this.addNotification = (t, o = "info") => {
|
|
444
504
|
const n = {
|
|
445
505
|
id: de(),
|
|
446
|
-
duration:
|
|
506
|
+
duration: qt,
|
|
447
507
|
message: t,
|
|
448
508
|
type: o
|
|
449
509
|
};
|
|
@@ -475,17 +535,17 @@ class be {
|
|
|
475
535
|
this.getInstance().removeNotification(t);
|
|
476
536
|
}
|
|
477
537
|
}
|
|
478
|
-
const
|
|
538
|
+
const jt = { class: "toast toast-top toast-center z-[999]" }, Ft = /* @__PURE__ */ k({
|
|
479
539
|
__name: "notifications",
|
|
480
540
|
setup(e) {
|
|
481
541
|
const t = be.getInstance();
|
|
482
|
-
return (o, n) => (
|
|
483
|
-
(
|
|
542
|
+
return (o, n) => (r(), f("div", jt, [
|
|
543
|
+
(r(!0), f(L, null, P(g(t).notifications.value, (l) => (r(), w(Nt, B({
|
|
484
544
|
key: l.id
|
|
485
545
|
}, { ref_for: !0 }, l), null, 16))), 128))
|
|
486
546
|
]));
|
|
487
547
|
}
|
|
488
|
-
}),
|
|
548
|
+
}), Kt = { class: "flex h-screen flex-col" }, Ut = { class: "shrink-0" }, Ht = { class: "navbar bg-primary text-primary-content w-full z-100" }, Wt = { class: "navbar-start" }, Gt = { class: "navbar-center" }, Xt = ["href"], Zt = { class: "navbar-end" }, Jt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Qt = { class: "drawer-side h-full shadow-md" }, Yt = { class: "flex-grow overflow-y-auto" }, eo = { class: "bg-base-200 p-4" }, kn = /* @__PURE__ */ k({
|
|
489
549
|
__name: "shell.component",
|
|
490
550
|
props: {
|
|
491
551
|
title: {},
|
|
@@ -496,7 +556,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
496
556
|
},
|
|
497
557
|
emits: ["logout"],
|
|
498
558
|
setup(e, { emit: t }) {
|
|
499
|
-
const n = e, l =
|
|
559
|
+
const n = e, l = x(!1), a = () => {
|
|
500
560
|
l.value = !l.value;
|
|
501
561
|
}, c = t, d = v(() => n.user ? {
|
|
502
562
|
label: n.user.name,
|
|
@@ -509,36 +569,36 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
509
569
|
}
|
|
510
570
|
]
|
|
511
571
|
} : null);
|
|
512
|
-
return (
|
|
513
|
-
V(
|
|
514
|
-
V(g(
|
|
515
|
-
u("div",
|
|
516
|
-
u("header",
|
|
517
|
-
u("nav",
|
|
518
|
-
u("div",
|
|
572
|
+
return (p, i) => (r(), f(L, null, [
|
|
573
|
+
V(Ft),
|
|
574
|
+
V(g(zt)),
|
|
575
|
+
u("div", Kt, [
|
|
576
|
+
u("header", Ut, [
|
|
577
|
+
u("nav", Ht, [
|
|
578
|
+
u("div", Wt, [
|
|
519
579
|
u("button", {
|
|
520
580
|
"aria-label": "open sidebar",
|
|
521
581
|
class: "btn btn-square btn-ghost p-1",
|
|
522
|
-
onClick:
|
|
582
|
+
onClick: a
|
|
523
583
|
}, [
|
|
524
|
-
V(g(
|
|
584
|
+
V(g(j), {
|
|
525
585
|
icon: g(T).Hamburger
|
|
526
586
|
}, null, 8, ["icon"])
|
|
527
587
|
])
|
|
528
588
|
]),
|
|
529
|
-
u("div",
|
|
589
|
+
u("div", Gt, [
|
|
530
590
|
u("a", {
|
|
531
591
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
532
592
|
href: g("/")
|
|
533
|
-
}, h(e.title), 9,
|
|
593
|
+
}, h(e.title), 9, Xt)
|
|
534
594
|
]),
|
|
535
|
-
u("div",
|
|
536
|
-
d.value ? (
|
|
595
|
+
u("div", Zt, [
|
|
596
|
+
d.value ? (r(), w(g(pe), B({ key: 0 }, d.value, { "btn-class": "" }), null, 16)) : _("", !0)
|
|
537
597
|
])
|
|
538
598
|
])
|
|
539
599
|
]),
|
|
540
600
|
u("div", {
|
|
541
|
-
class:
|
|
601
|
+
class: C(["drawer flex-1 overflow-hidden", { "drawer-open": l.value }])
|
|
542
602
|
}, [
|
|
543
603
|
Y(u("input", {
|
|
544
604
|
id: "app-drawer",
|
|
@@ -546,12 +606,12 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
546
606
|
type: "checkbox",
|
|
547
607
|
class: "drawer-toggle"
|
|
548
608
|
}, null, 512), [
|
|
549
|
-
[
|
|
609
|
+
[$e, l.value]
|
|
550
610
|
]),
|
|
551
|
-
u("main",
|
|
552
|
-
M(
|
|
611
|
+
u("main", Jt, [
|
|
612
|
+
M(p.$slots, "default")
|
|
553
613
|
]),
|
|
554
|
-
u("div",
|
|
614
|
+
u("div", Qt, [
|
|
555
615
|
i[1] || (i[1] = u("label", {
|
|
556
616
|
for: "app-drawer",
|
|
557
617
|
"aria-label": "close sidebar",
|
|
@@ -559,77 +619,77 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
559
619
|
}, null, -1)),
|
|
560
620
|
u("div", {
|
|
561
621
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
562
|
-
style:
|
|
622
|
+
style: X({ width: e.widthSidebar + "px" })
|
|
563
623
|
}, [
|
|
564
|
-
u("ul",
|
|
565
|
-
(
|
|
624
|
+
u("ul", Yt, [
|
|
625
|
+
(r(!0), f(L, null, P(e.menu, (s) => (r(), f("li", {
|
|
566
626
|
key: s.label
|
|
567
627
|
}, [
|
|
568
628
|
V(g(ze), {
|
|
569
629
|
to: { name: s.routerLink, params: s.params }
|
|
570
630
|
}, {
|
|
571
|
-
default:
|
|
572
|
-
|
|
631
|
+
default: S(() => [
|
|
632
|
+
E(h(s.label), 1)
|
|
573
633
|
]),
|
|
574
634
|
_: 2
|
|
575
635
|
}, 1032, ["to"])
|
|
576
636
|
]))), 128))
|
|
577
637
|
]),
|
|
578
|
-
u("div",
|
|
638
|
+
u("div", eo, " version: " + h(e.version), 1)
|
|
579
639
|
], 4)
|
|
580
640
|
])
|
|
581
641
|
], 2)
|
|
582
642
|
])
|
|
583
643
|
], 64));
|
|
584
644
|
}
|
|
585
|
-
}),
|
|
645
|
+
}), to = {
|
|
586
646
|
currentPage: { type: Number, required: !0 },
|
|
587
647
|
page: { type: Number, required: !0 },
|
|
588
648
|
label: { type: String, required: !0 },
|
|
589
649
|
neverActive: { type: Boolean, default: !1 },
|
|
590
650
|
disabled: { type: Boolean, default: !1 }
|
|
591
|
-
},
|
|
651
|
+
}, oo = ["updatePage", "updatePageSize"], J = /* @__PURE__ */ k({
|
|
592
652
|
__name: "pagination-button.component",
|
|
593
|
-
props:
|
|
594
|
-
emits:
|
|
653
|
+
props: to,
|
|
654
|
+
emits: oo,
|
|
595
655
|
setup(e, { emit: t }) {
|
|
596
656
|
const o = e, n = t, l = v(
|
|
597
657
|
() => o.neverActive ? !1 : o.page === o.currentPage
|
|
598
|
-
),
|
|
658
|
+
), a = v(() => o.neverActive ? N.blank : l.value ? N.primary : N.secondary), c = () => {
|
|
599
659
|
n("updatePage", o.page);
|
|
600
660
|
};
|
|
601
|
-
return (d,
|
|
661
|
+
return (d, p) => (r(), w(g(z), {
|
|
602
662
|
disabled: d.disabled,
|
|
603
663
|
square: !0,
|
|
604
664
|
size: "xs",
|
|
605
|
-
color:
|
|
606
|
-
onClick:
|
|
665
|
+
color: a.value,
|
|
666
|
+
onClick: p[0] || (p[0] = (i) => c())
|
|
607
667
|
}, {
|
|
608
|
-
default:
|
|
609
|
-
|
|
668
|
+
default: S(() => [
|
|
669
|
+
E(h(d.label), 1)
|
|
610
670
|
]),
|
|
611
671
|
_: 1
|
|
612
672
|
}, 8, ["disabled", "color"]));
|
|
613
673
|
}
|
|
614
|
-
}),
|
|
674
|
+
}), so = {
|
|
615
675
|
totalItems: { type: Number, default: 0 },
|
|
616
676
|
itemsPerPage: { type: Number, default: 1 },
|
|
617
677
|
currentPage: { type: Number, default: 1 }
|
|
618
|
-
},
|
|
678
|
+
}, no = ["updatePage", "updatePageSize"], lo = { class: "flex gap-2" }, ao = { class: "flex flex-1 justify-center items-center" }, ro = { class: "flex gap-1" }, io = { class: "text-sm" }, Q = 6, uo = /* @__PURE__ */ k({
|
|
619
679
|
__name: "pagination.component",
|
|
620
|
-
props:
|
|
621
|
-
emits:
|
|
680
|
+
props: so,
|
|
681
|
+
emits: no,
|
|
622
682
|
setup(e, { emit: t }) {
|
|
623
683
|
const o = e, n = t, l = v(() => {
|
|
624
684
|
let s = Math.ceil(o.totalItems / o.itemsPerPage);
|
|
625
685
|
return s < 1 ? 1 : s;
|
|
626
|
-
}),
|
|
686
|
+
}), a = Q / 2, c = v(() => {
|
|
627
687
|
if (l.value <= Q)
|
|
628
688
|
return {
|
|
629
689
|
min: 1,
|
|
630
690
|
max: l.value
|
|
631
691
|
};
|
|
632
|
-
let s = o.currentPage -
|
|
692
|
+
let s = o.currentPage - a;
|
|
633
693
|
s <= 1 ? s = 1 : s + Q > l.value && (s = l.value - Q);
|
|
634
694
|
let m = s + Q;
|
|
635
695
|
return {
|
|
@@ -642,25 +702,25 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
642
702
|
page: -10,
|
|
643
703
|
disabled: !0,
|
|
644
704
|
neverActive: !0
|
|
645
|
-
}),
|
|
705
|
+
}), p = v(() => {
|
|
646
706
|
let s = l.value;
|
|
647
707
|
s < 1 && (s = 1);
|
|
648
|
-
const m = o.currentPage, b = [], { min:
|
|
649
|
-
return Array.from({ length: s }, (
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
label: `${
|
|
708
|
+
const m = o.currentPage, b = [], { min: y, max: D } = c.value;
|
|
709
|
+
return Array.from({ length: s }, (H, A) => {
|
|
710
|
+
const $ = A + 1;
|
|
711
|
+
$ !== 1 && $ !== s && ($ > D || $ < y) || ($ === s && s > 1 && D < s && b.push(d(m)), b.push({
|
|
712
|
+
label: `${$}`,
|
|
653
713
|
totalPages: s,
|
|
654
714
|
currentPage: m,
|
|
655
|
-
page:
|
|
656
|
-
}),
|
|
715
|
+
page: $
|
|
716
|
+
}), $ === 1 && s > 1 && y > 1 && b.push(d(m)));
|
|
657
717
|
}), b;
|
|
658
718
|
}), i = (s) => {
|
|
659
719
|
n("updatePage", s);
|
|
660
720
|
};
|
|
661
|
-
return (s, m) => (
|
|
662
|
-
u("div",
|
|
663
|
-
u("div",
|
|
721
|
+
return (s, m) => (r(), f("div", lo, [
|
|
722
|
+
u("div", ao, [
|
|
723
|
+
u("div", ro, [
|
|
664
724
|
V(J, B(o, {
|
|
665
725
|
page: 1,
|
|
666
726
|
label: "<<",
|
|
@@ -677,7 +737,7 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
677
737
|
disabled: s.currentPage === 1,
|
|
678
738
|
onUpdatePage: i
|
|
679
739
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
680
|
-
(
|
|
740
|
+
(r(!0), f(L, null, P(p.value, (b) => (r(), w(J, B({
|
|
681
741
|
key: b.page,
|
|
682
742
|
ref_for: !0
|
|
683
743
|
}, b, { onUpdatePage: i }), null, 16))), 128)),
|
|
@@ -699,16 +759,16 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
699
759
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
700
760
|
])
|
|
701
761
|
]),
|
|
702
|
-
u("div",
|
|
762
|
+
u("div", io, " page " + h(s.currentPage) + " of " + h(l.value), 1)
|
|
703
763
|
]));
|
|
704
764
|
}
|
|
705
|
-
}),
|
|
765
|
+
}), co = {
|
|
706
766
|
data: { type: Object, required: !0 },
|
|
707
767
|
column: { type: Object, required: !0 },
|
|
708
768
|
options: { type: Object }
|
|
709
|
-
},
|
|
769
|
+
}, _n = /* @__PURE__ */ k({
|
|
710
770
|
__name: "text.cell",
|
|
711
|
-
props:
|
|
771
|
+
props: co,
|
|
712
772
|
setup(e) {
|
|
713
773
|
const t = e, o = v(() => {
|
|
714
774
|
const n = t.data[t.column.id];
|
|
@@ -716,167 +776,167 @@ const zt = { class: "toast toast-top toast-center z-[999]" }, Nt = /* @__PURE__
|
|
|
716
776
|
});
|
|
717
777
|
return (n, l) => h(o.value);
|
|
718
778
|
}
|
|
719
|
-
}),
|
|
779
|
+
}), po = {
|
|
720
780
|
column: { type: Object, required: !0 },
|
|
721
781
|
sortColumn: { type: String },
|
|
722
782
|
sortDirection: { type: String }
|
|
723
|
-
},
|
|
783
|
+
}, fo = ["sort"], mo = { class: "flex-grow pr-2" }, bo = { class: "h-4 w-4" }, go = /* @__PURE__ */ k({
|
|
724
784
|
__name: "sort.header",
|
|
725
|
-
props:
|
|
726
|
-
emits:
|
|
785
|
+
props: po,
|
|
786
|
+
emits: fo,
|
|
727
787
|
setup(e, { emit: t }) {
|
|
728
788
|
const o = e, n = t, l = v(
|
|
729
789
|
() => o.sortDirection === "asc" ? T.BarsArrowUp : T.BarsArrowDown
|
|
730
|
-
),
|
|
731
|
-
n("sort",
|
|
790
|
+
), a = v(() => o.column.options?.sortId ?? o.column.id), c = () => {
|
|
791
|
+
n("sort", a.value);
|
|
732
792
|
};
|
|
733
|
-
return (d,
|
|
793
|
+
return (d, p) => (r(), f("button", {
|
|
734
794
|
class: "flex items-center",
|
|
735
795
|
onClick: c
|
|
736
796
|
}, [
|
|
737
|
-
u("span",
|
|
738
|
-
u("div",
|
|
739
|
-
d.sortColumn ===
|
|
797
|
+
u("span", mo, h(d.column.label), 1),
|
|
798
|
+
u("div", bo, [
|
|
799
|
+
d.sortColumn === a.value ? (r(), w(g(j), {
|
|
740
800
|
key: 0,
|
|
741
801
|
icon: l.value
|
|
742
|
-
}, null, 8, ["icon"])) :
|
|
802
|
+
}, null, 8, ["icon"])) : _("", !0)
|
|
743
803
|
])
|
|
744
804
|
]));
|
|
745
805
|
}
|
|
746
|
-
}),
|
|
806
|
+
}), vo = {
|
|
747
807
|
loading: { type: Boolean, default: !1 },
|
|
748
808
|
actions: { type: Array },
|
|
749
809
|
data: { type: Array },
|
|
750
810
|
displayColumns: { type: Array, required: !0 },
|
|
751
811
|
page: { type: Object },
|
|
752
812
|
sort: { type: Object }
|
|
753
|
-
},
|
|
813
|
+
}, ho = ["updatePage", "sort"], yo = { class: "table w-full" }, wo = { key: 0 }, ko = ["colspan"], _o = ["ui-id"], Co = { class: "flex gap-2" }, Cn = /* @__PURE__ */ k({
|
|
754
814
|
__name: "table.component",
|
|
755
|
-
props:
|
|
756
|
-
emits:
|
|
815
|
+
props: vo,
|
|
816
|
+
emits: ho,
|
|
757
817
|
setup(e, { emit: t }) {
|
|
758
|
-
const o = t, n =
|
|
818
|
+
const o = t, n = Oe(), l = v(() => "onEdit" in n), a = v(() => "onDelete" in n), c = (s) => {
|
|
759
819
|
n.onEdit?.(s);
|
|
760
820
|
}, d = (s) => {
|
|
761
821
|
n.onDelete?.(s);
|
|
762
|
-
},
|
|
822
|
+
}, p = (s) => {
|
|
763
823
|
o("updatePage", s);
|
|
764
824
|
}, i = (s) => {
|
|
765
825
|
o("sort", s);
|
|
766
826
|
};
|
|
767
|
-
return (s, m) => (
|
|
768
|
-
u("table",
|
|
827
|
+
return (s, m) => (r(), f(L, null, [
|
|
828
|
+
u("table", yo, [
|
|
769
829
|
u("thead", null, [
|
|
770
830
|
u("tr", null, [
|
|
771
|
-
(
|
|
831
|
+
(r(!0), f(L, null, P(s.displayColumns, (b) => (r(), f("th", {
|
|
772
832
|
key: b.scope
|
|
773
833
|
}, [
|
|
774
|
-
V(
|
|
834
|
+
V(go, B({ column: b }, { ref_for: !0 }, s.sort, { onSort: i }), null, 16, ["column"])
|
|
775
835
|
]))), 128)),
|
|
776
836
|
m[0] || (m[0] = u("th", null, null, -1))
|
|
777
837
|
])
|
|
778
838
|
]),
|
|
779
839
|
u("tbody", null, [
|
|
780
|
-
s.loading ? (
|
|
840
|
+
s.loading ? (r(), f("tr", wo, [
|
|
781
841
|
u("td", {
|
|
782
842
|
colspan: s.displayColumns.length + 1,
|
|
783
843
|
class: "text-center"
|
|
784
844
|
}, [...m[1] || (m[1] = [
|
|
785
845
|
u("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
786
|
-
])], 8,
|
|
787
|
-
])) :
|
|
788
|
-
(
|
|
846
|
+
])], 8, ko)
|
|
847
|
+
])) : _("", !0),
|
|
848
|
+
(r(!0), f(L, null, P(s.data, (b) => (r(), f("tr", {
|
|
789
849
|
key: b.id,
|
|
790
850
|
"ui-id": `table_${b.id}`
|
|
791
851
|
}, [
|
|
792
|
-
(
|
|
793
|
-
key:
|
|
852
|
+
(r(!0), f(L, null, P(s.displayColumns, (y) => (r(), f("td", {
|
|
853
|
+
key: y.scope
|
|
794
854
|
}, [
|
|
795
|
-
(
|
|
855
|
+
(r(), w(ne(y.component), B({ ref_for: !0 }, y, {
|
|
796
856
|
data: b,
|
|
797
|
-
column:
|
|
857
|
+
column: y
|
|
798
858
|
}), null, 16, ["data", "column"]))
|
|
799
859
|
]))), 128)),
|
|
800
860
|
u("td", null, [
|
|
801
|
-
u("span",
|
|
802
|
-
(
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
icon:
|
|
861
|
+
u("span", Co, [
|
|
862
|
+
(r(!0), f(L, null, P(s.actions, (y) => (r(), w(z, {
|
|
863
|
+
key: y.label,
|
|
864
|
+
"aria-label": y.label,
|
|
865
|
+
icon: y.icon,
|
|
806
866
|
outline: !0,
|
|
807
|
-
onClick: (D) =>
|
|
867
|
+
onClick: (D) => y.action(b)
|
|
808
868
|
}, {
|
|
809
|
-
default:
|
|
810
|
-
|
|
869
|
+
default: S(() => [
|
|
870
|
+
E(h(y.label), 1)
|
|
811
871
|
]),
|
|
812
872
|
_: 2
|
|
813
|
-
}, 1032, ["
|
|
814
|
-
l.value ? (
|
|
873
|
+
}, 1032, ["aria-label", "icon", "onClick"]))), 128)),
|
|
874
|
+
l.value ? (r(), w(z, {
|
|
815
875
|
key: 0,
|
|
816
|
-
"
|
|
876
|
+
"aria-label": "Edit",
|
|
817
877
|
icon: g(T).Edit,
|
|
818
878
|
outline: !0,
|
|
819
|
-
onClick: (
|
|
820
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
821
|
-
|
|
879
|
+
onClick: (y) => c(b)
|
|
880
|
+
}, null, 8, ["icon", "onClick"])) : _("", !0),
|
|
881
|
+
a.value ? (r(), w(z, {
|
|
822
882
|
key: 1,
|
|
823
|
-
"
|
|
883
|
+
"aria-label": "Delete",
|
|
824
884
|
icon: g(T).Delete,
|
|
825
885
|
outline: !0,
|
|
826
|
-
onClick: (
|
|
827
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
886
|
+
onClick: (y) => d(b)
|
|
887
|
+
}, null, 8, ["icon", "onClick"])) : _("", !0)
|
|
828
888
|
])
|
|
829
889
|
])
|
|
830
|
-
], 8,
|
|
890
|
+
], 8, _o))), 128))
|
|
831
891
|
])
|
|
832
892
|
]),
|
|
833
|
-
s.page ? (
|
|
893
|
+
s.page ? (r(), w(uo, {
|
|
834
894
|
key: 0,
|
|
835
895
|
class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
|
|
836
896
|
"total-items": s.page.count,
|
|
837
897
|
"items-per-page": s.page.pageSize,
|
|
838
898
|
"current-page": s.page.page,
|
|
839
|
-
onUpdatePage:
|
|
840
|
-
}, null, 8, ["total-items", "items-per-page", "current-page"])) :
|
|
899
|
+
onUpdatePage: p
|
|
900
|
+
}, null, 8, ["total-items", "items-per-page", "current-page"])) : _("", !0)
|
|
841
901
|
], 64));
|
|
842
902
|
}
|
|
843
|
-
}),
|
|
903
|
+
}), $o = (e, t) => {
|
|
844
904
|
const o = e.__vccOpts || e;
|
|
845
905
|
for (const [n, l] of t)
|
|
846
906
|
o[n] = l;
|
|
847
907
|
return o;
|
|
848
|
-
},
|
|
908
|
+
}, xo = {}, Lo = { class: "card bg-base-100 shadow-sm" }, So = { class: "card-body" }, Po = {
|
|
849
909
|
key: 0,
|
|
850
910
|
class: "card-title"
|
|
851
|
-
},
|
|
911
|
+
}, Mo = {
|
|
852
912
|
key: 1,
|
|
853
913
|
class: "card-actions justify-end"
|
|
854
914
|
};
|
|
855
|
-
function
|
|
856
|
-
return
|
|
857
|
-
u("div",
|
|
858
|
-
e.$slots.title ? (
|
|
915
|
+
function Bo(e, t) {
|
|
916
|
+
return r(), f("div", Lo, [
|
|
917
|
+
u("div", So, [
|
|
918
|
+
e.$slots.title ? (r(), f("h2", Po, [
|
|
859
919
|
M(e.$slots, "title")
|
|
860
|
-
])) :
|
|
920
|
+
])) : _("", !0),
|
|
861
921
|
u("p", null, [
|
|
862
922
|
M(e.$slots, "default"),
|
|
863
923
|
M(e.$slots, "content")
|
|
864
924
|
]),
|
|
865
|
-
e.$slots.actions ? (
|
|
925
|
+
e.$slots.actions ? (r(), f("div", Mo, [
|
|
866
926
|
M(e.$slots, "actions")
|
|
867
|
-
])) :
|
|
927
|
+
])) : _("", !0)
|
|
868
928
|
])
|
|
869
929
|
]);
|
|
870
930
|
}
|
|
871
|
-
const
|
|
931
|
+
const $n = /* @__PURE__ */ $o(xo, [["render", Bo]]), xn = (e, t) => {
|
|
872
932
|
if (!e) return null;
|
|
873
933
|
const o = (n) => {
|
|
874
934
|
e.contains(n.target) || t();
|
|
875
935
|
};
|
|
876
936
|
return document.addEventListener("click", o), o;
|
|
877
|
-
},
|
|
937
|
+
}, Ln = (e) => {
|
|
878
938
|
document.removeEventListener("click", e);
|
|
879
|
-
},
|
|
939
|
+
}, Sn = {
|
|
880
940
|
beforeMount(e, t) {
|
|
881
941
|
e.clickOutsideEvent = function(o) {
|
|
882
942
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -886,21 +946,21 @@ const vn = /* @__PURE__ */ wo(ko, [["render", Lo]]), hn = (e, t) => {
|
|
|
886
946
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
887
947
|
}
|
|
888
948
|
};
|
|
889
|
-
function
|
|
949
|
+
function Vo(e) {
|
|
890
950
|
return e.replace(/[:\s_-]+(.)/g, (t, o) => o.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
|
|
891
951
|
}
|
|
892
|
-
function
|
|
893
|
-
const t =
|
|
952
|
+
function Pn(e) {
|
|
953
|
+
const t = Ie();
|
|
894
954
|
if (!t)
|
|
895
955
|
return !1;
|
|
896
956
|
const o = t.vnode.props;
|
|
897
957
|
if (!o)
|
|
898
958
|
return !1;
|
|
899
|
-
const n =
|
|
959
|
+
const n = Vo(e), l = De(e);
|
|
900
960
|
return [
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
961
|
+
re(e),
|
|
962
|
+
re(l),
|
|
963
|
+
re(n),
|
|
904
964
|
`on:${e}`,
|
|
905
965
|
`on:${l}`,
|
|
906
966
|
`on:${n}`
|
|
@@ -908,7 +968,7 @@ function kn(e) {
|
|
|
908
968
|
(c) => !!o[c]
|
|
909
969
|
);
|
|
910
970
|
}
|
|
911
|
-
const
|
|
971
|
+
const Ao = ["select"], ge = {
|
|
912
972
|
options: { type: Array, required: !1 },
|
|
913
973
|
isLoading: {
|
|
914
974
|
type: Boolean,
|
|
@@ -949,7 +1009,7 @@ const Po = ["select"], ge = {
|
|
|
949
1009
|
root: "flex flex-row gap-x-2",
|
|
950
1010
|
item: "w-full"
|
|
951
1011
|
}
|
|
952
|
-
},
|
|
1012
|
+
}, ae = (e) => {
|
|
953
1013
|
if (!e) return { ...se };
|
|
954
1014
|
const t = { ...se };
|
|
955
1015
|
for (const o of Object.keys(e)) {
|
|
@@ -957,7 +1017,7 @@ const Po = ["select"], ge = {
|
|
|
957
1017
|
n && typeof n == "object" && (t[o] = { ...se[o], ...n });
|
|
958
1018
|
}
|
|
959
1019
|
return t;
|
|
960
|
-
},
|
|
1020
|
+
}, K = {
|
|
961
1021
|
id: { type: String },
|
|
962
1022
|
placeholder: { type: String },
|
|
963
1023
|
description: { type: String },
|
|
@@ -975,7 +1035,7 @@ const Po = ["select"], ge = {
|
|
|
975
1035
|
},
|
|
976
1036
|
width: { type: String, default: "w-48" }
|
|
977
1037
|
}, ve = {
|
|
978
|
-
...
|
|
1038
|
+
...K,
|
|
979
1039
|
options: { type: Array, required: !0 },
|
|
980
1040
|
/** Key to use as the display label when options are objects */
|
|
981
1041
|
labelKey: { type: String, default: "label" },
|
|
@@ -984,16 +1044,16 @@ const Po = ["select"], ge = {
|
|
|
984
1044
|
valueKey: { type: String, default: "value" },
|
|
985
1045
|
/** add a new button next to the list*/
|
|
986
1046
|
enableCreate: { type: Boolean, default: !1 }
|
|
987
|
-
},
|
|
1047
|
+
}, Oo = ["select", "clear", "close", "create"], Be = {
|
|
988
1048
|
...ge,
|
|
989
1049
|
...ve,
|
|
990
1050
|
isOpen: { type: Boolean, default: !1 },
|
|
991
1051
|
isActive: { type: Function, default: (e) => !1 }
|
|
992
|
-
},
|
|
1052
|
+
}, Io = {
|
|
993
1053
|
key: 1,
|
|
994
1054
|
tabindex: "-1",
|
|
995
1055
|
class: "pointer-events-none"
|
|
996
|
-
},
|
|
1056
|
+
}, Do = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Ro = ["innerHTML"], To = {
|
|
997
1057
|
key: 0,
|
|
998
1058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
999
1059
|
class: "h-4 w-4 shrink-0 opacity-80",
|
|
@@ -1002,7 +1062,7 @@ const Po = ["select"], ge = {
|
|
|
1002
1062
|
stroke: "currentColor",
|
|
1003
1063
|
"stroke-width": "2.5"
|
|
1004
1064
|
};
|
|
1005
|
-
function
|
|
1065
|
+
function Eo(e, t) {
|
|
1006
1066
|
if (!t) return e;
|
|
1007
1067
|
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1008
1068
|
return e.replace(
|
|
@@ -1010,26 +1070,26 @@ function Oo(e, t) {
|
|
|
1010
1070
|
'<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
|
|
1011
1071
|
);
|
|
1012
1072
|
}
|
|
1013
|
-
const
|
|
1073
|
+
const zo = /* @__PURE__ */ k({
|
|
1014
1074
|
__name: "ListResults",
|
|
1015
1075
|
props: ge,
|
|
1016
|
-
emits:
|
|
1076
|
+
emits: Ao,
|
|
1017
1077
|
setup(e, { expose: t, emit: o }) {
|
|
1018
|
-
const n = e, l =
|
|
1019
|
-
|
|
1078
|
+
const n = e, l = x(-1), a = x(), c = o;
|
|
1079
|
+
q(
|
|
1020
1080
|
() => n.options,
|
|
1021
1081
|
() => {
|
|
1022
1082
|
l.value = -1;
|
|
1023
1083
|
}
|
|
1024
1084
|
);
|
|
1025
1085
|
function d() {
|
|
1026
|
-
|
|
1027
|
-
|
|
1086
|
+
xe(() => {
|
|
1087
|
+
a.value?.querySelector(
|
|
1028
1088
|
`[data-index="${l.value}"]`
|
|
1029
1089
|
)?.scrollIntoView({ block: "nearest" });
|
|
1030
1090
|
});
|
|
1031
1091
|
}
|
|
1032
|
-
function
|
|
1092
|
+
function p(s) {
|
|
1033
1093
|
const m = n.options?.length ?? 0;
|
|
1034
1094
|
if (m)
|
|
1035
1095
|
switch (s.key) {
|
|
@@ -1047,91 +1107,91 @@ const Do = /* @__PURE__ */ w({
|
|
|
1047
1107
|
function i(s) {
|
|
1048
1108
|
l.value = -1, c("select", s);
|
|
1049
1109
|
}
|
|
1050
|
-
return t({ handleKeydown:
|
|
1110
|
+
return t({ handleKeydown: p }), (s, m) => (r(), f("ul", {
|
|
1051
1111
|
ref_key: "listRef",
|
|
1052
|
-
ref:
|
|
1112
|
+
ref: a,
|
|
1053
1113
|
role: "listbox",
|
|
1054
1114
|
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"
|
|
1055
1115
|
}, [
|
|
1056
|
-
s.isLoading ? (
|
|
1116
|
+
s.isLoading ? (r(), f(L, { key: 0 }, P(2, (b) => u("li", {
|
|
1057
1117
|
key: `skel-${b}`,
|
|
1058
1118
|
class: "pointer-events-none px-3 py-2"
|
|
1059
1119
|
}, [...m[0] || (m[0] = [
|
|
1060
1120
|
u("div", { class: "flex items-center gap-3" }, [
|
|
1061
1121
|
u("div", { class: "skeleton h-3 w-3/4 rounded" })
|
|
1062
1122
|
], -1)
|
|
1063
|
-
])])), 64)) : s.options.length === 0 ? (
|
|
1123
|
+
])])), 64)) : s.options.length === 0 ? (r(), f("li", Io, [...m[1] || (m[1] = [
|
|
1064
1124
|
u("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1065
|
-
])])) : (
|
|
1125
|
+
])])) : (r(!0), f(L, { key: 2 }, P(s.options, (b, y) => (r(), f("li", {
|
|
1066
1126
|
key: b.value,
|
|
1067
|
-
"data-index":
|
|
1127
|
+
"data-index": y,
|
|
1068
1128
|
role: "option",
|
|
1069
|
-
"aria-selected":
|
|
1070
|
-
onMousedown:
|
|
1071
|
-
onMousemove: (D) => l.value =
|
|
1129
|
+
"aria-selected": y === l.value,
|
|
1130
|
+
onMousedown: le((D) => i(b), ["prevent"]),
|
|
1131
|
+
onMousemove: (D) => l.value = y
|
|
1072
1132
|
}, [
|
|
1073
1133
|
u("a", {
|
|
1074
|
-
class:
|
|
1075
|
-
"active bg-secondary text-primary-content":
|
|
1076
|
-
"hover:bg-base-200":
|
|
1134
|
+
class: C(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1135
|
+
"active bg-secondary text-primary-content": y === l.value,
|
|
1136
|
+
"hover:bg-base-200": y !== l.value
|
|
1077
1137
|
}])
|
|
1078
1138
|
}, [
|
|
1079
1139
|
u("span", {
|
|
1080
1140
|
class: "whitespace-nowrap",
|
|
1081
|
-
innerHTML:
|
|
1082
|
-
}, null, 8,
|
|
1083
|
-
s.isActive(b) ? (
|
|
1141
|
+
innerHTML: Eo(b.label, s.query)
|
|
1142
|
+
}, null, 8, Ro),
|
|
1143
|
+
s.isActive(b) ? (r(), f("svg", To, [...m[2] || (m[2] = [
|
|
1084
1144
|
u("path", {
|
|
1085
1145
|
"stroke-linecap": "round",
|
|
1086
1146
|
"stroke-linejoin": "round",
|
|
1087
1147
|
d: "M5 13l4 4L19 7"
|
|
1088
1148
|
}, null, -1)
|
|
1089
|
-
])])) :
|
|
1149
|
+
])])) : _("", !0)
|
|
1090
1150
|
], 2)
|
|
1091
|
-
], 40,
|
|
1151
|
+
], 40, Do))), 128))
|
|
1092
1152
|
], 512));
|
|
1093
1153
|
}
|
|
1094
|
-
}),
|
|
1154
|
+
}), Ve = ({ isTouched: e, errors: t }) => !!(e && t), No = (e, t, o, n) => t === void 0 || t !== void 0 && !e || !n && !o, U = (e, t) => [e, { "input-error": Ve(t) }], qo = { key: 0 }, Z = /* @__PURE__ */ k({
|
|
1095
1155
|
__name: "ControlWrapper",
|
|
1096
|
-
props:
|
|
1156
|
+
props: K,
|
|
1097
1157
|
setup(e) {
|
|
1098
|
-
const t = e, o = v(() => !
|
|
1158
|
+
const t = e, o = v(() => !No(
|
|
1099
1159
|
t.visible,
|
|
1100
1160
|
t.description,
|
|
1101
1161
|
t.isFocused,
|
|
1102
1162
|
!0
|
|
1103
|
-
)), n = v(() => t.required), l = v(() =>
|
|
1104
|
-
return (c, d) => (
|
|
1105
|
-
class:
|
|
1163
|
+
)), n = v(() => t.required), l = v(() => Ve(t)), a = v(() => ae(t.styles));
|
|
1164
|
+
return (c, d) => (r(), f("fieldset", {
|
|
1165
|
+
class: C(["fieldset", [c.width, a.value.control.wrapper]])
|
|
1106
1166
|
}, [
|
|
1107
1167
|
u("legend", {
|
|
1108
|
-
class:
|
|
1168
|
+
class: C(a.value.control.label)
|
|
1109
1169
|
}, [
|
|
1110
|
-
c.hideLabel ?
|
|
1170
|
+
c.hideLabel ? _("", !0) : (r(), f(L, { key: 0 }, [
|
|
1111
1171
|
u("span", null, h(c.label), 1),
|
|
1112
|
-
n.value ? (
|
|
1172
|
+
n.value ? (r(), f("span", qo, "*")) : _("", !0)
|
|
1113
1173
|
], 64)),
|
|
1114
|
-
d[0] || (d[0] =
|
|
1174
|
+
d[0] || (d[0] = E(" ", -1))
|
|
1115
1175
|
], 2),
|
|
1116
1176
|
M(c.$slots, "default"),
|
|
1117
1177
|
u("p", {
|
|
1118
|
-
class:
|
|
1178
|
+
class: C(["fieldset-label h-4", { "text-error": l.value }])
|
|
1119
1179
|
}, h(l.value ? c.errors : o.value ? c.description : null), 3)
|
|
1120
1180
|
], 2));
|
|
1121
1181
|
}
|
|
1122
|
-
}),
|
|
1182
|
+
}), jo = ["aria-label"], Fo = { class: "flex items-center w-full" }, Ko = { class: "overflow-hidden w-full" }, Uo = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, Ho = {
|
|
1123
1183
|
key: 0,
|
|
1124
1184
|
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1125
|
-
}, he = /* @__PURE__ */
|
|
1185
|
+
}, he = /* @__PURE__ */ k({
|
|
1126
1186
|
__name: "SelectWrapper",
|
|
1127
|
-
props:
|
|
1128
|
-
emits:
|
|
1187
|
+
props: Be,
|
|
1188
|
+
emits: Oo,
|
|
1129
1189
|
setup(e, { emit: t }) {
|
|
1130
|
-
const o = e, n =
|
|
1131
|
-
d(),
|
|
1190
|
+
const o = e, n = x(), l = x(), a = t, c = () => {
|
|
1191
|
+
d(), a("clear");
|
|
1132
1192
|
}, d = () => {
|
|
1133
|
-
|
|
1134
|
-
},
|
|
1193
|
+
a("close");
|
|
1194
|
+
}, p = (s) => {
|
|
1135
1195
|
if (s.key === "Escape") {
|
|
1136
1196
|
d();
|
|
1137
1197
|
return;
|
|
@@ -1140,33 +1200,35 @@ const Do = /* @__PURE__ */ w({
|
|
|
1140
1200
|
}, i = (s) => {
|
|
1141
1201
|
n.value && !n.value.contains(s.target) && d();
|
|
1142
1202
|
};
|
|
1143
|
-
return
|
|
1203
|
+
return Ce(() => {
|
|
1144
1204
|
document.addEventListener("click", i);
|
|
1145
|
-
}),
|
|
1205
|
+
}), _e(() => {
|
|
1146
1206
|
document.removeEventListener("click", i);
|
|
1147
|
-
}), (s, m) => (
|
|
1207
|
+
}), (s, m) => (r(), f("div", {
|
|
1148
1208
|
ref_key: "selectWrapperRef",
|
|
1149
|
-
ref: n
|
|
1209
|
+
ref: n,
|
|
1210
|
+
"aria-label": s.id,
|
|
1211
|
+
role: "select"
|
|
1150
1212
|
}, [
|
|
1151
1213
|
V(Z, ee(te(o)), {
|
|
1152
|
-
default:
|
|
1153
|
-
u("div",
|
|
1214
|
+
default: S(() => [
|
|
1215
|
+
u("div", Fo, [
|
|
1154
1216
|
u("div", {
|
|
1155
1217
|
class: "relative w-full",
|
|
1156
|
-
onKeydown:
|
|
1218
|
+
onKeydown: p
|
|
1157
1219
|
}, [
|
|
1158
|
-
u("div",
|
|
1220
|
+
u("div", Ko, [
|
|
1159
1221
|
M(s.$slots, "default")
|
|
1160
1222
|
]),
|
|
1161
|
-
u("div",
|
|
1162
|
-
s.isLoading && !s.label ? (
|
|
1163
|
-
s.query && !s.isLoading ? (
|
|
1223
|
+
u("div", Uo, [
|
|
1224
|
+
s.isLoading && !s.label ? (r(), f("span", Ho)) : _("", !0),
|
|
1225
|
+
s.query && !s.isLoading ? (r(), f("button", {
|
|
1164
1226
|
key: 1,
|
|
1165
1227
|
type: "button",
|
|
1166
1228
|
class: "pointer-events-auto btn btn-ghost btn-xs btn-circle opacity-60 hover:opacity-100",
|
|
1167
1229
|
tabindex: "-1",
|
|
1168
1230
|
"aria-label": "Clear",
|
|
1169
|
-
onMousedown:
|
|
1231
|
+
onMousedown: le(c, ["prevent"])
|
|
1170
1232
|
}, [...m[2] || (m[2] = [
|
|
1171
1233
|
u("svg", {
|
|
1172
1234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1182,10 +1244,10 @@ const Do = /* @__PURE__ */ w({
|
|
|
1182
1244
|
d: "M6 18L18 6M6 6l12 12"
|
|
1183
1245
|
})
|
|
1184
1246
|
], -1)
|
|
1185
|
-
])], 32)) :
|
|
1186
|
-
(
|
|
1247
|
+
])], 32)) : _("", !0),
|
|
1248
|
+
(r(), f("svg", {
|
|
1187
1249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1188
|
-
class:
|
|
1250
|
+
class: C(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": s.isOpen }]),
|
|
1189
1251
|
fill: "none",
|
|
1190
1252
|
viewBox: "0 0 24 24",
|
|
1191
1253
|
stroke: "currentColor",
|
|
@@ -1198,7 +1260,7 @@ const Do = /* @__PURE__ */ w({
|
|
|
1198
1260
|
}, null, -1)
|
|
1199
1261
|
])], 2))
|
|
1200
1262
|
]),
|
|
1201
|
-
V(
|
|
1263
|
+
V(Re, {
|
|
1202
1264
|
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1203
1265
|
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1204
1266
|
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
@@ -1206,8 +1268,8 @@ const Do = /* @__PURE__ */ w({
|
|
|
1206
1268
|
"leave-from-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1207
1269
|
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1208
1270
|
}, {
|
|
1209
|
-
default:
|
|
1210
|
-
s.isOpen ? (
|
|
1271
|
+
default: S(() => [
|
|
1272
|
+
s.isOpen ? (r(), w(zo, {
|
|
1211
1273
|
key: 0,
|
|
1212
1274
|
ref_key: "listResultsRef",
|
|
1213
1275
|
ref: l,
|
|
@@ -1215,105 +1277,106 @@ const Do = /* @__PURE__ */ w({
|
|
|
1215
1277
|
options: s.options,
|
|
1216
1278
|
"is-loading": s.isLoading,
|
|
1217
1279
|
"is-active": s.isActive,
|
|
1218
|
-
onSelect: m[0] || (m[0] = (b) =>
|
|
1219
|
-
}, null, 8, ["query", "options", "is-loading", "is-active"])) :
|
|
1280
|
+
onSelect: m[0] || (m[0] = (b) => a("select", b))
|
|
1281
|
+
}, null, 8, ["query", "options", "is-loading", "is-active"])) : _("", !0)
|
|
1220
1282
|
]),
|
|
1221
1283
|
_: 1
|
|
1222
1284
|
})
|
|
1223
1285
|
], 32),
|
|
1224
|
-
s.enableCreate ? (
|
|
1286
|
+
s.enableCreate ? (r(), w(z, {
|
|
1225
1287
|
key: 0,
|
|
1226
1288
|
icon: "Plus",
|
|
1227
1289
|
color: "blank",
|
|
1228
1290
|
size: "lg",
|
|
1229
1291
|
tooltip: "Create new",
|
|
1230
|
-
|
|
1231
|
-
|
|
1292
|
+
"aria-label": "create",
|
|
1293
|
+
onClick: m[1] || (m[1] = (b) => a("create"))
|
|
1294
|
+
})) : _("", !0)
|
|
1232
1295
|
])
|
|
1233
1296
|
]),
|
|
1234
1297
|
_: 3
|
|
1235
1298
|
}, 16)
|
|
1236
|
-
],
|
|
1299
|
+
], 8, jo));
|
|
1237
1300
|
}
|
|
1238
|
-
}),
|
|
1301
|
+
}), ue = (e, t) => {
|
|
1239
1302
|
if (e)
|
|
1240
1303
|
return typeof e == "object" ? e[t.labelKey] : e;
|
|
1241
|
-
},
|
|
1304
|
+
}, ie = (e, t) => {
|
|
1242
1305
|
if (e)
|
|
1243
1306
|
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1244
|
-
},
|
|
1245
|
-
const t =
|
|
1307
|
+
}, Wo = (e) => {
|
|
1308
|
+
const t = x([]), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = (s) => {
|
|
1246
1309
|
const m = [];
|
|
1247
1310
|
o.clear(), n.clear(), s?.forEach((b) => {
|
|
1248
|
-
const
|
|
1249
|
-
value:
|
|
1250
|
-
label:
|
|
1311
|
+
const y = {
|
|
1312
|
+
value: ie(b, e),
|
|
1313
|
+
label: ue(b, e)
|
|
1251
1314
|
};
|
|
1252
|
-
o.set(
|
|
1315
|
+
o.set(y.value, b), m.push(y);
|
|
1253
1316
|
}), t.value = m;
|
|
1254
|
-
},
|
|
1317
|
+
}, a = (s) => o.get(s.value);
|
|
1255
1318
|
return {
|
|
1256
1319
|
options: t,
|
|
1257
1320
|
setOptions: l,
|
|
1258
|
-
getOriginal:
|
|
1259
|
-
getLabels: (...s) => s.map((m) =>
|
|
1260
|
-
getValues: (...s) => s.map((m) =>
|
|
1261
|
-
getOption: (s) => n.get(
|
|
1262
|
-
getOriginals: (...s) => s.map(
|
|
1321
|
+
getOriginal: a,
|
|
1322
|
+
getLabels: (...s) => s.map((m) => ue(m, e)),
|
|
1323
|
+
getValues: (...s) => s.map((m) => ie(m, e)),
|
|
1324
|
+
getOption: (s) => n.get(ie(s, e)),
|
|
1325
|
+
getOriginals: (...s) => s.map(a).filter(Boolean)
|
|
1263
1326
|
};
|
|
1264
|
-
}, ye = (e) =>
|
|
1327
|
+
}, ye = (e) => Wo(e), Go = ["aria-label"], Mn = /* @__PURE__ */ k({
|
|
1265
1328
|
__name: "SelectComponent",
|
|
1266
|
-
props: /* @__PURE__ */
|
|
1329
|
+
props: /* @__PURE__ */ I(ve, {
|
|
1267
1330
|
modelValue: {},
|
|
1268
1331
|
modelModifiers: {}
|
|
1269
1332
|
}),
|
|
1270
|
-
emits: /* @__PURE__ */
|
|
1333
|
+
emits: /* @__PURE__ */ I(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1271
1334
|
setup(e, { emit: t }) {
|
|
1272
|
-
const o =
|
|
1273
|
-
|
|
1335
|
+
const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = ye(n), { options: d } = c;
|
|
1336
|
+
q(
|
|
1274
1337
|
() => n.options,
|
|
1275
1338
|
() => {
|
|
1276
1339
|
c.setOptions(n.options);
|
|
1277
1340
|
},
|
|
1278
1341
|
{ immediate: !0 }
|
|
1279
1342
|
);
|
|
1280
|
-
const
|
|
1343
|
+
const p = (A) => {
|
|
1281
1344
|
l("change", A);
|
|
1282
1345
|
}, i = v(
|
|
1283
|
-
() =>
|
|
1284
|
-
), s = v(() =>
|
|
1346
|
+
() => a.value ? c.getLabels(a.value)[0] : ""
|
|
1347
|
+
), s = v(() => ae(n.styles)), m = v(
|
|
1285
1348
|
() => U(s.value.control.select, n)
|
|
1286
1349
|
), b = (A) => {
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
},
|
|
1290
|
-
o.value = !1,
|
|
1291
|
-
}, D = (A) => c.getValues(
|
|
1350
|
+
const $ = c.getOriginal(A);
|
|
1351
|
+
a.value = $, p($);
|
|
1352
|
+
}, y = () => {
|
|
1353
|
+
o.value = !1, a.value = null, p(void 0);
|
|
1354
|
+
}, D = (A) => c.getValues(a.value)?.[0] === A.value, H = () => {
|
|
1292
1355
|
o.value = !1;
|
|
1293
1356
|
};
|
|
1294
|
-
return (A,
|
|
1357
|
+
return (A, $) => (r(), w(he, B(n, {
|
|
1295
1358
|
options: g(d),
|
|
1296
1359
|
disabled: !A.enabled,
|
|
1297
1360
|
"is-open": o.value,
|
|
1298
1361
|
query: i.value,
|
|
1299
1362
|
"is-active": D,
|
|
1300
|
-
onClose:
|
|
1363
|
+
onClose: H,
|
|
1301
1364
|
onSelect: b,
|
|
1302
|
-
onClear:
|
|
1365
|
+
onClear: y
|
|
1303
1366
|
}), {
|
|
1304
|
-
default:
|
|
1367
|
+
default: S(() => [
|
|
1305
1368
|
u("button", {
|
|
1306
1369
|
type: "button",
|
|
1307
|
-
class:
|
|
1308
|
-
onClick: C[0] || (C[0] = (R) => o.value = !0),
|
|
1370
|
+
class: C(["truncate block text-left", [m.value, A.width]]),
|
|
1309
1371
|
"aria-label": A.id,
|
|
1310
|
-
role: "combobox"
|
|
1311
|
-
|
|
1372
|
+
role: "combobox",
|
|
1373
|
+
onClick: $[0] || ($[0] = (R) => o.value = !0)
|
|
1374
|
+
}, h(i.value ?? "Select value"), 11, Go)
|
|
1312
1375
|
]),
|
|
1313
1376
|
_: 1
|
|
1314
1377
|
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1315
1378
|
}
|
|
1316
|
-
}),
|
|
1379
|
+
}), Xo = {
|
|
1317
1380
|
...ve,
|
|
1318
1381
|
...ge,
|
|
1319
1382
|
/** v-model binding */
|
|
@@ -1346,15 +1409,15 @@ const Do = /* @__PURE__ */ w({
|
|
|
1346
1409
|
default: !1
|
|
1347
1410
|
}
|
|
1348
1411
|
};
|
|
1349
|
-
function
|
|
1350
|
-
const t =
|
|
1351
|
-
function n(
|
|
1412
|
+
function Zo(e) {
|
|
1413
|
+
const t = x([]), o = x(!1);
|
|
1414
|
+
function n(a) {
|
|
1352
1415
|
if (!e.options) {
|
|
1353
1416
|
t.value = [];
|
|
1354
1417
|
return;
|
|
1355
1418
|
}
|
|
1356
|
-
const c =
|
|
1357
|
-
(
|
|
1419
|
+
const c = a.toLowerCase(), d = c ? e.options.filter(
|
|
1420
|
+
(p) => ue(p, e).toLowerCase().includes(c)
|
|
1358
1421
|
) : e.options;
|
|
1359
1422
|
t.value = d.slice(0, e.maxResults);
|
|
1360
1423
|
}
|
|
@@ -1363,13 +1426,13 @@ function Ko(e) {
|
|
|
1363
1426
|
}
|
|
1364
1427
|
return { results: t, isLoading: o, search: n, clear: l };
|
|
1365
1428
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const t =
|
|
1429
|
+
function Jo(e) {
|
|
1430
|
+
const t = x([]), o = x(!1);
|
|
1368
1431
|
let n = null, l = null;
|
|
1369
|
-
async function
|
|
1432
|
+
async function a(p) {
|
|
1370
1433
|
l && l.abort(), l = new AbortController(), o.value = !0;
|
|
1371
1434
|
try {
|
|
1372
|
-
const i = await e.fetchOptions(
|
|
1435
|
+
const i = await e.fetchOptions(p, l.signal);
|
|
1373
1436
|
t.value = (i || []).slice(0, e.maxResults);
|
|
1374
1437
|
} catch (i) {
|
|
1375
1438
|
i.name !== "AbortError" && (t.value = []);
|
|
@@ -1377,9 +1440,9 @@ function Ho(e) {
|
|
|
1377
1440
|
o.value = !1;
|
|
1378
1441
|
}
|
|
1379
1442
|
}
|
|
1380
|
-
function c(
|
|
1443
|
+
function c(p) {
|
|
1381
1444
|
n && clearTimeout(n), o.value = !0, n = setTimeout(() => {
|
|
1382
|
-
|
|
1445
|
+
a(p);
|
|
1383
1446
|
}, e.debounceMs);
|
|
1384
1447
|
}
|
|
1385
1448
|
function d() {
|
|
@@ -1387,8 +1450,8 @@ function Ho(e) {
|
|
|
1387
1450
|
}
|
|
1388
1451
|
return { results: t, isLoading: o, search: c, clear: d };
|
|
1389
1452
|
}
|
|
1390
|
-
function
|
|
1391
|
-
const t = e.fetchOptions ?
|
|
1453
|
+
function Qo(e) {
|
|
1454
|
+
const t = e.fetchOptions ? Jo(e) : Zo(e);
|
|
1392
1455
|
function o(n) {
|
|
1393
1456
|
t.search(n);
|
|
1394
1457
|
}
|
|
@@ -1399,96 +1462,96 @@ function Wo(e) {
|
|
|
1399
1462
|
clear: t.clear
|
|
1400
1463
|
};
|
|
1401
1464
|
}
|
|
1402
|
-
const
|
|
1465
|
+
const Yo = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"], Bn = /* @__PURE__ */ k({
|
|
1403
1466
|
__name: "AutoComplete",
|
|
1404
|
-
props:
|
|
1467
|
+
props: Xo,
|
|
1405
1468
|
emits: ["update:modelValue", "change", "clear", "focus", "blur"],
|
|
1406
1469
|
setup(e, { emit: t }) {
|
|
1407
|
-
const o = e, n = t, l =
|
|
1408
|
-
|
|
1470
|
+
const o = e, n = t, l = x(null), a = x(""), c = x(!1), d = Qo(o), { isLoading: p, triggerSearch: i, clear: s } = d, m = ye(o), { options: b } = m;
|
|
1471
|
+
q(
|
|
1409
1472
|
() => d.results.value,
|
|
1410
1473
|
() => {
|
|
1411
1474
|
m.setOptions(d.results.value);
|
|
1412
1475
|
},
|
|
1413
1476
|
{ immediate: !0 }
|
|
1414
|
-
),
|
|
1477
|
+
), q(
|
|
1415
1478
|
() => o.modelValue,
|
|
1416
|
-
(
|
|
1417
|
-
if (
|
|
1418
|
-
|
|
1479
|
+
(O) => {
|
|
1480
|
+
if (O == null || O === "") {
|
|
1481
|
+
a.value = "";
|
|
1419
1482
|
return;
|
|
1420
1483
|
}
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1484
|
+
const G = typeof O == "object" ? O[o.labelKey] : O;
|
|
1485
|
+
G !== a.value && (a.value = G);
|
|
1423
1486
|
},
|
|
1424
1487
|
{ immediate: !0 }
|
|
1425
1488
|
);
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1489
|
+
const y = (O) => {
|
|
1490
|
+
a.value = O.target.value, o.freeText ? n("update:modelValue", a.value) : n("update:modelValue", ""), i(a.value), c.value = !0;
|
|
1428
1491
|
}, D = () => {
|
|
1429
|
-
i(
|
|
1492
|
+
i(a.value), c.value = !0;
|
|
1430
1493
|
};
|
|
1431
|
-
function
|
|
1494
|
+
function H() {
|
|
1432
1495
|
setTimeout(() => {
|
|
1433
|
-
c.value = !1, o.freeText ? n("change",
|
|
1496
|
+
c.value = !1, o.freeText ? n("change", a.value) : o.modelValue || (a.value = "");
|
|
1434
1497
|
}, 150);
|
|
1435
1498
|
}
|
|
1436
|
-
const A = (
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
},
|
|
1440
|
-
|
|
1499
|
+
const A = (O) => {
|
|
1500
|
+
const G = m.getOriginal(O);
|
|
1501
|
+
a.value = O.label, c.value = !1, n("update:modelValue", G), n("change", G);
|
|
1502
|
+
}, $ = () => {
|
|
1503
|
+
a.value = "", s(), c.value = !1, n("update:modelValue", ""), n("clear"), xe(() => l.value?.focus());
|
|
1441
1504
|
}, R = () => {
|
|
1442
1505
|
c.value = !1;
|
|
1443
|
-
},
|
|
1444
|
-
() => U(
|
|
1506
|
+
}, W = v(() => ae(o.styles)), Ae = v(
|
|
1507
|
+
() => U(W.value.control.select, o)
|
|
1445
1508
|
);
|
|
1446
|
-
return (
|
|
1509
|
+
return (O, G) => (r(), w(he, B(o, {
|
|
1447
1510
|
options: g(b),
|
|
1448
|
-
"is-loading": g(
|
|
1511
|
+
"is-loading": g(p),
|
|
1449
1512
|
"is-open": c.value,
|
|
1450
|
-
query:
|
|
1513
|
+
query: a.value,
|
|
1451
1514
|
onClose: R,
|
|
1452
1515
|
onSelect: A,
|
|
1453
|
-
onClear:
|
|
1516
|
+
onClear: $
|
|
1454
1517
|
}), {
|
|
1455
|
-
default:
|
|
1518
|
+
default: S(() => [
|
|
1456
1519
|
u("input", {
|
|
1457
1520
|
ref_key: "inputRef",
|
|
1458
1521
|
ref: l,
|
|
1459
1522
|
type: "text",
|
|
1460
1523
|
role: "combobox",
|
|
1461
|
-
"aria-label":
|
|
1524
|
+
"aria-label": O.id,
|
|
1462
1525
|
"aria-expanded": c.value,
|
|
1463
1526
|
"aria-autocomplete": "list",
|
|
1464
1527
|
"aria-haspopup": "listbox",
|
|
1465
1528
|
autocomplete: "off",
|
|
1466
1529
|
autocorrect: "off",
|
|
1467
1530
|
spellcheck: "false",
|
|
1468
|
-
class:
|
|
1469
|
-
value:
|
|
1470
|
-
placeholder:
|
|
1471
|
-
disabled: !
|
|
1472
|
-
onInput:
|
|
1531
|
+
class: C([Ae.value, "w-full"]),
|
|
1532
|
+
value: a.value,
|
|
1533
|
+
placeholder: O.placeholder,
|
|
1534
|
+
disabled: !O.enabled,
|
|
1535
|
+
onInput: y,
|
|
1473
1536
|
onFocus: D,
|
|
1474
|
-
onBlur:
|
|
1475
|
-
}, null, 42,
|
|
1537
|
+
onBlur: H
|
|
1538
|
+
}, null, 42, Yo)
|
|
1476
1539
|
]),
|
|
1477
1540
|
_: 1
|
|
1478
1541
|
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1479
1542
|
}
|
|
1480
|
-
}),
|
|
1543
|
+
}), es = ["aria-label"], Vn = /* @__PURE__ */ k({
|
|
1481
1544
|
__name: "MultiSelect",
|
|
1482
|
-
props: /* @__PURE__ */
|
|
1545
|
+
props: /* @__PURE__ */ I(Be, {
|
|
1483
1546
|
modelValue: {},
|
|
1484
1547
|
modelModifiers: {}
|
|
1485
1548
|
}),
|
|
1486
|
-
emits: /* @__PURE__ */
|
|
1549
|
+
emits: /* @__PURE__ */ I(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1487
1550
|
setup(e, { emit: t }) {
|
|
1488
|
-
const o =
|
|
1489
|
-
l("change",
|
|
1490
|
-
}, d = ye(n), { options:
|
|
1491
|
-
|
|
1551
|
+
const o = x(!1), n = e, l = t, a = F(e, "modelValue"), c = ($) => {
|
|
1552
|
+
l("change", $);
|
|
1553
|
+
}, d = ye(n), { options: p } = d;
|
|
1554
|
+
q(
|
|
1492
1555
|
() => n.options,
|
|
1493
1556
|
() => {
|
|
1494
1557
|
d.setOptions(n.options);
|
|
@@ -1496,51 +1559,51 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1496
1559
|
{ immediate: !0 }
|
|
1497
1560
|
);
|
|
1498
1561
|
const i = v(
|
|
1499
|
-
() =>
|
|
1562
|
+
() => a.value ? d.getLabels(...a.value).join(", ") : void 0
|
|
1500
1563
|
), s = v(
|
|
1501
|
-
() => d.getValues(...
|
|
1502
|
-
), m = (
|
|
1503
|
-
let R =
|
|
1504
|
-
if (D(
|
|
1564
|
+
() => d.getValues(...a.value ?? [])
|
|
1565
|
+
), m = ($) => {
|
|
1566
|
+
let R = a.value ?? [];
|
|
1567
|
+
if (D($))
|
|
1505
1568
|
R = R.filter(
|
|
1506
|
-
(
|
|
1569
|
+
(W) => d.getOption(W) !== $.value
|
|
1507
1570
|
);
|
|
1508
1571
|
else {
|
|
1509
|
-
const
|
|
1510
|
-
R.push(
|
|
1572
|
+
const W = d.getOriginal($);
|
|
1573
|
+
R.push(W);
|
|
1511
1574
|
}
|
|
1512
|
-
|
|
1575
|
+
a.value = R, c(R);
|
|
1513
1576
|
}, b = () => {
|
|
1514
|
-
o.value = !1,
|
|
1515
|
-
},
|
|
1577
|
+
o.value = !1, a.value = [], c([]);
|
|
1578
|
+
}, y = () => {
|
|
1516
1579
|
o.value = !1;
|
|
1517
|
-
}, D = (
|
|
1518
|
-
() => U(
|
|
1580
|
+
}, D = ($) => s.value?.includes($.value) ?? !1, H = v(() => ae(n.styles)), A = v(
|
|
1581
|
+
() => U(H.value.control.select, n)
|
|
1519
1582
|
);
|
|
1520
|
-
return (
|
|
1521
|
-
options: g(
|
|
1583
|
+
return ($, R) => (r(), w(he, B(n, {
|
|
1584
|
+
options: g(p),
|
|
1522
1585
|
"is-open": o.value,
|
|
1523
|
-
disabled:
|
|
1586
|
+
disabled: !$.enabled,
|
|
1524
1587
|
query: i.value,
|
|
1525
1588
|
"is-active": D,
|
|
1526
|
-
onClose:
|
|
1589
|
+
onClose: y,
|
|
1527
1590
|
onSelect: m,
|
|
1528
1591
|
onClear: b
|
|
1529
1592
|
}), {
|
|
1530
|
-
default:
|
|
1593
|
+
default: S(() => [
|
|
1531
1594
|
u("button", {
|
|
1532
1595
|
type: "button",
|
|
1533
|
-
class:
|
|
1534
|
-
|
|
1535
|
-
"
|
|
1536
|
-
|
|
1537
|
-
}, h(i.value ?? "Select value"), 11,
|
|
1596
|
+
class: C(["truncate block text-left", [A.value, $.width]]),
|
|
1597
|
+
"aria-label": $.id,
|
|
1598
|
+
role: "combobox",
|
|
1599
|
+
onClick: R[0] || (R[0] = (W) => o.value = !0)
|
|
1600
|
+
}, h(i.value ?? "Select value"), 11, es)
|
|
1538
1601
|
]),
|
|
1539
1602
|
_: 1
|
|
1540
1603
|
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1541
1604
|
}
|
|
1542
|
-
}),
|
|
1543
|
-
...
|
|
1605
|
+
}), ts = ["change"], os = {
|
|
1606
|
+
...K,
|
|
1544
1607
|
width: { type: String, default: "w-48" },
|
|
1545
1608
|
minHeight: { type: String, default: "min-h-96" },
|
|
1546
1609
|
actions: {
|
|
@@ -1558,18 +1621,18 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1558
1621
|
}
|
|
1559
1622
|
]
|
|
1560
1623
|
}
|
|
1561
|
-
},
|
|
1624
|
+
}, ss = ["aria-label"], ns = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, ls = ["title", "onClick"], as = ["innerHTML"], rs = { class: "card-body p-3" }, An = /* @__PURE__ */ k({
|
|
1562
1625
|
__name: "Markdown",
|
|
1563
|
-
props: /* @__PURE__ */
|
|
1626
|
+
props: /* @__PURE__ */ I(os, {
|
|
1564
1627
|
modelValue: {},
|
|
1565
1628
|
modelModifiers: {}
|
|
1566
1629
|
}),
|
|
1567
|
-
emits: /* @__PURE__ */
|
|
1630
|
+
emits: /* @__PURE__ */ I(ts, ["update:modelValue"]),
|
|
1568
1631
|
setup(e, { emit: t }) {
|
|
1569
|
-
const o = e, n = t, l =
|
|
1632
|
+
const o = e, n = t, l = F(e, "modelValue"), a = rt({
|
|
1570
1633
|
content: l.value ?? "",
|
|
1571
1634
|
extensions: [
|
|
1572
|
-
|
|
1635
|
+
at.configure({
|
|
1573
1636
|
heading: !1,
|
|
1574
1637
|
blockquote: !1,
|
|
1575
1638
|
bulletList: !1,
|
|
@@ -1580,7 +1643,7 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1580
1643
|
horizontalRule: !1,
|
|
1581
1644
|
hardBreak: !1
|
|
1582
1645
|
}),
|
|
1583
|
-
|
|
1646
|
+
ut.configure({
|
|
1584
1647
|
html: !1,
|
|
1585
1648
|
transformPastedText: !0
|
|
1586
1649
|
// parse markdown on paste
|
|
@@ -1590,284 +1653,292 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1590
1653
|
n("change", c.storage.markdown.getMarkdown());
|
|
1591
1654
|
}
|
|
1592
1655
|
});
|
|
1593
|
-
return
|
|
1594
|
-
|
|
1595
|
-
}), (c, d) => (
|
|
1596
|
-
default:
|
|
1656
|
+
return Te(() => {
|
|
1657
|
+
a.value?.destroy();
|
|
1658
|
+
}), (c, d) => (r(), w(Z, ee(te(o)), {
|
|
1659
|
+
default: S(() => [
|
|
1597
1660
|
u("div", {
|
|
1598
|
-
class:
|
|
1661
|
+
class: C([[c.minHeight], "card bg-base-100 border border-base-300 w-full"]),
|
|
1599
1662
|
"aria-label": c.id,
|
|
1600
1663
|
role: "textbox"
|
|
1601
1664
|
}, [
|
|
1602
|
-
u("div",
|
|
1603
|
-
(
|
|
1604
|
-
key:
|
|
1665
|
+
u("div", ns, [
|
|
1666
|
+
(r(!0), f(L, null, P(c.actions, (p) => (r(), f("button", {
|
|
1667
|
+
key: p.name,
|
|
1605
1668
|
tabindex: "-1",
|
|
1606
1669
|
type: "button",
|
|
1607
|
-
class:
|
|
1608
|
-
title:
|
|
1609
|
-
onClick: (i) =>
|
|
1670
|
+
class: C(["btn btn-sm btn-ghost", { "btn-active": g(a)?.isActive(p.name) }]),
|
|
1671
|
+
title: p.label,
|
|
1672
|
+
onClick: (i) => p.action(g(a))
|
|
1610
1673
|
}, [
|
|
1611
1674
|
u("span", {
|
|
1612
|
-
innerHTML:
|
|
1613
|
-
}, null, 8,
|
|
1614
|
-
], 10,
|
|
1675
|
+
innerHTML: p.label
|
|
1676
|
+
}, null, 8, as)
|
|
1677
|
+
], 10, ls))), 128))
|
|
1615
1678
|
]),
|
|
1616
|
-
u("div",
|
|
1617
|
-
V(g(
|
|
1618
|
-
editor: g(
|
|
1679
|
+
u("div", rs, [
|
|
1680
|
+
V(g(it), {
|
|
1681
|
+
editor: g(a),
|
|
1619
1682
|
class: "prose prose-sm max-w-none h-full"
|
|
1620
1683
|
}, null, 8, ["editor"])
|
|
1621
1684
|
])
|
|
1622
|
-
], 10,
|
|
1685
|
+
], 10, ss)
|
|
1623
1686
|
]),
|
|
1624
1687
|
_: 1
|
|
1625
1688
|
}, 16));
|
|
1626
1689
|
}
|
|
1627
|
-
}),
|
|
1628
|
-
...
|
|
1629
|
-
},
|
|
1690
|
+
}), is = {
|
|
1691
|
+
...K
|
|
1692
|
+
}, us = ["change", "focus", "blur"], cs = { class: "flex items-center justify-center h-full" }, ds = { class: "fieldset-label" }, ps = ["aria-label", "disabled"], fs = { class: "font-bold text-gray-500 text-sm" }, On = /* @__PURE__ */ k({
|
|
1630
1693
|
__name: "Checkbox",
|
|
1631
|
-
props: /* @__PURE__ */
|
|
1694
|
+
props: /* @__PURE__ */ I(is, {
|
|
1632
1695
|
modelValue: {},
|
|
1633
1696
|
modelModifiers: {}
|
|
1634
1697
|
}),
|
|
1635
|
-
emits: /* @__PURE__ */
|
|
1698
|
+
emits: /* @__PURE__ */ I(us, ["update:modelValue"]),
|
|
1636
1699
|
setup(e, { emit: t }) {
|
|
1637
|
-
const o = e, n = t, l =
|
|
1700
|
+
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1638
1701
|
n("change", i);
|
|
1639
1702
|
}, c = (i) => {
|
|
1640
1703
|
n("focus", i);
|
|
1641
1704
|
}, d = (i) => {
|
|
1642
1705
|
n("blur", i);
|
|
1643
|
-
},
|
|
1706
|
+
}, p = v(
|
|
1644
1707
|
() => U(o.styles.control.checkbox, o)
|
|
1645
1708
|
);
|
|
1646
|
-
return (i, s) => (
|
|
1709
|
+
return (i, s) => (r(), f("div", cs, [
|
|
1647
1710
|
V(Z, B(o, { "hide-label": !0 }), {
|
|
1648
|
-
default:
|
|
1649
|
-
u("label",
|
|
1711
|
+
default: S(() => [
|
|
1712
|
+
u("label", ds, [
|
|
1650
1713
|
Y(u("input", {
|
|
1651
1714
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1652
1715
|
"aria-label": i.id,
|
|
1653
1716
|
role: "checkbox",
|
|
1654
1717
|
type: "checkbox",
|
|
1655
|
-
class:
|
|
1718
|
+
class: C(p.value),
|
|
1656
1719
|
disabled: !i.enabled,
|
|
1657
|
-
onChange:
|
|
1720
|
+
onChange: a,
|
|
1658
1721
|
onFocus: c,
|
|
1659
1722
|
onBlur: d
|
|
1660
|
-
}, null, 42,
|
|
1661
|
-
[
|
|
1723
|
+
}, null, 42, ps), [
|
|
1724
|
+
[$e, l.value]
|
|
1662
1725
|
]),
|
|
1663
|
-
u("span",
|
|
1726
|
+
u("span", fs, h(i.label), 1)
|
|
1664
1727
|
])
|
|
1665
1728
|
]),
|
|
1666
1729
|
_: 1
|
|
1667
1730
|
}, 16)
|
|
1668
1731
|
]));
|
|
1669
1732
|
}
|
|
1670
|
-
}),
|
|
1671
|
-
...
|
|
1733
|
+
}), ms = {
|
|
1734
|
+
...K,
|
|
1672
1735
|
type: { type: String, default: "text" }
|
|
1673
|
-
},
|
|
1736
|
+
}, bs = ["change", "focus", "blur"], gs = ["aria-label", "type", "disabled", "autofocus", "placeholder"], In = /* @__PURE__ */ k({
|
|
1674
1737
|
__name: "Input",
|
|
1675
|
-
props: /* @__PURE__ */
|
|
1738
|
+
props: /* @__PURE__ */ I(ms, {
|
|
1676
1739
|
modelValue: {},
|
|
1677
1740
|
modelModifiers: {}
|
|
1678
1741
|
}),
|
|
1679
|
-
emits: /* @__PURE__ */
|
|
1742
|
+
emits: /* @__PURE__ */ I(bs, ["update:modelValue"]),
|
|
1680
1743
|
setup(e, { emit: t }) {
|
|
1681
|
-
const o = e, n = t, l =
|
|
1744
|
+
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1682
1745
|
n("change", i);
|
|
1683
1746
|
}, c = (i) => {
|
|
1684
1747
|
n("focus", i);
|
|
1685
1748
|
}, d = (i) => {
|
|
1686
1749
|
n("blur", i);
|
|
1687
|
-
},
|
|
1750
|
+
}, p = v(
|
|
1688
1751
|
() => U(o.styles.control.input, o)
|
|
1689
1752
|
);
|
|
1690
|
-
return (i, s) => (
|
|
1691
|
-
default:
|
|
1753
|
+
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1754
|
+
default: S(() => [
|
|
1692
1755
|
Y(u("input", {
|
|
1693
1756
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1694
1757
|
"aria-label": i.id,
|
|
1695
1758
|
autocomplete: "off",
|
|
1696
1759
|
type: i.type,
|
|
1697
|
-
class:
|
|
1760
|
+
class: C(["w-full", p.value]),
|
|
1698
1761
|
disabled: !i.enabled,
|
|
1699
1762
|
autofocus: i.isFocused,
|
|
1700
1763
|
placeholder: i.placeholder,
|
|
1701
|
-
onChange:
|
|
1764
|
+
onChange: a,
|
|
1702
1765
|
onFocus: c,
|
|
1703
1766
|
onBlur: d
|
|
1704
|
-
}, null, 42,
|
|
1705
|
-
[
|
|
1767
|
+
}, null, 42, gs), [
|
|
1768
|
+
[Ee, l.value]
|
|
1706
1769
|
])
|
|
1707
1770
|
]),
|
|
1708
1771
|
_: 1
|
|
1709
1772
|
}, 16));
|
|
1710
1773
|
}
|
|
1711
|
-
}),
|
|
1712
|
-
...
|
|
1774
|
+
}), vs = {
|
|
1775
|
+
...K,
|
|
1713
1776
|
steps: { type: Number, default: 1 }
|
|
1714
|
-
},
|
|
1777
|
+
}, hs = ["change", "focus", "blur"], ys = ["aria-label", "disabled", "step", "autofocus", "placeholder"], Dn = /* @__PURE__ */ k({
|
|
1715
1778
|
__name: "InputNumber",
|
|
1716
|
-
props: /* @__PURE__ */
|
|
1779
|
+
props: /* @__PURE__ */ I(vs, {
|
|
1717
1780
|
modelValue: {},
|
|
1718
1781
|
modelModifiers: {}
|
|
1719
1782
|
}),
|
|
1720
|
-
emits: /* @__PURE__ */
|
|
1783
|
+
emits: /* @__PURE__ */ I(hs, ["update:modelValue"]),
|
|
1721
1784
|
setup(e, { emit: t }) {
|
|
1722
|
-
const o = e, n = t, l =
|
|
1785
|
+
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1723
1786
|
n("change", i);
|
|
1724
1787
|
}, c = (i) => {
|
|
1725
1788
|
n("focus", i);
|
|
1726
1789
|
}, d = (i) => {
|
|
1727
1790
|
n("blur", i);
|
|
1728
|
-
},
|
|
1791
|
+
}, p = v(
|
|
1729
1792
|
() => U(o.styles.control.input, o)
|
|
1730
1793
|
);
|
|
1731
|
-
return (i, s) => (
|
|
1732
|
-
default:
|
|
1794
|
+
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1795
|
+
default: S(() => [
|
|
1733
1796
|
Y(u("input", {
|
|
1734
1797
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1735
1798
|
autocomplete: "off",
|
|
1736
1799
|
"aria-label": i.id,
|
|
1737
1800
|
type: "number",
|
|
1738
|
-
class:
|
|
1801
|
+
class: C(["w-full", [p.value]]),
|
|
1739
1802
|
disabled: !i.enabled,
|
|
1740
1803
|
step: i.steps,
|
|
1741
1804
|
autofocus: i.isFocused,
|
|
1742
1805
|
placeholder: i.placeholder,
|
|
1743
|
-
onChange:
|
|
1806
|
+
onChange: a,
|
|
1744
1807
|
onFocus: c,
|
|
1745
1808
|
onBlur: d
|
|
1746
|
-
}, null, 42,
|
|
1747
|
-
[
|
|
1809
|
+
}, null, 42, ys), [
|
|
1810
|
+
[Le, l.value]
|
|
1748
1811
|
])
|
|
1749
1812
|
]),
|
|
1750
1813
|
_: 1
|
|
1751
1814
|
}, 16));
|
|
1752
1815
|
}
|
|
1753
|
-
}),
|
|
1754
|
-
...
|
|
1816
|
+
}), ws = {
|
|
1817
|
+
...K,
|
|
1755
1818
|
rows: { type: Number, default: 4 }
|
|
1756
|
-
},
|
|
1819
|
+
}, ks = ["change", "focus", "blur"], _s = ["aria-label", "disabled", "rows", "autofocus", "placeholder"], Rn = /* @__PURE__ */ k({
|
|
1757
1820
|
__name: "Textarea",
|
|
1758
|
-
props: /* @__PURE__ */
|
|
1821
|
+
props: /* @__PURE__ */ I(ws, {
|
|
1759
1822
|
modelValue: {},
|
|
1760
1823
|
modelModifiers: {}
|
|
1761
1824
|
}),
|
|
1762
|
-
emits: /* @__PURE__ */
|
|
1825
|
+
emits: /* @__PURE__ */ I(ks, ["update:modelValue"]),
|
|
1763
1826
|
setup(e, { emit: t }) {
|
|
1764
|
-
const o = e, n = t, l =
|
|
1827
|
+
const o = e, n = t, l = F(e, "modelValue"), a = (i) => {
|
|
1765
1828
|
n("change", i);
|
|
1766
1829
|
}, c = (i) => {
|
|
1767
1830
|
n("focus", i);
|
|
1768
1831
|
}, d = (i) => {
|
|
1769
1832
|
n("blur", i);
|
|
1770
|
-
},
|
|
1833
|
+
}, p = v(
|
|
1771
1834
|
() => U(o.styles.control.textarea, o)
|
|
1772
1835
|
);
|
|
1773
|
-
return (i, s) => (
|
|
1774
|
-
default:
|
|
1836
|
+
return (i, s) => (r(), w(Z, ee(te(o)), {
|
|
1837
|
+
default: S(() => [
|
|
1775
1838
|
Y(u("textarea", {
|
|
1776
1839
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1777
1840
|
autocomplete: "off",
|
|
1778
1841
|
type: "text",
|
|
1779
1842
|
"aria-label": i.id,
|
|
1780
|
-
class:
|
|
1843
|
+
class: C(["w-full", p.value]),
|
|
1781
1844
|
disabled: !i.enabled,
|
|
1782
1845
|
rows: i.rows,
|
|
1783
1846
|
autofocus: i.isFocused,
|
|
1784
1847
|
placeholder: i.placeholder,
|
|
1785
|
-
onChange:
|
|
1848
|
+
onChange: a,
|
|
1786
1849
|
onFocus: c,
|
|
1787
1850
|
onBlur: d
|
|
1788
|
-
}, null, 42,
|
|
1789
|
-
[
|
|
1851
|
+
}, null, 42, _s), [
|
|
1852
|
+
[Le, l.value]
|
|
1790
1853
|
])
|
|
1791
1854
|
]),
|
|
1792
1855
|
_: 1
|
|
1793
1856
|
}, 16));
|
|
1794
1857
|
}
|
|
1795
|
-
}),
|
|
1858
|
+
}), Cs = {
|
|
1796
1859
|
widthLeft: { type: Number, default: 200 },
|
|
1797
1860
|
widthRight: { type: Number, default: 200 },
|
|
1798
1861
|
initialLeftOpen: { type: Boolean, default: !0 },
|
|
1799
1862
|
initialRightOpen: { type: Boolean, default: !0 }
|
|
1800
|
-
},
|
|
1863
|
+
}, $s = { class: "flex h-full overflow-hidden gap-2" }, xs = {
|
|
1801
1864
|
key: 0,
|
|
1802
1865
|
id: "drawer-left",
|
|
1803
1866
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1804
|
-
},
|
|
1867
|
+
}, Ls = ["aria-expanded", "aria-label"], Ss = { class: "flex-1 overflow-y-auto bg-white" }, Ps = {
|
|
1805
1868
|
key: 1,
|
|
1806
1869
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
1807
|
-
},
|
|
1870
|
+
}, Ms = ["aria-expanded", "aria-label"], Tn = /* @__PURE__ */ k({
|
|
1808
1871
|
__name: "drawer",
|
|
1809
|
-
props:
|
|
1872
|
+
props: Cs,
|
|
1810
1873
|
setup(e) {
|
|
1811
|
-
const t = e, o =
|
|
1874
|
+
const t = e, o = Se(), n = v(() => !!o["left-drawer"]), l = v(() => !!o["right-drawer"]), a = x({
|
|
1812
1875
|
left: t.initialLeftOpen,
|
|
1813
1876
|
right: t.initialRightOpen
|
|
1814
1877
|
}), c = (d) => {
|
|
1815
|
-
|
|
1878
|
+
a.value[d] = !a.value[d];
|
|
1816
1879
|
};
|
|
1817
|
-
return (d,
|
|
1818
|
-
n.value ? (
|
|
1880
|
+
return (d, p) => (r(), f("main", $s, [
|
|
1881
|
+
n.value ? (r(), f("aside", xs, [
|
|
1819
1882
|
u("div", {
|
|
1820
|
-
|
|
1883
|
+
id: "drawer-left-panel",
|
|
1884
|
+
style: X({ width: a.value.left ? d.widthLeft + "px" : "0px" }),
|
|
1821
1885
|
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1822
1886
|
}, [
|
|
1823
1887
|
u("div", {
|
|
1824
|
-
style:
|
|
1888
|
+
style: X({ width: d.widthLeft + "px" }),
|
|
1825
1889
|
class: "h-full overflow-y-auto p-4"
|
|
1826
1890
|
}, [
|
|
1827
1891
|
M(d.$slots, "left-drawer")
|
|
1828
1892
|
], 4)
|
|
1829
1893
|
], 4),
|
|
1830
1894
|
u("button", {
|
|
1895
|
+
"aria-expanded": a.value.left,
|
|
1896
|
+
"aria-controls": "drawer-left-panel",
|
|
1897
|
+
"aria-label": a.value.left ? "Collapse left panel" : "Expand left panel",
|
|
1831
1898
|
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
1832
|
-
onClick:
|
|
1899
|
+
onClick: p[0] || (p[0] = (i) => c("left"))
|
|
1833
1900
|
}, [
|
|
1834
|
-
V(g(
|
|
1901
|
+
V(g(j), {
|
|
1835
1902
|
size: "lg",
|
|
1836
|
-
icon:
|
|
1903
|
+
icon: a.value.left ? g(T).ChevronLeft : g(T).ChevronRight
|
|
1837
1904
|
}, null, 8, ["icon"])
|
|
1838
|
-
])
|
|
1839
|
-
])) :
|
|
1840
|
-
u("div",
|
|
1905
|
+
], 8, Ls)
|
|
1906
|
+
])) : _("", !0),
|
|
1907
|
+
u("div", Ss, [
|
|
1841
1908
|
M(d.$slots, "default")
|
|
1842
1909
|
]),
|
|
1843
|
-
l.value ? (
|
|
1910
|
+
l.value ? (r(), f("aside", Ps, [
|
|
1844
1911
|
u("button", {
|
|
1912
|
+
"aria-expanded": a.value.right,
|
|
1913
|
+
"aria-controls": "drawer-right-panel",
|
|
1914
|
+
"aria-label": a.value.right ? "Collapse right panel" : "Expand right panel",
|
|
1845
1915
|
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
1846
|
-
onClick:
|
|
1916
|
+
onClick: p[1] || (p[1] = (i) => c("right"))
|
|
1847
1917
|
}, [
|
|
1848
|
-
V(g(
|
|
1918
|
+
V(g(j), {
|
|
1849
1919
|
size: "lg",
|
|
1850
|
-
icon:
|
|
1920
|
+
icon: a.value.right ? g(T).ChevronRight : g(T).ChevronLeft
|
|
1851
1921
|
}, null, 8, ["icon"])
|
|
1852
|
-
]),
|
|
1922
|
+
], 8, Ms),
|
|
1853
1923
|
u("div", {
|
|
1854
|
-
|
|
1924
|
+
id: "drawer-right-panel",
|
|
1925
|
+
style: X({ width: a.value.right ? d.widthRight + "px" : "0px" }),
|
|
1855
1926
|
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1856
1927
|
}, [
|
|
1857
1928
|
u("div", {
|
|
1858
|
-
style:
|
|
1929
|
+
style: X({ width: d.widthRight + "px" }),
|
|
1859
1930
|
class: "h-full overflow-y-auto p-4"
|
|
1860
1931
|
}, [
|
|
1861
1932
|
M(d.$slots, "right-drawer")
|
|
1862
1933
|
], 4)
|
|
1863
1934
|
], 4)
|
|
1864
|
-
])) :
|
|
1935
|
+
])) : _("", !0)
|
|
1865
1936
|
]));
|
|
1866
1937
|
}
|
|
1867
|
-
}),
|
|
1938
|
+
}), Bs = { class: "ml-1" }, Vs = { class: "truncate flex-1 min-w-0 text-left" }, As = {
|
|
1868
1939
|
key: 0,
|
|
1869
1940
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1870
|
-
},
|
|
1941
|
+
}, Os = /* @__PURE__ */ k({
|
|
1871
1942
|
__name: "TreeItem",
|
|
1872
1943
|
props: {
|
|
1873
1944
|
active: {},
|
|
@@ -1878,58 +1949,58 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1878
1949
|
emits: ["toggle", "select"],
|
|
1879
1950
|
setup(e, { emit: t }) {
|
|
1880
1951
|
const o = e, n = t, l = v(() => o.active === o.node.id);
|
|
1881
|
-
return (
|
|
1882
|
-
const d =
|
|
1883
|
-
return
|
|
1952
|
+
return (a, c) => {
|
|
1953
|
+
const d = ce("TreeItem", !0);
|
|
1954
|
+
return r(), f("li", Bs, [
|
|
1884
1955
|
u("div", {
|
|
1885
|
-
class:
|
|
1956
|
+
class: C([
|
|
1886
1957
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1887
1958
|
hover:bg-gray-100`,
|
|
1888
1959
|
l.value ? "text-primary" : ""
|
|
1889
1960
|
])
|
|
1890
1961
|
}, [
|
|
1891
|
-
(e.node?.children?.length ?? 0) > 0 ? (
|
|
1962
|
+
(e.node?.children?.length ?? 0) > 0 ? (r(), f("span", {
|
|
1892
1963
|
key: 0,
|
|
1893
1964
|
class: "flex items-center justify-center",
|
|
1894
|
-
onClick: c[0] || (c[0] = (
|
|
1965
|
+
onClick: c[0] || (c[0] = (p) => n("toggle", e.node))
|
|
1895
1966
|
}, [
|
|
1896
|
-
e.node.children && e.isExpanded(e.node.id) ? (
|
|
1967
|
+
e.node.children && e.isExpanded(e.node.id) ? (r(), w(g(ct), {
|
|
1897
1968
|
key: 0,
|
|
1898
1969
|
class: "w-3 h-3"
|
|
1899
|
-
})) : (
|
|
1970
|
+
})) : (r(), w(g(dt), {
|
|
1900
1971
|
key: 1,
|
|
1901
1972
|
class: "w-3 h-3"
|
|
1902
1973
|
}))
|
|
1903
|
-
])) :
|
|
1974
|
+
])) : _("", !0),
|
|
1904
1975
|
u("div", {
|
|
1905
1976
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1906
|
-
onClick: c[1] || (c[1] = (
|
|
1977
|
+
onClick: c[1] || (c[1] = (p) => n("select", e.node))
|
|
1907
1978
|
}, [
|
|
1908
|
-
u("div",
|
|
1909
|
-
e.node.tag ? (
|
|
1979
|
+
u("div", Vs, h(e.node.label), 1),
|
|
1980
|
+
e.node.tag ? (r(), f("div", As, h(e.node.tag), 1)) : _("", !0)
|
|
1910
1981
|
])
|
|
1911
1982
|
], 2),
|
|
1912
|
-
e.node.children && e.isExpanded(e.node.id) ? (
|
|
1983
|
+
e.node.children && e.isExpanded(e.node.id) ? (r(), f("ul", {
|
|
1913
1984
|
key: 0,
|
|
1914
|
-
class:
|
|
1985
|
+
class: C([
|
|
1915
1986
|
"ml-4 border-l pl-2",
|
|
1916
1987
|
{ "border-gray-200": !l.value, "border-primary": l.value }
|
|
1917
1988
|
])
|
|
1918
1989
|
}, [
|
|
1919
|
-
(
|
|
1920
|
-
key:
|
|
1921
|
-
node:
|
|
1990
|
+
(r(!0), f(L, null, P(e.node.children, (p) => (r(), w(d, {
|
|
1991
|
+
key: p.id,
|
|
1992
|
+
node: p,
|
|
1922
1993
|
expanded: e.expanded,
|
|
1923
1994
|
active: e.active,
|
|
1924
1995
|
"is-expanded": e.isExpanded,
|
|
1925
1996
|
onToggle: c[2] || (c[2] = (i) => n("toggle", i)),
|
|
1926
1997
|
onSelect: c[3] || (c[3] = (i) => n("select", i))
|
|
1927
1998
|
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1928
|
-
], 2)) :
|
|
1999
|
+
], 2)) : _("", !0)
|
|
1929
2000
|
]);
|
|
1930
2001
|
};
|
|
1931
2002
|
}
|
|
1932
|
-
}),
|
|
2003
|
+
}), Is = { class: "select-none text-sm" }, En = /* @__PURE__ */ k({
|
|
1933
2004
|
__name: "TreeView",
|
|
1934
2005
|
props: {
|
|
1935
2006
|
data: {},
|
|
@@ -1937,42 +2008,48 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1937
2008
|
},
|
|
1938
2009
|
emits: ["select"],
|
|
1939
2010
|
setup(e, { emit: t }) {
|
|
1940
|
-
const o = e, n = t, l =
|
|
1941
|
-
const i =
|
|
1942
|
-
if (!
|
|
1943
|
-
n("select",
|
|
2011
|
+
const o = e, n = t, l = x(/* @__PURE__ */ new Set()), a = (p) => {
|
|
2012
|
+
const i = p.id;
|
|
2013
|
+
if (!p.children || p.children.length === 0) {
|
|
2014
|
+
n("select", p);
|
|
1944
2015
|
return;
|
|
1945
2016
|
}
|
|
1946
2017
|
l.value.has(i) ? l.value.delete(i) : l.value.add(i);
|
|
1947
|
-
}, c = (
|
|
1948
|
-
n("select",
|
|
1949
|
-
}, d = (
|
|
1950
|
-
return (
|
|
1951
|
-
(
|
|
2018
|
+
}, c = (p) => {
|
|
2019
|
+
n("select", p), l.value.add(p.id);
|
|
2020
|
+
}, d = (p) => l.value.has(p);
|
|
2021
|
+
return (p, i) => (r(), f("ul", Is, [
|
|
2022
|
+
(r(!0), f(L, null, P(o.data, (s) => (r(), w(Os, {
|
|
1952
2023
|
key: s.id,
|
|
1953
2024
|
node: s,
|
|
1954
2025
|
expanded: l.value,
|
|
1955
2026
|
active: e.active,
|
|
1956
2027
|
"is-expanded": d,
|
|
1957
|
-
onToggle:
|
|
2028
|
+
onToggle: a,
|
|
1958
2029
|
onSelect: c
|
|
1959
2030
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1960
2031
|
]));
|
|
1961
2032
|
}
|
|
1962
|
-
}),
|
|
2033
|
+
}), Ds = {
|
|
1963
2034
|
key: 0,
|
|
2035
|
+
role: "status",
|
|
2036
|
+
"aria-live": "polite",
|
|
1964
2037
|
class: "flex items-center justify-center h-20"
|
|
1965
|
-
},
|
|
2038
|
+
}, zn = /* @__PURE__ */ k({
|
|
1966
2039
|
__name: "loading",
|
|
1967
2040
|
props: {
|
|
1968
2041
|
loading: { type: Boolean }
|
|
1969
2042
|
},
|
|
1970
2043
|
setup(e) {
|
|
1971
|
-
return (t, o) => e.loading ? (
|
|
1972
|
-
u("span", {
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
}
|
|
2044
|
+
return (t, o) => e.loading ? (r(), f("div", Ds, [...o[0] || (o[0] = [
|
|
2045
|
+
u("span", {
|
|
2046
|
+
"aria-hidden": "true",
|
|
2047
|
+
class: "loading loading-bars loading-md text-primary"
|
|
2048
|
+
}, null, -1),
|
|
2049
|
+
u("span", { class: "sr-only" }, "Loading...", -1)
|
|
2050
|
+
])])) : _("", !0);
|
|
2051
|
+
}
|
|
2052
|
+
}), Rs = {
|
|
1976
2053
|
title: { type: String, required: !0 },
|
|
1977
2054
|
opened: { type: Boolean, default: !0 },
|
|
1978
2055
|
heightFull: { type: Boolean, default: !1 },
|
|
@@ -1981,103 +2058,104 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
1981
2058
|
type: Array,
|
|
1982
2059
|
default: () => []
|
|
1983
2060
|
}
|
|
1984
|
-
},
|
|
2061
|
+
}, Ts = ["checked", "aria-label"], Es = { class: "collapse-title text-gray-500 text-xs font-medium" }, zs = { class: "flex items-center justify-between" }, Ns = {
|
|
1985
2062
|
key: 0,
|
|
1986
2063
|
class: "list bg-base-100"
|
|
1987
|
-
},
|
|
2064
|
+
}, qs = /* @__PURE__ */ k({
|
|
1988
2065
|
__name: "Collapse",
|
|
1989
|
-
props:
|
|
2066
|
+
props: Rs,
|
|
1990
2067
|
setup(e) {
|
|
1991
|
-
const t =
|
|
1992
|
-
return (
|
|
1993
|
-
class:
|
|
2068
|
+
const t = Se(), o = e, n = x(o.opened), l = x(o.opened || o.disabled);
|
|
2069
|
+
return (a, c) => (r(), f("div", {
|
|
2070
|
+
class: C([
|
|
1994
2071
|
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
1995
|
-
|
|
1996
|
-
|
|
2072
|
+
a.heightFull ? "h-full" : "",
|
|
2073
|
+
a.disabled ? "collapse-open" : "",
|
|
1997
2074
|
l.value ? "overflow-visible" : ""
|
|
1998
2075
|
])
|
|
1999
2076
|
}, [
|
|
2000
|
-
|
|
2077
|
+
a.disabled ? _("", !0) : (r(), f("input", {
|
|
2001
2078
|
key: 0,
|
|
2002
2079
|
type: "checkbox",
|
|
2003
2080
|
checked: n.value,
|
|
2004
2081
|
tabindex: "-1",
|
|
2082
|
+
"aria-label": "Toggle " + a.title,
|
|
2005
2083
|
onChange: c[0] || (c[0] = (d) => l.value = d.target.checked)
|
|
2006
|
-
}, null, 40,
|
|
2007
|
-
u("div",
|
|
2008
|
-
u("div",
|
|
2009
|
-
u("span", null, h(
|
|
2010
|
-
o.actions.length > 0 ? (
|
|
2084
|
+
}, null, 40, Ts)),
|
|
2085
|
+
u("div", Es, [
|
|
2086
|
+
u("div", zs, [
|
|
2087
|
+
u("span", null, h(a.title), 1),
|
|
2088
|
+
o.actions.length > 0 ? (r(), f("div", {
|
|
2011
2089
|
key: 0,
|
|
2012
2090
|
class: "relative z-10 flex gap-1",
|
|
2013
|
-
onClick: c[1] || (c[1] =
|
|
2091
|
+
onClick: c[1] || (c[1] = le(() => {
|
|
2014
2092
|
}, ["stop"]))
|
|
2015
2093
|
}, [
|
|
2016
|
-
(
|
|
2017
|
-
key:
|
|
2018
|
-
color: g(
|
|
2094
|
+
(r(!0), f(L, null, P(o.actions, (d, p) => (r(), w(g(z), {
|
|
2095
|
+
key: p,
|
|
2096
|
+
color: g(N).blank,
|
|
2019
2097
|
size: "xs",
|
|
2020
2098
|
icon: d.icon,
|
|
2021
2099
|
tooltip: d.tooltip,
|
|
2022
2100
|
disabled: d.disabled,
|
|
2023
2101
|
onClick: d.onClick
|
|
2024
2102
|
}, {
|
|
2025
|
-
default:
|
|
2026
|
-
|
|
2103
|
+
default: S(() => [
|
|
2104
|
+
E(h(d.label), 1)
|
|
2027
2105
|
]),
|
|
2028
2106
|
_: 2
|
|
2029
2107
|
}, 1032, ["color", "icon", "tooltip", "disabled", "onClick"]))), 128))
|
|
2030
|
-
])) :
|
|
2108
|
+
])) : _("", !0)
|
|
2031
2109
|
])
|
|
2032
2110
|
]),
|
|
2033
2111
|
u("div", {
|
|
2034
|
-
class:
|
|
2112
|
+
class: C(["collapse-content", g(t).list ? "p-0" : ""])
|
|
2035
2113
|
}, [
|
|
2036
|
-
M(
|
|
2037
|
-
g(t).list ? (
|
|
2038
|
-
M(
|
|
2039
|
-
])) :
|
|
2114
|
+
M(a.$slots, "default"),
|
|
2115
|
+
g(t).list ? (r(), f("ul", Ns, [
|
|
2116
|
+
M(a.$slots, "list")
|
|
2117
|
+
])) : _("", !0)
|
|
2040
2118
|
], 2)
|
|
2041
2119
|
], 2));
|
|
2042
2120
|
}
|
|
2043
|
-
}),
|
|
2121
|
+
}), js = {
|
|
2044
2122
|
title: { type: String },
|
|
2045
2123
|
label: { type: String },
|
|
2046
2124
|
labelLink: { type: String },
|
|
2047
2125
|
description: { type: String },
|
|
2048
2126
|
descriptionLink: { type: String }
|
|
2049
|
-
},
|
|
2127
|
+
}, Fs = { class: "list-row" }, Ks = { class: "list-col-grow" }, Us = { key: 0 }, Hs = {
|
|
2050
2128
|
key: 1,
|
|
2051
2129
|
class: "text-xs text-gray-600"
|
|
2052
|
-
},
|
|
2130
|
+
}, Ws = ["href"], Gs = { key: 1 }, Xs = {
|
|
2053
2131
|
key: 0,
|
|
2054
2132
|
class: "text-xs text-gray-500"
|
|
2055
|
-
},
|
|
2133
|
+
}, Zs = ["href"], Js = { key: 1 }, Nn = /* @__PURE__ */ k({
|
|
2056
2134
|
__name: "CollapseRow",
|
|
2057
|
-
props:
|
|
2135
|
+
props: js,
|
|
2058
2136
|
setup(e) {
|
|
2059
|
-
return (t, o) => (
|
|
2060
|
-
u("div",
|
|
2061
|
-
t.title ? (
|
|
2062
|
-
t.description || t.descriptionLink ? (
|
|
2063
|
-
t.descriptionLink ? (
|
|
2137
|
+
return (t, o) => (r(), f("li", Fs, [
|
|
2138
|
+
u("div", Ks, [
|
|
2139
|
+
t.title ? (r(), f("div", Us, h(t.title), 1)) : _("", !0),
|
|
2140
|
+
t.description || t.descriptionLink ? (r(), f("div", Hs, [
|
|
2141
|
+
t.descriptionLink ? (r(), f("a", {
|
|
2064
2142
|
key: 0,
|
|
2065
2143
|
href: t.descriptionLink,
|
|
2066
2144
|
target: "_blank"
|
|
2067
|
-
}, h(t.description ?? t.descriptionLink), 9,
|
|
2068
|
-
])) :
|
|
2145
|
+
}, h(t.description ?? t.descriptionLink), 9, Ws)) : (r(), f("span", Gs, h(t.description), 1))
|
|
2146
|
+
])) : _("", !0)
|
|
2069
2147
|
]),
|
|
2070
|
-
t.label ? (
|
|
2071
|
-
t.labelLink ? (
|
|
2148
|
+
t.label ? (r(), f("div", Xs, [
|
|
2149
|
+
t.labelLink ? (r(), f("a", {
|
|
2072
2150
|
key: 0,
|
|
2073
2151
|
href: t.labelLink,
|
|
2074
2152
|
target: "_blank"
|
|
2075
|
-
}, h(t.label), 9,
|
|
2076
|
-
])) :
|
|
2153
|
+
}, h(t.label), 9, Zs)) : (r(), f("span", Js, h(t.label), 1))
|
|
2154
|
+
])) : _("", !0),
|
|
2077
2155
|
M(t.$slots, "default")
|
|
2078
2156
|
]));
|
|
2079
2157
|
}
|
|
2080
|
-
}),
|
|
2158
|
+
}), Qs = { class: "text-gray-800" }, qn = /* @__PURE__ */ k({
|
|
2081
2159
|
__name: "alert",
|
|
2082
2160
|
props: {
|
|
2083
2161
|
message: {},
|
|
@@ -2090,15 +2168,15 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2090
2168
|
warning: "alert-warning",
|
|
2091
2169
|
info: "alert-info"
|
|
2092
2170
|
};
|
|
2093
|
-
return (o, n) => (
|
|
2171
|
+
return (o, n) => (r(), f("div", {
|
|
2094
2172
|
role: "alert",
|
|
2095
|
-
class:
|
|
2173
|
+
class: C(`alert alert-soft ${t[e.type]} `)
|
|
2096
2174
|
}, [
|
|
2097
|
-
u("span",
|
|
2175
|
+
u("span", Qs, h(e.message), 1),
|
|
2098
2176
|
M(o.$slots, "default")
|
|
2099
2177
|
], 2));
|
|
2100
2178
|
}
|
|
2101
|
-
}),
|
|
2179
|
+
}), Ys = {
|
|
2102
2180
|
title: { type: String, required: !0 },
|
|
2103
2181
|
items: {
|
|
2104
2182
|
type: Array,
|
|
@@ -2117,36 +2195,36 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2117
2195
|
default: void 0
|
|
2118
2196
|
},
|
|
2119
2197
|
opened: { type: Boolean, default: !0 }
|
|
2120
|
-
},
|
|
2198
|
+
}, en = ["update:modelValue"], tn = (e, t, o, n) => {
|
|
2121
2199
|
const l = v(
|
|
2122
2200
|
() => e.value.map((s) => s[o.value])
|
|
2123
|
-
),
|
|
2201
|
+
), a = (s) => t.value.includes(s), c = v(() => {
|
|
2124
2202
|
const s = t.value.length;
|
|
2125
2203
|
return s === 0 ? "None" : s === l.value.length ? "All" : `${s}`;
|
|
2126
2204
|
});
|
|
2127
|
-
return { isSelected:
|
|
2205
|
+
return { isSelected: a, selectedLabel: c, selectAll: () => n("update:modelValue", [...l.value]), selectNone: () => n("update:modelValue", []), toggleItem: (s, m) => {
|
|
2128
2206
|
m ? n("update:modelValue", [...t.value, s]) : n(
|
|
2129
2207
|
"update:modelValue",
|
|
2130
2208
|
t.value.filter((b) => b !== s)
|
|
2131
2209
|
);
|
|
2132
2210
|
} };
|
|
2133
|
-
},
|
|
2211
|
+
}, on = { class: "flex items-center justify-between mb-2" }, sn = { class: "text-xs text-base-content/50" }, nn = { class: "flex gap-1" }, ln = { class: "flex flex-col gap-1" }, an = ["checked", "onChange"], rn = { class: "text-sm flex-1 select-none" }, un = {
|
|
2134
2212
|
key: 1,
|
|
2135
2213
|
class: "badge badge-sm badge-ghost"
|
|
2136
|
-
},
|
|
2214
|
+
}, jn = /* @__PURE__ */ k({
|
|
2137
2215
|
__name: "filter",
|
|
2138
|
-
props:
|
|
2139
|
-
emits:
|
|
2216
|
+
props: Ys,
|
|
2217
|
+
emits: en,
|
|
2140
2218
|
setup(e, { emit: t }) {
|
|
2141
|
-
const o = e, n = t, l = v(() => o.items ?? []), { isSelected:
|
|
2142
|
-
return (s, m) => (
|
|
2219
|
+
const o = e, n = t, l = v(() => o.items ?? []), { isSelected: a, selectedLabel: c, selectAll: d, selectNone: p, toggleItem: i } = tn(l, we(o, "modelValue"), we(o, "valueKey"), n);
|
|
2220
|
+
return (s, m) => (r(), w(g(qs), {
|
|
2143
2221
|
title: s.title,
|
|
2144
2222
|
opened: s.opened
|
|
2145
2223
|
}, {
|
|
2146
|
-
default:
|
|
2147
|
-
u("div",
|
|
2148
|
-
u("span",
|
|
2149
|
-
u("div",
|
|
2224
|
+
default: S(() => [
|
|
2225
|
+
u("div", on, [
|
|
2226
|
+
u("span", sn, h(g(c)) + " of " + h(l.value.length) + " items ", 1),
|
|
2227
|
+
u("div", nn, [
|
|
2150
2228
|
u("button", {
|
|
2151
2229
|
class: "btn btn-ghost btn-xs",
|
|
2152
2230
|
type: "button",
|
|
@@ -2159,31 +2237,31 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2159
2237
|
type: "button",
|
|
2160
2238
|
tabindex: "-1",
|
|
2161
2239
|
onClick: m[1] || (m[1] = //@ts-ignore
|
|
2162
|
-
(...b) => g(
|
|
2240
|
+
(...b) => g(p) && g(p)(...b))
|
|
2163
2241
|
}, " None ")
|
|
2164
2242
|
])
|
|
2165
2243
|
]),
|
|
2166
|
-
u("div",
|
|
2167
|
-
(
|
|
2244
|
+
u("div", ln, [
|
|
2245
|
+
(r(!0), f(L, null, P(l.value, (b) => (r(), f("label", {
|
|
2168
2246
|
key: b[s.valueKey],
|
|
2169
|
-
class:
|
|
2247
|
+
class: C(["flex items-center gap-3 px-2 py-1.5 rounded-lg cursor-pointer transition-colors hover:bg-base-200", { "bg-base-200/60": g(a)(b[s.valueKey]) }])
|
|
2170
2248
|
}, [
|
|
2171
2249
|
u("input", {
|
|
2172
2250
|
type: "checkbox",
|
|
2173
2251
|
class: "checkbox checkbox-sm",
|
|
2174
|
-
checked: g(
|
|
2175
|
-
onChange: (
|
|
2252
|
+
checked: g(a)(b[s.valueKey]),
|
|
2253
|
+
onChange: (y) => g(i)(
|
|
2176
2254
|
b[s.valueKey],
|
|
2177
|
-
|
|
2255
|
+
y.target.checked
|
|
2178
2256
|
)
|
|
2179
|
-
}, null, 40,
|
|
2180
|
-
s.colorKey && b[s.colorKey] ? (
|
|
2257
|
+
}, null, 40, an),
|
|
2258
|
+
s.colorKey && b[s.colorKey] ? (r(), f("span", {
|
|
2181
2259
|
key: 0,
|
|
2182
2260
|
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2183
|
-
style:
|
|
2184
|
-
}, null, 4)) :
|
|
2185
|
-
u("span",
|
|
2186
|
-
b[s.countKey] > 0 ? (
|
|
2261
|
+
style: X({ backgroundColor: b[s.colorKey] })
|
|
2262
|
+
}, null, 4)) : _("", !0),
|
|
2263
|
+
u("span", rn, h(b[s.labelKey]), 1),
|
|
2264
|
+
b[s.countKey] > 0 ? (r(), f("span", un, h(b[s.countKey]), 1)) : _("", !0)
|
|
2187
2265
|
], 2))), 128))
|
|
2188
2266
|
])
|
|
2189
2267
|
]),
|
|
@@ -2192,63 +2270,66 @@ const Go = ["aria-label", "aria-expanded", "value", "placeholder", "disabled"],
|
|
|
2192
2270
|
}
|
|
2193
2271
|
});
|
|
2194
2272
|
export {
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2273
|
+
qn as Alert,
|
|
2274
|
+
Bn as Autocomplete,
|
|
2275
|
+
Pt as BadgeSize,
|
|
2276
|
+
z as Btn,
|
|
2277
|
+
wn as BtnBadge,
|
|
2278
|
+
Rt as BtnBadgeEmits,
|
|
2279
|
+
Dt as BtnBadgeProperties,
|
|
2280
|
+
It as BtnEmits,
|
|
2281
|
+
Ot as BtnProperties,
|
|
2282
|
+
St as ButtonSize,
|
|
2283
|
+
Me as ButtonTag,
|
|
2206
2284
|
fe as ButtonType,
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2285
|
+
$n as Card,
|
|
2286
|
+
On as Checkbox,
|
|
2287
|
+
Sn as ClickOutside,
|
|
2288
|
+
qs as Collapse,
|
|
2289
|
+
Nn as CollapseRow,
|
|
2290
|
+
N as Color,
|
|
2291
|
+
Et as ConfirmModal,
|
|
2214
2292
|
Z as ControlWrapper,
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2293
|
+
Tn as Drawer,
|
|
2294
|
+
yn as Dropdown,
|
|
2295
|
+
jn as Filter,
|
|
2296
|
+
en as FilterEmits,
|
|
2297
|
+
Ys as FilterProperties,
|
|
2298
|
+
j as Icon,
|
|
2221
2299
|
T as IconEnum,
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2300
|
+
pt as IconMap,
|
|
2301
|
+
ft as IconProperties,
|
|
2302
|
+
In as Input,
|
|
2303
|
+
Dn as InputNumber,
|
|
2304
|
+
zn as Loading,
|
|
2305
|
+
An as Markdown,
|
|
2306
|
+
hn as Menu,
|
|
2307
|
+
Bt as Modal,
|
|
2308
|
+
Ct as ModalEmits,
|
|
2309
|
+
_t as ModalProperties,
|
|
2230
2310
|
me as ModalService,
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2311
|
+
Lt as ModalSize,
|
|
2312
|
+
zt as ModalWrapper,
|
|
2313
|
+
Vn as MultiSelect,
|
|
2314
|
+
Nt as NotificationMessage,
|
|
2234
2315
|
be as NotificationService,
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2316
|
+
Ft as Notifications,
|
|
2317
|
+
uo as PaginationComponent,
|
|
2318
|
+
Mn as SelectComponent,
|
|
2319
|
+
kn as ShellComponent,
|
|
2239
2320
|
pe as SubMenu,
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2321
|
+
Cn as Table,
|
|
2322
|
+
Cn as TableComponent,
|
|
2323
|
+
_n as TextCell,
|
|
2324
|
+
Rn as Textarea,
|
|
2325
|
+
En as TreeView,
|
|
2326
|
+
xn as addClickOutsideEventListener,
|
|
2246
2327
|
U as buildInputStyle,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2328
|
+
Pn as hasCustomEventListener,
|
|
2329
|
+
No as isDescriptionHidden,
|
|
2330
|
+
ae as mergeStyles,
|
|
2250
2331
|
se as myStyles,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2332
|
+
Ln as removeClickOutsideEventListener,
|
|
2333
|
+
Ve as showErrors,
|
|
2334
|
+
tn as useFilter
|
|
2254
2335
|
};
|