@finos/legend-extension-dsl-data-space 9.1.7 → 9.2.1
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/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 +3 -2
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.js +13 -4
- 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/graph/DSL_DataSpace_HashUtils.d.ts +1 -0
- package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
- package/lib/graph/DSL_DataSpace_HashUtils.js +1 -0
- package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -19
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +41 -32
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
- package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +23 -17
- package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.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 +4 -11
- 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 +3 -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 +25 -2
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +21 -17
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +41 -32
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +2 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +44 -10
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +5 -5
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts +35 -0
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerDataAccessState.js +100 -0
- package/lib/stores/DataSpaceViewerDataAccessState.js.map +1 -0
- package/lib/stores/DataSpaceViewerState.d.ts +34 -20
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +100 -29
- 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 +16 -16
- package/src/components/DataSpaceDataAccess.tsx +116 -2
- package/src/components/DataSpaceDescription.tsx +7 -1
- package/src/components/DataSpaceDiagramViewer.tsx +3 -3
- package/src/components/DataSpaceQuickStart.tsx +5 -1
- package/src/components/DataSpaceViewer.tsx +6 -2
- package/src/components/DataSpaceViewerActivityBar.tsx +14 -5
- package/src/components/DataSpaceWiki.tsx +2 -0
- package/src/components/query/DataSpaceQueryCreator.tsx +1 -1
- package/src/graph/DSL_DataSpace_HashUtils.ts +1 -0
- package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +59 -55
- package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +23 -30
- package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +9 -18
- package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +34 -3
- package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +57 -46
- package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +59 -14
- package/src/stores/DataSpaceViewerDataAccessState.ts +146 -0
- package/src/stores/DataSpaceViewerState.ts +126 -33
- package/src/stores/query/DataSpaceAdvancedSearchState.ts +14 -1
- package/src/stores/studio/DataSpacePreviewState.ts +3 -0
- package/tsconfig.json +1 -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
|
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
|
|
40
40
|
import type { DSL_DataSpace_LegendApplicationPlugin_Extension } from '../stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js';
|
|
41
41
|
import { useState } from 'react';
|
|
42
|
+
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
42
43
|
|
|
43
44
|
enum TDS_EXECUTABLE_ACTION_TAB {
|
|
44
45
|
COLUMN_SPECS = 'COLUMN_SPECS',
|
|
@@ -80,7 +81,7 @@ const DataSpaceExecutableTDSResultView = observer(
|
|
|
80
81
|
<div className="data-space__viewer__quickstart__item__header__title">
|
|
81
82
|
{executableAnalysisResult.title}
|
|
82
83
|
</div>
|
|
83
|
-
<div className="data-space__viewer__quickstart__item__header__type
|
|
84
|
+
<div className="data-space__viewer__quickstart__item__header__type">
|
|
84
85
|
TDS
|
|
85
86
|
</div>
|
|
86
87
|
<div className="data-space__viewer__quickstart__item__header__anchor">
|
|
@@ -375,6 +376,9 @@ export const DataSpaceQuickStart = observer(
|
|
|
375
376
|
))}
|
|
376
377
|
</div>
|
|
377
378
|
</div>
|
|
379
|
+
{analysisResult.executables.length === 0 && (
|
|
380
|
+
<DataSpaceWikiPlaceholder message="No quick start provided" />
|
|
381
|
+
)}
|
|
378
382
|
</div>
|
|
379
383
|
);
|
|
380
384
|
},
|
|
@@ -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">
|
|
@@ -136,6 +136,10 @@ export const DataSpaceViewer = observer(
|
|
|
136
136
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_AVAILABILITY && (
|
|
137
137
|
<DataSpacePlaceholderPanel message="View data availability (Work in Progress)" />
|
|
138
138
|
)}
|
|
139
|
+
{dataSpaceViewerState.currentActivity ===
|
|
140
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS && (
|
|
141
|
+
<DataSpacePlaceholderPanel message="View data readiness (Work in Progress)" />
|
|
142
|
+
)}
|
|
139
143
|
{dataSpaceViewerState.currentActivity ===
|
|
140
144
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST && (
|
|
141
145
|
<DataSpacePlaceholderPanel message="View data cost (Work in Progress)" />
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
MenuContentItem,
|
|
34
34
|
MenuIcon,
|
|
35
35
|
DropdownMenu,
|
|
36
|
+
DataReadyIcon,
|
|
36
37
|
} from '@finos/legend-art';
|
|
37
38
|
import {
|
|
38
39
|
type DataSpaceViewerState,
|
|
@@ -42,12 +43,11 @@ import {
|
|
|
42
43
|
const ActivityBarMenu = observer(
|
|
43
44
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
44
45
|
const { dataSpaceViewerState } = props;
|
|
46
|
+
const layoutState = dataSpaceViewerState.layoutState;
|
|
45
47
|
|
|
46
48
|
// actions
|
|
47
49
|
const toggleExpandedMode = (): void =>
|
|
48
|
-
|
|
49
|
-
!dataSpaceViewerState.isExpandedModeEnabled,
|
|
50
|
-
);
|
|
50
|
+
layoutState.enableExpandedMode(!layoutState.isExpandedModeEnabled);
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
53
|
<>
|
|
@@ -62,7 +62,7 @@ const ActivityBarMenu = observer(
|
|
|
62
62
|
content={
|
|
63
63
|
<MenuContent>
|
|
64
64
|
<MenuContentItem onClick={toggleExpandedMode}>
|
|
65
|
-
{
|
|
65
|
+
{layoutState.isExpandedModeEnabled
|
|
66
66
|
? 'Disable Expanded Mode'
|
|
67
67
|
: 'Enable Expanded Mode'}{' '}
|
|
68
68
|
</MenuContentItem>
|
|
@@ -88,8 +88,10 @@ export const DataSpaceViewerActivityBar = observer(
|
|
|
88
88
|
const { dataSpaceViewerState } = props;
|
|
89
89
|
const changeActivity =
|
|
90
90
|
(activity: DATA_SPACE_VIEWER_ACTIVITY_MODE): (() => void) =>
|
|
91
|
-
(): void =>
|
|
91
|
+
(): void => {
|
|
92
92
|
dataSpaceViewerState.setCurrentActivity(activity);
|
|
93
|
+
dataSpaceViewerState.onZoneChange?.(activity);
|
|
94
|
+
};
|
|
93
95
|
|
|
94
96
|
const wikiActivities: DataSpaceViewerActivityConfig[] = [
|
|
95
97
|
{
|
|
@@ -145,6 +147,13 @@ export const DataSpaceViewerActivityBar = observer(
|
|
|
145
147
|
<AvailabilityIcon className="data-space__viewer__activity-bar__icon--availability" />
|
|
146
148
|
),
|
|
147
149
|
},
|
|
150
|
+
{
|
|
151
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS,
|
|
152
|
+
title: 'Data Readiness',
|
|
153
|
+
icon: (
|
|
154
|
+
<DataReadyIcon className="data-space__viewer__activity-bar__icon--readiness" />
|
|
155
|
+
),
|
|
156
|
+
},
|
|
148
157
|
{
|
|
149
158
|
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST,
|
|
150
159
|
title: 'Data Cost',
|
|
@@ -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} />
|
|
@@ -80,7 +80,7 @@ export const DataSpaceQueryCreator = observer(() => {
|
|
|
80
80
|
const runtimePath =
|
|
81
81
|
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.RUNTIME_PATH];
|
|
82
82
|
const classPath =
|
|
83
|
-
applicationStore.navigationService.navigator.
|
|
83
|
+
applicationStore.navigationService.navigator.getCurrentLocationParameterValue(
|
|
84
84
|
DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN.CLASS_PATH,
|
|
85
85
|
);
|
|
86
86
|
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
export enum DATA_SPACE_HASH_STRUCTURE {
|
|
18
18
|
DATA_SPACE = 'DATA_SPACE',
|
|
19
19
|
DATA_SPACE_EXECUTION_CONTEXT = 'DATA_SPACE_EXECUTION_CONTEXT',
|
|
20
|
+
DATA_SPACE_ELEMENT_POINTER = 'DATA_SPACE_ELEMENT_POINTER',
|
|
20
21
|
DATA_SPACE_EXECUTABLE = 'DATA_SPACE_EXECUTABLE',
|
|
21
22
|
DATA_SPACE_DIAGRAM = 'DATA_SPACE_DIAGRAM',
|
|
22
23
|
DATA_SPACE_SUPPORT_COMBINED_INFO = 'DATA_SPACE_SUPPORT_COMBINED_INFO',
|
package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts
CHANGED
|
@@ -24,52 +24,11 @@ import {
|
|
|
24
24
|
type Class,
|
|
25
25
|
type Enumeration,
|
|
26
26
|
type Association,
|
|
27
|
+
type Package,
|
|
27
28
|
} from '@finos/legend-graph';
|
|
28
29
|
import { DATA_SPACE_HASH_STRUCTURE } from '../../../../../DSL_DataSpace_HashUtils.js';
|
|
29
30
|
import type { Diagram } from '@finos/legend-extension-dsl-diagram';
|
|
30
31
|
|
|
31
|
-
export abstract class DataSpaceSupportInfo implements Hashable {
|
|
32
|
-
documentationUrl?: string | undefined;
|
|
33
|
-
|
|
34
|
-
abstract get hashCode(): string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class DataSpaceSupportEmail
|
|
38
|
-
extends DataSpaceSupportInfo
|
|
39
|
-
implements Hashable
|
|
40
|
-
{
|
|
41
|
-
address!: string;
|
|
42
|
-
|
|
43
|
-
get hashCode(): string {
|
|
44
|
-
return hashArray([
|
|
45
|
-
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_EMAIL,
|
|
46
|
-
this.documentationUrl ?? '',
|
|
47
|
-
this.address,
|
|
48
|
-
]);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export class DataSpaceSupportCombinedInfo
|
|
53
|
-
extends DataSpaceSupportInfo
|
|
54
|
-
implements Hashable
|
|
55
|
-
{
|
|
56
|
-
emails?: string[] | undefined;
|
|
57
|
-
website?: string | undefined;
|
|
58
|
-
faqUrl?: string | undefined;
|
|
59
|
-
supportUrl?: string | undefined;
|
|
60
|
-
|
|
61
|
-
get hashCode(): string {
|
|
62
|
-
return hashArray([
|
|
63
|
-
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_COMBINED_INFO,
|
|
64
|
-
this.documentationUrl ?? '',
|
|
65
|
-
hashArray(this.emails ?? []),
|
|
66
|
-
this.website ?? '',
|
|
67
|
-
this.faqUrl ?? '',
|
|
68
|
-
this.supportUrl ?? '',
|
|
69
|
-
]);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
32
|
export class DataSpaceExecutionContext implements Hashable {
|
|
74
33
|
name!: string;
|
|
75
34
|
title?: string | undefined;
|
|
@@ -89,6 +48,21 @@ export class DataSpaceExecutionContext implements Hashable {
|
|
|
89
48
|
}
|
|
90
49
|
}
|
|
91
50
|
|
|
51
|
+
export type DataSpaceElement = Package | Class | Enumeration | Association;
|
|
52
|
+
|
|
53
|
+
export class DataSpaceElementPointer implements Hashable {
|
|
54
|
+
element!: PackageableElementReference<DataSpaceElement>;
|
|
55
|
+
exclude?: boolean | undefined;
|
|
56
|
+
|
|
57
|
+
get hashCode(): string {
|
|
58
|
+
return hashArray([
|
|
59
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_ELEMENT_POINTER,
|
|
60
|
+
this.element.valueForSerialization ?? '',
|
|
61
|
+
this.exclude ?? '',
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
92
66
|
export class DataSpaceExecutable implements Hashable {
|
|
93
67
|
title!: string;
|
|
94
68
|
description?: string | undefined;
|
|
@@ -119,15 +93,54 @@ export class DataSpaceDiagram implements Hashable {
|
|
|
119
93
|
}
|
|
120
94
|
}
|
|
121
95
|
|
|
122
|
-
export
|
|
96
|
+
export abstract class DataSpaceSupportInfo implements Hashable {
|
|
97
|
+
documentationUrl?: string | undefined;
|
|
98
|
+
|
|
99
|
+
abstract get hashCode(): string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export class DataSpaceSupportEmail
|
|
103
|
+
extends DataSpaceSupportInfo
|
|
104
|
+
implements Hashable
|
|
105
|
+
{
|
|
106
|
+
address!: string;
|
|
107
|
+
|
|
108
|
+
get hashCode(): string {
|
|
109
|
+
return hashArray([
|
|
110
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_EMAIL,
|
|
111
|
+
this.documentationUrl ?? '',
|
|
112
|
+
this.address,
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export class DataSpaceSupportCombinedInfo
|
|
118
|
+
extends DataSpaceSupportInfo
|
|
119
|
+
implements Hashable
|
|
120
|
+
{
|
|
121
|
+
emails?: string[] | undefined;
|
|
122
|
+
website?: string | undefined;
|
|
123
|
+
faqUrl?: string | undefined;
|
|
124
|
+
supportUrl?: string | undefined;
|
|
125
|
+
|
|
126
|
+
get hashCode(): string {
|
|
127
|
+
return hashArray([
|
|
128
|
+
DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_COMBINED_INFO,
|
|
129
|
+
this.documentationUrl ?? '',
|
|
130
|
+
hashArray(this.emails ?? []),
|
|
131
|
+
this.website ?? '',
|
|
132
|
+
this.faqUrl ?? '',
|
|
133
|
+
this.supportUrl ?? '',
|
|
134
|
+
]);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
123
137
|
|
|
124
138
|
export class DataSpace extends PackageableElement implements Hashable {
|
|
125
139
|
title?: string | undefined;
|
|
126
140
|
description?: string | undefined;
|
|
127
141
|
executionContexts: DataSpaceExecutionContext[] = [];
|
|
128
142
|
defaultExecutionContext!: DataSpaceExecutionContext;
|
|
129
|
-
|
|
130
|
-
elements?: PackageableElementReference<DataSpaceElement>[] | undefined;
|
|
143
|
+
elements?: DataSpaceElementPointer[] | undefined;
|
|
131
144
|
executables?: DataSpaceExecutable[] | undefined;
|
|
132
145
|
diagrams?: DataSpaceDiagram[] | undefined;
|
|
133
146
|
supportInfo?: DataSpaceSupportInfo | undefined;
|
|
@@ -143,16 +156,7 @@ export class DataSpace extends PackageableElement implements Hashable {
|
|
|
143
156
|
this.description ?? '',
|
|
144
157
|
hashArray(this.executionContexts),
|
|
145
158
|
this.defaultExecutionContext.name,
|
|
146
|
-
hashArray(
|
|
147
|
-
(this.featuredDiagrams ?? []).map(
|
|
148
|
-
(diagram) => diagram.valueForSerialization ?? '',
|
|
149
|
-
),
|
|
150
|
-
),
|
|
151
|
-
hashArray(
|
|
152
|
-
(this.elements ?? []).map(
|
|
153
|
-
(element) => element.valueForSerialization ?? '',
|
|
154
|
-
),
|
|
155
|
-
),
|
|
159
|
+
hashArray(this.elements ?? []),
|
|
156
160
|
hashArray(this.executables ?? []),
|
|
157
161
|
hashArray(this.diagrams ?? []),
|
|
158
162
|
this.supportInfo ?? '',
|
|
@@ -19,6 +19,7 @@ import V1_SYSTEM_MODELS from './v1/V1_DSL_DataSpace_SystemModels.json';
|
|
|
19
19
|
import {
|
|
20
20
|
V1_DataSpace,
|
|
21
21
|
V1_DataSpaceDiagram,
|
|
22
|
+
V1_DataSpaceElementPointer,
|
|
22
23
|
V1_DataSpaceExecutable,
|
|
23
24
|
V1_DataSpaceExecutionContext,
|
|
24
25
|
V1_DataSpaceSupportCombinedInfo,
|
|
@@ -32,10 +33,11 @@ import {
|
|
|
32
33
|
isNonNullable,
|
|
33
34
|
assertType,
|
|
34
35
|
} from '@finos/legend-shared';
|
|
35
|
-
import { deserialize
|
|
36
|
+
import { deserialize } from 'serializr';
|
|
36
37
|
import {
|
|
37
|
-
V1_dataSpaceModelSchema,
|
|
38
38
|
V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE,
|
|
39
|
+
V1_deserializeDataSpace,
|
|
40
|
+
V1_serializeDataSpace,
|
|
39
41
|
} from './v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js';
|
|
40
42
|
import { getOwnDataSpace } from '../../DSL_DataSpace_GraphManagerHelper.js';
|
|
41
43
|
import {
|
|
@@ -46,6 +48,7 @@ import {
|
|
|
46
48
|
DataSpaceSupportEmail,
|
|
47
49
|
type DataSpaceElement,
|
|
48
50
|
DataSpaceDiagram,
|
|
51
|
+
DataSpaceElementPointer,
|
|
49
52
|
} from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
|
50
53
|
import {
|
|
51
54
|
type PackageableElement,
|
|
@@ -73,11 +76,9 @@ import {
|
|
|
73
76
|
Enumeration,
|
|
74
77
|
Association,
|
|
75
78
|
type PackageableElementReference,
|
|
79
|
+
Package,
|
|
76
80
|
} from '@finos/legend-graph';
|
|
77
|
-
import {
|
|
78
|
-
V1_DSL_Diagram_PackageableElementPointerType,
|
|
79
|
-
V1_resolveDiagram,
|
|
80
|
-
} from '@finos/legend-extension-dsl-diagram';
|
|
81
|
+
import { V1_resolveDiagram } from '@finos/legend-extension-dsl-diagram';
|
|
81
82
|
|
|
82
83
|
export const DATA_SPACE_ELEMENT_CLASSIFIER_PATH =
|
|
83
84
|
'meta::pure::metamodel::dataSpace::DataSpace';
|
|
@@ -161,26 +162,26 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
|
|
|
161
162
|
);
|
|
162
163
|
element.title = elementProtocol.title;
|
|
163
164
|
element.description = elementProtocol.description;
|
|
164
|
-
if (elementProtocol.featuredDiagrams) {
|
|
165
|
-
element.featuredDiagrams = elementProtocol.featuredDiagrams.map(
|
|
166
|
-
(pointer) => V1_resolveDiagram(pointer.path, context),
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
165
|
if (elementProtocol.elements) {
|
|
170
166
|
element.elements = elementProtocol.elements.map((pointer) => {
|
|
171
167
|
const elementReference = context.resolveElement(
|
|
172
168
|
pointer.path,
|
|
173
|
-
|
|
169
|
+
true,
|
|
174
170
|
);
|
|
175
171
|
if (
|
|
172
|
+
elementReference.value instanceof Package ||
|
|
176
173
|
elementReference.value instanceof Class ||
|
|
177
174
|
elementReference.value instanceof Enumeration ||
|
|
178
175
|
elementReference.value instanceof Association
|
|
179
176
|
) {
|
|
180
|
-
|
|
177
|
+
const elementPointer = new DataSpaceElementPointer();
|
|
178
|
+
elementPointer.element =
|
|
179
|
+
elementReference as unknown as PackageableElementReference<DataSpaceElement>;
|
|
180
|
+
elementPointer.exclude = pointer.exclude;
|
|
181
|
+
return elementPointer;
|
|
181
182
|
}
|
|
182
183
|
throw new UnsupportedOperationError(
|
|
183
|
-
`Can't find data space element (only allow
|
|
184
|
+
`Can't find data space element (only allow packages, classes, enumerations, and associations) '${pointer.path}'`,
|
|
184
185
|
);
|
|
185
186
|
});
|
|
186
187
|
}
|
|
@@ -270,7 +271,7 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
|
|
|
270
271
|
plugins: PureProtocolProcessorPlugin[],
|
|
271
272
|
): PlainObject<V1_PackageableElement> | undefined => {
|
|
272
273
|
if (elementProtocol instanceof V1_DataSpace) {
|
|
273
|
-
return
|
|
274
|
+
return V1_serializeDataSpace(elementProtocol);
|
|
274
275
|
}
|
|
275
276
|
return undefined;
|
|
276
277
|
},
|
|
@@ -284,7 +285,7 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
|
|
|
284
285
|
plugins: PureProtocolProcessorPlugin[],
|
|
285
286
|
): V1_PackageableElement | undefined => {
|
|
286
287
|
if (json._type === V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE) {
|
|
287
|
-
return
|
|
288
|
+
return V1_deserializeDataSpace(json);
|
|
288
289
|
}
|
|
289
290
|
return undefined;
|
|
290
291
|
},
|
|
@@ -327,20 +328,12 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
|
|
|
327
328
|
metamodel.defaultExecutionContext.name;
|
|
328
329
|
protocol.title = metamodel.title;
|
|
329
330
|
protocol.description = metamodel.description;
|
|
330
|
-
protocol.
|
|
331
|
-
(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
);
|
|
337
|
-
protocol.elements = metamodel.elements?.map(
|
|
338
|
-
(elementReference) =>
|
|
339
|
-
new V1_PackageableElementPointer(
|
|
340
|
-
PackageableElementPointerType.CLASS,
|
|
341
|
-
elementReference.valueForSerialization ?? '',
|
|
342
|
-
),
|
|
343
|
-
);
|
|
331
|
+
protocol.elements = metamodel.elements?.map((pointer) => {
|
|
332
|
+
const elementPointer = new V1_DataSpaceElementPointer();
|
|
333
|
+
elementPointer.exclude = pointer.exclude;
|
|
334
|
+
elementPointer.path = pointer.element.valueForSerialization ?? '';
|
|
335
|
+
return elementPointer;
|
|
336
|
+
});
|
|
344
337
|
protocol.executables = metamodel.executables?.map((executable) => {
|
|
345
338
|
const executableProtocol = new V1_DataSpaceExecutable();
|
|
346
339
|
executableProtocol.title = executable.title;
|
|
@@ -135,7 +135,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
|
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
return this.buildDataSpaceAnalytics(
|
|
138
|
-
V1_DataSpaceAnalysisResult.
|
|
138
|
+
V1_DataSpaceAnalysisResult.deserialize(analysisResult),
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -362,23 +362,14 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
|
|
|
362
362
|
return entries;
|
|
363
363
|
});
|
|
364
364
|
|
|
365
|
-
//
|
|
366
|
-
result.diagrams = analysisResult.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
.concat(
|
|
374
|
-
analysisResult.diagrams.map((diagramProtocol) => {
|
|
375
|
-
const diagram = new DataSpaceDiagramAnalysisResult();
|
|
376
|
-
diagram.title = diagramProtocol.title;
|
|
377
|
-
diagram.description = diagramProtocol.description;
|
|
378
|
-
diagram.diagram = getDiagram(diagramProtocol.diagram, graph);
|
|
379
|
-
return diagram;
|
|
380
|
-
}),
|
|
381
|
-
);
|
|
365
|
+
// diagrams
|
|
366
|
+
result.diagrams = analysisResult.diagrams.map((diagramProtocol) => {
|
|
367
|
+
const diagram = new DataSpaceDiagramAnalysisResult();
|
|
368
|
+
diagram.title = diagramProtocol.title;
|
|
369
|
+
diagram.description = diagramProtocol.description;
|
|
370
|
+
diagram.diagram = getDiagram(diagramProtocol.diagram, graph);
|
|
371
|
+
return diagram;
|
|
372
|
+
});
|
|
382
373
|
|
|
383
374
|
// executables
|
|
384
375
|
result.executables = analysisResult.executables.map(
|