vlite3 1.1.1 → 1.1.2

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.
Files changed (60) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
  2. package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
  3. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  4. package/components/Button.vue.d.ts +1 -1
  5. package/components/Calendar/Calendar.vue.d.ts +6 -6
  6. package/components/Carousel/Carousel.vue.d.ts +2 -2
  7. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
  8. package/components/CategoryManager/CategoryManager.vue.js +187 -147
  9. package/components/CategoryManager/types.d.ts +14 -0
  10. package/components/Chip/Chip.vue.d.ts +2 -2
  11. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  12. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  13. package/components/ConfirmationModal.vue.d.ts +2 -2
  14. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
  15. package/components/DataTable/DataTable.vue.d.ts +3 -3
  16. package/components/Dropdown/Dropdown.vue.d.ts +2 -2
  17. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  18. package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
  19. package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
  20. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  21. package/components/Form/Form.vue.js +2 -2
  22. package/components/Form/Form.vue2.js +220 -232
  23. package/components/Form/FormField.vue.d.ts +1 -1
  24. package/components/Input.vue.d.ts +3 -3
  25. package/components/Invoice/Invoice.vue.d.ts +1 -4
  26. package/components/Invoice/Invoice.vue.js +20 -13
  27. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -0
  28. package/components/Invoice/InvoiceVariant1.vue.js +302 -256
  29. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -0
  30. package/components/Invoice/InvoiceVariant2.vue.js +164 -168
  31. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -0
  32. package/components/Invoice/InvoiceVariant3.vue.js +213 -170
  33. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -0
  34. package/components/Invoice/InvoiceVariant4.vue.js +280 -227
  35. package/components/Invoice/types.d.ts +4 -0
  36. package/components/List/List.vue.d.ts +1 -9
  37. package/components/List/List.vue.js +166 -165
  38. package/components/List/ListFieldRow.vue.d.ts +2 -2
  39. package/components/List/ListFieldRow.vue.js +50 -50
  40. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  41. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  42. package/components/NavbarCommandPalette.vue.js +1 -1
  43. package/components/NumberInput.vue.d.ts +2 -2
  44. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  45. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  46. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  47. package/components/Stats/Stats.vue.d.ts +1 -1
  48. package/components/StatusChip/status-map.js +27 -7
  49. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  50. package/components/Workbook/Workbook.vue.d.ts +3 -3
  51. package/core/config.d.ts +76 -0
  52. package/core/index.js +17 -5
  53. package/index.js +264 -262
  54. package/package.json +1 -1
  55. package/style.css +2 -2
  56. package/types/config.type.d.ts +6 -0
  57. package/types/list.type.d.ts +6 -0
  58. package/utils/configUtils.d.ts +9 -0
  59. package/utils/configUtils.js +7 -0
  60. package/utils/index.d.ts +1 -0
@@ -1,10 +1,10 @@
1
- import { defineComponent as Y, ref as c, watch as Z, computed as I, provide as ee, openBlock as g, createElementBlock as V, createElementVNode as u, renderSlot as te, createBlock as R, withCtx as U, createTextVNode as $, createCommentVNode as z, createVNode as f, toDisplayString as O, withDirectives as oe, withKeys as F, vModelText as ne, unref as re } from "vue";
2
- import le from "./CategoryNode.vue.js";
3
- import de from "../Modal.vue.js";
4
- import ie from "../Form/Form.vue.js";
5
- import ae from "../Icon.vue.js";
1
+ import { defineComponent as te, ref as p, watch as R, computed as D, provide as oe, openBlock as x, createElementBlock as V, createElementVNode as m, renderSlot as ne, createBlock as $, withCtx as _, createTextVNode as F, createCommentVNode as A, createVNode as g, toDisplayString as J, withDirectives as re, withKeys as B, vModelText as le, unref as ie } from "vue";
2
+ import de from "./CategoryNode.vue.js";
3
+ import ae from "../Modal.vue.js";
4
+ import se from "../Form/Form.vue.js";
5
+ import ue from "../Icon.vue.js";
6
6
  /* empty css */
7
- import D from "../Button.vue.js";
7
+ import E from "../Button.vue.js";
8
8
  import "../../core/config.js";
9
9
  /* empty css */
10
10
  import "vue-draggable-plus";
@@ -17,27 +17,28 @@ import "v-datepicker-lite/style.css";
17
17
  import "@jaames/iro";
