@finos/legend-extension-dsl-data-space 10.0.3 → 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
|
@@ -22,14 +22,19 @@ import {
|
|
|
22
22
|
clsx,
|
|
23
23
|
useResizeDetector,
|
|
24
24
|
} from '@finos/legend-art';
|
|
25
|
-
import
|
|
25
|
+
import {
|
|
26
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
27
|
+
generateAnchorForActivity,
|
|
28
|
+
type DataSpaceViewerState,
|
|
29
|
+
generateAnchorForDiagram,
|
|
30
|
+
} from '../stores/DataSpaceViewerState.js';
|
|
26
31
|
import { observer } from 'mobx-react-lite';
|
|
27
32
|
import { forwardRef, useEffect, useRef } from 'react';
|
|
28
33
|
import { type Diagram } from '@finos/legend-extension-dsl-diagram/graph';
|
|
29
34
|
import { DiagramRenderer } from '@finos/legend-extension-dsl-diagram/application';
|
|
30
35
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
getNullableFirstEntry,
|
|
37
|
+
getNullableLastEntry,
|
|
33
38
|
guaranteeNonNullable,
|
|
34
39
|
} from '@finos/legend-shared';
|
|
35
40
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
@@ -81,6 +86,20 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
81
86
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
82
87
|
const { dataSpaceViewerState } = props;
|
|
83
88
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
89
|
+
const sectionRef = useRef<HTMLDivElement>(null);
|
|
90
|
+
const anchor = generateAnchorForActivity(
|
|
91
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (sectionRef.current) {
|
|
96
|
+
dataSpaceViewerState.layoutState.setWikiPageAnchor(
|
|
97
|
+
anchor,
|
|
98
|
+
sectionRef.current,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
return () => dataSpaceViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
102
|
+
}, [dataSpaceViewerState, anchor]);
|
|
84
103
|
|
|
85
104
|
// diagram selector
|
|
86
105
|
const diagramCanvasRef = useRef<HTMLDivElement>(null);
|
|
@@ -95,8 +114,12 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
95
114
|
if (idx === 0 || idx === -1) {
|
|
96
115
|
return;
|
|
97
116
|
}
|
|
98
|
-
|
|
99
|
-
|
|
117
|
+
const previousDiagram = guaranteeNonNullable(
|
|
118
|
+
analysisResult.diagrams[idx - 1],
|
|
119
|
+
);
|
|
120
|
+
dataSpaceViewerState.setCurrentDiagram(previousDiagram);
|
|
121
|
+
dataSpaceViewerState.syncZoneWithNavigation(
|
|
122
|
+
generateAnchorForDiagram(previousDiagram),
|
|
100
123
|
);
|
|
101
124
|
};
|
|
102
125
|
const showNextDiagram = (): void => {
|
|
@@ -109,19 +132,27 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
109
132
|
if (idx === analysisResult.diagrams.length - 1 || idx === -1) {
|
|
110
133
|
return;
|
|
111
134
|
}
|
|
112
|
-
|
|
113
|
-
|
|
135
|
+
const nextDiagram = guaranteeNonNullable(
|
|
136
|
+
analysisResult.diagrams[idx + 1],
|
|
137
|
+
);
|
|
138
|
+
dataSpaceViewerState.setCurrentDiagram(nextDiagram);
|
|
139
|
+
dataSpaceViewerState.syncZoneWithNavigation(
|
|
140
|
+
generateAnchorForDiagram(nextDiagram),
|
|
114
141
|
);
|
|
115
142
|
};
|
|
116
143
|
|
|
117
144
|
return (
|
|
118
|
-
<div className="data-space__viewer__wiki__section">
|
|
145
|
+
<div ref={sectionRef} className="data-space__viewer__wiki__section">
|
|
119
146
|
<div className="data-space__viewer__wiki__section__header">
|
|
120
147
|
<div className="data-space__viewer__wiki__section__header__label">
|
|
121
148
|
Diagrams
|
|
122
|
-
<
|
|
149
|
+
<button
|
|
150
|
+
className="data-space__viewer__wiki__section__header__anchor"
|
|
151
|
+
tabIndex={-1}
|
|
152
|
+
onClick={() => dataSpaceViewerState.changeZone(anchor, true)}
|
|
153
|
+
>
|
|
123
154
|
<AnchorLinkIcon />
|
|
124
|
-
</
|
|
155
|
+
</button>
|
|
125
156
|
</div>
|
|
126
157
|
</div>
|
|
127
158
|
<div className="data-space__viewer__wiki__section__content">
|
|
@@ -143,7 +174,7 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
143
174
|
tabIndex={-1}
|
|
144
175
|
title="Previous"
|
|
145
176
|
disabled={
|
|
146
|
-
|
|
177
|
+
getNullableFirstEntry(analysisResult.diagrams) ===
|
|
147
178
|
dataSpaceViewerState.currentDiagram
|
|
148
179
|
}
|
|
149
180
|
onClick={showPreviousDiagram}
|
|
@@ -155,7 +186,7 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
155
186
|
tabIndex={-1}
|
|
156
187
|
title="Next"
|
|
157
188
|
disabled={
|
|
158
|
-
|
|
189
|
+
getNullableLastEntry(analysisResult.diagrams) ===
|
|
159
190
|
dataSpaceViewerState.currentDiagram
|
|
160
191
|
}
|
|
161
192
|
onClick={showNextDiagram}
|
|
@@ -174,9 +205,12 @@ export const DataSpaceDiagramViewer = observer(
|
|
|
174
205
|
dataSpaceViewerState.currentDiagram === diagram,
|
|
175
206
|
},
|
|
176
207
|
)}
|
|
177
|
-
onClick={() =>
|
|
178
|
-
dataSpaceViewerState.setCurrentDiagram(diagram)
|
|
179
|
-
|
|
208
|
+
onClick={() => {
|
|
209
|
+
dataSpaceViewerState.setCurrentDiagram(diagram);
|
|
210
|
+
dataSpaceViewerState.syncZoneWithNavigation(
|
|
211
|
+
generateAnchorForDiagram(diagram),
|
|
212
|
+
);
|
|
213
|
+
}}
|
|
180
214
|
>
|
|
181
215
|
<CircleIcon />
|
|
182
216
|
</button>
|
|
@@ -41,7 +41,11 @@ import {
|
|
|
41
41
|
CaretRightIcon,
|
|
42
42
|
CaretLeftIcon,
|
|
43
43
|
} from '@finos/legend-art';
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
46
|
+
generateAnchorForActivity,
|
|
47
|
+
type DataSpaceViewerState,
|
|
48
|
+
} from '../stores/DataSpaceViewerState.js';
|
|
45
49
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
46
50
|
import {
|
|
47
51
|
DataSpaceAssociationDocumentationEntry,
|
|
@@ -61,7 +65,7 @@ import {
|
|
|
61
65
|
PROPERTY_ACCESSOR,
|
|
62
66
|
getMultiplicityDescription,
|
|
63
67
|
} from '@finos/legend-graph';
|
|
64
|
-
import { useMemo, useRef } from 'react';
|
|
68
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
65
69
|
import {
|
|
66
70
|
type ModelsDocumentationFilterTreeNodeData,
|
|
67
71
|
type DataSpaceViewerModelsDocumentationState,
|
|
@@ -1031,22 +1035,42 @@ const DataSpaceModelsDocumentationSearchBar = observer(
|
|
|
1031
1035
|
export const DataSpaceModelsDocumentation = observer(
|
|
1032
1036
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
1033
1037
|
const { dataSpaceViewerState } = props;
|
|
1038
|
+
const sectionRef = useRef<HTMLDivElement>(null);
|
|
1039
|
+
const anchor = generateAnchorForActivity(
|
|
1040
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
|
|
1041
|
+
);
|
|
1042
|
+
|
|
1043
|
+
useEffect(() => {
|
|
1044
|
+
if (sectionRef.current) {
|
|
1045
|
+
dataSpaceViewerState.layoutState.setWikiPageAnchor(
|
|
1046
|
+
anchor,
|
|
1047
|
+
sectionRef.current,
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
return () => dataSpaceViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
1051
|
+
}, [dataSpaceViewerState, anchor]);
|
|
1052
|
+
|
|
1034
1053
|
const documentationEntries =
|
|
1035
1054
|
dataSpaceViewerState.dataSpaceAnalysisResult.elementDocs;
|
|
1036
1055
|
const documentationState = dataSpaceViewerState.modelsDocumentationState;
|
|
1056
|
+
|
|
1037
1057
|
const toggleFilterPanel = (): void =>
|
|
1038
1058
|
documentationState.setShowFilterPanel(
|
|
1039
1059
|
!documentationState.showFilterPanel,
|
|
1040
1060
|
);
|
|
1041
1061
|
|
|
1042
1062
|
return (
|
|
1043
|
-
<div className="data-space__viewer__wiki__section">
|
|
1063
|
+
<div ref={sectionRef} className="data-space__viewer__wiki__section">
|
|
1044
1064
|
<div className="data-space__viewer__wiki__section__header">
|
|
1045
1065
|
<div className="data-space__viewer__wiki__section__header__label">
|
|
1046
1066
|
Models Documentation
|
|
1047
|
-
<
|
|
1067
|
+
<button
|
|
1068
|
+
className="data-space__viewer__wiki__section__header__anchor"
|
|
1069
|
+
tabIndex={-1}
|
|
1070
|
+
onClick={() => dataSpaceViewerState.changeZone(anchor, true)}
|
|
1071
|
+
>
|
|
1048
1072
|
<AnchorLinkIcon />
|
|
1049
|
-
</
|
|
1073
|
+
</button>
|
|
1050
1074
|
</div>
|
|
1051
1075
|
</div>
|
|
1052
1076
|
<div className="data-space__viewer__wiki__section__content">
|