@finos/legend-extension-dsl-data-space 10.0.11 → 10.0.13
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/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts +28 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts.map +1 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js +70 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js.map +1 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts +20 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts.map +1 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js +21 -0
- package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js.map +1 -0
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts +3 -1
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +13 -1
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
- package/lib/components/DataSpaceDataAccess.d.ts.map +1 -1
- package/lib/components/DataSpaceDataAccess.js +5 -76
- package/lib/components/DataSpaceDataAccess.js.map +1 -1
- package/lib/components/DataSpaceDescription.d.ts.map +1 -1
- package/lib/components/DataSpaceDescription.js +2 -1
- package/lib/components/DataSpaceDescription.js.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceDiagramViewer.js +110 -39
- package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
- package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceExecutionContextViewer.js +3 -3
- package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -1
- package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -1
- package/lib/components/DataSpaceInfoPanel.js +6 -6
- package/lib/components/DataSpaceInfoPanel.js.map +1 -1
- package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -1
- package/lib/components/DataSpaceModelsDocumentation.js +18 -8
- package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
- package/lib/components/DataSpacePlaceholder.d.ts +4 -0
- package/lib/components/DataSpacePlaceholder.d.ts.map +1 -1
- package/lib/components/DataSpacePlaceholder.js +6 -1
- package/lib/components/DataSpacePlaceholder.js.map +1 -1
- package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
- package/lib/components/DataSpaceQuickStart.js +24 -11
- package/lib/components/DataSpaceQuickStart.js.map +1 -1
- package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -1
- package/lib/components/DataSpaceSupportPanel.js +17 -8
- package/lib/components/DataSpaceSupportPanel.js.map +1 -1
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +34 -13
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
- package/lib/components/DataSpaceViewerActivityBar.js +15 -12
- package/lib/components/DataSpaceViewerActivityBar.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/DataSpaceLayoutState.d.ts +46 -0
- package/lib/stores/DataSpaceLayoutState.d.ts.map +1 -1
- package/lib/stores/DataSpaceLayoutState.js +184 -1
- package/lib/stores/DataSpaceLayoutState.js.map +1 -1
- package/lib/stores/DataSpaceModelsDocumentationState.d.ts +11 -2
- package/lib/stores/DataSpaceModelsDocumentationState.d.ts.map +1 -1
- package/lib/stores/DataSpaceModelsDocumentationState.js +41 -0
- package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -1
- package/lib/stores/DataSpaceQuickStartState.d.ts +24 -0
- package/lib/stores/DataSpaceQuickStartState.d.ts.map +1 -0
- package/lib/stores/DataSpaceQuickStartState.js +48 -0
- package/lib/stores/DataSpaceQuickStartState.js.map +1 -0
- package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts +44 -0
- package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerDiagramViewerState.js +194 -0
- package/lib/stores/DataSpaceViewerDiagramViewerState.js.map +1 -0
- package/lib/stores/DataSpaceViewerNavigation.d.ts +36 -0
- package/lib/stores/DataSpaceViewerNavigation.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerNavigation.js +47 -0
- package/lib/stores/DataSpaceViewerNavigation.js.map +1 -0
- package/lib/stores/DataSpaceViewerState.d.ts +22 -74
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +34 -259
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.js +8 -5
- package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
- package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +8 -8
- package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQueryCreatorStore.js +1 -1
- package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +1 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.js +1 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.js.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
- package/lib/stores/studio/DataSpacePreviewState.js +15 -3
- package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
- package/package.json +14 -14
- package/src/__lib__/DSL_DataSpace_LegendApplicationCommand.ts +74 -0
- package/src/__lib__/DSL_DataSpace_LegendApplicationNavigation.ts +33 -0
- package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +20 -1
- package/src/components/DataSpaceDataAccess.tsx +9 -122
- package/src/components/DataSpaceDescription.tsx +5 -5
- package/src/components/DataSpaceDiagramViewer.tsx +449 -69
- package/src/components/DataSpaceExecutionContextViewer.tsx +47 -40
- package/src/components/DataSpaceInfoPanel.tsx +107 -117
- package/src/components/DataSpaceModelsDocumentation.tsx +31 -12
- package/src/components/DataSpacePlaceholder.tsx +22 -0
- package/src/components/DataSpaceQuickStart.tsx +95 -15
- package/src/components/DataSpaceSupportPanel.tsx +146 -14
- package/src/components/DataSpaceViewer.tsx +153 -23
- package/src/components/DataSpaceViewerActivityBar.tsx +40 -20
- package/src/components/index.ts +1 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +1 -1
- package/src/stores/DataSpaceLayoutState.ts +272 -0
- package/src/stores/DataSpaceModelsDocumentationState.ts +61 -2
- package/src/stores/DataSpaceQuickStartState.ts +91 -0
- package/src/stores/DataSpaceViewerDiagramViewerState.ts +245 -0
- package/src/stores/DataSpaceViewerNavigation.ts +64 -0
- package/src/stores/DataSpaceViewerState.ts +88 -401
- package/src/stores/query/DataSpaceAdvancedSearchState.ts +30 -6
- package/src/stores/query/DataSpaceQueryCreatorStore.ts +8 -8
- package/src/stores/query/DataSpaceQuerySetupStore.ts +1 -1
- package/src/stores/studio/DataSpacePreviewState.ts +27 -5
- package/tsconfig.json +5 -1
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts +0 -35
- package/lib/stores/DataSpaceViewerDataAccessState.d.ts.map +0 -1
- package/lib/stores/DataSpaceViewerDataAccessState.js +0 -98
- package/lib/stores/DataSpaceViewerDataAccessState.js.map +0 -1
- package/src/stores/DataSpaceViewerDataAccessState.ts +0 -143
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import type { CommandConfigData } from '@finos/legend-application';
|
|
17
|
+
export declare enum DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY {
|
|
18
|
+
RECENTER_DIAGRAM = "dsl-dataspace.diagram-viewer.recenter",
|
|
19
|
+
USE_ZOOM_TOOL = "dsl-dataspace.diagram-viewer.use-zoom-tool",
|
|
20
|
+
USE_VIEW_TOOL = "dsl-dataspace.diagram-viewer.use-view-tool",
|
|
21
|
+
USE_PAN_TOOL = "dsl-dataspace.diagram-viewer.use-pan-tool",
|
|
22
|
+
GO_TO_NEXT_DIAGRAM = "dsl-dataspace.diagram-viewer.go-to-next-diagram",
|
|
23
|
+
GO_TO_PREVIOUS_DIAGRAM = "dsl-dataspace.diagram-viewer.go-to-previous-diagram",
|
|
24
|
+
TOGGLE_DIAGRAM_DESCRIPTION = "dsl-dataspace.diagram-viewer.toggle-description",
|
|
25
|
+
SEARCH_DOCUMENTATION = "dsl-dataspace.models-documentation.search"
|
|
26
|
+
}
|
|
27
|
+
export declare const DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_CONFIG: CommandConfigData;
|
|
28
|
+
//# sourceMappingURL=DSL_DataSpace_LegendApplicationCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationCommand.d.ts","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendApplicationCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,oBAAY,6CAA6C;IACvD,gBAAgB,0CAA0C;IAC1D,aAAa,+CAA+C;IAC5D,aAAa,+CAA+C;IAC5D,YAAY,8CAA8C;IAC1D,kBAAkB,oDAAoD;IACtE,sBAAsB,wDAAwD;IAC9E,0BAA0B,oDAAoD;IAC9E,oBAAoB,8CAA8C;CACnE;AAED,eAAO,MAAM,gDAAgD,EAAE,iBA4C5D,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
export var DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY;
|
|
17
|
+
(function (DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY) {
|
|
18
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["RECENTER_DIAGRAM"] = "dsl-dataspace.diagram-viewer.recenter";
|
|
19
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["USE_ZOOM_TOOL"] = "dsl-dataspace.diagram-viewer.use-zoom-tool";
|
|
20
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["USE_VIEW_TOOL"] = "dsl-dataspace.diagram-viewer.use-view-tool";
|
|
21
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["USE_PAN_TOOL"] = "dsl-dataspace.diagram-viewer.use-pan-tool";
|
|
22
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["GO_TO_NEXT_DIAGRAM"] = "dsl-dataspace.diagram-viewer.go-to-next-diagram";
|
|
23
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["GO_TO_PREVIOUS_DIAGRAM"] = "dsl-dataspace.diagram-viewer.go-to-previous-diagram";
|
|
24
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["TOGGLE_DIAGRAM_DESCRIPTION"] = "dsl-dataspace.diagram-viewer.toggle-description";
|
|
25
|
+
DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY["SEARCH_DOCUMENTATION"] = "dsl-dataspace.models-documentation.search";
|
|
26
|
+
})(DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY = DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY || (DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY = {}));
|
|
27
|
+
export const DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_CONFIG = {
|
|
28
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.RECENTER_DIAGRAM]: {
|
|
29
|
+
title: 'Data Space Diagram Viewer: Recenter',
|
|
30
|
+
defaultKeyboardShortcut: 'KeyR',
|
|
31
|
+
when: 'When diagram viewer is active',
|
|
32
|
+
},
|
|
33
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.USE_ZOOM_TOOL]: {
|
|
34
|
+
title: 'Data Space Diagram Viewer: Use zoom tool',
|
|
35
|
+
defaultKeyboardShortcut: 'KeyZ',
|
|
36
|
+
when: 'When diagram viewer is active',
|
|
37
|
+
},
|
|
38
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.USE_VIEW_TOOL]: {
|
|
39
|
+
title: 'Data Space Diagram Viewer: Use view tool',
|
|
40
|
+
defaultKeyboardShortcut: 'KeyV',
|
|
41
|
+
when: 'When diagram viewer is active',
|
|
42
|
+
},
|
|
43
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.USE_PAN_TOOL]: {
|
|
44
|
+
title: 'Data Space Diagram Viewer: Use pan tool',
|
|
45
|
+
defaultKeyboardShortcut: 'KeyM',
|
|
46
|
+
when: 'When diagram viewer is active',
|
|
47
|
+
},
|
|
48
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.GO_TO_NEXT_DIAGRAM]: {
|
|
49
|
+
title: 'Data Space Diagram Viewer: Next Diagram',
|
|
50
|
+
defaultKeyboardShortcut: 'ArrowRight',
|
|
51
|
+
when: 'When diagram viewer is active',
|
|
52
|
+
},
|
|
53
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.GO_TO_PREVIOUS_DIAGRAM]: {
|
|
54
|
+
title: 'Data Space Diagram Viewer: Previous Diagram',
|
|
55
|
+
defaultKeyboardShortcut: 'ArrowLeft',
|
|
56
|
+
when: 'When viewing diagram',
|
|
57
|
+
},
|
|
58
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.TOGGLE_DIAGRAM_DESCRIPTION]: {
|
|
59
|
+
title: 'Data Space Diagram Viewer: Toggle Description',
|
|
60
|
+
defaultKeyboardShortcut: 'KeyD',
|
|
61
|
+
when: 'When diagram viewer is active',
|
|
62
|
+
},
|
|
63
|
+
[DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_KEY.SEARCH_DOCUMENTATION]: {
|
|
64
|
+
title: 'Data Space Models Documentation: Search',
|
|
65
|
+
defaultKeyboardShortcut: 'Control+Shift+KeyF',
|
|
66
|
+
additionalKeyboardShortcuts: ['Meta+Shift+KeyF'],
|
|
67
|
+
when: 'When models documnetation viewer is active',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=DSL_DataSpace_LegendApplicationCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationCommand.js","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendApplicationCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,CAAN,IAAY,6CASX;AATD,WAAY,6CAA6C;IACvD,2GAA0D,CAAA;IAC1D,6GAA4D,CAAA;IAC5D,6GAA4D,CAAA;IAC5D,2GAA0D,CAAA;IAC1D,uHAAsE,CAAA;IACtE,+HAA8E,CAAA;IAC9E,+HAA8E,CAAA;IAC9E,mHAAkE,CAAA;AACpE,CAAC,EATW,6CAA6C,GAA7C,6CAA6C,KAA7C,6CAA6C,QASxD;AAED,MAAM,CAAC,MAAM,gDAAgD,GAC3D;IACE,CAAC,6CAA6C,CAAC,gBAAgB,CAAC,EAAE;QAChE,KAAK,EAAE,qCAAqC;QAC5C,uBAAuB,EAAE,MAAM;QAC/B,IAAI,EAAE,+BAA+B;KACtC;IACD,CAAC,6CAA6C,CAAC,aAAa,CAAC,EAAE;QAC7D,KAAK,EAAE,0CAA0C;QACjD,uBAAuB,EAAE,MAAM;QAC/B,IAAI,EAAE,+BAA+B;KACtC;IACD,CAAC,6CAA6C,CAAC,aAAa,CAAC,EAAE;QAC7D,KAAK,EAAE,0CAA0C;QACjD,uBAAuB,EAAE,MAAM;QAC/B,IAAI,EAAE,+BAA+B;KACtC;IACD,CAAC,6CAA6C,CAAC,YAAY,CAAC,EAAE;QAC5D,KAAK,EAAE,yCAAyC;QAChD,uBAAuB,EAAE,MAAM;QAC/B,IAAI,EAAE,+BAA+B;KACtC;IACD,CAAC,6CAA6C,CAAC,kBAAkB,CAAC,EAAE;QAClE,KAAK,EAAE,yCAAyC;QAChD,uBAAuB,EAAE,YAAY;QACrC,IAAI,EAAE,+BAA+B;KACtC;IACD,CAAC,6CAA6C,CAAC,sBAAsB,CAAC,EAAE;QACtE,KAAK,EAAE,6CAA6C;QACpD,uBAAuB,EAAE,WAAW;QACpC,IAAI,EAAE,sBAAsB;KAC7B;IACD,CAAC,6CAA6C,CAAC,0BAA0B,CAAC,EACxE;QACE,KAAK,EAAE,+CAA+C;QACtD,uBAAuB,EAAE,MAAM;QAC/B,IAAI,EAAE,+BAA+B;KACtC;IACH,CAAC,6CAA6C,CAAC,oBAAoB,CAAC,EAAE;QACpE,KAAK,EAAE,yCAAyC;QAChD,uBAAuB,EAAE,oBAAoB;QAC7C,2BAA2B,EAAE,CAAC,iBAAiB,CAAC;QAChD,IAAI,EAAE,4CAA4C;KACnD;CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
* @external_application_navigation This depends on Legend Query routing and is hardcoded so it's potentially brittle
|
|
18
|
+
*/
|
|
19
|
+
export declare const EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl: (queryApplicationUrl: string, groupId: string, artifactId: string, versionId: string, servicePath: string) => string;
|
|
20
|
+
//# sourceMappingURL=DSL_DataSpace_LegendApplicationNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationNavigation.d.ts","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;GAEG;AACH,eAAO,MAAM,+DAA+D,wBACrD,MAAM,WAClB,MAAM,cACH,MAAM,aACP,MAAM,eACJ,MAAM,KAClB,MAKiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { generateGAVCoordinates } from '@finos/legend-storage';
|
|
17
|
+
/**
|
|
18
|
+
* @external_application_navigation This depends on Legend Query routing and is hardcoded so it's potentially brittle
|
|
19
|
+
*/
|
|
20
|
+
export const EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl = (queryApplicationUrl, groupId, artifactId, versionId, servicePath) => `${queryApplicationUrl}/create-from-service/${generateGAVCoordinates(groupId, artifactId, versionId)}/${servicePath}`;
|
|
21
|
+
//# sourceMappingURL=DSL_DataSpace_LegendApplicationNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationNavigation.js","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,+DAA+D,GAAG,CAC7E,mBAA2B,EAC3B,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,WAAmB,EACX,EAAE,CACV,GAAG,mBAAmB,wBAAwB,sBAAsB,CAClE,OAAO,EACP,UAAU,EACV,SAAS,CACV,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { LegendApplicationPlugin, type LegendApplicationPluginManager } from '@finos/legend-application';
|
|
16
|
+
import { LegendApplicationPlugin, type LegendApplicationSetup, type LegendApplicationPluginManager, type KeyedCommandConfigEntry } from '@finos/legend-application';
|
|
17
17
|
import type { LoadQueryFilterOption, QueryBuilder_LegendApplicationPlugin_Extension } from '@finos/legend-query-builder';
|
|
18
18
|
export declare class DSL_DataSpace_LegendApplicationPlugin extends LegendApplicationPlugin implements QueryBuilder_LegendApplicationPlugin_Extension {
|
|
19
19
|
static NAME: string;
|
|
20
20
|
constructor();
|
|
21
21
|
install(pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>): void;
|
|
22
|
+
getExtraKeyedCommandConfigEntries(): KeyedCommandConfigEntry[];
|
|
23
|
+
getExtraApplicationSetups(): LegendApplicationSetup[];
|
|
22
24
|
getExtraLoadQueryFilterOptions(): LoadQueryFilterOption[];
|
|
23
25
|
}
|
|
24
26
|
//# sourceMappingURL=DSL_DataSpace_LegendApplicationPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_DataSpace_LegendApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/DSL_DataSpace_LegendApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,KAAK,8BAA8B,
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/DSL_DataSpace_LegendApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EAEnC,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EACV,qBAAqB,EACrB,8CAA8C,EAC/C,MAAM,6BAA6B,CAAC;AAUrC,qBAAa,qCACX,SAAQ,uBACR,YAAW,8CAA8C;IAEzD,MAAM,CAAC,IAAI,SAA4C;;IAMvD,OAAO,CACL,aAAa,EAAE,8BAA8B,CAAC,uBAAuB,CAAC,GACrE,IAAI;IAIE,iCAAiC,IAAI,uBAAuB,EAAE;IAM9D,yBAAyB,IAAI,sBAAsB,EAAE;IAQ9D,8BAA8B,IAAI,qBAAqB,EAAE;CAgD1D"}
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { LegendApplicationPlugin, } from '@finos/legend-application';
|
|
16
|
+
import { LegendApplicationPlugin, collectKeyedCommandConfigEntriesFromConfig, } from '@finos/legend-application';
|
|
17
17
|
import packageJson from '../../package.json';
|
|
18
18
|
import { DataSpaceQueryBuilderState } from '../stores/query/DataSpaceQueryBuilderState.js';
|
|
19
19
|
import { createQueryClassTaggedValue, createQueryDataSpaceTaggedValue, } from '../stores/query/DataSpaceQueryCreatorStore.js';
|
|
20
|
+
import { DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_CONFIG } from '../__lib__/DSL_DataSpace_LegendApplicationCommand.js';
|
|
21
|
+
import { configureDataGridComponent } from '@finos/legend-lego/data-grid';
|
|
20
22
|
class DSL_DataSpace_LegendApplicationPlugin extends LegendApplicationPlugin {
|
|
21
23
|
static NAME = packageJson.extensions.applicationPlugin;
|
|
22
24
|
constructor() {
|
|
@@ -25,6 +27,16 @@ class DSL_DataSpace_LegendApplicationPlugin extends LegendApplicationPlugin {
|
|
|
25
27
|
install(pluginManager) {
|
|
26
28
|
pluginManager.registerApplicationPlugin(this);
|
|
27
29
|
}
|
|
30
|
+
getExtraKeyedCommandConfigEntries() {
|
|
31
|
+
return collectKeyedCommandConfigEntriesFromConfig(DSL_DATA_SPACE_LEGEND_APPLICATION_COMMAND_CONFIG);
|
|
32
|
+
}
|
|
33
|
+
getExtraApplicationSetups() {
|
|
34
|
+
return [
|
|
35
|
+
async (applicationStore) => {
|
|
36
|
+
configureDataGridComponent();
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
}
|
|
28
40
|
getExtraLoadQueryFilterOptions() {
|
|
29
41
|
return [
|
|
30
42
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_DataSpace_LegendApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/DSL_DataSpace_LegendApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/DSL_DataSpace_LegendApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EAGvB,0CAA0C,GAE3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAK7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,gDAAgD,EAAE,MAAM,sDAAsD,CAAC;AAExH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAa,qCACX,SAAQ,uBAAuB;IAG/B,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAEvD;QACE,KAAK,CAAC,qCAAqC,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,CACL,aAAsE;QAEtE,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAEQ,iCAAiC;QACxC,OAAO,0CAA0C,CAC/C,gDAAgD,CACjD,CAAC;IACJ,CAAC;IAEQ,yBAAyB;QAChC,OAAO;YACL,KAAK,EAAE,gBAAgB,EAAE,EAAE;gBACzB,0BAA0B,EAAE,CAAC;YAC/B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,8BAA8B;QAC5B,OAAO;YACL;gBACE,GAAG,EAAE,0BAA0B;gBAC/B,KAAK,EAAE,CAAC,iBAAiB,EAAsB,EAAE;oBAC/C,IAAI,iBAAiB,YAAY,0BAA0B,EAAE;wBAC3D,OAAO,oBAAoB,CAAC;qBAC7B;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,cAAc,EAAE,CACd,mBAAmB,EACnB,iBAAiB,EACS,EAAE;oBAC5B,IAAI,iBAAiB,YAAY,0BAA0B,EAAE;wBAC3D,mBAAmB,CAAC,YAAY,GAAG;4BACjC,+BAA+B,CAAC,iBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC;yBAClE,CAAC;qBACH;oBACD,OAAO,mBAAmB,CAAC;gBAC7B,CAAC;aACF;YACD;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,KAAK,EAAE,CAAC,iBAAiB,EAAsB,EAAE;oBAC/C,IAAI,iBAAiB,YAAY,0BAA0B,EAAE;wBAC3D,OAAO,eAAe,CAAC;qBACxB;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,cAAc,EAAE,CACd,mBAAmB,EACnB,iBAAiB,EACS,EAAE;oBAC5B,IACE,iBAAiB,YAAY,0BAA0B;wBACvD,iBAAiB,CAAC,KAAK,EACvB;wBACA,mBAAmB,CAAC,YAAY,GAAG;4BACjC,+BAA+B,CAAC,iBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC;4BACjE,2BAA2B,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC;yBAC1D,CAAC;qBACH;oBACD,OAAO,mBAAmB,CAAC;gBAC7B,CAAC;aACF;SACF,CAAC;IACJ,CAAC;;SA7EU,qCAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceDataAccess.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDataAccess.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceDataAccess.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDataAccess.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAS9E,eAAO,MAAM,mBAAmB,WACtB;IAAE,oBAAoB,EAAE,oBAAoB,CAAA;CAAE;;CA8DvD,CAAC"}
|
|
@@ -15,83 +15,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import { AnchorLinkIcon,
|
|
19
|
-
import {
|
|
18
|
+
import { AnchorLinkIcon, QuestionCircleIcon } from '@finos/legend-art';
|
|
19
|
+
import {} from '../stores/DataSpaceViewerState.js';
|
|
20
20
|
import { useApplicationStore } from '@finos/legend-application';
|
|
21
|
-
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
22
21
|
import { useEffect, useRef } from 'react';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { DataGrid } from '@finos/legend-lego/data-grid';
|
|
26
|
-
const DataAccessOverview = observer((props) => {
|
|
27
|
-
const { dataSpaceViewerState } = props;
|
|
28
|
-
const dataAccessState = dataSpaceViewerState.dataAccessState;
|
|
29
|
-
const applicationStore = useApplicationStore();
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
flowResult(dataAccessState.fetchDatasetSpecifications())
|
|
32
|
-
.then(() => dataAccessState.fetchDatasetEntitlementReports())
|
|
33
|
-
.catch(applicationStore.alertUnhandledError);
|
|
34
|
-
}, [
|
|
35
|
-
applicationStore,
|
|
36
|
-
dataAccessState,
|
|
37
|
-
dataSpaceViewerState.currentExecutionContext,
|
|
38
|
-
]);
|
|
39
|
-
return (_jsxs("div", { className: "data-space__viewer__data-access__overview", children: [_jsx(PanelLoadingIndicator, { isLoading: dataAccessState.fetchDatasetSpecificationsState.isInProgress ||
|
|
40
|
-
dataAccessState.fetchDatasetEntitlementReportsState.isInProgress }), _jsx("div", { className: "data-space__viewer__data-access__chart" }), _jsx("div", { className: "data-space__viewer__data-access__grid data-space__viewer__grid ag-theme-balham-dark", children: _jsx(DataGrid, { rowData: dataAccessState.datasets, gridOptions: {
|
|
41
|
-
suppressScrollOnNewData: true,
|
|
42
|
-
getRowId: (rowData) => rowData.data.uuid,
|
|
43
|
-
}, suppressFieldDotNotation: true, columnDefs: [
|
|
44
|
-
{
|
|
45
|
-
minWidth: 50,
|
|
46
|
-
sortable: true,
|
|
47
|
-
resizable: true,
|
|
48
|
-
valueGetter: (params) => params.data?.specification.name,
|
|
49
|
-
headerName: 'Dataset',
|
|
50
|
-
flex: 1,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
minWidth: 50,
|
|
54
|
-
sortable: true,
|
|
55
|
-
resizable: true,
|
|
56
|
-
valueGetter: (params) => params.data?.specification.type,
|
|
57
|
-
headerName: 'Type',
|
|
58
|
-
flex: 1,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
minWidth: 50,
|
|
62
|
-
sortable: true,
|
|
63
|
-
resizable: true,
|
|
64
|
-
headerName: 'Access Status',
|
|
65
|
-
valueGetter: (params) => {
|
|
66
|
-
const entitlementReport = params.data?.entitlementReport;
|
|
67
|
-
if (entitlementReport instanceof
|
|
68
|
-
DatasetEntitlementAccessGrantedReport) {
|
|
69
|
-
return 'Access Granted';
|
|
70
|
-
}
|
|
71
|
-
else if (entitlementReport instanceof
|
|
72
|
-
DatasetEntitlementAccessApprovedReport) {
|
|
73
|
-
return 'Access Approved';
|
|
74
|
-
}
|
|
75
|
-
else if (entitlementReport instanceof
|
|
76
|
-
DatasetEntitlementAccessRequestedReport) {
|
|
77
|
-
return 'Access Requested';
|
|
78
|
-
}
|
|
79
|
-
else if (entitlementReport instanceof
|
|
80
|
-
DatasetEntitlementAccessNotGrantedReport) {
|
|
81
|
-
return '(x) Access Not Granted';
|
|
82
|
-
}
|
|
83
|
-
else if (entitlementReport instanceof
|
|
84
|
-
DatasetEntitlementUnsupportedReport) {
|
|
85
|
-
return '(unsupported)';
|
|
86
|
-
}
|
|
87
|
-
return '';
|
|
88
|
-
},
|
|
89
|
-
flex: 1,
|
|
90
|
-
wrapText: true,
|
|
91
|
-
autoHeight: true,
|
|
92
|
-
},
|
|
93
|
-
] }) })] }));
|
|
94
|
-
});
|
|
22
|
+
import { DATA_SPACE_VIEWER_ACTIVITY_MODE, generateAnchorForActivity, } from '../stores/DataSpaceViewerNavigation.js';
|
|
23
|
+
import { DataAccessOverview } from '@finos/legend-query-builder';
|
|
95
24
|
export const DataSpaceDataAccess = observer((props) => {
|
|
96
25
|
const { dataSpaceViewerState } = props;
|
|
97
26
|
const applicationStore = useApplicationStore();
|
|
@@ -110,6 +39,6 @@ export const DataSpaceDataAccess = observer((props) => {
|
|
|
110
39
|
applicationStore.navigationService.navigator.visitAddress(documentationUrl);
|
|
111
40
|
}
|
|
112
41
|
};
|
|
113
|
-
return (_jsxs("div", { ref: sectionRef, className: "data-space__viewer__wiki__section", children: [_jsxs("div", { className: "data-space__viewer__wiki__section__header", children: [_jsxs("div", { className: "data-space__viewer__wiki__section__header__label", children: ["Data Access", _jsx("button", { className: "data-space__viewer__wiki__section__header__anchor", tabIndex: -1, onClick: () => dataSpaceViewerState.changeZone(anchor, true), children: _jsx(AnchorLinkIcon, {}) })] }), Boolean(documentationUrl) && (_jsx("button", { className: "data-space__viewer__wiki__section__header__documentation", tabIndex: -1, onClick: seeDocumentation, title: "See Documentation", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx("div", { className: "data-space__viewer__wiki__section__content", children:
|
|
42
|
+
return (_jsxs("div", { ref: sectionRef, className: "data-space__viewer__wiki__section", children: [_jsxs("div", { className: "data-space__viewer__wiki__section__header", children: [_jsxs("div", { className: "data-space__viewer__wiki__section__header__label", children: ["Data Access", _jsx("button", { className: "data-space__viewer__wiki__section__header__anchor", tabIndex: -1, onClick: () => dataSpaceViewerState.changeZone(anchor, true), children: _jsx(AnchorLinkIcon, {}) })] }), Boolean(documentationUrl) && (_jsx("button", { className: "data-space__viewer__wiki__section__header__documentation", tabIndex: -1, onClick: seeDocumentation, title: "See Documentation", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx("div", { className: "data-space__viewer__wiki__section__content", children: _jsx("div", { className: "data-space__viewer__data-access", children: _jsx(DataAccessOverview, { dataAccessState: dataSpaceViewerState.currentDataAccessState }) }) })] }));
|
|
114
43
|
});
|
|
115
44
|
//# sourceMappingURL=DataSpaceDataAccess.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceDataAccess.js","sourceRoot":"","sources":["../../src/components/DataSpaceDataAccess.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceDataAccess.js","sourceRoot":"","sources":["../../src/components/DataSpaceDataAccess.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAA6B,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CACzC,CAAC,KAAqD,EAAE,EAAE;IACxD,MAAM,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,cAAc,GAAG,oBAAoB,CAAC,uBAAuB,CAAC;IACpE,MAAM,gBAAgB,GAAG,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACtE,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,yBAAyB,CACtC,+BAA+B,CAAC,WAAW,CAC5C,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAChD,MAAM,EACN,UAAU,CAAC,OAAO,CACnB,CAAC;SACH;QACD,OAAO,GAAG,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnC,MAAM,gBAAgB,GAAG,GAAS,EAAE;QAClC,IAAI,gBAAgB,EAAE;YACpB,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,YAAY,CACvD,gBAAgB,CACjB,CAAC;SACH;IACH,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,mCAAmC,aACjE,eAAK,SAAS,EAAC,2CAA2C,aACxD,eAAK,SAAS,EAAC,kDAAkD,4BAE/D,iBACE,SAAS,EAAC,mDAAmD,EAC7D,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,YAE5D,KAAC,cAAc,KAAG,GACX,IACL,EACL,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAC5B,iBACE,SAAS,EAAC,0DAA0D,EACpE,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAC,mBAAmB,YAEzB,KAAC,kBAAkB,KAAG,GACf,CACV,IACG,EACN,cAAK,SAAS,EAAC,4CAA4C,YACzD,cAAK,SAAS,EAAC,iCAAiC,YAC9C,KAAC,kBAAkB,IACjB,eAAe,EAAE,oBAAoB,CAAC,sBAAsB,GAC5D,GACE,GACF,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceDescription.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDescription.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceDescription.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDescription.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAU9E,eAAO,MAAM,oBAAoB,WACvB;IAAE,oBAAoB,EAAE,oBAAoB,CAAA;CAAE;;CAiDvD,CAAC"}
|
|
@@ -15,11 +15,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { AnchorLinkIcon } from '@finos/legend-art';
|
|
18
|
-
import {
|
|
18
|
+
import {} 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
22
|
import { useEffect, useRef } from 'react';
|
|
23
|
+
import { DATA_SPACE_VIEWER_ACTIVITY_MODE, generateAnchorForActivity, } from '../stores/DataSpaceViewerNavigation.js';
|
|
23
24
|
export const DataSpaceDescription = observer((props) => {
|
|
24
25
|
const { dataSpaceViewerState } = props;
|
|
25
26
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceDescription.js","sourceRoot":"","sources":["../../src/components/DataSpaceDescription.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceDescription.js","sourceRoot":"","sources":["../../src/components/DataSpaceDescription.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAA6B,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,wCAAwC,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAC1C,CAAC,KAAqD,EAAE,EAAE;IACxD,MAAM,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,cAAc,GAAG,oBAAoB,CAAC,uBAAuB,CAAC;IACpE,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,yBAAyB,CACtC,+BAA+B,CAAC,WAAW,CAC5C,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAChD,MAAM,EACN,UAAU,CAAC,OAAO,CACnB,CAAC;SACH;QACD,OAAO,GAAG,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,eAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,mCAAmC,aACjE,cAAK,SAAS,EAAC,2CAA2C,YACxD,eAAK,SAAS,EAAC,kDAAkD,4BAE/D,iBACE,SAAS,EAAC,mDAAmD,EAC7D,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,YAE5D,KAAC,cAAc,KAAG,GACX,IACL,GACF,EACN,eAAK,SAAS,EAAC,4CAA4C,aACxD,cAAc,CAAC,WAAW,KAAK,SAAS,IAAI,CAC3C,cAAK,SAAS,EAAC,iCAAiC,YAC9C,cAAK,SAAS,EAAC,0CAA0C,YACvD,KAAC,2BAA2B,IAC1B,KAAK,EAAE,cAAc,CAAC,WAAW,GACjC,GACE,GACF,CACP,EACA,cAAc,CAAC,WAAW,KAAK,SAAS,IAAI,CAC3C,KAAC,wBAAwB,IAAC,OAAO,EAAC,iBAAiB,GAAG,CACvD,IACG,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceDiagramViewer.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDiagramViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceDiagramViewer.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceDiagramViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2BH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAib9E,eAAO,MAAM,sBAAsB,WACzB;IAAE,oBAAoB,EAAE,oBAAoB,CAAA;CAAE;;CAuIvD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
4
|
*
|
|
@@ -14,79 +14,150 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AnchorLinkIcon, CircleIcon, ThinChevronLeftIcon, ThinChevronRightIcon, clsx, useResizeDetector, } from '@finos/legend-art';
|
|
18
|
-
import {
|
|
17
|
+
import { AnchorLinkIcon, CaretDownIcon, CenterFocusIcon, CircleIcon, CloseIcon, ContextMenu, CustomSelectorInput, DescriptionIcon, DropdownMenu, MenuContent, MenuContentDivider, MenuContentItem, MousePointerIcon, MoveIcon, ShapesIcon, ThinChevronDownIcon, ThinChevronLeftIcon, ThinChevronRightIcon, ThinChevronUpIcon, ZoomInIcon, ZoomOutIcon, clsx, useResizeDetector, } from '@finos/legend-art';
|
|
18
|
+
import {} from '../stores/DataSpaceViewerState.js';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
20
|
import { forwardRef, useEffect, useRef } from 'react';
|
|
21
21
|
import {} from '@finos/legend-extension-dsl-diagram/graph';
|
|
22
|
-
import { DiagramRenderer } from '@finos/legend-extension-dsl-diagram/application';
|
|
23
|
-
import { getNullableFirstEntry, getNullableLastEntry, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
22
|
+
import { DIAGRAM_INTERACTION_MODE, DIAGRAM_RELATIONSHIP_EDIT_MODE, DIAGRAM_ZOOM_LEVELS, DiagramRenderer, } from '@finos/legend-extension-dsl-diagram/application';
|
|
24
23
|
import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
|
|
24
|
+
import { getNonNullableEntry } from '@finos/legend-shared';
|
|
25
|
+
import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
|
|
26
|
+
import { useCommands } from '@finos/legend-application';
|
|
27
|
+
import { DATA_SPACE_VIEWER_ACTIVITY_MODE, generateAnchorForActivity, generateAnchorForDiagram, } from '../stores/DataSpaceViewerNavigation.js';
|
|
25
28
|
const DataSpaceDiagramCanvas = observer(forwardRef(function DataSpaceDiagramCanvas(props, ref) {
|
|
26
29
|
const { dataSpaceViewerState, diagram } = props;
|
|
30
|
+
const diagramViewerState = dataSpaceViewerState.diagramViewerState;
|
|
27
31
|
const diagramCanvasRef = ref;
|
|
32
|
+
const descriptionText = diagramViewerState.currentDiagram?.description;
|
|
28
33
|
const { width, height } = useResizeDetector({
|
|
29
34
|
refreshMode: 'debounce',
|
|
30
35
|
refreshRate: 50,
|
|
31
36
|
targetRef: diagramCanvasRef,
|
|
32
37
|
});
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
diagramViewerState.setExpandDescription(false);
|
|
40
|
+
}, [diagramViewerState, diagramViewerState.currentDiagram]);
|
|
33
41
|
useEffect(() => {
|
|
34
42
|
const renderer = new DiagramRenderer(diagramCanvasRef.current, diagram);
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
diagramViewerState.setDiagramRenderer(renderer);
|
|
44
|
+
diagramViewerState.setupDiagramRenderer();
|
|
37
45
|
renderer.render({ initial: true });
|
|
38
|
-
}, [diagramCanvasRef,
|
|
46
|
+
}, [diagramCanvasRef, diagramViewerState, diagram]);
|
|
39
47
|
useEffect(() => {
|
|
40
|
-
if (
|
|
41
|
-
|
|
48
|
+
if (diagramViewerState.isDiagramRendererInitialized) {
|
|
49
|
+
diagramViewerState.diagramRenderer.refresh();
|
|
50
|
+
}
|
|
51
|
+
}, [diagramViewerState, width, height]);
|
|
52
|
+
// actions
|
|
53
|
+
const queryClass = () => {
|
|
54
|
+
if (diagramViewerState.contextMenuClassView) {
|
|
55
|
+
dataSpaceViewerState.queryClass(diagramViewerState.contextMenuClassView.class.value);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const viewClassDocumentation = () => {
|
|
59
|
+
if (diagramViewerState.contextMenuClassView &&
|
|
60
|
+
dataSpaceViewerState.modelsDocumentationState.hasClassDocumentation(diagramViewerState.contextMenuClassView.class.value.path)) {
|
|
61
|
+
dataSpaceViewerState.modelsDocumentationState.viewClassDocumentation(diagramViewerState.contextMenuClassView.class.value.path);
|
|
62
|
+
dataSpaceViewerState.changeZone(generateAnchorForActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION));
|
|
42
63
|
}
|
|
43
|
-
}
|
|
44
|
-
return (
|
|
64
|
+
};
|
|
65
|
+
return (_jsxs(ContextMenu, { className: "data-space__viewer__diagram-viewer__canvas", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: queryClass, disabled: !diagramViewerState.contextMenuClassView, children: "Query" }), _jsx(MenuContentItem, { onClick: viewClassDocumentation, disabled: !diagramViewerState.contextMenuClassView ||
|
|
66
|
+
!dataSpaceViewerState.modelsDocumentationState.hasClassDocumentation(diagramViewerState.contextMenuClassView.class.value.path), children: "View Documentation" })] }), disabled: !diagramViewerState.contextMenuClassView, menuProps: { elevation: 7 }, onClose: () => diagramViewerState.setContextMenuClassView(undefined), children: [diagramViewerState.showDescription && (_jsxs("div", { className: clsx('data-space__viewer__diagram-viewer__description', {
|
|
67
|
+
'data-space__viewer__diagram-viewer__description--expanded': diagramViewerState.expandDescription,
|
|
68
|
+
}), children: [_jsx("button", { className: "data-space__viewer__diagram-viewer__description__close-btn", tabIndex: -1, title: "Hide Description", onClick: () => diagramViewerState.setShowDescription(false), children: _jsx(CloseIcon, {}) }), _jsx("div", { className: "data-space__viewer__diagram-viewer__description__title", children: diagramViewerState.currentDiagram?.title
|
|
69
|
+
? diagramViewerState.currentDiagram.title
|
|
70
|
+
: 'Untitled' }), _jsx("div", { className: "data-space__viewer__diagram-viewer__description__content", children: descriptionText ? (_jsx(DataSpaceMarkdownTextViewer, { value: descriptionText })) : (_jsx("div", { className: "data-space__viewer__diagram-viewer__description__content__placeholder", children: "(not specified)" })) }), _jsx("button", { className: "data-space__viewer__diagram-viewer__description__expand-btn", tabIndex: -1, title: diagramViewerState.expandDescription ? 'Collapse' : 'Expand', onClick: () => diagramViewerState.setExpandDescription(!diagramViewerState.expandDescription), children: diagramViewerState.expandDescription ? (_jsx(ThinChevronUpIcon, {})) : (_jsx(ThinChevronDownIcon, {})) })] })), _jsx("div", { ref: diagramCanvasRef, className: clsx('diagram-canvas', diagramViewerState.diagramCursorClass), tabIndex: 0 })] }));
|
|
45
71
|
}));
|
|
72
|
+
const buildDiagramOption = (diagram) => ({
|
|
73
|
+
label: (_jsxs("div", { className: "data-space__viewer__diagram-viewer__header__navigation__selector__label", children: [_jsx(ShapesIcon, { className: "data-space__viewer__diagram-viewer__header__navigation__selector__icon" }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__navigation__selector__title", children: diagram.title ? diagram.title : 'Untitled' })] })),
|
|
74
|
+
value: diagram,
|
|
75
|
+
});
|
|
76
|
+
const DataSpaceDiagramViewerHeader = observer((props) => {
|
|
77
|
+
const { dataSpaceViewerState } = props;
|
|
78
|
+
const diagramViewerState = dataSpaceViewerState.diagramViewerState;
|
|
79
|
+
const diagramOptions = dataSpaceViewerState.dataSpaceAnalysisResult.diagrams.map(buildDiagramOption);
|
|
80
|
+
const selectedDiagramOption = diagramViewerState.currentDiagram
|
|
81
|
+
? buildDiagramOption(diagramViewerState.currentDiagram)
|
|
82
|
+
: null;
|
|
83
|
+
const onDiagramOptionChange = (option) => {
|
|
84
|
+
if (option.value !== diagramViewerState.currentDiagram) {
|
|
85
|
+
diagramViewerState.setCurrentDiagram(option.value);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const createModeSwitcher = (editMode, relationshipMode) => () => diagramViewerState.diagramRenderer.changeMode(editMode, relationshipMode);
|
|
89
|
+
const createCenterZoomer = (zoomLevel) => () => {
|
|
90
|
+
diagramViewerState.diagramRenderer.zoomCenter(zoomLevel / 100);
|
|
91
|
+
};
|
|
92
|
+
const zoomToFit = () => diagramViewerState.diagramRenderer.zoomToFit();
|
|
93
|
+
return (_jsxs("div", { className: "data-space__viewer__diagram-viewer__header", children: [_jsxs("div", { className: "data-space__viewer__diagram-viewer__header__navigation", children: [_jsx(CustomSelectorInput, { className: "data-space__viewer__diagram-viewer__header__navigation__selector", options: diagramOptions, onChange: onDiagramOptionChange, value: selectedDiagramOption, placeholder: "Search for a diagram", darkMode: true }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__navigation__pager", children: _jsx("input", { className: "data-space__viewer__diagram-viewer__header__navigation__pager__input input--dark", value: diagramViewerState.currentDiagramIndex, type: "number", onChange: (event) => {
|
|
94
|
+
const value = parseInt(event.target.value, 10);
|
|
95
|
+
if (isNaN(value) ||
|
|
96
|
+
value < 1 ||
|
|
97
|
+
value >
|
|
98
|
+
dataSpaceViewerState.dataSpaceAnalysisResult.diagrams.length) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
diagramViewerState.setCurrentDiagram(getNonNullableEntry(dataSpaceViewerState.dataSpaceAnalysisResult.diagrams, value - 1));
|
|
102
|
+
} }) }), _jsxs("div", { className: "data-space__viewer__diagram-viewer__header__navigation__pager__count", children: ["/", dataSpaceViewerState.dataSpaceAnalysisResult.diagrams.length] })] }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__actions", children: diagramViewerState.isDiagramRendererInitialized && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "data-space__viewer__diagram-viewer__header__group", children: [_jsx("button", { className: "data-space__viewer__diagram-viewer__header__tool", tabIndex: -1, onClick: () => {
|
|
103
|
+
if (diagramViewerState.currentDiagram) {
|
|
104
|
+
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(diagramViewerState.currentDiagram));
|
|
105
|
+
}
|
|
106
|
+
}, title: "Copy Link", children: _jsx(AnchorLinkIcon, {}) }), _jsx("button", { className: "data-space__viewer__diagram-viewer__header__tool", tabIndex: -1, onClick: () => diagramViewerState.diagramRenderer.recenter(), title: "Recenter (R)", children: _jsx(CenterFocusIcon, { className: "data-space__viewer__diagram-viewer__icon--recenter" }) }), _jsx("button", { className: clsx('data-space__viewer__diagram-viewer__header__tool', {
|
|
107
|
+
'data-space__viewer__diagram-viewer__header__tool--active': diagramViewerState.showDescription,
|
|
108
|
+
}), tabIndex: -1, onClick: () => diagramViewerState.setShowDescription(!diagramViewerState.showDescription), title: "Toggle Description (D)", children: _jsx(DescriptionIcon, { className: "data-space__viewer__diagram-viewer__icon--description" }) })] }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__group__separator" }), _jsxs("div", { className: "data-space__viewer__diagram-viewer__header__group", children: [_jsx("button", { className: clsx('data-space__viewer__diagram-viewer__header__tool', {
|
|
109
|
+
'data-space__viewer__diagram-viewer__header__tool--active': diagramViewerState.diagramRenderer.interactionMode ===
|
|
110
|
+
DIAGRAM_INTERACTION_MODE.LAYOUT,
|
|
111
|
+
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "View Tool (V)", children: _jsx(MousePointerIcon, { className: "data-space__viewer__diagram-viewer__icon--layout" }) }), _jsx("button", { className: clsx('data-space__viewer__diagram-viewer__header__tool', {
|
|
112
|
+
'data-space__viewer__diagram-viewer__header__tool--active': diagramViewerState.diagramRenderer.interactionMode ===
|
|
113
|
+
DIAGRAM_INTERACTION_MODE.PAN,
|
|
114
|
+
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.PAN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "Pan Tool (M)", children: _jsx(MoveIcon, { className: "data-space__viewer__diagram-viewer__icon--pan" }) }), _jsx("button", { className: clsx('data-space__viewer__diagram-viewer__header__tool', {
|
|
115
|
+
'data-space__viewer__diagram-viewer__header__tool--active': diagramViewerState.diagramRenderer.interactionMode ===
|
|
116
|
+
DIAGRAM_INTERACTION_MODE.ZOOM_IN,
|
|
117
|
+
}), tabIndex: -1, title: "Zoom In (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_IN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(ZoomInIcon, { className: "data-space__viewer__diagram-viewer__icon--zoom-in" }) }), _jsx("button", { className: clsx('data-space__viewer__diagram-viewer__header__tool', {
|
|
118
|
+
'data-space__viewer__diagram-viewer__header__tool--active': diagramViewerState.diagramRenderer.interactionMode ===
|
|
119
|
+
DIAGRAM_INTERACTION_MODE.ZOOM_OUT,
|
|
120
|
+
}), tabIndex: -1, title: "Zoom Out (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_OUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(ZoomOutIcon, { className: "data-space__viewer__diagram-viewer__icon--zoom-out" }) })] }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__group__separator" }), _jsxs(DropdownMenu, { className: "data-space__viewer__diagram-viewer__header__group data-space__viewer__diagram-viewer__header__dropdown", title: "Zoom...", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { className: "data-space__viewer__diagram-viewer__header__zoomer__dropdown__menu__item", onClick: zoomToFit, children: "Fit" }), _jsx(MenuContentDivider, {}), DIAGRAM_ZOOM_LEVELS.map((zoomLevel) => (_jsxs(MenuContentItem, { className: "data-space__viewer__diagram-viewer__header__zoomer__dropdown__menu__item", onClick: createCenterZoomer(zoomLevel), children: [zoomLevel, "%"] }, zoomLevel)))] }), menuProps: {
|
|
121
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
|
122
|
+
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
|
123
|
+
elevation: 7,
|
|
124
|
+
}, children: [_jsxs("div", { className: "data-space__viewer__diagram-viewer__header__dropdown__label data-space__viewer__diagram-viewer__header__zoomer__dropdown__label", children: [Math.round(diagramViewerState.diagramRenderer.zoom * 100), "%"] }), _jsx("div", { className: "data-space__viewer__diagram-viewer__header__dropdown__trigger data-space__viewer__diagram-viewer__header__zoomer__dropdown__trigger", children: _jsx(CaretDownIcon, {}) })] })] })) })] }));
|
|
125
|
+
});
|
|
46
126
|
export const DataSpaceDiagramViewer = observer((props) => {
|
|
47
127
|
const { dataSpaceViewerState } = props;
|
|
128
|
+
const diagramViewerState = dataSpaceViewerState.diagramViewerState;
|
|
48
129
|
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
49
130
|
const sectionRef = useRef(null);
|
|
50
131
|
const anchor = generateAnchorForActivity(DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER);
|
|
132
|
+
useCommands(diagramViewerState);
|
|
51
133
|
useEffect(() => {
|
|
52
134
|
if (sectionRef.current) {
|
|
53
135
|
dataSpaceViewerState.layoutState.setWikiPageAnchor(anchor, sectionRef.current);
|
|
54
136
|
}
|
|
55
137
|
return () => dataSpaceViewerState.layoutState.unsetWikiPageAnchor(anchor);
|
|
56
138
|
}, [dataSpaceViewerState, anchor]);
|
|
57
|
-
// diagram selector
|
|
58
139
|
const diagramCanvasRef = useRef(null);
|
|
140
|
+
const previousDiagram = diagramViewerState.previousDiagram;
|
|
141
|
+
const nextDiagram = diagramViewerState.nextDiagram;
|
|
59
142
|
const showPreviousDiagram = () => {
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const idx = analysisResult.diagrams.indexOf(dataSpaceViewerState.currentDiagram);
|
|
64
|
-
if (idx === 0 || idx === -1) {
|
|
65
|
-
return;
|
|
143
|
+
if (previousDiagram) {
|
|
144
|
+
diagramViewerState.setCurrentDiagram(previousDiagram);
|
|
145
|
+
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(previousDiagram));
|
|
66
146
|
}
|
|
67
|
-
const previousDiagram = guaranteeNonNullable(analysisResult.diagrams[idx - 1]);
|
|
68
|
-
dataSpaceViewerState.setCurrentDiagram(previousDiagram);
|
|
69
|
-
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(previousDiagram));
|
|
70
147
|
};
|
|
71
148
|
const showNextDiagram = () => {
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const idx = analysisResult.diagrams.indexOf(dataSpaceViewerState.currentDiagram);
|
|
76
|
-
if (idx === analysisResult.diagrams.length - 1 || idx === -1) {
|
|
77
|
-
return;
|
|
149
|
+
if (nextDiagram) {
|
|
150
|
+
diagramViewerState.setCurrentDiagram(nextDiagram);
|
|
151
|
+
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(nextDiagram));
|
|
78
152
|
}
|
|
79
|
-
const nextDiagram = guaranteeNonNullable(analysisResult.diagrams[idx + 1]);
|
|
80
|
-
dataSpaceViewerState.setCurrentDiagram(nextDiagram);
|
|
81
|
-
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(nextDiagram));
|
|
82
153
|
};
|
|
83
|
-
return (_jsxs("div", { ref: sectionRef, className: "data-space__viewer__wiki__section", children: [_jsx("div", { className: "data-space__viewer__wiki__section__header", children: _jsxs("div", { className: "data-space__viewer__wiki__section__header__label", children: ["Diagrams", _jsx("button", { className: "data-space__viewer__wiki__section__header__anchor", tabIndex: -1, onClick: () => dataSpaceViewerState.changeZone(anchor, true), children: _jsx(AnchorLinkIcon, {}) })] }) }), _jsxs("div", { className: "data-space__viewer__wiki__section__content", children: [analysisResult.diagrams.length > 0 && (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
154
|
+
return (_jsxs("div", { ref: sectionRef, className: "data-space__viewer__wiki__section", children: [_jsx("div", { className: "data-space__viewer__wiki__section__header", children: _jsxs("div", { className: "data-space__viewer__wiki__section__header__label", children: ["Diagrams", _jsx("button", { className: "data-space__viewer__wiki__section__header__anchor", tabIndex: -1, onClick: () => dataSpaceViewerState.changeZone(anchor, true), children: _jsx(AnchorLinkIcon, {}) })] }) }), _jsxs("div", { className: "data-space__viewer__wiki__section__content", children: [analysisResult.diagrams.length > 0 && (_jsxs("div", { className: "data-space__viewer__diagram-viewer", children: [_jsx(DataSpaceDiagramViewerHeader, { dataSpaceViewerState: dataSpaceViewerState }), _jsx("div", { className: "data-space__viewer__diagram-viewer__carousel", children: _jsxs("div", { className: "data-space__viewer__diagram-viewer__carousel__frame", children: [_jsx("div", { className: "data-space__viewer__diagram-viewer__carousel__frame__display", children: diagramViewerState.currentDiagram && (_jsx(DataSpaceDiagramCanvas, { dataSpaceViewerState: dataSpaceViewerState, diagram: diagramViewerState.currentDiagram.diagram, ref: diagramCanvasRef })) }), _jsx("button", { className: "data-space__viewer__diagram-viewer__carousel__frame__navigator data-space__viewer__diagram-viewer__carousel__frame__navigator--back", tabIndex: -1, title: `Previous - ${previousDiagram?.title
|
|
155
|
+
? previousDiagram.title
|
|
156
|
+
: '(untitled)'} (⇦)`, disabled: !previousDiagram, onClick: showPreviousDiagram, children: _jsx(ThinChevronLeftIcon, {}) }), _jsx("button", { className: "data-space__viewer__diagram-viewer__carousel__frame__navigator data-space__viewer__diagram-viewer__carousel__frame__navigator--next", tabIndex: -1, title: `Next - ${nextDiagram?.title ? nextDiagram.title : '(untitled)'} (⇨)`, disabled: !nextDiagram, onClick: showNextDiagram, children: _jsx(ThinChevronRightIcon, {}) }), _jsx("div", { className: "data-space__viewer__diagram-viewer__carousel__frame__indicators", children: _jsx("div", { className: "data-space__viewer__diagram-viewer__carousel__frame__indicators__notch", children: analysisResult.diagrams.map((diagram) => (_jsx("button", { className: clsx('data-space__viewer__diagram-viewer__carousel__frame__indicator', {
|
|
157
|
+
'data-space__viewer__diagram-viewer__carousel__frame__indicator--active': diagramViewerState.currentDiagram === diagram,
|
|
158
|
+
}), title: `View Diagram - ${diagram.title ? diagram.title : '(untitled)'}`, onClick: () => {
|
|
159
|
+
diagramViewerState.setCurrentDiagram(diagram);
|
|
160
|
+
dataSpaceViewerState.syncZoneWithNavigation(generateAnchorForDiagram(diagram));
|
|
161
|
+
}, children: _jsx(CircleIcon, {}) }, diagram.uuid))) }) })] }) })] })), analysisResult.diagrams.length <= 0 && (_jsx(DataSpaceWikiPlaceholder, { message: "(not specified)" }))] })] }));
|
|
91
162
|
});
|
|
92
163
|
//# sourceMappingURL=DataSpaceDiagramViewer.js.map
|