@finos/legend-extension-dsl-data-space 10.0.2 → 10.0.4
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/lib/components/DataSpaceDataAccess.d.ts.map +1 -1
- package/lib/components/DataSpaceDataAccess.js +11 -3
- package/lib/components/DataSpaceDataAccess.js.map +1 -1
- package/lib/components/DataSpaceDescription.d.ts +1 -1
- package/lib/components/DataSpaceDescription.d.ts.map +1 -1
- package/lib/components/DataSpaceDescription.js +8 -3
- package/lib/components/DataSpaceDescription.js.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.d.ts +1 -1
- package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.js +22 -6
- package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
- package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -1
- package/lib/components/DataSpaceModelsDocumentation.js +11 -3
- package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
- package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
- package/lib/components/DataSpaceQuickStart.js +75 -61
- package/lib/components/DataSpaceQuickStart.js.map +1 -1
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +36 -14
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.js +6 -7
- package/lib/components/DataSpaceViewerActivityBar.js.map +1 -1
- package/lib/components/DataSpaceWiki.d.ts.map +1 -1
- package/lib/components/DataSpaceWiki.js +11 -0
- package/lib/components/DataSpaceWiki.js.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts +3 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js +3 -0
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +7 -4
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +4 -5
- package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +64 -62
- package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts +1 -0
- package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/DataSpaceModelsDocumentationState.d.ts.map +1 -1
- package/lib/stores/DataSpaceModelsDocumentationState.js +1 -1
- package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -1
- package/lib/stores/DataSpaceViewerState.d.ts +38 -15
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +132 -62
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/query/DataSpaceQueryBuilderState.js +2 -2
- package/lib/stores/query/DataSpaceQueryBuilderState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/DataSpaceDataAccess.tsx +27 -5
- package/src/components/DataSpaceDescription.tsx +22 -5
- package/src/components/DataSpaceDiagramViewer.tsx +49 -15
- package/src/components/DataSpaceModelsDocumentation.tsx +29 -5
- package/src/components/DataSpaceQuickStart.tsx +223 -211
- package/src/components/DataSpaceViewer.tsx +66 -12
- package/src/components/DataSpaceViewerActivityBar.tsx +6 -3
- package/src/components/DataSpaceWiki.tsx +14 -0
- package/src/graph-manager/action/analytics/DataSpaceAnalysis.ts +4 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +15 -3
- package/src/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +112 -89
- package/src/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.ts +5 -0
- package/src/stores/DataSpaceModelsDocumentationState.ts +1 -1
- package/src/stores/DataSpaceViewerState.ts +193 -73
- package/src/stores/query/DataSpaceQueryBuilderState.ts +2 -2
|
@@ -13,33 +13,55 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
16
|
+
import { type GenericLegendApplicationStore, type NavigationZone } from '@finos/legend-application';
|
|
17
17
|
import { type ClassView } from '@finos/legend-extension-dsl-diagram/graph';
|
|
18
18
|
import { type DiagramRenderer } from '@finos/legend-extension-dsl-diagram/application';
|
|
19
19
|
import type { BasicGraphManagerState, GraphData, PackageableRuntime } from '@finos/legend-graph';
|
|
20
|
-
import type { DataSpaceAnalysisResult, DataSpaceDiagramAnalysisResult, DataSpaceExecutionContextAnalysisResult } from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
|
20
|
+
import type { DataSpaceAnalysisResult, DataSpaceDiagramAnalysisResult, DataSpaceExecutableAnalysisResult, DataSpaceExecutionContextAnalysisResult } from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
|
21
21
|
import { DataSpaceViewerDataAccessState } from './DataSpaceViewerDataAccessState.js';
|
|
22
22
|
import { DataSpaceViewerModelsDocumentationState } from './DataSpaceModelsDocumentationState.js';
|
|
23
23
|
export declare enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
|
|
24
24
|
DESCRIPTION = "description",
|
|
25
|
-
DIAGRAM_VIEWER = "
|
|
26
|
-
MODELS_DOCUMENTATION = "
|
|
27
|
-
QUICK_START = "
|
|
28
|
-
EXECUTION_CONTEXT = "
|
|
29
|
-
DATA_ACCESS = "
|
|
30
|
-
DATA_STORES = "
|
|
31
|
-
DATA_AVAILABILITY = "
|
|
32
|
-
DATA_READINESS = "
|
|
33
|
-
DATA_COST = "
|
|
34
|
-
DATA_GOVERNANCE = "
|
|
25
|
+
DIAGRAM_VIEWER = "diagram-viewer",
|
|
26
|
+
MODELS_DOCUMENTATION = "models-documentation",
|
|
27
|
+
QUICK_START = "quick-start",
|
|
28
|
+
EXECUTION_CONTEXT = "execution-context",
|
|
29
|
+
DATA_ACCESS = "data-access",
|
|
30
|
+
DATA_STORES = "data-stores",
|
|
31
|
+
DATA_AVAILABILITY = "data-availability",
|
|
32
|
+
DATA_READINESS = "data-readiness",
|
|
33
|
+
DATA_COST = "data-cost",
|
|
34
|
+
DATA_GOVERNANCE = "data-governance",
|
|
35
35
|
INFO = "info",
|
|
36
36
|
SUPPORT = "support"
|
|
37
37
|
}
|
|
38
|
+
export declare const generateAnchorForActivity: (activity: string) => string;
|
|
39
|
+
export declare const generateAnchorForQuickStart: (quickStart: DataSpaceExecutableAnalysisResult) => string;
|
|
40
|
+
export declare const generateAnchorForDiagram: (diagram: DataSpaceDiagramAnalysisResult) => string;
|
|
41
|
+
export declare const DATA_SPACE_WIKI_PAGE_SECTIONS: DATA_SPACE_VIEWER_ACTIVITY_MODE[];
|
|
42
|
+
type DataSpacePageNavigationCommand = {
|
|
43
|
+
anchor: string;
|
|
44
|
+
useSmoothScroll?: boolean;
|
|
45
|
+
};
|
|
38
46
|
declare class DataSpaceLayoutState {
|
|
39
47
|
readonly dataSpaceViewerState: DataSpaceViewerState;
|
|
48
|
+
currentNavigationZone: string;
|
|
40
49
|
isExpandedModeEnabled: boolean;
|
|
50
|
+
frame?: HTMLElement | undefined;
|
|
51
|
+
header?: HTMLElement | undefined;
|
|
52
|
+
isTopScrollerVisible: boolean;
|
|
53
|
+
wikiPageAnchorIndex: Map<string, HTMLElement>;
|
|
54
|
+
wikiNavigationCommand?: DataSpacePageNavigationCommand | undefined;
|
|
41
55
|
constructor(dataSpaceViewerState: DataSpaceViewerState);
|
|
56
|
+
setCurrentNavigationZone(val: string): void;
|
|
57
|
+
get isAllWikiPageFullyRendered(): boolean;
|
|
42
58
|
enableExpandedMode(val: boolean): void;
|
|
59
|
+
setFrame(val: HTMLElement | undefined): void;
|
|
60
|
+
setTopScrollerVisible(val: boolean): void;
|
|
61
|
+
setWikiPageAnchor(anchorKey: string, element: HTMLElement): void;
|
|
62
|
+
unsetWikiPageAnchor(anchorKey: string): void;
|
|
63
|
+
setWikiAnchorToNavigate(val: DataSpacePageNavigationCommand | undefined): void;
|
|
64
|
+
navigateWikiAnchor(): void;
|
|
43
65
|
}
|
|
44
66
|
export declare class DataSpaceViewerState {
|
|
45
67
|
readonly applicationStore: GenericLegendApplicationStore;
|
|
@@ -54,11 +76,11 @@ export declare class DataSpaceViewerState {
|
|
|
54
76
|
readonly viewSDLCProject: (groupId: string, artifactId: string, entityPath: string | undefined) => Promise<void>;
|
|
55
77
|
readonly onDiagramClassDoubleClick: (classView: ClassView) => void;
|
|
56
78
|
readonly onZoneChange?: ((zone: NavigationZone | undefined) => void) | undefined;
|
|
57
|
-
readonly dataAccessState: DataSpaceViewerDataAccessState;
|
|
58
79
|
readonly modelsDocumentationState: DataSpaceViewerModelsDocumentationState;
|
|
80
|
+
readonly dataAccessState: DataSpaceViewerDataAccessState;
|
|
59
81
|
_renderer?: DiagramRenderer | undefined;
|
|
60
|
-
currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
|
|
61
82
|
currentActivity: DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
83
|
+
currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
|
|
62
84
|
currentExecutionContext: DataSpaceExecutionContextAnalysisResult;
|
|
63
85
|
currentRuntime: PackageableRuntime;
|
|
64
86
|
TEMPORARY__enableExperimentalFeatures: boolean;
|
|
@@ -81,7 +103,8 @@ export declare class DataSpaceViewerState {
|
|
|
81
103
|
setCurrentExecutionContext(val: DataSpaceExecutionContextAnalysisResult): void;
|
|
82
104
|
setCurrentRuntime(val: PackageableRuntime): void;
|
|
83
105
|
setupDiagramRenderer(): void;
|
|
84
|
-
|
|
106
|
+
syncZoneWithNavigation(zone: NavigationZone): void;
|
|
107
|
+
changeZone(zone: NavigationZone, force?: boolean): void;
|
|
85
108
|
}
|
|
86
109
|
export {};
|
|
87
110
|
//# sourceMappingURL=DataSpaceViewerState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceViewerState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DataSpaceViewerState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EACV,sBAAsB,EACtB,SAAS,EACT,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,KAAK,EACV,uBAAuB,EACvB,8BAA8B,EAC9B,iCAAiC,EACjC,uCAAuC,EACxC,MAAM,wDAAwD,CAAC;AAKhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,uCAAuC,EAAE,MAAM,wCAAwC,CAAC;AAEjG,oBAAY,+BAA+B;IACzC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,W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oB,IAAI,IAAI;IAQ5B,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAKlD,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,UAAQ,GAAG,IAAI;CAgCtD"}
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { NAVIGATION_ZONE_SEPARATOR, } from '@finos/legend-application';
|
|
16
17
|
import {} from '@finos/legend-extension-dsl-diagram/graph';
|
|
17
18
|
import { DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram/application';
|
|
18
|
-
import {
|
|
19
|
+
import { getNullableEntry, getNullableFirstEntry, guaranteeNonNullable, isNonNullable, } from '@finos/legend-shared';
|
|
19
20
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
20
21
|
import { PURE_DATA_SPACE_INFO_PROFILE_PATH, PURE_DATA_SPACE_INFO_PROFILE_VERIFIED_STEREOTYPE, } from '../graph-manager/DSL_DataSpace_PureGraphManagerPlugin.js';
|
|
21
22
|
import { DataSpaceViewerDataAccessState } from './DataSpaceViewerDataAccessState.js';
|
|
@@ -23,32 +24,121 @@ import { DataSpaceViewerModelsDocumentationState } from './DataSpaceModelsDocume
|
|
|
23
24
|
export var DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
24
25
|
(function (DATA_SPACE_VIEWER_ACTIVITY_MODE) {
|
|
25
26
|
DATA_SPACE_VIEWER_ACTIVITY_MODE["DESCRIPTION"] = "description";
|
|
26
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DIAGRAM_VIEWER"] = "
|
|
27
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS_DOCUMENTATION"] = "
|
|
28
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["QUICK_START"] = "
|
|
29
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION_CONTEXT"] = "
|
|
30
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_ACCESS"] = "
|
|
31
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_STORES"] = "
|
|
32
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_AVAILABILITY"] = "
|
|
33
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_READINESS"] = "
|
|
34
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_COST"] = "
|
|
35
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_GOVERNANCE"] = "
|
|
27
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DIAGRAM_VIEWER"] = "diagram-viewer";
|
|
28
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS_DOCUMENTATION"] = "models-documentation";
|
|
29
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["QUICK_START"] = "quick-start";
|
|
30
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION_CONTEXT"] = "execution-context";
|
|
31
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_ACCESS"] = "data-access";
|
|
32
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_STORES"] = "data-stores";
|
|
33
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_AVAILABILITY"] = "data-availability";
|
|
34
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_READINESS"] = "data-readiness";
|
|
35
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_COST"] = "data-cost";
|
|
36
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_GOVERNANCE"] = "data-governance";
|
|
36
37
|
DATA_SPACE_VIEWER_ACTIVITY_MODE["INFO"] = "info";
|
|
37
38
|
DATA_SPACE_VIEWER_ACTIVITY_MODE["SUPPORT"] = "support";
|
|
38
39
|
})(DATA_SPACE_VIEWER_ACTIVITY_MODE = DATA_SPACE_VIEWER_ACTIVITY_MODE || (DATA_SPACE_VIEWER_ACTIVITY_MODE = {}));
|
|
40
|
+
const generateAnchorChunk = (text) => encodeURIComponent(text
|
|
41
|
+
.trim()
|
|
42
|
+
.toLowerCase() // anchor is case-insensitive
|
|
43
|
+
.replace(/\s+/gu, '-'));
|
|
44
|
+
export const generateAnchorForActivity = (activity) => generateAnchorChunk(activity);
|
|
45
|
+
export const generateAnchorForQuickStart = (quickStart) => [
|
|
46
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
|
|
47
|
+
generateAnchorChunk(quickStart.title),
|
|
48
|
+
].join(NAVIGATION_ZONE_SEPARATOR);
|
|
49
|
+
export const generateAnchorForDiagram = (diagram) => [
|
|
50
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
51
|
+
generateAnchorChunk(diagram.title),
|
|
52
|
+
].join(NAVIGATION_ZONE_SEPARATOR);
|
|
53
|
+
export const DATA_SPACE_WIKI_PAGE_SECTIONS = [
|
|
54
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION,
|
|
55
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
56
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
|
|
57
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
|
|
58
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS,
|
|
59
|
+
];
|
|
60
|
+
const DATA_SPACE_WIKI_PAGE_ANCHORS = DATA_SPACE_WIKI_PAGE_SECTIONS.map((activity) => generateAnchorForActivity(activity));
|
|
39
61
|
class DataSpaceLayoutState {
|
|
40
62
|
dataSpaceViewerState;
|
|
63
|
+
currentNavigationZone = '';
|
|
41
64
|
isExpandedModeEnabled = false;
|
|
65
|
+
frame;
|
|
66
|
+
header;
|
|
67
|
+
isTopScrollerVisible = false;
|
|
68
|
+
wikiPageAnchorIndex = new Map();
|
|
69
|
+
wikiNavigationCommand;
|
|
42
70
|
constructor(dataSpaceViewerState) {
|
|
43
71
|
makeObservable(this, {
|
|
72
|
+
currentNavigationZone: observable,
|
|
44
73
|
isExpandedModeEnabled: observable,
|
|
74
|
+
isTopScrollerVisible: observable,
|
|
75
|
+
wikiPageAnchorIndex: observable,
|
|
76
|
+
frame: observable.ref,
|
|
77
|
+
wikiNavigationCommand: observable.ref,
|
|
78
|
+
isAllWikiPageFullyRendered: computed,
|
|
79
|
+
setCurrentNavigationZone: action,
|
|
45
80
|
enableExpandedMode: action,
|
|
81
|
+
setFrame: action,
|
|
82
|
+
setTopScrollerVisible: action,
|
|
83
|
+
setWikiPageAnchor: action,
|
|
84
|
+
unsetWikiPageAnchor: action,
|
|
85
|
+
setWikiAnchorToNavigate: action,
|
|
46
86
|
});
|
|
47
87
|
this.dataSpaceViewerState = dataSpaceViewerState;
|
|
48
88
|
}
|
|
89
|
+
setCurrentNavigationZone(val) {
|
|
90
|
+
this.currentNavigationZone = val;
|
|
91
|
+
}
|
|
92
|
+
get isAllWikiPageFullyRendered() {
|
|
93
|
+
return (DATA_SPACE_WIKI_PAGE_SECTIONS.includes(this.dataSpaceViewerState.currentActivity) &&
|
|
94
|
+
DATA_SPACE_WIKI_PAGE_ANCHORS.every((anchor) => this.wikiPageAnchorIndex.has(anchor)) &&
|
|
95
|
+
Array.from(this.wikiPageAnchorIndex.values()).every(isNonNullable));
|
|
96
|
+
}
|
|
49
97
|
enableExpandedMode(val) {
|
|
50
98
|
this.isExpandedModeEnabled = val;
|
|
51
99
|
}
|
|
100
|
+
setFrame(val) {
|
|
101
|
+
this.frame = val;
|
|
102
|
+
}
|
|
103
|
+
setTopScrollerVisible(val) {
|
|
104
|
+
this.isTopScrollerVisible = val;
|
|
105
|
+
}
|
|
106
|
+
setWikiPageAnchor(anchorKey, element) {
|
|
107
|
+
// do not allow overriding existing anchor
|
|
108
|
+
if (!this.wikiPageAnchorIndex.has(anchorKey)) {
|
|
109
|
+
this.wikiPageAnchorIndex.set(anchorKey, element);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
unsetWikiPageAnchor(anchorKey) {
|
|
113
|
+
this.wikiPageAnchorIndex.delete(anchorKey);
|
|
114
|
+
}
|
|
115
|
+
setWikiAnchorToNavigate(val) {
|
|
116
|
+
this.wikiNavigationCommand = val;
|
|
117
|
+
}
|
|
118
|
+
navigateWikiAnchor() {
|
|
119
|
+
if (this.wikiNavigationCommand && this.isAllWikiPageFullyRendered) {
|
|
120
|
+
const anchor = this.wikiNavigationCommand.anchor;
|
|
121
|
+
const matchingWikiPageSection = this.wikiPageAnchorIndex.get(anchor);
|
|
122
|
+
const anchorChunks = anchor.split(NAVIGATION_ZONE_SEPARATOR);
|
|
123
|
+
if (matchingWikiPageSection) {
|
|
124
|
+
this.frame?.scrollTo({
|
|
125
|
+
top: matchingWikiPageSection.offsetTop -
|
|
126
|
+
(this.header?.getBoundingClientRect().height ?? 0),
|
|
127
|
+
behavior: this.wikiNavigationCommand.useSmoothScroll
|
|
128
|
+
? 'smooth'
|
|
129
|
+
: 'auto',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else if (getNullableFirstEntry(anchorChunks) ===
|
|
133
|
+
generateAnchorForActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER)) {
|
|
134
|
+
const matchingDiagram = this.dataSpaceViewerState.dataSpaceAnalysisResult.diagrams.find((diagram) => generateAnchorForDiagram(diagram) === anchor);
|
|
135
|
+
if (matchingDiagram) {
|
|
136
|
+
this.dataSpaceViewerState.setCurrentDiagram(matchingDiagram);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
this.setWikiAnchorToNavigate(undefined);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
52
142
|
}
|
|
53
143
|
export class DataSpaceViewerState {
|
|
54
144
|
applicationStore;
|
|
@@ -63,11 +153,13 @@ export class DataSpaceViewerState {
|
|
|
63
153
|
viewSDLCProject;
|
|
64
154
|
onDiagramClassDoubleClick;
|
|
65
155
|
onZoneChange;
|
|
66
|
-
dataAccessState;
|
|
67
156
|
modelsDocumentationState;
|
|
157
|
+
// TODO: change this so it holds the data access state for each execution context
|
|
158
|
+
dataAccessState;
|
|
159
|
+
// TODO: have a state similar to dataAccessState for each executables
|
|
68
160
|
_renderer;
|
|
69
|
-
currentDiagram;
|
|
70
161
|
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION;
|
|
162
|
+
currentDiagram;
|
|
71
163
|
currentExecutionContext;
|
|
72
164
|
currentRuntime;
|
|
73
165
|
TEMPORARY__enableExperimentalFeatures = false;
|
|
@@ -96,7 +188,7 @@ export class DataSpaceViewerState {
|
|
|
96
188
|
this.currentExecutionContext =
|
|
97
189
|
dataSpaceAnalysisResult.defaultExecutionContext;
|
|
98
190
|
this.currentRuntime = this.currentExecutionContext.defaultRuntime;
|
|
99
|
-
this.currentDiagram =
|
|
191
|
+
this.currentDiagram = getNullableFirstEntry(this.dataSpaceAnalysisResult.diagrams);
|
|
100
192
|
this.retriveGraphData = actions.retriveGraphData;
|
|
101
193
|
this.viewProject = actions.viewProject;
|
|
102
194
|
this.viewSDLCProject = actions.viewSDLCProject;
|
|
@@ -159,56 +251,34 @@ export class DataSpaceViewerState {
|
|
|
159
251
|
this.diagramRenderer.setEnableLayoutAutoAdjustment(true);
|
|
160
252
|
this.diagramRenderer.onClassViewDoubleClick = (classView) => this.onDiagramClassDoubleClick(classView);
|
|
161
253
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this.
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS: {
|
|
188
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS);
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST: {
|
|
192
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST);
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE: {
|
|
196
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE);
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO: {
|
|
200
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO);
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT: {
|
|
204
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT);
|
|
205
|
-
break;
|
|
254
|
+
syncZoneWithNavigation(zone) {
|
|
255
|
+
this.layoutState.setCurrentNavigationZone(zone);
|
|
256
|
+
this.onZoneChange?.(zone);
|
|
257
|
+
}
|
|
258
|
+
changeZone(zone, force = false) {
|
|
259
|
+
if (force) {
|
|
260
|
+
this.layoutState.setCurrentNavigationZone('');
|
|
261
|
+
}
|
|
262
|
+
if (zone !== this.layoutState.currentNavigationZone) {
|
|
263
|
+
const zoneChunks = zone.split(NAVIGATION_ZONE_SEPARATOR);
|
|
264
|
+
const activityChunk = getNullableEntry(zoneChunks, 0);
|
|
265
|
+
const matchingActivity = Object.values(DATA_SPACE_VIEWER_ACTIVITY_MODE).find((activity) => generateAnchorForActivity(activity) === activityChunk);
|
|
266
|
+
if (activityChunk && matchingActivity) {
|
|
267
|
+
if (DATA_SPACE_WIKI_PAGE_SECTIONS.includes(matchingActivity)) {
|
|
268
|
+
this.layoutState.setWikiAnchorToNavigate({
|
|
269
|
+
anchor: zone,
|
|
270
|
+
// NOTE: if we are already on the wiki page, use smooth scroll to suggest the scrollability of the page
|
|
271
|
+
// if we are navigating from a different section, go directly to the section within the page to avoid the wait
|
|
272
|
+
useSmoothScroll: DATA_SPACE_WIKI_PAGE_SECTIONS.includes(this.currentActivity),
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
this.setCurrentActivity(matchingActivity);
|
|
276
|
+
this.onZoneChange?.(zone);
|
|
277
|
+
this.layoutState.setCurrentNavigationZone(zone);
|
|
206
278
|
}
|
|
207
|
-
|
|
208
|
-
// unknown
|
|
279
|
+
else {
|
|
209
280
|
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION);
|
|
210
|
-
this.
|
|
211
|
-
break;
|
|
281
|
+
this.layoutState.setCurrentNavigationZone('');
|
|
212
282
|
}
|
|
213
283
|
}
|
|
214
284
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceViewerState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceViewerState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,yBAAyB,GAG1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAEL,wBAAwB,GACzB,MAAM,iDAAiD,CAAC;AAMzD,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,O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,CAAC,yBAAyB,CAAC,CAAC;YACzD,MAAM,aAAa,GAAG,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YACtD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CACpC,+BAA+B,CAChC,CAAC,IAAI,CACJ,CAAC,QAAQ,EAAE,EAAE,CAAC,yBAAyB,CAAC,QAAQ,CAAC,KAAK,aAAa,CACpE,CAAC;YACF,IAAI,aAAa,IAAI,gBAAgB,EAAE;gBACrC,IAAI,6BAA6B,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;oBAC5D,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC;wBACvC,MAAM,EAAE,IAAI;wBACZ,uGAAuG;wBACvG,8GAA8G;wBAC9G,eAAe,EAAE,6BAA6B,CAAC,QAAQ,CACrD,IAAI,CAAC,eAAe,CACrB;qBACF,CAAC,CAAC;iBACJ;gBACD,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;gBAC1C,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC;gBAC1B,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;aACjD;iBAAM;gBACL,IAAI,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,WAAW,CAAC,CAAC;gBACrE,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;aAC/C;SACF;IACH,CAAC;CACF"}
|
|
@@ -17,7 +17,7 @@ import { DEFAULT_TYPEAHEAD_SEARCH_LIMIT, DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH
|
|
|
17
17
|
import { QueryBuilderState } from '@finos/legend-query-builder';
|
|
18
18
|
import { getMappingCompatibleClasses, RuntimePointer, } from '@finos/legend-graph';
|
|
19
19
|
import { DepotScope, SNAPSHOT_VERSION_ALIAS, } from '@finos/legend-server-depot';
|
|
20
|
-
import { ActionState, assertErrorThrown,
|
|
20
|
+
import { ActionState, assertErrorThrown, getNullableFirstEntry, } from '@finos/legend-shared';
|
|
21
21
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
22
22
|
import { renderDataSpaceQueryBuilderSetupPanelContent } from '../../components/query/DataSpaceQueryBuilder.js';
|
|
23
23
|
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
|
|
@@ -132,7 +132,7 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
|
132
132
|
// if there is no chosen class or the chosen one is not compatible
|
|
133
133
|
// with the mapping then pick a compatible class if possible
|
|
134
134
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
135
|
-
const possibleNewClass =
|
|
135
|
+
const possibleNewClass = getNullableFirstEntry(compatibleClasses);
|
|
136
136
|
if (possibleNewClass) {
|
|
137
137
|
this.changeClass(possibleNewClass);
|
|
138
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,8BAA8B,EAC9B,8CAA8C,GAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAEL,2BAA2B,EAC3B,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,sBAAsB,GAGvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"DataSpaceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,8BAA8B,EAC9B,8CAA8C,GAC/C,MAAM,2BAA2B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QAAQ;gBAChE,KAAK,EAAE,8BAA8B;aACtC,CACF,CACF,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CACrB,oBAAoB,CAAC,YAAY,EAAE,aAAa,CAAC,CAClD,CAAC;YACF,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;SACjC;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;YAChC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC9D;IACH,CAAC;IAED;;;;;;OAMG;IACH,+BAA+B,CAC7B,gBAA2C;QAE3C,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,cAAc,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;QAExE,MAAM,iBAAiB,GAAG,2BAA2B,CACnD,OAAO,EACP,IAAI,CAAC,iBAAiB,CAAC,aAAa,CACrC,CAAC;QACF,kEAAkE;QAClE,4DAA4D;QAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC1D,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;YAClE,IAAI,gBAAgB,EAAE;gBACpB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;aACpC;SACF;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"test:watch": "jest --watch"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@finos/legend-application": "15.0.
|
|
48
|
-
"@finos/legend-application-query": "12.0.
|
|
49
|
-
"@finos/legend-application-studio": "24.0.
|
|
50
|
-
"@finos/legend-art": "7.0.
|
|
51
|
-
"@finos/legend-extension-dsl-diagram": "8.0.
|
|
52
|
-
"@finos/legend-graph": "28.0.
|
|
53
|
-
"@finos/legend-lego": "0.1.
|
|
54
|
-
"@finos/legend-query-builder": "3.0.
|
|
55
|
-
"@finos/legend-server-depot": "5.0.
|
|
56
|
-
"@finos/legend-shared": "
|
|
57
|
-
"@finos/legend-storage": "3.0.
|
|
47
|
+
"@finos/legend-application": "15.0.2",
|
|
48
|
+
"@finos/legend-application-query": "12.0.4",
|
|
49
|
+
"@finos/legend-application-studio": "24.0.4",
|
|
50
|
+
"@finos/legend-art": "7.0.3",
|
|
51
|
+
"@finos/legend-extension-dsl-diagram": "8.0.4",
|
|
52
|
+
"@finos/legend-graph": "28.0.3",
|
|
53
|
+
"@finos/legend-lego": "0.1.8",
|
|
54
|
+
"@finos/legend-query-builder": "3.0.4",
|
|
55
|
+
"@finos/legend-server-depot": "5.0.1",
|
|
56
|
+
"@finos/legend-shared": "10.0.0",
|
|
57
|
+
"@finos/legend-storage": "3.0.50",
|
|
58
58
|
"@types/react": "18.0.37",
|
|
59
59
|
"mobx": "6.9.0",
|
|
60
60
|
"mobx-react-lite": "3.4.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"serializr": "3.0.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@finos/legend-dev-utils": "2.0.
|
|
66
|
+
"@finos/legend-dev-utils": "2.0.55",
|
|
67
67
|
"@jest/globals": "29.5.0",
|
|
68
68
|
"cross-env": "7.0.3",
|
|
69
69
|
"eslint": "8.38.0",
|
|
@@ -20,10 +20,14 @@ import {
|
|
|
20
20
|
PanelLoadingIndicator,
|
|
21
21
|
QuestionCircleIcon,
|
|
22
22
|
} from '@finos/legend-art';
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
25
|
+
generateAnchorForActivity,
|
|
26
|
+
type DataSpaceViewerState,
|
|
27
|
+
} from '../stores/DataSpaceViewerState.js';
|
|
24
28
|
import { useApplicationStore } from '@finos/legend-application';
|
|
25
29
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
26
|
-
import { useEffect } from 'react';
|
|
30
|
+
import { useEffect, useRef } from 'react';
|
|
27
31
|
import { flowResult } from 'mobx';
|
|
28
32
|
import {
|
|
29
33
|
DatasetEntitlementAccessApprovedReport,
|
|
@@ -137,6 +141,20 @@ export const DataSpaceDataAccess = observer(
|
|
|
137
141
|
const applicationStore = useApplicationStore();
|
|
138
142
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
139
143
|
const documentationUrl = analysisResult.supportInfo?.documentationUrl;
|
|
144
|
+
const sectionRef = useRef<HTMLDivElement>(null);
|
|
145
|
+
const anchor = generateAnchorForActivity(
|
|
146
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS,
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
if (sectionRef.current) {
|
|
151
|
+
dataSpaceViewerState.layoutState.setWikiPageAnchor(
|
|
152
|
+
anchor,
|
|
153
|
+
sectionRef.current,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
return () => dataSpaceViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
157
|
+
}, [dataSpaceViewerState, anchor]);
|
|
140
158
|
|
|
141
159
|
const seeDocumentation = (): void => {
|
|
142
160
|
if (documentationUrl) {
|
|
@@ -147,13 +165,17 @@ export const DataSpaceDataAccess = observer(
|
|
|
147
165
|
};
|
|
148
166
|
|
|
149
167
|
return (
|
|
150
|
-
<div className="data-space__viewer__wiki__section">
|
|
168
|
+
<div ref={sectionRef} className="data-space__viewer__wiki__section">
|
|
151
169
|
<div className="data-space__viewer__wiki__section__header">
|
|
152
170
|
<div className="data-space__viewer__wiki__section__header__label">
|
|
153
171
|
Data Access
|
|
154
|
-
<
|
|
172
|
+
<button
|
|
173
|
+
className="data-space__viewer__wiki__section__header__anchor"
|
|
174
|
+
tabIndex={-1}
|
|
175
|
+
onClick={() => dataSpaceViewerState.changeZone(anchor, true)}
|
|
176
|
+
>
|
|
155
177
|
<AnchorLinkIcon />
|
|
156
|
-
</
|
|
178
|
+
</button>
|
|
157
179
|
</div>
|
|
158
180
|
{Boolean(documentationUrl) && (
|
|
159
181
|
<button
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { AnchorLinkIcon } from '@finos/legend-art';
|
|
18
|
-
import
|
|
18
|
+
import {
|
|
19
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
20
|
+
generateAnchorForActivity,
|
|
21
|
+
type DataSpaceViewerState,
|
|
22
|
+
} from '../stores/DataSpaceViewerState.js';
|
|
19
23
|
import { observer } from 'mobx-react-lite';
|
|
20
24
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
21
25
|
import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
|
|
@@ -26,19 +30,32 @@ export const DataSpaceDescription = observer(
|
|
|
26
30
|
const { dataSpaceViewerState } = props;
|
|
27
31
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
28
32
|
const sectionRef = useRef<HTMLDivElement>(null);
|
|
33
|
+
const anchor = generateAnchorForActivity(
|
|
34
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION,
|
|
35
|
+
);
|
|
29
36
|
|
|
30
37
|
useEffect(() => {
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
if (sectionRef.current) {
|
|
39
|
+
dataSpaceViewerState.layoutState.setWikiPageAnchor(
|
|
40
|
+
anchor,
|
|
41
|
+
sectionRef.current,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return () => dataSpaceViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
45
|
+
}, [dataSpaceViewerState, anchor]);
|
|
33
46
|
|
|
34
47
|
return (
|
|
35
48
|
<div ref={sectionRef} className="data-space__viewer__wiki__section">
|
|
36
49
|
<div className="data-space__viewer__wiki__section__header">
|
|
37
50
|
<div className="data-space__viewer__wiki__section__header__label">
|
|
38
51
|
Description
|
|
39
|
-
<
|
|
52
|
+
<button
|
|
53
|
+
className="data-space__viewer__wiki__section__header__anchor"
|
|
54
|
+
tabIndex={-1}
|
|
55
|
+
onClick={() => dataSpaceViewerState.changeZone(anchor, true)}
|
|
56
|
+
>
|
|
40
57
|
<AnchorLinkIcon />
|
|
41
|
-
</
|
|
58
|
+
</button>
|
|
42
59
|
</div>
|
|
43
60
|
</div>
|
|
44
61
|
<div className="data-space__viewer__wiki__section__content">
|