@ghentcdh/ui 0.6.7 → 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 +816 -761
- package/index.js +7 -7
- package/index.mjs +816 -761
- package/package.json +5 -5
package/index.esm.js
CHANGED
|
@@ -1,75 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { v4 as
|
|
4
|
-
import { apiNoAuth 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
|
-
var
|
|
25
|
-
const
|
|
26
|
-
Edit:
|
|
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 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 (
|
|
78
|
+
return (o, t) => (l(), c("div", {
|
|
73
79
|
class: y([
|
|
74
80
|
{
|
|
75
81
|
"w-full h-full": !e.size,
|
|
@@ -77,13 +83,13 @@ const Fe = {
|
|
|
77
83
|
"w-4 h-4": e.size === "sm"
|
|
78
84
|
}
|
|
79
85
|
]),
|
|
80
|
-
innerHTML:
|
|
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 Fe = {
|
|
|
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
107
|
class: y([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
102
108
|
}, [
|
|
103
|
-
|
|
104
|
-
e.disableArrow ? x("", !0) : (l(),
|
|
109
|
+
i("span", null, p(e.label), 1),
|
|
110
|
+
e.disableArrow ? x("", !0) : (l(), g(b(j), {
|
|
105
111
|
key: 0,
|
|
106
|
-
icon:
|
|
112
|
+
icon: b(z).ChevronDown,
|
|
107
113
|
size: "sm"
|
|
108
114
|
}, null, 8, ["icon"]))
|
|
109
115
|
], 2),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
(l(!0), c(
|
|
116
|
+
i("ul", qe, [
|
|
117
|
+
i("li", je, [
|
|
118
|
+
(l(!0), c($, null, L(e.items, (s) => (l(), g(we, A({
|
|
113
119
|
key: s.label
|
|
114
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,74 +131,74 @@ const Fe = {
|
|
|
125
131
|
disabled: { type: Boolean, default: !1 }
|
|
126
132
|
},
|
|
127
133
|
setup(e) {
|
|
128
|
-
const
|
|
129
|
-
const m =
|
|
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;
|
|
130
136
|
return m && "routerLink" in m && "params" in m ? {
|
|
131
137
|
name: m.routerLink,
|
|
132
138
|
params: m.params
|
|
133
139
|
} : "";
|
|
134
|
-
}),
|
|
135
|
-
|
|
140
|
+
}), h = () => {
|
|
141
|
+
o.action?.();
|
|
136
142
|
};
|
|
137
|
-
return (m,
|
|
138
|
-
const
|
|
139
|
-
return n.value ? (l(),
|
|
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
147
|
to: u.value,
|
|
142
|
-
class: y(
|
|
143
|
-
onClick:
|
|
148
|
+
class: y(le),
|
|
149
|
+
onClick: h
|
|
144
150
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
|
|
151
|
+
default: B(() => [
|
|
152
|
+
F(p(e.label), 1)
|
|
147
153
|
]),
|
|
148
154
|
_: 1
|
|
149
155
|
}, 8, ["to"])) : s.value ? (l(), c("button", {
|
|
150
156
|
key: 2,
|
|
151
|
-
class: y(
|
|
152
|
-
onClick:
|
|
153
|
-
},
|
|
157
|
+
class: y(le),
|
|
158
|
+
onClick: h
|
|
159
|
+
}, p(e.label), 1)) : (l(), c("div", {
|
|
154
160
|
key: 3,
|
|
155
|
-
class: y([
|
|
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 s =
|
|
171
|
-
return l(), c("nav",
|
|
172
|
-
|
|
173
|
-
e.breadcrumbs ? (l(), c("div",
|
|
174
|
-
|
|
175
|
-
(l(!0), c(
|
|
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", {
|
|
176
182
|
key: n.label
|
|
177
183
|
}, [
|
|
178
|
-
n.routerLink ? (l(),
|
|
184
|
+
n.routerLink ? (l(), g(s, {
|
|
179
185
|
key: 0,
|
|
180
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"])) : (l(), c(
|
|
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
|
-
(l(!0), c(
|
|
199
|
+
i("div", We, [
|
|
200
|
+
i("div", Ze, [
|
|
201
|
+
(l(!0), c($, null, L(e.menu, (n) => (l(), g(we, A({
|
|
196
202
|
key: n.label
|
|
197
203
|
}, { ref_for: !0 }, n), null, 16))), 128))
|
|
198
204
|
])
|
|
@@ -200,22 +206,22 @@ const Fe = {
|
|
|
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 Fe = {
|
|
|
227
233
|
width: { default: "sm" }
|
|
228
234
|
},
|
|
229
235
|
emits: ["closeModal"],
|
|
230
|
-
setup(e, { expose:
|
|
236
|
+
setup(e, { expose: o, emit: t }) {
|
|
231
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
|
-
}, n = e, u = `modal_${
|
|
242
|
+
}, n = e, u = `modal_${se()}`, h = t, m = () => {
|
|
237
243
|
document.getElementById(u)?.showModal();
|
|
238
|
-
},
|
|
239
|
-
document.getElementById(u)?.close(),
|
|
244
|
+
}, d = () => {
|
|
245
|
+
document.getElementById(u)?.close(), h("closeModal");
|
|
240
246
|
};
|
|
241
|
-
return
|
|
247
|
+
return o({ closeModal: d, openModal: m }), ne(
|
|
242
248
|
() => n.open,
|
|
243
|
-
(
|
|
244
|
-
n.open ? m() :
|
|
249
|
+
(a, r, w) => {
|
|
250
|
+
n.open ? m() : d();
|
|
245
251
|
}
|
|
246
|
-
),
|
|
252
|
+
), $e(() => {
|
|
247
253
|
n.open && m();
|
|
248
|
-
}), (
|
|
254
|
+
}), (a, r) => (l(), c("dialog", {
|
|
249
255
|
id: u,
|
|
250
256
|
class: "modal"
|
|
251
257
|
}, [
|
|
252
|
-
|
|
258
|
+
i("div", {
|
|
253
259
|
class: y(["modal-box bg-white", s[e.width]])
|
|
254
260
|
}, [
|
|
255
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 (n, u) => (l(),
|
|
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
|
-
|
|
313
|
-
|
|
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: u[0] || (u[0] = (
|
|
322
|
+
}, t, {
|
|
323
|
+
onClick: u[0] || (u[0] = (h) => s("click"))
|
|
318
324
|
}), {
|
|
319
|
-
default:
|
|
320
|
-
e.icon ? (l(),
|
|
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
330
|
}, null, 8, ["icon", "size"])) : x("", !0),
|
|
325
|
-
|
|
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
|
|
346
|
+
setup(e, { emit: o }) {
|
|
347
|
+
const t = o;
|
|
342
348
|
return (s, n) => (l(), c("button", {
|
|
343
|
-
class: y(["badge gap-1",
|
|
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: n[0] || (n[0] = (u) =>
|
|
352
|
+
onClick: n[0] || (n[0] = (u) => t("click"))
|
|
347
353
|
}, [
|
|
348
|
-
|
|
349
|
-
e.icon ? (l(),
|
|
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
359
|
}, null, 8, ["icon", "size"])) : x("", !0)
|
|
354
|
-
], 10,
|
|
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 Ge = {
|
|
|
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 (n, u) => (l(),
|
|
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:
|
|
383
|
+
actions: B(() => [
|
|
384
|
+
P(b(Y), {
|
|
385
|
+
color: b(X).secondary,
|
|
380
386
|
outline: !0,
|
|
381
|
-
onClick: u[0] || (u[0] = (
|
|
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: u[1] || (u[1] = (
|
|
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 Ge = {
|
|
|
398
404
|
}, 8, ["modal-title"]));
|
|
399
405
|
}
|
|
400
406
|
});
|
|
401
|
-
class
|
|
407
|
+
class he {
|
|
402
408
|
constructor() {
|
|
403
|
-
this.showModal =
|
|
409
|
+
this.showModal = S(!1), this.modals = [];
|
|
404
410
|
}
|
|
405
|
-
openModal(
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
411
|
+
openModal(o) {
|
|
412
|
+
const t = o.props.onClose, s = se(), n = o;
|
|
413
|
+
o.props.onClose = (u) => {
|
|
414
|
+
t(u), this.closeModal(s);
|
|
409
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,11 +436,11 @@ class ue {
|
|
|
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 (s, n) => (l(!0), c(
|
|
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({
|
|
438
444
|
key: u.id,
|
|
439
445
|
ref_for: !0
|
|
440
446
|
}, u?.props, {
|
|
@@ -442,75 +448,75 @@ const tt = /* @__PURE__ */ p({
|
|
|
442
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: y(`alert ${
|
|
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 =
|
|
474
|
+
this.notifications = S([]), this.addNotification = (o, t = "info") => {
|
|
469
475
|
const s = {
|
|
470
|
-
id:
|
|
471
|
-
duration:
|
|
472
|
-
message:
|
|
473
|
-
type:
|
|
476
|
+
id: se(),
|
|
477
|
+
duration: it,
|
|
478
|
+
message: o,
|
|
479
|
+
type: t
|
|
474
480
|
};
|
|
475
481
|
this.notifications.value.push(s), this.removeNotificationAfterDuration(s);
|
|
476
|
-
}, this.removeNotificationAfterDuration = (
|
|
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
|
-
(l(!0), c(
|
|
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({
|
|
509
515
|
key: n.id
|
|
510
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,94 +526,94 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, st = /* @__PURE__
|
|
|
520
526
|
widthSidebar: { default: 300 }
|
|
521
527
|
},
|
|
522
528
|
emits: ["logout"],
|
|
523
|
-
setup(e, { emit:
|
|
524
|
-
const s = e, n =
|
|
529
|
+
setup(e, { emit: o }) {
|
|
530
|
+
const s = e, n = S(!1), u = () => {
|
|
525
531
|
n.value = !n.value;
|
|
526
|
-
},
|
|
532
|
+
}, h = o, m = k(() => s.user ? {
|
|
527
533
|
label: s.user.name,
|
|
528
534
|
items: [
|
|
529
535
|
{
|
|
530
536
|
label: "Logout",
|
|
531
537
|
action: () => {
|
|
532
|
-
|
|
538
|
+
h("logout");
|
|
533
539
|
}
|
|
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
553
|
onClick: u
|
|
548
554
|
}, [
|
|
549
|
-
|
|
550
|
-
icon:
|
|
555
|
+
P(b(j), {
|
|
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
|
-
href:
|
|
558
|
-
},
|
|
563
|
+
href: b("/")
|
|
564
|
+
}, p(e.title), 9, ft)
|
|
559
565
|
]),
|
|
560
|
-
|
|
561
|
-
m.value ? (l(),
|
|
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
|
-
|
|
571
|
+
i("div", {
|
|
566
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
|
-
(l(!0), c(
|
|
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]" }, st = /* @__PURE__
|
|
|
617
623
|
disabled: { type: Boolean }
|
|
618
624
|
},
|
|
619
625
|
emits: ["updatePage", "updatePageSize"],
|
|
620
|
-
setup(e, { emit:
|
|
621
|
-
const
|
|
622
|
-
() =>
|
|
623
|
-
), u =
|
|
624
|
-
s("updatePage",
|
|
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 (m,
|
|
632
|
+
return (m, d) => (l(), g(b(Y), {
|
|
627
633
|
disabled: e.disabled,
|
|
628
634
|
square: !0,
|
|
629
635
|
size: "xs",
|
|
630
636
|
color: u.value,
|
|
631
|
-
onClick:
|
|
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,22 +650,22 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, st = /* @__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
|
-
}), u =
|
|
652
|
-
if (n.value <=
|
|
657
|
+
}), u = te / 2, h = k(() => {
|
|
658
|
+
if (n.value <= te)
|
|
653
659
|
return {
|
|
654
660
|
min: 1,
|
|
655
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: "...",
|
|
@@ -667,72 +673,72 @@ const nt = { class: "toast toast-top toast-center z-[999]" }, st = /* @__PURE__
|
|
|
667
673
|
page: -10,
|
|
668
674
|
disabled: !0,
|
|
669
675
|
neverActive: !0
|
|
670
|
-
}),
|
|
676
|
+
}), d = k(() => {
|
|
671
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
|
-
}),
|
|
685
|
+
currentPage: w,
|
|
686
|
+
page: D
|
|
687
|
+
}), D === 1 && r > 1 && N > 1 && T.push(m(w)));
|
|
682
688
|
}), T;
|
|
683
|
-
}),
|
|
689
|
+
}), a = (r) => {
|
|
684
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
|
-
(l(!0), c(
|
|
711
|
+
(l(!0), c($, null, L(d.value, (T) => (l(), g(ee, A({
|
|
706
712
|
key: T.page,
|
|
707
713
|
ref_for: !0
|
|
708
|
-
}, T, { onUpdatePage:
|
|
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
|
-
|
|
723
|
+
P(ee, A(t, {
|
|
718
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 [s, n] of
|
|
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]" }, st = /* @__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]" }, st = /* @__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 Eo = /* @__PURE__ */ me(Ct, [["render", Bt]]), _t = { class: "flex-grow pr
|
|
|
768
774
|
sortDirection: {}
|
|
769
775
|
},
|
|
770
776
|
emits: ["sort"],
|
|
771
|
-
setup(e, { emit:
|
|
772
|
-
const
|
|
773
|
-
() =>
|
|
774
|
-
), n =
|
|
775
|
-
|
|
776
|
-
},
|
|
777
|
-
return (m,
|
|
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
785
|
onClick: u
|
|
780
786
|
}, [
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
e.sortColumn === n.value ? (l(),
|
|
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
791
|
icon: s.value
|
|
786
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,77 +804,77 @@ const Eo = /* @__PURE__ */ me(Ct, [["render", Bt]]), _t = { class: "flex-grow pr
|
|
|
798
804
|
sort: {}
|
|
799
805
|
},
|
|
800
806
|
emits: ["delete", "edit", "updatePage", "sort"],
|
|
801
|
-
setup(e, { emit:
|
|
802
|
-
const
|
|
803
|
-
|
|
807
|
+
setup(e, { emit: o }) {
|
|
808
|
+
const t = o, s = (m) => {
|
|
809
|
+
t("edit", m);
|
|
804
810
|
}, n = (m) => {
|
|
805
|
-
|
|
811
|
+
t("delete", m);
|
|
806
812
|
}, u = (m) => {
|
|
807
|
-
|
|
808
|
-
},
|
|
809
|
-
|
|
813
|
+
t("updatePage", m);
|
|
814
|
+
}, h = (m) => {
|
|
815
|
+
t("sort", m);
|
|
810
816
|
};
|
|
811
|
-
return (m,
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
(l(!0), c(
|
|
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 ? (l(), c("tr",
|
|
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,
|
|
834
|
+
}, [...d[1] || (d[1] = [
|
|
835
|
+
i("span", { class: "loading loading-bars loading-xs" }, null, -1)
|
|
836
|
+
])], 8, Ft)
|
|
831
837
|
])) : x("", !0),
|
|
832
|
-
(l(!0), c(
|
|
833
|
-
key:
|
|
838
|
+
(l(!0), c($, null, L(e.data, (a) => (l(), c("tr", {
|
|
839
|
+
key: a.id
|
|
834
840
|
}, [
|
|
835
|
-
(l(!0), c(
|
|
841
|
+
(l(!0), c($, null, L(e.displayColumns, (r) => (l(), c("td", {
|
|
836
842
|
key: r.scope
|
|
837
843
|
}, [
|
|
838
|
-
(l(),
|
|
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
|
-
(l(!0), c(
|
|
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
|
-
|
|
857
|
-
icon:
|
|
862
|
+
P(Y, {
|
|
863
|
+
icon: b(z).Edit,
|
|
858
864
|
outline: !0,
|
|
859
|
-
onClick: (r) => s(
|
|
865
|
+
onClick: (r) => s(a)
|
|
860
866
|
}, null, 8, ["icon", "onClick"]),
|
|
861
|
-
|
|
862
|
-
icon:
|
|
867
|
+
P(Y, {
|
|
868
|
+
icon: b(z).Delete,
|
|
863
869
|
outline: !0,
|
|
864
|
-
onClick: (r) => n(
|
|
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 ? (l(),
|
|
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,
|
|
@@ -878,56 +884,56 @@ const Eo = /* @__PURE__ */ me(Ct, [["render", Bt]]), _t = { class: "flex-grow pr
|
|
|
878
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 l(), c("div",
|
|
890
|
-
|
|
891
|
-
e.$slots.title ? (l(), c("h2",
|
|
892
|
-
|
|
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")
|
|
893
899
|
])) : x("", !0),
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
900
|
+
i("p", null, [
|
|
901
|
+
M(e.$slots, "default"),
|
|
902
|
+
M(e.$slots, "content")
|
|
897
903
|
]),
|
|
898
|
-
e.$slots.actions ? (l(), c("div",
|
|
899
|
-
|
|
904
|
+
e.$slots.actions ? (l(), c("div", Kt, [
|
|
905
|
+
M(e.$slots, "actions")
|
|
900
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(s.target) ||
|
|
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",
|
|
@@ -952,6 +958,7 @@ const Rt = {
|
|
|
952
958
|
error: "",
|
|
953
959
|
input: "input",
|
|
954
960
|
textarea: "input h-32",
|
|
961
|
+
checkbox: "checkbox",
|
|
955
962
|
select: "select",
|
|
956
963
|
description: "form-control--description label text-xs text-gray-500"
|
|
957
964
|
},
|
|
@@ -960,25 +967,23 @@ const Rt = {
|
|
|
960
967
|
item: "w-full"
|
|
961
968
|
}
|
|
962
969
|
}, q = () => ({
|
|
963
|
-
id:
|
|
970
|
+
id: se(),
|
|
964
971
|
visible: !0,
|
|
965
972
|
required: !1,
|
|
966
973
|
enabled: !0,
|
|
967
974
|
isFocused: !1,
|
|
968
975
|
isTouched: !1,
|
|
969
976
|
hideLabel: !1,
|
|
970
|
-
styles:
|
|
971
|
-
|
|
977
|
+
styles: jt,
|
|
978
|
+
width: "w-24"
|
|
979
|
+
}), Ht = () => ({
|
|
972
980
|
...q(),
|
|
973
981
|
options: [],
|
|
974
982
|
valueKey: "value",
|
|
975
983
|
labelKey: "label"
|
|
976
|
-
}),
|
|
977
|
-
e?.control.input,
|
|
978
|
-
{ "input-error": ye(o, t, s) }
|
|
979
|
-
], qt = { key: 0 }, O = /* @__PURE__ */ p({
|
|
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({
|
|
980
985
|
__name: "ControlWrapper",
|
|
981
|
-
props: /* @__PURE__ */
|
|
986
|
+
props: /* @__PURE__ */ K({
|
|
982
987
|
id: {},
|
|
983
988
|
placeholder: {},
|
|
984
989
|
description: {},
|
|
@@ -990,38 +995,35 @@ const Rt = {
|
|
|
990
995
|
isFocused: { type: Boolean },
|
|
991
996
|
isTouched: { type: Boolean },
|
|
992
997
|
hideLabel: { type: Boolean },
|
|
993
|
-
styles: {}
|
|
998
|
+
styles: {},
|
|
999
|
+
width: {}
|
|
994
1000
|
}, q()),
|
|
995
1001
|
setup(e) {
|
|
996
|
-
const
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1002
|
+
const o = e, t = k(() => !Ot(
|
|
1003
|
+
o.visible,
|
|
1004
|
+
o.description,
|
|
1005
|
+
o.isFocused,
|
|
1000
1006
|
!0
|
|
1001
|
-
)), s =
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
t.errors
|
|
1005
|
-
));
|
|
1006
|
-
return (u, b) => (l(), c("fieldset", {
|
|
1007
|
-
class: y(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])
|
|
1008
1010
|
}, [
|
|
1009
1011
|
e.hideLabel ? x("", !0) : (l(), c("legend", {
|
|
1010
1012
|
key: 0,
|
|
1011
1013
|
class: y(e.styles.control.label)
|
|
1012
1014
|
}, [
|
|
1013
|
-
|
|
1014
|
-
s.value ? (l(), c("span",
|
|
1015
|
+
F(p(e.label) + " ", 1),
|
|
1016
|
+
s.value ? (l(), c("span", Et, "*")) : x("", !0)
|
|
1015
1017
|
], 2)),
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
+
M(u.$slots, "default"),
|
|
1019
|
+
i("p", {
|
|
1018
1020
|
class: y(["fieldset-label h-4", { "text-error": n.value }])
|
|
1019
|
-
},
|
|
1021
|
+
}, p(n.value ? e.errors : t.value ? e.description : null), 3)
|
|
1020
1022
|
], 2));
|
|
1021
1023
|
}
|
|
1022
|
-
}),
|
|
1024
|
+
}), Wt = ["disabled"], Zt = ["value"], ll = /* @__PURE__ */ v({
|
|
1023
1025
|
__name: "SelectComponent",
|
|
1024
|
-
props: /* @__PURE__ */
|
|
1026
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1025
1027
|
id: {},
|
|
1026
1028
|
placeholder: {},
|
|
1027
1029
|
description: {},
|
|
@@ -1034,6 +1036,7 @@ const Rt = {
|
|
|
1034
1036
|
isTouched: { type: Boolean },
|
|
1035
1037
|
hideLabel: { type: Boolean },
|
|
1036
1038
|
styles: {},
|
|
1039
|
+
width: {},
|
|
1037
1040
|
options: {},
|
|
1038
1041
|
valueKey: {},
|
|
1039
1042
|
labelKey: {}
|
|
@@ -1046,45 +1049,47 @@ const Rt = {
|
|
|
1046
1049
|
modelValue: {},
|
|
1047
1050
|
modelModifiers: {}
|
|
1048
1051
|
}),
|
|
1049
|
-
emits: /* @__PURE__ */
|
|
1050
|
-
setup(e, { emit:
|
|
1051
|
-
const
|
|
1052
|
-
s("change",
|
|
1053
|
-
},
|
|
1054
|
-
s("focus",
|
|
1055
|
-
}, m = (
|
|
1056
|
-
s("blur",
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
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),
|
|
1062
1067
|
disabled: !e.enabled,
|
|
1063
|
-
class: y(
|
|
1068
|
+
class: y(d.value),
|
|
1064
1069
|
onChange: u,
|
|
1065
|
-
onFocus:
|
|
1070
|
+
onFocus: h,
|
|
1066
1071
|
onBlur: m
|
|
1067
1072
|
}, [
|
|
1068
|
-
(l(!0), c(
|
|
1069
|
-
key:
|
|
1070
|
-
value:
|
|
1071
|
-
},
|
|
1072
|
-
], 42,
|
|
1073
|
-
[
|
|
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]
|
|
1074
1079
|
])
|
|
1075
1080
|
]),
|
|
1076
1081
|
_: 1
|
|
1077
1082
|
}, 16));
|
|
1078
1083
|
}
|
|
1079
|
-
}),
|
|
1084
|
+
}), Gt = ["disabled"], Jt = {
|
|
1080
1085
|
key: 0,
|
|
1081
1086
|
class: /* @__PURE__ */ y([
|
|
1082
1087
|
`bg-base-100 w-52 shadow -mt-5
|
|
1083
1088
|
absolute z-50`
|
|
1084
1089
|
])
|
|
1085
|
-
},
|
|
1090
|
+
}, Qt = ["onClick", "onBlur"], nl = /* @__PURE__ */ v({
|
|
1086
1091
|
__name: "AutoComplete",
|
|
1087
|
-
props: /* @__PURE__ */
|
|
1092
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1088
1093
|
id: {},
|
|
1089
1094
|
placeholder: {},
|
|
1090
1095
|
description: {},
|
|
@@ -1097,94 +1102,104 @@ const Rt = {
|
|
|
1097
1102
|
isTouched: { type: Boolean },
|
|
1098
1103
|
hideLabel: { type: Boolean },
|
|
1099
1104
|
styles: {},
|
|
1105
|
+
width: {},
|
|
1100
1106
|
config: {},
|
|
1101
1107
|
options: {},
|
|
1102
1108
|
valueKey: {},
|
|
1103
1109
|
labelKey: {}
|
|
1104
|
-
},
|
|
1110
|
+
}, Ht()), {
|
|
1105
1111
|
modelValue: {},
|
|
1106
1112
|
modelModifiers: {}
|
|
1107
1113
|
}),
|
|
1108
|
-
emits: /* @__PURE__ */
|
|
1109
|
-
setup(e, { emit:
|
|
1110
|
-
const
|
|
1111
|
-
s("change",
|
|
1112
|
-
}, m = (
|
|
1113
|
-
s("focus",
|
|
1114
|
-
},
|
|
1115
|
-
s("blur",
|
|
1116
|
-
},
|
|
1117
|
-
|
|
1118
|
-
}, T = (
|
|
1119
|
-
n.value =
|
|
1120
|
-
},
|
|
1121
|
-
r.value?.length ===
|
|
1122
|
-
}, E = (
|
|
1123
|
-
|
|
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(
|
|
1124
1130
|
() => n.value,
|
|
1125
|
-
(
|
|
1126
|
-
|
|
1131
|
+
(f) => {
|
|
1132
|
+
f && !E(f) || (a.value = !0, r.value = [], u.value = Q(f));
|
|
1127
1133
|
},
|
|
1128
1134
|
{ immediate: !0 }
|
|
1129
|
-
),
|
|
1135
|
+
), ne(
|
|
1130
1136
|
() => u.value,
|
|
1131
|
-
(
|
|
1132
|
-
if (
|
|
1133
|
-
|
|
1137
|
+
(f) => {
|
|
1138
|
+
if (a.value) {
|
|
1139
|
+
a.value = !1;
|
|
1134
1140
|
return;
|
|
1135
1141
|
}
|
|
1136
|
-
|
|
1137
|
-
const { uri: w, skipAuth: z, dataField: K } = o.config;
|
|
1138
|
-
(o.config.skipAuth ? Le : Me()).get(`${w}${g}`).then((ne) => {
|
|
1139
|
-
r.value = ne.data[K];
|
|
1140
|
-
});
|
|
1141
|
-
} else o.options && (r.value = o.options.filter((w) => _(w).toLowerCase().includes(g)).slice(0, 10));
|
|
1142
|
+
_(f);
|
|
1142
1143
|
}
|
|
1143
|
-
)
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
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),
|
|
1149
1163
|
autocomplete: "off",
|
|
1150
1164
|
type: "text",
|
|
1151
|
-
class: y([
|
|
1165
|
+
class: y([R.value]),
|
|
1152
1166
|
disabled: !e.enabled,
|
|
1153
1167
|
onFocus: m,
|
|
1154
|
-
onBlur:
|
|
1155
|
-
|
|
1156
|
-
|
|
1168
|
+
onBlur: d,
|
|
1169
|
+
onClick: D
|
|
1170
|
+
}, null, 42, Gt), [
|
|
1171
|
+
[ue, u.value]
|
|
1157
1172
|
]),
|
|
1158
|
-
|
|
1159
|
-
r.value?.length ? (l(), c("ul",
|
|
1160
|
-
(l(!0), c(
|
|
1161
|
-
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]
|
|
1162
1177
|
}, [
|
|
1163
|
-
|
|
1178
|
+
i("button", {
|
|
1164
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",
|
|
1165
1180
|
type: "button",
|
|
1166
|
-
onClick: (
|
|
1167
|
-
onBlur: (
|
|
1168
|
-
},
|
|
1181
|
+
onClick: (ae) => w(W),
|
|
1182
|
+
onBlur: (ae) => N(pe)
|
|
1183
|
+
}, p(Q(W)), 41, Qt)
|
|
1169
1184
|
]))), 128))
|
|
1170
1185
|
])) : x("", !0)
|
|
1171
1186
|
])), [
|
|
1172
|
-
[
|
|
1187
|
+
[oe, () => r.value = []]
|
|
1173
1188
|
])
|
|
1174
1189
|
]),
|
|
1175
1190
|
_: 1
|
|
1176
1191
|
}, 16);
|
|
1177
1192
|
};
|
|
1178
1193
|
}
|
|
1179
|
-
}),
|
|
1194
|
+
}), Xt = {
|
|
1180
1195
|
key: 0,
|
|
1181
1196
|
class: /* @__PURE__ */ y([
|
|
1182
1197
|
`bg-base-100 w-52 shadow -mt-5
|
|
1183
1198
|
absolute z-50 p-0`
|
|
1184
1199
|
])
|
|
1185
|
-
},
|
|
1200
|
+
}, Yt = ["onClick"], eo = { class: "w-4 mr-2" }, sl = /* @__PURE__ */ v({
|
|
1186
1201
|
__name: "MultiSelect",
|
|
1187
|
-
props: /* @__PURE__ */
|
|
1202
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1188
1203
|
id: {},
|
|
1189
1204
|
placeholder: {},
|
|
1190
1205
|
description: {},
|
|
@@ -1197,6 +1212,7 @@ const Rt = {
|
|
|
1197
1212
|
isTouched: { type: Boolean },
|
|
1198
1213
|
hideLabel: { type: Boolean },
|
|
1199
1214
|
styles: {},
|
|
1215
|
+
width: {},
|
|
1200
1216
|
options: {},
|
|
1201
1217
|
valueKey: {},
|
|
1202
1218
|
labelKey: {}
|
|
@@ -1208,65 +1224,70 @@ const Rt = {
|
|
|
1208
1224
|
modelValue: {},
|
|
1209
1225
|
modelModifiers: {}
|
|
1210
1226
|
}),
|
|
1211
|
-
emits: /* @__PURE__ */
|
|
1212
|
-
setup(e, { emit:
|
|
1213
|
-
const
|
|
1227
|
+
emits: /* @__PURE__ */ V(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1228
|
+
setup(e, { emit: o }) {
|
|
1229
|
+
const t = e, s = o, n = H(e, "modelValue");
|
|
1214
1230
|
let u = !1;
|
|
1215
|
-
const
|
|
1231
|
+
const h = (_) => {
|
|
1216
1232
|
s("change", _);
|
|
1217
|
-
}, m =
|
|
1233
|
+
}, m = S(!1), d = () => {
|
|
1218
1234
|
m.value = !m.value, u = !0;
|
|
1219
|
-
},
|
|
1235
|
+
}, a = () => {
|
|
1220
1236
|
u || (m.value = !1), u = !1;
|
|
1221
|
-
}, r =
|
|
1222
|
-
() => n.value?.map((_) =>
|
|
1223
|
-
),
|
|
1237
|
+
}, r = k(
|
|
1238
|
+
() => n.value?.map((_) => N(_)) ?? []
|
|
1239
|
+
), w = (_) => r.value.includes(_), T = (_, D) => {
|
|
1224
1240
|
_.preventDefault();
|
|
1225
|
-
let
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
},
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
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", {
|
|
1234
1255
|
type: "button",
|
|
1235
|
-
class: y(
|
|
1236
|
-
onClick:
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
m.value ? (l(), c("ul",
|
|
1240
|
-
(l(!0), c(
|
|
1241
|
-
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]
|
|
1242
1263
|
}, [
|
|
1243
|
-
|
|
1264
|
+
i("button", {
|
|
1244
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",
|
|
1245
1266
|
type: "button",
|
|
1246
|
-
onClick: (
|
|
1267
|
+
onClick: (I) => T(I, f)
|
|
1247
1268
|
}, [
|
|
1248
|
-
|
|
1249
|
-
|
|
1269
|
+
i("div", eo, [
|
|
1270
|
+
w(N(f)) ? (l(), g(b(j), {
|
|
1250
1271
|
key: 0,
|
|
1251
|
-
icon:
|
|
1272
|
+
icon: b(z).Check,
|
|
1252
1273
|
size: "sm"
|
|
1253
1274
|
}, null, 8, ["icon"])) : x("", !0)
|
|
1254
1275
|
]),
|
|
1255
|
-
|
|
1256
|
-
], 8,
|
|
1276
|
+
F(" " + p(E(f)), 1)
|
|
1277
|
+
], 8, Yt)
|
|
1257
1278
|
]))), 128))
|
|
1258
1279
|
])) : x("", !0)
|
|
1259
1280
|
])), [
|
|
1260
|
-
[
|
|
1281
|
+
[R, () => a()]
|
|
1261
1282
|
])
|
|
1262
1283
|
]),
|
|
1263
1284
|
_: 1
|
|
1264
1285
|
}, 16);
|
|
1265
1286
|
};
|
|
1266
1287
|
}
|
|
1267
|
-
}),
|
|
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({
|
|
1268
1289
|
__name: "Markdown",
|
|
1269
|
-
props: /* @__PURE__ */
|
|
1290
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1270
1291
|
id: {},
|
|
1271
1292
|
placeholder: {},
|
|
1272
1293
|
description: {},
|
|
@@ -1279,6 +1300,7 @@ const Rt = {
|
|
|
1279
1300
|
isTouched: { type: Boolean },
|
|
1280
1301
|
hideLabel: { type: Boolean },
|
|
1281
1302
|
styles: {},
|
|
1303
|
+
width: {},
|
|
1282
1304
|
actions: {}
|
|
1283
1305
|
}, {
|
|
1284
1306
|
...q(),
|
|
@@ -1298,12 +1320,12 @@ const Rt = {
|
|
|
1298
1320
|
modelValue: {},
|
|
1299
1321
|
modelModifiers: {}
|
|
1300
1322
|
}),
|
|
1301
|
-
emits: /* @__PURE__ */
|
|
1302
|
-
setup(e, { emit:
|
|
1303
|
-
const
|
|
1323
|
+
emits: /* @__PURE__ */ V(["change"], ["update:modelValue"]),
|
|
1324
|
+
setup(e, { emit: o }) {
|
|
1325
|
+
const t = e, s = o, n = H(e, "modelValue"), u = Se({
|
|
1304
1326
|
content: n.value ?? "",
|
|
1305
1327
|
extensions: [
|
|
1306
|
-
|
|
1328
|
+
Fe.configure({
|
|
1307
1329
|
heading: !1,
|
|
1308
1330
|
blockquote: !1,
|
|
1309
1331
|
bulletList: !1,
|
|
@@ -1314,37 +1336,38 @@ const Rt = {
|
|
|
1314
1336
|
horizontalRule: !1,
|
|
1315
1337
|
hardBreak: !1
|
|
1316
1338
|
}),
|
|
1317
|
-
|
|
1339
|
+
Re.configure({
|
|
1318
1340
|
html: !1,
|
|
1319
1341
|
transformPastedText: !0
|
|
1320
1342
|
// parse markdown on paste
|
|
1321
1343
|
})
|
|
1322
1344
|
],
|
|
1323
|
-
onUpdate({ editor:
|
|
1324
|
-
s("
|
|
1345
|
+
onUpdate({ editor: h }) {
|
|
1346
|
+
s("change", h.storage.markdown.getMarkdown());
|
|
1325
1347
|
}
|
|
1326
1348
|
});
|
|
1327
|
-
return
|
|
1349
|
+
return Le(() => {
|
|
1328
1350
|
u.value?.destroy();
|
|
1329
|
-
}), (
|
|
1330
|
-
default:
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
(l(!0), c(
|
|
1334
|
-
key:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
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))
|
|
1338
1361
|
}, [
|
|
1339
|
-
|
|
1340
|
-
innerHTML:
|
|
1341
|
-
}, null, 8,
|
|
1342
|
-
], 10,
|
|
1362
|
+
i("span", {
|
|
1363
|
+
innerHTML: d.label
|
|
1364
|
+
}, null, 8, no)
|
|
1365
|
+
], 10, lo))), 128))
|
|
1343
1366
|
]),
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
editor:
|
|
1347
|
-
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"
|
|
1348
1371
|
}, null, 8, ["editor"])
|
|
1349
1372
|
])
|
|
1350
1373
|
])
|
|
@@ -1352,9 +1375,9 @@ const Rt = {
|
|
|
1352
1375
|
_: 1
|
|
1353
1376
|
}, 16));
|
|
1354
1377
|
}
|
|
1355
|
-
}),
|
|
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({
|
|
1356
1379
|
__name: "Checkbox",
|
|
1357
|
-
props: /* @__PURE__ */
|
|
1380
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1358
1381
|
id: {},
|
|
1359
1382
|
placeholder: {},
|
|
1360
1383
|
description: {},
|
|
@@ -1367,49 +1390,49 @@ const Rt = {
|
|
|
1367
1390
|
isTouched: { type: Boolean },
|
|
1368
1391
|
hideLabel: { type: Boolean },
|
|
1369
1392
|
styles: {},
|
|
1370
|
-
|
|
1371
|
-
valueKey: {},
|
|
1372
|
-
labelKey: {}
|
|
1393
|
+
width: {}
|
|
1373
1394
|
}, {
|
|
1374
1395
|
...q()
|
|
1375
1396
|
}), {
|
|
1376
1397
|
modelValue: {},
|
|
1377
1398
|
modelModifiers: {}
|
|
1378
1399
|
}),
|
|
1379
|
-
emits: /* @__PURE__ */
|
|
1380
|
-
setup(e, { emit:
|
|
1381
|
-
const
|
|
1382
|
-
s("change",
|
|
1383
|
-
},
|
|
1384
|
-
s("focus",
|
|
1385
|
-
}, m = (
|
|
1386
|
-
s("blur",
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
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),
|
|
1394
1417
|
type: "checkbox",
|
|
1395
|
-
class: y(
|
|
1418
|
+
class: y(d.value),
|
|
1396
1419
|
disabled: !e.enabled,
|
|
1397
1420
|
onChange: u,
|
|
1398
|
-
onFocus:
|
|
1421
|
+
onFocus: h,
|
|
1399
1422
|
onBlur: m
|
|
1400
|
-
}, null, 42,
|
|
1401
|
-
[
|
|
1423
|
+
}, null, 42, co), [
|
|
1424
|
+
[ge, n.value]
|
|
1402
1425
|
]),
|
|
1403
|
-
|
|
1426
|
+
i("span", uo, p(e.label), 1)
|
|
1404
1427
|
])
|
|
1405
1428
|
]),
|
|
1406
1429
|
_: 1
|
|
1407
1430
|
}, 16)
|
|
1408
1431
|
]));
|
|
1409
1432
|
}
|
|
1410
|
-
}),
|
|
1433
|
+
}), mo = ["type", "disabled", "autofocus", "placeholder"], rl = /* @__PURE__ */ v({
|
|
1411
1434
|
__name: "Input",
|
|
1412
|
-
props: /* @__PURE__ */
|
|
1435
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1413
1436
|
id: {},
|
|
1414
1437
|
placeholder: {},
|
|
1415
1438
|
description: {},
|
|
@@ -1422,6 +1445,7 @@ const Rt = {
|
|
|
1422
1445
|
isTouched: { type: Boolean },
|
|
1423
1446
|
hideLabel: { type: Boolean },
|
|
1424
1447
|
styles: {},
|
|
1448
|
+
width: {},
|
|
1425
1449
|
type: {}
|
|
1426
1450
|
}, {
|
|
1427
1451
|
...q(),
|
|
@@ -1430,38 +1454,40 @@ const Rt = {
|
|
|
1430
1454
|
modelValue: {},
|
|
1431
1455
|
modelModifiers: {}
|
|
1432
1456
|
}),
|
|
1433
|
-
emits: /* @__PURE__ */
|
|
1434
|
-
setup(e, { emit:
|
|
1435
|
-
const
|
|
1436
|
-
s("change",
|
|
1437
|
-
},
|
|
1438
|
-
s("focus",
|
|
1439
|
-
}, m = (
|
|
1440
|
-
s("blur",
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
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),
|
|
1446
1472
|
autocomplete: "off",
|
|
1447
1473
|
type: e.type,
|
|
1448
|
-
class: y(
|
|
1474
|
+
class: y(d.value),
|
|
1449
1475
|
disabled: !e.enabled,
|
|
1450
1476
|
autofocus: e.isFocused,
|
|
1451
1477
|
placeholder: e.placeholder,
|
|
1452
1478
|
onChange: u,
|
|
1453
|
-
onFocus:
|
|
1479
|
+
onFocus: h,
|
|
1454
1480
|
onBlur: m
|
|
1455
|
-
}, null, 42,
|
|
1456
|
-
[
|
|
1481
|
+
}, null, 42, mo), [
|
|
1482
|
+
[Me, n.value]
|
|
1457
1483
|
])
|
|
1458
1484
|
]),
|
|
1459
1485
|
_: 1
|
|
1460
1486
|
}, 16));
|
|
1461
1487
|
}
|
|
1462
|
-
}),
|
|
1488
|
+
}), ho = ["disabled", "step", "autofocus", "placeholder"], cl = /* @__PURE__ */ v({
|
|
1463
1489
|
__name: "InputNumber",
|
|
1464
|
-
props: /* @__PURE__ */
|
|
1490
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1465
1491
|
id: {},
|
|
1466
1492
|
placeholder: {},
|
|
1467
1493
|
description: {},
|
|
@@ -1474,6 +1500,7 @@ const Rt = {
|
|
|
1474
1500
|
isTouched: { type: Boolean },
|
|
1475
1501
|
hideLabel: { type: Boolean },
|
|
1476
1502
|
styles: {},
|
|
1503
|
+
width: {},
|
|
1477
1504
|
steps: {}
|
|
1478
1505
|
}, {
|
|
1479
1506
|
...q(),
|
|
@@ -1482,39 +1509,41 @@ const Rt = {
|
|
|
1482
1509
|
modelValue: {},
|
|
1483
1510
|
modelModifiers: {}
|
|
1484
1511
|
}),
|
|
1485
|
-
emits: /* @__PURE__ */
|
|
1486
|
-
setup(e, { emit:
|
|
1487
|
-
const
|
|
1488
|
-
s("change",
|
|
1489
|
-
},
|
|
1490
|
-
s("focus",
|
|
1491
|
-
}, m = (
|
|
1492
|
-
s("blur",
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
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),
|
|
1498
1527
|
autocomplete: "off",
|
|
1499
1528
|
type: "number",
|
|
1500
|
-
class: y([
|
|
1529
|
+
class: y([d.value]),
|
|
1501
1530
|
disabled: !e.enabled,
|
|
1502
1531
|
step: e.steps,
|
|
1503
1532
|
autofocus: e.isFocused,
|
|
1504
1533
|
placeholder: e.placeholder,
|
|
1505
1534
|
onChange: u,
|
|
1506
|
-
onFocus:
|
|
1535
|
+
onFocus: h,
|
|
1507
1536
|
onBlur: m
|
|
1508
|
-
}, null, 42,
|
|
1509
|
-
[
|
|
1537
|
+
}, null, 42, ho), [
|
|
1538
|
+
[ue, n.value]
|
|
1510
1539
|
])
|
|
1511
1540
|
]),
|
|
1512
1541
|
_: 1
|
|
1513
1542
|
}, 16));
|
|
1514
1543
|
}
|
|
1515
|
-
}),
|
|
1544
|
+
}), bo = ["disabled", "rows", "autofocus", "placeholder"], ul = /* @__PURE__ */ v({
|
|
1516
1545
|
__name: "Textarea",
|
|
1517
|
-
props: /* @__PURE__ */
|
|
1546
|
+
props: /* @__PURE__ */ V(/* @__PURE__ */ K({
|
|
1518
1547
|
id: {},
|
|
1519
1548
|
placeholder: {},
|
|
1520
1549
|
description: {},
|
|
@@ -1527,6 +1556,7 @@ const Rt = {
|
|
|
1527
1556
|
isTouched: { type: Boolean },
|
|
1528
1557
|
hideLabel: { type: Boolean },
|
|
1529
1558
|
styles: {},
|
|
1559
|
+
width: {},
|
|
1530
1560
|
rows: {}
|
|
1531
1561
|
}, {
|
|
1532
1562
|
...q(),
|
|
@@ -1535,103 +1565,105 @@ const Rt = {
|
|
|
1535
1565
|
modelValue: {},
|
|
1536
1566
|
modelModifiers: {}
|
|
1537
1567
|
}),
|
|
1538
|
-
emits: /* @__PURE__ */
|
|
1539
|
-
setup(e, { emit:
|
|
1540
|
-
const
|
|
1541
|
-
s("change",
|
|
1542
|
-
},
|
|
1543
|
-
s("focus",
|
|
1544
|
-
}, m = (
|
|
1545
|
-
s("blur",
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
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),
|
|
1551
1583
|
autocomplete: "off",
|
|
1552
1584
|
type: "text",
|
|
1553
|
-
class: y(
|
|
1585
|
+
class: y(d.value),
|
|
1554
1586
|
disabled: !e.enabled,
|
|
1555
1587
|
rows: e.rows,
|
|
1556
1588
|
autofocus: e.isFocused,
|
|
1557
1589
|
placeholder: e.placeholder,
|
|
1558
1590
|
onChange: u,
|
|
1559
|
-
onFocus:
|
|
1591
|
+
onFocus: h,
|
|
1560
1592
|
onBlur: m
|
|
1561
|
-
}, null, 42,
|
|
1562
|
-
[
|
|
1593
|
+
}, null, 42, bo), [
|
|
1594
|
+
[ue, n.value]
|
|
1563
1595
|
])
|
|
1564
1596
|
]),
|
|
1565
1597
|
_: 1
|
|
1566
1598
|
}, 16));
|
|
1567
1599
|
}
|
|
1568
|
-
}),
|
|
1600
|
+
}), fo = { class: "grid grid-cols-[auto_1fr_auto] h-full overflow-hidden" }, po = {
|
|
1569
1601
|
id: "drawer-left",
|
|
1570
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"
|
|
1571
|
-
},
|
|
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({
|
|
1572
1604
|
__name: "drawer",
|
|
1573
1605
|
props: {
|
|
1574
1606
|
widthLeft: { default: 200 },
|
|
1575
1607
|
widthRight: { default: 200 }
|
|
1576
1608
|
},
|
|
1577
1609
|
setup(e) {
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1610
|
+
const o = S({ left: !0, right: !0 }), t = (s) => {
|
|
1611
|
+
o.value[s] = !o.value[s];
|
|
1580
1612
|
};
|
|
1581
|
-
return (s, n) => (l(), c("main",
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
class: y(["absolute top-0 z-20",
|
|
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"])
|
|
1585
1617
|
}, [
|
|
1586
|
-
|
|
1618
|
+
i("button", {
|
|
1587
1619
|
class: "btn btn-ghost btn-circle",
|
|
1588
|
-
onClick: n[0] || (n[0] = (u) =>
|
|
1620
|
+
onClick: n[0] || (n[0] = (u) => t("left"))
|
|
1589
1621
|
}, [
|
|
1590
|
-
|
|
1622
|
+
P(b(j), {
|
|
1591
1623
|
size: "sm",
|
|
1592
|
-
icon:
|
|
1624
|
+
icon: o.value.left ? b(z).DblChevronLeft : b(z).DblChevronRight
|
|
1593
1625
|
}, null, 8, ["icon"])
|
|
1594
1626
|
])
|
|
1595
1627
|
], 2),
|
|
1596
|
-
|
|
1628
|
+
o.value.left ? (l(), c("div", {
|
|
1597
1629
|
key: 0,
|
|
1598
|
-
style:
|
|
1630
|
+
style: ie({ width: e.widthLeft + "px" }),
|
|
1599
1631
|
class: "h-full overflow-y-auto p-4"
|
|
1600
1632
|
}, [
|
|
1601
|
-
|
|
1633
|
+
M(s.$slots, "left-drawer")
|
|
1602
1634
|
], 4)) : x("", !0)
|
|
1603
1635
|
]),
|
|
1604
|
-
|
|
1605
|
-
|
|
1636
|
+
i("div", vo, [
|
|
1637
|
+
M(s.$slots, "default")
|
|
1606
1638
|
]),
|
|
1607
|
-
|
|
1608
|
-
|
|
1639
|
+
i("aside", go, [
|
|
1640
|
+
o.value.right ? (l(), c("div", {
|
|
1609
1641
|
key: 0,
|
|
1610
|
-
style:
|
|
1642
|
+
style: ie({ width: e.widthRight + "px" }),
|
|
1611
1643
|
class: "h-full overflow-y-auto p-4"
|
|
1612
1644
|
}, [
|
|
1613
|
-
|
|
1645
|
+
M(s.$slots, "right-drawer")
|
|
1614
1646
|
], 4)) : x("", !0),
|
|
1615
|
-
|
|
1616
|
-
class: y(["absolute top-0 z-20",
|
|
1647
|
+
i("div", {
|
|
1648
|
+
class: y(["absolute top-0 z-20", o.value.right ? "-left-0" : "-left-2"])
|
|
1617
1649
|
}, [
|
|
1618
|
-
|
|
1650
|
+
i("button", {
|
|
1619
1651
|
class: "btn btn-ghost btn-circle",
|
|
1620
|
-
onClick: n[1] || (n[1] = (u) =>
|
|
1652
|
+
onClick: n[1] || (n[1] = (u) => t("right"))
|
|
1621
1653
|
}, [
|
|
1622
|
-
|
|
1654
|
+
P(b(j), {
|
|
1623
1655
|
size: "sm",
|
|
1624
|
-
icon:
|
|
1656
|
+
icon: o.value.right ? b(z).DblChevronRight : b(z).DblChevronLeft
|
|
1625
1657
|
}, null, 8, ["icon"])
|
|
1626
1658
|
])
|
|
1627
1659
|
], 2)
|
|
1628
1660
|
])
|
|
1629
1661
|
]));
|
|
1630
1662
|
}
|
|
1631
|
-
}),
|
|
1663
|
+
}), yo = { class: "ml-1" }, wo = { class: "truncate flex-1 min-w-0 text-left" }, xo = {
|
|
1632
1664
|
key: 0,
|
|
1633
1665
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
1634
|
-
},
|
|
1666
|
+
}, ko = /* @__PURE__ */ v({
|
|
1635
1667
|
__name: "TreeItem",
|
|
1636
1668
|
props: {
|
|
1637
1669
|
active: {},
|
|
@@ -1640,37 +1672,37 @@ const Rt = {
|
|
|
1640
1672
|
isExpanded: { type: Function }
|
|
1641
1673
|
},
|
|
1642
1674
|
emits: ["toggle", "select"],
|
|
1643
|
-
setup(e, { emit:
|
|
1644
|
-
const
|
|
1645
|
-
return (u,
|
|
1646
|
-
const m =
|
|
1647
|
-
return l(), c("li",
|
|
1648
|
-
|
|
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", {
|
|
1649
1681
|
class: y([
|
|
1650
1682
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
1651
1683
|
hover:bg-gray-100`,
|
|
1652
1684
|
n.value ? "text-primary" : ""
|
|
1653
1685
|
])
|
|
1654
1686
|
}, [
|
|
1655
|
-
e.node
|
|
1687
|
+
(e.node?.children?.length ?? 0) > 0 ? (l(), c("span", {
|
|
1656
1688
|
key: 0,
|
|
1657
1689
|
class: "flex items-center justify-center",
|
|
1658
|
-
onClick:
|
|
1690
|
+
onClick: h[0] || (h[0] = (d) => s("toggle", e.node))
|
|
1659
1691
|
}, [
|
|
1660
|
-
e.node.children && e.isExpanded(e.node.id) ? (l(),
|
|
1692
|
+
e.node.children && e.isExpanded(e.node.id) ? (l(), g(b(Te), {
|
|
1661
1693
|
key: 0,
|
|
1662
1694
|
class: "w-3 h-3"
|
|
1663
|
-
})) : (l(),
|
|
1695
|
+
})) : (l(), g(b(ze), {
|
|
1664
1696
|
key: 1,
|
|
1665
1697
|
class: "w-3 h-3"
|
|
1666
1698
|
}))
|
|
1667
1699
|
])) : x("", !0),
|
|
1668
|
-
|
|
1700
|
+
i("div", {
|
|
1669
1701
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
1670
|
-
onClick:
|
|
1702
|
+
onClick: h[1] || (h[1] = (d) => s("select", e.node))
|
|
1671
1703
|
}, [
|
|
1672
|
-
|
|
1673
|
-
e.node.tag ? (l(), c("div",
|
|
1704
|
+
i("div", wo, p(e.node.label), 1),
|
|
1705
|
+
e.node.tag ? (l(), c("div", xo, p(e.node.tag), 1)) : x("", !0)
|
|
1674
1706
|
])
|
|
1675
1707
|
], 2),
|
|
1676
1708
|
e.node.children && e.isExpanded(e.node.id) ? (l(), c("ul", {
|
|
@@ -1680,101 +1712,107 @@ const Rt = {
|
|
|
1680
1712
|
{ "border-gray-200": !n.value, "border-primary": n.value }
|
|
1681
1713
|
])
|
|
1682
1714
|
}, [
|
|
1683
|
-
(l(!0), c(
|
|
1684
|
-
key:
|
|
1685
|
-
node:
|
|
1715
|
+
(l(!0), c($, null, L(e.node.children, (d) => (l(), g(m, {
|
|
1716
|
+
key: d.id,
|
|
1717
|
+
node: d,
|
|
1686
1718
|
expanded: e.expanded,
|
|
1687
1719
|
active: e.active,
|
|
1688
1720
|
"is-expanded": e.isExpanded,
|
|
1689
|
-
onToggle:
|
|
1690
|
-
onSelect:
|
|
1721
|
+
onToggle: h[2] || (h[2] = (a) => s("toggle", a)),
|
|
1722
|
+
onSelect: h[3] || (h[3] = (a) => s("select", a))
|
|
1691
1723
|
}, null, 8, ["node", "expanded", "active", "is-expanded"]))), 128))
|
|
1692
1724
|
], 2)) : x("", !0)
|
|
1693
1725
|
]);
|
|
1694
1726
|
};
|
|
1695
1727
|
}
|
|
1696
|
-
}),
|
|
1728
|
+
}), $o = { class: "select-none text-sm" }, ml = /* @__PURE__ */ v({
|
|
1697
1729
|
__name: "TreeView",
|
|
1698
1730
|
props: {
|
|
1699
1731
|
data: {},
|
|
1700
1732
|
active: {}
|
|
1701
1733
|
},
|
|
1702
1734
|
emits: ["select"],
|
|
1703
|
-
setup(e, { emit:
|
|
1704
|
-
const
|
|
1705
|
-
const
|
|
1706
|
-
if (!
|
|
1707
|
-
s("select",
|
|
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);
|
|
1708
1740
|
return;
|
|
1709
1741
|
}
|
|
1710
|
-
n.value.has(
|
|
1711
|
-
},
|
|
1712
|
-
s("select",
|
|
1713
|
-
}, m = (
|
|
1714
|
-
return (
|
|
1715
|
-
(l(!0), c(
|
|
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, {
|
|
1716
1748
|
key: r.id,
|
|
1717
1749
|
node: r,
|
|
1718
1750
|
expanded: n.value,
|
|
1719
1751
|
active: e.active,
|
|
1720
1752
|
"is-expanded": m,
|
|
1721
1753
|
onToggle: u,
|
|
1722
|
-
onSelect:
|
|
1754
|
+
onSelect: h
|
|
1723
1755
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
1724
1756
|
]));
|
|
1725
1757
|
}
|
|
1726
|
-
}),
|
|
1758
|
+
}), Co = {
|
|
1727
1759
|
key: 0,
|
|
1728
1760
|
class: "flex items-center justify-center h-20"
|
|
1729
|
-
},
|
|
1761
|
+
}, hl = /* @__PURE__ */ v({
|
|
1730
1762
|
__name: "loading",
|
|
1731
1763
|
props: {
|
|
1732
1764
|
loading: { type: Boolean }
|
|
1733
1765
|
},
|
|
1734
1766
|
setup(e) {
|
|
1735
|
-
return (
|
|
1736
|
-
|
|
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)
|
|
1737
1769
|
])])) : x("", !0);
|
|
1738
1770
|
}
|
|
1739
|
-
}),
|
|
1771
|
+
}), Bo = ["checked"], _o = { class: "collapse-title text-gray-500 text-xs font-medium" }, Lo = {
|
|
1740
1772
|
key: 0,
|
|
1741
1773
|
class: "list bg-base-100"
|
|
1742
|
-
},
|
|
1774
|
+
}, bl = /* @__PURE__ */ v({
|
|
1743
1775
|
__name: "Collapse",
|
|
1744
1776
|
props: {
|
|
1745
1777
|
title: {},
|
|
1746
|
-
opened: { type: Boolean, default: !0 }
|
|
1778
|
+
opened: { type: Boolean, default: !0 },
|
|
1779
|
+
heightFull: { type: Boolean }
|
|
1747
1780
|
},
|
|
1748
1781
|
setup(e) {
|
|
1749
|
-
const
|
|
1750
|
-
return
|
|
1751
|
-
() =>
|
|
1782
|
+
const o = Pe(), t = e, s = S(t.opened);
|
|
1783
|
+
return ne(
|
|
1784
|
+
() => t.opened,
|
|
1752
1785
|
() => {
|
|
1753
1786
|
},
|
|
1754
1787
|
{ immediate: !0 }
|
|
1755
|
-
), (n, u) => (l(), c("div",
|
|
1756
|
-
|
|
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", {
|
|
1757
1795
|
type: "checkbox",
|
|
1758
1796
|
checked: s.value
|
|
1759
|
-
}, null, 8,
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
class: y(["collapse-content",
|
|
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" : ""])
|
|
1763
1801
|
}, [
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1802
|
+
M(n.$slots, "default"),
|
|
1803
|
+
b(o).list ? (l(), c("ul", Lo, [
|
|
1804
|
+
M(n.$slots, "list")
|
|
1767
1805
|
])) : x("", !0)
|
|
1768
1806
|
], 2)
|
|
1769
|
-
]));
|
|
1807
|
+
], 2));
|
|
1770
1808
|
}
|
|
1771
|
-
}),
|
|
1772
|
-
key:
|
|
1809
|
+
}), Mo = { class: "list-row" }, Po = { class: "list-col-grow" }, Vo = { key: 0 }, Ao = {
|
|
1810
|
+
key: 1,
|
|
1773
1811
|
class: "text-xs text-gray-600"
|
|
1774
|
-
},
|
|
1812
|
+
}, Do = ["href"], To = { key: 1 }, zo = {
|
|
1775
1813
|
key: 0,
|
|
1776
1814
|
class: "text-xs text-gray-500"
|
|
1777
|
-
},
|
|
1815
|
+
}, Fo = ["href"], So = { key: 1 }, fl = /* @__PURE__ */ v({
|
|
1778
1816
|
__name: "CollapseRow",
|
|
1779
1817
|
props: {
|
|
1780
1818
|
title: {},
|
|
@@ -1784,80 +1822,97 @@ const Rt = {
|
|
|
1784
1822
|
descriptionLink: {}
|
|
1785
1823
|
},
|
|
1786
1824
|
setup(e) {
|
|
1787
|
-
return
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
e.description || e.descriptionLink ? (l(), c("div", Lo, [
|
|
1793
|
-
e.descriptionLink ? (l(), c("a", {
|
|
1794
|
-
key: 0,
|
|
1795
|
-
href: e.descriptionLink,
|
|
1796
|
-
target: "_blank"
|
|
1797
|
-
}, h(e.description ?? e.descriptionLink), 9, Mo)) : (l(), c("span", Po, h(e.description), 1))
|
|
1798
|
-
])) : x("", !0)
|
|
1799
|
-
]),
|
|
1800
|
-
e.label ? (l(), c("div", Vo, [
|
|
1801
|
-
e.labelLink ? (l(), c("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", {
|
|
1802
1830
|
key: 0,
|
|
1803
|
-
href: e.
|
|
1831
|
+
href: e.descriptionLink,
|
|
1804
1832
|
target: "_blank"
|
|
1805
|
-
},
|
|
1806
|
-
])) : x("", !0)
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
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"
|
|
1811
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));
|
|
1812
1866
|
}
|
|
1813
1867
|
});
|
|
1814
1868
|
export {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
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,
|
|
1827
1882
|
O as ControlWrapper,
|
|
1828
|
-
|
|
1883
|
+
Ht as DefaultAutoCompleteProperties,
|
|
1829
1884
|
q as DefaultControlProperties,
|
|
1830
|
-
|
|
1831
|
-
|
|
1885
|
+
dl as Drawer,
|
|
1886
|
+
Wo as Dropdown,
|
|
1832
1887
|
j as Icon,
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1888
|
+
z as IconEnum,
|
|
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
|
|
1863
1918
|
};
|