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.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
34
|
+
}, we = {
|
|
35
35
|
class: "modal-body",
|
|
36
36
|
style: { "will-change": "transform", contain: "layout style" }
|
|
37
|
-
},
|
|
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(
|
|
49
|
-
const
|
|
50
|
-
t.forEach((
|
|
51
|
-
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
|
-
|
|
55
|
-
() =>
|
|
77
|
+
R(
|
|
78
|
+
() => w.rawData,
|
|
56
79
|
(t) => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
e
|
|
71
|
-
|
|
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
|
-
}),
|
|
77
|
-
|
|
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 &&
|
|
120
|
+
}, t === "add-child" && e && I.value.add(e);
|
|
83
121
|
}, S = () => {
|
|
84
|
-
|
|
122
|
+
u.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
|
|
85
123
|
}, T = () => {
|
|
86
|
-
const { mode: t, targetId: e, title:
|
|
87
|
-
if (!
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
140
|
+
a(o);
|
|
102
141
|
}
|
|
103
|
-
|
|
104
|
-
},
|
|
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
|
-
],
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
const e = t?.values || t,
|
|
112
|
-
|
|
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
|
-
|
|
115
|
-
} else if (
|
|
116
|
-
const r = { id: N(), children: [], ...e },
|
|
117
|
-
for (const
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
120
|
-
if (
|
|
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
|
-
|
|
125
|
-
} else if (
|
|
126
|
-
const r =
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
return
|
|
130
|
-
for (const
|
|
131
|
-
if (
|
|
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
|
-
|
|
174
|
+
a(n), o = "onEdit";
|
|
135
175
|
}
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
const e = t.id,
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
142
|
-
for (const
|
|
143
|
-
if (
|
|
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
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
155
|
-
expandedIds:
|
|
156
|
-
inlineState:
|
|
157
|
-
toggleExpand:
|
|
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:
|
|
162
|
-
openModalForm:
|
|
163
|
-
deleteItem:
|
|
164
|
-
readonly:
|
|
165
|
-
size:
|
|
219
|
+
saveItem: X,
|
|
220
|
+
openModalForm: L,
|
|
221
|
+
deleteItem: W,
|
|
222
|
+
readonly: D(() => w.readonly),
|
|
223
|
+
size: D(() => w.size)
|
|
166
224
|
});
|
|
167
|
-
const
|
|
225
|
+
const te = {
|
|
168
226
|
mounted: (t) => {
|
|
169
227
|
setTimeout(() => t.focus(), 10);
|
|
170
228
|
}
|
|
171
229
|
};
|
|
172
|
-
return (t, e) => (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
e[6] || (e[6] =
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
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] = (
|
|
242
|
+
onClick: e[0] || (e[0] = (n) => M("add-root"))
|
|
185
243
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
|
|
244
|
+
default: _(() => [...e[5] || (e[5] = [
|
|
245
|
+
F(" Add Category ", -1)
|
|
188
246
|
])]),
|
|
189
247
|
_: 1
|
|
190
248
|
}))
|
|
191
249
|
])
|
|
192
250
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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] = (
|
|
266
|
+
onClick: e[1] || (e[1] = (n) => M("add-root"))
|
|
209
267
|
}, {
|
|
210
|
-
default:
|
|
211
|
-
|
|
268
|
+
default: _(() => [...e[7] || (e[7] = [
|
|
269
|
+
F(" Create Category ", -1)
|
|
212
270
|
])]),
|
|
213
271
|
_: 1
|
|
214
272
|
}))
|
|
215
|
-
])) : (
|
|
216
|
-
|
|
217
|
-
modelValue:
|
|
218
|
-
"onUpdate:modelValue":
|
|
219
|
-
onChange:
|
|
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
|
-
|
|
222
|
-
|
|
223
|
-
modelValue:
|
|
224
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
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
|
-
|
|
229
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
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
|
-
|
|
234
|
-
|
|
292
|
+
B(T, ["enter"]),
|
|
293
|
+
B(S, ["esc"])
|
|
235
294
|
]
|
|
236
295
|
}, null, 544), [
|
|
237
|
-
[
|
|
238
|
-
[
|
|
296
|
+
[te],
|
|
297
|
+
[ie, u.value.title]
|
|
239
298
|
]),
|
|
240
|
-
|
|
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
|
-
|
|
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
|
-
])) :
|
|
315
|
+
])) : A("", !0)
|
|
257
316
|
])),
|
|
258
|
-
|
|
259
|
-
show:
|
|
260
|
-
"onUpdate:show": e[4] || (e[4] = (
|
|
261
|
-
title:
|
|
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:
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
schema:
|
|
268
|
-
values:
|
|
269
|
-
isUpdate:
|
|
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:
|
|
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
|
-
|
|
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>;
|