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