@ghentcdh/ui 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.esm.js +1034 -752
- package/index.js +7 -7
- package/index.mjs +1034 -752
- package/package.json +5 -5
package/index.esm.js
CHANGED
|
@@ -1,89 +1,95 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { v4 as
|
|
4
|
-
import { useApi as
|
|
5
|
-
import { ChevronDownIcon as
|
|
6
|
-
import
|
|
7
|
-
import { useEditor as
|
|
8
|
-
import { Markdown as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as v, openBlock as l, createElementBlock as c, unref as b, normalizeClass as y, createElementVNode as i, toDisplayString as p, createBlock as g, createCommentVNode as x, Fragment as $, renderList as L, mergeProps as A, computed as k, resolveComponent as re, withCtx as B, createTextVNode as F, ref as S, watch as ne, onMounted as $e, renderSlot as M, resolveDynamicComponent as ce, createVNode as P, withDirectives as U, vModelCheckbox as ge, normalizeStyle as ie, getCurrentInstance as Ce, toHandlerKey as ve, camelize as Be, mergeDefaults as K, useModel as H, normalizeProps as Z, guardReactiveProps as G, vModelSelect as _e, mergeModels as V, resolveDirective as ye, vModelText as ue, onBeforeUnmount as Le, vModelDynamic as Me, useSlots as Pe } from "vue";
|
|
2
|
+
import { RouterLink as Ve } from "vue-router";
|
|
3
|
+
import { v4 as se } from "uuid";
|
|
4
|
+
import { apiNoAuth as Ae, useApi as De } from "@ghentcdh/tools-vue";
|
|
5
|
+
import { ChevronDownIcon as Te, ChevronRightIcon as ze } from "@heroicons/vue/24/solid";
|
|
6
|
+
import Fe from "@tiptap/starter-kit";
|
|
7
|
+
import { useEditor as Se, EditorContent as Ne } from "@tiptap/vue-3";
|
|
8
|
+
import { Markdown as Re } from "tiptap-markdown";
|
|
9
|
+
const C = (...e) => `<svg
|
|
10
10
|
xmlns="http://www.w3.org/2000/svg"
|
|
11
11
|
fill="none"
|
|
12
12
|
viewBox="0 0 24 24"
|
|
13
13
|
stroke-width="1.5"
|
|
14
14
|
stroke="currentColor" >
|
|
15
15
|
${e.map(
|
|
16
|
-
(
|
|
16
|
+
(t) => ` <path
|
|
17
17
|
stroke-linejoin="round"
|
|
18
18
|
stroke-linecap="round"
|
|
19
|
-
d="${
|
|
19
|
+
d="${t}"
|
|
20
20
|
/>`
|
|
21
21
|
).join(`
|
|
22
22
|
`)}
|
|
23
23
|
</svg>`;
|
|
24
24
|
var z = /* @__PURE__ */ ((e) => (e.Edit = "Edit", e.Delete = "Delete", e.BarsArrowDown = "BarsArrowDown", e.BarsArrowUp = "BarsArrowUp", e.Funnel = "Funnel", e.Close = "Close", e.Plus = "Plus", e.PaperClip = "PaperClip", e.Hamburger = "Hamburger", e.ChevronRight = "ChevronRight", e.ChevronLeft = "ChevronLeft", e.ChevronDown = "ChevronDown", e.ChevronUp = "ChevronUp", e.DblChevronLeft = "DblChevronLeft", e.DblChevronRight = "DblChevronRight", e.Check = "Check", e.View = "View", e.Text = "Text", e))(z || {});
|
|
25
|
-
const
|
|
26
|
-
Edit:
|
|
25
|
+
const Ie = {
|
|
26
|
+
Edit: C(
|
|
27
27
|
"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"
|
|
28
28
|
),
|
|
29
|
-
Delete:
|
|
29
|
+
Delete: C(
|
|
30
30
|
"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
|
|
31
31
|
),
|
|
32
|
-
BarsArrowDown:
|
|
32
|
+
BarsArrowDown: C(
|
|
33
33
|
"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25"
|
|
34
34
|
),
|
|
35
|
-
BarsArrowUp:
|
|
35
|
+
BarsArrowUp: C(
|
|
36
36
|
"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"
|
|
37
37
|
),
|
|
38
|
-
Funnel:
|
|
38
|
+
Funnel: C(
|
|
39
39
|
"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"
|
|
40
40
|
),
|
|
41
|
-
Close:
|
|
42
|
-
Plus:
|
|
43
|
-
PaperClip:
|
|
41
|
+
Close: C("M6 18 18 6M6 6l12 12"),
|
|
42
|
+
Plus: C("M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"),
|
|
43
|
+
PaperClip: C(
|
|
44
44
|
"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"
|
|
45
45
|
),
|
|
46
|
-
Hamburger:
|
|
47
|
-
|
|
46
|
+
Hamburger: C("M4 6h16M4 12h16M4 18h16"),
|
|
47
|
+
ChevronRight: C(
|
|
48
|
+
"M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
49
|
+
),
|
|
50
|
+
ChevronLeft: C(
|
|
51
|
+
"M15.75 19.5L8.25 12l7.5-7.5"
|
|
52
|
+
),
|
|
53
|
+
ChevronDown: C(
|
|
48
54
|
"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z"
|
|
49
55
|
),
|
|
50
|
-
ChevronUp:
|
|
56
|
+
ChevronUp: C(
|
|
51
57
|
"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z"
|
|
52
58
|
),
|
|
53
|
-
Check:
|
|
54
|
-
View:
|
|
59
|
+
Check: C("m4.5 12.75 6 6 9-13.5"),
|
|
60
|
+
View: C(
|
|
55
61
|
"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z",
|
|
56
62
|
"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
57
63
|
),
|
|
58
|
-
Text:
|
|
64
|
+
Text: C(
|
|
59
65
|
"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
60
66
|
),
|
|
61
|
-
DblChevronLeft:
|
|
67
|
+
DblChevronLeft: C(
|
|
62
68
|
"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"
|
|
63
69
|
),
|
|
64
|
-
DblChevronRight:
|
|
65
|
-
},
|
|
70
|
+
DblChevronRight: C("m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5")
|
|
71
|
+
}, Ue = ["innerHTML"], j = /* @__PURE__ */ v({
|
|
66
72
|
__name: "icon",
|
|
67
73
|
props: {
|
|
68
74
|
icon: {},
|
|
69
75
|
size: {}
|
|
70
76
|
},
|
|
71
77
|
setup(e) {
|
|
72
|
-
return (
|
|
73
|
-
class:
|
|
78
|
+
return (o, t) => (l(), c("div", {
|
|
79
|
+
class: y([
|
|
74
80
|
{
|
|
75
81
|
"w-full h-full": !e.size,
|
|
76
82
|
"w-2 h-2": e.size === "xs",
|
|
77
83
|
"w-4 h-4": e.size === "sm"
|
|
78
84
|
}
|
|
79
85
|
]),
|
|
80
|
-
innerHTML: b(
|
|
81
|
-
}, null, 10,
|
|
86
|
+
innerHTML: b(Ie)[e.icon]
|
|
87
|
+
}, null, 10, Ue));
|
|
82
88
|
}
|
|
83
|
-
}),
|
|
89
|
+
}), Ke = { class: "dropdown dropdown-end" }, qe = {
|
|
84
90
|
tabindex: "0",
|
|
85
91
|
class: "menu dropdown-content bg-white z-1 mt-4 p-2 shadow-sm"
|
|
86
|
-
},
|
|
92
|
+
}, je = { class: "min-w-max flex-no-wrap text-black" }, de = /* @__PURE__ */ v({
|
|
87
93
|
__name: "sub-menu",
|
|
88
94
|
props: {
|
|
89
95
|
label: {},
|
|
@@ -94,29 +100,29 @@ const ze = {
|
|
|
94
100
|
disableArrow: { type: Boolean }
|
|
95
101
|
},
|
|
96
102
|
setup(e) {
|
|
97
|
-
return (
|
|
98
|
-
|
|
103
|
+
return (o, t) => (l(), c("div", Ke, [
|
|
104
|
+
i("div", {
|
|
99
105
|
tabindex: "0",
|
|
100
106
|
role: "button",
|
|
101
|
-
class:
|
|
107
|
+
class: y([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
102
108
|
}, [
|
|
103
|
-
|
|
104
|
-
e.disableArrow ?
|
|
109
|
+
i("span", null, p(e.label), 1),
|
|
110
|
+
e.disableArrow ? x("", !0) : (l(), g(b(j), {
|
|
105
111
|
key: 0,
|
|
106
112
|
icon: b(z).ChevronDown,
|
|
107
113
|
size: "sm"
|
|
108
114
|
}, null, 8, ["icon"]))
|
|
109
115
|
], 2),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
(
|
|
113
|
-
key:
|
|
114
|
-
}, { ref_for: !0 },
|
|
116
|
+
i("ul", qe, [
|
|
117
|
+
i("li", je, [
|
|
118
|
+
(l(!0), c($, null, L(e.items, (s) => (l(), g(we, A({
|
|
119
|
+
key: s.label
|
|
120
|
+
}, { ref_for: !0 }, s), null, 16))), 128))
|
|
115
121
|
])
|
|
116
122
|
])
|
|
117
123
|
]));
|
|
118
124
|
}
|
|
119
|
-
}),
|
|
125
|
+
}), le = "btn btn-ghost text-left justify-between min-w-max font-normal", we = /* @__PURE__ */ v({
|
|
120
126
|
__name: "menu-item",
|
|
121
127
|
props: {
|
|
122
128
|
label: {},
|
|
@@ -125,97 +131,97 @@ const ze = {
|
|
|
125
131
|
disabled: { type: Boolean, default: !1 }
|
|
126
132
|
},
|
|
127
133
|
setup(e) {
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
return
|
|
131
|
-
name:
|
|
132
|
-
params:
|
|
134
|
+
const o = e, t = k(() => !o.disabled && o.action && "routerLink" in o.action), s = k(() => !o.disabled && o.action), n = k(() => o.items?.length), u = k(() => {
|
|
135
|
+
const m = o.action;
|
|
136
|
+
return m && "routerLink" in m && "params" in m ? {
|
|
137
|
+
name: m.routerLink,
|
|
138
|
+
params: m.params
|
|
133
139
|
} : "";
|
|
134
140
|
}), h = () => {
|
|
135
|
-
|
|
141
|
+
o.action?.();
|
|
136
142
|
};
|
|
137
|
-
return (
|
|
138
|
-
const
|
|
139
|
-
return
|
|
143
|
+
return (m, d) => {
|
|
144
|
+
const a = re("RouterLink");
|
|
145
|
+
return n.value ? (l(), g(de, A({ key: 0 }, o, { "btn-class": le }), null, 16)) : t.value ? (l(), g(a, {
|
|
140
146
|
key: 1,
|
|
141
|
-
to:
|
|
142
|
-
class:
|
|
147
|
+
to: u.value,
|
|
148
|
+
class: y(le),
|
|
143
149
|
onClick: h
|
|
144
150
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
|
|
151
|
+
default: B(() => [
|
|
152
|
+
F(p(e.label), 1)
|
|
147
153
|
]),
|
|
148
154
|
_: 1
|
|
149
|
-
}, 8, ["to"])) :
|
|
155
|
+
}, 8, ["to"])) : s.value ? (l(), c("button", {
|
|
150
156
|
key: 2,
|
|
151
|
-
class:
|
|
157
|
+
class: y(le),
|
|
152
158
|
onClick: h
|
|
153
|
-
},
|
|
159
|
+
}, p(e.label), 1)) : (l(), c("div", {
|
|
154
160
|
key: 3,
|
|
155
|
-
class:
|
|
156
|
-
},
|
|
161
|
+
class: y([le, { "btn-disabled": e.disabled }])
|
|
162
|
+
}, p(e.label), 3));
|
|
157
163
|
};
|
|
158
164
|
}
|
|
159
|
-
}),
|
|
165
|
+
}), He = { class: "navbar bg-base-100 shadow-sm" }, Oe = { class: "flex-1" }, Ee = {
|
|
160
166
|
key: 0,
|
|
161
167
|
class: "breadcrumbs text-sm"
|
|
162
|
-
},
|
|
168
|
+
}, We = { class: "flex grow justify-end px-2" }, Ze = { class: "flex items-stretch" }, Eo = /* @__PURE__ */ v({
|
|
163
169
|
__name: "menu",
|
|
164
170
|
props: {
|
|
165
171
|
menu: {},
|
|
166
172
|
breadcrumbs: {}
|
|
167
173
|
},
|
|
168
174
|
setup(e) {
|
|
169
|
-
return (
|
|
170
|
-
const
|
|
171
|
-
return
|
|
172
|
-
|
|
173
|
-
e.breadcrumbs ? (
|
|
174
|
-
|
|
175
|
-
(
|
|
176
|
-
key:
|
|
175
|
+
return (o, t) => {
|
|
176
|
+
const s = re("RouterLink");
|
|
177
|
+
return l(), c("nav", He, [
|
|
178
|
+
i("div", Oe, [
|
|
179
|
+
e.breadcrumbs ? (l(), c("div", Ee, [
|
|
180
|
+
i("ul", null, [
|
|
181
|
+
(l(!0), c($, null, L(e.breadcrumbs, (n) => (l(), c("li", {
|
|
182
|
+
key: n.label
|
|
177
183
|
}, [
|
|
178
|
-
|
|
184
|
+
n.routerLink ? (l(), g(s, {
|
|
179
185
|
key: 0,
|
|
180
|
-
to: { name:
|
|
186
|
+
to: { name: n.routerLink, params: n.params }
|
|
181
187
|
}, {
|
|
182
|
-
default:
|
|
183
|
-
|
|
188
|
+
default: B(() => [
|
|
189
|
+
F(p(n.label), 1)
|
|
184
190
|
]),
|
|
185
191
|
_: 2
|
|
186
|
-
}, 1032, ["to"])) : (
|
|
187
|
-
|
|
192
|
+
}, 1032, ["to"])) : (l(), c($, { key: 1 }, [
|
|
193
|
+
F(p(n.label), 1)
|
|
188
194
|
], 64))
|
|
189
195
|
]))), 128))
|
|
190
196
|
])
|
|
191
|
-
])) :
|
|
197
|
+
])) : x("", !0)
|
|
192
198
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
(
|
|
196
|
-
key:
|
|
197
|
-
}, { ref_for: !0 },
|
|
199
|
+
i("div", We, [
|
|
200
|
+
i("div", Ze, [
|
|
201
|
+
(l(!0), c($, null, L(e.menu, (n) => (l(), g(we, A({
|
|
202
|
+
key: n.label
|
|
203
|
+
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
198
204
|
])
|
|
199
205
|
])
|
|
200
206
|
]);
|
|
201
207
|
};
|
|
202
208
|
}
|
|
203
|
-
}),
|
|
209
|
+
}), Wo = /* @__PURE__ */ v({
|
|
204
210
|
__name: "dropdown",
|
|
205
211
|
props: {
|
|
206
212
|
items: {}
|
|
207
213
|
},
|
|
208
214
|
setup(e) {
|
|
209
|
-
const
|
|
210
|
-
return (
|
|
215
|
+
const o = S(!0);
|
|
216
|
+
return (t, s) => (l(), g(de, {
|
|
211
217
|
items: e.items,
|
|
212
218
|
label: "test",
|
|
213
|
-
open:
|
|
219
|
+
open: o.value,
|
|
214
220
|
"btn-class": "",
|
|
215
221
|
"disable-arrow": !0
|
|
216
222
|
}, null, 8, ["items", "open"]));
|
|
217
223
|
}
|
|
218
|
-
}),
|
|
224
|
+
}), Ge = { class: "font-bold" }, Je = { class: "pt-4" }, Qe = { class: "modal-action" }, Xe = /* @__PURE__ */ v({
|
|
219
225
|
__name: "modal",
|
|
220
226
|
props: {
|
|
221
227
|
modalTitle: {},
|
|
@@ -227,133 +233,133 @@ const ze = {
|
|
|
227
233
|
width: { default: "sm" }
|
|
228
234
|
},
|
|
229
235
|
emits: ["closeModal"],
|
|
230
|
-
setup(e, { expose:
|
|
231
|
-
const
|
|
236
|
+
setup(e, { expose: o, emit: t }) {
|
|
237
|
+
const s = {
|
|
232
238
|
xs: "max-w-xs w-[50VW]",
|
|
233
239
|
sm: "max-w-sm w-[50VW]",
|
|
234
240
|
lg: "max-w-2xl w-[80VW]",
|
|
235
241
|
xl: "max-w-[80VW] w-[80VW]"
|
|
236
|
-
},
|
|
237
|
-
document.getElementById(
|
|
238
|
-
},
|
|
239
|
-
document.getElementById(
|
|
242
|
+
}, n = e, u = `modal_${se()}`, h = t, m = () => {
|
|
243
|
+
document.getElementById(u)?.showModal();
|
|
244
|
+
}, d = () => {
|
|
245
|
+
document.getElementById(u)?.close(), h("closeModal");
|
|
240
246
|
};
|
|
241
|
-
return
|
|
242
|
-
() =>
|
|
243
|
-
(
|
|
244
|
-
|
|
247
|
+
return o({ closeModal: d, openModal: m }), ne(
|
|
248
|
+
() => n.open,
|
|
249
|
+
(a, r, w) => {
|
|
250
|
+
n.open ? m() : d();
|
|
245
251
|
}
|
|
246
|
-
),
|
|
247
|
-
|
|
248
|
-
}), (
|
|
249
|
-
id:
|
|
252
|
+
), $e(() => {
|
|
253
|
+
n.open && m();
|
|
254
|
+
}), (a, r) => (l(), c("dialog", {
|
|
255
|
+
id: u,
|
|
250
256
|
class: "modal"
|
|
251
257
|
}, [
|
|
252
|
-
|
|
253
|
-
class:
|
|
258
|
+
i("div", {
|
|
259
|
+
class: y(["modal-box bg-white", s[e.width]])
|
|
254
260
|
}, [
|
|
255
|
-
e.disableClose ?
|
|
261
|
+
e.disableClose ? x("", !0) : (l(), c("button", {
|
|
256
262
|
key: 0,
|
|
257
263
|
type: "button",
|
|
258
264
|
class: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2",
|
|
259
|
-
onClick:
|
|
265
|
+
onClick: d
|
|
260
266
|
}, " ✕ ")),
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
267
|
+
i("h3", Ge, p(e.modalTitle), 1),
|
|
268
|
+
i("div", Je, [
|
|
269
|
+
M(a.$slots, "content")
|
|
264
270
|
]),
|
|
265
|
-
|
|
266
|
-
|
|
271
|
+
i("div", Qe, [
|
|
272
|
+
M(a.$slots, "actions")
|
|
267
273
|
])
|
|
268
274
|
], 2)
|
|
269
275
|
]));
|
|
270
276
|
}
|
|
271
277
|
});
|
|
272
|
-
var
|
|
273
|
-
const
|
|
278
|
+
var me = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(me || {}), xe = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(xe || {}), X = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(X || {});
|
|
279
|
+
const Ye = {
|
|
274
280
|
blank: "btn-ghost",
|
|
275
281
|
primary: "btn-primary",
|
|
276
282
|
secondary: "btn-soft btn-primary",
|
|
277
283
|
error: "btn-error text-white"
|
|
278
|
-
},
|
|
284
|
+
}, et = {
|
|
279
285
|
blank: "badge-ghost",
|
|
280
286
|
primary: "badge-primary",
|
|
281
287
|
secondary: "badge-soft badge-primary",
|
|
282
288
|
error: "badge-error"
|
|
283
|
-
},
|
|
289
|
+
}, tt = {
|
|
284
290
|
xs: "btn-xs",
|
|
285
291
|
sm: "btn-sm",
|
|
286
292
|
lg: "btn-sm",
|
|
287
293
|
xl: "btn"
|
|
288
|
-
},
|
|
294
|
+
}, ot = {
|
|
289
295
|
xs: "badge-xs text-xxs",
|
|
290
296
|
sm: "badge-sm text-xs",
|
|
291
297
|
lg: "badge-sm text-xs",
|
|
292
298
|
xl: "badge text-xs"
|
|
293
|
-
},
|
|
299
|
+
}, Y = /* @__PURE__ */ v({
|
|
294
300
|
__name: "btn",
|
|
295
301
|
props: {
|
|
296
302
|
href: {},
|
|
297
303
|
disabled: { type: Boolean, default: !1 },
|
|
298
|
-
as: { default:
|
|
304
|
+
as: { default: xe.button },
|
|
299
305
|
icon: {},
|
|
300
|
-
type: { default:
|
|
306
|
+
type: { default: me.button },
|
|
301
307
|
outline: { type: Boolean, default: !1 },
|
|
302
|
-
color: { default:
|
|
308
|
+
color: { default: X.primary },
|
|
303
309
|
size: { default: "sm" },
|
|
304
310
|
square: { type: Boolean, default: !1 }
|
|
305
311
|
},
|
|
306
312
|
emits: ["click"],
|
|
307
|
-
setup(e, { emit:
|
|
308
|
-
const
|
|
309
|
-
return (
|
|
313
|
+
setup(e, { emit: o }) {
|
|
314
|
+
const t = e, s = o;
|
|
315
|
+
return (n, u) => (l(), g(ce(e.as), A({
|
|
310
316
|
class: [
|
|
311
317
|
"btn p-1 flex justify-center flex-nowrap",
|
|
312
|
-
b(
|
|
313
|
-
b(
|
|
318
|
+
b(Ye)[e.color],
|
|
319
|
+
b(tt)[e.size],
|
|
314
320
|
{ "btn-outline": e.outline, "btn-square": e.square }
|
|
315
321
|
]
|
|
316
|
-
},
|
|
317
|
-
onClick:
|
|
322
|
+
}, t, {
|
|
323
|
+
onClick: u[0] || (u[0] = (h) => s("click"))
|
|
318
324
|
}), {
|
|
319
|
-
default:
|
|
320
|
-
e.icon ? (
|
|
325
|
+
default: B(() => [
|
|
326
|
+
e.icon ? (l(), g(b(j), {
|
|
321
327
|
key: 0,
|
|
322
328
|
icon: e.icon,
|
|
323
329
|
size: e.size
|
|
324
|
-
}, null, 8, ["icon", "size"])) :
|
|
325
|
-
|
|
330
|
+
}, null, 8, ["icon", "size"])) : x("", !0),
|
|
331
|
+
M(n.$slots, "default")
|
|
326
332
|
]),
|
|
327
333
|
_: 3
|
|
328
334
|
}, 16, ["class"]));
|
|
329
335
|
}
|
|
330
|
-
}),
|
|
336
|
+
}), lt = ["type", "disabled"], Zo = /* @__PURE__ */ v({
|
|
331
337
|
__name: "btn-badge",
|
|
332
338
|
props: {
|
|
333
339
|
icon: { default: void 0 },
|
|
334
|
-
type: { default:
|
|
340
|
+
type: { default: me.button },
|
|
335
341
|
color: { default: void 0 },
|
|
336
342
|
disabled: { type: Boolean, default: !1 },
|
|
337
343
|
size: { default: "sm" }
|
|
338
344
|
},
|
|
339
345
|
emits: ["click"],
|
|
340
|
-
setup(e, { emit:
|
|
341
|
-
const
|
|
342
|
-
return (
|
|
343
|
-
class:
|
|
346
|
+
setup(e, { emit: o }) {
|
|
347
|
+
const t = o;
|
|
348
|
+
return (s, n) => (l(), c("button", {
|
|
349
|
+
class: y(["badge gap-1", b(ot)[e.size], b(et)[e.color]]),
|
|
344
350
|
type: e.type,
|
|
345
351
|
disabled: e.disabled,
|
|
346
|
-
onClick:
|
|
352
|
+
onClick: n[0] || (n[0] = (u) => t("click"))
|
|
347
353
|
}, [
|
|
348
|
-
|
|
349
|
-
e.icon ? (
|
|
354
|
+
M(s.$slots, "default"),
|
|
355
|
+
e.icon ? (l(), g(b(j), {
|
|
350
356
|
key: 0,
|
|
351
357
|
icon: e.icon,
|
|
352
358
|
size: e.size
|
|
353
|
-
}, null, 8, ["icon", "size"])) :
|
|
354
|
-
], 10,
|
|
359
|
+
}, null, 8, ["icon", "size"])) : x("", !0)
|
|
360
|
+
], 10, lt));
|
|
355
361
|
}
|
|
356
|
-
}),
|
|
362
|
+
}), nt = /* @__PURE__ */ v({
|
|
357
363
|
__name: "confirmModal",
|
|
358
364
|
props: {
|
|
359
365
|
title: {},
|
|
@@ -362,34 +368,34 @@ const We = {
|
|
|
362
368
|
cancelLabel: { default: "Cancel" }
|
|
363
369
|
},
|
|
364
370
|
emits: ["closeModal"],
|
|
365
|
-
setup(e, { emit:
|
|
366
|
-
const
|
|
367
|
-
|
|
371
|
+
setup(e, { emit: o }) {
|
|
372
|
+
const t = o, s = (n) => {
|
|
373
|
+
t("closeModal", { confirmed: n });
|
|
368
374
|
};
|
|
369
|
-
return (
|
|
375
|
+
return (n, u) => (l(), g(Xe, {
|
|
370
376
|
"modal-title": e.title,
|
|
371
377
|
open: !0,
|
|
372
378
|
"disable-close": !0
|
|
373
379
|
}, {
|
|
374
|
-
content:
|
|
375
|
-
|
|
380
|
+
content: B(() => [
|
|
381
|
+
F(p(e.message), 1)
|
|
376
382
|
]),
|
|
377
|
-
actions:
|
|
378
|
-
|
|
379
|
-
color: b(
|
|
383
|
+
actions: B(() => [
|
|
384
|
+
P(b(Y), {
|
|
385
|
+
color: b(X).secondary,
|
|
380
386
|
outline: !0,
|
|
381
|
-
onClick:
|
|
387
|
+
onClick: u[0] || (u[0] = (h) => s(!1))
|
|
382
388
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
389
|
+
default: B(() => [
|
|
390
|
+
F(p(e.cancelLabel), 1)
|
|
385
391
|
]),
|
|
386
392
|
_: 1
|
|
387
393
|
}, 8, ["color"]),
|
|
388
|
-
|
|
389
|
-
onClick:
|
|
394
|
+
P(b(Y), {
|
|
395
|
+
onClick: u[1] || (u[1] = (h) => s(!0))
|
|
390
396
|
}, {
|
|
391
|
-
default:
|
|
392
|
-
|
|
397
|
+
default: B(() => [
|
|
398
|
+
F(p(e.confirmLabel), 1)
|
|
393
399
|
]),
|
|
394
400
|
_: 1
|
|
395
401
|
})
|
|
@@ -398,30 +404,30 @@ const We = {
|
|
|
398
404
|
}, 8, ["modal-title"]));
|
|
399
405
|
}
|
|
400
406
|
});
|
|
401
|
-
class
|
|
407
|
+
class he {
|
|
402
408
|
constructor() {
|
|
403
409
|
this.showModal = S(!1), this.modals = [];
|
|
404
410
|
}
|
|
405
|
-
openModal(
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
},
|
|
411
|
+
openModal(o) {
|
|
412
|
+
const t = o.props.onClose, s = se(), n = o;
|
|
413
|
+
o.props.onClose = (u) => {
|
|
414
|
+
t(u), this.closeModal(s);
|
|
415
|
+
}, n.id = s, this.modals = [...this.modals, n], this.showModal.value = Date.now();
|
|
410
416
|
}
|
|
411
|
-
closeModal(
|
|
412
|
-
this.modals = this.modals.filter((
|
|
417
|
+
closeModal(o) {
|
|
418
|
+
this.modals = this.modals.filter((t) => t.id !== o), this.showModal.value = Date.now();
|
|
413
419
|
}
|
|
414
|
-
static showConfirm(
|
|
420
|
+
static showConfirm(o) {
|
|
415
421
|
this.getInstance().openModal({
|
|
416
|
-
component:
|
|
417
|
-
props:
|
|
422
|
+
component: nt,
|
|
423
|
+
props: o
|
|
418
424
|
});
|
|
419
425
|
}
|
|
420
|
-
static openModal(
|
|
421
|
-
this.getInstance().openModal(
|
|
426
|
+
static openModal(o) {
|
|
427
|
+
this.getInstance().openModal(o);
|
|
422
428
|
}
|
|
423
429
|
static getInstance() {
|
|
424
|
-
return this.instance || (this.instance = new
|
|
430
|
+
return this.instance || (this.instance = new he()), this.instance;
|
|
425
431
|
}
|
|
426
432
|
static closeAll() {
|
|
427
433
|
this.instance.closeAll();
|
|
@@ -430,87 +436,87 @@ class ce {
|
|
|
430
436
|
this.modals = [], this.showModal.value = !1;
|
|
431
437
|
}
|
|
432
438
|
}
|
|
433
|
-
const
|
|
439
|
+
const st = /* @__PURE__ */ v({
|
|
434
440
|
__name: "modalWrapper",
|
|
435
441
|
setup(e) {
|
|
436
|
-
const
|
|
437
|
-
return (
|
|
438
|
-
key:
|
|
442
|
+
const o = he.getInstance(), t = k(() => o.showModal.value ? o.modals : []);
|
|
443
|
+
return (s, n) => (l(!0), c($, null, L(t.value, (u) => (l(), g(ce(u?.component), A({
|
|
444
|
+
key: u.id,
|
|
439
445
|
ref_for: !0
|
|
440
|
-
},
|
|
446
|
+
}, u?.props, {
|
|
441
447
|
open: !0,
|
|
442
|
-
onCloseModal:
|
|
448
|
+
onCloseModal: u?.props?.onClose
|
|
443
449
|
}), null, 16, ["onCloseModal"]))), 128));
|
|
444
450
|
}
|
|
445
|
-
}),
|
|
451
|
+
}), at = /* @__PURE__ */ v({
|
|
446
452
|
__name: "notification-message",
|
|
447
453
|
props: {
|
|
448
454
|
message: {},
|
|
449
455
|
type: {}
|
|
450
456
|
},
|
|
451
457
|
setup(e) {
|
|
452
|
-
const
|
|
458
|
+
const o = {
|
|
453
459
|
success: "alert-success",
|
|
454
460
|
error: "alert-error",
|
|
455
461
|
warning: "alert-warning",
|
|
456
462
|
info: "alert-info"
|
|
457
463
|
};
|
|
458
|
-
return (
|
|
464
|
+
return (t, s) => (l(), c("div", {
|
|
459
465
|
role: "alert",
|
|
460
|
-
class:
|
|
466
|
+
class: y(`alert ${o[e.type]} `)
|
|
461
467
|
}, [
|
|
462
|
-
|
|
468
|
+
i("span", null, p(e.message), 1)
|
|
463
469
|
], 2));
|
|
464
470
|
}
|
|
465
|
-
}),
|
|
466
|
-
class
|
|
471
|
+
}), it = 5e3;
|
|
472
|
+
class be {
|
|
467
473
|
constructor() {
|
|
468
|
-
this.notifications = S([]), this.addNotification = (
|
|
469
|
-
const
|
|
470
|
-
id:
|
|
471
|
-
duration:
|
|
472
|
-
message:
|
|
473
|
-
type:
|
|
474
|
+
this.notifications = S([]), this.addNotification = (o, t = "info") => {
|
|
475
|
+
const s = {
|
|
476
|
+
id: se(),
|
|
477
|
+
duration: it,
|
|
478
|
+
message: o,
|
|
479
|
+
type: t
|
|
474
480
|
};
|
|
475
|
-
this.notifications.value.push(
|
|
476
|
-
}, this.removeNotificationAfterDuration = (
|
|
481
|
+
this.notifications.value.push(s), this.removeNotificationAfterDuration(s);
|
|
482
|
+
}, this.removeNotificationAfterDuration = (o) => {
|
|
477
483
|
setTimeout(() => {
|
|
478
|
-
this.removeNotification(
|
|
479
|
-
},
|
|
480
|
-
}, this.removeNotification = (
|
|
481
|
-
this.notifications.value = this.notifications.value.filter((
|
|
484
|
+
this.removeNotification(o.id);
|
|
485
|
+
}, o.duration);
|
|
486
|
+
}, this.removeNotification = (o) => {
|
|
487
|
+
this.notifications.value = this.notifications.value.filter((t) => t.id !== o);
|
|
482
488
|
};
|
|
483
489
|
}
|
|
484
490
|
static getInstance() {
|
|
485
|
-
return this.instance || (this.instance = new
|
|
491
|
+
return this.instance || (this.instance = new be()), this.instance;
|
|
486
492
|
}
|
|
487
|
-
static info(
|
|
488
|
-
this.getInstance().addNotification(
|
|
493
|
+
static info(o) {
|
|
494
|
+
this.getInstance().addNotification(o, "info");
|
|
489
495
|
}
|
|
490
|
-
static success(
|
|
491
|
-
this.getInstance().addNotification(
|
|
496
|
+
static success(o) {
|
|
497
|
+
this.getInstance().addNotification(o, "success");
|
|
492
498
|
}
|
|
493
|
-
static warning(
|
|
494
|
-
this.getInstance().addNotification(
|
|
499
|
+
static warning(o) {
|
|
500
|
+
this.getInstance().addNotification(o, "warning");
|
|
495
501
|
}
|
|
496
|
-
static error(
|
|
497
|
-
this.getInstance().addNotification(
|
|
502
|
+
static error(o) {
|
|
503
|
+
this.getInstance().addNotification(o, "error");
|
|
498
504
|
}
|
|
499
|
-
static removeNotification(
|
|
500
|
-
this.getInstance().removeNotification(
|
|
505
|
+
static removeNotification(o) {
|
|
506
|
+
this.getInstance().removeNotification(o);
|
|
501
507
|
}
|
|
502
508
|
}
|
|
503
|
-
const
|
|
509
|
+
const rt = { class: "toast toast-top toast-center z-[999]" }, ct = /* @__PURE__ */ v({
|
|
504
510
|
__name: "notifications",
|
|
505
511
|
setup(e) {
|
|
506
|
-
const
|
|
507
|
-
return (
|
|
508
|
-
(
|
|
509
|
-
key:
|
|
510
|
-
}, { ref_for: !0 },
|
|
512
|
+
const o = be.getInstance();
|
|
513
|
+
return (t, s) => (l(), c("div", rt, [
|
|
514
|
+
(l(!0), c($, null, L(b(o).notifications.value, (n) => (l(), g(at, A({
|
|
515
|
+
key: n.id
|
|
516
|
+
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
511
517
|
]));
|
|
512
518
|
}
|
|
513
|
-
}),
|
|
519
|
+
}), ut = { class: "flex h-screen flex-col" }, dt = { class: "shrink-0" }, mt = { class: "navbar bg-primary text-primary-content w-full z-100" }, ht = { class: "navbar-start" }, bt = { class: "navbar-center" }, ft = ["href"], pt = { class: "navbar-end" }, vt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, gt = { class: "drawer-side h-full shadow-md" }, yt = { class: "flex-grow overflow-y-auto" }, wt = { class: "bg-base-200 p-4" }, Go = /* @__PURE__ */ v({
|
|
514
520
|
__name: "shell.component",
|
|
515
521
|
props: {
|
|
516
522
|
title: {},
|
|
@@ -520,11 +526,11 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
520
526
|
widthSidebar: { default: 300 }
|
|
521
527
|
},
|
|
522
528
|
emits: ["logout"],
|
|
523
|
-
setup(e, { emit:
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
}, h =
|
|
527
|
-
label:
|
|
529
|
+
setup(e, { emit: o }) {
|
|
530
|
+
const s = e, n = S(!1), u = () => {
|
|
531
|
+
n.value = !n.value;
|
|
532
|
+
}, h = o, m = k(() => s.user ? {
|
|
533
|
+
label: s.user.name,
|
|
528
534
|
items: [
|
|
529
535
|
{
|
|
530
536
|
label: "Logout",
|
|
@@ -534,80 +540,80 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
534
540
|
}
|
|
535
541
|
]
|
|
536
542
|
} : null);
|
|
537
|
-
return (
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
return (d, a) => (l(), c($, null, [
|
|
544
|
+
P(ct),
|
|
545
|
+
P(b(st)),
|
|
546
|
+
i("div", ut, [
|
|
547
|
+
i("header", dt, [
|
|
548
|
+
i("nav", mt, [
|
|
549
|
+
i("div", ht, [
|
|
550
|
+
i("button", {
|
|
545
551
|
"aria-label": "open sidebar",
|
|
546
552
|
class: "btn btn-square btn-ghost p-1",
|
|
547
|
-
onClick:
|
|
553
|
+
onClick: u
|
|
548
554
|
}, [
|
|
549
|
-
|
|
555
|
+
P(b(j), {
|
|
550
556
|
icon: b(z).Hamburger
|
|
551
557
|
}, null, 8, ["icon"])
|
|
552
558
|
])
|
|
553
559
|
]),
|
|
554
|
-
|
|
555
|
-
|
|
560
|
+
i("div", bt, [
|
|
561
|
+
i("a", {
|
|
556
562
|
class: "btn btn-ghost text-primary-content text-lg color-white",
|
|
557
563
|
href: b("/")
|
|
558
|
-
},
|
|
564
|
+
}, p(e.title), 9, ft)
|
|
559
565
|
]),
|
|
560
|
-
|
|
561
|
-
|
|
566
|
+
i("div", pt, [
|
|
567
|
+
m.value ? (l(), g(b(de), A({ key: 0 }, m.value, { "btn-class": "" }), null, 16)) : x("", !0)
|
|
562
568
|
])
|
|
563
569
|
])
|
|
564
570
|
]),
|
|
565
|
-
|
|
566
|
-
class:
|
|
571
|
+
i("div", {
|
|
572
|
+
class: y(["drawer flex-1 overflow-hidden", { "drawer-open": n.value }])
|
|
567
573
|
}, [
|
|
568
|
-
|
|
574
|
+
U(i("input", {
|
|
569
575
|
id: "app-drawer",
|
|
570
|
-
"onUpdate:modelValue":
|
|
576
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
|
|
571
577
|
type: "checkbox",
|
|
572
578
|
class: "drawer-toggle"
|
|
573
579
|
}, null, 512), [
|
|
574
|
-
[
|
|
580
|
+
[ge, n.value]
|
|
575
581
|
]),
|
|
576
|
-
|
|
577
|
-
|
|
582
|
+
i("main", vt, [
|
|
583
|
+
M(d.$slots, "default")
|
|
578
584
|
]),
|
|
579
|
-
|
|
580
|
-
|
|
585
|
+
i("div", gt, [
|
|
586
|
+
a[1] || (a[1] = i("label", {
|
|
581
587
|
for: "app-drawer",
|
|
582
588
|
"aria-label": "close sidebar",
|
|
583
589
|
class: "drawer-overlay"
|
|
584
590
|
}, null, -1)),
|
|
585
|
-
|
|
591
|
+
i("div", {
|
|
586
592
|
class: "menu bg-base-100 h-full flex flex-col justify-between",
|
|
587
|
-
style:
|
|
593
|
+
style: ie({ width: e.widthSidebar + "px" })
|
|
588
594
|
}, [
|
|
589
|
-
|
|
590
|
-
(
|
|
595
|
+
i("ul", yt, [
|
|
596
|
+
(l(!0), c($, null, L(e.menu, (r) => (l(), c("li", {
|
|
591
597
|
key: r.label
|
|
592
598
|
}, [
|
|
593
|
-
|
|
599
|
+
P(b(Ve), {
|
|
594
600
|
to: { name: r.routerLink, params: r.params }
|
|
595
601
|
}, {
|
|
596
|
-
default:
|
|
597
|
-
|
|
602
|
+
default: B(() => [
|
|
603
|
+
F(p(r.label), 1)
|
|
598
604
|
]),
|
|
599
605
|
_: 2
|
|
600
606
|
}, 1032, ["to"])
|
|
601
607
|
]))), 128))
|
|
602
608
|
]),
|
|
603
|
-
|
|
609
|
+
i("div", wt, " version: " + p(e.version), 1)
|
|
604
610
|
], 4)
|
|
605
611
|
])
|
|
606
612
|
], 2)
|
|
607
613
|
])
|
|
608
614
|
], 64));
|
|
609
615
|
}
|
|
610
|
-
}),
|
|
616
|
+
}), ee = /* @__PURE__ */ v({
|
|
611
617
|
__name: "pagination-button.component",
|
|
612
618
|
props: {
|
|
613
619
|
currentPage: {},
|
|
@@ -617,26 +623,26 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
617
623
|
disabled: { type: Boolean }
|
|
618
624
|
},
|
|
619
625
|
emits: ["updatePage", "updatePageSize"],
|
|
620
|
-
setup(e, { emit:
|
|
621
|
-
const
|
|
622
|
-
() =>
|
|
623
|
-
),
|
|
624
|
-
|
|
626
|
+
setup(e, { emit: o }) {
|
|
627
|
+
const t = e, s = o, n = k(
|
|
628
|
+
() => t.neverActive ? !1 : t.page === t.currentPage
|
|
629
|
+
), u = k(() => t.neverActive ? X.blank : n.value ? X.primary : X.secondary), h = () => {
|
|
630
|
+
s("updatePage", t.page);
|
|
625
631
|
};
|
|
626
|
-
return (
|
|
632
|
+
return (m, d) => (l(), g(b(Y), {
|
|
627
633
|
disabled: e.disabled,
|
|
628
634
|
square: !0,
|
|
629
635
|
size: "xs",
|
|
630
|
-
color:
|
|
631
|
-
onClick:
|
|
636
|
+
color: u.value,
|
|
637
|
+
onClick: d[0] || (d[0] = (a) => h())
|
|
632
638
|
}, {
|
|
633
|
-
default:
|
|
634
|
-
|
|
639
|
+
default: B(() => [
|
|
640
|
+
F(p(e.label), 1)
|
|
635
641
|
]),
|
|
636
642
|
_: 1
|
|
637
643
|
}, 8, ["disabled", "color"]));
|
|
638
644
|
}
|
|
639
|
-
}),
|
|
645
|
+
}), xt = { class: "flex gap-2" }, kt = { class: "flex flex-1 justify-center items-center" }, $t = { class: "flex gap-1" }, Ct = { class: "text-sm" }, te = 6, Bt = /* @__PURE__ */ v({
|
|
640
646
|
__name: "pagination.component",
|
|
641
647
|
props: {
|
|
642
648
|
totalItems: { type: Number, default: 0 },
|
|
@@ -644,95 +650,95 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
644
650
|
currentPage: { type: Number, default: 1 }
|
|
645
651
|
},
|
|
646
652
|
emits: ["updatePage", "updatePageSize"],
|
|
647
|
-
setup(e, { emit:
|
|
648
|
-
const
|
|
649
|
-
let r = Math.ceil(
|
|
653
|
+
setup(e, { emit: o }) {
|
|
654
|
+
const t = e, s = o, n = k(() => {
|
|
655
|
+
let r = Math.ceil(t.totalItems / t.itemsPerPage);
|
|
650
656
|
return r < 1 ? 1 : r;
|
|
651
|
-
}),
|
|
652
|
-
if (
|
|
657
|
+
}), u = te / 2, h = k(() => {
|
|
658
|
+
if (n.value <= te)
|
|
653
659
|
return {
|
|
654
660
|
min: 1,
|
|
655
|
-
max:
|
|
661
|
+
max: n.value
|
|
656
662
|
};
|
|
657
|
-
let r =
|
|
658
|
-
r <= 1 ? r = 1 : r +
|
|
659
|
-
let
|
|
663
|
+
let r = t.currentPage - u;
|
|
664
|
+
r <= 1 ? r = 1 : r + te > n.value && (r = n.value - te);
|
|
665
|
+
let w = r + te;
|
|
660
666
|
return {
|
|
661
667
|
min: r,
|
|
662
|
-
max:
|
|
668
|
+
max: w
|
|
663
669
|
};
|
|
664
|
-
}),
|
|
670
|
+
}), m = (r) => ({
|
|
665
671
|
label: "...",
|
|
666
672
|
currentPage: r,
|
|
667
673
|
page: -10,
|
|
668
674
|
disabled: !0,
|
|
669
675
|
neverActive: !0
|
|
670
|
-
}),
|
|
671
|
-
let r =
|
|
676
|
+
}), d = k(() => {
|
|
677
|
+
let r = n.value;
|
|
672
678
|
r < 1 && (r = 1);
|
|
673
|
-
const
|
|
674
|
-
return Array.from({ length: r }, (
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
label: `${
|
|
679
|
+
const w = t.currentPage, T = [], { min: N, max: E } = h.value;
|
|
680
|
+
return Array.from({ length: r }, (Q, _) => {
|
|
681
|
+
const D = _ + 1;
|
|
682
|
+
D !== 1 && D !== r && (D > E || D < N) || (D === r && r > 1 && E < r && T.push(m(w)), T.push({
|
|
683
|
+
label: `${D}`,
|
|
678
684
|
totalPages: r,
|
|
679
|
-
currentPage:
|
|
680
|
-
page:
|
|
681
|
-
}),
|
|
682
|
-
}),
|
|
683
|
-
}),
|
|
684
|
-
|
|
685
|
+
currentPage: w,
|
|
686
|
+
page: D
|
|
687
|
+
}), D === 1 && r > 1 && N > 1 && T.push(m(w)));
|
|
688
|
+
}), T;
|
|
689
|
+
}), a = (r) => {
|
|
690
|
+
s("updatePage", r);
|
|
685
691
|
};
|
|
686
|
-
return (r,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
692
|
+
return (r, w) => (l(), c("div", xt, [
|
|
693
|
+
i("div", kt, [
|
|
694
|
+
i("div", $t, [
|
|
695
|
+
P(ee, A(t, {
|
|
690
696
|
page: 1,
|
|
691
697
|
label: "<<",
|
|
692
698
|
"current-page": e.currentPage,
|
|
693
699
|
"never-active": !0,
|
|
694
700
|
disabled: e.currentPage === 1,
|
|
695
|
-
onUpdatePage:
|
|
701
|
+
onUpdatePage: a
|
|
696
702
|
}), null, 16, ["current-page", "disabled"]),
|
|
697
|
-
|
|
703
|
+
P(ee, A(t, {
|
|
698
704
|
page: e.currentPage - 1,
|
|
699
705
|
label: "<",
|
|
700
706
|
"current-page": e.currentPage,
|
|
701
707
|
"never-active": !0,
|
|
702
708
|
disabled: e.currentPage === 1,
|
|
703
|
-
onUpdatePage:
|
|
709
|
+
onUpdatePage: a
|
|
704
710
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
705
|
-
(
|
|
706
|
-
key:
|
|
711
|
+
(l(!0), c($, null, L(d.value, (T) => (l(), g(ee, A({
|
|
712
|
+
key: T.page,
|
|
707
713
|
ref_for: !0
|
|
708
|
-
},
|
|
709
|
-
|
|
714
|
+
}, T, { onUpdatePage: a }), null, 16))), 128)),
|
|
715
|
+
P(ee, A(t, {
|
|
710
716
|
page: e.currentPage + 1,
|
|
711
717
|
label: ">",
|
|
712
718
|
"current-page": e.currentPage,
|
|
713
719
|
"never-active": !0,
|
|
714
|
-
disabled:
|
|
715
|
-
onUpdatePage:
|
|
720
|
+
disabled: t.currentPage === n.value,
|
|
721
|
+
onUpdatePage: a
|
|
716
722
|
}), null, 16, ["page", "current-page", "disabled"]),
|
|
717
|
-
|
|
718
|
-
page:
|
|
723
|
+
P(ee, A(t, {
|
|
724
|
+
page: n.value,
|
|
719
725
|
label: ">>",
|
|
720
726
|
"current-page": e.currentPage,
|
|
721
727
|
"never-active": !0,
|
|
722
|
-
disabled:
|
|
723
|
-
onUpdatePage:
|
|
728
|
+
disabled: t.currentPage === n.value,
|
|
729
|
+
onUpdatePage: a
|
|
724
730
|
}), null, 16, ["page", "current-page", "disabled"])
|
|
725
731
|
])
|
|
726
732
|
]),
|
|
727
|
-
|
|
733
|
+
i("div", Ct, " page " + p(e.currentPage) + " of " + p(n.value), 1)
|
|
728
734
|
]));
|
|
729
735
|
}
|
|
730
|
-
}),
|
|
731
|
-
const
|
|
732
|
-
for (const [
|
|
733
|
-
|
|
734
|
-
return
|
|
735
|
-
},
|
|
736
|
+
}), fe = (e, o) => {
|
|
737
|
+
const t = e.__vccOpts || e;
|
|
738
|
+
for (const [s, n] of o)
|
|
739
|
+
t[s] = n;
|
|
740
|
+
return t;
|
|
741
|
+
}, _t = () => ({
|
|
736
742
|
data: {
|
|
737
743
|
type: Object,
|
|
738
744
|
required: !0
|
|
@@ -745,10 +751,10 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
745
751
|
type: Object,
|
|
746
752
|
required: !1
|
|
747
753
|
}
|
|
748
|
-
}),
|
|
754
|
+
}), Lt = v({
|
|
749
755
|
name: "TextCell",
|
|
750
756
|
props: {
|
|
751
|
-
...
|
|
757
|
+
..._t()
|
|
752
758
|
},
|
|
753
759
|
computed: {
|
|
754
760
|
value() {
|
|
@@ -756,11 +762,11 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__
|
|
|
756
762
|
return e ? this.column.options?.format === "keyValue" ? e[this.column.options.key] : e : null;
|
|
757
763
|
}
|
|
758
764
|
}
|
|
759
|
-
}),
|
|
760
|
-
function
|
|
761
|
-
return
|
|
765
|
+
}), Mt = Lt;
|
|
766
|
+
function Pt(e, o, t, s, n, u) {
|
|
767
|
+
return p(e.value);
|
|
762
768
|
}
|
|
763
|
-
const
|
|
769
|
+
const Jo = /* @__PURE__ */ fe(Mt, [["render", Pt]]), Vt = { class: "flex-grow pr-2" }, At = { class: "h-4 w-4" }, Dt = /* @__PURE__ */ v({
|
|
764
770
|
__name: "sort.header",
|
|
765
771
|
props: {
|
|
766
772
|
column: {},
|
|
@@ -768,26 +774,26 @@ const Kn = /* @__PURE__ */ de(kt, [["render", $t]]), Ct = { class: "flex-grow pr
|
|
|
768
774
|
sortDirection: {}
|
|
769
775
|
},
|
|
770
776
|
emits: ["sort"],
|
|
771
|
-
setup(e, { emit:
|
|
772
|
-
const
|
|
773
|
-
() =>
|
|
774
|
-
),
|
|
775
|
-
h("sort",
|
|
776
|
-
}, h =
|
|
777
|
-
return (
|
|
777
|
+
setup(e, { emit: o }) {
|
|
778
|
+
const t = e, s = k(
|
|
779
|
+
() => t.sortDirection === "asc" ? z.BarsArrowUp : z.BarsArrowDown
|
|
780
|
+
), n = k(() => t.column.options?.sortId ?? t.column.id), u = () => {
|
|
781
|
+
h("sort", n.value);
|
|
782
|
+
}, h = o;
|
|
783
|
+
return (m, d) => (l(), c("button", {
|
|
778
784
|
class: "flex items-center",
|
|
779
|
-
onClick:
|
|
785
|
+
onClick: u
|
|
780
786
|
}, [
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
e.sortColumn ===
|
|
787
|
+
i("span", Vt, p(e.column.label), 1),
|
|
788
|
+
i("div", At, [
|
|
789
|
+
e.sortColumn === n.value ? (l(), g(b(j), {
|
|
784
790
|
key: 0,
|
|
785
|
-
icon:
|
|
786
|
-
}, null, 8, ["icon"])) :
|
|
791
|
+
icon: s.value
|
|
792
|
+
}, null, 8, ["icon"])) : x("", !0)
|
|
787
793
|
])
|
|
788
794
|
]));
|
|
789
795
|
}
|
|
790
|
-
}),
|
|
796
|
+
}), Tt = { class: "table w-full" }, zt = { key: 0 }, Ft = ["colspan"], St = { class: "flex gap-2" }, Qo = /* @__PURE__ */ v({
|
|
791
797
|
__name: "table.component",
|
|
792
798
|
props: {
|
|
793
799
|
loading: { type: Boolean },
|
|
@@ -798,136 +804,136 @@ const Kn = /* @__PURE__ */ de(kt, [["render", $t]]), Ct = { class: "flex-grow pr
|
|
|
798
804
|
sort: {}
|
|
799
805
|
},
|
|
800
806
|
emits: ["delete", "edit", "updatePage", "sort"],
|
|
801
|
-
setup(e, { emit:
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
},
|
|
805
|
-
|
|
806
|
-
},
|
|
807
|
-
|
|
808
|
-
}, h = (
|
|
809
|
-
|
|
807
|
+
setup(e, { emit: o }) {
|
|
808
|
+
const t = o, s = (m) => {
|
|
809
|
+
t("edit", m);
|
|
810
|
+
}, n = (m) => {
|
|
811
|
+
t("delete", m);
|
|
812
|
+
}, u = (m) => {
|
|
813
|
+
t("updatePage", m);
|
|
814
|
+
}, h = (m) => {
|
|
815
|
+
t("sort", m);
|
|
810
816
|
};
|
|
811
|
-
return (
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
(
|
|
816
|
-
key:
|
|
817
|
+
return (m, d) => (l(), c($, null, [
|
|
818
|
+
i("table", Tt, [
|
|
819
|
+
i("thead", null, [
|
|
820
|
+
i("tr", null, [
|
|
821
|
+
(l(!0), c($, null, L(e.displayColumns, (a) => (l(), c("th", {
|
|
822
|
+
key: a.scope
|
|
817
823
|
}, [
|
|
818
|
-
|
|
824
|
+
P(Dt, A({ column: a }, { ref_for: !0 }, e.sort, { onSort: h }), null, 16, ["column"])
|
|
819
825
|
]))), 128)),
|
|
820
|
-
|
|
826
|
+
d[0] || (d[0] = i("th", null, null, -1))
|
|
821
827
|
])
|
|
822
828
|
]),
|
|
823
|
-
|
|
824
|
-
e.loading ? (
|
|
825
|
-
|
|
829
|
+
i("tbody", null, [
|
|
830
|
+
e.loading ? (l(), c("tr", zt, [
|
|
831
|
+
i("td", {
|
|
826
832
|
colspan: e.displayColumns.length + 1,
|
|
827
833
|
class: "text-center"
|
|
828
|
-
}, [...
|
|
829
|
-
|
|
830
|
-
])], 8,
|
|
831
|
-
])) :
|
|
832
|
-
(
|
|
833
|
-
key:
|
|
834
|
+
}, [...d[1] || (d[1] = [
|
|
835
|
+
i("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
836
|
+
])], 8, Ft)
|
|
837
|
+
])) : x("", !0),
|
|
838
|
+
(l(!0), c($, null, L(e.data, (a) => (l(), c("tr", {
|
|
839
|
+
key: a.id
|
|
834
840
|
}, [
|
|
835
|
-
(
|
|
841
|
+
(l(!0), c($, null, L(e.displayColumns, (r) => (l(), c("td", {
|
|
836
842
|
key: r.scope
|
|
837
843
|
}, [
|
|
838
|
-
(
|
|
839
|
-
data:
|
|
844
|
+
(l(), g(ce(r.component), A({ ref_for: !0 }, r, {
|
|
845
|
+
data: a,
|
|
840
846
|
column: r
|
|
841
847
|
}), null, 16, ["data", "column"]))
|
|
842
848
|
]))), 128)),
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
(
|
|
849
|
+
i("td", null, [
|
|
850
|
+
i("span", St, [
|
|
851
|
+
(l(!0), c($, null, L(e.actions, (r) => (l(), g(Y, {
|
|
846
852
|
key: r.label,
|
|
847
853
|
icon: r.icon,
|
|
848
854
|
outline: !0,
|
|
849
|
-
onClick: (
|
|
855
|
+
onClick: (w) => r.action(a)
|
|
850
856
|
}, {
|
|
851
|
-
default:
|
|
852
|
-
|
|
857
|
+
default: B(() => [
|
|
858
|
+
F(p(r.label), 1)
|
|
853
859
|
]),
|
|
854
860
|
_: 2
|
|
855
861
|
}, 1032, ["icon", "onClick"]))), 128)),
|
|
856
|
-
|
|
862
|
+
P(Y, {
|
|
857
863
|
icon: b(z).Edit,
|
|
858
864
|
outline: !0,
|
|
859
|
-
onClick: (r) =>
|
|
865
|
+
onClick: (r) => s(a)
|
|
860
866
|
}, null, 8, ["icon", "onClick"]),
|
|
861
|
-
|
|
867
|
+
P(Y, {
|
|
862
868
|
icon: b(z).Delete,
|
|
863
869
|
outline: !0,
|
|
864
|
-
onClick: (r) =>
|
|
870
|
+
onClick: (r) => n(a)
|
|
865
871
|
}, null, 8, ["icon", "onClick"])
|
|
866
872
|
])
|
|
867
873
|
])
|
|
868
874
|
]))), 128))
|
|
869
875
|
])
|
|
870
876
|
]),
|
|
871
|
-
e.page ? (
|
|
877
|
+
e.page ? (l(), g(Bt, {
|
|
872
878
|
key: 0,
|
|
873
879
|
class: "border-gray-300 border-t pt-4 border-x-0 border-b-0",
|
|
874
880
|
"total-items": e.page.count,
|
|
875
881
|
"items-per-page": e.page.pageSize,
|
|
876
882
|
"current-page": e.page.page,
|
|
877
|
-
onUpdatePage:
|
|
878
|
-
}, null, 8, ["total-items", "items-per-page", "current-page"])) :
|
|
883
|
+
onUpdatePage: u
|
|
884
|
+
}, null, 8, ["total-items", "items-per-page", "current-page"])) : x("", !0)
|
|
879
885
|
], 64));
|
|
880
886
|
}
|
|
881
|
-
}),
|
|
887
|
+
}), Nt = {}, Rt = { class: "card bg-base-100 shadow-sm" }, It = { class: "card-body" }, Ut = {
|
|
882
888
|
key: 0,
|
|
883
889
|
class: "card-title"
|
|
884
|
-
},
|
|
890
|
+
}, Kt = {
|
|
885
891
|
key: 1,
|
|
886
892
|
class: "card-actions justify-end"
|
|
887
893
|
};
|
|
888
|
-
function
|
|
889
|
-
return
|
|
890
|
-
|
|
891
|
-
e.$slots.title ? (
|
|
892
|
-
|
|
893
|
-
])) :
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
894
|
+
function qt(e, o) {
|
|
895
|
+
return l(), c("div", Rt, [
|
|
896
|
+
i("div", It, [
|
|
897
|
+
e.$slots.title ? (l(), c("h2", Ut, [
|
|
898
|
+
M(e.$slots, "title")
|
|
899
|
+
])) : x("", !0),
|
|
900
|
+
i("p", null, [
|
|
901
|
+
M(e.$slots, "default"),
|
|
902
|
+
M(e.$slots, "content")
|
|
897
903
|
]),
|
|
898
|
-
e.$slots.actions ? (
|
|
899
|
-
|
|
900
|
-
])) :
|
|
904
|
+
e.$slots.actions ? (l(), c("div", Kt, [
|
|
905
|
+
M(e.$slots, "actions")
|
|
906
|
+
])) : x("", !0)
|
|
901
907
|
])
|
|
902
908
|
]);
|
|
903
909
|
}
|
|
904
|
-
const
|
|
910
|
+
const Xo = /* @__PURE__ */ fe(Nt, [["render", qt]]), Yo = (e, o) => {
|
|
905
911
|
if (!e) return null;
|
|
906
|
-
const
|
|
907
|
-
e.contains(
|
|
912
|
+
const t = (s) => {
|
|
913
|
+
e.contains(s.target) || o();
|
|
908
914
|
};
|
|
909
|
-
return document.addEventListener("click",
|
|
910
|
-
},
|
|
915
|
+
return document.addEventListener("click", t), t;
|
|
916
|
+
}, el = (e) => {
|
|
911
917
|
document.removeEventListener("click", e);
|
|
912
|
-
},
|
|
913
|
-
beforeMount(e,
|
|
914
|
-
e.clickOutsideEvent = function(
|
|
915
|
-
e ===
|
|
918
|
+
}, tl = {
|
|
919
|
+
beforeMount(e, o) {
|
|
920
|
+
e.clickOutsideEvent = function(t) {
|
|
921
|
+
e === t.target || e.contains(t.target) || o.value(t);
|
|
916
922
|
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
917
923
|
},
|
|
918
924
|
unmounted(e) {
|
|
919
925
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
920
926
|
}
|
|
921
927
|
};
|
|
922
|
-
function
|
|
923
|
-
const
|
|
924
|
-
if (!
|
|
928
|
+
function ol(e) {
|
|
929
|
+
const o = Ce();
|
|
930
|
+
if (!o)
|
|
925
931
|
return !1;
|
|
926
|
-
const
|
|
927
|
-
return
|
|
928
|
-
|
|
932
|
+
const t = o.vnode.props;
|
|
933
|
+
return t ? !!(t[ve(e)] || // also try camelCase event handler (#2249)
|
|
934
|
+
t[ve(Be(e))]) : !1;
|
|
929
935
|
}
|
|
930
|
-
const
|
|
936
|
+
const jt = {
|
|
931
937
|
group: {
|
|
932
938
|
root: "group",
|
|
933
939
|
label: "text-primary text-lg font-bold",
|
|
@@ -951,6 +957,8 @@ const Rt = {
|
|
|
951
957
|
label: "fieldset-legend",
|
|
952
958
|
error: "",
|
|
953
959
|
input: "input",
|
|
960
|
+
textarea: "input h-32",
|
|
961
|
+
checkbox: "checkbox",
|
|
954
962
|
select: "select",
|
|
955
963
|
description: "form-control--description label text-xs text-gray-500"
|
|
956
964
|
},
|
|
@@ -958,24 +966,26 @@ const Rt = {
|
|
|
958
966
|
root: "flex flex-row gap-x-2",
|
|
959
967
|
item: "w-full"
|
|
960
968
|
}
|
|
961
|
-
},
|
|
962
|
-
id:
|
|
969
|
+
}, q = () => ({
|
|
970
|
+
id: se(),
|
|
963
971
|
visible: !0,
|
|
964
972
|
required: !1,
|
|
965
973
|
enabled: !0,
|
|
966
974
|
isFocused: !1,
|
|
967
975
|
isTouched: !1,
|
|
968
976
|
hideLabel: !1,
|
|
969
|
-
styles:
|
|
970
|
-
|
|
971
|
-
|
|
977
|
+
styles: jt,
|
|
978
|
+
width: "w-24"
|
|
979
|
+
}), Ht = () => ({
|
|
980
|
+
...q(),
|
|
972
981
|
options: [],
|
|
973
982
|
valueKey: "value",
|
|
974
983
|
labelKey: "label"
|
|
975
|
-
}),
|
|
984
|
+
}), ke = ({ isTouched: e, errors: o }) => !!(e && o), Ot = (e, o, t, s) => o === void 0 || o !== void 0 && !e || !s && !t, J = (e, o) => [e, { "input-error": ke(o) }], Et = { key: 0 }, O = /* @__PURE__ */ v({
|
|
976
985
|
__name: "ControlWrapper",
|
|
977
|
-
props: /* @__PURE__ */
|
|
986
|
+
props: /* @__PURE__ */ K({
|
|
978
987
|
id: {},
|
|
988
|
+
placeholder: {},
|
|
979
989
|
description: {},
|
|
980
990
|
errors: {},
|
|
981
991
|
label: {},
|
|
@@ -985,39 +995,37 @@ const Rt = {
|
|
|
985
995
|
isFocused: { type: Boolean },
|
|
986
996
|
isTouched: { type: Boolean },
|
|
987
997
|
hideLabel: { type: Boolean },
|
|
988
|
-
styles: {}
|
|
989
|
-
|
|
998
|
+
styles: {},
|
|
999
|
+
width: {}
|
|
1000
|
+
}, q()),
|
|
990
1001
|
setup(e) {
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1002
|
+
const o = e, t = k(() => !Ot(
|
|
1003
|
+
o.visible,
|
|
1004
|
+
o.description,
|
|
1005
|
+
o.isFocused,
|
|
995
1006
|
!0
|
|
996
|
-
)),
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
t.errors
|
|
1000
|
-
));
|
|
1001
|
-
return (c, h) => (o(), i("fieldset", {
|
|
1002
|
-
class: w(e.styles.control.wrapper)
|
|
1007
|
+
)), s = k(() => o.required), n = k(() => ke(o));
|
|
1008
|
+
return (u, h) => (l(), c("fieldset", {
|
|
1009
|
+
class: y(["fieldset", e.styles.control.wrapper, e.width])
|
|
1003
1010
|
}, [
|
|
1004
|
-
e.hideLabel ?
|
|
1011
|
+
e.hideLabel ? x("", !0) : (l(), c("legend", {
|
|
1005
1012
|
key: 0,
|
|
1006
|
-
class:
|
|
1013
|
+
class: y(e.styles.control.label)
|
|
1007
1014
|
}, [
|
|
1008
|
-
|
|
1009
|
-
|
|
1015
|
+
F(p(e.label) + " ", 1),
|
|
1016
|
+
s.value ? (l(), c("span", Et, "*")) : x("", !0)
|
|
1010
1017
|
], 2)),
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
class:
|
|
1014
|
-
},
|
|
1018
|
+
M(u.$slots, "default"),
|
|
1019
|
+
i("p", {
|
|
1020
|
+
class: y(["fieldset-label h-4", { "text-error": n.value }])
|
|
1021
|
+
}, p(n.value ? e.errors : t.value ? e.description : null), 3)
|
|
1015
1022
|
], 2));
|
|
1016
1023
|
}
|
|
1017
|
-
}),
|
|
1024
|
+
}), Wt = ["disabled"], Zt = ["value"], ll = /* @__PURE__ */ v({
|
|
1018
1025
|
__name: "SelectComponent",
|
|
1019
|
-
props: /* @__PURE__ */
|
|
1026
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1020
1027
|
id: {},
|
|
1028
|
+
placeholder: {},
|
|
1021
1029
|
description: {},
|
|
1022
1030
|
errors: {},
|
|
1023
1031
|
label: {},
|
|
@@ -1028,11 +1036,12 @@ const Rt = {
|
|
|
1028
1036
|
isTouched: { type: Boolean },
|
|
1029
1037
|
hideLabel: { type: Boolean },
|
|
1030
1038
|
styles: {},
|
|
1039
|
+
width: {},
|
|
1031
1040
|
options: {},
|
|
1032
1041
|
valueKey: {},
|
|
1033
1042
|
labelKey: {}
|
|
1034
1043
|
}, {
|
|
1035
|
-
...
|
|
1044
|
+
...q(),
|
|
1036
1045
|
options: [],
|
|
1037
1046
|
valueKey: "value",
|
|
1038
1047
|
labelKey: "label"
|
|
@@ -1040,46 +1049,49 @@ const Rt = {
|
|
|
1040
1049
|
modelValue: {},
|
|
1041
1050
|
modelModifiers: {}
|
|
1042
1051
|
}),
|
|
1043
|
-
emits: /* @__PURE__ */
|
|
1044
|
-
setup(e, { emit:
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
}, h = (
|
|
1048
|
-
|
|
1049
|
-
},
|
|
1050
|
-
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1052
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1053
|
+
setup(e, { emit: o }) {
|
|
1054
|
+
const t = e, s = o, n = H(e, "modelValue"), u = (a) => {
|
|
1055
|
+
s("change", a);
|
|
1056
|
+
}, h = (a) => {
|
|
1057
|
+
s("focus", a);
|
|
1058
|
+
}, m = (a) => {
|
|
1059
|
+
s("blur", a);
|
|
1060
|
+
}, d = k(
|
|
1061
|
+
() => J(t.styles.control.select, t)
|
|
1062
|
+
);
|
|
1063
|
+
return (a, r) => (l(), g(O, Z(G(t)), {
|
|
1064
|
+
default: B(() => [
|
|
1065
|
+
U(i("select", {
|
|
1066
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => n.value = w),
|
|
1056
1067
|
disabled: !e.enabled,
|
|
1057
|
-
class:
|
|
1058
|
-
onChange:
|
|
1068
|
+
class: y(d.value),
|
|
1069
|
+
onChange: u,
|
|
1059
1070
|
onFocus: h,
|
|
1060
|
-
onBlur:
|
|
1071
|
+
onBlur: m
|
|
1061
1072
|
}, [
|
|
1062
|
-
(
|
|
1063
|
-
key:
|
|
1064
|
-
value:
|
|
1065
|
-
},
|
|
1066
|
-
], 42,
|
|
1067
|
-
[
|
|
1073
|
+
(l(!0), c($, null, L(e.options, (w) => (l(), c("option", {
|
|
1074
|
+
key: w[e.valueKey],
|
|
1075
|
+
value: w
|
|
1076
|
+
}, p(w[e.labelKey]), 9, Zt))), 128))
|
|
1077
|
+
], 42, Wt), [
|
|
1078
|
+
[_e, n.value]
|
|
1068
1079
|
])
|
|
1069
1080
|
]),
|
|
1070
1081
|
_: 1
|
|
1071
1082
|
}, 16));
|
|
1072
1083
|
}
|
|
1073
|
-
}),
|
|
1084
|
+
}), Gt = ["disabled"], Jt = {
|
|
1074
1085
|
key: 0,
|
|
1075
|
-
class: /* @__PURE__ */
|
|
1086
|
+
class: /* @__PURE__ */ y([
|
|
1076
1087
|
`bg-base-100 w-52 shadow -mt-5
|
|
1077
1088
|
absolute z-50`
|
|
1078
1089
|
])
|
|
1079
|
-
},
|
|
1090
|
+
}, Qt = ["onClick", "onBlur"], nl = /* @__PURE__ */ v({
|
|
1080
1091
|
__name: "AutoComplete",
|
|
1081
|
-
props: /* @__PURE__ */
|
|
1092
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1082
1093
|
id: {},
|
|
1094
|
+
placeholder: {},
|
|
1083
1095
|
description: {},
|
|
1084
1096
|
errors: {},
|
|
1085
1097
|
label: {},
|
|
@@ -1090,95 +1102,106 @@ const Rt = {
|
|
|
1090
1102
|
isTouched: { type: Boolean },
|
|
1091
1103
|
hideLabel: { type: Boolean },
|
|
1092
1104
|
styles: {},
|
|
1105
|
+
width: {},
|
|
1093
1106
|
config: {},
|
|
1094
1107
|
options: {},
|
|
1095
1108
|
valueKey: {},
|
|
1096
1109
|
labelKey: {}
|
|
1097
|
-
},
|
|
1110
|
+
}, Ht()), {
|
|
1098
1111
|
modelValue: {},
|
|
1099
1112
|
modelModifiers: {}
|
|
1100
1113
|
}),
|
|
1101
|
-
emits: /* @__PURE__ */
|
|
1102
|
-
setup(e, { emit:
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1105
|
-
},
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1108
|
-
|
|
1109
|
-
},
|
|
1110
|
-
|
|
1111
|
-
},
|
|
1112
|
-
|
|
1113
|
-
}, N = (
|
|
1114
|
-
r.value?.length ===
|
|
1115
|
-
},
|
|
1116
|
-
|
|
1117
|
-
() =>
|
|
1118
|
-
(
|
|
1119
|
-
|
|
1114
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1115
|
+
setup(e, { emit: o }) {
|
|
1116
|
+
const t = e, s = o, n = H(e, "modelValue"), u = S(""), h = (f) => {
|
|
1117
|
+
s("change", f);
|
|
1118
|
+
}, m = (f) => {
|
|
1119
|
+
s("focus", f);
|
|
1120
|
+
}, d = (f) => {
|
|
1121
|
+
s("blur", f);
|
|
1122
|
+
}, a = S(!1), r = S([]), w = (f) => {
|
|
1123
|
+
a.value = !0, T(f);
|
|
1124
|
+
}, T = (f) => {
|
|
1125
|
+
n.value = f, h(f);
|
|
1126
|
+
}, N = (f) => {
|
|
1127
|
+
r.value?.length === f + 1 && (r.value = []);
|
|
1128
|
+
}, E = (f) => f[t.valueKey], Q = (f) => f?.[t.labelKey] ?? "";
|
|
1129
|
+
ne(
|
|
1130
|
+
() => n.value,
|
|
1131
|
+
(f) => {
|
|
1132
|
+
f && !E(f) || (a.value = !0, r.value = [], u.value = Q(f));
|
|
1120
1133
|
},
|
|
1121
1134
|
{ immediate: !0 }
|
|
1122
|
-
),
|
|
1123
|
-
() =>
|
|
1124
|
-
(
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1135
|
+
), ne(
|
|
1136
|
+
() => u.value,
|
|
1137
|
+
(f) => {
|
|
1138
|
+
if (a.value) {
|
|
1139
|
+
a.value = !1;
|
|
1127
1140
|
return;
|
|
1128
1141
|
}
|
|
1129
|
-
|
|
1130
|
-
const { uri: _, skipAuth: H, dataField: K } = n.config;
|
|
1131
|
-
U.get(`${_}${m}`, { skipAuth: H }).then((se) => {
|
|
1132
|
-
r.value = se.data[K];
|
|
1133
|
-
});
|
|
1134
|
-
} else n.options && (r.value = n.options.filter((_) => R(_).toLowerCase().includes(m)).slice(0, 10));
|
|
1142
|
+
_(f);
|
|
1135
1143
|
}
|
|
1136
|
-
)
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1144
|
+
);
|
|
1145
|
+
const _ = (f) => {
|
|
1146
|
+
if (T({ [t.labelKey]: f }), t.config) {
|
|
1147
|
+
const { uri: I, skipAuth: oe, dataField: W } = t.config;
|
|
1148
|
+
(t.config.skipAuth ? Ae : De()).get(`${I}${f}`).then((ae) => {
|
|
1149
|
+
r.value = ae.data[W];
|
|
1150
|
+
});
|
|
1151
|
+
} else t.options && (r.value = t.options.filter((I) => Q(I).toLowerCase().includes(f)).slice(0, 10));
|
|
1152
|
+
}, D = () => {
|
|
1153
|
+
r.value?.length || _(u.value);
|
|
1154
|
+
}, R = k(
|
|
1155
|
+
() => J(t.styles.control.select, t)
|
|
1156
|
+
);
|
|
1157
|
+
return (f, I) => {
|
|
1158
|
+
const oe = ye("click-outside");
|
|
1159
|
+
return l(), g(O, Z(G(t)), {
|
|
1160
|
+
default: B(() => [
|
|
1161
|
+
U(i("input", {
|
|
1162
|
+
"onUpdate:modelValue": I[0] || (I[0] = (W) => u.value = W),
|
|
1142
1163
|
autocomplete: "off",
|
|
1143
1164
|
type: "text",
|
|
1144
|
-
class:
|
|
1165
|
+
class: y([R.value]),
|
|
1145
1166
|
disabled: !e.enabled,
|
|
1146
|
-
onFocus:
|
|
1147
|
-
onBlur:
|
|
1148
|
-
|
|
1149
|
-
|
|
1167
|
+
onFocus: m,
|
|
1168
|
+
onBlur: d,
|
|
1169
|
+
onClick: D
|
|
1170
|
+
}, null, 42, Gt), [
|
|
1171
|
+
[ue, u.value]
|
|
1150
1172
|
]),
|
|
1151
|
-
|
|
1152
|
-
r.value?.length ? (
|
|
1153
|
-
(
|
|
1154
|
-
key:
|
|
1173
|
+
U((l(), c("div", null, [
|
|
1174
|
+
r.value?.length ? (l(), c("ul", Jt, [
|
|
1175
|
+
(l(!0), c($, null, L(r.value, (W, pe) => (l(), c("li", {
|
|
1176
|
+
key: W[e.valueKey]
|
|
1155
1177
|
}, [
|
|
1156
|
-
|
|
1178
|
+
i("button", {
|
|
1157
1179
|
class: "w-full h-8 border-b-1 border-gray-200 border-x-0 border-t-0 px-4 py-2 text-left hover:bg-primary-content cursor-pointer",
|
|
1158
1180
|
type: "button",
|
|
1159
|
-
onClick: (
|
|
1160
|
-
onBlur: (
|
|
1161
|
-
},
|
|
1181
|
+
onClick: (ae) => w(W),
|
|
1182
|
+
onBlur: (ae) => N(pe)
|
|
1183
|
+
}, p(Q(W)), 41, Qt)
|
|
1162
1184
|
]))), 128))
|
|
1163
|
-
])) :
|
|
1185
|
+
])) : x("", !0)
|
|
1164
1186
|
])), [
|
|
1165
|
-
[
|
|
1187
|
+
[oe, () => r.value = []]
|
|
1166
1188
|
])
|
|
1167
1189
|
]),
|
|
1168
1190
|
_: 1
|
|
1169
1191
|
}, 16);
|
|
1170
1192
|
};
|
|
1171
1193
|
}
|
|
1172
|
-
}),
|
|
1194
|
+
}), Xt = {
|
|
1173
1195
|
key: 0,
|
|
1174
|
-
class: /* @__PURE__ */
|
|
1196
|
+
class: /* @__PURE__ */ y([
|
|
1175
1197
|
`bg-base-100 w-52 shadow -mt-5
|
|
1176
1198
|
absolute z-50 p-0`
|
|
1177
1199
|
])
|
|
1178
|
-
},
|
|
1200
|
+
}, Yt = ["onClick"], eo = { class: "w-4 mr-2" }, sl = /* @__PURE__ */ v({
|
|
1179
1201
|
__name: "MultiSelect",
|
|
1180
|
-
props: /* @__PURE__ */
|
|
1202
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1181
1203
|
id: {},
|
|
1204
|
+
placeholder: {},
|
|
1182
1205
|
description: {},
|
|
1183
1206
|
errors: {},
|
|
1184
1207
|
label: {},
|
|
@@ -1189,77 +1212,84 @@ const Rt = {
|
|
|
1189
1212
|
isTouched: { type: Boolean },
|
|
1190
1213
|
hideLabel: { type: Boolean },
|
|
1191
1214
|
styles: {},
|
|
1215
|
+
width: {},
|
|
1192
1216
|
options: {},
|
|
1193
1217
|
valueKey: {},
|
|
1194
1218
|
labelKey: {}
|
|
1195
1219
|
}, {
|
|
1196
|
-
...
|
|
1220
|
+
...q(),
|
|
1197
1221
|
valueKey: "value",
|
|
1198
1222
|
labelKey: "label"
|
|
1199
1223
|
}), {
|
|
1200
1224
|
modelValue: {},
|
|
1201
1225
|
modelModifiers: {}
|
|
1202
1226
|
}),
|
|
1203
|
-
emits: /* @__PURE__ */
|
|
1204
|
-
setup(e, { emit:
|
|
1205
|
-
const
|
|
1206
|
-
let
|
|
1207
|
-
const h = (
|
|
1208
|
-
|
|
1209
|
-
},
|
|
1210
|
-
|
|
1211
|
-
},
|
|
1212
|
-
|
|
1227
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1228
|
+
setup(e, { emit: o }) {
|
|
1229
|
+
const t = e, s = o, n = H(e, "modelValue");
|
|
1230
|
+
let u = !1;
|
|
1231
|
+
const h = (_) => {
|
|
1232
|
+
s("change", _);
|
|
1233
|
+
}, m = S(!1), d = () => {
|
|
1234
|
+
m.value = !m.value, u = !0;
|
|
1235
|
+
}, a = () => {
|
|
1236
|
+
u || (m.value = !1), u = !1;
|
|
1213
1237
|
}, r = k(
|
|
1214
|
-
() =>
|
|
1215
|
-
),
|
|
1216
|
-
|
|
1217
|
-
let
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1220
|
-
}, N = (
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1238
|
+
() => n.value?.map((_) => N(_)) ?? []
|
|
1239
|
+
), w = (_) => r.value.includes(_), T = (_, D) => {
|
|
1240
|
+
_.preventDefault();
|
|
1241
|
+
let R = n.value ?? [];
|
|
1242
|
+
const f = N(D);
|
|
1243
|
+
w(f) ? R = R.filter((oe) => N(oe) !== f) : R.push(D), n.value = R, h(R);
|
|
1244
|
+
}, N = (_) => _[t.valueKey], E = (_) => _?.[t.labelKey] ?? "", Q = k(
|
|
1245
|
+
() => J(
|
|
1246
|
+
[t.styles.control.select, "w-full truncate block"].join(" "),
|
|
1247
|
+
t
|
|
1248
|
+
)
|
|
1249
|
+
);
|
|
1250
|
+
return (_, D) => {
|
|
1251
|
+
const R = ye("click-outside");
|
|
1252
|
+
return l(), g(O, Z(G(t)), {
|
|
1253
|
+
default: B(() => [
|
|
1254
|
+
i("button", {
|
|
1226
1255
|
type: "button",
|
|
1227
|
-
class:
|
|
1228
|
-
onClick:
|
|
1229
|
-
},
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
(
|
|
1233
|
-
key:
|
|
1256
|
+
class: y(Q.value),
|
|
1257
|
+
onClick: d
|
|
1258
|
+
}, p(n.value?.map?.((f) => E(f)).join(", ") ?? "Select value"), 3),
|
|
1259
|
+
U((l(), c("div", null, [
|
|
1260
|
+
m.value ? (l(), c("ul", Xt, [
|
|
1261
|
+
(l(!0), c($, null, L(e.options, (f) => (l(), c("li", {
|
|
1262
|
+
key: f[e.valueKey]
|
|
1234
1263
|
}, [
|
|
1235
|
-
|
|
1264
|
+
i("button", {
|
|
1236
1265
|
class: "w-full flex h-8 border-b-1 border-gray-200 border-x-0 border-t-0 p-2 text-left hover:bg-primary-content cursor-pointer",
|
|
1237
1266
|
type: "button",
|
|
1238
|
-
onClick: (
|
|
1267
|
+
onClick: (I) => T(I, f)
|
|
1239
1268
|
}, [
|
|
1240
|
-
|
|
1241
|
-
|
|
1269
|
+
i("div", eo, [
|
|
1270
|
+
w(N(f)) ? (l(), g(b(j), {
|
|
1242
1271
|
key: 0,
|
|
1243
1272
|
icon: b(z).Check,
|
|
1244
1273
|
size: "sm"
|
|
1245
|
-
}, null, 8, ["icon"])) :
|
|
1274
|
+
}, null, 8, ["icon"])) : x("", !0)
|
|
1246
1275
|
]),
|
|
1247
|
-
|
|
1248
|
-
], 8,
|
|
1276
|
+
F(" " + p(E(f)), 1)
|
|
1277
|
+
], 8, Yt)
|
|
1249
1278
|
]))), 128))
|
|
1250
|
-
])) :
|
|
1279
|
+
])) : x("", !0)
|
|
1251
1280
|
])), [
|
|
1252
|
-
[
|
|
1281
|
+
[R, () => a()]
|
|
1253
1282
|
])
|
|
1254
1283
|
]),
|
|
1255
1284
|
_: 1
|
|
1256
1285
|
}, 16);
|
|
1257
1286
|
};
|
|
1258
1287
|
}
|
|
1259
|
-
}),
|
|
1288
|
+
}), to = { class: "card bg-base-100 border border-base-300" }, oo = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, lo = ["title", "onClick"], no = ["innerHTML"], so = { class: "card-body p-3" }, ao = /* @__PURE__ */ v({
|
|
1260
1289
|
__name: "Markdown",
|
|
1261
|
-
props: /* @__PURE__ */
|
|
1290
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1262
1291
|
id: {},
|
|
1292
|
+
placeholder: {},
|
|
1263
1293
|
description: {},
|
|
1264
1294
|
errors: {},
|
|
1265
1295
|
label: {},
|
|
@@ -1270,9 +1300,10 @@ const Rt = {
|
|
|
1270
1300
|
isTouched: { type: Boolean },
|
|
1271
1301
|
hideLabel: { type: Boolean },
|
|
1272
1302
|
styles: {},
|
|
1303
|
+
width: {},
|
|
1273
1304
|
actions: {}
|
|
1274
1305
|
}, {
|
|
1275
|
-
...
|
|
1306
|
+
...q(),
|
|
1276
1307
|
actions: () => [
|
|
1277
1308
|
{
|
|
1278
1309
|
label: "<strong>B</strong>",
|
|
@@ -1289,12 +1320,12 @@ const Rt = {
|
|
|
1289
1320
|
modelValue: {},
|
|
1290
1321
|
modelModifiers: {}
|
|
1291
1322
|
}),
|
|
1292
|
-
emits: /* @__PURE__ */
|
|
1293
|
-
setup(e, { emit:
|
|
1294
|
-
const
|
|
1295
|
-
content:
|
|
1323
|
+
emits: /* @__PURE__ */ V(["change"], ["update:modelValue"]),
|
|
1324
|
+
setup(e, { emit: o }) {
|
|
1325
|
+
const t = e, s = o, n = H(e, "modelValue"), u = Se({
|
|
1326
|
+
content: n.value ?? "",
|
|
1296
1327
|
extensions: [
|
|
1297
|
-
|
|
1328
|
+
Fe.configure({
|
|
1298
1329
|
heading: !1,
|
|
1299
1330
|
blockquote: !1,
|
|
1300
1331
|
bulletList: !1,
|
|
@@ -1305,37 +1336,38 @@ const Rt = {
|
|
|
1305
1336
|
horizontalRule: !1,
|
|
1306
1337
|
hardBreak: !1
|
|
1307
1338
|
}),
|
|
1308
|
-
|
|
1339
|
+
Re.configure({
|
|
1309
1340
|
html: !1,
|
|
1310
1341
|
transformPastedText: !0
|
|
1311
1342
|
// parse markdown on paste
|
|
1312
1343
|
})
|
|
1313
1344
|
],
|
|
1314
1345
|
onUpdate({ editor: h }) {
|
|
1315
|
-
|
|
1346
|
+
s("change", h.storage.markdown.getMarkdown());
|
|
1316
1347
|
}
|
|
1317
1348
|
});
|
|
1318
|
-
return
|
|
1319
|
-
|
|
1320
|
-
}), (h,
|
|
1321
|
-
default:
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
(
|
|
1325
|
-
key:
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1349
|
+
return Le(() => {
|
|
1350
|
+
u.value?.destroy();
|
|
1351
|
+
}), (h, m) => (l(), g(O, Z(G(t)), {
|
|
1352
|
+
default: B(() => [
|
|
1353
|
+
i("div", to, [
|
|
1354
|
+
i("div", oo, [
|
|
1355
|
+
(l(!0), c($, null, L(e.actions, (d) => (l(), c("button", {
|
|
1356
|
+
key: d.name,
|
|
1357
|
+
type: "button",
|
|
1358
|
+
class: y(["btn btn-sm btn-ghost", { "btn-active": b(u)?.isActive(d.name) }]),
|
|
1359
|
+
title: d.label,
|
|
1360
|
+
onClick: (a) => d.action(b(u))
|
|
1329
1361
|
}, [
|
|
1330
|
-
|
|
1331
|
-
innerHTML:
|
|
1332
|
-
}, null, 8,
|
|
1333
|
-
], 10,
|
|
1362
|
+
i("span", {
|
|
1363
|
+
innerHTML: d.label
|
|
1364
|
+
}, null, 8, no)
|
|
1365
|
+
], 10, lo))), 128))
|
|
1334
1366
|
]),
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
editor: b(
|
|
1338
|
-
class: "prose prose-sm max-w-none min-h-
|
|
1367
|
+
i("div", so, [
|
|
1368
|
+
P(b(Ne), {
|
|
1369
|
+
editor: b(u),
|
|
1370
|
+
class: "prose prose-sm max-w-none min-h-96"
|
|
1339
1371
|
}, null, 8, ["editor"])
|
|
1340
1372
|
])
|
|
1341
1373
|
])
|
|
@@ -1343,73 +1375,295 @@ const Rt = {
|
|
|
1343
1375
|
_: 1
|
|
1344
1376
|
}, 16));
|
|
1345
1377
|
}
|
|
1346
|
-
}),
|
|
1378
|
+
}), al = /* @__PURE__ */ fe(ao, [["__scopeId", "data-v-68d3e971"]]), io = { class: "flex items-center justify-center h-full" }, ro = { class: "fieldset-label" }, co = ["disabled"], uo = { class: "font-bold text-gray-500 text-sm" }, il = /* @__PURE__ */ v({
|
|
1379
|
+
__name: "Checkbox",
|
|
1380
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1381
|
+
id: {},
|
|
1382
|
+
placeholder: {},
|
|
1383
|
+
description: {},
|
|
1384
|
+
errors: {},
|
|
1385
|
+
label: {},
|
|
1386
|
+
visible: { type: Boolean },
|
|
1387
|
+
required: { type: Boolean },
|
|
1388
|
+
enabled: { type: Boolean },
|
|
1389
|
+
isFocused: { type: Boolean },
|
|
1390
|
+
isTouched: { type: Boolean },
|
|
1391
|
+
hideLabel: { type: Boolean },
|
|
1392
|
+
styles: {},
|
|
1393
|
+
width: {}
|
|
1394
|
+
}, {
|
|
1395
|
+
...q()
|
|
1396
|
+
}), {
|
|
1397
|
+
modelValue: {},
|
|
1398
|
+
modelModifiers: {}
|
|
1399
|
+
}),
|
|
1400
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1401
|
+
setup(e, { emit: o }) {
|
|
1402
|
+
const t = e, s = o, n = H(e, "modelValue"), u = (a) => {
|
|
1403
|
+
s("change", a);
|
|
1404
|
+
}, h = (a) => {
|
|
1405
|
+
s("focus", a);
|
|
1406
|
+
}, m = (a) => {
|
|
1407
|
+
s("blur", a);
|
|
1408
|
+
}, d = k(
|
|
1409
|
+
() => J(t.styles.control.checkbox, t)
|
|
1410
|
+
);
|
|
1411
|
+
return (a, r) => (l(), c("div", io, [
|
|
1412
|
+
P(O, A(t, { "hide-label": !0 }), {
|
|
1413
|
+
default: B(() => [
|
|
1414
|
+
i("label", ro, [
|
|
1415
|
+
U(i("input", {
|
|
1416
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => n.value = w),
|
|
1417
|
+
type: "checkbox",
|
|
1418
|
+
class: y(d.value),
|
|
1419
|
+
disabled: !e.enabled,
|
|
1420
|
+
onChange: u,
|
|
1421
|
+
onFocus: h,
|
|
1422
|
+
onBlur: m
|
|
1423
|
+
}, null, 42, co), [
|
|
1424
|
+
[ge, n.value]
|
|
1425
|
+
]),
|
|
1426
|
+
i("span", uo, p(e.label), 1)
|
|
1427
|
+
])
|
|
1428
|
+
]),
|
|
1429
|
+
_: 1
|
|
1430
|
+
}, 16)
|
|
1431
|
+
]));
|
|
1432
|
+
}
|
|
1433
|
+
}), mo = ["type", "disabled", "autofocus", "placeholder"], rl = /* @__PURE__ */ v({
|
|
1434
|
+
__name: "Input",
|
|
1435
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1436
|
+
id: {},
|
|
1437
|
+
placeholder: {},
|
|
1438
|
+
description: {},
|
|
1439
|
+
errors: {},
|
|
1440
|
+
label: {},
|
|
1441
|
+
visible: { type: Boolean },
|
|
1442
|
+
required: { type: Boolean },
|
|
1443
|
+
enabled: { type: Boolean },
|
|
1444
|
+
isFocused: { type: Boolean },
|
|
1445
|
+
isTouched: { type: Boolean },
|
|
1446
|
+
hideLabel: { type: Boolean },
|
|
1447
|
+
styles: {},
|
|
1448
|
+
width: {},
|
|
1449
|
+
type: {}
|
|
1450
|
+
}, {
|
|
1451
|
+
...q(),
|
|
1452
|
+
type: "text"
|
|
1453
|
+
}), {
|
|
1454
|
+
modelValue: {},
|
|
1455
|
+
modelModifiers: {}
|
|
1456
|
+
}),
|
|
1457
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1458
|
+
setup(e, { emit: o }) {
|
|
1459
|
+
const t = e, s = o, n = H(e, "modelValue"), u = (a) => {
|
|
1460
|
+
s("change", a);
|
|
1461
|
+
}, h = (a) => {
|
|
1462
|
+
s("focus", a);
|
|
1463
|
+
}, m = (a) => {
|
|
1464
|
+
s("blur", a);
|
|
1465
|
+
}, d = k(
|
|
1466
|
+
() => J(t.styles.control.input, t)
|
|
1467
|
+
);
|
|
1468
|
+
return (a, r) => (l(), g(O, Z(G(t)), {
|
|
1469
|
+
default: B(() => [
|
|
1470
|
+
U(i("input", {
|
|
1471
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => n.value = w),
|
|
1472
|
+
autocomplete: "off",
|
|
1473
|
+
type: e.type,
|
|
1474
|
+
class: y(d.value),
|
|
1475
|
+
disabled: !e.enabled,
|
|
1476
|
+
autofocus: e.isFocused,
|
|
1477
|
+
placeholder: e.placeholder,
|
|
1478
|
+
onChange: u,
|
|
1479
|
+
onFocus: h,
|
|
1480
|
+
onBlur: m
|
|
1481
|
+
}, null, 42, mo), [
|
|
1482
|
+
[Me, n.value]
|
|
1483
|
+
])
|
|
1484
|
+
]),
|
|
1485
|
+
_: 1
|
|
1486
|
+
}, 16));
|
|
1487
|
+
}
|
|
1488
|
+
}), ho = ["disabled", "step", "autofocus", "placeholder"], cl = /* @__PURE__ */ v({
|
|
1489
|
+
__name: "InputNumber",
|
|
1490
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1491
|
+
id: {},
|
|
1492
|
+
placeholder: {},
|
|
1493
|
+
description: {},
|
|
1494
|
+
errors: {},
|
|
1495
|
+
label: {},
|
|
1496
|
+
visible: { type: Boolean },
|
|
1497
|
+
required: { type: Boolean },
|
|
1498
|
+
enabled: { type: Boolean },
|
|
1499
|
+
isFocused: { type: Boolean },
|
|
1500
|
+
isTouched: { type: Boolean },
|
|
1501
|
+
hideLabel: { type: Boolean },
|
|
1502
|
+
styles: {},
|
|
1503
|
+
width: {},
|
|
1504
|
+
steps: {}
|
|
1505
|
+
}, {
|
|
1506
|
+
...q(),
|
|
1507
|
+
steps: 1
|
|
1508
|
+
}), {
|
|
1509
|
+
modelValue: {},
|
|
1510
|
+
modelModifiers: {}
|
|
1511
|
+
}),
|
|
1512
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1513
|
+
setup(e, { emit: o }) {
|
|
1514
|
+
const t = e, s = o, n = H(e, "modelValue"), u = (a) => {
|
|
1515
|
+
s("change", a);
|
|
1516
|
+
}, h = (a) => {
|
|
1517
|
+
s("focus", a);
|
|
1518
|
+
}, m = (a) => {
|
|
1519
|
+
s("blur", a);
|
|
1520
|
+
}, d = k(
|
|
1521
|
+
() => J(t.styles.control.input, t)
|
|
1522
|
+
);
|
|
1523
|
+
return (a, r) => (l(), g(O, Z(G(t)), {
|
|
1524
|
+
default: B(() => [
|
|
1525
|
+
U(i("input", {
|
|
1526
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => n.value = w),
|
|
1527
|
+
autocomplete: "off",
|
|
1528
|
+
type: "number",
|
|
1529
|
+
class: y([d.value]),
|
|
1530
|
+
disabled: !e.enabled,
|
|
1531
|
+
step: e.steps,
|
|
1532
|
+
autofocus: e.isFocused,
|
|
1533
|
+
placeholder: e.placeholder,
|
|
1534
|
+
onChange: u,
|
|
1535
|
+
onFocus: h,
|
|
1536
|
+
onBlur: m
|
|
1537
|
+
}, null, 42, ho), [
|
|
1538
|
+
[ue, n.value]
|
|
1539
|
+
])
|
|
1540
|
+
]),
|
|
1541
|
+
_: 1
|
|
1542
|
+
}, 16));
|
|
1543
|
+
}
|
|
1544
|
+
}), bo = ["disabled", "rows", "autofocus", "placeholder"], ul = /* @__PURE__ */ v({
|
|
1545
|
+
__name: "Textarea",
|
|
1546
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1547
|
+
id: {},
|
|
1548
|
+
placeholder: {},
|
|
1549
|
+
description: {},
|
|
1550
|
+
errors: {},
|
|
1551
|
+
label: {},
|
|
1552
|
+
visible: { type: Boolean },
|
|
1553
|
+
required: { type: Boolean },
|
|
1554
|
+
enabled: { type: Boolean },
|
|
1555
|
+
isFocused: { type: Boolean },
|
|
1556
|
+
isTouched: { type: Boolean },
|
|
1557
|
+
hideLabel: { type: Boolean },
|
|
1558
|
+
styles: {},
|
|
1559
|
+
width: {},
|
|
1560
|
+
rows: {}
|
|
1561
|
+
}, {
|
|
1562
|
+
...q(),
|
|
1563
|
+
rows: 4
|
|
1564
|
+
}), {
|
|
1565
|
+
modelValue: {},
|
|
1566
|
+
modelModifiers: {}
|
|
1567
|
+
}),
|
|
1568
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1569
|
+
setup(e, { emit: o }) {
|
|
1570
|
+
const t = e, s = o, n = H(e, "modelValue"), u = (a) => {
|
|
1571
|
+
s("change", a);
|
|
1572
|
+
}, h = (a) => {
|
|
1573
|
+
s("focus", a);
|
|
1574
|
+
}, m = (a) => {
|
|
1575
|
+
s("blur", a);
|
|
1576
|
+
}, d = k(
|
|
1577
|
+
() => J(t.styles.control.textarea, t)
|
|
1578
|
+
);
|
|
1579
|
+
return (a, r) => (l(), g(O, Z(G(t)), {
|
|
1580
|
+
default: B(() => [
|
|
1581
|
+
U(i("textarea", {
|
|
1582
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => n.value = w),
|
|
1583
|
+
autocomplete: "off",
|
|
1584
|
+
type: "text",
|
|
1585
|
+
class: y(d.value),
|
|
1586
|
+
disabled: !e.enabled,
|
|
1587
|
+
rows: e.rows,
|
|
1588
|
+
autofocus: e.isFocused,
|
|
1589
|
+
placeholder: e.placeholder,
|
|
1590
|
+
onChange: u,
|
|
1591
|
+
onFocus: h,
|
|
1592
|
+
onBlur: m
|
|
1593
|
+
}, null, 42, bo), [
|
|
1594
|
+
[ue, n.value]
|
|
1595
|
+
])
|
|
1596
|
+
]),
|
|
1597
|
+
_: 1
|
|
1598
|
+
}, 16));
|
|
1599
|
+
}
|
|
1600
|
+
}), fo = { class: "grid grid-cols-[auto_1fr_auto] h-full overflow-hidden" }, po = {
|
|
1347
1601
|
id: "drawer-left",
|
|
1348
1602
|
class: "min-h-0 min-w-6 relative flex-shrink-0 bg-white shadow-lg transition-all duration-300 ease-in-out border-l border-gray-200 overflow-visible"
|
|
1349
|
-
},
|
|
1603
|
+
}, vo = { class: "flex-1 overflow-y-auto bg-white" }, go = { class: "min-h-0 min-w-6 relative flex-shrink-0 bg-white shadow-lg transition-all duration-300 ease-in-out border-l border-gray-200 overflow-visible" }, dl = /* @__PURE__ */ v({
|
|
1350
1604
|
__name: "drawer",
|
|
1351
1605
|
props: {
|
|
1352
1606
|
widthLeft: { default: 200 },
|
|
1353
1607
|
widthRight: { default: 200 }
|
|
1354
1608
|
},
|
|
1355
1609
|
setup(e) {
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1610
|
+
const o = S({ left: !0, right: !0 }), t = (s) => {
|
|
1611
|
+
o.value[s] = !o.value[s];
|
|
1358
1612
|
};
|
|
1359
|
-
return (
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
class:
|
|
1613
|
+
return (s, n) => (l(), c("main", fo, [
|
|
1614
|
+
i("aside", po, [
|
|
1615
|
+
i("div", {
|
|
1616
|
+
class: y(["absolute top-0 z-20", o.value.left ? "-right-0" : "-right-2"])
|
|
1363
1617
|
}, [
|
|
1364
|
-
|
|
1618
|
+
i("button", {
|
|
1365
1619
|
class: "btn btn-ghost btn-circle",
|
|
1366
|
-
onClick:
|
|
1620
|
+
onClick: n[0] || (n[0] = (u) => t("left"))
|
|
1367
1621
|
}, [
|
|
1368
|
-
|
|
1622
|
+
P(b(j), {
|
|
1369
1623
|
size: "sm",
|
|
1370
|
-
icon:
|
|
1624
|
+
icon: o.value.left ? b(z).DblChevronLeft : b(z).DblChevronRight
|
|
1371
1625
|
}, null, 8, ["icon"])
|
|
1372
1626
|
])
|
|
1373
1627
|
], 2),
|
|
1374
|
-
|
|
1628
|
+
o.value.left ? (l(), c("div", {
|
|
1375
1629
|
key: 0,
|
|
1376
|
-
style:
|
|
1630
|
+
style: ie({ width: e.widthLeft + "px" }),
|
|
1377
1631
|
class: "h-full overflow-y-auto p-4"
|
|
1378
1632
|
}, [
|
|
1379
|
-
|
|
1380
|
-
], 4)) :
|
|
1633
|
+
M(s.$slots, "left-drawer")
|
|
1634
|
+
], 4)) : x("", !0)
|
|
1381
1635
|
]),
|
|
1382
|
-
|
|
1383
|
-
|
|
1636
|
+
i("div", vo, [
|
|
1637
|
+
M(s.$slots, "default")
|
|
1384
1638
|
]),
|
|
1385
|
-
|
|
1386
|
-
|
|
1639
|
+
i("aside", go, [
|
|
1640
|
+
o.value.right ? (l(), c("div", {
|
|
1387
1641
|
key: 0,
|
|
1388
|
-
style:
|
|
1642
|
+
style: ie({ width: e.widthRight + "px" }),
|
|
1389
1643
|
class: "h-full overflow-y-auto p-4"
|
|
1390
1644
|
}, [
|
|
1391
|
-
|
|
1392
|
-
], 4)) :
|
|
1393
|
-
|
|
1394
|
-
class:
|
|
1645
|
+
M(s.$slots, "right-drawer")
|
|
1646
|
+
], 4)) : x("", !0),
|
|
1647
|
+
i("div", {
|
|
1648
|
+
class: y(["absolute top-0 z-20", o.value.right ? "-left-0" : "-left-2"])
|
|
1395
1649
|
}, [
|
|
1396
|
-
|
|
1650
|
+
i("button", {
|
|
1397
1651
|
class: "btn btn-ghost btn-circle",
|
|
1398
|
-
onClick:
|
|
1652
|
+
onClick: n[1] || (n[1] = (u) => t("right"))
|
|
1399
1653
|
}, [
|
|
1400
|
-
|
|
1654
|
+
P(b(j), {
|
|
1401
1655
|
size: "sm",
|
|
1402
|
-
icon:
|
|
1656
|
+
icon: o.value.right ? b(z).DblChevronRight : b(z).DblChevronLeft
|
|
1403
1657
|
}, null, 8, ["icon"])
|
|
1404
1658
|
])
|
|
1405
1659
|
], 2)
|
|
1406
1660
|
])
|
|
1407
1661
|
]));
|
|
1408
1662
|
}
|
|
1409
|
-
}),
|
|
1663
|
+
}), yo = { class: "ml-1" }, wo = { class: "truncate flex-1 min-w-0 text-left" }, xo = {
|
|
1410
1664
|
key: 0,
|
|
1411
1665
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1412
|
-
},
|
|
1666
|
+
}, ko = /* @__PURE__ */ v({
|
|
1413
1667
|
__name: "TreeItem",
|
|
1414
1668
|
props: {
|
|
1415
1669
|
active: {},
|
|
@@ -1418,141 +1672,147 @@ const Rt = {
|
|
|
1418
1672
|
isExpanded: { type: Function }
|
|
1419
1673
|
},
|
|
1420
1674
|
emits: ["toggle", "select"],
|
|
1421
|
-
setup(e, { emit:
|
|
1422
|
-
const
|
|
1423
|
-
return (
|
|
1424
|
-
const
|
|
1425
|
-
return
|
|
1426
|
-
|
|
1427
|
-
class:
|
|
1675
|
+
setup(e, { emit: o }) {
|
|
1676
|
+
const t = e, s = o, n = k(() => t.active === t.node.id);
|
|
1677
|
+
return (u, h) => {
|
|
1678
|
+
const m = re("TreeItem", !0);
|
|
1679
|
+
return l(), c("li", yo, [
|
|
1680
|
+
i("div", {
|
|
1681
|
+
class: y([
|
|
1428
1682
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1429
1683
|
hover:bg-gray-100`,
|
|
1430
|
-
|
|
1684
|
+
n.value ? "text-primary" : ""
|
|
1431
1685
|
])
|
|
1432
1686
|
}, [
|
|
1433
|
-
e.node
|
|
1687
|
+
(e.node?.children?.length ?? 0) > 0 ? (l(), c("span", {
|
|
1434
1688
|
key: 0,
|
|
1435
1689
|
class: "flex items-center justify-center",
|
|
1436
|
-
onClick: h[0] || (h[0] = (
|
|
1690
|
+
onClick: h[0] || (h[0] = (d) => s("toggle", e.node))
|
|
1437
1691
|
}, [
|
|
1438
|
-
e.node.children && e.isExpanded(e.node.id) ? (
|
|
1692
|
+
e.node.children && e.isExpanded(e.node.id) ? (l(), g(b(Te), {
|
|
1439
1693
|
key: 0,
|
|
1440
1694
|
class: "w-3 h-3"
|
|
1441
|
-
})) : (
|
|
1695
|
+
})) : (l(), g(b(ze), {
|
|
1442
1696
|
key: 1,
|
|
1443
1697
|
class: "w-3 h-3"
|
|
1444
1698
|
}))
|
|
1445
|
-
])) :
|
|
1446
|
-
|
|
1699
|
+
])) : x("", !0),
|
|
1700
|
+
i("div", {
|
|
1447
1701
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1448
|
-
onClick: h[1] || (h[1] = (
|
|
1702
|
+
onClick: h[1] || (h[1] = (d) => s("select", e.node))
|
|
1449
1703
|
}, [
|
|
1450
|
-
|
|
1451
|
-
e.node.tag ? (
|
|
1704
|
+
i("div", wo, p(e.node.label), 1),
|
|
1705
|
+
e.node.tag ? (l(), c("div", xo, p(e.node.tag), 1)) : x("", !0)
|
|
1452
1706
|
])
|
|
1453
1707
|
], 2),
|
|
1454
|
-
e.node.children && e.isExpanded(e.node.id) ? (
|
|
1708
|
+
e.node.children && e.isExpanded(e.node.id) ? (l(), c("ul", {
|
|
1455
1709
|
key: 0,
|
|
1456
|
-
class:
|
|
1710
|
+
class: y([
|
|
1457
1711
|
"ml-4 border-l pl-2",
|
|
1458
|
-
{ "border-gray-200": !
|
|
1712
|
+
{ "border-gray-200": !n.value, "border-primary": n.value }
|
|
1459
1713
|
])
|
|
1460
1714
|
}, [
|
|
1461
|
-
(
|
|
1462
|
-
key:
|
|
1463
|
-
node:
|
|
1715
|
+
(l(!0), c($, null, L(e.node.children, (d) => (l(), g(m, {
|
|
1716
|
+
key: d.id,
|
|
1717
|
+
node: d,
|
|
1464
1718
|
expanded: e.expanded,
|
|
1465
1719
|
active: e.active,
|
|
1466
1720
|
"is-expanded": e.isExpanded,
|
|
1467
|
-
onToggle: h[2] || (h[2] = (
|
|
1468
|
-
onSelect: h[3] || (h[3] = (
|
|
1721
|
+
onToggle: h[2] || (h[2] = (a) => s("toggle", a)),
|
|
1722
|
+
onSelect: h[3] || (h[3] = (a) => s("select", a))
|
|
1469
1723
|
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1470
|
-
], 2)) :
|
|
1724
|
+
], 2)) : x("", !0)
|
|
1471
1725
|
]);
|
|
1472
1726
|
};
|
|
1473
1727
|
}
|
|
1474
|
-
}),
|
|
1728
|
+
}), $o = { class: "select-none text-sm" }, ml = /* @__PURE__ */ v({
|
|
1475
1729
|
__name: "TreeView",
|
|
1476
1730
|
props: {
|
|
1477
1731
|
data: {},
|
|
1478
1732
|
active: {}
|
|
1479
1733
|
},
|
|
1480
1734
|
emits: ["select"],
|
|
1481
|
-
setup(e, { emit:
|
|
1482
|
-
const
|
|
1483
|
-
const
|
|
1484
|
-
if (!
|
|
1485
|
-
|
|
1735
|
+
setup(e, { emit: o }) {
|
|
1736
|
+
const t = e, s = o, n = S(/* @__PURE__ */ new Set()), u = (d) => {
|
|
1737
|
+
const a = d.id;
|
|
1738
|
+
if (!d.children || d.children.length === 0) {
|
|
1739
|
+
s("select", d);
|
|
1486
1740
|
return;
|
|
1487
1741
|
}
|
|
1488
|
-
|
|
1489
|
-
}, h = (
|
|
1490
|
-
|
|
1491
|
-
},
|
|
1492
|
-
return (
|
|
1493
|
-
(
|
|
1742
|
+
n.value.has(a) ? n.value.delete(a) : n.value.add(a);
|
|
1743
|
+
}, h = (d) => {
|
|
1744
|
+
s("select", d), n.value.add(d.id);
|
|
1745
|
+
}, m = (d) => n.value.has(d);
|
|
1746
|
+
return (d, a) => (l(), c("ul", $o, [
|
|
1747
|
+
(l(!0), c($, null, L(t.data, (r) => (l(), g(ko, {
|
|
1494
1748
|
key: r.id,
|
|
1495
1749
|
node: r,
|
|
1496
|
-
expanded:
|
|
1750
|
+
expanded: n.value,
|
|
1497
1751
|
active: e.active,
|
|
1498
|
-
"is-expanded":
|
|
1499
|
-
onToggle:
|
|
1752
|
+
"is-expanded": m,
|
|
1753
|
+
onToggle: u,
|
|
1500
1754
|
onSelect: h
|
|
1501
1755
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1502
1756
|
]));
|
|
1503
1757
|
}
|
|
1504
|
-
}),
|
|
1758
|
+
}), Co = {
|
|
1505
1759
|
key: 0,
|
|
1506
1760
|
class: "flex items-center justify-center h-20"
|
|
1507
|
-
},
|
|
1761
|
+
}, hl = /* @__PURE__ */ v({
|
|
1508
1762
|
__name: "loading",
|
|
1509
1763
|
props: {
|
|
1510
1764
|
loading: { type: Boolean }
|
|
1511
1765
|
},
|
|
1512
1766
|
setup(e) {
|
|
1513
|
-
return (
|
|
1514
|
-
|
|
1515
|
-
])])) :
|
|
1767
|
+
return (o, t) => e.loading ? (l(), c("div", Co, [...t[0] || (t[0] = [
|
|
1768
|
+
i("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
|
|
1769
|
+
])])) : x("", !0);
|
|
1516
1770
|
}
|
|
1517
|
-
}),
|
|
1771
|
+
}), Bo = ["checked"], _o = { class: "collapse-title text-gray-500 text-xs font-medium" }, Lo = {
|
|
1518
1772
|
key: 0,
|
|
1519
1773
|
class: "list bg-base-100"
|
|
1520
|
-
},
|
|
1774
|
+
}, bl = /* @__PURE__ */ v({
|
|
1521
1775
|
__name: "Collapse",
|
|
1522
1776
|
props: {
|
|
1523
1777
|
title: {},
|
|
1524
|
-
opened: { type: Boolean, default: !0 }
|
|
1778
|
+
opened: { type: Boolean, default: !0 },
|
|
1779
|
+
heightFull: { type: Boolean }
|
|
1525
1780
|
},
|
|
1526
1781
|
setup(e) {
|
|
1527
|
-
const
|
|
1528
|
-
return
|
|
1529
|
-
() =>
|
|
1782
|
+
const o = Pe(), t = e, s = S(t.opened);
|
|
1783
|
+
return ne(
|
|
1784
|
+
() => t.opened,
|
|
1530
1785
|
() => {
|
|
1531
1786
|
},
|
|
1532
1787
|
{ immediate: !0 }
|
|
1533
|
-
), (
|
|
1534
|
-
|
|
1788
|
+
), (n, u) => (l(), c("div", {
|
|
1789
|
+
class: y([
|
|
1790
|
+
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
1791
|
+
e.heightFull ? "h-full" : ""
|
|
1792
|
+
])
|
|
1793
|
+
}, [
|
|
1794
|
+
i("input", {
|
|
1535
1795
|
type: "checkbox",
|
|
1536
|
-
checked:
|
|
1537
|
-
}, null, 8,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
class:
|
|
1796
|
+
checked: s.value
|
|
1797
|
+
}, null, 8, Bo),
|
|
1798
|
+
i("div", _o, p(e.title), 1),
|
|
1799
|
+
i("div", {
|
|
1800
|
+
class: y(["collapse-content", b(o).list ? "p-0" : ""])
|
|
1541
1801
|
}, [
|
|
1542
|
-
|
|
1543
|
-
b(
|
|
1544
|
-
|
|
1545
|
-
])) :
|
|
1802
|
+
M(n.$slots, "default"),
|
|
1803
|
+
b(o).list ? (l(), c("ul", Lo, [
|
|
1804
|
+
M(n.$slots, "list")
|
|
1805
|
+
])) : x("", !0)
|
|
1546
1806
|
], 2)
|
|
1547
|
-
]));
|
|
1807
|
+
], 2));
|
|
1548
1808
|
}
|
|
1549
|
-
}),
|
|
1550
|
-
key:
|
|
1809
|
+
}), Mo = { class: "list-row" }, Po = { class: "list-col-grow" }, Vo = { key: 0 }, Ao = {
|
|
1810
|
+
key: 1,
|
|
1551
1811
|
class: "text-xs text-gray-600"
|
|
1552
|
-
},
|
|
1812
|
+
}, Do = ["href"], To = { key: 1 }, zo = {
|
|
1553
1813
|
key: 0,
|
|
1554
1814
|
class: "text-xs text-gray-500"
|
|
1555
|
-
},
|
|
1815
|
+
}, Fo = ["href"], So = { key: 1 }, fl = /* @__PURE__ */ v({
|
|
1556
1816
|
__name: "CollapseRow",
|
|
1557
1817
|
props: {
|
|
1558
1818
|
title: {},
|
|
@@ -1562,75 +1822,97 @@ const Rt = {
|
|
|
1562
1822
|
descriptionLink: {}
|
|
1563
1823
|
},
|
|
1564
1824
|
setup(e) {
|
|
1565
|
-
return
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
e.description || e.descriptionLink ? (o(), i("div", yn, [
|
|
1571
|
-
e.descriptionLink ? (o(), i("a", {
|
|
1572
|
-
key: 0,
|
|
1573
|
-
href: e.descriptionLink,
|
|
1574
|
-
target: "_blank"
|
|
1575
|
-
}, v(e.description ?? e.descriptionLink), 9, wn)) : (o(), i("span", xn, v(e.description), 1))
|
|
1576
|
-
])) : y("", !0)
|
|
1577
|
-
]),
|
|
1578
|
-
e.label ? (o(), i("div", kn, [
|
|
1579
|
-
e.labelLink ? (o(), i("a", {
|
|
1825
|
+
return (o, t) => (l(), c("li", Mo, [
|
|
1826
|
+
i("div", Po, [
|
|
1827
|
+
e.title ? (l(), c("div", Vo, p(e.title), 1)) : x("", !0),
|
|
1828
|
+
e.description || e.descriptionLink ? (l(), c("div", Ao, [
|
|
1829
|
+
e.descriptionLink ? (l(), c("a", {
|
|
1580
1830
|
key: 0,
|
|
1581
|
-
href: e.
|
|
1831
|
+
href: e.descriptionLink,
|
|
1582
1832
|
target: "_blank"
|
|
1583
|
-
},
|
|
1584
|
-
])) :
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1833
|
+
}, p(e.description ?? e.descriptionLink), 9, Do)) : (l(), c("span", To, p(e.description), 1))
|
|
1834
|
+
])) : x("", !0)
|
|
1835
|
+
]),
|
|
1836
|
+
e.label ? (l(), c("div", zo, [
|
|
1837
|
+
e.labelLink ? (l(), c("a", {
|
|
1838
|
+
key: 0,
|
|
1839
|
+
href: e.labelLink,
|
|
1840
|
+
target: "_blank"
|
|
1841
|
+
}, p(e.label), 9, Fo)) : (l(), c("span", So, p(e.label), 1))
|
|
1842
|
+
])) : x("", !0),
|
|
1843
|
+
M(o.$slots, "default")
|
|
1844
|
+
]));
|
|
1845
|
+
}
|
|
1846
|
+
}), No = { class: "text-gray-800" }, pl = /* @__PURE__ */ v({
|
|
1847
|
+
__name: "alert",
|
|
1848
|
+
props: {
|
|
1849
|
+
message: {},
|
|
1850
|
+
type: {}
|
|
1851
|
+
},
|
|
1852
|
+
setup(e) {
|
|
1853
|
+
const o = {
|
|
1854
|
+
success: "alert-success",
|
|
1855
|
+
error: "alert-error",
|
|
1856
|
+
warning: "alert-warning",
|
|
1857
|
+
info: "alert-info"
|
|
1589
1858
|
};
|
|
1859
|
+
return (t, s) => (l(), c("div", {
|
|
1860
|
+
role: "alert",
|
|
1861
|
+
class: y(`alert alert-soft ${o[e.type]} `)
|
|
1862
|
+
}, [
|
|
1863
|
+
i("span", No, p(e.message), 1),
|
|
1864
|
+
M(t.$slots, "default")
|
|
1865
|
+
], 2));
|
|
1590
1866
|
}
|
|
1591
1867
|
});
|
|
1592
1868
|
export {
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1869
|
+
pl as Alert,
|
|
1870
|
+
nl as Autocomplete,
|
|
1871
|
+
ot as BadgeSize,
|
|
1872
|
+
Y as Btn,
|
|
1873
|
+
Zo as BtnBadge,
|
|
1874
|
+
tt as ButtonSize,
|
|
1875
|
+
Xo as Card,
|
|
1876
|
+
il as Checkbox,
|
|
1877
|
+
tl as ClickOutside,
|
|
1878
|
+
bl as Collapse,
|
|
1879
|
+
fl as CollapseRow,
|
|
1880
|
+
X as Color,
|
|
1881
|
+
nt as ConfirmModal,
|
|
1882
|
+
O as ControlWrapper,
|
|
1883
|
+
Ht as DefaultAutoCompleteProperties,
|
|
1884
|
+
q as DefaultControlProperties,
|
|
1885
|
+
dl as Drawer,
|
|
1886
|
+
Wo as Dropdown,
|
|
1887
|
+
j as Icon,
|
|
1610
1888
|
z as IconEnum,
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1889
|
+
Ie as IconMap,
|
|
1890
|
+
rl as Input,
|
|
1891
|
+
cl as InputNumber,
|
|
1892
|
+
hl as Loading,
|
|
1893
|
+
al as Markdown,
|
|
1894
|
+
Eo as Menu,
|
|
1895
|
+
Xe as Modal,
|
|
1896
|
+
he as ModalService,
|
|
1897
|
+
st as ModalWrapper,
|
|
1898
|
+
sl as MultiSelect,
|
|
1899
|
+
at as NotificationMessage,
|
|
1900
|
+
be as NotificationService,
|
|
1901
|
+
ct as Notifications,
|
|
1902
|
+
Bt as PaginationComponent,
|
|
1903
|
+
ll as SelectComponent,
|
|
1904
|
+
Go as ShellComponent,
|
|
1905
|
+
de as SubMenu,
|
|
1906
|
+
Qo as Table,
|
|
1907
|
+
Qo as TableComponent,
|
|
1908
|
+
Jo as TextCell,
|
|
1909
|
+
ul as Textarea,
|
|
1910
|
+
ml as TreeView,
|
|
1911
|
+
Yo as addClickOutsideEventListener,
|
|
1912
|
+
J as buildInputStyle,
|
|
1913
|
+
ol as hasCustomEventListener,
|
|
1914
|
+
Ot as isDescriptionHidden,
|
|
1915
|
+
jt as myStyles,
|
|
1916
|
+
el as removeClickOutsideEventListener,
|
|
1917
|
+
ke as showErrors
|
|
1636
1918
|
};
|