vlite3 1.1.2 → 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 +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +137 -118
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- 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/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 +3 -0
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- 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.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- 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.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- 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 +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- 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.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- 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.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/core/config.d.ts +36 -0
- package/index.d.ts +2 -0
- package/index.js +130 -124
- package/package.json +1 -1
- package/style.css +616 -1
- package/types/button.d.ts +1 -1
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
|
@@ -1,8 +1,8 @@
|
|
|
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
7
|
import E from "../Button.vue.js";
|
|
8
8
|
import "../../core/config.js";
|
|
@@ -17,24 +17,24 @@ 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: () => [] },
|
|
@@ -47,43 +47,43 @@ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
47
47
|
},
|
|
48
48
|
emits: ["update:modelValue", "onAdd", "onEdit", "onDelete", "onReorder"],
|
|
49
49
|
setup(b, { emit: j }) {
|
|
50
|
-
const w = b,
|
|
51
|
-
t.forEach((
|
|
52
|
-
|
|
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);
|
|
53
53
|
});
|
|
54
54
|
}, q = (t) => {
|
|
55
|
-
const e = /* @__PURE__ */ new Map(),
|
|
56
|
-
t.forEach((
|
|
57
|
-
e.set(
|
|
58
|
-
...
|
|
59
|
-
id:
|
|
60
|
-
title:
|
|
61
|
-
icon:
|
|
62
|
-
parentId:
|
|
63
|
-
position:
|
|
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
64
|
children: []
|
|
65
65
|
});
|
|
66
|
-
}), t.forEach((
|
|
67
|
-
const r = e.get(
|
|
68
|
-
r && (
|
|
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
69
|
});
|
|
70
|
-
const l = (
|
|
71
|
-
|
|
70
|
+
const l = (o) => {
|
|
71
|
+
o.sort((r, a) => (r.position ?? 0) - (a.position ?? 0)), o.forEach((r) => {
|
|
72
72
|
r.children && l(r.children);
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
|
-
return l(
|
|
75
|
+
return l(n), n;
|
|
76
76
|
};
|
|
77
77
|
R(
|
|
78
78
|
() => w.rawData,
|
|
79
79
|
(t) => {
|
|
80
80
|
if (t && t.length > 0) {
|
|
81
81
|
const e = q(t);
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
d.value =
|
|
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
87
|
}
|
|
88
88
|
}
|
|
89
89
|
},
|
|
@@ -91,137 +91,155 @@ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
91
91
|
), R(
|
|
92
92
|
() => w.modelValue,
|
|
93
93
|
(t) => {
|
|
94
|
-
const e = JSON.stringify(t),
|
|
95
|
-
if (e !==
|
|
96
|
-
const l =
|
|
97
|
-
|
|
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;
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
{ immediate: !0, deep: !0 }
|
|
101
101
|
);
|
|
102
|
-
const y = (
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
102
|
+
const y = () => {
|
|
103
|
+
p(d.value);
|
|
104
|
+
const t = s(d.value);
|
|
105
|
+
c("update:modelValue", t);
|
|
106
106
|
}, K = (t) => {
|
|
107
|
-
const e = new Set(
|
|
108
|
-
e.has(t) ? e.delete(t) : e.add(t),
|
|
109
|
-
},
|
|
107
|
+
const e = new Set(I.value);
|
|
108
|
+
e.has(t) ? e.delete(t) : e.add(t), I.value = e;
|
|
109
|
+
}, u = v({
|
|
110
110
|
mode: null,
|
|
111
111
|
targetId: null,
|
|
112
112
|
title: "",
|
|
113
113
|
icon: "lucide:folder"
|
|
114
114
|
}), M = (t, e) => {
|
|
115
|
-
|
|
115
|
+
u.value = {
|
|
116
116
|
mode: t,
|
|
117
117
|
targetId: t === "add-child" && e || null,
|
|
118
118
|
title: "",
|
|
119
119
|
icon: "lucide:folder"
|
|
120
|
-
}, t === "add-child" && e &&
|
|
121
|
-
},
|
|
122
|
-
|
|
120
|
+
}, t === "add-child" && e && I.value.add(e);
|
|
121
|
+
}, S = () => {
|
|
122
|
+
u.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
|
|
123
123
|
}, T = () => {
|
|
124
|
-
const { mode: t, targetId: e, title:
|
|
125
|
-
if (!
|
|
126
|
-
const
|
|
124
|
+
const { mode: t, targetId: e, title: n, icon: l } = u.value;
|
|
125
|
+
if (!n.trim()) return;
|
|
126
|
+
const o = [...d.value];
|
|
127
127
|
let r = null;
|
|
128
128
|
if (t === "add-root")
|
|
129
|
-
r = { id: N(), title:
|
|
129
|
+
r = { id: N(), title: n, icon: l, children: [] }, o.push(r);
|
|
130
130
|
else if (t === "add-child") {
|
|
131
|
-
r = { id: N(), title:
|
|
132
|
-
const a = (
|
|
133
|
-
for (const i of
|
|
131
|
+
r = { id: N(), title: n, icon: l, children: [] };
|
|
132
|
+
const a = (m) => {
|
|
133
|
+
for (const i of m) {
|
|
134
134
|
if (i.id === e)
|
|
135
135
|
return i.children || (i.children = []), i.children.push(r), !0;
|
|
136
136
|
if (i.children && a(i.children)) return !0;
|
|
137
137
|
}
|
|
138
138
|
return !1;
|
|
139
139
|
};
|
|
140
|
-
a(
|
|
140
|
+
a(o);
|
|
141
141
|
}
|
|
142
|
-
r && (
|
|
143
|
-
}, k =
|
|
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 = [
|
|
144
144
|
{ name: "icon", label: "Category Icon", type: "iconPicker" },
|
|
145
145
|
{ name: "title", label: "Title", type: "text", required: !0 },
|
|
146
146
|
{ name: "description", label: "Description", type: "textarea", props: { rows: 3 } }
|
|
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,
|
|
148
|
-
h.value = t, U.value = e || null, z.value =
|
|
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
149
|
}, Q = async (t) => {
|
|
150
|
-
const e = t?.values || t,
|
|
151
|
-
let l = null,
|
|
150
|
+
const e = t?.values || t, n = [...d.value];
|
|
151
|
+
let l = null, o = null;
|
|
152
152
|
if (h.value === "add") {
|
|
153
153
|
const r = { id: N(), children: [], ...e };
|
|
154
|
-
|
|
154
|
+
n.push(r), l = r, o = "onAdd";
|
|
155
155
|
} else if (h.value === "add-child") {
|
|
156
|
-
const r = { id: N(), children: [], ...e }, a = (
|
|
157
|
-
for (const i of
|
|
156
|
+
const r = { id: N(), children: [], ...e }, a = (m) => {
|
|
157
|
+
for (const i of m) {
|
|
158
158
|
if (i.id === z.value)
|
|
159
|
-
return i.children || (i.children = []), i.children.push(r),
|
|
159
|
+
return i.children || (i.children = []), i.children.push(r), I.value.add(i.id), !0;
|
|
160
160
|
if (i.children && a(i.children)) return !0;
|
|
161
161
|
}
|
|
162
162
|
return !1;
|
|
163
163
|
};
|
|
164
|
-
a(
|
|
164
|
+
a(n), l = r, o = "onAdd";
|
|
165
165
|
} else if (h.value === "edit" && U.value) {
|
|
166
|
-
const r = U.value.id, a = (
|
|
167
|
-
const i =
|
|
166
|
+
const r = U.value.id, a = (m) => {
|
|
167
|
+
const i = m.findIndex((C) => C.id === r);
|
|
168
168
|
if (i > -1)
|
|
169
|
-
return
|
|
170
|
-
for (const C of
|
|
169
|
+
return m[i] = { ...m[i], ...e }, l = m[i], !0;
|
|
170
|
+
for (const C of m)
|
|
171
171
|
if (C.children && a(C.children)) return !0;
|
|
172
172
|
return !1;
|
|
173
173
|
};
|
|
174
|
-
a(
|
|
174
|
+
a(n), o = "onEdit";
|
|
175
175
|
}
|
|
176
|
-
|
|
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
177
|
}, W = (t) => {
|
|
178
|
-
const e = t.id,
|
|
179
|
-
const r =
|
|
178
|
+
const e = t.id, n = (o) => {
|
|
179
|
+
const r = o.findIndex((a) => a.id === e);
|
|
180
180
|
if (r > -1)
|
|
181
|
-
return
|
|
182
|
-
for (const a of
|
|
183
|
-
if (a.children &&
|
|
181
|
+
return o.splice(r, 1), !0;
|
|
182
|
+
for (const a of o)
|
|
183
|
+
if (a.children && n(a.children)) return !0;
|
|
184
184
|
return !1;
|
|
185
185
|
}, l = [...d.value];
|
|
186
|
-
|
|
186
|
+
n(l), p(l), d.value = l, c("onDelete", s(t)), y();
|
|
187
187
|
}, X = (t) => {
|
|
188
|
-
|
|
188
|
+
c("onEdit", s(t)), y();
|
|
189
189
|
}, Y = (t) => {
|
|
190
|
-
d.value = [...t], y(
|
|
190
|
+
d.value = [...t], y();
|
|
191
191
|
}, Z = () => {
|
|
192
|
-
y(
|
|
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
|
+
}
|
|
204
|
+
return !1;
|
|
205
|
+
};
|
|
206
|
+
l(e), n && c("onReorder", {
|
|
207
|
+
id: n.id,
|
|
208
|
+
parentId: n.parentId ?? null,
|
|
209
|
+
position: n.position ?? 0
|
|
210
|
+
});
|
|
193
211
|
};
|
|
194
212
|
oe("categoryManager", {
|
|
195
|
-
expandedIds:
|
|
196
|
-
inlineState:
|
|
213
|
+
expandedIds: I,
|
|
214
|
+
inlineState: u,
|
|
197
215
|
toggleExpand: K,
|
|
198
216
|
startInline: M,
|
|
199
217
|
saveInline: T,
|
|
200
|
-
cancelInline:
|
|
218
|
+
cancelInline: S,
|
|
201
219
|
saveItem: X,
|
|
202
220
|
openModalForm: L,
|
|
203
221
|
deleteItem: W,
|
|
204
222
|
readonly: D(() => w.readonly),
|
|
205
223
|
size: D(() => w.size)
|
|
206
224
|
});
|
|
207
|
-
const
|
|
225
|
+
const te = {
|
|
208
226
|
mounted: (t) => {
|
|
209
227
|
setTimeout(() => t.focus(), 10);
|
|
210
228
|
}
|
|
211
229
|
};
|
|
212
|
-
return (t, e) => (x(), V("div",
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
e[6] || (e[6] =
|
|
216
|
-
|
|
217
|
-
|
|
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.")
|
|
218
236
|
], -1)),
|
|
219
237
|
b.readonly ? A("", !0) : (x(), $(E, {
|
|
220
238
|
key: 0,
|
|
221
239
|
variant: "primary",
|
|
222
240
|
icon: "lucide:plus",
|
|
223
241
|
size: "sm",
|
|
224
|
-
onClick: e[0] || (e[0] = (
|
|
242
|
+
onClick: e[0] || (e[0] = (n) => M("add-root"))
|
|
225
243
|
}, {
|
|
226
244
|
default: _(() => [...e[5] || (e[5] = [
|
|
227
245
|
F(" Add Category ", -1)
|
|
@@ -230,52 +248,53 @@ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
230
248
|
}))
|
|
231
249
|
])
|
|
232
250
|
]),
|
|
233
|
-
d.value.length === 0 &&
|
|
234
|
-
|
|
235
|
-
g(
|
|
251
|
+
d.value.length === 0 && u.value.mode !== "add-root" ? (x(), V("div", ve, [
|
|
252
|
+
f("div", he, [
|
|
253
|
+
g(ce, {
|
|
236
254
|
icon: "lucide:folder-tree",
|
|
237
255
|
class: "w-6 h-6 text-muted-foreground"
|
|
238
256
|
})
|
|
239
257
|
]),
|
|
240
|
-
|
|
241
|
-
|
|
258
|
+
f("h4", ge, J(b.emptyTitle), 1),
|
|
259
|
+
f("p", ye, J(b.emptyDescription), 1),
|
|
242
260
|
b.readonly ? A("", !0) : (x(), $(E, {
|
|
243
261
|
key: 0,
|
|
244
262
|
variant: "outline",
|
|
245
263
|
size: "sm",
|
|
246
264
|
class: "mt-5",
|
|
247
265
|
icon: "lucide:plus",
|
|
248
|
-
onClick: e[1] || (e[1] = (
|
|
266
|
+
onClick: e[1] || (e[1] = (n) => M("add-root"))
|
|
249
267
|
}, {
|
|
250
268
|
default: _(() => [...e[7] || (e[7] = [
|
|
251
269
|
F(" Create Category ", -1)
|
|
252
270
|
])]),
|
|
253
271
|
_: 1
|
|
254
272
|
}))
|
|
255
|
-
])) : (x(), V("div",
|
|
256
|
-
g(
|
|
273
|
+
])) : (x(), V("div", xe, [
|
|
274
|
+
g(ae, {
|
|
257
275
|
modelValue: d.value,
|
|
258
276
|
"onUpdate:modelValue": Y,
|
|
259
|
-
onChange: Z
|
|
277
|
+
onChange: Z,
|
|
278
|
+
onDragEnd: ee
|
|
260
279
|
}, null, 8, ["modelValue"]),
|
|
261
|
-
|
|
262
|
-
g(
|
|
263
|
-
modelValue:
|
|
264
|
-
"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),
|
|
265
284
|
"btn-props": { variant: "ghost", size: "xs", class: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md" },
|
|
266
285
|
position: "bottom-start"
|
|
267
286
|
}, null, 8, ["modelValue"]),
|
|
268
|
-
|
|
269
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
287
|
+
le(f("input", {
|
|
288
|
+
"onUpdate:modelValue": e[3] || (e[3] = (n) => u.value.title = n),
|
|
270
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",
|
|
271
290
|
placeholder: "New root category...",
|
|
272
291
|
onKeyup: [
|
|
273
292
|
B(T, ["enter"]),
|
|
274
|
-
B(
|
|
293
|
+
B(S, ["esc"])
|
|
275
294
|
]
|
|
276
295
|
}, null, 544), [
|
|
277
|
-
[
|
|
278
|
-
[
|
|
296
|
+
[te],
|
|
297
|
+
[ie, u.value.title]
|
|
279
298
|
]),
|
|
280
299
|
g(E, {
|
|
281
300
|
variant: "primary",
|
|
@@ -291,19 +310,19 @@ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
291
310
|
icon: "lucide:x",
|
|
292
311
|
class: "shrink-0 h-7 w-7 px-0",
|
|
293
312
|
title: "Cancel",
|
|
294
|
-
onClick:
|
|
313
|
+
onClick: S
|
|
295
314
|
})
|
|
296
315
|
])) : A("", !0)
|
|
297
316
|
])),
|
|
298
|
-
g(
|
|
317
|
+
g(se, {
|
|
299
318
|
show: k.value,
|
|
300
|
-
"onUpdate:show": e[4] || (e[4] = (
|
|
319
|
+
"onUpdate:show": e[4] || (e[4] = (n) => k.value = n),
|
|
301
320
|
title: H.value,
|
|
302
321
|
"max-width": "max-w-md"
|
|
303
322
|
}, {
|
|
304
323
|
default: _(() => [
|
|
305
|
-
|
|
306
|
-
g(
|
|
324
|
+
f("div", we, [
|
|
325
|
+
g(de(ue), {
|
|
307
326
|
schema: G.value,
|
|
308
327
|
values: O.value,
|
|
309
328
|
isUpdate: h.value === "edit",
|
|
@@ -318,5 +337,5 @@ const me = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
318
337
|
}
|
|
319
338
|
});
|
|
320
339
|
export {
|
|
321
|
-
|
|
340
|
+
Pe as default
|
|
322
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>;
|