@finos/legend-extension-dsl-data-space 9.1.3 → 9.1.5
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/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +1 -1
- package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +1 -1
- package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +15 -2
- package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
- package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
- package/lib/components/DataSpaceDiagramViewer.js +77 -0
- package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
- package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
- package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
- package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
- package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
- package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
- package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
- package/lib/components/DataSpaceInfoPanel.js +38 -0
- package/lib/components/DataSpaceInfoPanel.js.map +1 -0
- package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
- package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
- package/lib/components/DataSpaceModelsDocumentation.js +60 -0
- package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
- package/lib/components/{studio/DataSpacePreview.d.ts → DataSpaceQuickStart.d.ts} +2 -5
- package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
- package/lib/components/DataSpaceQuickStart.js +17 -0
- package/lib/components/DataSpaceQuickStart.js.map +1 -0
- package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
- package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
- package/lib/components/DataSpaceSupportPanel.js +40 -0
- package/lib/components/DataSpaceSupportPanel.js.map +1 -0
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +29 -278
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
- package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
- package/lib/components/DataSpaceViewerActivityBar.js +105 -0
- package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
- package/lib/components/DataSpaceWiki.d.ts +23 -0
- package/lib/components/DataSpaceWiki.d.ts.map +1 -0
- package/lib/components/DataSpaceWiki.js +36 -0
- package/lib/components/DataSpaceWiki.js.map +1 -0
- package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
- package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/studio/DataSpacePreviewAction.js +1 -1
- package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
- package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
- package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
- package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
- package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
- 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 +50 -0
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +36 -5
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +35 -8
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.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 +70 -11
- 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 +48 -8
- package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
- 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 +92 -3
- 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 +23 -0
- 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 +50 -0
- 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 +0 -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 +33 -5
- 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 +9 -5
- package/lib/stores/DataSpaceViewerState.d.ts +16 -14
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +19 -12
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.js +0 -3
- package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
- package/package.json +20 -16
- package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
- package/src/components/DataSpaceDiagramViewer.tsx +191 -0
- package/src/components/DataSpaceExecutionContextViewer.tsx +173 -0
- package/src/components/DataSpaceInfoPanel.tsx +170 -0
- package/src/components/DataSpaceModelsDocumentation.tsx +92 -0
- package/src/components/DataSpaceQuickStart.tsx +15 -0
- package/src/components/DataSpaceSupportPanel.tsx +80 -0
- package/src/components/DataSpaceViewer.tsx +73 -1063
- package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
- package/src/components/DataSpaceWiki.tsx +76 -0
- package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
- package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
- package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
- package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
- package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
- package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +46 -15
- package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
- package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +65 -15
- package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
- package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
- package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
- package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
- package/src/stores/DataSpaceViewerState.ts +24 -20
- package/src/stores/studio/DataSpacePreviewState.ts +0 -5
- package/tsconfig.json +8 -3
- package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
- package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
- package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
- package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
- package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
- package/lib/components/studio/DataSpacePreview.js +0 -52
- package/lib/components/studio/DataSpacePreview.js.map +0 -1
- package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
- package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
- package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
- package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
- package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
- package/src/components/studio/DataSpacePreview.tsx +0 -129
- package/src/stores/studio/DataSpacePreviewStore.ts +0 -172
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAC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AClC,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;CAwE3D"}
|
|
@@ -66,9 +66,6 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
66
66
|
onDiagramClassDoubleClick: (classView) => {
|
|
67
67
|
queryClass(classView.class.value, this.editorStore).catch(this.editorStore.applicationStore.alertUnhandledError);
|
|
68
68
|
},
|
|
69
|
-
}, {
|
|
70
|
-
HACKY__previewExperimentalFeatures: this.editorStore.applicationStore.config.options
|
|
71
|
-
.HACKY__previewExperimentalFeatures,
|
|
72
69
|
});
|
|
73
70
|
this.loadDataSpaceState.pass();
|
|
74
71
|
}
|
|
@@ -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,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGhE,OAAO,EAAE,sCAAsC,EAAE,MAAM,6EAA6E,CAAC;AACrI,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IACpD,WAAW,CAAc;IAEzB,kBAAkB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAEnD,SAAS,C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C,mBAAmB,CAAC,aAAa,CACjE,+CAA+C,CAChD,CAAC;gBACJ,CAAC;gBACD,eAAe,EAAE,KAAK,IAAI,EAAE;oBAC1B,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACjE,+CAA+C,CAChD,CAAC;gBACJ,CAAC;gBACD,yBAAyB,EAAE,CAAC,SAAoB,EAAQ,EAAE;oBACxD,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CACvD,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CACtD,CAAC;gBACJ,CAAC;aACF,CACF,CAAC;YACF,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;SAChC;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1E;gBAAS;YACR,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SAC/C;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.5",
|
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,32 +43,36 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@finos/legend-
|
|
51
|
-
"@finos/legend-
|
|
52
|
-
"@finos/legend-
|
|
53
|
-
"@finos/legend-
|
|
54
|
-
"@finos/legend-
|
|
55
|
-
"@finos/legend-
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
46
|
+
"@ag-grid-community/client-side-row-model": "29.2.0",
|
|
47
|
+
"@ag-grid-community/core": "29.2.0",
|
|
48
|
+
"@ag-grid-community/react": "29.2.0",
|
|
49
|
+
"@ag-grid-community/styles": "29.2.0",
|
|
50
|
+
"@finos/legend-application": "13.0.4",
|
|
51
|
+
"@finos/legend-application-query": "11.0.4",
|
|
52
|
+
"@finos/legend-application-studio": "23.1.0",
|
|
53
|
+
"@finos/legend-art": "5.0.38",
|
|
54
|
+
"@finos/legend-extension-dsl-diagram": "7.1.44",
|
|
55
|
+
"@finos/legend-graph": "25.0.0",
|
|
56
|
+
"@finos/legend-query-builder": "1.0.4",
|
|
57
|
+
"@finos/legend-server-depot": "4.4.8",
|
|
58
|
+
"@finos/legend-shared": "8.0.3",
|
|
59
|
+
"@finos/legend-storage": "3.0.43",
|
|
60
|
+
"@types/react": "18.0.29",
|
|
61
|
+
"mobx": "6.9.0",
|
|
58
62
|
"mobx-react-lite": "3.4.3",
|
|
59
63
|
"react": "18.2.0",
|
|
60
64
|
"react-dom": "18.2.0",
|
|
61
65
|
"serializr": "3.0.2"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
|
-
"@finos/legend-dev-utils": "2.0.
|
|
68
|
+
"@finos/legend-dev-utils": "2.0.47",
|
|
65
69
|
"@jest/globals": "29.5.0",
|
|
66
70
|
"cross-env": "7.0.3",
|
|
67
71
|
"eslint": "8.36.0",
|
|
68
72
|
"jest": "29.5.0",
|
|
69
73
|
"npm-run-all": "4.1.5",
|
|
70
|
-
"rimraf": "4.4.
|
|
71
|
-
"sass": "1.
|
|
74
|
+
"rimraf": "4.4.1",
|
|
75
|
+
"sass": "1.60.0",
|
|
72
76
|
"typescript": "5.0.2"
|
|
73
77
|
},
|
|
74
78
|
"peerDependencies": {
|
|
@@ -20,6 +20,7 @@ export const SIMPLE_DATA_SPACE_SNIPPET = `DataSpace \${1:model::NewDataSpace}
|
|
|
20
20
|
[
|
|
21
21
|
{
|
|
22
22
|
name: '\${5:Some Context}';
|
|
23
|
+
title: 'New Execution Context';
|
|
23
24
|
description: 'some information about the execution context';
|
|
24
25
|
mapping: \${6:model::SomeMapping};
|
|
25
26
|
defaultRuntime: \${7:model::SomeRuntime};
|
|
@@ -27,14 +28,26 @@ export const SIMPLE_DATA_SPACE_SNIPPET = `DataSpace \${1:model::NewDataSpace}
|
|
|
27
28
|
];
|
|
28
29
|
defaultExecutionContext: '\${5:Some Context}';
|
|
29
30
|
// description: 'description of the data models';
|
|
30
|
-
//
|
|
31
|
+
// diagrams:
|
|
31
32
|
// [
|
|
32
|
-
//
|
|
33
|
+
// {
|
|
34
|
+
// title: 'Some Diagram';
|
|
35
|
+
// description: 'some diagram';
|
|
36
|
+
// diagram: model::SomeDiagram;
|
|
37
|
+
// }
|
|
33
38
|
// ];
|
|
34
39
|
// elements:
|
|
35
40
|
// [
|
|
36
41
|
// model::SomeClass,
|
|
37
42
|
// ];
|
|
43
|
+
// executables:
|
|
44
|
+
// [
|
|
45
|
+
// {
|
|
46
|
+
// title: 'Some Executable';
|
|
47
|
+
// description: 'some executable';
|
|
48
|
+
// executable: model::SomeExecutable;
|
|
49
|
+
// }
|
|
50
|
+
// ];
|
|
38
51
|
// supportInfo: Email {
|
|
39
52
|
// address: 'someEmail@test.org';
|
|
40
53
|
// };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
BlankPanelContent,
|
|
19
|
+
CircleIcon,
|
|
20
|
+
ThinChevronLeftIcon,
|
|
21
|
+
ThinChevronRightIcon,
|
|
22
|
+
clsx,
|
|
23
|
+
useResizeDetector,
|
|
24
|
+
} from '@finos/legend-art';
|
|
25
|
+
import type { DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
26
|
+
import { observer } from 'mobx-react-lite';
|
|
27
|
+
import { forwardRef, useEffect, useRef } from 'react';
|
|
28
|
+
import {
|
|
29
|
+
DiagramRenderer,
|
|
30
|
+
type Diagram,
|
|
31
|
+
} from '@finos/legend-extension-dsl-diagram';
|
|
32
|
+
import {
|
|
33
|
+
getNullableFirstElement,
|
|
34
|
+
getNullableLastElement,
|
|
35
|
+
guaranteeNonNullable,
|
|
36
|
+
} from '@finos/legend-shared';
|
|
37
|
+
|
|
38
|
+
const DataSpaceDiagramCanvas = observer(
|
|
39
|
+
forwardRef<
|
|
40
|
+
HTMLDivElement,
|
|
41
|
+
{
|
|
42
|
+
dataSpaceViewerState: DataSpaceViewerState;
|
|
43
|
+
diagram: Diagram;
|
|
44
|
+
}
|
|
45
|
+
>(function DataSpaceDiagramCanvas(props, ref) {
|
|
46
|
+
const { dataSpaceViewerState, diagram } = props;
|
|
47
|
+
const diagramCanvasRef = ref as React.MutableRefObject<HTMLDivElement>;
|
|
48
|
+
|
|
49
|
+
const { width, height } = useResizeDetector<HTMLDivElement>({
|
|
50
|
+
refreshMode: 'debounce',
|
|
51
|
+
refreshRate: 50,
|
|
52
|
+
targetRef: diagramCanvasRef,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const renderer = new DiagramRenderer(diagramCanvasRef.current, diagram);
|
|
57
|
+
dataSpaceViewerState.setRenderer(renderer);
|
|
58
|
+
dataSpaceViewerState.setupRenderer();
|
|
59
|
+
renderer.render({ initial: true });
|
|
60
|
+
}, [diagramCanvasRef, dataSpaceViewerState, diagram]);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (dataSpaceViewerState.isDiagramRendererInitialized) {
|
|
64
|
+
dataSpaceViewerState.renderer.refresh();
|
|
65
|
+
}
|
|
66
|
+
}, [dataSpaceViewerState, width, height]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
ref={diagramCanvasRef}
|
|
71
|
+
className={clsx(
|
|
72
|
+
'diagram-canvas ',
|
|
73
|
+
dataSpaceViewerState.diagramCursorClass,
|
|
74
|
+
)}
|
|
75
|
+
tabIndex={0}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
export const DataSpaceDiagramViewer = observer(
|
|
82
|
+
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
83
|
+
const { dataSpaceViewerState } = props;
|
|
84
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
85
|
+
|
|
86
|
+
// diagram selector
|
|
87
|
+
const diagramCanvasRef = useRef<HTMLDivElement>(null);
|
|
88
|
+
|
|
89
|
+
const showPreviousDiagram = (): void => {
|
|
90
|
+
if (!dataSpaceViewerState.currentDiagram) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const idx = analysisResult.diagrams.indexOf(
|
|
94
|
+
dataSpaceViewerState.currentDiagram,
|
|
95
|
+
);
|
|
96
|
+
if (idx === 0 || idx === -1) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
dataSpaceViewerState.setCurrentDiagram(
|
|
100
|
+
guaranteeNonNullable(analysisResult.diagrams[idx - 1]),
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
const showNextDiagram = (): void => {
|
|
104
|
+
if (!dataSpaceViewerState.currentDiagram) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const idx = analysisResult.diagrams.indexOf(
|
|
108
|
+
dataSpaceViewerState.currentDiagram,
|
|
109
|
+
);
|
|
110
|
+
if (idx === analysisResult.diagrams.length - 1 || idx === -1) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
dataSpaceViewerState.setCurrentDiagram(
|
|
114
|
+
guaranteeNonNullable(analysisResult.diagrams[idx + 1]),
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (analysisResult.diagrams.length === 0) {
|
|
119
|
+
return <BlankPanelContent>No diagrams available</BlankPanelContent>;
|
|
120
|
+
}
|
|
121
|
+
return (
|
|
122
|
+
<div className="data-space__viewer__wiki__section">
|
|
123
|
+
<div className="data-space__viewer__wiki__section__header">
|
|
124
|
+
Diagrams
|
|
125
|
+
</div>
|
|
126
|
+
<div className="data-space__viewer__wiki__section__content">
|
|
127
|
+
<div className="data-space__viewer__diagram-viewer">
|
|
128
|
+
<div className="data-space__viewer__diagram-viewer__carousel">
|
|
129
|
+
<div className="data-space__viewer__diagram-viewer__carousel__frame">
|
|
130
|
+
<div className="data-space__viewer__diagram-viewer__carousel__frame__display">
|
|
131
|
+
{dataSpaceViewerState.currentDiagram && (
|
|
132
|
+
<DataSpaceDiagramCanvas
|
|
133
|
+
dataSpaceViewerState={dataSpaceViewerState}
|
|
134
|
+
diagram={dataSpaceViewerState.currentDiagram.diagram}
|
|
135
|
+
ref={diagramCanvasRef}
|
|
136
|
+
/>
|
|
137
|
+
)}
|
|
138
|
+
</div>
|
|
139
|
+
<button
|
|
140
|
+
className="data-space__viewer__diagram-viewer__carousel__frame__navigator data-space__viewer__diagram-viewer__carousel__frame__navigator--back"
|
|
141
|
+
tabIndex={-1}
|
|
142
|
+
title="Previous"
|
|
143
|
+
disabled={
|
|
144
|
+
getNullableFirstElement(analysisResult.diagrams) ===
|
|
145
|
+
dataSpaceViewerState.currentDiagram
|
|
146
|
+
}
|
|
147
|
+
onClick={showPreviousDiagram}
|
|
148
|
+
>
|
|
149
|
+
<ThinChevronLeftIcon />
|
|
150
|
+
</button>
|
|
151
|
+
<button
|
|
152
|
+
className="data-space__viewer__diagram-viewer__carousel__frame__navigator data-space__viewer__diagram-viewer__carousel__frame__navigator--next"
|
|
153
|
+
tabIndex={-1}
|
|
154
|
+
title="Next"
|
|
155
|
+
disabled={
|
|
156
|
+
getNullableLastElement(analysisResult.diagrams) ===
|
|
157
|
+
dataSpaceViewerState.currentDiagram
|
|
158
|
+
}
|
|
159
|
+
onClick={showNextDiagram}
|
|
160
|
+
>
|
|
161
|
+
<ThinChevronRightIcon />
|
|
162
|
+
</button>
|
|
163
|
+
<div className="data-space__viewer__diagram-viewer__carousel__frame__indicators">
|
|
164
|
+
<div className="data-space__viewer__diagram-viewer__carousel__frame__indicators__notch">
|
|
165
|
+
{analysisResult.diagrams.map((diagram) => (
|
|
166
|
+
<button
|
|
167
|
+
key={diagram.diagram.path}
|
|
168
|
+
className={clsx(
|
|
169
|
+
'data-space__viewer__diagram-viewer__carousel__frame__indicator',
|
|
170
|
+
{
|
|
171
|
+
'data-space__viewer__diagram-viewer__carousel__frame__indicator--active':
|
|
172
|
+
dataSpaceViewerState.currentDiagram === diagram,
|
|
173
|
+
},
|
|
174
|
+
)}
|
|
175
|
+
onClick={() =>
|
|
176
|
+
dataSpaceViewerState.setCurrentDiagram(diagram)
|
|
177
|
+
}
|
|
178
|
+
>
|
|
179
|
+
<CircleIcon />
|
|
180
|
+
</button>
|
|
181
|
+
))}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
);
|
|
190
|
+
},
|
|
191
|
+
);
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import {
|
|
19
|
+
clsx,
|
|
20
|
+
CustomSelectorInput,
|
|
21
|
+
PURE_MappingIcon,
|
|
22
|
+
PURE_RuntimeIcon,
|
|
23
|
+
CogIcon,
|
|
24
|
+
} from '@finos/legend-art';
|
|
25
|
+
import { type PackageableRuntime } from '@finos/legend-graph';
|
|
26
|
+
import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
27
|
+
import type { DataSpaceExecutionContextAnalysisResult } from '../graphManager/action/analytics/DataSpaceAnalysis.js';
|
|
28
|
+
|
|
29
|
+
type ExecutionContextOption = {
|
|
30
|
+
label: string;
|
|
31
|
+
value: DataSpaceExecutionContextAnalysisResult;
|
|
32
|
+
};
|
|
33
|
+
const buildExecutionContextOption = (
|
|
34
|
+
value: DataSpaceExecutionContextAnalysisResult,
|
|
35
|
+
): ExecutionContextOption => ({
|
|
36
|
+
label: value.name,
|
|
37
|
+
value: value,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
type RuntimeOption = {
|
|
41
|
+
label: string;
|
|
42
|
+
value: PackageableRuntime;
|
|
43
|
+
};
|
|
44
|
+
const buildRuntimeOption = (value: PackageableRuntime): RuntimeOption => ({
|
|
45
|
+
label: value.name,
|
|
46
|
+
value: value,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const DataSpaceExecutionContextViewer = observer(
|
|
50
|
+
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
51
|
+
const { dataSpaceViewerState } = props;
|
|
52
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
53
|
+
const executionContexts = Array.from(
|
|
54
|
+
dataSpaceViewerState.dataSpaceAnalysisResult.executionContextsIndex.values(),
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// execution
|
|
58
|
+
const executionContextOptions = executionContexts.map(
|
|
59
|
+
buildExecutionContextOption,
|
|
60
|
+
);
|
|
61
|
+
const selectedExecutionContextOption = buildExecutionContextOption(
|
|
62
|
+
dataSpaceViewerState.currentExecutionContext,
|
|
63
|
+
);
|
|
64
|
+
const onExecutionContextOptionChange = (
|
|
65
|
+
option: ExecutionContextOption,
|
|
66
|
+
): void => {
|
|
67
|
+
if (option.value !== dataSpaceViewerState.currentExecutionContext) {
|
|
68
|
+
dataSpaceViewerState.setCurrentExecutionContext(option.value);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const formatExecutionContextOptionLabel = (
|
|
72
|
+
option: ExecutionContextOption,
|
|
73
|
+
): React.ReactNode => (
|
|
74
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option">
|
|
75
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option__label">
|
|
76
|
+
{option.label}
|
|
77
|
+
</div>
|
|
78
|
+
{option.value === analysisResult.defaultExecutionContext && (
|
|
79
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option__tag">
|
|
80
|
+
default
|
|
81
|
+
</div>
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
// runtime
|
|
87
|
+
const runtimeOptions =
|
|
88
|
+
dataSpaceViewerState.currentExecutionContext.compatibleRuntimes.map(
|
|
89
|
+
buildRuntimeOption,
|
|
90
|
+
);
|
|
91
|
+
const selectedRuntimeOption = buildRuntimeOption(
|
|
92
|
+
dataSpaceViewerState.currentRuntime,
|
|
93
|
+
);
|
|
94
|
+
const onRuntimeOptionChange = (option: RuntimeOption): void => {
|
|
95
|
+
if (option.value !== dataSpaceViewerState.currentRuntime) {
|
|
96
|
+
dataSpaceViewerState.setCurrentRuntime(option.value);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const formatRuntimeOptionLabel = (
|
|
100
|
+
option: RuntimeOption,
|
|
101
|
+
): React.ReactNode => (
|
|
102
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option">
|
|
103
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option__label">
|
|
104
|
+
{option.label}
|
|
105
|
+
</div>
|
|
106
|
+
{option.value ===
|
|
107
|
+
dataSpaceViewerState.currentExecutionContext.defaultRuntime && (
|
|
108
|
+
<div className="data-space__viewer__execution-context__entry__content__dropdown__option__tag">
|
|
109
|
+
default
|
|
110
|
+
</div>
|
|
111
|
+
)}
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<div className="data-space__viewer__panel">
|
|
117
|
+
<div className="data-space__viewer__execution-context">
|
|
118
|
+
<div className="data-space__viewer__execution-context__entry">
|
|
119
|
+
<div className="data-space__viewer__execution-context__entry__icon">
|
|
120
|
+
<CogIcon className="data-space__viewer__execution-context__context-icon" />
|
|
121
|
+
</div>
|
|
122
|
+
<div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
|
|
123
|
+
<CustomSelectorInput
|
|
124
|
+
className="data-space__viewer__execution-context__entry__content__dropdown"
|
|
125
|
+
options={executionContextOptions}
|
|
126
|
+
onChange={onExecutionContextOptionChange}
|
|
127
|
+
value={selectedExecutionContextOption}
|
|
128
|
+
darkMode={true}
|
|
129
|
+
formatOptionLabel={formatExecutionContextOptionLabel}
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
<div
|
|
134
|
+
className={clsx(
|
|
135
|
+
'data-space__viewer__execution-context__description',
|
|
136
|
+
{
|
|
137
|
+
'data-space__viewer__execution-context__description--empty':
|
|
138
|
+
!dataSpaceViewerState.currentExecutionContext.description,
|
|
139
|
+
},
|
|
140
|
+
)}
|
|
141
|
+
>
|
|
142
|
+
{dataSpaceViewerState.currentExecutionContext.description
|
|
143
|
+
? dataSpaceViewerState.currentExecutionContext.description
|
|
144
|
+
: 'No description'}
|
|
145
|
+
</div>
|
|
146
|
+
<div className="data-space__viewer__execution-context__entry data-space__viewer__execution-context__mapping">
|
|
147
|
+
<div className="data-space__viewer__execution-context__entry__icon">
|
|
148
|
+
<PURE_MappingIcon />
|
|
149
|
+
</div>
|
|
150
|
+
<div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__text">
|
|
151
|
+
{dataSpaceViewerState.currentExecutionContext.mapping.path}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div className="data-space__viewer__execution-context__entry">
|
|
155
|
+
<div className="data-space__viewer__execution-context__entry__icon">
|
|
156
|
+
<PURE_RuntimeIcon />
|
|
157
|
+
</div>
|
|
158
|
+
<div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
|
|
159
|
+
<CustomSelectorInput
|
|
160
|
+
className="data-space__viewer__execution-context__entry__content__dropdown"
|
|
161
|
+
options={runtimeOptions}
|
|
162
|
+
onChange={onRuntimeOptionChange}
|
|
163
|
+
value={selectedRuntimeOption}
|
|
164
|
+
darkMode={true}
|
|
165
|
+
formatOptionLabel={formatRuntimeOptionLabel}
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
);
|
|
172
|
+
},
|
|
173
|
+
);
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { ExternalLinkIcon, PencilIcon } from '@finos/legend-art';
|
|
19
|
+
import { extractElementNameFromPath } from '@finos/legend-graph';
|
|
20
|
+
import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
|
|
21
|
+
import { generateGAVCoordinates } from '@finos/legend-storage';
|
|
22
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
23
|
+
|
|
24
|
+
export const DataSpaceInfoPanel = observer(
|
|
25
|
+
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
26
|
+
const { dataSpaceViewerState } = props;
|
|
27
|
+
const applicationStore = useApplicationStore();
|
|
28
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
29
|
+
|
|
30
|
+
const viewProject = (): void =>
|
|
31
|
+
dataSpaceViewerState.viewProject(
|
|
32
|
+
dataSpaceViewerState.groupId,
|
|
33
|
+
dataSpaceViewerState.artifactId,
|
|
34
|
+
dataSpaceViewerState.versionId,
|
|
35
|
+
undefined,
|
|
36
|
+
);
|
|
37
|
+
const viewDataSpaceInProject = (): void =>
|
|
38
|
+
dataSpaceViewerState.viewProject(
|
|
39
|
+
dataSpaceViewerState.groupId,
|
|
40
|
+
dataSpaceViewerState.artifactId,
|
|
41
|
+
dataSpaceViewerState.versionId,
|
|
42
|
+
analysisResult.path,
|
|
43
|
+
);
|
|
44
|
+
const viewDataSpaceInSDLCProject = (): void => {
|
|
45
|
+
dataSpaceViewerState
|
|
46
|
+
.viewSDLCProject(
|
|
47
|
+
dataSpaceViewerState.groupId,
|
|
48
|
+
dataSpaceViewerState.artifactId,
|
|
49
|
+
analysisResult.path,
|
|
50
|
+
)
|
|
51
|
+
.catch(applicationStore.alertUnhandledError);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className="data-space__viewer__panel">
|
|
56
|
+
<div className="data-space__viewer__info">
|
|
57
|
+
<div className="data-space__viewer__info__section">
|
|
58
|
+
<div className="data-space__viewer__info__section__entry">
|
|
59
|
+
<div className="data-space__viewer__info__project-info__label">
|
|
60
|
+
Project
|
|
61
|
+
</div>
|
|
62
|
+
<button
|
|
63
|
+
className="data-space__viewer__info__project-info__value"
|
|
64
|
+
tabIndex={-1}
|
|
65
|
+
title="Click to View Project"
|
|
66
|
+
onClick={viewProject}
|
|
67
|
+
>
|
|
68
|
+
{generateGAVCoordinates(
|
|
69
|
+
dataSpaceViewerState.groupId,
|
|
70
|
+
dataSpaceViewerState.artifactId,
|
|
71
|
+
dataSpaceViewerState.versionId,
|
|
72
|
+
)}
|
|
73
|
+
</button>
|
|
74
|
+
<button
|
|
75
|
+
className="data-space__viewer__info__project-info__link"
|
|
76
|
+
tabIndex={-1}
|
|
77
|
+
title="View Project"
|
|
78
|
+
onClick={viewProject}
|
|
79
|
+
>
|
|
80
|
+
<ExternalLinkIcon />
|
|
81
|
+
</button>
|
|
82
|
+
</div>
|
|
83
|
+
<div className="data-space__viewer__info__section__entry">
|
|
84
|
+
<div className="data-space__viewer__info__project-info__label">
|
|
85
|
+
Data Space
|
|
86
|
+
</div>
|
|
87
|
+
<button
|
|
88
|
+
className="data-space__viewer__info__project-info__value"
|
|
89
|
+
tabIndex={-1}
|
|
90
|
+
title="Click to View Data Space"
|
|
91
|
+
onClick={viewDataSpaceInProject}
|
|
92
|
+
>
|
|
93
|
+
{analysisResult.path}
|
|
94
|
+
</button>
|
|
95
|
+
<button
|
|
96
|
+
className="data-space__viewer__info__project-info__link"
|
|
97
|
+
tabIndex={-1}
|
|
98
|
+
title="Edit Data Space"
|
|
99
|
+
onClick={viewDataSpaceInSDLCProject}
|
|
100
|
+
>
|
|
101
|
+
<PencilIcon />
|
|
102
|
+
</button>
|
|
103
|
+
<button
|
|
104
|
+
className="data-space__viewer__info__project-info__link"
|
|
105
|
+
tabIndex={-1}
|
|
106
|
+
title="View Data Space"
|
|
107
|
+
onClick={viewDataSpaceInProject}
|
|
108
|
+
>
|
|
109
|
+
<ExternalLinkIcon />
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div className="data-space__viewer__info__section">
|
|
114
|
+
<div className="data-space__viewer__info__section__title">
|
|
115
|
+
Tagged Values
|
|
116
|
+
</div>
|
|
117
|
+
{analysisResult.taggedValues.length !== 0 &&
|
|
118
|
+
analysisResult.taggedValues.map((taggedValue) => (
|
|
119
|
+
<div
|
|
120
|
+
key={taggedValue._UUID}
|
|
121
|
+
className="data-space__viewer__info__section__entry"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
className="data-space__viewer__info__tagged-value__tag"
|
|
125
|
+
title={`${taggedValue.profile}.${taggedValue.tag}`}
|
|
126
|
+
>
|
|
127
|
+
{`${extractElementNameFromPath(taggedValue.profile)}.${
|
|
128
|
+
taggedValue.tag
|
|
129
|
+
}`}
|
|
130
|
+
</div>
|
|
131
|
+
<div className="data-space__viewer__info__tagged-value__value">
|
|
132
|
+
{taggedValue.value}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
))}
|
|
136
|
+
{analysisResult.taggedValues.length === 0 && (
|
|
137
|
+
<div className="data-space__viewer__info__section__placeholder">
|
|
138
|
+
(empty)
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
141
|
+
</div>
|
|
142
|
+
<div className="data-space__viewer__info__section">
|
|
143
|
+
<div className="data-space__viewer__info__section__title">
|
|
144
|
+
Stereotypes
|
|
145
|
+
</div>
|
|
146
|
+
{analysisResult.stereotypes.length !== 0 &&
|
|
147
|
+
analysisResult.stereotypes.map((stereotype) => (
|
|
148
|
+
<div
|
|
149
|
+
key={stereotype._UUID}
|
|
150
|
+
className="data-space__viewer__info__section__entry"
|
|
151
|
+
title={`${stereotype.profile}.${stereotype.value}`}
|
|
152
|
+
>
|
|
153
|
+
<div className="data-space__viewer__info__steoreotype">
|
|
154
|
+
{`${extractElementNameFromPath(stereotype.profile)}.${
|
|
155
|
+
stereotype.value
|
|
156
|
+
}`}
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
))}
|
|
160
|
+
{analysisResult.stereotypes.length === 0 && (
|
|
161
|
+
<div className="data-space__viewer__info__section__placeholder">
|
|
162
|
+
(empty)
|
|
163
|
+
</div>
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
},
|
|
170
|
+
);
|