vlite3 1.4.35 → 1.4.37
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/CategoryManager/CategoryManager.vue2.js +4 -4
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/DataTable/DataTable.vue.d.ts +4 -1
- package/components/DataTable/DataTable.vue.js +322 -205
- package/components/DataTable/DataTableRow.vue.d.ts +21 -0
- package/components/DataTable/DataTableRow.vue.js +137 -73
- package/components/DataTable/types.d.ts +30 -0
- package/components/DataTable/useDataTableTree.d.ts +24 -0
- package/components/DataTable/useDataTableTree.js +137 -0
- package/components/FileTree/FileTree.vue.js +1 -1
- package/components/FileTree/FileTree.vue2.js +59 -57
- package/components/FileTree/FileTreeNode.vue.d.ts +6 -0
- package/components/FileTree/FileTreeNode.vue.js +112 -103
- package/components/Form/{AccordionView.vue.js → AccordionView.vue2.js} +1 -1
- package/components/Form/index.vue2.js +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +4 -4
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +27 -0
- package/components/TreeConnectors/TreeConnectors.vue.js +44 -0
- package/components/TreeConnectors/TreeConnectors.vue2.js +4 -0
- package/components/TreeConnectors/geometry.d.ts +64 -0
- package/components/TreeConnectors/geometry.js +55 -0
- package/components/TreeConnectors/index.d.ts +3 -0
- package/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as L, shallowRef as E, watch as T, computed as
|
|
1
|
+
import { defineComponent as Q, ref as L, shallowRef as E, watch as T, computed as p, openBlock as w, createElementBlock as b, 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
3
|
import { $t as x } from "../../utils/i18n.js";
|
|
4
4
|
const H = {
|
|
@@ -23,54 +23,54 @@ const H = {
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "select", "expand", "node-click"],
|
|
25
25
|
setup(o, { emit: C }) {
|
|
26
|
-
const
|
|
27
|
-
const e = /* @__PURE__ */ new Map(),
|
|
28
|
-
for (const r of
|
|
29
|
-
e.set(r.id, r), c &&
|
|
26
|
+
const i = o, m = C, u = L(new Set(i.defaultExpandedKeys)), f = L(/* @__PURE__ */ new Set()), g = E(/* @__PURE__ */ new Map()), S = E(/* @__PURE__ */ new Map()), I = (t, l) => {
|
|
27
|
+
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), a = (s, c) => {
|
|
28
|
+
for (const r of s)
|
|
29
|
+
e.set(r.id, r), c && n.set(r.id, c), r.children && a(r.children, r.id);
|
|
30
30
|
};
|
|
31
|
-
a(t, l), g.value = e,
|
|
31
|
+
a(t, l), g.value = e, S.value = n;
|
|
32
32
|
};
|
|
33
33
|
T(
|
|
34
|
-
() =>
|
|
34
|
+
() => i.data,
|
|
35
35
|
(t) => {
|
|
36
36
|
I(t);
|
|
37
37
|
},
|
|
38
38
|
{ immediate: !0, deep: !0 }
|
|
39
39
|
);
|
|
40
|
-
const
|
|
40
|
+
const k = (t) => {
|
|
41
41
|
let l = [];
|
|
42
42
|
if (t.children)
|
|
43
43
|
for (const e of t.children)
|
|
44
|
-
l.push(e.id), l = l.concat(
|
|
44
|
+
l.push(e.id), l = l.concat(k(e));
|
|
45
45
|
return l;
|
|
46
|
-
},
|
|
46
|
+
}, v = p(() => new Set(i.modelValue)), M = p(() => {
|
|
47
47
|
const t = /* @__PURE__ */ new Set();
|
|
48
|
-
if (
|
|
48
|
+
if (i.selectionMode !== "multiple") return t;
|
|
49
49
|
const l = (e) => {
|
|
50
50
|
if (!e.children || e.children.length === 0)
|
|
51
|
-
return
|
|
52
|
-
let
|
|
51
|
+
return v.value.has(e.id) ? { status: "checked" } : { status: "unchecked" };
|
|
52
|
+
let n = !1, a = !1, s = !1;
|
|
53
53
|
for (const c of e.children) {
|
|
54
54
|
const r = l(c);
|
|
55
|
-
r.status === "checked" && (
|
|
55
|
+
r.status === "checked" && (n = !0), r.status === "unchecked" && (a = !0), r.status === "indeterminate" && (s = !0);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
57
|
+
return s || n && a ? (t.add(e.id), { status: "indeterminate" }) : n ? { status: "checked" } : { status: "unchecked" };
|
|
58
58
|
};
|
|
59
|
-
return
|
|
59
|
+
return i.data.forEach(l), t;
|
|
60
60
|
}), D = async (t) => {
|
|
61
61
|
if (t.disabled) return;
|
|
62
62
|
if (u.value.has(t.id)) {
|
|
63
63
|
const e = new Set(u.value);
|
|
64
64
|
e.delete(t.id);
|
|
65
|
-
const
|
|
66
|
-
|
|
65
|
+
const n = g.value.get(t.id) || t;
|
|
66
|
+
k(n).forEach((s) => e.delete(s)), u.value = e, m("expand", t, !1);
|
|
67
67
|
} else {
|
|
68
68
|
const e = new Set(u.value);
|
|
69
|
-
if (e.add(t.id), u.value = e, m("expand", t, !0),
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
if (e.add(t.id), u.value = e, m("expand", t, !0), i.loadData && !t.isLoaded && (!t.children || t.children.length === 0)) {
|
|
70
|
+
const n = new Set(f.value);
|
|
71
|
+
n.add(t.id), f.value = n;
|
|
72
72
|
try {
|
|
73
|
-
await
|
|
73
|
+
await i.loadData(t);
|
|
74
74
|
} finally {
|
|
75
75
|
const a = new Set(f.value);
|
|
76
76
|
a.delete(t.id), f.value = a;
|
|
@@ -80,76 +80,78 @@ const H = {
|
|
|
80
80
|
}, K = (t) => {
|
|
81
81
|
if (t.disabled) return;
|
|
82
82
|
const l = g.value.get(t.id) || t;
|
|
83
|
-
let e = new Set(
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
e.clear(),
|
|
87
|
-
else if (
|
|
88
|
-
const a =
|
|
83
|
+
let e = new Set(v.value);
|
|
84
|
+
const n = e.has(t.id);
|
|
85
|
+
if (i.selectionMode === "single")
|
|
86
|
+
e.clear(), n || e.add(t.id);
|
|
87
|
+
else if (i.selectionMode === "multiple") {
|
|
88
|
+
const a = k(l), s = !n, c = (d, h) => {
|
|
89
89
|
h ? e.add(d) : e.delete(d);
|
|
90
90
|
};
|
|
91
|
-
c(t.id,
|
|
91
|
+
c(t.id, s), a.forEach((d) => c(d, s));
|
|
92
92
|
let r = l;
|
|
93
93
|
for (; ; ) {
|
|
94
|
-
const d =
|
|
94
|
+
const d = S.value.get(r.id);
|
|
95
95
|
if (!d) break;
|
|
96
96
|
const h = g.value.get(d);
|
|
97
97
|
if (!h || !h.children) break;
|
|
98
98
|
h.children.every((N) => e.has(N.id)) ? e.add(h.id) : e.delete(h.id), r = h;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
m("update:modelValue", Array.from(e)), m("select", l, !
|
|
102
|
-
},
|
|
103
|
-
if (!
|
|
104
|
-
const t =
|
|
105
|
-
const a = (e.labelI18n ? x(e.labelI18n) : e.label).toLowerCase().includes(t),
|
|
101
|
+
m("update:modelValue", Array.from(e)), m("select", l, !n);
|
|
102
|
+
}, y = p(() => {
|
|
103
|
+
if (!i.searchQuery) return i.data;
|
|
104
|
+
const t = i.searchQuery.toLowerCase(), l = (e) => {
|
|
105
|
+
const a = (e.labelI18n ? x(e.labelI18n) : e.label).toLowerCase().includes(t), s = !!e.searchMatch;
|
|
106
106
|
let c = [];
|
|
107
|
-
return e.children && (c = e.children.map(l).filter((r) => r !== null)), a ||
|
|
107
|
+
return e.children && (c = e.children.map(l).filter((r) => r !== null)), a || s || c.length > 0 ? {
|
|
108
108
|
...e,
|
|
109
109
|
children: c
|
|
110
110
|
} : null;
|
|
111
111
|
};
|
|
112
|
-
return
|
|
112
|
+
return i.data.map(l).filter((e) => e !== null);
|
|
113
113
|
});
|
|
114
114
|
T(
|
|
115
|
-
() => [
|
|
115
|
+
() => [i.searchQuery, i.data],
|
|
116
116
|
([t]) => {
|
|
117
117
|
if (t) {
|
|
118
|
-
const l = t.toLowerCase(), e = /* @__PURE__ */ new Set(),
|
|
119
|
-
let
|
|
118
|
+
const l = t.toLowerCase(), e = /* @__PURE__ */ new Set(), n = (a) => {
|
|
119
|
+
let s = !1;
|
|
120
120
|
if (a.children)
|
|
121
121
|
for (const d of a.children)
|
|
122
|
-
|
|
122
|
+
n(d) && (s = !0);
|
|
123
123
|
const r = (a.labelI18n ? x(a.labelI18n) : a.label).toLowerCase().includes(l) || !!a.searchMatch;
|
|
124
|
-
return
|
|
124
|
+
return s && e.add(a.id), r || s;
|
|
125
125
|
};
|
|
126
|
-
if (
|
|
126
|
+
if (i.data.forEach(n), e.size > 0) {
|
|
127
127
|
const a = new Set(u.value);
|
|
128
|
-
e.forEach((
|
|
128
|
+
e.forEach((s) => a.add(s)), u.value = a;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
{ deep: !0 }
|
|
133
133
|
);
|
|
134
|
-
const B =
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
134
|
+
const B = p(() => {
|
|
135
|
+
if (i.emptyTextI18n) return x(i.emptyTextI18n);
|
|
136
|
+
if (i.emptyText) return i.emptyText;
|
|
137
137
|
const t = x("vlite.fileTree.emptyText");
|
|
138
138
|
return t !== "vlite.fileTree.emptyText" ? t : "No results found.";
|
|
139
139
|
});
|
|
140
|
-
return (t, l) => (
|
|
141
|
-
class: $(["w-full h-full overflow-y-auto file-tree-container",
|
|
140
|
+
return (t, l) => (w(), b("div", {
|
|
141
|
+
class: $(["w-full h-full overflow-y-auto file-tree-container", i.class])
|
|
142
142
|
}, [
|
|
143
|
-
|
|
144
|
-
const c = [e,
|
|
145
|
-
if (
|
|
146
|
-
const r = (
|
|
143
|
+
y.value.length > 0 ? (w(!0), b(q, { key: 0 }, V(y.value, (e, n, a, s) => {
|
|
144
|
+
const c = [e, v.value, u.value, M.value, f.value, o.highlightSearch, o.searchQuery, o.showCheckboxes, o.variant, o.maxLabelLength, n === y.value.length - 1, !!t.$slots.actions];
|
|
145
|
+
if (s && s.key === e.id && z(s, c)) return s;
|
|
146
|
+
const r = (w(), F(G, {
|
|
147
147
|
key: e.id,
|
|
148
148
|
node: e,
|
|
149
|
+
"is-last": n === y.value.length - 1,
|
|
150
|
+
"ancestor-last-flags": [],
|
|
149
151
|
"selection-mode": o.selectionMode,
|
|
150
|
-
"selected-keys":
|
|
152
|
+
"selected-keys": v.value,
|
|
151
153
|
"expanded-keys": u.value,
|
|
152
|
-
"indeterminate-keys":
|
|
154
|
+
"indeterminate-keys": M.value,
|
|
153
155
|
"loading-keys": f.value,
|
|
154
156
|
"show-checkboxes": o.showCheckboxes,
|
|
155
157
|
"highlight-search": o.highlightSearch,
|
|
@@ -167,9 +169,9 @@ const H = {
|
|
|
167
169
|
]),
|
|
168
170
|
key: "0"
|
|
169
171
|
} : void 0
|
|
170
|
-
]), 1032, ["node", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
172
|
+
]), 1032, ["node", "is-last", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
171
173
|
return r.memo = c, r;
|
|
172
|
-
}, l, 1), 128)) : (
|
|
174
|
+
}, l, 1), 128)) : (w(), b("div", H, j(B.value), 1))
|
|
173
175
|
], 2));
|
|
174
176
|
}
|
|
175
177
|
});
|
|
@@ -12,6 +12,10 @@ interface Props {
|
|
|
12
12
|
searchQuery?: string;
|
|
13
13
|
variant?: FileTreeVariant;
|
|
14
14
|
maxLabelLength?: number;
|
|
15
|
+
/** Whether this node is the last child of its parent. */
|
|
16
|
+
isLast?: boolean;
|
|
17
|
+
/** `isLast` of every ancestor, ordered root → immediate parent. */
|
|
18
|
+
ancestorLastFlags?: boolean[];
|
|
15
19
|
}
|
|
16
20
|
declare function __VLS_template(): {
|
|
17
21
|
attrs: Partial<{}>;
|
|
@@ -35,7 +39,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
35
39
|
"onClick-node"?: (node: FileNode) => any;
|
|
36
40
|
}>, {
|
|
37
41
|
variant: FileTreeVariant;
|
|
42
|
+
isLast: boolean;
|
|
38
43
|
depth: number;
|
|
44
|
+
ancestorLastFlags: boolean[];
|
|
39
45
|
selectionMode: FileTreeSelectionMode;
|
|
40
46
|
showCheckboxes: boolean;
|
|
41
47
|
highlightSearch: boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as U, computed as d, resolveComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as U, computed as d, resolveComponent as G, openBlock as a, createElementBlock as o, createElementVNode as g, normalizeClass as m, normalizeStyle as k, createCommentVNode as u, createVNode as w, unref as H, withModifiers as C, createBlock as f, Fragment as K, renderList as M, toDisplayString as S, renderSlot as I, isMemoSame as J, createSlots as W, withCtx as X, mergeProps as Y } from "vue";
|
|
2
|
+
import y from "../Icon.vue.js";
|
|
3
|
+
import Z from "../CheckBox.vue.js";
|
|
4
|
+
import p from "../TreeConnectors/TreeConnectors.vue.js";
|
|
5
|
+
import { $t as _ } from "../../utils/i18n.js";
|
|
6
|
+
const ee = { class: "flex flex-col select-none" }, te = ["title"], ne = {
|
|
6
7
|
key: 1,
|
|
7
|
-
class: "w-6 mr-1"
|
|
8
|
-
},
|
|
8
|
+
class: "relative z-10 w-6 mr-1"
|
|
9
|
+
}, le = { class: "mr-2 text-muted-foreground shrink-0" }, se = { class: "flex-1 truncate text-sm font-medium" }, ae = { class: "mr-2 text-gray-400 select-none shrink-0" }, ie = { class: "truncate" }, oe = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "relative flex flex-col"
|
|
11
|
-
},
|
|
12
|
+
}, P = 20, ue = /* @__PURE__ */ U({
|
|
12
13
|
name: "FileTreeNode",
|
|
13
14
|
__name: "FileTreeNode",
|
|
14
15
|
props: {
|
|
@@ -23,162 +24,170 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
23
24
|
highlightSearch: { type: Boolean, default: !1 },
|
|
24
25
|
searchQuery: {},
|
|
25
26
|
variant: { default: "default" },
|
|
26
|
-
maxLabelLength: { default: 35 }
|
|
27
|
+
maxLabelLength: { default: 35 },
|
|
28
|
+
isLast: { type: Boolean, default: !0 },
|
|
29
|
+
ancestorLastFlags: { default: () => [] }
|
|
27
30
|
},
|
|
28
31
|
emits: ["toggle-expand", "toggle-select", "click-node"],
|
|
29
|
-
setup(e, { emit:
|
|
30
|
-
const n = e,
|
|
31
|
-
() => n.node.isFolder || n.node.children && n.node.children.length > 0
|
|
32
|
-
),
|
|
33
|
-
const t =
|
|
32
|
+
setup(e, { emit: Q }) {
|
|
33
|
+
const n = e, x = Q, L = d(() => n.selectedKeys.has(n.node.id)), q = d(() => n.indeterminateKeys.has(n.node.id)), v = d(() => n.expandedKeys.has(n.node.id)), $ = d(() => n.loadingKeys.has(n.node.id)), h = d(
|
|
34
|
+
() => !!(n.node.isFolder || n.node.children && n.node.children.length > 0)
|
|
35
|
+
), F = d(() => [...n.ancestorLastFlags, n.isLast]), D = d(() => n.depth * P + "px"), N = d(() => n.node.labelI18n ? _(n.node.labelI18n) : n.node.label), V = d(() => {
|
|
36
|
+
const t = N.value, l = n.maxLabelLength;
|
|
34
37
|
if (t.length <= l) return t;
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
38
|
+
const s = t.lastIndexOf(".");
|
|
39
|
+
if (s === -1 || t.length - s > 10)
|
|
37
40
|
return t.substring(0, l) + "...";
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
}),
|
|
41
|
-
const t =
|
|
41
|
+
const i = t.substring(s), r = t.substring(0, s), E = Math.max(0, l - i.length - 3);
|
|
42
|
+
return r.substring(0, E) + "..." + i;
|
|
43
|
+
}), O = d(() => {
|
|
44
|
+
const t = V.value;
|
|
42
45
|
if (!n.highlightSearch || !n.searchQuery)
|
|
43
46
|
return [{ text: t, highlight: !1 }];
|
|
44
|
-
const l = n.searchQuery.toLowerCase(),
|
|
45
|
-
return
|
|
46
|
-
{ text: t.slice(0,
|
|
47
|
+
const l = n.searchQuery.toLowerCase(), s = t.toLowerCase().indexOf(l);
|
|
48
|
+
return s === -1 ? [{ text: t, highlight: !1 }] : [
|
|
49
|
+
{ text: t.slice(0, s), highlight: !1 },
|
|
47
50
|
{
|
|
48
|
-
text: t.slice(
|
|
51
|
+
text: t.slice(s, s + l.length),
|
|
49
52
|
highlight: !0
|
|
50
53
|
},
|
|
51
|
-
{ text: t.slice(
|
|
54
|
+
{ text: t.slice(s + l.length), highlight: !1 }
|
|
52
55
|
];
|
|
53
|
-
}),
|
|
56
|
+
}), j = d(() => {
|
|
54
57
|
const t = n.node.searchMatch;
|
|
55
58
|
if (!t) return [];
|
|
56
|
-
const l = t.line_content,
|
|
57
|
-
return
|
|
58
|
-
{ text: l.substring(0,
|
|
59
|
-
{ text: l.substring(
|
|
60
|
-
{ text: l.substring(
|
|
59
|
+
const l = t.line_content, s = t.match_start, i = t.match_length;
|
|
60
|
+
return s < 0 || s >= l.length ? [{ text: l, highlight: !1 }] : [
|
|
61
|
+
{ text: l.substring(0, s), highlight: !1 },
|
|
62
|
+
{ text: l.substring(s, s + i), highlight: !0 },
|
|
63
|
+
{ text: l.substring(s + i), highlight: !1 }
|
|
61
64
|
];
|
|
62
|
-
}),
|
|
63
|
-
t && t.stopPropagation(),
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
t.stopPropagation(),
|
|
65
|
+
}), T = (t) => {
|
|
66
|
+
t && t.stopPropagation(), x("toggle-expand", n.node);
|
|
67
|
+
}, A = () => {
|
|
68
|
+
x("toggle-select", n.node);
|
|
69
|
+
}, R = (t) => {
|
|
70
|
+
t.stopPropagation(), h.value ? T() : n.selectionMode !== "none" && x("toggle-select", n.node), x("click-node", n.node);
|
|
68
71
|
};
|
|
69
72
|
return (t, l) => {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
+
const s = G("FileTreeNode", !0);
|
|
74
|
+
return a(), o("div", ee, [
|
|
75
|
+
g("div", {
|
|
73
76
|
class: m(["group flex flex-col transition-colors cursor-pointer relative", {
|
|
74
|
-
"bg-accent/50 text-accent-foreground":
|
|
75
|
-
"hover:bg-accent/50": !
|
|
77
|
+
"bg-accent/50 text-accent-foreground": L.value && e.selectionMode === "single" && !e.showCheckboxes,
|
|
78
|
+
"hover:bg-accent/50": !L.value || e.selectionMode !== "single",
|
|
76
79
|
"opacity-50 pointer-events-none": e.node.disabled,
|
|
77
80
|
"rounded-none": e.variant === "bordered",
|
|
78
81
|
"rounded-md": e.variant === "default"
|
|
79
82
|
}]),
|
|
80
|
-
onClick:
|
|
81
|
-
title:
|
|
83
|
+
onClick: R,
|
|
84
|
+
title: N.value
|
|
82
85
|
}, [
|
|
83
|
-
e.variant === "bordered" ? (
|
|
86
|
+
e.variant === "bordered" ? (a(), o("div", {
|
|
84
87
|
key: 0,
|
|
85
88
|
class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
|
|
86
|
-
style:
|
|
89
|
+
style: k({ left: e.depth * 20 + "px" })
|
|
87
90
|
}, null, 4)) : u("", !0),
|
|
88
|
-
|
|
89
|
-
class: m(["flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
|
|
90
|
-
style:
|
|
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 })
|
|
91
94
|
}, [
|
|
92
|
-
|
|
95
|
+
w(H(p), {
|
|
96
|
+
depth: e.depth,
|
|
97
|
+
"is-last-sibling": e.isLast,
|
|
98
|
+
"ancestor-last-flags": e.ancestorLastFlags,
|
|
99
|
+
"has-toggle": h.value,
|
|
100
|
+
indent: P,
|
|
101
|
+
"line-class": "bg-border"
|
|
102
|
+
}, null, 8, ["depth", "is-last-sibling", "ancestor-last-flags", "has-toggle"]),
|
|
103
|
+
h.value ? (a(), o("button", {
|
|
93
104
|
key: 0,
|
|
94
105
|
type: "button",
|
|
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:
|
|
106
|
+
class: m(["relative z-10 p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": v.value }]),
|
|
107
|
+
onClick: C(T, ["stop"])
|
|
97
108
|
}, [
|
|
98
|
-
|
|
109
|
+
w(y, {
|
|
99
110
|
icon: "lucide:chevron-right",
|
|
100
111
|
class: "w-4 h-4"
|
|
101
112
|
})
|
|
102
|
-
], 2)) : (
|
|
103
|
-
e.showCheckboxes && e.selectionMode !== "none" ? (
|
|
113
|
+
], 2)) : (a(), o("div", ne)),
|
|
114
|
+
e.showCheckboxes && e.selectionMode !== "none" ? (a(), o("div", {
|
|
104
115
|
key: 2,
|
|
105
116
|
class: "mr-2 flex items-center justify-center bg-transparent",
|
|
106
|
-
onClick: l[0] || (l[0] =
|
|
117
|
+
onClick: l[0] || (l[0] = C(() => {
|
|
107
118
|
}, ["stop"]))
|
|
108
119
|
}, [
|
|
109
|
-
|
|
110
|
-
checked:
|
|
111
|
-
indeterminate:
|
|
120
|
+
w(Z, {
|
|
121
|
+
checked: L.value,
|
|
122
|
+
indeterminate: q.value,
|
|
112
123
|
disabled: e.node.disabled,
|
|
113
|
-
"onUpdate:checked":
|
|
124
|
+
"onUpdate:checked": A,
|
|
114
125
|
rounded: "sm",
|
|
115
126
|
size: "sm"
|
|
116
127
|
}, null, 8, ["checked", "indeterminate", "disabled"])
|
|
117
128
|
])) : u("", !0),
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
g("div", le, [
|
|
130
|
+
$.value ? (a(), f(y, {
|
|
120
131
|
key: 0,
|
|
121
132
|
icon: "lucide:loader-2",
|
|
122
133
|
class: "w-4 h-4 animate-spin"
|
|
123
|
-
})) : e.node.icon ? (
|
|
134
|
+
})) : e.node.icon ? (a(), f(y, {
|
|
124
135
|
key: 1,
|
|
125
136
|
icon: e.node.icon,
|
|
126
137
|
class: "w-4 h-4"
|
|
127
|
-
}, null, 8, ["icon"])) :
|
|
138
|
+
}, null, 8, ["icon"])) : h.value ? (a(), f(y, {
|
|
128
139
|
key: 2,
|
|
129
140
|
icon: v.value ? "lucide:folder-open" : "lucide:folder",
|
|
130
141
|
class: "w-4 h-4"
|
|
131
|
-
}, null, 8, ["icon"])) : (
|
|
142
|
+
}, null, 8, ["icon"])) : (a(), f(y, {
|
|
132
143
|
key: 3,
|
|
133
144
|
icon: "lucide:file",
|
|
134
145
|
class: "w-4 h-4"
|
|
135
146
|
}))
|
|
136
147
|
]),
|
|
137
|
-
|
|
138
|
-
(
|
|
139
|
-
key:
|
|
148
|
+
g("div", se, [
|
|
149
|
+
(a(!0), o(K, null, M(O.value, (i, r) => (a(), o("span", {
|
|
150
|
+
key: r,
|
|
140
151
|
class: m({
|
|
141
|
-
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5":
|
|
152
|
+
"bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
|
|
142
153
|
})
|
|
143
|
-
},
|
|
154
|
+
}, S(i.text), 3))), 128))
|
|
144
155
|
]),
|
|
145
|
-
t.$slots.actions ? (
|
|
156
|
+
t.$slots.actions ? (a(), o("div", {
|
|
146
157
|
key: 3,
|
|
147
158
|
class: "ml-2 flex items-center shrink-0",
|
|
148
|
-
onClick: l[1] || (l[1] =
|
|
159
|
+
onClick: l[1] || (l[1] = C(() => {
|
|
149
160
|
}, ["stop"]))
|
|
150
161
|
}, [
|
|
151
162
|
I(t.$slots, "actions", { node: e.node })
|
|
152
163
|
])) : u("", !0)
|
|
153
164
|
], 6),
|
|
154
|
-
e.node.searchMatch ? (
|
|
165
|
+
e.node.searchMatch ? (a(), o("div", {
|
|
155
166
|
key: 1,
|
|
156
167
|
class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
|
|
157
|
-
style:
|
|
168
|
+
style: k({ paddingLeft: e.depth * 20 + 28 + "px" })
|
|
158
169
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
key:
|
|
170
|
+
g("span", ae, "L" + S(e.node.searchMatch.line_number), 1),
|
|
171
|
+
g("div", ie, [
|
|
172
|
+
(a(!0), o(K, null, M(j.value, (i, r) => (a(), o("span", {
|
|
173
|
+
key: r,
|
|
163
174
|
class: m({
|
|
164
|
-
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30":
|
|
175
|
+
"bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": i.highlight
|
|
165
176
|
})
|
|
166
|
-
},
|
|
177
|
+
}, S(i.text), 3))), 128))
|
|
167
178
|
])
|
|
168
179
|
], 4)) : u("", !0)
|
|
169
|
-
], 10,
|
|
170
|
-
v.value &&
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
+
], 10, te),
|
|
181
|
+
v.value && h.value && !$.value ? (a(), o("div", oe, [
|
|
182
|
+
e.node.children && e.node.children.length > 0 ? (a(!0), o(K, { key: 0 }, M(e.node.children, (i, r, E, b) => {
|
|
183
|
+
const B = [i, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, e.maxLabelLength, F.value, r === e.node.children.length - 1, !!t.$slots.actions];
|
|
184
|
+
if (b && b.key === i.id && J(b, B)) return b;
|
|
185
|
+
const z = (a(), f(s, {
|
|
186
|
+
key: i.id,
|
|
187
|
+
node: i,
|
|
181
188
|
depth: e.depth + 1,
|
|
189
|
+
"is-last": r === e.node.children.length - 1,
|
|
190
|
+
"ancestor-last-flags": F.value,
|
|
182
191
|
"selection-mode": e.selectionMode,
|
|
183
192
|
"selected-keys": e.selectedKeys,
|
|
184
193
|
"expanded-keys": e.expandedKeys,
|
|
@@ -189,23 +198,23 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
189
198
|
"search-query": e.searchQuery,
|
|
190
199
|
variant: e.variant,
|
|
191
200
|
"max-label-length": e.maxLabelLength,
|
|
192
|
-
onToggleExpand: l[2] || (l[2] = (
|
|
193
|
-
onToggleSelect: l[3] || (l[3] = (
|
|
194
|
-
onClickNode: l[4] || (l[4] = (
|
|
195
|
-
},
|
|
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 }, [
|
|
196
205
|
t.$slots.actions ? {
|
|
197
206
|
name: "actions",
|
|
198
|
-
fn:
|
|
199
|
-
I(t.$slots, "actions",
|
|
207
|
+
fn: X((c) => [
|
|
208
|
+
I(t.$slots, "actions", Y({ ref_for: !0 }, c))
|
|
200
209
|
]),
|
|
201
210
|
key: "0"
|
|
202
211
|
} : void 0
|
|
203
|
-
]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
|
|
204
|
-
return
|
|
205
|
-
}, l, 5), 128)) : v.value &&
|
|
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", {
|
|
206
215
|
key: 1,
|
|
207
216
|
class: "py-0.5 text-xs text-muted-foreground italic",
|
|
208
|
-
style:
|
|
217
|
+
style: k({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
|
|
209
218
|
}, null, 4)) : u("", !0)
|
|
210
219
|
])) : u("", !0)
|
|
211
220
|
]);
|
|
@@ -213,5 +222,5 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
|
|
|
213
222
|
}
|
|
214
223
|
});
|
|
215
224
|
export {
|
|
216
|
-
|
|
225
|
+
ue as default
|
|
217
226
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as b, computed as d, openBlock as n, createElementBlock as g, createElementVNode as R, createBlock as r, withCtx as x, createTextVNode as k, toDisplayString as I, createCommentVNode as v, unref as l } from "vue";
|
|
2
2
|
import B from "./TableView.vue.js";
|
|
3
|
-
import C from "./AccordionView.
|
|
3
|
+
import C from "./AccordionView.vue2.js";
|
|
4
4
|
import U from "../Label.vue.js";
|
|
5
5
|
import N from "../Button.vue.js";
|
|
6
6
|
import { useCustomFieldRows as V } from "./composables/useCustomFieldRows.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./RichTextToolbar.
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./RichTextLinkPopover.
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue2.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue2.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -16,15 +16,15 @@ import "v-datepicker-lite/style.css";
|
|
|
16
16
|
/* empty css */
|
|
17
17
|
import "@jaames/iro";
|
|
18
18
|
import "@vueuse/core";
|
|
19
|
-
/* empty css
|
|
19
|
+
/* empty css */
|
|
20
20
|
import "iconify-icon-picker";
|
|
21
21
|
import "iconify-icon-picker/style.css";
|
|
22
22
|
/* empty css */
|
|
23
|
-
/* empty css
|
|
23
|
+
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
|
-
/* empty css
|
|
27
|
-
/* empty css
|
|
26
|
+
/* empty css */
|
|
27
|
+
/* empty css */
|
|
28
28
|
import "../../core/config.js";
|
|
29
29
|
/* empty css */
|
|
30
30
|
/* empty css */
|