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.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/components/AppShell/AppShellLayoutClassic.vue.js +67 -64
  3. package/components/AppShell/AppShellLayoutDashboard.vue.js +76 -71
  4. package/components/AppShell/AppShellLayoutDock.vue.js +27 -27
  5. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +81 -76
  6. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +56 -56
  7. package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
  8. package/components/AsyncSelect/createAsyncSelect.js +156 -0
  9. package/components/AsyncSelect/index.d.ts +1 -0
  10. package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
  11. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  12. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  13. package/components/DataTable/DataTable.vue.d.ts +3 -3
  14. package/components/DataTable/DataTableRow.vue.d.ts +1 -1
  15. package/components/Form/CustomFields.vue.js +2 -2
  16. package/components/Form/CustomFields.vue2.js +15 -2
  17. package/components/Form/Form.vue.js +1 -1
  18. package/components/Form/Form.vue2.js +1 -1
  19. package/components/Invoice/InvoiceVariant1.vue.js +225 -176
  20. package/components/Invoice/InvoiceVariant2.vue.js +174 -125
  21. package/components/Invoice/InvoiceVariant3.vue.js +186 -157
  22. package/components/Invoice/InvoiceVariant4.vue.js +200 -156
  23. package/components/Invoice/types.d.ts +10 -1
  24. package/components/List/ListFieldRow.vue.js +221 -144
  25. package/components/List/utils.d.ts +2 -2
  26. package/components/List/utils.js +6 -9
  27. package/components/NavbarCommandPalette.vue.js +2 -2
  28. package/components/Price/Price.vue.d.ts +3 -1
  29. package/components/Price/Price.vue.js +35 -10
  30. package/components/Rating/Rating.vue.d.ts +43 -0
  31. package/components/Rating/Rating.vue.js +7 -0
  32. package/components/Rating/Rating.vue2.js +92 -0
  33. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  34. package/components/Rating/ReviewSummary.vue.js +67 -0
  35. package/components/Rating/ReviewSummary.vue2.js +4 -0
  36. package/components/Rating/index.d.ts +3 -0
  37. package/components/Rating/types.d.ts +28 -0
  38. package/components/Screen/Screen.vue.d.ts +38 -12
  39. package/components/Screen/Screen.vue.js +400 -304
  40. package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
  41. package/components/Screen/components/ScreenToolbar.vue.js +116 -0
  42. package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
  43. package/components/Screen/types.d.ts +9 -0
  44. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  45. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  46. package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
  47. package/components/Stats/StatItem.vue.js +212 -153
  48. package/components/Stats/Stats.vue.js +20 -20
  49. package/components/Stats/components/StatIconBox.vue.js +42 -42
  50. package/components/Stats/components/StatTrend.vue.js +20 -20
  51. package/components/Stats/types.d.ts +3 -1
  52. package/components/Timeline/Timeline.vue.js +21 -11
  53. package/components/Timeline/TimelineItem.vue.js +1 -1
  54. package/core/config.d.ts +10 -0
  55. package/core/config.js +11 -9
  56. package/index.d.ts +2 -0
  57. package/index.js +220 -214
  58. package/package.json +2 -1
  59. package/style.css +23 -17
  60. package/types/config.type.d.ts +2 -0
  61. package/types/list.type.d.ts +4 -0
  62. package/utils/functions.d.ts +9 -10
  63. package/utils/functions.js +78 -63
  64. package/utils/status.js +16 -16
