vlite3 1.1.1 → 1.1.4

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 (117) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
  2. package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.d.ts +1 -1
  7. package/components/Button.vue.js +30 -28
  8. package/components/Calendar/Calendar.vue.d.ts +6 -6
  9. package/components/Carousel/Carousel.vue.d.ts +2 -2
  10. package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
  11. package/components/CategoryManager/CategoryManager.vue.js +204 -145
  12. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  13. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  14. package/components/CategoryManager/types.d.ts +14 -0
  15. package/components/Chat/ChatBubble.vue.js +22 -22
  16. package/components/CheckBox.vue.js +29 -28
  17. package/components/Chip/Chip.vue.d.ts +2 -2
  18. package/components/ConfirmationModal.vue.d.ts +2 -2
  19. package/components/ConfirmationModal.vue.js +30 -28
  20. package/components/CopyButton.vue.d.ts +50 -0
  21. package/components/CopyButton.vue.js +69 -0
  22. package/components/CopyButton.vue2.js +4 -0
  23. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
  24. package/components/DataTable/DataTable.vue.d.ts +3 -3
  25. package/components/DataTable/DataTable.vue.js +44 -44
  26. package/components/DatePicker.vue.js +41 -35
  27. package/components/DateRangePicker.vue.js +18 -17
  28. package/components/Dropdown/Dropdown.vue.d.ts +5 -2
  29. package/components/Dropdown/Dropdown.vue.js +117 -115
  30. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  31. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  32. package/components/Dropdown/DropdownItem.vue.js +21 -20
  33. package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
  34. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  35. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  36. package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
  37. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  38. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  39. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  40. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  41. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  42. package/components/FilePicker/FilePicker.vue.js +93 -90
  43. package/components/Form/CustomFields.vue.js +2 -2
  44. package/components/Form/Form.vue.js +1 -1
  45. package/components/Form/Form.vue2.js +230 -238
  46. package/components/Form/FormField.vue.d.ts +1 -1
  47. package/components/Form/FormField.vue.js +204 -148
  48. package/components/Form/FormFields.vue.js +2 -2
  49. package/components/Form/FormFields.vue2.js +28 -27
  50. package/components/Form/types.d.ts +2 -2
  51. package/components/Form/utils/form.utils.d.ts +3 -3
  52. package/components/Form/utils/form.utils.js +37 -37
  53. package/components/Input.vue.d.ts +3 -3
  54. package/components/Input.vue.js +64 -62
  55. package/components/Invoice/Invoice.vue.d.ts +1 -4
  56. package/components/Invoice/Invoice.vue.js +22 -13
  57. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  58. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  59. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  60. package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
  61. package/components/Invoice/InvoiceVariant1.vue.js +304 -271
  62. package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
  63. package/components/Invoice/InvoiceVariant2.vue.js +168 -181
  64. package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
  65. package/components/Invoice/InvoiceVariant3.vue.js +215 -182
  66. package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
  67. package/components/Invoice/InvoiceVariant4.vue.js +281 -238
  68. package/components/Invoice/index.d.ts +1 -0
  69. package/components/Invoice/types.d.ts +26 -0
  70. package/components/List/List.vue.d.ts +1 -9
  71. package/components/List/List.vue.js +166 -165
  72. package/components/List/ListFieldRow.vue.d.ts +2 -2
  73. package/components/List/ListFieldRow.vue.js +50 -50
  74. package/components/Masonry/Masonry.vue.d.ts +1 -1
  75. package/components/Modal.vue.js +1 -1
  76. package/components/Modal.vue2.js +60 -54
  77. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  78. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  79. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  80. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  81. package/components/NumberInput.vue.d.ts +2 -2
  82. package/components/NumberInput.vue.js +2 -2
  83. package/components/NumberInput.vue2.js +121 -116
  84. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  85. package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
  86. package/components/SidePanel.vue.js +2 -2
  87. package/components/SidePanel.vue2.js +58 -52
  88. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  89. package/components/Stats/StatItem.vue.js +96 -91
  90. package/components/Stats/Stats.vue.d.ts +1 -1
  91. package/components/Stats/types.d.ts +1 -0
  92. package/components/StatusChip/status-map.js +27 -7
  93. package/components/Switch.vue.d.ts +6 -1
  94. package/components/Switch.vue.js +61 -24
  95. package/components/TagInput/TagInput.vue.d.ts +187 -0
  96. package/components/TagInput/TagInput.vue.js +113 -0
  97. package/components/TagInput/TagInput.vue2.js +4 -0
  98. package/components/TagInput/index.d.ts +1 -0
  99. package/components/Textarea.vue.js +19 -18
  100. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  101. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  102. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  103. package/components/Workbook/Workbook.vue.d.ts +3 -3
  104. package/core/config.d.ts +112 -0
  105. package/core/index.js +17 -5
  106. package/index.d.ts +2 -0
  107. package/index.js +279 -271
  108. package/package.json +1 -1
  109. package/style.css +617 -2
  110. package/types/button.d.ts +1 -1
  111. package/types/config.type.d.ts +6 -0
  112. package/types/list.type.d.ts +6 -0
  113. package/types/styles.d.ts +1 -0
  114. package/utils/configUtils.d.ts +9 -0
  115. package/utils/configUtils.js +7 -0
  116. package/utils/functions.js +9 -9
  117. 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 ne, ref as v, watch as R, computed as D, provide as oe, openBlock as x, createElementBlock as V, createElementVNode as f, renderSlot as re, createBlock as $, withCtx as _, createTextVNode as F, createCommentVNode as A, createVNode as g, toDisplayString as J, withDirectives as le, withKeys as B, vModelText as ie, unref as de } from "vue";
