@finos/legend-extension-dsl-data-space 9.1.4 → 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.
Files changed (128) hide show
  1. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +1 -1
  2. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +1 -1
  3. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +15 -2
  4. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +1 -1
  5. package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
  6. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
  7. package/lib/components/DataSpaceDiagramViewer.js +77 -0
  8. package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
  9. package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
  10. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
  11. package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
  12. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
  13. package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
  14. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
  15. package/lib/components/DataSpaceInfoPanel.js +38 -0
  16. package/lib/components/DataSpaceInfoPanel.js.map +1 -0
  17. package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
  18. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
  19. package/lib/components/DataSpaceModelsDocumentation.js +60 -0
  20. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
  21. package/lib/components/{studio/DataSpacePreview.d.ts → DataSpaceQuickStart.d.ts} +2 -5
  22. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
  23. package/lib/components/DataSpaceQuickStart.js +17 -0
  24. package/lib/components/DataSpaceQuickStart.js.map +1 -0
  25. package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
  26. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
  27. package/lib/components/DataSpaceSupportPanel.js +40 -0
  28. package/lib/components/DataSpaceSupportPanel.js.map +1 -0
  29. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  30. package/lib/components/DataSpaceViewer.js +29 -278
  31. package/lib/components/DataSpaceViewer.js.map +1 -1
  32. package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
  33. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
  34. package/lib/components/DataSpaceViewerActivityBar.js +105 -0
  35. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
  36. package/lib/components/DataSpaceWiki.d.ts +23 -0
  37. package/lib/components/DataSpaceWiki.d.ts.map +1 -0
  38. package/lib/components/DataSpaceWiki.js +36 -0
  39. package/lib/components/DataSpaceWiki.js.map +1 -0
  40. package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
  41. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  42. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
  43. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  44. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
  45. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  46. package/lib/components/studio/DataSpacePreviewAction.js +1 -1
  47. package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
  48. package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
  49. package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
  50. package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
  51. package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
  52. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
  53. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  54. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +50 -0
  55. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  56. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +36 -5
  57. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  58. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +35 -8
  59. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  60. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  61. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +70 -11
  62. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  63. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  64. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +48 -8
  65. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  66. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  67. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
  68. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  69. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +92 -3
  70. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  71. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +23 -0
  72. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  73. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +50 -0
  74. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  75. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +0 -1
  76. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  77. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +33 -5
  78. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  79. package/lib/index.css +2 -2
  80. package/lib/index.css.map +1 -1
  81. package/lib/package.json +9 -5
  82. package/lib/stores/DataSpaceViewerState.d.ts +16 -14
  83. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  84. package/lib/stores/DataSpaceViewerState.js +19 -12
  85. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  86. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  87. package/lib/stores/studio/DataSpacePreviewState.js +0 -3
  88. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  89. package/package.json +20 -16
  90. package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
  91. package/src/components/DataSpaceDiagramViewer.tsx +191 -0
  92. package/src/components/DataSpaceExecutionContextViewer.tsx +173 -0
  93. package/src/components/DataSpaceInfoPanel.tsx +170 -0
  94. package/src/components/DataSpaceModelsDocumentation.tsx +92 -0
  95. package/src/components/DataSpaceQuickStart.tsx +15 -0
  96. package/src/components/DataSpaceSupportPanel.tsx +80 -0
  97. package/src/components/DataSpaceViewer.tsx +73 -1063
  98. package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
  99. package/src/components/DataSpaceWiki.tsx +76 -0
  100. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  101. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
  102. package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
  103. package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
  104. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
  105. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +46 -15
  106. package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
  107. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +65 -15
  108. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  109. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
  110. package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
  111. package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
  112. package/src/stores/DataSpaceViewerState.ts +24 -20
  113. package/src/stores/studio/DataSpacePreviewState.ts +0 -5
  114. package/tsconfig.json +8 -3
  115. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
  116. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
  117. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
  118. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
  119. package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
  120. package/lib/components/studio/DataSpacePreview.js +0 -52
  121. package/lib/components/studio/DataSpacePreview.js.map +0 -1
  122. package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
  123. package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
  124. package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
  125. package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
  126. package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
  127. package/src/components/studio/DataSpacePreview.tsx +0 -129
  128. package/src/stores/studio/DataSpacePreviewStore.ts +0 -172
