@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.esm.js CHANGED
@@ -1,89 +1,95 @@
1
- import { defineComponent as p, openBlock as o, createElementBlock as i, unref as b, normalizeClass as w, createElementVNode as a, toDisplayString as v, createBlock as g, createCommentVNode as y, Fragment as x, renderList as $, mergeProps as P, computed as k, resolveComponent as X, withCtx as D, createTextVNode as T, ref as S, watch as Q, onMounted as pe, renderSlot as B, resolveDynamicComponent as ae, createVNode as C, withDirectives as W, vModelCheckbox as ye, normalizeStyle as le, getCurrentInstance as we, toHandlerKey as me, camelize as xe, mergeDefaults as Z, useModel as Y, normalizeProps as ee, guardReactiveProps as te, vModelSelect as ke, mergeModels as F, resolveDirective as fe, vModelText as $e, onBeforeUnmount as Ce, useSlots as be } from "vue";
2
- import { RouterLink as _e } from "vue-router";
3
- import { v4 as ne } from "uuid";
4
- import { useApi as Le } from "@ghentcdh/tools-vue";
5
- import { ChevronDownIcon as Me, ChevronRightIcon as Be } from "@heroicons/vue/24/solid";
6
- import Pe from "@tiptap/starter-kit";
7
- import { useEditor as De, EditorContent as Ve } from "@tiptap/vue-3";
8
- import { Markdown as Ae } from "tiptap-markdown";
9
- const L = (...e) => `<svg
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
- (n) => ` <path
16
+ (t) => ` <path
17
17
  stroke-linejoin="round"
18
18
  stroke-linecap="round"
19
- d="${n}"
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 ze = {
26
- Edit: L(
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: L(
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: L(
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: L(
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: L(
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: L("M6 18 18 6M6 6l12 12"),
42
- Plus: L("M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"),
43
- PaperClip: L(
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: L("M4 6h16M4 12h16M4 18h16"),
47
- ChevronDown: L(
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: L(
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: L("m4.5 12.75 6 6 9-13.5"),
54
- View: L(
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: L(
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: L(
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: L("m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5")
65
- }, Te = ["innerHTML"], I = /* @__PURE__ */ p({
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 (t, n) => (o(), i("div", {
73
- class: w([
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(ze)[e.icon]
81
- }, null, 10, Te));
86
+ innerHTML: b(Ie)[e.icon]
87
+ }, null, 10, Ue));
82
88
  }
83
- }), Se = { class: "dropdown dropdown-end" }, Ne = {
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
- }, Re = { class: "min-w-max flex-no-wrap text-black" }, ie = /* @__PURE__ */ p({
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 (t, n) => (o(), i("div", Se, [
98
- a("div", {
103
+ return (o, t) => (l(), c("div", Ke, [
104
+ i("div", {
99
105
  tabindex: "0",
100
106
  role: "button",
101
- class: w([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
107
+ class: y([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
102
108
  }, [
103
- a("span", null, v(e.label), 1),
104
- e.disableArrow ? y("", !0) : (o(), g(b(I), {
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
- a("ul", Ne, [
111
- a("li", Re, [
112
- (o(!0), i(x, null, $(e.items, (l) => (o(), g(he, P({
113
- key: l.label
114
- }, { ref_for: !0 }, l), null, 16))), 128))
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
- }), J = "btn btn-ghost text-left justify-between min-w-max font-normal", he = /* @__PURE__ */ p({
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 t = e, n = k(() => !t.disabled && t.action && "routerLink" in t.action), l = k(() => !t.disabled && t.action), s = k(() => t.items?.length), c = k(() => {
129
- const f = t.action;
130
- return f && "routerLink" in f && "params" in f ? {
131
- name: f.routerLink,
132
- params: f.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
- t.action?.();
141
+ o.action?.();
136
142
  };
137
- return (f, u) => {
138
- const d = X("RouterLink");
139
- return s.value ? (o(), g(ie, P({ key: 0 }, t, { "btn-class": J }), null, 16)) : n.value ? (o(), g(d, {
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: c.value,
142
- class: w(J),
147
+ to: u.value,
148
+ class: y(le),
143
149
  onClick: h
144
150
  }, {
145
- default: D(() => [
146
- T(v(e.label), 1)
151
+ default: B(() => [
152
+ F(p(e.label), 1)
147
153
  ]),
148
154
  _: 1
149
- }, 8, ["to"])) : l.value ? (o(), i("button", {
155
+ }, 8, ["to"])) : s.value ? (l(), c("button", {
150
156
  key: 2,
151
- class: w(J),
157
+ class: y(le),
152
158
  onClick: h
153
- }, v(e.label), 1)) : (o(), i("div", {
159
+ }, p(e.label), 1)) : (l(), c("div", {
154
160
  key: 3,
155
- class: w([J, { "btn-disabled": e.disabled }])
156
- }, v(e.label), 3));
161
+ class: y([le, { "btn-disabled": e.disabled }])
162
+ }, p(e.label), 3));
157
163
  };
158
164
  }
159
- }), Ke = { class: "navbar bg-base-100 shadow-sm" }, Fe = { class: "flex-1" }, Ie = {
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
- }, Ue = { class: "flex grow justify-end px-2" }, He = { class: "flex items-stretch" }, Tn = /* @__PURE__ */ p({
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 (t, n) => {
170
- const l = X("RouterLink");
171
- return o(), i("nav", Ke, [
172
- a("div", Fe, [
173
- e.breadcrumbs ? (o(), i("div", Ie, [
174
- a("ul", null, [
175
- (o(!0), i(x, null, $(e.breadcrumbs, (s) => (o(), i("li", {
176
- key: s.label
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
- s.routerLink ? (o(), g(l, {
184
+ n.routerLink ? (l(), g(s, {
179
185
  key: 0,
180
- to: { name: s.routerLink, params: s.params }
186
+ to: { name: n.routerLink, params: n.params }
181
187
  }, {
182
- default: D(() => [
183
- T(v(s.label), 1)
188
+ default: B(() => [
189
+ F(p(n.label), 1)
184
190
  ]),
185
191
  _: 2
186
- }, 1032, ["to"])) : (o(), i(x, { key: 1 }, [
187
- T(v(s.label), 1)
192
+ }, 1032, ["to"])) : (l(), c($, { key: 1 }, [
193
+ F(p(n.label), 1)
188
194
  ], 64))
189
195
  ]))), 128))
190
196
  ])
191
- ])) : y("", !0)
197
+ ])) : x("", !0)
192
198
  ]),
193
- a("div", Ue, [
194
- a("div", He, [
195
- (o(!0), i(x, null, $(e.menu, (s) => (o(), g(he, P({
196
- key: s.label
197
- }, { ref_for: !0 }, s), null, 16))), 128))
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
- }), Sn = /* @__PURE__ */ p({
209
+ }), Wo = /* @__PURE__ */ v({
204
210
  __name: "dropdown",
205
211
  props: {
206
212
  items: {}
207
213
  },
208
214
  setup(e) {
209
- const t = S(!0);
210
- return (n, l) => (o(), g(ie, {
215
+ const o = S(!0);
216
+ return (t, s) => (l(), g(de, {
211
217
  items: e.items,
212
218
  label: "test",
213
- open: t.value,
219
+ open: o.value,
214
220
  "btn-class": "",
215
221
  "disable-arrow": !0
216
222
  }, null, 8, ["items", "open"]));
217
223
  }
218
- }), je = { class: "font-bold" }, qe = { class: "pt-4" }, Oe = { class: "modal-action" }, Ee = /* @__PURE__ */ p({
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: t, emit: n }) {
231
- const l = {
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
- }, s = e, c = `modal_${ne()}`, h = n, f = () => {
237
- document.getElementById(c)?.showModal();
238
- }, u = () => {
239
- document.getElementById(c)?.close(), h("closeModal");
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 t({ closeModal: u, openModal: f }), Q(
242
- () => s.open,
243
- (d, r, V) => {
244
- s.open ? f() : u();
247
+ return o({ closeModal: d, openModal: m }), ne(
248
+ () => n.open,
249
+ (a, r, w) => {
250
+ n.open ? m() : d();
245
251
  }
246
- ), pe(() => {
247
- s.open && f();
248
- }), (d, r) => (o(), i("dialog", {
249
- id: c,
252
+ ), $e(() => {
253
+ n.open && m();
254
+ }), (a, r) => (l(), c("dialog", {
255
+ id: u,
250
256
  class: "modal"
251
257
  }, [
252
- a("div", {
253
- class: w(["modal-box bg-white", l[e.width]])
258
+ i("div", {
259
+ class: y(["modal-box bg-white", s[e.width]])
254
260
  }, [
255
- e.disableClose ? y("", !0) : (o(), i("button", {
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: u
265
+ onClick: d
260
266
  }, " ✕ ")),
261
- a("h3", je, v(e.modalTitle), 1),
262
- a("div", qe, [
263
- B(d.$slots, "content")
267
+ i("h3", Ge, p(e.modalTitle), 1),
268
+ i("div", Je, [
269
+ M(a.$slots, "content")
264
270
  ]),
265
- a("div", Oe, [
266
- B(d.$slots, "actions")
271
+ i("div", Qe, [
272
+ M(a.$slots, "actions")
267
273
  ])
268
274
  ], 2)
269
275
  ]));
270
276
  }
271
277
  });
272
- var re = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(re || {}), ve = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(ve || {}), j = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(j || {});
273
- const We = {
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
- }, Ze = {
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
- }, Ge = {
289
+ }, tt = {
284
290
  xs: "btn-xs",
285
291
  sm: "btn-sm",
286
292
  lg: "btn-sm",
287
293
  xl: "btn"
288
- }, Je = {
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
- }, q = /* @__PURE__ */ p({
299
+ }, Y = /* @__PURE__ */ v({
294
300
  __name: "btn",
295
301
  props: {
296
302
  href: {},
297
303
  disabled: { type: Boolean, default: !1 },
298
- as: { default: ve.button },
304
+ as: { default: xe.button },
299
305
  icon: {},
300
- type: { default: re.button },
306
+ type: { default: me.button },
301
307
  outline: { type: Boolean, default: !1 },
302
- color: { default: j.primary },
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: t }) {
308
- const n = e, l = t;
309
- return (s, c) => (o(), g(ae(e.as), P({
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(We)[e.color],
313
- b(Ge)[e.size],
318
+ b(Ye)[e.color],
319
+ b(tt)[e.size],
314
320
  { "btn-outline": e.outline, "btn-square": e.square }
315
321
  ]
316
- }, n, {
317
- onClick: c[0] || (c[0] = (h) => l("click"))
322
+ }, t, {
323
+ onClick: u[0] || (u[0] = (h) => s("click"))
318
324
  }), {
319
- default: D(() => [
320
- e.icon ? (o(), g(b(I), {
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"])) : y("", !0),
325
- B(s.$slots, "default")
330
+ }, null, 8, ["icon", "size"])) : x("", !0),
331
+ M(n.$slots, "default")
326
332
  ]),
327
333
  _: 3
328
334
  }, 16, ["class"]));
329
335
  }
330
- }), Qe = ["type", "disabled"], Nn = /* @__PURE__ */ p({
336
+ }), lt = ["type", "disabled"], Zo = /* @__PURE__ */ v({
331
337
  __name: "btn-badge",
332
338
  props: {
333
339
  icon: { default: void 0 },
334
- type: { default: re.button },
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: t }) {
341
- const n = t;
342
- return (l, s) => (o(), i("button", {
343
- class: w(["badge gap-1", b(Je)[e.size], b(Ze)[e.color]]),
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: s[0] || (s[0] = (c) => n("click"))
352
+ onClick: n[0] || (n[0] = (u) => t("click"))
347
353
  }, [
348
- B(l.$slots, "default"),
349
- e.icon ? (o(), g(b(I), {
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"])) : y("", !0)
354
- ], 10, Qe));
359
+ }, null, 8, ["icon", "size"])) : x("", !0)
360
+ ], 10, lt));
355
361
  }
356
- }), Xe = /* @__PURE__ */ p({
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: t }) {
366
- const n = t, l = (s) => {
367
- n("closeModal", { confirmed: s });
371
+ setup(e, { emit: o }) {
372
+ const t = o, s = (n) => {
373
+ t("closeModal", { confirmed: n });
368
374
  };
369
- return (s, c) => (o(), g(Ee, {
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: D(() => [
375
- T(v(e.message), 1)
380
+ content: B(() => [
381
+ F(p(e.message), 1)
376
382
  ]),
377
- actions: D(() => [
378
- C(b(q), {
379
- color: b(j).secondary,
383
+ actions: B(() => [
384
+ P(b(Y), {
385
+ color: b(X).secondary,
380
386
  outline: !0,
381
- onClick: c[0] || (c[0] = (h) => l(!1))
387
+ onClick: u[0] || (u[0] = (h) => s(!1))
382
388
  }, {
383
- default: D(() => [
384
- T(v(e.cancelLabel), 1)
389
+ default: B(() => [
390
+ F(p(e.cancelLabel), 1)
385
391
  ]),
386
392
  _: 1
387
393
  }, 8, ["color"]),
388
- C(b(q), {
389
- onClick: c[1] || (c[1] = (h) => l(!0))
394
+ P(b(Y), {
395
+ onClick: u[1] || (u[1] = (h) => s(!0))
390
396
  }, {
391
- default: D(() => [
392
- T(v(e.confirmLabel), 1)
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 ce {
407
+ class he {
402
408
  constructor() {
403
409
  this.showModal = S(!1), this.modals = [];
404
410
  }
405
- openModal(t) {
406
- const n = t.props.onClose, l = ne(), s = t;
407
- t.props.onClose = (c) => {
408
- n(c), this.closeModal(l);
409
- }, s.id = l, this.modals = [...this.modals, s], this.showModal.value = Date.now();
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(t) {
412
- this.modals = this.modals.filter((n) => n.id !== t), this.showModal.value = Date.now();
417
+ closeModal(o) {
418
+ this.modals = this.modals.filter((t) => t.id !== o), this.showModal.value = Date.now();
413
419
  }
414
- static showConfirm(t) {
420
+ static showConfirm(o) {
415
421
  this.getInstance().openModal({
416
- component: Xe,
417
- props: t
422
+ component: nt,
423
+ props: o
418
424
  });
419
425
  }
420
- static openModal(t) {
421
- this.getInstance().openModal(t);
426
+ static openModal(o) {
427
+ this.getInstance().openModal(o);
422
428
  }
423
429
  static getInstance() {
424
- return this.instance || (this.instance = new ce()), this.instance;
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 Ye = /* @__PURE__ */ p({
439
+ const st = /* @__PURE__ */ v({
434
440
  __name: "modalWrapper",
435
441
  setup(e) {
436
- const t = ce.getInstance(), n = k(() => t.showModal.value ? t.modals : []);
437
- return (l, s) => (o(!0), i(x, null, $(n.value, (c) => (o(), g(ae(c?.component), P({
438
- key: c.id,
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
- }, c?.props, {
446
+ }, u?.props, {
441
447
  open: !0,
442
- onCloseModal: c?.props?.onClose
448
+ onCloseModal: u?.props?.onClose
443
449
  }), null, 16, ["onCloseModal"]))), 128));
444
450
  }
445
- }), et = /* @__PURE__ */ p({
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 t = {
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 (n, l) => (o(), i("div", {
464
+ return (t, s) => (l(), c("div", {
459
465
  role: "alert",
460
- class: w(`alert ${t[e.type]} `)
466
+ class: y(`alert ${o[e.type]} `)
461
467
  }, [
462
- a("span", null, v(e.message), 1)
468
+ i("span", null, p(e.message), 1)
463
469
  ], 2));
464
470
  }
465
- }), tt = 5e3;
466
- class ue {
471
+ }), it = 5e3;
472
+ class be {
467
473
  constructor() {
468
- this.notifications = S([]), this.addNotification = (t, n = "info") => {
469
- const l = {
470
- id: ne(),
471
- duration: tt,
472
- message: t,
473
- type: n
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(l), this.removeNotificationAfterDuration(l);
476
- }, this.removeNotificationAfterDuration = (t) => {
481
+ this.notifications.value.push(s), this.removeNotificationAfterDuration(s);
482
+ }, this.removeNotificationAfterDuration = (o) => {
477
483
  setTimeout(() => {
478
- this.removeNotification(t.id);
479
- }, t.duration);
480
- }, this.removeNotification = (t) => {
481
- this.notifications.value = this.notifications.value.filter((n) => n.id !== t);
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 ue()), this.instance;
491
+ return this.instance || (this.instance = new be()), this.instance;
486
492
  }
487
- static info(t) {
488
- this.getInstance().addNotification(t, "info");
493
+ static info(o) {
494
+ this.getInstance().addNotification(o, "info");
489
495
  }
490
- static success(t) {
491
- this.getInstance().addNotification(t, "success");
496
+ static success(o) {
497
+ this.getInstance().addNotification(o, "success");
492
498
  }
493
- static warning(t) {
494
- this.getInstance().addNotification(t, "warning");
499
+ static warning(o) {
500
+ this.getInstance().addNotification(o, "warning");
495
501
  }
496
- static error(t) {
497
- this.getInstance().addNotification(t, "error");
502
+ static error(o) {
503
+ this.getInstance().addNotification(o, "error");
498
504
  }
499
- static removeNotification(t) {
500
- this.getInstance().removeNotification(t);
505
+ static removeNotification(o) {
506
+ this.getInstance().removeNotification(o);
501
507
  }
502
508
  }
503
- const nt = { class: "toast toast-top toast-center z-[999]" }, ot = /* @__PURE__ */ p({
509
+ const rt = { class: "toast toast-top toast-center z-[999]" }, ct = /* @__PURE__ */ v({
504
510
  __name: "notifications",
505
511
  setup(e) {
506
- const t = ue.getInstance();
507
- return (n, l) => (o(), i("div", nt, [
508
- (o(!0), i(x, null, $(b(t).notifications.value, (s) => (o(), g(et, P({
509
- key: s.id
510
- }, { ref_for: !0 }, s), null, 16))), 128))
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
- }), st = { class: "flex h-screen flex-col" }, lt = { class: "shrink-0" }, at = { class: "navbar bg-primary text-primary-content w-full z-100" }, it = { class: "navbar-start" }, rt = { class: "navbar-center" }, ct = ["href"], ut = { class: "navbar-end" }, dt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, mt = { class: "drawer-side h-full shadow-md" }, ft = { class: "flex-grow overflow-y-auto" }, bt = { class: "bg-base-200 p-4" }, Rn = /* @__PURE__ */ p({
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: t }) {
524
- const l = e, s = S(!1), c = () => {
525
- s.value = !s.value;
526
- }, h = t, f = k(() => l.user ? {
527
- label: l.user.name,
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 (u, d) => (o(), i(x, null, [
538
- C(ot),
539
- C(b(Ye)),
540
- a("div", st, [
541
- a("header", lt, [
542
- a("nav", at, [
543
- a("div", it, [
544
- a("button", {
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: c
553
+ onClick: u
548
554
  }, [
549
- C(b(I), {
555
+ P(b(j), {
550
556
  icon: b(z).Hamburger
551
557
  }, null, 8, ["icon"])
552
558
  ])
553
559
  ]),
554
- a("div", rt, [
555
- a("a", {
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
- }, v(e.title), 9, ct)
564
+ }, p(e.title), 9, ft)
559
565
  ]),
560
- a("div", ut, [
561
- f.value ? (o(), g(b(ie), P({ key: 0 }, f.value, { "btn-class": "" }), null, 16)) : y("", !0)
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
- a("div", {
566
- class: w(["drawer flex-1 overflow-hidden", { "drawer-open": s.value }])
571
+ i("div", {
572
+ class: y(["drawer flex-1 overflow-hidden", { "drawer-open": n.value }])
567
573
  }, [
568
- W(a("input", {
574
+ U(i("input", {
569
575
  id: "app-drawer",
570
- "onUpdate:modelValue": d[0] || (d[0] = (r) => s.value = r),
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
- [ye, s.value]
580
+ [ge, n.value]
575
581
  ]),
576
- a("main", dt, [
577
- B(u.$slots, "default")
582
+ i("main", vt, [
583
+ M(d.$slots, "default")
578
584
  ]),
579
- a("div", mt, [
580
- d[1] || (d[1] = a("label", {
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
- a("div", {
591
+ i("div", {
586
592
  class: "menu bg-base-100 h-full flex flex-col justify-between",
587
- style: le({ width: e.widthSidebar + "px" })
593
+ style: ie({ width: e.widthSidebar + "px" })
588
594
  }, [
589
- a("ul", ft, [
590
- (o(!0), i(x, null, $(e.menu, (r) => (o(), i("li", {
595
+ i("ul", yt, [
596
+ (l(!0), c($, null, L(e.menu, (r) => (l(), c("li", {
591
597
  key: r.label
592
598
  }, [
593
- C(b(_e), {
599
+ P(b(Ve), {
594
600
  to: { name: r.routerLink, params: r.params }
595
601
  }, {
596
- default: D(() => [
597
- T(v(r.label), 1)
602
+ default: B(() => [
603
+ F(p(r.label), 1)
598
604
  ]),
599
605
  _: 2
600
606
  }, 1032, ["to"])
601
607
  ]))), 128))
602
608
  ]),
603
- a("div", bt, " version: " + v(e.version), 1)
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
- }), O = /* @__PURE__ */ p({
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: t }) {
621
- const n = e, l = t, s = k(
622
- () => n.neverActive ? !1 : n.page === n.currentPage
623
- ), c = k(() => n.neverActive ? j.blank : s.value ? j.primary : j.secondary), h = () => {
624
- l("updatePage", n.page);
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 (f, u) => (o(), g(b(q), {
632
+ return (m, d) => (l(), g(b(Y), {
627
633
  disabled: e.disabled,
628
634
  square: !0,
629
635
  size: "xs",
630
- color: c.value,
631
- onClick: u[0] || (u[0] = (d) => h())
636
+ color: u.value,
637
+ onClick: d[0] || (d[0] = (a) => h())
632
638
  }, {
633
- default: D(() => [
634
- T(v(e.label), 1)
639
+ default: B(() => [
640
+ F(p(e.label), 1)
635
641
  ]),
636
642
  _: 1
637
643
  }, 8, ["disabled", "color"]));
638
644
  }
639
- }), ht = { class: "flex gap-2" }, vt = { class: "flex flex-1 justify-center items-center" }, gt = { class: "flex gap-1" }, pt = { class: "text-sm" }, E = 6, yt = /* @__PURE__ */ p({
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: t }) {
648
- const n = e, l = t, s = k(() => {
649
- let r = Math.ceil(n.totalItems / n.itemsPerPage);
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
- }), c = E / 2, h = k(() => {
652
- if (s.value <= E)
657
+ }), u = te / 2, h = k(() => {
658
+ if (n.value <= te)
653
659
  return {
654
660
  min: 1,
655
- max: s.value
661
+ max: n.value
656
662
  };
657
- let r = n.currentPage - c;
658
- r <= 1 ? r = 1 : r + E > s.value && (r = s.value - E);
659
- let V = r + E;
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: V
668
+ max: w
663
669
  };
664
- }), f = (r) => ({
670
+ }), m = (r) => ({
665
671
  label: "...",
666
672
  currentPage: r,
667
673
  page: -10,
668
674
  disabled: !0,
669
675
  neverActive: !0
670
- }), u = k(() => {
671
- let r = s.value;
676
+ }), d = k(() => {
677
+ let r = n.value;
672
678
  r < 1 && (r = 1);
673
- const V = n.currentPage, A = [], { min: N, max: U } = h.value;
674
- return Array.from({ length: r }, (M, R) => {
675
- const m = R + 1;
676
- m !== 1 && m !== r && (m > U || m < N) || (m === r && r > 1 && U < r && A.push(f(V)), A.push({
677
- label: `${m}`,
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: V,
680
- page: m
681
- }), m === 1 && r > 1 && N > 1 && A.push(f(V)));
682
- }), A;
683
- }), d = (r) => {
684
- l("updatePage", r);
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, V) => (o(), i("div", ht, [
687
- a("div", vt, [
688
- a("div", gt, [
689
- C(O, P(n, {
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: d
701
+ onUpdatePage: a
696
702
  }), null, 16, ["current-page", "disabled"]),
697
- C(O, P(n, {
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: d
709
+ onUpdatePage: a
704
710
  }), null, 16, ["page", "current-page", "disabled"]),
705
- (o(!0), i(x, null, $(u.value, (A) => (o(), g(O, P({
706
- key: A.page,
711
+ (l(!0), c($, null, L(d.value, (T) => (l(), g(ee, A({
712
+ key: T.page,
707
713
  ref_for: !0
708
- }, A, { onUpdatePage: d }), null, 16))), 128)),
709
- C(O, P(n, {
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: n.currentPage === s.value,
715
- onUpdatePage: d
720
+ disabled: t.currentPage === n.value,
721
+ onUpdatePage: a
716
722
  }), null, 16, ["page", "current-page", "disabled"]),
717
- C(O, P(n, {
718
- page: s.value,
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: n.currentPage === s.value,
723
- onUpdatePage: d
728
+ disabled: t.currentPage === n.value,
729
+ onUpdatePage: a
724
730
  }), null, 16, ["page", "current-page", "disabled"])
725
731
  ])
726
732
  ]),
727
- a("div", pt, " page " + v(e.currentPage) + " of " + v(s.value), 1)
733
+ i("div", Ct, " page " + p(e.currentPage) + " of " + p(n.value), 1)
728
734
  ]));
729
735
  }
730
- }), de = (e, t) => {
731
- const n = e.__vccOpts || e;
732
- for (const [l, s] of t)
733
- n[l] = s;
734
- return n;
735
- }, wt = () => ({
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
- }), xt = p({
754
+ }), Lt = v({
749
755
  name: "TextCell",
750
756
  props: {
751
- ...wt()
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
- }), kt = xt;
760
- function $t(e, t, n, l, s, c) {
761
- return v(e.value) + " - value";
765
+ }), Mt = Lt;
766
+ function Pt(e, o, t, s, n, u) {
767
+ return p(e.value);
762
768
  }
763
- const Kn = /* @__PURE__ */ de(kt, [["render", $t]]), Ct = { class: "flex-grow pr-2" }, _t = { class: "h-4 w-4" }, Lt = /* @__PURE__ */ p({
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: t }) {
772
- const n = e, l = k(
773
- () => n.sortDirection === "asc" ? z.BarsArrowUp : z.BarsArrowDown
774
- ), s = k(() => n.column.options?.sortId ?? n.column.id), c = () => {
775
- h("sort", s.value);
776
- }, h = t;
777
- return (f, u) => (o(), i("button", {
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: c
785
+ onClick: u
780
786
  }, [
781
- a("span", Ct, v(e.column.label), 1),
782
- a("div", _t, [
783
- e.sortColumn === s.value ? (o(), g(b(I), {
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: l.value
786
- }, null, 8, ["icon"])) : y("", !0)
791
+ icon: s.value
792
+ }, null, 8, ["icon"])) : x("", !0)
787
793
  ])
788
794
  ]));
789
795
  }
790
- }), Mt = { class: "table w-full" }, Bt = { key: 0 }, Pt = ["colspan"], Dt = { class: "flex gap-2" }, Fn = /* @__PURE__ */ p({
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: t }) {
802
- const n = t, l = (f) => {
803
- n("edit", f);
804
- }, s = (f) => {
805
- n("delete", f);
806
- }, c = (f) => {
807
- n("updatePage", f);
808
- }, h = (f) => {
809
- n("sort", f);
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 (f, u) => (o(), i(x, null, [
812
- a("table", Mt, [
813
- a("thead", null, [
814
- a("tr", null, [
815
- (o(!0), i(x, null, $(e.displayColumns, (d) => (o(), i("th", {
816
- key: d.scope
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
- C(Lt, P({ column: d }, { ref_for: !0 }, e.sort, { onSort: h }), null, 16, ["column"])
824
+ P(Dt, A({ column: a }, { ref_for: !0 }, e.sort, { onSort: h }), null, 16, ["column"])
819
825
  ]))), 128)),
820
- u[0] || (u[0] = a("th", null, null, -1))
826
+ d[0] || (d[0] = i("th", null, null, -1))
821
827
  ])
822
828
  ]),
823
- a("tbody", null, [
824
- e.loading ? (o(), i("tr", Bt, [
825
- a("td", {
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
- }, [...u[1] || (u[1] = [
829
- a("span", { class: "loading loading-bars loading-xs" }, null, -1)
830
- ])], 8, Pt)
831
- ])) : y("", !0),
832
- (o(!0), i(x, null, $(e.data, (d) => (o(), i("tr", {
833
- key: d.id
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
- (o(!0), i(x, null, $(e.displayColumns, (r) => (o(), i("td", {
841
+ (l(!0), c($, null, L(e.displayColumns, (r) => (l(), c("td", {
836
842
  key: r.scope
837
843
  }, [
838
- (o(), g(ae(r.component), P({ ref_for: !0 }, r, {
839
- data: d,
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
- a("td", null, [
844
- a("span", Dt, [
845
- (o(!0), i(x, null, $(e.actions, (r) => (o(), g(q, {
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: (V) => r.action(d)
855
+ onClick: (w) => r.action(a)
850
856
  }, {
851
- default: D(() => [
852
- T(v(r.label), 1)
857
+ default: B(() => [
858
+ F(p(r.label), 1)
853
859
  ]),
854
860
  _: 2
855
861
  }, 1032, ["icon", "onClick"]))), 128)),
856
- C(q, {
862
+ P(Y, {
857
863
  icon: b(z).Edit,
858
864
  outline: !0,
859
- onClick: (r) => l(d)
865
+ onClick: (r) => s(a)
860
866
  }, null, 8, ["icon", "onClick"]),
861
- C(q, {
867
+ P(Y, {
862
868
  icon: b(z).Delete,
863
869
  outline: !0,
864
- onClick: (r) => s(d)
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 ? (o(), g(yt, {
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: c
878
- }, null, 8, ["total-items", "items-per-page", "current-page"])) : y("", !0)
883
+ onUpdatePage: u
884
+ }, null, 8, ["total-items", "items-per-page", "current-page"])) : x("", !0)
879
885
  ], 64));
880
886
  }
881
- }), Vt = {}, At = { class: "card bg-base-100 shadow-sm" }, zt = { class: "card-body" }, Tt = {
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
- }, St = {
890
+ }, Kt = {
885
891
  key: 1,
886
892
  class: "card-actions justify-end"
887
893
  };
888
- function Nt(e, t) {
889
- return o(), i("div", At, [
890
- a("div", zt, [
891
- e.$slots.title ? (o(), i("h2", Tt, [
892
- B(e.$slots, "title")
893
- ])) : y("", !0),
894
- a("p", null, [
895
- B(e.$slots, "default"),
896
- B(e.$slots, "content")
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 ? (o(), i("div", St, [
899
- B(e.$slots, "actions")
900
- ])) : y("", !0)
904
+ e.$slots.actions ? (l(), c("div", Kt, [
905
+ M(e.$slots, "actions")
906
+ ])) : x("", !0)
901
907
  ])
902
908
  ]);
903
909
  }
904
- const In = /* @__PURE__ */ de(Vt, [["render", Nt]]), Un = (e, t) => {
910
+ const Xo = /* @__PURE__ */ fe(Nt, [["render", qt]]), Yo = (e, o) => {
905
911
  if (!e) return null;
906
- const n = (l) => {
907
- e.contains(l.target) || t();
912
+ const t = (s) => {
913
+ e.contains(s.target) || o();
908
914
  };
909
- return document.addEventListener("click", n), n;
910
- }, Hn = (e) => {
915
+ return document.addEventListener("click", t), t;
916
+ }, el = (e) => {
911
917
  document.removeEventListener("click", e);
912
- }, jn = {
913
- beforeMount(e, t) {
914
- e.clickOutsideEvent = function(n) {
915
- e === n.target || e.contains(n.target) || t.value(n);
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 qn(e) {
923
- const t = we();
924
- if (!t)
928
+ function ol(e) {
929
+ const o = Ce();
930
+ if (!o)
925
931
  return !1;
926
- const n = t.vnode.props;
927
- return n ? !!(n[me(e)] || // also try camelCase event handler (#2249)
928
- n[me(xe(e))]) : !1;
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 Rt = {
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
- }, G = () => ({
962
- id: ne(),
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: Rt
970
- }), Kt = () => ({
971
- ...G(),
977
+ styles: jt,
978
+ width: "w-24"
979
+ }), Ht = () => ({
980
+ ...q(),
972
981
  options: [],
973
982
  valueKey: "value",
974
983
  labelKey: "label"
975
- }), Ft = (e, t, n) => !!(e && n), It = (e, t, n, l) => t === void 0 || t !== void 0 && !e || !l && !n, Ut = { key: 0 }, oe = /* @__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({
976
985
  __name: "ControlWrapper",
977
- props: /* @__PURE__ */ Z({
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
- }, G()),
998
+ styles: {},
999
+ width: {}
1000
+ }, q()),
990
1001
  setup(e) {
991
- const t = e, n = k(() => !It(
992
- t.visible,
993
- t.description,
994
- t.isFocused,
1002
+ const o = e, t = k(() => !Ot(
1003
+ o.visible,
1004
+ o.description,
1005
+ o.isFocused,
995
1006
  !0
996
- )), l = k(() => t.required), s = k(() => Ft(
997
- t.isTouched,
998
- t.isFocused,
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 ? y("", !0) : (o(), i("legend", {
1011
+ e.hideLabel ? x("", !0) : (l(), c("legend", {
1005
1012
  key: 0,
1006
- class: w(e.styles.control.label)
1013
+ class: y(e.styles.control.label)
1007
1014
  }, [
1008
- T(v(e.label) + " ", 1),
1009
- l.value ? (o(), i("span", Ut, "*")) : y("", !0)
1015
+ F(p(e.label) + " ", 1),
1016
+ s.value ? (l(), c("span", Et, "*")) : x("", !0)
1010
1017
  ], 2)),
1011
- B(c.$slots, "default"),
1012
- a("p", {
1013
- class: w(["fieldset-label h-4", { "text-error": s.value }])
1014
- }, v(s.value ? e.errors : n.value ? e.description : null), 3)
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
- }), Ht = ["disabled"], jt = ["value"], On = /* @__PURE__ */ p({
1024
+ }), Wt = ["disabled"], Zt = ["value"], ll = /* @__PURE__ */ v({
1018
1025
  __name: "SelectComponent",
1019
- props: /* @__PURE__ */ F(/* @__PURE__ */ Z({
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
- ...G(),
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__ */ F(["change", "focus", "blur"], ["update:modelValue"]),
1044
- setup(e, { emit: t }) {
1045
- const n = e, l = t, s = Y(e, "modelValue"), c = (u) => {
1046
- l("change", u);
1047
- }, h = (u) => {
1048
- l("focus", u);
1049
- }, f = (u) => {
1050
- l("blur", u);
1051
- };
1052
- return (u, d) => (o(), g(oe, ee(te(n)), {
1053
- default: D(() => [
1054
- W(a("select", {
1055
- "onUpdate:modelValue": d[0] || (d[0] = (r) => s.value = r),
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: w(["select select-bordered", e.styles.control.select]),
1058
- onChange: c,
1068
+ class: y(d.value),
1069
+ onChange: u,
1059
1070
  onFocus: h,
1060
- onBlur: f
1071
+ onBlur: m
1061
1072
  }, [
1062
- (o(!0), i(x, null, $(e.options, (r) => (o(), i("option", {
1063
- key: r[e.valueKey],
1064
- value: r
1065
- }, v(r[e.labelKey]), 9, jt))), 128))
1066
- ], 42, Ht), [
1067
- [ke, s.value]
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
- }), qt = ["disabled"], Ot = {
1084
+ }), Gt = ["disabled"], Jt = {
1074
1085
  key: 0,
1075
- class: /* @__PURE__ */ w([
1086
+ class: /* @__PURE__ */ y([
1076
1087
  `bg-base-100 w-52 shadow -mt-5
