@ghentcdh/ui 0.1.1 → 0.2.1
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/drawer/drawer.properties.d.ts +0 -0
- package/drawer/drawer.vue.d.ts +26 -0
- package/drawer/index.d.ts +1 -0
- package/icons/icon-list.d.ts +4 -0
- package/index.css +1 -1
- package/index.d.ts +3 -0
- package/index.js +8 -7
- package/index.mjs +809 -588
- package/loading/index.d.ts +1 -0
- package/loading/loading.vue.d.ts +5 -0
- package/package.json +1 -1
- package/shell/shell.component.vue.d.ts +4 -1
- package/tree/TreeItem.vue.d.ts +15 -0
- package/tree/TreeView.vue.d.ts +7 -0
- package/tree/index.d.ts +1 -0
- package/tree/props.d.ts +13 -0
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as g, createElementBlock as u, openBlock as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as g, createElementBlock as u, openBlock as l, unref as h, normalizeClass as w, createElementVNode as c, createBlock as f, createCommentVNode as y, toDisplayString as v, Fragment as k, renderList as x, mergeProps as P, computed as $, resolveComponent as oe, withCtx as T, createTextVNode as U, ref as R, watch as ne, onMounted as ke, renderSlot as z, resolveDynamicComponent as se, createVNode as B, normalizeStyle as J, getCurrentInstance as $e, toHandlerKey as me, camelize as Ce, mergeDefaults as X, mergeModels as E, useModel as le, normalizeProps as ae, guardReactiveProps as re, withDirectives as Q, vModelSelect as Le, inject as Me, resolveDirective as fe, vModelText as xe } from "vue";
|
|
2
|
+
import { RouterLink as Be } from "vue-router";
|
|
3
|
+
const M = (...e) => `<svg
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
5
5
|
fill="none"
|
|
6
6
|
viewBox="0 0 24 24"
|
|
@@ -8,72 +8,76 @@ const P = (...e) => `<svg
|
|
|
8
8
|
stroke="currentColor" >
|
|
9
9
|
${e.map(
|
|
10
10
|
(o) => ` <path
|
|
11
|
-
stroke-linejoin="round"
|
|
11
|
+
stroke-linejoin="round"
|
|
12
12
|
stroke-linecap="round"
|
|
13
13
|
d="${o}"
|
|
14
14
|
/>`
|
|
15
15
|
).join(`
|
|
16
16
|
`)}
|
|
17
17
|
</svg>`;
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
Edit:
|
|
18
|
+
var V = /* @__PURE__ */ ((e) => (e.Edit = "Edit", e.Delete = "Delete", e.BarsArrowDown = "BarsArrowDown", e.BarsArrowUp = "BarsArrowUp", e.Funnel = "Funnel", e.Close = "Close", e.Plus = "Plus", e.PaperClip = "PaperClip", e.Hamburger = "Hamburger", e.ChevronRight = "ChevronRight", e.ChevronLeft = "ChevronLeft", e.ChevronDown = "ChevronDown", e.ChevronUp = "ChevronUp", e.DblChevronLeft = "DblChevronLeft", e.DblChevronRight = "DblChevronRight", e.Check = "Check", e.View = "View", e.Text = "Text", e))(V || {});
|
|
19
|
+
const Pe = {
|
|
20
|
+
Edit: M(
|
|
21
21
|
"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"
|
|
22
22
|
),
|
|
23
|
-
Delete:
|
|
23
|
+
Delete: M(
|
|
24
24
|
"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"
|
|
25
25
|
),
|
|
26
|
-
BarsArrowDown:
|
|
26
|
+
BarsArrowDown: M(
|
|
27
27
|
"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25"
|
|
28
28
|
),
|
|
29
|
-
BarsArrowUp:
|
|
29
|
+
BarsArrowUp: M(
|
|
30
30
|
"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"
|
|
31
31
|
),
|
|
32
|
-
Funnel:
|
|
32
|
+
Funnel: M(
|
|
33
33
|
"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"
|
|
34
34
|
),
|
|
35
|
-
Close:
|
|
36
|
-
Plus:
|
|
37
|
-
PaperClip:
|
|
35
|
+
Close: M("M6 18 18 6M6 6l12 12"),
|
|
36
|
+
Plus: M("M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"),
|
|
37
|
+
PaperClip: M(
|
|
38
38
|
"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"
|
|
39
39
|
),
|
|
40
|
-
Hamburger:
|
|
41
|
-
ChevronDown:
|
|
40
|
+
Hamburger: M("M4 6h16M4 12h16M4 18h16"),
|
|
41
|
+
ChevronDown: M(
|
|
42
42
|
"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z"
|
|
43
43
|
),
|
|
44
|
-
ChevronUp:
|
|
44
|
+
ChevronUp: M(
|
|
45
45
|
"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z"
|
|
46
46
|
),
|
|
47
|
-
Check:
|
|
48
|
-
View:
|
|
47
|
+
Check: M("m4.5 12.75 6 6 9-13.5"),
|
|
48
|
+
View: M(
|
|
49
49
|
"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",
|
|
50
50
|
"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
51
51
|
),
|
|
52
|
-
Text:
|
|
52
|
+
Text: M(
|
|
53
53
|
"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"
|
|
54
|
-
)
|
|
55
|
-
|
|
54
|
+
),
|
|
55
|
+
DblChevronLeft: M(
|
|
56
|
+
"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"
|
|
57
|
+
),
|
|
58
|
+
DblChevronRight: M("m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5")
|
|
59
|
+
}, De = ["innerHTML"], K = /* @__PURE__ */ g({
|
|
56
60
|
__name: "icon",
|
|
57
61
|
props: {
|
|
58
62
|
icon: {},
|
|
59
63
|
size: {}
|
|
60
64
|
},
|
|
61
65
|
setup(e) {
|
|
62
|
-
return (t, o) => (
|
|
63
|
-
class:
|
|
66
|
+
return (t, o) => (l(), u("div", {
|
|
67
|
+
class: w([
|
|
64
68
|
{
|
|
65
69
|
"w-full h-full": !t.size,
|
|
66
70
|
"w-2 h-2": t.size === "xs",
|
|
67
71
|
"w-4 h-4": t.size === "sm"
|
|
68
72
|
}
|
|
69
73
|
]),
|
|
70
|
-
innerHTML: h(
|
|
71
|
-
}, null, 10,
|
|
74
|
+
innerHTML: h(Pe)[t.icon]
|
|
75
|
+
}, null, 10, De));
|
|
72
76
|
}
|
|
73
|
-
}), Ae = { class: "dropdown dropdown-end" },
|
|
77
|
+
}), Ae = { class: "dropdown dropdown-end" }, Te = {
|
|
74
78
|
tabindex: "0",
|
|
75
79
|
class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
|
|
76
|
-
},
|
|
80
|
+
}, ze = { class: "min-w-max flex-no-wrap text-black" }, ie = /* @__PURE__ */ g({
|
|
77
81
|
__name: "sub-menu",
|
|
78
82
|
props: {
|
|
79
83
|
label: {},
|
|
@@ -84,29 +88,29 @@ const Be = {
|
|
|
84
88
|
disableArrow: { type: Boolean }
|
|
85
89
|
},
|
|
86
90
|
setup(e) {
|
|
87
|
-
return (t, o) => (
|
|
91
|
+
return (t, o) => (l(), u("div", Ae, [
|
|
88
92
|
c("div", {
|
|
89
93
|
tabindex: "0",
|
|
90
94
|
role: "button",
|
|
91
|
-
class:
|
|
95
|
+
class: w([t.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
92
96
|
}, [
|
|
93
|
-
c("span", null,
|
|
94
|
-
t.disableArrow ?
|
|
97
|
+
c("span", null, v(t.label), 1),
|
|
98
|
+
t.disableArrow ? y("", !0) : (l(), f(h(K), {
|
|
95
99
|
key: 0,
|
|
96
|
-
icon: h(
|
|
100
|
+
icon: h(V).ChevronDown,
|
|
97
101
|
size: "sm"
|
|
98
102
|
}, null, 8, ["icon"]))
|
|
99
103
|
], 2),
|
|
100
|
-
c("ul",
|
|
101
|
-
c("li",
|
|
102
|
-
(
|
|
103
|
-
key:
|
|
104
|
-
}, { ref_for: !0 },
|
|
104
|
+
c("ul", Te, [
|
|
105
|
+
c("li", ze, [
|
|
106
|
+
(l(!0), u(k, null, x(t.items, (s) => (l(), f(ve, P({
|
|
107
|
+
key: s.label
|
|
108
|
+
}, { ref_for: !0 }, s), null, 16))), 128))
|
|
105
109
|
])
|
|
106
110
|
])
|
|
107
111
|
]));
|
|
108
112
|
}
|
|
109
|
-
}), G = "btn btn-ghost text-left justify-between min-w-max font-normal",
|
|
113
|
+
}), G = "btn btn-ghost text-left justify-between min-w-max font-normal", ve = /* @__PURE__ */ g({
|
|
110
114
|
__name: "menu-item",
|
|
111
115
|
props: {
|
|
112
116
|
label: {},
|
|
@@ -115,45 +119,45 @@ const Be = {
|
|
|
115
119
|
disabled: { type: Boolean, default: !1 }
|
|
116
120
|
},
|
|
117
121
|
setup(e) {
|
|
118
|
-
const t = e, o =
|
|
119
|
-
var
|
|
120
|
-
return (
|
|
121
|
-
}),
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
name:
|
|
125
|
-
params:
|
|
122
|
+
const t = e, o = $(() => !t.disabled && t.action && "routerLink" in t.action), s = $(() => !t.disabled && t.action), n = $(() => {
|
|
123
|
+
var r;
|
|
124
|
+
return (r = t.items) == null ? void 0 : r.length;
|
|
125
|
+
}), a = $(() => {
|
|
126
|
+
const r = t.action;
|
|
127
|
+
return r && "routerLink" in r && "params" in r ? {
|
|
128
|
+
name: r.routerLink,
|
|
129
|
+
params: r.params
|
|
126
130
|
} : "";
|
|
127
131
|
}), b = () => {
|
|
128
|
-
var
|
|
129
|
-
(
|
|
132
|
+
var r;
|
|
133
|
+
(r = t.action) == null || r.call(t);
|
|
130
134
|
};
|
|
131
|
-
return (
|
|
132
|
-
const p =
|
|
133
|
-
return
|
|
135
|
+
return (r, d) => {
|
|
136
|
+
const p = oe("RouterLink");
|
|
137
|
+
return n.value ? (l(), f(ie, P({ key: 0 }, t, { "btn-class": G }), null, 16)) : o.value ? (l(), f(p, {
|
|
134
138
|
key: 1,
|
|
135
|
-
to:
|
|
136
|
-
class:
|
|
139
|
+
to: a.value,
|
|
140
|
+
class: w(G),
|
|
137
141
|
onClick: b
|
|
138
142
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
143
|
+
default: T(() => [
|
|
144
|
+
U(v(r.label), 1)
|
|
141
145
|
]),
|
|
142
146
|
_: 1
|
|
143
|
-
}, 8, ["to"])) :
|
|
147
|
+
}, 8, ["to"])) : s.value ? (l(), u("button", {
|
|
144
148
|
key: 2,
|
|
145
|
-
class:
|
|
149
|
+
class: w(G),
|
|
146
150
|
onClick: b
|
|
147
|
-
},
|
|
151
|
+
}, v(r.label), 1)) : (l(), u("div", {
|
|
148
152
|
key: 3,
|
|
149
|
-
class:
|
|
150
|
-
},
|
|
153
|
+
class: w([G, { "btn-disabled": r.disabled }])
|
|
154
|
+
}, v(r.label), 3));
|
|
151
155
|
};
|
|
152
156
|
}
|
|
153
|
-
}),
|
|
157
|
+
}), Se = { class: "navbar bg-base-100 shadow-sm" }, Ve = { class: "flex-1" }, Ne = {
|
|
154
158
|
key: 0,
|
|
155
159
|
class: "breadcrumbs text-sm"
|
|
156
|
-
},
|
|
160
|
+
}, Ue = { class: "flex grow justify-end px-2" }, Re = { class: "flex items-stretch" }, pn = /* @__PURE__ */ g({
|
|
157
161
|
__name: "menu",
|
|
158
162
|
props: {
|
|
159
163
|
menu: {},
|
|
@@ -161,47 +165,47 @@ const Be = {
|
|
|
161
165
|
},
|
|
162
166
|
setup(e) {
|
|
163
167
|
return (t, o) => {
|
|
164
|
-
const
|
|
165
|
-
return
|
|
168
|
+
const s = oe("RouterLink");
|
|
169
|
+
return l(), u("nav", Se, [
|
|
166
170
|
c("div", Ve, [
|
|
167
|
-
t.breadcrumbs ? (
|
|
171
|
+
t.breadcrumbs ? (l(), u("div", Ne, [
|
|
168
172
|
c("ul", null, [
|
|
169
|
-
(
|
|
170
|
-
key:
|
|
173
|
+
(l(!0), u(k, null, x(t.breadcrumbs, (n) => (l(), u("li", {
|
|
174
|
+
key: n.label
|
|
171
175
|
}, [
|
|
172
|
-
|
|
176
|
+
n.routerLink ? (l(), f(s, {
|
|
173
177
|
key: 0,
|
|
174
|
-
to: { name:
|
|
178
|
+
to: { name: n.routerLink, params: n.params }
|
|
175
179
|
}, {
|
|
176
|
-
default:
|
|
177
|
-
|
|
180
|
+
default: T(() => [
|
|
181
|
+
U(v(n.label), 1)
|
|
178
182
|
]),
|
|
179
183
|
_: 2
|
|
180
|
-
}, 1032, ["to"])) : (
|
|
181
|
-
|
|
184
|
+
}, 1032, ["to"])) : (l(), u(k, { key: 1 }, [
|
|
185
|
+
U(v(n.label), 1)
|
|
182
186
|
], 64))
|
|
183
187
|
]))), 128))
|
|
184
188
|
])
|
|
185
|
-
])) :
|
|
189
|
+
])) : y("", !0)
|
|
186
190
|
]),
|
|
187
|
-
c("div",
|
|
188
|
-
c("div",
|
|
189
|
-
(
|
|
190
|
-
key:
|
|
191
|
-
}, { ref_for: !0 },
|
|
191
|
+
c("div", Ue, [
|
|
192
|
+
c("div", Re, [
|
|
193
|
+
(l(!0), u(k, null, x(t.menu, (n) => (l(), f(ve, P({
|
|
194
|
+
key: n.label
|
|
195
|
+
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
192
196
|
])
|
|
193
197
|
])
|
|
194
198
|
]);
|
|
195
199
|
};
|
|
196
200
|
}
|
|
197
|
-
}),
|
|
201
|
+
}), mn = /* @__PURE__ */ g({
|
|
198
202
|
__name: "dropdown",
|
|
199
203
|
props: {
|
|
200
204
|
items: {}
|
|
201
205
|
},
|
|
202
206
|
setup(e) {
|
|
203
|
-
const t =
|
|
204
|
-
return (o,
|
|
207
|
+
const t = R(!0);
|
|
208
|
+
return (o, s) => (l(), f(ie, {
|
|
205
209
|
items: o.items,
|
|
206
210
|
label: "test",
|
|
207
211
|
open: t.value,
|
|
@@ -209,34 +213,34 @@ const Be = {
|
|
|
209
213
|
"disable-arrow": !0
|
|
210
214
|
}, null, 8, ["items", "open"]));
|
|
211
215
|
}
|
|
212
|
-
}),
|
|
216
|
+
}), L = [];
|
|
213
217
|
for (let e = 0; e < 256; ++e)
|
|
214
|
-
|
|
215
|
-
function
|
|
216
|
-
return (
|
|
218
|
+
L.push((e + 256).toString(16).slice(1));
|
|
219
|
+
function Fe(e, t = 0) {
|
|
220
|
+
return (L[e[t + 0]] + L[e[t + 1]] + L[e[t + 2]] + L[e[t + 3]] + "-" + L[e[t + 4]] + L[e[t + 5]] + "-" + L[e[t + 6]] + L[e[t + 7]] + "-" + L[e[t + 8]] + L[e[t + 9]] + "-" + L[e[t + 10]] + L[e[t + 11]] + L[e[t + 12]] + L[e[t + 13]] + L[e[t + 14]] + L[e[t + 15]]).toLowerCase();
|
|
217
221
|
}
|
|
218
|
-
let
|
|
219
|
-
const
|
|
220
|
-
function
|
|
221
|
-
if (!
|
|
222
|
+
let te;
|
|
223
|
+
const He = new Uint8Array(16);
|
|
224
|
+
function Ke() {
|
|
225
|
+
if (!te) {
|
|
222
226
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
223
227
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
224
|
-
|
|
228
|
+
te = crypto.getRandomValues.bind(crypto);
|
|
225
229
|
}
|
|
226
|
-
return
|
|
230
|
+
return te(He);
|
|
227
231
|
}
|
|
228
|
-
const
|
|
229
|
-
function
|
|
230
|
-
var
|
|
231
|
-
if (
|
|
232
|
-
return
|
|
232
|
+
const je = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), be = { randomUUID: je };
|
|
233
|
+
function Y(e, t, o) {
|
|
234
|
+
var n;
|
|
235
|
+
if (be.randomUUID && !e)
|
|
236
|
+
return be.randomUUID();
|
|
233
237
|
e = e || {};
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
238
|
+
const s = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Ke();
|
|
239
|
+
if (s.length < 16)
|
|
236
240
|
throw new Error("Random bytes length must be >= 16");
|
|
237
|
-
return
|
|
241
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Fe(s);
|
|
238
242
|
}
|
|
239
|
-
const
|
|
243
|
+
const Oe = { class: "font-bold" }, Ie = { class: "pt-4" }, qe = { class: "modal-action" }, Ee = /* @__PURE__ */ g({
|
|
240
244
|
__name: "modal",
|
|
241
245
|
props: {
|
|
242
246
|
modalTitle: {},
|
|
@@ -249,112 +253,112 @@ const Ie = { class: "font-bold" }, Oe = { class: "pt-4" }, je = { class: "modal-
|
|
|
249
253
|
},
|
|
250
254
|
emits: ["closeModal"],
|
|
251
255
|
setup(e, { expose: t, emit: o }) {
|
|
252
|
-
const
|
|
256
|
+
const s = {
|
|
253
257
|
xs: "max-w-xs w-[50VW]",
|
|
254
258
|
sm: "max-w-sm w-[50VW]",
|
|
255
259
|
lg: "max-w-2xl w-[80VW]",
|
|
256
260
|
xl: "max-w-[80VW] w-[80VW]"
|
|
257
|
-
},
|
|
258
|
-
const p = document.getElementById(
|
|
261
|
+
}, n = e, a = `modal_${Y()}`, b = o, r = () => {
|
|
262
|
+
const p = document.getElementById(a);
|
|
259
263
|
p == null || p.showModal();
|
|
260
|
-
},
|
|
261
|
-
const p = document.getElementById(
|
|
264
|
+
}, d = () => {
|
|
265
|
+
const p = document.getElementById(a);
|
|
262
266
|
p == null || p.close(), b("closeModal");
|
|
263
267
|
};
|
|
264
|
-
return t({ closeModal:
|
|
265
|
-
() =>
|
|
266
|
-
(p, i,
|
|
267
|
-
|
|
268
|
+
return t({ closeModal: d, openModal: r }), ne(
|
|
269
|
+
() => n.open,
|
|
270
|
+
(p, i, D) => {
|
|
271
|
+
n.open ? r() : d();
|
|
268
272
|
}
|
|
269
|
-
),
|
|
270
|
-
|
|
271
|
-
}), (p, i) => (
|
|
272
|
-
id:
|
|
273
|
+
), ke(() => {
|
|
274
|
+
n.open && r();
|
|
275
|
+
}), (p, i) => (l(), u("dialog", {
|
|
276
|
+
id: a,
|
|
273
277
|
class: "modal"
|
|
274
278
|
}, [
|
|
275
279
|
c("div", {
|
|
276
|
-
class:
|
|
280
|
+
class: w(["modal-box bg-white", s[p.width]])
|
|
277
281
|
}, [
|
|
278
|
-
p.disableClose ?
|
|
282
|
+
p.disableClose ? y("", !0) : (l(), u("button", {
|
|
279
283
|
key: 0,
|
|
280
284
|
type: "button",
|
|
281
285
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
282
|
-
onClick:
|
|
286
|
+
onClick: d
|
|
283
287
|
}, " ✕ ")),
|
|
284
|
-
c("h3",
|
|
285
|
-
c("div",
|
|
286
|
-
|
|
288
|
+
c("h3", Oe, v(p.modalTitle), 1),
|
|
289
|
+
c("div", Ie, [
|
|
290
|
+
z(p.$slots, "content")
|
|
287
291
|
]),
|
|
288
|
-
c("div",
|
|
289
|
-
|
|
292
|
+
c("div", qe, [
|
|
293
|
+
z(p.$slots, "actions")
|
|
290
294
|
])
|
|
291
295
|
], 2)
|
|
292
296
|
]));
|
|
293
297
|
}
|
|
294
298
|
});
|
|
295
|
-
var
|
|
296
|
-
const
|
|
299
|
+
var ue = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(ue || {}), ge = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(ge || {}), I = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(I || {});
|
|
300
|
+
const Ze = {
|
|
297
301
|
blank: "btn-ghost",
|
|
298
302
|
primary: "btn-primary",
|
|
299
303
|
secondary: "btn-soft btn-primary",
|
|
300
304
|
error: "btn-error text-white"
|
|
301
|
-
},
|
|
305
|
+
}, We = {
|
|
302
306
|
blank: "badge-ghost",
|
|
303
307
|
primary: "badge-primary",
|
|
304
308
|
secondary: "badge-soft badge-primary",
|
|
305
309
|
error: "badge-error"
|
|
306
|
-
},
|
|
310
|
+
}, Ge = {
|
|
307
311
|
xs: "btn-xs",
|
|
308
312
|
sm: "btn-sm",
|
|
309
313
|
lg: "btn-sm",
|
|
310
314
|
xl: "btn"
|
|
311
|
-
},
|
|
315
|
+
}, Je = {
|
|
312
316
|
xs: "badge-xs text-xxs",
|
|
313
317
|
sm: "badge-sm text-xs",
|
|
314
318
|
lg: "badge-sm text-xs",
|
|
315
319
|
xl: "badge text-xs"
|
|
316
|
-
},
|
|
320
|
+
}, q = /* @__PURE__ */ g({
|
|
317
321
|
__name: "btn",
|
|
318
322
|
props: {
|
|
319
323
|
href: {},
|
|
320
324
|
disabled: { type: Boolean, default: !1 },
|
|
321
|
-
as: { default:
|
|
325
|
+
as: { default: ge.button },
|
|
322
326
|
icon: {},
|
|
323
|
-
type: { default:
|
|
327
|
+
type: { default: ue.button },
|
|
324
328
|
outline: { type: Boolean, default: !1 },
|
|
325
|
-
color: { default:
|
|
329
|
+
color: { default: I.primary },
|
|
326
330
|
size: { default: "sm" },
|
|
327
331
|
square: { type: Boolean, default: !1 }
|
|
328
332
|
},
|
|
329
333
|
emits: ["click"],
|
|
330
334
|
setup(e, { emit: t }) {
|
|
331
|
-
const o = e,
|
|
332
|
-
return (
|
|
335
|
+
const o = e, s = t;
|
|
336
|
+
return (n, a) => (l(), f(se(n.as), P({
|
|
333
337
|
class: [
|
|
334
338
|
"btn p-1 flex justify-center flex-nowrap",
|
|
335
|
-
h(
|
|
336
|
-
h(
|
|
337
|
-
{ "btn-outline":
|
|
339
|
+
h(Ze)[n.color],
|
|
340
|
+
h(Ge)[n.size],
|
|
341
|
+
{ "btn-outline": n.outline, "btn-square": n.square }
|
|
338
342
|
]
|
|
339
343
|
}, o, {
|
|
340
|
-
onClick:
|
|
344
|
+
onClick: a[0] || (a[0] = (b) => s("click"))
|
|
341
345
|
}), {
|
|
342
|
-
default:
|
|
343
|
-
|
|
346
|
+
default: T(() => [
|
|
347
|
+
n.icon ? (l(), f(h(K), {
|
|
344
348
|
key: 0,
|
|
345
|
-
icon:
|
|
346
|
-
size:
|
|
347
|
-
}, null, 8, ["icon", "size"])) :
|
|
348
|
-
|
|
349
|
+
icon: n.icon,
|
|
350
|
+
size: n.size
|
|
351
|
+
}, null, 8, ["icon", "size"])) : y("", !0),
|
|
352
|
+
z(n.$slots, "default")
|
|
349
353
|
]),
|
|
350
354
|
_: 3
|
|
351
355
|
}, 16, ["class"]));
|
|
352
356
|
}
|
|
353
|
-
}),
|
|
357
|
+
}), Qe = ["type", "disabled"], bn = /* @__PURE__ */ g({
|
|
354
358
|
__name: "btn-badge",
|
|
355
359
|
props: {
|
|
356
360
|
icon: { default: void 0 },
|
|
357
|
-
type: { default:
|
|
361
|
+
type: { default: ue.button },
|
|
358
362
|
color: { default: void 0 },
|
|
359
363
|
disabled: { type: Boolean, default: !1 },
|
|
360
364
|
size: { default: "sm" }
|
|
@@ -362,21 +366,21 @@ const qe = {
|
|
|
362
366
|
emits: ["click"],
|
|
363
367
|
setup(e, { emit: t }) {
|
|
364
368
|
const o = t;
|
|
365
|
-
return (
|
|
366
|
-
class:
|
|
367
|
-
type:
|
|
368
|
-
disabled:
|
|
369
|
-
onClick:
|
|
369
|
+
return (s, n) => (l(), u("button", {
|
|
370
|
+
class: w(["badge gap-1", h(Je)[s.size], h(We)[s.color]]),
|
|
371
|
+
type: s.type,
|
|
372
|
+
disabled: s.disabled,
|
|
373
|
+
onClick: n[0] || (n[0] = (a) => o("click"))
|
|
370
374
|
}, [
|
|
371
|
-
|
|
372
|
-
|
|
375
|
+
z(s.$slots, "default"),
|
|
376
|
+
s.icon ? (l(), f(h(K), {
|
|
373
377
|
key: 0,
|
|
374
|
-
icon:
|
|
375
|
-
size:
|
|
376
|
-
}, null, 8, ["icon", "size"])) :
|
|
377
|
-
], 10,
|
|
378
|
+
icon: s.icon,
|
|
379
|
+
size: s.size
|
|
380
|
+
}, null, 8, ["icon", "size"])) : y("", !0)
|
|
381
|
+
], 10, Qe));
|
|
378
382
|
}
|
|
379
|
-
}),
|
|
383
|
+
}), Xe = /* @__PURE__ */ g({
|
|
380
384
|
__name: "confirmModal",
|
|
381
385
|
props: {
|
|
382
386
|
title: {},
|
|
@@ -386,33 +390,33 @@ const qe = {
|
|
|
386
390
|
},
|
|
387
391
|
emits: ["closeModal"],
|
|
388
392
|
setup(e, { emit: t }) {
|
|
389
|
-
const o = t,
|
|
390
|
-
o("closeModal", { confirmed:
|
|
393
|
+
const o = t, s = (n) => {
|
|
394
|
+
o("closeModal", { confirmed: n });
|
|
391
395
|
};
|
|
392
|
-
return (
|
|
393
|
-
"modal-title":
|
|
396
|
+
return (n, a) => (l(), f(Ee, {
|
|
397
|
+
"modal-title": n.title,
|
|
394
398
|
open: !0,
|
|
395
399
|
"disable-close": !0
|
|
396
400
|
}, {
|
|
397
|
-
content:
|
|
398
|
-
|
|
401
|
+
content: T(() => [
|
|
402
|
+
U(v(n.message), 1)
|
|
399
403
|
]),
|
|
400
|
-
actions:
|
|
401
|
-
|
|
402
|
-
color: h(
|
|
404
|
+
actions: T(() => [
|
|
405
|
+
B(h(q), {
|
|
406
|
+
color: h(I).secondary,
|
|
403
407
|
outline: !0,
|
|
404
|
-
onClick:
|
|
408
|
+
onClick: a[0] || (a[0] = (b) => s(!1))
|
|
405
409
|
}, {
|
|
406
|
-
default:
|
|
407
|
-
|
|
410
|
+
default: T(() => [
|
|
411
|
+
U(v(n.cancelLabel), 1)
|
|
408
412
|
]),
|
|
409
413
|
_: 1
|
|
410
414
|
}, 8, ["color"]),
|
|
411
|
-
|
|
412
|
-
onClick:
|
|
415
|
+
B(h(q), {
|
|
416
|
+
onClick: a[1] || (a[1] = (b) => s(!0))
|
|
413
417
|
}, {
|
|
414
|
-
default:
|
|
415
|
-
|
|
418
|
+
default: T(() => [
|
|
419
|
+
U(v(n.confirmLabel), 1)
|
|
416
420
|
]),
|
|
417
421
|
_: 1
|
|
418
422
|
})
|
|
@@ -421,22 +425,22 @@ const qe = {
|
|
|
421
425
|
}, 8, ["modal-title"]));
|
|
422
426
|
}
|
|
423
427
|
});
|
|
424
|
-
class
|
|
428
|
+
class ce {
|
|
425
429
|
constructor() {
|
|
426
|
-
this.showModal =
|
|
430
|
+
this.showModal = R(!1), this.modals = [];
|
|
427
431
|
}
|
|
428
432
|
openModal(t) {
|
|
429
|
-
const o = t.props.onClose,
|
|
430
|
-
t.props.onClose = (
|
|
431
|
-
o(
|
|
432
|
-
},
|
|
433
|
+
const o = t.props.onClose, s = Y(), n = t;
|
|
434
|
+
t.props.onClose = (a) => {
|
|
435
|
+
o(a), this.closeModal(s);
|
|
436
|
+
}, n.id = s, this.modals = [...this.modals, n], this.showModal.value = Date.now();
|
|
433
437
|
}
|
|
434
438
|
closeModal(t) {
|
|
435
439
|
this.modals = this.modals.filter((o) => o.id !== t), this.showModal.value = Date.now();
|
|
436
440
|
}
|
|
437
441
|
static showConfirm(t) {
|
|
438
442
|
this.getInstance().openModal({
|
|
439
|
-
component:
|
|
443
|
+
component: Xe,
|
|
440
444
|
props: t
|
|
441
445
|
});
|
|
442
446
|
}
|
|
@@ -444,7 +448,7 @@ class ie {
|
|
|
444
448
|
this.getInstance().openModal(t);
|
|
445
449
|
}
|
|
446
450
|
static getInstance() {
|
|
447
|
-
return this.instance || (this.instance = new
|
|
451
|
+
return this.instance || (this.instance = new ce()), this.instance;
|
|
448
452
|
}
|
|
449
453
|
static closeAll() {
|
|
450
454
|
this.instance.closeAll();
|
|
@@ -453,22 +457,22 @@ class ie {
|
|
|
453
457
|
this.modals = [], this.showModal.value = !1;
|
|
454
458
|
}
|
|
455
459
|
}
|
|
456
|
-
const
|
|
460
|
+
const Ye = /* @__PURE__ */ g({
|
|
457
461
|
__name: "modalWrapper",
|
|
458
462
|
setup(e) {
|
|
459
|
-
const t =
|
|
460
|
-
return (
|
|
463
|
+
const t = ce.getInstance(), o = $(() => t.showModal.value ? t.modals : []);
|
|
464
|
+
return (s, n) => (l(!0), u(k, null, x(o.value, (a) => {
|
|
461
465
|
var b;
|
|
462
|
-
return
|
|
463
|
-
key:
|
|
466
|
+
return l(), f(se(a == null ? void 0 : a.component), P({
|
|
467
|
+
key: a.id,
|
|
464
468
|
ref_for: !0
|
|
465
|
-
},
|
|
469
|
+
}, a == null ? void 0 : a.props, {
|
|
466
470
|
open: !0,
|
|
467
|
-
onCloseModal: (b =
|
|
471
|
+
onCloseModal: (b = a == null ? void 0 : a.props) == null ? void 0 : b.onClose
|
|
468
472
|
}), null, 16, ["onCloseModal"]);
|
|
469
473
|
}), 128));
|
|
470
474
|
}
|
|
471
|
-
}),
|
|
475
|
+
}), et = /* @__PURE__ */ g({
|
|
472
476
|
__name: "notification-message",
|
|
473
477
|
props: {
|
|
474
478
|
message: {},
|
|
@@ -481,24 +485,24 @@ const Qe = /* @__PURE__ */ g({
|
|
|
481
485
|
warning: "alert-warning",
|
|
482
486
|
info: "alert-info"
|
|
483
487
|
};
|
|
484
|
-
return (o,
|
|
488
|
+
return (o, s) => (l(), u("div", {
|
|
485
489
|
role: "alert",
|
|
486
|
-
class:
|
|
490
|
+
class: w(`alert ${t[o.type]} `)
|
|
487
491
|
}, [
|
|
488
|
-
c("span", null,
|
|
492
|
+
c("span", null, v(o.message), 1)
|
|
489
493
|
], 2));
|
|
490
494
|
}
|
|
491
|
-
}),
|
|
492
|
-
class
|
|
495
|
+
}), tt = 5e3;
|
|
496
|
+
class de {
|
|
493
497
|
constructor() {
|
|
494
|
-
this.notifications =
|
|
495
|
-
const
|
|
496
|
-
id:
|
|
497
|
-
duration:
|
|
498
|
+
this.notifications = R([]), this.addNotification = (t, o = "info") => {
|
|
499
|
+
const s = {
|
|
500
|
+
id: Y(),
|
|
501
|
+
duration: tt,
|
|
498
502
|
message: t,
|
|
499
503
|
type: o
|
|
500
504
|
};
|
|
501
|
-
this.notifications.value.push(
|
|
505
|
+
this.notifications.value.push(s), this.removeNotificationAfterDuration(s);
|
|
502
506
|
}, this.removeNotificationAfterDuration = (t) => {
|
|
503
507
|
setTimeout(() => {
|
|
504
508
|
this.removeNotification(t.id);
|
|
@@ -508,7 +512,7 @@ class ce {
|
|
|
508
512
|
};
|
|
509
513
|
}
|
|
510
514
|
static getInstance() {
|
|
511
|
-
return this.instance || (this.instance = new
|
|
515
|
+
return this.instance || (this.instance = new de()), this.instance;
|
|
512
516
|
}
|
|
513
517
|
static info(t) {
|
|
514
518
|
this.getInstance().addNotification(t, "info");
|
|
@@ -526,56 +530,54 @@ class ce {
|
|
|
526
530
|
this.getInstance().removeNotification(t);
|
|
527
531
|
}
|
|
528
532
|
}
|
|
529
|
-
const
|
|
533
|
+
const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__ */ g({
|
|
530
534
|
__name: "notifications",
|
|
531
535
|
setup(e) {
|
|
532
|
-
const t =
|
|
533
|
-
return (o,
|
|
534
|
-
(
|
|
535
|
-
key:
|
|
536
|
-
}, { ref_for: !0 },
|
|
536
|
+
const t = de.getInstance();
|
|
537
|
+
return (o, s) => (l(), u("div", nt, [
|
|
538
|
+
(l(!0), u(k, null, x(h(t).notifications.value, (n) => (l(), f(et, P({
|
|
539
|
+
key: n.id
|
|
540
|
+
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
537
541
|
]));
|
|
538
542
|
}
|
|
539
|
-
}),
|
|
540
|
-
for: "my-drawer-3",
|
|
541
|
-
"aria-label": "open sidebar",
|
|
542
|
-
class: "btn btn-square btn-ghost p-1"
|
|
543
|
-
}, rt = { class: "navbar-center" }, it = ["href"], ct = { class: "navbar-end" }, ut = { class: "p-2 bg-white mb-1 mr-1 flex-1 shadow-sm" }, dt = { class: "drawer-side no-overflow" }, pt = { class: "menu min-h-full h-full flex-col space-between m-0 !p-0 !pt-16" }, mt = { class: "flex-grow-1 w-52 bg-base-200 p-4" }, bt = { class: "bg-base-200 p-4" }, so = /* @__PURE__ */ g({
|
|
543
|
+
}), st = { class: "h-screen" }, lt = { class: "navbar bg-primary text-primary-content w-full z-100 sticky" }, at = { class: "navbar-start" }, rt = { class: "navbar-center" }, it = ["href"], ut = { class: "navbar-end" }, ct = { class: "menu h-full flex-col space-between m-0 overflow-y-auto" }, dt = { class: "flex-grow-1" }, pt = { class: "bg-base-200 p-4" }, mt = { class: "h-full" }, he = 64, hn = /* @__PURE__ */ g({
|
|
544
544
|
__name: "shell.component",
|
|
545
545
|
props: {
|
|
546
546
|
title: {},
|
|
547
547
|
menu: {},
|
|
548
548
|
user: {},
|
|
549
|
-
version: {}
|
|
549
|
+
version: {},
|
|
550
|
+
widthSidebar: { default: 300 }
|
|
550
551
|
},
|
|
551
552
|
emits: ["logout"],
|
|
552
553
|
setup(e, { emit: t }) {
|
|
553
|
-
const
|
|
554
|
-
|
|
554
|
+
const s = e, n = R(!1), a = () => {
|
|
555
|
+
n.value = !n.value;
|
|
556
|
+
}, b = t, r = $(() => s.user ? {
|
|
557
|
+
label: s.user.name,
|
|
555
558
|
items: [
|
|
556
559
|
{
|
|
557
560
|
label: "Logout",
|
|
558
561
|
action: () => {
|
|
559
|
-
|
|
562
|
+
b("logout");
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
565
|
]
|
|
563
566
|
} : null);
|
|
564
|
-
return (
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
c("div",
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
type: "checkbox",
|
|
571
|
-
class: "drawer-toggle"
|
|
572
|
-
}, null, -1)),
|
|
573
|
-
c("div", st, [
|
|
574
|
-
c("nav", nt, [
|
|
567
|
+
return (d, p) => (l(), u(k, null, [
|
|
568
|
+
B(ot),
|
|
569
|
+
B(h(Ye)),
|
|
570
|
+
c("div", st, [
|
|
571
|
+
c("header", null, [
|
|
572
|
+
c("nav", lt, [
|
|
575
573
|
c("div", at, [
|
|
576
|
-
c("
|
|
577
|
-
|
|
578
|
-
|
|
574
|
+
c("button", {
|
|
575
|
+
"aria-label": "open sidebar",
|
|
576
|
+
class: "btn btn-square btn-ghost p-1",
|
|
577
|
+
onClick: a
|
|
578
|
+
}, [
|
|
579
|
+
B(h(K), {
|
|
580
|
+
icon: h(V).Hamburger
|
|
579
581
|
}, null, 8, ["icon"])
|
|
580
582
|
])
|
|
581
583
|
]),
|
|
@@ -583,44 +585,57 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
583
585
|
c("a", {
|
|
584
586
|
class: "btn btn-ghost text-xl",
|
|
585
587
|
href: h("/")
|
|
586
|
-
},
|
|
588
|
+
}, v(d.title), 9, it)
|
|
587
589
|
]),
|
|
588
|
-
c("div",
|
|
589
|
-
r.value ? (
|
|
590
|
+
c("div", ut, [
|
|
591
|
+
r.value ? (l(), f(h(ie), P({ key: 0 }, r.value, { "btn-class": "" }), null, 16)) : y("", !0)
|
|
590
592
|
])
|
|
591
|
-
]),
|
|
592
|
-
c("div", ut, [
|
|
593
|
-
N(b.$slots, "default")
|
|
594
593
|
])
|
|
595
594
|
]),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
595
|
+
n.value ? (l(), u("aside", {
|
|
596
|
+
key: 0,
|
|
597
|
+
id: "drawer-left",
|
|
598
|
+
class: "fixed overflow-y-auto z-[1000] min-h-0 min-w-0 relative flex-shrink-0 bg-white shadow-lg transition-all duration-300 ease-in-out border-l border-gray-200 overflow-visible inset-0",
|
|
599
|
+
style: J({
|
|
600
|
+
width: d.widthSidebar + "px",
|
|
601
|
+
top: `${he}px`
|
|
602
|
+
})
|
|
603
|
+
}, [
|
|
604
|
+
c("div", ct, [
|
|
605
|
+
c("ul", dt, [
|
|
606
|
+
(l(!0), u(k, null, x(d.menu, (i) => (l(), u("li", {
|
|
607
|
+
key: i.label
|
|
606
608
|
}, [
|
|
607
|
-
|
|
608
|
-
to: { name:
|
|
609
|
+
B(h(Be), {
|
|
610
|
+
to: { name: i.routerLink, params: i.params }
|
|
609
611
|
}, {
|
|
610
|
-
default:
|
|
611
|
-
|
|
612
|
+
default: T(() => [
|
|
613
|
+
U(v(i.label), 1)
|
|
612
614
|
]),
|
|
613
615
|
_: 2
|
|
614
616
|
}, 1032, ["to"])
|
|
615
617
|
]))), 128))
|
|
616
618
|
]),
|
|
617
|
-
c("div",
|
|
619
|
+
c("div", pt, " version: " + v(d.version), 1)
|
|
618
620
|
])
|
|
619
|
-
])
|
|
621
|
+
], 4)) : y("", !0),
|
|
622
|
+
c("main", {
|
|
623
|
+
class: w("overflow-hidden fixed border-red bg-white p-4 mx-auto max-h-full shadow-sm "),
|
|
624
|
+
style: J({
|
|
625
|
+
top: `${he}px`,
|
|
626
|
+
bottom: "2px",
|
|
627
|
+
right: "2px",
|
|
628
|
+
left: n.value ? d.widthSidebar + "px" : 0
|
|
629
|
+
})
|
|
630
|
+
}, [
|
|
631
|
+
c("div", mt, [
|
|
632
|
+
z(d.$slots, "default")
|
|
633
|
+
])
|
|
634
|
+
], 4)
|
|
620
635
|
])
|
|
621
636
|
], 64));
|
|
622
637
|
}
|
|
623
|
-
}),
|
|
638
|
+
}), Z = /* @__PURE__ */ g({
|
|
624
639
|
__name: "pagination-button.component",
|
|
625
640
|
props: {
|
|
626
641
|
currentPage: {},
|
|
@@ -631,25 +646,25 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
631
646
|
},
|
|
632
647
|
emits: ["updatePage", "updatePageSize"],
|
|
633
648
|
setup(e, { emit: t }) {
|
|
634
|
-
const o = e,
|
|
649
|
+
const o = e, s = t, n = $(
|
|
635
650
|
() => o.neverActive ? !1 : o.page === o.currentPage
|
|
636
|
-
),
|
|
637
|
-
|
|
651
|
+
), a = $(() => o.neverActive ? I.blank : n.value ? I.primary : I.secondary), b = () => {
|
|
652
|
+
s("updatePage", o.page);
|
|
638
653
|
};
|
|
639
|
-
return (
|
|
640
|
-
disabled:
|
|
654
|
+
return (r, d) => (l(), f(h(q), {
|
|
655
|
+
disabled: r.disabled,
|
|
641
656
|
square: !0,
|
|
642
657
|
size: "xs",
|
|
643
|
-
color:
|
|
644
|
-
onClick:
|
|
658
|
+
color: a.value,
|
|
659
|
+
onClick: d[0] || (d[0] = (p) => b())
|
|
645
660
|
}, {
|
|
646
|
-
default:
|
|
647
|
-
|
|
661
|
+
default: T(() => [
|
|
662
|
+
U(v(r.label), 1)
|
|
648
663
|
]),
|
|
649
664
|
_: 1
|
|
650
665
|
}, 8, ["disabled", "color"]));
|
|
651
666
|
}
|
|
652
|
-
}),
|
|
667
|
+
}), bt = { class: "flex gap-2" }, ht = { class: "flex flex-1 justify-center items-center" }, ft = { class: "flex gap-1" }, vt = { class: "text-sm" }, W = 6, gt = /* @__PURE__ */ g({
|
|
653
668
|
__name: "pagination.component",
|
|
654
669
|
props: {
|
|
655
670
|
totalItems: { type: Number, default: 0 },
|
|
@@ -658,48 +673,48 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
658
673
|
},
|
|
659
674
|
emits: ["updatePage", "updatePageSize"],
|
|
660
675
|
setup(e, { emit: t }) {
|
|
661
|
-
const o = e,
|
|
676
|
+
const o = e, s = t, n = $(() => {
|
|
662
677
|
let i = Math.ceil(o.totalItems / o.itemsPerPage);
|
|
663
678
|
return i < 1 ? 1 : i;
|
|
664
|
-
}),
|
|
665
|
-
if (
|
|
679
|
+
}), a = W / 2, b = $(() => {
|
|
680
|
+
if (n.value <= W)
|
|
666
681
|
return {
|
|
667
682
|
min: 1,
|
|
668
|
-
max:
|
|
683
|
+
max: n.value
|
|
669
684
|
};
|
|
670
|
-
let i = o.currentPage -
|
|
671
|
-
i <= 1 ? i = 1 : i +
|
|
672
|
-
let
|
|
685
|
+
let i = o.currentPage - a;
|
|
686
|
+
i <= 1 ? i = 1 : i + W > n.value && (i = n.value - W);
|
|
687
|
+
let D = i + W;
|
|
673
688
|
return {
|
|
674
689
|
min: i,
|
|
675
|
-
max:
|
|
690
|
+
max: D
|
|
676
691
|
};
|
|
677
|
-
}),
|
|
692
|
+
}), r = (i) => ({
|
|
678
693
|
label: "...",
|
|
679
694
|
currentPage: i,
|
|
680
695
|
page: -10,
|
|
681
696
|
disabled: !0,
|
|
682
697
|
neverActive: !0
|
|
683
|
-
}),
|
|
684
|
-
let i =
|
|
698
|
+
}), d = $(() => {
|
|
699
|
+
let i = n.value;
|
|
685
700
|
i < 1 && (i = 1);
|
|
686
|
-
const
|
|
687
|
-
return Array.from({ length: i }, (
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
label: `${
|
|
701
|
+
const D = o.currentPage, S = [], { min: F, max: j } = b.value;
|
|
702
|
+
return Array.from({ length: i }, (_, N) => {
|
|
703
|
+
const m = N + 1;
|
|
704
|
+
m !== 1 && m !== i && (m > j || m < F) || (m === i && i > 1 && j < i && S.push(r(D)), S.push({
|
|
705
|
+
label: `${m}`,
|
|
691
706
|
totalPages: i,
|
|
692
|
-
currentPage:
|
|
693
|
-
page:
|
|
694
|
-
}),
|
|
695
|
-
}),
|
|
707
|
+
currentPage: D,
|
|
708
|
+
page: m
|
|
709
|
+
}), m === 1 && i > 1 && F > 1 && S.push(r(D)));
|
|
710
|
+
}), S;
|
|
696
711
|
}), p = (i) => {
|
|
697
|
-
|
|
712
|
+
s("updatePage", i);
|
|
698
713
|
};
|
|
699
|
-
return (i,
|
|
714
|
+
return (i, D) => (l(), u("div", bt, [
|
|
700
715
|
c("div", ht, [
|
|
701
|
-
c("div",
|
|
702
|
-
|
|
716
|
+
c("div", ft, [
|
|
717
|
+
B(Z, P(o, {
|
|
703
718
|
page: 1,
|
|
704
719
|
label: "<<",
|
|
705
720
|
"current-page": e.currentPage,
|
|
@@ -707,7 +722,7 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
707
722
|
disabled: e.currentPage === 1,
|
|
708
723
|
onUpdatePage: p
|
|
709
724
|
}), null, 16, ["current-page", "disabled"]),
|
|
710
|
-
|
|
725
|
+
B(Z, P(o, {
|
|
711
726
|
page: e.currentPage - 1,
|
|
712
727
|
label: "<",
|
|
713
728
|
"current-page": e.currentPage,
|
|
@@ -715,37 +730,37 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
715
730
|
disabled: e.currentPage === 1,
|
|
716
731
|
onUpdatePage: p
|
|
717
732
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
718
|
-
(
|
|
719
|
-
key:
|
|
733
|
+
(l(!0), u(k, null, x(d.value, (S) => (l(), f(Z, P({
|
|
734
|
+
key: S.page,
|
|
720
735
|
ref_for: !0
|
|
721
|
-
},
|
|
722
|
-
|
|
736
|
+
}, S, { onUpdatePage: p }), null, 16))), 128)),
|
|
737
|
+
B(Z, P(o, {
|
|
723
738
|
page: e.currentPage + 1,
|
|
724
739
|
label: ">",
|
|
725
740
|
"current-page": e.currentPage,
|
|
726
741
|
"never-active": !0,
|
|
727
|
-
disabled: o.currentPage ===
|
|
742
|
+
disabled: o.currentPage === n.value,
|
|
728
743
|
onUpdatePage: p
|
|
729
744
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
730
|
-
|
|
731
|
-
page:
|
|
745
|
+
B(Z, P(o, {
|
|
746
|
+
page: n.value,
|
|
732
747
|
label: ">>",
|
|
733
748
|
"current-page": e.currentPage,
|
|
734
749
|
"never-active": !0,
|
|
735
|
-
disabled: o.currentPage ===
|
|
750
|
+
disabled: o.currentPage === n.value,
|
|
736
751
|
onUpdatePage: p
|
|
737
752
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
738
753
|
])
|
|
739
754
|
]),
|
|
740
|
-
c("div",
|
|
755
|
+
c("div", vt, " page " + v(e.currentPage) + " of " + v(n.value), 1)
|
|
741
756
|
]));
|
|
742
757
|
}
|
|
743
|
-
}),
|
|
758
|
+
}), ye = (e, t) => {
|
|
744
759
|
const o = e.__vccOpts || e;
|
|
745
|
-
for (const [
|
|
746
|
-
o[
|
|
760
|
+
for (const [s, n] of t)
|
|
761
|
+
o[s] = n;
|
|
747
762
|
return o;
|
|
748
|
-
},
|
|
763
|
+
}, yt = () => ({
|
|
749
764
|
data: {
|
|
750
765
|
type: Object,
|
|
751
766
|
required: !0
|
|
@@ -758,10 +773,10 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
758
773
|
type: Object,
|
|
759
774
|
required: !1
|
|
760
775
|
}
|
|
761
|
-
}),
|
|
776
|
+
}), _t = g({
|
|
762
777
|
name: "TextCell",
|
|
763
778
|
props: {
|
|
764
|
-
...
|
|
779
|
+
...yt()
|
|
765
780
|
},
|
|
766
781
|
computed: {
|
|
767
782
|
value() {
|
|
@@ -770,11 +785,11 @@ const et = { class: "toast toast-top toast-center z-[999]" }, tt = /* @__PURE__
|
|
|
770
785
|
return e ? ((t = this.column.options) == null ? void 0 : t.format) === "keyValue" ? e[this.column.options.key] : e : null;
|
|
771
786
|
}
|
|
772
787
|
}
|
|
773
|
-
}),
|
|
774
|
-
function
|
|
775
|
-
return
|
|
788
|
+
}), wt = _t;
|
|
789
|
+
function kt(e, t, o, s, n, a) {
|
|
790
|
+
return v(e.value);
|
|
776
791
|
}
|
|
777
|
-
const
|
|
792
|
+
const fn = /* @__PURE__ */ ye(wt, [["render", kt]]), $t = { class: "flex-grow pr-2" }, Ct = { class: "h-4 w-4" }, Lt = /* @__PURE__ */ g({
|
|
778
793
|
__name: "sort.header",
|
|
779
794
|
props: {
|
|
780
795
|
column: {},
|
|
@@ -783,28 +798,28 @@ const no = /* @__PURE__ */ ve(kt, [["render", Ct]]), $t = { class: "flex-grow pr
|
|
|
783
798
|
},
|
|
784
799
|
emits: ["sort"],
|
|
785
800
|
setup(e, { emit: t }) {
|
|
786
|
-
const o = e,
|
|
787
|
-
() => o.sortDirection === "asc" ?
|
|
788
|
-
),
|
|
789
|
-
var
|
|
790
|
-
return ((
|
|
791
|
-
}),
|
|
792
|
-
b("sort",
|
|
801
|
+
const o = e, s = $(
|
|
802
|
+
() => o.sortDirection === "asc" ? V.BarsArrowUp : V.BarsArrowDown
|
|
803
|
+
), n = $(() => {
|
|
804
|
+
var r;
|
|
805
|
+
return ((r = o.column.options) == null ? void 0 : r.sortId) ?? o.column.id;
|
|
806
|
+
}), a = () => {
|
|
807
|
+
b("sort", n.value);
|
|
793
808
|
}, b = t;
|
|
794
|
-
return (
|
|
809
|
+
return (r, d) => (l(), u("button", {
|
|
795
810
|
class: "flex items-center",
|
|
796
|
-
onClick:
|
|
811
|
+
onClick: a
|
|
797
812
|
}, [
|
|
798
|
-
c("span", $t,
|
|
799
|
-
c("div",
|
|
800
|
-
|
|
813
|
+
c("span", $t, v(r.column.label), 1),
|
|
814
|
+
c("div", Ct, [
|
|
815
|
+
r.sortColumn === n.value ? (l(), f(h(K), {
|
|
801
816
|
key: 0,
|
|
802
|
-
icon:
|
|
803
|
-
}, null, 8, ["icon"])) :
|
|
817
|
+
icon: s.value
|
|
818
|
+
}, null, 8, ["icon"])) : y("", !0)
|
|
804
819
|
])
|
|
805
820
|
]));
|
|
806
821
|
}
|
|
807
|
-
}),
|
|
822
|
+
}), Mt = { class: "table w-full" }, xt = { key: 0 }, Bt = ["colspan"], Pt = { class: "flex gap-2" }, vn = /* @__PURE__ */ g({
|
|
808
823
|
__name: "table.component",
|
|
809
824
|
props: {
|
|
810
825
|
loading: { type: Boolean },
|
|
@@ -816,117 +831,117 @@ const no = /* @__PURE__ */ ve(kt, [["render", Ct]]), $t = { class: "flex-grow pr
|
|
|
816
831
|
},
|
|
817
832
|
emits: ["delete", "edit", "updatePage", "sort"],
|
|
818
833
|
setup(e, { emit: t }) {
|
|
819
|
-
const o = t,
|
|
820
|
-
o("edit",
|
|
821
|
-
},
|
|
822
|
-
o("delete",
|
|
823
|
-
},
|
|
824
|
-
o("updatePage",
|
|
825
|
-
}, b = (
|
|
826
|
-
o("sort",
|
|
834
|
+
const o = t, s = (r) => {
|
|
835
|
+
o("edit", r);
|
|
836
|
+
}, n = (r) => {
|
|
837
|
+
o("delete", r);
|
|
838
|
+
}, a = (r) => {
|
|
839
|
+
o("updatePage", r);
|
|
840
|
+
}, b = (r) => {
|
|
841
|
+
o("sort", r);
|
|
827
842
|
};
|
|
828
|
-
return (
|
|
829
|
-
c("table",
|
|
843
|
+
return (r, d) => (l(), u(k, null, [
|
|
844
|
+
c("table", Mt, [
|
|
830
845
|
c("thead", null, [
|
|
831
846
|
c("tr", null, [
|
|
832
|
-
(
|
|
847
|
+
(l(!0), u(k, null, x(r.displayColumns, (p) => (l(), u("th", {
|
|
833
848
|
key: p.scope
|
|
834
849
|
}, [
|
|
835
|
-
|
|
850
|
+
B(Lt, P({ column: p }, { ref_for: !0 }, r.sort, { onSort: b }), null, 16, ["column"])
|
|
836
851
|
]))), 128)),
|
|
837
|
-
|
|
852
|
+
d[0] || (d[0] = c("th", null, null, -1))
|
|
838
853
|
])
|
|
839
854
|
]),
|
|
840
855
|
c("tbody", null, [
|
|
841
|
-
|
|
856
|
+
r.loading ? (l(), u("tr", xt, [
|
|
842
857
|
c("td", {
|
|
843
|
-
colspan:
|
|
858
|
+
colspan: r.displayColumns.length + 1,
|
|
844
859
|
class: "text-center"
|
|
845
|
-
},
|
|
860
|
+
}, d[1] || (d[1] = [
|
|
846
861
|
c("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
847
|
-
]), 8,
|
|
848
|
-
])) :
|
|
849
|
-
(
|
|
862
|
+
]), 8, Bt)
|
|
863
|
+
])) : y("", !0),
|
|
864
|
+
(l(!0), u(k, null, x(r.data, (p) => (l(), u("tr", {
|
|
850
865
|
key: p.id
|
|
851
866
|
}, [
|
|
852
|
-
(
|
|
867
|
+
(l(!0), u(k, null, x(r.displayColumns, (i) => (l(), u("td", {
|
|
853
868
|
key: i.scope
|
|
854
869
|
}, [
|
|
855
|
-
(
|
|
870
|
+
(l(), f(se(i.component), P({ ref_for: !0 }, i, {
|
|
856
871
|
data: p,
|
|
857
872
|
column: i
|
|
858
873
|
}), null, 16, ["data", "column"]))
|
|
859
874
|
]))), 128)),
|
|
860
875
|
c("td", null, [
|
|
861
|
-
c("span",
|
|
862
|
-
(
|
|
876
|
+
c("span", Pt, [
|
|
877
|
+
(l(!0), u(k, null, x(r.actions, (i) => (l(), f(q, {
|
|
863
878
|
key: i.label,
|
|
864
879
|
icon: i.icon,
|
|
865
880
|
outline: !0,
|
|
866
|
-
onClick: (
|
|
881
|
+
onClick: (D) => i.action(p)
|
|
867
882
|
}, {
|
|
868
|
-
default:
|
|
869
|
-
|
|
883
|
+
default: T(() => [
|
|
884
|
+
U(v(i.label), 1)
|
|
870
885
|
]),
|
|
871
886
|
_: 2
|
|
872
887
|
}, 1032, ["icon", "onClick"]))), 128)),
|
|
873
|
-
|
|
874
|
-
icon: h(
|
|
888
|
+
B(q, {
|
|
889
|
+
icon: h(V).Edit,
|
|
875
890
|
outline: !0,
|
|
876
|
-
onClick: (i) =>
|
|
891
|
+
onClick: (i) => s(p)
|
|
877
892
|
}, null, 8, ["icon", "onClick"]),
|
|
878
|
-
|
|
879
|
-
icon: h(
|
|
893
|
+
B(q, {
|
|
894
|
+
icon: h(V).Delete,
|
|
880
895
|
outline: !0,
|
|
881
|
-
onClick: (i) =>
|
|
896
|
+
onClick: (i) => n(p)
|
|
882
897
|
}, null, 8, ["icon", "onClick"])
|
|
883
898
|
])
|
|
884
899
|
])
|
|
885
900
|
]))), 128))
|
|
886
901
|
])
|
|
887
902
|
]),
|
|
888
|
-
|
|
903
|
+
r.page ? (l(), f(gt, {
|
|
889
904
|
key: 0,
|
|
890
905
|
class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
|
|
891
|
-
"total-items":
|
|
892
|
-
"items-per-page":
|
|
893
|
-
"current-page":
|
|
894
|
-
onUpdatePage:
|
|
895
|
-
}, null, 8, ["total-items", "items-per-page", "current-page"])) :
|
|
906
|
+
"total-items": r.page.count,
|
|
907
|
+
"items-per-page": r.page.pageSize,
|
|
908
|
+
"current-page": r.page.page,
|
|
909
|
+
onUpdatePage: a
|
|
910
|
+
}, null, 8, ["total-items", "items-per-page", "current-page"])) : y("", !0)
|
|
896
911
|
], 64));
|
|
897
912
|
}
|
|
898
|
-
}), Dt = {},
|
|
913
|
+
}), Dt = {}, At = { class: "card bg-base-100 shadow-sm" }, Tt = { class: "card-body" }, zt = {
|
|
899
914
|
key: 0,
|
|
900
915
|
class: "card-title"
|
|
901
916
|
}, St = {
|
|
902
917
|
key: 1,
|
|
903
918
|
class: "card-actions justify-end"
|
|
904
919
|
};
|
|
905
|
-
function
|
|
906
|
-
return
|
|
907
|
-
c("div",
|
|
908
|
-
e.$slots.title ? (
|
|
909
|
-
|
|
910
|
-
])) :
|
|
920
|
+
function Vt(e, t) {
|
|
921
|
+
return l(), u("div", At, [
|
|
922
|
+
c("div", Tt, [
|
|
923
|
+
e.$slots.title ? (l(), u("h2", zt, [
|
|
924
|
+
z(e.$slots, "title")
|
|
925
|
+
])) : y("", !0),
|
|
911
926
|
c("p", null, [
|
|
912
|
-
|
|
913
|
-
|
|
927
|
+
z(e.$slots, "default"),
|
|
928
|
+
z(e.$slots, "content")
|
|
914
929
|
]),
|
|
915
|
-
e.$slots.actions ? (
|
|
916
|
-
|
|
917
|
-
])) :
|
|
930
|
+
e.$slots.actions ? (l(), u("div", St, [
|
|
931
|
+
z(e.$slots, "actions")
|
|
932
|
+
])) : y("", !0)
|
|
918
933
|
])
|
|
919
934
|
]);
|
|
920
935
|
}
|
|
921
|
-
const
|
|
936
|
+
const gn = /* @__PURE__ */ ye(Dt, [["render", Vt]]), yn = (e, t) => {
|
|
922
937
|
if (!e) return null;
|
|
923
|
-
const o = (
|
|
924
|
-
e.contains(
|
|
938
|
+
const o = (s) => {
|
|
939
|
+
e.contains(s.target) || t();
|
|
925
940
|
};
|
|
926
941
|
return document.addEventListener("click", o), o;
|
|
927
|
-
},
|
|
942
|
+
}, _n = (e) => {
|
|
928
943
|
document.removeEventListener("click", e);
|
|
929
|
-
},
|
|
944
|
+
}, wn = {
|
|
930
945
|
beforeMount(e, t) {
|
|
931
946
|
e.clickOutsideEvent = function(o) {
|
|
932
947
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -936,15 +951,15 @@ const lo = /* @__PURE__ */ ve(Dt, [["render", Nt]]), ro = (e, t) => {
|
|
|
936
951
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
937
952
|
}
|
|
938
953
|
};
|
|
939
|
-
function
|
|
940
|
-
const t =
|
|
954
|
+
function kn(e) {
|
|
955
|
+
const t = $e();
|
|
941
956
|
if (!t)
|
|
942
957
|
return !1;
|
|
943
958
|
const o = t.vnode.props;
|
|
944
|
-
return o ? !!(o[
|
|
945
|
-
o[
|
|
959
|
+
return o ? !!(o[me(e)] || // also try camelCase event handler (#2249)
|
|
960
|
+
o[me(Ce(e))]) : !1;
|
|
946
961
|
}
|
|
947
|
-
const
|
|
962
|
+
const Nt = {
|
|
948
963
|
group: {
|
|
949
964
|
root: "group",
|
|
950
965
|
label: "text-primary text-lg font-bold",
|
|
@@ -975,23 +990,23 @@ const Ut = {
|
|
|
975
990
|
root: "flex flex-row gap-x-2",
|
|
976
991
|
item: "w-full"
|
|
977
992
|
}
|
|
978
|
-
},
|
|
979
|
-
id:
|
|
993
|
+
}, ee = () => ({
|
|
994
|
+
id: Y(),
|
|
980
995
|
visible: !0,
|
|
981
996
|
required: !1,
|
|
982
997
|
enabled: !0,
|
|
983
998
|
isFocused: !1,
|
|
984
999
|
isTouched: !1,
|
|
985
1000
|
hideLabel: !1,
|
|
986
|
-
styles:
|
|
987
|
-
}),
|
|
988
|
-
...
|
|
1001
|
+
styles: Nt
|
|
1002
|
+
}), Ut = () => ({
|
|
1003
|
+
...ee(),
|
|
989
1004
|
options: [],
|
|
990
1005
|
valueKey: "value",
|
|
991
1006
|
labelKey: "label"
|
|
992
|
-
}),
|
|
1007
|
+
}), Rt = (e, t, o) => !!(e && o), Ft = (e, t, o, s) => t === void 0 || t !== void 0 && !e || !s && !o, Ht = { key: 0 }, pe = /* @__PURE__ */ g({
|
|
993
1008
|
__name: "ControlWrapper",
|
|
994
|
-
props: /* @__PURE__ */
|
|
1009
|
+
props: /* @__PURE__ */ X({
|
|
995
1010
|
id: {},
|
|
996
1011
|
description: {},
|
|
997
1012
|
errors: {},
|
|
@@ -1003,37 +1018,37 @@ const Ut = {
|
|
|
1003
1018
|
isTouched: { type: Boolean },
|
|
1004
1019
|
hideLabel: { type: Boolean },
|
|
1005
1020
|
styles: {}
|
|
1006
|
-
},
|
|
1021
|
+
}, ee()),
|
|
1007
1022
|
setup(e) {
|
|
1008
|
-
const t = e, o =
|
|
1023
|
+
const t = e, o = $(() => !Ft(
|
|
1009
1024
|
t.visible,
|
|
1010
1025
|
t.description,
|
|
1011
1026
|
t.isFocused,
|
|
1012
1027
|
!0
|
|
1013
|
-
)),
|
|
1028
|
+
)), s = $(() => t.required), n = $(() => Rt(
|
|
1014
1029
|
t.isTouched,
|
|
1015
1030
|
t.isFocused,
|
|
1016
1031
|
t.errors
|
|
1017
1032
|
));
|
|
1018
|
-
return (
|
|
1019
|
-
class:
|
|
1033
|
+
return (a, b) => (l(), u("fieldset", {
|
|
1034
|
+
class: w(a.styles.control.wrapper)
|
|
1020
1035
|
}, [
|
|
1021
|
-
|
|
1036
|
+
a.hideLabel ? y("", !0) : (l(), u("legend", {
|
|
1022
1037
|
key: 0,
|
|
1023
|
-
class:
|
|
1038
|
+
class: w(a.styles.control.label)
|
|
1024
1039
|
}, [
|
|
1025
|
-
|
|
1026
|
-
|
|
1040
|
+
U(v(a.label) + " ", 1),
|
|
1041
|
+
s.value ? (l(), u("span", Ht, "*")) : y("", !0)
|
|
1027
1042
|
], 2)),
|
|
1028
|
-
|
|
1043
|
+
z(a.$slots, "default"),
|
|
1029
1044
|
c("p", {
|
|
1030
|
-
class:
|
|
1031
|
-
},
|
|
1045
|
+
class: w(["fieldset-label h-4", { "text-error": n.value }])
|
|
1046
|
+
}, v(n.value ? a.errors : o.value ? a.description : null), 3)
|
|
1032
1047
|
], 2));
|
|
1033
1048
|
}
|
|
1034
|
-
}),
|
|
1049
|
+
}), Kt = ["disabled"], jt = ["value"], $n = /* @__PURE__ */ g({
|
|
1035
1050
|
__name: "SelectComponent",
|
|
1036
|
-
props: /* @__PURE__ */
|
|
1051
|
+
props: /* @__PURE__ */ E(/* @__PURE__ */ X({
|
|
1037
1052
|
id: {},
|
|
1038
1053
|
description: {},
|
|
1039
1054
|
errors: {},
|
|
@@ -1049,7 +1064,7 @@ const Ut = {
|
|
|
1049
1064
|
valueKey: {},
|
|
1050
1065
|
labelKey: {}
|
|
1051
1066
|
}, {
|
|
1052
|
-
...
|
|
1067
|
+
...ee(),
|
|
1053
1068
|
options: [],
|
|
1054
1069
|
valueKey: "value",
|
|
1055
1070
|
labelKey: "label"
|
|
@@ -1057,107 +1072,107 @@ const Ut = {
|
|
|
1057
1072
|
modelValue: {},
|
|
1058
1073
|
modelModifiers: {}
|
|
1059
1074
|
}),
|
|
1060
|
-
emits: /* @__PURE__ */
|
|
1075
|
+
emits: /* @__PURE__ */ E(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1061
1076
|
setup(e, { emit: t }) {
|
|
1062
|
-
const o = e,
|
|
1063
|
-
|
|
1064
|
-
}, b = (
|
|
1065
|
-
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1077
|
+
const o = e, s = t, n = le(e, "modelValue"), a = (d) => {
|
|
1078
|
+
s("change", d);
|
|
1079
|
+
}, b = (d) => {
|
|
1080
|
+
s("focus", d);
|
|
1081
|
+
}, r = (d) => {
|
|
1082
|
+
s("blur", d);
|
|
1068
1083
|
};
|
|
1069
|
-
return (
|
|
1070
|
-
default:
|
|
1071
|
-
|
|
1072
|
-
"onUpdate:modelValue": p[0] || (p[0] = (i) =>
|
|
1073
|
-
disabled: !
|
|
1074
|
-
class:
|
|
1075
|
-
onChange:
|
|
1084
|
+
return (d, p) => (l(), f(pe, ae(re(o)), {
|
|
1085
|
+
default: T(() => [
|
|
1086
|
+
Q(c("select", {
|
|
1087
|
+
"onUpdate:modelValue": p[0] || (p[0] = (i) => n.value = i),
|
|
1088
|
+
disabled: !d.enabled,
|
|
1089
|
+
class: w(["select select-bordered", d.styles.control.select]),
|
|
1090
|
+
onChange: a,
|
|
1076
1091
|
onFocus: b,
|
|
1077
|
-
onBlur:
|
|
1092
|
+
onBlur: r
|
|
1078
1093
|
}, [
|
|
1079
|
-
(
|
|
1080
|
-
key: i[
|
|
1094
|
+
(l(!0), u(k, null, x(d.options, (i) => (l(), u("option", {
|
|
1095
|
+
key: i[d.valueKey],
|
|
1081
1096
|
value: i
|
|
1082
|
-
},
|
|
1083
|
-
], 42,
|
|
1084
|
-
[
|
|
1097
|
+
}, v(i[d.labelKey]), 9, jt))), 128))
|
|
1098
|
+
], 42, Kt), [
|
|
1099
|
+
[Le, n.value]
|
|
1085
1100
|
])
|
|
1086
1101
|
]),
|
|
1087
1102
|
_: 1
|
|
1088
1103
|
}, 16));
|
|
1089
1104
|
}
|
|
1090
|
-
}),
|
|
1091
|
-
const e =
|
|
1105
|
+
}), Ot = "GHENTCDH_AUTHENTICATION", It = () => {
|
|
1106
|
+
const e = Me(Ot);
|
|
1092
1107
|
e || console.warn("No auth provided, authorized calls may not work");
|
|
1093
|
-
const t = async (o,
|
|
1094
|
-
const
|
|
1108
|
+
const t = async (o, s, n = { contentType: "application/json" }) => {
|
|
1109
|
+
const a = (n == null ? void 0 : n.skipAuth) ?? (e == null ? void 0 : e.options.skipAuthentication), b = {
|
|
1095
1110
|
accept: "application/json",
|
|
1096
|
-
...
|
|
1111
|
+
...s.headers ?? {}
|
|
1097
1112
|
};
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
if (
|
|
1101
|
-
for (const [p, i] of Object.entries(
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
...
|
|
1113
|
+
n.contentType && (b["Content-Type"] = n.contentType), a || (await (e == null ? void 0 : e.updateToken()), b.Authorization = `Bearer ${e == null ? void 0 : e.token()}`);
|
|
1114
|
+
const r = new URL(o, window.location.href);
|
|
1115
|
+
if (n != null && n.queryParams)
|
|
1116
|
+
for (const [p, i] of Object.entries(n.queryParams))
|
|
1117
|
+
r.searchParams.set(p, i);
|
|
1118
|
+
const d = await fetch(r.toString(), {
|
|
1119
|
+
...s,
|
|
1105
1120
|
headers: b
|
|
1106
1121
|
});
|
|
1107
|
-
return
|
|
1108
|
-
content:
|
|
1109
|
-
status:
|
|
1122
|
+
return d.ok ? d.json() : (n != null && n.skipAuth, Promise.reject({
|
|
1123
|
+
content: d.body,
|
|
1124
|
+
status: d.status
|
|
1110
1125
|
}));
|
|
1111
1126
|
};
|
|
1112
1127
|
return {
|
|
1113
|
-
get: (o,
|
|
1114
|
-
postFile: (o,
|
|
1128
|
+
get: (o, s) => t(o, { method: "GET" }, s),
|
|
1129
|
+
postFile: (o, s, n = {}, a) => {
|
|
1115
1130
|
const b = new FormData();
|
|
1116
|
-
for (const
|
|
1117
|
-
b.append(
|
|
1118
|
-
return b.append("file",
|
|
1131
|
+
for (const r in n)
|
|
1132
|
+
b.append(r, n[r]);
|
|
1133
|
+
return b.append("file", s), t(
|
|
1119
1134
|
o,
|
|
1120
1135
|
{
|
|
1121
1136
|
method: "POST",
|
|
1122
1137
|
body: b
|
|
1123
1138
|
},
|
|
1124
|
-
{ ...
|
|
1139
|
+
{ ...a, contentType: void 0 }
|
|
1125
1140
|
);
|
|
1126
1141
|
},
|
|
1127
|
-
post: (o,
|
|
1142
|
+
post: (o, s, n) => t(
|
|
1128
1143
|
o,
|
|
1129
1144
|
{
|
|
1130
1145
|
method: "POST",
|
|
1131
|
-
body: JSON.stringify(
|
|
1146
|
+
body: JSON.stringify(s)
|
|
1132
1147
|
},
|
|
1133
|
-
|
|
1148
|
+
n
|
|
1134
1149
|
),
|
|
1135
|
-
patch: (o,
|
|
1150
|
+
patch: (o, s, n) => t(
|
|
1136
1151
|
o,
|
|
1137
1152
|
{
|
|
1138
1153
|
method: "PATCH",
|
|
1139
|
-
body: JSON.stringify(
|
|
1154
|
+
body: JSON.stringify(s)
|
|
1140
1155
|
},
|
|
1141
|
-
|
|
1156
|
+
n
|
|
1142
1157
|
),
|
|
1143
|
-
delete: (o,
|
|
1158
|
+
delete: (o, s, n) => t(
|
|
1144
1159
|
o,
|
|
1145
1160
|
{
|
|
1146
1161
|
method: "DELETE",
|
|
1147
|
-
body: JSON.stringify(
|
|
1162
|
+
body: JSON.stringify(s)
|
|
1148
1163
|
},
|
|
1149
|
-
|
|
1164
|
+
n
|
|
1150
1165
|
)
|
|
1151
1166
|
};
|
|
1152
|
-
},
|
|
1167
|
+
}, qt = ["disabled"], Et = {
|
|
1153
1168
|
key: 0,
|
|
1154
|
-
class: /* @__PURE__ */
|
|
1169
|
+
class: /* @__PURE__ */ w([
|
|
1155
1170
|
`bg-base-100 w-52 shadow -mt-5
|
|
1156
1171
|
absolute z-50`
|
|
1157
1172
|
])
|
|
1158
|
-
}, Zt = ["onClick", "onBlur"],
|
|
1173
|
+
}, Zt = ["onClick", "onBlur"], Cn = /* @__PURE__ */ g({
|
|
1159
1174
|
__name: "AutoComplete",
|
|
1160
|
-
props: /* @__PURE__ */
|
|
1175
|
+
props: /* @__PURE__ */ E(/* @__PURE__ */ X({
|
|
1161
1176
|
id: {},
|
|
1162
1177
|
description: {},
|
|
1163
1178
|
errors: {},
|
|
@@ -1173,78 +1188,78 @@ const Ut = {
|
|
|
1173
1188
|
options: {},
|
|
1174
1189
|
valueKey: {},
|
|
1175
1190
|
labelKey: {}
|
|
1176
|
-
},
|
|
1191
|
+
}, Ut()), {
|
|
1177
1192
|
modelValue: {},
|
|
1178
1193
|
modelModifiers: {}
|
|
1179
1194
|
}),
|
|
1180
|
-
emits: /* @__PURE__ */
|
|
1195
|
+
emits: /* @__PURE__ */ E(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1181
1196
|
setup(e, { emit: t }) {
|
|
1182
|
-
const o = e,
|
|
1183
|
-
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1188
|
-
}, p =
|
|
1189
|
-
p.value = !0,
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1192
|
-
},
|
|
1193
|
-
var
|
|
1194
|
-
((
|
|
1195
|
-
},
|
|
1196
|
-
return
|
|
1197
|
-
() =>
|
|
1198
|
-
(
|
|
1199
|
-
|
|
1197
|
+
const o = e, s = t, n = le(e, "modelValue"), a = R(""), b = (m) => {
|
|
1198
|
+
s("change", m);
|
|
1199
|
+
}, r = (m) => {
|
|
1200
|
+
s("focus", m);
|
|
1201
|
+
}, d = (m) => {
|
|
1202
|
+
s("blur", m);
|
|
1203
|
+
}, p = R(!1), i = R([]), D = (m) => {
|
|
1204
|
+
p.value = !0, S(m);
|
|
1205
|
+
}, S = (m) => {
|
|
1206
|
+
n.value = m, b(m);
|
|
1207
|
+
}, F = (m) => {
|
|
1208
|
+
var C;
|
|
1209
|
+
((C = i.value) == null ? void 0 : C.length) === m + 1 && (i.value = []);
|
|
1210
|
+
}, j = It(), _ = (m) => m[o.valueKey], N = (m) => (m == null ? void 0 : m[o.labelKey]) ?? "";
|
|
1211
|
+
return ne(
|
|
1212
|
+
() => n.value,
|
|
1213
|
+
(m) => {
|
|
1214
|
+
m && !_(m) || (p.value = !0, i.value = [], a.value = N(m));
|
|
1200
1215
|
},
|
|
1201
1216
|
{ immediate: !0 }
|
|
1202
|
-
),
|
|
1203
|
-
() =>
|
|
1204
|
-
(
|
|
1217
|
+
), ne(
|
|
1218
|
+
() => a.value,
|
|
1219
|
+
(m) => {
|
|
1205
1220
|
if (p.value) {
|
|
1206
1221
|
p.value = !1;
|
|
1207
1222
|
return;
|
|
1208
1223
|
}
|
|
1209
|
-
if (
|
|
1210
|
-
const { uri:
|
|
1211
|
-
|
|
1212
|
-
i.value =
|
|
1224
|
+
if (S({ [o.labelKey]: m }), o.config) {
|
|
1225
|
+
const { uri: C, skipAuth: O, dataField: A } = o.config;
|
|
1226
|
+
j.get(`${C}${m}`, { skipAuth: O }).then((H) => {
|
|
1227
|
+
i.value = H[A];
|
|
1213
1228
|
});
|
|
1214
|
-
} else o.options && (i.value = o.options.filter((
|
|
1229
|
+
} else o.options && (i.value = o.options.filter((C) => N(C).toLowerCase().includes(m)).slice(0, 10));
|
|
1215
1230
|
}
|
|
1216
|
-
), (
|
|
1217
|
-
const
|
|
1218
|
-
return
|
|
1219
|
-
default:
|
|
1220
|
-
var
|
|
1231
|
+
), (m, C) => {
|
|
1232
|
+
const O = fe("click-outside");
|
|
1233
|
+
return l(), f(pe, ae(re(o)), {
|
|
1234
|
+
default: T(() => {
|
|
1235
|
+
var A;
|
|
1221
1236
|
return [
|
|
1222
|
-
|
|
1223
|
-
"onUpdate:modelValue":
|
|
1237
|
+
Q(c("input", {
|
|
1238
|
+
"onUpdate:modelValue": C[0] || (C[0] = (H) => a.value = H),
|
|
1224
1239
|
autocomplete: "off",
|
|
1225
1240
|
type: "text",
|
|
1226
|
-
class:
|
|
1227
|
-
disabled: !
|
|
1228
|
-
onFocus:
|
|
1229
|
-
onBlur:
|
|
1230
|
-
}, null, 42,
|
|
1231
|
-
[
|
|
1241
|
+
class: w([m.styles.control.select]),
|
|
1242
|
+
disabled: !m.enabled,
|
|
1243
|
+
onFocus: r,
|
|
1244
|
+
onBlur: d
|
|
1245
|
+
}, null, 42, qt), [
|
|
1246
|
+
[xe, a.value]
|
|
1232
1247
|
]),
|
|
1233
|
-
|
|
1234
|
-
(
|
|
1235
|
-
(
|
|
1236
|
-
key:
|
|
1248
|
+
Q((l(), u("div", null, [
|
|
1249
|
+
(A = i.value) != null && A.length ? (l(), u("ul", Et, [
|
|
1250
|
+
(l(!0), u(k, null, x(i.value, (H, _e) => (l(), u("li", {
|
|
1251
|
+
key: H[m.valueKey]
|
|
1237
1252
|
}, [
|
|
1238
1253
|
c("button", {
|
|
1239
1254
|
class: "w-full h-8 border-b-1 border-gray-200 border-x-0 border-t-0 px-4 py-2 text-left hover:bg-primary-content cursor-pointer",
|
|
1240
1255
|
type: "button",
|
|
1241
|
-
onClick: (
|
|
1242
|
-
onBlur: (
|
|
1243
|
-
},
|
|
1256
|
+
onClick: (we) => D(H),
|
|
1257
|
+
onBlur: (we) => F(_e)
|
|
1258
|
+
}, v(N(H)), 41, Zt)
|
|
1244
1259
|
]))), 128))
|
|
1245
|
-
])) :
|
|
1260
|
+
])) : y("", !0)
|
|
1246
1261
|
])), [
|
|
1247
|
-
[
|
|
1262
|
+
[O, () => i.value = []]
|
|
1248
1263
|
])
|
|
1249
1264
|
];
|
|
1250
1265
|
}),
|
|
@@ -1252,15 +1267,15 @@ const Ut = {
|
|
|
1252
1267
|
}, 16);
|
|
1253
1268
|
};
|
|
1254
1269
|
}
|
|
1255
|
-
}),
|
|
1270
|
+
}), Wt = {
|
|
1256
1271
|
key: 0,
|
|
1257
|
-
class: /* @__PURE__ */
|
|
1272
|
+
class: /* @__PURE__ */ w([
|
|
1258
1273
|
`bg-base-100 w-52 shadow -mt-5
|
|
1259
1274
|
absolute z-50 p-0`
|
|
1260
1275
|
])
|
|
1261
|
-
},
|
|
1276
|
+
}, Gt = ["onClick"], Jt = { class: "w-4 mr-2" }, Ln = /* @__PURE__ */ g({
|
|
1262
1277
|
__name: "MultiSelect",
|
|
1263
|
-
props: /* @__PURE__ */
|
|
1278
|
+
props: /* @__PURE__ */ E(/* @__PURE__ */ X({
|
|
1264
1279
|
id: {},
|
|
1265
1280
|
description: {},
|
|
1266
1281
|
errors: {},
|
|
@@ -1276,68 +1291,68 @@ const Ut = {
|
|
|
1276
1291
|
valueKey: {},
|
|
1277
1292
|
labelKey: {}
|
|
1278
1293
|
}, {
|
|
1279
|
-
...
|
|
1294
|
+
...ee(),
|
|
1280
1295
|
valueKey: "value",
|
|
1281
1296
|
labelKey: "label"
|
|
1282
1297
|
}), {
|
|
1283
1298
|
modelValue: {},
|
|
1284
1299
|
modelModifiers: {}
|
|
1285
1300
|
}),
|
|
1286
|
-
emits: /* @__PURE__ */
|
|
1301
|
+
emits: /* @__PURE__ */ E(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1287
1302
|
setup(e, { emit: t }) {
|
|
1288
|
-
const o = e,
|
|
1289
|
-
let
|
|
1290
|
-
const b = (
|
|
1291
|
-
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1303
|
+
const o = e, s = t, n = le(e, "modelValue");
|
|
1304
|
+
let a = !1;
|
|
1305
|
+
const b = (_) => {
|
|
1306
|
+
s("change", _);
|
|
1307
|
+
}, r = R(!1), d = () => {
|
|
1308
|
+
r.value = !r.value, a = !0;
|
|
1294
1309
|
}, p = () => {
|
|
1295
|
-
|
|
1296
|
-
}, i =
|
|
1310
|
+
a || (r.value = !1), a = !1;
|
|
1311
|
+
}, i = $(
|
|
1297
1312
|
() => {
|
|
1298
|
-
var
|
|
1299
|
-
return ((
|
|
1313
|
+
var _;
|
|
1314
|
+
return ((_ = n.value) == null ? void 0 : _.map((N) => F(N))) ?? [];
|
|
1300
1315
|
}
|
|
1301
|
-
),
|
|
1302
|
-
|
|
1303
|
-
let
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
},
|
|
1307
|
-
return (
|
|
1308
|
-
const
|
|
1309
|
-
return
|
|
1310
|
-
default:
|
|
1311
|
-
var
|
|
1316
|
+
), D = (_) => i.value.includes(_), S = (_, N) => {
|
|
1317
|
+
_.preventDefault();
|
|
1318
|
+
let m = n.value ?? [];
|
|
1319
|
+
const C = F(N);
|
|
1320
|
+
D(C) ? m = m.filter((A) => F(A) !== C) : m.push(N), n.value = m, b(m);
|
|
1321
|
+
}, F = (_) => _[o.valueKey], j = (_) => (_ == null ? void 0 : _[o.labelKey]) ?? "";
|
|
1322
|
+
return (_, N) => {
|
|
1323
|
+
const m = fe("click-outside");
|
|
1324
|
+
return l(), f(pe, ae(re(o)), {
|
|
1325
|
+
default: T(() => {
|
|
1326
|
+
var C, O;
|
|
1312
1327
|
return [
|
|
1313
1328
|
c("button", {
|
|
1314
1329
|
type: "button",
|
|
1315
|
-
class:
|
|
1316
|
-
onClick:
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
(
|
|
1321
|
-
key:
|
|
1330
|
+
class: w([_.styles.control.select, "w-full truncate block"]),
|
|
1331
|
+
onClick: d
|
|
1332
|
+
}, v(((O = (C = n.value) == null ? void 0 : C.map) == null ? void 0 : O.call(C, (A) => j(A)).join(", ")) ?? "Select value"), 3),
|
|
1333
|
+
Q((l(), u("div", null, [
|
|
1334
|
+
r.value ? (l(), u("ul", Wt, [
|
|
1335
|
+
(l(!0), u(k, null, x(_.options, (A) => (l(), u("li", {
|
|
1336
|
+
key: A[_.valueKey]
|
|
1322
1337
|
}, [
|
|
1323
1338
|
c("button", {
|
|
1324
1339
|
class: "w-full flex h-8 border-b-1 border-gray-200 border-x-0 border-t-0 p-2 text-left hover:bg-primary-content cursor-pointer",
|
|
1325
1340
|
type: "button",
|
|
1326
|
-
onClick: (
|
|
1341
|
+
onClick: (H) => S(H, A)
|
|
1327
1342
|
}, [
|
|
1328
|
-
c("div",
|
|
1329
|
-
|
|
1343
|
+
c("div", Jt, [
|
|
1344
|
+
D(F(A)) ? (l(), f(h(K), {
|
|
1330
1345
|
key: 0,
|
|
1331
|
-
icon: h(
|
|
1346
|
+
icon: h(V).Check,
|
|
1332
1347
|
size: "sm"
|
|
1333
|
-
}, null, 8, ["icon"])) :
|
|
1348
|
+
}, null, 8, ["icon"])) : y("", !0)
|
|
1334
1349
|
]),
|
|
1335
|
-
|
|
1336
|
-
], 8,
|
|
1350
|
+
U(" " + v(j(A)), 1)
|
|
1351
|
+
], 8, Gt)
|
|
1337
1352
|
]))), 128))
|
|
1338
|
-
])) :
|
|
1353
|
+
])) : y("", !0)
|
|
1339
1354
|
])), [
|
|
1340
|
-
[
|
|
1355
|
+
[m, () => p()]
|
|
1341
1356
|
])
|
|
1342
1357
|
];
|
|
1343
1358
|
}),
|
|
@@ -1345,43 +1360,249 @@ const Ut = {
|
|
|
1345
1360
|
}, 16);
|
|
1346
1361
|
};
|
|
1347
1362
|
}
|
|
1363
|
+
}), Qt = { class: "grid grid-cols-[auto_1fr_auto] h-full overflow-hidden" }, Xt = {
|
|
1364
|
+
id: "drawer-left",
|
|
1365
|
+
class: "min-h-0 min-w-6 relative flex-shrink-0 bg-white shadow-lg transition-all duration-300 ease-in-out border-l border-gray-200 overflow-visible"
|
|
1366
|
+
}, Yt = { class: "flex-1 overflow-y-auto bg-white" }, en = { class: "min-h-0 min-w-6 relative flex-shrink-0 bg-white shadow-lg transition-all duration-300 ease-in-out border-l border-gray-200 overflow-visible" }, Mn = /* @__PURE__ */ g({
|
|
1367
|
+
__name: "drawer",
|
|
1368
|
+
props: {
|
|
1369
|
+
widthLeft: { default: 200 },
|
|
1370
|
+
widthRight: { default: 200 }
|
|
1371
|
+
},
|
|
1372
|
+
setup(e) {
|
|
1373
|
+
const t = R({ left: !0, right: !0 }), o = (s) => {
|
|
1374
|
+
t.value[s] = !t.value[s];
|
|
1375
|
+
};
|
|
1376
|
+
return (s, n) => (l(), u("main", Qt, [
|
|
1377
|
+
c("aside", Xt, [
|
|
1378
|
+
c("div", {
|
|
1379
|
+
class: w(["absolute top-0 z-20", t.value.left ? "-right-0" : "-right-2"])
|
|
1380
|
+
}, [
|
|
1381
|
+
c("button", {
|
|
1382
|
+
class: "btn btn-ghost btn-circle",
|
|
1383
|
+
onClick: n[0] || (n[0] = (a) => o("left"))
|
|
1384
|
+
}, [
|
|
1385
|
+
B(h(K), {
|
|
1386
|
+
size: "sm",
|
|
1387
|
+
icon: t.value.left ? h(V).DblChevronLeft : h(V).DblChevronRight
|
|
1388
|
+
}, null, 8, ["icon"])
|
|
1389
|
+
])
|
|
1390
|
+
], 2),
|
|
1391
|
+
t.value.left ? (l(), u("div", {
|
|
1392
|
+
key: 0,
|
|
1393
|
+
style: J({ width: s.widthLeft + "px" }),
|
|
1394
|
+
class: "h-full overflow-y-auto p-4"
|
|
1395
|
+
}, [
|
|
1396
|
+
z(s.$slots, "left-drawer")
|
|
1397
|
+
], 4)) : y("", !0)
|
|
1398
|
+
]),
|
|
1399
|
+
c("div", Yt, [
|
|
1400
|
+
z(s.$slots, "default")
|
|
1401
|
+
]),
|
|
1402
|
+
c("aside", en, [
|
|
1403
|
+
t.value.right ? (l(), u("div", {
|
|
1404
|
+
key: 0,
|
|
1405
|
+
style: J({ width: s.widthRight + "px" }),
|
|
1406
|
+
class: "h-full overflow-y-auto p-4"
|
|
1407
|
+
}, [
|
|
1408
|
+
z(s.$slots, "right-drawer")
|
|
1409
|
+
], 4)) : y("", !0),
|
|
1410
|
+
c("div", {
|
|
1411
|
+
class: w(["absolute top-0 z-20", t.value.right ? "-left-0" : "-left-2"])
|
|
1412
|
+
}, [
|
|
1413
|
+
c("button", {
|
|
1414
|
+
class: "btn btn-ghost btn-circle",
|
|
1415
|
+
onClick: n[1] || (n[1] = (a) => o("right"))
|
|
1416
|
+
}, [
|
|
1417
|
+
B(h(K), {
|
|
1418
|
+
size: "sm",
|
|
1419
|
+
icon: t.value.right ? h(V).DblChevronRight : h(V).DblChevronLeft
|
|
1420
|
+
}, null, 8, ["icon"])
|
|
1421
|
+
])
|
|
1422
|
+
], 2)
|
|
1423
|
+
])
|
|
1424
|
+
]));
|
|
1425
|
+
}
|
|
1426
|
+
});
|
|
1427
|
+
function tn(e, t) {
|
|
1428
|
+
return l(), u("svg", {
|
|
1429
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1430
|
+
viewBox: "0 0 24 24",
|
|
1431
|
+
fill: "currentColor",
|
|
1432
|
+
"aria-hidden": "true",
|
|
1433
|
+
"data-slot": "icon"
|
|
1434
|
+
}, [
|
|
1435
|
+
c("path", {
|
|
1436
|
+
"fill-rule": "evenodd",
|
|
1437
|
+
d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
|
|
1438
|
+
"clip-rule": "evenodd"
|
|
1439
|
+
})
|
|
1440
|
+
]);
|
|
1441
|
+
}
|
|
1442
|
+
function nn(e, t) {
|
|
1443
|
+
return l(), u("svg", {
|
|
1444
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1445
|
+
viewBox: "0 0 24 24",
|
|
1446
|
+
fill: "currentColor",
|
|
1447
|
+
"aria-hidden": "true",
|
|
1448
|
+
"data-slot": "icon"
|
|
1449
|
+
}, [
|
|
1450
|
+
c("path", {
|
|
1451
|
+
"fill-rule": "evenodd",
|
|
1452
|
+
d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
|
|
1453
|
+
"clip-rule": "evenodd"
|
|
1454
|
+
})
|
|
1455
|
+
]);
|
|
1456
|
+
}
|
|
1457
|
+
const on = { class: "ml-1" }, sn = { class: "truncate flex-1 min-w-0 text-left" }, ln = {
|
|
1458
|
+
key: 0,
|
|
1459
|
+
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1460
|
+
}, an = /* @__PURE__ */ g({
|
|
1461
|
+
__name: "TreeItem",
|
|
1462
|
+
props: {
|
|
1463
|
+
active: {},
|
|
1464
|
+
node: {},
|
|
1465
|
+
expanded: {},
|
|
1466
|
+
isExpanded: { type: Function }
|
|
1467
|
+
},
|
|
1468
|
+
emits: ["toggle", "select"],
|
|
1469
|
+
setup(e, { emit: t }) {
|
|
1470
|
+
const o = e, s = t, n = $(() => o.active === o.node.id);
|
|
1471
|
+
return (a, b) => {
|
|
1472
|
+
var d;
|
|
1473
|
+
const r = oe("TreeItem", !0);
|
|
1474
|
+
return l(), u("li", on, [
|
|
1475
|
+
c("div", {
|
|
1476
|
+
class: w([
|
|
1477
|
+
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1478
|
+
hover:bg-gray-100`,
|
|
1479
|
+
n.value ? "text-primary" : ""
|
|
1480
|
+
])
|
|
1481
|
+
}, [
|
|
1482
|
+
((d = a.node.children) == null ? void 0 : d.length) > 0 ? (l(), u("span", {
|
|
1483
|
+
key: 0,
|
|
1484
|
+
class: "flex items-center justify-center",
|
|
1485
|
+
onClick: b[0] || (b[0] = (p) => s("toggle", a.node))
|
|
1486
|
+
}, [
|
|
1487
|
+
a.node.children && a.isExpanded(a.node.id) ? (l(), f(h(tn), {
|
|
1488
|
+
key: 0,
|
|
1489
|
+
class: "w-3 h-3"
|
|
1490
|
+
})) : (l(), f(h(nn), {
|
|
1491
|
+
key: 1,
|
|
1492
|
+
class: "w-3 h-3"
|
|
1493
|
+
}))
|
|
1494
|
+
])) : y("", !0),
|
|
1495
|
+
c("div", {
|
|
1496
|
+
class: "flex items-center gap-2 w-full min-w-0",
|
|
1497
|
+
onClick: b[1] || (b[1] = (p) => s("select", a.node))
|
|
1498
|
+
}, [
|
|
1499
|
+
c("div", sn, v(a.node.label), 1),
|
|
1500
|
+
a.node.tag ? (l(), u("div", ln, v(a.node.tag), 1)) : y("", !0)
|
|
1501
|
+
])
|
|
1502
|
+
], 2),
|
|
1503
|
+
a.node.children && a.isExpanded(a.node.id) ? (l(), u("ul", {
|
|
1504
|
+
key: 0,
|
|
1505
|
+
class: w([
|
|
1506
|
+
"ml-4 border-l pl-2",
|
|
1507
|
+
{ "border-gray-200": !n.value, "border-primary": n.value }
|
|
1508
|
+
])
|
|
1509
|
+
}, [
|
|
1510
|
+
(l(!0), u(k, null, x(a.node.children, (p) => (l(), f(r, {
|
|
1511
|
+
key: p.id,
|
|
1512
|
+
node: p,
|
|
1513
|
+
expanded: a.expanded,
|
|
1514
|
+
active: a.active,
|
|
1515
|
+
"is-expanded": a.isExpanded,
|
|
1516
|
+
onToggle: b[2] || (b[2] = (i) => s("toggle", i)),
|
|
1517
|
+
onSelect: b[3] || (b[3] = (i) => s("select", i))
|
|
1518
|
+
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1519
|
+
], 2)) : y("", !0)
|
|
1520
|
+
]);
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
}), rn = { class: "select-none text-sm" }, xn = /* @__PURE__ */ g({
|
|
1524
|
+
__name: "TreeView",
|
|
1525
|
+
props: {
|
|
1526
|
+
data: {},
|
|
1527
|
+
active: {}
|
|
1528
|
+
},
|
|
1529
|
+
emits: ["select"],
|
|
1530
|
+
setup(e, { emit: t }) {
|
|
1531
|
+
const o = e, s = t, n = R(/* @__PURE__ */ new Set()), a = (d) => {
|
|
1532
|
+
const p = d.id;
|
|
1533
|
+
if (!d.children || d.children.length === 0) {
|
|
1534
|
+
s("select", d);
|
|
1535
|
+
return;
|
|
1536
|
+
}
|
|
1537
|
+
n.value.has(p) ? n.value.delete(p) : n.value.add(p);
|
|
1538
|
+
}, b = (d) => {
|
|
1539
|
+
s("select", d), n.value.add(d.id);
|
|
1540
|
+
}, r = (d) => n.value.has(d);
|
|
1541
|
+
return (d, p) => (l(), u("ul", rn, [
|
|
1542
|
+
(l(!0), u(k, null, x(o.data, (i) => (l(), f(an, {
|
|
1543
|
+
key: i.id,
|
|
1544
|
+
node: i,
|
|
1545
|
+
expanded: n.value,
|
|
1546
|
+
active: d.active,
|
|
1547
|
+
"is-expanded": r,
|
|
1548
|
+
onToggle: a,
|
|
1549
|
+
onSelect: b
|
|
1550
|
+
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1551
|
+
]));
|
|
1552
|
+
}
|
|
1553
|
+
}), un = {
|
|
1554
|
+
key: 0,
|
|
1555
|
+
class: "flex items-center justify-center h-20"
|
|
1556
|
+
}, Bn = /* @__PURE__ */ g({
|
|
1557
|
+
__name: "loading",
|
|
1558
|
+
props: {
|
|
1559
|
+
loading: { type: Boolean }
|
|
1560
|
+
},
|
|
1561
|
+
setup(e) {
|
|
1562
|
+
return (t, o) => t.loading ? (l(), u("div", un, o[0] || (o[0] = [
|
|
1563
|
+
c("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
|
|
1564
|
+
]))) : y("", !0);
|
|
1565
|
+
}
|
|
1348
1566
|
});
|
|
1349
1567
|
export {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1568
|
+
Cn as Autocomplete,
|
|
1569
|
+
Je as BadgeSize,
|
|
1570
|
+
q as Btn,
|
|
1571
|
+
bn as BtnBadge,
|
|
1572
|
+
Ge as ButtonSize,
|
|
1573
|
+
gn as Card,
|
|
1574
|
+
wn as ClickOutside,
|
|
1575
|
+
I as Color,
|
|
1576
|
+
Xe as ConfirmModal,
|
|
1577
|
+
pe as ControlWrapper,
|
|
1578
|
+
Ut as DefaultAutoCompleteProperties,
|
|
1579
|
+
ee as DefaultControlProperties,
|
|
1580
|
+
Mn as Drawer,
|
|
1581
|
+
mn as Dropdown,
|
|
1582
|
+
K as Icon,
|
|
1583
|
+
V as IconEnum,
|
|
1584
|
+
Pe as IconMap,
|
|
1585
|
+
Bn as Loading,
|
|
1586
|
+
pn as Menu,
|
|
1587
|
+
Ee as Modal,
|
|
1588
|
+
ce as ModalService,
|
|
1589
|
+
Ye as ModalWrapper,
|
|
1590
|
+
Ln as MultiSelect,
|
|
1591
|
+
et as NotificationMessage,
|
|
1592
|
+
de as NotificationService,
|
|
1593
|
+
ot as Notifications,
|
|
1594
|
+
gt as PaginationComponent,
|
|
1595
|
+
$n as SelectComponent,
|
|
1596
|
+
hn as ShellComponent,
|
|
1597
|
+
ie as SubMenu,
|
|
1598
|
+
vn as Table,
|
|
1599
|
+
vn as TableComponent,
|
|
1600
|
+
fn as TextCell,
|
|
1601
|
+
xn as TreeView,
|
|
1602
|
+
yn as addClickOutsideEventListener,
|
|
1603
|
+
kn as hasCustomEventListener,
|
|
1604
|
+
Ft as isDescriptionHidden,
|
|
1605
|
+
Nt as myStyles,
|
|
1606
|
+
_n as removeClickOutsideEventListener,
|
|
1607
|
+
Rt as showErrors
|
|
1387
1608
|
};
|