vlite3 1.1.1 → 1.1.2
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 -16
- package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/Button.vue.d.ts +1 -1
- 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 +2 -1
- package/components/CategoryManager/CategoryManager.vue.js +187 -147
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +220 -232
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Input.vue.d.ts +3 -3
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +20 -13
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -0
- package/components/Invoice/InvoiceVariant1.vue.js +302 -256
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -0
- package/components/Invoice/InvoiceVariant2.vue.js +164 -168
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -0
- package/components/Invoice/InvoiceVariant3.vue.js +213 -170
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -0
- package/components/Invoice/InvoiceVariant4.vue.js +280 -227
- package/components/Invoice/types.d.ts +4 -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/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/StatusChip/status-map.js +27 -7
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +76 -0
- package/core/index.js +17 -5
- package/index.js +264 -262
- package/package.json +1 -1
- package/style.css +2 -2
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- 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 te, ref as p, watch as R, computed as D, provide as oe, openBlock as x, createElementBlock as V, createElementVNode as m, renderSlot as ne, createBlock as $, withCtx as _, createTextVNode as F, createCommentVNode as A, createVNode as g, toDisplayString as J, withDirectives as re, withKeys as B, vModelText as le, unref as ie } from "vue";
|
|
2
|
+
import de from "./CategoryNode.vue.js";
|
|
3
|
+
import ae from "../Modal.vue.js";
|
|
4
|
+
import se from "../Form/Form.vue.js";
|
|
5
|
+
import ue 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 ce 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 me = { class: "category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6" }, fe = { class: "flex items-center justify-between mb-6" }, pe = {
|
|
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
|
+
}, ve = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, he = { class: "text-base font-medium text-foreground" }, ge = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, ye = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "w-full tree-wrapper scrollable-container",
|
|
30
30
|
style: { "will-change": "transform", contain: "layout style" }
|
|
31
|
-
},
|
|
31
|
+
}, xe = {
|
|
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
|
+
}, be = {
|
|
35
35
|
class: "modal-body",
|
|
36
36
|
style: { "will-change": "transform", contain: "layout style" }
|
|
37
|
-
},
|
|
37
|
+
}, Ke = /* @__PURE__ */ te({
|
|
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,238 @@ 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, f = j, d = p([]), S = p(/* @__PURE__ */ new Set()), u = (t) => JSON.parse(JSON.stringify(t)), v = (t, e = null) => {
|
|
51
|
+
t.forEach((o, l) => {
|
|
52
|
+
o.parentId = e, o.position = l, o.children || (o.children = []), v(o.children, o.id);
|
|
52
53
|
});
|
|
54
|
+
}, q = (t) => {
|
|
55
|
+
const e = /* @__PURE__ */ new Map(), o = [];
|
|
56
|
+
t.forEach((n) => {
|
|
57
|
+
e.set(n.id, {
|
|
58
|
+
...n,
|
|
59
|
+
id: n.id,
|
|
60
|
+
title: n.name || n.title || "Untitled",
|
|
61
|
+
icon: n.icon,
|
|
62
|
+
parentId: n.parentId || null,
|
|
63
|
+
position: n.position ?? 0,
|
|
64
|
+
children: []
|
|
65
|
+
});
|
|
66
|
+
}), t.forEach((n) => {
|
|
67
|
+
const r = e.get(n.id);
|
|
68
|
+
r && (n.parentId && e.has(n.parentId) ? e.get(n.parentId).children.push(r) : o.push(r));
|
|
69
|
+
});
|
|
70
|
+
const l = (n) => {
|
|
71
|
+
n.sort((r, a) => (r.position ?? 0) - (a.position ?? 0)), n.forEach((r) => {
|
|
72
|
+
r.children && l(r.children);
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return l(o), o;
|
|
53
76
|
};
|
|
54
|
-
|
|
55
|
-
() =>
|
|
77
|
+
R(
|
|
78
|
+
() => w.rawData,
|
|
79
|
+
(t) => {
|
|
80
|
+
if (t && t.length > 0) {
|
|
81
|
+
const e = q(t);
|
|
82
|
+
v(e);
|
|
83
|
+
const o = JSON.stringify(e), l = JSON.stringify(d.value);
|
|
84
|
+
if (o !== l) {
|
|
85
|
+
const n = u(e);
|
|
86
|
+
d.value = n, f("update:modelValue", n);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{ immediate: !0, deep: !0 }
|
|
91
|
+
), R(
|
|
92
|
+
() => w.modelValue,
|
|
56
93
|
(t) => {
|
|
57
|
-
const e = JSON.stringify(t), o = JSON.stringify(
|
|
58
|
-
if (e !== o) {
|
|
59
|
-
const
|
|
60
|
-
|
|
94
|
+
const e = JSON.stringify(t), o = JSON.stringify(d.value);
|
|
95
|
+
if (e !== o && t.length > 0) {
|
|
96
|
+
const l = u(t);
|
|
97
|
+
v(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 = (t = !1) => {
|
|
103
|
+
v(d.value);
|
|
104
|
+
const e = u(d.value);
|
|
105
|
+
f("update:modelValue", e), t && f("onReorder", e);
|
|
106
|
+
}, K = (t) => {
|
|
107
|
+
const e = new Set(S.value);
|
|
108
|
+
e.has(t) ? e.delete(t) : e.add(t), S.value = e;
|
|
109
|
+
}, s = p({
|
|
72
110
|
mode: null,
|
|
73
111
|
targetId: null,
|
|
74
112
|
title: "",
|
|
75
113
|
icon: "lucide:folder"
|
|
76
|
-
}),
|
|
77
|
-
|
|
114
|
+
}), M = (t, e) => {
|
|
115
|
+
s.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 &&
|
|
83
|
-
},
|
|
84
|
-
|
|
120
|
+
}, t === "add-child" && e && S.value.add(e);
|
|
121
|
+
}, I = () => {
|
|
122
|
+
s.value = { mode: null, targetId: null, title: "", icon: "lucide:folder" };
|
|
85
123
|
}, T = () => {
|
|
86
|
-
const { mode: t, targetId: e, title: o, icon:
|
|
124
|
+
const { mode: t, targetId: e, title: o, icon: l } = s.value;
|
|
87
125
|
if (!o.trim()) return;
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
126
|
+
const n = [...d.value];
|
|
127
|
+
let r = null;
|
|
128
|
+
if (t === "add-root")
|
|
129
|
+
r = { id: N(), title: o, icon: l, children: [] }, n.push(r);
|
|
130
|
+
else if (t === "add-child") {
|
|
131
|
+
r = { id: N(), title: o, icon: l, children: [] };
|
|
132
|
+
const a = (c) => {
|
|
133
|
+
for (const i of c) {
|
|
134
|
+
if (i.id === e)
|
|
135
|
+
return i.children || (i.children = []), i.children.push(r), !0;
|
|
136
|
+
if (i.children && a(i.children)) return !0;
|
|
98
137
|
}
|
|
99
138
|
return !1;
|
|
100
139
|
};
|
|
101
|
-
n
|
|
140
|
+
a(n);
|
|
102
141
|
}
|
|
103
|
-
|
|
104
|
-
},
|
|
142
|
+
r && (v(n), f("onAdd", u(r))), d.value = n, y(), I();
|
|
143
|
+
}, k = p(!1), h = p("add"), U = p(null), z = p(null), O = p({}), 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, o = [...
|
|
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, o) => {
|
|
148
|
+
h.value = t, U.value = e || null, z.value = o || null, O.value = e ? u(e) : {}, k.value = !0;
|
|
149
|
+
}, Q = async (t) => {
|
|
150
|
+
const e = t?.values || t, o = [...d.value];
|
|
151
|
+
let l = null, n = null;
|
|
152
|
+
if (h.value === "add") {
|
|
113
153
|
const r = { id: N(), children: [], ...e };
|
|
114
|
-
o.push(r),
|
|
115
|
-
} else if (
|
|
116
|
-
const r = { id: N(), children: [], ...e },
|
|
117
|
-
for (const
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
120
|
-
if (
|
|
154
|
+
o.push(r), l = r, n = "onAdd";
|
|
155
|
+
} else if (h.value === "add-child") {
|
|
156
|
+
const r = { id: N(), children: [], ...e }, a = (c) => {
|
|
157
|
+
for (const i of c) {
|
|
158
|
+
if (i.id === z.value)
|
|
159
|
+
return i.children || (i.children = []), i.children.push(r), S.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(o), l = r, n = "onAdd";
|
|
165
|
+
} else if (h.value === "edit" && U.value) {
|
|
166
|
+
const r = U.value.id, a = (c) => {
|
|
167
|
+
const i = c.findIndex((C) => C.id === r);
|
|
168
|
+
if (i > -1)
|
|
169
|
+
return c[i] = { ...c[i], ...e }, l = c[i], !0;
|
|
170
|
+
for (const C of c)
|
|
171
|
+
if (C.children && a(C.children)) return !0;
|
|
132
172
|
return !1;
|
|
133
173
|
};
|
|
134
|
-
|
|
174
|
+
a(o), n = "onEdit";
|
|
135
175
|
}
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
const e = t.id, o = (
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
142
|
-
for (const
|
|
143
|
-
if (
|
|
176
|
+
v(o), l && (n === "onAdd" ? f("onAdd", u(l)) : n === "onEdit" && f("onEdit", u(l))), d.value = o, y(), t && typeof t.setSubmitting == "function" && t.setSubmitting(!1), k.value = !1;
|
|
177
|
+
}, W = (t) => {
|
|
178
|
+
const e = t.id, o = (n) => {
|
|
179
|
+
const r = n.findIndex((a) => a.id === e);
|
|
180
|
+
if (r > -1)
|
|
181
|
+
return n.splice(r, 1), !0;
|
|
182
|
+
for (const a of n)
|
|
183
|
+
if (a.children && o(a.children)) return !0;
|
|
144
184
|
return !1;
|
|
145
|
-
},
|
|
146
|
-
o(
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
185
|
+
}, l = [...d.value];
|
|
186
|
+
o(l), v(l), d.value = l, f("onDelete", u(t)), y();
|
|
187
|
+
}, X = (t) => {
|
|
188
|
+
f("onEdit", u(t)), y();
|
|
189
|
+
}, Y = (t) => {
|
|
190
|
+
d.value = [...t], y(!0);
|
|
191
|
+
}, Z = () => {
|
|
192
|
+
y(!0);
|
|
153
193
|
};
|
|
154
|
-
|
|
155
|
-
expandedIds:
|
|
156
|
-
inlineState:
|
|
157
|
-
toggleExpand:
|
|
158
|
-
startInline:
|
|
194
|
+
oe("categoryManager", {
|
|
195
|
+
expandedIds: S,
|
|
196
|
+
inlineState: s,
|
|
197
|
+
toggleExpand: K,
|
|
198
|
+
startInline: M,
|
|
159
199
|
saveInline: T,
|
|
160
|
-
cancelInline:
|
|
161
|
-
saveItem:
|
|
162
|
-
openModalForm:
|
|
163
|
-
deleteItem:
|
|
164
|
-
readonly:
|
|
165
|
-
size:
|
|
200
|
+
cancelInline: I,
|
|
201
|
+
saveItem: X,
|
|
202
|
+
openModalForm: L,
|
|
203
|
+
deleteItem: W,
|
|
204
|
+
readonly: D(() => w.readonly),
|
|
205
|
+
size: D(() => w.size)
|
|
166
206
|
});
|
|
167
|
-
const
|
|
207
|
+
const ee = {
|
|
168
208
|
mounted: (t) => {
|
|
169
209
|
setTimeout(() => t.focus(), 10);
|
|
170
210
|
}
|
|
171
211
|
};
|
|
172
|
-
return (t, e) => (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
e[6] || (e[6] =
|
|
176
|
-
|
|
177
|
-
|
|
212
|
+
return (t, e) => (x(), V("div", me, [
|
|
213
|
+
m("div", fe, [
|
|
214
|
+
ne(t.$slots, "header", {}, () => [
|
|
215
|
+
e[6] || (e[6] = m("div", null, [
|
|
216
|
+
m("h3", { class: "text-lg font-bold text-foreground" }, "Categories"),
|
|
217
|
+
m("p", { class: "text-sm text-muted-foreground mt-0.5" }, "Manage your hierarchical structure.")
|
|
178
218
|
], -1)),
|
|
179
|
-
|
|
219
|
+
b.readonly ? A("", !0) : (x(), $(E, {
|
|
180
220
|
key: 0,
|
|
181
221
|
variant: "primary",
|
|
182
222
|
icon: "lucide:plus",
|
|
183
223
|
size: "sm",
|
|
184
|
-
onClick: e[0] || (e[0] = (o) =>
|
|
224
|
+
onClick: e[0] || (e[0] = (o) => M("add-root"))
|
|
185
225
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
|
|
226
|
+
default: _(() => [...e[5] || (e[5] = [
|
|
227
|
+
F(" Add Category ", -1)
|
|
188
228
|
])]),
|
|
189
229
|
_: 1
|
|
190
230
|
}))
|
|
191
231
|
])
|
|
192
232
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
233
|
+
d.value.length === 0 && s.value.mode !== "add-root" ? (x(), V("div", pe, [
|
|
234
|
+
m("div", ve, [
|
|
235
|
+
g(ue, {
|
|
196
236
|
icon: "lucide:folder-tree",
|
|
197
237
|
class: "w-6 h-6 text-muted-foreground"
|
|
198
238
|
})
|
|
199
239
|
]),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
240
|
+
m("h4", he, J(b.emptyTitle), 1),
|
|
241
|
+
m("p", ge, J(b.emptyDescription), 1),
|
|
242
|
+
b.readonly ? A("", !0) : (x(), $(E, {
|
|
203
243
|
key: 0,
|
|
204
244
|
variant: "outline",
|
|
205
245
|
size: "sm",
|
|
206
246
|
class: "mt-5",
|
|
207
247
|
icon: "lucide:plus",
|
|
208
|
-
onClick: e[1] || (e[1] = (o) =>
|
|
248
|
+
onClick: e[1] || (e[1] = (o) => M("add-root"))
|
|
209
249
|
}, {
|
|
210
|
-
default:
|
|
211
|
-
|
|
250
|
+
default: _(() => [...e[7] || (e[7] = [
|
|
251
|
+
F(" Create Category ", -1)
|
|
212
252
|
])]),
|
|
213
253
|
_: 1
|
|
214
254
|
}))
|
|
215
|
-
])) : (
|
|
216
|
-
|
|
217
|
-
modelValue:
|
|
218
|
-
"onUpdate:modelValue":
|
|
219
|
-
onChange:
|
|
255
|
+
])) : (x(), V("div", ye, [
|
|
256
|
+
g(de, {
|
|
257
|
+
modelValue: d.value,
|
|
258
|
+
"onUpdate:modelValue": Y,
|
|
259
|
+
onChange: Z
|
|
220
260
|
}, null, 8, ["modelValue"]),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
modelValue:
|
|
224
|
-
"onUpdate:modelValue": e[2] || (e[2] = (o) =>
|
|
261
|
+
s.value.mode === "add-root" ? (x(), V("div", xe, [
|
|
262
|
+
g(ce, {
|
|
263
|
+
modelValue: s.value.icon,
|
|
264
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => s.value.icon = o),
|
|
225
265
|
"btn-props": { variant: "ghost", size: "xs", class: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md" },
|
|
226
266
|
position: "bottom-start"
|
|
227
267
|
}, null, 8, ["modelValue"]),
|
|
228
|
-
|
|
229
|
-
"onUpdate:modelValue": e[3] || (e[3] = (o) =>
|
|
268
|
+
re(m("input", {
|
|
269
|
+
"onUpdate:modelValue": e[3] || (e[3] = (o) => s.value.title = o),
|
|
230
270
|
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
271
|
placeholder: "New root category...",
|
|
232
272
|
onKeyup: [
|
|
233
|
-
|
|
234
|
-
|
|
273
|
+
B(T, ["enter"]),
|
|
274
|
+
B(I, ["esc"])
|
|
235
275
|
]
|
|
236
276
|
}, null, 544), [
|
|
237
|
-
[
|
|
238
|
-
[
|
|
277
|
+
[ee],
|
|
278
|
+
[le, s.value.title]
|
|
239
279
|
]),
|
|
240
|
-
|
|
280
|
+
g(E, {
|
|
241
281
|
variant: "primary",
|
|
242
282
|
size: "xs",
|
|
243
283
|
icon: "lucide:check",
|
|
@@ -245,30 +285,30 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
245
285
|
title: "Save",
|
|
246
286
|
onClick: T
|
|
247
287
|
}),
|
|
248
|
-
|
|
288
|
+
g(E, {
|
|
249
289
|
variant: "ghost",
|
|
250
290
|
size: "xs",
|
|
251
291
|
icon: "lucide:x",
|
|
252
292
|
class: "shrink-0 h-7 w-7 px-0",
|
|
253
293
|
title: "Cancel",
|
|
254
|
-
onClick:
|
|
294
|
+
onClick: I
|
|
255
295
|
})
|
|
256
|
-
])) :
|
|
296
|
+
])) : A("", !0)
|
|
257
297
|
])),
|
|
258
|
-
|
|
259
|
-
show:
|
|
260
|
-
"onUpdate:show": e[4] || (e[4] = (o) =>
|
|
261
|
-
title:
|
|
298
|
+
g(ae, {
|
|
299
|
+
show: k.value,
|
|
300
|
+
"onUpdate:show": e[4] || (e[4] = (o) => k.value = o),
|
|
301
|
+
title: H.value,
|
|
262
302
|
"max-width": "max-w-md"
|
|
263
303
|
}, {
|
|
264
|
-
default:
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
schema:
|
|
268
|
-
values:
|
|
269
|
-
isUpdate:
|
|
304
|
+
default: _(() => [
|
|
305
|
+
m("div", be, [
|
|
306
|
+
g(ie(se), {
|
|
307
|
+
schema: G.value,
|
|
308
|
+
values: O.value,
|
|
309
|
+
isUpdate: h.value === "edit",
|
|
270
310
|
submitText: "Save Details",
|
|
271
|
-
onOnSubmit:
|
|
311
|
+
onOnSubmit: Q
|
|
272
312
|
}, null, 8, ["schema", "values", "isUpdate"])
|
|
273
313
|
])
|
|
274
314
|
]),
|
|
@@ -278,5 +318,5 @@ const ue = { class: "category-manager-container w-full bg-muted/10 rounded-xl bo
|
|
|
278
318
|
}
|
|
279
319
|
});
|
|
280
320
|
export {
|
|
281
|
-
|
|
321
|
+
Ke as default
|
|
282
322
|
};
|
|
@@ -6,11 +6,25 @@ export interface CategoryItem {
|
|
|
6
6
|
icon?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
children?: CategoryItem[];
|
|
9
|
+
parentId?: string | number | null;
|
|
10
|
+
position?: number;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface RawCategoryItem {
|
|
14
|
+
id: string | number;
|
|
15
|
+
name?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
position?: number;
|
|
19
|
+
parentId?: string | number | null;
|
|
20
|
+
fullPath?: string;
|
|
9
21
|
[key: string]: any;
|
|
10
22
|
}
|
|
11
23
|
export interface CategoryManagerProps {
|
|
12
24
|
/** The nested array of category items */
|
|
13
25
|
modelValue?: CategoryItem[];
|
|
26
|
+
/** Optional flat list of items to be auto-converted to a nested tree */
|
|
27
|
+
rawData?: RawCategoryItem[];
|
|
14
28
|
/** Optional custom form schema for add/edit operations */
|
|
15
29
|
formSchema?: IForm[];
|
|
16
30
|
/** Disable drag-and-drop and mutation actions */
|
|
@@ -13,11 +13,11 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<ExtendedProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
|
-
click: (event: MouseEvent) => any;
|
|
17
16
|
delete: (event: MouseEvent) => any;
|
|
17
|
+
click: (event: MouseEvent) => any;
|
|
18
18
|
}, string, import('vue').PublicProps, Readonly<ExtendedProps> & Readonly<{
|
|
19
|
-
onClick?: (event: MouseEvent) => any;
|
|
20
19
|
onDelete?: (event: MouseEvent) => any;
|
|
20
|
+
onClick?: (event: MouseEvent) => any;
|
|
21
21
|
}>, {
|
|
22
22
|
text: string;
|
|
23
23
|
class: string;
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -22,11 +22,11 @@ declare function __VLS_template(): {
|
|
|
22
22
|
};
|
|
23
23
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
24
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
25
|
-
cancel: () => any;
|
|
26
25
|
confirm: () => any;
|
|
26
|
+
cancel: () => any;
|
|
27
27
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
28
|
-
onCancel?: () => any;
|
|
29
28
|
onConfirm?: () => any;
|
|
29
|
+
onCancel?: () => any;
|
|
30
30
|
}>, {
|
|
31
31
|
variant: "danger" | "primary" | "warning" | "success" | "info";
|
|
32
32
|
loading: boolean;
|
|
@@ -32,8 +32,8 @@ declare function __VLS_template(): {
|
|
|
32
32
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
33
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
34
34
|
variant: CustomFieldsDisplayVariant;
|
|
35
|
-
columns: 1 | 2 | 3 | 4;
|
|
36
35
|
fields: CustomFieldItem[];
|
|
36
|
+
columns: 1 | 2 | 3 | 4;
|
|
37
37
|
emptyText: string;
|
|
38
38
|
keyProp: string;
|
|
39
39
|
valueProp: string;
|
|
@@ -18,24 +18,24 @@ declare function __VLS_template(): {
|
|
|
18
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
19
|
declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
20
|
select: (state: SelectionState) => any;
|
|
21
|
-
change: (state: TableState) => any;
|
|
22
21
|
delete: (rows: any[]) => any;
|
|
22
|
+
change: (state: TableState) => any;
|
|
23
23
|
"update:itemsPerPage": (value: number) => any;
|
|
24
24
|
rowClick: (payload: RowClickPayload) => any;
|
|
25
25
|
"update:selectedRows": (value: any[]) => any;
|
|
26
26
|
}, string, import('vue').PublicProps, Readonly<DataTableProps> & Readonly<{
|
|
27
27
|
onSelect?: (state: SelectionState) => any;
|
|
28
|
-
onChange?: (state: TableState) => any;
|
|
29
28
|
onDelete?: (rows: any[]) => any;
|
|
29
|
+
onChange?: (state: TableState) => any;
|
|
30
30
|
"onUpdate:itemsPerPage"?: (value: number) => any;
|
|
31
31
|
onRowClick?: (payload: RowClickPayload) => any;
|
|
32
32
|
"onUpdate:selectedRows"?: (value: any[]) => any;
|
|
33
33
|
}>, {
|
|
34
34
|
search: string;
|
|
35
35
|
variant: "default" | "raised";
|
|
36
|
+
loading: boolean;
|
|
36
37
|
striped: boolean;
|
|
37
38
|
compact: boolean;
|
|
38
|
-
loading: boolean;
|
|
39
39
|
rows: any[];
|
|
40
40
|
showSearch: boolean;
|
|
41
41
|
headers: TableHeader[];
|
|
@@ -83,12 +83,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
83
83
|
onOnOpen?: () => any;
|
|
84
84
|
"onUpdate:isOpen"?: (value: boolean) => any;
|
|
85
85
|
}>, {
|
|
86
|
-
|
|
86
|
+
columns: number | string;
|
|
87
87
|
loading: boolean;
|
|
88
|
+
disabled: boolean;
|
|
88
89
|
direction: "ltr" | "rtl";
|
|
89
90
|
selectable: boolean;
|
|
90
91
|
options: (IDropdownOption | string | number)[];
|
|
91
|
-
columns: number | string;
|
|
92
92
|
selectedIndex: number | null;
|
|
93
93
|
maxHeight: string;
|
|
94
94
|
layout: "default" | "grouped";
|
|
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
14
14
|
onSelect?: (option: IDropdownOption) => any;
|
|
15
15
|
onMouseenter?: (payload: any) => any;
|
|
16
16
|
}>, {
|
|
17
|
+
columns: number | string;
|
|
17
18
|
selectable: boolean;
|
|
18
19
|
options: IDropdownOptions;
|
|
19
|
-
columns: number | string;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
21
|
export default _default;
|
|
@@ -48,11 +48,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
48
48
|
"onLoad-more"?: () => any;
|
|
49
49
|
}>, {
|
|
50
50
|
class: string;
|
|
51
|
+
columns: number | string;
|
|
51
52
|
loading: boolean;
|
|
52
53
|
direction: "ltr" | "rtl";
|
|
53
54
|
selectable: boolean;
|
|
54
55
|
options: (IDropdownOption | string | number)[];
|
|
55
|
-
columns: number | string;
|
|
56
56
|
cachedOptions: IDropdownOptions;
|
|
57
57
|
selectedIndex: number | null;
|
|
58
58
|
maxHeight: string;
|
|
@@ -9,8 +9,8 @@ interface Props {
|
|
|
9
9
|
triggerProps?: ButtonProps;
|
|
10
10
|
}
|
|
11
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
-
disabled: boolean;
|
|
13
12
|
placeholder: string;
|
|
13
|
+
disabled: boolean;
|
|
14
14
|
direction: "ltr" | "rtl";
|
|
15
15
|
selectedLabel: string;
|
|
16
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
@@ -52,8 +52,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
52
52
|
variant: "dropzone" | "input";
|
|
53
53
|
size: InputSize;
|
|
54
54
|
rounded: InputRounded;
|
|
55
|
-
disabled: boolean;
|
|
56
55
|
loading: boolean;
|
|
56
|
+
disabled: boolean;
|
|
57
57
|
multiSelect: boolean;
|
|
58
58
|
modelValue: FilePickerValue | FilePickerValue[] | null;
|
|
59
59
|
fileTypes: string[];
|