1077
1088
  absolute z-50`
1078
1089
  ])
1079
- }, Et = ["onClick", "onBlur"], En = /* @__PURE__ */ p({
1090
+ }, Qt = ["onClick", "onBlur"], nl = /* @__PURE__ */ v({
1080
1091
  __name: "AutoComplete",
1081
- props: /* @__PURE__ */ F(/* @__PURE__ */ Z({
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
- }, Kt()), {
1110
+ }, Ht()), {
1098
1111
  modelValue: {},
1099
1112
  modelModifiers: {}
1100
1113
  }),
1101
- emits: /* @__PURE__ */ F(["change", "focus", "blur"], ["update:modelValue"]),
1102
- setup(e, { emit: t }) {
1103
- const n = e, l = t, s = Y(e, "modelValue"), c = S(""), h = (m) => {
1104
- l("change", m);
1105
- }, f = (m) => {
1106
- l("focus", m);
1107
- }, u = (m) => {
1108
- l("blur", m);
1109
- }, d = S(!1), r = S([]), V = (m) => {
1110
- d.value = !0, A(m);
1111
- }, A = (m) => {
1112
- s.value = m, h(m);
1113
- }, N = (m) => {
1114
- r.value?.length === m + 1 && (r.value = []);
1115
- }, U = Le(), M = (m) => m[n.valueKey], R = (m) => m?.[n.labelKey] ?? "";
1116
- return Q(
1117
- () => s.value,
1118
- (m) => {
1119
- m && !M(m) || (d.value = !0, r.value = [], c.value = R(m));
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
- ), Q(
1123
- () => c.value,
1124
- (m) => {
1125
- if (d.value) {
1126
- d.value = !1;
1135
+ ), ne(
1136
+ () => u.value,
1137
+ (f) => {
1138
+ if (a.value) {
1139
+ a.value = !1;
1127
1140
  return;
1128
1141
  }
1129
- if (A({ [n.labelKey]: m }), n.config) {
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
- ), (m, _) => {
1137
- const H = fe("click-outside");
1138
- return o(), g(oe, ee(te(n)), {
1139
- default: D(() => [
1140
- W(a("input", {
1141
- "onUpdate:modelValue": _[0] || (_[0] = (K) => c.value = K),
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: w([e.styles.control.select]),
1165
+ class: y([R.value]),
1145
1166
  disabled: !e.enabled,
1146
- onFocus: f,
1147
- onBlur: u
1148
- }, null, 42, qt), [
1149
- [$e, c.value]
1167
+ onFocus: m,
1168
+ onBlur: d,
1169
+ onClick: D
1170
+ }, null, 42, Gt), [
1171
+ [ue, u.value]
1150
1172
  ]),
1151
- W((o(), i("div", null, [
1152
- r.value?.length ? (o(), i("ul", Ot, [
1153
- (o(!0), i(x, null, $(r.value, (K, se) => (o(), i("li", {
1154
- key: K[e.valueKey]
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
- a("button", {
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: (ge) => V(K),
1160
- onBlur: (ge) => N(se)
1161
- }, v(R(K)), 41, Et)
1181
+ onClick: (ae) => w(W),
1182
+ onBlur: (ae) => N(pe)
1183
+ }, p(Q(W)), 41, Qt)
1162
1184
  ]))), 128))
1163
- ])) : y("", !0)
1185
+ ])) : x("", !0)
1164
1186
  ])), [
1165
- [H, () => r.value = []]
1187
+ [oe, () => r.value = []]
1166
1188
  ])
1167
1189
  ]),
1168
1190
  _: 1
1169
1191
  }, 16);
1170
1192
  };
1171
1193
  }
1172
- }), Wt = {
1194
+ }), Xt = {
1173
1195
  key: 0,
1174
- class: /* @__PURE__ */ w([
1196
+ class: /* @__PURE__ */ y([
1175
1197
  `bg-base-100 w-52 shadow -mt-5
