@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.esm.js CHANGED
@@ -1,75 +1,81 @@
1
- import { defineComponent as p, openBlock as l, createElementBlock as c, unref as f, normalizeClass as y, createElementVNode as a, toDisplayString as h, createBlock as v, createCommentVNode as x, Fragment as k, renderList as L, mergeProps as V, computed as $, resolveComponent as oe, withCtx as C, createTextVNode as S, ref as N, watch as te, onMounted as xe, renderSlot as D, resolveDynamicComponent as ae, createVNode as B, withDirectives as I, vModelCheckbox as fe, normalizeStyle as se, getCurrentInstance as we, toHandlerKey as be, camelize as ke, mergeDefaults as U, useModel as H, normalizeProps as W, guardReactiveProps as Z, vModelSelect as $e, mergeModels as P, resolveDirective as he, vModelText as ie, onBeforeUnmount as Ce, vModelDynamic as Be, useSlots as pe } from "vue";
2
- import { RouterLink as _e } from "vue-router";
3
- import { v4 as le } from "uuid";
4
- import { apiNoAuth as Le, useApi as Me } from "@ghentcdh/tools-vue";
5
- import { ChevronDownIcon as Pe, ChevronRightIcon as Ve } from "@heroicons/vue/24/solid";
6
- import De from "@tiptap/starter-kit";
7
- import { useEditor as Ae, EditorContent as Te } from "@tiptap/vue-3";
8
- import { Markdown as ze } from "tiptap-markdown";
9
- const M = (...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
- (o) => ` <path
16
+ (t) => ` <path
17
17
  stroke-linejoin="round"
18
18
  stroke-linecap="round"
19
- d="${o}"
19
+ d="${t}"
20
20
  />`
21
21
  ).join(`
22
22
  `)}
23
23
  </svg>`;
24
- var F = /* @__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))(F || {});
25
- const Fe = {
26
- Edit: M(
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: M(
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: M(
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: M(
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: M(
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: M("M6 18 18 6M6 6l12 12"),
42
- Plus: M("M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"),
43
- PaperClip: M(
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: M("M4 6h16M4 12h16M4 18h16"),
47
- ChevronDown: M(
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: M(
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: M("m4.5 12.75 6 6 9-13.5"),
54
- View: M(
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: M(
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: M(
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: M("m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5")
65
- }, Se = ["innerHTML"], j = /* @__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, o) => (l(), c("div", {
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: f(Fe)[e.icon]
81
- }, null, 10, Se));
86
+ innerHTML: b(Ie)[e.icon]
87
+ }, null, 10, Ue));
82
88
  }
83
- }), Ne = { class: "dropdown dropdown-end" }, Ke = {
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" }, re = /* @__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 Fe = {
94
100
  disableArrow: { type: Boolean }
95
101
  },
96
102
  setup(e) {
97
- return (t, o) => (l(), c("div", Ne, [
98
- a("div", {
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
- a("span", null, h(e.label), 1),
104
- e.disableArrow ? x("", !0) : (l(), v(f(j), {
109
+ i("span", null, p(e.label), 1),
110
+ e.disableArrow ? x("", !0) : (l(), g(b(j), {
105
111
  key: 0,
106
- icon: f(F).ChevronDown,
112
+ icon: b(z).ChevronDown,
107
113
  size: "sm"
108
114
  }, null, 8, ["icon"]))
109
115
  ], 2),
110
- a("ul", Ke, [
111
- a("li", Re, [
112
- (l(!0), c(k, null, L(e.items, (s) => (l(), v(ve, V({
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
- }), ee = "btn btn-ghost text-left justify-between min-w-max font-normal", ve = /* @__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,74 +131,74 @@ const Fe = {
125
131
  disabled: { type: Boolean, default: !1 }
126
132
  },
127
133
  setup(e) {
128
- const t = e, o = $(() => !t.disabled && t.action && "routerLink" in t.action), s = $(() => !t.disabled && t.action), n = $(() => t.items?.length), u = $(() => {
129
- const m = t.action;
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
- }), b = () => {
135
- t.action?.();
140
+ }), h = () => {
141
+ o.action?.();
136
142
  };
137
- return (m, i) => {
138
- const d = oe("RouterLink");
139
- return n.value ? (l(), v(re, V({ key: 0 }, t, { "btn-class": ee }), null, 16)) : o.value ? (l(), v(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
147
  to: u.value,
142
- class: y(ee),
143
- onClick: b
148
+ class: y(le),
149
+ onClick: h
144
150
  }, {
145
- default: C(() => [
146
- S(h(e.label), 1)
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(ee),
152
- onClick: b
153
- }, h(e.label), 1)) : (l(), c("div", {
157
+ class: y(le),
158
+ onClick: h
159
+ }, p(e.label), 1)) : (l(), c("div", {
154
160
  key: 3,
155
- class: y([ee, { "btn-disabled": e.disabled }])
156
- }, h(e.label), 3));
161
+ class: y([le, { "btn-disabled": e.disabled }])
162
+ }, p(e.label), 3));
157
163
  };
158
164
  }
159
- }), Ie = { class: "navbar bg-base-100 shadow-sm" }, Ue = { class: "flex-1" }, qe = {
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
- }, je = { class: "flex grow justify-end px-2" }, He = { class: "flex items-stretch" }, qo = /* @__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, o) => {
170
- const s = oe("RouterLink");
171
- return l(), c("nav", Ie, [
172
- a("div", Ue, [
173
- e.breadcrumbs ? (l(), c("div", qe, [
174
- a("ul", null, [
175
- (l(!0), c(k, null, L(e.breadcrumbs, (n) => (l(), c("li", {
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(), v(s, {
184
+ n.routerLink ? (l(), g(s, {
179
185
  key: 0,
180
186
  to: { name: n.routerLink, params: n.params }
181
187
  }, {
182
- default: C(() => [
183
- S(h(n.label), 1)
188
+ default: B(() => [
189
+ F(p(n.label), 1)
184
190
  ]),
185
191
  _: 2
186
- }, 1032, ["to"])) : (l(), c(k, { key: 1 }, [
187
- S(h(n.label), 1)
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
- a("div", je, [
194
- a("div", He, [
195
- (l(!0), c(k, null, L(e.menu, (n) => (l(), v(ve, V({
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
- }), jo = /* @__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 = N(!0);
210
- return (o, s) => (l(), v(re, {
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
- }), Oe = { class: "font-bold" }, Ee = { class: "pt-4" }, We = { class: "modal-action" }, Ze = /* @__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 Fe = {
227
233
  width: { default: "sm" }
228
234
  },
229
235
  emits: ["closeModal"],
230
- setup(e, { expose: t, emit: o }) {
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_${le()}`, b = o, m = () => {
242
+ }, n = e, u = `modal_${se()}`, h = t, m = () => {
237
243
  document.getElementById(u)?.showModal();
238
- }, i = () => {
239
- document.getElementById(u)?.close(), b("closeModal");
244
+ }, d = () => {
245
+ document.getElementById(u)?.close(), h("closeModal");
240
246
  };
241
- return t({ closeModal: i, openModal: m }), te(
247
+ return o({ closeModal: d, openModal: m }), ne(
242
248
  () => n.open,
243
- (d, r, A) => {
244
- n.open ? m() : i();
249
+ (a, r, w) => {
250
+ n.open ? m() : d();
245
251
  }
246
- ), xe(() => {
252
+ ), $e(() => {
247
253
  n.open && m();
248
- }), (d, r) => (l(), c("dialog", {
254
+ }), (a, r) => (l(), c("dialog", {
249
255
  id: u,
250
256
  class: "modal"
251
257
  }, [
252
- a("div", {
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: i
265
+ onClick: d
260
266
  }, " ✕ ")),
261
- a("h3", Oe, h(e.modalTitle), 1),
262
- a("div", Ee, [
263
- D(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", We, [
266
- D(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 ce = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(ce || {}), ge = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(ge || {}), G = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(G || {});
273
- const Ge = {
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
- }, Je = {
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
- }, Qe = {
289
+ }, tt = {
284
290
  xs: "btn-xs",
285
291
  sm: "btn-sm",
286
292
  lg: "btn-sm",
287
293
  xl: "btn"
288
- }, Xe = {
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
- }, J = /* @__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: ge.button },
304
+ as: { default: xe.button },
299
305
  icon: {},
300
- type: { default: ce.button },
306
+ type: { default: me.button },
301
307
  outline: { type: Boolean, default: !1 },
302
- color: { default: G.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 o = e, s = t;
309
- return (n, u) => (l(), v(ae(e.as), V({
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
- f(Ge)[e.color],
313
- f(Qe)[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
- }, o, {
317
- onClick: u[0] || (u[0] = (b) => s("click"))
322
+ }, t, {
323
+ onClick: u[0] || (u[0] = (h) => s("click"))
318
324
  }), {
319
- default: C(() => [
320
- e.icon ? (l(), v(f(j), {
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
- D(n.$slots, "default")
331
+ M(n.$slots, "default")
326
332
  ]),
327
333
  _: 3
328
334
  }, 16, ["class"]));
329
335
  }
330
- }), Ye = ["type", "disabled"], Ho = /* @__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: ce.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 o = t;
346
+ setup(e, { emit: o }) {
347
+ const t = o;
342
348
  return (s, n) => (l(), c("button", {
343
- class: y(["badge gap-1", f(Xe)[e.size], f(Je)[e.color]]),
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) => o("click"))
352
+ onClick: n[0] || (n[0] = (u) => t("click"))
347
353
  }, [
348
- D(s.$slots, "default"),
349
- e.icon ? (l(), v(f(j), {
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, Ye));
360
+ ], 10, lt));
355
361
  }
356
- }), et = /* @__PURE__ */ p({
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: t }) {
366
- const o = t, s = (n) => {
367
- o("closeModal", { confirmed: n });
371
+ setup(e, { emit: o }) {
372
+ const t = o, s = (n) => {
373
+ t("closeModal", { confirmed: n });
368
374
  };
369
- return (n, u) => (l(), v(Ze, {
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: C(() => [
375
- S(h(e.message), 1)
380
+ content: B(() => [
381
+ F(p(e.message), 1)
376
382
  ]),
377
- actions: C(() => [
378
- B(f(J), {
379
- color: f(G).secondary,
383
+ actions: B(() => [
384
+ P(b(Y), {
385
+ color: b(X).secondary,
380
386
  outline: !0,
381
- onClick: u[0] || (u[0] = (b) => s(!1))
387
+ onClick: u[0] || (u[0] = (h) => s(!1))
382
388
  }, {
383
- default: C(() => [
384
- S(h(e.cancelLabel), 1)
389
+ default: B(() => [
390
+ F(p(e.cancelLabel), 1)
385
391
  ]),
386
392
  _: 1
387
393
  }, 8, ["color"]),
388
- B(f(J), {
389
- onClick: u[1] || (u[1] = (b) => s(!0))
394
+ P(b(Y), {
395
+ onClick: u[1] || (u[1] = (h) => s(!0))
390
396
  }, {
391
- default: C(() => [
392
- S(h(e.confirmLabel), 1)
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 ue {
407
+ class he {
402
408
  constructor() {
403
- this.showModal = N(!1), this.modals = [];
409
+ this.showModal = S(!1), this.modals = [];
404
410
  }
405
- openModal(t) {
406
- const o = t.props.onClose, s = le(), n = t;
407
- t.props.onClose = (u) => {
408
- o(u), this.closeModal(s);
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(t) {
412
- this.modals = this.modals.filter((o) => o.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: et,
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 ue()), this.instance;
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 tt = /* @__PURE__ */ p({
439
+ const st = /* @__PURE__ */ v({
434
440
  __name: "modalWrapper",
435
441
  setup(e) {
436
- const t = ue.getInstance(), o = $(() => t.showModal.value ? t.modals : []);
437
- return (s, n) => (l(!0), c(k, null, L(o.value, (u) => (l(), v(ae(u?.component), V({
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
- }), ot = /* @__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 (o, s) => (l(), c("div", {
464
+ return (t, s) => (l(), c("div", {
459
465
  role: "alert",
460
- class: y(`alert ${t[e.type]} `)
466
+ class: y(`alert ${o[e.type]} `)
461
467
  }, [
462
- a("span", null, h(e.message), 1)
468
+ i("span", null, p(e.message), 1)
463
469
  ], 2));
464
470
  }
465
- }), lt = 5e3;
466
- class de {
471
+ }), it = 5e3;
472
+ class be {
467
473
  constructor() {
468
- this.notifications = N([]), this.addNotification = (t, o = "info") => {
474
+ this.notifications = S([]), this.addNotification = (o, t = "info") => {
469
475
  const s = {
470
- id: le(),
471
- duration: lt,
472
- message: t,
473
- type: o
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 = (t) => {
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((o) => o.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 de()), 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]" }, st = /* @__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 = de.getInstance();
507
- return (o, s) => (l(), c("div", nt, [
508
- (l(!0), c(k, null, L(f(t).notifications.value, (n) => (l(), v(ot, V({
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
- }), at = { class: "flex h-screen flex-col" }, it = { class: "shrink-0" }, rt = { class: "navbar bg-primary text-primary-content w-full z-100" }, ct = { class: "navbar-start" }, ut = { class: "navbar-center" }, dt = ["href"], mt = { class: "navbar-end" }, bt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, ft = { class: "drawer-side h-full shadow-md" }, ht = { class: "flex-grow overflow-y-auto" }, pt = { class: "bg-base-200 p-4" }, Oo = /* @__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,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: t }) {
524
- const s = e, n = N(!1), u = () => {
529
+ setup(e, { emit: o }) {
530
+ const s = e, n = S(!1), u = () => {
525
531
  n.value = !n.value;
526
- }, b = t, m = $(() => s.user ? {
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
- b("logout");
538
+ h("logout");
533
539
  }
534
540
  }
535
541
  ]
536
542
  } : null);
537
- return (i, d) => (l(), c(k, null, [
538
- B(st),
539
- B(f(tt)),
540
- a("div", at, [
541
- a("header", it, [
542
- a("nav", rt, [
543
- a("div", ct, [
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
553
  onClick: u
548
554
  }, [
549
- B(f(j), {
550
- icon: f(F).Hamburger
555
+ P(b(j), {
556
+ icon: b(z).Hamburger
551
557
  }, null, 8, ["icon"])
552
558
  ])
553
559
  ]),
554
- a("div", ut, [
555
- a("a", {
560
+ i("div", bt, [
561
+ i("a", {
556
562
  class: "btn btn-ghost text-primary-content text-lg color-white",
557
- href: f("/")
558
- }, h(e.title), 9, dt)
563
+ href: b("/")
564
+ }, p(e.title), 9, ft)
559
565
  ]),
560
- a("div", mt, [
561
- m.value ? (l(), v(f(re), V({ key: 0 }, m.value, { "btn-class": "" }), null, 16)) : x("", !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", {
571
+ i("div", {
566
572
  class: y(["drawer flex-1 overflow-hidden", { "drawer-open": n.value }])
567
573
  }, [
568
- I(a("input", {
574
+ U(i("input", {
569
575
  id: "app-drawer",
570
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.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
- [fe, n.value]
580
+ [ge, n.value]
575
581
  ]),
576
- a("main", bt, [
577
- D(i.$slots, "default")
582
+ i("main", vt, [
583
+ M(d.$slots, "default")
578
584
  ]),
579
- a("div", ft, [
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: se({ width: e.widthSidebar + "px" })
593
+ style: ie({ width: e.widthSidebar + "px" })
588
594
  }, [
589
- a("ul", ht, [
590
- (l(!0), c(k, null, L(e.menu, (r) => (l(), c("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
- B(f(_e), {
599
+ P(b(Ve), {
594
600
  to: { name: r.routerLink, params: r.params }
595
601
  }, {
596
- default: C(() => [
597
- S(h(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", pt, " version: " + h(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
- }), Q = /* @__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]" }, st = /* @__PURE__
617
623
  disabled: { type: Boolean }
618
624
  },
619
625
  emits: ["updatePage", "updatePageSize"],
620
- setup(e, { emit: t }) {
621
- const o = e, s = t, n = $(
622
- () => o.neverActive ? !1 : o.page === o.currentPage
623
- ), u = $(() => o.neverActive ? G.blank : n.value ? G.primary : G.secondary), b = () => {
624
- s("updatePage", o.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 (m, i) => (l(), v(f(J), {
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: i[0] || (i[0] = (d) => b())
637
+ onClick: d[0] || (d[0] = (a) => h())
632
638
  }, {
633
- default: C(() => [
634
- S(h(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
- }), vt = { class: "flex gap-2" }, gt = { class: "flex flex-1 justify-center items-center" }, yt = { class: "flex gap-1" }, xt = { class: "text-sm" }, X = 6, wt = /* @__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,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: t }) {
648
- const o = e, s = t, n = $(() => {
649
- let r = Math.ceil(o.totalItems / o.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
- }), u = X / 2, b = $(() => {
652
- if (n.value <= X)
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 = o.currentPage - u;
658
- r <= 1 ? r = 1 : r + X > n.value && (r = n.value - X);
659
- let A = r + X;
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: A
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
- }), i = $(() => {
676
+ }), d = k(() => {
671
677
  let r = n.value;
672
678
  r < 1 && (r = 1);
673
- const A = o.currentPage, T = [], { min: R, max: E } = b.value;
674
- return Array.from({ length: r }, (_, g) => {
675
- const w = g + 1;
676
- w !== 1 && w !== r && (w > E || w < R) || (w === r && r > 1 && E < r && T.push(m(A)), T.push({
677
- label: `${w}`,
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: A,
680
- page: w
681
- }), w === 1 && r > 1 && R > 1 && T.push(m(A)));
685
+ currentPage: w,
686
+ page: D
687
+ }), D === 1 && r > 1 && N > 1 && T.push(m(w)));
682
688
  }), T;
683
- }), d = (r) => {
689
+ }), a = (r) => {
684
690
  s("updatePage", r);
685
691
  };
686
- return (r, A) => (l(), c("div", vt, [
687
- a("div", gt, [
688
- a("div", yt, [
689
- B(Q, V(o, {
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
- B(Q, V(o, {
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
- (l(!0), c(k, null, L(i.value, (T) => (l(), v(Q, V({
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: d }), null, 16))), 128)),
709
- B(Q, V(o, {
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: o.currentPage === n.value,
715
- onUpdatePage: d
720
+ disabled: t.currentPage === n.value,
721
+ onUpdatePage: a
716
722
  }), null, 16, ["page", "current-page", "disabled"]),
717
- B(Q, V(o, {
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: o.currentPage === n.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", xt, " page " + h(e.currentPage) + " of " + h(n.value), 1)
733
+ i("div", Ct, " page " + p(e.currentPage) + " of " + p(n.value), 1)
728
734
  ]));
729
735
  }
730
- }), me = (e, t) => {
731
- const o = e.__vccOpts || e;
732
- for (const [s, n] of t)
733
- o[s] = n;
734
- return o;
735
- }, kt = () => ({
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
- }), $t = p({
754
+ }), Lt = v({
749
755
  name: "TextCell",
750
756
  props: {
751
- ...kt()
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
- }), Ct = $t;
760
- function Bt(e, t, o, s, n, u) {
761
- return h(e.value) + " - value";
765
+ }), Mt = Lt;
766
+ function Pt(e, o, t, s, n, u) {
767
+ return p(e.value);
762
768
  }
763
- const Eo = /* @__PURE__ */ me(Ct, [["render", Bt]]), _t = { class: "flex-grow pr-2" }, Lt = { class: "h-4 w-4" }, Mt = /* @__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 Eo = /* @__PURE__ */ me(Ct, [["render", Bt]]), _t = { class: "flex-grow pr
768
774
  sortDirection: {}
769
775
  },
770
776
  emits: ["sort"],
771
- setup(e, { emit: t }) {
772
- const o = e, s = $(
773
- () => o.sortDirection === "asc" ? F.BarsArrowUp : F.BarsArrowDown
774
- ), n = $(() => o.column.options?.sortId ?? o.column.id), u = () => {
775
- b("sort", n.value);
776
- }, b = t;
777
- return (m, i) => (l(), c("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
785
  onClick: u
780
786
  }, [
781
- a("span", _t, h(e.column.label), 1),
782
- a("div", Lt, [
783
- e.sortColumn === n.value ? (l(), v(f(j), {
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
- }), Pt = { class: "table w-full" }, Vt = { key: 0 }, Dt = ["colspan"], At = { class: "flex gap-2" }, Wo = /* @__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,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: t }) {
802
- const o = t, s = (m) => {
803
- o("edit", m);
807
+ setup(e, { emit: o }) {
808
+ const t = o, s = (m) => {
809
+ t("edit", m);
804
810
  }, n = (m) => {
805
- o("delete", m);
811
+ t("delete", m);
806
812
  }, u = (m) => {
807
- o("updatePage", m);
808
- }, b = (m) => {
809
- o("sort", m);
813
+ t("updatePage", m);
814
+ }, h = (m) => {
815
+ t("sort", m);
810
816
  };
811
- return (m, i) => (l(), c(k, null, [
812
- a("table", Pt, [
813
- a("thead", null, [
814
- a("tr", null, [
815
- (l(!0), c(k, null, L(e.displayColumns, (d) => (l(), c("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
- B(Mt, V({ column: d }, { ref_for: !0 }, e.sort, { onSort: b }), null, 16, ["column"])
824
+ P(Dt, A({ column: a }, { ref_for: !0 }, e.sort, { onSort: h }), null, 16, ["column"])
819
825
  ]))), 128)),
820
- i[0] || (i[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 ? (l(), c("tr", Vt, [
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
- }, [...i[1] || (i[1] = [
829
- a("span", { class: "loading loading-bars loading-xs" }, null, -1)
830
- ])], 8, Dt)
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(k, null, L(e.data, (d) => (l(), c("tr", {
833
- key: d.id
838
+ (l(!0), c($, null, L(e.data, (a) => (l(), c("tr", {
839
+ key: a.id
834
840
  }, [
835
- (l(!0), c(k, null, L(e.displayColumns, (r) => (l(), c("td", {
841
+ (l(!0), c($, null, L(e.displayColumns, (r) => (l(), c("td", {
836
842
  key: r.scope
837
843
  }, [
838
- (l(), v(ae(r.component), V({ 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", At, [
845
- (l(!0), c(k, null, L(e.actions, (r) => (l(), v(J, {
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: (A) => r.action(d)
855
+ onClick: (w) => r.action(a)
850
856
  }, {
851
- default: C(() => [
852
- S(h(r.label), 1)
857
+ default: B(() => [
858
+ F(p(r.label), 1)
853
859
  ]),
854
860
  _: 2
855
861
  }, 1032, ["icon", "onClick"]))), 128)),
856
- B(J, {
857
- icon: f(F).Edit,
862
+ P(Y, {
863
+ icon: b(z).Edit,
858
864
  outline: !0,
859
- onClick: (r) => s(d)
865
+ onClick: (r) => s(a)
860
866
  }, null, 8, ["icon", "onClick"]),
861
- B(J, {
862
- icon: f(F).Delete,
867
+ P(Y, {
868
+ icon: b(z).Delete,
863
869
  outline: !0,
864
- onClick: (r) => n(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 ? (l(), v(wt, {
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
- }), Tt = {}, zt = { class: "card bg-base-100 shadow-sm" }, Ft = { class: "card-body" }, St = {
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
- }, Nt = {
890
+ }, Kt = {
885
891
  key: 1,
886
892
  class: "card-actions justify-end"
887
893
  };
888
- function Kt(e, t) {
889
- return l(), c("div", zt, [
890
- a("div", Ft, [
891
- e.$slots.title ? (l(), c("h2", St, [
892
- D(e.$slots, "title")
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
- a("p", null, [
895
- D(e.$slots, "default"),
896
- D(e.$slots, "content")
900
+ i("p", null, [
901
+ M(e.$slots, "default"),
902
+ M(e.$slots, "content")
897
903
  ]),
898
- e.$slots.actions ? (l(), c("div", Nt, [
899
- D(e.$slots, "actions")
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 Zo = /* @__PURE__ */ me(Tt, [["render", Kt]]), Go = (e, t) => {
910
+ const Xo = /* @__PURE__ */ fe(Nt, [["render", qt]]), Yo = (e, o) => {
905
911
  if (!e) return null;
906
- const o = (s) => {
907
- e.contains(s.target) || t();
912
+ const t = (s) => {
913
+ e.contains(s.target) || o();
908
914
  };
909
- return document.addEventListener("click", o), o;
910
- }, Jo = (e) => {
915
+ return document.addEventListener("click", t), t;
916
+ }, el = (e) => {
911
917
  document.removeEventListener("click", e);
912
- }, Qo = {
913
- beforeMount(e, t) {
914
- e.clickOutsideEvent = function(o) {
915
- e === o.target || e.contains(o.target) || t.value(o);
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 Xo(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 o = t.vnode.props;
927
- return o ? !!(o[be(e)] || // also try camelCase event handler (#2249)
928
- o[be(ke(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",
@@ -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: le(),
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: Rt
971
- }), It = () => ({
977
+ styles: jt,
978
+ width: "w-24"
979
+ }), Ht = () => ({
972
980
  ...q(),
973
981
  options: [],
974
982
  valueKey: "value",
975
983
  labelKey: "label"
976
- }), ye = (e, t, o) => !!(e && o), Ut = (e, t, o, s) => t === void 0 || t !== void 0 && !e || !s && !o, Yo = (e, t, o, s) => [
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__ */ U({
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 t = e, o = $(() => !Ut(
997
- t.visible,
998
- t.description,
999
- t.isFocused,
1002
+ const o = e, t = k(() => !Ot(
1003
+ o.visible,
1004
+ o.description,
1005
+ o.isFocused,
1000
1006
  !0
1001
- )), s = $(() => t.required), n = $(() => ye(
1002
- t.isTouched,
1003
- t.isFocused,
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
- S(h(e.label) + " ", 1),
1014
- s.value ? (l(), c("span", qt, "*")) : x("", !0)
1015
+ F(p(e.label) + " ", 1),
1016
+ s.value ? (l(), c("span", Et, "*")) : x("", !0)
1015
1017
  ], 2)),
1016
- D(u.$slots, "default"),
1017
- a("p", {
1018
+ M(u.$slots, "default"),
1019
+ i("p", {
1018
1020
  class: y(["fieldset-label h-4", { "text-error": n.value }])
1019
- }, h(n.value ? e.errors : o.value ? e.description : null), 3)
1021
+ }, p(n.value ? e.errors : t.value ? e.description : null), 3)
1020
1022
  ], 2));
1021
1023
  }
1022
- }), jt = ["disabled"], Ht = ["value"], el = /* @__PURE__ */ p({
1024
+ }), Wt = ["disabled"], Zt = ["value"], ll = /* @__PURE__ */ v({
1023
1025
  __name: "SelectComponent",
1024
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1050
- setup(e, { emit: t }) {
1051
- const o = e, s = t, n = H(e, "modelValue"), u = (i) => {
1052
- s("change", i);
1053
- }, b = (i) => {
1054
- s("focus", i);
1055
- }, m = (i) => {
1056
- s("blur", i);
1057
- };
1058
- return (i, d) => (l(), v(O, W(Z(o)), {
1059
- default: C(() => [
1060
- I(a("select", {
1061
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.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),
1062
1067
  disabled: !e.enabled,
1063
- class: y(["select select-bordered", e.styles.control.select]),
1068
+ class: y(d.value),
1064
1069
  onChange: u,
1065
- onFocus: b,
1070
+ onFocus: h,
1066
1071
  onBlur: m
1067
1072
  }, [
1068
- (l(!0), c(k, null, L(e.options, (r) => (l(), c("option", {
1069
- key: r[e.valueKey],
1070
- value: r
1071
- }, h(r[e.labelKey]), 9, Ht))), 128))
1072
- ], 42, jt), [
1073
- [$e, n.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]
1074
1079
  ])
1075
1080
  ]),
1076
1081
  _: 1
1077
1082
  }, 16));
1078
1083
  }
1079
- }), Ot = ["disabled"], Et = {
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
- }, Wt = ["onClick", "onBlur"], tl = /* @__PURE__ */ p({
1090
+ }, Qt = ["onClick", "onBlur"], nl = /* @__PURE__ */ v({
1086
1091
  __name: "AutoComplete",
1087
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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
- }, It()), {
1110
+ }, Ht()), {
1105
1111
  modelValue: {},
1106
1112
  modelModifiers: {}
1107
1113
  }),
1108
- emits: /* @__PURE__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1109
- setup(e, { emit: t }) {
1110
- const o = e, s = t, n = H(e, "modelValue"), u = N(""), b = (g) => {
1111
- s("change", g);
1112
- }, m = (g) => {
1113
- s("focus", g);
1114
- }, i = (g) => {
1115
- s("blur", g);
1116
- }, d = N(!1), r = N([]), A = (g) => {
1117
- d.value = !0, T(g);
1118
- }, T = (g) => {
1119
- n.value = g, b(g);
1120
- }, R = (g) => {
1121
- r.value?.length === g + 1 && (r.value = []);
1122
- }, E = (g) => g[o.valueKey], _ = (g) => g?.[o.labelKey] ?? "";
1123
- return te(
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
- (g) => {
1126
- g && !E(g) || (d.value = !0, r.value = [], u.value = _(g));
1131
+ (f) => {
1132
+ f && !E(f) || (a.value = !0, r.value = [], u.value = Q(f));
1127
1133
  },
1128
1134
  { immediate: !0 }
1129
- ), te(
1135
+ ), ne(
1130
1136
  () => u.value,
1131
- (g) => {
1132
- if (d.value) {
1133
- d.value = !1;
1137
+ (f) => {
1138
+ if (a.value) {
1139
+ a.value = !1;
1134
1140
  return;
1135
1141
  }
1136
- if (T({ [o.labelKey]: g }), o.config) {
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
- ), (g, w) => {
1144
- const z = he("click-outside");
1145
- return l(), v(O, W(Z(o)), {
1146
- default: C(() => [
1147
- I(a("input", {
1148
- "onUpdate:modelValue": w[0] || (w[0] = (K) => u.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),
1149
1163
  autocomplete: "off",
1150
1164
  type: "text",
1151
- class: y([e.styles.control.select]),
1165
+ class: y([R.value]),
1152
1166
  disabled: !e.enabled,
1153
1167
  onFocus: m,
1154
- onBlur: i
1155
- }, null, 42, Ot), [
1156
- [ie, u.value]
1168
+ onBlur: d,
1169
+ onClick: D
1170
+ }, null, 42, Gt), [
1171
+ [ue, u.value]
1157
1172
  ]),
1158
- I((l(), c("div", null, [
1159
- r.value?.length ? (l(), c("ul", Et, [
1160
- (l(!0), c(k, null, L(r.value, (K, Y) => (l(), c("li", {
1161
- 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]
1162
1177
  }, [
1163
- a("button", {
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: (ne) => A(K),
1167
- onBlur: (ne) => R(Y)
1168
- }, h(_(K)), 41, Wt)
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
- [z, () => r.value = []]
1187
+ [oe, () => r.value = []]
1173
1188
  ])
1174
1189
  ]),
1175
1190
  _: 1
1176
1191
  }, 16);
1177
1192
  };
1178
1193
  }
1179
- }), Zt = {
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
- }, Gt = ["onClick"], Jt = { class: "w-4 mr-2" }, ol = /* @__PURE__ */ p({
1200
+ }, Yt = ["onClick"], eo = { class: "w-4 mr-2" }, sl = /* @__PURE__ */ v({
1186
1201
  __name: "MultiSelect",
1187
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1212
- setup(e, { emit: t }) {
1213
- const o = e, s = t, n = H(e, "modelValue");
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 b = (_) => {
1231
+ const h = (_) => {
1216
1232
  s("change", _);
1217
- }, m = N(!1), i = () => {
1233
+ }, m = S(!1), d = () => {
1218
1234
  m.value = !m.value, u = !0;
1219
- }, d = () => {
1235
+ }, a = () => {
1220
1236
  u || (m.value = !1), u = !1;
1221
- }, r = $(
1222
- () => n.value?.map((_) => R(_)) ?? []
1223
- ), A = (_) => r.value.includes(_), T = (_, g) => {
1237
+ }, r = k(
1238
+ () => n.value?.map((_) => N(_)) ?? []
1239
+ ), w = (_) => r.value.includes(_), T = (_, D) => {
1224
1240
  _.preventDefault();
1225
- let w = n.value ?? [];
1226
- const z = R(g);
1227
- A(z) ? w = w.filter((Y) => R(Y) !== z) : w.push(g), n.value = w, b(w);
1228
- }, R = (_) => _[o.valueKey], E = (_) => _?.[o.labelKey] ?? "";
1229
- return (_, g) => {
1230
- const w = he("click-outside");
1231
- return l(), v(O, W(Z(o)), {
1232
- default: C(() => [
1233
- a("button", {
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([e.styles.control.select, "w-full truncate block"]),
1236
- onClick: i
1237
- }, h(n.value?.map?.((z) => E(z)).join(", ") ?? "Select value"), 3),
1238
- I((l(), c("div", null, [
1239
- m.value ? (l(), c("ul", Zt, [
1240
- (l(!0), c(k, null, L(e.options, (z) => (l(), c("li", {
1241
- key: z[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]
1242
1263
  }, [
1243
- a("button", {
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: (K) => T(K, z)
1267
+ onClick: (I) => T(I, f)
1247
1268
  }, [
1248
- a("div", Jt, [
1249
- A(R(z)) ? (l(), v(f(j), {
1269
+ i("div", eo, [
1270
+ w(N(f)) ? (l(), g(b(j), {
1250
1271
  key: 0,
1251
- icon: f(F).Check,
1272
+ icon: b(z).Check,
1252
1273
  size: "sm"
1253
1274
  }, null, 8, ["icon"])) : x("", !0)
1254
1275
  ]),
1255
- S(" " + h(E(z)), 1)
1256
- ], 8, Gt)
1276
+ F(" " + p(E(f)), 1)
1277
+ ], 8, Yt)
1257
1278
  ]))), 128))
1258
1279
  ])) : x("", !0)
1259
1280
  ])), [
1260
- [w, () => d()]
1281
+ [R, () => a()]
1261
1282
  ])
1262
1283
  ]),
1263
1284
  _: 1
1264
1285
  }, 16);
1265
1286
  };
1266
1287
  }
1267
- }), Qt = { class: "card bg-base-100 border border-base-300" }, Xt = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, Yt = ["title", "onClick"], eo = ["innerHTML"], to = { class: "card-body p-3" }, oo = /* @__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({
1268
1289
  __name: "Markdown",
1269
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["update:modelValue"], ["update:modelValue"]),
1302
- setup(e, { emit: t }) {
1303
- const o = e, s = t, n = H(e, "modelValue"), u = Ae({
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
- De.configure({
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
- ze.configure({
1339
+ Re.configure({
1318
1340
  html: !1,
1319
1341
  transformPastedText: !0
1320
1342
  // parse markdown on paste
1321
1343
  })
1322
1344
  ],
1323
- onUpdate({ editor: b }) {
1324
- s("update:modelValue", b.storage.markdown.getMarkdown());
1345
+ onUpdate({ editor: h }) {
1346
+ s("change", h.storage.markdown.getMarkdown());
1325
1347
  }
1326
1348
  });
1327
- return Ce(() => {
1349
+ return Le(() => {
1328
1350
  u.value?.destroy();
1329
- }), (b, m) => (l(), v(O, W(Z(o)), {
1330
- default: C(() => [
1331
- a("div", Qt, [
1332
- a("div", Xt, [
1333
- (l(!0), c(k, null, L(e.actions, (i) => (l(), c("button", {
1334
- key: i.name,
1335
- class: y(["btn btn-sm btn-ghost", { "btn-active": f(u)?.isActive(i.name) }]),
1336
- title: i.label,
1337
- onClick: (d) => i.action(f(u))
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
- a("span", {
1340
- innerHTML: i.label
1341
- }, null, 8, eo)
1342
- ], 10, Yt))), 128))
1362
+ i("span", {
1363
+ innerHTML: d.label
1364
+ }, null, 8, no)
1365
+ ], 10, lo))), 128))
1343
1366
  ]),
1344
- a("div", to, [
1345
- B(f(Te), {
1346
- editor: f(u),
1347
- 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"
1348
1371
  }, null, 8, ["editor"])
1349
1372
  ])
1350
1373
  ])
@@ -1352,9 +1375,9 @@ const Rt = {
1352
1375
  _: 1
1353
1376
  }, 16));
1354
1377
  }
1355
- }), ll = /* @__PURE__ */ me(oo, [["__scopeId", "data-v-0d8fa163"]]), lo = { class: "flex items-center justify-center h-full" }, no = { class: "fieldset-label" }, so = ["disabled"], ao = { class: "font-bold text-gray-500 text-sm" }, nl = /* @__PURE__ */ p({
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__ */ P(/* @__PURE__ */ U({
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
- options: {},
1371
- valueKey: {},
1372
- labelKey: {}
1393
+ width: {}
1373
1394
  }, {
1374
1395
  ...q()
1375
1396
  }), {
1376
1397
  modelValue: {},
1377
1398
  modelModifiers: {}
1378
1399
  }),
1379
- emits: /* @__PURE__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1380
- setup(e, { emit: t }) {
1381
- const o = e, s = t, n = H(e, "modelValue"), u = (i) => {
1382
- s("change", i);
1383
- }, b = (i) => {
1384
- s("focus", i);
1385
- }, m = (i) => {
1386
- s("blur", i);
1387
- };
1388
- return (i, d) => (l(), c("div", lo, [
1389
- B(O, V(o, { "hide-label": !0 }), {
1390
- default: C(() => [
1391
- a("label", no, [
1392
- I(a("input", {
1393
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.value = r),
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(["checkbox", e.styles.control.checkbox]),
1418
+ class: y(d.value),
1396
1419
  disabled: !e.enabled,
1397
1420
  onChange: u,
1398
- onFocus: b,
1421
+ onFocus: h,
1399
1422
  onBlur: m
1400
- }, null, 42, so), [
1401
- [fe, n.value]
1423
+ }, null, 42, co), [
1424
+ [ge, n.value]
1402
1425
  ]),
1403
- a("span", ao, h(e.label), 1)
1426
+ i("span", uo, p(e.label), 1)
1404
1427
  ])
1405
1428
  ]),
1406
1429
  _: 1
1407
1430
  }, 16)
1408
1431
  ]));
1409
1432
  }
1410
- }), io = ["type", "disabled", "autofocus", "placeholder"], sl = /* @__PURE__ */ p({
1433
+ }), mo = ["type", "disabled", "autofocus", "placeholder"], rl = /* @__PURE__ */ v({
1411
1434
  __name: "Input",
1412
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1434
- setup(e, { emit: t }) {
1435
- const o = e, s = t, n = H(e, "modelValue"), u = (i) => {
1436
- s("change", i);
1437
- }, b = (i) => {
1438
- s("focus", i);
1439
- }, m = (i) => {
1440
- s("blur", i);
1441
- };
1442
- return (i, d) => (l(), v(O, W(Z(o)), {
1443
- default: C(() => [
1444
- I(a("input", {
1445
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.value = r),
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([e.styles.control.input]),
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: b,
1479
+ onFocus: h,
1454
1480
  onBlur: m
1455
- }, null, 42, io), [
1456
- [Be, n.value]
1481
+ }, null, 42, mo), [
1482
+ [Me, n.value]
1457
1483
  ])
1458
1484
  ]),
1459
1485
  _: 1
1460
1486
  }, 16));
1461
1487
  }
1462
- }), ro = ["disabled", "step", "autofocus", "placeholder"], al = /* @__PURE__ */ p({
1488
+ }), ho = ["disabled", "step", "autofocus", "placeholder"], cl = /* @__PURE__ */ v({
1463
1489
  __name: "InputNumber",
1464
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1486
- setup(e, { emit: t }) {
1487
- const o = e, s = t, n = H(e, "modelValue"), u = (i) => {
1488
- s("change", i);
1489
- }, b = (i) => {
1490
- s("focus", i);
1491
- }, m = (i) => {
1492
- s("blur", i);
1493
- };
1494
- return (i, d) => (l(), v(O, W(Z(o)), {
1495
- default: C(() => [
1496
- I(a("input", {
1497
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.value = r),
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([e.styles.control.input]),
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: b,
1535
+ onFocus: h,
1507
1536
  onBlur: m
1508
- }, null, 42, ro), [
1509
- [ie, n.value]
1537
+ }, null, 42, ho), [
1538
+ [ue, n.value]
1510
1539
  ])
1511
1540
  ]),
1512
1541
  _: 1
1513
1542
  }, 16));
1514
1543
  }
1515
- }), co = ["disabled", "rows", "autofocus", "placeholder"], il = /* @__PURE__ */ p({
1544
+ }), bo = ["disabled", "rows", "autofocus", "placeholder"], ul = /* @__PURE__ */ v({
1516
1545
  __name: "Textarea",
1517
- props: /* @__PURE__ */ P(/* @__PURE__ */ U({
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__ */ P(["change", "focus", "blur"], ["update:modelValue"]),
1539
- setup(e, { emit: t }) {
1540
- const o = e, s = t, n = H(e, "modelValue"), u = (i) => {
1541
- s("change", i);
1542
- }, b = (i) => {
1543
- s("focus", i);
1544
- }, m = (i) => {
1545
- s("blur", i);
1546
- };
1547
- return (i, d) => (l(), v(O, W(Z(o)), {
1548
- default: C(() => [
1549
- I(a("textarea", {
1550
- "onUpdate:modelValue": d[0] || (d[0] = (r) => n.value = r),
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([e.styles.control.textarea]),
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: b,
1591
+ onFocus: h,
1560
1592
  onBlur: m
1561
- }, null, 42, co), [
1562
- [ie, n.value]
1593
+ }, null, 42, bo), [
1594
+ [ue, n.value]
1563
1595
  ])
1564
1596
  ]),
1565
1597
  _: 1
1566
1598
  }, 16));
1567
1599
  }
1568
- }), uo = { class: "grid grid-cols-[auto_1fr_auto] h-full overflow-hidden" }, mo = {
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
- }, bo = { class: "flex-1 overflow-y-auto bg-white" }, fo = { 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" }, rl = /* @__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({
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 t = N({ left: !0, right: !0 }), o = (s) => {
1579
- t.value[s] = !t.value[s];
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", uo, [
1582
- a("aside", mo, [
1583
- a("div", {
1584
- class: y(["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"])
1585
1617
  }, [
1586
- a("button", {
1618
+ i("button", {
1587
1619
  class: "btn btn-ghost btn-circle",
1588
- onClick: n[0] || (n[0] = (u) => o("left"))
1620
+ onClick: n[0] || (n[0] = (u) => t("left"))
1589
1621
  }, [
1590
- B(f(j), {
1622
+ P(b(j), {
1591
1623
  size: "sm",
1592
- icon: t.value.left ? f(F).DblChevronLeft : f(F).DblChevronRight
1624
+ icon: o.value.left ? b(z).DblChevronLeft : b(z).DblChevronRight
1593
1625
  }, null, 8, ["icon"])
1594
1626
  ])
1595
1627
  ], 2),
1596
- t.value.left ? (l(), c("div", {
1628
+ o.value.left ? (l(), c("div", {
1597
1629
  key: 0,
1598
- style: se({ width: e.widthLeft + "px" }),
1630
+ style: ie({ width: e.widthLeft + "px" }),
1599
1631
  class: "h-full overflow-y-auto p-4"
1600
1632
  }, [
1601
- D(s.$slots, "left-drawer")
1633
+ M(s.$slots, "left-drawer")
1602
1634
  ], 4)) : x("", !0)
1603
1635
  ]),
1604
- a("div", bo, [
1605
- D(s.$slots, "default")
1636
+ i("div", vo, [
1637
+ M(s.$slots, "default")
1606
1638
  ]),
1607
- a("aside", fo, [
1608
- t.value.right ? (l(), c("div", {
1639
+ i("aside", go, [
1640
+ o.value.right ? (l(), c("div", {
1609
1641
  key: 0,
1610
- style: se({ width: e.widthRight + "px" }),
1642
+ style: ie({ width: e.widthRight + "px" }),
1611
1643
  class: "h-full overflow-y-auto p-4"
1612
1644
  }, [
1613
- D(s.$slots, "right-drawer")
1645
+ M(s.$slots, "right-drawer")
1614
1646
  ], 4)) : x("", !0),
1615
- a("div", {
1616
- class: y(["absolute top-0 z-20", t.value.right ? "-left-0" : "-left-2"])
1647
+ i("div", {
1648
+ class: y(["absolute top-0 z-20", o.value.right ? "-left-0" : "-left-2"])
1617
1649
  }, [
1618
- a("button", {
1650
+ i("button", {
1619
1651
  class: "btn btn-ghost btn-circle",
1620
- onClick: n[1] || (n[1] = (u) => o("right"))
1652
+ onClick: n[1] || (n[1] = (u) => t("right"))
1621
1653
  }, [
1622
- B(f(j), {
1654
+ P(b(j), {
1623
1655
  size: "sm",
1624
- icon: t.value.right ? f(F).DblChevronRight : f(F).DblChevronLeft
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
- }), ho = { class: "ml-1" }, po = { class: "truncate flex-1 min-w-0 text-left" }, vo = {
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
- }, go = /* @__PURE__ */ p({
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: t }) {
1644
- const o = e, s = t, n = $(() => o.active === o.node.id);
1645
- return (u, b) => {
1646
- const m = oe("TreeItem", !0);
1647
- return l(), c("li", ho, [
1648
- a("div", {
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.children?.length > 0 ? (l(), c("span", {
1687
+ (e.node?.children?.length ?? 0) > 0 ? (l(), c("span", {
1656
1688
  key: 0,
1657
1689
  class: "flex items-center justify-center",
1658
- onClick: b[0] || (b[0] = (i) => s("toggle", e.node))
1690
+ onClick: h[0] || (h[0] = (d) => s("toggle", e.node))
1659
1691
  }, [
1660
- e.node.children && e.isExpanded(e.node.id) ? (l(), v(f(Pe), {
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(), v(f(Ve), {
1695
+ })) : (l(), g(b(ze), {
1664
1696
  key: 1,
1665
1697
  class: "w-3 h-3"
1666
1698
  }))
1667
1699
  ])) : x("", !0),
1668
- a("div", {
1700
+ i("div", {
1669
1701
  class: "flex items-center gap-2 w-full min-w-0",
1670
- onClick: b[1] || (b[1] = (i) => s("select", e.node))
1702
+ onClick: h[1] || (h[1] = (d) => s("select", e.node))
1671
1703
  }, [
1672
- a("div", po, h(e.node.label), 1),
1673
- e.node.tag ? (l(), c("div", vo, h(e.node.tag), 1)) : x("", !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)
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(k, null, L(e.node.children, (i) => (l(), v(m, {
1684
- key: i.id,
1685
- node: i,
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: b[2] || (b[2] = (d) => s("toggle", d)),
1690
- onSelect: b[3] || (b[3] = (d) => s("select", d))
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
- }), yo = { class: "select-none text-sm" }, cl = /* @__PURE__ */ p({
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: t }) {
1704
- const o = e, s = t, n = N(/* @__PURE__ */ new Set()), u = (i) => {
1705
- const d = i.id;
1706
- if (!i.children || i.children.length === 0) {
1707
- s("select", i);
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(d) ? n.value.delete(d) : n.value.add(d);
1711
- }, b = (i) => {
1712
- s("select", i), n.value.add(i.id);
1713
- }, m = (i) => n.value.has(i);
1714
- return (i, d) => (l(), c("ul", yo, [
1715
- (l(!0), c(k, null, L(o.data, (r) => (l(), v(go, {
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: b
1754
+ onSelect: h
1723
1755
  }, null, 8, ["node", "expanded", "active"]))), 128))
1724
1756
  ]));
1725
1757
  }
1726
- }), xo = {
1758
+ }), Co = {
1727
1759
  key: 0,
1728
1760
  class: "flex items-center justify-center h-20"
1729
- }, ul = /* @__PURE__ */ p({
1761
+ }, hl = /* @__PURE__ */ v({
1730
1762
  __name: "loading",
1731
1763
  props: {
1732
1764
  loading: { type: Boolean }
1733
1765
  },
1734
1766
  setup(e) {
1735
- return (t, o) => e.loading ? (l(), c("div", xo, [...o[0] || (o[0] = [
1736
- a("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
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
- }), wo = { class: "collapse collapse-arrow bg-white w-full border border-gray-300" }, ko = ["checked"], $o = { class: "collapse-title text-gray-500 text-xs font-medium" }, Co = {
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
- }, dl = /* @__PURE__ */ p({
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 t = pe(), o = e, s = N(o.opened);
1750
- return te(
1751
- () => o.opened,
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", wo, [
1756
- 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", {
1757
1795
  type: "checkbox",
1758
1796
  checked: s.value
1759
- }, null, 8, ko),
1760
- a("div", $o, h(e.title), 1),
1761
- a("div", {
1762
- class: y(["collapse-content", f(t).list ? "p-0" : ""])
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
- D(n.$slots, "default"),
1765
- f(t).list ? (l(), c("ul", Co, [
1766
- D(n.$slots, "list")
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
- }), Bo = { class: "list-row" }, _o = { class: "list-col-grow" }, Lo = {
1772
- key: 0,
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
- }, Mo = ["href"], Po = { key: 1 }, Vo = {
1812
+ }, Do = ["href"], To = { key: 1 }, zo = {
1775
1813
  key: 0,
1776
1814
  class: "text-xs text-gray-500"
1777
- }, Do = ["href"], Ao = { key: 1 }, To = { class: "list-col-wrap text-xs text-gray-500" }, ml = /* @__PURE__ */ p({
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 pe(), (t, o) => {
1788
- const s = oe("ng-content");
1789
- return l(), c("li", Bo, [
1790
- a("div", _o, [
1791
- a("div", null, h(e.title), 1),
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.labelLink,
1831
+ href: e.descriptionLink,
1804
1832
  target: "_blank"
1805
- }, h(e.label), 9, Do)) : (l(), c("span", Ao, h(e.label), 1))
1806
- ])) : x("", !0),
1807
- a("p", To, [
1808
- B(s)
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
- tl as Autocomplete,
1816
- Xe as BadgeSize,
1817
- J as Btn,
1818
- Ho as BtnBadge,
1819
- Qe as ButtonSize,
1820
- Zo as Card,
1821
- nl as Checkbox,
1822
- Qo as ClickOutside,
1823
- dl as Collapse,
1824
- ml as CollapseRow,
1825
- G as Color,
1826
- et as ConfirmModal,
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
- It as DefaultAutoCompleteProperties,
1883
+ Ht as DefaultAutoCompleteProperties,
1829
1884
  q as DefaultControlProperties,
1830
- rl as Drawer,
1831
- jo as Dropdown,
1885
+ dl as Drawer,
1886
+ Wo as Dropdown,
1832
1887
  j as Icon,
1833
- F as IconEnum,
1834
- Fe as IconMap,
1835
- sl as Input,
1836
- al as InputNumber,
1837
- ul as Loading,
1838
- ll as Markdown,
1839
- qo as Menu,
1840
- Ze as Modal,
1841
- ue as ModalService,
1842
- tt as ModalWrapper,
1843
- ol as MultiSelect,
1844
- ot as NotificationMessage,
1845
- de as NotificationService,
1846
- st as Notifications,
1847
- wt as PaginationComponent,
1848
- el as SelectComponent,
1849
- Oo as ShellComponent,
1850
- re as SubMenu,
1851
- Wo as Table,
1852
- Wo as TableComponent,
1853
- Eo as TextCell,
1854
- il as Textarea,
1855
- cl as TreeView,
1856
- Go as addClickOutsideEventListener,
1857
- Xo as hasCustomEventListener,
1858
- Yo as inputClasses,
1859
- Ut as isDescriptionHidden,
1860
- Rt as myStyles,
1861
- Jo as removeClickOutsideEventListener,
1862
- ye as showErrors
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
  };