@ghentcdh/ui 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.esm.js +1917 -1282
- package/index.js +2 -16
- package/index.mjs +1917 -1282
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,95 +1,402 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { v4 as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
xmlns
|
|
11
|
-
fill
|
|
12
|
-
viewBox
|
|
13
|
-
stroke-width
|
|
14
|
-
stroke
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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 x, 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 _e, normalizeStyle as Z, useAttrs as Ve, getCurrentInstance as Ae, toHandlerKey as ye, camelize as je, withModifiers as ce, nextTick as xe, 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
|
-
|
|
79
|
-
|
|
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: x([
|
|
80
386
|
{
|
|
81
|
-
"w-full h-full": !
|
|
82
|
-
"w-2 h-2":
|
|
83
|
-
"w-4 h-4":
|
|
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
|
-
|
|
87
|
-
}, null, 10, Ue));
|
|
393
|
+
])
|
|
394
|
+
}, null, 8, ["class"])) : k("", !0);
|
|
88
395
|
}
|
|
89
|
-
}),
|
|
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
|
-
},
|
|
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 (
|
|
104
|
-
|
|
410
|
+
return (t, o) => (l(), c("div", ft, [
|
|
411
|
+
r("div", {
|
|
105
412
|
tabindex: "0",
|
|
106
413
|
role: "button",
|
|
107
|
-
class:
|
|
414
|
+
class: x([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
108
415
|
}, [
|
|
109
|
-
|
|
110
|
-
e.disableArrow ?
|
|
416
|
+
r("span", null, b(e.label), 1),
|
|
417
|
+
e.disableArrow ? k("", !0) : (l(), y(g(I), {
|
|
111
418
|
key: 0,
|
|
112
|
-
icon:
|
|
419
|
+
icon: g(D).ChevronDown,
|
|
113
420
|
size: "sm"
|
|
114
421
|
}, null, 8, ["icon"]))
|
|
115
422
|
], 2),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
(l(!0), c(
|
|
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
|
-
}),
|
|
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
|
|
135
|
-
const
|
|
136
|
-
return
|
|
137
|
-
name:
|
|
138
|
-
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
|
-
}),
|
|
141
|
-
|
|
447
|
+
}), d = () => {
|
|
448
|
+
t.action?.();
|
|
142
449
|
};
|
|
143
|
-
return (
|
|
144
|
-
const
|
|
145
|
-
return
|
|
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:
|
|
148
|
-
class:
|
|
149
|
-
onClick:
|
|
454
|
+
to: i.value,
|
|
455
|
+
class: x(oe),
|
|
456
|
+
onClick: d
|
|
150
457
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
|
|
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:
|
|
158
|
-
onClick:
|
|
159
|
-
},
|
|
464
|
+
class: x(oe),
|
|
465
|
+
onClick: d
|
|
466
|
+
}, b(e.label), 1)) : (l(), c("div", {
|
|
160
467
|
key: 3,
|
|
161
|
-
class:
|
|
162
|
-
},
|
|
468
|
+
class: x([oe, { "btn-disabled": e.disabled }])
|
|
469
|
+
}, b(e.label), 3));
|
|
163
470
|
};
|
|
164
471
|
}
|
|
165
|
-
}),
|
|
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
|
-
},
|
|
475
|
+
}, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" }, ss = /* @__PURE__ */ w({
|
|
169
476
|
__name: "menu",
|
|
170
477
|
props: {
|
|
171
478
|
menu: {},
|
|
172
479
|
breadcrumbs: {}
|
|
173
480
|
},
|
|
174
481
|
setup(e) {
|
|
175
|
-
return (
|
|
176
|
-
const s =
|
|
177
|
-
return l(), c("nav",
|
|
178
|
-
|
|
179
|
-
e.breadcrumbs ? (l(), c("div",
|
|
180
|
-
|
|
181
|
-
(l(!0), c(
|
|
182
|
-
key:
|
|
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
|
-
|
|
491
|
+
a.routerLink ? (l(), y(s, {
|
|
185
492
|
key: 0,
|
|
186
|
-
to: { name:
|
|
493
|
+
to: { name: a.routerLink, params: a.params }
|
|
187
494
|
}, {
|
|
188
|
-
default:
|
|
189
|
-
|
|
495
|
+
default: L(() => [
|
|
496
|
+
N(b(a.label), 1)
|
|
190
497
|
]),
|
|
191
498
|
_: 2
|
|
192
|
-
}, 1032, ["to"])) : (l(), c(
|
|
193
|
-
|
|
499
|
+
}, 1032, ["to"])) : (l(), c(C, { key: 1 }, [
|
|
500
|
+
N(b(a.label), 1)
|
|
194
501
|
], 64))
|
|
195
502
|
]))), 128))
|
|
196
503
|
])
|
|
197
|
-
])) :
|
|
504
|
+
])) : k("", !0)
|
|
198
505
|
]),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
(l(!0), c(
|
|
202
|
-
key:
|
|
203
|
-
}, { ref_for: !0 },
|
|
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
|
-
}),
|
|
516
|
+
}), ls = /* @__PURE__ */ w({
|
|
210
517
|
__name: "dropdown",
|
|
211
518
|
props: {
|
|
212
519
|
items: {}
|
|
213
520
|
},
|
|
214
521
|
setup(e) {
|
|
215
|
-
const
|
|
216
|
-
return (
|
|
522
|
+
const t = M(!0);
|
|
523
|
+
return (o, s) => (l(), y(de, {
|
|
217
524
|
items: e.items,
|
|
218
525
|
label: "test",
|
|
219
|
-
open:
|
|
526
|
+
open: t.value,
|
|
220
527
|
"btn-class": "",
|
|
221
528
|
"disable-arrow": !0
|
|
222
529
|
}, null, 8, ["items", "open"]));
|
|
223
530
|
}
|
|
224
|
-
}),
|
|
531
|
+
}), kt = { class: "font-bold" }, _t = { class: "pt-4" }, xt = { 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:
|
|
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
|
-
},
|
|
243
|
-
document.getElementById(
|
|
244
|
-
},
|
|
245
|
-
document.getElementById(
|
|
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
|
|
248
|
-
() =>
|
|
249
|
-
(
|
|
250
|
-
|
|
554
|
+
return t({ closeModal: f, openModal: p }), G(
|
|
555
|
+
() => a.open,
|
|
556
|
+
(u, n, m) => {
|
|
557
|
+
a.open ? p() : f();
|
|
251
558
|
}
|
|
252
|
-
),
|
|
253
|
-
|
|
254
|
-
}), (
|
|
255
|
-
id:
|
|
559
|
+
), ke(() => {
|
|
560
|
+
a.open && p();
|
|
561
|
+
}), (u, n) => (l(), c("dialog", {
|
|
562
|
+
id: i,
|
|
256
563
|
class: "modal"
|
|
257
564
|
}, [
|
|
258
|
-
|
|
259
|
-
class:
|
|
565
|
+
r("div", {
|
|
566
|
+
class: x(["modal-box bg-white", s[e.width]])
|
|
260
567
|
}, [
|
|
261
|
-
e.disableClose ?
|
|
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:
|
|
572
|
+
onClick: f
|
|
266
573
|
}, " ✕ ")),
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
574
|
+
r("h3", kt, b(e.modalTitle), 1),
|
|
575
|
+
r("div", _t, [
|
|
576
|
+
B(u.$slots, "content")
|
|
270
577
|
]),
|
|
271
|
-
|
|
272
|
-
|
|
578
|
+
r("div", xt, [
|
|
579
|
+
B(u.$slots, "actions")
|
|
273
580
|
])
|
|
274
581
|
], 2)
|
|
275
582
|
]));
|
|
276
583
|
}
|
|
277
584
|
});
|
|
278
|
-
var
|
|
279
|
-
const
|
|
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 || {}), z = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(z || {});
|
|
586
|
+
const Ct = {
|
|
280
587
|
blank: "btn-ghost",
|
|
281
588
|
primary: "btn-primary",
|
|
282
589
|
secondary: "btn-soft btn-primary",
|
|
283
590
|
error: "btn-error text-white"
|
|
284
|
-
},
|
|
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
|
-
},
|
|
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: z.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
|
-
},
|
|
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
|
-
},
|
|
623
|
+
}, q = /* @__PURE__ */ w({
|
|
300
624
|
__name: "btn",
|
|
301
|
-
props:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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: x([
|
|
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:
|
|
329
|
-
size:
|
|
330
|
-
}, null, 8, ["icon", "size"])) :
|
|
331
|
-
|
|
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
|
-
},
|
|
651
|
+
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
335
652
|
}
|
|
336
|
-
}),
|
|
653
|
+
}), jt = ["type", "disabled"], as = /* @__PURE__ */ w({
|
|
337
654
|
__name: "btn-badge",
|
|
338
|
-
props:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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: x(["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
|
-
|
|
355
|
-
|
|
665
|
+
B(a.$slots, "default"),
|
|
666
|
+
o.icon ? (l(), y(g(I), {
|
|
356
667
|
key: 0,
|
|
357
|
-
icon:
|
|
358
|
-
size:
|
|
359
|
-
}, null, 8, ["icon", "size"])) :
|
|
360
|
-
], 10,
|
|
668
|
+
icon: o.icon,
|
|
669
|
+
size: o.size
|
|
670
|
+
}, null, 8, ["icon", "size"])) : k("", !0)
|
|
671
|
+
], 10, jt));
|
|
361
672
|
}
|
|
362
|
-
}),
|
|
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:
|
|
372
|
-
const
|
|
373
|
-
|
|
682
|
+
setup(e, { emit: t }) {
|
|
683
|
+
const o = t, s = (a) => {
|
|
684
|
+
o("closeModal", { confirmed: a });
|
|
374
685
|
};
|
|
375
|
-
return (
|
|
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:
|
|
381
|
-
|
|
691
|
+
content: L(() => [
|
|
692
|
+
N(b(e.message), 1)
|
|
382
693
|
]),
|
|
383
|
-
actions:
|
|
384
|
-
|
|
385
|
-
color:
|
|
694
|
+
actions: L(() => [
|
|
695
|
+
V(g(q), {
|
|
696
|
+
color: g(z).secondary,
|
|
386
697
|
outline: !0,
|
|
387
|
-
onClick:
|
|
698
|
+
onClick: i[0] || (i[0] = (d) => s(!1))
|
|
388
699
|
}, {
|
|
389
|
-
default:
|
|
390
|
-
|
|
700
|
+
default: L(() => [
|
|
701
|
+
N(b(e.cancelLabel), 1)
|
|
391
702
|
]),
|
|
392
703
|
_: 1
|
|
393
704
|
}, 8, ["color"]),
|
|
394
|
-
|
|
395
|
-
onClick:
|
|
705
|
+
V(g(q), {
|
|
706
|
+
onClick: i[1] || (i[1] = (d) => s(!0))
|
|
396
707
|
}, {
|
|
397
|
-
default:
|
|
398
|
-
|
|
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
|
|
718
|
+
class fe {
|
|
408
719
|
constructor() {
|
|
409
|
-
this.showModal =
|
|
720
|
+
this.showModal = M(!1), this.modals = [];
|
|
410
721
|
}
|
|
411
|
-
openModal(
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
},
|
|
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(
|
|
418
|
-
this.modals = this.modals.filter((
|
|
728
|
+
closeModal(t) {
|
|
729
|
+
this.modals = this.modals.filter((o) => o.id !== t), this.showModal.value = Date.now();
|
|
419
730
|
}
|
|
420
|
-
static showConfirm(
|
|
731
|
+
static showConfirm(t) {
|
|
421
732
|
this.getInstance().openModal({
|
|
422
|
-
component:
|
|
423
|
-
props:
|
|
733
|
+
component: Ot,
|
|
734
|
+
props: t
|
|
424
735
|
});
|
|
425
736
|
}
|
|
426
|
-
static openModal(
|
|
427
|
-
this.getInstance().openModal(
|
|
737
|
+
static openModal(t) {
|
|
738
|
+
this.getInstance().openModal(t);
|
|
428
739
|
}
|
|
429
740
|
static getInstance() {
|
|
430
|
-
return this.instance || (this.instance = new
|
|
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
|
|
750
|
+
const Rt = /* @__PURE__ */ w({
|
|
440
751
|
__name: "modalWrapper",
|
|
441
752
|
setup(e) {
|
|
442
|
-
const
|
|
443
|
-
return (s,
|
|
444
|
-
key:
|
|
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
|
-
},
|
|
757
|
+
}, i?.props, {
|
|
447
758
|
open: !0,
|
|
448
|
-
onCloseModal:
|
|
759
|
+
onCloseModal: i?.props?.onClose
|
|
449
760
|
}), null, 16, ["onCloseModal"]))), 128));
|
|
450
761
|
}
|
|
451
|
-
}),
|
|
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
|
|
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 (
|
|
775
|
+
return (o, s) => (l(), c("div", {
|
|
465
776
|
role: "alert",
|
|
466
|
-
class:
|
|
777
|
+
class: x(`alert ${t[e.type]} `)
|
|
467
778
|
}, [
|
|
468
|
-
|
|
779
|
+
r("span", null, b(e.message), 1)
|
|
469
780
|
], 2));
|
|
470
781
|
}
|
|
471
|
-
}),
|
|
472
|
-
class
|
|
782
|
+
}), Dt = 5e3;
|
|
783
|
+
class me {
|
|
473
784
|
constructor() {
|
|
474
|
-
this.notifications =
|
|
785
|
+
this.notifications = M([]), this.addNotification = (t, o = "info") => {
|
|
475
786
|
const s = {
|
|
476
|
-
id:
|
|
477
|
-
duration:
|
|
478
|
-
message:
|
|
479
|
-
type:
|
|
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 = (
|
|
793
|
+
}, this.removeNotificationAfterDuration = (t) => {
|
|
483
794
|
setTimeout(() => {
|
|
484
|
-
this.removeNotification(
|
|
485
|
-
},
|
|
486
|
-
}, this.removeNotification = (
|
|
487
|
-
this.notifications.value = this.notifications.value.filter((
|
|
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
|
|
802
|
+
return this.instance || (this.instance = new me()), this.instance;
|
|
492
803
|
}
|
|
493
|
-
static info(
|
|
494
|
-
this.getInstance().addNotification(
|
|
804
|
+
static info(t) {
|
|
805
|
+
this.getInstance().addNotification(t, "info");
|
|
495
806
|
}
|
|
496
|
-
static success(
|
|
497
|
-
this.getInstance().addNotification(
|
|
807
|
+
static success(t) {
|
|
808
|
+
this.getInstance().addNotification(t, "success");
|
|
498
809
|
}
|
|
499
|
-
static warning(
|
|
500
|
-
this.getInstance().addNotification(
|
|
810
|
+
static warning(t) {
|
|
811
|
+
this.getInstance().addNotification(t, "warning");
|
|
501
812
|
}
|
|
502
|
-
static error(
|
|
503
|
-
this.getInstance().addNotification(
|
|
813
|
+
static error(t) {
|
|
814
|
+
this.getInstance().addNotification(t, "error");
|
|
504
815
|
}
|
|
505
|
-
static removeNotification(
|
|
506
|
-
this.getInstance().removeNotification(
|
|
816
|
+
static removeNotification(t) {
|
|
817
|
+
this.getInstance().removeNotification(t);
|
|
507
818
|
}
|
|
508
819
|
}
|
|
509
|
-
const
|
|
820
|
+
const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__ */ w({
|
|
510
821
|
__name: "notifications",
|
|
511
822
|
setup(e) {
|
|
512
|
-
const
|
|
513
|
-
return (
|
|
514
|
-
(l(!0), c(
|
|
515
|
-
key:
|
|
516
|
-
}, { ref_for: !0 },
|
|
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
|
-
}),
|
|
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" }, rs = /* @__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:
|
|
530
|
-
const s = e,
|
|
531
|
-
|
|
532
|
-
},
|
|
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
|
-
|
|
849
|
+
d("logout");
|
|
539
850
|
}
|
|
540
851
|
}
|
|
541
852
|
]
|
|
542
853
|
} : null);
|
|
543
|
-
return (
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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:
|
|
864
|
+
onClick: i
|
|
554
865
|
}, [
|
|
555
|
-
|
|
556
|
-
icon:
|
|
866
|
+
V(g(I), {
|
|
867
|
+
icon: g(D).Hamburger
|
|
557
868
|
}, null, 8, ["icon"])
|
|
558
869
|
])
|
|
559
870
|
]),
|
|
560
|
-
|
|
561
|
-
|
|
871
|
+
r("div", Ht, [
|
|
872
|
+
r("a", {
|
|
562
873
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
563
|
-
href:
|
|
564
|
-
},
|
|
874
|
+
href: g("/")
|
|
875
|
+
}, b(e.title), 9, Kt)
|
|
565
876
|
]),
|
|
566
|
-
|
|
567
|
-
|
|
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
|
-
|
|
572
|
-
class:
|
|
882
|
+
r("div", {
|
|
883
|
+
class: x(["drawer flex-1 overflow-hidden", { "drawer-open": a.value }])
|
|
573
884
|
}, [
|
|
574
|
-
|
|
885
|
+
Y(r("input", {
|
|
575
886
|
id: "app-drawer",
|
|
576
|
-
"onUpdate:modelValue":
|
|
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
|
-
[
|
|
891
|
+
[_e, a.value]
|
|
581
892
|
]),
|
|
582
|
-
|
|
583
|
-
|
|
893
|
+
r("main", Wt, [
|
|
894
|
+
B(f.$slots, "default")
|
|
584
895
|
]),
|
|
585
|
-
|
|
586
|
-
|
|
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
|
-
|
|
902
|
+
r("div", {
|
|
592
903
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
593
|
-
style:
|
|
904
|
+
style: Z({ width: e.widthSidebar + "px" })
|
|
594
905
|
}, [
|
|
595
|
-
|
|
596
|
-
(l(!0), c(
|
|
597
|
-
key:
|
|
906
|
+
r("ul", Gt, [
|
|
907
|
+
(l(!0), c(C, null, S(e.menu, (n) => (l(), c("li", {
|
|
908
|
+
key: n.label
|
|
598
909
|
}, [
|
|
599
|
-
|
|
600
|
-
to: { name:
|
|
910
|
+
V(g(Ne), {
|
|
911
|
+
to: { name: n.routerLink, params: n.params }
|
|
601
912
|
}, {
|
|
602
|
-
default:
|
|
603
|
-
|
|
913
|
+
default: L(() => [
|
|
914
|
+
N(b(n.label), 1)
|
|
604
915
|
]),
|
|
605
916
|
_: 2
|
|
606
917
|
}, 1032, ["to"])
|
|
607
918
|
]))), 128))
|
|
608
919
|
]),
|
|
609
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
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 ? z.blank : a.value ? z.primary : z.secondary), d = () => {
|
|
941
|
+
s("updatePage", o.page);
|
|
631
942
|
};
|
|
632
|
-
return (
|
|
633
|
-
disabled:
|
|
943
|
+
return (p, f) => (l(), y(g(q), {
|
|
944
|
+
disabled: p.disabled,
|
|
634
945
|
square: !0,
|
|
635
946
|
size: "xs",
|
|
636
|
-
color:
|
|
637
|
-
onClick:
|
|
947
|
+
color: i.value,
|
|
948
|
+
onClick: f[0] || (f[0] = (u) => d())
|
|
638
949
|
}, {
|
|
639
|
-
default:
|
|
640
|
-
|
|
950
|
+
default: L(() => [
|
|
951
|
+
N(b(p.label), 1)
|
|
641
952
|
]),
|
|
642
953
|
_: 1
|
|
643
954
|
}, 8, ["disabled", "color"]));
|
|
644
955
|
}
|
|
645
|
-
}),
|
|
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
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
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:
|
|
972
|
+
max: a.value
|
|
662
973
|
};
|
|
663
|
-
let
|
|
664
|
-
|
|
665
|
-
let
|
|
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:
|
|
668
|
-
max:
|
|
978
|
+
min: n,
|
|
979
|
+
max: m
|
|
669
980
|
};
|
|
670
|
-
}),
|
|
981
|
+
}), p = (n) => ({
|
|
671
982
|
label: "...",
|
|
672
|
-
currentPage:
|
|
983
|
+
currentPage: n,
|
|
673
984
|
page: -10,
|
|
674
985
|
disabled: !0,
|
|
675
986
|
neverActive: !0
|
|
676
|
-
}),
|
|
677
|
-
let
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
return Array.from({ length:
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
label: `${
|
|
684
|
-
totalPages:
|
|
685
|
-
currentPage:
|
|
686
|
-
page:
|
|
687
|
-
}),
|
|
688
|
-
}),
|
|
689
|
-
}),
|
|
690
|
-
s("updatePage",
|
|
987
|
+
}), f = v(() => {
|
|
988
|
+
let n = a.value;
|
|
989
|
+
n < 1 && (n = 1);
|
|
990
|
+
const m = o.currentPage, h = [], { min: _, max: R } = d.value;
|
|
991
|
+
return Array.from({ length: n }, (K, j) => {
|
|
992
|
+
const $ = j + 1;
|
|
993
|
+
$ !== 1 && $ !== n && ($ > R || $ < _) || ($ === 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 && _ > 1 && h.push(p(m)));
|
|
999
|
+
}), h;
|
|
1000
|
+
}), u = (n) => {
|
|
1001
|
+
s("updatePage", n);
|
|
691
1002
|
};
|
|
692
|
-
return (
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
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":
|
|
1009
|
+
"current-page": n.currentPage,
|
|
699
1010
|
"never-active": !0,
|
|
700
|
-
disabled:
|
|
701
|
-
onUpdatePage:
|
|
1011
|
+
disabled: n.currentPage === 1,
|
|
1012
|
+
onUpdatePage: u
|
|
702
1013
|
}), null, 16, ["current-page", "disabled"]),
|
|
703
|
-
|
|
704
|
-
page:
|
|
1014
|
+
V(Q, P(o, {
|
|
1015
|
+
page: n.currentPage - 1,
|
|
705
1016
|
label: "<",
|
|
706
|
-
"current-page":
|
|
1017
|
+
"current-page": n.currentPage,
|
|
707
1018
|
"never-active": !0,
|
|
708
|
-
disabled:
|
|
709
|
-
onUpdatePage:
|
|
1019
|
+
disabled: n.currentPage === 1,
|
|
1020
|
+
onUpdatePage: u
|
|
710
1021
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
711
|
-
(l(!0), c(
|
|
712
|
-
key:
|
|
1022
|
+
(l(!0), c(C, null, S(f.value, (h) => (l(), y(Q, P({
|
|
1023
|
+
key: h.page,
|
|
713
1024
|
ref_for: !0
|
|
714
|
-
},
|
|
715
|
-
|
|
716
|
-
page:
|
|
1025
|
+
}, h, { onUpdatePage: u }), null, 16))), 128)),
|
|
1026
|
+
V(Q, P(o, {
|
|
1027
|
+
page: n.currentPage + 1,
|
|
717
1028
|
label: ">",
|
|
718
|
-
"current-page":
|
|
1029
|
+
"current-page": n.currentPage,
|
|
719
1030
|
"never-active": !0,
|
|
720
|
-
disabled:
|
|
721
|
-
onUpdatePage:
|
|
1031
|
+
disabled: o.currentPage === a.value,
|
|
1032
|
+
onUpdatePage: u
|
|
722
1033
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
723
|
-
|
|
724
|
-
page:
|
|
1034
|
+
V(Q, P(o, {
|
|
1035
|
+
page: a.value,
|
|
725
1036
|
label: ">>",
|
|
726
|
-
"current-page":
|
|
1037
|
+
"current-page": n.currentPage,
|
|
727
1038
|
"never-active": !0,
|
|
728
|
-
disabled:
|
|
729
|
-
onUpdatePage:
|
|
1039
|
+
disabled: o.currentPage === a.value,
|
|
1040
|
+
onUpdatePage: u
|
|
730
1041
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
731
1042
|
])
|
|
732
1043
|
]),
|
|
733
|
-
|
|
1044
|
+
r("div", so, " page " + b(n.currentPage) + " of " + b(a.value), 1)
|
|
734
1045
|
]));
|
|
735
1046
|
}
|
|
736
|
-
}),
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
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
|
+
}, is = /* @__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
|
-
}),
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}
|
|
769
|
-
|
|
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
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
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:
|
|
1077
|
+
onClick: d
|
|
786
1078
|
}, [
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
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:
|
|
792
|
-
}, null, 8, ["icon"])) :
|
|
1083
|
+
icon: a.value
|
|
1084
|
+
}, null, 8, ["icon"])) : k("", !0)
|
|
793
1085
|
])
|
|
794
1086
|
]));
|
|
795
1087
|
}
|
|
796
|
-
}),
|
|
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" }, cs = /* @__PURE__ */ w({
|
|
797
1096
|
__name: "table.component",
|
|
798
|
-
props:
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
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 (
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
(l(!0), c(
|
|
822
|
-
key:
|
|
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
|
-
|
|
1116
|
+
V(po, P({ column: h }, { ref_for: !0 }, n.sort, { onSort: u }), null, 16, ["column"])
|
|
825
1117
|
]))), 128)),
|
|
826
|
-
|
|
1118
|
+
m[0] || (m[0] = r("th", null, null, -1))
|
|
827
1119
|
])
|
|
828
1120
|
]),
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
colspan:
|
|
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
|
-
}, [...
|
|
835
|
-
|
|
836
|
-
])], 8,
|
|
837
|
-
])) :
|
|
838
|
-
(l(!0), c(
|
|
839
|
-
key:
|
|
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(
|
|
842
|
-
key:
|
|
1133
|
+
(l(!0), c(C, null, S(n.displayColumns, (_) => (l(), c("td", {
|
|
1134
|
+
key: _.scope
|
|
843
1135
|
}, [
|
|
844
|
-
(l(),
|
|
845
|
-
data:
|
|
846
|
-
column:
|
|
1136
|
+
(l(), y(se(_.component), P({ ref_for: !0 }, _, {
|
|
1137
|
+
data: h,
|
|
1138
|
+
column: _
|
|
847
1139
|
}), null, 16, ["data", "column"]))
|
|
848
1140
|
]))), 128)),
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
(l(!0), c(
|
|
852
|
-
key:
|
|
853
|
-
icon:
|
|
1141
|
+
r("td", null, [
|
|
1142
|
+
r("span", bo, [
|
|
1143
|
+
(l(!0), c(C, null, S(n.actions, (_) => (l(), y(q, {
|
|
1144
|
+
key: _.label,
|
|
1145
|
+
icon: _.icon,
|
|
854
1146
|
outline: !0,
|
|
855
|
-
onClick: (
|
|
1147
|
+
onClick: (R) => _.action(h)
|
|
856
1148
|
}, {
|
|
857
|
-
default:
|
|
858
|
-
|
|
1149
|
+
default: L(() => [
|
|
1150
|
+
N(b(_.label), 1)
|
|
859
1151
|
]),
|
|
860
1152
|
_: 2
|
|
861
1153
|
}, 1032, ["icon", "onClick"]))), 128)),
|
|
862
|
-
|
|
863
|
-
|
|
1154
|
+
a.value ? (l(), y(q, {
|
|
1155
|
+
key: 0,
|
|
1156
|
+
icon: g(D).Edit,
|
|
864
1157
|
outline: !0,
|
|
865
|
-
onClick: (
|
|
866
|
-
}, null, 8, ["icon", "onClick"]),
|
|
867
|
-
|
|
868
|
-
|
|
1158
|
+
onClick: (_) => d(h)
|
|
1159
|
+
}, null, 8, ["icon", "onClick"])) : k("", !0),
|
|
1160
|
+
i.value ? (l(), y(q, {
|
|
1161
|
+
key: 1,
|
|
1162
|
+
icon: g(D).Delete,
|
|
869
1163
|
outline: !0,
|
|
870
|
-
onClick: (
|
|
871
|
-
}, null, 8, ["icon", "onClick"])
|
|
1164
|
+
onClick: (_) => p(h)
|
|
1165
|
+
}, null, 8, ["icon", "onClick"])) : k("", !0)
|
|
872
1166
|
])
|
|
873
1167
|
])
|
|
874
1168
|
]))), 128))
|
|
875
1169
|
])
|
|
876
1170
|
]),
|
|
877
|
-
|
|
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":
|
|
881
|
-
"items-per-page":
|
|
882
|
-
"current-page":
|
|
883
|
-
onUpdatePage:
|
|
884
|
-
}, null, 8, ["total-items", "items-per-page", "current-page"])) :
|
|
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
|
-
}),
|
|
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" }, _o = { class: "card-body" }, xo = {
|
|
888
1187
|
key: 0,
|
|
889
1188
|
class: "card-title"
|
|
890
|
-
},
|
|
1189
|
+
}, $o = {
|
|
891
1190
|
key: 1,
|
|
892
1191
|
class: "card-actions justify-end"
|
|
893
1192
|
};
|
|
894
|
-
function
|
|
895
|
-
return l(), c("div",
|
|
896
|
-
|
|
897
|
-
e.$slots.title ? (l(), c("h2",
|
|
898
|
-
|
|
899
|
-
])) :
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1193
|
+
function Co(e, t) {
|
|
1194
|
+
return l(), c("div", ko, [
|
|
1195
|
+
r("div", _o, [
|
|
1196
|
+
e.$slots.title ? (l(), c("h2", xo, [
|
|
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",
|
|
905
|
-
|
|
906
|
-
])) :
|
|
1203
|
+
e.$slots.actions ? (l(), c("div", $o, [
|
|
1204
|
+
B(e.$slots, "actions")
|
|
1205
|
+
])) : k("", !0)
|
|
907
1206
|
])
|
|
908
1207
|
]);
|
|
909
1208
|
}
|
|
910
|
-
const
|
|
1209
|
+
const us = /* @__PURE__ */ yo(wo, [["render", Co]]), ds = (e, t) => {
|
|
911
1210
|
if (!e) return null;
|
|
912
|
-
const
|
|
913
|
-
e.contains(s.target) ||
|
|
1211
|
+
const o = (s) => {
|
|
1212
|
+
e.contains(s.target) || t();
|
|
914
1213
|
};
|
|
915
|
-
return document.addEventListener("click",
|
|
916
|
-
},
|
|
1214
|
+
return document.addEventListener("click", o), o;
|
|
1215
|
+
}, ps = (e) => {
|
|
917
1216
|
document.removeEventListener("click", e);
|
|
918
|
-
},
|
|
919
|
-
beforeMount(e,
|
|
920
|
-
e.clickOutsideEvent = function(
|
|
921
|
-
e ===
|
|
1217
|
+
}, fs = {
|
|
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
|
|
929
|
-
const
|
|
930
|
-
if (!
|
|
1227
|
+
function ms(e) {
|
|
1228
|
+
const t = Ae();
|
|
1229
|
+
if (!t)
|
|
931
1230
|
return !1;
|
|
932
|
-
const
|
|
933
|
-
return
|
|
934
|
-
|
|
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
|
|
1235
|
+
const Lo = ["select"], he = {
|
|
1236
|
+
options: { type: Array, required: !0 },
|
|
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,592 @@ const jt = {
|
|
|
959
1266
|
input: "input",
|
|
960
1267
|
textarea: "input h-32",
|
|
961
1268
|
checkbox: "checkbox",
|
|
962
|
-
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
|
-
},
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
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
|
+
}, Mo = ["select", "clear", "close"], Se = {
|
|
1310
|
+
...he,
|
|
1311
|
+
...ge,
|
|
1312
|
+
isOpen: { type: Boolean, default: !1 },
|
|
1313
|
+
isActive: { type: Function, default: (e) => !1 }
|
|
1314
|
+
}, So = {
|
|
1315
|
+
key: 1,
|
|
1316
|
+
class: "pointer-events-none"
|
|
1317
|
+
}, Bo = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Po = ["innerHTML"], Vo = {
|
|
1318
|
+
key: 0,
|
|
1319
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1320
|
+
class: "h-4 w-4 shrink-0 opacity-80",
|
|
1321
|
+
fill: "none",
|
|
1322
|
+
viewBox: "0 0 24 24",
|
|
1323
|
+
stroke: "currentColor",
|
|
1324
|
+
"stroke-width": "2.5"
|
|
1325
|
+
};
|
|
1326
|
+
function Ao(e, t) {
|
|
1327
|
+
if (!t) return e;
|
|
1328
|
+
const o = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1329
|
+
return e.replace(
|
|
1330
|
+
new RegExp(`(${o})`, "gi"),
|
|
1331
|
+
'<mark class="bg-warning/40 text-inherit rounded-sm px-0.5">$1</mark>'
|
|
1332
|
+
);
|
|
1333
|
+
}
|
|
1334
|
+
const jo = /* @__PURE__ */ w({
|
|
1335
|
+
__name: "ListResults",
|
|
1336
|
+
props: he,
|
|
1337
|
+
emits: Lo,
|
|
1338
|
+
setup(e, { expose: t, emit: o }) {
|
|
1339
|
+
const s = e, a = M(-1), i = M(), d = o;
|
|
1340
|
+
G(
|
|
1341
|
+
() => s.options,
|
|
1342
|
+
() => {
|
|
1343
|
+
a.value = -1;
|
|
1344
|
+
}
|
|
1345
|
+
);
|
|
1346
|
+
function p() {
|
|
1347
|
+
xe(() => {
|
|
1348
|
+
i.value?.querySelector(
|
|
1349
|
+
`[data-index="${a.value}"]`
|
|
1350
|
+
)?.scrollIntoView({ block: "nearest" });
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
function f(n) {
|
|
1354
|
+
const m = s.options?.length ?? 0;
|
|
1355
|
+
if (m)
|
|
1356
|
+
switch (n.key) {
|
|
1357
|
+
case "ArrowDown":
|
|
1358
|
+
n.preventDefault(), a.value = (a.value + 1) % m, p();
|
|
1359
|
+
break;
|
|
1360
|
+
case "ArrowUp":
|
|
1361
|
+
n.preventDefault(), a.value = a.value <= 0 ? m - 1 : a.value - 1, p();
|
|
1362
|
+
break;
|
|
1363
|
+
case "Enter":
|
|
1364
|
+
n.preventDefault(), a.value >= 0 && a.value < m && u(s.options[a.value]);
|
|
1365
|
+
break;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
function u(n) {
|
|
1369
|
+
a.value = -1, d("select", n);
|
|
1370
|
+
}
|
|
1371
|
+
return t({ handleKeydown: f }), (n, m) => (l(), c("ul", {
|
|
1372
|
+
ref_key: "listRef",
|
|
1373
|
+
ref: i,
|
|
1374
|
+
role: "listbox",
|
|
1375
|
+
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"
|
|
1376
|
+
}, [
|
|
1377
|
+
n.isLoading ? (l(), c(C, { key: 0 }, S(2, (h) => r("li", {
|
|
1378
|
+
key: `skel-${h}`,
|
|
1379
|
+
class: "pointer-events-none px-3 py-2"
|
|
1380
|
+
}, [...m[0] || (m[0] = [
|
|
1381
|
+
r("div", { class: "flex items-center gap-3" }, [
|
|
1382
|
+
r("div", { class: "skeleton h-3 w-3/4 rounded" })
|
|
1383
|
+
], -1)
|
|
1384
|
+
])])), 64)) : n.options.length === 0 ? (l(), c("li", So, [...m[1] || (m[1] = [
|
|
1385
|
+
r("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1386
|
+
])])) : (l(!0), c(C, { key: 2 }, S(n.options, (h, _) => (l(), c("li", {
|
|
1387
|
+
key: h.value,
|
|
1388
|
+
"data-index": _,
|
|
1389
|
+
role: "option",
|
|
1390
|
+
"aria-selected": _ === a.value,
|
|
1391
|
+
onMousedown: ce((R) => u(h), ["prevent"]),
|
|
1392
|
+
onMousemove: (R) => a.value = _
|
|
1393
|
+
}, [
|
|
1394
|
+
r("a", {
|
|
1395
|
+
class: x(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1396
|
+
"active bg-secondary text-primary-content": _ === a.value,
|
|
1397
|
+
"hover:bg-base-200": _ !== a.value
|
|
1398
|
+
}])
|
|
1399
|
+
}, [
|
|
1400
|
+
r("span", {
|
|
1401
|
+
class: "whitespace-nowrap",
|
|
1402
|
+
innerHTML: Ao(h.label, n.query)
|
|
1403
|
+
}, null, 8, Po),
|
|
1404
|
+
n.isActive(h) ? (l(), c("svg", Vo, [...m[2] || (m[2] = [
|
|
1405
|
+
r("path", {
|
|
1406
|
+
"stroke-linecap": "round",
|
|
1407
|
+
"stroke-linejoin": "round",
|
|
1408
|
+
d: "M5 13l4 4L19 7"
|
|
1409
|
+
}, null, -1)
|
|
1410
|
+
])])) : k("", !0)
|
|
1411
|
+
], 2)
|
|
1412
|
+
], 40, Bo))), 128))
|
|
1413
|
+
], 512));
|
|
1414
|
+
}
|
|
1415
|
+
}), 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
1416
|
__name: "ControlWrapper",
|
|
986
|
-
props:
|
|
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()),
|
|
1417
|
+
props: F,
|
|
1001
1418
|
setup(e) {
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1419
|
+
const t = e, o = v(() => !Oo(
|
|
1420
|
+
t.visible,
|
|
1421
|
+
t.description,
|
|
1422
|
+
t.isFocused,
|
|
1006
1423
|
!0
|
|
1007
|
-
)), s =
|
|
1008
|
-
return (
|
|
1009
|
-
class:
|
|
1424
|
+
)), s = v(() => t.required), a = v(() => Be(t)), i = v(() => le(t.styles));
|
|
1425
|
+
return (d, p) => (l(), c("fieldset", {
|
|
1426
|
+
class: x(["fieldset", [d.width, i.value.control.wrapper]])
|
|
1010
1427
|
}, [
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
class: y(e.styles.control.label)
|
|
1428
|
+
r("legend", {
|
|
1429
|
+
class: x(i.value.control.label)
|
|
1014
1430
|
}, [
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1431
|
+
d.hideLabel ? k("", !0) : (l(), c(C, { key: 0 }, [
|
|
1432
|
+
r("span", null, b(d.label), 1),
|
|
1433
|
+
s.value ? (l(), c("span", Ro, "*")) : k("", !0)
|
|
1434
|
+
], 64)),
|
|
1435
|
+
p[0] || (p[0] = N(" ", -1))
|
|
1436
|
+
], 2),
|
|
1437
|
+
B(d.$slots, "default"),
|
|
1438
|
+
r("p", {
|
|
1439
|
+
class: x(["fieldset-label h-4", { "text-error": a.value }])
|
|
1440
|
+
}, b(a.value ? d.errors : o.value ? d.description : null), 3)
|
|
1022
1441
|
], 2));
|
|
1023
1442
|
}
|
|
1024
|
-
}),
|
|
1443
|
+
}), To = { class: "overflow-hidden" }, Do = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, No = {
|
|
1444
|
+
key: 0,
|
|
1445
|
+
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1446
|
+
}, ve = /* @__PURE__ */ w({
|
|
1447
|
+
__name: "SelectWrapper",
|
|
1448
|
+
props: Se,
|
|
1449
|
+
emits: Mo,
|
|
1450
|
+
setup(e, { emit: t }) {
|
|
1451
|
+
const o = e, s = M(), a = M(), i = t, d = () => {
|
|
1452
|
+
p(), i("clear");
|
|
1453
|
+
}, p = () => {
|
|
1454
|
+
i("close");
|
|
1455
|
+
}, f = (n) => {
|
|
1456
|
+
if (n.key === "Escape") {
|
|
1457
|
+
p();
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
a.value?.handleKeydown(n);
|
|
1461
|
+
}, u = (n) => {
|
|
1462
|
+
s.value && !s.value.contains(n.target) && p();
|
|
1463
|
+
};
|
|
1464
|
+
return ke(() => {
|
|
1465
|
+
document.addEventListener("click", u);
|
|
1466
|
+
}), Oe(() => {
|
|
1467
|
+
document.removeEventListener("click", u);
|
|
1468
|
+
}), (n, m) => (l(), c("div", {
|
|
1469
|
+
ref_key: "selectWrapperRef",
|
|
1470
|
+
ref: s
|
|
1471
|
+
}, [
|
|
1472
|
+
V(J, ee(te(o)), {
|
|
1473
|
+
default: L(() => [
|
|
1474
|
+
r("div", {
|
|
1475
|
+
class: "relative",
|
|
1476
|
+
onKeydown: f
|
|
1477
|
+
}, [
|
|
1478
|
+
r("div", To, [
|
|
1479
|
+
B(n.$slots, "default")
|
|
1480
|
+
]),
|
|
1481
|
+
r("div", Do, [
|
|
1482
|
+
n.isLoading && !n.label ? (l(), c("span", No)) : k("", !0),
|
|
1483
|
+
n.query && !n.isLoading ? (l(), c("button", {
|
|
1484
|
+
key: 1,
|
|
1485
|
+
type: "button",
|
|
1486
|
+
class: "pointer-events-auto btn btn-ghost btn-xs btn-circle opacity-60 hover:opacity-100",
|
|
1487
|
+
tabindex: "-1",
|
|
1488
|
+
"aria-label": "Clear",
|
|
1489
|
+
onMousedown: ce(d, ["prevent"])
|
|
1490
|
+
}, [...m[1] || (m[1] = [
|
|
1491
|
+
r("svg", {
|
|
1492
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
+
class: "h-3.5 w-3.5",
|
|
1494
|
+
fill: "none",
|
|
1495
|
+
viewBox: "0 0 24 24",
|
|
1496
|
+
stroke: "currentColor",
|
|
1497
|
+
"stroke-width": "2.5"
|
|
1498
|
+
}, [
|
|
1499
|
+
r("path", {
|
|
1500
|
+
"stroke-linecap": "round",
|
|
1501
|
+
"stroke-linejoin": "round",
|
|
1502
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1503
|
+
})
|
|
1504
|
+
], -1)
|
|
1505
|
+
])], 32)) : k("", !0),
|
|
1506
|
+
(l(), c("svg", {
|
|
1507
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1508
|
+
class: x(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": n.isOpen }]),
|
|
1509
|
+
fill: "none",
|
|
1510
|
+
viewBox: "0 0 24 24",
|
|
1511
|
+
stroke: "currentColor",
|
|
1512
|
+
"stroke-width": "2"
|
|
1513
|
+
}, [...m[2] || (m[2] = [
|
|
1514
|
+
r("path", {
|
|
1515
|
+
"stroke-linecap": "round",
|
|
1516
|
+
"stroke-linejoin": "round",
|
|
1517
|
+
d: "M19 9l-7 7-7-7"
|
|
1518
|
+
}, null, -1)
|
|
1519
|
+
])], 2))
|
|
1520
|
+
]),
|
|
1521
|
+
V(Re, {
|
|
1522
|
+
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1523
|
+
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1524
|
+
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1525
|
+
"leave-active-class": "transition-all duration-100 ease-in",
|
|
1526
|
+
"leave-from-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1527
|
+
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1528
|
+
}, {
|
|
1529
|
+
default: L(() => [
|
|
1530
|
+
n.isOpen ? (l(), y(jo, {
|
|
1531
|
+
key: 0,
|
|
1532
|
+
ref_key: "listResultsRef",
|
|
1533
|
+
ref: a,
|
|
1534
|
+
query: n.query,
|
|
1535
|
+
options: n.options,
|
|
1536
|
+
"is-loading": n.isLoading,
|
|
1537
|
+
"is-active": n.isActive,
|
|
1538
|
+
onSelect: m[0] || (m[0] = (h) => i("select", h))
|
|
1539
|
+
}, null, 8, ["query", "options", "is-loading", "is-active"])) : k("", !0)
|
|
1540
|
+
]),
|
|
1541
|
+
_: 1
|
|
1542
|
+
})
|
|
1543
|
+
], 32)
|
|
1544
|
+
]),
|
|
1545
|
+
_: 3
|
|
1546
|
+
}, 16)
|
|
1547
|
+
], 512));
|
|
1548
|
+
}
|
|
1549
|
+
}), re = (e, t) => {
|
|
1550
|
+
if (e)
|
|
1551
|
+
return typeof e == "object" ? e[t.labelKey] : e;
|
|
1552
|
+
}, ae = (e, t) => {
|
|
1553
|
+
if (e)
|
|
1554
|
+
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1555
|
+
}, zo = (e) => {
|
|
1556
|
+
const t = M([]), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = (n) => {
|
|
1557
|
+
const m = [];
|
|
1558
|
+
o.clear(), s.clear(), n?.forEach((h) => {
|
|
1559
|
+
const _ = {
|
|
1560
|
+
value: ae(h, e),
|
|
1561
|
+
label: re(h, e)
|
|
1562
|
+
};
|
|
1563
|
+
o.set(_.value, h), m.push(_);
|
|
1564
|
+
}), t.value = m;
|
|
1565
|
+
}, i = (n) => o.get(n.value);
|
|
1566
|
+
return {
|
|
1567
|
+
options: t,
|
|
1568
|
+
setOptions: a,
|
|
1569
|
+
getOriginal: i,
|
|
1570
|
+
getLabels: (...n) => n.map((m) => re(m, e)),
|
|
1571
|
+
getValues: (...n) => n.map((m) => ae(m, e)),
|
|
1572
|
+
getOption: (n) => s.get(ae(n, e)),
|
|
1573
|
+
getOriginals: (...n) => n.map(i).filter(Boolean)
|
|
1574
|
+
};
|
|
1575
|
+
}, be = (e) => zo(e), hs = /* @__PURE__ */ w({
|
|
1025
1576
|
__name: "SelectComponent",
|
|
1026
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
1577
|
+
props: /* @__PURE__ */ O(ge, {
|
|
1049
1578
|
modelValue: {},
|
|
1050
1579
|
modelModifiers: {}
|
|
1051
1580
|
}),
|
|
1052
|
-
emits: /* @__PURE__ */
|
|
1053
|
-
setup(e, { emit:
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
() => J(t.styles.control.select, t)
|
|
1581
|
+
emits: /* @__PURE__ */ O(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1582
|
+
setup(e, { emit: t }) {
|
|
1583
|
+
const o = M(!1), s = e, a = t, i = E(e, "modelValue"), d = be(s), { options: p } = d;
|
|
1584
|
+
G(
|
|
1585
|
+
() => s.options,
|
|
1586
|
+
() => {
|
|
1587
|
+
d.setOptions(s.options);
|
|
1588
|
+
},
|
|
1589
|
+
{ immediate: !0 }
|
|
1062
1590
|
);
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1591
|
+
const f = (j) => {
|
|
1592
|
+
a("change", j);
|
|
1593
|
+
}, u = v(
|
|
1594
|
+
() => i.value ? d.getLabels(i.value)[0] : ""
|
|
1595
|
+
), n = v(() => le(s.styles)), m = v(
|
|
1596
|
+
() => H(n.value.control.select, s)
|
|
1597
|
+
), h = (j) => {
|
|
1598
|
+
const $ = d.getOriginal(j);
|
|
1599
|
+
i.value = $, f($);
|
|
1600
|
+
}, _ = () => {
|
|
1601
|
+
o.value = !1, i.value = null, f(void 0);
|
|
1602
|
+
}, R = (j) => d.getValues(i.value)?.[0] === j.value, K = () => {
|
|
1603
|
+
o.value = !1;
|
|
1604
|
+
};
|
|
1605
|
+
return (j, $) => (l(), y(ve, P(s, {
|
|
1606
|
+
options: g(p),
|
|
1607
|
+
disabled: !j.enabled,
|
|
1608
|
+
"is-open": o.value,
|
|
1609
|
+
query: u.value,
|
|
1610
|
+
"is-active": R,
|
|
1611
|
+
onClose: K,
|
|
1612
|
+
onSelect: h,
|
|
1613
|
+
onClear: _
|
|
1614
|
+
}), {
|
|
1615
|
+
default: L(() => [
|
|
1616
|
+
r("button", {
|
|
1617
|
+
type: "button",
|
|
1618
|
+
class: x(["truncate block text-left", [m.value, j.width]]),
|
|
1619
|
+
onClick: $[0] || ($[0] = (T) => o.value = !0)
|
|
1620
|
+
}, b(u.value ?? "Select value"), 3)
|
|
1080
1621
|
]),
|
|
1081
1622
|
_: 1
|
|
1082
|
-
}, 16));
|
|
1623
|
+
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1083
1624
|
}
|
|
1084
|
-
}),
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1625
|
+
}), qo = {
|
|
1626
|
+
...ge,
|
|
1627
|
+
...he,
|
|
1628
|
+
/** v-model binding */
|
|
1629
|
+
modelValue: {
|
|
1630
|
+
type: [String, Object],
|
|
1631
|
+
default: ""
|
|
1632
|
+
},
|
|
1633
|
+
/**
|
|
1634
|
+
* HTTP mode: async function that receives the search string and returns
|
|
1635
|
+
* an array of strings or { label, value } objects.
|
|
1636
|
+
* e.g. :fetchOptions="(q) => fetch(`/api/search?q=${q}`).then(r => r.json())"
|
|
1637
|
+
*/
|
|
1638
|
+
fetchOptions: {
|
|
1639
|
+
type: Function,
|
|
1640
|
+
default: null
|
|
1641
|
+
},
|
|
1642
|
+
/** Debounce delay in ms for HTTP mode */
|
|
1643
|
+
debounceMs: {
|
|
1644
|
+
type: Number,
|
|
1645
|
+
default: 200
|
|
1646
|
+
},
|
|
1647
|
+
/** How many results to show at once */
|
|
1648
|
+
maxResults: {
|
|
1649
|
+
type: Number,
|
|
1650
|
+
default: 8
|
|
1651
|
+
},
|
|
1652
|
+
/** Allow free-text (don't clear input if nothing selected) */
|
|
1653
|
+
freeText: {
|
|
1654
|
+
type: Boolean,
|
|
1655
|
+
default: !1
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
function Io(e) {
|
|
1659
|
+
const t = M([]), o = M(!1);
|
|
1660
|
+
function s(i) {
|
|
1661
|
+
if (!e.options) {
|
|
1662
|
+
t.value = [];
|
|
1663
|
+
return;
|
|
1664
|
+
}
|
|
1665
|
+
const d = i.toLowerCase(), p = d ? e.options.filter(
|
|
1666
|
+
(f) => re(f, e).toLowerCase().includes(d)
|
|
1667
|
+
) : e.options;
|
|
1668
|
+
t.value = p.slice(0, e.maxResults);
|
|
1669
|
+
}
|
|
1670
|
+
function a() {
|
|
1671
|
+
t.value = [];
|
|
1672
|
+
}
|
|
1673
|
+
return { results: t, isLoading: o, search: s, clear: a };
|
|
1674
|
+
}
|
|
1675
|
+
function Eo(e) {
|
|
1676
|
+
const t = M([]), o = M(!1);
|
|
1677
|
+
let s = null, a = null;
|
|
1678
|
+
async function i(f) {
|
|
1679
|
+
a && a.abort(), a = new AbortController(), o.value = !0;
|
|
1680
|
+
try {
|
|
1681
|
+
const u = await e.fetchOptions(f, a.signal);
|
|
1682
|
+
t.value = (u || []).slice(0, e.maxResults);
|
|
1683
|
+
} catch (u) {
|
|
1684
|
+
u.name !== "AbortError" && (t.value = []);
|
|
1685
|
+
} finally {
|
|
1686
|
+
o.value = !1;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
function d(f) {
|
|
1690
|
+
s && clearTimeout(s), o.value = !0, s = setTimeout(() => {
|
|
1691
|
+
i(f);
|
|
1692
|
+
}, e.debounceMs);
|
|
1693
|
+
}
|
|
1694
|
+
function p() {
|
|
1695
|
+
s && clearTimeout(s), a && a.abort(), t.value = [], o.value = !1;
|
|
1696
|
+
}
|
|
1697
|
+
return { results: t, isLoading: o, search: d, clear: p };
|
|
1698
|
+
}
|
|
1699
|
+
function Fo(e) {
|
|
1700
|
+
const t = e.fetchOptions ? Eo(e) : Io(e);
|
|
1701
|
+
function o(s) {
|
|
1702
|
+
t.search(s);
|
|
1703
|
+
}
|
|
1704
|
+
return {
|
|
1705
|
+
results: t.results,
|
|
1706
|
+
isLoading: t.isLoading,
|
|
1707
|
+
triggerSearch: o,
|
|
1708
|
+
clear: t.clear
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PURE__ */ w({
|
|
1091
1712
|
__name: "AutoComplete",
|
|
1092
|
-
props:
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
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));
|
|
1713
|
+
props: qo,
|
|
1714
|
+
emits: ["change", "focus", "blur"],
|
|
1715
|
+
setup(e, { emit: t }) {
|
|
1716
|
+
const o = e, s = t, a = M(null), i = M(""), d = M(!1), p = Fo(o), { isLoading: f, triggerSearch: u, clear: n } = p, m = be(o), { options: h } = m;
|
|
1717
|
+
G(
|
|
1718
|
+
() => p.results.value,
|
|
1719
|
+
() => {
|
|
1720
|
+
m.setOptions(p.results.value);
|
|
1133
1721
|
},
|
|
1134
1722
|
{ immediate: !0 }
|
|
1135
|
-
),
|
|
1136
|
-
() =>
|
|
1137
|
-
(
|
|
1138
|
-
if (
|
|
1139
|
-
|
|
1723
|
+
), G(
|
|
1724
|
+
() => o.modelValue,
|
|
1725
|
+
(A) => {
|
|
1726
|
+
if (A == null || A === "") {
|
|
1727
|
+
i.value = "";
|
|
1140
1728
|
return;
|
|
1141
1729
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
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)
|
|
1730
|
+
const W = typeof A == "object" ? A[o.labelKey] : A;
|
|
1731
|
+
W !== i.value && (i.value = W);
|
|
1732
|
+
},
|
|
1733
|
+
{ immediate: !0 }
|
|
1156
1734
|
);
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
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);
|
|
1735
|
+
const _ = (A) => {
|
|
1736
|
+
i.value = A.target.value, o.freeText || s("update:modelValue", ""), u(i.value), d.value = !0;
|
|
1737
|
+
}, R = () => {
|
|
1738
|
+
u(i.value), d.value = !0;
|
|
1192
1739
|
};
|
|
1740
|
+
function K() {
|
|
1741
|
+
setTimeout(() => {
|
|
1742
|
+
d.value = !1, !o.freeText && !o.modelValue && (i.value = "");
|
|
1743
|
+
}, 150);
|
|
1744
|
+
}
|
|
1745
|
+
const j = (A) => {
|
|
1746
|
+
const W = m.getOriginal(A);
|
|
1747
|
+
i.value = A.label, d.value = !1, s("update:modelValue", W), s("change", W);
|
|
1748
|
+
}, $ = () => {
|
|
1749
|
+
i.value = "", n(), d.value = !1, s("update:modelValue", ""), s("clear"), xe(() => a.value?.focus());
|
|
1750
|
+
}, T = () => {
|
|
1751
|
+
d.value = !1;
|
|
1752
|
+
}, U = v(() => le(o.styles)), Pe = v(
|
|
1753
|
+
() => H(U.value.control.select, o)
|
|
1754
|
+
);
|
|
1755
|
+
return (A, W) => (l(), y(ve, P(o, {
|
|
1756
|
+
options: g(h),
|
|
1757
|
+
"is-loading": g(f),
|
|
1758
|
+
"is-open": d.value,
|
|
1759
|
+
query: i.value,
|
|
1760
|
+
onClose: T,
|
|
1761
|
+
onSelect: j,
|
|
1762
|
+
onClear: $
|
|
1763
|
+
}), {
|
|
1764
|
+
default: L(() => [
|
|
1765
|
+
r("input", {
|
|
1766
|
+
ref_key: "inputRef",
|
|
1767
|
+
ref: a,
|
|
1768
|
+
type: "text",
|
|
1769
|
+
role: "combobox",
|
|
1770
|
+
"aria-expanded": d.value,
|
|
1771
|
+
"aria-autocomplete": "list",
|
|
1772
|
+
"aria-haspopup": "listbox",
|
|
1773
|
+
autocomplete: "off",
|
|
1774
|
+
autocorrect: "off",
|
|
1775
|
+
spellcheck: "false",
|
|
1776
|
+
class: x([Pe.value, A.width]),
|
|
1777
|
+
value: i.value,
|
|
1778
|
+
placeholder: A.placeholder,
|
|
1779
|
+
disabled: !A.enabled,
|
|
1780
|
+
onInput: _,
|
|
1781
|
+
onFocus: R,
|
|
1782
|
+
onBlur: K
|
|
1783
|
+
}, null, 42, Ho)
|
|
1784
|
+
]),
|
|
1785
|
+
_: 1
|
|
1786
|
+
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1193
1787
|
}
|
|
1194
|
-
}),
|
|
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({
|
|
1788
|
+
}), vs = /* @__PURE__ */ w({
|
|
1201
1789
|
__name: "MultiSelect",
|
|
1202
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
1790
|
+
props: /* @__PURE__ */ O(Se, {
|
|
1224
1791
|
modelValue: {},
|
|
1225
1792
|
modelModifiers: {}
|
|
1226
1793
|
}),
|
|
1227
|
-
emits: /* @__PURE__ */
|
|
1228
|
-
setup(e, { emit:
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
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
|
-
)
|
|
1794
|
+
emits: /* @__PURE__ */ O(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1795
|
+
setup(e, { emit: t }) {
|
|
1796
|
+
const o = M(!1), s = e, a = t, i = E(e, "modelValue"), d = ($) => {
|
|
1797
|
+
a("change", $);
|
|
1798
|
+
}, p = be(s), { options: f } = p;
|
|
1799
|
+
G(
|
|
1800
|
+
() => s.options,
|
|
1801
|
+
() => {
|
|
1802
|
+
p.setOptions(s.options);
|
|
1803
|
+
},
|
|
1804
|
+
{ immediate: !0 }
|
|
1249
1805
|
);
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1806
|
+
const u = v(
|
|
1807
|
+
() => i.value ? p.getLabels(...i.value).join(", ") : void 0
|
|
1808
|
+
), n = v(
|
|
1809
|
+
() => p.getValues(...i.value ?? [])
|
|
1810
|
+
), m = ($) => {
|
|
1811
|
+
let T = i.value ?? [];
|
|
1812
|
+
if (R($))
|
|
1813
|
+
T = T.filter(
|
|
1814
|
+
(U) => p.getOption(U) !== $.value
|
|
1815
|
+
);
|
|
1816
|
+
else {
|
|
1817
|
+
const U = p.getOriginal($);
|
|
1818
|
+
T.push(U);
|
|
1819
|
+
}
|
|
1820
|
+
i.value = T, d(T);
|
|
1821
|
+
}, h = () => {
|
|
1822
|
+
o.value = !1, i.value = [], d([]);
|
|
1823
|
+
}, _ = () => {
|
|
1824
|
+
o.value = !1;
|
|
1825
|
+
}, R = ($) => n.value?.includes($.value) ?? !1, K = v(() => le(s.styles)), j = v(
|
|
1826
|
+
() => H(K.value.control.select, s)
|
|
1827
|
+
);
|
|
1828
|
+
return ($, T) => (l(), y(ve, P(s, {
|
|
1829
|
+
options: g(f),
|
|
1830
|
+
"is-open": o.value,
|
|
1831
|
+
disabled: !$.enabled,
|
|
1832
|
+
query: u.value,
|
|
1833
|
+
"is-active": R,
|
|
1834
|
+
onClose: _,
|
|
1835
|
+
onSelect: m,
|
|
1836
|
+
onClear: h
|
|
1837
|
+
}), {
|
|
1838
|
+
default: L(() => [
|
|
1839
|
+
r("button", {
|
|
1840
|
+
type: "button",
|
|
1841
|
+
class: x(["truncate block text-left", [j.value, $.width]]),
|
|
1842
|
+
onClick: T[0] || (T[0] = (U) => o.value = !0)
|
|
1843
|
+
}, b(u.value ?? "Select value"), 3)
|
|
1844
|
+
]),
|
|
1845
|
+
_: 1
|
|
1846
|
+
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1287
1847
|
}
|
|
1288
|
-
}),
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
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: () => [
|
|
1848
|
+
}), Ko = ["change"], Uo = {
|
|
1849
|
+
...F,
|
|
1850
|
+
width: { type: String, default: "w-48" },
|
|
1851
|
+
minHeight: { type: String, default: "min-h-96" },
|
|
1852
|
+
actions: {
|
|
1853
|
+
type: Object,
|
|
1854
|
+
default: () => [
|
|
1308
1855
|
{
|
|
1309
1856
|
label: "<strong>B</strong>",
|
|
1310
1857
|
name: "bold",
|
|
@@ -1316,16 +1863,19 @@ const jt = {
|
|
|
1316
1863
|
action: (e) => e?.chain().focus().toggleItalic().run()
|
|
1317
1864
|
}
|
|
1318
1865
|
]
|
|
1319
|
-
}
|
|
1866
|
+
}
|
|
1867
|
+
}, Wo = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, Zo = ["title", "onClick"], Go = ["innerHTML"], Jo = { class: "card-body p-3" }, bs = /* @__PURE__ */ w({
|
|
1868
|
+
__name: "Markdown",
|
|
1869
|
+
props: /* @__PURE__ */ O(Uo, {
|
|
1320
1870
|
modelValue: {},
|
|
1321
1871
|
modelModifiers: {}
|
|
1322
1872
|
}),
|
|
1323
|
-
emits: /* @__PURE__ */
|
|
1324
|
-
setup(e, { emit:
|
|
1325
|
-
const
|
|
1326
|
-
content:
|
|
1873
|
+
emits: /* @__PURE__ */ O(Ko, ["update:modelValue"]),
|
|
1874
|
+
setup(e, { emit: t }) {
|
|
1875
|
+
const o = e, s = t, a = E(e, "modelValue"), i = qe({
|
|
1876
|
+
content: a.value ?? "",
|
|
1327
1877
|
extensions: [
|
|
1328
|
-
|
|
1878
|
+
ze.configure({
|
|
1329
1879
|
heading: !1,
|
|
1330
1880
|
blockquote: !1,
|
|
1331
1881
|
bulletList: !1,
|
|
@@ -1336,334 +1886,287 @@ const jt = {
|
|
|
1336
1886
|
horizontalRule: !1,
|
|
1337
1887
|
hardBreak: !1
|
|
1338
1888
|
}),
|
|
1339
|
-
|
|
1889
|
+
Ee.configure({
|
|
1340
1890
|
html: !1,
|
|
1341
1891
|
transformPastedText: !0
|
|
1342
1892
|
// parse markdown on paste
|
|
1343
1893
|
})
|
|
1344
1894
|
],
|
|
1345
|
-
onUpdate({ editor:
|
|
1346
|
-
s("change",
|
|
1895
|
+
onUpdate({ editor: d }) {
|
|
1896
|
+
s("change", d.storage.markdown.getMarkdown());
|
|
1347
1897
|
}
|
|
1348
1898
|
});
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1351
|
-
}), (
|
|
1352
|
-
default:
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1899
|
+
return Te(() => {
|
|
1900
|
+
i.value?.destroy();
|
|
1901
|
+
}), (d, p) => (l(), y(J, ee(te(o)), {
|
|
1902
|
+
default: L(() => [
|
|
1903
|
+
r("div", {
|
|
1904
|
+
class: x([[d.minHeight], "card bg-base-100 border border-base-300 w-full"])
|
|
1905
|
+
}, [
|
|
1906
|
+
r("div", Wo, [
|
|
1907
|
+
(l(!0), c(C, null, S(d.actions, (f) => (l(), c("button", {
|
|
1908
|
+
key: f.name,
|
|
1909
|
+
tabindex: "-1",
|
|
1357
1910
|
type: "button",
|
|
1358
|
-
class:
|
|
1359
|
-
title:
|
|
1360
|
-
onClick: (
|
|
1911
|
+
class: x(["btn btn-sm btn-ghost", { "btn-active": g(i)?.isActive(f.name) }]),
|
|
1912
|
+
title: f.label,
|
|
1913
|
+
onClick: (u) => f.action(g(i))
|
|
1361
1914
|
}, [
|
|
1362
|
-
|
|
1363
|
-
innerHTML:
|
|
1364
|
-
}, null, 8,
|
|
1365
|
-
], 10,
|
|
1915
|
+
r("span", {
|
|
1916
|
+
innerHTML: f.label
|
|
1917
|
+
}, null, 8, Go)
|
|
1918
|
+
], 10, Zo))), 128))
|
|
1366
1919
|
]),
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
editor:
|
|
1370
|
-
class: "prose prose-sm max-w-none
|
|
1920
|
+
r("div", Jo, [
|
|
1921
|
+
V(g(Ie), {
|
|
1922
|
+
editor: g(i),
|
|
1923
|
+
class: "prose prose-sm max-w-none h-full"
|
|
1371
1924
|
}, null, 8, ["editor"])
|
|
1372
1925
|
])
|
|
1373
|
-
])
|
|
1926
|
+
], 2)
|
|
1374
1927
|
]),
|
|
1375
1928
|
_: 1
|
|
1376
1929
|
}, 16));
|
|
1377
1930
|
}
|
|
1378
|
-
}),
|
|
1931
|
+
}), Qo = {
|
|
1932
|
+
...F
|
|
1933
|
+
}, Xo = ["change", "focus", "blur"], Yo = { class: "flex items-center justify-center h-full" }, en = { class: "fieldset-label" }, tn = ["disabled"], on = { class: "font-bold text-gray-500 text-sm" }, ys = /* @__PURE__ */ w({
|
|
1379
1934
|
__name: "Checkbox",
|
|
1380
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
1935
|
+
props: /* @__PURE__ */ O(Qo, {
|
|
1397
1936
|
modelValue: {},
|
|
1398
1937
|
modelModifiers: {}
|
|
1399
1938
|
}),
|
|
1400
|
-
emits: /* @__PURE__ */
|
|
1401
|
-
setup(e, { emit:
|
|
1402
|
-
const
|
|
1403
|
-
s("change",
|
|
1404
|
-
},
|
|
1405
|
-
s("focus",
|
|
1406
|
-
},
|
|
1407
|
-
s("blur",
|
|
1408
|
-
},
|
|
1409
|
-
() =>
|
|
1939
|
+
emits: /* @__PURE__ */ O(Xo, ["update:modelValue"]),
|
|
1940
|
+
setup(e, { emit: t }) {
|
|
1941
|
+
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
1942
|
+
s("change", u);
|
|
1943
|
+
}, d = (u) => {
|
|
1944
|
+
s("focus", u);
|
|
1945
|
+
}, p = (u) => {
|
|
1946
|
+
s("blur", u);
|
|
1947
|
+
}, f = v(
|
|
1948
|
+
() => H(o.styles.control.checkbox, o)
|
|
1410
1949
|
);
|
|
1411
|
-
return (
|
|
1412
|
-
|
|
1413
|
-
default:
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
"onUpdate:modelValue":
|
|
1950
|
+
return (u, n) => (l(), c("div", Yo, [
|
|
1951
|
+
V(J, P(o, { "hide-label": !0 }), {
|
|
1952
|
+
default: L(() => [
|
|
1953
|
+
r("label", en, [
|
|
1954
|
+
Y(r("input", {
|
|
1955
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1417
1956
|
type: "checkbox",
|
|
1418
|
-
class:
|
|
1419
|
-
disabled: !
|
|
1420
|
-
onChange:
|
|
1421
|
-
onFocus:
|
|
1422
|
-
onBlur:
|
|
1423
|
-
}, null, 42,
|
|
1424
|
-
[
|
|
1957
|
+
class: x(f.value),
|
|
1958
|
+
disabled: !u.enabled,
|
|
1959
|
+
onChange: i,
|
|
1960
|
+
onFocus: d,
|
|
1961
|
+
onBlur: p
|
|
1962
|
+
}, null, 42, tn), [
|
|
1963
|
+
[_e, a.value]
|
|
1425
1964
|
]),
|
|
1426
|
-
|
|
1965
|
+
r("span", on, b(u.label), 1)
|
|
1427
1966
|
])
|
|
1428
1967
|
]),
|
|
1429
1968
|
_: 1
|
|
1430
1969
|
}, 16)
|
|
1431
1970
|
]));
|
|
1432
1971
|
}
|
|
1433
|
-
}),
|
|
1972
|
+
}), nn = {
|
|
1973
|
+
...F,
|
|
1974
|
+
type: { type: String, default: "text" }
|
|
1975
|
+
}, sn = ["change", "focus", "blur"], ln = ["type", "disabled", "autofocus", "placeholder"], ws = /* @__PURE__ */ w({
|
|
1434
1976
|
__name: "Input",
|
|
1435
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
1977
|
+
props: /* @__PURE__ */ O(nn, {
|
|
1454
1978
|
modelValue: {},
|
|
1455
1979
|
modelModifiers: {}
|
|
1456
1980
|
}),
|
|
1457
|
-
emits: /* @__PURE__ */
|
|
1458
|
-
setup(e, { emit:
|
|
1459
|
-
const
|
|
1460
|
-
s("change",
|
|
1461
|
-
},
|
|
1462
|
-
s("focus",
|
|
1463
|
-
},
|
|
1464
|
-
s("blur",
|
|
1465
|
-
},
|
|
1466
|
-
() =>
|
|
1981
|
+
emits: /* @__PURE__ */ O(sn, ["update:modelValue"]),
|
|
1982
|
+
setup(e, { emit: t }) {
|
|
1983
|
+
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
1984
|
+
s("change", u);
|
|
1985
|
+
}, d = (u) => {
|
|
1986
|
+
s("focus", u);
|
|
1987
|
+
}, p = (u) => {
|
|
1988
|
+
s("blur", u);
|
|
1989
|
+
}, f = v(
|
|
1990
|
+
() => H(o.styles.control.input, o)
|
|
1467
1991
|
);
|
|
1468
|
-
return (
|
|
1469
|
-
default:
|
|
1470
|
-
|
|
1471
|
-
"onUpdate:modelValue":
|
|
1992
|
+
return (u, n) => (l(), y(J, ee(te(o)), {
|
|
1993
|
+
default: L(() => [
|
|
1994
|
+
Y(r("input", {
|
|
1995
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1472
1996
|
autocomplete: "off",
|
|
1473
|
-
type:
|
|
1474
|
-
class:
|
|
1475
|
-
disabled: !
|
|
1476
|
-
autofocus:
|
|
1477
|
-
placeholder:
|
|
1478
|
-
onChange:
|
|
1479
|
-
onFocus:
|
|
1480
|
-
onBlur:
|
|
1481
|
-
}, null, 42,
|
|
1482
|
-
[
|
|
1997
|
+
type: u.type,
|
|
1998
|
+
class: x(["w-full", f.value]),
|
|
1999
|
+
disabled: !u.enabled,
|
|
2000
|
+
autofocus: u.isFocused,
|
|
2001
|
+
placeholder: u.placeholder,
|
|
2002
|
+
onChange: i,
|
|
2003
|
+
onFocus: d,
|
|
2004
|
+
onBlur: p
|
|
2005
|
+
}, null, 42, ln), [
|
|
2006
|
+
[De, a.value]
|
|
1483
2007
|
])
|
|
1484
2008
|
]),
|
|
1485
2009
|
_: 1
|
|
1486
2010
|
}, 16));
|
|
1487
2011
|
}
|
|
1488
|
-
}),
|
|
2012
|
+
}), an = {
|
|
2013
|
+
...F,
|
|
2014
|
+
steps: { type: Number, default: 1 }
|
|
2015
|
+
}, rn = ["change", "focus", "blur"], cn = ["disabled", "step", "autofocus", "placeholder"], ks = /* @__PURE__ */ w({
|
|
1489
2016
|
__name: "InputNumber",
|
|
1490
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
2017
|
+
props: /* @__PURE__ */ O(an, {
|
|
1509
2018
|
modelValue: {},
|
|
1510
2019
|
modelModifiers: {}
|
|
1511
2020
|
}),
|
|
1512
|
-
emits: /* @__PURE__ */
|
|
1513
|
-
setup(e, { emit:
|
|
1514
|
-
const
|
|
1515
|
-
s("change",
|
|
1516
|
-
},
|
|
1517
|
-
s("focus",
|
|
1518
|
-
},
|
|
1519
|
-
s("blur",
|
|
1520
|
-
},
|
|
1521
|
-
() =>
|
|
2021
|
+
emits: /* @__PURE__ */ O(rn, ["update:modelValue"]),
|
|
2022
|
+
setup(e, { emit: t }) {
|
|
2023
|
+
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
2024
|
+
s("change", u);
|
|
2025
|
+
}, d = (u) => {
|
|
2026
|
+
s("focus", u);
|
|
2027
|
+
}, p = (u) => {
|
|
2028
|
+
s("blur", u);
|
|
2029
|
+
}, f = v(
|
|
2030
|
+
() => H(o.styles.control.input, o)
|
|
1522
2031
|
);
|
|
1523
|
-
return (
|
|
1524
|
-
default:
|
|
1525
|
-
|
|
1526
|
-
"onUpdate:modelValue":
|
|
2032
|
+
return (u, n) => (l(), y(J, ee(te(o)), {
|
|
2033
|
+
default: L(() => [
|
|
2034
|
+
Y(r("input", {
|
|
2035
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1527
2036
|
autocomplete: "off",
|
|
1528
2037
|
type: "number",
|
|
1529
|
-
class:
|
|
1530
|
-
disabled: !
|
|
1531
|
-
step:
|
|
1532
|
-
autofocus:
|
|
1533
|
-
placeholder:
|
|
1534
|
-
onChange:
|
|
1535
|
-
onFocus:
|
|
1536
|
-
onBlur:
|
|
1537
|
-
}, null, 42,
|
|
1538
|
-
[
|
|
2038
|
+
class: x(["w-full", [f.value]]),
|
|
2039
|
+
disabled: !u.enabled,
|
|
2040
|
+
step: u.steps,
|
|
2041
|
+
autofocus: u.isFocused,
|
|
2042
|
+
placeholder: u.placeholder,
|
|
2043
|
+
onChange: i,
|
|
2044
|
+
onFocus: d,
|
|
2045
|
+
onBlur: p
|
|
2046
|
+
}, null, 42, cn), [
|
|
2047
|
+
[$e, a.value]
|
|
1539
2048
|
])
|
|
1540
2049
|
]),
|
|
1541
2050
|
_: 1
|
|
1542
2051
|
}, 16));
|
|
1543
2052
|
}
|
|
1544
|
-
}),
|
|
2053
|
+
}), un = {
|
|
2054
|
+
...F,
|
|
2055
|
+
rows: { type: Number, default: 4 }
|
|
2056
|
+
}, dn = ["change", "focus", "blur"], pn = ["disabled", "rows", "autofocus", "placeholder"], _s = /* @__PURE__ */ w({
|
|
1545
2057
|
__name: "Textarea",
|
|
1546
|
-
props: /* @__PURE__ */
|
|
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
|
-
}), {
|
|
2058
|
+
props: /* @__PURE__ */ O(un, {
|
|
1565
2059
|
modelValue: {},
|
|
1566
2060
|
modelModifiers: {}
|
|
1567
2061
|
}),
|
|
1568
|
-
emits: /* @__PURE__ */
|
|
1569
|
-
setup(e, { emit:
|
|
1570
|
-
const
|
|
1571
|
-
s("change",
|
|
1572
|
-
},
|
|
1573
|
-
s("focus",
|
|
1574
|
-
},
|
|
1575
|
-
s("blur",
|
|
1576
|
-
},
|
|
1577
|
-
() =>
|
|
2062
|
+
emits: /* @__PURE__ */ O(dn, ["update:modelValue"]),
|
|
2063
|
+
setup(e, { emit: t }) {
|
|
2064
|
+
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
2065
|
+
s("change", u);
|
|
2066
|
+
}, d = (u) => {
|
|
2067
|
+
s("focus", u);
|
|
2068
|
+
}, p = (u) => {
|
|
2069
|
+
s("blur", u);
|
|
2070
|
+
}, f = v(
|
|
2071
|
+
() => H(o.styles.control.textarea, o)
|
|
1578
2072
|
);
|
|
1579
|
-
return (
|
|
1580
|
-
default:
|
|
1581
|
-
|
|
1582
|
-
"onUpdate:modelValue":
|
|
2073
|
+
return (u, n) => (l(), y(J, ee(te(o)), {
|
|
2074
|
+
default: L(() => [
|
|
2075
|
+
Y(r("textarea", {
|
|
2076
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1583
2077
|
autocomplete: "off",
|
|
1584
2078
|
type: "text",
|
|
1585
|
-
class:
|
|
1586
|
-
disabled: !
|
|
1587
|
-
rows:
|
|
1588
|
-
autofocus:
|
|
1589
|
-
placeholder:
|
|
1590
|
-
onChange:
|
|
1591
|
-
onFocus:
|
|
1592
|
-
onBlur:
|
|
1593
|
-
}, null, 42,
|
|
1594
|
-
[
|
|
2079
|
+
class: x(["w-full", f.value]),
|
|
2080
|
+
disabled: !u.enabled,
|
|
2081
|
+
rows: u.rows,
|
|
2082
|
+
autofocus: u.isFocused,
|
|
2083
|
+
placeholder: u.placeholder,
|
|
2084
|
+
onChange: i,
|
|
2085
|
+
onFocus: d,
|
|
2086
|
+
onBlur: p
|
|
2087
|
+
}, null, 42, pn), [
|
|
2088
|
+
[$e, a.value]
|
|
1595
2089
|
])
|
|
1596
2090
|
]),
|
|
1597
2091
|
_: 1
|
|
1598
2092
|
}, 16));
|
|
1599
2093
|
}
|
|
1600
|
-
}),
|
|
2094
|
+
}), fn = {
|
|
2095
|
+
widthLeft: { type: Number, default: 200 },
|
|
2096
|
+
widthRight: { type: Number, default: 200 },
|
|
2097
|
+
initialLeftOpen: { type: Boolean, default: !0 },
|
|
2098
|
+
initialRightOpen: { type: Boolean, default: !0 }
|
|
2099
|
+
}, mn = { class: "flex h-full overflow-hidden gap-2" }, hn = {
|
|
2100
|
+
key: 0,
|
|
1601
2101
|
id: "drawer-left",
|
|
1602
|
-
class: "min-h-0
|
|
1603
|
-
},
|
|
2102
|
+
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
2103
|
+
}, gn = { class: "flex-1 overflow-y-auto bg-white" }, vn = {
|
|
2104
|
+
key: 1,
|
|
2105
|
+
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
2106
|
+
}, xs = /* @__PURE__ */ w({
|
|
1604
2107
|
__name: "drawer",
|
|
1605
|
-
props:
|
|
1606
|
-
widthLeft: { default: 200 },
|
|
1607
|
-
widthRight: { default: 200 }
|
|
1608
|
-
},
|
|
2108
|
+
props: fn,
|
|
1609
2109
|
setup(e) {
|
|
1610
|
-
const o =
|
|
1611
|
-
|
|
2110
|
+
const t = e, o = Ce(), s = v(() => !!o["left-drawer"]), a = v(() => !!o["right-drawer"]), i = M({
|
|
2111
|
+
left: t.initialLeftOpen,
|
|
2112
|
+
right: t.initialRightOpen
|
|
2113
|
+
}), d = (p) => {
|
|
2114
|
+
i.value[p] = !i.value[p];
|
|
1612
2115
|
};
|
|
1613
|
-
return (
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
2116
|
+
return (p, f) => (l(), c("main", mn, [
|
|
2117
|
+
s.value ? (l(), c("aside", hn, [
|
|
2118
|
+
r("div", {
|
|
2119
|
+
style: Z({ width: i.value.left ? p.widthLeft + "px" : "0px" }),
|
|
2120
|
+
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1617
2121
|
}, [
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
2122
|
+
r("div", {
|
|
2123
|
+
style: Z({ width: p.widthLeft + "px" }),
|
|
2124
|
+
class: "h-full overflow-y-auto p-4"
|
|
1621
2125
|
}, [
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
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"
|
|
2126
|
+
B(p.$slots, "left-drawer")
|
|
2127
|
+
], 4)
|
|
2128
|
+
], 4),
|
|
2129
|
+
r("button", {
|
|
2130
|
+
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
2131
|
+
onClick: f[0] || (f[0] = (u) => d("left"))
|
|
1632
2132
|
}, [
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
2133
|
+
V(g(I), {
|
|
2134
|
+
size: "lg",
|
|
2135
|
+
icon: i.value.left ? g(D).ChevronLeft : g(D).ChevronRight
|
|
2136
|
+
}, null, 8, ["icon"])
|
|
2137
|
+
])
|
|
2138
|
+
])) : k("", !0),
|
|
2139
|
+
r("div", gn, [
|
|
2140
|
+
B(p.$slots, "default")
|
|
1638
2141
|
]),
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
class: "h-full overflow-y-auto p-4"
|
|
2142
|
+
a.value ? (l(), c("aside", vn, [
|
|
2143
|
+
r("button", {
|
|
2144
|
+
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
2145
|
+
onClick: f[1] || (f[1] = (u) => d("right"))
|
|
1644
2146
|
}, [
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
2147
|
+
V(g(I), {
|
|
2148
|
+
size: "lg",
|
|
2149
|
+
icon: i.value.right ? g(D).ChevronRight : g(D).ChevronLeft
|
|
2150
|
+
}, null, 8, ["icon"])
|
|
2151
|
+
]),
|
|
2152
|
+
r("div", {
|
|
2153
|
+
style: Z({ width: i.value.right ? p.widthRight + "px" : "0px" }),
|
|
2154
|
+
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
1649
2155
|
}, [
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
2156
|
+
r("div", {
|
|
2157
|
+
style: Z({ width: p.widthRight + "px" }),
|
|
2158
|
+
class: "h-full overflow-y-auto p-4"
|
|
1653
2159
|
}, [
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
])
|
|
1659
|
-
], 2)
|
|
1660
|
-
])
|
|
2160
|
+
B(p.$slots, "right-drawer")
|
|
2161
|
+
], 4)
|
|
2162
|
+
], 4)
|
|
2163
|
+
])) : k("", !0)
|
|
1661
2164
|
]));
|
|
1662
2165
|
}
|
|
1663
|
-
}),
|
|
2166
|
+
}), bn = { class: "ml-1" }, yn = { class: "truncate flex-1 min-w-0 text-left" }, wn = {
|
|
1664
2167
|
key: 0,
|
|
1665
2168
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1666
|
-
},
|
|
2169
|
+
}, kn = /* @__PURE__ */ w({
|
|
1667
2170
|
__name: "TreeItem",
|
|
1668
2171
|
props: {
|
|
1669
2172
|
active: {},
|
|
@@ -1672,247 +2175,379 @@ const jt = {
|
|
|
1672
2175
|
isExpanded: { type: Function }
|
|
1673
2176
|
},
|
|
1674
2177
|
emits: ["toggle", "select"],
|
|
1675
|
-
setup(e, { emit:
|
|
1676
|
-
const
|
|
1677
|
-
return (
|
|
1678
|
-
const
|
|
1679
|
-
return l(), c("li",
|
|
1680
|
-
|
|
1681
|
-
class:
|
|
2178
|
+
setup(e, { emit: t }) {
|
|
2179
|
+
const o = e, s = t, a = v(() => o.active === o.node.id);
|
|
2180
|
+
return (i, d) => {
|
|
2181
|
+
const p = ie("TreeItem", !0);
|
|
2182
|
+
return l(), c("li", bn, [
|
|
2183
|
+
r("div", {
|
|
2184
|
+
class: x([
|
|
1682
2185
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1683
2186
|
hover:bg-gray-100`,
|
|
1684
|
-
|
|
2187
|
+
a.value ? "text-primary" : ""
|
|
1685
2188
|
])
|
|
1686
2189
|
}, [
|
|
1687
2190
|
(e.node?.children?.length ?? 0) > 0 ? (l(), c("span", {
|
|
1688
2191
|
key: 0,
|
|
1689
2192
|
class: "flex items-center justify-center",
|
|
1690
|
-
onClick:
|
|
2193
|
+
onClick: d[0] || (d[0] = (f) => s("toggle", e.node))
|
|
1691
2194
|
}, [
|
|
1692
|
-
e.node.children && e.isExpanded(e.node.id) ? (l(), g(
|
|
2195
|
+
e.node.children && e.isExpanded(e.node.id) ? (l(), y(g(Fe), {
|
|
1693
2196
|
key: 0,
|
|
1694
2197
|
class: "w-3 h-3"
|
|
1695
|
-
})) : (l(), g(
|
|
2198
|
+
})) : (l(), y(g(He), {
|
|
1696
2199
|
key: 1,
|
|
1697
2200
|
class: "w-3 h-3"
|
|
1698
2201
|
}))
|
|
1699
|
-
])) :
|
|
1700
|
-
|
|
2202
|
+
])) : k("", !0),
|
|
2203
|
+
r("div", {
|
|
1701
2204
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1702
|
-
onClick:
|
|
2205
|
+
onClick: d[1] || (d[1] = (f) => s("select", e.node))
|
|
1703
2206
|
}, [
|
|
1704
|
-
|
|
1705
|
-
e.node.tag ? (l(), c("div",
|
|
2207
|
+
r("div", yn, b(e.node.label), 1),
|
|
2208
|
+
e.node.tag ? (l(), c("div", wn, b(e.node.tag), 1)) : k("", !0)
|
|
1706
2209
|
])
|
|
1707
2210
|
], 2),
|
|
1708
2211
|
e.node.children && e.isExpanded(e.node.id) ? (l(), c("ul", {
|
|
1709
2212
|
key: 0,
|
|
1710
|
-
class:
|
|
2213
|
+
class: x([
|
|
1711
2214
|
"ml-4 border-l pl-2",
|
|
1712
|
-
{ "border-gray-200": !
|
|
2215
|
+
{ "border-gray-200": !a.value, "border-primary": a.value }
|
|
1713
2216
|
])
|
|
1714
2217
|
}, [
|
|
1715
|
-
(l(!0), c(
|
|
1716
|
-
key:
|
|
1717
|
-
node:
|
|
2218
|
+
(l(!0), c(C, null, S(e.node.children, (f) => (l(), y(p, {
|
|
2219
|
+
key: f.id,
|
|
2220
|
+
node: f,
|
|
1718
2221
|
expanded: e.expanded,
|
|
1719
2222
|
active: e.active,
|
|
1720
2223
|
"is-expanded": e.isExpanded,
|
|
1721
|
-
onToggle:
|
|
1722
|
-
onSelect:
|
|
2224
|
+
onToggle: d[2] || (d[2] = (u) => s("toggle", u)),
|
|
2225
|
+
onSelect: d[3] || (d[3] = (u) => s("select", u))
|
|
1723
2226
|
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1724
|
-
], 2)) :
|
|
2227
|
+
], 2)) : k("", !0)
|
|
1725
2228
|
]);
|
|
1726
2229
|
};
|
|
1727
2230
|
}
|
|
1728
|
-
}),
|
|
2231
|
+
}), _n = { class: "select-none text-sm" }, $s = /* @__PURE__ */ w({
|
|
1729
2232
|
__name: "TreeView",
|
|
1730
2233
|
props: {
|
|
1731
2234
|
data: {},
|
|
1732
2235
|
active: {}
|
|
1733
2236
|
},
|
|
1734
2237
|
emits: ["select"],
|
|
1735
|
-
setup(e, { emit:
|
|
1736
|
-
const
|
|
1737
|
-
const
|
|
1738
|
-
if (!
|
|
1739
|
-
s("select",
|
|
2238
|
+
setup(e, { emit: t }) {
|
|
2239
|
+
const o = e, s = t, a = M(/* @__PURE__ */ new Set()), i = (f) => {
|
|
2240
|
+
const u = f.id;
|
|
2241
|
+
if (!f.children || f.children.length === 0) {
|
|
2242
|
+
s("select", f);
|
|
1740
2243
|
return;
|
|
1741
2244
|
}
|
|
1742
|
-
|
|
1743
|
-
},
|
|
1744
|
-
s("select",
|
|
1745
|
-
},
|
|
1746
|
-
return (
|
|
1747
|
-
(l(!0), c(
|
|
1748
|
-
key:
|
|
1749
|
-
node:
|
|
1750
|
-
expanded:
|
|
2245
|
+
a.value.has(u) ? a.value.delete(u) : a.value.add(u);
|
|
2246
|
+
}, d = (f) => {
|
|
2247
|
+
s("select", f), a.value.add(f.id);
|
|
2248
|
+
}, p = (f) => a.value.has(f);
|
|
2249
|
+
return (f, u) => (l(), c("ul", _n, [
|
|
2250
|
+
(l(!0), c(C, null, S(o.data, (n) => (l(), y(kn, {
|
|
2251
|
+
key: n.id,
|
|
2252
|
+
node: n,
|
|
2253
|
+
expanded: a.value,
|
|
1751
2254
|
active: e.active,
|
|
1752
|
-
"is-expanded":
|
|
1753
|
-
onToggle:
|
|
1754
|
-
onSelect:
|
|
2255
|
+
"is-expanded": p,
|
|
2256
|
+
onToggle: i,
|
|
2257
|
+
onSelect: d
|
|
1755
2258
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1756
2259
|
]));
|
|
1757
2260
|
}
|
|
1758
|
-
}),
|
|
2261
|
+
}), xn = {
|
|
1759
2262
|
key: 0,
|
|
1760
2263
|
class: "flex items-center justify-center h-20"
|
|
1761
|
-
},
|
|
2264
|
+
}, Cs = /* @__PURE__ */ w({
|
|
1762
2265
|
__name: "loading",
|
|
1763
2266
|
props: {
|
|
1764
2267
|
loading: { type: Boolean }
|
|
1765
2268
|
},
|
|
1766
2269
|
setup(e) {
|
|
1767
|
-
return (
|
|
1768
|
-
|
|
1769
|
-
])])) :
|
|
2270
|
+
return (t, o) => e.loading ? (l(), c("div", xn, [...o[0] || (o[0] = [
|
|
2271
|
+
r("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
|
|
2272
|
+
])])) : k("", !0);
|
|
2273
|
+
}
|
|
2274
|
+
}), $n = {
|
|
2275
|
+
title: { type: String, required: !0 },
|
|
2276
|
+
opened: { type: Boolean, default: !0 },
|
|
2277
|
+
heightFull: { type: Boolean, default: !1 },
|
|
2278
|
+
disabled: { type: Boolean, default: !1 },
|
|
2279
|
+
actions: {
|
|
2280
|
+
type: Array,
|
|
2281
|
+
default: () => []
|
|
1770
2282
|
}
|
|
1771
|
-
}
|
|
2283
|
+
}, Cn = ["checked"], Ln = { class: "collapse-title text-gray-500 text-xs font-medium" }, Mn = { class: "flex items-center justify-between" }, Sn = {
|
|
1772
2284
|
key: 0,
|
|
1773
2285
|
class: "list bg-base-100"
|
|
1774
|
-
},
|
|
2286
|
+
}, Bn = /* @__PURE__ */ w({
|
|
1775
2287
|
__name: "Collapse",
|
|
1776
|
-
props:
|
|
1777
|
-
title: {},
|
|
1778
|
-
opened: { type: Boolean, default: !0 },
|
|
1779
|
-
heightFull: { type: Boolean }
|
|
1780
|
-
},
|
|
2288
|
+
props: $n,
|
|
1781
2289
|
setup(e) {
|
|
1782
|
-
const
|
|
1783
|
-
return
|
|
1784
|
-
(
|
|
1785
|
-
() => {
|
|
1786
|
-
},
|
|
1787
|
-
{ immediate: !0 }
|
|
1788
|
-
), (n, u) => (l(), c("div", {
|
|
1789
|
-
class: y([
|
|
2290
|
+
const t = Ce(), o = e, s = M(o.opened), a = M(o.opened || o.disabled);
|
|
2291
|
+
return (i, d) => (l(), c("div", {
|
|
2292
|
+
class: x([
|
|
1790
2293
|
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
1791
|
-
|
|
2294
|
+
i.heightFull ? "h-full" : "",
|
|
2295
|
+
i.disabled ? "collapse-open" : "",
|
|
2296
|
+
a.value ? "overflow-visible" : ""
|
|
1792
2297
|
])
|
|
1793
2298
|
}, [
|
|
1794
|
-
i("input", {
|
|
2299
|
+
i.disabled ? k("", !0) : (l(), c("input", {
|
|
2300
|
+
key: 0,
|
|
1795
2301
|
type: "checkbox",
|
|
1796
|
-
checked: s.value
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
2302
|
+
checked: s.value,
|
|
2303
|
+
tabindex: "-1",
|
|
2304
|
+
onChange: d[0] || (d[0] = (p) => a.value = p.target.checked)
|
|
2305
|
+
}, null, 40, Cn)),
|
|
2306
|
+
r("div", Ln, [
|
|
2307
|
+
r("div", Mn, [
|
|
2308
|
+
r("span", null, b(i.title), 1),
|
|
2309
|
+
o.actions.length > 0 ? (l(), c("div", {
|
|
2310
|
+
key: 0,
|
|
2311
|
+
class: "relative z-10 flex gap-1",
|
|
2312
|
+
onClick: d[1] || (d[1] = ce(() => {
|
|
2313
|
+
}, ["stop"]))
|
|
2314
|
+
}, [
|
|
2315
|
+
(l(!0), c(C, null, S(o.actions, (p, f) => (l(), y(g(q), {
|
|
2316
|
+
key: f,
|
|
2317
|
+
color: g(z).blank,
|
|
2318
|
+
size: "xs",
|
|
2319
|
+
icon: p.icon,
|
|
2320
|
+
tooltip: p.tooltip,
|
|
2321
|
+
disabled: p.disabled,
|
|
2322
|
+
onClick: p.onClick
|
|
2323
|
+
}, {
|
|
2324
|
+
default: L(() => [
|
|
2325
|
+
N(b(p.label), 1)
|
|
2326
|
+
]),
|
|
2327
|
+
_: 2
|
|
2328
|
+
}, 1032, ["color", "icon", "tooltip", "disabled", "onClick"]))), 128))
|
|
2329
|
+
])) : k("", !0)
|
|
2330
|
+
])
|
|
2331
|
+
]),
|
|
2332
|
+
r("div", {
|
|
2333
|
+
class: x(["collapse-content", g(t).list ? "p-0" : ""])
|
|
1801
2334
|
}, [
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
])) :
|
|
2335
|
+
B(i.$slots, "default"),
|
|
2336
|
+
g(t).list ? (l(), c("ul", Sn, [
|
|
2337
|
+
B(i.$slots, "list")
|
|
2338
|
+
])) : k("", !0)
|
|
1806
2339
|
], 2)
|
|
1807
2340
|
], 2));
|
|
1808
2341
|
}
|
|
1809
|
-
}),
|
|
2342
|
+
}), Pn = {
|
|
2343
|
+
title: { type: String },
|
|
2344
|
+
label: { type: String },
|
|
2345
|
+
labelLink: { type: String },
|
|
2346
|
+
description: { type: String },
|
|
2347
|
+
descriptionLink: { type: String }
|
|
2348
|
+
}, Vn = { class: "list-row" }, An = { class: "list-col-grow" }, jn = { key: 0 }, On = {
|
|
1810
2349
|
key: 1,
|
|
1811
2350
|
class: "text-xs text-gray-600"
|
|
1812
|
-
},
|
|
2351
|
+
}, Rn = ["href"], Tn = { key: 1 }, Dn = {
|
|
1813
2352
|
key: 0,
|
|
1814
2353
|
class: "text-xs text-gray-500"
|
|
1815
|
-
},
|
|
2354
|
+
}, Nn = ["href"], zn = { key: 1 }, Ls = /* @__PURE__ */ w({
|
|
1816
2355
|
__name: "CollapseRow",
|
|
1817
|
-
props:
|
|
1818
|
-
title: {},
|
|
1819
|
-
label: {},
|
|
1820
|
-
labelLink: {},
|
|
1821
|
-
description: {},
|
|
1822
|
-
descriptionLink: {}
|
|
1823
|
-
},
|
|
2356
|
+
props: Pn,
|
|
1824
2357
|
setup(e) {
|
|
1825
|
-
return (
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
2358
|
+
return (t, o) => (l(), c("li", Vn, [
|
|
2359
|
+
r("div", An, [
|
|
2360
|
+
t.title ? (l(), c("div", jn, b(t.title), 1)) : k("", !0),
|
|
2361
|
+
t.description || t.descriptionLink ? (l(), c("div", On, [
|
|
2362
|
+
t.descriptionLink ? (l(), c("a", {
|
|
1830
2363
|
key: 0,
|
|
1831
|
-
href:
|
|
2364
|
+
href: t.descriptionLink,
|
|
1832
2365
|
target: "_blank"
|
|
1833
|
-
},
|
|
1834
|
-
])) :
|
|
2366
|
+
}, b(t.description ?? t.descriptionLink), 9, Rn)) : (l(), c("span", Tn, b(t.description), 1))
|
|
2367
|
+
])) : k("", !0)
|
|
1835
2368
|
]),
|
|
1836
|
-
|
|
1837
|
-
|
|
2369
|
+
t.label ? (l(), c("div", Dn, [
|
|
2370
|
+
t.labelLink ? (l(), c("a", {
|
|
1838
2371
|
key: 0,
|
|
1839
|
-
href:
|
|
2372
|
+
href: t.labelLink,
|
|
1840
2373
|
target: "_blank"
|
|
1841
|
-
},
|
|
1842
|
-
])) :
|
|
1843
|
-
|
|
2374
|
+
}, b(t.label), 9, Nn)) : (l(), c("span", zn, b(t.label), 1))
|
|
2375
|
+
])) : k("", !0),
|
|
2376
|
+
B(t.$slots, "default")
|
|
1844
2377
|
]));
|
|
1845
2378
|
}
|
|
1846
|
-
}),
|
|
2379
|
+
}), qn = { class: "text-gray-800" }, Ms = /* @__PURE__ */ w({
|
|
1847
2380
|
__name: "alert",
|
|
1848
2381
|
props: {
|
|
1849
2382
|
message: {},
|
|
1850
2383
|
type: {}
|
|
1851
2384
|
},
|
|
1852
2385
|
setup(e) {
|
|
1853
|
-
const
|
|
2386
|
+
const t = {
|
|
1854
2387
|
success: "alert-success",
|
|
1855
2388
|
error: "alert-error",
|
|
1856
2389
|
warning: "alert-warning",
|
|
1857
2390
|
info: "alert-info"
|
|
1858
2391
|
};
|
|
1859
|
-
return (
|
|
2392
|
+
return (o, s) => (l(), c("div", {
|
|
1860
2393
|
role: "alert",
|
|
1861
|
-
class:
|
|
2394
|
+
class: x(`alert alert-soft ${t[e.type]} `)
|
|
1862
2395
|
}, [
|
|
1863
|
-
|
|
1864
|
-
|
|
2396
|
+
r("span", qn, b(e.message), 1),
|
|
2397
|
+
B(o.$slots, "default")
|
|
1865
2398
|
], 2));
|
|
1866
2399
|
}
|
|
2400
|
+
}), In = {
|
|
2401
|
+
title: { type: String, required: !0 },
|
|
2402
|
+
items: {
|
|
2403
|
+
type: Array,
|
|
2404
|
+
required: !0
|
|
2405
|
+
},
|
|
2406
|
+
modelValue: {
|
|
2407
|
+
type: Array,
|
|
2408
|
+
default: () => []
|
|
2409
|
+
},
|
|
2410
|
+
labelKey: { type: String, default: "label" },
|
|
2411
|
+
valueKey: { type: String, default: "id" },
|
|
2412
|
+
colorKey: { type: String, default: void 0 },
|
|
2413
|
+
countKey: { type: String, default: "count" },
|
|
2414
|
+
counts: {
|
|
2415
|
+
type: Object,
|
|
2416
|
+
default: void 0
|
|
2417
|
+
},
|
|
2418
|
+
opened: { type: Boolean, default: !0 }
|
|
2419
|
+
}, En = ["update:modelValue"], Fn = (e, t, o, s) => {
|
|
2420
|
+
const a = v(
|
|
2421
|
+
() => e.value.map((n) => n[o.value])
|
|
2422
|
+
), i = (n) => t.value.includes(n), d = v(() => {
|
|
2423
|
+
const n = t.value.length;
|
|
2424
|
+
return n === 0 ? "None" : n === a.value.length ? "All" : `${n}`;
|
|
2425
|
+
});
|
|
2426
|
+
return { isSelected: i, selectedLabel: d, selectAll: () => s("update:modelValue", [...a.value]), selectNone: () => s("update:modelValue", []), toggleItem: (n, m) => {
|
|
2427
|
+
m ? s("update:modelValue", [...t.value, n]) : s(
|
|
2428
|
+
"update:modelValue",
|
|
2429
|
+
t.value.filter((h) => h !== n)
|
|
2430
|
+
);
|
|
2431
|
+
} };
|
|
2432
|
+
}, Hn = { class: "flex items-center justify-between mb-2" }, Kn = { class: "text-xs text-base-content/50" }, Un = { class: "flex gap-1" }, Wn = { class: "flex flex-col gap-1" }, Zn = ["checked", "onChange"], Gn = { class: "text-sm flex-1 select-none" }, Jn = {
|
|
2433
|
+
key: 1,
|
|
2434
|
+
class: "badge badge-sm badge-ghost"
|
|
2435
|
+
}, Ss = /* @__PURE__ */ w({
|
|
2436
|
+
__name: "filter",
|
|
2437
|
+
props: In,
|
|
2438
|
+
emits: En,
|
|
2439
|
+
setup(e, { emit: t }) {
|
|
2440
|
+
const o = e, s = t, a = v(() => o.items ?? []), { isSelected: i, selectedLabel: d, selectAll: p, selectNone: f, toggleItem: u } = Fn(a, we(o, "modelValue"), we(o, "valueKey"), s);
|
|
2441
|
+
return (n, m) => (l(), y(g(Bn), {
|
|
2442
|
+
title: n.title,
|
|
2443
|
+
opened: n.opened
|
|
2444
|
+
}, {
|
|
2445
|
+
default: L(() => [
|
|
2446
|
+
r("div", Hn, [
|
|
2447
|
+
r("span", Kn, b(g(d)) + " of " + b(a.value.length) + " items ", 1),
|
|
2448
|
+
r("div", Un, [
|
|
2449
|
+
r("button", {
|
|
2450
|
+
class: "btn btn-ghost btn-xs",
|
|
2451
|
+
type: "button",
|
|
2452
|
+
tabindex: "-1",
|
|
2453
|
+
onClick: m[0] || (m[0] = //@ts-ignore
|
|
2454
|
+
(...h) => g(p) && g(p)(...h))
|
|
2455
|
+
}, " All "),
|
|
2456
|
+
r("button", {
|
|
2457
|
+
class: "btn btn-ghost btn-xs",
|
|
2458
|
+
type: "button",
|
|
2459
|
+
tabindex: "-1",
|
|
2460
|
+
onClick: m[1] || (m[1] = //@ts-ignore
|
|
2461
|
+
(...h) => g(f) && g(f)(...h))
|
|
2462
|
+
}, " None ")
|
|
2463
|
+
])
|
|
2464
|
+
]),
|
|
2465
|
+
r("div", Wn, [
|
|
2466
|
+
(l(!0), c(C, null, S(a.value, (h) => (l(), c("label", {
|
|
2467
|
+
key: h[n.valueKey],
|
|
2468
|
+
class: x(["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]) }])
|
|
2469
|
+
}, [
|
|
2470
|
+
r("input", {
|
|
2471
|
+
type: "checkbox",
|
|
2472
|
+
class: "checkbox checkbox-sm",
|
|
2473
|
+
checked: g(i)(h[n.valueKey]),
|
|
2474
|
+
onChange: (_) => g(u)(
|
|
2475
|
+
h[n.valueKey],
|
|
2476
|
+
_.target.checked
|
|
2477
|
+
)
|
|
2478
|
+
}, null, 40, Zn),
|
|
2479
|
+
n.colorKey && h[n.colorKey] ? (l(), c("span", {
|
|
2480
|
+
key: 0,
|
|
2481
|
+
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2482
|
+
style: Z({ backgroundColor: h[n.colorKey] })
|
|
2483
|
+
}, null, 4)) : k("", !0),
|
|
2484
|
+
r("span", Gn, b(h[n.labelKey]), 1),
|
|
2485
|
+
h[n.countKey] > 0 ? (l(), c("span", Jn, b(h[n.countKey]), 1)) : k("", !0)
|
|
2486
|
+
], 2))), 128))
|
|
2487
|
+
])
|
|
2488
|
+
]),
|
|
2489
|
+
_: 1
|
|
2490
|
+
}, 8, ["title", "opened"]));
|
|
2491
|
+
}
|
|
1867
2492
|
});
|
|
1868
2493
|
export {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
2494
|
+
Ms as Alert,
|
|
2495
|
+
gs as Autocomplete,
|
|
2496
|
+
At as BadgeSize,
|
|
2497
|
+
q as Btn,
|
|
2498
|
+
as as BtnBadge,
|
|
2499
|
+
Pt as BtnBadgeEmits,
|
|
2500
|
+
Bt as BtnBadgeProperties,
|
|
2501
|
+
St as BtnEmits,
|
|
2502
|
+
Mt as BtnProperties,
|
|
2503
|
+
Vt as ButtonSize,
|
|
2504
|
+
Me as ButtonTag,
|
|
2505
|
+
pe as ButtonType,
|
|
2506
|
+
us as Card,
|
|
2507
|
+
ys as Checkbox,
|
|
2508
|
+
fs as ClickOutside,
|
|
2509
|
+
Bn as Collapse,
|
|
2510
|
+
Ls as CollapseRow,
|
|
2511
|
+
z as Color,
|
|
2512
|
+
Ot as ConfirmModal,
|
|
2513
|
+
J as ControlWrapper,
|
|
2514
|
+
xs as Drawer,
|
|
2515
|
+
ls as Dropdown,
|
|
2516
|
+
Ss as Filter,
|
|
2517
|
+
En as FilterEmits,
|
|
2518
|
+
In as FilterProperties,
|
|
2519
|
+
I as Icon,
|
|
2520
|
+
D as IconEnum,
|
|
2521
|
+
dt as IconMap,
|
|
2522
|
+
pt as IconProperties,
|
|
2523
|
+
ws as Input,
|
|
2524
|
+
ks as InputNumber,
|
|
2525
|
+
Cs as Loading,
|
|
2526
|
+
bs as Markdown,
|
|
2527
|
+
ss as Menu,
|
|
2528
|
+
$t as Modal,
|
|
2529
|
+
fe as ModalService,
|
|
2530
|
+
Rt as ModalWrapper,
|
|
2531
|
+
vs as MultiSelect,
|
|
2532
|
+
Tt as NotificationMessage,
|
|
2533
|
+
me as NotificationService,
|
|
2534
|
+
zt as Notifications,
|
|
2535
|
+
lo as PaginationComponent,
|
|
2536
|
+
hs as SelectComponent,
|
|
2537
|
+
rs as ShellComponent,
|
|
1905
2538
|
de as SubMenu,
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2539
|
+
cs as Table,
|
|
2540
|
+
cs as TableComponent,
|
|
2541
|
+
is as TextCell,
|
|
2542
|
+
_s as Textarea,
|
|
2543
|
+
$s as TreeView,
|
|
2544
|
+
ds as addClickOutsideEventListener,
|
|
2545
|
+
H as buildInputStyle,
|
|
2546
|
+
ms as hasCustomEventListener,
|
|
2547
|
+
Oo as isDescriptionHidden,
|
|
2548
|
+
le as mergeStyles,
|
|
2549
|
+
ne as myStyles,
|
|
2550
|
+
ps as removeClickOutsideEventListener,
|
|
2551
|
+
Be as showErrors,
|
|
2552
|
+
Fn as useFilter
|
|
1918
2553
|
};
|