@@ -1,129 +0,0 @@
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, useLocalObservable } from 'mobx-react-lite';
18
- import { useApplicationStore, useParams } from '@finos/legend-application';
19
- import { useDepotServerClient } from '@finos/legend-server-depot';
20
- import { parseGAVCoordinates } from '@finos/legend-storage';
21
- import { DataSpacePreviewStore } from '../../stores/studio/DataSpacePreviewStore.js';
22
- import { createContext, useContext, useEffect } from 'react';
23
- import { useLegendStudioApplicationStore } from '@finos/legend-application-studio';
24
- import {
25
- DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN,
26
- type DataSpacePreviewPathParams,
27
- } from '../../application/studio/DSL_DataSpace_LegendStudioNavigation.js';
28
- import { guaranteeNonNullable } from '@finos/legend-shared';
29
- import { flowResult } from 'mobx';
30
- import { DataSpaceViewer } from '../DataSpaceViewer.js';
31
- import {
32
- BlankPanelContent,
33
- PanelLoadingIndicator,
34
- TimesCircleIcon,
35
- } from '@finos/legend-art';
36
-
37
- const DataSpacePreviewStoreContext = createContext<
38
- DataSpacePreviewStore | undefined
39
- >(undefined);
40
-
41
- const DataSpacePreviewStoreProvider: React.FC<{
42
- children: React.ReactNode;
43
- gav: string;
44
- dataSpacePath: string;
45
- }> = ({ children, gav, dataSpacePath }) => {
46
- const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
47
- const applicationStore = useLegendStudioApplicationStore();
48
- const depotServerClient = useDepotServerClient();
49
- const store = useLocalObservable(
50
- () =>
51
- new DataSpacePreviewStore(
52
- applicationStore,
53
- depotServerClient,
54
- groupId,
55
- artifactId,
56
- versionId,
57
- dataSpacePath,
58
- ),
59
- );
60
- return (
61
- <DataSpacePreviewStoreContext.Provider value={store}>
62
- {children}
63
- </DataSpacePreviewStoreContext.Provider>
64
- );
65
- };
66
-
67
- const useDataSpacePreviewStore = (): DataSpacePreviewStore =>
68
- guaranteeNonNullable(
69
- useContext(DataSpacePreviewStoreContext),
70
- `Can't find data space preview store in context`,
71
- );
72
-
73
- const DataSpacePreviewInner = observer(() => {
74
- const previewStore = useDataSpacePreviewStore();
75
- const applicationStore = useApplicationStore();
76
-
77
- useEffect(() => {
78
- flowResult(previewStore.initialize()).catch(
79
- applicationStore.alertUnhandledError,
80
- );
81
- }, [applicationStore, previewStore]);
82
-
83
- return (
84
- <div className="data-space-preview">
85
- <PanelLoadingIndicator
86
- isLoading={previewStore.loadDataSpaceState.isInProgress}
87
- />
88
- {previewStore.dataSpaceViewerState && (
89
- <DataSpaceViewer
90
- dataSpaceViewerState={previewStore.dataSpaceViewerState}
91
- />
92
- )}
93
- {!previewStore.dataSpaceViewerState && (
94
- <>
95
- {previewStore.loadDataSpaceState.isInProgress && (
96
- <BlankPanelContent>
97
- {previewStore.loadDataSpaceState.message}
98
- </BlankPanelContent>
99
- )}
100
- {previewStore.loadDataSpaceState.hasFailed && (
101
- <BlankPanelContent>
102
- <div className="data-space-preview__failure">
103
- <div className="data-space-preview__failure__icon">
104
- <TimesCircleIcon />
105
- </div>
106
- <div className="data-space-preview__failure__text">
107
- Can&apos;t load data space
108
- </div>
109
- </div>
110
- </BlankPanelContent>
111
- )}
112
- </>
113
- )}
114
- </div>
115
- );
116
- });
117
-
118
- export const DataSpacePreview = observer(() => {
119
- const parameters = useParams<DataSpacePreviewPathParams>();
120
- const gav = parameters[DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV];
121
- const dataSpacePath =
122
- parameters[DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
123
-
124
- return (
125
- <DataSpacePreviewStoreProvider gav={gav} dataSpacePath={dataSpacePath}>
126
- <DataSpacePreviewInner />
127
- </DataSpacePreviewStoreProvider>
128
- );
129
- });
@@ -1,172 +0,0 @@
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
- retrieveProjectEntitiesWithDependencies,
19
- type DepotServerClient,
20
- ProjectData,
21
- } from '@finos/legend-server-depot';
22
- import type { LegendStudioApplicationStore } from '@finos/legend-application-studio';
23
- import {
24
- ActionState,
25
- assertErrorThrown,
26
- type GeneratorFn,
27
- type PlainObject,
28
- } from '@finos/legend-shared';
29
- import { flow, flowResult, makeObservable, observable } from 'mobx';
30
- import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
31
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graphManager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
32
- import { BasicGraphManagerState } from '@finos/legend-graph';
33
- import { retrieveAnalyticsResultCache } from '../../graphManager/action/analytics/DataSpaceAnalysisHelper.js';
34
- import type { DataSpaceAnalysisResult } from '../../graphManager/action/analytics/DataSpaceAnalysis.js';
35
- import type { ClassView } from '@finos/legend-extension-dsl-diagram';
36
- import { TAB_SIZE } from '@finos/legend-application';
37
-
38
- export class DataSpacePreviewStore {
39
- readonly applicationStore: LegendStudioApplicationStore;
40
- readonly depotServerClient: DepotServerClient;
41
- readonly graphManagerState: BasicGraphManagerState;
42
-
43
- readonly groupId: string;
44
- readonly artifactId: string;
45
- readonly versionId: string;
46
- readonly dataSpacePath: string;
47
-
48
- readonly loadDataSpaceState = ActionState.create();
49
- dataSpaceViewerState?: DataSpaceViewerState | undefined;
50
-
51
- constructor(
52
- applicationStore: LegendStudioApplicationStore,
53
- depotServerClient: DepotServerClient,
54
- groupId: string,
55
- artifactId: string,
56
- versionId: string,
57
- dataSpacePath: string,
58
- ) {
59
- makeObservable(this, {
60
- dataSpaceViewerState: observable,
61
- initialize: flow,
62
- });
63
-
64
- this.applicationStore = applicationStore;
65
- this.applicationStore.assistantService.setIsHidden(true);
66
-
67
- this.depotServerClient = depotServerClient;
68
- this.graphManagerState = new BasicGraphManagerState(
69
- applicationStore.pluginManager,
70
- applicationStore.logService,
71
- );
72
-
73
- this.groupId = groupId;
74
- this.artifactId = artifactId;
75
- this.versionId = versionId;
76
- this.dataSpacePath = dataSpacePath;
77
- }
78
-
79
- *initialize(): GeneratorFn<void> {
80
- this.loadDataSpaceState.inProgress();
81
- this.loadDataSpaceState.setMessage(`Initializing...`);
82
-
83
- try {
84
- const groupId = this.groupId;
85
- const artifactId = this.artifactId;
86
- const versionId = this.versionId;
87
-
88
- // initialize
89
- yield this.graphManagerState.graphManager.initialize(
90
- {
91
- env: this.applicationStore.config.env,
92
- tabSize: TAB_SIZE,
93
- clientConfig: {
94
- baseUrl: this.applicationStore.config.engineServerUrl,
95
- queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
96
- enableCompression: true,
97
- },
98
- },
99
- {
100
- tracerService: this.applicationStore.tracerService,
101
- },
102
- );
103
-
104
- // fetch project
105
- this.loadDataSpaceState.setMessage(`Fetching project...`);
106
- const project = ProjectData.serialization.fromJson(
107
- (yield flowResult(
108
- this.depotServerClient.getProject(groupId, artifactId),
109
- )) as PlainObject<ProjectData>,
110
- );
111
-
112
- // analyze data space
113
- const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(
114
- this.graphManagerState.graphManager,
115
- ).analyzeDataSpace(
116
- this.dataSpacePath,
117
- () =>
118
- retrieveProjectEntitiesWithDependencies(
119
- project,
120
- versionId,
121
- this.depotServerClient,
122
- ),
123
- () =>
124
- retrieveAnalyticsResultCache(
125
- project,
126
- versionId,
127
- this.dataSpacePath,
128
- this.depotServerClient,
129
- ),
130
- this.loadDataSpaceState,
131
- )) as DataSpaceAnalysisResult;
132
-
133
- this.dataSpaceViewerState = new DataSpaceViewerState(
134
- this.applicationStore,
135
- this.graphManagerState,
136
- groupId,
137
- artifactId,
138
- versionId,
139
- analysisResult,
140
- {
141
- viewProject: () => {
142
- this.applicationStore.notificationService.notifyWarning(
143
- 'This feature is not supported in preview mode',
144
- );
145
- },
146
- viewSDLCProject: async () => {
147
- this.applicationStore.notificationService.notifyWarning(
148
- 'This feature is not supported in preview mode',
149
- );
150
- },
151
- onDiagramClassDoubleClick: (classView: ClassView): void => {
152
- this.applicationStore.notificationService.notifyWarning(
153
- 'This feature is not supported in preview mode',
154
- );
155
- },
156
- },
157
- {
158
- HACKY__previewExperimentalFeatures:
159
- this.applicationStore.config.options
160
- .HACKY__previewExperimentalFeatures,
161
- },
162
- );
163
- this.loadDataSpaceState.pass();
164
- } catch (error) {
165
- assertErrorThrown(error);
166
- this.loadDataSpaceState.fail();
167
- this.applicationStore.notificationService.notifyError(error);
168
- } finally {
169
- this.loadDataSpaceState.setMessage(undefined);
170
- }
171
- }
172
- }