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