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