vlite3 0.8.11 → 0.9.2
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/AttachmentsList/AttachmentsList.vue.d.ts +6 -0
- package/components/AttachmentsList/AttachmentsList.vue.js +82 -0
- package/components/AttachmentsList/AttachmentsList.vue2.js +4 -0
- package/components/AttachmentsList/index.d.ts +2 -0
- package/components/AttachmentsList/types.d.ts +11 -0
- package/components/Button.vue.js +6 -6
- package/components/Chat/ChatBubble.vue.d.ts +18 -0
- package/components/Chat/ChatInterface.vue.d.ts +45 -0
- package/components/Chat/index.d.ts +2 -0
- package/components/DataList/DataList.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +22 -22
- package/components/DataTable/types.d.ts +1 -1
- package/components/DatePicker.vue.d.ts +3 -2
- package/components/DatePicker.vue.js +1 -1
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +106 -90
- package/components/Dropdown/DropdownItem.vue.js +8 -8
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -1
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +4 -1
- package/components/FilePicker/FilePicker.vue.js +189 -139
- package/components/FilePreview/FilePreview.vue.d.ts +5 -0
- package/components/FilePreview/FilePreview.vue.js +27 -0
- package/components/FilePreview/FilePreview.vue2.js +4 -0
- package/components/FilePreview/index.d.ts +2 -0
- package/components/FilePreview/types.d.ts +5 -0
- package/components/Form/FormField.vue.js +3 -1
- package/components/Form/composables/useForm.js +50 -47
- package/components/Input.vue.d.ts +1 -0
- package/components/Input.vue.js +18 -15
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +31 -31
- package/components/MultiSelect/MultiSelect.vue.js +92 -84
- package/components/Navbar/Navbar.vue.js +61 -60
- package/components/Screen/Screen.vue.d.ts +200 -7
- package/components/Screen/Screen.vue.js +306 -502
- package/components/Screen/ScreenFilter.vue.js +45 -42
- package/components/Screen/components/ScreenAddAction.vue.d.ts +15 -0
- package/components/Screen/components/ScreenAddAction.vue.js +107 -0
- package/components/Screen/components/ScreenAddAction.vue2.js +4 -0
- package/components/Screen/components/ScreenEmptyState.vue.d.ts +14 -0
- package/components/Screen/components/ScreenEmptyState.vue.js +105 -0
- package/components/Screen/components/ScreenEmptyState.vue2.js +4 -0
- package/components/Screen/components/ScreenExportModal.vue.d.ts +49 -0
- package/components/Screen/components/ScreenExportModal.vue.js +83 -0
- package/components/Screen/components/ScreenExportModal.vue2.js +4 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +28 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.js +57 -0
- package/components/Screen/components/ScreenHeaderTitle.vue2.js +4 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.d.ts +10 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +43 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue2.js +4 -0
- package/components/Screen/components/ScreenQuickFilters.vue.d.ts +15 -0
- package/components/Screen/components/ScreenQuickFilters.vue.js +36 -0
- package/components/Screen/components/ScreenQuickFilters.vue2.js +4 -0
- package/components/Screen/components/ScreenViewToggle.vue.d.ts +9 -0
- package/components/Screen/components/ScreenViewToggle.vue.js +48 -0
- package/components/Screen/components/ScreenViewToggle.vue2.js +4 -0
- package/components/Screen/index.d.ts +1 -0
- package/components/Screen/types.d.ts +41 -2
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +7 -7
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/Stats/Stats.vue.js +50 -49
- package/components/StatusChip/StatusChip.vue.d.ts +2 -2
- package/components/StatusChip/StatusChip.vue.js +15 -14
- package/components/StatusChip/status-map.d.ts +2 -1
- package/components/StatusChip/status-map.js +16 -6
- package/components/Tabes/Tabes.vue.d.ts +1 -1
- package/components/Tabes/Tabes.vue.js +5 -143
- package/components/Tabes/Tabes.vue2.js +144 -2
- package/components/Timeline/TimelineIndicator.vue.js +6 -6
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/core/config.d.ts +8 -0
- package/core/config.js +10 -6
- package/core/index.js +28 -20
- package/index.d.ts +2 -0
- package/index.js +209 -203
- package/package.json +3 -2
- package/style.css +80 -6
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +1 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as P, ref as
|
|
1
|
+
import { defineComponent as P, ref as k, computed as s, watch as M, openBlock as r, createBlock as m, unref as h, withCtx as p, createCommentVNode as f, createElementVNode as g, withKeys as I, withModifiers as y, normalizeClass as c, createElementBlock as v, toDisplayString as S, Fragment as T, renderList as R, createVNode as L, createTextVNode as U } from "vue";
|
|
2
2
|
import C from "../Icon.vue.js";
|
|
3
3
|
import q from "../Dropdown/Dropdown.vue.js";
|
|
4
4
|
import G from "../Dropdown/DropdownMenu.vue.js";
|
|
5
|
-
import { $t as
|
|
6
|
-
import
|
|
5
|
+
import { $t as $ } from "../../utils/i18n.js";
|
|
6
|
+
import N from "../Badge.vue.js";
|
|
7
7
|
import { useMultiSelectHydration as J } from "./composables/useMultiSelectHydration.js";
|
|
8
|
-
const
|
|
8
|
+
const Q = ["tabindex"], W = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-muted-foreground pl-0.5 truncate"
|
|
11
|
-
},
|
|
11
|
+
}, X = { class: "truncate min-w-0" }, Y = ["onClick"], Z = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "flex items-center gap-2 pl-2 shrink-0 text-muted-foreground"
|
|
14
|
-
},
|
|
14
|
+
}, oe = /* @__PURE__ */ P({
|
|
15
15
|
__name: "MultiSelect",
|
|
16
16
|
props: {
|
|
17
17
|
modelValue: { default: () => [] },
|
|
@@ -34,142 +34,150 @@ const K = {
|
|
|
34
34
|
rounded: { default: "md" }
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "change", "load-more", "search"],
|
|
37
|
-
setup(l, { emit:
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
37
|
+
setup(l, { emit: j }) {
|
|
38
|
+
const e = l, i = j, o = k(!1), D = s(() => {
|
|
39
|
+
if (e.placeholderI18n) return $(e.placeholderI18n);
|
|
40
|
+
if (e.placeholder) return e.placeholder;
|
|
41
|
+
const t = $("vlite.multiSelect.placeholder");
|
|
42
|
+
return t !== "vlite.multiSelect.placeholder" ? t : "Select items...";
|
|
43
|
+
}), x = s(() => e.options ? e.options.map((t) => typeof t == "string" || typeof t == "number" ? { label: String(t), value: String(t) } : t) : []), B = k(!1), w = k(!1);
|
|
44
44
|
M(
|
|
45
|
-
|
|
46
|
-
(
|
|
47
|
-
!B.value &&
|
|
48
|
-
|
|
45
|
+
x,
|
|
46
|
+
(t) => {
|
|
47
|
+
!B.value && t.length > 0 && (B.value = !0, setTimeout(() => {
|
|
48
|
+
w.value = !0, d.hydrateSelected(e.modelValue || []);
|
|
49
49
|
}, 10));
|
|
50
50
|
},
|
|
51
51
|
{ immediate: !0 }
|
|
52
52
|
);
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
return d.selectedBuffer.value.forEach((n,
|
|
56
|
-
a.has(
|
|
57
|
-
}),
|
|
53
|
+
const V = s(() => {
|
|
54
|
+
const t = [...x.value], a = new Set(t.map((n) => n.value ?? n.label));
|
|
55
|
+
return d.selectedBuffer.value.forEach((n, u) => {
|
|
56
|
+
a.has(u) || (t.unshift(n), a.add(u));
|
|
57
|
+
}), t;
|
|
58
58
|
}), d = J({
|
|
59
|
-
fetchSelected:
|
|
60
|
-
getValues: () =>
|
|
61
|
-
getOptions: () =>
|
|
62
|
-
isInitialLoadDone: () =>
|
|
59
|
+
fetchSelected: e.fetchSelected,
|
|
60
|
+
getValues: () => e.modelValue || [],
|
|
61
|
+
getOptions: () => V.value,
|
|
62
|
+
isInitialLoadDone: () => w.value
|
|
63
63
|
});
|
|
64
64
|
M(
|
|
65
|
-
() =>
|
|
66
|
-
(
|
|
67
|
-
|
|
65
|
+
() => e.modelValue,
|
|
66
|
+
(t) => {
|
|
67
|
+
w.value && d.hydrateSelected(t || []);
|
|
68
68
|
},
|
|
69
69
|
{ deep: !0 }
|
|
70
70
|
);
|
|
71
|
-
const
|
|
72
|
-
const a =
|
|
73
|
-
return
|
|
74
|
-
})),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
const b = s(() => V.value.filter((t) => {
|
|
72
|
+
const a = t.value ?? t.label;
|
|
73
|
+
return e.modelValue.includes(a);
|
|
74
|
+
})), E = s(() => b.value.slice(0, e.maxVisible)), O = s(() => b.value.length - e.maxVisible), H = (t) => {
|
|
75
|
+
if (e.disabled) return;
|
|
76
|
+
const a = t.value ?? t.label;
|
|
77
|
+
d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a, t);
|
|
78
|
+
const n = [...e.modelValue], u = n.indexOf(a);
|
|
79
|
+
u === -1 ? n.push(a) : n.splice(u, 1), i("update:modelValue", n), i("change", n);
|
|
80
|
+
}, K = (t) => {
|
|
81
|
+
if (e.disabled) return;
|
|
82
|
+
const a = e.modelValue.filter((n) => n !== t);
|
|
81
83
|
i("update:modelValue", a), i("change", a);
|
|
82
84
|
}, A = () => {
|
|
83
|
-
i("update:modelValue", []), i("change", []);
|
|
85
|
+
e.disabled || (i("update:modelValue", []), i("change", []));
|
|
84
86
|
}, F = s(() => {
|
|
85
|
-
const
|
|
87
|
+
const t = e.rounded === "none" ? "rounded-none" : `rounded-${e.rounded}`, a = e.variant === "transparent" ? "px-2 py-0" : "px-3 py-1.5", n = e.variant === "transparent" ? "h-full min-h-[40px]" : "min-h-[40px]";
|
|
86
88
|
return [
|
|
87
|
-
`flex items-center justify-between w-full ${a} ${n} ${
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
`flex items-center justify-between w-full ${a} ${n} ${t} border text-sm transition-colors cursor-pointer outline-none`,
|
|
90
|
+
e.disabled ? "opacity-50 cursor-not-allowed bg-muted" : e.variant === "floating" || e.variant === "transparent" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
|
|
91
|
+
e.variant === "outline" || e.variant === "floating" ? "border-input focus-visible:ring-1 focus-visible:ring-primary" : e.variant === "transparent" ? "border-transparent" : "border-transparent bg-muted",
|
|
92
|
+
o.value && e.variant !== "transparent" ? "border-primary/20 ring-1 ring-primary/20" : ""
|
|
91
93
|
].join(" ");
|
|
92
|
-
}), z = s(() =>
|
|
93
|
-
return (
|
|
94
|
-
isOpen:
|
|
95
|
-
"onUpdate:isOpen": a[
|
|
94
|
+
}), z = s(() => e.size === "sm" ? "xs" : "sm");
|
|
95
|
+
return (t, a) => (r(), m(h(q), {
|
|
96
|
+
isOpen: o.value,
|
|
97
|
+
"onUpdate:isOpen": a[5] || (a[5] = (n) => o.value = n),
|
|
96
98
|
"close-on-select": !1,
|
|
97
99
|
selectable: !0,
|
|
98
100
|
disabled: l.disabled
|
|
99
101
|
}, {
|
|
100
|
-
trigger: p((
|
|
102
|
+
trigger: p(() => [
|
|
101
103
|
g("div", {
|
|
102
|
-
class:
|
|
104
|
+
class: c(F.value),
|
|
105
|
+
tabindex: l.disabled ? -1 : 0,
|
|
106
|
+
onKeydown: [
|
|
107
|
+
a[0] || (a[0] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["enter"])),
|
|
108
|
+
a[1] || (a[1] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["space"]))
|
|
109
|
+
]
|
|
103
110
|
}, [
|
|
104
111
|
g("div", {
|
|
105
|
-
class:
|
|
112
|
+
class: c(["flex gap-1.5 items-center flex-1 min-w-0", [l.wrap ? "flex-wrap py-0.5" : "flex-nowrap overflow-hidden py-1"]])
|
|
106
113
|
}, [
|
|
107
|
-
|
|
108
|
-
(
|
|
109
|
-
key:
|
|
114
|
+
b.value.length === 0 ? (r(), v("span", W, S(D.value), 1)) : (r(), v(T, { key: 1 }, [
|
|
115
|
+
(r(!0), v(T, null, R(E.value, (n) => (r(), m(N, {
|
|
116
|
+
key: n.value,
|
|
110
117
|
variant: l.variant === "transparent" ? "outline" : "secondary",
|
|
111
118
|
size: z.value,
|
|
112
119
|
rounded: l.rounded === "none" ? "sm" : "full",
|
|
113
|
-
class:
|
|
120
|
+
class: c(["gap-1 pr-1 truncate min-w-0 shrink", [
|
|
114
121
|
l.wrap ? "max-w-[150px]" : "",
|
|
115
122
|
l.variant === "transparent" ? "border-transparent bg-muted/50 text-foreground font-medium shadow-none" : ""
|
|
116
123
|
]])
|
|
117
124
|
}, {
|
|
118
125
|
default: p(() => [
|
|
119
|
-
g("span",
|
|
120
|
-
l.disabled ?
|
|
126
|
+
g("span", X, S(n.labelI18n ? h($)(n.labelI18n) : n.label), 1),
|
|
127
|
+
l.disabled ? f("", !0) : (r(), v("button", {
|
|
121
128
|
key: 0,
|
|
122
129
|
type: "button",
|
|
123
|
-
onClick:
|
|
124
|
-
class:
|
|
130
|
+
onClick: y((u) => K(n.value), ["stop"]),
|
|
131
|
+
class: c([
|
|
125
132
|
"rounded transition-colors shrink-0 flex items-center justify-center p-px",
|
|
126
133
|
l.variant === "transparent" ? "text-muted-foreground hover:bg-black/10 hover:text-foreground" : "hover:bg-destructive/10 hover:text-destructive p-0.5 rounded-full"
|
|
127
134
|
])
|
|
128
135
|
}, [
|
|
129
|
-
|
|
136
|
+
L(C, {
|
|
130
137
|
icon: "lucide:x",
|
|
131
138
|
class: "w-3 h-3"
|
|
132
139
|
})
|
|
133
|
-
], 10,
|
|
140
|
+
], 10, Y))
|
|
134
141
|
]),
|
|
135
142
|
_: 2
|
|
136
143
|
}, 1032, ["variant", "size", "rounded", "class"]))), 128)),
|
|
137
|
-
|
|
144
|
+
O.value > 0 ? (r(), m(N, {
|
|
138
145
|
key: 0,
|
|
139
146
|
variant: l.variant === "transparent" ? "outline" : "secondary",
|
|
140
147
|
size: z.value,
|
|
141
148
|
rounded: l.rounded === "none" ? "sm" : "full",
|
|
142
|
-
class:
|
|
149
|
+
class: c([
|
|
143
150
|
"shrink-0",
|
|
144
151
|
l.variant === "transparent" ? "border-transparent bg-muted/50 text-muted-foreground font-medium shadow-none" : ""
|
|
145
152
|
])
|
|
146
153
|
}, {
|
|
147
154
|
default: p(() => [
|
|
148
|
-
U(" +" + S(
|
|
155
|
+
U(" +" + S(O.value), 1)
|
|
149
156
|
]),
|
|
150
157
|
_: 1
|
|
151
|
-
}, 8, ["variant", "size", "rounded", "class"])) :
|
|
158
|
+
}, 8, ["variant", "size", "rounded", "class"])) : f("", !0)
|
|
152
159
|
], 64))
|
|
153
160
|
], 2),
|
|
154
|
-
l.showControls ? (
|
|
155
|
-
|
|
161
|
+
l.showControls ? (r(), v("div", Z, [
|
|
162
|
+
b.value.length > 0 && !l.disabled ? (r(), m(C, {
|
|
156
163
|
key: 0,
|
|
157
164
|
icon: "lucide:x",
|
|
158
165
|
class: "w-4 h-4 hover:text-foreground transition-colors",
|
|
159
|
-
onClick:
|
|
160
|
-
})) :
|
|
161
|
-
a[
|
|
162
|
-
|
|
166
|
+
onClick: y(A, ["stop"])
|
|
167
|
+
})) : f("", !0),
|
|
168
|
+
a[6] || (a[6] = g("div", { class: "w-px h-4 bg-border mx-0.5" }, null, -1)),
|
|
169
|
+
L(C, {
|
|
163
170
|
icon: "lucide:chevron-down",
|
|
164
|
-
class:
|
|
171
|
+
class: c(["w-4 h-4 transition-transform duration-200", { "rotate-180": o.value }])
|
|
165
172
|
}, null, 8, ["class"])
|
|
166
|
-
])) :
|
|
167
|
-
],
|
|
173
|
+
])) : f("", !0)
|
|
174
|
+
], 42, Q)
|
|
168
175
|
]),
|
|
169
176
|
default: p(() => [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
177
|
+
l.disabled ? f("", !0) : (r(), m(h(G), {
|
|
178
|
+
key: 0,
|
|
179
|
+
options: x.value,
|
|
180
|
+
cachedOptions: V.value,
|
|
173
181
|
selected: l.modelValue,
|
|
174
182
|
class: "min-w-[300px]",
|
|
175
183
|
loading: l.loading || h(d).isHydrating.value,
|
|
@@ -178,16 +186,16 @@ const K = {
|
|
|
178
186
|
remote: l.remote,
|
|
179
187
|
debounceTime: l.debounceTime,
|
|
180
188
|
layout: l.layout,
|
|
181
|
-
onSelect:
|
|
182
|
-
onClose: a[
|
|
183
|
-
onLoadMore: a[
|
|
184
|
-
onSearch: a[
|
|
185
|
-
}, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"])
|
|
189
|
+
onSelect: H,
|
|
190
|
+
onClose: a[2] || (a[2] = (n) => o.value = !1),
|
|
191
|
+
onLoadMore: a[3] || (a[3] = (n) => t.$emit("load-more")),
|
|
192
|
+
onSearch: a[4] || (a[4] = (n) => t.$emit("search", n))
|
|
193
|
+
}, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"]))
|
|
186
194
|
]),
|
|
187
195
|
_: 1
|
|
188
196
|
}, 8, ["isOpen", "disabled"]));
|
|
189
197
|
}
|
|
190
198
|
});
|
|
191
199
|
export {
|
|
192
|
-
|
|
200
|
+
oe as default
|
|
193
201
|
};
|