18
18
  import "@vueuse/core";
19
19
  /* empty css */
20
- import se from "../IconPicker.vue.js";
20
+ import ce from "../IconPicker.vue.js";
21
21
  /* empty css */
22
22
  /* empty css */
23
23
  import { getUniqueId as N } from "../../utils/functions.js";
24
- const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6" }, ce = { class: "flex items-center justify-between mb-6" }, me = {
24
+ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6" }, fe = { class: "flex items-center justify-between mb-6" }, pe = {
25
25
  key: 0,
26
26
  class: "flex flex-col items-center justify-center py-10 px-4 text-center border border-dashed border-border rounded-xl bg-background"
27
- }, fe = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, pe = { class: "text-base font-medium text-foreground" }, ve = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, he = {
27
+ }, ve = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, he = { class: "text-base font-medium text-foreground" }, ge = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, ye = {
28
28
  key: 1,
29
29
  class: "w-full tree-wrapper scrollable-container",
30
30
  style: { "will-change": "transform", contain: "layout style" }
31
- }, ge = {
31
+ }, xe = {
32
32
  key: 0,
33
33
  class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mt-2"
34
- }, ye = {
34
+ }, be = {
35
35
  class: "modal-body",
36
36
  style: { "will-change": "transform", contain: "layout style" }
37
- }, je = /* @__PURE__ */ Y({
37
+ }, Ke = /* @__PURE__ */ te({
38
38
  __name: "CategoryManager",
39
39
  props: {
40
40
  modelValue: { default: () => [] },
41
+ rawData: { default: void 0 },
41
42
  formSchema: {},
42
43
  readonly: { type: Boolean, default: !1 },
43
44
  emptyTitle: { default: "No Categories Found" },
@@ -45,199 +46,238 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
45
46
  size: { default: "md" }
46
47
  },
47
48
  emits: ["update:modelValue", "onAdd", "onEdit", "onDelete", "onReorder"],
48
- setup(y, { emit: B }) {
49
- const b = y, s = B, i = c([]), x = c(/* @__PURE__ */ new Set()), w = (t) => JSON.parse(JSON.stringify(t)), A = (t) => {
50
- t.forEach((e) => {
51
- e.children || (e.children = []), A(e.children);
49
+ setup(b, { emit: j }) {
50
+ const w = b, f = j, d = p([]), S = p(/* @__PURE__ */ new Set()), u = (t) => JSON.parse(JSON.stringify(t)), v = (t, e = null) => {
51
+ t.forEach((o, l) => {
52
+ o.parentId = e, o.position = l, o.children || (o.children = []), v(o.children, o.id);
52
53
  });
54
+ }, q = (t) => {
55
+ const e = /* @__PURE__ */ new Map(), o = [];
56
+ t.forEach((n) => {
57
+ e.set(n.id, {
58
+ ...n,
59
+ id: n.id,
60
+ title: n.name || n.title || "Untitled",
61
+ icon: n.icon,
62
+ parentId: n.parentId || null,
63
+ position: n.position ?? 0,
64
+ children: []
65
+ });
66
+ }), t.forEach((n) => {
67
+ const r = e.get(n.id);
68
+ r && (n.parentId && e.has(n.parentId) ? e.get(n.parentId).children.push(r) : o.push(r));
69
+ });
70
+ const l = (n) => {
71
+ n.sort((r, a) => (r.position ?? 0) - (a.position ?? 0)), n.forEach((r) => {
72
+ r.children && l(r.children);
73
+ });
74
+ };
75
+ return l(o), o;
53
76
  };
54
- Z(
55
- () => b.modelValue,
77
+ R(
78
+ () => w.rawData,
79
+ (t) => {
80
+ if (t && t.length > 0) {
81
+ const e = q(t);
82
+ v(e);
83
+ const o = JSON.stringify(e), l = JSON.stringify(d.value);
84
+ if (o !== l) {
85
+ const n = u(e);
86
+ d.value = n, f("update:modelValue", n);
87
+ }
88
+ }
89
+ },
90
+ { immediate: !0, deep: !0 }
91
+ ), R(
92
+ () => w.modelValue,
56
93
  (t) => {
57
- const e = JSON.stringify(t), o = JSON.stringify(i.value);
58
- if (e !== o) {
59
- const r = w(t);
60
- A(r), i.value = r;
94
+ const e = JSON.stringify(t), o = JSON.stringify(d.value);
95
+ if (e !== o && t.length > 0) {
96
+ const l = u(t);
97
+ v(l), d.value = l;
61
98
  }
62
99
  },
63
100
  { immediate: !0, deep: !0 }
64
101
  );
65
- const p = (t = !1) => {
66
- const e = w(i.value);
67
- s("update:modelValue", e), t && s("onReorder", e);
68
- }, J = (t) => {
69
- const e = new Set(x.value);
70
- e.has(t) ? e.delete(t) : e.add(t), x.value = e;
71
- }, a = c({
102
+ const y = (t = !1) => {
103
+ v(d.value);
104
+ const e = u(d.value);
105
+ f("update:modelValue", e), t && f("onReorder", e);
106
+ }, K = (t) => {
107
+ const e = new Set(S.value);
108
+ e.has(t) ? e.delete(t) : e.add(t), S.value = e;
109
+ }, s = p({
72
110
  mode: null,
73
111
  targetId: null,
74
112
  title: "",
75
113
  icon: "lucide:folder"
76
- }), _ = (t, e) => {
77
- a.value = {
114
+ }), M = (t, e) => {
115
+ s.value = {
78
116
  mode: t,
79
117
  targetId: t === "add-child" && e || null,
80
118
  title: "",
81
119
  icon: "lucide:folder"
82
- }, t === "add-child" && e && x.value.add(e);
83
- }, S = () => {
84
- a.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
120
+ }, t === "add-child" && e && S.value.add(e);
121
+ }, I = () => {
122
+ s.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
85
123
  }, T = () => {
86
- const { mode: t, targetId: e, title: o, icon: r } = a.value;
124
+ const { mode: t, targetId: e, title: o, icon: l } = s.value;
87
125
  if (!o.trim()) return;
88
- const d = [...i.value];
89
- if (t === "add-root") {
90
- const l = { id: N(), title: o, icon: r, children: [] };
91
- d.push(l), s("onAdd", l);
92
- } else if (t === "add-child") {
93
- const l = { id: N(), title: o, icon: r, children: [] }, n = (v) => {
94
- for (const h of v) {
95
- if (h.id === e)
96
- return h.children || (h.children = []), h.children.push(l), !0;
97
- if (h.children && n(h.children)) return !0;
126
+ const n = [...d.value];
127
+ let r = null;
128
+ if (t === "add-root")
129
+ r = { id: N(), title: o, icon: l, children: [] }, n.push(r);
130
+ else if (t === "add-child") {
131
+ r = { id: N(), title: o, icon: l, children: [] };
132
+ const a = (c) => {
133
+ for (const i of c) {
134
+ if (i.id === e)
135
+ return i.children || (i.children = []), i.children.push(r), !0;
136
+ if (i.children && a(i.children)) return !0;
98
137
  }
99
138
  return !1;
100
139
  };
101
- n(d), s("onAdd", l);
140
+ a(n);
102
141
  }
103
- i.value = d, p(), S();
104
- }, C = c(!1), m = c("add"), k = c(null), E = c(null), M = c({}), j = [
142
+ r && (v(n), f("onAdd", u(r))), d.value = n, y(), I();
143
+ }, k = p(!1), h = p("add"), U = p(null), z = p(null), O = p({}), P = [
105
144
  { name: "icon", label: "Category Icon", type: "iconPicker" },
106
145
  { name: "title", label: "Title", type: "text", required: !0 },
107
146
  { name: "description", label: "Description", type: "textarea", props: { rows: 3 } }
108
- ], q = I(() => b.formSchema || j), K = I(() => m.value === "add" ? "Add Category" : m.value === "add-child" ? "Add Sub-category" : "Edit Category"), P = (t, e, o) => {
109
- m.value = t, k.value = e || null, E.value = o || null, M.value = e ? w(e) : {}, C.value = !0;
110
- }, G = async (t) => {
111
- const e = t?.values || t, o = [...i.value];
112
- if (m.value === "add") {
147
+ ], G = D(() => w.formSchema || P), H = D(() => h.value === "add" ? "Add Category" : h.value === "add-child" ? "Add Sub-category" : "Edit Category"), L = (t, e, o) => {
148
+ h.value = t, U.value = e || null, z.value = o || null, O.value = e ? u(e) : {}, k.value = !0;
149
+ }, Q = async (t) => {
150
+ const e = t?.values || t, o = [...d.value];
151
+ let l = null, n = null;
152
+ if (h.value === "add") {
113
153
  const r = { id: N(), children: [], ...e };
114
- o.push(r), s("onAdd", r);
115
- } else if (m.value === "add-child") {
116
- const r = { id: N(), children: [], ...e }, d = (l) => {
117
- for (const n of l) {
118
- if (n.id === E.value)
119
- return n.children || (n.children = []), n.children.push(r), x.value.add(n.id), !0;
120
- if (n.children && d(n.children)) return !0;
154
+ o.push(r), l = r, n = "onAdd";
155
+ } else if (h.value === "add-child") {
156
+ const r = { id: N(), children: [], ...e }, a = (c) => {
157
+ for (const i of c) {
158
+ if (i.id === z.value)
159
+ return i.children || (i.children = []), i.children.push(r), S.value.add(i.id), !0;
160
+ if (i.children && a(i.children)) return !0;
121
161
  }
122
162
  return !1;
123
163
  };
124
- d(o), s("onAdd", r);
125
- } else if (m.value === "edit" && k.value) {
126
- const r = k.value.id, d = (l) => {
127
- const n = l.findIndex((v) => v.id === r);
128
- if (n > -1)
129
- return l[n] = { ...l[n], ...e }, !0;
130
- for (const v of l)
131
- if (v.children && d(v.children)) return !0;
164
+ a(o), l = r, n = "onAdd";
165
+ } else if (h.value === "edit" && U.value) {
166
+ const r = U.value.id, a = (c) => {
167
+ const i = c.findIndex((C) => C.id === r);
168
+ if (i > -1)
169
+ return c[i] = { ...c[i], ...e }, l = c[i], !0;
170
+ for (const C of c)
171
+ if (C.children && a(C.children)) return !0;
132
172
  return !1;
133
173
  };
134
- d(o), s("onEdit", { ...k.value, ...e });
174
+ a(o), n = "onEdit";
135
175
  }
136
- i.value = o, p(), t && typeof t.setSubmitting == "function" && t.setSubmitting(!1), C.value = !1;
137
- }, H = (t) => {
138
- const e = t.id, o = (d) => {
139
- const l = d.findIndex((n) => n.id === e);
140
- if (l > -1)
141
- return d.splice(l, 1), !0;
142
- for (const n of d)
143
- if (n.children && o(n.children)) return !0;
176
+ v(o), l && (n === "onAdd" ? f("onAdd", u(l)) : n === "onEdit" && f("onEdit", u(l))), d.value = o, y(), t && typeof t.setSubmitting == "function" && t.setSubmitting(!1), k.value = !1;
177
+ }, W = (t) => {
178
+ const e = t.id, o = (n) => {
179
+ const r = n.findIndex((a) => a.id === e);
180
+ if (r > -1)
181
+ return n.splice(r, 1), !0;
182
+ for (const a of n)
183
+ if (a.children && o(a.children)) return !0;
144
184
  return !1;
145
- }, r = [...i.value];
146
- o(r), i.value = r, s("onDelete", t), p();
147
- }, L = (t) => {
148
- s("onEdit", w(t)), p();
149
- }, Q = (t) => {
150
- i.value = [...t], p(!0);
151
- }, W = () => {
152
- p(!0);
185
+ }, l = [...d.value];
186
+ o(l), v(l), d.value = l, f("onDelete", u(t)), y();
187
+ }, X = (t) => {
188
+ f("onEdit", u(t)), y();
189
+ }, Y = (t) => {
190
+ d.value = [...t], y(!0);
191
+ }, Z = () => {
192
+ y(!0);
153
193
  };
154
- ee("categoryManager", {
155
- expandedIds: x,
156
- inlineState: a,
157
- toggleExpand: J,
158
- startInline: _,
194
+ oe("categoryManager", {
195
+ expandedIds: S,
196
+ inlineState: s,
197
+ toggleExpand: K,
198
+ startInline: M,
159
199
  saveInline: T,
160
- cancelInline: S,
161
- saveItem: L,
162
- openModalForm: P,
163
- deleteItem: H,
164
- readonly: I(() => b.readonly),
165
- size: I(() => b.size)
200
+ cancelInline: I,
201
+ saveItem: X,
202
+ openModalForm: L,
203
+ deleteItem: W,
204
+ readonly: D(() => w.readonly),
205
+ size: D(() => w.size)
166
206
  });
167
- const X = {
207
+ const ee = {
168
208
  mounted: (t) => {
169
209
  setTimeout(() => t.focus(), 10);
170
210
  }
171
211
  };
172
- return (t, e) => (g(), V("div", ue, [
173
- u("div", ce, [
174
- te(t.$slots, "header", {}, () => [
175
- e[6] || (e[6] = u("div", null, [
176
- u("h3", { class: "text-lg font-bold text-foreground" }, "Categories"),
177
- u("p", { class: "text-sm text-muted-foreground mt-0.5" }, "Manage your hierarchical structure.")
212
+ return (t, e) => (x(), V("div", me, [
213
+ m("div", fe, [
214
+ ne(t.$slots, "header", {}, () => [
215
+ e[6] || (e[6] = m("div", null, [
216
+ m("h3", { class: "text-lg font-bold text-foreground" }, "Categories"),
217
+ m("p", { class: "text-sm text-muted-foreground mt-0.5" }, "Manage your hierarchical structure.")
178
218
  ], -1)),
179
- y.readonly ? z("", !0) : (g(), R(D, {
219
+ b.readonly ? A("", !0) : (x(), $(E, {
180
220
  key: 0,
181
221
  variant: "primary",
182
222
  icon: "lucide:plus",
183
223
  size: "sm",
184
- onClick: e[0] || (e[0] = (o) => _("add-root"))
224
+ onClick: e[0] || (e[0] = (o) => M("add-root"))
185
225
  }, {
186
- default: U(() => [...e[5] || (e[5] = [
187
- $(" Add Category ", -1)
226
+ default: _(() => [...e[5] || (e[5] = [
227
+ F(" Add Category ", -1)
188
228
  ])]),
189
229
  _: 1
190
230
  }))
191
231
  ])
192
232
  ]),
193
- i.value.length === 0 && a.value.mode !== "add-root" ? (g(), V("div", me, [
194
- u("div", fe, [
195
- f(ae, {
233
+ d.value.length === 0 && s.value.mode !== "add-root" ? (x(), V("div", pe, [
234
+ m("div", ve, [
235
+ g(ue, {
196
236
  icon: "lucide:folder-tree",
197
237
  class: "w-6 h-6 text-muted-foreground"
198
238
  })
199
239
  ]),
200
- u("h4", pe, O(y.emptyTitle), 1),
201
- u("p", ve, O(y.emptyDescription), 1),
202
- y.readonly ? z("", !0) : (g(), R(D, {
240
+ m("h4", he, J(b.emptyTitle), 1),
241
+ m("p", ge, J(b.emptyDescription), 1),
242
+ b.readonly ? A("", !0) : (x(), $(E, {
203
243
  key: 0,
204
244
  variant: "outline",
205
245
  size: "sm",
206
246
  class: "mt-5",
207
247
  icon: "lucide:plus",
208
- onClick: e[1] || (e[1] = (o) => _("add-root"))
248
+ onClick: e[1] || (e[1] = (o) => M("add-root"))
209
249
  }, {
210
- default: U(() => [...e[7] || (e[7] = [
211
- $(" Create Category ", -1)
250
+ default: _(() => [...e[7] || (e[7] = [
251
+ F(" Create Category ", -1)
212
252
  ])]),
213
253
  _: 1
214
254
  }))
215
- ])) : (g(), V("div", he, [
216
- f(le, {
217
- modelValue: i.value,
218
- "onUpdate:modelValue": Q,
219
- onChange: W
255
+ ])) : (x(), V("div", ye, [
256
+ g(de, {
257
+ modelValue: d.value,
258
+ "onUpdate:modelValue": Y,
259
+ onChange: Z
220
260
  }, null, 8, ["modelValue"]),
221
- a.value.mode === "add-root" ? (g(), V("div", ge, [
222
- f(se, {
223
- modelValue: a.value.icon,
224
- "onUpdate:modelValue": e[2] || (e[2] = (o) => a.value.icon = o),
261
+ s.value.mode === "add-root" ? (x(), V("div", xe, [
262
+ g(ce, {
263
+ modelValue: s.value.icon,
264
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => s.value.icon = o),
225
265
  "btn-props": { variant: "ghost", size: "xs", class: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md" },
226
266
  position: "bottom-start"
227
267
  }, null, 8, ["modelValue"]),
228
- oe(u("input", {
229
- "onUpdate:modelValue": e[3] || (e[3] = (o) => a.value.title = o),
268
+ re(m("input", {
269
+ "onUpdate:modelValue": e[3] || (e[3] = (o) => s.value.title = o),
230
270
  class: "flex-1 bg-transparent border-0 outline-none focus:ring-0 px-1 py-1 text-sm transition-colors w-full shadow-none caret-primary text-foreground placeholder:text-muted-foreground",
231
271
  placeholder: "New root category...",
232
272
  onKeyup: [
233
- F(T, ["enter"]),
234
- F(S, ["esc"])
273
+ B(T, ["enter"]),
274
+ B(I, ["esc"])
235
275
  ]
236
276
  }, null, 544), [
237
- [X],
238
- [ne, a.value.title]
277
+ [ee],
278
+ [le, s.value.title]
239
279
  ]),
240
- f(D, {
280
+ g(E, {
241
281
  variant: "primary",
242
282
  size: "xs",
243
283
  icon: "lucide:check",
@@ -245,30 +285,30 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
245
285
  title: "Save",
246
286
  onClick: T
247
287
  }),
248
- f(D, {
288
+ g(E, {
249
289
  variant: "ghost",
250
290
  size: "xs",
251
291
  icon: "lucide:x",
252
292
  class: "shrink-0 h-7 w-7 px-0",
253
293
  title: "Cancel",
254
- onClick: S
294
+ onClick: I
255
295
  })
256
- ])) : z("", !0)
296
+ ])) : A("", !0)
257
297
  ])),
258
- f(de, {
259
- show: C.value,
260
- "onUpdate:show": e[4] || (e[4] = (o) => C.value = o),
261
- title: K.value,
298
+ g(ae, {
299
+ show: k.value,
300
+ "onUpdate:show": e[4] || (e[4] = (o) => k.value = o),
301
+ title: H.value,
262
302
  "max-width": "max-w-md"
263
303
  }, {
264
- default: U(() => [
265
- u("div", ye, [
266
- f(re(ie), {
267
- schema: q.value,
268
- values: M.value,
269
- isUpdate: m.value === "edit",
304
+ default: _(() => [
305
+ m("div", be, [
306
+ g(ie(se), {
307
+ schema: G.value,
308
+ values: O.value,
309
+ isUpdate: h.value === "edit",
270
310
  submitText: "Save Details",
271
- onOnSubmit: G
311
+ onOnSubmit: Q
272
312
  }, null, 8, ["schema", "values", "isUpdate"])
273
313
  ])
274
314
  ]),
@@ -278,5 +318,5 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
278
318
  }
279
319
  });
280
320
  export {
281
- je as default
321
+ Ke as default
282
322
  };
@@ -6,11 +6,25 @@ export interface CategoryItem {
6
6
  icon?: string;
7
7
  description?: string;
8
8
  children?: CategoryItem[];
9
+ parentId?: string | number | null;
10
+ position?: number;
11
+ [key: string]: any;
12
+ }
13
+ export interface RawCategoryItem {
14
+ id: string | number;
15
+ name?: string;
16
+ title?: string;
17
+ icon?: string;
18
+ position?: number;
19
+ parentId?: string | number | null;
20
+ fullPath?: string;
9
21
  [key: string]: any;
10
22
  }
11
23
  export interface CategoryManagerProps {
12
24
  /** The nested array of category items */
13
25
  modelValue?: CategoryItem[];
26
+ /** Optional flat list of items to be auto-converted to a nested tree */
27
+ rawData?: RawCategoryItem[];
14
28
  /** Optional custom form schema for add/edit operations */
15
29
  formSchema?: IForm[];
16
30
  /** Disable drag-and-drop and mutation actions */
@@ -13,11 +13,11 @@ declare function __VLS_template(): {
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import('vue').DefineComponent<ExtendedProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
- click: (event: MouseEvent) => any;
17
16
  delete: (event: MouseEvent) => any;
17
+ click: (event: MouseEvent) => any;
18
18
  }, string, import('vue').PublicProps, Readonly<ExtendedProps> & Readonly<{
19
- onClick?: (event: MouseEvent) => any;
20
19
  onDelete?: (event: MouseEvent) => any;
20
+ onClick?: (event: MouseEvent) => any;
21
21
  }>, {
22
22
  text: string;
23
23
  class: string;
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue2.js";
7
+ import ee from "./CommandPaletteItem.vue.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -22,11 +22,11 @@ declare function __VLS_template(): {
22
22
  };
23
23
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
24
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
- cancel: () => any;
26
25
  confirm: () => any;
26
+ cancel: () => any;
27
27
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
28
- onCancel?: () => any;
29
28
  onConfirm?: () => any;
29
+ onCancel?: () => any;
30
30
  }>, {
31
31
  variant: "danger" | "primary" | "warning" | "success" | "info";
32
32
  loading: boolean;
@@ -32,8 +32,8 @@ declare function __VLS_template(): {
32
32
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
33
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
34
34
  variant: CustomFieldsDisplayVariant;
35
- columns: 1 | 2 | 3 | 4;
36
35
  fields: CustomFieldItem[];
36
+ columns: 1 | 2 | 3 | 4;
37
37
  emptyText: string;
38
38
  keyProp: string;
39
39
  valueProp: string;
@@ -18,24 +18,24 @@ declare function __VLS_template(): {
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
20
  select: (state: SelectionState) => any;
21
- change: (state: TableState) => any;
22
21
  delete: (rows: any[]) => any;
22
+ change: (state: TableState) => any;
23
23
  "update:itemsPerPage": (value: number) => any;
24
24
  rowClick: (payload: RowClickPayload) => any;
25
25
  "update:selectedRows": (value: any[]) => any;
26
26
  }, string, import('vue').PublicProps, Readonly<DataTableProps> & Readonly<{
27
27
  onSelect?: (state: SelectionState) => any;
28
- onChange?: (state: TableState) => any;
29
28
  onDelete?: (rows: any[]) => any;
29
+ onChange?: (state: TableState) => any;
30
30
  "onUpdate:itemsPerPage"?: (value: number) => any;
31
31
  onRowClick?: (payload: RowClickPayload) => any;
32
32
  "onUpdate:selectedRows"?: (value: any[]) => any;
33
33
  }>, {
34
34
  search: string;
35
35
  variant: "default" | "raised";
36
+ loading: boolean;
36
37
  striped: boolean;
37
38
  compact: boolean;
38
- loading: boolean;
39
39
  rows: any[];
40
40
  showSearch: boolean;
41
41
  headers: TableHeader[];
@@ -83,12 +83,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
83
83
  onOnOpen?: () => any;
84
84
  "onUpdate:isOpen"?: (value: boolean) => any;
85
85
  }>, {
86
- disabled: boolean;
86
+ columns: number | string;
87
87
  loading: boolean;
88
+ disabled: boolean;
88
89
  direction: "ltr" | "rtl";
89
90
  selectable: boolean;
90
91
  options: (IDropdownOption | string | number)[];
91
- columns: number | string;
92
92
  selectedIndex: number | null;
93
93
  maxHeight: string;
94
94
  layout: "default" | "grouped";
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
14
14
  onSelect?: (option: IDropdownOption) => any;
15
15
  onMouseenter?: (payload: any) => any;
16
16
  }>, {
17
+ columns: number | string;
17
18
  selectable: boolean;
18
19
  options: IDropdownOptions;
19
- columns: number | string;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
21
21
  export default _default;
@@ -48,11 +48,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
48
48
  "onLoad-more"?: () => any;
49
49
  }>, {
50
50
  class: string;
51
+ columns: number | string;
51
52
  loading: boolean;
52
53
  direction: "ltr" | "rtl";
53
54
  selectable: boolean;
54
55
  options: (IDropdownOption | string | number)[];
55
- columns: number | string;
56
56
  cachedOptions: IDropdownOptions;
57
57
  selectedIndex: number | null;
58
58
  maxHeight: string;
@@ -9,8 +9,8 @@ interface Props {
9
9
  triggerProps?: ButtonProps;
10
10
  }
11
11
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
- disabled: boolean;
13
12
  placeholder: string;
13
+ disabled: boolean;
14
14
  direction: "ltr" | "rtl";
15
15
  selectedLabel: string;
16
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
@@ -52,8 +52,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
52
52
  variant: "dropzone" | "input";
53
53
  size: InputSize;
54
54
  rounded: InputRounded;
55
- disabled: boolean;
56
55
  loading: boolean;
56
+ disabled: boolean;
57
57
  multiSelect: boolean;
58
58
  modelValue: FilePickerValue | FilePickerValue[] | null;
59
59
  fileTypes: string[];