vlite3 1.2.1 → 1.2.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/README.md +1 -0
- package/components/AppShell/AppShellLayoutClassic.vue.js +67 -64
- package/components/AppShell/AppShellLayoutDashboard.vue.js +76 -71
- package/components/AppShell/AppShellLayoutDock.vue.js +27 -27
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +81 -76
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +56 -56
- package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
- package/components/AsyncSelect/createAsyncSelect.js +156 -0
- package/components/AsyncSelect/index.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTableRow.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +15 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +1 -1
- package/components/Invoice/InvoiceVariant1.vue.js +225 -176
- package/components/Invoice/InvoiceVariant2.vue.js +174 -125
- package/components/Invoice/InvoiceVariant3.vue.js +186 -157
- package/components/Invoice/InvoiceVariant4.vue.js +200 -156
- package/components/Invoice/types.d.ts +10 -1
- package/components/List/ListFieldRow.vue.js +221 -144
- package/components/List/utils.d.ts +2 -2
- package/components/List/utils.js +6 -9
- package/components/NavbarCommandPalette.vue.js +2 -2
- package/components/Price/Price.vue.d.ts +3 -1
- package/components/Price/Price.vue.js +35 -10
- package/components/Rating/Rating.vue.d.ts +43 -0
- package/components/Rating/Rating.vue.js +7 -0
- package/components/Rating/Rating.vue2.js +92 -0
- package/components/Rating/ReviewSummary.vue.d.ts +5 -0
- package/components/Rating/ReviewSummary.vue.js +67 -0
- package/components/Rating/ReviewSummary.vue2.js +4 -0
- package/components/Rating/index.d.ts +3 -0
- package/components/Rating/types.d.ts +28 -0
- package/components/Screen/Screen.vue.d.ts +38 -12
- package/components/Screen/Screen.vue.js +400 -304
- package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
- package/components/Screen/components/ScreenToolbar.vue.js +116 -0
- package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
- package/components/Screen/types.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
- package/components/Stats/StatItem.vue.js +212 -153
- package/components/Stats/Stats.vue.js +20 -20
- package/components/Stats/components/StatIconBox.vue.js +42 -42
- package/components/Stats/components/StatTrend.vue.js +20 -20
- package/components/Stats/types.d.ts +3 -1
- package/components/Timeline/Timeline.vue.js +21 -11
- package/components/Timeline/TimelineItem.vue.js +1 -1
- package/core/config.d.ts +10 -0
- package/core/config.js +11 -9
- package/index.d.ts +2 -0
- package/index.js +220 -214
- package/package.json +2 -1
- package/style.css +23 -17
- package/types/config.type.d.ts +2 -0
- package/types/list.type.d.ts +4 -0
- package/utils/functions.d.ts +9 -10
- package/utils/functions.js +78 -63
- package/utils/status.js +16 -16
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent as q, ref as m, computed as s, watch as _, createVNode as w, mergeProps as I, nextTick as j } from "vue";
|
|
2
|
+
import k from "../Dropdown/Dropdown.vue.js";
|
|
3
|
+
import "@iconify/vue";
|
|
4
|
+
import "../../core/config.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import x from "../MultiSelect/MultiSelect.vue.js";
|
|
8
|
+
const z = (t) => /* @__PURE__ */ q({
|
|
9
|
+
name: t.name,
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
type: [String, Array, Number, Object, Boolean]
|
|
14
|
+
},
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: [String, Array, Number, Object, Boolean]
|
|
17
|
+
},
|
|
18
|
+
multiple: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: t.multiple || !1
|
|
21
|
+
},
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "Select..."
|
|
25
|
+
},
|
|
26
|
+
filter: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({})
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
optionsMapper: {
|
|
35
|
+
type: Function
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["onChange", "update:modelValue", "change"],
|
|
39
|
+
setup(l, {
|
|
40
|
+
attrs: M,
|
|
41
|
+
emit: c
|
|
42
|
+
}) {
|
|
43
|
+
const i = m([]), d = m(1), f = m(""), N = 20, h = s(() => l.value !== void 0 ? l.value : l.modelValue), v = s(() => l.optionsMapper || t.optionsMapper), B = s(() => ({
|
|
44
|
+
pagination: {
|
|
45
|
+
page: d.value,
|
|
46
|
+
limit: N
|
|
47
|
+
},
|
|
48
|
+
search: f.value || void 0,
|
|
49
|
+
filter: {
|
|
50
|
+
...l.filter
|
|
51
|
+
}
|
|
52
|
+
})), {
|
|
53
|
+
result: b,
|
|
54
|
+
loading: K,
|
|
55
|
+
refetch: g
|
|
56
|
+
} = t.useQuery(B, {
|
|
57
|
+
notifyOnNetworkStatusChange: !0,
|
|
58
|
+
fetchPolicy: "cache-and-network"
|
|
59
|
+
}), A = s(() => {
|
|
60
|
+
const e = b.value?.[t.queryName]?.pageInfo;
|
|
61
|
+
return e ? e.currentPage < e.totalPages : !1;
|
|
62
|
+
});
|
|
63
|
+
_(() => b.value?.[t.queryName], (e) => {
|
|
64
|
+
if (!e) return;
|
|
65
|
+
const n = Array.isArray(e) ? e : e.items;
|
|
66
|
+
if (n)
|
|
67
|
+
if (d.value === 1)
|
|
68
|
+
i.value = [...n];
|
|
69
|
+
else {
|
|
70
|
+
const u = new Set(i.value.map((a) => a.id)), r = n.filter((a) => !u.has(a.id));
|
|
71
|
+
i.value.push(...r);
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
immediate: !0
|
|
75
|
+
});
|
|
76
|
+
const S = (e) => {
|
|
77
|
+
if (v.value)
|
|
78
|
+
return v.value(e);
|
|
79
|
+
const n = typeof t.labelKey == "function" ? t.labelKey(e) : e[t.labelKey || "name"], u = typeof t.subtitleKey == "function" ? t.subtitleKey(e) : e[t.subtitleKey || ""], r = typeof t.descriptionKey == "function" ? t.descriptionKey(e) : e[t.descriptionKey || ""], a = t.iconKey ? typeof t.iconKey == "function" ? t.iconKey(e) : e[t.iconKey] : void 0;
|
|
80
|
+
return {
|
|
81
|
+
label: n,
|
|
82
|
+
subtitle: u || void 0,
|
|
83
|
+
description: r || void 0,
|
|
84
|
+
value: e[t.valueKey || "id"],
|
|
85
|
+
icon: a || void 0,
|
|
86
|
+
data: e
|
|
87
|
+
};
|
|
88
|
+
}, p = s(() => i.value.map(S).filter(Boolean)), y = (e, n) => {
|
|
89
|
+
let u = n;
|
|
90
|
+
l.multiple && Array.isArray(e) && (u = e.map((a) => {
|
|
91
|
+
const o = p.value.find((V) => V.value === a);
|
|
92
|
+
return o ? o.data : null;
|
|
93
|
+
}).filter(Boolean));
|
|
94
|
+
const r = {
|
|
95
|
+
value: e,
|
|
96
|
+
data: u
|
|
97
|
+
};
|
|
98
|
+
c("update:modelValue", e), c("change", r), c("onChange", r);
|
|
99
|
+
}, C = (e) => {
|
|
100
|
+
f.value = e, d.value = 1;
|
|
101
|
+
}, O = () => {
|
|
102
|
+
!A.value || K.value || d.value++;
|
|
103
|
+
}, P = async (e) => {
|
|
104
|
+
const n = (Array.isArray(e) ? e : [e]).filter((a) => (typeof a == "string" || typeof a == "number") && a !== "");
|
|
105
|
+
if (n.length === 0) return [];
|
|
106
|
+
await j();
|
|
107
|
+
const u = new Set(p.value.map((a) => a.value)), r = n.filter((a) => !u.has(a));
|
|
108
|
+
if (r.length === 0) return [];
|
|
109
|
+
try {
|
|
110
|
+
const {
|
|
111
|
+
data: a
|
|
112
|
+
} = await g({
|
|
113
|
+
pagination: {
|
|
114
|
+
page: 1,
|
|
115
|
+
limit: r.length
|
|
116
|
+
},
|
|
117
|
+
filter: {
|
|
118
|
+
...l.filter,
|
|
119
|
+
ids: r
|
|
120
|
+
}
|
|
121
|
+
}), o = a?.[t.queryName];
|
|
122
|
+
return (Array.isArray(o) ? o : o?.items || []).map(S).filter(Boolean);
|
|
123
|
+
} catch (a) {
|
|
124
|
+
return console.error(`[${t.name}] Hydration failed`, a), [];
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return () => {
|
|
128
|
+
const e = {
|
|
129
|
+
options: p.value,
|
|
130
|
+
loading: K.value,
|
|
131
|
+
searchable: t.searchable ?? !0,
|
|
132
|
+
remote: t.remote ?? !0,
|
|
133
|
+
hasMore: A.value,
|
|
134
|
+
placeholder: l.placeholder,
|
|
135
|
+
disabled: l.disabled,
|
|
136
|
+
fetchSelected: P,
|
|
137
|
+
onSearch: C,
|
|
138
|
+
onLoadMore: O,
|
|
139
|
+
...M
|
|
140
|
+
};
|
|
141
|
+
return l.multiple ? w(x, I(e, {
|
|
142
|
+
modelValue: h.value,
|
|
143
|
+
"onUpdate:modelValue": (n) => y(n),
|
|
144
|
+
onChange: (n) => y(n)
|
|
145
|
+
}), null) : w(k, I(e, {
|
|
146
|
+
showSelectedIcon: !0,
|
|
147
|
+
emptyMessage: "Data not found",
|
|
148
|
+
modelValue: h.value,
|
|
149
|
+
onOnSelect: (n) => y(n.value, n.data)
|
|
150
|
+
}), null);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
export {
|
|
155
|
+
z as createAsyncSelect
|
|
156
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './createAsyncSelect';
|
|
@@ -15,7 +15,7 @@ const E = { class: "w-full" }, S = {
|
|
|
15
15
|
class: "shrink-0 pt-0.5"
|
|
16
16
|
}, L = { class: "flex flex-col" }, M = { class: "flex items-center gap-2" }, G = {
|
|
17
17
|
key: 0,
|
|
18
|
-
class: "mt-
|
|
18
|
+
class: "mt-0.5 -text-fs-3 text-muted leading-relaxed"
|
|
19
19
|
}, H = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "absolute top-4 right-4 text-primary"
|
|
@@ -35,7 +35,9 @@ const E = { class: "w-full" }, S = {
|
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "change"],
|
|
37
37
|
setup(g, { emit: _ }) {
|
|
38
|
-
const s = g, x = _, f = m(() => s.titleI18n ? u(s.titleI18n) : s.title), p = m(
|
|
38
|
+
const s = g, x = _, f = m(() => s.titleI18n ? u(s.titleI18n) : s.title), p = m(
|
|
39
|
+
() => s.descriptionI18n ? u(s.descriptionI18n) : s.description
|
|
40
|
+
), k = (t) => t.titleI18n ? u(t.titleI18n) : t.title, I = (t) => t.descriptionI18n ? u(t.descriptionI18n) : t.description, w = (t) => t.badgeI18n ? u(t.badgeI18n) : t.badge, d = (t) => Array.isArray(s.modelValue) ? s.modelValue.includes(t) : s.modelValue === t, b = (t) => {
|
|
39
41
|
if (s.disabled || s.options.find((l) => l.id === t)?.disabled) return;
|
|
40
42
|
let e;
|
|
41
43
|
if (s.multiple) {
|
|
@@ -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.vue2.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",
|
|
@@ -31,15 +31,15 @@ declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {},
|
|
|
31
31
|
}>, {
|
|
32
32
|
variant: "default" | "raised";
|
|
33
33
|
size: "xs" | "sm" | "md" | "lg";
|
|
34
|
+
compact: boolean;
|
|
34
35
|
loading: boolean;
|
|
35
36
|
striped: boolean;
|
|
36
|
-
compact: boolean;
|
|
37
37
|
rows: any[];
|
|
38
38
|
headers: TableHeader[];
|
|
39
39
|
emptyIcon: string;
|
|
40
|
-
paginationProps: import('./types').DataTablePaginationProps;
|
|
41
|
-
hideSelectable: boolean;
|
|
42
40
|
selectedRows: any[];
|
|
41
|
+
hideSelectable: boolean;
|
|
42
|
+
paginationProps: import('./types').DataTablePaginationProps;
|
|
43
43
|
showPagination: boolean;
|
|
44
44
|
cellBordered: boolean;
|
|
45
45
|
keyField: string;
|
|
@@ -38,8 +38,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
38
38
|
}) => any;
|
|
39
39
|
}>, {
|
|
40
40
|
size: "xs" | "sm" | "md" | "lg";
|
|
41
|
-
striped: boolean;
|
|
42
41
|
compact: boolean;
|
|
42
|
+
striped: boolean;
|
|
43
43
|
selectable: boolean;
|
|
44
44
|
isSelected: boolean;
|
|
45
45
|
keyField: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CustomFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-30cab34f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -175,7 +175,17 @@ const ie = { class: "custom-fields-wrapper" }, ce = { class: "flex justify-betwe
|
|
|
175
175
|
}, {
|
|
176
176
|
default: N(() => [
|
|
177
177
|
(n(!0), d(V, null, C(s.value, (o, l, h, c) => {
|
|
178
|
-
const b = [
|
|
178
|
+
const b = [
|
|
179
|
+
o,
|
|
180
|
+
r.disabled,
|
|
181
|
+
r.readonly,
|
|
182
|
+
r.isUpdate,
|
|
183
|
+
r.showRowNumbers,
|
|
184
|
+
x.value,
|
|
185
|
+
r.draggable,
|
|
186
|
+
l,
|
|
187
|
+
Y(l)
|
|
188
|
+
];
|
|
179
189
|
if (c && c.key === o._id && re(c, b)) return c;
|
|
180
190
|
const f = (n(), d("div", {
|
|
181
191
|
key: o._id,
|
|
@@ -183,7 +193,10 @@ const ie = { class: "custom-fields-wrapper" }, ce = { class: "flex justify-betwe
|
|
|
183
193
|
}, [
|
|
184
194
|
r.draggable && !r.disabled && !r.readonly ? (n(), d("div", {
|
|
185
195
|
key: 0,
|
|
186
|
-
class: F([
|
|
196
|
+
class: F([
|
|
197
|
+
"w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors",
|
|
198
|
+
r.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"
|
|
199
|
+
])
|
|
187
200
|
}, [
|
|
188
201
|
$(de, {
|
|
189
202
|
icon: "lucide:grip-vertical",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-45c18c7b"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -220,7 +220,7 @@ const Be = ["onKeydown"], Le = { class: "flex items-center gap-3" }, Ne = { clas
|
|
|
220
220
|
], 2)) : c("", !0),
|
|
221
221
|
!e.schemaLoading && u.value && X.value.length > 0 ? (s(), d("div", {
|
|
222
222
|
key: 1,
|
|
223
|
-
class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-
|
|
223
|
+
class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-2" : "mb-8"])
|
|
224
224
|
}, [
|
|
225
225
|
T(t(Pe), {
|
|
226
226
|
steps: X.value,
|