2
+ import ae from "./CategoryNode.vue.js";
3
+ import se from "../Modal.vue.js";
4
+ import ue from "../Form/Form.vue.js";
5
+ import ce 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 me 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 fe = { class: "category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6" }, pe = { class: "flex items-center justify-between mb-6" }, ve = {
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
+ }, he = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, ge = { class: "text-base font-medium text-foreground" }, ye = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, xe = {
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
+ }, be = {
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
+ }, we = {
35
35
  class: "modal-body",
36
36
  style: { "will-change": "transform", contain: "layout style" }
37
- }, je = /* @__PURE__ */ Y({
37
+ }, Pe = /* @__PURE__ */ ne({
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,257 @@ 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, c = j, d = v([]), I = v(/* @__PURE__ */ new Set()), s = (t) => JSON.parse(JSON.stringify(t)), p = (t, e = null) => {
51
+ t.forEach((n, l) => {
52
+ n.parentId = e, n.position = l, n.children || (n.children = []), p(n.children, n.id);
52
53
  });
54
+ }, q = (t) => {
55
+ const e = /* @__PURE__ */ new Map(), n = [];
56
+ t.forEach((o) => {
57
+ e.set(o.id, {
58
+ ...o,
59
+ id: o.id,
60
+ title: o.name || o.title || "Untitled",
61
+ icon: o.icon,
62
+ parentId: o.parentId || null,
63
+ position: o.position ?? 0,
64
+ children: []
65
+ });
66
+ }), t.forEach((o) => {
67
+ const r = e.get(o.id);
68
+ r && (o.parentId && e.has(o.parentId) ? e.get(o.parentId).children.push(r) : n.push(r));
69
+ });
70
+ const l = (o) => {
71
+ o.sort((r, a) => (r.position ?? 0) - (a.position ?? 0)), o.forEach((r) => {
72
+ r.children && l(r.children);
73
+ });
74
+ };
75
+ return l(n), n;
53
76
  };
54
- Z(
55
- () => b.modelValue,
77
+ R(
78
+ () => w.rawData,
56
79
  (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;
80
+ if (t && t.length > 0) {
81
+ const e = q(t);
82
+ p(e);
83
+ const n = JSON.stringify(e), l = JSON.stringify(d.value);
84
+ if (n !== l) {
85
+ const o = s(e);
86
+ d.value = o, c("update:modelValue", o);
87
+ }
88
+ }
89
+ },
90
+ { immediate: !0, deep: !0 }
91
+ ), R(
92
+ () => w.modelValue,
93
+ (t) => {
94
+ const e = JSON.stringify(t), n = JSON.stringify(d.value);
95
+ if (e !== n && t.length > 0) {
96
+ const l = s(t);
97
+ p(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 = () => {
103
+ p(d.value);
104
+ const t = s(d.value);
105
+ c("update:modelValue", t);
106
+ }, K = (t) => {
107
+ const e = new Set(I.value);
108
+ e.has(t) ? e.delete(t) : e.add(t), I.value = e;
109
+ }, u = v({
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
+ u.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);
120
+ }, t === "add-child" && e && I.value.add(e);
83
121
  }, S = () => {
84
- a.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
122
+ u.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
85
123
  }, T = () => {
86
- const { mode: t, targetId: e, title: o, icon: r } = a.value;
87
- 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;
124
+ const { mode: t, targetId: e, title: n, icon: l } = u.value;
125
+ if (!n.trim()) return;
126
+ const o = [...d.value];
127
+ let r = null;
128
+ if (t === "add-root")
129
+ r = { id: N(), title: n, icon: l, children: [] }, o.push(r);
130
+ else if (t === "add-child") {
131
+ r = { id: N(), title: n, icon: l, children: [] };
132
+ const a = (m) => {
133
+ for (const i of m) {
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(o);
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 && (p(o), c("onAdd", s(r))), d.value = o, y(), S();
143
+ }, k = v(!1), h = v("add"), U = v(null), z = v(null), O = v({}), 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, n) => {
148
+ h.value = t, U.value = e || null, z.value = n || null, O.value = e ? s(e) : {}, k.value = !0;
149
+ }, Q = async (t) => {
150
+ const e = t?.values || t, n = [...d.value];
151
+ let l = null, o = 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
+ n.push(r), l = r, o = "onAdd";
155
+ } else if (h.value === "add-child") {
156
+ const r = { id: N(), children: [], ...e }, a = (m) => {
157
+ for (const i of m) {
158
+ if (i.id === z.value)
159
+ return i.children || (i.children = []), i.children.push(r), I.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(n), l = r, o = "onAdd";
165
+ } else if (h.value === "edit" && U.value) {
166
+ const r = U.value.id, a = (m) => {
167
+ const i = m.findIndex((C) => C.id === r);
168
+ if (i > -1)
169
+ return m[i] = { ...m[i], ...e }, l = m[i], !0;
170
+ for (const C of m)
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(n), o = "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
+ p(n), l && (o === "onAdd" ? c("onAdd", s(l)) : o === "onEdit" && c("onEdit", s(l))), d.value = n, y(), t && typeof t.setSubmitting == "function" && t.setSubmitting(!1), k.value = !1;
177
+ }, W = (t) => {
178
+ const e = t.id, n = (o) => {
179
+ const r = o.findIndex((a) => a.id === e);
180
+ if (r > -1)
181
+ return o.splice(r, 1), !0;
182
+ for (const a of o)
183
+ if (a.children && n(a.children)) return !0;
184
+ return !1;
185
+ }, l = [...d.value];
186
+ n(l), p(l), d.value = l, c("onDelete", s(t)), y();
187
+ }, X = (t) => {
188
+ c("onEdit", s(t)), y();
189
+ }, Y = (t) => {
190
+ d.value = [...t], y();
191
+ }, Z = () => {
192
+ y();
193
+ }, ee = (t) => {
194
+ p(d.value);
195
+ const e = s(d.value);
196
+ c("update:modelValue", e);
197
+ let n = null;
198
+ const l = (o) => {
199
+ for (const r of o) {
200
+ if (String(r.id) === String(t))
201
+ return n = r, !0;
202
+ if (r.children && l(r.children)) return !0;
203
+ }
144
204
  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);
205
+ };
206
+ l(e), n && c("onReorder", {
207
+ id: n.id,
208
+ parentId: n.parentId ?? null,
209
+ position: n.position ?? 0
210
+ });
153
211
  };
154
- ee("categoryManager", {
155
- expandedIds: x,
156
- inlineState: a,
157
- toggleExpand: J,
158
- startInline: _,
212
+ oe("categoryManager", {
213
+ expandedIds: I,
214
+ inlineState: u,
215
+ toggleExpand: K,
216
+ startInline: M,
159
217
  saveInline: T,
160
218
  cancelInline: S,
161
- saveItem: L,
162
- openModalForm: P,
163
- deleteItem: H,
164
- readonly: I(() => b.readonly),
165
- size: I(() => b.size)
219
+ saveItem: X,
220
+ openModalForm: L,
221
+ deleteItem: W,
222
+ readonly: D(() => w.readonly),
223
+ size: D(() => w.size)
166
224
  });
167
- const X = {
225
+ const te = {
168
226
  mounted: (t) => {
169
227
  setTimeout(() => t.focus(), 10);
170
228
  }
171
229
  };
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.")
230
+ return (t, e) => (x(), V("div", fe, [
231
+ f("div", pe, [
232
+ re(t.$slots, "header", {}, () => [
233
+ e[6] || (e[6] = f("div", null, [
234
+ f("h3", { class: "text-lg font-bold text-foreground" }, "Categories"),
235
+ f("p", { class: "text-sm text-muted-foreground mt-0.5" }, "Manage your hierarchical structure.")
178
236
  ], -1)),
179
- y.readonly ? z("", !0) : (g(), R(D, {
237
+ b.readonly ? A("", !0) : (x(), $(E, {
180
238
  key: 0,
181
239
  variant: "primary",
182
240
  icon: "lucide:plus",
183
241
  size: "sm",
184
- onClick: e[0] || (e[0] = (o) => _("add-root"))
242
+ onClick: e[0] || (e[0] = (n) => M("add-root"))
185
243
  }, {
186
- default: U(() => [...e[5] || (e[5] = [
187
- $(" Add Category ", -1)
244
+ default: _(() => [...e[5] || (e[5] = [
245
+ F(" Add Category ", -1)
188
246
  ])]),
189
247
  _: 1
190
248
  }))
191
249
  ])
192
250
  ]),
193
- i.value.length === 0 && a.value.mode !== "add-root" ? (g(), V("div", me, [
194
- u("div", fe, [
195
- f(ae, {
251
+ d.value.length === 0 && u.value.mode !== "add-root" ? (x(), V("div", ve, [
252
+ f("div", he, [
253
+ g(ce, {
196
254
  icon: "lucide:folder-tree",
197
255
  class: "w-6 h-6 text-muted-foreground"
198
256
  })
199
257
  ]),
200
- u("h4", pe, O(y.emptyTitle), 1),
201
- u("p", ve, O(y.emptyDescription), 1),
202
- y.readonly ? z("", !0) : (g(), R(D, {
258
+ f("h4", ge, J(b.emptyTitle), 1),
259
+ f("p", ye, J(b.emptyDescription), 1),
260
+ b.readonly ? A("", !0) : (x(), $(E, {
203
261
  key: 0,
204
262
  variant: "outline",
205
263
  size: "sm",
206
264
  class: "mt-5",
207
265
  icon: "lucide:plus",
208
- onClick: e[1] || (e[1] = (o) => _("add-root"))
266
+ onClick: e[1] || (e[1] = (n) => M("add-root"))
209
267
  }, {
210
- default: U(() => [...e[7] || (e[7] = [
211
- $(" Create Category ", -1)
268
+ default: _(() => [...e[7] || (e[7] = [
269
+ F(" Create Category ", -1)
212
270
  ])]),
213
271
  _: 1
214
272
  }))
215
- ])) : (g(), V("div", he, [
216
- f(le, {
217
- modelValue: i.value,
218
- "onUpdate:modelValue": Q,
219
- onChange: W
273
+ ])) : (x(), V("div", xe, [
274
+ g(ae, {
275
+ modelValue: d.value,
276
+ "onUpdate:modelValue": Y,
277
+ onChange: Z,
278
+ onDragEnd: ee
220
279
  }, 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),
280
+ u.value.mode === "add-root" ? (x(), V("div", be, [
281
+ g(me, {
282
+ modelValue: u.value.icon,
283
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => u.value.icon = n),
225
284
  "btn-props": { variant: "ghost", size: "xs", class: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md" },
226
285
  position: "bottom-start"
227
286
  }, null, 8, ["modelValue"]),
228
- oe(u("input", {
229
- "onUpdate:modelValue": e[3] || (e[3] = (o) => a.value.title = o),
287
+ le(f("input", {
288
+ "onUpdate:modelValue": e[3] || (e[3] = (n) => u.value.title = n),
230
289
  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
290
  placeholder: "New root category...",
232
291
  onKeyup: [
233
- F(T, ["enter"]),
234
- F(S, ["esc"])
292
+ B(T, ["enter"]),
293
+ B(S, ["esc"])
235
294
  ]
236
295
  }, null, 544), [
237
- [X],
238
- [ne, a.value.title]
296
+ [te],
297
+ [ie, u.value.title]
239
298
  ]),
240
- f(D, {
299
+ g(E, {
241
300
  variant: "primary",
242
301
  size: "xs",
243
302
  icon: "lucide:check",
@@ -245,7 +304,7 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
245
304
  title: "Save",
246
305
  onClick: T
247
306
  }),
248
- f(D, {
307
+ g(E, {
249
308
  variant: "ghost",
250
309
  size: "xs",
251
310
  icon: "lucide:x",
@@ -253,22 +312,22 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
253
312
  title: "Cancel",
254
313
  onClick: S
255
314
  })
256
- ])) : z("", !0)
315
+ ])) : A("", !0)
257
316
  ])),
258
- f(de, {
259
- show: C.value,
260
- "onUpdate:show": e[4] || (e[4] = (o) => C.value = o),
261
- title: K.value,
317
+ g(se, {
318
+ show: k.value,
319
+ "onUpdate:show": e[4] || (e[4] = (n) => k.value = n),
320
+ title: H.value,
262
321
  "max-width": "max-w-md"
263
322
  }, {
264
- default: U(() => [
265
- u("div", ye, [
266
- f(re(ie), {
267
- schema: q.value,
268
- values: M.value,
269
- isUpdate: m.value === "edit",
323
+ default: _(() => [
324
+ f("div", we, [
325
+ g(de(ue), {
326
+ schema: G.value,
327
+ values: O.value,
328
+ isUpdate: h.value === "edit",
270
329
  submitText: "Save Details",
271
- onOnSubmit: G
330
+ onOnSubmit: Q
272
331
  }, null, 8, ["schema", "values", "isUpdate"])
273
332
  ])
274
333
  ]),
@@ -278,5 +337,5 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
278
337
  }
279
338
  });
280
339
  export {
281
- je as default
340
+ Pe as default
282
341
  };
@@ -6,9 +6,11 @@ interface Props {
6
6
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
7
  change: () => any;
8
8
  "update:modelValue": (value: CategoryItem[]) => any;
9
+ dragEnd: (id: string | number) => any;
9
10
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
10
11
  onChange?: () => any;
11
12
  "onUpdate:modelValue"?: (value: CategoryItem[]) => any;
13
+ onDragEnd?: (id: string | number) => any;
12
14
  }>, {
13
15
  level: number;
14
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;