@finos/legend-extension-dsl-data-space 10.4.258 → 10.4.259
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/DataSpaceDescription.d.ts +5 -0
- package/lib/components/DataSpaceDescription.d.ts.map +1 -1
- package/lib/components/DataSpaceDescription.js +39 -0
- package/lib/components/DataSpaceDescription.js.map +1 -1
- package/lib/components/DataSpaceExecutionContextViewer.d.ts +1 -6
- package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceExecutionContextViewer.js +12 -16
- package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -1
- package/lib/components/DataSpaceLakehouseAccess.d.ts +22 -0
- package/lib/components/DataSpaceLakehouseAccess.d.ts.map +1 -0
- package/lib/components/DataSpaceLakehouseAccess.js +127 -0
- package/lib/components/DataSpaceLakehouseAccess.js.map +1 -0
- package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
- package/lib/components/DataSpaceQuickStart.js +3 -2
- package/lib/components/DataSpaceQuickStart.js.map +1 -1
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +7 -13
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceWiki.d.ts.map +1 -1
- package/lib/components/DataSpaceWiki.js +3 -2
- package/lib/components/DataSpaceWiki.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/DataSpaceLayoutState.d.ts.map +1 -1
- package/lib/stores/DataSpaceLayoutState.js +3 -3
- package/lib/stores/DataSpaceLayoutState.js.map +1 -1
- package/lib/stores/DataSpaceViewerNavigation.d.ts +1 -0
- package/lib/stores/DataSpaceViewerNavigation.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerNavigation.js +1 -0
- package/lib/stores/DataSpaceViewerNavigation.js.map +1 -1
- package/lib/stores/DataSpaceViewerState.d.ts +3 -0
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +28 -2
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/package.json +8 -8
- package/src/components/DataSpaceDescription.tsx +86 -0
- package/src/components/DataSpaceExecutionContextViewer.tsx +41 -44
- package/src/components/DataSpaceLakehouseAccess.tsx +449 -0
- package/src/components/DataSpaceQuickStart.tsx +22 -11
- package/src/components/DataSpaceViewer.tsx +2 -55
- package/src/components/DataSpaceWiki.tsx +7 -1
- package/src/stores/DataSpaceLayoutState.ts +5 -6
- package/src/stores/DataSpaceViewerNavigation.ts +1 -0
- package/src/stores/DataSpaceViewerState.ts +36 -2
- package/tsconfig.json +1 -0
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
LakehouseDataProductExecutableAccessorInfo,
|
|
47
47
|
} from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
|
48
48
|
import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
|
|
49
|
-
import {
|
|
49
|
+
import { resolveOpenDataProductAction } from './DataSpaceExecutionContextViewer.js';
|
|
50
50
|
import type { DSL_DataSpace_LegendApplicationPlugin_Extension } from '../stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js';
|
|
51
51
|
import { useEffect, useRef, useState } from 'react';
|
|
52
52
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
@@ -227,6 +227,10 @@ const DataSpaceDataProductAccessPanel = observer(
|
|
|
227
227
|
const accessState = viewerState.getDataProductAccessState(
|
|
228
228
|
group.dataProductPath,
|
|
229
229
|
);
|
|
230
|
+
const onOpenDataProduct = resolveOpenDataProductAction(
|
|
231
|
+
viewerState,
|
|
232
|
+
group.dataProductPath,
|
|
233
|
+
);
|
|
230
234
|
return (
|
|
231
235
|
<div
|
|
232
236
|
key={group.dataProductPath}
|
|
@@ -250,21 +254,28 @@ const DataSpaceDataProductAccessPanel = observer(
|
|
|
250
254
|
/>
|
|
251
255
|
</button>
|
|
252
256
|
<div className="data-space__viewer__quickstart__tds__apg-access__group__header">
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
{onOpenDataProduct ? (
|
|
258
|
+
<button
|
|
259
|
+
type="button"
|
|
260
|
+
className="data-space__viewer__quickstart__tds__apg-access__group__label data-space__viewer__quickstart__tds__apg-access__group__label--clickable"
|
|
261
|
+
title={`Open Data Product: ${group.dataProductPath}`}
|
|
262
|
+
onClick={onOpenDataProduct}
|
|
263
|
+
>
|
|
264
|
+
{extractElementNameFromPath(group.dataProductPath)}
|
|
265
|
+
</button>
|
|
266
|
+
) : (
|
|
267
|
+
<span
|
|
268
|
+
className="data-space__viewer__quickstart__tds__apg-access__group__label"
|
|
269
|
+
title={group.dataProductPath}
|
|
270
|
+
>
|
|
271
|
+
{extractElementNameFromPath(group.dataProductPath)}
|
|
272
|
+
</span>
|
|
273
|
+
)}
|
|
259
274
|
<span className="data-space__viewer__quickstart__tds__apg-access__group__count">
|
|
260
275
|
{group.accessPointGroupIds.length}
|
|
261
276
|
</span>
|
|
262
277
|
</div>
|
|
263
278
|
<div className="data-space__viewer__quickstart__tds__apg-access__group__actions">
|
|
264
|
-
<DataSpaceOpenDataProductButton
|
|
265
|
-
dataSpaceViewerState={viewerState}
|
|
266
|
-
dataProductPath={group.dataProductPath}
|
|
267
|
-
/>
|
|
268
279
|
{accessState && (
|
|
269
280
|
<IconButton
|
|
270
281
|
className="data-space__viewer__quickstart__tds__apg-access__group__refresh-btn"
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
CaretUpIcon,
|
|
21
21
|
ControlledDropdownMenu,
|
|
22
22
|
MenuContent,
|
|
23
|
-
MenuContentDivider,
|
|
24
23
|
MenuContentItem,
|
|
25
24
|
MoreVerticalIcon,
|
|
26
25
|
PlayIcon,
|
|
@@ -36,15 +35,11 @@ import { DataSpaceWiki } from './DataSpaceWiki.js';
|
|
|
36
35
|
import { DataSpaceViewerActivityBar } from './DataSpaceViewerActivityBar.js';
|
|
37
36
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
38
37
|
import { DATA_SPACE_WIKI_PAGE_SECTIONS } from '../stores/DataSpaceLayoutState.js';
|
|
39
|
-
import {
|
|
40
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
41
|
-
generateAnchorForActivity,
|
|
42
|
-
} from '../stores/DataSpaceViewerNavigation.js';
|
|
38
|
+
import { DATA_SPACE_VIEWER_ACTIVITY_MODE } from '../stores/DataSpaceViewerNavigation.js';
|
|
43
39
|
import { DataSpacePlaceholderPanel } from './DataSpacePlaceholder.js';
|
|
44
40
|
import { useApplicationStore } from '@finos/legend-application';
|
|
45
41
|
import { DataSpaceLegendAIIntegration } from './DataSpaceLegendAIIntegration.js';
|
|
46
42
|
import { DSL_DATASPACE_EVENT } from '../__lib__/DSL_DataSpace_Event.js';
|
|
47
|
-
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
48
43
|
import { DataSpaceQualityEmote } from './DataSpaceQualityEmote.js';
|
|
49
44
|
|
|
50
45
|
const DataSpaceHeader = observer(
|
|
@@ -194,29 +189,6 @@ const DataSpaceHeader = observer(
|
|
|
194
189
|
title="More Actions..."
|
|
195
190
|
content={
|
|
196
191
|
<MenuContent>
|
|
197
|
-
{dataSpaceViewerState.currentExecutionContext && (
|
|
198
|
-
<>
|
|
199
|
-
<MenuContentItem
|
|
200
|
-
onClick={() =>
|
|
201
|
-
dataSpaceViewerState.queryDataSpace(
|
|
202
|
-
guaranteeNonNullable(
|
|
203
|
-
dataSpaceViewerState.currentExecutionContext,
|
|
204
|
-
).name,
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
>
|
|
208
|
-
Query Data Space
|
|
209
|
-
</MenuContentItem>
|
|
210
|
-
<MenuContentDivider />
|
|
211
|
-
</>
|
|
212
|
-
)}
|
|
213
|
-
<MenuContentItem
|
|
214
|
-
onClick={() =>
|
|
215
|
-
dataSpaceViewerState.viewProject(analysisResult.path)
|
|
216
|
-
}
|
|
217
|
-
>
|
|
218
|
-
View Project
|
|
219
|
-
</MenuContentItem>
|
|
220
192
|
<MenuContentItem
|
|
221
193
|
onClick={() => {
|
|
222
194
|
dataSpaceViewerState
|
|
@@ -224,32 +196,7 @@ const DataSpaceHeader = observer(
|
|
|
224
196
|
.catch(applicationStore.alertUnhandledError);
|
|
225
197
|
}}
|
|
226
198
|
>
|
|
227
|
-
View
|
|
228
|
-
</MenuContentItem>
|
|
229
|
-
<MenuContentDivider />
|
|
230
|
-
<MenuContentItem
|
|
231
|
-
onClick={() => {
|
|
232
|
-
const documentationUrl =
|
|
233
|
-
analysisResult.supportInfo?.documentationUrl;
|
|
234
|
-
if (documentationUrl) {
|
|
235
|
-
applicationStore.navigationService.navigator.visitAddress(
|
|
236
|
-
documentationUrl,
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
}}
|
|
240
|
-
>
|
|
241
|
-
Read Documentation
|
|
242
|
-
</MenuContentItem>
|
|
243
|
-
<MenuContentItem
|
|
244
|
-
onClick={() =>
|
|
245
|
-
dataSpaceViewerState.changeZone(
|
|
246
|
-
generateAnchorForActivity(
|
|
247
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT,
|
|
248
|
-
),
|
|
249
|
-
)
|
|
250
|
-
}
|
|
251
|
-
>
|
|
252
|
-
Get Help
|
|
199
|
+
View Project
|
|
253
200
|
</MenuContentItem>
|
|
254
201
|
</MenuContent>
|
|
255
202
|
}
|
|
@@ -18,7 +18,11 @@ import type { DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { DataSpaceQuickStart } from './DataSpaceQuickStart.js';
|
|
20
20
|
import { DataSpaceDataAccess } from './DataSpaceDataAccess.js';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
DataSpaceDescription,
|
|
23
|
+
DataSpaceWikiBadges,
|
|
24
|
+
} from './DataSpaceDescription.js';
|
|
25
|
+
import { DataSpaceLakehouseAccess } from './DataSpaceLakehouseAccess.js';
|
|
22
26
|
import { useEffect } from 'react';
|
|
23
27
|
import { ModelsDocumentation } from '@finos/legend-lego/model-documentation';
|
|
24
28
|
import { DiagramViewer } from '@finos/legend-extension-dsl-diagram';
|
|
@@ -57,7 +61,9 @@ export const DataSpaceWiki = observer(
|
|
|
57
61
|
|
|
58
62
|
return (
|
|
59
63
|
<div className="data-space__viewer__wiki">
|
|
64
|
+
<DataSpaceWikiBadges dataSpaceViewerState={dataSpaceViewerState} />
|
|
60
65
|
<DataSpaceDescription dataSpaceViewerState={dataSpaceViewerState} />
|
|
66
|
+
<DataSpaceLakehouseAccess dataSpaceViewerState={dataSpaceViewerState} />
|
|
61
67
|
<DiagramViewer
|
|
62
68
|
diagramViewerState={dataSpaceViewerState.diagramViewerState}
|
|
63
69
|
actions={{
|
|
@@ -28,16 +28,13 @@ import { BaseLayoutState } from '@finos/legend-extension-dsl-data-product';
|
|
|
28
28
|
|
|
29
29
|
export const DATA_SPACE_WIKI_PAGE_SECTIONS = [
|
|
30
30
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION,
|
|
31
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATASPACE_LAKEHOUSE_ACCESS,
|
|
31
32
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
|
|
32
33
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
|
|
33
34
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
|
|
34
35
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS,
|
|
35
36
|
];
|
|
36
37
|
|
|
37
|
-
const DATA_SPACE_WIKI_PAGE_ANCHORS = DATA_SPACE_WIKI_PAGE_SECTIONS.map(
|
|
38
|
-
(activity) => generateAnchorForActivity(activity),
|
|
39
|
-
);
|
|
40
|
-
|
|
41
38
|
export class DataSpaceLayoutState extends BaseLayoutState {
|
|
42
39
|
private dataSpaceViewerState!: DataSpaceViewerState;
|
|
43
40
|
|
|
@@ -53,7 +50,9 @@ export class DataSpaceLayoutState extends BaseLayoutState {
|
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
protected getValidAnchors(): string[] {
|
|
56
|
-
return
|
|
53
|
+
return this.dataSpaceViewerState.wikiPageSectionsToRender.map((activity) =>
|
|
54
|
+
generateAnchorForActivity(activity),
|
|
55
|
+
);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
protected get expectedGridCount(): number {
|
|
@@ -63,7 +62,7 @@ export class DataSpaceLayoutState extends BaseLayoutState {
|
|
|
63
62
|
override get isWikiPageFullyRendered(): boolean {
|
|
64
63
|
return (
|
|
65
64
|
super.isWikiPageFullyRendered &&
|
|
66
|
-
|
|
65
|
+
this.dataSpaceViewerState.wikiPageSectionsToRender.includes(
|
|
67
66
|
this.dataSpaceViewerState.currentActivity,
|
|
68
67
|
)
|
|
69
68
|
);
|
|
@@ -20,6 +20,7 @@ import type { DiagramAnalysisResult } from '@finos/legend-extension-dsl-diagram'
|
|
|
20
20
|
|
|
21
21
|
export enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
|
|
22
22
|
DESCRIPTION = 'description',
|
|
23
|
+
DATASPACE_LAKEHOUSE_ACCESS = 'dataspace-lakehouse-access',
|
|
23
24
|
DIAGRAM_VIEWER = 'diagram-viewer',
|
|
24
25
|
MODELS_DOCUMENTATION = 'models-documentation',
|
|
25
26
|
QUICK_START = 'quick-start',
|
|
@@ -164,6 +164,7 @@ export class DataSpaceViewerState extends BaseViewerState<
|
|
|
164
164
|
legendAIConfig: observable,
|
|
165
165
|
isVerified: computed,
|
|
166
166
|
isDataAccessAvailable: computed,
|
|
167
|
+
referencedDataProductPaths: computed,
|
|
167
168
|
setCurrentActivity: action,
|
|
168
169
|
setCurrentExecutionContext: action,
|
|
169
170
|
setCurrentRuntime: action,
|
|
@@ -217,6 +218,7 @@ export class DataSpaceViewerState extends BaseViewerState<
|
|
|
217
218
|
this.legendAIConfig = DEFAULT_LEGEND_AI_CONFIG;
|
|
218
219
|
this.initMappingProviderAccessState();
|
|
219
220
|
this.initExecutableAccessStates();
|
|
221
|
+
this.initReferencedDataProductAccessStates();
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
get dataSpaceAnalysisResult(): DataSpaceAnalysisResult {
|
|
@@ -224,11 +226,21 @@ export class DataSpaceViewerState extends BaseViewerState<
|
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
protected getValidSections(): string[] {
|
|
227
|
-
return
|
|
229
|
+
return this.wikiPageSectionsToRender.map((activity) =>
|
|
228
230
|
generateAnchorForActivity(activity),
|
|
229
231
|
);
|
|
230
232
|
}
|
|
231
233
|
|
|
234
|
+
get wikiPageSectionsToRender(): DATA_SPACE_VIEWER_ACTIVITY_MODE[] {
|
|
235
|
+
if (this.referencedDataProductPaths.length > 0) {
|
|
236
|
+
return DATA_SPACE_WIKI_PAGE_SECTIONS;
|
|
237
|
+
}
|
|
238
|
+
return DATA_SPACE_WIKI_PAGE_SECTIONS.filter(
|
|
239
|
+
(section) =>
|
|
240
|
+
section !== DATA_SPACE_VIEWER_ACTIVITY_MODE.DATASPACE_LAKEHOUSE_ACCESS,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
232
244
|
get isVerified(): boolean {
|
|
233
245
|
return Boolean(
|
|
234
246
|
this.dataSpaceAnalysisResult.stereotypes.find(
|
|
@@ -356,6 +368,28 @@ export class DataSpaceViewerState extends BaseViewerState<
|
|
|
356
368
|
}
|
|
357
369
|
}
|
|
358
370
|
|
|
371
|
+
private initReferencedDataProductAccessStates(): void {
|
|
372
|
+
for (const path of this.referencedDataProductPaths) {
|
|
373
|
+
this.buildDataProductAccessState(path);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
get referencedDataProductPaths(): string[] {
|
|
378
|
+
const paths: string[] = [];
|
|
379
|
+
const seen = new Set<string>();
|
|
380
|
+
for (const metadata of this.dataSpaceAnalysisResult
|
|
381
|
+
.dataSpaceReferencesMetadataInfo) {
|
|
382
|
+
if (
|
|
383
|
+
metadata instanceof DataproductReferenceMetadata &&
|
|
384
|
+
!seen.has(metadata.dataproductPath)
|
|
385
|
+
) {
|
|
386
|
+
seen.add(metadata.dataproductPath);
|
|
387
|
+
paths.push(metadata.dataproductPath);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return paths;
|
|
391
|
+
}
|
|
392
|
+
|
|
359
393
|
/**
|
|
360
394
|
* Looks up the initialized access state for a Data Product path (may still
|
|
361
395
|
* be initializing). Used by executable renderers to grab the state for a
|
|
@@ -436,7 +470,7 @@ export class DataSpaceViewerState extends BaseViewerState<
|
|
|
436
470
|
(activity) => generateAnchorForActivity(activity) === activityChunk,
|
|
437
471
|
);
|
|
438
472
|
if (activityChunk && matchingActivity) {
|
|
439
|
-
if (
|
|
473
|
+
if (this.wikiPageSectionsToRender.includes(matchingActivity)) {
|
|
440
474
|
this.layoutState.setWikiPageAnchorToNavigate({
|
|
441
475
|
anchor: zone,
|
|
442
476
|
});
|
package/tsconfig.json
CHANGED
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"./src/components/DataSpaceDescription.tsx",
|
|
104
104
|
"./src/components/DataSpaceExecutionContextViewer.tsx",
|
|
105
105
|
"./src/components/DataSpaceInfoPanel.tsx",
|
|
106
|
+
"./src/components/DataSpaceLakehouseAccess.tsx",
|
|
106
107
|
"./src/components/DataSpaceLegendAIIntegration.tsx",
|
|
107
108
|
"./src/components/DataSpaceMarkdownTextViewer.tsx",
|
|
108
109
|
"./src/components/DataSpacePlaceholder.tsx",
|