vlite3 1.4.26 → 1.4.28
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/CategoryManager/CategoryManager.vue2.js +4 -3
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.d.ts +20 -1
- package/components/ColorPicker/ColorPicker.vue.js +98 -72
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DateRangePicker.vue.js +5 -239
- package/components/DateRangePicker.vue2.js +239 -2
- package/components/FilePicker/index.vue.js +1 -1
- package/components/Form/FormField.vue.js +71 -68
- package/components/Form/TableRow.vue.js +55 -40
- package/components/Form/TableView.vue.js +36 -31
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +4 -3
- package/components/Stats/StatItem.vue.js +127 -123
- package/package.json +2 -2
- package/style.css +1 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as x, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { resolveFieldType as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as d, withMemo as f, openBlock as a, createElementBlock as l, normalizeStyle as R, normalizeClass as m, createVNode as u, createCommentVNode as i, toDisplayString as C, Fragment as F, renderList as I, createBlock as k } from "vue";
|
|
2
|
+
import B from "./FormField.vue.js";
|
|
3
|
+
import N from "../Icon.vue.js";
|
|
4
|
+
import T from "../Button.vue.js";
|
|
5
|
+
import { resolveFieldType as U } from "./utils/form.utils.js";
|
|
6
|
+
const z = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "w-10 flex-none flex items-center justify-center text-xs text-muted-foreground border-r border-border bg-muted/20"
|
|
9
|
-
},
|
|
9
|
+
}, V = {
|
|
10
10
|
key: 2,
|
|
11
11
|
class: "w-10 flex-none flex items-center justify-center border-l border-border bg-muted/20"
|
|
12
|
-
},
|
|
12
|
+
}, H = /* @__PURE__ */ x({
|
|
13
13
|
__name: "TableRow",
|
|
14
14
|
props: {
|
|
15
15
|
row: {},
|
|
@@ -26,63 +26,78 @@ const k = {
|
|
|
26
26
|
onRemoveRow: { type: Function }
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const o = e, s = d(() => o.draggable && !o.disabled && !o.readonly), w = d(() => o.helpers.getRowErrorsHash(o.rowIndex)), c = (r) => U(r, o.helpers.getRowContext(o.rowIndex)), b = (r) => {
|
|
30
|
+
const t = c(r);
|
|
31
|
+
return {
|
|
32
|
+
...r,
|
|
33
|
+
props: {
|
|
34
|
+
...t === "multiSelect" ? { showControls: !1, wrap: !1 } : {},
|
|
35
|
+
...t === "file" || t === "fileUploader" ? { variant: "input" } : {},
|
|
36
|
+
...t === "switch" ? { switchVariant: "basic" } : {},
|
|
37
|
+
...t === "check" ? { size: "sm" } : {},
|
|
38
|
+
...t === "color" ? { trigger: "swatch" } : {},
|
|
39
|
+
...r.props || {}
|
|
40
|
+
},
|
|
41
|
+
label: void 0
|
|
42
|
+
};
|
|
43
|
+
}, h = (r) => ["switch", "check"].includes(String(c(r))), g = d(() => {
|
|
44
|
+
const r = [];
|
|
45
|
+
return s.value && r.push("2.5rem"), o.showRowNumbers && r.push("2.5rem"), r.push(...o.fields.map(() => "minmax(0, 1fr)")), o.canRemoveRow && r.push("2.5rem"), r.join(" ");
|
|
46
|
+
});
|
|
47
|
+
return (r, t) => f([e.row, e.disabled, e.readonly, e.isUpdate, e.showRowNumbers, e.canRemoveRow, e.draggable, e.rowIndex, w.value], () => (a(), l("div", {
|
|
48
|
+
class: "grid group bg-white transition-colors min-w-0",
|
|
49
|
+
style: R({ gridTemplateColumns: g.value })
|
|
50
|
+
}, [
|
|
51
|
+
s.value ? (a(), l("div", {
|
|
32
52
|
key: 0,
|
|
33
|
-
class:
|
|
53
|
+
class: m([
|
|
34
54
|
"w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors",
|
|
35
55
|
e.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"
|
|
36
56
|
])
|
|
37
57
|
}, [
|
|
38
|
-
|
|
58
|
+
u(N, {
|
|
39
59
|
icon: "lucide:grip-vertical",
|
|
40
60
|
class: "w-4 h-4"
|
|
41
61
|
})
|
|
42
|
-
], 2)) :
|
|
43
|
-
e.showRowNumbers ? (
|
|
44
|
-
(
|
|
45
|
-
key:
|
|
46
|
-
class:
|
|
62
|
+
], 2)) : i("", !0),
|
|
63
|
+
e.showRowNumbers ? (a(), l("div", z, C(e.rowIndex + 1), 1)) : i("", !0),
|
|
64
|
+
(a(!0), l(F, null, I(e.fields, (n, y) => (a(), l("div", {
|
|
65
|
+
key: n.name,
|
|
66
|
+
class: m(["min-w-0 relative", [
|
|
67
|
+
{ "border-l border-border": y > 0 },
|
|
68
|
+
h(n) ? "flex items-center px-3" : ""
|
|
69
|
+
]])
|
|
47
70
|
}, [
|
|
48
|
-
e.helpers.isFieldVisible(e.rowIndex,
|
|
71
|
+
e.helpers.isFieldVisible(e.rowIndex, n) ? (a(), k(B, {
|
|
49
72
|
key: 0,
|
|
50
|
-
field:
|
|
51
|
-
|
|
52
|
-
props: {
|
|
53
|
-
...d(i)(r, e.helpers.getRowContext(e.rowIndex)) === "multiSelect" ? { showControls: !1, wrap: !1 } : {},
|
|
54
|
-
...r.props || {},
|
|
55
|
-
...d(i)(r, e.helpers.getRowContext(e.rowIndex)) === "file" || d(i)(r, e.helpers.getRowContext(e.rowIndex)) === "fileUploader" ? { variant: "input" } : {}
|
|
56
|
-
},
|
|
57
|
-
label: void 0
|
|
58
|
-
},
|
|
59
|
-
value: e.helpers.getFieldValue(e.rowIndex, r.name),
|
|
73
|
+
field: b(n),
|
|
74
|
+
value: e.helpers.getFieldValue(e.rowIndex, n.name),
|
|
60
75
|
values: e.row,
|
|
61
76
|
errors: e.helpers.errors,
|
|
62
|
-
error: e.helpers.getFieldError(e.rowIndex,
|
|
77
|
+
error: e.helpers.getFieldError(e.rowIndex, n.name),
|
|
63
78
|
variant: "transparent",
|
|
64
79
|
size: "sm",
|
|
65
80
|
rounded: "none",
|
|
66
|
-
disabled: e.disabled || e.helpers.isFieldDisabled(e.rowIndex,
|
|
67
|
-
readonly: e.readonly || e.helpers.isFieldReadonly(e.rowIndex,
|
|
81
|
+
disabled: e.disabled || e.helpers.isFieldDisabled(e.rowIndex, n),
|
|
82
|
+
readonly: e.readonly || e.helpers.isFieldReadonly(e.rowIndex, n),
|
|
68
83
|
isUpdate: e.isUpdate,
|
|
69
84
|
class: "w-full h-full min-h-[40px]",
|
|
70
|
-
onChange: (
|
|
71
|
-
}, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) :
|
|
85
|
+
onChange: (v) => e.onFieldChange(e.rowIndex, n.name, v)
|
|
86
|
+
}, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) : i("", !0)
|
|
72
87
|
], 2))), 128)),
|
|
73
|
-
e.canRemoveRow ? (
|
|
74
|
-
|
|
88
|
+
e.canRemoveRow ? (a(), l("div", V, [
|
|
89
|
+
u(T, {
|
|
75
90
|
type: "button",
|
|
76
91
|
variant: "ghost",
|
|
77
92
|
size: "xs",
|
|
78
93
|
icon: "lucide:trash-2",
|
|
79
94
|
disabled: e.disabled || e.readonly,
|
|
80
|
-
onClick:
|
|
95
|
+
onClick: t[0] || (t[0] = (n) => e.onRemoveRow(e.rowIndex))
|
|
81
96
|
}, null, 8, ["disabled"])
|
|
82
|
-
])) :
|
|
83
|
-
])),
|
|
97
|
+
])) : i("", !0)
|
|
98
|
+
], 4)), t, 1);
|
|
84
99
|
}
|
|
85
100
|
});
|
|
86
101
|
export {
|
|
87
|
-
|
|
102
|
+
H as default
|
|
88
103
|
};
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "flex border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider min-w-0"
|
|
7
|
-
}, x = {
|
|
1
|
+
import { defineComponent as b, computed as w, openBlock as o, createElementBlock as d, normalizeStyle as g, createCommentVNode as a, Fragment as s, renderList as m, normalizeClass as h, toDisplayString as i, createVNode as y, unref as f, withCtx as v, createBlock as x, createElementVNode as c } from "vue";
|
|
2
|
+
import { VueDraggable as R } from "vue-draggable-plus";
|
|
3
|
+
import k from "./TableRow.vue.js";
|
|
4
|
+
const B = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background min-w-0 max-w-full w-full" }, F = {
|
|
8
5
|
key: 0,
|
|
9
6
|
class: "w-10 flex-none p-3 border-r border-border"
|
|
10
|
-
},
|
|
7
|
+
}, C = {
|
|
11
8
|
key: 1,
|
|
12
9
|
class: "w-10 flex-none p-3 text-center border-r border-border"
|
|
13
|
-
},
|
|
10
|
+
}, N = {
|
|
14
11
|
key: 2,
|
|
15
|
-
class: "
|
|
16
|
-
},
|
|
12
|
+
class: "p-3 border-l border-border"
|
|
13
|
+
}, V = {
|
|
17
14
|
key: 1,
|
|
18
15
|
class: "flex flex-col items-center justify-center py-6 text-center bg-muted/5"
|
|
19
|
-
},
|
|
16
|
+
}, p = { class: "text-sm font-medium text-foreground" }, D = { class: "text-xs text-muted-foreground mt-1" }, j = /* @__PURE__ */ b({
|
|
20
17
|
__name: "TableView",
|
|
21
18
|
props: {
|
|
22
19
|
rows: {},
|
|
@@ -38,17 +35,25 @@ const f = { class: "custom-fields-table border border-border rounded overflow-hi
|
|
|
38
35
|
onDragUpdate: { type: Function }
|
|
39
36
|
},
|
|
40
37
|
setup(e) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
const r = e, u = w(() => {
|
|
39
|
+
const t = [];
|
|
40
|
+
return r.draggable && !r.disabled && !r.readonly && t.push("2.5rem"), r.showRowNumbers && t.push("2.5rem"), t.push(...r.visibleSchemaFields.map(() => "minmax(0, 1fr)")), r.canRemoveRow && t.push("2.5rem"), t.join(" ");
|
|
41
|
+
});
|
|
42
|
+
return (t, U) => (o(), d("div", B, [
|
|
43
|
+
e.columnHeaders.length > 1 ? (o(), d("div", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "grid border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider min-w-0",
|
|
46
|
+
style: g({ gridTemplateColumns: u.value })
|
|
47
|
+
}, [
|
|
48
|
+
e.draggable && !e.disabled && !e.readonly ? (o(), d("div", F)) : a("", !0),
|
|
49
|
+
e.showRowNumbers ? (o(), d("div", C, " # ")) : a("", !0),
|
|
50
|
+
(o(!0), d(s, null, m(e.columnHeaders, (n, l) => (o(), d("div", {
|
|
51
|
+
key: l,
|
|
52
|
+
class: h(["p-3 min-w-0 truncate", { "border-l border-border": l > 0 }])
|
|
53
|
+
}, i(n), 3))), 128)),
|
|
54
|
+
e.canRemoveRow ? (o(), d("div", N)) : a("", !0)
|
|
55
|
+
], 4)) : a("", !0),
|
|
56
|
+
y(f(R), {
|
|
52
57
|
"model-value": e.rows,
|
|
53
58
|
"onUpdate:modelValue": e.onDragUpdate,
|
|
54
59
|
disabled: !e.draggable || e.disabled || e.readonly,
|
|
@@ -57,11 +62,11 @@ const f = { class: "custom-fields-table border border-border rounded overflow-hi
|
|
|
57
62
|
"ghost-class": "opacity-50",
|
|
58
63
|
class: "divide-y divide-border min-w-0"
|
|
59
64
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
(o(!0),
|
|
65
|
+
default: v(() => [
|
|
66
|
+
(o(!0), d(s, null, m(e.rows, (n, l) => (o(), x(k, {
|
|
62
67
|
key: n._id,
|
|
63
68
|
row: n,
|
|
64
|
-
"row-index":
|
|
69
|
+
"row-index": l,
|
|
65
70
|
fields: e.visibleSchemaFields,
|
|
66
71
|
draggable: e.draggable,
|
|
67
72
|
disabled: e.disabled,
|
|
@@ -76,13 +81,13 @@ const f = { class: "custom-fields-table border border-border rounded overflow-hi
|
|
|
76
81
|
]),
|
|
77
82
|
_: 1
|
|
78
83
|
}, 8, ["model-value", "onUpdate:modelValue", "disabled"]),
|
|
79
|
-
e.rows.length === 0 ? (o(),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
])) :
|
|
84
|
+
e.rows.length === 0 ? (o(), d("div", V, [
|
|
85
|
+
c("p", p, i(e.emptyTitle), 1),
|
|
86
|
+
c("p", D, i(e.emptyDescription), 1)
|
|
87
|
+
])) : a("", !0)
|
|
83
88
|
]));
|
|
84
89
|
}
|
|
85
90
|
});
|
|
86
91
|
export {
|
|
87
|
-
|
|
92
|
+
j as default
|
|
88
93
|
};
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -13,9 +13,10 @@ import "vue-draggable-plus";
|
|
|
13
13
|
/* empty css */
|
|
14
14
|
import "v-datepicker-lite";
|
|
15
15
|
import "v-datepicker-lite/style.css";
|
|
16
|
+
/* empty css */
|
|
16
17
|
import "@jaames/iro";
|
|
17
18
|
import "@vueuse/core";
|
|
18
|
-
/* empty css
|
|
19
|
+
/* empty css */
|
|
19
20
|
import "iconify-icon-picker";
|
|
20
21
|
import "iconify-icon-picker/style.css";
|
|
21
22
|
/* empty css */
|
|
@@ -29,7 +30,7 @@ import "../../core/config.js";
|
|
|
29
30
|
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
30
31
|
class: "pt-2 px-2 min-w-[295px]",
|
|
31
32
|
style: { "will-change": "transform", contain: "layout style" }
|
|
32
|
-
},
|
|
33
|
+
}, ce = /* @__PURE__ */ B({
|
|
33
34
|
__name: "ScreenFilter",
|
|
34
35
|
props: {
|
|
35
36
|
schema: {},
|
|
@@ -192,5 +193,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
192
193
|
}
|
|
193
194
|
});
|
|
194
195
|
export {
|
|
195
|
-
|
|
196
|
+
ce as default
|
|
196
197
|
};
|