vlite3 1.3.3 → 1.3.5
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/Button.vue.js +36 -36
- package/components/DataTable/DataTable.vue.d.ts +1 -1
- package/components/Dropdown/Dropdown.vue.js +17 -16
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +64 -64
- package/components/FileTree/FileTree.vue.d.ts +17 -1
- package/components/FileTree/FileTree.vue.js +1 -1
- package/components/FileTree/FileTree.vue2.js +54 -44
- package/components/FileTree/FileTreeNode.vue.d.ts +22 -2
- package/components/FileTree/FileTreeNode.vue.js +119 -94
- package/components/FileTree/types.d.ts +2 -0
- package/components/Form/Form.vue.d.ts +2 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +258 -229
- package/components/Form/FormField.vue.js +5 -4
- package/components/Form/FormFields.vue.d.ts +18 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +117 -105
- package/components/Form/types.d.ts +2 -0
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/NavbarCommandPalette.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.d.ts +1 -0
- package/components/Pagination/Pagination.vue.js +121 -119
- package/components/Pagination/index.d.ts +1 -0
- package/components/Persona.vue.js +134 -0
- package/components/Persona.vue2.js +4 -0
- package/components/Screen/Screen.vue.d.ts +2 -0
- package/components/Screen/Screen.vue.js +160 -157
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.js +50 -22
- package/components/Stats/Stats.vue3.js +5 -0
- package/components/StatusChip/status-map.js +1 -0
- package/components/Switch.vue.d.ts +3 -0
- package/components/Switch.vue.js +13 -9
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Timeline/TimelineItem.vue.js +74 -91
- package/index.d.ts +1 -0
- package/index.js +382 -379
- package/package.json +2 -2
- package/style.css +18 -4
- package/components/Stats/Stats.vue2.js +0 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as E, shallowRef as T, watch as C, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Q, ref as E, shallowRef as T, watch as C, computed as v, openBlock as g, createElementBlock as x, normalizeClass as $, Fragment as q, renderList as V, isMemoSame as z, createBlock as F, createSlots as P, withCtx as A, renderSlot as R, mergeProps as U, toDisplayString as j } from "vue";
|
|
2
|
+
import G from "./FileTreeNode.vue.js";
|
|
3
3
|
import { $t as w } from "../../utils/i18n.js";
|
|
4
|
-
const
|
|
4
|
+
const H = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "text-sm text-muted-foreground p-4 text-center"
|
|
7
|
-
},
|
|
7
|
+
}, Y = /* @__PURE__ */ Q({
|
|
8
8
|
__name: "FileTree",
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: { default: () => [] },
|
|
@@ -17,16 +17,17 @@ const R = {
|
|
|
17
17
|
searchQuery: {},
|
|
18
18
|
class: {},
|
|
19
19
|
emptyText: {},
|
|
20
|
-
emptyTextI18n: {}
|
|
20
|
+
emptyTextI18n: {},
|
|
21
|
+
variant: { default: "default" }
|
|
21
22
|
},
|
|
22
23
|
emits: ["update:modelValue", "select", "expand", "node-click"],
|
|
23
|
-
setup(
|
|
24
|
-
const s =
|
|
24
|
+
setup(o, { emit: L }) {
|
|
25
|
+
const s = o, m = L, u = E(new Set(s.defaultExpandedKeys)), f = E(/* @__PURE__ */ new Set()), y = T(/* @__PURE__ */ new Map()), S = T(/* @__PURE__ */ new Map()), I = (t, l) => {
|
|
25
26
|
const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (n, c) => {
|
|
26
27
|
for (const r of n)
|
|
27
28
|
e.set(r.id, r), c && i.set(r.id, c), r.children && a(r.children, r.id);
|
|
28
29
|
};
|
|
29
|
-
a(t, l),
|
|
30
|
+
a(t, l), y.value = e, S.value = i;
|
|
30
31
|
};
|
|
31
32
|
C(
|
|
32
33
|
() => s.data,
|
|
@@ -35,18 +36,18 @@ const R = {
|
|
|
35
36
|
},
|
|
36
37
|
{ immediate: !0, deep: !0 }
|
|
37
38
|
);
|
|
38
|
-
const
|
|
39
|
+
const k = (t) => {
|
|
39
40
|
let l = [];
|
|
40
41
|
if (t.children)
|
|
41
42
|
for (const e of t.children)
|
|
42
|
-
l.push(e.id), l = l.concat(
|
|
43
|
+
l.push(e.id), l = l.concat(k(e));
|
|
43
44
|
return l;
|
|
44
|
-
},
|
|
45
|
+
}, p = v(() => new Set(s.modelValue)), b = v(() => {
|
|
45
46
|
const t = /* @__PURE__ */ new Set();
|
|
46
47
|
if (s.selectionMode !== "multiple") return t;
|
|
47
48
|
const l = (e) => {
|
|
48
49
|
if (!e.children || e.children.length === 0)
|
|
49
|
-
return
|
|
50
|
+
return p.value.has(e.id) ? { status: "checked" } : { status: "unchecked" };
|
|
50
51
|
let i = !1, a = !1, n = !1;
|
|
51
52
|
for (const c of e.children) {
|
|
52
53
|
const r = l(c);
|
|
@@ -57,14 +58,14 @@ const R = {
|
|
|
57
58
|
return s.data.forEach(l), t;
|
|
58
59
|
}), D = async (t) => {
|
|
59
60
|
if (t.disabled) return;
|
|
60
|
-
if (
|
|
61
|
-
const e = new Set(
|
|
61
|
+
if (u.value.has(t.id)) {
|
|
62
|
+
const e = new Set(u.value);
|
|
62
63
|
e.delete(t.id);
|
|
63
|
-
const i =
|
|
64
|
-
|
|
64
|
+
const i = y.value.get(t.id) || t;
|
|
65
|
+
k(i).forEach((n) => e.delete(n)), u.value = e, m("expand", t, !1);
|
|
65
66
|
} else {
|
|
66
|
-
const e = new Set(
|
|
67
|
-
if (e.add(t.id),
|
|
67
|
+
const e = new Set(u.value);
|
|
68
|
+
if (e.add(t.id), u.value = e, m("expand", t, !0), s.loadData && !t.isLoaded && (!t.children || t.children.length === 0)) {
|
|
68
69
|
const i = new Set(f.value);
|
|
69
70
|
i.add(t.id), f.value = i;
|
|
70
71
|
try {
|
|
@@ -77,27 +78,27 @@ const R = {
|
|
|
77
78
|
}
|
|
78
79
|
}, K = (t) => {
|
|
79
80
|
if (t.disabled) return;
|
|
80
|
-
const l =
|
|
81
|
-
let e = new Set(
|
|
81
|
+
const l = y.value.get(t.id) || t;
|
|
82
|
+
let e = new Set(p.value);
|
|
82
83
|
const i = e.has(t.id);
|
|
83
84
|
if (s.selectionMode === "single")
|
|
84
85
|
e.clear(), i || e.add(t.id);
|
|
85
86
|
else if (s.selectionMode === "multiple") {
|
|
86
|
-
const a =
|
|
87
|
-
|
|
87
|
+
const a = k(l), n = !i, c = (d, h) => {
|
|
88
|
+
h ? e.add(d) : e.delete(d);
|
|
88
89
|
};
|
|
89
90
|
c(t.id, n), a.forEach((d) => c(d, n));
|
|
90
91
|
let r = l;
|
|
91
92
|
for (; ; ) {
|
|
92
93
|
const d = S.value.get(r.id);
|
|
93
94
|
if (!d) break;
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
|
|
95
|
+
const h = y.value.get(d);
|
|
96
|
+
if (!h || !h.children) break;
|
|
97
|
+
h.children.every((N) => e.has(N.id)) ? e.add(h.id) : e.delete(h.id), r = h;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
m("update:modelValue", Array.from(e)), m("select", l, !i);
|
|
100
|
-
}, M =
|
|
101
|
+
}, M = v(() => {
|
|
101
102
|
if (!s.searchQuery) return s.data;
|
|
102
103
|
const t = s.searchQuery.toLowerCase(), l = (e) => {
|
|
103
104
|
const a = (e.labelI18n ? w(e.labelI18n) : e.label).toLowerCase().includes(t), n = !!e.searchMatch;
|
|
@@ -122,45 +123,54 @@ const R = {
|
|
|
122
123
|
return n && e.add(a.id), r || n;
|
|
123
124
|
};
|
|
124
125
|
if (s.data.forEach(i), e.size > 0) {
|
|
125
|
-
const a = new Set(
|
|
126
|
-
e.forEach((n) => a.add(n)),
|
|
126
|
+
const a = new Set(u.value);
|
|
127
|
+
e.forEach((n) => a.add(n)), u.value = a;
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
},
|
|
130
131
|
{ deep: !0 }
|
|
131
132
|
);
|
|
132
|
-
const B =
|
|
133
|
+
const B = v(() => {
|
|
133
134
|
if (s.emptyTextI18n) return w(s.emptyTextI18n);
|
|
134
135
|
if (s.emptyText) return s.emptyText;
|
|
135
136
|
const t = w("vlite.fileTree.emptyText");
|
|
136
137
|
return t !== "vlite.fileTree.emptyText" ? t : "No results found.";
|
|
137
138
|
});
|
|
138
|
-
return (t, l) => (
|
|
139
|
-
class:
|
|
139
|
+
return (t, l) => (g(), x("div", {
|
|
140
|
+
class: $(["w-full h-full overflow-y-auto file-tree-container", s.class])
|
|
140
141
|
}, [
|
|
141
|
-
M.value.length > 0 ? (
|
|
142
|
-
const c = [e,
|
|
143
|
-
if (n && n.key === e.id &&
|
|
144
|
-
const r = (
|
|
142
|
+
M.value.length > 0 ? (g(!0), x(q, { key: 0 }, V(M.value, (e, i, a, n) => {
|
|
143
|
+
const c = [e, p.value, u.value, b.value, f.value, o.highlightSearch, o.searchQuery, o.showCheckboxes, o.variant, !!t.$slots.actions];
|
|
144
|
+
if (n && n.key === e.id && z(n, c)) return n;
|
|
145
|
+
const r = (g(), F(G, {
|
|
145
146
|
key: e.id,
|
|
146
147
|
node: e,
|
|
147
|
-
"selection-mode":
|
|
148
|
-
"selected-keys":
|
|
149
|
-
"expanded-keys":
|
|
148
|
+
"selection-mode": o.selectionMode,
|
|
149
|
+
"selected-keys": p.value,
|
|
150
|
+
"expanded-keys": u.value,
|
|
150
151
|
"indeterminate-keys": b.value,
|
|
151
152
|
"loading-keys": f.value,
|
|
152
|
-
"show-checkboxes":
|
|
153
|
-
"highlight-search":
|
|
154
|
-
"search-query":
|
|
153
|
+
"show-checkboxes": o.showCheckboxes,
|
|
154
|
+
"highlight-search": o.highlightSearch,
|
|
155
|
+
"search-query": o.searchQuery,
|
|
156
|
+
variant: o.variant,
|
|
155
157
|
onToggleExpand: D,
|
|
156
158
|
onToggleSelect: K,
|
|
157
159
|
onClickNode: l[0] || (l[0] = (d) => m("node-click", d))
|
|
158
|
-
},
|
|
160
|
+
}, P({ _: 2 }, [
|
|
161
|
+
t.$slots.actions ? {
|
|
162
|
+
name: "actions",
|
|
163
|
+
fn: A((d) => [
|
|
164
|
+
R(t.$slots, "actions", U({ ref_for: !0 }, d), void 0, !0)
|
|
165
|
+
]),
|
|
166
|
+
key: "0"
|
|
167
|
+
} : void 0
|
|
168
|
+
]), 1032, ["node", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant"]));
|
|
159
169
|
return r.memo = c, r;
|
|
160
|
-
}, l, 1), 128)) : (
|
|
170
|
+
}, l, 1), 128)) : (g(), x("div", H, j(B.value), 1))
|
|
161
171
|
], 2));
|
|
162
172
|
}
|
|
163
173
|
});
|
|
164
174
|
export {
|
|
165
|
-
|
|
175
|
+
Y as default
|
|
166
176
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileNode, FileTreeSelectionMode } from './types';
|
|
1
|
+
import { FileNode, FileTreeSelectionMode, FileTreeVariant } from './types';
|
|
2
2
|
interface Props {
|
|
3
3
|
node: FileNode;
|
|
4
4
|
depth?: number;
|
|
@@ -10,8 +10,21 @@ interface Props {
|
|
|
10
10
|
showCheckboxes?: boolean;
|
|
11
11
|
highlightSearch?: boolean;
|
|
12
12
|
searchQuery?: string;
|
|
13
|
+
variant?: FileTreeVariant;
|
|
13
14
|
}
|
|
14
|
-
declare
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
actions?(_: {
|
|
19
|
+
node: FileNode;
|
|
20
|
+
}): any;
|
|
21
|
+
actions?(_: any): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: HTMLDivElement;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
28
|
"toggle-expand": (node: FileNode) => any;
|
|
16
29
|
"toggle-select": (node: FileNode) => any;
|
|
17
30
|
"click-node": (node: FileNode) => any;
|
|
@@ -20,9 +33,16 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
20
33
|
"onToggle-select"?: (node: FileNode) => any;
|
|
21
34
|
"onClick-node"?: (node: FileNode) => any;
|
|
22
35
|
}>, {
|
|
36
|
+
variant: FileTreeVariant;
|
|
23
37
|
depth: number;
|
|
24
38
|
selectionMode: FileTreeSelectionMode;
|
|
25
39
|
showCheckboxes: boolean;
|
|
26
40
|
highlightSearch: boolean;
|
|
27
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
43
|
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as U, computed as a, resolveComponent as A, openBlock as s, createElementBlock as d, createElementVNode as c, normalizeClass as m, normalizeStyle as y, createCommentVNode as u, withModifiers as C, createVNode as E, createBlock as f, Fragment as K, renderList as M, toDisplayString as L, renderSlot as I, isMemoSame as G, createSlots as H, withCtx as J, mergeProps as R } from "vue";
|
|
2
|
+
import x from "../Icon.vue.js";
|
|
3
|
+
import W from "../CheckBox.vue.js";
|
|
4
|
+
import { $t as X } from "../../utils/i18n.js";
|
|
5
|
+
const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "w-6 mr-1"
|
|
8
|
-
},
|
|
8
|
+
}, _ = { class: "mr-2 text-muted-foreground shrink-0" }, ee = { class: "flex-1 truncate text-sm font-medium" }, te = { class: "mr-2 text-gray-400 select-none shrink-0" }, ne = { class: "truncate" }, le = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "relative flex flex-col"
|
|
11
|
-
},
|
|
11
|
+
}, ae = /* @__PURE__ */ U({
|
|
12
12
|
name: "FileTreeNode",
|
|
13
13
|
__name: "FileTreeNode",
|
|
14
14
|
props: {
|
|
@@ -21,144 +21,160 @@ const H = { class: "flex flex-col select-none" }, J = ["title"], R = {
|
|
|
21
21
|
loadingKeys: {},
|
|
22
22
|
showCheckboxes: { type: Boolean, default: !1 },
|
|
23
23
|
highlightSearch: { type: Boolean, default: !1 },
|
|
24
|
-
searchQuery: {}
|
|
24
|
+
searchQuery: {},
|
|
25
|
+
variant: { default: "default" }
|
|
25
26
|
},
|
|
26
27
|
emits: ["toggle-expand", "toggle-select", "click-node"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const
|
|
29
|
-
() =>
|
|
30
|
-
),
|
|
31
|
-
const t =
|
|
32
|
-
if (t.length <=
|
|
28
|
+
setup(e, { emit: P }) {
|
|
29
|
+
const l = e, v = P, w = a(() => l.selectedKeys.has(l.node.id)), Q = a(() => l.indeterminateKeys.has(l.node.id)), k = a(() => l.expandedKeys.has(l.node.id)), S = a(() => l.loadingKeys.has(l.node.id)), g = a(
|
|
30
|
+
() => l.node.isFolder || l.node.children && l.node.children.length > 0
|
|
31
|
+
), q = a(() => l.depth * 20 + "px"), $ = a(() => l.node.labelI18n ? X(l.node.labelI18n) : l.node.label), z = a(() => {
|
|
32
|
+
const t = $.value, n = 35;
|
|
33
|
+
if (t.length <= n) return t;
|
|
33
34
|
const o = t.lastIndexOf(".");
|
|
34
35
|
if (o === -1 || t.length - o > 10)
|
|
35
|
-
return t.substring(0,
|
|
36
|
-
const i = t.substring(o),
|
|
37
|
-
return
|
|
38
|
-
}),
|
|
39
|
-
const t =
|
|
40
|
-
if (!
|
|
36
|
+
return t.substring(0, n) + "...";
|
|
37
|
+
const i = t.substring(o), h = t.substring(0, o), F = Math.max(0, n - i.length - 3);
|
|
38
|
+
return h.substring(0, F) + "..." + i;
|
|
39
|
+
}), V = a(() => {
|
|
40
|
+
const t = z.value;
|
|
41
|
+
if (!l.highlightSearch || !l.searchQuery)
|
|
41
42
|
return [{ text: t, highlight: !1 }];
|
|
42
|
-
const
|
|
43
|
+
const n = l.searchQuery.toLowerCase(), o = t.toLowerCase().indexOf(n);
|
|
43
44
|
return o === -1 ? [{ text: t, highlight: !1 }] : [
|
|
44
45
|
{ text: t.slice(0, o), highlight: !1 },
|
|
45
46
|
{
|
|
46
|
-
text: t.slice(o, o +
|
|
47
|
+
text: t.slice(o, o + n.length),
|
|
47
48
|
highlight: !0
|
|
48
49
|
},
|
|
49
|
-
{ text: t.slice(o +
|
|
50
|
+
{ text: t.slice(o + n.length), highlight: !1 }
|
|
50
51
|
];
|
|
51
|
-
}),
|
|
52
|
-
const t =
|
|
52
|
+
}), D = a(() => {
|
|
53
|
+
const t = l.node.searchMatch;
|
|
53
54
|
if (!t) return [];
|
|
54
|
-
const
|
|
55
|
-
return o < 0 || o >=
|
|
56
|
-
{ text:
|
|
57
|
-
{ text:
|
|
58
|
-
{ text:
|
|
55
|
+
const n = t.line_content, o = t.match_start, i = t.match_length;
|
|
56
|
+
return o < 0 || o >= n.length ? [{ text: n, highlight: !1 }] : [
|
|
57
|
+
{ text: n.substring(0, o), highlight: !1 },
|
|
58
|
+
{ text: n.substring(o, o + i), highlight: !0 },
|
|
59
|
+
{ text: n.substring(o + i), highlight: !1 }
|
|
59
60
|
];
|
|
60
|
-
}),
|
|
61
|
-
t && t.stopPropagation(),
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
t.stopPropagation(),
|
|
61
|
+
}), N = (t) => {
|
|
62
|
+
t && t.stopPropagation(), v("toggle-expand", l.node);
|
|
63
|
+
}, O = () => {
|
|
64
|
+
v("toggle-select", l.node);
|
|
65
|
+
}, j = (t) => {
|
|
66
|
+
t.stopPropagation(), g.value ? N() : l.selectionMode !== "none" && v("toggle-select", l.node), v("click-node", l.node);
|
|
66
67
|
};
|
|
67
|
-
return (t,
|
|
68
|
-
const o =
|
|
69
|
-
return s(), d("div",
|
|
68
|
+
return (t, n) => {
|
|
69
|
+
const o = A("FileTreeNode", !0);
|
|
70
|
+
return s(), d("div", Y, [
|
|
70
71
|
c("div", {
|
|
71
|
-
class:
|
|
72
|
+
class: m(["group flex flex-col transition-colors cursor-pointer relative", {
|
|
72
73
|
"bg-accent/50 text-accent-foreground": w.value && e.selectionMode === "single" && !e.showCheckboxes,
|
|
73
74
|
"hover:bg-accent/50": !w.value || e.selectionMode !== "single",
|
|
74
|
-
"opacity-50 pointer-events-none": e.node.disabled
|
|
75
|
+
"opacity-50 pointer-events-none": e.node.disabled,
|
|
76
|
+
"rounded-none": e.variant === "bordered",
|
|
77
|
+
"rounded-md": e.variant === "default"
|
|
75
78
|
}]),
|
|
76
|
-
onClick:
|
|
77
|
-
title:
|
|
79
|
+
onClick: j,
|
|
80
|
+
title: $.value
|
|
78
81
|
}, [
|
|
82
|
+
e.variant === "bordered" ? (s(), d("div", {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
|
|
85
|
+
style: y({ left: e.depth * 20 + "px" })
|
|
86
|
+
}, null, 4)) : u("", !0),
|
|
79
87
|
c("div", {
|
|
80
|
-
class: "flex items-center
|
|
81
|
-
style:
|
|
88
|
+
class: m(["flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
|
|
89
|
+
style: y({ paddingLeft: q.value })
|
|
82
90
|
}, [
|
|
83
|
-
|
|
91
|
+
g.value ? (s(), d("button", {
|
|
84
92
|
key: 0,
|
|
85
93
|
type: "button",
|
|
86
|
-
class:
|
|
87
|
-
onClick:
|
|
94
|
+
class: m(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": k.value }]),
|
|
95
|
+
onClick: C(N, ["stop"])
|
|
88
96
|
}, [
|
|
89
|
-
|
|
97
|
+
E(x, {
|
|
90
98
|
icon: "lucide:chevron-right",
|
|
91
99
|
class: "w-4 h-4"
|
|
92
100
|
})
|
|
93
|
-
], 2)) : (s(), d("div",
|
|
101
|
+
], 2)) : (s(), d("div", p)),
|
|
94
102
|
e.showCheckboxes && e.selectionMode !== "none" ? (s(), d("div", {
|
|
95
103
|
key: 2,
|
|
96
104
|
class: "mr-2 flex items-center justify-center bg-transparent",
|
|
97
|
-
onClick:
|
|
105
|
+
onClick: n[0] || (n[0] = C(() => {
|
|
98
106
|
}, ["stop"]))
|
|
99
107
|
}, [
|
|
100
|
-
|
|
108
|
+
E(W, {
|
|
101
109
|
checked: w.value,
|
|
102
|
-
indeterminate:
|
|
110
|
+
indeterminate: Q.value,
|
|
103
111
|
disabled: e.node.disabled,
|
|
104
|
-
"onUpdate:checked":
|
|
112
|
+
"onUpdate:checked": O,
|
|
105
113
|
rounded: "sm",
|
|
106
114
|
size: "sm"
|
|
107
115
|
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
108
|
-
])) :
|
|
109
|
-
c("div",
|
|
110
|
-
|
|
116
|
+
])) : u("", !0),
|
|
117
|
+
c("div", _, [
|
|
118
|
+
S.value ? (s(), f(x, {
|
|
111
119
|
key: 0,
|
|
112
120
|
icon: "lucide:loader-2",
|
|
113
121
|
class: "w-4 h-4 animate-spin"
|
|
114
|
-
})) : e.node.icon ? (s(),
|
|
122
|
+
})) : e.node.icon ? (s(), f(x, {
|
|
115
123
|
key: 1,
|
|
116
124
|
icon: e.node.icon,
|
|
117
125
|
class: "w-4 h-4"
|
|
118
|
-
}, null, 8, ["icon"])) :
|
|
126
|
+
}, null, 8, ["icon"])) : g.value ? (s(), f(x, {
|
|
119
127
|
key: 2,
|
|
120
|
-
icon:
|
|
128
|
+
icon: k.value ? "lucide:folder-open" : "lucide:folder",
|
|
121
129
|
class: "w-4 h-4"
|
|
122
|
-
}, null, 8, ["icon"])) : (s(),
|
|
130
|
+
}, null, 8, ["icon"])) : (s(), f(x, {
|
|
123
131
|
key: 3,
|
|
124
132
|
icon: "lucide:file",
|
|
125
133
|
class: "w-4 h-4"
|
|
126
134
|
}))
|
|
127
135
|
]),
|
|
128
|
-
c("div",
|
|
129
|
-
(s(!0), d(K, null,
|
|
130
|
-
key:
|
|
131
|
-
class:
|
|
136
|
+
c("div", ee, [
|
|
137
|
+
(s(!0), d(K, null, M(V.value, (i, h) => (s(), d("span", {
|
|
138
|
+
key: h,
|
|
139
|
+
class: m({
|
|
132
140
|
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
|
|
133
141
|
})
|
|
134
|
-
},
|
|
135
|
-
])
|
|
136
|
-
|
|
142
|
+
}, L(i.text), 3))), 128))
|
|
143
|
+
]),
|
|
144
|
+
t.$slots.actions ? (s(), d("div", {
|
|
145
|
+
key: 3,
|
|
146
|
+
class: "ml-2 flex items-center shrink-0",
|
|
147
|
+
onClick: n[1] || (n[1] = C(() => {
|
|
148
|
+
}, ["stop"]))
|
|
149
|
+
}, [
|
|
150
|
+
I(t.$slots, "actions", { node: e.node })
|
|
151
|
+
])) : u("", !0)
|
|
152
|
+
], 6),
|
|
137
153
|
e.node.searchMatch ? (s(), d("div", {
|
|
138
|
-
key:
|
|
154
|
+
key: 1,
|
|
139
155
|
class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
|
|
140
|
-
style:
|
|
156
|
+
style: y({ paddingLeft: e.depth * 20 + 28 + "px" })
|
|
141
157
|
}, [
|
|
142
|
-
c("span",
|
|
143
|
-
c("div",
|
|
144
|
-
(s(!0), d(K, null,
|
|
145
|
-
key:
|
|
146
|
-
class:
|
|
158
|
+
c("span", te, "L" + L(e.node.searchMatch.line_number), 1),
|
|
159
|
+
c("div", ne, [
|
|
160
|
+
(s(!0), d(K, null, M(D.value, (i, h) => (s(), d("span", {
|
|
161
|
+
key: h,
|
|
162
|
+
class: m({
|
|
147
163
|
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": i.highlight
|
|
148
164
|
})
|
|
149
|
-
},
|
|
165
|
+
}, L(i.text), 3))), 128))
|
|
150
166
|
])
|
|
151
|
-
], 4)) :
|
|
152
|
-
], 10,
|
|
153
|
-
|
|
167
|
+
], 4)) : u("", !0)
|
|
168
|
+
], 10, Z),
|
|
169
|
+
k.value && g.value && !S.value ? (s(), d("div", le, [
|
|
154
170
|
c("div", {
|
|
155
171
|
class: "absolute top-1 bottom-1 border-l border-border",
|
|
156
|
-
style:
|
|
172
|
+
style: y({ left: e.depth * 20 + 10 + "px" })
|
|
157
173
|
}, null, 4),
|
|
158
|
-
e.node.children && e.node.children.length > 0 ? (s(!0), d(K, { key: 0 },
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
174
|
+
e.node.children && e.node.children.length > 0 ? (s(!0), d(K, { key: 0 }, M(e.node.children, (i, h, F, b) => {
|
|
175
|
+
const T = [i, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, !!t.$slots.actions];
|
|
176
|
+
if (b && b.key === i.id && G(b, T)) return b;
|
|
177
|
+
const B = (s(), f(o, {
|
|
162
178
|
key: i.id,
|
|
163
179
|
node: i,
|
|
164
180
|
depth: e.depth + 1,
|
|
@@ -170,21 +186,30 @@ const H = { class: "flex flex-col select-none" }, J = ["title"], R = {
|
|
|
170
186
|
"show-checkboxes": e.showCheckboxes,
|
|
171
187
|
"highlight-search": e.highlightSearch,
|
|
172
188
|
"search-query": e.searchQuery,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
189
|
+
variant: e.variant,
|
|
190
|
+
onToggleExpand: n[2] || (n[2] = (r) => t.$emit("toggle-expand", r)),
|
|
191
|
+
onToggleSelect: n[3] || (n[3] = (r) => t.$emit("toggle-select", r)),
|
|
192
|
+
onClickNode: n[4] || (n[4] = (r) => t.$emit("click-node", r))
|
|
193
|
+
}, H({ _: 2 }, [
|
|
194
|
+
t.$slots.actions ? {
|
|
195
|
+
name: "actions",
|
|
196
|
+
fn: J((r) => [
|
|
197
|
+
I(t.$slots, "actions", R({ ref_for: !0 }, r))
|
|
198
|
+
]),
|
|
199
|
+
key: "0"
|
|
200
|
+
} : void 0
|
|
201
|
+
]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant"]));
|
|
202
|
+
return B.memo = T, B;
|
|
203
|
+
}, n, 5), 128)) : k.value && g.value && (!e.node.children || e.node.children.length === 0) ? (s(), d("div", {
|
|
179
204
|
key: 1,
|
|
180
205
|
class: "py-0.5 text-xs text-muted-foreground italic",
|
|
181
|
-
style:
|
|
182
|
-
}, null, 4)) :
|
|
183
|
-
])) :
|
|
206
|
+
style: y({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
|
|
207
|
+
}, null, 4)) : u("", !0)
|
|
208
|
+
])) : u("", !0)
|
|
184
209
|
]);
|
|
185
210
|
};
|
|
186
211
|
}
|
|
187
212
|
});
|
|
188
213
|
export {
|
|
189
|
-
|
|
214
|
+
ae as default
|
|
190
215
|
};
|
|
@@ -18,6 +18,7 @@ export interface FileNode {
|
|
|
18
18
|
searchMatch?: SearchMatch;
|
|
19
19
|
}
|
|
20
20
|
export type FileTreeSelectionMode = 'single' | 'multiple' | 'none';
|
|
21
|
+
export type FileTreeVariant = 'default' | 'bordered';
|
|
21
22
|
export interface FileTreeProps {
|
|
22
23
|
modelValue?: string[];
|
|
23
24
|
data?: FileNode[];
|
|
@@ -30,6 +31,7 @@ export interface FileTreeProps {
|
|
|
30
31
|
class?: string;
|
|
31
32
|
emptyText?: string;
|
|
32
33
|
emptyTextI18n?: string;
|
|
34
|
+
variant?: FileTreeVariant;
|
|
33
35
|
}
|
|
34
36
|
export interface FileTreeEvents {
|
|
35
37
|
(e: 'update:modelValue', keys: string[]): void;
|
|
@@ -37,6 +37,7 @@ interface Props {
|
|
|
37
37
|
pageHeaderClass?: string;
|
|
38
38
|
backButtonProps?: ButtonProps;
|
|
39
39
|
backButtonPath?: string;
|
|
40
|
+
layout?: 'vertical' | 'inline';
|
|
40
41
|
}
|
|
41
42
|
declare function __VLS_template(): {
|
|
42
43
|
attrs: Partial<{}>;
|
|
@@ -87,6 +88,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
87
88
|
footer: boolean;
|
|
88
89
|
class: string;
|
|
89
90
|
loading: boolean;
|
|
91
|
+
layout: "vertical" | "inline";
|
|
90
92
|
isUpdate: boolean;
|
|
91
93
|
folderId: string;
|
|
92
94
|
className: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d4325cd1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|