@finos/legend-extension-dsl-data-space 4.0.4 → 6.0.0
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/DSLDataSpace_Const.d.ts +18 -0
- package/lib/DSLDataSpace_Const.d.ts.map +1 -0
- package/lib/DSLDataSpace_Const.js +20 -0
- package/lib/DSLDataSpace_Const.js.map +1 -0
- package/lib/DSLDataSpace_Extension.d.ts +1 -1
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +3 -3
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/DataSpaceViewer.d.ts.map +1 -1
- package/lib/components/DataSpaceViewer.js +30 -27
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/query/{DSLDataSpace_LegendQueryPlugin.d.ts → DSLDataSpace_LegendQueryApplicationPlugin.d.ts} +6 -3
- package/lib/components/query/DSLDataSpace_LegendQueryApplicationPlugin.d.ts.map +1 -0
- package/lib/components/query/{DSLDataSpace_LegendQueryPlugin.js → DSLDataSpace_LegendQueryApplicationPlugin.js} +28 -4
- package/lib/components/query/DSLDataSpace_LegendQueryApplicationPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQueryEditor.d.ts +20 -0
- package/lib/components/query/DataSpaceQueryEditor.d.ts.map +1 -0
- package/lib/components/query/DataSpaceQueryEditor.js +43 -0
- package/lib/components/query/DataSpaceQueryEditor.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -1
- package/lib/components/query/DataSpaceQuerySetup.js +4 -17
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/studio/{DSLDataSpace_LegendStudioPlugin.d.ts → DSLDataSpace_LegendStudioApplicationPlugin.d.ts} +3 -3
- package/lib/components/studio/DSLDataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_LegendStudioPlugin.js → DSLDataSpace_LegendStudioApplicationPlugin.js} +5 -5
- package/lib/components/studio/DSLDataSpace_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/{models/DSLDataSpace_ModelUtils.d.ts → graph/DSLDataSpace_HashUtils.d.ts} +1 -1
- package/lib/graph/DSLDataSpace_HashUtils.d.ts.map +1 -0
- package/lib/{models/DSLDataSpace_ModelUtils.js → graph/DSLDataSpace_HashUtils.js} +1 -1
- package/lib/graph/DSLDataSpace_HashUtils.js.map +1 -0
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js +1 -1
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js.map +1 -1
- package/lib/{models/metamodels → graph/metamodel}/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.d.ts +0 -0
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.d.ts.map +1 -0
- package/lib/{models/metamodels → graph/metamodel}/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js +1 -1
- package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js.map +1 -0
- package/lib/graphManager/DSLDataSpace_GraphManagerHelper.d.ts +1 -1
- package/lib/graphManager/DSLDataSpace_GraphManagerHelper.d.ts.map +1 -1
- package/lib/graphManager/DSLDataSpace_GraphManagerHelper.js +1 -1
- package/lib/graphManager/DSLDataSpace_GraphManagerHelper.js.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts +2 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js +5 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js.map +1 -1
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +50 -0
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -0
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +48 -0
- package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -0
- package/lib/graphManager/action/changeDetection/DSLDataSpace_ObserverHelper.d.ts +1 -1
- package/lib/graphManager/action/changeDetection/DSLDataSpace_ObserverHelper.d.ts.map +1 -1
- package/lib/graphManager/action/changeDetection/DSLDataSpace_ObserverHelper.js +1 -0
- package/lib/graphManager/action/changeDetection/DSLDataSpace_ObserverHelper.js.map +1 -1
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtension.d.ts +23 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtension.js +21 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtension.js.map +1 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtensionBuilder.d.ts +18 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtensionBuilder.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtensionBuilder.js +20 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtensionBuilder.js.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +0 -0
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +1 -1
- package/lib/graphManager/protocol/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_DSLDataSpace_PureGraphManagerExtension.d.ts +26 -0
- package/lib/graphManager/protocol/pure/v1/V1_DSLDataSpace_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_DSLDataSpace_PureGraphManagerExtension.js +131 -0
- package/lib/graphManager/protocol/pure/v1/V1_DSLDataSpace_PureGraphManagerExtension.js.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/V1_DSLDataSpace_SystemModels.json +0 -0
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +53 -0
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +78 -0
- package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.d.ts +0 -0
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.d.ts.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js +1 -1
- package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.d.ts +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.d.ts.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.js +0 -0
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.js.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts +3 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +1 -0
- package/lib/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +15 -14
- package/lib/stores/DataSpaceViewerState.d.ts +7 -11
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
- package/lib/stores/DataSpaceViewerState.js +10 -32
- package/lib/stores/DataSpaceViewerState.js.map +1 -1
- package/lib/stores/query/DSLDataSpace_LegendQueryRouter.d.ts +32 -0
- package/lib/stores/query/DSLDataSpace_LegendQueryRouter.d.ts.map +1 -0
- package/lib/stores/query/DSLDataSpace_LegendQueryRouter.js +34 -0
- package/lib/stores/query/DSLDataSpace_LegendQueryRouter.js.map +1 -0
- package/lib/stores/query/DataSpaceQueryEditorStore.d.ts +31 -0
- package/lib/stores/query/DataSpaceQueryEditorStore.d.ts.map +1 -0
- package/lib/stores/query/DataSpaceQueryEditorStore.js +87 -0
- package/lib/stores/query/DataSpaceQueryEditorStore.js.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +4 -5
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js +35 -45
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -1
- package/package.json +22 -21
- package/src/DSLDataSpace_Const.ts +20 -0
- package/src/DSLDataSpace_Extension.ts +3 -3
- package/src/components/DataSpaceViewer.tsx +56 -66
- package/src/components/query/{DSLDataSpace_LegendQueryPlugin.tsx → DSLDataSpace_LegendQueryApplicationPlugin.tsx} +41 -4
- package/src/components/query/DataSpaceQueryEditor.tsx +106 -0
- package/src/components/query/DataSpaceQuerySetup.tsx +23 -32
- package/src/components/studio/{DSLDataSpace_LegendStudioPlugin.tsx → DSLDataSpace_LegendStudioApplicationPlugin.tsx} +11 -11
- package/src/{models/DSLDataSpace_ModelUtils.ts → graph/DSLDataSpace_HashUtils.ts} +0 -0
- package/src/graph/DSLDataSpace_PureGraphPlugin.ts +1 -1
- package/src/{models/metamodels → graph/metamodel}/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.ts +1 -1
- package/src/graphManager/DSLDataSpace_GraphManagerHelper.ts +1 -1
- package/src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts +7 -1
- package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +64 -0
- package/src/graphManager/action/changeDetection/DSLDataSpace_ObserverHelper.ts +2 -1
- package/src/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtension.ts +42 -0
- package/src/graphManager/protocol/pure/DSLDataSpace_PureGraphManagerExtensionBuilder.ts +27 -0
- package/src/{models/protocols → graphManager/protocol}/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +1 -1
- package/src/graphManager/protocol/pure/v1/V1_DSLDataSpace_PureGraphManagerExtension.ts +228 -0
- package/src/{models/protocols → graphManager/protocol}/pure/v1/V1_DSLDataSpace_SystemModels.json +0 -0
- package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +117 -0
- package/src/{models/protocols → graphManager/protocol}/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.ts +1 -1
- package/src/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.ts +1 -1
- package/src/{models/protocols → graphManager/protocol}/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts +1 -1
- package/src/index.ts +5 -3
- package/src/stores/DataSpaceViewerState.ts +23 -54
- package/src/stores/query/DSLDataSpace_LegendQueryRouter.ts +69 -0
- package/src/stores/query/DataSpaceQueryEditorStore.ts +141 -0
- package/src/stores/query/DataSpaceQuerySetupState.ts +67 -75
- package/tsconfig.json +18 -9
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +0 -1
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +0 -1
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +0 -1
- package/lib/models/DSLDataSpace_ModelUtils.d.ts.map +0 -1
- package/lib/models/DSLDataSpace_ModelUtils.js.map +0 -1
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.d.ts.map +0 -1
- package/lib/models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js.map +0 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +0 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +0 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DSLDataSpace_DataSpace.js.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.js.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +0 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +0 -1
|
@@ -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
|
+
// NOTE: these are non-compilable profile and tag that we come up with for query
|
|
18
|
+
// so that it records the dataSpace it is created from
|
|
19
|
+
export const QUERY_PROFILE_PATH = 'meta::pure::profiles::query';
|
|
20
|
+
export const QUERY_PROFILE_TAG_DATA_SPACE = 'dataSpace';
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
import packageJson from '../package.json';
|
|
18
18
|
import { AbstractPreset } from '@finos/legend-shared';
|
|
19
19
|
import { DSLDataSpace_PureGraphManagerPlugin } from './graphManager/DSLDataSpace_PureGraphManagerPlugin.js';
|
|
20
|
-
import { DSLDataSpace_PureProtocolProcessorPlugin } from './
|
|
20
|
+
import { DSLDataSpace_PureProtocolProcessorPlugin } from './graphManager/protocol/pure/DSLDataSpace_PureProtocolProcessorPlugin.js';
|
|
21
21
|
import { DSLDataSpace_PureGraphPlugin } from './graph/DSLDataSpace_PureGraphPlugin.js';
|
|
22
22
|
|
|
23
|
-
export class
|
|
23
|
+
export class DSLDataSpace_GraphManagerPreset extends AbstractPreset {
|
|
24
24
|
constructor() {
|
|
25
|
-
super(packageJson.extensions.
|
|
25
|
+
super(packageJson.extensions.graphManagerPreset, packageJson.version, [
|
|
26
26
|
new DSLDataSpace_PureGraphPlugin(),
|
|
27
27
|
new DSLDataSpace_PureGraphManagerPlugin(),
|
|
28
28
|
new DSLDataSpace_PureProtocolProcessorPlugin(),
|
|
@@ -39,16 +39,16 @@ import {
|
|
|
39
39
|
type Diagram,
|
|
40
40
|
DiagramRenderer,
|
|
41
41
|
} from '@finos/legend-extension-dsl-diagram';
|
|
42
|
+
import { DataSpaceSupportEmail } from '../graph/metamodel/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
42
43
|
import {
|
|
43
|
-
|
|
44
|
-
type
|
|
45
|
-
|
|
46
|
-
} from '../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
47
|
-
import type { PackageableRuntime } from '@finos/legend-graph';
|
|
44
|
+
extractElementNameFromPath,
|
|
45
|
+
type PackageableRuntime,
|
|
46
|
+
} from '@finos/legend-graph';
|
|
48
47
|
import {
|
|
49
48
|
type DataSpaceViewerState,
|
|
50
49
|
DATA_SPACE_VIEWER_ACTIVITY_MODE,
|
|
51
50
|
} from '../stores/DataSpaceViewerState.js';
|
|
51
|
+
import type { DataSpaceExecutionContextAnalysisResult } from '../graphManager/action/analytics/DataSpaceAnalysis.js';
|
|
52
52
|
|
|
53
53
|
interface DataSpaceViewerActivityConfig {
|
|
54
54
|
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
@@ -113,16 +113,12 @@ const buildDiagramOption = (diagram: Diagram): DiagramOption => ({
|
|
|
113
113
|
const DataSpaceModelsOverview = observer(
|
|
114
114
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
115
115
|
const { dataSpaceViewerState } = props;
|
|
116
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
116
117
|
|
|
117
118
|
// diagram selector
|
|
118
119
|
const diagramCanvasRef = useRef<HTMLDivElement>(null);
|
|
119
|
-
const diagramOptions =
|
|
120
|
-
.
|
|
121
|
-
dataSpaceViewerState.diagrams.filter(
|
|
122
|
-
(diagram) => !dataSpaceViewerState.featuredDiagrams.includes(diagram),
|
|
123
|
-
),
|
|
124
|
-
)
|
|
125
|
-
.map(buildDiagramOption);
|
|
120
|
+
const diagramOptions =
|
|
121
|
+
analysisResult.featuredDiagrams.map(buildDiagramOption);
|
|
126
122
|
const selectedDiagramOption = dataSpaceViewerState.currentDiagram
|
|
127
123
|
? buildDiagramOption(dataSpaceViewerState.currentDiagram)
|
|
128
124
|
: null;
|
|
@@ -131,22 +127,8 @@ const DataSpaceModelsOverview = observer(
|
|
|
131
127
|
dataSpaceViewerState.setCurrentDiagram(option.value);
|
|
132
128
|
}
|
|
133
129
|
};
|
|
134
|
-
const formatDiagramOptionLabel = (
|
|
135
|
-
option: DiagramOption,
|
|
136
|
-
): React.ReactNode => (
|
|
137
|
-
<div className="data-space__viewer__diagrams__dropdown__option">
|
|
138
|
-
<div className="data-space__viewer__diagrams__dropdown__option__label">
|
|
139
|
-
{option.label}
|
|
140
|
-
</div>
|
|
141
|
-
{dataSpaceViewerState.featuredDiagrams.includes(option.value) && (
|
|
142
|
-
<div className="data-space__viewer__diagrams__dropdown__option__tag">
|
|
143
|
-
featured
|
|
144
|
-
</div>
|
|
145
|
-
)}
|
|
146
|
-
</div>
|
|
147
|
-
);
|
|
148
130
|
|
|
149
|
-
if (
|
|
131
|
+
if (analysisResult.featuredDiagrams.length === 0) {
|
|
150
132
|
return <BlankPanelContent>No diagrams available</BlankPanelContent>;
|
|
151
133
|
}
|
|
152
134
|
return (
|
|
@@ -159,7 +141,6 @@ const DataSpaceModelsOverview = observer(
|
|
|
159
141
|
value={selectedDiagramOption}
|
|
160
142
|
placeholder="Search for a diagram"
|
|
161
143
|
darkMode={true}
|
|
162
|
-
formatOptionLabel={formatDiagramOptionLabel}
|
|
163
144
|
/>
|
|
164
145
|
</div>
|
|
165
146
|
<div className="data-space__viewer__diagrams__content">
|
|
@@ -186,10 +167,10 @@ const DataSpaceModelsOverview = observer(
|
|
|
186
167
|
|
|
187
168
|
type ExecutionContextOption = {
|
|
188
169
|
label: string;
|
|
189
|
-
value:
|
|
170
|
+
value: DataSpaceExecutionContextAnalysisResult;
|
|
190
171
|
};
|
|
191
172
|
const buildExecutionContextOption = (
|
|
192
|
-
value:
|
|
173
|
+
value: DataSpaceExecutionContextAnalysisResult,
|
|
193
174
|
): ExecutionContextOption => ({
|
|
194
175
|
label: value.name,
|
|
195
176
|
value: value,
|
|
@@ -207,12 +188,15 @@ const buildRuntimeOption = (value: PackageableRuntime): RuntimeOption => ({
|
|
|
207
188
|
const DataSpaceExecutionViewer = observer(
|
|
208
189
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
209
190
|
const { dataSpaceViewerState } = props;
|
|
191
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
192
|
+
const executionContexts = Array.from(
|
|
193
|
+
dataSpaceViewerState.dataSpaceAnalysisResult.executionContextsIndex.values(),
|
|
194
|
+
);
|
|
210
195
|
|
|
211
196
|
// execution
|
|
212
|
-
const executionContextOptions =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
);
|
|
197
|
+
const executionContextOptions = executionContexts.map(
|
|
198
|
+
buildExecutionContextOption,
|
|
199
|
+
);
|
|
216
200
|
const selectedExecutionContextOption = buildExecutionContextOption(
|
|
217
201
|
dataSpaceViewerState.currentExecutionContext,
|
|
218
202
|
);
|
|
@@ -230,8 +214,7 @@ const DataSpaceExecutionViewer = observer(
|
|
|
230
214
|
<div className="data-space__viewer__execution__entry__content__dropdown__option__label">
|
|
231
215
|
{option.label}
|
|
232
216
|
</div>
|
|
233
|
-
{option.value ===
|
|
234
|
-
dataSpaceViewerState.dataSpace.defaultExecutionContext && (
|
|
217
|
+
{option.value === analysisResult.defaultExecutionContext && (
|
|
235
218
|
<div className="data-space__viewer__execution__entry__content__dropdown__option__tag">
|
|
236
219
|
default
|
|
237
220
|
</div>
|
|
@@ -241,7 +224,9 @@ const DataSpaceExecutionViewer = observer(
|
|
|
241
224
|
|
|
242
225
|
// runtime
|
|
243
226
|
const runtimeOptions =
|
|
244
|
-
dataSpaceViewerState.
|
|
227
|
+
dataSpaceViewerState.currentExecutionContext.compatibleRuntimes.map(
|
|
228
|
+
buildRuntimeOption,
|
|
229
|
+
);
|
|
245
230
|
const selectedRuntimeOption = buildRuntimeOption(
|
|
246
231
|
dataSpaceViewerState.currentRuntime,
|
|
247
232
|
);
|
|
@@ -258,7 +243,7 @@ const DataSpaceExecutionViewer = observer(
|
|
|
258
243
|
{option.label}
|
|
259
244
|
</div>
|
|
260
245
|
{option.value ===
|
|
261
|
-
dataSpaceViewerState.currentExecutionContext.defaultRuntime
|
|
246
|
+
dataSpaceViewerState.currentExecutionContext.defaultRuntime && (
|
|
262
247
|
<div className="data-space__viewer__execution__entry__content__dropdown__option__tag">
|
|
263
248
|
default
|
|
264
249
|
</div>
|
|
@@ -298,7 +283,7 @@ const DataSpaceExecutionViewer = observer(
|
|
|
298
283
|
<PURE_MappingIcon />
|
|
299
284
|
</div>
|
|
300
285
|
<div className="data-space__viewer__execution__entry__content data-space__viewer__execution__entry__content__text">
|
|
301
|
-
{dataSpaceViewerState.currentExecutionContext.mapping.
|
|
286
|
+
{dataSpaceViewerState.currentExecutionContext.mapping.path}
|
|
302
287
|
</div>
|
|
303
288
|
</div>
|
|
304
289
|
<div className="data-space__viewer__execution__entry">
|
|
@@ -324,8 +309,7 @@ const DataSpaceExecutionViewer = observer(
|
|
|
324
309
|
const DataSpaceTags = observer(
|
|
325
310
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
326
311
|
const { dataSpaceViewerState } = props;
|
|
327
|
-
|
|
328
|
-
const dataSpace = dataSpaceViewerState.dataSpace;
|
|
312
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
329
313
|
|
|
330
314
|
return (
|
|
331
315
|
<div className="data-space__viewer__tags">
|
|
@@ -333,24 +317,26 @@ const DataSpaceTags = observer(
|
|
|
333
317
|
<div className="data-space__viewer__tags__section__title">
|
|
334
318
|
Tagged Values
|
|
335
319
|
</div>
|
|
336
|
-
{
|
|
337
|
-
|
|
320
|
+
{analysisResult.taggedValues.length !== 0 &&
|
|
321
|
+
analysisResult.taggedValues.map((taggedValue) => (
|
|
338
322
|
<div
|
|
339
323
|
key={taggedValue._UUID}
|
|
340
324
|
className="data-space__viewer__tags__section__entry"
|
|
341
325
|
>
|
|
342
326
|
<div
|
|
343
327
|
className="data-space__viewer__tags__tagged-value__tag"
|
|
344
|
-
title={`${taggedValue.
|
|
328
|
+
title={`${taggedValue.profile}.${taggedValue.tag}`}
|
|
345
329
|
>
|
|
346
|
-
{taggedValue.
|
|
330
|
+
{`${extractElementNameFromPath(taggedValue.profile)}.${
|
|
331
|
+
taggedValue.tag
|
|
332
|
+
}`}
|
|
347
333
|
</div>
|
|
348
334
|
<div className="data-space__viewer__tags__tagged-value__value">
|
|
349
335
|
{taggedValue.value}
|
|
350
336
|
</div>
|
|
351
337
|
</div>
|
|
352
338
|
))}
|
|
353
|
-
{
|
|
339
|
+
{analysisResult.taggedValues.length === 0 && (
|
|
354
340
|
<div className="data-space__viewer__tags__section__placeholder">
|
|
355
341
|
(empty)
|
|
356
342
|
</div>
|
|
@@ -360,19 +346,21 @@ const DataSpaceTags = observer(
|
|
|
360
346
|
<div className="data-space__viewer__tags__section__title">
|
|
361
347
|
Stereotypes
|
|
362
348
|
</div>
|
|
363
|
-
{
|
|
364
|
-
|
|
349
|
+
{analysisResult.stereotypes.length !== 0 &&
|
|
350
|
+
analysisResult.stereotypes.map((stereotype) => (
|
|
365
351
|
<div
|
|
366
|
-
key={stereotype.
|
|
352
|
+
key={stereotype._UUID}
|
|
367
353
|
className="data-space__viewer__tags__section__entry"
|
|
368
|
-
title={`${stereotype.
|
|
354
|
+
title={`${stereotype.profile}.${stereotype.value}`}
|
|
369
355
|
>
|
|
370
356
|
<div className="data-space__viewer__tags__steoreotype">
|
|
371
|
-
{stereotype.
|
|
357
|
+
{`${extractElementNameFromPath(stereotype.profile)}.${
|
|
358
|
+
stereotype.value
|
|
359
|
+
}`}
|
|
372
360
|
</div>
|
|
373
361
|
</div>
|
|
374
362
|
))}
|
|
375
|
-
{
|
|
363
|
+
{analysisResult.stereotypes.length === 0 && (
|
|
376
364
|
<div className="data-space__viewer__tags__section__placeholder">
|
|
377
365
|
(empty)
|
|
378
366
|
</div>
|
|
@@ -409,18 +397,18 @@ const DataSpaceSupportEmailViewer = observer(
|
|
|
409
397
|
);
|
|
410
398
|
|
|
411
399
|
const DataSpaceSupportInfoViewerInner = observer(
|
|
412
|
-
(props: {
|
|
413
|
-
dataSpaceViewerState
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
if (
|
|
400
|
+
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
401
|
+
const { dataSpaceViewerState } = props;
|
|
402
|
+
const supportInfo =
|
|
403
|
+
dataSpaceViewerState.dataSpaceAnalysisResult.supportInfo;
|
|
404
|
+
|
|
405
|
+
if (supportInfo === undefined) {
|
|
418
406
|
return <BlankPanelContent>No support info available</BlankPanelContent>;
|
|
419
|
-
} else if (
|
|
407
|
+
} else if (supportInfo instanceof DataSpaceSupportEmail) {
|
|
420
408
|
return (
|
|
421
409
|
<DataSpaceSupportEmailViewer
|
|
422
410
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
423
|
-
dataSpaceSupportEmail={
|
|
411
|
+
dataSpaceSupportEmail={supportInfo}
|
|
424
412
|
/>
|
|
425
413
|
);
|
|
426
414
|
}
|
|
@@ -433,7 +421,7 @@ const DataSpaceSupportInfoViewerInner = observer(
|
|
|
433
421
|
export const DataSpaceViewer = observer(
|
|
434
422
|
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
435
423
|
const { dataSpaceViewerState } = props;
|
|
436
|
-
const
|
|
424
|
+
const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
|
|
437
425
|
const changeActivity =
|
|
438
426
|
(activity: DATA_SPACE_VIEWER_ACTIVITY_MODE): (() => void) =>
|
|
439
427
|
(): void =>
|
|
@@ -482,7 +470,7 @@ export const DataSpaceViewer = observer(
|
|
|
482
470
|
dataSpaceViewerState.groupId,
|
|
483
471
|
dataSpaceViewerState.artifactId,
|
|
484
472
|
dataSpaceViewerState.versionId,
|
|
485
|
-
|
|
473
|
+
analysisResult.path,
|
|
486
474
|
);
|
|
487
475
|
|
|
488
476
|
return (
|
|
@@ -495,7 +483,7 @@ export const DataSpaceViewer = observer(
|
|
|
495
483
|
onClick={viewProject}
|
|
496
484
|
>
|
|
497
485
|
<div className="data-space__viewer__path__label">
|
|
498
|
-
{
|
|
486
|
+
{analysisResult.path}
|
|
499
487
|
</div>
|
|
500
488
|
<div className="data-space__viewer__path__link">
|
|
501
489
|
<ExternalLinkSquareIcon />
|
|
@@ -503,10 +491,13 @@ export const DataSpaceViewer = observer(
|
|
|
503
491
|
</button>
|
|
504
492
|
<div
|
|
505
493
|
className={clsx('data-space__viewer__description', {
|
|
506
|
-
'data-space__viewer__description--empty':
|
|
494
|
+
'data-space__viewer__description--empty':
|
|
495
|
+
!analysisResult.description,
|
|
507
496
|
})}
|
|
508
497
|
>
|
|
509
|
-
{
|
|
498
|
+
{analysisResult.description
|
|
499
|
+
? analysisResult.description
|
|
500
|
+
: 'No description'}
|
|
510
501
|
</div>
|
|
511
502
|
</div>
|
|
512
503
|
<div className="data-space__viewer__content">
|
|
@@ -569,7 +560,6 @@ export const DataSpaceViewer = observer(
|
|
|
569
560
|
<div className="data-space__viewer__main-panel__content data-space__viewer__support-info">
|
|
570
561
|
<DataSpaceSupportInfoViewerInner
|
|
571
562
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
572
|
-
dataSpaceSupportInfo={dataSpace.supportInfo}
|
|
573
563
|
/>
|
|
574
564
|
</div>
|
|
575
565
|
)}
|
|
@@ -16,19 +16,37 @@
|
|
|
16
16
|
|
|
17
17
|
import packageJson from '../../../package.json';
|
|
18
18
|
import {
|
|
19
|
-
|
|
19
|
+
type QueryEditorStore,
|
|
20
|
+
type QueryEditorHeaderLabeler,
|
|
20
21
|
type QuerySetupOptionRendererConfiguration,
|
|
21
22
|
type QuerySetupRenderer,
|
|
22
23
|
type QuerySetupState,
|
|
23
24
|
type QuerySetupStore,
|
|
24
|
-
|
|
25
|
+
LegendQueryApplicationPlugin,
|
|
26
|
+
} from '@finos/legend-application-query';
|
|
25
27
|
import { SquareIcon } from '@finos/legend-art';
|
|
26
28
|
import { DataSpaceQuerySetupState } from '../../stores/query/DataSpaceQuerySetupState.js';
|
|
27
29
|
import { DataspaceQuerySetup } from './DataSpaceQuerySetup.js';
|
|
30
|
+
import type { ApplicationPageEntry } from '@finos/legend-application';
|
|
31
|
+
import { DATA_SPACE_QUERY_EDITOR_ROUTE_PATTERN } from '../../stores/query/DSLDataSpace_LegendQueryRouter.js';
|
|
32
|
+
import { DataSpaceQueryEditor } from './DataSpaceQueryEditor.js';
|
|
33
|
+
import { DataSpaceQueryEditorStore } from '../../stores/query/DataSpaceQueryEditorStore.js';
|
|
34
|
+
import { extractElementNameFromPath } from '@finos/legend-graph';
|
|
28
35
|
|
|
29
|
-
export class
|
|
36
|
+
export class DSLDataSpace_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
|
|
30
37
|
constructor() {
|
|
31
|
-
super(packageJson.extensions.
|
|
38
|
+
super(packageJson.extensions.queryApplicationPlugin, packageJson.version);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override getExtraApplicationPageEntries(): ApplicationPageEntry[] {
|
|
42
|
+
return [
|
|
43
|
+
// data space query editor
|
|
44
|
+
{
|
|
45
|
+
key: 'data-space-query-editor-application-page',
|
|
46
|
+
urlPatterns: [DATA_SPACE_QUERY_EDITOR_ROUTE_PATTERN],
|
|
47
|
+
renderer: DataSpaceQueryEditor,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
override getExtraQuerySetupOptionRendererConfigurations(): QuerySetupOptionRendererConfiguration[] {
|
|
@@ -68,4 +86,23 @@ export class DSLDataSpace_LegendQueryPlugin extends LegendQueryPlugin {
|
|
|
68
86
|
},
|
|
69
87
|
];
|
|
70
88
|
}
|
|
89
|
+
|
|
90
|
+
override getExtraQueryEditorHeaderLabelers(): QueryEditorHeaderLabeler[] {
|
|
91
|
+
return [
|
|
92
|
+
(editorStore: QueryEditorStore): React.ReactNode | undefined => {
|
|
93
|
+
if (editorStore instanceof DataSpaceQueryEditorStore) {
|
|
94
|
+
return (
|
|
95
|
+
<div className="query-editor__header__label">
|
|
96
|
+
<SquareIcon className="query-editor__header__label__icon icon--data-space" />
|
|
97
|
+
{extractElementNameFromPath(editorStore.dataSpacePath)}
|
|
98
|
+
<div className="query-editor__header__label__tag">
|
|
99
|
+
{editorStore.executionContext}
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
}
|
|
71
108
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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 { getQueryParameters } from '@finos/legend-shared';
|
|
19
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
20
|
+
import {
|
|
21
|
+
parseGAVCoordinates,
|
|
22
|
+
useDepotServerClient,
|
|
23
|
+
} from '@finos/legend-server-depot';
|
|
24
|
+
import {
|
|
25
|
+
LEGEND_QUERY_PATH_PARAM_TOKEN,
|
|
26
|
+
LEGEND_QUERY_QUERY_PARAM_TOKEN,
|
|
27
|
+
QueryEditor,
|
|
28
|
+
QueryEditorStoreContext,
|
|
29
|
+
useLegendQueryApplicationStore,
|
|
30
|
+
useLegendQueryBaseStore,
|
|
31
|
+
} from '@finos/legend-application-query';
|
|
32
|
+
import { useParams } from 'react-router';
|
|
33
|
+
import { DataSpaceQueryEditorStore } from '../../stores/query/DataSpaceQueryEditorStore.js';
|
|
34
|
+
import {
|
|
35
|
+
type DataSpaceQueryEditorPathParams,
|
|
36
|
+
type DataSpaceQueryEditorQueryParams,
|
|
37
|
+
DATA_SPACE_QUERY_EDITOR_PATH_PARAM_TOKEN,
|
|
38
|
+
} from '../../stores/query/DSLDataSpace_LegendQueryRouter.js';
|
|
39
|
+
|
|
40
|
+
const DataSpaceQueryEditorStoreProvider: React.FC<{
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
gav: string;
|
|
43
|
+
dataSpacePath: string;
|
|
44
|
+
executionContext: string;
|
|
45
|
+
runtimePath: string | undefined;
|
|
46
|
+
classPath: string | undefined;
|
|
47
|
+
}> = ({
|
|
48
|
+
children,
|
|
49
|
+
gav,
|
|
50
|
+
dataSpacePath,
|
|
51
|
+
executionContext,
|
|
52
|
+
runtimePath,
|
|
53
|
+
classPath,
|
|
54
|
+
}) => {
|
|
55
|
+
const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
|
|
56
|
+
const applicationStore = useLegendQueryApplicationStore();
|
|
57
|
+
const depotServerClient = useDepotServerClient();
|
|
58
|
+
const baseStore = useLegendQueryBaseStore();
|
|
59
|
+
const store = useLocalObservable(
|
|
60
|
+
() =>
|
|
61
|
+
new DataSpaceQueryEditorStore(
|
|
62
|
+
applicationStore,
|
|
63
|
+
depotServerClient,
|
|
64
|
+
baseStore.pluginManager,
|
|
65
|
+
groupId,
|
|
66
|
+
artifactId,
|
|
67
|
+
versionId,
|
|
68
|
+
dataSpacePath,
|
|
69
|
+
executionContext,
|
|
70
|
+
runtimePath,
|
|
71
|
+
classPath,
|
|
72
|
+
),
|
|
73
|
+
);
|
|
74
|
+
return (
|
|
75
|
+
<QueryEditorStoreContext.Provider value={store}>
|
|
76
|
+
{children}
|
|
77
|
+
</QueryEditorStoreContext.Provider>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const DataSpaceQueryEditor = observer(() => {
|
|
82
|
+
const applicationStore = useApplicationStore();
|
|
83
|
+
const params = useParams<DataSpaceQueryEditorPathParams>();
|
|
84
|
+
const gav = params[LEGEND_QUERY_PATH_PARAM_TOKEN.GAV];
|
|
85
|
+
const dataSpacePath =
|
|
86
|
+
params[DATA_SPACE_QUERY_EDITOR_PATH_PARAM_TOKEN.DATA_SPACE_PATH];
|
|
87
|
+
const executionContext =
|
|
88
|
+
params[DATA_SPACE_QUERY_EDITOR_PATH_PARAM_TOKEN.EXECUTION_CONTEXT];
|
|
89
|
+
const runtimePath = params[LEGEND_QUERY_PATH_PARAM_TOKEN.RUNTIME_PATH];
|
|
90
|
+
const classPath = getQueryParameters<DataSpaceQueryEditorQueryParams>(
|
|
91
|
+
applicationStore.navigator.getCurrentLocation(),
|
|
92
|
+
true,
|
|
93
|
+
)[LEGEND_QUERY_QUERY_PARAM_TOKEN.CLASS_PATH];
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<DataSpaceQueryEditorStoreProvider
|
|
97
|
+
gav={gav}
|
|
98
|
+
dataSpacePath={dataSpacePath}
|
|
99
|
+
executionContext={executionContext}
|
|
100
|
+
runtimePath={runtimePath}
|
|
101
|
+
classPath={classPath}
|
|
102
|
+
>
|
|
103
|
+
<QueryEditor />
|
|
104
|
+
</DataSpaceQueryEditorStoreProvider>
|
|
105
|
+
);
|
|
106
|
+
});
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
CustomSelectorInput,
|
|
28
28
|
SearchIcon,
|
|
29
29
|
} from '@finos/legend-art';
|
|
30
|
-
import { useQuerySetupStore
|
|
30
|
+
import { useQuerySetupStore } from '@finos/legend-application-query';
|
|
31
31
|
import { generateGAVCoordinates } from '@finos/legend-server-depot';
|
|
32
32
|
import { debounce } from '@finos/legend-shared';
|
|
33
33
|
import { flowResult } from 'mobx';
|
|
@@ -50,7 +50,6 @@ export const DataspaceQuerySetup = observer(
|
|
|
50
50
|
const { querySetupState } = props;
|
|
51
51
|
const applicationStore = useApplicationStore();
|
|
52
52
|
const setupStore = useQuerySetupStore();
|
|
53
|
-
const queryStore = useLegendQueryStore();
|
|
54
53
|
const dataSpaceSearchRef = useRef<SelectComponent>(null);
|
|
55
54
|
const [searchText, setSearchText] = useState('');
|
|
56
55
|
|
|
@@ -73,7 +72,6 @@ export const DataspaceQuerySetup = observer(
|
|
|
73
72
|
const back = (): void => {
|
|
74
73
|
setupStore.setSetupState(undefined);
|
|
75
74
|
querySetupState.setCurrentDataSpace(undefined);
|
|
76
|
-
queryStore.graphManagerState.resetGraph();
|
|
77
75
|
};
|
|
78
76
|
|
|
79
77
|
// query
|
|
@@ -84,7 +82,6 @@ export const DataspaceQuerySetup = observer(
|
|
|
84
82
|
: null;
|
|
85
83
|
const onDataSpaceOptionChange = (option: DataSpaceOption | null): void => {
|
|
86
84
|
if (option?.value !== querySetupState.currentDataSpace) {
|
|
87
|
-
queryStore.graphManagerState.resetGraph();
|
|
88
85
|
querySetupState.setCurrentDataSpace(option?.value);
|
|
89
86
|
querySetupState.setDataSpaceViewerState(undefined);
|
|
90
87
|
}
|
|
@@ -133,7 +130,7 @@ export const DataspaceQuerySetup = observer(
|
|
|
133
130
|
useEffect(() => {
|
|
134
131
|
if (querySetupState.currentDataSpace) {
|
|
135
132
|
flowResult(
|
|
136
|
-
querySetupState.
|
|
133
|
+
querySetupState.loadDataSpace(querySetupState.currentDataSpace),
|
|
137
134
|
).catch(applicationStore.alertUnhandledError);
|
|
138
135
|
}
|
|
139
136
|
}, [querySetupState, applicationStore, querySetupState.currentDataSpace]);
|
|
@@ -202,40 +199,34 @@ export const DataspaceQuerySetup = observer(
|
|
|
202
199
|
</div>
|
|
203
200
|
<div className="query-setup__data-space__view">
|
|
204
201
|
<PanelLoadingIndicator
|
|
205
|
-
isLoading={querySetupState.
|
|
202
|
+
isLoading={querySetupState.loadDataSpaceState.isInProgress}
|
|
206
203
|
/>
|
|
207
204
|
{querySetupState.dataSpaceViewerState && (
|
|
208
205
|
<DataSpaceViewer
|
|
209
206
|
dataSpaceViewerState={querySetupState.dataSpaceViewerState}
|
|
210
207
|
/>
|
|
211
208
|
)}
|
|
212
|
-
{!querySetupState.dataSpaceViewerState &&
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
querySetupState.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
<BlankPanelContent>
|
|
229
|
-
<div className="query-setup__data-space__view--failed">
|
|
230
|
-
<div className="query-setup__data-space__view--failed__icon">
|
|
231
|
-
<TimesCircleIcon />
|
|
209
|
+
{!querySetupState.dataSpaceViewerState && (
|
|
210
|
+
<>
|
|
211
|
+
{querySetupState.loadDataSpaceState.isInProgress && (
|
|
212
|
+
<BlankPanelContent>
|
|
213
|
+
{querySetupState.loadDataSpaceState.message}
|
|
214
|
+
</BlankPanelContent>
|
|
215
|
+
)}
|
|
216
|
+
{querySetupState.loadDataSpaceState.hasFailed && (
|
|
217
|
+
<BlankPanelContent>
|
|
218
|
+
<div className="query-setup__data-space__view--failed">
|
|
219
|
+
<div className="query-setup__data-space__view--failed__icon">
|
|
220
|
+
<TimesCircleIcon />
|
|
221
|
+
</div>
|
|
222
|
+
<div className="query-setup__data-space__view--failed__text">
|
|
223
|
+
Can't load data space
|
|
224
|
+
</div>
|
|
232
225
|
</div>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
</BlankPanelContent>
|
|
238
|
-
)}
|
|
226
|
+
</BlankPanelContent>
|
|
227
|
+
)}
|
|
228
|
+
</>
|
|
229
|
+
)}
|
|
239
230
|
</div>
|
|
240
231
|
</div>
|
|
241
232
|
</div>
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
type ElementTypeGetter,
|
|
21
21
|
type ElementProjectExplorerDnDTypeGetter,
|
|
22
22
|
type ElementIconGetter,
|
|
23
|
-
type
|
|
23
|
+
type DSL_LegendStudioApplicationPlugin_Extension,
|
|
24
24
|
type NewElementState,
|
|
25
25
|
type ElementEditorStateCreator,
|
|
26
26
|
type EditorStore,
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
type PureGrammarTextSuggestion,
|
|
32
32
|
type PureGrammarParserElementSnippetSuggestionsGetter,
|
|
33
33
|
UnsupportedElementEditorState,
|
|
34
|
-
|
|
35
|
-
} from '@finos/legend-studio';
|
|
34
|
+
LegendStudioApplicationPlugin,
|
|
35
|
+
} from '@finos/legend-application-studio';
|
|
36
36
|
import { SquareIcon } from '@finos/legend-art';
|
|
37
37
|
import {
|
|
38
38
|
PackageableElementExplicitReference,
|
|
@@ -43,25 +43,25 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
DataSpace,
|
|
45
45
|
DataSpaceExecutionContext,
|
|
46
|
-
} from '../../
|
|
46
|
+
} from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace.js';
|
|
47
47
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY } from './DSLDataSpace_LegendStudioDocumentation.js';
|
|
48
48
|
import {
|
|
49
49
|
PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
|
|
50
50
|
PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
|
|
51
51
|
} from '../../graphManager/DSLDataSpace_PureGraphManagerPlugin.js';
|
|
52
52
|
import { SIMPLE_DATA_SPACE_SNIPPET } from './DSLDataSpace_CodeSnippets.js';
|
|
53
|
-
import type {
|
|
53
|
+
import type { DocumentationEntry } from '@finos/legend-application';
|
|
54
54
|
|
|
55
55
|
const DATA_SPACE_ELEMENT_TYPE = 'DATA SPACE';
|
|
56
56
|
const DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE =
|
|
57
57
|
'PROJECT_EXPLORER_DATA_SPACE';
|
|
58
58
|
|
|
59
|
-
export class
|
|
60
|
-
extends
|
|
61
|
-
implements
|
|
59
|
+
export class DSLDataSpace_LegendStudioApplicationPlugin
|
|
60
|
+
extends LegendStudioApplicationPlugin
|
|
61
|
+
implements DSL_LegendStudioApplicationPlugin_Extension
|
|
62
62
|
{
|
|
63
63
|
constructor() {
|
|
64
|
-
super(packageJson.extensions.
|
|
64
|
+
super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
override getExtraRequiredDocumentationKeys(): string[] {
|
|
@@ -162,7 +162,7 @@ export class DSLDataSpace_LegendStudioPlugin
|
|
|
162
162
|
editorStore: EditorStore,
|
|
163
163
|
parserKeyword: string,
|
|
164
164
|
elementKeyword: string,
|
|
165
|
-
):
|
|
165
|
+
): DocumentationEntry | undefined => {
|
|
166
166
|
if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
|
|
167
167
|
if (elementKeyword === PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL) {
|
|
168
168
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
@@ -180,7 +180,7 @@ export class DSLDataSpace_LegendStudioPlugin
|
|
|
180
180
|
(
|
|
181
181
|
editorStore: EditorStore,
|
|
182
182
|
parserKeyword: string,
|
|
183
|
-
):
|
|
183
|
+
): DocumentationEntry | undefined => {
|
|
184
184
|
if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
|
|
185
185
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
186
186
|
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|