vlite3 1.4.37 → 1.4.40
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/Badge.vue.js +5 -5
- package/components/Badge.vue3.js +5 -0
- package/components/CategoryManager/CategoryManager.vue2.js +5 -4
- package/components/Chip/Chip.vue.js +21 -21
- package/components/Chip/Chip.vue3.js +5 -0
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Comment/CommentItem.vue2.js +3 -2
- package/components/DataTable/DataTable.vue.d.ts +1 -0
- package/components/DataTable/DataTable.vue.js +204 -203
- package/components/DataTable/DataTableRow.vue.js +54 -51
- package/components/DataTable/types.d.ts +5 -0
- package/components/DataTable/useDataTableTree.d.ts +4 -3
- package/components/DataTable/useDataTableTree.js +102 -92
- package/components/FileTree/FileTree.vue.d.ts +3 -1
- package/components/FileTree/FileTree.vue.js +1 -1
- package/components/FileTree/FileTree.vue2.js +157 -116
- package/components/FileTree/FileTreeNode.vue.d.ts +9 -5
- package/components/FileTree/FileTreeNode.vue.js +147 -189
- package/components/Form/{AccordionView.vue2.js → AccordionView.vue.js} +1 -1
- package/components/Form/Form.vue2.js +45 -43
- package/components/Form/index.vue2.js +1 -1
- package/components/ImportData/ImportData.vue.js +4 -2
- package/components/Invoice/InvoiceVariant1.vue.js +3 -2
- package/components/Invoice/InvoiceVariant2.vue.js +3 -2
- package/components/Invoice/InvoiceVariant3.vue.js +3 -2
- package/components/Invoice/InvoiceVariant4.vue.js +3 -2
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PricingPlan/PricingPlanItem.vue.js +10 -9
- package/components/Screen/ScreenFilter.vue.js +20 -19
- package/components/StatusChip/StatusChip.vue.js +8 -7
- package/components/StatusChip/StatusChip.vue3.js +5 -0
- package/components/Timeline/TimelineItem.vue.js +3 -2
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +26 -17
- package/components/TreeConnectors/geometry.d.ts +29 -3
- package/components/TreeConnectors/geometry.js +128 -46
- package/components/TreeConnectors/index.d.ts +1 -1
- package/index.js +473 -470
- package/package.json +1 -1
- package/style.css +15 -1
- package/components/Badge.vue2.js +0 -4
- package/components/Chip/Chip.vue2.js +0 -4
- package/components/StatusChip/StatusChip.vue2.js +0 -4
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,226 +1,184 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as z, computed as d, openBlock as o, createElementBlock as a, createElementVNode as c, normalizeClass as r, normalizeStyle as b, createCommentVNode as f, createVNode as y, unref as P, withModifiers as v, createBlock as m, Fragment as w, renderList as C, toDisplayString as k, renderSlot as A } from "vue";
|
|
2
|
+
import h from "../Icon.vue.js";
|
|
3
|
+
import D from "../CheckBox.vue.js";
|
|
4
|
+
import O from "../TreeConnectors/TreeConnectors.vue.js";
|
|
5
|
+
import { EMPTY_ANCESTOR_LAST_FLAGS as Q } from "../TreeConnectors/geometry.js";
|
|
6
|
+
import { $t as V } from "../../utils/i18n.js";
|
|
7
|
+
const R = { class: "flex flex-col select-none" }, j = ["title"], q = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "relative z-10 w-6 mr-1"
|
|
9
|
-
},
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "relative flex flex-col"
|
|
12
|
-
}, P = 20, ue = /* @__PURE__ */ U({
|
|
10
|
+
}, G = { class: "mr-2 text-muted-foreground shrink-0" }, U = { class: "flex-1 truncate text-sm font-medium" }, Y = { class: "mr-2 text-gray-400 select-none shrink-0" }, H = { class: "truncate" }, x = 20, ee = /* @__PURE__ */ z({
|
|
13
11
|
name: "FileTreeNode",
|
|
14
12
|
__name: "FileTreeNode",
|
|
15
13
|
props: {
|
|
16
14
|
node: {},
|
|
17
15
|
depth: { default: 0 },
|
|
18
16
|
selectionMode: { default: "single" },
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
isSelected: { type: Boolean, default: !1 },
|
|
18
|
+
isIndeterminate: { type: Boolean, default: !1 },
|
|
19
|
+
isExpanded: { type: Boolean, default: !1 },
|
|
20
|
+
isLoading: { type: Boolean, default: !1 },
|
|
23
21
|
showCheckboxes: { type: Boolean, default: !1 },
|
|
24
22
|
highlightSearch: { type: Boolean, default: !1 },
|
|
25
23
|
searchQuery: {},
|
|
26
24
|
variant: { default: "default" },
|
|
27
25
|
maxLabelLength: { default: 35 },
|
|
28
26
|
isLast: { type: Boolean, default: !0 },
|
|
29
|
-
ancestorLastFlags: { default: () =>
|
|
27
|
+
ancestorLastFlags: { default: () => Q }
|
|
30
28
|
},
|
|
31
29
|
emits: ["toggle-expand", "toggle-select", "click-node"],
|
|
32
|
-
setup(e, { emit:
|
|
33
|
-
const
|
|
34
|
-
() => !!(
|
|
35
|
-
),
|
|
36
|
-
|
|
30
|
+
setup(e, { emit: S }) {
|
|
31
|
+
const s = e, u = S, g = d(
|
|
32
|
+
() => !!(s.node.isFolder || s.node.children && s.node.children.length > 0)
|
|
33
|
+
), M = d(() => `${s.depth * x}px`), L = d(
|
|
34
|
+
() => s.node.labelI18n ? V(s.node.labelI18n) : s.node.label
|
|
35
|
+
), E = d(() => {
|
|
36
|
+
const t = L.value, l = s.maxLabelLength;
|
|
37
37
|
if (t.length <= l) return t;
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
38
|
+
const n = t.lastIndexOf(".");
|
|
39
|
+
if (n === -1 || t.length - n > 10)
|
|
40
40
|
return t.substring(0, l) + "...";
|
|
41
|
-
const i = t.substring(
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
44
|
-
const t =
|
|
45
|
-
if (!
|
|
41
|
+
const i = t.substring(n), I = t.substring(0, n), $ = Math.max(0, l - i.length - 3);
|
|
42
|
+
return I.substring(0, $) + "..." + i;
|
|
43
|
+
}), B = d(() => {
|
|
44
|
+
const t = E.value;
|
|
45
|
+
if (!s.highlightSearch || !s.searchQuery)
|
|
46
46
|
return [{ text: t, highlight: !1 }];
|
|
47
|
-
const l =
|
|
48
|
-
return
|
|
49
|
-
{ text: t.slice(0,
|
|
47
|
+
const l = s.searchQuery.toLowerCase(), n = t.toLowerCase().indexOf(l);
|
|
48
|
+
return n === -1 ? [{ text: t, highlight: !1 }] : [
|
|
49
|
+
{ text: t.slice(0, n), highlight: !1 },
|
|
50
50
|
{
|
|
51
|
-
text: t.slice(
|
|
51
|
+
text: t.slice(n, n + l.length),
|
|
52
52
|
highlight: !0
|
|
53
53
|
},
|
|
54
|
-
{ text: t.slice(
|
|
54
|
+
{ text: t.slice(n + l.length), highlight: !1 }
|
|
55
55
|
];
|
|
56
|
-
}),
|
|
57
|
-
const t =
|
|
56
|
+
}), F = d(() => {
|
|
57
|
+
const t = s.node.searchMatch;
|
|
58
58
|
if (!t) return [];
|
|
59
|
-
const l = t.line_content,
|
|
60
|
-
return
|
|
61
|
-
{ text: l.substring(0,
|
|
62
|
-
{ text: l.substring(
|
|
63
|
-
{ text: l.substring(
|
|
59
|
+
const l = t.line_content, n = t.match_start, i = t.match_length;
|
|
60
|
+
return n < 0 || n >= l.length ? [{ text: l, highlight: !1 }] : [
|
|
61
|
+
{ text: l.substring(0, n), highlight: !1 },
|
|
62
|
+
{ text: l.substring(n, n + i), highlight: !0 },
|
|
63
|
+
{ text: l.substring(n + i), highlight: !1 }
|
|
64
64
|
];
|
|
65
|
-
}),
|
|
66
|
-
t && t.stopPropagation(),
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
t.stopPropagation(),
|
|
65
|
+
}), p = (t) => {
|
|
66
|
+
t && t.stopPropagation(), u("toggle-expand", s.node);
|
|
67
|
+
}, N = () => {
|
|
68
|
+
u("toggle-select", s.node);
|
|
69
|
+
}, T = (t) => {
|
|
70
|
+
t.stopPropagation(), g.value ? p() : s.selectionMode !== "none" && u("toggle-select", s.node), u("click-node", s.node);
|
|
71
71
|
};
|
|
72
|
-
return (t, l) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
return (t, l) => (o(), a("div", R, [
|
|
73
|
+
c("div", {
|
|
74
|
+
class: r(["group flex flex-col transition-colors cursor-pointer relative", {
|
|
75
|
+
"bg-accent/50 text-accent-foreground": e.isSelected && e.selectionMode === "single" && !e.showCheckboxes,
|
|
76
|
+
"hover:bg-accent/50": !e.isSelected || e.selectionMode !== "single",
|
|
77
|
+
"opacity-50 pointer-events-none": e.node.disabled,
|
|
78
|
+
"rounded-none": e.variant === "bordered",
|
|
79
|
+
"rounded-md": e.variant === "default"
|
|
80
|
+
}]),
|
|
81
|
+
title: L.value,
|
|
82
|
+
onClick: T
|
|
83
|
+
}, [
|
|
84
|
+
e.variant === "bordered" ? (o(), a("div", {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
|
|
87
|
+
style: b({ left: e.depth * x + "px" })
|
|
88
|
+
}, null, 4)) : f("", !0),
|
|
89
|
+
c("div", {
|
|
90
|
+
class: r(["relative flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
|
|
91
|
+
style: b({ paddingLeft: M.value })
|
|
85
92
|
}, [
|
|
86
|
-
|
|
93
|
+
y(P(O), {
|
|
94
|
+
depth: e.depth,
|
|
95
|
+
"is-last-sibling": e.isLast,
|
|
96
|
+
"ancestor-last-flags": e.ancestorLastFlags,
|
|
97
|
+
"has-toggle": g.value,
|
|
98
|
+
indent: x,
|
|
99
|
+
"line-class": "bg-border"
|
|
100
|
+
}, null, 8, ["depth", "is-last-sibling", "ancestor-last-flags", "has-toggle"]),
|
|
101
|
+
g.value ? (o(), a("button", {
|
|
87
102
|
key: 0,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
g("div", {
|
|
92
|
-
class: m(["relative flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
|
|
93
|
-
style: k({ paddingLeft: D.value })
|
|
103
|
+
type: "button",
|
|
104
|
+
class: r(["relative z-10 p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": e.isExpanded }]),
|
|
105
|
+
onClick: v(p, ["stop"])
|
|
94
106
|
}, [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
y(h, {
|
|
108
|
+
icon: "lucide:chevron-right",
|
|
109
|
+
class: "w-4 h-4"
|
|
110
|
+
})
|
|
111
|
+
], 2)) : (o(), a("div", q)),
|
|
112
|
+
e.showCheckboxes && e.selectionMode !== "none" ? (o(), a("div", {
|
|
113
|
+
key: 2,
|
|
114
|
+
class: "mr-2 flex items-center justify-center bg-transparent",
|
|
115
|
+
onClick: l[0] || (l[0] = v(() => {
|
|
116
|
+
}, ["stop"]))
|
|
117
|
+
}, [
|
|
118
|
+
y(D, {
|
|
119
|
+
checked: e.isSelected,
|
|
120
|
+
indeterminate: e.isIndeterminate,
|
|
121
|
+
disabled: e.node.disabled,
|
|
122
|
+
rounded: "sm",
|
|
123
|
+
size: "sm",
|
|
124
|
+
"onUpdate:checked": N
|
|
125
|
+
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
126
|
+
])) : f("", !0),
|
|
127
|
+
c("div", G, [
|
|
128
|
+
e.isLoading ? (o(), m(h, {
|
|
104
129
|
key: 0,
|
|
105
|
-
|
|
106
|
-
class:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
})
|
|
113
|
-
], 2)) : (a(), o("div", ne)),
|
|
114
|
-
e.showCheckboxes && e.selectionMode !== "none" ? (a(), o("div", {
|
|
130
|
+
icon: "lucide:loader-2",
|
|
131
|
+
class: "w-4 h-4 animate-spin"
|
|
132
|
+
})) : e.node.icon ? (o(), m(h, {
|
|
133
|
+
key: 1,
|
|
134
|
+
icon: e.node.icon,
|
|
135
|
+
class: "w-4 h-4"
|
|
136
|
+
}, null, 8, ["icon"])) : g.value ? (o(), m(h, {
|
|
115
137
|
key: 2,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, [
|
|
120
|
-
w(Z, {
|
|
121
|
-
checked: L.value,
|
|
122
|
-
indeterminate: q.value,
|
|
123
|
-
disabled: e.node.disabled,
|
|
124
|
-
"onUpdate:checked": A,
|
|
125
|
-
rounded: "sm",
|
|
126
|
-
size: "sm"
|
|
127
|
-
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
128
|
-
])) : u("", !0),
|
|
129
|
-
g("div", le, [
|
|
130
|
-
$.value ? (a(), f(y, {
|
|
131
|
-
key: 0,
|
|
132
|
-
icon: "lucide:loader-2",
|
|
133
|
-
class: "w-4 h-4 animate-spin"
|
|
134
|
-
})) : e.node.icon ? (a(), f(y, {
|
|
135
|
-
key: 1,
|
|
136
|
-
icon: e.node.icon,
|
|
137
|
-
class: "w-4 h-4"
|
|
138
|
-
}, null, 8, ["icon"])) : h.value ? (a(), f(y, {
|
|
139
|
-
key: 2,
|
|
140
|
-
icon: v.value ? "lucide:folder-open" : "lucide:folder",
|
|
141
|
-
class: "w-4 h-4"
|
|
142
|
-
}, null, 8, ["icon"])) : (a(), f(y, {
|
|
143
|
-
key: 3,
|
|
144
|
-
icon: "lucide:file",
|
|
145
|
-
class: "w-4 h-4"
|
|
146
|
-
}))
|
|
147
|
-
]),
|
|
148
|
-
g("div", se, [
|
|
149
|
-
(a(!0), o(K, null, M(O.value, (i, r) => (a(), o("span", {
|
|
150
|
-
key: r,
|
|
151
|
-
class: m({
|
|
152
|
-
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
|
|
153
|
-
})
|
|
154
|
-
}, S(i.text), 3))), 128))
|
|
155
|
-
]),
|
|
156
|
-
t.$slots.actions ? (a(), o("div", {
|
|
138
|
+
icon: e.isExpanded ? "lucide:folder-open" : "lucide:folder",
|
|
139
|
+
class: "w-4 h-4"
|
|
140
|
+
}, null, 8, ["icon"])) : (o(), m(h, {
|
|
157
141
|
key: 3,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
142
|
+
icon: "lucide:file",
|
|
143
|
+
class: "w-4 h-4"
|
|
144
|
+
}))
|
|
145
|
+
]),
|
|
146
|
+
c("div", U, [
|
|
147
|
+
(o(!0), a(w, null, C(B.value, (n, i) => (o(), a("span", {
|
|
148
|
+
key: i,
|
|
149
|
+
class: r({
|
|
150
|
+
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": n.highlight
|
|
151
|
+
})
|
|
152
|
+
}, k(n.text), 3))), 128))
|
|
153
|
+
]),
|
|
154
|
+
t.$slots.actions ? (o(), a("div", {
|
|
155
|
+
key: 3,
|
|
156
|
+
class: "ml-2 flex items-center shrink-0",
|
|
157
|
+
onClick: l[1] || (l[1] = v(() => {
|
|
158
|
+
}, ["stop"]))
|
|
169
159
|
}, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
"ancestor-last-flags": F.value,
|
|
191
|
-
"selection-mode": e.selectionMode,
|
|
192
|
-
"selected-keys": e.selectedKeys,
|
|
193
|
-
"expanded-keys": e.expandedKeys,
|
|
194
|
-
"indeterminate-keys": e.indeterminateKeys,
|
|
195
|
-
"loading-keys": e.loadingKeys,
|
|
196
|
-
"show-checkboxes": e.showCheckboxes,
|
|
197
|
-
"highlight-search": e.highlightSearch,
|
|
198
|
-
"search-query": e.searchQuery,
|
|
199
|
-
variant: e.variant,
|
|
200
|
-
"max-label-length": e.maxLabelLength,
|
|
201
|
-
onToggleExpand: l[2] || (l[2] = (c) => t.$emit("toggle-expand", c)),
|
|
202
|
-
onToggleSelect: l[3] || (l[3] = (c) => t.$emit("toggle-select", c)),
|
|
203
|
-
onClickNode: l[4] || (l[4] = (c) => t.$emit("click-node", c))
|
|
204
|
-
}, W({ _: 2 }, [
|
|
205
|
-
t.$slots.actions ? {
|
|
206
|
-
name: "actions",
|
|
207
|
-
fn: X((c) => [
|
|
208
|
-
I(t.$slots, "actions", Y({ ref_for: !0 }, c))
|
|
209
|
-
]),
|
|
210
|
-
key: "0"
|
|
211
|
-
} : void 0
|
|
212
|
-
]), 1032, ["node", "depth", "is-last", "ancestor-last-flags", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
213
|
-
return z.memo = B, z;
|
|
214
|
-
}, l, 5), 128)) : v.value && h.value && (!e.node.children || e.node.children.length === 0) ? (a(), o("div", {
|
|
215
|
-
key: 1,
|
|
216
|
-
class: "py-0.5 text-xs text-muted-foreground italic",
|
|
217
|
-
style: k({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
|
|
218
|
-
}, null, 4)) : u("", !0)
|
|
219
|
-
])) : u("", !0)
|
|
220
|
-
]);
|
|
221
|
-
};
|
|
160
|
+
A(t.$slots, "actions", { node: e.node })
|
|
161
|
+
])) : f("", !0)
|
|
162
|
+
], 6),
|
|
163
|
+
e.node.searchMatch ? (o(), a("div", {
|
|
164
|
+
key: 1,
|
|
165
|
+
class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
|
|
166
|
+
style: b({ paddingLeft: e.depth * x + 28 + "px" })
|
|
167
|
+
}, [
|
|
168
|
+
c("span", Y, "L" + k(e.node.searchMatch.line_number), 1),
|
|
169
|
+
c("div", H, [
|
|
170
|
+
(o(!0), a(w, null, C(F.value, (n, i) => (o(), a("span", {
|
|
171
|
+
key: i,
|
|
172
|
+
class: r({
|
|
173
|
+
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": n.highlight
|
|
174
|
+
})
|
|
175
|
+
}, k(n.text), 3))), 128))
|
|
176
|
+
])
|
|
177
|
+
], 4)) : f("", !0)
|
|
178
|
+
], 10, j)
|
|
179
|
+
]));
|
|
222
180
|
}
|
|
223
181
|
});
|
|
224
182
|
export {
|
|
225
|
-
|
|
183
|
+
ee as default
|
|
226
184
|
};
|