@@ -0,0 +1,43 @@
1
+ import { RatingProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ text?(_: {
6
+ value: number;
7
+ max: number;
8
+ }): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<RatingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ change: (value: number) => any;
16
+ "update:modelValue": (value: number) => any;
17
+ hover: (value: number) => any;
18
+ }, string, import('vue').PublicProps, Readonly<RatingProps> & Readonly<{
19
+ onChange?: (value: number) => any;
20
+ "onUpdate:modelValue"?: (value: number) => any;
21
+ onHover?: (value: number) => any;
22
+ }>, {
23
+ icon: string | string[];
24
+ size: "sm" | "md" | "lg" | "xl";
25
+ solid: boolean;
26
+ readonly: boolean;
27
+ disabled: boolean;
28
+ modelValue: number;
29
+ max: number;
30
+ allowHalf: boolean;
31
+ showText: boolean;
32
+ activeIcon: string | string[];
33
+ activeColor: string;
34
+ inactiveColor: string;
35
+ clearable: boolean;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Rating.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-33afc5cb"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,92 @@
1
+ import { defineComponent as M, ref as z, computed as I, openBlock as r, createElementBlock as c, normalizeClass as u, Fragment as N, renderList as S, createVNode as h, unref as x, createElementVNode as y, normalizeStyle as T, renderSlot as $, createTextVNode as A, toDisplayString as g, createCommentVNode as E } from "vue";
2
+ import { Icon as w } from "@iconify/vue";
3
+ const F = ["onMousemove", "onClick"], H = {
4
+ key: 0,
5
+ class: "ml-2 text-sm text-foreground/80 font-medium whitespace-nowrap"
6
+ }, L = { class: "text-xs text-muted-foreground font-normal" }, D = /* @__PURE__ */ M({
7
+ __name: "Rating",
8
+ props: {
9
+ modelValue: { default: 0 },
10
+ max: { default: 5 },
11
+ allowHalf: { type: Boolean, default: !1 },
12
+ readonly: { type: Boolean, default: !1 },
13
+ showText: { type: Boolean, default: !1 },
14
+ icon: { default: "lucide:star" },
15
+ activeIcon: { default: "lucide:star" },
16
+ activeColor: { default: "text-amber-400" },
17
+ inactiveColor: { default: "text-muted-foreground/30" },
18
+ size: { default: "md" },
19
+ clearable: { type: Boolean, default: !1 },
20
+ disabled: { type: Boolean, default: !1 },
21
+ solid: { type: Boolean, default: !0 },
22
+ class: {}
23
+ },
24
+ emits: ["update:modelValue", "change", "hover"],
25
+ setup(t, { emit: C }) {
26
+ const l = t, s = C, n = z(0), d = I(() => n.value > 0 ? n.value : l.modelValue), m = {
27
+ sm: "w-4 h-4",
28
+ md: "w-5 h-5",
29
+ lg: "w-6 h-6",
30
+ xl: "w-8 h-8"
31
+ }, v = (o, e) => {
32
+ const a = e === "active" ? l.activeIcon : l.icon;
33
+ return Array.isArray(a) ? a[Math.min(o - 1, a.length - 1)] : a;
34
+ }, V = (o, e) => {
35
+ if (!(l.readonly || l.disabled))
36
+ if (l.allowHalf) {
37
+ const i = o.currentTarget.getBoundingClientRect(), f = o.clientX - i.left < i.width / 2 ? e - 0.5 : e;
38
+ n.value !== f && (n.value = f, s("hover", f));
39
+ } else
40
+ n.value !== e && (n.value = e, s("hover", e));
41
+ }, b = () => {
42
+ l.readonly || l.disabled || (n.value = 0, s("hover", 0));
43
+ }, B = (o) => {
44
+ if (l.readonly || l.disabled) return;
45
+ let e = n.value || o;
46
+ l.clearable && l.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
47
+ }, k = (o) => {
48
+ const e = d.value - o + 1;
49
+ return e >= 1 ? 100 : e > 0 ? e * 100 : 0;
50
+ };
51
+ return (o, e) => (r(), c("div", {
52
+ class: u(["inline-flex items-center gap-1.5", [l.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
53
+ onMouseleave: b
54
+ }, [
55
+ (r(!0), c(N, null, S(t.max, (a) => (r(), c("div", {
56
+ key: a,
57
+ class: u(["relative flex items-center justify-center isolate transition-transform", {
58
+ "cursor-pointer hover:scale-110 active:scale-95": !t.readonly && !t.disabled,
59
+ "cursor-default pointer-events-none": t.readonly || t.disabled
60
+ }]),
61
+ onMousemove: (i) => V(i, a),
62
+ onClick: (i) => B(a)
63
+ }, [
64
+ h(x(w), {
65
+ icon: v(a, "inactive"),
66
+ class: u([m[t.size], t.inactiveColor])
67
+ }, null, 8, ["icon", "class"]),
68
+ y("div", {
69
+ class: "absolute inset-0 overflow-hidden",
70
+ style: T({ width: `${k(a)}%` })
71
+ }, [
72
+ h(x(w), {
73
+ icon: v(a, "active"),
74
+ class: u([m[t.size], t.activeColor, { "is-solid": t.solid }])
75
+ }, null, 8, ["icon", "class"])
76
+ ], 4)
77
+ ], 42, F))), 128)),
78
+ $(o.$slots, "text", {
79
+ value: d.value,
80
+ max: t.max
81
+ }, () => [
82
+ t.showText ? (r(), c("span", H, [
83
+ A(g(d.value) + " ", 1),
84
+ y("span", L, "/ " + g(t.max), 1)
85
+ ])) : E("", !0)
86
+ ], !0)
87
+ ], 34));
88
+ }
89
+ });
90
+ export {
91
+ D as default
92
+ };
@@ -0,0 +1,5 @@
1
+ import { ReviewSummaryProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<ReviewSummaryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ReviewSummaryProps> & Readonly<{}>, {
3
+ showTotal: boolean;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
5
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { defineComponent as w, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, unref as x, createCommentVNode as _, createTextVNode as b, normalizeStyle as y } from "vue";
2
+ import { Icon as v } from "@iconify/vue";
3
+ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, R = { class: "text-5xl font-bold tracking-tighter text-foreground" }, D = { class: "flex items-center gap-1 mt-3 text-amber-400" }, N = {
4
+ key: 0,
5
+ class: "text-sm text-muted-foreground mt-2 font-medium"
6
+ }, B = { class: "flex flex-col gap-2 w-full flex-grow" }, C = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, T = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, V = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, E = /* @__PURE__ */ w({
7
+ __name: "ReviewSummary",
8
+ props: {
9
+ ratingDistribution: {},
10
+ totalReviews: {},
11
+ averageRating: {},
12
+ showTotal: { type: Boolean, default: !0 },
13
+ class: {}
14
+ },
15
+ setup(c) {
16
+ const e = c, p = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
17
+ if (e.averageRating !== void 0) return e.averageRating;
18
+ if (e.ratingDistribution.length === 0) return 0;
19
+ let n = 0, o = 0;
20
+ for (const t of e.ratingDistribution)
21
+ t.count !== void 0 && (n += t.rating * t.count, o += t.count);
22
+ return o > 0 ? Number((n / o).toFixed(1)) : 0;
23
+ }), h = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
24
+ return (n, o) => (l(), i("div", {
25
+ class: d(["flex flex-col sm:flex-row gap-6 md:gap-10 items-start w-full", e.class])
26
+ }, [
27
+ r("div", k, [
28
+ r("div", R, s(a.value), 1),
29
+ r("div", D, [
30
+ (l(), i(m, null, f(5, (t) => g(x(v), {
31
+ key: t,
32
+ icon: "lucide:star",
33
+ class: d(["w-5 h-5 transition-all", {
34
+ "fill-amber-400 text-amber-400": a.value >= t,
35
+ "fill-muted/20 text-muted-foreground/30": a.value < t
36
+ }])
37
+ }, null, 8, ["class"])), 64))
38
+ ]),
39
+ c.showTotal ? (l(), i("p", N, " Based on " + s(h.value) + " global ratings ", 1)) : _("", !0)
40
+ ]),
41
+ r("div", B, [
42
+ (l(!0), i(m, null, f(p.value, (t) => (l(), i("div", {
43
+ key: t.rating,
44
+ class: "flex items-center gap-3 w-full"
45
+ }, [
46
+ r("div", C, [
47
+ b(s(t.rating) + " ", 1),
48
+ g(x(v), {
49
+ icon: "lucide:star",
50
+ class: "w-4 h-4 text-amber-400 fill-amber-400"
51
+ })
52
+ ]),
53
+ r("div", T, [
54
+ r("div", {
55
+ class: "h-full bg-amber-400 rounded-full transition-all duration-1000 ease-out",
56
+ style: y({ width: `${t.percentage}%` })
57
+ }, null, 4)
58
+ ]),
59
+ r("div", V, s(t.percentage) + "% ", 1)
60
+ ]))), 128))
61
+ ])
62
+ ], 2));
63
+ }
64
+ });
65
+ export {
66
+ E as default
67
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ReviewSummary.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export { default as Rating } from './Rating.vue';
3
+ export { default as ReviewSummary } from './ReviewSummary.vue';
@@ -0,0 +1,28 @@
1
+ export interface RatingProps {
2
+ modelValue?: number;
3
+ max?: number;
4
+ allowHalf?: boolean;
5
+ readonly?: boolean;
6
+ showText?: boolean;
7
+ icon?: string | string[];
8
+ activeIcon?: string | string[];
9
+ activeColor?: string;
10
+ inactiveColor?: string;
11
+ size?: 'sm' | 'md' | 'lg' | 'xl';
12
+ clearable?: boolean;
13
+ disabled?: boolean;
14
+ solid?: boolean;
15
+ class?: string;
16
+ }
17
+ export interface ReviewSummaryData {
18
+ rating: number;
19
+ percentage: number;
20
+ count?: number;
21
+ }
22
+ export interface ReviewSummaryProps {
23
+ ratingDistribution: ReviewSummaryData[];
24
+ totalReviews?: number;
25
+ averageRating?: number;
26
+ showTotal?: boolean;
27
+ class?: string;
28
+ }
@@ -18,7 +18,7 @@ declare function __VLS_template(): {
18
18
  hasData: boolean;
19
19
  loading: boolean;
20
20
  }): any;
21
- description?(_: {
21
+ title?(_: {
22
22
  activeView: string;
23
23
  searchQuery: string;
24
24
  activeFilters: Record<string, any>;
@@ -34,7 +34,7 @@ declare function __VLS_template(): {
34
34
  hasData: boolean;
35
35
  loading: boolean;
36
36
  }): any;
37
- 'before-search'?(_: {
37
+ description?(_: {
38
38
  activeView: string;
39
39
  searchQuery: string;
40
40
  activeFilters: Record<string, any>;
@@ -50,7 +50,7 @@ declare function __VLS_template(): {
50
50
  hasData: boolean;
51
51
  loading: boolean;
52
52
  }): any;
53
- actions?(_: {
53
+ description?(_: {
54
54
  activeView: string;
55
55
  searchQuery: string;
56
56
  activeFilters: Record<string, any>;
@@ -66,7 +66,14 @@ declare function __VLS_template(): {
66
66
  hasData: boolean;
67
67
  loading: boolean;
68
68
  }): any;
69
- 'after-add'?(_: {
69
+ 'header-stats'?(_: {}): any;
70
+ 'before-search'?(_: any): any;
71
+ 'before-search'?(_: any): any;
72
+ actions?(_: any): any;
73
+ actions?(_: any): any;
74
+ 'after-add'?(_: any): any;
75
+ 'after-add'?(_: any): any;
76
+ 'custom-header'?(_: {
70
77
  activeView: string;
71
78
  searchQuery: string;
72
79
  activeFilters: Record<string, any>;
@@ -114,6 +121,22 @@ declare function __VLS_template(): {
114
121
  hasData: boolean;
115
122
  loading: boolean;
116
123
  }): any;
124
+ 'sub-header'?(_: {
125
+ activeView: string;
126
+ searchQuery: string;
127
+ activeFilters: Record<string, any>;
128
+ activeQuickFilter: string | number;
129
+ activeSort: {
130
+ field: string;
131
+ order: string;
132
+ };
133
+ page: number;
134
+ limit: number;
135
+ selectedRows: any[];
136
+ isFiltered: boolean;
137
+ hasData: boolean;
138
+ loading: boolean;
139
+ }): any;
117
140
  empty?(_: {
118
141
  activeView: string;
119
142
  searchQuery: string;
@@ -316,24 +339,27 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
316
339
  }>, {
317
340
  name: string;
318
341
  data: any[];
342
+ variant: "one" | "two";
319
343
  loading: boolean;
344
+ emptyIcon: string;
345
+ canAdd: boolean;
320
346
  exportProps: Record<string, any> | boolean;
321
347
  importProps: Record<string, any> | boolean;
322
- canAdd: boolean;
323
- emptyIcon: string;
348
+ hideSelectable: boolean;
349
+ hideDeleteBtn: boolean;
350
+ showRefresh: boolean;
351
+ filterSchema: import('../Form').IForm[];
352
+ filterType: "modal" | "dropdown";
353
+ canSearch: boolean;
354
+ stats: import('../Stats').StatItemSchema[] | any[];
355
+ statsProps: Partial<import('../Stats').StatsProps>;
324
356
  paginationProps: import('./types').ScreenPaginationProps;
325
357
  exportSchema: import('../ExportData').ExportField[] | any[];
326
358
  importSchema: import('../ImportData').ImportField[] | any[];
327
359
  importType: string;
328
360
  customHeader: boolean;
329
- canSearch: boolean;
330
361
  pagination: boolean;
331
- filterSchema: import('../Form').IForm[];
332
- filterType: "modal" | "dropdown";
333
- showRefresh: boolean;
334
362
  viewProps: Record<string, any>;
335
- hideSelectable: boolean;
336
- hideDeleteBtn: boolean;
337
363
  quickFilters: import('./types').ScreenQuickFilter[];
338
364
  skipQuickFilterViews: string[];
339
365
  quickFilterKey: string;