@finos/legend-extension-dsl-data-space 9.2.0 → 9.2.2
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 +71 -3
- package/lib/components/DataSpaceDataAccess.js.map +1 -1
- package/lib/components/DataSpaceDescription.d.ts.map +1 -1
- package/lib/components/DataSpaceDescription.js +6 -1
- package/lib/components/DataSpaceDescription.js.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.js +3 -3
- package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
- package/lib/components/DataSpaceViewer.js +2 -2
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.js +7 -3
- package/lib/components/DataSpaceViewerActivityBar.js.map +1 -1
- package/lib/components/DataSpaceWiki.d.ts.map +1 -1
- package/lib/components/DataSpaceWiki.js +1 -0
- package/lib/components/DataSpaceWiki.js.map +1 -1
- package/lib/components/query/DataSpaceQueryCreator.js +1 -1
- package/lib/components/query/DataSpaceQueryCreator.js.map +1 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +2 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +3 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +6 -4
- package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +7 -3
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +22 -13
- package/lib/graphManager/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 +2 -2
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts +35 -0
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerDataAccessState.js +98 -0
- package/lib/stores/DataSpaceViewerDataAccessState.js.map +1 -0
- package/lib/stores/DataSpaceViewerState.d.ts +34 -21
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +100 -30
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.js +2 -0
- package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.js +2 -0
- package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/DataSpaceDataAccess.tsx +116 -2
- package/src/components/DataSpaceDescription.tsx +7 -1
- package/src/components/DataSpaceDiagramViewer.tsx +3 -3
- package/src/components/DataSpaceViewer.tsx +2 -2
- package/src/components/DataSpaceViewerActivityBar.tsx +6 -5
- package/src/components/DataSpaceWiki.tsx +2 -0
- package/src/components/query/DataSpaceQueryCreator.tsx +1 -1
- package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +3 -0
- package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +27 -7
- package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +26 -14
- package/src/stores/DataSpaceViewerDataAccessState.ts +142 -0
- package/src/stores/DataSpaceViewerState.ts +126 -34
- package/src/stores/query/DataSpaceAdvancedSearchState.ts +14 -1
- package/src/stores/studio/DataSpacePreviewState.ts +3 -0
- package/tsconfig.json +1 -0
|
@@ -17,38 +17,56 @@ import { DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram';
|
|
|
17
17
|
import { getNullableFirstElement, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
18
18
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
19
19
|
import { PURE_DATA_SPACE_INFO_PROFILE_PATH, PURE_DATA_SPACE_INFO_PROFILE_VERIFIED_STEREOTYPE, } from '../graphManager/DSL_DataSpace_PureGraphManagerPlugin.js';
|
|
20
|
+
import { DataSpaceViewerDataAccessState } from './DataSpaceViewerDataAccessState.js';
|
|
20
21
|
export var DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
21
22
|
(function (DATA_SPACE_VIEWER_ACTIVITY_MODE) {
|
|
22
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DESCRIPTION"] = "
|
|
23
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DIAGRAM_VIEWER"] = "
|
|
24
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS_DOCUMENTATION"] = "
|
|
25
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["QUICK_START"] = "
|
|
26
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION_CONTEXT"] = "
|
|
27
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_ACCESS"] = "
|
|
28
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_STORES"] = "
|
|
29
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_AVAILABILITY"] = "
|
|
30
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_READINESS"] = "
|
|
31
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_COST"] = "
|
|
32
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_GOVERNANCE"] = "
|
|
33
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["INFO"] = "
|
|
34
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["SUPPORT"] = "
|
|
23
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DESCRIPTION"] = "description";
|
|
24
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DIAGRAM_VIEWER"] = "diagram_viewer";
|
|
25
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS_DOCUMENTATION"] = "models_documentation";
|
|
26
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["QUICK_START"] = "quick_start";
|
|
27
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION_CONTEXT"] = "execution_context";
|
|
28
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_ACCESS"] = "data_access";
|
|
29
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_STORES"] = "data_stores";
|
|
30
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_AVAILABILITY"] = "data_availability";
|
|
31
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_READINESS"] = "data_readiness";
|
|
32
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_COST"] = "data_cost";
|
|
33
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["DATA_GOVERNANCE"] = "data_governance";
|
|
34
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["INFO"] = "info";
|
|
35
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["SUPPORT"] = "support";
|
|
35
36
|
})(DATA_SPACE_VIEWER_ACTIVITY_MODE = DATA_SPACE_VIEWER_ACTIVITY_MODE || (DATA_SPACE_VIEWER_ACTIVITY_MODE = {}));
|
|
37
|
+
class DataSpaceLayoutState {
|
|
38
|
+
dataSpaceViewerState;
|
|
39
|
+
isExpandedModeEnabled = false;
|
|
40
|
+
constructor(dataSpaceViewerState) {
|
|
41
|
+
makeObservable(this, {
|
|
42
|
+
isExpandedModeEnabled: observable,
|
|
43
|
+
enableExpandedMode: action,
|
|
44
|
+
});
|
|
45
|
+
this.dataSpaceViewerState = dataSpaceViewerState;
|
|
46
|
+
}
|
|
47
|
+
enableExpandedMode(val) {
|
|
48
|
+
this.isExpandedModeEnabled = val;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
36
51
|
export class DataSpaceViewerState {
|
|
37
52
|
applicationStore;
|
|
38
53
|
graphManagerState;
|
|
54
|
+
layoutState;
|
|
55
|
+
dataSpaceAnalysisResult;
|
|
39
56
|
groupId;
|
|
40
57
|
artifactId;
|
|
41
58
|
versionId;
|
|
42
|
-
|
|
59
|
+
retriveGraphData;
|
|
43
60
|
viewProject;
|
|
44
61
|
viewSDLCProject;
|
|
45
62
|
onDiagramClassDoubleClick;
|
|
63
|
+
onZoneChange;
|
|
64
|
+
dataAccessState;
|
|
46
65
|
_renderer;
|
|
47
66
|
currentDiagram;
|
|
48
67
|
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION;
|
|
49
68
|
currentExecutionContext;
|
|
50
69
|
currentRuntime;
|
|
51
|
-
isExpandedModeEnabled = false;
|
|
52
70
|
constructor(applicationStore, graphManagerState, groupId, artifactId, versionId, dataSpaceAnalysisResult, actions) {
|
|
53
71
|
makeObservable(this, {
|
|
54
72
|
_renderer: observable,
|
|
@@ -56,18 +74,17 @@ export class DataSpaceViewerState {
|
|
|
56
74
|
currentActivity: observable,
|
|
57
75
|
currentExecutionContext: observable,
|
|
58
76
|
currentRuntime: observable,
|
|
59
|
-
isExpandedModeEnabled: observable,
|
|
60
77
|
isVerified: computed,
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
diagramRenderer: computed,
|
|
79
|
+
setDiagramRenderer: action,
|
|
63
80
|
setCurrentDiagram: action,
|
|
64
81
|
setCurrentActivity: action,
|
|
65
82
|
setCurrentExecutionContext: action,
|
|
66
83
|
setCurrentRuntime: action,
|
|
67
|
-
enableExpandedMode: action,
|
|
68
84
|
});
|
|
69
85
|
this.applicationStore = applicationStore;
|
|
70
86
|
this.graphManagerState = graphManagerState;
|
|
87
|
+
this.layoutState = new DataSpaceLayoutState(this);
|
|
71
88
|
this.dataSpaceAnalysisResult = dataSpaceAnalysisResult;
|
|
72
89
|
this.groupId = groupId;
|
|
73
90
|
this.artifactId = artifactId;
|
|
@@ -76,11 +93,14 @@ export class DataSpaceViewerState {
|
|
|
76
93
|
dataSpaceAnalysisResult.defaultExecutionContext;
|
|
77
94
|
this.currentRuntime = this.currentExecutionContext.defaultRuntime;
|
|
78
95
|
this.currentDiagram = getNullableFirstElement(this.dataSpaceAnalysisResult.diagrams);
|
|
96
|
+
this.retriveGraphData = actions.retriveGraphData;
|
|
79
97
|
this.viewProject = actions.viewProject;
|
|
80
98
|
this.viewSDLCProject = actions.viewSDLCProject;
|
|
81
99
|
this.onDiagramClassDoubleClick = actions.onDiagramClassDoubleClick;
|
|
100
|
+
this.onZoneChange = actions.onZoneChange;
|
|
101
|
+
this.dataAccessState = new DataSpaceViewerDataAccessState(this);
|
|
82
102
|
}
|
|
83
|
-
get
|
|
103
|
+
get diagramRenderer() {
|
|
84
104
|
return guaranteeNonNullable(this._renderer, `Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)`);
|
|
85
105
|
}
|
|
86
106
|
get isDiagramRendererInitialized() {
|
|
@@ -94,12 +114,12 @@ export class DataSpaceViewerState {
|
|
|
94
114
|
if (!this.isDiagramRendererInitialized) {
|
|
95
115
|
return '';
|
|
96
116
|
}
|
|
97
|
-
if (this.
|
|
117
|
+
if (this.diagramRenderer.middleClick || this.diagramRenderer.rightClick) {
|
|
98
118
|
return 'diagram-editor__cursor--grabbing';
|
|
99
119
|
}
|
|
100
|
-
switch (this.
|
|
120
|
+
switch (this.diagramRenderer.interactionMode) {
|
|
101
121
|
case DIAGRAM_INTERACTION_MODE.LAYOUT: {
|
|
102
|
-
if (this.
|
|
122
|
+
if (this.diagramRenderer.mouseOverClassView) {
|
|
103
123
|
return 'diagram-editor__cursor--pointer';
|
|
104
124
|
}
|
|
105
125
|
return '';
|
|
@@ -112,7 +132,7 @@ export class DataSpaceViewerState {
|
|
|
112
132
|
return Boolean(this.dataSpaceAnalysisResult.stereotypes.find((stereotype) => stereotype.profile === PURE_DATA_SPACE_INFO_PROFILE_PATH &&
|
|
113
133
|
stereotype.value === PURE_DATA_SPACE_INFO_PROFILE_VERIFIED_STEREOTYPE));
|
|
114
134
|
}
|
|
115
|
-
|
|
135
|
+
setDiagramRenderer(val) {
|
|
116
136
|
this._renderer = val;
|
|
117
137
|
}
|
|
118
138
|
setCurrentDiagram(val) {
|
|
@@ -128,13 +148,63 @@ export class DataSpaceViewerState {
|
|
|
128
148
|
setCurrentRuntime(val) {
|
|
129
149
|
this.currentRuntime = val;
|
|
130
150
|
}
|
|
131
|
-
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
151
|
+
setupDiagramRenderer() {
|
|
152
|
+
this.diagramRenderer.setIsReadOnly(true);
|
|
153
|
+
this.diagramRenderer.setEnableLayoutAutoAdjustment(true);
|
|
154
|
+
this.diagramRenderer.onClassViewDoubleClick = (classView) => this.onDiagramClassDoubleClick(classView);
|
|
135
155
|
}
|
|
136
|
-
|
|
137
|
-
|
|
156
|
+
changeZone(zone) {
|
|
157
|
+
switch (zone) {
|
|
158
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION:
|
|
159
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER:
|
|
160
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION:
|
|
161
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START: {
|
|
162
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.EXECUTION_CONTEXT: {
|
|
166
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.EXECUTION_CONTEXT);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS: {
|
|
170
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_STORES: {
|
|
174
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_STORES);
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_AVAILABILITY: {
|
|
178
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_AVAILABILITY);
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS: {
|
|
182
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST: {
|
|
186
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE: {
|
|
190
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO: {
|
|
194
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO);
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
case DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT: {
|
|
198
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT);
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
default: {
|
|
202
|
+
// unknown
|
|
203
|
+
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION);
|
|
204
|
+
this.onZoneChange?.(undefined);
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
138
208
|
}
|
|
139
209
|
}
|
|
140
210
|
//# sourceMappingURL=DataSpaceViewerState.js.map
|
|
@@ -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;AAMH,OAAO,EAGL,wBAAwB,GACzB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAMpE,OAAO,EACL,iCAAiC,EACjC,gDAAgD,GACjD,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,MAAM,CAAN,IAAY,+BAeX;AAfD,WAAY,+BAA+B;IACzC,8DAA2B,CAAA;IAC3B,oEAAiC,CAAA;IACjC,gFAA6C,CAAA;IAC7C,8DAA2B,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I,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;gBACxE,MAAM;aACP;YACD,KAAK,+BAA+B,CAAC,SAAS,CAAC,CAAC;gBAC9C,IAAI,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC;gBACnE,MAAM;aACP;YACD,KAAK,+BAA+B,CAAC,eAAe,CAAC,CAAC;gBACpD,IAAI,CAAC,kBAAkB,CACrB,+BAA+B,CAAC,eAAe,CAChD,CAAC;gBACF,MAAM;aACP;YACD,KAAK,+BAA+B,CAAC,IAAI,CAAC,CAAC;gBACzC,IAAI,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;gBAC9D,MAAM;aACP;YACD,KAAK,+BAA+B,CAAC,OAAO,CAAC,CAAC;gBAC5C,IAAI,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;gBACjE,MAAM;aACP;YACD,OAAO,CAAC,CAAC;gBACP,UAAU;gBACV,IAAI,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,WAAW,CAAC,CAAC;gBACrE,IAAI,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,CAAC;gBAC/B,MAAM;aACP;SACF;IACH,CAAC;CACF"}
|
|
@@ -13,7 +13,7 @@
|
|
|
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 Class, type GraphManagerState } from '@finos/legend-graph';
|
|
17
17
|
import { type DepotServerClient } from '@finos/legend-server-depot';
|
|
18
18
|
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
|
19
19
|
import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceAdvancedSearchState.d.ts","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceAdvancedSearchState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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S,CAAC;IACxD,aAAa,UAAS;gBAGpB,gBAAgB,EAAE,6BAA6B,EAC/C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE;QACP,WAAW,EAAE,CACX,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,KAC3B,IAAI,CAAC;QACV,eAAe,EAAE,CACf,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;KACpB,EACD,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,EAC5C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS;IA0BrC,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;IAIzD,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI;IAIpE,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAInC,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;IA2BrD,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC;IAoE1D,oBAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC;CAkBzD"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { GraphDataWithOrigin, LegendSDLC, } from '@finos/legend-graph';
|
|
16
17
|
import { DepotScope, ProjectData, retrieveProjectEntitiesWithDependencies, } from '@finos/legend-server-depot';
|
|
17
18
|
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
|
18
19
|
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
@@ -96,6 +97,7 @@ export class DataSpaceAdvancedSearchState {
|
|
|
96
97
|
// analyze data space
|
|
97
98
|
const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(this.graphManagerState.graphManager).analyzeDataSpace(dataSpace.path, () => retrieveProjectEntitiesWithDependencies(project, dataSpace.versionId, this.depotServerClient), () => retrieveAnalyticsResultCache(project, dataSpace.versionId, dataSpace.path, this.depotServerClient), this.loadDataSpaceState));
|
|
98
99
|
this.dataSpaceViewerState = new DataSpaceViewerState(this.applicationStore, this.graphManagerState, dataSpace.groupId, dataSpace.artifactId, dataSpace.versionId, analysisResult, {
|
|
100
|
+
retriveGraphData: () => new GraphDataWithOrigin(new LegendSDLC(dataSpace.groupId, dataSpace.artifactId, dataSpace.versionId)),
|
|
99
101
|
viewProject: this.viewProject,
|
|
100
102
|
viewSDLCProject: this.viewSDLCProject,
|
|
101
103
|
onDiagramClassDoubleClick: (classView) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceAdvancedSearchState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceAdvancedSearchState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceAdvancedSearchState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceAdvancedSearchState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,mBAAmB,EAGnB,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,UAAU,EACV,WAAW,EACX,uCAAuC,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,sCAAsC,EAAE,MAAM,6EAA6E,CAAC;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AC;SACH;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAEpB,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,KAAK,WAAW,EAEhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2FAA2F,CAAC;AAG3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAEpB,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,KAAK,WAAW,EAEhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2FAA2F,CAAC;AAG3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,qBAAa,qBAAsB,SAAQ,oBAAoB;IAC7D,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC,QAAQ,CAAC,kBAAkB,cAAwB;IAEnD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;gBAE5C,WAAW,EAAE,WAAW;IAapC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,qBAAqB;IAUrE,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAO7C,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;CA0E3D"}
|
|
@@ -18,6 +18,7 @@ import { guaranteeNonNullable, ActionState, assertErrorThrown, } from '@finos/le
|
|
|
18
18
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
19
19
|
import { DSL_DataSpace_getGraphManagerExtension } from '../../graphManager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
|
|
20
20
|
import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
|
|
21
|
+
import { LiveGraphData } from '@finos/legend-graph';
|
|
21
22
|
export class DataSpacePreviewState extends EditorExtensionState {
|
|
22
23
|
editorStore;
|
|
23
24
|
loadDataSpaceState = ActionState.create();
|
|
@@ -57,6 +58,7 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
57
58
|
.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))
|
|
58
59
|
.concat(this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))), undefined, this.loadDataSpaceState));
|
|
59
60
|
this.dataSpaceViewerState = new DataSpaceViewerState(this.editorStore.applicationStore, this.editorStore.graphManagerState, groupId, artifactId, versionId, analysisResult, {
|
|
61
|
+
retriveGraphData: () => new LiveGraphData(this.editorStore.graphManagerState.graph),
|
|
60
62
|
viewProject: () => {
|
|
61
63
|
this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
|
|
62
64
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.js","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,UAAU,GAEX,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAEL,oBAAoB,EACpB,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE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
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"@ag-grid-community/core": "29.2.0",
|
|
48
48
|
"@ag-grid-community/react": "29.2.0",
|
|
49
49
|
"@ag-grid-community/styles": "29.2.0",
|
|
50
|
-
"@finos/legend-application": "13.0.
|
|
51
|
-
"@finos/legend-application-query": "11.0.
|
|
52
|
-
"@finos/legend-application-studio": "23.1.
|
|
53
|
-
"@finos/legend-art": "5.0.
|
|
54
|
-
"@finos/legend-extension-dsl-diagram": "7.1.
|
|
55
|
-
"@finos/legend-graph": "26.0.
|
|
56
|
-
"@finos/legend-query-builder": "2.
|
|
57
|
-
"@finos/legend-server-depot": "4.4.
|
|
58
|
-
"@finos/legend-shared": "8.0.
|
|
59
|
-
"@finos/legend-storage": "3.0.
|
|
60
|
-
"@types/react": "18.0.
|
|
50
|
+
"@finos/legend-application": "13.0.9",
|
|
51
|
+
"@finos/legend-application-query": "11.0.9",
|
|
52
|
+
"@finos/legend-application-studio": "23.1.5",
|
|
53
|
+
"@finos/legend-art": "5.0.42",
|
|
54
|
+
"@finos/legend-extension-dsl-diagram": "7.1.49",
|
|
55
|
+
"@finos/legend-graph": "26.0.2",
|
|
56
|
+
"@finos/legend-query-builder": "2.1.0",
|
|
57
|
+
"@finos/legend-server-depot": "4.4.12",
|
|
58
|
+
"@finos/legend-shared": "8.0.5",
|
|
59
|
+
"@finos/legend-storage": "3.0.46",
|
|
60
|
+
"@types/react": "18.0.33",
|
|
61
61
|
"mobx": "6.9.0",
|
|
62
62
|
"mobx-react-lite": "3.4.3",
|
|
63
63
|
"react": "18.2.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"serializr": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@finos/legend-dev-utils": "2.0.
|
|
68
|
+
"@finos/legend-dev-utils": "2.0.51",
|
|
69
69
|
"@jest/globals": "29.5.0",
|
|
70
70
|
"cross-env": "7.0.3",
|
|
71
71
|
"eslint": "8.37.0",
|
|
@@ -15,14 +15,30 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
AnchorLinkIcon,
|
|
20
|
+
PanelLoadingIndicator,
|
|
21
|
+
QuestionCircleIcon,
|
|
22
|
+
} from '@finos/legend-art';
|
|
19
23
|
import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
20
24
|
import { useApplicationStore } from '@finos/legend-application';
|
|
21
25
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
26
|
+
import { useEffect } from 'react';
|
|
27
|
+
import { flowResult } from 'mobx';
|
|
28
|
+
import { AgGridReact } from '@ag-grid-community/react';
|
|
29
|
+
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
30
|
+
import {
|
|
31
|
+
DatasetEntitlementAccessApprovedReport,
|
|
32
|
+
DatasetEntitlementAccessGrantedReport,
|
|
33
|
+
DatasetEntitlementAccessNotGrantedReport,
|
|
34
|
+
DatasetEntitlementAccessRequestedReport,
|
|
35
|
+
DatasetEntitlementUnsupportedReport,
|
|
36
|
+
} from '@finos/legend-graph';
|
|
22
37
|
|
|
23
38
|
export const DataSpaceDataAccess = observer(
|
|
24
39
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
25
40
|
const { dataSpaceViewerState } = props;
|
|
41
|
+
const dataAccessState = dataSpaceViewerState.dataAccessState;
|
|
26
42
|
const applicationStore = useApplicationStore();
|
|
27
43
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
28
44
|
const documentationUrl = analysisResult.supportInfo?.documentationUrl;
|
|
@@ -35,6 +51,19 @@ export const DataSpaceDataAccess = observer(
|
|
|
35
51
|
}
|
|
36
52
|
};
|
|
37
53
|
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
flowResult(dataAccessState.fetchDatasetSpecifications()).catch(
|
|
56
|
+
applicationStore.alertUnhandledError,
|
|
57
|
+
);
|
|
58
|
+
flowResult(dataAccessState.fetchDatasetEntitlementReports()).catch(
|
|
59
|
+
applicationStore.alertUnhandledError,
|
|
60
|
+
);
|
|
61
|
+
}, [
|
|
62
|
+
applicationStore,
|
|
63
|
+
dataAccessState,
|
|
64
|
+
dataSpaceViewerState.currentExecutionContext,
|
|
65
|
+
]);
|
|
66
|
+
|
|
38
67
|
return (
|
|
39
68
|
<div className="data-space__viewer__wiki__section">
|
|
40
69
|
<div className="data-space__viewer__wiki__section__header">
|
|
@@ -56,8 +85,93 @@ export const DataSpaceDataAccess = observer(
|
|
|
56
85
|
)}
|
|
57
86
|
</div>
|
|
58
87
|
<div className="data-space__viewer__wiki__section__content">
|
|
88
|
+
<PanelLoadingIndicator
|
|
89
|
+
isLoading={
|
|
90
|
+
dataAccessState.fetchDatasetSpecificationsState.isInProgress ||
|
|
91
|
+
dataAccessState.fetchDatasetEntitlementReportsState.isInProgress
|
|
92
|
+
}
|
|
93
|
+
/>
|
|
59
94
|
<div className="data-space__viewer__data-access">
|
|
60
|
-
|
|
95
|
+
{dataAccessState.datasets.length > 0 && (
|
|
96
|
+
<DataSpaceWikiPlaceholder message="View Data Access (Work in Progress)" />
|
|
97
|
+
)}
|
|
98
|
+
{dataAccessState.datasets.length === 0 && (
|
|
99
|
+
<>
|
|
100
|
+
<div className="data-space__viewer__data-access__chart"></div>
|
|
101
|
+
<div className="data-space__viewer__data-access__grid data-space__viewer__grid ag-theme-balham-dark">
|
|
102
|
+
<AgGridReact
|
|
103
|
+
rowData={dataAccessState.datasets}
|
|
104
|
+
gridOptions={{
|
|
105
|
+
suppressScrollOnNewData: true,
|
|
106
|
+
getRowId: (rowData) => rowData.data.uuid,
|
|
107
|
+
}}
|
|
108
|
+
modules={[ClientSideRowModelModule]}
|
|
109
|
+
suppressFieldDotNotation={true}
|
|
110
|
+
columnDefs={[
|
|
111
|
+
{
|
|
112
|
+
minWidth: 50,
|
|
113
|
+
sortable: true,
|
|
114
|
+
resizable: true,
|
|
115
|
+
valueGetter: (params) =>
|
|
116
|
+
params.data?.specification.name,
|
|
117
|
+
headerName: 'Dataset',
|
|
118
|
+
flex: 1,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
minWidth: 50,
|
|
122
|
+
sortable: true,
|
|
123
|
+
resizable: true,
|
|
124
|
+
valueGetter: (params) =>
|
|
125
|
+
params.data?.specification.type,
|
|
126
|
+
headerName: 'Type',
|
|
127
|
+
flex: 1,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
minWidth: 50,
|
|
131
|
+
sortable: true,
|
|
132
|
+
resizable: true,
|
|
133
|
+
headerName: 'Access Status',
|
|
134
|
+
valueGetter: (params) => {
|
|
135
|
+
const entitlementReport =
|
|
136
|
+
params.data?.entitlementReport;
|
|
137
|
+
if (
|
|
138
|
+
entitlementReport instanceof
|
|
139
|
+
DatasetEntitlementAccessGrantedReport
|
|
140
|
+
) {
|
|
141
|
+
return 'Access Granted';
|
|
142
|
+
} else if (
|
|
143
|
+
entitlementReport instanceof
|
|
144
|
+
DatasetEntitlementAccessApprovedReport
|
|
145
|
+
) {
|
|
146
|
+
return 'Access Approved';
|
|
147
|
+
} else if (
|
|
148
|
+
entitlementReport instanceof
|
|
149
|
+
DatasetEntitlementAccessRequestedReport
|
|
150
|
+
) {
|
|
151
|
+
return 'Access Requested';
|
|
152
|
+
} else if (
|
|
153
|
+
entitlementReport instanceof
|
|
154
|
+
DatasetEntitlementAccessNotGrantedReport
|
|
155
|
+
) {
|
|
156
|
+
return '(x) Access Not Granted';
|
|
157
|
+
} else if (
|
|
158
|
+
entitlementReport instanceof
|
|
159
|
+
DatasetEntitlementUnsupportedReport
|
|
160
|
+
) {
|
|
161
|
+
return '(unsupported)';
|
|
162
|
+
}
|
|
163
|
+
return '';
|
|
164
|
+
},
|
|
165
|
+
flex: 1,
|
|
166
|
+
wrapText: true,
|
|
167
|
+
autoHeight: true,
|
|
168
|
+
},
|
|
169
|
+
]}
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
<DataSpaceWikiPlaceholder message="No documentation provided" />
|
|
173
|
+
</>
|
|
174
|
+
)}
|
|
61
175
|
</div>
|
|
62
176
|
</div>
|
|
63
177
|
</div>
|
|
@@ -19,14 +19,20 @@ import type { DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
20
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
21
21
|
import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
|
|
22
|
+
import { useEffect, useRef } from 'react';
|
|
22
23
|
|
|
23
24
|
export const DataSpaceDescription = observer(
|
|
24
25
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
25
26
|
const { dataSpaceViewerState } = props;
|
|
26
27
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
28
|
+
const sectionRef = useRef<HTMLDivElement>(null);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
// do
|
|
32
|
+
}, [dataSpaceViewerState]);
|
|
27
33
|
|
|
28
34
|
return (
|
|
29
|
-
<div className="data-space__viewer__wiki__section">
|
|
35
|
+
<div ref={sectionRef} className="data-space__viewer__wiki__section">
|
|
30
36
|
<div className="data-space__viewer__wiki__section__header">
|
|
31
37
|
<div className="data-space__viewer__wiki__section__header__label">
|
|
32
38
|
Description
|
|
@@ -55,14 +55,14 @@ const DataSpaceDiagramCanvas = observer(
|
|
|
55
55
|
|
|
56
56
|
useEffect(() => {
|
|
57
57
|
const renderer = new DiagramRenderer(diagramCanvasRef.current, diagram);
|
|
58
|
-
dataSpaceViewerState.
|
|
59
|
-
dataSpaceViewerState.
|
|
58
|
+
dataSpaceViewerState.setDiagramRenderer(renderer);
|
|
59
|
+
dataSpaceViewerState.setupDiagramRenderer();
|
|
60
60
|
renderer.render({ initial: true });
|
|
61
61
|
}, [diagramCanvasRef, dataSpaceViewerState, diagram]);
|
|
62
62
|
|
|
63
63
|
useEffect(() => {
|
|
64
64
|
if (dataSpaceViewerState.isDiagramRendererInitialized) {
|
|
65
|
-
dataSpaceViewerState.
|
|
65
|
+
dataSpaceViewerState.diagramRenderer.refresh();
|
|
66
66
|
}
|
|
67
67
|
}, [dataSpaceViewerState, width, height]);
|
|
68
68
|
|
|
@@ -44,7 +44,7 @@ const DataSpaceHeader = observer(
|
|
|
44
44
|
<div
|
|
45
45
|
className={clsx('data-space__viewer__header__content', {
|
|
46
46
|
'data-space__viewer__header__content--expanded':
|
|
47
|
-
dataSpaceViewerState.isExpandedModeEnabled,
|
|
47
|
+
dataSpaceViewerState.layoutState.isExpandedModeEnabled,
|
|
48
48
|
})}
|
|
49
49
|
>
|
|
50
50
|
<div
|
|
@@ -115,7 +115,7 @@ export const DataSpaceViewer = observer(
|
|
|
115
115
|
className={clsx('data-space__viewer__frame', {
|
|
116
116
|
'data-space__viewer__frame--boundless': isShowingWiki,
|
|
117
117
|
'data-space__viewer__frame--expanded':
|
|
118
|
-
dataSpaceViewerState.isExpandedModeEnabled,
|
|
118
|
+
dataSpaceViewerState.layoutState.isExpandedModeEnabled,
|
|
119
119
|
})}
|
|
120
120
|
>
|
|
121
121
|
<div className="data-space__viewer__content">
|
|
@@ -43,12 +43,11 @@ import {
|
|
|
43
43
|
const ActivityBarMenu = observer(
|
|
44
44
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
45
45
|
const { dataSpaceViewerState } = props;
|
|
46
|
+
const layoutState = dataSpaceViewerState.layoutState;
|
|
46
47
|
|
|
47
48
|
// actions
|
|
48
49
|
const toggleExpandedMode = (): void =>
|
|
49
|
-
|
|
50
|
-
!dataSpaceViewerState.isExpandedModeEnabled,
|
|
51
|
-
);
|
|
50
|
+
layoutState.enableExpandedMode(!layoutState.isExpandedModeEnabled);
|
|
52
51
|
|
|
53
52
|
return (
|
|
54
53
|
<>
|
|
@@ -63,7 +62,7 @@ const ActivityBarMenu = observer(
|
|
|
63
62
|
content={
|
|
64
63
|
<MenuContent>
|
|
65
64
|
<MenuContentItem onClick={toggleExpandedMode}>
|
|
66
|
-
{
|
|
65
|
+
{layoutState.isExpandedModeEnabled
|
|
67
66
|
? 'Disable Expanded Mode'
|
|
68
67
|
: 'Enable Expanded Mode'}{' '}
|
|
69
68
|
</MenuContentItem>
|
|
@@ -89,8 +88,10 @@ export const DataSpaceViewerActivityBar = observer(
|
|
|
89
88
|
const { dataSpaceViewerState } = props;
|
|
90
89
|
const changeActivity =
|
|
91
90
|
(activity: DATA_SPACE_VIEWER_ACTIVITY_MODE): (() => void) =>
|
|
92
|
-
(): void =>
|
|
91
|
+
(): void => {
|
|
93
92
|
dataSpaceViewerState.setCurrentActivity(activity);
|
|
93
|
+
dataSpaceViewerState.onZoneChange?.(activity);
|
|
94
|
+
};
|
|
94
95
|
|
|
95
96
|
const wikiActivities: DataSpaceViewerActivityConfig[] = [
|
|
96
97
|
{
|
|
@@ -26,6 +26,8 @@ export const DataSpaceWiki = observer(
|
|
|
26
26
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
27
27
|
const { dataSpaceViewerState } = props;
|
|
28
28
|
|
|
29
|
+
// const a = new IntersectionObserver(() => {});
|
|
30
|
+
|
|
29
31
|
return (
|
|
30
32
|
<div className="data-space__viewer__wiki">
|
|
31
33
|
<DataSpaceDescription dataSpaceViewerState={dataSpaceViewerState} />
|