@finos/legend-extension-dsl-data-space 0.0.6 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/lib/DSLDataSpace_Extension.d.ts +0 -5
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +0 -12
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/{studio/DataSpaceEditor.d.ts → DataSpaceViewer.d.ts} +5 -2
- package/lib/components/DataSpaceViewer.d.ts.map +1 -0
- package/lib/components/DataSpaceViewer.js +186 -0
- package/lib/components/DataSpaceViewer.js.map +1 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts +24 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +1 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js +51 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts +22 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.js +95 -0
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.d.ts → DSLDataSpace_LegendStudioPlugin.d.ts} +5 -6
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.js → DSLDataSpace_LegendStudioPlugin.js} +7 -18
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -0
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js +1 -1
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +39 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +110 -8
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +1 -1
- package/lib/stores/DataSpaceViewerState.d.ts +59 -0
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerState.js +137 -0
- package/lib/stores/DataSpaceViewerState.js.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +49 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.js +129 -0
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -0
- package/package.json +26 -21
- package/src/DSLDataSpace_Extension.ts +0 -15
- package/src/components/DataSpaceViewer.tsx +598 -0
- package/src/components/query/DSLDataSpace_LegendQueryPlugin.tsx +76 -0
- package/src/components/query/DataSpaceQuerySetup.tsx +234 -0
- package/src/components/studio/{DSLDataSpace_StudioPlugin.tsx → DSLDataSpace_LegendStudioPlugin.tsx} +17 -27
- package/src/graph/DSLDataSpace_PureGraphPlugin.ts +1 -1
- package/src/index.ts +12 -0
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +192 -6
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts +1 -1
- package/src/stores/DataSpaceViewerState.ts +202 -0
- package/src/stores/query/DataSpaceQuerySetupState.ts +235 -0
- package/tsconfig.json +7 -3
- package/tsconfig.package.json +1 -0
- package/lib/components/studio/DSLDataSpace_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.js.map +0 -1
- package/lib/components/studio/DataSpaceEditor.d.ts.map +0 -1
- package/lib/components/studio/DataSpaceEditor.js +0 -98
- package/lib/components/studio/DataSpaceEditor.js.map +0 -1
- package/lib/stores/studio/DataSpaceEditorState.d.ts +0 -42
- package/lib/stores/studio/DataSpaceEditorState.d.ts.map +0 -1
- package/lib/stores/studio/DataSpaceEditorState.js +0 -76
- package/lib/stores/studio/DataSpaceEditorState.js.map +0 -1
- package/src/components/studio/DataSpaceEditor.tsx +0 -272
- package/src/stores/studio/DataSpaceEditorState.ts +0 -108
|
@@ -0,0 +1,137 @@
|
|
|
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 { Diagram, DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram';
|
|
17
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
18
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
|
19
|
+
export var DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
20
|
+
(function (DATA_SPACE_VIEWER_ACTIVITY_MODE) {
|
|
21
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS_OVERVIEW"] = "MODELS_OVERVIEW";
|
|
22
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION"] = "EXECUTION";
|
|
23
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["ENTITLEMENT"] = "ENTITLEMENT";
|
|
24
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["TEST_DATA"] = "TEST_DATA";
|
|
25
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["TEST_COVERAGE"] = "TEST_COVERAGE";
|
|
26
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["TAGS"] = "TAGS";
|
|
27
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE["SUPPORT"] = "SUPPORT";
|
|
28
|
+
})(DATA_SPACE_VIEWER_ACTIVITY_MODE || (DATA_SPACE_VIEWER_ACTIVITY_MODE = {}));
|
|
29
|
+
export class DataSpaceViewerState {
|
|
30
|
+
graphManagerState;
|
|
31
|
+
dataSpaceGroupId;
|
|
32
|
+
dataSpaceArtifactId;
|
|
33
|
+
dataSpaceVersionId;
|
|
34
|
+
dataSpace;
|
|
35
|
+
_renderer;
|
|
36
|
+
currentDiagram;
|
|
37
|
+
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_OVERVIEW;
|
|
38
|
+
currentExecutionContext;
|
|
39
|
+
currentRuntime;
|
|
40
|
+
viewProject;
|
|
41
|
+
onDiagramClassDoubleClick;
|
|
42
|
+
constructor(graphManagerState, dataSpaceGroupId, dataSpaceArtifactId, dataSpaceVersionId, dataSpace, options) {
|
|
43
|
+
makeObservable(this, {
|
|
44
|
+
_renderer: observable,
|
|
45
|
+
currentDiagram: observable,
|
|
46
|
+
currentActivity: observable,
|
|
47
|
+
currentExecutionContext: observable,
|
|
48
|
+
currentRuntime: observable,
|
|
49
|
+
renderer: computed,
|
|
50
|
+
setRenderer: action,
|
|
51
|
+
setCurrentDiagram: action,
|
|
52
|
+
setCurrentActivity: action,
|
|
53
|
+
setCurrentExecutionContext: action,
|
|
54
|
+
setCurrentRuntime: action,
|
|
55
|
+
});
|
|
56
|
+
this.graphManagerState = graphManagerState;
|
|
57
|
+
this.dataSpace = dataSpace;
|
|
58
|
+
this.dataSpaceGroupId = dataSpaceGroupId;
|
|
59
|
+
this.dataSpaceArtifactId = dataSpaceArtifactId;
|
|
60
|
+
this.dataSpaceVersionId = dataSpaceVersionId;
|
|
61
|
+
this.currentExecutionContext = this.dataSpace.defaultExecutionContext;
|
|
62
|
+
this.currentRuntime =
|
|
63
|
+
this.dataSpace.defaultExecutionContext.defaultRuntime.value;
|
|
64
|
+
this.currentDiagram = this.dataSpace.featuredDiagrams.length
|
|
65
|
+
? this.dataSpace
|
|
66
|
+
.featuredDiagrams[0].value
|
|
67
|
+
: this.diagrams.length
|
|
68
|
+
? this.diagrams[0]
|
|
69
|
+
: undefined;
|
|
70
|
+
this.viewProject = options?.viewProject;
|
|
71
|
+
this.onDiagramClassDoubleClick = options?.onDiagramClassDoubleClick;
|
|
72
|
+
}
|
|
73
|
+
get renderer() {
|
|
74
|
+
return guaranteeNonNullable(this._renderer, `Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)`);
|
|
75
|
+
}
|
|
76
|
+
get isDiagramRendererInitialized() {
|
|
77
|
+
return Boolean(this._renderer);
|
|
78
|
+
}
|
|
79
|
+
get featuredDiagrams() {
|
|
80
|
+
return this.dataSpace.featuredDiagrams.map((ref) => ref.value);
|
|
81
|
+
}
|
|
82
|
+
get diagrams() {
|
|
83
|
+
return this.graphManagerState.graph
|
|
84
|
+
.getExtensionElements(Diagram)
|
|
85
|
+
.concat(this.graphManagerState.graph.dependencyManager.getExtensionElements(Diagram));
|
|
86
|
+
}
|
|
87
|
+
get runtimes() {
|
|
88
|
+
return this.graphManagerState.graph.ownRuntimes
|
|
89
|
+
.concat(this.graphManagerState.graph.dependencyManager.runtimes)
|
|
90
|
+
.filter((runtime) => runtime.runtimeValue.mappings
|
|
91
|
+
.map((mapping) => mapping.value)
|
|
92
|
+
.includes(this.currentExecutionContext.mapping.value));
|
|
93
|
+
}
|
|
94
|
+
// NOTE: we have tried to use React to control the cursor and
|
|
95
|
+
// could not overcome the jank/lag problem, so we settle with CSS-based approach
|
|
96
|
+
// See https://css-tricks.com/using-css-cursors/
|
|
97
|
+
// See https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
|
|
98
|
+
get diagramCursorClass() {
|
|
99
|
+
if (!this.isDiagramRendererInitialized) {
|
|
100
|
+
return '';
|
|
101
|
+
}
|
|
102
|
+
if (this.renderer.middleClick || this.renderer.rightClick) {
|
|
103
|
+
return 'diagram-editor__cursor--grabbing';
|
|
104
|
+
}
|
|
105
|
+
switch (this.renderer.interactionMode) {
|
|
106
|
+
case DIAGRAM_INTERACTION_MODE.LAYOUT: {
|
|
107
|
+
if (this.renderer.mouseOverClassView) {
|
|
108
|
+
return 'diagram-editor__cursor--pointer';
|
|
109
|
+
}
|
|
110
|
+
return '';
|
|
111
|
+
}
|
|
112
|
+
default:
|
|
113
|
+
return '';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
setRenderer(val) {
|
|
117
|
+
this._renderer = val;
|
|
118
|
+
}
|
|
119
|
+
setCurrentDiagram(val) {
|
|
120
|
+
this.currentDiagram = val;
|
|
121
|
+
}
|
|
122
|
+
setCurrentActivity(val) {
|
|
123
|
+
this.currentActivity = val;
|
|
124
|
+
}
|
|
125
|
+
setCurrentExecutionContext(val) {
|
|
126
|
+
this.currentExecutionContext = val;
|
|
127
|
+
this.currentRuntime = val.defaultRuntime.value;
|
|
128
|
+
}
|
|
129
|
+
setCurrentRuntime(val) {
|
|
130
|
+
this.currentRuntime = val;
|
|
131
|
+
}
|
|
132
|
+
setupRenderer() {
|
|
133
|
+
this.renderer.setIsReadOnly(true);
|
|
134
|
+
this.renderer.onClassViewDoubleClick = (classView) => this.onDiagramClassDoubleClick?.(classView);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=DataSpaceViewerState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataSpaceViewerState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,OAAO,EACP,wBAAwB,GACzB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAMpE,MAAM,CAAN,IAAY,+BAQX;AARD,WAAY,+BAA+B;IACzC,sEAAmC,CAAA;IACnC,0DAAuB,CAAA;IACvB,8DAA2B,CAAA;IAC3B,0DAAuB,CAAA;IACvB,kEAA+B,CAAA;IAC/B,gDAAa,CAAA;IACb,sDAAmB,CAAA;AACrB,CAAC,EARW,+BAA+B,KAA/B,+BAA+B,QAQ1C;AAED,MAAM,OAAO,oBAAoB;IAC/B,iBAAiB,CAAoB;IACrC,gBAAgB,CAAS;IACzB,mBAAmB,CAAS;IAC5B,kBAAkB,CAAS;IAC3B,SAAS,CAAoB;IAC7B,SAAS,CAA+B;IACxC,cAAc,CAAuB;IACrC,eAAe,GAAG,+BAA+B,CAAC,eAAe,CAAC;IAClE,uBAAuB,CAAoC;IAC3D,cAAc,CAAqB;IACnC,WAAW,CAOG;IACd,yBAAyB,CAAgD;IAEzE,YACE,iBAAoC,EACpC,gBAAwB,EACxB,mBAA2B,EAC3B,kBAA0B,EAC1B,SAA4B,EAC5B,OAQC;QAED,cAAc,CAAC,IAAI,EAAE;YACnB,SAAS,EAAE,UAAU;YACrB,cAAc,EAAE,UAAU;YAC1B,eAAe,EAAE,UAAU;YAC3B,uBAAuB,EAAE,UAAU;YAC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E,OAAO,EAAE,CAAC;SACb;IACH,CAAC;IAED,WAAW,CAAC,GAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;IAED,iBAAiB,CAAC,GAAY;QAC5B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;IAC5B,CAAC;IAED,kBAAkB,CAAC,GAAoC;QACrD,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;IAC7B,CAAC;IAED,0BAA0B,CAAC,GAAsC;QAC/D,IAAI,CAAC,uBAAuB,GAAG,GAAG,CAAC;QACnC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC;IACjD,CAAC;IAED,iBAAiB,CAAC,GAAuB;QACvC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;IAC5B,CAAC;IAED,aAAa;QACX,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,sBAAsB,GAAG,CAAC,SAAoB,EAAQ,EAAE,CACpE,IAAI,CAAC,yBAAyB,EAAE,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { Class } from '@finos/legend-graph';
|
|
17
|
+
import type { Entity } from '@finos/legend-model-storage';
|
|
18
|
+
import type { QuerySetupStore } from '@finos/legend-query';
|
|
19
|
+
import { QuerySetupState } from '@finos/legend-query';
|
|
20
|
+
import type { GeneratorFn } from '@finos/legend-shared';
|
|
21
|
+
import { ActionState } from '@finos/legend-shared';
|
|
22
|
+
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
23
|
+
export declare type LightDataSpace = Entity & {
|
|
24
|
+
groupId: string;
|
|
25
|
+
artifactId: string;
|
|
26
|
+
versionId: string;
|
|
27
|
+
path: string;
|
|
28
|
+
content: {
|
|
29
|
+
groupId: string;
|
|
30
|
+
artifactId: string;
|
|
31
|
+
versionId: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare class DataSpaceQuerySetupState extends QuerySetupState {
|
|
35
|
+
dataSpaces: LightDataSpace[];
|
|
36
|
+
loadDataSpacesState: ActionState;
|
|
37
|
+
setUpDataSpaceState: ActionState;
|
|
38
|
+
currentDataSpace?: LightDataSpace | undefined;
|
|
39
|
+
dataSpaceViewerState?: DataSpaceViewerState | undefined;
|
|
40
|
+
toGetSnapShot: boolean;
|
|
41
|
+
constructor(setupStore: QuerySetupStore);
|
|
42
|
+
setCurrentDataSpace(val: LightDataSpace | undefined): void;
|
|
43
|
+
setDataSpaceViewerState(val: DataSpaceViewerState | undefined): void;
|
|
44
|
+
setToGetSnapShot(val: boolean): void;
|
|
45
|
+
loadDataSpaces(searchText: string): GeneratorFn<void>;
|
|
46
|
+
setUpDataSpace(dataSpace: LightDataSpace): GeneratorFn<void>;
|
|
47
|
+
proceedToCreateQuery(_class?: Class): GeneratorFn<void>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=DataSpaceQuerySetupState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataSpaceQuerySetupState.d.ts","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[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,cAAc,CAAC,SAAS,EAAE,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC;IAuD5D,oBAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC;CA+BzD"}
|
|
@@ -0,0 +1,129 @@
|
|
|
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 { CreateQueryInfoState, QuerySetupState, generateCreateQueryRoute, } from '@finos/legend-query';
|
|
17
|
+
import { DepotScope, ProjectData, SNAPSHOT_VERSION_ALIAS, } from '@finos/legend-server-depot';
|
|
18
|
+
import { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
19
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
20
|
+
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH, getResolvedDataSpace, } from '../../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
21
|
+
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
22
|
+
export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
23
|
+
dataSpaces = [];
|
|
24
|
+
loadDataSpacesState = ActionState.create();
|
|
25
|
+
setUpDataSpaceState = ActionState.create();
|
|
26
|
+
currentDataSpace;
|
|
27
|
+
dataSpaceViewerState;
|
|
28
|
+
toGetSnapShot = false;
|
|
29
|
+
constructor(setupStore) {
|
|
30
|
+
super(setupStore);
|
|
31
|
+
makeObservable(this, {
|
|
32
|
+
dataSpaces: observable,
|
|
33
|
+
currentDataSpace: observable.ref,
|
|
34
|
+
dataSpaceViewerState: observable,
|
|
35
|
+
toGetSnapShot: observable,
|
|
36
|
+
setCurrentDataSpace: action,
|
|
37
|
+
setDataSpaceViewerState: action,
|
|
38
|
+
setToGetSnapShot: action,
|
|
39
|
+
loadDataSpaces: flow,
|
|
40
|
+
setUpDataSpace: flow,
|
|
41
|
+
proceedToCreateQuery: flow,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
setCurrentDataSpace(val) {
|
|
45
|
+
this.currentDataSpace = val;
|
|
46
|
+
}
|
|
47
|
+
setDataSpaceViewerState(val) {
|
|
48
|
+
this.dataSpaceViewerState = val;
|
|
49
|
+
}
|
|
50
|
+
setToGetSnapShot(val) {
|
|
51
|
+
this.toGetSnapShot = val;
|
|
52
|
+
}
|
|
53
|
+
*loadDataSpaces(searchText) {
|
|
54
|
+
if (this.queryStore.initState.isInInitialState) {
|
|
55
|
+
yield flowResult(this.queryStore.initialize());
|
|
56
|
+
}
|
|
57
|
+
else if (this.queryStore.initState.isInProgress) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const isValidSearchString = searchText.length >= 3;
|
|
61
|
+
this.loadDataSpacesState.inProgress();
|
|
62
|
+
try {
|
|
63
|
+
this.dataSpaces = (yield this.queryStore.depotServerClient.getEntitiesByClassifierPath(DATA_SPACE_ELEMENT_CLASSIFIER_PATH, {
|
|
64
|
+
search: isValidSearchString ? searchText : undefined,
|
|
65
|
+
scope: this.toGetSnapShot
|
|
66
|
+
? DepotScope.SNAPSHOT
|
|
67
|
+
: DepotScope.RELEASES,
|
|
68
|
+
limit: 10,
|
|
69
|
+
})).map((storedEntity) => ({
|
|
70
|
+
...storedEntity.entity,
|
|
71
|
+
groupId: storedEntity.groupId,
|
|
72
|
+
artifactId: storedEntity.artifactId,
|
|
73
|
+
versionId: this.toGetSnapShot
|
|
74
|
+
? SNAPSHOT_VERSION_ALIAS
|
|
75
|
+
: storedEntity.versionId,
|
|
76
|
+
path: storedEntity.entity.path,
|
|
77
|
+
content: {
|
|
78
|
+
...storedEntity.entity.content,
|
|
79
|
+
groupId: guaranteeNonNullable(storedEntity.entity.content.groupId, `Data space 'groupId' field is missing`),
|
|
80
|
+
artifactId: guaranteeNonNullable(storedEntity.entity.content.artifactId, `Data space 'artifactId' field is missing`),
|
|
81
|
+
versionId: guaranteeNonNullable(storedEntity.entity.content.versionId, `Data space 'versionId' field is missing`),
|
|
82
|
+
},
|
|
83
|
+
}));
|
|
84
|
+
this.loadDataSpacesState.pass();
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
assertErrorThrown(error);
|
|
88
|
+
this.loadDataSpacesState.fail();
|
|
89
|
+
this.queryStore.applicationStore.notifyError(error);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
*setUpDataSpace(dataSpace) {
|
|
93
|
+
if (this.queryStore.initState.isInInitialState) {
|
|
94
|
+
yield flowResult(this.queryStore.initialize());
|
|
95
|
+
}
|
|
96
|
+
else if (this.queryStore.initState.isInProgress) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.setUpDataSpaceState.inProgress();
|
|
100
|
+
try {
|
|
101
|
+
const projectData = ProjectData.serialization.fromJson((yield flowResult(this.queryStore.depotServerClient.getProject(dataSpace.content.groupId, dataSpace.content.artifactId))));
|
|
102
|
+
yield flowResult(this.queryStore.buildGraph(projectData, dataSpace.content.versionId));
|
|
103
|
+
const resolvedDataSpace = getResolvedDataSpace(dataSpace.content, this.queryStore.graphManagerState.graph);
|
|
104
|
+
this.dataSpaceViewerState = new DataSpaceViewerState(this.queryStore.graphManagerState, dataSpace.groupId, dataSpace.artifactId, dataSpace.versionId, resolvedDataSpace, {
|
|
105
|
+
viewProject: (groupId, artifactId, versionId, entityPath) => this.queryStore.viewStudioProject(groupId, artifactId, versionId, entityPath),
|
|
106
|
+
onDiagramClassDoubleClick: (classView) => {
|
|
107
|
+
this.proceedToCreateQuery(classView.class.value);
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
this.setUpDataSpaceState.pass();
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
assertErrorThrown(error);
|
|
114
|
+
this.setUpDataSpaceState.fail();
|
|
115
|
+
this.queryStore.applicationStore.notifyError(error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
*proceedToCreateQuery(_class) {
|
|
119
|
+
if (this.dataSpaceViewerState) {
|
|
120
|
+
const projectData = ProjectData.serialization.fromJson((yield flowResult(this.queryStore.depotServerClient.getProject(this.dataSpaceViewerState.dataSpace.groupId, this.dataSpaceViewerState.dataSpace.artifactId))));
|
|
121
|
+
const queryInfoState = new CreateQueryInfoState(this.queryStore, projectData, this.dataSpaceViewerState.dataSpace.versionId, this.dataSpaceViewerState.currentExecutionContext.mapping.value, this.dataSpaceViewerState.currentRuntime);
|
|
122
|
+
queryInfoState.class = _class;
|
|
123
|
+
this.queryStore.setQueryInfoState(queryInfoState);
|
|
124
|
+
this.queryStore.applicationStore.navigator.goTo(generateCreateQueryRoute(this.dataSpaceViewerState.dataSpace.groupId, this.dataSpaceViewerState.dataSpace.artifactId, this.dataSpaceViewerState.dataSpace.versionId, this.dataSpaceViewerState.currentExecutionContext.mapping.value.path, this.dataSpaceViewerState.currentRuntime.path));
|
|
125
|
+
this.setupStore.setSetupState(undefined);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=DataSpaceQuerySetupState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataSpaceQuerySetupState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,oBAAoB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,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,SAAS,EAC7C,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,CAAC,KAAK,EAC/D,IAAI,CAAC,oBAAoB,CAAC,cAAc,CACzC,CAAC;YACF,cAAc,CAAC,KAAK,GAAG,MAAM,CAAC;YAC9B,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAC7C,wBAAwB,CACtB,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,OAAO,EAC3C,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,UAAU,EAC9C,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,SAAS,EAC7C,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EACpE,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAC9C,CACF,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;SAC1C;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"types": "lib/index.d.ts",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && yarn build:sass && yarn build:tsc",
|
|
28
|
-
"build:sass": "cross-env INIT_CWD=$INIT_CWD
|
|
28
|
+
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
|
|
29
29
|
"build:tsc": "tsc --project ./tsconfig.build.json",
|
|
30
30
|
"clean": "rimraf \"lib\" \"build\"",
|
|
31
31
|
"dev": "npm-run-all --parallel dev:sass dev:tsc",
|
|
32
|
-
"dev:sass": "sass
|
|
32
|
+
"dev:sass": "sass style lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
|
|
33
33
|
"dev:tsc": "tsc --watch --preserveWatchOutput",
|
|
34
34
|
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
|
|
35
35
|
"publish:prepare": "node ../../scripts/release/preparePublishContent.js",
|
|
@@ -38,31 +38,36 @@
|
|
|
38
38
|
"test:watch": "jest --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@finos/legend-application": "0.
|
|
42
|
-
"@finos/legend-art": "0.
|
|
43
|
-
"@finos/legend-extension-dsl-diagram": "
|
|
44
|
-
"@finos/legend-graph": "0.
|
|
45
|
-
"@finos/legend-model-storage": "0.0.
|
|
46
|
-
"@finos/legend-
|
|
47
|
-
"@finos/legend-
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
41
|
+
"@finos/legend-application": "0.2.1",
|
|
42
|
+
"@finos/legend-art": "0.1.2",
|
|
43
|
+
"@finos/legend-extension-dsl-diagram": "1.0.1",
|
|
44
|
+
"@finos/legend-graph": "0.2.4",
|
|
45
|
+
"@finos/legend-model-storage": "0.0.9",
|
|
46
|
+
"@finos/legend-query": "0.1.4",
|
|
47
|
+
"@finos/legend-server-depot": "0.0.12",
|
|
48
|
+
"@finos/legend-shared": "0.0.9",
|
|
49
|
+
"@finos/legend-studio": "2.0.1",
|
|
50
|
+
"@types/react": "17.0.36",
|
|
51
|
+
"@types/react-router-dom": "5.3.2",
|
|
52
|
+
"mobx": "6.3.7",
|
|
53
|
+
"mobx-react-lite": "3.2.2",
|
|
54
|
+
"monaco-editor": "0.30.1",
|
|
52
55
|
"react": "17.0.2",
|
|
53
56
|
"react-dom": "17.0.2",
|
|
54
57
|
"react-resize-detector": "6.7.6",
|
|
58
|
+
"react-router": "5.2.1",
|
|
59
|
+
"react-router-dom": "5.3.0",
|
|
55
60
|
"serializr": "2.0.5"
|
|
56
61
|
},
|
|
57
62
|
"devDependencies": {
|
|
58
|
-
"@finos/legend-dev-utils": "0.
|
|
63
|
+
"@finos/legend-dev-utils": "0.2.1",
|
|
59
64
|
"cross-env": "7.0.3",
|
|
60
|
-
"eslint": "8.
|
|
61
|
-
"jest": "27.
|
|
65
|
+
"eslint": "8.3.0",
|
|
66
|
+
"jest": "27.3.1",
|
|
62
67
|
"npm-run-all": "4.1.5",
|
|
63
68
|
"rimraf": "3.0.2",
|
|
64
|
-
"sass": "1.
|
|
65
|
-
"typescript": "4.
|
|
69
|
+
"sass": "1.43.4",
|
|
70
|
+
"typescript": "4.5.2"
|
|
66
71
|
},
|
|
67
72
|
"peerDependencies": {
|
|
68
73
|
"react": "^17.0.0"
|
|
@@ -75,7 +80,7 @@
|
|
|
75
80
|
"pureProtocolProcessorPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-protocol-processor",
|
|
76
81
|
"pureGraphManagerPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-graph-manager",
|
|
77
82
|
"pureGraphPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-graph",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
83
|
+
"studioPlugin": "@finos/legend-studio-plugin-dsl-data-space",
|
|
84
|
+
"queryPlugin": "@finos/legend-query-plugin-dsl-data-space"
|
|
80
85
|
}
|
|
81
86
|
}
|
|
@@ -19,8 +19,6 @@ import { AbstractPreset } from '@finos/legend-shared';
|
|
|
19
19
|
import { DSLDataSpace_PureGraphManagerPlugin } from './graphManager/DSLDataSpace_PureGraphManagerPlugin';
|
|
20
20
|
import { DSLDataSpace_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
21
21
|
import type { GraphPluginManager } from '@finos/legend-graph';
|
|
22
|
-
import type { StudioPluginManager } from '@finos/legend-studio';
|
|
23
|
-
import { DSLDataSpace_StudioPlugin } from './components/studio/DSLDataSpace_StudioPlugin';
|
|
24
22
|
import { DSLDataSpace_PureGraphPlugin } from './graph/DSLDataSpace_PureGraphPlugin';
|
|
25
23
|
|
|
26
24
|
export class DSLDataSpace_GraphPreset extends AbstractPreset {
|
|
@@ -34,16 +32,3 @@ export class DSLDataSpace_GraphPreset extends AbstractPreset {
|
|
|
34
32
|
new DSLDataSpace_PureProtocolProcessorPlugin().install(pluginManager);
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
export class DSLDataSpace_StudioPreset extends AbstractPreset {
|
|
39
|
-
constructor() {
|
|
40
|
-
super(packageJson.extensions.studioPreset, packageJson.version);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
install(pluginManager: StudioPluginManager): void {
|
|
44
|
-
new DSLDataSpace_StudioPlugin().install(pluginManager);
|
|
45
|
-
new DSLDataSpace_PureGraphPlugin().install(pluginManager);
|
|
46
|
-
new DSLDataSpace_PureGraphManagerPlugin().install(pluginManager);
|
|
47
|
-
new DSLDataSpace_PureProtocolProcessorPlugin().install(pluginManager);
|
|
48
|
-
}
|
|
49
|
-
}
|