vlite3 0.4.4 → 0.4.7
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/Accordion/AccordionItem.vue.js +33 -32
- package/components/Accordion/types.d.ts +2 -0
- package/components/Alert.vue.d.ts +2 -0
- package/components/Alert.vue.js +38 -36
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +25 -24
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +37 -35
- package/components/CheckBox.vue.d.ts +1 -0
- package/components/CheckBox.vue.js +40 -40
- package/components/Chip/Chip.vue.js +55 -55
- package/components/Chip/types.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +5 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +61 -58
- package/components/ColorPicker/ColorPicker.vue.js +3 -2
- package/components/ConfirmationModal.vue.d.ts +4 -2
- package/components/ConfirmationModal.vue.js +48 -33
- package/components/DataList/DataList.vue.d.ts +0 -2
- package/components/DataList/DataList.vue.js +39 -35
- package/components/DataList/types.d.ts +2 -0
- package/components/DataTable/DataTable.vue.d.ts +0 -5
- package/components/DataTable/DataTable.vue.js +177 -158
- package/components/DataTable/DataTableHeader.vue.js +15 -14
- package/components/DataTable/DataTableToolbar.vue.d.ts +1 -1
- package/components/DataTable/DataTableToolbar.vue.js +30 -23
- package/components/DataTable/types.d.ts +4 -0
- package/components/DatePicker.vue.d.ts +1 -0
- package/components/DatePicker.vue.js +32 -25
- package/components/Dropdown/DropdownBooleanItem.vue.js +18 -17
- package/components/Dropdown/DropdownGroupedLayout.vue.js +28 -27
- package/components/Dropdown/DropdownItem.vue.js +24 -23
- package/components/Dropdown/DropdownMenu.vue.js +100 -91
- package/components/Dropdown/composables/useDropdownNavigation.js +24 -23
- package/components/Dropdown/composables/useDropdownSelection.js +19 -17
- package/components/Empty/Empty.vue.d.ts +2 -2
- package/components/Empty/Empty.vue.js +32 -18
- package/components/FilePicker/FilePicker.vue.d.ts +3 -1
- package/components/FilePicker/FilePicker.vue.js +140 -127
- package/components/FileTree/FileTree.vue.js +68 -58
- package/components/FileTree/FileTreeNode.vue.js +35 -34
- package/components/FileTree/types.d.ts +3 -0
- package/components/Form/CustomFields.vue.d.ts +3 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +92 -80
- package/components/Form/Form.vue.d.ts +1 -1
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +60 -59
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +58 -57
- package/components/Form/composables/useForm.js +91 -88
- package/components/Form/types.d.ts +4 -0
- package/components/Form/utils/form.utils.js +104 -98
- package/components/GoogleLogin.vue.d.ts +1 -1
- package/components/GoogleLogin.vue.js +39 -32
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/IconPicker.vue.d.ts +2 -0
- package/components/IconPicker.vue.js +37 -29
- package/components/Input.vue.d.ts +1 -1
- package/components/Input.vue.js +96 -98
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +55 -54
- package/components/Kanban/types.d.ts +1 -0
- package/components/Masonry/Masonry.vue2.js +3 -2
- package/components/Modal.vue.d.ts +2 -0
- package/components/Modal.vue.js +62 -57
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +61 -54
- package/components/Navbar/Navbar.vue.js +46 -46
- package/components/Pagination/Pagination.vue.js +116 -97
- package/components/PricingPlan/PricingPlanItem.vue.js +60 -47
- package/components/PricingPlan/types.d.ts +5 -0
- package/components/Screen/Screen.vue.d.ts +0 -4
- package/components/Screen/Screen.vue.js +231 -189
- package/components/Screen/ScreenFilter.vue.js +73 -63
- package/components/Screen/types.d.ts +5 -0
- package/components/SidePanel.vue.d.ts +2 -0
- package/components/SidePanel.vue.js +140 -5
- package/components/SidePanel.vue2.js +2 -135
- package/components/SidebarMenu/SidebarMenuItem.vue.js +131 -130
- package/components/SidebarMenu/types.d.ts +1 -0
- package/components/Slider.vue.d.ts +1 -0
- package/components/Slider.vue.js +71 -69
- package/components/Switch.vue.d.ts +1 -0
- package/components/Switch.vue.js +23 -18
- package/components/Tabes/Tabes.vue.js +20 -19
- package/components/Tabes/types.d.ts +1 -0
- package/components/Textarea.vue.d.ts +1 -0
- package/components/Textarea.vue.js +18 -16
- package/components/ThemeToggle.vue.js +24 -14
- package/components/Timeline.vue.js +68 -82
- package/components/ToastNotification.vue.js +2 -2
- package/components/Tooltip.vue.d.ts +4 -3
- package/components/Tooltip.vue.js +17 -15
- package/components/Workbook/Sheet.vue.js +80 -71
- package/components/Workbook/WorkbookAddButton.vue.js +14 -10
- package/components/Workbook/types.d.ts +1 -0
- package/core/config.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +28 -26
- package/package.json +1 -1
- package/style.css +1 -2
- package/types/button.d.ts +1 -0
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +2 -0
- package/types/styles.d.ts +3 -0
- package/types/timeline.type.d.ts +2 -0
- package/utils/i18n.d.ts +8 -0
- package/utils/i18n.js +5 -0
- package/utils/index.d.ts +1 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as q, computed as c, resolveComponent as z, openBlock as s, createElementBlock as d, createElementVNode as r, normalizeClass as y, normalizeStyle as f, withModifiers as M, createVNode as
|
|
1
|
+
import { defineComponent as q, computed as c, resolveComponent as z, openBlock as s, createElementBlock as d, createElementVNode as r, normalizeClass as y, normalizeStyle as f, withModifiers as M, createVNode as N, createCommentVNode as k, createBlock as u, Fragment as v, renderList as p, toDisplayString as w } from "vue";
|
|
2
2
|
import g from "../Icon.vue.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import V from "../CheckBox.vue.js";
|
|
4
|
+
import { $t as D } from "../../utils/i18n.js";
|
|
5
|
+
const O = { class: "flex flex-col select-none" }, j = ["title"], U = {
|
|
5
6
|
key: 1,
|
|
6
7
|
class: "w-6 mr-1"
|
|
7
|
-
},
|
|
8
|
+
}, A = { class: "mr-2 text-muted-foreground shrink-0" }, G = { class: "flex-1 truncate text-sm font-medium" }, H = { class: "mr-2 text-gray-400 select-none shrink-0" }, J = { class: "truncate" }, R = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "relative flex flex-col"
|
|
10
|
-
},
|
|
11
|
+
}, _ = /* @__PURE__ */ q({
|
|
11
12
|
name: "FileTreeNode",
|
|
12
13
|
__name: "FileTreeNode",
|
|
13
14
|
props: {
|
|
@@ -23,11 +24,11 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
23
24
|
searchQuery: {}
|
|
24
25
|
},
|
|
25
26
|
emits: ["toggle-expand", "toggle-select", "click-node"],
|
|
26
|
-
setup(e, { emit:
|
|
27
|
-
const n = e, m =
|
|
27
|
+
setup(e, { emit: S }) {
|
|
28
|
+
const n = e, m = S, b = c(() => n.selectedKeys.has(n.node.id)), F = c(() => n.indeterminateKeys.has(n.node.id)), x = c(() => n.expandedKeys.has(n.node.id)), C = c(() => n.loadingKeys.has(n.node.id)), h = c(
|
|
28
29
|
() => n.node.isFolder || n.node.children && n.node.children.length > 0
|
|
29
|
-
),
|
|
30
|
-
const t =
|
|
30
|
+
), T = c(() => n.depth * 20 + "px"), K = c(() => n.node.labelI18n ? D(n.node.labelI18n) : n.node.label), $ = c(() => {
|
|
31
|
+
const t = K.value, l = 35;
|
|
31
32
|
if (t.length <= l) return t;
|
|
32
33
|
const o = t.lastIndexOf(".");
|
|
33
34
|
if (o === -1 || t.length - o > 10)
|
|
@@ -35,7 +36,7 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
35
36
|
const i = t.substring(o), a = t.substring(0, o), Q = Math.max(0, l - i.length - 3);
|
|
36
37
|
return a.substring(0, Q) + "..." + i;
|
|
37
38
|
}), B = c(() => {
|
|
38
|
-
const t =
|
|
39
|
+
const t = $.value;
|
|
39
40
|
if (!n.highlightSearch || !n.searchQuery)
|
|
40
41
|
return [{ text: t, highlight: !1 }];
|
|
41
42
|
const l = n.searchQuery.toLowerCase(), o = t.toLowerCase().indexOf(l);
|
|
@@ -56,16 +57,16 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
56
57
|
{ text: l.substring(o, o + i), highlight: !0 },
|
|
57
58
|
{ text: l.substring(o + i), highlight: !1 }
|
|
58
59
|
];
|
|
59
|
-
}),
|
|
60
|
+
}), L = (t) => {
|
|
60
61
|
t && t.stopPropagation(), m("toggle-expand", n.node);
|
|
61
|
-
},
|
|
62
|
+
}, I = () => {
|
|
62
63
|
m("toggle-select", n.node);
|
|
63
64
|
}, P = (t) => {
|
|
64
|
-
t.stopPropagation(), h.value ?
|
|
65
|
+
t.stopPropagation(), h.value ? L() : n.selectionMode !== "none" && m("toggle-select", n.node), m("click-node", n.node);
|
|
65
66
|
};
|
|
66
67
|
return (t, l) => {
|
|
67
68
|
const o = z("FileTreeNode", !0);
|
|
68
|
-
return s(), d("div",
|
|
69
|
+
return s(), d("div", O, [
|
|
69
70
|
r("div", {
|
|
70
71
|
class: y(["group flex flex-col rounded-md transition-colors cursor-pointer", {
|
|
71
72
|
"bg-accent/50 text-accent-foreground": b.value && e.selectionMode === "single" && !e.showCheckboxes,
|
|
@@ -73,39 +74,39 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
73
74
|
"opacity-50 pointer-events-none": e.node.disabled
|
|
74
75
|
}]),
|
|
75
76
|
onClick: P,
|
|
76
|
-
title:
|
|
77
|
+
title: K.value
|
|
77
78
|
}, [
|
|
78
79
|
r("div", {
|
|
79
80
|
class: "flex items-center py-1 pr-2 min-h-[32px]",
|
|
80
|
-
style: f({ paddingLeft:
|
|
81
|
+
style: f({ paddingLeft: T.value })
|
|
81
82
|
}, [
|
|
82
83
|
h.value ? (s(), d("button", {
|
|
83
84
|
key: 0,
|
|
84
85
|
type: "button",
|
|
85
86
|
class: y(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": x.value }]),
|
|
86
|
-
onClick: M(
|
|
87
|
+
onClick: M(L, ["stop"])
|
|
87
88
|
}, [
|
|
88
|
-
|
|
89
|
+
N(g, {
|
|
89
90
|
icon: "lucide:chevron-right",
|
|
90
91
|
class: "w-4 h-4"
|
|
91
92
|
})
|
|
92
|
-
], 2)) : (s(), d("div",
|
|
93
|
+
], 2)) : (s(), d("div", U)),
|
|
93
94
|
e.showCheckboxes && e.selectionMode !== "none" ? (s(), d("div", {
|
|
94
95
|
key: 2,
|
|
95
96
|
class: "mr-2 flex items-center justify-center bg-transparent",
|
|
96
97
|
onClick: l[0] || (l[0] = M(() => {
|
|
97
98
|
}, ["stop"]))
|
|
98
99
|
}, [
|
|
99
|
-
|
|
100
|
+
N(V, {
|
|
100
101
|
checked: b.value,
|
|
101
|
-
indeterminate:
|
|
102
|
+
indeterminate: F.value,
|
|
102
103
|
disabled: e.node.disabled,
|
|
103
|
-
"onUpdate:checked":
|
|
104
|
+
"onUpdate:checked": I,
|
|
104
105
|
rounded: "sm",
|
|
105
106
|
size: "sm"
|
|
106
107
|
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
107
108
|
])) : k("", !0),
|
|
108
|
-
r("div",
|
|
109
|
+
r("div", A, [
|
|
109
110
|
C.value ? (s(), u(g, {
|
|
110
111
|
key: 0,
|
|
111
112
|
icon: "lucide:loader-2",
|
|
@@ -124,13 +125,13 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
124
125
|
class: "w-4 h-4"
|
|
125
126
|
}))
|
|
126
127
|
]),
|
|
127
|
-
r("div",
|
|
128
|
-
(s(!0), d(v, null,
|
|
128
|
+
r("div", G, [
|
|
129
|
+
(s(!0), d(v, null, p(B.value, (i, a) => (s(), d("span", {
|
|
129
130
|
key: a,
|
|
130
131
|
class: y({
|
|
131
132
|
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
|
|
132
133
|
})
|
|
133
|
-
},
|
|
134
|
+
}, w(i.text), 3))), 128))
|
|
134
135
|
])
|
|
135
136
|
], 4),
|
|
136
137
|
e.node.searchMatch ? (s(), d("div", {
|
|
@@ -138,23 +139,23 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
138
139
|
class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
|
|
139
140
|
style: f({ paddingLeft: e.depth * 20 + 28 + "px" })
|
|
140
141
|
}, [
|
|
141
|
-
r("span",
|
|
142
|
-
r("div",
|
|
143
|
-
(s(!0), d(v, null,
|
|
142
|
+
r("span", H, "L" + w(e.node.searchMatch.line_number), 1),
|
|
143
|
+
r("div", J, [
|
|
144
|
+
(s(!0), d(v, null, p(E.value, (i, a) => (s(), d("span", {
|
|
144
145
|
key: a,
|
|
145
146
|
class: y({
|
|
146
147
|
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": i.highlight
|
|
147
148
|
})
|
|
148
|
-
},
|
|
149
|
+
}, w(i.text), 3))), 128))
|
|
149
150
|
])
|
|
150
151
|
], 4)) : k("", !0)
|
|
151
|
-
], 10,
|
|
152
|
-
x.value && h.value && !C.value ? (s(), d("div",
|
|
152
|
+
], 10, j),
|
|
153
|
+
x.value && h.value && !C.value ? (s(), d("div", R, [
|
|
153
154
|
r("div", {
|
|
154
155
|
class: "absolute top-1 bottom-1 border-l border-border",
|
|
155
156
|
style: f({ left: e.depth * 20 + 10 + "px" })
|
|
156
157
|
}, null, 4),
|
|
157
|
-
e.node.children && e.node.children.length > 0 ? (s(!0), d(v, { key: 0 },
|
|
158
|
+
e.node.children && e.node.children.length > 0 ? (s(!0), d(v, { key: 0 }, p(e.node.children, (i) => (s(), u(o, {
|
|
158
159
|
key: i.id,
|
|
159
160
|
node: i,
|
|
160
161
|
depth: e.depth + 1,
|
|
@@ -180,5 +181,5 @@ const V = { class: "flex flex-col select-none" }, D = ["title"], O = {
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
export {
|
|
183
|
-
|
|
184
|
+
_ as default
|
|
184
185
|
};
|
|
@@ -8,6 +8,7 @@ export interface SearchMatch {
|
|
|
8
8
|
export interface FileNode {
|
|
9
9
|
id: string;
|
|
10
10
|
label: string;
|
|
11
|
+
labelI18n?: string;
|
|
11
12
|
isFolder?: boolean;
|
|
12
13
|
children?: FileNode[];
|
|
13
14
|
icon?: string;
|
|
@@ -27,6 +28,8 @@ export interface FileTreeProps {
|
|
|
27
28
|
highlightSearch?: boolean;
|
|
28
29
|
searchQuery?: string;
|
|
29
30
|
class?: string;
|
|
31
|
+
emptyText?: string;
|
|
32
|
+
emptyTextI18n?: string;
|
|
30
33
|
}
|
|
31
34
|
export interface FileTreeEvents {
|
|
32
35
|
(e: 'update:modelValue', keys: string[]): void;
|
|
@@ -11,7 +11,9 @@ interface Props {
|
|
|
11
11
|
minRows?: number;
|
|
12
12
|
maxRows?: number;
|
|
13
13
|
addButtonText?: string;
|
|
14
|
-
|
|
14
|
+
textI18n?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
labelI18n?: string;
|
|
15
17
|
showRowNumbers?: boolean;
|
|
16
18
|
/** All form values for context */
|
|
17
19
|
values?: Record<string, any>;
|
|
@@ -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-2969f70d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as I, computed as u, ref as L, watch as S, openBlock as o, createElementBlock as n, createElementVNode as f, createBlock as G, withCtx as k, createTextVNode as H, toDisplayString as m, createCommentVNode as i, createVNode as v, Fragment as p, renderList as w, normalizeClass as C, TransitionGroup as M } from "vue";
|
|
2
|
+
import q from "./FormField.vue.js";
|
|
3
|
+
import V from "../Button.vue.js";
|
|
4
|
+
import J from "../Label.vue.js";
|
|
5
|
+
import { $t as b } from "../../utils/i18n.js";
|
|
6
|
+
const K = { class: "custom-fields-wrapper" }, O = { class: "flex justify-between items-center mb-2" }, P = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background" }, Q = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "flex border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider"
|
|
8
|
-
},
|
|
9
|
+
}, W = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "w-10 flex-none p-3 text-center border-r border-border"
|
|
11
|
-
},
|
|
12
|
+
}, X = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "w-10 flex-none p-3"
|
|
14
|
-
},
|
|
15
|
+
}, Y = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "w-10 flex-none flex items-center justify-center text-xs text-muted-foreground border-r border-border bg-muted/20"
|
|
17
|
-
},
|
|
18
|
+
}, Z = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "w-10 flex-none flex items-center justify-center border-l border-border bg-muted/20"
|
|
20
|
-
},
|
|
21
|
+
}, ee = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "flex flex-col items-center justify-center py-6 text-center bg-muted/5"
|
|
23
|
-
},
|
|
24
|
+
}, te = { class: "text-sm font-medium text-foreground" }, le = { class: "text-xs text-muted-foreground mt-1" }, de = /* @__PURE__ */ I({
|
|
24
25
|
__name: "CustomFields",
|
|
25
26
|
props: {
|
|
26
27
|
modelValue: { default: () => [] },
|
|
@@ -33,97 +34,108 @@ const L = { class: "custom-fields-wrapper" }, M = { class: "flex justify-between
|
|
|
33
34
|
minRows: { default: 0 },
|
|
34
35
|
maxRows: {},
|
|
35
36
|
addButtonText: { default: "Add Row" },
|
|
37
|
+
textI18n: {},
|
|
36
38
|
label: {},
|
|
39
|
+
labelI18n: {},
|
|
37
40
|
showRowNumbers: { type: Boolean, default: !1 },
|
|
38
41
|
values: {},
|
|
39
42
|
isUpdate: { type: Boolean, default: !1 }
|
|
40
43
|
},
|
|
41
44
|
emits: ["update:modelValue", "change"],
|
|
42
|
-
setup(d, { emit:
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
setup(d, { emit: F }) {
|
|
46
|
+
const t = d, x = F, g = u(() => t.labelI18n ? b(t.labelI18n) : t.label), N = u(() => {
|
|
47
|
+
const e = b("vlite.customFields.emptyTitle");
|
|
48
|
+
return e !== "vlite.customFields.emptyTitle" ? e : "No items added";
|
|
49
|
+
}), B = u(() => {
|
|
50
|
+
const e = b("vlite.customFields.emptyDescription");
|
|
51
|
+
return e !== "vlite.customFields.emptyDescription" ? e : "Add a new item to get started";
|
|
52
|
+
}), s = L([]), y = () => `row_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
53
|
+
S(
|
|
54
|
+
() => t.modelValue,
|
|
46
55
|
(e) => {
|
|
47
|
-
Array.isArray(e) ? s.value = e.map((
|
|
48
|
-
const
|
|
56
|
+
Array.isArray(e) ? s.value = e.map((l, r) => {
|
|
57
|
+
const a = s.value[r];
|
|
49
58
|
return {
|
|
50
|
-
...
|
|
51
|
-
_id:
|
|
59
|
+
...l,
|
|
60
|
+
_id: a?._id || y()
|
|
52
61
|
};
|
|
53
62
|
}) : s.value = [];
|
|
54
63
|
},
|
|
55
64
|
{ immediate: !0, deep: !0 }
|
|
56
65
|
);
|
|
57
|
-
const
|
|
66
|
+
const $ = () => {
|
|
58
67
|
const e = {};
|
|
59
|
-
for (const
|
|
60
|
-
const
|
|
61
|
-
e[
|
|
68
|
+
for (const l of t.schema) {
|
|
69
|
+
const r = typeof l.value == "function" ? l.value() : l.value;
|
|
70
|
+
e[l.name] = r ?? null;
|
|
62
71
|
}
|
|
63
|
-
return { ...e, _id:
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
66
|
-
const e = [...s.value,
|
|
67
|
-
s.value = e,
|
|
68
|
-
},
|
|
69
|
-
if (
|
|
70
|
-
const t = [...s.value];
|
|
71
|
-
t.splice(e, 1), s.value = t, f(t);
|
|
72
|
-
}, $ = (e, t, o) => {
|
|
72
|
+
return { ...e, _id: y() };
|
|
73
|
+
}, T = () => {
|
|
74
|
+
if (t.disabled || t.maxRows && s.value.length >= t.maxRows) return;
|
|
75
|
+
const e = [...s.value, $()];
|
|
76
|
+
s.value = e, h(e);
|
|
77
|
+
}, z = (e) => {
|
|
78
|
+
if (t.disabled || s.value.length <= t.minRows) return;
|
|
73
79
|
const l = [...s.value];
|
|
74
|
-
l
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
l.splice(e, 1), s.value = l, h(l);
|
|
81
|
+
}, A = (e, l, r) => {
|
|
82
|
+
const a = [...s.value];
|
|
83
|
+
a[e] = {
|
|
84
|
+
...a[e],
|
|
85
|
+
[l]: r.value
|
|
86
|
+
}, s.value = a, h(a);
|
|
87
|
+
}, h = (e) => {
|
|
88
|
+
const l = e.map(({ _id: r, ...a }) => a);
|
|
89
|
+
x("update:modelValue", l), x("change", l);
|
|
90
|
+
}, D = (e, l) => s.value[e]?.[l], E = u(() => !(t.disabled || t.maxRows && s.value.length >= t.maxRows)), _ = u(() => t.disabled ? !1 : s.value.length > t.minRows), R = u(() => t.headers && t.headers.length > 0 ? t.headers : t.schema.map((e) => e.labelI18n ? b(e.labelI18n) : e.label || e.name));
|
|
91
|
+
return (e, l) => (o(), n("div", K, [
|
|
92
|
+
f("div", O, [
|
|
93
|
+
g.value ? (o(), G(J, {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: "text-sm font-medium text-foreground"
|
|
96
|
+
}, {
|
|
97
|
+
default: k(() => [
|
|
98
|
+
H(m(g.value), 1)
|
|
87
99
|
]),
|
|
88
100
|
_: 1
|
|
89
|
-
}),
|
|
90
|
-
|
|
101
|
+
})) : i("", !0),
|
|
102
|
+
v(V, {
|
|
91
103
|
type: "button",
|
|
92
104
|
variant: "outline",
|
|
93
105
|
size: "xs",
|
|
94
106
|
rounded: "full",
|
|
95
107
|
icon: "lucide:plus",
|
|
96
|
-
disabled: !
|
|
97
|
-
onClick:
|
|
108
|
+
disabled: !E.value,
|
|
109
|
+
onClick: T
|
|
98
110
|
}, null, 8, ["disabled"])
|
|
99
111
|
]),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
d.showRowNumbers ? (
|
|
103
|
-
(
|
|
104
|
-
key:
|
|
105
|
-
class:
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
])) :
|
|
109
|
-
|
|
112
|
+
f("div", P, [
|
|
113
|
+
R.value.length > 0 ? (o(), n("div", Q, [
|
|
114
|
+
d.showRowNumbers ? (o(), n("div", W, " # ")) : i("", !0),
|
|
115
|
+
(o(!0), n(p, null, w(R.value, (r, a) => (o(), n("div", {
|
|
116
|
+
key: a,
|
|
117
|
+
class: C(["flex-1 p-3 min-w-0 truncate", { "border-l border-border": a > 0 }])
|
|
118
|
+
}, m(r), 3))), 128)),
|
|
119
|
+
_.value ? (o(), n("div", X)) : i("", !0)
|
|
120
|
+
])) : i("", !0),
|
|
121
|
+
v(M, {
|
|
110
122
|
name: "list",
|
|
111
123
|
tag: "div",
|
|
112
124
|
class: "divide-y divide-border"
|
|
113
125
|
}, {
|
|
114
|
-
default:
|
|
115
|
-
(
|
|
116
|
-
key:
|
|
126
|
+
default: k(() => [
|
|
127
|
+
(o(!0), n(p, null, w(s.value, (r, a) => (o(), n("div", {
|
|
128
|
+
key: r._id,
|
|
117
129
|
class: "flex group bg-white transition-colors"
|
|
118
130
|
}, [
|
|
119
|
-
d.showRowNumbers ? (
|
|
120
|
-
(
|
|
121
|
-
key:
|
|
122
|
-
class:
|
|
131
|
+
d.showRowNumbers ? (o(), n("div", Y, m(a + 1), 1)) : i("", !0),
|
|
132
|
+
(o(!0), n(p, null, w(d.schema, (c, j) => (o(), n("div", {
|
|
133
|
+
key: c.name,
|
|
134
|
+
class: C(["flex-1 min-w-0 relative", { "border-l border-border": j > 0 }])
|
|
123
135
|
}, [
|
|
124
|
-
|
|
125
|
-
field: { ...
|
|
126
|
-
value:
|
|
136
|
+
v(q, {
|
|
137
|
+
field: { ...c, label: void 0 },
|
|
138
|
+
value: D(a, c.name),
|
|
127
139
|
values: d.values || {},
|
|
128
140
|
variant: "transparent",
|
|
129
141
|
size: "sm",
|
|
@@ -131,31 +143,31 @@ const L = { class: "custom-fields-wrapper" }, M = { class: "flex justify-between
|
|
|
131
143
|
disabled: d.disabled,
|
|
132
144
|
isUpdate: d.isUpdate,
|
|
133
145
|
class: "w-full h-full min-h-[40px]",
|
|
134
|
-
onChange: (
|
|
146
|
+
onChange: (U) => A(a, c.name, U)
|
|
135
147
|
}, null, 8, ["field", "value", "values", "disabled", "isUpdate", "onChange"])
|
|
136
148
|
], 2))), 128)),
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
_.value ? (o(), n("div", Z, [
|
|
150
|
+
v(V, {
|
|
139
151
|
type: "button",
|
|
140
152
|
variant: "ghost",
|
|
141
153
|
size: "xs",
|
|
142
154
|
icon: "lucide:trash-2",
|
|
143
155
|
disabled: d.disabled,
|
|
144
|
-
onClick: (
|
|
156
|
+
onClick: (c) => z(a)
|
|
145
157
|
}, null, 8, ["disabled", "onClick"])
|
|
146
|
-
])) :
|
|
158
|
+
])) : i("", !0)
|
|
147
159
|
]))), 128))
|
|
148
160
|
]),
|
|
149
161
|
_: 1
|
|
150
162
|
}),
|
|
151
|
-
s.value.length === 0 ? (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
])
|
|
163
|
+
s.value.length === 0 ? (o(), n("div", ee, [
|
|
164
|
+
f("p", te, m(N.value), 1),
|
|
165
|
+
f("p", le, m(B.value), 1)
|
|
166
|
+
])) : i("", !0)
|
|
155
167
|
])
|
|
156
168
|
]));
|
|
157
169
|
}
|
|
158
170
|
});
|
|
159
171
|
export {
|
|
160
|
-
|
|
172
|
+
de as default
|
|
161
173
|
};
|
|
@@ -77,8 +77,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
77
77
|
class: string;
|
|
78
78
|
size: InputSize;
|
|
79
79
|
variant: InputVariant;
|
|
80
|
-
loading: boolean;
|
|
81
80
|
rounded: InputRounded;
|
|
81
|
+
loading: boolean;
|
|
82
82
|
className: string;
|
|
83
83
|
headerClass: string;
|
|
84
84
|
footerClass: string;
|
|
@@ -24,8 +24,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
size: InputSize;
|
|
26
26
|
variant: InputVariant;
|
|
27
|
-
error: string;
|
|
28
27
|
rounded: InputRounded;
|
|
28
|
+
error: string;
|
|
29
29
|
readonly: boolean;
|
|
30
30
|
isUpdate: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|