@ghentcdh/ui 0.6.8 → 0.7.0

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