vlite3 1.4.3 → 1.4.5

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 (77) hide show
  1. package/components/AppShell/AppShellLayoutStorefront.vue.js +2 -2
  2. package/components/AvatarUploader/AvatarUploader.vue.d.ts +2 -2
  3. package/components/Cart/Cart.vue.d.ts +27 -0
  4. package/components/Cart/Cart.vue.js +242 -0
  5. package/components/Cart/Cart.vue2.js +4 -0
  6. package/components/Cart/CartCouponInput.vue.d.ts +32 -0
  7. package/components/Cart/CartCouponInput.vue.js +176 -0
  8. package/components/Cart/CartCouponInput.vue2.js +4 -0
  9. package/components/Cart/CartEmptyState.vue.d.ts +17 -0
  10. package/components/Cart/CartEmptyState.vue.js +48 -0
  11. package/components/Cart/CartEmptyState.vue2.js +4 -0
  12. package/components/Cart/CartLineItem.vue.d.ts +29 -0
  13. package/components/Cart/CartLineItem.vue.js +341 -0
  14. package/components/Cart/CartLineItem.vue2.js +4 -0
  15. package/components/Cart/CartSummary.vue.d.ts +29 -0
  16. package/components/Cart/CartSummary.vue.js +157 -0
  17. package/components/Cart/CartSummary.vue2.js +4 -0
  18. package/components/Cart/CartVariant1.vue.d.ts +42 -0
  19. package/components/Cart/CartVariant1.vue.js +156 -0
  20. package/components/Cart/CartVariant1.vue2.js +4 -0
  21. package/components/Cart/CartVariant2.vue.d.ts +42 -0
  22. package/components/Cart/CartVariant2.vue.js +154 -0
  23. package/components/Cart/CartVariant2.vue2.js +4 -0
  24. package/components/Cart/CartVariant3.vue.d.ts +41 -0
  25. package/components/Cart/CartVariant3.vue.js +192 -0
  26. package/components/Cart/CartVariant3.vue2.js +4 -0
  27. package/components/Cart/CartVariant4.vue.d.ts +41 -0
  28. package/components/Cart/CartVariant4.vue.js +145 -0
  29. package/components/Cart/CartVariant4.vue2.js +4 -0
  30. package/components/Cart/composables/useCart.d.ts +46 -0
  31. package/components/Cart/composables/useCart.js +110 -0
  32. package/components/Cart/composables/useCartCalculation.d.ts +91 -0
  33. package/components/Cart/composables/useCartCalculation.js +145 -0
  34. package/components/Cart/index.d.ts +9 -0
  35. package/components/Cart/types.d.ts +391 -0
  36. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
  37. package/components/CategoryManager/CategoryManager.vue.js +3 -3
  38. package/components/CategoryManager/CategoryManager.vue2.js +224 -248
  39. package/components/CategoryManager/utils.d.ts +3 -0
  40. package/components/CategoryManager/utils.js +31 -0
  41. package/components/CategoryMenu/CategoryMenu.vue.d.ts +2 -0
  42. package/components/CategoryMenu/CategoryMenu.vue.js +46 -40
  43. package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +5 -1
  44. package/components/CategoryMenu/CategoryMenuVariant1.vue.js +5 -144
  45. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +220 -2
  46. package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +5 -1
  47. package/components/CategoryMenu/CategoryMenuVariant2.vue.js +5 -160
  48. package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +235 -2
  49. package/components/CategoryMenu/types.d.ts +5 -2
  50. package/components/Clipboard.vue.d.ts +2 -2
  51. package/components/Dropdown/Dropdown.vue.d.ts +1 -0
  52. package/components/Dropdown/Dropdown.vue.js +31 -29
  53. package/components/FilePicker/FilePicker.vue.d.ts +2 -2
  54. package/components/FilePicker/FilePicker.vue.js +278 -202
  55. package/components/Form/CustomFields.vue.d.ts +4 -0
  56. package/components/Form/CustomFields.vue.js +2 -2
  57. package/components/Form/CustomFields.vue2.js +349 -145
  58. package/components/Form/FormField.vue.d.ts +1 -1
  59. package/components/Form/FormField.vue.js +1 -1
  60. package/components/Form/types.d.ts +3 -0
  61. package/components/Modal.vue.d.ts +2 -0
  62. package/components/Modal.vue.js +1 -1
  63. package/components/Modal.vue2.js +30 -28
  64. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  65. package/components/Rating/Rating.vue.d.ts +1 -1
  66. package/components/Screen/ScreenFilter.vue.js +3 -2
  67. package/components/SidePanel.vue.d.ts +2 -0
  68. package/components/SidePanel.vue.js +1 -1
  69. package/components/SidePanel.vue2.js +25 -23
  70. package/components/SidebarMenu/SidebarMenu.vue.js +145 -128
  71. package/components/index.d.ts +1 -0
  72. package/core/config.d.ts +128 -0
  73. package/index.d.ts +1 -0
  74. package/index.js +327 -306
  75. package/package.json +1 -1
  76. package/style.css +1 -1
  77. package/types/config.type.d.ts +2 -0
