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