1176
1198
  absolute z-50 p-0`
1177
1199
  ])
1178
- }, Zt = ["onClick"], Gt = { class: "w-4 mr-2" }, Wn = /* @__PURE__ */ p({
1200
+ }, Yt = ["onClick"], eo = { class: "w-4 mr-2" }, sl = /* @__PURE__ */ v({
1179
1201
  __name: "MultiSelect",
1180
- props: /* @__PURE__ */ F(/* @__PURE__ */ Z({
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
- ...G(),
1220
+ ...q(),
1197
1221
  valueKey: "value",
1198
1222
  labelKey: "label"
1199
1223
  }), {
1200
1224
  modelValue: {},
1201
1225
  modelModifiers: {}
1202
1226
  }),
1203
- emits: /* @__PURE__ */ F(["change", "focus", "blur"], ["update:modelValue"]),
1204
- setup(e, { emit: t }) {
1205
- const n = e, l = t, s = Y(e, "modelValue");
1206
- let c = !1;
1207
- const h = (M) => {
1208
- l("change", M);
1209
- }, f = S(!1), u = () => {
1210
- f.value = !f.value, c = !0;
1211
- }, d = () => {
1212
- c || (f.value = !1), c = !1;
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
- () => s.value?.map((M) => N(M)) ?? []
1215
- ), V = (M) => r.value.includes(M), A = (M, R) => {
1216
- M.preventDefault();
1217
- let m = s.value ?? [];
1218
- const _ = N(R);
1219
- V(_) ? m = m.filter((K) => N(K) !== _) : m.push(R), s.value = m, h(m);
1220
- }, N = (M) => M[n.valueKey], U = (M) => M?.[n.labelKey] ?? "";
1221
- return (M, R) => {
1222
- const m = fe("click-outside");
1223
- return o(), g(oe, ee(te(n)), {
1224
- default: D(() => [
1225
- a("button", {
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: w([e.styles.control.select, "w-full truncate block"]),
1228
- onClick: u
1229
- }, v(s.value?.map?.((_) => U(_)).join(", ") ?? "Select value"), 3),
1230
- W((o(), i("div", null, [
1231
- f.value ? (o(), i("ul", Wt, [
1232
- (o(!0), i(x, null, $(e.options, (_) => (o(), i("li", {
1233
- key: _[e.valueKey]
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
- a("button", {
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: (H) => A(H, _)
1267
+ onClick: (I) => T(I, f)
1239
1268
  }, [
1240
- a("div", Gt, [
1241
- V(N(_)) ? (o(), g(b(I), {
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"])) : y("", !0)
1274
+ }, null, 8, ["icon"])) : x("", !0)
1246
1275
  ]),
1247
- T(" " + v(U(_)), 1)
1248
- ], 8, Zt)
1276
+ F(" " + p(E(f)), 1)
1277
+ ], 8, Yt)
1249
1278
  ]))), 128))
1250
- ])) : y("", !0)
1279
+ ])) : x("", !0)
1251
1280
  ])), [
1252
- [m, () => d()]
1281
+ [R, () => a()]
1253
1282
  ])
1254
1283
  ]),
1255
1284
  _: 1
1256
1285
  }, 16);
1257
1286
  };
1258
1287
  }
1259
- }), Jt = { class: "card bg-base-100 border border-base-300" }, Qt = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, Xt = ["title", "onClick"], Yt = ["innerHTML"], en = { class: "card-body p-3" }, tn = /* @__PURE__ */ p({
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__ */ F(/* @__PURE__ */ Z({
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
- ...G(),
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__ */ F(["update:modelValue"], ["update:modelValue"]),
1293
- setup(e, { emit: t }) {
1294
- const n = e, l = t, s = Y(e, "modelValue"), c = De({
1295
- content: s.value ?? "",
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
- Pe.configure({
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
- Ae.configure({
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
- l("update:modelValue", h.storage.markdown.getMarkdown());
1346
+ s("change", h.storage.markdown.getMarkdown());
1316
1347
  }
1317
1348
  });
1318
- return Ce(() => {
1319
- c.value?.destroy();
1320
- }), (h, f) => (o(), g(oe, ee(te(n)), {
1321
- default: D(() => [
1322
- a("div", Jt, [
1323
- a("div", Qt, [
1324
- (o(!0), i(x, null, $(e.actions, (u) => (o(), i("button", {
1325
- key: u.name,
1326
- class: w(["btn btn-sm btn-ghost", { "btn-active": b(c)?.isActive(u.name) }]),
1327
- title: u.label,
1328
- onClick: (d) => u.action(b(c))
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
- a("span", {
1331
- innerHTML: u.label
1332
- }, null, 8, Yt)
1333
- ], 10, Xt))), 128))
1362
+ i("span", {
1363
+ innerHTML: d.label
1364
+ }, null, 8, no)
1365
+ ], 10, lo))), 128))
1334
1366
  ]),
1335
- a("div", en, [
1336
- C(b(Ve), {
1337
- editor: b(c),
1338
- class: "prose prose-sm max-w-none min-h-24"
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
- }), Zn = /* @__PURE__ */ de(tn, [["__scopeId", "data-v-0d8fa163"]]), nn = { class: "grid grid-cols-[auto_1fr_auto] h-full overflow-hidden" }, on = {
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
- }, sn = { class: "flex-1 overflow-y-auto bg-white" }, ln = { 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" }, Gn = /* @__PURE__ */ p({
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 t = S({ left: !0, right: !0 }), n = (l) => {
1357
- t.value[l] = !t.value[l];
1610
+ const o = S({ left: !0, right: !0 }), t = (s) => {
1611
+ o.value[s] = !o.value[s];
1358
1612
  };
1359
- return (l, s) => (o(), i("main", nn, [
1360
- a("aside", on, [
1361
- a("div", {
1362
- class: w(["absolute top-0 z-20", t.value.left ? "-right-0" : "-right-2"])
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
- a("button", {
1618
+ i("button", {
1365
1619
  class: "btn btn-ghost btn-circle",
1366
- onClick: s[0] || (s[0] = (c) => n("left"))
1620
+ onClick: n[0] || (n[0] = (u) => t("left"))
1367
1621
  }, [
1368
- C(b(I), {
1622
+ P(b(j), {
1369
1623
  size: "sm",
1370
- icon: t.value.left ? b(z).DblChevronLeft : b(z).DblChevronRight
1624
+ icon: o.value.left ? b(z).DblChevronLeft : b(z).DblChevronRight
1371
1625
  }, null, 8, ["icon"])
1372
1626
  ])
1373
1627
  ], 2),
1374
- t.value.left ? (o(), i("div", {
1628
+ o.value.left ? (l(), c("div", {
1375
1629
  key: 0,
1376
- style: le({ width: e.widthLeft + "px" }),
1630
+ style: ie({ width: e.widthLeft + "px" }),
1377
1631
  class: "h-full overflow-y-auto p-4"
1378
1632
  }, [
1379
- B(l.$slots, "left-drawer")
1380
- ], 4)) : y("", !0)
1633
+ M(s.$slots, "left-drawer")
1634
+ ], 4)) : x("", !0)
1381
1635
  ]),
1382
- a("div", sn, [
1383
- B(l.$slots, "default")
1636
+ i("div", vo, [
1637
+ M(s.$slots, "default")
1384
1638
  ]),
1385
- a("aside", ln, [
1386
- t.value.right ? (o(), i("div", {
1639
+ i("aside", go, [
1640
+ o.value.right ? (l(), c("div", {
1387
1641
  key: 0,
1388
- style: le({ width: e.widthRight + "px" }),
1642
+ style: ie({ width: e.widthRight + "px" }),
1389
1643
  class: "h-full overflow-y-auto p-4"
1390
1644
  }, [
1391
- B(l.$slots, "right-drawer")
1392
- ], 4)) : y("", !0),
1393
- a("div", {
1394
- class: w(["absolute top-0 z-20", t.value.right ? "-left-0" : "-left-2"])
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
- a("button", {
1650
+ i("button", {
1397
1651
  class: "btn btn-ghost btn-circle",
1398
- onClick: s[1] || (s[1] = (c) => n("right"))
1652
+ onClick: n[1] || (n[1] = (u) => t("right"))
1399
1653
  }, [
1400
- C(b(I), {
1654
+ P(b(j), {
1401
1655
  size: "sm",
1402
- icon: t.value.right ? b(z).DblChevronRight : b(z).DblChevronLeft
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
- }), an = { class: "ml-1" }, rn = { class: "truncate flex-1 min-w-0 text-left" }, cn = {
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
- }, un = /* @__PURE__ */ p({
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: t }) {
1422
- const n = e, l = t, s = k(() => n.active === n.node.id);
1423
- return (c, h) => {
1424
- const f = X("TreeItem", !0);
1425
- return o(), i("li", an, [
1426
- a("div", {
1427
- class: w([
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
- s.value ? "text-primary" : ""
1684
+ n.value ? "text-primary" : ""
1431
1685
  ])
1432
1686
  }, [
1433
- e.node.children?.length > 0 ? (o(), i("span", {
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] = (u) => l("toggle", e.node))
1690
+ onClick: h[0] || (h[0] = (d) => s("toggle", e.node))
1437
1691
  }, [
1438
- e.node.children && e.isExpanded(e.node.id) ? (o(), g(b(Me), {
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
- })) : (o(), g(b(Be), {
1695
+ })) : (l(), g(b(ze), {
1442
1696
  key: 1,
1443
1697
  class: "w-3 h-3"
1444
1698
  }))
1445
- ])) : y("", !0),
1446
- a("div", {
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] = (u) => l("select", e.node))
1702
+ onClick: h[1] || (h[1] = (d) => s("select", e.node))
1449
1703
  }, [
1450
- a("div", rn, v(e.node.label), 1),
1451
- e.node.tag ? (o(), i("div", cn, v(e.node.tag), 1)) : y("", !0)
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) ? (o(), i("ul", {
1708
+ e.node.children && e.isExpanded(e.node.id) ? (l(), c("ul", {
1455
1709
  key: 0,
1456
- class: w([
1710
+ class: y([
1457
1711
  "ml-4 border-l pl-2",
1458
- { "border-gray-200": !s.value, "border-primary": s.value }
1712
+ { "border-gray-200": !n.value, "border-primary": n.value }
1459
1713
  ])
1460
1714
  }, [
1461
- (o(!0), i(x, null, $(e.node.children, (u) => (o(), g(f, {
1462
- key: u.id,
1463
- node: u,
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] = (d) => l("toggle", d)),
1468
- onSelect: h[3] || (h[3] = (d) => l("select", d))
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)) : y("", !0)
1724
+ ], 2)) : x("", !0)
1471
1725
  ]);
1472
1726
  };
1473
1727
  }
1474
- }), dn = { class: "select-none text-sm" }, Jn = /* @__PURE__ */ p({
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: t }) {
1482
- const n = e, l = t, s = S(/* @__PURE__ */ new Set()), c = (u) => {
1483
- const d = u.id;
1484
- if (!u.children || u.children.length === 0) {
1485
- l("select", u);
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
- s.value.has(d) ? s.value.delete(d) : s.value.add(d);
1489
- }, h = (u) => {
1490
- l("select", u), s.value.add(u.id);
1491
- }, f = (u) => s.value.has(u);
1492
- return (u, d) => (o(), i("ul", dn, [
1493
- (o(!0), i(x, null, $(n.data, (r) => (o(), g(un, {
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: s.value,
1750
+ expanded: n.value,
1497
1751
  active: e.active,
1498
- "is-expanded": f,
1499
- onToggle: c,
1752
+ "is-expanded": m,
1753
+ onToggle: u,
1500
1754
  onSelect: h
1501
1755
  }, null, 8, ["node", "expanded", "active"]))), 128))
1502
1756
  ]));
1503
1757
  }
1504
- }), mn = {
1758
+ }), Co = {
1505
1759
  key: 0,
1506
1760
  class: "flex items-center justify-center h-20"
1507
- }, Qn = /* @__PURE__ */ p({
1761
+ }, hl = /* @__PURE__ */ v({
1508
1762
  __name: "loading",
1509
1763
  props: {
1510
1764
  loading: { type: Boolean }
1511
1765
  },
1512
1766
  setup(e) {
1513
- return (t, n) => e.loading ? (o(), i("div", mn, [...n[0] || (n[0] = [
1514
- a("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
1515
- ])])) : y("", !0);
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
- }), fn = { class: "collapse collapse-arrow bg-white w-full border border-gray-300" }, bn = ["checked"], hn = { class: "collapse-title text-gray-500 text-xs font-medium" }, vn = {
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
- }, Xn = /* @__PURE__ */ p({
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 t = be(), n = e, l = S(n.opened);
1528
- return Q(
1529
- () => n.opened,
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
- ), (s, c) => (o(), i("div", fn, [
1534
- a("input", {
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: l.value
1537
- }, null, 8, bn),
1538
- a("div", hn, v(e.title), 1),
1539
- a("div", {
1540
- class: w(["collapse-content", b(t).list ? "p-0" : ""])
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
- B(s.$slots, "default"),
1543
- b(t).list ? (o(), i("ul", vn, [
1544
- B(s.$slots, "list")
1545
- ])) : y("", !0)
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
- }), gn = { class: "list-row" }, pn = { class: "list-col-grow" }, yn = {
1550
- key: 0,
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
- }, wn = ["href"], xn = { key: 1 }, kn = {
1812
+ }, Do = ["href"], To = { key: 1 }, zo = {
1553
1813
  key: 0,
1554
1814
  class: "text-xs text-gray-500"
1555
- }, $n = ["href"], Cn = { key: 1 }, _n = { class: "list-col-wrap text-xs text-gray-500" }, Yn = /* @__PURE__ */ p({
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 be(), (t, n) => {
1566
- const l = X("ng-content");
1567
- return o(), i("li", gn, [
1568
- a("div", pn, [
1569
- a("div", null, v(e.title), 1),
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.labelLink,
1831
+ href: e.descriptionLink,
1582
1832
  target: "_blank"
1583
- }, v(e.label), 9, $n)) : (o(), i("span", Cn, v(e.label), 1))
1584
- ])) : y("", !0),
1585
- a("p", _n, [
1586
- C(l)
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
- En as Autocomplete,
1594
- Je as BadgeSize,
1595
- q as Btn,
1596
- Nn as BtnBadge,
1597
- Ge as ButtonSize,
1598
- In as Card,
1599
- jn as ClickOutside,
1600
- Xn as Collapse,
1601
- Yn as CollapseRow,
1602
- j as Color,
1603
- Xe as ConfirmModal,
1604
- oe as ControlWrapper,
1605
- Kt as DefaultAutoCompleteProperties,
1606
- G as DefaultControlProperties,
1607
- Gn as Drawer,
1608
- Sn as Dropdown,
1609
- I as Icon,
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
- ze as IconMap,
1612
- Qn as Loading,
1613
- Zn as Markdown,
1614
- Tn as Menu,
1615
- Ee as Modal,
1616
- ce as ModalService,
1617
- Ye as ModalWrapper,
1618
- Wn as MultiSelect,
1619
- et as NotificationMessage,
1620
- ue as NotificationService,
1621
- ot as Notifications,
1622
- yt as PaginationComponent,
1623
- On as SelectComponent,
1624
- Rn as ShellComponent,
1625
- ie as SubMenu,
1626
- Fn as Table,
1627
- Fn as TableComponent,
1628
- Kn as TextCell,
1629
- Jn as TreeView,
1630
- Un as addClickOutsideEventListener,
1631
- qn as hasCustomEventListener,
1632
- It as isDescriptionHidden,
1633
- Rt as myStyles,
1634
- Hn as removeClickOutsideEventListener,
1635
- Ft as showErrors
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
  };