@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
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import {
|
|
18
|
+
NAVIGATION_ZONE_SEPARATOR,
|
|
19
|
+
type GenericLegendApplicationStore,
|
|
20
|
+
type NavigationZone,
|
|
20
21
|
} from '@finos/legend-application';
|
|
21
22
|
import { type ClassView } from '@finos/legend-extension-dsl-diagram/graph';
|
|
22
23
|
import {
|
|
@@ -29,13 +30,16 @@ import type {
|
|
|
29
30
|
PackageableRuntime,
|
|
30
31
|
} from '@finos/legend-graph';
|
|
31
32
|
import {
|
|
32
|
-
|
|
33
|
+
getNullableEntry,
|
|
34
|
+
getNullableFirstEntry,
|
|
33
35
|
guaranteeNonNullable,
|
|
36
|
+
isNonNullable,
|
|
34
37
|
} from '@finos/legend-shared';
|
|
35
38
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
36
39
|
import type {
|
|
37
40
|
DataSpaceAnalysisResult,
|
|
38
41
|
DataSpaceDiagramAnalysisResult,
|
|
42
|
+
DataSpaceExecutableAnalysisResult,
|
|
39
43
|
DataSpaceExecutionContextAnalysisResult,
|
|
40
44
|
} from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
|
41
45
|
import {
|
|
@@ -47,38 +51,173 @@ import { DataSpaceViewerModelsDocumentationState } from './DataSpaceModelsDocume
|
|
|
47
51
|
|
|
48
52
|
export enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
|
|
49
53
|
DESCRIPTION = 'description',
|
|
50
|
-
DIAGRAM_VIEWER = '
|
|
51
|
-
MODELS_DOCUMENTATION = '
|
|
52
|
-
QUICK_START = '
|
|
53
|
-
EXECUTION_CONTEXT = '
|
|
54
|
-
DATA_ACCESS = '
|
|
55
|
-
|
|
56
|
-
DATA_STORES = '
|
|
57
|
-
DATA_AVAILABILITY = '
|
|
58
|
-
DATA_READINESS = '
|
|
59
|
-
DATA_COST = '
|
|
60
|
-
DATA_GOVERNANCE = '
|
|
54
|
+
DIAGRAM_VIEWER = 'diagram-viewer',
|
|
55
|
+
MODELS_DOCUMENTATION = 'models-documentation',
|
|
56
|
+
QUICK_START = 'quick-start',
|
|
57
|
+
EXECUTION_CONTEXT = 'execution-context',
|
|
58
|
+
DATA_ACCESS = 'data-access',
|
|
59
|
+
|
|
60
|
+
DATA_STORES = 'data-stores', // TODO: with test-data, also let user call TDS query on top of these
|
|
61
|
+
DATA_AVAILABILITY = 'data-availability',
|
|
62
|
+
DATA_READINESS = 'data-readiness',
|
|
63
|
+
DATA_COST = 'data-cost',
|
|
64
|
+
DATA_GOVERNANCE = 'data-governance',
|
|
61
65
|
INFO = 'info', // TODO: test coverage? (or maybe this should be done in elements/diagrams/data-quality section)
|
|
62
66
|
SUPPORT = 'support',
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
const generateAnchorChunk = (text: string): string =>
|
|
70
|
+
encodeURIComponent(
|
|
71
|
+
text
|
|
72
|
+
.trim()
|
|
73
|
+
.toLowerCase() // anchor is case-insensitive
|
|
74
|
+
.replace(/\s+/gu, '-'), // spaces will be replaced by hyphens
|
|
75
|
+
);
|
|
76
|
+
export const generateAnchorForActivity = (activity: string): string =>
|
|
77
|
+
generateAnchorChunk(activity);
|
|
78
|
+
export const generateAnchorForQuickStart = (
|
|
79
|
+
quickStart: DataSpaceExecutableAnalysisResult,
|
|
80
|
+
): string =>
|
|
81
|
+
[
|
|
82
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
|
|
83
|
+
generateAnchorChunk(quickStart.title),
|
|
84
|
+
].join(NAVIGATION_ZONE_SEPARATOR);
|
|
85
|
+
export const generateAnchorForDiagram = (
|
|
86
|
+
diagram: DataSpaceDiagramAnalysisResult,
|
|
87
|
+
): string =>
|
|
88
|
+
[
|
|
89
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
90
|
+
generateAnchorChunk(diagram.title),
|
|
91
|
+
].join(NAVIGATION_ZONE_SEPARATOR);
|
|
92
|
+
|
|
93
|
+
export const DATA_SPACE_WIKI_PAGE_SECTIONS = [
|
|
94
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION,
|
|
95
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
96
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
|
|
97
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
|
|
98
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS,
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const DATA_SPACE_WIKI_PAGE_ANCHORS = DATA_SPACE_WIKI_PAGE_SECTIONS.map(
|
|
102
|
+
(activity) => generateAnchorForActivity(activity),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
type DataSpacePageNavigationCommand = {
|
|
106
|
+
anchor: string;
|
|
107
|
+
useSmoothScroll?: boolean;
|
|
108
|
+
};
|
|
109
|
+
|
|
65
110
|
class DataSpaceLayoutState {
|
|
66
111
|
readonly dataSpaceViewerState: DataSpaceViewerState;
|
|
67
112
|
|
|
113
|
+
currentNavigationZone = '';
|
|
68
114
|
isExpandedModeEnabled = false;
|
|
69
115
|
|
|
116
|
+
frame?: HTMLElement | undefined;
|
|
117
|
+
header?: HTMLElement | undefined;
|
|
118
|
+
isTopScrollerVisible = false;
|
|
119
|
+
|
|
120
|
+
wikiPageAnchorIndex = new Map<string, HTMLElement>();
|
|
121
|
+
wikiNavigationCommand?: DataSpacePageNavigationCommand | undefined;
|
|
122
|
+
|
|
70
123
|
constructor(dataSpaceViewerState: DataSpaceViewerState) {
|
|
71
124
|
makeObservable(this, {
|
|
125
|
+
currentNavigationZone: observable,
|
|
72
126
|
isExpandedModeEnabled: observable,
|
|
127
|
+
isTopScrollerVisible: observable,
|
|
128
|
+
wikiPageAnchorIndex: observable,
|
|
129
|
+
frame: observable.ref,
|
|
130
|
+
wikiNavigationCommand: observable.ref,
|
|
131
|
+
isAllWikiPageFullyRendered: computed,
|
|
132
|
+
setCurrentNavigationZone: action,
|
|
73
133
|
enableExpandedMode: action,
|
|
134
|
+
setFrame: action,
|
|
135
|
+
setTopScrollerVisible: action,
|
|
136
|
+
setWikiPageAnchor: action,
|
|
137
|
+
unsetWikiPageAnchor: action,
|
|
138
|
+
setWikiAnchorToNavigate: action,
|
|
74
139
|
});
|
|
75
140
|
|
|
76
141
|
this.dataSpaceViewerState = dataSpaceViewerState;
|
|
77
142
|
}
|
|
78
143
|
|
|
144
|
+
setCurrentNavigationZone(val: string): void {
|
|
145
|
+
this.currentNavigationZone = val;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
get isAllWikiPageFullyRendered(): boolean {
|
|
149
|
+
return (
|
|
150
|
+
DATA_SPACE_WIKI_PAGE_SECTIONS.includes(
|
|
151
|
+
this.dataSpaceViewerState.currentActivity,
|
|
152
|
+
) &&
|
|
153
|
+
DATA_SPACE_WIKI_PAGE_ANCHORS.every((anchor) =>
|
|
154
|
+
this.wikiPageAnchorIndex.has(anchor),
|
|
155
|
+
) &&
|
|
156
|
+
Array.from(this.wikiPageAnchorIndex.values()).every(isNonNullable)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
79
160
|
enableExpandedMode(val: boolean): void {
|
|
80
161
|
this.isExpandedModeEnabled = val;
|
|
81
162
|
}
|
|
163
|
+
|
|
164
|
+
setFrame(val: HTMLElement | undefined): void {
|
|
165
|
+
this.frame = val;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
setTopScrollerVisible(val: boolean): void {
|
|
169
|
+
this.isTopScrollerVisible = val;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
setWikiPageAnchor(anchorKey: string, element: HTMLElement): void {
|
|
173
|
+
// do not allow overriding existing anchor
|
|
174
|
+
if (!this.wikiPageAnchorIndex.has(anchorKey)) {
|
|
175
|
+
this.wikiPageAnchorIndex.set(anchorKey, element);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
unsetWikiPageAnchor(anchorKey: string): void {
|
|
180
|
+
this.wikiPageAnchorIndex.delete(anchorKey);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
setWikiAnchorToNavigate(
|
|
184
|
+
val: DataSpacePageNavigationCommand | undefined,
|
|
185
|
+
): void {
|
|
186
|
+
this.wikiNavigationCommand = val;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
navigateWikiAnchor(): void {
|
|
190
|
+
if (this.wikiNavigationCommand && this.isAllWikiPageFullyRendered) {
|
|
191
|
+
const anchor = this.wikiNavigationCommand.anchor;
|
|
192
|
+
const matchingWikiPageSection = this.wikiPageAnchorIndex.get(anchor);
|
|
193
|
+
const anchorChunks = anchor.split(NAVIGATION_ZONE_SEPARATOR);
|
|
194
|
+
if (matchingWikiPageSection) {
|
|
195
|
+
this.frame?.scrollTo({
|
|
196
|
+
top:
|
|
197
|
+
matchingWikiPageSection.offsetTop -
|
|
198
|
+
(this.header?.getBoundingClientRect().height ?? 0),
|
|
199
|
+
behavior: this.wikiNavigationCommand.useSmoothScroll
|
|
200
|
+
? 'smooth'
|
|
201
|
+
: 'auto',
|
|
202
|
+
});
|
|
203
|
+
} else if (
|
|
204
|
+
getNullableFirstEntry(anchorChunks) ===
|
|
205
|
+
generateAnchorForActivity(
|
|
206
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
207
|
+
)
|
|
208
|
+
) {
|
|
209
|
+
const matchingDiagram =
|
|
210
|
+
this.dataSpaceViewerState.dataSpaceAnalysisResult.diagrams.find(
|
|
211
|
+
(diagram) => generateAnchorForDiagram(diagram) === anchor,
|
|
212
|
+
);
|
|
213
|
+
if (matchingDiagram) {
|
|
214
|
+
this.dataSpaceViewerState.setCurrentDiagram(matchingDiagram);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
this.setWikiAnchorToNavigate(undefined);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
82
221
|
}
|
|
83
222
|
|
|
84
223
|
export class DataSpaceViewerState {
|
|
@@ -107,12 +246,15 @@ export class DataSpaceViewerState {
|
|
|
107
246
|
| ((zone: NavigationZone | undefined) => void)
|
|
108
247
|
| undefined;
|
|
109
248
|
|
|
110
|
-
readonly dataAccessState: DataSpaceViewerDataAccessState;
|
|
111
249
|
readonly modelsDocumentationState: DataSpaceViewerModelsDocumentationState;
|
|
112
250
|
|
|
251
|
+
// TODO: change this so it holds the data access state for each execution context
|
|
252
|
+
readonly dataAccessState: DataSpaceViewerDataAccessState;
|
|
253
|
+
// TODO: have a state similar to dataAccessState for each executables
|
|
254
|
+
|
|
113
255
|
_renderer?: DiagramRenderer | undefined;
|
|
114
|
-
currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
|
|
115
256
|
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION;
|
|
257
|
+
currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
|
|
116
258
|
currentExecutionContext: DataSpaceExecutionContextAnalysisResult;
|
|
117
259
|
currentRuntime: PackageableRuntime;
|
|
118
260
|
|
|
@@ -171,7 +313,7 @@ export class DataSpaceViewerState {
|
|
|
171
313
|
this.currentExecutionContext =
|
|
172
314
|
dataSpaceAnalysisResult.defaultExecutionContext;
|
|
173
315
|
this.currentRuntime = this.currentExecutionContext.defaultRuntime;
|
|
174
|
-
this.currentDiagram =
|
|
316
|
+
this.currentDiagram = getNullableFirstEntry(
|
|
175
317
|
this.dataSpaceAnalysisResult.diagrams,
|
|
176
318
|
);
|
|
177
319
|
this.retriveGraphData = actions.retriveGraphData;
|
|
@@ -265,62 +407,40 @@ export class DataSpaceViewerState {
|
|
|
265
407
|
): void => this.onDiagramClassDoubleClick(classView);
|
|
266
408
|
}
|
|
267
409
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST: {
|
|
302
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST);
|
|
303
|
-
break;
|
|
304
|
-
}
|
|
305
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE: {
|
|
306
|
-
this.setCurrentActivity(
|
|
307
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE,
|
|
308
|
-
);
|
|
309
|
-
break;
|
|
310
|
-
}
|
|
311
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO: {
|
|
312
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO);
|
|
313
|
-
break;
|
|
314
|
-
}
|
|
315
|
-
case DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT: {
|
|
316
|
-
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT);
|
|
317
|
-
break;
|
|
318
|
-
}
|
|
319
|
-
default: {
|
|
320
|
-
// unknown
|
|
410
|
+
syncZoneWithNavigation(zone: NavigationZone): void {
|
|
411
|
+
this.layoutState.setCurrentNavigationZone(zone);
|
|
412
|
+
this.onZoneChange?.(zone);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
changeZone(zone: NavigationZone, force = false): void {
|
|
416
|
+
if (force) {
|
|
417
|
+
this.layoutState.setCurrentNavigationZone('');
|
|
418
|
+
}
|
|
419
|
+
if (zone !== this.layoutState.currentNavigationZone) {
|
|
420
|
+
const zoneChunks = zone.split(NAVIGATION_ZONE_SEPARATOR);
|
|
421
|
+
const activityChunk = getNullableEntry(zoneChunks, 0);
|
|
422
|
+
const matchingActivity = Object.values(
|
|
423
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
424
|
+
).find(
|
|
425
|
+
(activity) => generateAnchorForActivity(activity) === activityChunk,
|
|
426
|
+
);
|
|
427
|
+
if (activityChunk && matchingActivity) {
|
|
428
|
+
if (DATA_SPACE_WIKI_PAGE_SECTIONS.includes(matchingActivity)) {
|
|
429
|
+
this.layoutState.setWikiAnchorToNavigate({
|
|
430
|
+
anchor: zone,
|
|
431
|
+
// NOTE: if we are already on the wiki page, use smooth scroll to suggest the scrollability of the page
|
|
432
|
+
// if we are navigating from a different section, go directly to the section within the page to avoid the wait
|
|
433
|
+
useSmoothScroll: DATA_SPACE_WIKI_PAGE_SECTIONS.includes(
|
|
434
|
+
this.currentActivity,
|
|
435
|
+
),
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
this.setCurrentActivity(matchingActivity);
|
|
439
|
+
this.onZoneChange?.(zone);
|
|
440
|
+
this.layoutState.setCurrentNavigationZone(zone);
|
|
441
|
+
} else {
|
|
321
442
|
this.setCurrentActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION);
|
|
322
|
-
this.
|
|
323
|
-
break;
|
|
443
|
+
this.layoutState.setCurrentNavigationZone('');
|
|
324
444
|
}
|
|
325
445
|
}
|
|
326
446
|
}
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
type GeneratorFn,
|
|
38
38
|
ActionState,
|
|
39
39
|
assertErrorThrown,
|
|
40
|
-
|
|
40
|
+
getNullableFirstEntry,
|
|
41
41
|
} from '@finos/legend-shared';
|
|
42
42
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
43
43
|
import { renderDataSpaceQueryBuilderSetupPanelContent } from '../../components/query/DataSpaceQueryBuilder.js';
|
|
@@ -228,7 +228,7 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
|
228
228
|
// if there is no chosen class or the chosen one is not compatible
|
|
229
229
|
// with the mapping then pick a compatible class if possible
|
|
230
230
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
231
|
-
const possibleNewClass =
|
|
231
|
+
const possibleNewClass = getNullableFirstEntry(compatibleClasses);
|
|
232
232
|
if (possibleNewClass) {
|
|
233
233
|
this.changeClass(possibleNewClass);
|
|
234
234
|
}
|