@@ -1,11 +1,11 @@
1
- import { defineComponent as Ce, ref as I, watch as j, computed as s, provide as De, onMounted as Ae, openBlock as b, createElementBlock as C, normalizeClass as ke, createElementVNode as m, renderSlot as Pe, toDisplayString as w, createBlock as G, withCtx as P, createTextVNode as H, createCommentVNode as E, createVNode as h, withDirectives as Ee, withKeys as K, vModelText as Re, unref as U, Transition as _e } from "vue";
2
- import Ne from "./CategoryNode.vue.js";
3
- import Ve from "../Modal.vue.js";
4
- import qe from "../Form/Form.vue.js";
1
+ import { defineComponent as Me, ref as h, watch as j, computed as s, provide as Ce, onMounted as De, openBlock as I, createElementBlock as C, normalizeClass as Ae, createElementVNode as m, renderSlot as ke, toDisplayString as b, createBlock as G, withCtx as P, createTextVNode as H, createCommentVNode as E, createVNode as T, withDirectives as Pe, withKeys as K, vModelText as Ee, unref as z, Transition as Re } from "vue";
2
+ import _e from "./CategoryNode.vue.js";
3
+ import Ne from "../Modal.vue.js";
4
+ import Ve from "../Form/Form.vue.js";
5
5
  import Q from "../Icon.vue.js";
6
6
  /* empty css */
7
7
  import R from "../Button.vue.js";
8
- import { $t as l } from "../../utils/i18n.js";
8
+ import { $t as a } from "../../utils/i18n.js";
9
9
  /* empty css */
10
10
  import "vue-draggable-plus";
11
11
  /* empty css */
@@ -18,7 +18,8 @@ import "v-datepicker-lite/style.css";
18
18
  import "@jaames/iro";
19
19
  import "@vueuse/core";
20
20
  /* empty css */
21
- import Ue from "../IconPicker.vue.js";
21
+ import qe from "../IconPicker.vue.js";
22
+ /* empty css */
22
23
  /* empty css */
23
24
  /* empty css */
24
25
  /* empty css */
@@ -27,7 +28,8 @@ import "../../core/config.js";
27
28
  /* empty css */
28
29
  /* empty css */
29
30
  import { getUniqueId as _ } from "../../utils/functions.js";
