@septkit/ui 0.0.91 → 0.0.93
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/dist/explorer/explorer-search.js +2 -1
- package/dist/explorer/explorer.js +1 -1
- package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +123 -112
- package/dist/index.d.ts +23 -12
- package/dist/tree/collect-expandable-node-ids.js +8 -10
- package/dist/tree/flatten-tree.js +25 -24
- package/dist/tree/has-children.js +6 -0
- package/dist/tree/tree-index.js +21 -23
- package/dist/tree/tree.js +1 -1
- package/dist/tree/tree.vue_vue_type_script_setup_true_lang.js +37 -38
- package/dist/tree/use-tree-virtualization.js +54 -34
- package/dist/ui.css +1 -1
- package/package.json +2 -2
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./explorer.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region lib/explorer/explorer.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-3296f33f"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -3,26 +3,26 @@ import t from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_
|
|
|
3
3
|
import n from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/chevrons-up-down.js";
|
|
4
4
|
import r from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/search.js";
|
|
5
5
|
import i from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/x.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { hasChildren as a } from "../tree/has-children.js";
|
|
7
|
+
import { expandedIdsOf as o, isAllExpanded as ee, revealIds as te, toggleExpandedId as s } from "../tree/expansion.js";
|
|
8
|
+
import c from "../tree/tree.js";
|
|
8
9
|
import "../tree/index.js";
|
|
9
|
-
import { buildTreeIndex as
|
|
10
|
+
import { buildTreeIndex as l, findAncestorIds as u } from "../tree/tree-index.js";
|
|
10
11
|
import { filterExplorerTree as d, splitByMatch as f } from "./explorer-search.js";
|
|
11
|
-
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as
|
|
12
|
+
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as ne, createTextVNode as y, createVNode as b, defineComponent as x, mergeModels as S, normalizeClass as C, openBlock as w, ref as re, renderList as ie, renderSlot as T, toDisplayString as E, unref as D, useModel as O, vModelText as k, watch as A, withCtx as j, withDirectives as M, withKeys as N, withModifiers as P } from "vue";
|
|
12
13
|
//#region lib/explorer/explorer.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
class: "label",
|
|
14
|
+
var F = { class: "explorer" }, I = { class: "explorer__controls flex items-center gap-1 bg-base-100" }, L = { class: "input input-sm flex-1" }, R = ["disabled", "aria-label"], z = {
|
|
15
|
+
class: "label empty:hidden",
|
|
16
16
|
role: "status"
|
|
17
|
-
},
|
|
18
|
-
key:
|
|
17
|
+
}, B = {
|
|
18
|
+
key: 0,
|
|
19
19
|
class: "explorer__viewport"
|
|
20
|
-
},
|
|
20
|
+
}, V = { class: "pl-2 truncate" }, H = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "rounded-sm bg-warning/40 text-inherit"
|
|
23
|
-
},
|
|
23
|
+
}, U = /*@__PURE__*/ x({
|
|
24
24
|
__name: "explorer",
|
|
25
|
-
props: {
|
|
25
|
+
props: /*@__PURE__*/ S({
|
|
26
26
|
items: {},
|
|
27
27
|
expanded: { default: () => ({
|
|
28
28
|
scoped: [],
|
|
@@ -30,128 +30,139 @@ var P = { class: "explorer" }, F = { class: "explorer__controls flex items-cente
|
|
|
30
30
|
}) },
|
|
31
31
|
ariaLabel: { default: "SCL Tree" },
|
|
32
32
|
selected: {},
|
|
33
|
-
rowLabel: {}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
rowLabel: {},
|
|
34
|
+
searchLoading: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
term: { default: "" },
|
|
40
|
+
termModifiers: {}
|
|
41
|
+
}),
|
|
42
|
+
emits: /*@__PURE__*/ S([
|
|
36
43
|
"select",
|
|
37
44
|
"contextmenu",
|
|
38
45
|
"update:expanded"
|
|
39
|
-
],
|
|
40
|
-
setup(
|
|
41
|
-
let U =
|
|
46
|
+
], ["update:term"]),
|
|
47
|
+
setup(x, { emit: S }) {
|
|
48
|
+
let U = x, W = O(x, "term"), G = S, K = re(), q = m(() => l(U.items)), J = m(() => W.value.trim().length > 0), Y = m(() => d(q.value, W.value)), ae = m(() => J.value ? U.searchLoading ? "Searching..." : Y.value.items.length ? "" : "No results" : ""), oe = m(() => J.value ? {
|
|
42
49
|
scoped: [],
|
|
43
50
|
all: !0
|
|
44
|
-
} : U.expanded),
|
|
45
|
-
|
|
46
|
-
e === void 0 || !J.value || !q.value.byId.has(e) || Y.value.visibleIds?.has(e) || (
|
|
47
|
-
}),
|
|
51
|
+
} : U.expanded), se = m(() => o(U.expanded, q.value.expandableIds)), X = m(() => ee(U.expanded, q.value.expandableIds));
|
|
52
|
+
A(() => U.selected, (e) => {
|
|
53
|
+
e === void 0 || !J.value || !q.value.byId.has(e) || Y.value.visibleIds?.has(e) || (W.value = "");
|
|
54
|
+
}), A(W, (e, t) => {
|
|
48
55
|
if (!t.trim() || e.trim()) return;
|
|
49
56
|
let n = U.selected ?? K.value;
|
|
50
57
|
if (n === void 0 || U.expanded.all) return;
|
|
51
58
|
let r = u(q.value, n);
|
|
52
|
-
r !== void 0 &&
|
|
59
|
+
r !== void 0 && G("update:expanded", te(U.expanded, r));
|
|
53
60
|
});
|
|
54
|
-
function
|
|
55
|
-
|
|
61
|
+
function ce() {
|
|
62
|
+
G("update:expanded", {
|
|
56
63
|
scoped: [],
|
|
57
|
-
all: !
|
|
64
|
+
all: !X.value
|
|
58
65
|
});
|
|
59
66
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
67
|
+
function Z(e) {
|
|
68
|
+
G("update:expanded", s(se.value, e));
|
|
62
69
|
}
|
|
63
|
-
function
|
|
64
|
-
e.selectable === !1 && e
|
|
70
|
+
function le(e) {
|
|
71
|
+
e.selectable === !1 && a(e) && Z(e.id);
|
|
65
72
|
}
|
|
66
|
-
function
|
|
67
|
-
K.value = e.id,
|
|
73
|
+
function ue(e) {
|
|
74
|
+
K.value = e.id, G("select", e);
|
|
68
75
|
}
|
|
69
|
-
function
|
|
70
|
-
J.value ||
|
|
76
|
+
function Q(e) {
|
|
77
|
+
J.value || G("update:expanded", e);
|
|
71
78
|
}
|
|
72
79
|
function $() {
|
|
73
|
-
|
|
80
|
+
W.value = "";
|
|
74
81
|
}
|
|
75
|
-
return (a, o) => (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
return (a, o) => (w(), _("div", F, [
|
|
83
|
+
v("div", I, [v("label", L, [
|
|
84
|
+
b(D(r), {
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
size: 14,
|
|
87
|
+
class: "opacity-50"
|
|
88
|
+
}),
|
|
89
|
+
M(v("input", {
|
|
90
|
+
"onUpdate:modelValue": o[0] ||= (e) => W.value = e,
|
|
91
|
+
type: "text",
|
|
92
|
+
class: "grow",
|
|
93
|
+
placeholder: "Search by name",
|
|
94
|
+
"aria-label": "Search by name",
|
|
95
|
+
"data-testid": "explorer-search",
|
|
96
|
+
onKeydown: N($, ["esc"])
|
|
97
|
+
}, null, 544), [[k, W.value]]),
|
|
98
|
+
W.value ? (w(), _("button", {
|
|
99
|
+
key: 0,
|
|
100
|
+
type: "button",
|
|
101
|
+
class: "btn btn-ghost btn-circle btn-xs",
|
|
102
|
+
"aria-label": "Clear search",
|
|
103
|
+
onClick: $
|
|
104
|
+
}, [b(D(i), {
|
|
105
|
+
"aria-hidden": "true",
|
|
106
|
+
size: 14
|
|
107
|
+
})])) : g("", !0)
|
|
108
|
+
]), v("button", {
|
|
92
109
|
type: "button",
|
|
93
|
-
class: "btn btn-ghost btn-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
class: "btn btn-ghost btn-square btn-sm",
|
|
111
|
+
disabled: J.value || !q.value.expandableIds.length,
|
|
112
|
+
"aria-label": X.value ? "Collapse all" : "Expand all",
|
|
113
|
+
onClick: ce
|
|
114
|
+
}, [X.value ? (w(), h(D(n), {
|
|
115
|
+
key: 0,
|
|
97
116
|
"aria-hidden": "true",
|
|
98
|
-
size:
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
type: "button",
|
|
102
|
-
class: "btn btn-ghost btn-square btn-sm",
|
|
103
|
-
disabled: J.value || !q.value.expandableIds.length,
|
|
104
|
-
"aria-label": Z.value ? "Collapse all" : "Expand all",
|
|
105
|
-
onClick: ie
|
|
106
|
-
}, [Z.value ? (C(), h(O(n), {
|
|
107
|
-
key: 0,
|
|
108
|
-
"aria-hidden": "true",
|
|
109
|
-
size: 16
|
|
110
|
-
})) : (C(), h(O(t), {
|
|
111
|
-
key: 1,
|
|
112
|
-
"aria-hidden": "true",
|
|
113
|
-
size: 16
|
|
114
|
-
}))], 8, L)]), J.value && !Y.value.items.length ? (C(), _("p", R, "No results")) : (C(), _("div", z, [x(O(l), {
|
|
115
|
-
items: Y.value.items,
|
|
116
|
-
expanded: X.value,
|
|
117
|
-
selected: U.selected ?? K.value,
|
|
118
|
-
"aria-label": U.ariaLabel,
|
|
119
|
-
"row-label": U.rowLabel,
|
|
120
|
-
onSelect: oe,
|
|
121
|
-
onRowClick: ae,
|
|
122
|
-
onContextmenu: o[1] ||= (e) => W("contextmenu", e),
|
|
123
|
-
"onUpdate:expanded": se
|
|
124
|
-
}, y({
|
|
125
|
-
"node-toggle": A(({ node: t, hasChildren: n, expanded: r }) => [x(O(e), {
|
|
117
|
+
size: 16
|
|
118
|
+
})) : (w(), h(D(t), {
|
|
119
|
+
key: 1,
|
|
126
120
|
"aria-hidden": "true",
|
|
127
|
-
size: 16
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
121
|
+
size: 16
|
|
122
|
+
}))], 8, R)]),
|
|
123
|
+
v("p", z, E(ae.value), 1),
|
|
124
|
+
!J.value || Y.value.items.length ? (w(), _("div", B, [b(D(c), {
|
|
125
|
+
items: Y.value.items,
|
|
126
|
+
expanded: oe.value,
|
|
127
|
+
selected: U.selected ?? K.value,
|
|
128
|
+
"aria-label": U.ariaLabel,
|
|
129
|
+
"row-label": U.rowLabel,
|
|
130
|
+
onSelect: ue,
|
|
131
|
+
onRowClick: le,
|
|
132
|
+
onContextmenu: o[1] ||= (e) => G("contextmenu", e),
|
|
133
|
+
"onUpdate:expanded": Q
|
|
134
|
+
}, ne({
|
|
135
|
+
"node-toggle": j(({ node: t, hasChildren: n, expanded: r }) => [b(D(e), {
|
|
136
|
+
"aria-hidden": "true",
|
|
137
|
+
size: 16,
|
|
138
|
+
class: C(["explorer__chevron shrink-0", {
|
|
139
|
+
invisible: !n || J.value,
|
|
140
|
+
"explorer__chevron--open": r
|
|
141
|
+
}]),
|
|
142
|
+
onClick: P((e) => Z(t.id), ["stop"])
|
|
143
|
+
}, null, 8, ["class", "onClick"])]),
|
|
144
|
+
"node-label": j(({ node: e }) => [T(a.$slots, "node-label", {
|
|
145
|
+
node: e,
|
|
146
|
+
term: W.value
|
|
147
|
+
}, () => [v("span", V, [(w(!0), _(p, null, ie(D(f)(e.name, W.value), (e, t) => (w(), _(p, { key: t }, [e.match ? (w(), _("mark", H, E(e.text), 1)) : (w(), _(p, { key: 1 }, [y(E(e.text), 1)], 64))], 64))), 128))])], !0)]),
|
|
148
|
+
_: 2
|
|
149
|
+
}, [a.$slots["node-prefix"] ? {
|
|
150
|
+
name: "node-prefix",
|
|
151
|
+
fn: j(({ node: e }) => [T(a.$slots, "node-prefix", { node: e }, void 0, !0)]),
|
|
152
|
+
key: "0"
|
|
153
|
+
} : void 0, a.$slots["node-suffix"] ? {
|
|
154
|
+
name: "node-suffix",
|
|
155
|
+
fn: j(({ node: e }) => [T(a.$slots, "node-suffix", { node: e }, void 0, !0)]),
|
|
156
|
+
key: "1"
|
|
157
|
+
} : void 0]), 1032, [
|
|
158
|
+
"items",
|
|
159
|
+
"expanded",
|
|
160
|
+
"selected",
|
|
161
|
+
"aria-label",
|
|
162
|
+
"row-label"
|
|
163
|
+
])])) : g("", !0)
|
|
164
|
+
]));
|
|
154
165
|
}
|
|
155
166
|
});
|
|
156
167
|
//#endregion
|
|
157
|
-
export {
|
|
168
|
+
export { U as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -48,9 +48,9 @@ maxSize: number;
|
|
|
48
48
|
|
|
49
49
|
declare const __VLS_component_11: DefineComponent<__VLS_Props_21, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_21> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
50
50
|
|
|
51
|
-
declare const __VLS_component_12: DefineComponent<
|
|
51
|
+
declare const __VLS_component_12: DefineComponent<__VLS_PublicProps_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
52
52
|
"update:open": (value: boolean) => any;
|
|
53
|
-
}, string, PublicProps, Readonly<
|
|
53
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_7> & Readonly<{
|
|
54
54
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
55
55
|
}>, {
|
|
56
56
|
hoverDelay: number;
|
|
@@ -59,11 +59,11 @@ hoverDelay: number;
|
|
|
59
59
|
declare const __VLS_component_13: DefineComponent<__VLS_Props_26, {
|
|
60
60
|
focus: () => void | undefined;
|
|
61
61
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
62
|
-
toggle: (groupId: string) => any;
|
|
63
62
|
keydown: (event: KeyboardEvent) => any;
|
|
63
|
+
toggle: (groupId: string) => any;
|
|
64
64
|
}, string, PublicProps, Readonly<__VLS_Props_26> & Readonly<{
|
|
65
|
-
onToggle?: ((groupId: string) => any) | undefined;
|
|
66
65
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
66
|
+
onToggle?: ((groupId: string) => any) | undefined;
|
|
67
67
|
}>, {
|
|
68
68
|
expanded: boolean;
|
|
69
69
|
testId: string;
|
|
@@ -316,23 +316,26 @@ expanded: ExplorerExpandedState;
|
|
|
316
316
|
root: {} | null;
|
|
317
317
|
}, any>;
|
|
318
318
|
|
|
319
|
-
declare const __VLS_component_7: DefineComponent<
|
|
319
|
+
declare const __VLS_component_7: DefineComponent<__VLS_PublicProps_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
320
320
|
select: (node: ExplorerNode) => any;
|
|
321
321
|
contextmenu: (payload: {
|
|
322
322
|
node: ExplorerNode;
|
|
323
323
|
event: MouseEvent;
|
|
324
324
|
}) => any;
|
|
325
325
|
"update:expanded": (state: ExplorerExpandedState) => any;
|
|
326
|
-
|
|
326
|
+
"update:term": (value: string) => any;
|
|
327
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_4> & Readonly<{
|
|
327
328
|
onSelect?: ((node: ExplorerNode) => any) | undefined;
|
|
328
329
|
onContextmenu?: ((payload: {
|
|
329
330
|
node: ExplorerNode;
|
|
330
331
|
event: MouseEvent;
|
|
331
332
|
}) => any) | undefined;
|
|
332
333
|
"onUpdate:expanded"?: ((state: ExplorerExpandedState) => any) | undefined;
|
|
334
|
+
"onUpdate:term"?: ((value: string) => any) | undefined;
|
|
333
335
|
}>, {
|
|
334
336
|
ariaLabel: string;
|
|
335
337
|
expanded: ExplorerExpandedState;
|
|
338
|
+
searchLoading: boolean;
|
|
336
339
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
337
340
|
|
|
338
341
|
declare const __VLS_component_8: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -355,10 +358,10 @@ path: string;
|
|
|
355
358
|
}) => any) | undefined;
|
|
356
359
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
357
360
|
|
|
358
|
-
declare const __VLS_component_9: DefineComponent<
|
|
361
|
+
declare const __VLS_component_9: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
359
362
|
"update:modelValue": (value: string) => any;
|
|
360
363
|
"update:invalid": (value: boolean) => any;
|
|
361
|
-
}, string, PublicProps, Readonly<
|
|
364
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
|
|
362
365
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
363
366
|
"onUpdate:invalid"?: ((value: boolean) => any) | undefined;
|
|
364
367
|
}>, {
|
|
@@ -406,6 +409,8 @@ declare type __VLS_Props_12 = {
|
|
|
406
409
|
selected?: string;
|
|
407
410
|
/** What a row is called for assistive technology, when the text drawn in it says less or more. */
|
|
408
411
|
rowLabel?: (node: ExplorerNode) => string | undefined;
|
|
412
|
+
/** The consumer is still loading the rows to search: the matches shown so far are not all of them. */
|
|
413
|
+
searchLoading?: boolean;
|
|
409
414
|
};
|
|
410
415
|
|
|
411
416
|
declare type __VLS_Props_13 = {
|
|
@@ -655,15 +660,19 @@ declare type __VLS_PublicProps_3 = {
|
|
|
655
660
|
} & __VLS_Props_5;
|
|
656
661
|
|
|
657
662
|
declare type __VLS_PublicProps_4 = {
|
|
663
|
+
'term'?: string;
|
|
664
|
+
} & __VLS_Props_12;
|
|
665
|
+
|
|
666
|
+
declare type __VLS_PublicProps_5 = {
|
|
658
667
|
modelValue: NoteCategory[];
|
|
659
668
|
};
|
|
660
669
|
|
|
661
|
-
declare type
|
|
670
|
+
declare type __VLS_PublicProps_6 = {
|
|
662
671
|
modelValue?: string;
|
|
663
672
|
'invalid'?: boolean;
|
|
664
673
|
} & __VLS_Props_19;
|
|
665
674
|
|
|
666
|
-
declare type
|
|
675
|
+
declare type __VLS_PublicProps_7 = {
|
|
667
676
|
'open'?: boolean;
|
|
668
677
|
} & __VLS_Props_22;
|
|
669
678
|
|
|
@@ -1561,6 +1570,8 @@ export declare type ExplorerNode = {
|
|
|
1561
1570
|
name: string;
|
|
1562
1571
|
selectable?: boolean;
|
|
1563
1572
|
children?: ExplorerNode[];
|
|
1573
|
+
/** Has children not loaded yet: drawn as a branch the user can open. */
|
|
1574
|
+
hasChildren?: boolean;
|
|
1564
1575
|
};
|
|
1565
1576
|
|
|
1566
1577
|
/** Map of named extension modules. */
|
|
@@ -2044,9 +2055,9 @@ export declare const NOTE_STATUSES: readonly ["open", "resolved", "removed"];
|
|
|
2044
2055
|
|
|
2045
2056
|
export declare type NoteCategory = (typeof NOTE_CATEGORIES)[number];
|
|
2046
2057
|
|
|
2047
|
-
export declare const NoteCategoryPicker: DefineComponent<
|
|
2058
|
+
export declare const NoteCategoryPicker: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2048
2059
|
"update:modelValue": (value: ("feedback" | "instantiation" | "interlock")[]) => any;
|
|
2049
|
-
}, string, PublicProps, Readonly<
|
|
2060
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{
|
|
2050
2061
|
"onUpdate:modelValue"?: ((value: ("feedback" | "instantiation" | "interlock")[]) => any) | undefined;
|
|
2051
2062
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLFieldSetElement>;
|
|
2052
2063
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { hasChildren as e } from "./has-children.js";
|
|
1
2
|
//#region lib/tree/collect-expandable-node-ids.ts
|
|
2
|
-
function
|
|
3
|
-
let
|
|
4
|
-
for (;
|
|
5
|
-
let
|
|
6
|
-
if (e.children
|
|
7
|
-
t.push(e.id);
|
|
8
|
-
for (let t = e.children.length - 1; t >= 0; t--) n.push(e.children[t]);
|
|
9
|
-
}
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = [], r = [...t].reverse();
|
|
5
|
+
for (; r.length;) {
|
|
6
|
+
let t = r.pop();
|
|
7
|
+
if (e(t) && (n.push(t.id), t.children)) for (let e = t.children.length - 1; e >= 0; e--) r.push(t.children[e]);
|
|
10
8
|
}
|
|
11
|
-
return
|
|
9
|
+
return n;
|
|
12
10
|
}
|
|
13
11
|
//#endregion
|
|
14
|
-
export {
|
|
12
|
+
export { t as collectExpandableNodeIds };
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
+
import { hasChildren as e } from "./has-children.js";
|
|
1
2
|
//#region lib/tree/flatten-tree.ts
|
|
2
|
-
function
|
|
3
|
-
let
|
|
4
|
-
nodes:
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let r = [], i = [{
|
|
5
|
+
nodes: t,
|
|
5
6
|
index: 0,
|
|
6
7
|
depth: 1,
|
|
7
8
|
parentIndex: void 0
|
|
8
9
|
}];
|
|
9
|
-
for (;
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
|
|
10
|
+
for (; i.length;) {
|
|
11
|
+
let t = i[i.length - 1];
|
|
12
|
+
if (t.index >= t.nodes.length) {
|
|
13
|
+
i.pop();
|
|
13
14
|
continue;
|
|
14
15
|
}
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
id:
|
|
18
|
-
index:
|
|
19
|
-
node:
|
|
20
|
-
depth:
|
|
21
|
-
posInSet:
|
|
22
|
-
setSize:
|
|
23
|
-
parentIndex:
|
|
24
|
-
hasChildren:
|
|
25
|
-
expanded:
|
|
26
|
-
}),
|
|
27
|
-
nodes:
|
|
16
|
+
let a = t.nodes[t.index++], o = r.length, s = e(a), c = s && n.has(a.id);
|
|
17
|
+
r.push({
|
|
18
|
+
id: a.id,
|
|
19
|
+
index: o,
|
|
20
|
+
node: a,
|
|
21
|
+
depth: t.depth,
|
|
22
|
+
posInSet: t.index,
|
|
23
|
+
setSize: t.nodes.length,
|
|
24
|
+
parentIndex: t.parentIndex,
|
|
25
|
+
hasChildren: s,
|
|
26
|
+
expanded: c
|
|
27
|
+
}), c && a.children?.length && i.push({
|
|
28
|
+
nodes: a.children,
|
|
28
29
|
index: 0,
|
|
29
|
-
depth:
|
|
30
|
-
parentIndex:
|
|
30
|
+
depth: t.depth + 1,
|
|
31
|
+
parentIndex: o
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
+
return r;
|
|
34
35
|
}
|
|
35
36
|
//#endregion
|
|
36
|
-
export {
|
|
37
|
+
export { t as flattenTree };
|
package/dist/tree/tree-index.js
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
+
import { hasChildren as e } from "./has-children.js";
|
|
1
2
|
//#region lib/tree/tree-index.ts
|
|
2
|
-
function
|
|
3
|
-
let
|
|
4
|
-
for (let
|
|
5
|
-
node: e
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = [], r = /* @__PURE__ */ new Map(), i = [], a = [];
|
|
5
|
+
for (let e = t.length - 1; e >= 0; e--) a.push({
|
|
6
|
+
node: t[e],
|
|
6
7
|
parentId: void 0,
|
|
7
|
-
lowerName: e
|
|
8
|
+
lowerName: t[e].name.toLowerCase()
|
|
8
9
|
});
|
|
9
|
-
for (;
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
lowerName: t.name.toLowerCase()
|
|
19
|
-
});
|
|
20
|
-
}
|
|
10
|
+
for (; a.length;) {
|
|
11
|
+
let t = a.pop(), { node: o } = t;
|
|
12
|
+
if (n.push(t), r.set(o.id, t), e(o) && (i.push(o.id), o.children)) for (let e = o.children.length - 1; e >= 0; e--) {
|
|
13
|
+
let t = o.children[e];
|
|
14
|
+
a.push({
|
|
15
|
+
node: t,
|
|
16
|
+
parentId: o.id,
|
|
17
|
+
lowerName: t.name.toLowerCase()
|
|
18
|
+
});
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
return {
|
|
24
|
-
items:
|
|
25
|
-
nodes:
|
|
26
|
-
byId:
|
|
27
|
-
expandableIds:
|
|
22
|
+
items: t,
|
|
23
|
+
nodes: n,
|
|
24
|
+
byId: r,
|
|
25
|
+
expandableIds: i
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
|
-
function
|
|
28
|
+
function n(e, t) {
|
|
31
29
|
let n = e.byId.get(t);
|
|
32
30
|
if (!n) return;
|
|
33
31
|
let r = [];
|
|
@@ -35,4 +33,4 @@ function t(e, t) {
|
|
|
35
33
|
return r.reverse();
|
|
36
34
|
}
|
|
37
35
|
//#endregion
|
|
38
|
-
export {
|
|
36
|
+
export { t as buildTreeIndex, n as findAncestorIds };
|
package/dist/tree/tree.js
CHANGED
|
@@ -2,6 +2,6 @@ import e from "./tree.vue_vue_type_script_setup_true_lang.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
//#region lib/tree/tree.vue
|
|
5
|
-
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-39de0682"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|