vlite3 1.3.5 → 1.3.6
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/FileTree/FileTree.vue.d.ts +1 -0
- package/components/FileTree/FileTree.vue.js +3 -3
- package/components/FileTree/FileTree.vue2.js +33 -31
- package/components/FileTree/FileTreeNode.vue.d.ts +2 -0
- package/components/FileTree/FileTreeNode.vue.js +72 -70
- package/components/FileTree/types.d.ts +1 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +20 -20
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +8 -8
- package/components/Input.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +1 -1
- package/components/Screen/Screen.vue.d.ts +2 -2
- package/components/Screen/Screen.vue.js +187 -185
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/ThemeToggle.vue.js +2 -2
- package/composables/useTheme.d.ts +1 -1
- package/composables/useTheme.js +15 -15
- package/package.json +1 -1
- package/style.css +12 -3
|
@@ -25,6 +25,7 @@ declare const __VLS_component: import('vue').DefineComponent<FileTreeProps, {},
|
|
|
25
25
|
selectionMode: import('./types').FileTreeSelectionMode;
|
|
26
26
|
showCheckboxes: boolean;
|
|
27
27
|
highlightSearch: boolean;
|
|
28
|
+
maxLabelLength: number;
|
|
28
29
|
defaultExpandedKeys: string[];
|
|
29
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
30
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FileTree.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-62b1cddc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as
|
|
1
|
+
import { defineComponent as Q, ref as L, shallowRef as E, watch as T, computed as v, openBlock as p, createElementBlock as k, 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
2
|
import G from "./FileTreeNode.vue.js";
|
|
3
|
-
import { $t as
|
|
3
|
+
import { $t as x } from "../../utils/i18n.js";
|
|
4
4
|
const H = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "text-sm text-muted-foreground p-4 text-center"
|
|
@@ -18,36 +18,37 @@ const H = {
|
|
|
18
18
|
class: {},
|
|
19
19
|
emptyText: {},
|
|
20
20
|
emptyTextI18n: {},
|
|
21
|
-
variant: { default: "default" }
|
|
21
|
+
variant: { default: "default" },
|
|
22
|
+
maxLabelLength: { default: 35 }
|
|
22
23
|
},
|
|
23
24
|
emits: ["update:modelValue", "select", "expand", "node-click"],
|
|
24
|
-
setup(o, { emit:
|
|
25
|
-
const s = o, m =
|
|
25
|
+
setup(o, { emit: C }) {
|
|
26
|
+
const s = o, m = C, u = L(new Set(s.defaultExpandedKeys)), f = L(/* @__PURE__ */ new Set()), g = E(/* @__PURE__ */ new Map()), b = E(/* @__PURE__ */ new Map()), I = (t, l) => {
|
|
26
27
|
const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (n, c) => {
|
|
27
28
|
for (const r of n)
|
|
28
29
|
e.set(r.id, r), c && i.set(r.id, c), r.children && a(r.children, r.id);
|
|
29
30
|
};
|
|
30
|
-
a(t, l),
|
|
31
|
+
a(t, l), g.value = e, b.value = i;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
T(
|
|
33
34
|
() => s.data,
|
|
34
35
|
(t) => {
|
|
35
36
|
I(t);
|
|
36
37
|
},
|
|
37
38
|
{ immediate: !0, deep: !0 }
|
|
38
39
|
);
|
|
39
|
-
const
|
|
40
|
+
const w = (t) => {
|
|
40
41
|
let l = [];
|
|
41
42
|
if (t.children)
|
|
42
43
|
for (const e of t.children)
|
|
43
|
-
l.push(e.id), l = l.concat(
|
|
44
|
+
l.push(e.id), l = l.concat(w(e));
|
|
44
45
|
return l;
|
|
45
|
-
},
|
|
46
|
+
}, y = v(() => new Set(s.modelValue)), S = v(() => {
|
|
46
47
|
const t = /* @__PURE__ */ new Set();
|
|
47
48
|
if (s.selectionMode !== "multiple") return t;
|
|
48
49
|
const l = (e) => {
|
|
49
50
|
if (!e.children || e.children.length === 0)
|
|
50
|
-
return
|
|
51
|
+
return y.value.has(e.id) ? { status: "checked" } : { status: "unchecked" };
|
|
51
52
|
let i = !1, a = !1, n = !1;
|
|
52
53
|
for (const c of e.children) {
|
|
53
54
|
const r = l(c);
|
|
@@ -61,8 +62,8 @@ const H = {
|
|
|
61
62
|
if (u.value.has(t.id)) {
|
|
62
63
|
const e = new Set(u.value);
|
|
63
64
|
e.delete(t.id);
|
|
64
|
-
const i =
|
|
65
|
-
|
|
65
|
+
const i = g.value.get(t.id) || t;
|
|
66
|
+
w(i).forEach((n) => e.delete(n)), u.value = e, m("expand", t, !1);
|
|
66
67
|
} else {
|
|
67
68
|
const e = new Set(u.value);
|
|
68
69
|
if (e.add(t.id), u.value = e, m("expand", t, !0), s.loadData && !t.isLoaded && (!t.children || t.children.length === 0)) {
|
|
@@ -78,21 +79,21 @@ const H = {
|
|
|
78
79
|
}
|
|
79
80
|
}, K = (t) => {
|
|
80
81
|
if (t.disabled) return;
|
|
81
|
-
const l =
|
|
82
|
-
let e = new Set(
|
|
82
|
+
const l = g.value.get(t.id) || t;
|
|
83
|
+
let e = new Set(y.value);
|
|
83
84
|
const i = e.has(t.id);
|
|
84
85
|
if (s.selectionMode === "single")
|
|
85
86
|
e.clear(), i || e.add(t.id);
|
|
86
87
|
else if (s.selectionMode === "multiple") {
|
|
87
|
-
const a =
|
|
88
|
+
const a = w(l), n = !i, c = (d, h) => {
|
|
88
89
|
h ? e.add(d) : e.delete(d);
|
|
89
90
|
};
|
|
90
91
|
c(t.id, n), a.forEach((d) => c(d, n));
|
|
91
92
|
let r = l;
|
|
92
93
|
for (; ; ) {
|
|
93
|
-
const d =
|
|
94
|
+
const d = b.value.get(r.id);
|
|
94
95
|
if (!d) break;
|
|
95
|
-
const h =
|
|
96
|
+
const h = g.value.get(d);
|
|
96
97
|
if (!h || !h.children) break;
|
|
97
98
|
h.children.every((N) => e.has(N.id)) ? e.add(h.id) : e.delete(h.id), r = h;
|
|
98
99
|
}
|
|
@@ -101,7 +102,7 @@ const H = {
|
|
|
101
102
|
}, M = v(() => {
|
|
102
103
|
if (!s.searchQuery) return s.data;
|
|
103
104
|
const t = s.searchQuery.toLowerCase(), l = (e) => {
|
|
104
|
-
const a = (e.labelI18n ?
|
|
105
|
+
const a = (e.labelI18n ? x(e.labelI18n) : e.label).toLowerCase().includes(t), n = !!e.searchMatch;
|
|
105
106
|
let c = [];
|
|
106
107
|
return e.children && (c = e.children.map(l).filter((r) => r !== null)), a || n || c.length > 0 ? {
|
|
107
108
|
...e,
|
|
@@ -110,7 +111,7 @@ const H = {
|
|
|
110
111
|
};
|
|
111
112
|
return s.data.map(l).filter((e) => e !== null);
|
|
112
113
|
});
|
|
113
|
-
|
|
114
|
+
T(
|
|
114
115
|
() => [s.searchQuery, s.data],
|
|
115
116
|
([t]) => {
|
|
116
117
|
if (t) {
|
|
@@ -119,7 +120,7 @@ const H = {
|
|
|
119
120
|
if (a.children)
|
|
120
121
|
for (const d of a.children)
|
|
121
122
|
i(d) && (n = !0);
|
|
122
|
-
const r = (a.labelI18n ?
|
|
123
|
+
const r = (a.labelI18n ? x(a.labelI18n) : a.label).toLowerCase().includes(l) || !!a.searchMatch;
|
|
123
124
|
return n && e.add(a.id), r || n;
|
|
124
125
|
};
|
|
125
126
|
if (s.data.forEach(i), e.size > 0) {
|
|
@@ -131,29 +132,30 @@ const H = {
|
|
|
131
132
|
{ deep: !0 }
|
|
132
133
|
);
|
|
133
134
|
const B = v(() => {
|
|
134
|
-
if (s.emptyTextI18n) return
|
|
135
|
+
if (s.emptyTextI18n) return x(s.emptyTextI18n);
|
|
135
136
|
if (s.emptyText) return s.emptyText;
|
|
136
|
-
const t =
|
|
137
|
+
const t = x("vlite.fileTree.emptyText");
|
|
137
138
|
return t !== "vlite.fileTree.emptyText" ? t : "No results found.";
|
|
138
139
|
});
|
|
139
|
-
return (t, l) => (
|
|
140
|
+
return (t, l) => (p(), k("div", {
|
|
140
141
|
class: $(["w-full h-full overflow-y-auto file-tree-container", s.class])
|
|
141
142
|
}, [
|
|
142
|
-
M.value.length > 0 ? (
|
|
143
|
-
const c = [e,
|
|
143
|
+
M.value.length > 0 ? (p(!0), k(q, { key: 0 }, V(M.value, (e, i, a, n) => {
|
|
144
|
+
const c = [e, y.value, u.value, S.value, f.value, o.highlightSearch, o.searchQuery, o.showCheckboxes, o.variant, o.maxLabelLength, !!t.$slots.actions];
|
|
144
145
|
if (n && n.key === e.id && z(n, c)) return n;
|
|
145
|
-
const r = (
|
|
146
|
+
const r = (p(), F(G, {
|
|
146
147
|
key: e.id,
|
|
147
148
|
node: e,
|
|
148
149
|
"selection-mode": o.selectionMode,
|
|
149
|
-
"selected-keys":
|
|
150
|
+
"selected-keys": y.value,
|
|
150
151
|
"expanded-keys": u.value,
|
|
151
|
-
"indeterminate-keys":
|
|
152
|
+
"indeterminate-keys": S.value,
|
|
152
153
|
"loading-keys": f.value,
|
|
153
154
|
"show-checkboxes": o.showCheckboxes,
|
|
154
155
|
"highlight-search": o.highlightSearch,
|
|
155
156
|
"search-query": o.searchQuery,
|
|
156
157
|
variant: o.variant,
|
|
158
|
+
"max-label-length": o.maxLabelLength,
|
|
157
159
|
onToggleExpand: D,
|
|
158
160
|
onToggleSelect: K,
|
|
159
161
|
onClickNode: l[0] || (l[0] = (d) => m("node-click", d))
|
|
@@ -165,9 +167,9 @@ const H = {
|
|
|
165
167
|
]),
|
|
166
168
|
key: "0"
|
|
167
169
|
} : void 0
|
|
168
|
-
]), 1032, ["node", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant"]));
|
|
170
|
+
]), 1032, ["node", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
169
171
|
return r.memo = c, r;
|
|
170
|
-
}, l, 1), 128)) : (
|
|
172
|
+
}, l, 1), 128)) : (p(), k("div", H, j(B.value), 1))
|
|
171
173
|
], 2));
|
|
172
174
|
}
|
|
173
175
|
});
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
highlightSearch?: boolean;
|
|
12
12
|
searchQuery?: string;
|
|
13
13
|
variant?: FileTreeVariant;
|
|
14
|
+
maxLabelLength?: number;
|
|
14
15
|
}
|
|
15
16
|
declare function __VLS_template(): {
|
|
16
17
|
attrs: Partial<{}>;
|
|
@@ -38,6 +39,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
38
39
|
selectionMode: FileTreeSelectionMode;
|
|
39
40
|
showCheckboxes: boolean;
|
|
40
41
|
highlightSearch: boolean;
|
|
42
|
+
maxLabelLength: number;
|
|
41
43
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
42
44
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
45
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as U, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as U, computed as d, resolveComponent as A, openBlock as i, createElementBlock as a, createElementVNode as c, normalizeClass as m, normalizeStyle as x, createCommentVNode as u, withModifiers as L, createVNode as E, createBlock as y, Fragment as C, renderList as K, toDisplayString as M, renderSlot as I, isMemoSame as G, createSlots as H, withCtx as J, mergeProps as R } from "vue";
|
|
2
|
+
import f from "../Icon.vue.js";
|
|
3
3
|
import W from "../CheckBox.vue.js";
|
|
4
4
|
import { $t as X } from "../../utils/i18n.js";
|
|
5
5
|
const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
@@ -8,7 +8,7 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
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
|
+
}, de = /* @__PURE__ */ U({
|
|
12
12
|
name: "FileTreeNode",
|
|
13
13
|
__name: "FileTreeNode",
|
|
14
14
|
props: {
|
|
@@ -22,52 +22,53 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
22
22
|
showCheckboxes: { type: Boolean, default: !1 },
|
|
23
23
|
highlightSearch: { type: Boolean, default: !1 },
|
|
24
24
|
searchQuery: {},
|
|
25
|
-
variant: { default: "default" }
|
|
25
|
+
variant: { default: "default" },
|
|
26
|
+
maxLabelLength: { default: 35 }
|
|
26
27
|
},
|
|
27
28
|
emits: ["toggle-expand", "toggle-select", "click-node"],
|
|
28
29
|
setup(e, { emit: P }) {
|
|
29
|
-
const
|
|
30
|
-
() =>
|
|
31
|
-
), q =
|
|
32
|
-
const t = $.value,
|
|
33
|
-
if (t.length <=
|
|
30
|
+
const n = e, b = P, w = d(() => n.selectedKeys.has(n.node.id)), Q = d(() => n.indeterminateKeys.has(n.node.id)), v = d(() => n.expandedKeys.has(n.node.id)), S = d(() => n.loadingKeys.has(n.node.id)), g = d(
|
|
31
|
+
() => n.node.isFolder || n.node.children && n.node.children.length > 0
|
|
32
|
+
), q = d(() => n.depth * 20 + "px"), $ = d(() => n.node.labelI18n ? X(n.node.labelI18n) : n.node.label), z = d(() => {
|
|
33
|
+
const t = $.value, l = n.maxLabelLength;
|
|
34
|
+
if (t.length <= l) return t;
|
|
34
35
|
const o = t.lastIndexOf(".");
|
|
35
36
|
if (o === -1 || t.length - o > 10)
|
|
36
|
-
return t.substring(0,
|
|
37
|
-
const
|
|
38
|
-
return h.substring(0, F) + "..." +
|
|
39
|
-
}), V =
|
|
37
|
+
return t.substring(0, l) + "...";
|
|
38
|
+
const s = t.substring(o), h = t.substring(0, o), F = Math.max(0, l - s.length - 3);
|
|
39
|
+
return h.substring(0, F) + "..." + s;
|
|
40
|
+
}), V = d(() => {
|
|
40
41
|
const t = z.value;
|
|
41
|
-
if (!
|
|
42
|
+
if (!n.highlightSearch || !n.searchQuery)
|
|
42
43
|
return [{ text: t, highlight: !1 }];
|
|
43
|
-
const
|
|
44
|
+
const l = n.searchQuery.toLowerCase(), o = t.toLowerCase().indexOf(l);
|
|
44
45
|
return o === -1 ? [{ text: t, highlight: !1 }] : [
|
|
45
46
|
{ text: t.slice(0, o), highlight: !1 },
|
|
46
47
|
{
|
|
47
|
-
text: t.slice(o, o +
|
|
48
|
+
text: t.slice(o, o + l.length),
|
|
48
49
|
highlight: !0
|
|
49
50
|
},
|
|
50
|
-
{ text: t.slice(o +
|
|
51
|
+
{ text: t.slice(o + l.length), highlight: !1 }
|
|
51
52
|
];
|
|
52
|
-
}), D =
|
|
53
|
-
const t =
|
|
53
|
+
}), D = d(() => {
|
|
54
|
+
const t = n.node.searchMatch;
|
|
54
55
|
if (!t) return [];
|
|
55
|
-
const
|
|
56
|
-
return o < 0 || o >=
|
|
57
|
-
{ text:
|
|
58
|
-
{ text:
|
|
59
|
-
{ text:
|
|
56
|
+
const l = t.line_content, o = t.match_start, s = t.match_length;
|
|
57
|
+
return o < 0 || o >= l.length ? [{ text: l, highlight: !1 }] : [
|
|
58
|
+
{ text: l.substring(0, o), highlight: !1 },
|
|
59
|
+
{ text: l.substring(o, o + s), highlight: !0 },
|
|
60
|
+
{ text: l.substring(o + s), highlight: !1 }
|
|
60
61
|
];
|
|
61
62
|
}), N = (t) => {
|
|
62
|
-
t && t.stopPropagation(),
|
|
63
|
+
t && t.stopPropagation(), b("toggle-expand", n.node);
|
|
63
64
|
}, O = () => {
|
|
64
|
-
|
|
65
|
+
b("toggle-select", n.node);
|
|
65
66
|
}, j = (t) => {
|
|
66
|
-
t.stopPropagation(), g.value ? N() :
|
|
67
|
+
t.stopPropagation(), g.value ? N() : n.selectionMode !== "none" && b("toggle-select", n.node), b("click-node", n.node);
|
|
67
68
|
};
|
|
68
|
-
return (t,
|
|
69
|
+
return (t, l) => {
|
|
69
70
|
const o = A("FileTreeNode", !0);
|
|
70
|
-
return
|
|
71
|
+
return i(), a("div", Y, [
|
|
71
72
|
c("div", {
|
|
72
73
|
class: m(["group flex flex-col transition-colors cursor-pointer relative", {
|
|
73
74
|
"bg-accent/50 text-accent-foreground": w.value && e.selectionMode === "single" && !e.showCheckboxes,
|
|
@@ -79,30 +80,30 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
79
80
|
onClick: j,
|
|
80
81
|
title: $.value
|
|
81
82
|
}, [
|
|
82
|
-
e.variant === "bordered" ? (
|
|
83
|
+
e.variant === "bordered" ? (i(), a("div", {
|
|
83
84
|
key: 0,
|
|
84
85
|
class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
|
|
85
|
-
style:
|
|
86
|
+
style: x({ left: e.depth * 20 + "px" })
|
|
86
87
|
}, null, 4)) : u("", !0),
|
|
87
88
|
c("div", {
|
|
88
89
|
class: m(["flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
|
|
89
|
-
style:
|
|
90
|
+
style: x({ paddingLeft: q.value })
|
|
90
91
|
}, [
|
|
91
|
-
g.value ? (
|
|
92
|
+
g.value ? (i(), a("button", {
|
|
92
93
|
key: 0,
|
|
93
94
|
type: "button",
|
|
94
|
-
class: m(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90":
|
|
95
|
-
onClick:
|
|
95
|
+
class: m(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": v.value }]),
|
|
96
|
+
onClick: L(N, ["stop"])
|
|
96
97
|
}, [
|
|
97
|
-
E(
|
|
98
|
+
E(f, {
|
|
98
99
|
icon: "lucide:chevron-right",
|
|
99
100
|
class: "w-4 h-4"
|
|
100
101
|
})
|
|
101
|
-
], 2)) : (
|
|
102
|
-
e.showCheckboxes && e.selectionMode !== "none" ? (
|
|
102
|
+
], 2)) : (i(), a("div", p)),
|
|
103
|
+
e.showCheckboxes && e.selectionMode !== "none" ? (i(), a("div", {
|
|
103
104
|
key: 2,
|
|
104
105
|
class: "mr-2 flex items-center justify-center bg-transparent",
|
|
105
|
-
onClick:
|
|
106
|
+
onClick: l[0] || (l[0] = L(() => {
|
|
106
107
|
}, ["stop"]))
|
|
107
108
|
}, [
|
|
108
109
|
E(W, {
|
|
@@ -115,68 +116,68 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
115
116
|
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
116
117
|
])) : u("", !0),
|
|
117
118
|
c("div", _, [
|
|
118
|
-
S.value ? (
|
|
119
|
+
S.value ? (i(), y(f, {
|
|
119
120
|
key: 0,
|
|
120
121
|
icon: "lucide:loader-2",
|
|
121
122
|
class: "w-4 h-4 animate-spin"
|
|
122
|
-
})) : e.node.icon ? (
|
|
123
|
+
})) : e.node.icon ? (i(), y(f, {
|
|
123
124
|
key: 1,
|
|
124
125
|
icon: e.node.icon,
|
|
125
126
|
class: "w-4 h-4"
|
|
126
|
-
}, null, 8, ["icon"])) : g.value ? (
|
|
127
|
+
}, null, 8, ["icon"])) : g.value ? (i(), y(f, {
|
|
127
128
|
key: 2,
|
|
128
|
-
icon:
|
|
129
|
+
icon: v.value ? "lucide:folder-open" : "lucide:folder",
|
|
129
130
|
class: "w-4 h-4"
|
|
130
|
-
}, null, 8, ["icon"])) : (
|
|
131
|
+
}, null, 8, ["icon"])) : (i(), y(f, {
|
|
131
132
|
key: 3,
|
|
132
133
|
icon: "lucide:file",
|
|
133
134
|
class: "w-4 h-4"
|
|
134
135
|
}))
|
|
135
136
|
]),
|
|
136
137
|
c("div", ee, [
|
|
137
|
-
(
|
|
138
|
+
(i(!0), a(C, null, K(V.value, (s, h) => (i(), a("span", {
|
|
138
139
|
key: h,
|
|
139
140
|
class: m({
|
|
140
|
-
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5":
|
|
141
|
+
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": s.highlight
|
|
141
142
|
})
|
|
142
|
-
},
|
|
143
|
+
}, M(s.text), 3))), 128))
|
|
143
144
|
]),
|
|
144
|
-
t.$slots.actions ? (
|
|
145
|
+
t.$slots.actions ? (i(), a("div", {
|
|
145
146
|
key: 3,
|
|
146
147
|
class: "ml-2 flex items-center shrink-0",
|
|
147
|
-
onClick:
|
|
148
|
+
onClick: l[1] || (l[1] = L(() => {
|
|
148
149
|
}, ["stop"]))
|
|
149
150
|
}, [
|
|
150
151
|
I(t.$slots, "actions", { node: e.node })
|
|
151
152
|
])) : u("", !0)
|
|
152
153
|
], 6),
|
|
153
|
-
e.node.searchMatch ? (
|
|
154
|
+
e.node.searchMatch ? (i(), a("div", {
|
|
154
155
|
key: 1,
|
|
155
156
|
class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
|
|
156
|
-
style:
|
|
157
|
+
style: x({ paddingLeft: e.depth * 20 + 28 + "px" })
|
|
157
158
|
}, [
|
|
158
|
-
c("span", te, "L" +
|
|
159
|
+
c("span", te, "L" + M(e.node.searchMatch.line_number), 1),
|
|
159
160
|
c("div", ne, [
|
|
160
|
-
(
|
|
161
|
+
(i(!0), a(C, null, K(D.value, (s, h) => (i(), a("span", {
|
|
161
162
|
key: h,
|
|
162
163
|
class: m({
|
|
163
|
-
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30":
|
|
164
|
+
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": s.highlight
|
|
164
165
|
})
|
|
165
|
-
},
|
|
166
|
+
}, M(s.text), 3))), 128))
|
|
166
167
|
])
|
|
167
168
|
], 4)) : u("", !0)
|
|
168
169
|
], 10, Z),
|
|
169
|
-
|
|
170
|
+
v.value && g.value && !S.value ? (i(), a("div", le, [
|
|
170
171
|
c("div", {
|
|
171
172
|
class: "absolute top-1 bottom-1 border-l border-border",
|
|
172
|
-
style:
|
|
173
|
+
style: x({ left: e.depth * 20 + 10 + "px" })
|
|
173
174
|
}, null, 4),
|
|
174
|
-
e.node.children && e.node.children.length > 0 ? (
|
|
175
|
-
const T = [
|
|
176
|
-
if (
|
|
177
|
-
const B = (
|
|
178
|
-
key:
|
|
179
|
-
node:
|
|
175
|
+
e.node.children && e.node.children.length > 0 ? (i(!0), a(C, { key: 0 }, K(e.node.children, (s, h, F, k) => {
|
|
176
|
+
const T = [s, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, e.maxLabelLength, !!t.$slots.actions];
|
|
177
|
+
if (k && k.key === s.id && G(k, T)) return k;
|
|
178
|
+
const B = (i(), y(o, {
|
|
179
|
+
key: s.id,
|
|
180
|
+
node: s,
|
|
180
181
|
depth: e.depth + 1,
|
|
181
182
|
"selection-mode": e.selectionMode,
|
|
182
183
|
"selected-keys": e.selectedKeys,
|
|
@@ -187,9 +188,10 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
187
188
|
"highlight-search": e.highlightSearch,
|
|
188
189
|
"search-query": e.searchQuery,
|
|
189
190
|
variant: e.variant,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
"max-label-length": e.maxLabelLength,
|
|
192
|
+
onToggleExpand: l[2] || (l[2] = (r) => t.$emit("toggle-expand", r)),
|
|
193
|
+
onToggleSelect: l[3] || (l[3] = (r) => t.$emit("toggle-select", r)),
|
|
194
|
+
onClickNode: l[4] || (l[4] = (r) => t.$emit("click-node", r))
|
|
193
195
|
}, H({ _: 2 }, [
|
|
194
196
|
t.$slots.actions ? {
|
|
195
197
|
name: "actions",
|
|
@@ -198,12 +200,12 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
198
200
|
]),
|
|
199
201
|
key: "0"
|
|
200
202
|
} : void 0
|
|
201
|
-
]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant"]));
|
|
203
|
+
]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
202
204
|
return B.memo = T, B;
|
|
203
|
-
},
|
|
205
|
+
}, l, 5), 128)) : v.value && g.value && (!e.node.children || e.node.children.length === 0) ? (i(), a("div", {
|
|
204
206
|
key: 1,
|
|
205
207
|
class: "py-0.5 text-xs text-muted-foreground italic",
|
|
206
|
-
style:
|
|
208
|
+
style: x({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
|
|
207
209
|
}, null, 4)) : u("", !0)
|
|
208
210
|
])) : u("", !0)
|
|
209
211
|
]);
|
|
@@ -211,5 +213,5 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
211
213
|
}
|
|
212
214
|
});
|
|
213
215
|
export {
|
|
214
|
-
|
|
216
|
+
de as default
|
|
215
217
|
};
|
|
@@ -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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c8a43921"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as we, inject as Ae, computed as r, onMounted as se, onUnmounted as O, ref as K, watch as ne, openBlock as s, createElementBlock as c, withKeys as oe, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as w, mergeProps as z, toDisplayString as B, unref as a, renderSlot as re, createCommentVNode as u, createBlock as
|
|
1
|
+
import { defineComponent as we, inject as Ae, computed as r, onMounted as se, onUnmounted as O, ref as K, watch as ne, openBlock as s, createElementBlock as c, withKeys as oe, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as w, mergeProps as z, toDisplayString as B, unref as a, renderSlot as re, createCommentVNode as u, createBlock as p, withCtx as Te, Fragment as Pe, renderList as Re } from "vue";
|
|
2
2
|
import { useForm as Ue } from "./composables/useForm.js";
|
|
3
3
|
import Q from "./FormFields.vue.js";
|
|
4
4
|
import Ve from "./FormField.vue.js";
|
|
@@ -15,7 +15,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
15
15
|
class: "w-full order-first lg:order-last lg:min-w-100 lg:max-w-[380px] shrink-0"
|
|
16
16
|
}, Ke = { key: 0 }, Me = {
|
|
17
17
|
key: 0,
|
|
18
|
-
class: "flex gap-3 items-end
|
|
18
|
+
class: "flex gap-3 items-end ml-auto"
|
|
19
19
|
}, Ge = { class: "text-base font-semibold text-foreground" }, je = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "text-sm text-muted-foreground mt-1"
|
|
@@ -153,9 +153,9 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
153
153
|
return i;
|
|
154
154
|
}, ke = r(() => d.value ? n.value < F.value.length - 1 : !1), te = r(() => d.value ? n.value > 0 : !1), E = r(() => d.value ? n.value === F.value.length - 1 : !0), ae = async () => {
|
|
155
155
|
!ke.value || !await xe() || (n.value++, y("onStepChange", n.value));
|
|
156
|
-
},
|
|
156
|
+
}, Ce = () => {
|
|
157
157
|
te.value && (n.value--, y("onStepChange", n.value));
|
|
158
|
-
},
|
|
158
|
+
}, pe = (l, i) => {
|
|
159
159
|
i <= n.value && (n.value = i, y("onStepChange", n.value));
|
|
160
160
|
}, k = async () => {
|
|
161
161
|
if (d.value) {
|
|
@@ -165,7 +165,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
165
165
|
}
|
|
166
166
|
if (!await ee()) {
|
|
167
167
|
const i = F.value.findIndex(
|
|
168
|
-
(o) => o.some((
|
|
168
|
+
(o) => o.some((C) => !!x.value[C.name])
|
|
169
169
|
);
|
|
170
170
|
i !== -1 && i !== n.value && (n.value = i, y("onStepChange", n.value));
|
|
171
171
|
return;
|
|
@@ -249,13 +249,13 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
249
249
|
direction: "horizontal",
|
|
250
250
|
textPosition: e.timelineTextPosition,
|
|
251
251
|
clickable: !0,
|
|
252
|
-
onStepClick:
|
|
252
|
+
onStepClick: pe
|
|
253
253
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
254
254
|
], 2)) : u("", !0),
|
|
255
255
|
f("div", {
|
|
256
256
|
class: m(e.footer && R.value ? "pb-2" : "")
|
|
257
257
|
}, [
|
|
258
|
-
e.schemaLoading ? (s(),
|
|
258
|
+
e.schemaLoading ? (s(), p(ze, {
|
|
259
259
|
key: 0,
|
|
260
260
|
isGrouped: T.value
|
|
261
261
|
}, null, 8, ["isGrouped"])) : (s(), c("div", {
|
|
@@ -263,7 +263,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
263
263
|
class: m(P.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
|
|
264
264
|
}, [
|
|
265
265
|
P.value ? (s(), c("div", Ee, [
|
|
266
|
-
g.value && a(U)(g.value) ? (s(),
|
|
266
|
+
g.value && a(U)(g.value) ? (s(), p(Ve, {
|
|
267
267
|
key: 0,
|
|
268
268
|
field: g.value,
|
|
269
269
|
value: a(h)[g.value.name],
|
|
@@ -287,20 +287,20 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
287
287
|
key: 1,
|
|
288
288
|
class: m(["form-groups space-y-6", e.groupContainerClass])
|
|
289
289
|
}, [
|
|
290
|
-
(s(!0), c(Pe, null, Re(F.value, (o,
|
|
291
|
-
key:
|
|
290
|
+
(s(!0), c(Pe, null, Re(F.value, (o, C) => (s(), c("div", {
|
|
291
|
+
key: C,
|
|
292
292
|
class: m([
|
|
293
293
|
"form-group overflow-hidden bg-body",
|
|
294
294
|
e.groupClass,
|
|
295
295
|
F.value?.length > 1 ? "border rounded" : ""
|
|
296
296
|
])
|
|
297
297
|
}, [
|
|
298
|
-
e.groupsHeadings?.[
|
|
298
|
+
e.groupsHeadings?.[C] ? (s(), c("div", {
|
|
299
299
|
key: 0,
|
|
300
300
|
class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
|
|
301
301
|
}, [
|
|
302
|
-
f("h3", Ge, B(e.groupsHeadings[
|
|
303
|
-
e.groupHeadingsDescription?.[
|
|
302
|
+
f("h3", Ge, B(e.groupsHeadings[C]), 1),
|
|
303
|
+
e.groupHeadingsDescription?.[C] ? (s(), c("p", je, B(e.groupHeadingsDescription[C]), 1)) : u("", !0)
|
|
304
304
|
], 2)) : u("", !0),
|
|
305
305
|
f("div", {
|
|
306
306
|
class: m(["form-group-body", [e.groupBodyClass, F.value?.length > 1 ? "p-4.5" : ""]])
|
|
@@ -373,7 +373,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
373
373
|
}, {
|
|
374
374
|
default: Te(() => [
|
|
375
375
|
t.layout === "inline" && e.footer ? (s(), c("div", Me, [
|
|
376
|
-
W.value ? (s(),
|
|
376
|
+
W.value ? (s(), p(S, {
|
|
377
377
|
key: 0,
|
|
378
378
|
type: "button",
|
|
379
379
|
variant: "outline",
|
|
@@ -433,7 +433,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
433
433
|
])
|
|
434
434
|
}, [
|
|
435
435
|
f("div", We, [
|
|
436
|
-
W.value ? (s(),
|
|
436
|
+
W.value ? (s(), p(S, {
|
|
437
437
|
key: 0,
|
|
438
438
|
type: "button",
|
|
439
439
|
variant: "outline",
|
|
@@ -441,7 +441,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
441
441
|
disabled: e.loading || a(b),
|
|
442
442
|
onClick: ie
|
|
443
443
|
}, null, 8, ["text", "disabled"])) : u("", !0),
|
|
444
|
-
d.value && e.isUpdate && !E.value ? (s(),
|
|
444
|
+
d.value && e.isUpdate && !E.value ? (s(), p(S, z({
|
|
445
445
|
key: 1,
|
|
446
446
|
type: "button",
|
|
447
447
|
variant: "primary",
|
|
@@ -454,15 +454,15 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
454
454
|
f("div", {
|
|
455
455
|
class: m(["flex gap-3 items-center", d.value && "ml-auto"])
|
|
456
456
|
}, [
|
|
457
|
-
d.value && te.value ? (s(),
|
|
457
|
+
d.value && te.value ? (s(), p(S, {
|
|
458
458
|
key: 0,
|
|
459
459
|
type: "button",
|
|
460
460
|
variant: "outline",
|
|
461
461
|
icon: "lucide:arrow-left",
|
|
462
462
|
text: "Previous",
|
|
463
|
-
onClick:
|
|
463
|
+
onClick: Ce
|
|
464
464
|
})) : u("", !0),
|
|
465
|
-
d.value && !E.value ? (s(),
|
|
465
|
+
d.value && !E.value ? (s(), p(S, {
|
|
466
466
|
key: 1,
|
|
467
467
|
type: "button",
|
|
468
468
|
variant: e.isUpdate ? "outline" : "primary",
|
|
@@ -470,7 +470,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
470
470
|
iconRight: "lucide:arrow-right",
|
|
471
471
|
onClick: ae
|
|
472
472
|
}, null, 8, ["variant"])) : u("", !0),
|
|
473
|
-
!d.value || E.value ? (s(),
|
|
473
|
+
!d.value || E.value ? (s(), p(S, z({
|
|
474
474
|
key: 2,
|
|
475
475
|
type: "submit",
|
|
476
476
|
variant: "primary",
|