30
- const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "text-lg font-bold text-foreground" }, $e = { class: "text-sm text-muted-foreground mt-0.5" }, Fe = {
31
+ import { buildTreeFromRaw as ze, ensureMeta as w } from "./utils.js";
32
+ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "text-lg font-bold text-foreground" }, $e = { class: "text-sm text-muted-foreground mt-0.5" }, Fe = {
31
33
  key: 0,
32
34
  class: "flex flex-col items-center justify-center py-10 px-4 text-center border border-dashed border-border rounded-xl bg-background"
33
35
  }, Je = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, Be = { class: "text-base font-medium text-foreground" }, je = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, Ge = {
@@ -43,7 +45,7 @@ const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
43
45
  }, Le = {
44
46
  key: 0,
45
47
  class: "absolute inset-0 z-10 flex items-center justify-center rounded-xl bg-background/60 backdrop-blur-[1px] transition-opacity"
46
- }, We = { class: "flex items-center gap-2 text-sm text-muted-foreground" }, Ct = /* @__PURE__ */ Ce({
48
+ }, We = { class: "flex items-center gap-2 text-sm text-muted-foreground" }, At = /* @__PURE__ */ Me({
47
49
  __name: "CategoryManager",
48
50
  props: {
49
51
  modelValue: { default: () => [] },
@@ -91,379 +93,353 @@ const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
91
93
  cancelTooltipI18n: {}
92
94
  },
93
95
  emits: ["update:modelValue", "onAdd", "onEdit", "onDelete", "onReorder"],
94
- setup(S, { expose: L, emit: W }) {
95
- const e = S, f = W, d = I([]), p = I(/* @__PURE__ */ new Set()), v = (o) => JSON.parse(JSON.stringify(o)), T = (o, t = null) => {
96
- o.forEach((a, i) => {
97
- a.parentId = t, a.position = i, a.children || (a.children = []), T(a.children, a.id);
98
- });
99
- }, X = (o) => {
100
- const t = /* @__PURE__ */ new Map(), a = [];
101
- o.forEach((r) => {
102
- t.set(r.id, {
103
- ...r,
104
- id: r.id,
105
- title: r.name || r.title || "Untitled",
106
- icon: r.icon,
107
- parentId: r.parentId || null,
108
- position: r.position ?? 0,
109
- children: []
110
- });
111
- }), o.forEach((r) => {
112
- const n = t.get(r.id);
113
- n && (r.parentId && t.has(r.parentId) ? t.get(r.parentId).children.push(n) : a.push(n));
114
- });
115
- const i = (r) => {
116
- r.sort((n, u) => (n.position ?? 0) - (u.position ?? 0)), r.forEach((n) => {
117
- n.children && i(n.children);
118
- });
96
+ setup(M, { expose: L, emit: W }) {
97
+ const e = M, v = W, d = h([]), g = h(/* @__PURE__ */ new Set()), f = (t) => JSON.parse(JSON.stringify(t)), U = (t) => {
98
+ const o = /* @__PURE__ */ new Set(), l = (n) => {
99
+ for (const i of n)
100
+ o.add(i.id), i.children && l(i.children);
119
101
  };
120
- return i(a), a;
121
- }, z = (o) => {
122
- const t = /* @__PURE__ */ new Set(), a = (i) => {
123
- for (const r of i)
124
- t.add(r.id), r.children && a(r.children);
125
- };
126
- return a(o), t;
102
+ return l(t), o;
127
103
  };
128
104
  j(
129
105
  () => e.rawData,
130
- (o) => {
131
- if (o) {
132
- if (o.length === 0) {
133
- d.value = [], p.value = /* @__PURE__ */ new Set(), f("update:modelValue", []);
106
+ (t) => {
107
+ if (t) {
108
+ if (t.length === 0) {
109
+ d.value = [], g.value = /* @__PURE__ */ new Set(), v("update:modelValue", []);
134
110
  return;
135
111
  }
136
- const t = X(o);
137
- T(t);
138
- const a = JSON.stringify(t), i = JSON.stringify(d.value);
139
- if (a !== i) {
140
- const r = z(t), n = new Set(
141
- [...p.value].filter((g) => r.has(g))
112
+ const o = ze(t);
113
+ w(o);
114
+ const l = JSON.stringify(o), n = JSON.stringify(d.value);
115
+ if (l !== n) {
116
+ const i = U(o), r = new Set(
117
+ [...g.value].filter((p) => i.has(p))
142
118
  );
143
- p.value = n;
144
- const u = v(t);
145
- d.value = u, f("update:modelValue", u);
119
+ g.value = r;
120
+ const u = f(o);
121
+ d.value = u, v("update:modelValue", u);
146
122
  }
147
123
  }
148
124
  },
149
125
  { immediate: !0, deep: !0 }
150
126
  ), j(
151
127
  () => e.modelValue,
152
- (o) => {
153
- const t = JSON.stringify(o), a = JSON.stringify(d.value);
154
- if (t !== a && o.length > 0) {
155
- const i = v(o);
156
- T(i), d.value = i;
128
+ (t) => {
129
+ const o = JSON.stringify(t), l = JSON.stringify(d.value);
130
+ if (o !== l && t.length > 0) {
131
+ const n = f(t);
132
+ w(n), d.value = n;
157
133
  }
158
134
  },
159
135
  { immediate: !0, deep: !0 }
160
136
  );
161
- const M = () => {
162
- T(d.value);
163
- const o = v(d.value);
164
- f("update:modelValue", o);
165
- }, Y = (o) => {
166
- const t = new Set(p.value);
167
- t.has(o) ? t.delete(o) : t.add(o), p.value = t;
168
- }, y = I({
137
+ const S = () => {
138
+ w(d.value);
139
+ const t = f(d.value);
140
+ v("update:modelValue", t);
141
+ }, X = (t) => {
142
+ const o = new Set(g.value);
143
+ o.has(t) ? o.delete(t) : o.add(t), g.value = o;
144
+ }, y = h({
169
145
  mode: null,
170
146
  targetId: null,
171
147
  title: "",
172
148
  icon: "lucide:folder"
173
- }), N = (o, t) => {
149
+ }), N = (t, o) => {
174
150
  y.value = {
175
- mode: o,
176
- targetId: o === "add-child" && t || null,
151
+ mode: t,
152
+ targetId: t === "add-child" && o || null,
177
153
  title: "",
178
154
  icon: "lucide:folder"
179
- }, o === "add-child" && t && p.value.add(t);
155
+ }, t === "add-child" && o && g.value.add(o);
180
156
  }, D = () => {
181
157
  y.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
182
158
  }, V = () => {
183
- const { mode: o, targetId: t, title: a, icon: i } = y.value;
184
- if (!a.trim()) return;
185
- const r = [...d.value];
186
- let n = null;
187
- if (o === "add-root")
188
- n = { id: _(), title: a, icon: i, children: [] }, r.push(n);
189
- else if (o === "add-child") {
190
- n = { id: _(), title: a, icon: i, children: [] };
191
- const u = (g) => {
192
- for (const c of g) {
193
- if (c.id === t)
194
- return c.children || (c.children = []), c.children.push(n), !0;
159
+ const { mode: t, targetId: o, title: l, icon: n } = y.value;
160
+ if (!l.trim()) return;
161
+ const i = [...d.value];
162
+ let r = null;
163
+ if (t === "add-root")
164
+ r = { id: _(), title: l, icon: n, children: [] }, i.push(r);
165
+ else if (t === "add-child") {
166
+ r = { id: _(), title: l, icon: n, children: [] };
167
+ const u = (p) => {
168
+ for (const c of p) {
169
+ if (c.id === o)
170
+ return c.children || (c.children = []), c.children.push(r), !0;
195
171
  if (c.children && u(c.children)) return !0;
196
172
  }
197
173
  return !1;
198
174
  };
199
- u(r);
175
+ u(i);
200
176
  }
201
- n && (T(r), f("onAdd", v(n))), d.value = r, M(), D();
202
- }, A = I(!1), x = I("add"), q = I(null), O = I(null), $ = I({}), Z = [
177
+ r && (w(i), v("onAdd", f(r))), d.value = i, S(), D();
178
+ }, A = h(!1), x = h("add"), q = h(null), O = h(null), $ = h({}), Y = [
203
179
  { name: "icon", label: "Category Icon", type: "iconPicker" },
204
180
  { name: "title", label: "Title", type: "text", required: !0 },
205
181
  { name: "description", label: "Description", type: "textarea", props: { rows: 3 } }
206
- ], ee = s(() => e.formSchema || Z), te = s(() => x.value === "add" ? e.modalTitleAddI18n ? l(e.modalTitleAddI18n) : e.modalTitleAdd ? e.modalTitleAdd : l("vlite.categoryManager.modalTitleAdd") !== "vlite.categoryManager.modalTitleAdd" ? l("vlite.categoryManager.modalTitleAdd") : "Add Category" : x.value === "add-child" ? e.modalTitleAddChildI18n ? l(e.modalTitleAddChildI18n) : e.modalTitleAddChild ? e.modalTitleAddChild : l("vlite.categoryManager.modalTitleAddChild") !== "vlite.categoryManager.modalTitleAddChild" ? l("vlite.categoryManager.modalTitleAddChild") : "Add Sub-category" : e.modalTitleEditI18n ? l(e.modalTitleEditI18n) : e.modalTitleEdit ? e.modalTitleEdit : l("vlite.categoryManager.modalTitleEdit") !== "vlite.categoryManager.modalTitleEdit" ? l("vlite.categoryManager.modalTitleEdit") : "Edit Category"), oe = (o, t, a) => {
207
- x.value = o, q.value = t || null, O.value = a || null, $.value = t ? v(t) : {}, A.value = !0;
208
- }, ae = async (o) => {
209
- const t = o?.values || o, a = [...d.value];
210
- let i = null, r = null;
182
+ ], Z = s(() => e.formSchema || Y), ee = s(() => x.value === "add" ? e.modalTitleAddI18n ? a(e.modalTitleAddI18n) : e.modalTitleAdd ? e.modalTitleAdd : a("vlite.categoryManager.modalTitleAdd") !== "vlite.categoryManager.modalTitleAdd" ? a("vlite.categoryManager.modalTitleAdd") : "Add Category" : x.value === "add-child" ? e.modalTitleAddChildI18n ? a(e.modalTitleAddChildI18n) : e.modalTitleAddChild ? e.modalTitleAddChild : a("vlite.categoryManager.modalTitleAddChild") !== "vlite.categoryManager.modalTitleAddChild" ? a("vlite.categoryManager.modalTitleAddChild") : "Add Sub-category" : e.modalTitleEditI18n ? a(e.modalTitleEditI18n) : e.modalTitleEdit ? e.modalTitleEdit : a("vlite.categoryManager.modalTitleEdit") !== "vlite.categoryManager.modalTitleEdit" ? a("vlite.categoryManager.modalTitleEdit") : "Edit Category"), te = (t, o, l) => {
183
+ x.value = t, q.value = o || null, O.value = l || null, $.value = o ? f(o) : {}, A.value = !0;
184
+ }, oe = async (t) => {
185
+ const o = t?.values || t, l = [...d.value];
186
+ let n = null, i = null;
211
187
  if (x.value === "add") {
212
- const n = { id: _(), children: [], ...t };
213
- a.push(n), i = n, r = "onAdd";
188
+ const r = { id: _(), children: [], ...o };
189
+ l.push(r), n = r, i = "onAdd";
214
190
  } else if (x.value === "add-child") {
215
- const n = { id: _(), children: [], ...t }, u = (g) => {
216
- for (const c of g) {
191
+ const r = { id: _(), children: [], ...o }, u = (p) => {
192
+ for (const c of p) {
217
193
  if (c.id === O.value)
218
- return c.children || (c.children = []), c.children.push(n), p.value.add(c.id), !0;
194
+ return c.children || (c.children = []), c.children.push(r), g.value.add(c.id), !0;
219
195
  if (c.children && u(c.children)) return !0;
220
196
  }
221
197
  return !1;
222
198
  };
223
- u(a), i = n, r = "onAdd";
199
+ u(l), n = r, i = "onAdd";
224
200
  } else if (x.value === "edit" && q.value) {
225
- const n = q.value.id, u = (g) => {
226
- const c = g.findIndex((k) => k.id === n);
201
+ const r = q.value.id, u = (p) => {
202
+ const c = p.findIndex((k) => k.id === r);
227
203
  if (c > -1)
228
- return g[c] = { ...g[c], ...t }, i = g[c], !0;
229
- for (const k of g)
204
+ return p[c] = { ...p[c], ...o }, n = p[c], !0;
205
+ for (const k of p)
230
206
  if (k.children && u(k.children)) return !0;
231
207
  return !1;
232
208
  };
233
- u(a), r = "onEdit";
209
+ u(l), i = "onEdit";
234
210
  }
235
- T(a), i && (r === "onAdd" ? f("onAdd", v(i)) : r === "onEdit" && f("onEdit", v(i))), d.value = a, M(), o && typeof o.setSubmitting == "function" && o.setSubmitting(!1), A.value = !1;
236
- }, le = (o) => {
237
- const t = o.id, a = (r) => {
238
- const n = r.findIndex((u) => u.id === t);
239
- if (n > -1)
240
- return r.splice(n, 1), !0;
241
- for (const u of r)
242
- if (u.children && a(u.children)) return !0;
211
+ w(l), n && (i === "onAdd" ? v("onAdd", f(n)) : i === "onEdit" && v("onEdit", f(n))), d.value = l, S(), t && typeof t.setSubmitting == "function" && t.setSubmitting(!1), A.value = !1;
212
+ }, ae = (t) => {
213
+ const o = t.id, l = (i) => {
214
+ const r = i.findIndex((u) => u.id === o);
215
+ if (r > -1)
216
+ return i.splice(r, 1), !0;
217
+ for (const u of i)
218
+ if (u.children && l(u.children)) return !0;
243
219
  return !1;
244
- }, i = [...d.value];
245
- a(i), T(i), d.value = i, f("onDelete", v(o)), M();
246
- }, re = (o) => {
247
- f("onEdit", v(o)), M();
248
- }, ne = (o) => {
249
- d.value = [...o], M();
250
- }, ie = () => {
251
- M();
252
- }, de = (o) => {
253
- T(d.value);
254
- const t = v(d.value);
255
- f("update:modelValue", t);
256
- let a = null;
257
- const i = (r) => {
258
- for (const n of r) {
259
- if (String(n.id) === String(o))
260
- return a = n, !0;
261
- if (n.children && i(n.children)) return !0;
220
+ }, n = [...d.value];
221
+ l(n), w(n), d.value = n, v("onDelete", f(t)), S();
222
+ }, le = (t) => {
223
+ v("onEdit", f(t)), S();
224
+ }, re = (t) => {
225
+ d.value = [...t], S();
226
+ }, ne = () => {
227
+ S();
228
+ }, ie = (t) => {
229
+ w(d.value);
230
+ const o = f(d.value);
231
+ v("update:modelValue", o);
232
+ let l = null;
233
+ const n = (i) => {
234
+ for (const r of i) {
235
+ if (String(r.id) === String(t))
236
+ return l = r, !0;
237
+ if (r.children && n(r.children)) return !0;
262
238
  }
263
239
  return !1;
264
240
  };
265
- i(t), a && f("onReorder", {
266
- id: a.id,
267
- parentId: a.parentId ?? null,
268
- position: a.position ?? 0
241
+ n(o), l && v("onReorder", {
242
+ id: l.id,
243
+ parentId: l.parentId ?? null,
244
+ position: l.position ?? 0
269
245
  });
270
- }, ce = s(() => {
246
+ }, de = s(() => {
271
247
  if (e.emptyTitleI18n) {
272
- const t = l(e.emptyTitleI18n);
273
- if (t !== e.emptyTitleI18n) return t;
248
+ const o = a(e.emptyTitleI18n);
249
+ if (o !== e.emptyTitleI18n) return o;
274
250
  }
275
251
  if (e.emptyTitle !== "No Categories Found") return e.emptyTitle;
276
- const o = l("vlite.categoryManager.emptyTitle");
277
- return o !== "vlite.categoryManager.emptyTitle" ? o : e.emptyTitle;
278
- }), se = s(() => {
252
+ const t = a("vlite.categoryManager.emptyTitle");
253
+ return t !== "vlite.categoryManager.emptyTitle" ? t : e.emptyTitle;
254
+ }), ce = s(() => {
279
255
  if (e.emptyDescriptionI18n) {
280
- const t = l(e.emptyDescriptionI18n);
281
- if (t !== e.emptyDescriptionI18n) return t;
256
+ const o = a(e.emptyDescriptionI18n);
257
+ if (o !== e.emptyDescriptionI18n) return o;
282
258
  }
283
259
  if (e.emptyDescription !== "Get started by creating your first category.") return e.emptyDescription;
284
- const o = l("vlite.categoryManager.emptyDescription");
285
- return o !== "vlite.categoryManager.emptyDescription" ? o : e.emptyDescription;
286
- }), ue = s(() => {
260
+ const t = a("vlite.categoryManager.emptyDescription");
261
+ return t !== "vlite.categoryManager.emptyDescription" ? t : e.emptyDescription;
262
+ }), se = s(() => {
287
263
  if (e.headerTitleI18n) {
288
- const t = l(e.headerTitleI18n);
289
- if (t !== e.headerTitleI18n) return t;
264
+ const o = a(e.headerTitleI18n);
265
+ if (o !== e.headerTitleI18n) return o;
290
266
  }
291
267
  if (e.headerTitle) return e.headerTitle;
292
- const o = l("vlite.categoryManager.headerTitle");
293
- return o !== "vlite.categoryManager.headerTitle" ? o : "Categories";
294
- }), pe = s(() => {
268
+ const t = a("vlite.categoryManager.headerTitle");
269
+ return t !== "vlite.categoryManager.headerTitle" ? t : "Categories";
270
+ }), ue = s(() => {
295
271
  if (e.headerDescriptionI18n) {
296
- const t = l(e.headerDescriptionI18n);
297
- if (t !== e.headerDescriptionI18n) return t;
272
+ const o = a(e.headerDescriptionI18n);
273
+ if (o !== e.headerDescriptionI18n) return o;
298
274
  }
299
275
  if (e.headerDescription) return e.headerDescription;
300
- const o = l("vlite.categoryManager.headerDescription");
301
- return o !== "vlite.categoryManager.headerDescription" ? o : "Manage your hierarchical structure.";
276
+ const t = a("vlite.categoryManager.headerDescription");
277
+ return t !== "vlite.categoryManager.headerDescription" ? t : "Manage your hierarchical structure.";
302
278
  }), ge = s(() => {
303
279
  if (e.addCategoryTextI18n) {
304
- const t = l(e.addCategoryTextI18n);
305
- if (t !== e.addCategoryTextI18n) return t;
280
+ const o = a(e.addCategoryTextI18n);
281
+ if (o !== e.addCategoryTextI18n) return o;
306
282
  }
307
283
  if (e.addCategoryText) return e.addCategoryText;
308
- const o = l("vlite.categoryManager.addCategory");
309
- return o !== "vlite.categoryManager.addCategory" ? o : "Add Category";
310
- }), me = s(() => {
284
+ const t = a("vlite.categoryManager.addCategory");
285
+ return t !== "vlite.categoryManager.addCategory" ? t : "Add Category";
286
+ }), pe = s(() => {
311
287
  if (e.createCategoryTextI18n) {
312
- const t = l(e.createCategoryTextI18n);
313
- if (t !== e.createCategoryTextI18n) return t;
288
+ const o = a(e.createCategoryTextI18n);
289
+ if (o !== e.createCategoryTextI18n) return o;
314
290
  }
315
291
  if (e.createCategoryText) return e.createCategoryText;
316
- const o = l("vlite.categoryManager.createCategory");
317
- return o !== "vlite.categoryManager.createCategory" ? o : "Create Category";
318
- }), fe = s(() => {
292
+ const t = a("vlite.categoryManager.createCategory");
293
+ return t !== "vlite.categoryManager.createCategory" ? t : "Create Category";
294
+ }), me = s(() => {
319
295
  if (e.newRootPlaceholderI18n) {
320
- const t = l(e.newRootPlaceholderI18n);
321
- if (t !== e.newRootPlaceholderI18n) return t;
296
+ const o = a(e.newRootPlaceholderI18n);
297
+ if (o !== e.newRootPlaceholderI18n) return o;
322
298
  }
323
299
  if (e.newRootPlaceholder) return e.newRootPlaceholder;
324
- const o = l("vlite.categoryManager.newRootPlaceholder");
325
- return o !== "vlite.categoryManager.newRootPlaceholder" ? o : "New root category...";
300
+ const t = a("vlite.categoryManager.newRootPlaceholder");
301
+ return t !== "vlite.categoryManager.newRootPlaceholder" ? t : "New root category...";
326
302
  }), ve = s(() => {
327
303
  if (e.modalSaveTextI18n) {
328
- const t = l(e.modalSaveTextI18n);
329
- if (t !== e.modalSaveTextI18n) return t;
304
+ const o = a(e.modalSaveTextI18n);
305
+ if (o !== e.modalSaveTextI18n) return o;
330
306
  }
331
307
  if (e.modalSaveText) return e.modalSaveText;
332
- const o = l("vlite.categoryManager.modalSaveText");
333
- return o !== "vlite.categoryManager.modalSaveText" ? o : "Save Details";
334
- }), ye = s(() => {
308
+ const t = a("vlite.categoryManager.modalSaveText");
309
+ return t !== "vlite.categoryManager.modalSaveText" ? t : "Save Details";
310
+ }), fe = s(() => {
335
311
  if (e.newSubcategoryPlaceholderI18n) {
336
- const t = l(e.newSubcategoryPlaceholderI18n);
337
- if (t !== e.newSubcategoryPlaceholderI18n) return t;
312
+ const o = a(e.newSubcategoryPlaceholderI18n);
313
+ if (o !== e.newSubcategoryPlaceholderI18n) return o;
338
314
  }
339
315
  if (e.newSubcategoryPlaceholder) return e.newSubcategoryPlaceholder;
340
- const o = l("vlite.categoryManager.newSubcategoryPlaceholder");
341
- return o !== "vlite.categoryManager.newSubcategoryPlaceholder" ? o : "New subcategory title...";
342
- }), he = s(() => {
316
+ const t = a("vlite.categoryManager.newSubcategoryPlaceholder");
317
+ return t !== "vlite.categoryManager.newSubcategoryPlaceholder" ? t : "New subcategory title...";
318
+ }), ye = s(() => {
343
319
  if (e.categoryTitlePlaceholderI18n) {
344
- const t = l(e.categoryTitlePlaceholderI18n);
345
- if (t !== e.categoryTitlePlaceholderI18n) return t;
320
+ const o = a(e.categoryTitlePlaceholderI18n);
321
+ if (o !== e.categoryTitlePlaceholderI18n) return o;
346
322
  }
347
323
  if (e.categoryTitlePlaceholder) return e.categoryTitlePlaceholder;
348
- const o = l("vlite.categoryManager.categoryTitlePlaceholder");
349
- return o !== "vlite.categoryManager.categoryTitlePlaceholder" ? o : "Category title...";
350
- }), Te = s(() => e.quickAddTooltipI18n ? l(e.quickAddTooltipI18n) : e.quickAddTooltip ? e.quickAddTooltip : l("vlite.categoryManager.quickAddTooltip") !== "vlite.categoryManager.quickAddTooltip" ? l("vlite.categoryManager.quickAddTooltip") : "Quick Add Subcategory"), Ie = s(() => e.advancedDetailsTooltipI18n ? l(e.advancedDetailsTooltipI18n) : e.advancedDetailsTooltip ? e.advancedDetailsTooltip : l("vlite.categoryManager.advancedDetailsTooltip") !== "vlite.categoryManager.advancedDetailsTooltip" ? l("vlite.categoryManager.advancedDetailsTooltip") : "Advanced Details"), xe = s(() => e.deleteTooltipI18n ? l(e.deleteTooltipI18n) : e.deleteTooltip ? e.deleteTooltip : l("vlite.categoryManager.deleteTooltip") !== "vlite.categoryManager.deleteTooltip" ? l("vlite.categoryManager.deleteTooltip") : "Delete"), F = s(() => e.saveTooltipI18n ? l(e.saveTooltipI18n) : e.saveTooltip ? e.saveTooltip : l("vlite.categoryManager.saveTooltip") !== "vlite.categoryManager.saveTooltip" ? l("vlite.categoryManager.saveTooltip") : "Save"), J = s(() => e.cancelTooltipI18n ? l(e.cancelTooltipI18n) : e.cancelTooltip ? e.cancelTooltip : l("vlite.categoryManager.cancelTooltip") !== "vlite.categoryManager.cancelTooltip" ? l("vlite.categoryManager.cancelTooltip") : "Cancel");
351
- De("categoryManager", {
352
- expandedIds: p,
324
+ const t = a("vlite.categoryManager.categoryTitlePlaceholder");
325
+ return t !== "vlite.categoryManager.categoryTitlePlaceholder" ? t : "Category title...";
326
+ }), Te = s(() => e.quickAddTooltipI18n ? a(e.quickAddTooltipI18n) : e.quickAddTooltip ? e.quickAddTooltip : a("vlite.categoryManager.quickAddTooltip") !== "vlite.categoryManager.quickAddTooltip" ? a("vlite.categoryManager.quickAddTooltip") : "Quick Add Subcategory"), he = s(() => e.advancedDetailsTooltipI18n ? a(e.advancedDetailsTooltipI18n) : e.advancedDetailsTooltip ? e.advancedDetailsTooltip : a("vlite.categoryManager.advancedDetailsTooltip") !== "vlite.categoryManager.advancedDetailsTooltip" ? a("vlite.categoryManager.advancedDetailsTooltip") : "Advanced Details"), xe = s(() => e.deleteTooltipI18n ? a(e.deleteTooltipI18n) : e.deleteTooltip ? e.deleteTooltip : a("vlite.categoryManager.deleteTooltip") !== "vlite.categoryManager.deleteTooltip" ? a("vlite.categoryManager.deleteTooltip") : "Delete"), F = s(() => e.saveTooltipI18n ? a(e.saveTooltipI18n) : e.saveTooltip ? e.saveTooltip : a("vlite.categoryManager.saveTooltip") !== "vlite.categoryManager.saveTooltip" ? a("vlite.categoryManager.saveTooltip") : "Save"), J = s(() => e.cancelTooltipI18n ? a(e.cancelTooltipI18n) : e.cancelTooltip ? e.cancelTooltip : a("vlite.categoryManager.cancelTooltip") !== "vlite.categoryManager.cancelTooltip" ? a("vlite.categoryManager.cancelTooltip") : "Cancel");
327
+ Ce("categoryManager", {
328
+ expandedIds: g,
353
329
  inlineState: y,
354
- toggleExpand: Y,
330
+ toggleExpand: X,
355
331
  startInline: N,
356
332
  saveInline: V,
357
333
  cancelInline: D,
358
- saveItem: re,
359
- openModalForm: oe,
360
- deleteItem: le,
334
+ saveItem: le,
335
+ openModalForm: te,
336
+ deleteItem: ae,
361
337
  readonly: s(() => e.readonly),
362
338
  size: s(() => e.size),
363
- newSubcategoryPlaceholderText: ye,
364
- categoryTitlePlaceholderText: he,
339
+ newSubcategoryPlaceholderText: fe,
340
+ categoryTitlePlaceholderText: ye,
365
341
  quickAddTooltipText: Te,
366
- advancedDetailsTooltipText: Ie,
342
+ advancedDetailsTooltipText: he,
367
343
  deleteTooltipText: xe,
368
344
  saveTooltipText: F,
369
345
  cancelTooltipText: J
370
346
  });
371
- const be = {
372
- mounted: (o) => {
373
- setTimeout(() => o.focus(), 10);
347
+ const Ie = {
348
+ mounted: (t) => {
349
+ setTimeout(() => t.focus(), 10);
374
350
  }
351
+ }, be = () => {
352
+ const t = U(d.value);
353
+ g.value = t;
375
354
  }, we = () => {
376
- const o = z(d.value);
377
- p.value = o;
378
- }, Me = () => {
379
- p.value = /* @__PURE__ */ new Set();
380
- }, B = (...o) => {
381
- const t = new Set(p.value);
382
- o.forEach((a) => t.add(a)), p.value = t;
383
- }, Se = (...o) => {
384
- const t = new Set(p.value);
385
- o.forEach((a) => t.delete(a)), p.value = t;
355
+ g.value = /* @__PURE__ */ new Set();
356
+ }, B = (...t) => {
357
+ const o = new Set(g.value);
358
+ t.forEach((l) => o.add(l)), g.value = o;
359
+ }, Se = (...t) => {
360
+ const o = new Set(g.value);
361
+ t.forEach((l) => o.delete(l)), g.value = o;
386
362
  };
387
- return Ae(() => {
363
+ return De(() => {
388
364
  e.defaultExpanded && e.defaultExpanded.length > 0 && B(...e.defaultExpanded);
389
365
  }), L({
390
- expandedIds: p,
391
- expandAll: we,
392
- collapseAll: Me,
366
+ expandedIds: g,
367
+ expandAll: be,
368
+ collapseAll: we,
393
369
  expand: B,
394
370
  collapse: Se
395
- }), (o, t) => (b(), C("div", {
396
- class: ke(["category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6 relative", { "category-manager--loading": S.loading }])
371
+ }), (t, o) => (I(), C("div", {
372
+ class: Ae(["category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6 relative", { "category-manager--loading": M.loading }])
397
373
  }, [
398
- m("div", ze, [
399
- Pe(o.$slots, "header", {}, () => [
374
+ m("div", Ue, [
375
+ ke(t.$slots, "header", {}, () => [
400
376
  m("div", null, [
401
- m("h3", Oe, w(ue.value), 1),
402
- m("p", $e, w(pe.value), 1)
377
+ m("h3", Oe, b(se.value), 1),
378
+ m("p", $e, b(ue.value), 1)
403
379
  ]),
404
- S.readonly ? E("", !0) : (b(), G(R, {
380
+ M.readonly ? E("", !0) : (I(), G(R, {
405
381
  key: 0,
406
382
  variant: "primary",
407
383
  icon: "lucide:plus",
408
384
  size: "sm",
409
- onClick: t[0] || (t[0] = (a) => N("add-root"))
385
+ onClick: o[0] || (o[0] = (l) => N("add-root"))
410
386
  }, {
411
387
  default: P(() => [
412
- H(w(ge.value), 1)
388
+ H(b(ge.value), 1)
413
389
  ]),
414
390
  _: 1
415
391
  }))
416
392
  ], !0)
417
393
  ]),
418
- d.value.length === 0 && y.value.mode !== "add-root" ? (b(), C("div", Fe, [
394
+ d.value.length === 0 && y.value.mode !== "add-root" ? (I(), C("div", Fe, [
419
395
  m("div", Je, [
420
- h(Q, {
396
+ T(Q, {
421
397
  icon: "lucide:folder-tree",
422
398
  class: "w-6 h-6 text-muted-foreground"
423
399
  })
424
400
  ]),
425
- m("h4", Be, w(ce.value), 1),
426
- m("p", je, w(se.value), 1),
427
- S.readonly ? E("", !0) : (b(), G(R, {
401
+ m("h4", Be, b(de.value), 1),
402
+ m("p", je, b(ce.value), 1),
403
+ M.readonly ? E("", !0) : (I(), G(R, {
428
404
  key: 0,
429
405
  variant: "outline",
430
406
  size: "sm",
431
407
  class: "mt-5",
432
408
  icon: "lucide:plus",
433
- onClick: t[1] || (t[1] = (a) => N("add-root"))
409
+ onClick: o[1] || (o[1] = (l) => N("add-root"))
434
410
  }, {
435
411
  default: P(() => [
436
- H(w(me.value), 1)
412
+ H(b(pe.value), 1)
437
413
  ]),
438
414
  _: 1
439
415
  }))
440
- ])) : (b(), C("div", Ge, [
441
- h(Ne, {
416
+ ])) : (I(), C("div", Ge, [
417
+ T(_e, {
442
418
  modelValue: d.value,
443
- "onUpdate:modelValue": ne,
444
- onChange: ie,
445
- onDragEnd: de
419
+ "onUpdate:modelValue": re,
420
+ onChange: ne,
421
+ onDragEnd: ie
446
422
  }, null, 8, ["modelValue"]),
447
- y.value.mode === "add-root" ? (b(), C("div", He, [
448
- h(Ue, {
423
+ y.value.mode === "add-root" ? (I(), C("div", He, [
424
+ T(qe, {
449
425
  modelValue: y.value.icon,
450
- "onUpdate:modelValue": t[2] || (t[2] = (a) => y.value.icon = a),
426
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => y.value.icon = l),
451
427
  "btn-props": { variant: "ghost", size: "xs", class: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md" },
452
428
  position: "bottom-start"
453
429
  }, null, 8, ["modelValue"]),
454
- Ee(m("input", {
455
- "onUpdate:modelValue": t[3] || (t[3] = (a) => y.value.title = a),
430
+ Pe(m("input", {
431
+ "onUpdate:modelValue": o[3] || (o[3] = (l) => y.value.title = l),
456
432
  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",
457
- placeholder: fe.value,
433
+ placeholder: me.value,
458
434
  onKeyup: [
459
435
  K(V, ["enter"]),
460
436
  K(D, ["esc"])
461
437
  ]
462
438
  }, null, 40, Ke), [
463
- [be],
464
- [Re, y.value.title]
439
+ [Ie],
440
+ [Ee, y.value.title]
465
441
  ]),
466
- h(R, {
442
+ T(R, {
467
443
  variant: "primary",
468
444
  size: "xs",
469
445
  icon: "lucide:check",
@@ -471,7 +447,7 @@ const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
471
447
  title: F.value,
472
448
  onClick: V
473
449
  }, null, 8, ["title"]),
474
- h(R, {
450
+ T(R, {
475
451
  variant: "ghost",
476
452
  size: "xs",
477
453
  icon: "lucide:x",
@@ -481,34 +457,34 @@ const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
481
457
  }, null, 8, ["title"])
482
458
  ])) : E("", !0)
483
459
  ])),
484
- h(Ve, {
460
+ T(Ne, {
485
461
  show: A.value,
486
- "onUpdate:show": t[4] || (t[4] = (a) => A.value = a),
487
- title: te.value,
462
+ "onUpdate:show": o[4] || (o[4] = (l) => A.value = l),
463
+ title: ee.value,
488
464
  "max-width": "max-w-md"
489
465
  }, {
490
466
  default: P(() => [
491
467
  m("div", Qe, [
492
- h(U(qe), {
493
- schema: ee.value,
468
+ T(z(Ve), {
469
+ schema: Z.value,
494
470
  values: $.value,
495
471
  isUpdate: x.value === "edit",
496
472
  submitText: ve.value,
497
- onOnSubmit: ae
473
+ onOnSubmit: oe
498
474
  }, null, 8, ["schema", "values", "isUpdate", "submitText"])
499
475
  ])
500
476
  ]),
501
477
  _: 1
502
478
  }, 8, ["show", "title"]),
503
- h(_e, { name: "cm-fade" }, {
479
+ T(Re, { name: "cm-fade" }, {
504
480
  default: P(() => [
505
- S.loading ? (b(), C("div", Le, [
481
+ M.loading ? (I(), C("div", Le, [
506
482
  m("div", We, [
507
- h(Q, {
483
+ T(Q, {
508
484
  icon: "lucide:loader-2",
509
485
  class: "w-4 h-4 animate-spin"
510
486
  }),
511
- m("span", null, w(U(l)("vlite.categoryManager.loading") !== "vlite.categoryManager.loading" ? U(l)("vlite.categoryManager.loading") : "Updating..."), 1)
487
+ m("span", null, b(z(a)("vlite.categoryManager.loading") !== "vlite.categoryManager.loading" ? z(a)("vlite.categoryManager.loading") : "Updating..."), 1)
512
488
  ])
513
489
  ])) : E("", !0)
514
490
  ]),
@@ -518,5 +494,5 @@ const ze = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
518
494
  }
519
495
  });
520
496
  export {
521
- Ct as default
497
+ At as default
522
498
  };