@dxos/plugin-navtree 0.8.4-main.b97322e → 0.8.4-main.bcb3aa67d6
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/lib/browser/index.mjs +168 -115
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/NavTreePlugin.d.ts +2 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +7 -105
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +3 -2
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -18
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts +12 -5
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +26 -5
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/{NavTreeContext.d.ts → NavTreeContext/NavTreeContext.d.ts} +1 -1
- package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts +2 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +17 -9
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +33 -4
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +2 -2
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +10 -5
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +4 -8
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +13 -0
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +8 -16
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts +6 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +29 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts +3 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts +3 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts +9 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts +3 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.d.ts +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +3 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/experimental/Tree.d.ts +1 -2
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts +23 -6
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +5 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useActions.d.ts +5 -0
- package/dist/types/src/hooks/useActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts +6 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts +7 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts +22 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/expose.d.ts +5 -0
- package/dist/types/src/operations/expose.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +5 -6
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts +2 -2
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -9
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +16 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +10 -9
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util.d.ts +12 -9
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +67 -54
- package/src/NavTreePlugin.tsx +65 -84
- package/src/capabilities/app-graph-builder.ts +34 -44
- package/src/capabilities/index.ts +10 -8
- package/src/capabilities/keyboard.ts +58 -51
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +45 -37
- package/src/capabilities/state.ts +129 -84
- package/src/components/NavTree/NavTree.stories.tsx +106 -99
- package/src/components/NavTree/NavTree.tsx +70 -35
- package/src/components/{NavTreeContext.tsx → NavTreeContext/NavTreeContext.tsx} +1 -1
- package/src/components/NavTreeContext/index.ts +5 -0
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +19 -13
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +71 -47
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +70 -38
- package/src/components/Sidebar/L0Menu.tsx +171 -206
- package/src/components/Sidebar/L1Panel.tsx +270 -135
- package/src/components/Sidebar/L1Tabs.tsx +43 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -9
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
- package/src/components/index.ts +1 -3
- package/src/components/types.ts +15 -19
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +131 -0
- package/src/containers/CommandsDialogContent/index.ts +7 -0
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +28 -0
- package/src/containers/CommandsTrigger/index.ts +7 -0
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +271 -0
- package/src/containers/NavTreeContainer/index.ts +6 -0
- package/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.tsx +5 -4
- package/src/containers/NavTreeDocumentTitle/index.ts +7 -0
- package/src/containers/index.ts +12 -0
- package/src/experimental/Tree.stories.tsx +78 -83
- package/src/experimental/Tree.tsx +6 -23
- package/src/hooks/index.ts +8 -0
- package/src/hooks/useActions.ts +34 -0
- package/src/hooks/useLoadDescendents.ts +23 -0
- package/src/hooks/useNavTreeModel.ts +118 -0
- package/src/hooks/useNavTreeState.ts +42 -0
- package/src/index.ts +1 -2
- package/src/meta.ts +11 -8
- package/src/operations/expose.ts +42 -0
- package/src/operations/index.ts +7 -0
- package/src/testing/app-graph-builder.ts +166 -237
- package/src/testing/generator.ts +20 -18
- package/src/testing/update-state.ts +6 -6
- package/src/translations.ts +9 -9
- package/src/types/capabilities.ts +21 -0
- package/src/types/events.ts +12 -0
- package/src/types/index.ts +7 -0
- package/src/{types.ts → types/schema.ts} +9 -8
- package/src/util.ts +26 -33
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs +0 -45
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
- package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
- package/dist/lib/browser/chunk-SICQTLXC.mjs +0 -1442
- package/dist/lib/browser/chunk-SICQTLXC.mjs.map +0 -7
- package/dist/lib/browser/chunk-WCARAZ7J.mjs +0 -15
- package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs +0 -47
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs +0 -51
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WURHCBQQ.mjs +0 -51
- package/dist/lib/browser/react-surface-WURHCBQQ.mjs.map +0 -7
- package/dist/lib/browser/state-54DY3DOY.mjs +0 -117
- package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +0 -5
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/index.d.ts +0 -3
- package/dist/types/src/components/CommandsDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContainer.d.ts +0 -9
- package/dist/types/src/components/NavTreeContainer.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContext.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks.d.ts +0 -3
- package/dist/types/src/hooks.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -20
- package/src/capabilities/intent-resolver.ts +0 -37
- package/src/components/CommandsDialog/CommandsDialog.tsx +0 -118
- package/src/components/CommandsDialog/CommandsTrigger.tsx +0 -35
- package/src/components/CommandsDialog/index.ts +0 -6
- package/src/components/NavTreeContainer.tsx +0 -313
- package/src/events.ts +0 -11
- package/src/hooks.ts +0 -21
- /package/dist/types/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.d.ts +0 -0
|
@@ -2,103 +2,148 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
6
7
|
|
|
7
|
-
import { Capabilities,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
10
|
+
import { Graph, Node } from '@dxos/plugin-graph';
|
|
10
11
|
import { Path } from '@dxos/react-ui-list';
|
|
11
12
|
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { type NavTreeCapabilities as NC, NavTreeCapabilities } from '#types';
|
|
14
15
|
|
|
15
|
-
const KEY = `${
|
|
16
|
+
const KEY = `${meta.id}.state.v1`;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
/** Default item state for new entries. */
|
|
19
|
+
const defaultItemState: NC.NavTreeItemState = { open: false, current: false, alternateTree: false };
|
|
20
|
+
|
|
21
|
+
/** L0 (top-level workspace) paths are direct children of root — not part of the expandable tree model. */
|
|
22
|
+
const isTopLevelPath = (path: string[]): boolean => path.length === 2 && path[0] === Node.RootId;
|
|
23
|
+
|
|
24
|
+
/** Default state entries for initial tree structure. */
|
|
25
|
+
// TODO(thure): Initialize these dynamically.
|
|
26
|
+
const defaultStateEntries: [string, NC.NavTreeItemState][] = [['root', { open: true, current: false }]];
|
|
27
|
+
|
|
28
|
+
const getInitialState = (): Map<string, NC.NavTreeItemState> => {
|
|
18
29
|
const stringified = localStorage.getItem(KEY);
|
|
19
30
|
if (!stringified) {
|
|
20
|
-
return;
|
|
31
|
+
return new Map(defaultStateEntries);
|
|
21
32
|
}
|
|
22
33
|
|
|
23
34
|
try {
|
|
24
35
|
const cached: [string, { open: boolean; current: boolean }][] = JSON.parse(stringified);
|
|
25
|
-
return cached.map(([key, value])
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} catch {}
|
|
36
|
+
return new Map(cached.map(([key, value]) => [key, { open: value.open, current: false }]));
|
|
37
|
+
} catch {
|
|
38
|
+
return new Map(defaultStateEntries);
|
|
39
|
+
}
|
|
30
40
|
};
|
|
31
41
|
|
|
32
|
-
export default (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return value;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const setItem = (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => {
|
|
59
|
-
const value = getItem(path);
|
|
60
|
-
value[key] = next;
|
|
61
|
-
|
|
62
|
-
localStorage.setItem(KEY, JSON.stringify(Array.from(state.entries())));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const isOpen = (path: string[]) => getItem(path).open;
|
|
66
|
-
const isCurrent = (path: string[]) => getItem(path).current;
|
|
67
|
-
const isAlternateTree = (path: string[]) => {
|
|
68
|
-
const item = getItem(path);
|
|
69
|
-
return item.alternateTree ?? false;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
let previous: string[] = [];
|
|
73
|
-
const unsubscribe = effect(() => {
|
|
74
|
-
const removed = previous.filter((id) => !layout.active.includes(id));
|
|
75
|
-
previous = layout.active;
|
|
76
|
-
|
|
77
|
-
const handleUpdate = () => {
|
|
78
|
-
removed.forEach((id) => {
|
|
79
|
-
const keys = Array.from(state.keys()).filter((key) => Path.last(key) === id);
|
|
80
|
-
keys.forEach((key) => {
|
|
81
|
-
setItem(Path.parts(key), 'current', false);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
42
|
+
export default Capability.makeModule(
|
|
43
|
+
Effect.fnUntraced(function* () {
|
|
44
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
45
|
+
const layoutAtom = yield* Capability.get(AppCapabilities.Layout);
|
|
46
|
+
|
|
47
|
+
// Backing state for persistence (not reactive).
|
|
48
|
+
const backingState = getInitialState();
|
|
49
|
+
|
|
50
|
+
// Per-path atom family for fine-grained reactivity.
|
|
51
|
+
// keepAlive prevents atoms from being garbage collected when components unmount,
|
|
52
|
+
// ensuring state is preserved across deletion/restoration cycles.
|
|
53
|
+
const itemAtomFamily = Atom.family((pathString: string) =>
|
|
54
|
+
Atom.make<NC.NavTreeItemState>(backingState.get(pathString) ?? { ...defaultItemState }).pipe(Atom.keepAlive),
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const getItemAtom = (path: string[]): Atom.Atom<NC.NavTreeItemState> => {
|
|
58
|
+
const pathString = Path.create(...path);
|
|
59
|
+
if (!backingState.has(pathString)) {
|
|
60
|
+
backingState.set(pathString, { ...defaultItemState });
|
|
61
|
+
}
|
|
62
|
+
return itemAtomFamily(pathString);
|
|
63
|
+
};
|
|
84
64
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
keys.forEach((key) => {
|
|
88
|
-
setItem(Path.parts(key), 'current', true);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
65
|
+
const getItem = (path: string[]): NC.NavTreeItemState => {
|
|
66
|
+
return registry.get(getItemAtom(path));
|
|
91
67
|
};
|
|
92
68
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
69
|
+
const setItem = (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => {
|
|
70
|
+
const pathString = Path.create(...path);
|
|
71
|
+
const atom = itemAtomFamily(pathString);
|
|
72
|
+
const currentValue = registry.get(atom);
|
|
73
|
+
const newValue = { ...currentValue, [key]: next };
|
|
74
|
+
|
|
75
|
+
registry.set(atom, newValue);
|
|
76
|
+
|
|
77
|
+
if (!(key === 'open' && isTopLevelPath(path))) {
|
|
78
|
+
backingState.set(pathString, newValue);
|
|
79
|
+
localStorage.setItem(KEY, JSON.stringify(Array.from(backingState.entries())));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Subscribe to layout changes to update current state.
|
|
84
|
+
let previous: string[] = [];
|
|
85
|
+
const unsubscribe = registry.subscribe(layoutAtom, (layout) => {
|
|
86
|
+
const removed = previous.filter((id) => !layout.active.includes(id));
|
|
87
|
+
previous = layout.active;
|
|
88
|
+
|
|
89
|
+
const handleUpdate = () => {
|
|
90
|
+
// Mark removed items as not current.
|
|
91
|
+
removed.forEach((id) => {
|
|
92
|
+
const keys = Array.from(backingState.keys()).filter((key) => Path.last(key) === id);
|
|
93
|
+
keys.forEach((key) => {
|
|
94
|
+
setItem(Path.parts(key), 'current', false);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Mark active items as current.
|
|
99
|
+
layout.active.forEach((id: string) => {
|
|
100
|
+
const keys = Array.from(new Set([...backingState.keys(), id])).filter((key) => Path.last(key) === id);
|
|
101
|
+
keys.forEach((key) => {
|
|
102
|
+
setItem(Path.parts(key), 'current', true);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// TODO(wittjosiah): This is setTimeout because there's a race between the keys being initialized.
|
|
108
|
+
// Keys are initialized on the first render of an item in the navtree.
|
|
109
|
+
// This could be avoided if the location was a path as well and not just an id.
|
|
110
|
+
const timeout = setTimeout(handleUpdate, 500);
|
|
111
|
+
handleUpdate();
|
|
112
|
+
return () => clearTimeout(timeout);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Once graph is ready, expand every node marked open in state so the graph has children loaded for rendering.
|
|
116
|
+
yield* Effect.gen(function* () {
|
|
117
|
+
const { graph } = yield* Capability.waitFor(AppCapabilities.AppGraph);
|
|
118
|
+
|
|
119
|
+
// Always expand the active workspace so its subtree is initialized.
|
|
120
|
+
const layout = registry.get(layoutAtom);
|
|
121
|
+
if (layout.workspace) {
|
|
122
|
+
Graph.expand(graph, layout.workspace, 'child');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Expand persisted open nodes, skipping inactive workspace tabs.
|
|
126
|
+
const openPaths = Array.from(backingState.entries())
|
|
127
|
+
.filter(([, state]) => state.open)
|
|
128
|
+
.map(([pathString]) => Path.parts(pathString))
|
|
129
|
+
.filter((path) => !isTopLevelPath(path));
|
|
130
|
+
for (const path of openPaths) {
|
|
131
|
+
const nodeId = path[path.length - 1];
|
|
132
|
+
if (!nodeId) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
Graph.expand(graph, nodeId, 'child');
|
|
136
|
+
}
|
|
137
|
+
}).pipe(Effect.forkDaemon);
|
|
138
|
+
|
|
139
|
+
return Capability.contributes(
|
|
140
|
+
NavTreeCapabilities.State,
|
|
141
|
+
{
|
|
142
|
+
getItem,
|
|
143
|
+
getItemAtom,
|
|
144
|
+
setItem,
|
|
145
|
+
},
|
|
146
|
+
() => Effect.sync(() => unsubscribe()),
|
|
147
|
+
);
|
|
148
|
+
}),
|
|
149
|
+
);
|
|
@@ -2,45 +2,33 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
Capabilities,
|
|
13
|
-
IntentPlugin,
|
|
14
|
-
LayoutAction,
|
|
15
|
-
SettingsPlugin,
|
|
16
|
-
contributes,
|
|
17
|
-
createResolver,
|
|
18
|
-
defineCapability,
|
|
19
|
-
useCapability,
|
|
20
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import React, { type KeyboardEvent, useCallback, useRef } from 'react';
|
|
9
|
+
import { expect, userEvent, within } from 'storybook/test';
|
|
10
|
+
|
|
11
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
21
12
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
27
|
-
import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
|
|
28
|
-
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
13
|
+
import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
14
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
15
|
+
import { Operation, OperationHandlerSet } from '@dxos/operation';
|
|
16
|
+
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
29
17
|
import { faker } from '@dxos/random';
|
|
30
18
|
import { IconButton, Input, Main, Toolbar } from '@dxos/react-ui';
|
|
31
|
-
import {
|
|
19
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
20
|
+
import { useAttention, useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
32
21
|
import { Stack, StackItem } from '@dxos/react-ui-stack';
|
|
33
|
-
import {
|
|
34
|
-
import { withLayout } from '@dxos/storybook-utils';
|
|
22
|
+
import { mx } from '@dxos/ui-theme';
|
|
35
23
|
|
|
24
|
+
import { NavTreeContainer } from '#containers';
|
|
36
25
|
import { NavTreePlugin } from '../../NavTreePlugin';
|
|
37
|
-
import { storybookGraphBuilders } from '
|
|
26
|
+
import { storybookGraphBuilders } from '#testing';
|
|
38
27
|
import { translations } from '../../translations';
|
|
39
|
-
import { NavTreeContainer } from '../NavTreeContainer';
|
|
40
28
|
|
|
41
29
|
faker.seed(1234);
|
|
42
30
|
|
|
43
|
-
const StoryState =
|
|
31
|
+
const StoryState = Capability.make<Atom.Atom<{ tab: string }>>('story-state');
|
|
44
32
|
|
|
45
33
|
// TODO(burdon): Fix outline (e.g., button in sidebar nav is clipped when focused).
|
|
46
34
|
// TODO(burdon): Consider similar containment of: Table, Sheet, Kanban Column, Form, etc.
|
|
@@ -59,7 +47,7 @@ const StoryPlankHeading = ({ attendableId }: { attendableId: string }) => {
|
|
|
59
47
|
label='Test'
|
|
60
48
|
iconOnly
|
|
61
49
|
variant={hasAttention ? 'primary' : 'ghost'}
|
|
62
|
-
classNames='
|
|
50
|
+
classNames='w-(--dx-rail-action) h-(--dx-rail-action)'
|
|
63
51
|
/>
|
|
64
52
|
<StackItem.ResizeHandle />
|
|
65
53
|
</div>
|
|
@@ -68,25 +56,36 @@ const StoryPlankHeading = ({ attendableId }: { attendableId: string }) => {
|
|
|
68
56
|
|
|
69
57
|
const StoryPlank = ({ attendableId }: { attendableId: string }) => {
|
|
70
58
|
const attentionAttrs = useAttentionAttributes(attendableId);
|
|
59
|
+
const rootElement = useRef<HTMLDivElement | null>(null);
|
|
60
|
+
|
|
61
|
+
// NOTE(thure): This is the same workaround as in Plank, but that component is out of scope for this story.
|
|
62
|
+
// TODO(thure): Tabster’s focus group should handle moving focus to Main, but something is blocking it.
|
|
63
|
+
const handleKeyDown = useCallback((event: KeyboardEvent) => {
|
|
64
|
+
if (event.target === event.currentTarget && event.key === 'Escape') {
|
|
65
|
+
rootElement.current?.closest('main')?.focus();
|
|
66
|
+
}
|
|
67
|
+
}, []);
|
|
71
68
|
|
|
72
69
|
return (
|
|
73
70
|
<StackItem.Root
|
|
74
71
|
item={{ id: attendableId }}
|
|
75
72
|
{...attentionAttrs}
|
|
76
|
-
classNames='bg-
|
|
73
|
+
classNames='bg-base-surface border-e border-separator'
|
|
77
74
|
size={30}
|
|
75
|
+
onKeyDown={handleKeyDown}
|
|
76
|
+
ref={rootElement}
|
|
78
77
|
>
|
|
79
78
|
<StoryPlankHeading attendableId={attendableId} />
|
|
80
79
|
<StackItem.Content toolbar>
|
|
81
|
-
<Toolbar.Root classNames='border-b border-
|
|
80
|
+
<Toolbar.Root classNames='border-b border-subdued-separator'>
|
|
82
81
|
<Toolbar.Button>Test</Toolbar.Button>
|
|
83
82
|
</Toolbar.Root>
|
|
84
83
|
|
|
85
|
-
<div className={mx(container, 'm-2 bg-
|
|
84
|
+
<div className={mx(container, 'm-2 bg-active-surface')}>
|
|
86
85
|
<Input.Root>
|
|
87
86
|
<Input.Label>Level 1 (group)</Input.Label>
|
|
88
87
|
</Input.Root>
|
|
89
|
-
<div className={mx(container, 'bg-
|
|
88
|
+
<div className={mx(container, 'bg-base-surface')}>
|
|
90
89
|
<Input.Root>
|
|
91
90
|
<Input.Label>Level 2 (base)</Input.Label>
|
|
92
91
|
<Input.TextArea placeholder='Enter text' />
|
|
@@ -99,10 +98,10 @@ const StoryPlank = ({ attendableId }: { attendableId: string }) => {
|
|
|
99
98
|
};
|
|
100
99
|
|
|
101
100
|
const DefaultStory = () => {
|
|
102
|
-
const state =
|
|
101
|
+
const state = useAtomCapability(StoryState);
|
|
103
102
|
|
|
104
103
|
return (
|
|
105
|
-
<Main.Root
|
|
104
|
+
<Main.Root navigationSidebarState='expanded'>
|
|
106
105
|
<Main.NavigationSidebar label='Navigation' classNames='grid'>
|
|
107
106
|
<NavTreeContainer tab={state.tab} />
|
|
108
107
|
</Main.NavigationSidebar>
|
|
@@ -116,85 +115,93 @@ const DefaultStory = () => {
|
|
|
116
115
|
);
|
|
117
116
|
};
|
|
118
117
|
|
|
119
|
-
const meta
|
|
120
|
-
title: 'plugins/plugin-navtree/NavTree',
|
|
118
|
+
const meta = {
|
|
119
|
+
title: 'plugins/plugin-navtree/components/NavTree',
|
|
121
120
|
component: NavTreeContainer,
|
|
122
121
|
render: DefaultStory,
|
|
123
122
|
decorators: [
|
|
123
|
+
withLayout({ layout: 'fullscreen' }),
|
|
124
124
|
withPluginManager({
|
|
125
125
|
plugins: [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
AttentionPlugin(),
|
|
126
|
+
...corePlugins(),
|
|
127
|
+
StorybookPlugin({
|
|
128
|
+
initialState: { sidebarState: 'expanded' },
|
|
129
|
+
}),
|
|
130
|
+
|
|
132
131
|
NavTreePlugin(),
|
|
133
132
|
],
|
|
134
|
-
capabilities: (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
133
|
+
capabilities: () => {
|
|
134
|
+
const storyStateAtom = Atom.make({ tab: 'root/space-0' }).pipe(Atom.keepAlive);
|
|
135
|
+
return [
|
|
136
|
+
Capability.contributes(StoryState, storyStateAtom),
|
|
137
|
+
Capability.contributes(AppCapabilities.AppGraphBuilder, storybookGraphBuilders()),
|
|
138
|
+
Capability.contributes(
|
|
139
|
+
Capabilities.OperationHandler,
|
|
140
|
+
OperationHandlerSet.make(
|
|
141
|
+
Operation.withHandler(LayoutOperation.SwitchWorkspace, ({ subject }) =>
|
|
142
|
+
Effect.gen(function* () {
|
|
143
|
+
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
144
|
+
registry.set(storyStateAtom, { tab: subject });
|
|
145
|
+
}),
|
|
146
|
+
),
|
|
147
|
+
),
|
|
148
|
+
),
|
|
149
|
+
];
|
|
150
|
+
},
|
|
149
151
|
}),
|
|
150
|
-
withLayout({ fullscreen: true }),
|
|
151
152
|
],
|
|
152
153
|
parameters: {
|
|
154
|
+
layout: 'fullscreen',
|
|
153
155
|
translations,
|
|
154
156
|
},
|
|
155
|
-
}
|
|
157
|
+
} satisfies Meta<typeof NavTreeContainer>;
|
|
156
158
|
|
|
157
159
|
export default meta;
|
|
158
160
|
|
|
159
161
|
type Story = StoryObj<typeof NavTreeContainer>;
|
|
160
162
|
|
|
161
|
-
export const Default: Story = {
|
|
163
|
+
export const Default: Story = {
|
|
164
|
+
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
|
|
165
|
+
const canvas = within(canvasElement);
|
|
162
166
|
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
167
|
+
// Find the element with treegrid role and click on its parent
|
|
168
|
+
const treegridElement = await canvas.findByRole('treegrid');
|
|
169
|
+
const treegridParent = treegridElement.parentElement;
|
|
170
|
+
if (treegridParent) {
|
|
171
|
+
await userEvent.click(treegridParent);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Press Escape
|
|
175
|
+
await userEvent.keyboard('{Escape}');
|
|
176
|
+
|
|
177
|
+
// Confirm that focus is on an element with attribute data-main-landmark="0"
|
|
178
|
+
await expect(document.activeElement).toHaveAttribute('data-main-landmark', '0');
|
|
179
|
+
|
|
180
|
+
// Press Tab
|
|
181
|
+
await userEvent.keyboard('{Tab}');
|
|
182
|
+
|
|
183
|
+
// Confirm that focus is now on an element with data-main-landmark="1"
|
|
184
|
+
await expect(document.activeElement).toHaveAttribute('data-main-landmark', '1');
|
|
185
|
+
|
|
186
|
+
// Press Tab
|
|
187
|
+
await userEvent.keyboard('{Tab}');
|
|
188
|
+
|
|
189
|
+
// Confirm that focus is now on an element with data-main-landmark="0"
|
|
190
|
+
await expect(document.activeElement).toHaveAttribute('data-main-landmark', '0');
|
|
191
|
+
|
|
192
|
+
// Press Shift-Tab
|
|
193
|
+
await userEvent.keyboard('{Shift>}{Tab}{/Shift}');
|
|
194
|
+
|
|
195
|
+
// Press Enter
|
|
196
|
+
await userEvent.keyboard('{Enter}');
|
|
197
|
+
|
|
198
|
+
// Confirm that focus is now on an element with data-attendable-id="space-0:object-0"
|
|
199
|
+
await expect(document.activeElement).toHaveAttribute('data-attendable-id', 'space-0:object-0');
|
|
200
|
+
|
|
201
|
+
// Press Escape
|
|
202
|
+
await userEvent.keyboard('{Escape}');
|
|
203
|
+
|
|
204
|
+
// Confirm that focus is now on an element with data-main-landmark="1"
|
|
205
|
+
await expect(document.activeElement).toHaveAttribute('data-main-landmark', '1');
|
|
206
|
+
},
|
|
200
207
|
};
|
|
@@ -2,52 +2,35 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
5
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { Node, useConnections, useActions as useGraphActions } from '@dxos/plugin-graph';
|
|
8
9
|
import { Tabs } from '@dxos/react-ui-tabs';
|
|
10
|
+
import { byPosition } from '@dxos/util';
|
|
9
11
|
|
|
10
|
-
import { useLoadDescendents } from '
|
|
11
|
-
import { type NavTreeItemGraphNode } from '../../types';
|
|
12
|
+
import { useLoadDescendents } from '#hooks';
|
|
12
13
|
import { useNavTreeContext } from '../NavTreeContext';
|
|
13
|
-
import { L0Menu,
|
|
14
|
+
import { L0Menu, L1Tabs, type L1TabsProps } from '../Sidebar';
|
|
14
15
|
|
|
15
16
|
export const NAV_TREE_ITEM = 'NavTreeItem';
|
|
16
17
|
|
|
17
|
-
export type NavTreeProps =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const topLevelWorkspaces = useItems(root, { disposition: 'workspace' });
|
|
24
|
-
const topLevelNavigation = useItems(root, { disposition: 'navigation' });
|
|
25
|
-
const l0Items = useMemo(
|
|
26
|
-
() => [
|
|
27
|
-
// prettier-ignore
|
|
28
|
-
...topLevelCollections,
|
|
29
|
-
...topLevelWorkspaces,
|
|
30
|
-
...topLevelNavigation,
|
|
31
|
-
],
|
|
32
|
-
[topLevelCollections, topLevelWorkspaces, topLevelNavigation],
|
|
33
|
-
);
|
|
34
|
-
const pinnedItems = useItems(root, { disposition: 'pin-end', sort: true });
|
|
35
|
-
const userAccountItem = useItems(root, { disposition: 'user-account' })[0];
|
|
36
|
-
const topLevelItems = useMemo(
|
|
37
|
-
() => [
|
|
38
|
-
// prettier-ignore
|
|
39
|
-
...l0Items,
|
|
40
|
-
...pinnedItems,
|
|
41
|
-
...(userAccountItem ? [userAccountItem] : []),
|
|
42
|
-
],
|
|
43
|
-
[l0Items, pinnedItems, userAccountItem],
|
|
44
|
-
);
|
|
18
|
+
export type NavTreeProps = { id: string; root?: Node.Node; tab: string } & Pick<L1TabsProps, 'open'>;
|
|
19
|
+
|
|
20
|
+
// TODO(wittjosiah): Refactor to Radix-style.
|
|
21
|
+
export const NavTree = forwardRef<HTMLDivElement, NavTreeProps>(({ id, root, tab, ...props }, forwardedRef) => {
|
|
22
|
+
const { onBack, onItemHover } = useNavTreeContext();
|
|
23
|
+
const { topLevelActions, l0Items, pinnedItems, userAccountItem, topLevelItems } = useTopLevelNavItems(root);
|
|
45
24
|
|
|
46
25
|
useLoadDescendents(root);
|
|
47
26
|
const path = useMemo(() => [id], [id]);
|
|
48
27
|
|
|
49
28
|
return (
|
|
50
|
-
|
|
29
|
+
// TODO(thure): `Tabs.Root` forces all items that should be able to receive focus to use `Tabs.Tab(Primitive)` since
|
|
30
|
+
// it uses RovingFocus and doesn't support moving focus to an item that is not a tab. Assess whether this situation
|
|
31
|
+
// should change including whether it should motivate a change in the design/taxonomy, or if this means this should
|
|
32
|
+
// not use `react-ui-tabs` at all.
|
|
33
|
+
<Tabs.Root value={tab} orientation='vertical' classNames='relative' ref={forwardedRef}>
|
|
51
34
|
<L0Menu
|
|
52
35
|
menuActions={topLevelActions}
|
|
53
36
|
topLevelItems={l0Items}
|
|
@@ -55,8 +38,60 @@ export const NavTree = ({ id, root, ...props }: NavTreeProps) => {
|
|
|
55
38
|
userAccountItem={userAccountItem}
|
|
56
39
|
path={path}
|
|
57
40
|
parent={root}
|
|
41
|
+
onItemHover={onItemHover}
|
|
58
42
|
/>
|
|
59
|
-
<
|
|
43
|
+
<L1Tabs topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} {...props} />
|
|
60
44
|
</Tabs.Root>
|
|
61
45
|
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Partitions root children into workspaces, pinned items, user-account, and top-level actions.
|
|
50
|
+
*/
|
|
51
|
+
const useTopLevelNavItems = (root?: Node.Node) => {
|
|
52
|
+
const { graph } = useAppGraph();
|
|
53
|
+
const rootId = root?.id ?? Node.RootId;
|
|
54
|
+
const rootOutboundItems = useConnections(graph, rootId, 'child');
|
|
55
|
+
const rootActions = useGraphActions(graph, rootId);
|
|
56
|
+
|
|
57
|
+
const { topLevelActions, l0Items, pinnedItems, userAccountItem } = useMemo(() => {
|
|
58
|
+
const topLevelWorkspaces: Node.Node[] = [];
|
|
59
|
+
const outboundPinnedItems: Node.Node[] = [];
|
|
60
|
+
let userAccountItem: Node.Node | undefined;
|
|
61
|
+
for (const node of rootOutboundItems) {
|
|
62
|
+
switch (node.properties.disposition) {
|
|
63
|
+
case 'workspace':
|
|
64
|
+
topLevelWorkspaces.push(node);
|
|
65
|
+
break;
|
|
66
|
+
case 'pin-end':
|
|
67
|
+
outboundPinnedItems.push(node);
|
|
68
|
+
break;
|
|
69
|
+
case 'user-account':
|
|
70
|
+
userAccountItem ??= node;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const topLevelActions = rootActions
|
|
76
|
+
.filter((action) => action.properties.disposition === 'menu')
|
|
77
|
+
.toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
78
|
+
const pinnedItems = [
|
|
79
|
+
...outboundPinnedItems,
|
|
80
|
+
...rootActions.filter((action) => action.properties.disposition === 'pin-end'),
|
|
81
|
+
].toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
topLevelActions,
|
|
85
|
+
l0Items: topLevelWorkspaces,
|
|
86
|
+
pinnedItems,
|
|
87
|
+
userAccountItem,
|
|
88
|
+
};
|
|
89
|
+
}, [rootActions, rootOutboundItems]);
|
|
90
|
+
|
|
91
|
+
const topLevelItems = useMemo(
|
|
92
|
+
() => [...l0Items, ...pinnedItems, ...(userAccountItem ? [userAccountItem] : [])],
|
|
93
|
+
[l0Items, pinnedItems, userAccountItem],
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
return { topLevelActions, l0Items, pinnedItems, userAccountItem, topLevelItems };
|
|
62
97
|
};
|
|
@@ -6,7 +6,7 @@ import { createContext, useContext } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { raise } from '@dxos/debug';
|
|
8
8
|
|
|
9
|
-
import { type NavTreeContextValue } from '
|
|
9
|
+
import { type NavTreeContextValue } from '../types';
|
|
10
10
|
|
|
11
11
|
export const NavTreeContext = createContext<NavTreeContextValue | null>(null);
|
|
12
12
|
|