vlite3 0.9.2 → 0.9.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/components/Alert.vue.js +40 -38
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/Carousel/Carousel.vue.js +2 -2
- package/components/Carousel/Carousel.vue2.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DataTable/DataTable.vue.js +20 -20
- package/components/DataTable/DataTableRow.vue.js +1 -1
- package/components/DateTime/DateTime.vue.js +31 -0
- package/components/DateTime/DateTime.vue2.js +4 -0
- package/components/DateTime/index.d.ts +1 -0
- package/components/Dropdown/Dropdown.vue.js +37 -37
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +125 -97
- package/components/Form/FormField.vue.js +128 -127
- package/components/Form/types.d.ts +1 -0
- package/components/List/ListFieldRow.vue.js +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +1 -1
- package/components/NumberInput.vue2.js +45 -45
- package/components/Screen/Screen.vue.js +70 -70
- package/components/Screen/ScreenFilter.vue.js +3 -2
- package/components/Screen/components/ScreenEmptyState.vue.js +11 -10
- package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
- package/components/Screen/components/ScreenViewToggle.vue.js +5 -5
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/components/Workbook/Workbook.vue.d.ts +1 -1
- package/core/config.d.ts +2 -2
- package/core/config.js +7 -7
- package/core/index.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/style.css +9 -9
- package/types/config.type.d.ts +1 -1
- package/components/Date/Date.vue.js +0 -21
- package/components/Date/Date.vue2.js +0 -4
- package/components/Date/index.d.ts +0 -1
- /package/components/{Date/Date.vue.d.ts → DateTime/DateTime.vue.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as K, ref as g, watch as R, computed as a, openBlock as c, createElementBlock as m, normalizeClass as o, createVNode as x, createCommentVNode as h, createElementVNode as y, withKeys as p, withModifiers as k } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import f from "./Icon.vue.js";
|
|
3
3
|
const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown"], L = ["disabled"], M = {
|
|
4
4
|
key: 2,
|
|
5
5
|
class: "flex flex-col h-full border-l border-input"
|
|
@@ -22,22 +22,22 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
24
24
|
setup(e, { emit: N }) {
|
|
25
|
-
const
|
|
25
|
+
const l = e, s = N, d = g(l.modelValue ?? "");
|
|
26
26
|
R(
|
|
27
|
-
() =>
|
|
28
|
-
(
|
|
29
|
-
|
|
27
|
+
() => l.modelValue,
|
|
28
|
+
(t) => {
|
|
29
|
+
t !== void 0 && (d.value = t);
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
const z = g(null), r = a(() => {
|
|
33
|
-
const
|
|
33
|
+
const t = {
|
|
34
34
|
xs: { h: "h-7", text: "text-xs", px: "px-2", icon: "w-3 h-3" },
|
|
35
35
|
sm: { h: "h-8", text: "text-xs", px: "px-2", icon: "w-3.5 h-3.5" },
|
|
36
36
|
md: { h: "h-9", text: "text-sm", px: "px-3", icon: "w-4 h-4" },
|
|
37
37
|
lg: { h: "h-10", text: "text-sm", px: "px-4", icon: "w-5 h-5" },
|
|
38
38
|
xl: { h: "h-12", text: "text-lg", px: "px-5", icon: "w-6 h-6" }
|
|
39
39
|
};
|
|
40
|
-
return l
|
|
40
|
+
return t[l.size] || t.md;
|
|
41
41
|
}), C = a(() => ({
|
|
42
42
|
none: "rounded-none",
|
|
43
43
|
sm: "rounded-sm",
|
|
@@ -46,7 +46,7 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
46
46
|
xl: "rounded-xl",
|
|
47
47
|
"2xl": "rounded-2xl",
|
|
48
48
|
full: "rounded-full"
|
|
49
|
-
})[
|
|
49
|
+
})[l.rounded] || "rounded-md"), V = a(() => ({
|
|
50
50
|
none: "rounded-l-none",
|
|
51
51
|
sm: "rounded-l-sm",
|
|
52
52
|
md: "rounded-l-md",
|
|
@@ -54,7 +54,7 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
54
54
|
xl: "rounded-l-xl",
|
|
55
55
|
"2xl": "rounded-l-2xl",
|
|
56
56
|
full: "rounded-l-full"
|
|
57
|
-
})[
|
|
57
|
+
})[l.rounded] || "rounded-l-md"), B = a(() => ({
|
|
58
58
|
none: "rounded-r-none",
|
|
59
59
|
sm: "rounded-r-sm",
|
|
60
60
|
md: "rounded-r-md",
|
|
@@ -62,50 +62,50 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
62
62
|
xl: "rounded-r-xl",
|
|
63
63
|
"2xl": "rounded-r-2xl",
|
|
64
64
|
full: "rounded-r-full"
|
|
65
|
-
})[
|
|
65
|
+
})[l.rounded] || "rounded-r-md"), S = a(() => [
|
|
66
66
|
"flex items-center w-full relative transition-all duration-200",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
l.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
68
|
+
l.mode === "solid" ? "bg-muted" : "",
|
|
69
|
+
l.mode === "outline" ? "border border-input bg-background" : "",
|
|
70
|
+
l.mode === "ghost" ? "bg-transparent" : "",
|
|
71
71
|
r.value.h,
|
|
72
72
|
C.value
|
|
73
73
|
]), j = a(() => [
|
|
74
74
|
"flex-1 w-full bg-transparent focus:outline-none appearance-none",
|
|
75
|
-
|
|
75
|
+
l.variant === "split" ? "text-center" : "text-left pl-3",
|
|
76
76
|
"placeholder:text-muted-foreground/50",
|
|
77
77
|
r.value.text,
|
|
78
|
-
|
|
78
|
+
l.disabled ? "cursor-not-allowed" : ""
|
|
79
79
|
]), w = a(() => {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
const t = "flex items-center justify-center transition-colors active:scale-95 shrink-0 select-none", n = l.disabled ? "" : "hover:text-primary hover:bg-muted/50";
|
|
81
|
+
return l.size === "xs" || l.size, l.variant === "split" ? l.mode === "solid" ? [
|
|
82
|
+
t,
|
|
83
|
+
l.disabled ? "" : "hover:text-primary hover:bg-background/80",
|
|
84
84
|
"bg-background shadow-sm rounded-full mx-1 my-0.5 aspect-square self-center h-[calc(100%-12px)] w-auto max-w-[calc(100%-12px)] flex items-center justify-center"
|
|
85
|
-
] : [
|
|
86
|
-
}), u = (
|
|
87
|
-
if (
|
|
88
|
-
let n =
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
u(
|
|
85
|
+
] : [t, n, "h-full", "px-2"] : [t, n, "h-1/2 w-8 border-l border-input/50"];
|
|
86
|
+
}), u = (t) => {
|
|
87
|
+
if (l.disabled || l.readonly) return;
|
|
88
|
+
let n = t;
|
|
89
|
+
l.min !== void 0 && n < l.min && (n = l.min), l.max !== void 0 && n > l.max && (n = l.max), d.value = n, s("update:modelValue", n), s("change", n);
|
|
90
|
+
}, b = () => {
|
|
91
|
+
const t = Number(d.value) || 0;
|
|
92
|
+
u(t + l.step);
|
|
93
93
|
}, v = () => {
|
|
94
|
-
const
|
|
95
|
-
u(
|
|
96
|
-
}, F = (
|
|
97
|
-
const n =
|
|
94
|
+
const t = Number(d.value) || 0;
|
|
95
|
+
u(t - l.step);
|
|
96
|
+
}, F = (t) => {
|
|
97
|
+
const n = t.target, i = parseFloat(n.value);
|
|
98
98
|
if (isNaN(i)) {
|
|
99
99
|
d.value = n.value;
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
u(i);
|
|
103
|
-
}, I = (
|
|
104
|
-
s("blur",
|
|
103
|
+
}, I = (t) => {
|
|
104
|
+
s("blur", t);
|
|
105
105
|
const n = parseFloat(String(d.value));
|
|
106
|
-
isNaN(n) ? u(
|
|
106
|
+
isNaN(n) ? u(l.min || 0) : u(n);
|
|
107
107
|
};
|
|
108
|
-
return (
|
|
108
|
+
return (t, n) => (c(), m("div", {
|
|
109
109
|
class: o([S.value, "overflow-hidden"])
|
|
110
110
|
}, [
|
|
111
111
|
e.variant === "split" ? (c(), m("button", {
|
|
@@ -119,7 +119,7 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
119
119
|
disabled: e.disabled || e.min !== void 0 && Number(d.value) <= e.min,
|
|
120
120
|
onClick: v
|
|
121
121
|
}, [
|
|
122
|
-
x(
|
|
122
|
+
x(f, {
|
|
123
123
|
icon: "lucide:minus",
|
|
124
124
|
class: o(r.value.icon)
|
|
125
125
|
}, null, 8, ["class"])
|
|
@@ -140,7 +140,7 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
140
140
|
onFocus: n[0] || (n[0] = (i) => s("focus", i)),
|
|
141
141
|
onBlur: I,
|
|
142
142
|
onKeydown: [
|
|
143
|
-
p(k(
|
|
143
|
+
p(k(b, ["prevent"]), ["up"]),
|
|
144
144
|
p(k(v, ["prevent"]), ["down"])
|
|
145
145
|
]
|
|
146
146
|
}, null, 42, q),
|
|
@@ -153,9 +153,9 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
153
153
|
e.variant === "split" && e.mode !== "solid" ? B.value : ""
|
|
154
154
|
]),
|
|
155
155
|
disabled: e.disabled || e.max !== void 0 && Number(d.value) >= e.max,
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: b
|
|
157
157
|
}, [
|
|
158
|
-
x(
|
|
158
|
+
x(f, {
|
|
159
159
|
icon: "lucide:plus",
|
|
160
160
|
class: o(r.value.icon)
|
|
161
161
|
}, null, 8, ["class"])
|
|
@@ -165,10 +165,10 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
165
165
|
type: "button",
|
|
166
166
|
class: "flex-1 flex items-center justify-center hover:bg-muted/50 w-8 border-b border-input",
|
|
167
167
|
disabled: e.disabled || e.max !== void 0 && Number(d.value) >= e.max,
|
|
168
|
-
onClick:
|
|
168
|
+
onClick: b
|
|
169
169
|
}, [
|
|
170
|
-
x(
|
|
171
|
-
icon: "
|
|
170
|
+
x(f, {
|
|
171
|
+
icon: "fluent:chevron-up-20-filled",
|
|
172
172
|
class: o(e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5")
|
|
173
173
|
}, null, 8, ["class"])
|
|
174
174
|
], 8, $),
|
|
@@ -178,8 +178,8 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
178
178
|
disabled: e.disabled || e.min !== void 0 && Number(d.value) <= e.min,
|
|
179
179
|
onClick: v
|
|
180
180
|
}, [
|
|
181
|
-
x(
|
|
182
|
-
icon: "
|
|
181
|
+
x(f, {
|
|
182
|
+
icon: "fluent:chevron-down-20-filled",
|
|
183
183
|
class: o(e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5")
|
|
184
184
|
}, null, 8, ["class"])
|
|
185
185
|
], 8, A)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ge, useSlots as ye, computed as n, ref as s, markRaw as we, provide as F, watch as R, openBlock as o, createElementBlock as
|
|
1
|
+
import { defineComponent as ge, useSlots as ye, computed as n, ref as s, markRaw as we, provide as F, watch as R, openBlock as o, createElementBlock as f, normalizeClass as q, createVNode as w, createSlots as ke, withCtx as Q, renderSlot as d, createElementVNode as I, createBlock as h, createCommentVNode as u, isRef as be, unref as D, Fragment as M, resolveDynamicComponent as xe, mergeProps as A, toDisplayString as Ce } from "vue";
|
|
2
2
|
import De from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import O from "../Button.vue.js";
|
|
@@ -8,7 +8,7 @@ import $e from "./ScreenFilter.vue.js";
|
|
|
8
8
|
import Ie from "../ImportData/ImportData.vue.js";
|
|
9
9
|
import { usePersistentState as Be } from "../../utils/usePersistentState.js";
|
|
10
10
|
import { useVLiteConfig as Ve } from "../../core/config.js";
|
|
11
|
-
import { $t as
|
|
11
|
+
import { $t as v } from "../../utils/i18n.js";
|
|
12
12
|
import { SCREEN_CONTEXT_KEY as Te } from "../DataTable/types.js";
|
|
13
13
|
import Fe from "./components/ScreenHeaderTitle.vue.js";
|
|
14
14
|
import Re from "./components/ScreenViewToggle.vue.js";
|
|
@@ -83,23 +83,23 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
83
83
|
},
|
|
84
84
|
emits: ["add", "delete"],
|
|
85
85
|
setup(t, { emit: K }) {
|
|
86
|
-
const l = t, x = Ve(), E = K, P = ye(), L = n(() => l.name || l.title || "default-screen"),
|
|
86
|
+
const l = t, x = Ve(), E = K, P = ye(), L = n(() => l.name || l.title || "default-screen"), g = Be(
|
|
87
87
|
`view-mode-${L.value}`,
|
|
88
88
|
l.table || P.table ? "table" : "list"
|
|
89
|
-
),
|
|
89
|
+
), y = s(""), m = s({}), j = s({ field: "", order: "" }), k = s(l.pageInfo?.currentPage || 1), B = s(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), r = s([]), S = s([]), C = s(!1), c = s(
|
|
90
90
|
l.defaultQuickFilter !== void 0 ? l.defaultQuickFilter : l.quickFilters && l.quickFilters.length > 0 ? l.quickFilters[0].value : ""
|
|
91
91
|
), z = n(() => l.quickFilters && l.quickFilters.length > 0), H = (e) => {
|
|
92
|
-
|
|
92
|
+
c.value = e, k.value = 1, p();
|
|
93
93
|
}, U = n(() => {
|
|
94
94
|
let e;
|
|
95
|
-
return
|
|
96
|
-
}), X = n(() =>
|
|
97
|
-
(e) =>
|
|
95
|
+
return g.value === "table" ? e = l.table || !!P.table : e = l.list || !!P.list || !!P.grid, typeof e == "object" && e !== null ? we(e) : e;
|
|
96
|
+
}), X = n(() => y.value && y.value.trim() !== "" || c.value !== "" && c.value !== null && c.value !== void 0 ? !0 : m.value ? Object.keys(m.value).some(
|
|
97
|
+
(e) => m.value[e] !== "" && m.value[e] !== null && m.value[e] !== void 0
|
|
98
98
|
) : !1), Y = {
|
|
99
99
|
disableSearch: !0,
|
|
100
100
|
forceSelectable: !l.hideSelectable,
|
|
101
101
|
onTableChange: (e) => {
|
|
102
|
-
j.value = { field: e.sort.field, order: e.sort.order },
|
|
102
|
+
j.value = { field: e.sort.field, order: e.sort.order }, p();
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
F(Te, Y), F("screen-selected-rows", r), F("screen-request-delete", (e) => b(e));
|
|
@@ -122,52 +122,52 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
let V = null;
|
|
125
|
-
R(
|
|
125
|
+
R(y, () => {
|
|
126
126
|
V && clearTimeout(V), V = setTimeout(() => {
|
|
127
|
-
k.value = 1,
|
|
127
|
+
k.value = 1, p();
|
|
128
128
|
}, 300);
|
|
129
129
|
});
|
|
130
130
|
const W = (e) => {
|
|
131
|
-
k.value = e,
|
|
131
|
+
k.value = e, p();
|
|
132
132
|
}, Z = (e) => {
|
|
133
|
-
B.value = e, k.value = 1,
|
|
134
|
-
},
|
|
133
|
+
B.value = e, k.value = 1, p();
|
|
134
|
+
}, p = () => {
|
|
135
135
|
if (!l.refetch) return;
|
|
136
|
-
const e = { ...
|
|
137
|
-
|
|
136
|
+
const e = { ...m.value };
|
|
137
|
+
c.value !== "" && c.value !== null && c.value !== void 0 && (e[l.quickFilterKey] = c.value), l.refetch({
|
|
138
138
|
pagination: { page: k.value, limit: B.value },
|
|
139
|
-
search:
|
|
139
|
+
search: y.value,
|
|
140
140
|
sort: { ...j.value },
|
|
141
141
|
filter: e
|
|
142
142
|
});
|
|
143
143
|
}, _ = n(() => l.data && l.data.length > 0), ee = n(() => {
|
|
144
|
-
const e =
|
|
144
|
+
const e = v("vlite.screen.deleteSelected");
|
|
145
145
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
146
146
|
}), te = n(() => {
|
|
147
|
-
const e =
|
|
147
|
+
const e = v("vlite.screen.refresh");
|
|
148
148
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
149
149
|
}), le = n(() => {
|
|
150
|
-
const e =
|
|
150
|
+
const e = v("vlite.screen.searchPlaceholder");
|
|
151
151
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
152
152
|
}), ae = n(() => {
|
|
153
|
-
const e =
|
|
153
|
+
const e = v("vlite.screen.confirmDeleteTitle");
|
|
154
154
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
155
155
|
}), ie = n(() => {
|
|
156
|
-
const e =
|
|
156
|
+
const e = v("vlite.screen.confirmDeleteDesc", { count: S.value.length });
|
|
157
157
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${S.value.length > 1 ? "items" : "item"}?`;
|
|
158
158
|
}), ne = n(() => {
|
|
159
|
-
const e =
|
|
159
|
+
const e = v("vlite.screen.confirmDeleteBtn");
|
|
160
160
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
161
161
|
}), oe = n(() => {
|
|
162
|
-
const e =
|
|
162
|
+
const e = v("vlite.screen.cancelBtn");
|
|
163
163
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
164
164
|
}), re = n(() => {
|
|
165
|
-
const e =
|
|
165
|
+
const e = v("vlite.screen.missingView");
|
|
166
166
|
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
|
|
167
167
|
}), N = n(
|
|
168
168
|
() => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
|
|
169
169
|
), se = n(() => {
|
|
170
|
-
const e =
|
|
170
|
+
const e = v("vlite.screen.importData");
|
|
171
171
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
172
172
|
}), de = s(null), $ = s(!1), T = s(!1), ce = (e) => {
|
|
173
173
|
e.value === "export" ? $.value = !0 : e.value === "import" && (T.value = !0);
|
|
@@ -191,19 +191,19 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
191
191
|
skipped: 0,
|
|
192
192
|
failed: 0,
|
|
193
193
|
errors: []
|
|
194
|
-
}), ve = () =>
|
|
194
|
+
}), ve = () => p(), pe = n(
|
|
195
195
|
() => l.exportMode || x?.exportData?.mode || "frontend"
|
|
196
196
|
), he = async (e) => {
|
|
197
197
|
x?.services?.exportApi && l.exportType ? await x.services.exportApi(l.exportType, {
|
|
198
198
|
format: e,
|
|
199
|
-
search:
|
|
200
|
-
filter:
|
|
199
|
+
search: y.value,
|
|
200
|
+
filter: m.value
|
|
201
201
|
}) : console.warn(
|
|
202
202
|
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
203
203
|
);
|
|
204
204
|
};
|
|
205
|
-
return (e, i) => (o(),
|
|
206
|
-
t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (o(),
|
|
205
|
+
return (e, i) => (o(), f("div", Ne, [
|
|
206
|
+
t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (o(), f("div", {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: q([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
209
209
|
}, [
|
|
@@ -234,21 +234,21 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
234
234
|
]), 1032, ["title", "title-i18n", "title-class", "description", "description-i18n", "description-class", "info", "info-i18n"]),
|
|
235
235
|
I("div", Qe, [
|
|
236
236
|
I("div", Me, [
|
|
237
|
-
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(),
|
|
237
|
+
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(), h(O, {
|
|
238
238
|
key: 0,
|
|
239
239
|
variant: "outline",
|
|
240
240
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
241
241
|
icon: "lucide:trash-2",
|
|
242
242
|
title: ee.value,
|
|
243
243
|
onClick: i[0] || (i[0] = (a) => b(r.value))
|
|
244
|
-
}, null, 8, ["title"])) :
|
|
245
|
-
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (o(),
|
|
244
|
+
}, null, 8, ["title"])) : u("", !0),
|
|
245
|
+
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (o(), h(Re, {
|
|
246
246
|
key: 1,
|
|
247
|
-
modelValue: D(
|
|
248
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) => be(
|
|
249
|
-
}, null, 8, ["modelValue"])) :
|
|
247
|
+
modelValue: D(g),
|
|
248
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => be(g) ? g.value = a : null)
|
|
249
|
+
}, null, 8, ["modelValue"])) : u("", !0),
|
|
250
250
|
d(e.$slots, "before-search"),
|
|
251
|
-
t.showRefresh ? (o(),
|
|
251
|
+
t.showRefresh ? (o(), h(O, {
|
|
252
252
|
key: 2,
|
|
253
253
|
variant: "outline",
|
|
254
254
|
icon: "lucide:refresh-cw",
|
|
@@ -256,28 +256,28 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
256
256
|
class: "shrink-0 h-9! w-9!",
|
|
257
257
|
title: te.value,
|
|
258
258
|
disabled: t.loading,
|
|
259
|
-
onClick:
|
|
260
|
-
}, null, 8, ["title", "disabled"])) :
|
|
261
|
-
t.filterSchema && t.filterSchema.length > 0 ? (o(),
|
|
259
|
+
onClick: p
|
|
260
|
+
}, null, 8, ["title", "disabled"])) : u("", !0),
|
|
261
|
+
t.filterSchema && t.filterSchema.length > 0 ? (o(), h($e, {
|
|
262
262
|
key: 3,
|
|
263
263
|
schema: t.filterSchema,
|
|
264
264
|
type: t.filterType,
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue": i[2] || (i[2] = (a) =>
|
|
267
|
-
onChange:
|
|
268
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
269
|
-
t.canSearch ? (o(),
|
|
265
|
+
modelValue: m.value,
|
|
266
|
+
"onUpdate:modelValue": i[2] || (i[2] = (a) => m.value = a),
|
|
267
|
+
onChange: p
|
|
268
|
+
}, null, 8, ["schema", "type", "modelValue"])) : u("", !0),
|
|
269
|
+
t.canSearch ? (o(), f("div", Oe, [
|
|
270
270
|
w(De, {
|
|
271
271
|
lazy: "",
|
|
272
|
-
modelValue:
|
|
273
|
-
"onUpdate:modelValue": i[3] || (i[3] = (a) =>
|
|
272
|
+
modelValue: y.value,
|
|
273
|
+
"onUpdate:modelValue": i[3] || (i[3] = (a) => y.value = a),
|
|
274
274
|
icon: "lucide:search",
|
|
275
275
|
placeholder: le.value,
|
|
276
276
|
variant: "outline",
|
|
277
277
|
class: "bg-background w-full",
|
|
278
278
|
"show-clear-button": !0
|
|
279
279
|
}, null, 8, ["modelValue", "placeholder"])
|
|
280
|
-
])) :
|
|
280
|
+
])) : u("", !0)
|
|
281
281
|
]),
|
|
282
282
|
I("div", Ke, [
|
|
283
283
|
d(e.$slots, "actions", {}, () => [
|
|
@@ -291,34 +291,34 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
291
291
|
onAdd: i[4] || (i[4] = (a) => e.$emit("add"))
|
|
292
292
|
}, null, 8, ["can-add", "add-component", "add-btn", "loading", "data", "refetch"])
|
|
293
293
|
]),
|
|
294
|
-
N.value ? (o(),
|
|
294
|
+
N.value ? (o(), h(qe, {
|
|
295
295
|
key: 0,
|
|
296
296
|
"export-props": t.exportProps,
|
|
297
297
|
"import-props": t.importProps,
|
|
298
298
|
onSelect: ce
|
|
299
|
-
}, null, 8, ["export-props", "import-props"])) :
|
|
299
|
+
}, null, 8, ["export-props", "import-props"])) : u("", !0),
|
|
300
300
|
d(e.$slots, "after-add")
|
|
301
301
|
])
|
|
302
302
|
])
|
|
303
303
|
], 2)),
|
|
304
304
|
d(e.$slots, "sub-header"),
|
|
305
|
-
z.value ? (o(),
|
|
305
|
+
z.value ? (o(), f("div", {
|
|
306
306
|
key: 2,
|
|
307
|
-
class: q(["-mt-1", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-1" : "mb-2"])
|
|
307
|
+
class: q(["-mt-1 max-sm:hidden!", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-1" : "mb-2"])
|
|
308
308
|
}, [
|
|
309
309
|
w(Ue, {
|
|
310
|
-
modelValue:
|
|
311
|
-
"onUpdate:modelValue": i[5] || (i[5] = (a) =>
|
|
310
|
+
modelValue: c.value,
|
|
311
|
+
"onUpdate:modelValue": i[5] || (i[5] = (a) => c.value = a),
|
|
312
312
|
options: t.quickFilters,
|
|
313
313
|
variant: t.quickFilterVariant,
|
|
314
314
|
onChange: H
|
|
315
315
|
}, null, 8, ["modelValue", "options", "variant"])
|
|
316
|
-
], 2)) :
|
|
316
|
+
], 2)) : u("", !0),
|
|
317
317
|
I("div", {
|
|
318
318
|
class: q(["flex-1 w-full relative", t.containerClass])
|
|
319
319
|
}, [
|
|
320
|
-
!_.value && !t.loading ? (o(),
|
|
321
|
-
e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (o(),
|
|
320
|
+
!_.value && !t.loading ? (o(), f(M, { key: 0 }, [
|
|
321
|
+
e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (o(), h(Ee, {
|
|
322
322
|
key: 1,
|
|
323
323
|
"empty-title": t.emptyTitle,
|
|
324
324
|
"empty-title-i18n": t.emptyTitleI18n,
|
|
@@ -330,29 +330,29 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
330
330
|
"add-component": t.addComponent,
|
|
331
331
|
"add-btn": t.addBtn
|
|
332
332
|
}, null, 8, ["empty-title", "empty-title-i18n", "empty-description", "empty-description-i18n", "empty-icon", "is-filtered", "can-add", "add-component", "add-btn"]))
|
|
333
|
-
], 64)) : (o(),
|
|
334
|
-
D(
|
|
333
|
+
], 64)) : (o(), f(M, { key: 1 }, [
|
|
334
|
+
D(g) === "table" && e.$slots.table ? d(e.$slots, "table", {
|
|
335
335
|
key: 0,
|
|
336
336
|
data: t.data,
|
|
337
337
|
loading: t.loading,
|
|
338
338
|
selectedRows: r.value,
|
|
339
339
|
delete: b,
|
|
340
340
|
updateSelectedRows: (a) => r.value = a
|
|
341
|
-
}) : D(
|
|
341
|
+
}) : D(g) === "list" && e.$slots.list ? d(e.$slots, "list", {
|
|
342
342
|
key: 1,
|
|
343
343
|
data: t.data,
|
|
344
344
|
loading: t.loading,
|
|
345
345
|
selectedRows: r.value,
|
|
346
346
|
delete: b,
|
|
347
347
|
updateSelectedRows: (a) => r.value = a
|
|
348
|
-
}) : D(
|
|
348
|
+
}) : D(g) === "list" && e.$slots.grid ? d(e.$slots, "grid", {
|
|
349
349
|
key: 2,
|
|
350
350
|
data: t.data,
|
|
351
351
|
loading: t.loading,
|
|
352
352
|
selectedRows: r.value,
|
|
353
353
|
delete: b,
|
|
354
354
|
updateSelectedRows: (a) => r.value = a
|
|
355
|
-
}) : U.value ? (o(),
|
|
355
|
+
}) : U.value ? (o(), h(xe(U.value), A({
|
|
356
356
|
key: 3,
|
|
357
357
|
data: t.data,
|
|
358
358
|
loading: t.loading,
|
|
@@ -361,10 +361,10 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
361
361
|
"onUpdate:selectedRows": i[6] || (i[6] = (a) => r.value = a),
|
|
362
362
|
delete: b,
|
|
363
363
|
onDelete: J
|
|
364
|
-
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(),
|
|
364
|
+
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(), f("div", Le, Ce(re.value), 1))
|
|
365
365
|
], 64))
|
|
366
366
|
], 2),
|
|
367
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(),
|
|
367
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(), f("div", ze, [
|
|
368
368
|
w(D(Se), A({
|
|
369
369
|
"current-page": t.pageInfo.currentPage,
|
|
370
370
|
"total-pages": t.pageInfo.totalPages,
|
|
@@ -373,7 +373,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
373
373
|
onChange: W,
|
|
374
374
|
"onUpdate:itemsPerPage": Z
|
|
375
375
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
376
|
-
])) :
|
|
376
|
+
])) : u("", !0),
|
|
377
377
|
w(Pe, {
|
|
378
378
|
show: C.value,
|
|
379
379
|
"onUpdate:show": i[7] || (i[7] = (a) => C.value = a),
|
|
@@ -385,7 +385,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
385
385
|
onConfirm: G,
|
|
386
386
|
onCancel: i[8] || (i[8] = (a) => C.value = !1)
|
|
387
387
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
388
|
-
$.value ? (o(),
|
|
388
|
+
$.value ? (o(), h(je, {
|
|
389
389
|
key: 4,
|
|
390
390
|
show: $.value,
|
|
391
391
|
"onUpdate:show": i[9] || (i[9] = (a) => $.value = a),
|
|
@@ -394,8 +394,8 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
394
394
|
mode: pe.value,
|
|
395
395
|
"export-props": t.exportProps,
|
|
396
396
|
"on-export": he
|
|
397
|
-
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) :
|
|
398
|
-
N.value ? (o(),
|
|
397
|
+
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) : u("", !0),
|
|
398
|
+
N.value ? (o(), f("div", He, [
|
|
399
399
|
w(Ie, A({
|
|
400
400
|
show: T.value,
|
|
401
401
|
"onUpdate:show": i[10] || (i[10] = (a) => T.value = a),
|
|
@@ -408,7 +408,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
408
408
|
title: se.value,
|
|
409
409
|
class: "hidden!"
|
|
410
410
|
}), null, 16, ["show", "fields", "title"])
|
|
411
|
-
])) :
|
|
411
|
+
])) : u("", !0)
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
414
|
});
|
|
@@ -15,13 +15,14 @@ import "@vueuse/core";
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
import "iconify-icon-picker";
|
|
17
17
|
import "iconify-icon-picker/style.css";
|
|
18
|
+
import "vue-draggable-plus";
|
|
18
19
|
/* empty css */
|
|
19
20
|
/* empty css */
|
|
20
21
|
import "../../core/config.js";
|
|
21
22
|
const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, E = { style: { "will-change": "transform", contain: "layout style" } }, I = {
|
|
22
23
|
class: "py-4 px-3.5 min-w-[290px]",
|
|
23
24
|
style: { "will-change": "transform", contain: "layout style" }
|
|
24
|
-
},
|
|
25
|
+
}, se = /* @__PURE__ */ B({
|
|
25
26
|
__name: "ScreenFilter",
|
|
26
27
|
props: {
|
|
27
28
|
schema: {},
|
|
@@ -180,5 +181,5 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
export {
|
|
183
|
-
|
|
184
|
+
se as default
|
|
184
185
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, computed as m, markRaw as k, resolveComponent as C, openBlock as n, createBlock as a, unref as h, withCtx as d, createElementBlock as o, Fragment as u, resolveDynamicComponent as w, mergeProps as i, createVNode as f, createTextVNode as s, toDisplayString as y, createCommentVNode as l } from "vue";
|
|
2
2
|
import x from "../../Empty/Empty.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import B from "../../Button.vue.js";
|
|
4
4
|
import A from "../../Modal.vue.js";
|
|
5
5
|
import { $t as I } from "../../../utils/i18n.js";
|
|
6
|
-
const D = ["href", "target"], $ = /* @__PURE__ */
|
|
6
|
+
const D = ["href", "target"], $ = /* @__PURE__ */ p({
|
|
7
7
|
__name: "ScreenEmptyState",
|
|
8
8
|
props: {
|
|
9
9
|
emptyTitle: {},
|
|
@@ -28,8 +28,9 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
28
28
|
return r !== "vlite.screen.addNew" ? r : "Add New";
|
|
29
29
|
});
|
|
30
30
|
return (r, N) => {
|
|
31
|
-
const g =
|
|
31
|
+
const g = C("router-link");
|
|
32
32
|
return n(), a(h(x), {
|
|
33
|
+
class: "py-0.5!",
|
|
33
34
|
title: e.emptyTitle,
|
|
34
35
|
titleI18n: e.emptyTitleI18n,
|
|
35
36
|
description: e.emptyDescription,
|
|
@@ -45,14 +46,14 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
45
46
|
body: b.value
|
|
46
47
|
}, e.addBtn.modalProps), {
|
|
47
48
|
trigger: d(() => [
|
|
48
|
-
f(
|
|
49
|
+
f(B, i({
|
|
49
50
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
50
51
|
variant: "secondary",
|
|
51
52
|
rounded: "full",
|
|
52
53
|
class: "px-6!"
|
|
53
54
|
}, e.addBtn.buttonProps), {
|
|
54
55
|
default: d(() => [
|
|
55
|
-
y(
|
|
56
|
+
s(y(c.value), 1)
|
|
56
57
|
]),
|
|
57
58
|
_: 1
|
|
58
59
|
}, 16, ["icon"])
|
|
@@ -64,12 +65,12 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
64
65
|
class: "inline-flex"
|
|
65
66
|
}, {
|
|
66
67
|
default: d(() => [
|
|
67
|
-
f(
|
|
68
|
+
f(B, i({
|
|
68
69
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
69
70
|
variant: "secondary"
|
|
70
71
|
}, e.addBtn.buttonProps), {
|
|
71
72
|
default: d(() => [
|
|
72
|
-
y(
|
|
73
|
+
s(y(c.value), 1)
|
|
73
74
|
]),
|
|
74
75
|
_: 1
|
|
75
76
|
}, 16, ["icon"])
|
|
@@ -81,12 +82,12 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
81
82
|
target: e.addBtn.target,
|
|
82
83
|
class: "inline-flex"
|
|
83
84
|
}, [
|
|
84
|
-
f(
|
|
85
|
+
f(B, i({
|
|
85
86
|
icon: e.addBtn.icon || "lucide:plus",
|
|
86
87
|
variant: "secondary"
|
|
87
88
|
}, e.addBtn.buttonProps), {
|
|
88
89
|
default: d(() => [
|
|
89
|
-
y(
|
|
90
|
+
s(y(c.value), 1)
|
|
90
91
|
]),
|
|
91
92
|
_: 1
|
|
92
93
|
}, 16, ["icon"])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, computed as s, openBlock as r, createElementBlock as u, createVNode as m, unref as d } from "vue";
|
|
2
2
|
import b from "../../Tabes/Tabes.vue.js";
|
|
3
|
-
const p = { class: "w-max" },
|
|
3
|
+
const p = { class: "w-max" }, g = /* @__PURE__ */ i({
|
|
4
4
|
__name: "ScreenQuickFilters",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
@@ -22,7 +22,7 @@ const p = { class: "w-max" }, V = /* @__PURE__ */ i({
|
|
|
22
22
|
};
|
|
23
23
|
return (e, v) => (r(), u("div", p, [
|
|
24
24
|
m(d(b), {
|
|
25
|
-
class: "border-b-0! border-0! pb-0",
|
|
25
|
+
class: "border-b-0! border-0! pb-0 gap-3.5!",
|
|
26
26
|
"model-value": a.modelValue,
|
|
27
27
|
options: t.value,
|
|
28
28
|
variant: a.variant || "line",
|
|
@@ -32,5 +32,5 @@ const p = { class: "w-max" }, V = /* @__PURE__ */ i({
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
g as default
|
|
36
36
|
};
|