@finos/legend-extension-dsl-data-space 0.1.0 → 1.0.2
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 +28 -0
- package/lib/DSLDataSpace_Extension.d.ts +0 -10
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +0 -24
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/{query/DataSpaceViewer.d.ts → DataSpaceViewer.d.ts} +1 -1
- 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_QueryPlugin.d.ts → DSLDataSpace_LegendQueryPlugin.d.ts} +5 -5
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +1 -0
- package/lib/components/query/{DSLDataSpace_QueryPlugin.js → DSLDataSpace_LegendQueryPlugin.js} +4 -4
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -1
- package/lib/components/query/DataSpaceQuerySetup.js +15 -8
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.d.ts → DSLDataSpace_LegendStudioPlugin.d.ts} +5 -5
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.js → DSLDataSpace_LegendStudioPlugin.js} +6 -5
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -0
- 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 +12 -0
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +45 -2
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.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 +7 -34
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js +30 -136
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -1
- package/package.json +22 -20
- package/src/DSLDataSpace_Extension.ts +0 -30
- package/src/components/{query/DataSpaceViewer.tsx → DataSpaceViewer.tsx} +216 -121
- package/src/components/query/{DSLDataSpace_QueryPlugin.tsx → DSLDataSpace_LegendQueryPlugin.tsx} +4 -4
- package/src/components/query/DataSpaceQuerySetup.tsx +30 -5
- package/src/components/studio/{DSLDataSpace_StudioPlugin.tsx → DSLDataSpace_LegendStudioPlugin.tsx} +10 -9
- package/src/index.ts +12 -0
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +71 -0
- package/src/stores/DataSpaceViewerState.ts +202 -0
- package/src/stores/query/DataSpaceQuerySetupState.ts +70 -202
- package/tsconfig.json +5 -3
- package/tsconfig.package.json +1 -0
- package/lib/components/query/DSLDataSpace_QueryPlugin.d.ts.map +0 -1
- package/lib/components/query/DSLDataSpace_QueryPlugin.js.map +0 -1
- package/lib/components/query/DataSpaceViewer.d.ts.map +0 -1
- package/lib/components/query/DataSpaceViewer.js +0 -163
- package/lib/components/query/DataSpaceViewer.js.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.js.map +0 -1
|
@@ -13,149 +13,29 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Diagram, DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram';
|
|
17
16
|
import { CreateQueryInfoState, QuerySetupState, generateCreateQueryRoute, } from '@finos/legend-query';
|
|
18
|
-
import { ProjectData } from '@finos/legend-server-depot';
|
|
17
|
+
import { DepotScope, ProjectData, SNAPSHOT_VERSION_ALIAS, } from '@finos/legend-server-depot';
|
|
19
18
|
import { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
20
|
-
import { action,
|
|
19
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
21
20
|
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH, getResolvedDataSpace, } from '../../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
22
|
-
|
|
23
|
-
(function (DATA_SPACE_VIEWER_ACTIVITY_MODE) {
|
|
24
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["MODELS"] = "MODELS";
|
|
25
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["EXECUTION"] = "EXECUTION";
|
|
26
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["ENTITLEMENT"] = "ENTITLEMENT";
|
|
27
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE["SUPPORT"] = "SUPPORT";
|
|
28
|
-
})(DATA_SPACE_VIEWER_ACTIVITY_MODE || (DATA_SPACE_VIEWER_ACTIVITY_MODE = {}));
|
|
29
|
-
export class DataSpaceViewerState {
|
|
30
|
-
setupState;
|
|
31
|
-
dataSpace;
|
|
32
|
-
_renderer;
|
|
33
|
-
currentDiagram;
|
|
34
|
-
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS;
|
|
35
|
-
currentExecutionContext;
|
|
36
|
-
currentRuntime;
|
|
37
|
-
showOnlyFeaturedDiagrams = true;
|
|
38
|
-
constructor(setupState, dataSpace) {
|
|
39
|
-
makeObservable(this, {
|
|
40
|
-
_renderer: observable,
|
|
41
|
-
currentDiagram: observable,
|
|
42
|
-
currentActivity: observable,
|
|
43
|
-
currentExecutionContext: observable,
|
|
44
|
-
currentRuntime: observable,
|
|
45
|
-
showOnlyFeaturedDiagrams: observable,
|
|
46
|
-
renderer: computed,
|
|
47
|
-
setRenderer: action,
|
|
48
|
-
setCurrentDiagram: action,
|
|
49
|
-
setCurrentActivity: action,
|
|
50
|
-
setCurrentExecutionContext: action,
|
|
51
|
-
setCurrentRuntime: action,
|
|
52
|
-
setShowOnlyFeaturedDiagrams: action,
|
|
53
|
-
});
|
|
54
|
-
this.setupState = setupState;
|
|
55
|
-
this.dataSpace = dataSpace;
|
|
56
|
-
this.currentExecutionContext = this.dataSpace.defaultExecutionContext;
|
|
57
|
-
this.currentRuntime =
|
|
58
|
-
this.dataSpace.defaultExecutionContext.defaultRuntime.value;
|
|
59
|
-
this.currentDiagram = this.dataSpace.featuredDiagrams.length
|
|
60
|
-
? this.dataSpace.featuredDiagrams[0].value
|
|
61
|
-
: this.diagrams.length
|
|
62
|
-
? this.diagrams[0]
|
|
63
|
-
: undefined;
|
|
64
|
-
}
|
|
65
|
-
get renderer() {
|
|
66
|
-
return guaranteeNonNullable(this._renderer, `Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)`);
|
|
67
|
-
}
|
|
68
|
-
get isDiagramRendererInitialized() {
|
|
69
|
-
return Boolean(this._renderer);
|
|
70
|
-
}
|
|
71
|
-
get featuredDiagrams() {
|
|
72
|
-
return this.dataSpace.featuredDiagrams.map((ref) => ref.value);
|
|
73
|
-
}
|
|
74
|
-
get diagrams() {
|
|
75
|
-
return this.setupState.queryStore.graphManagerState.graph
|
|
76
|
-
.getExtensionElements(Diagram)
|
|
77
|
-
.concat(this.setupState.queryStore.graphManagerState.graph.dependencyManager.getExtensionElements(Diagram));
|
|
78
|
-
}
|
|
79
|
-
get runtimes() {
|
|
80
|
-
return this.setupState.queryStore.graphManagerState.graph.ownRuntimes
|
|
81
|
-
.concat(this.setupState.queryStore.graphManagerState.graph.dependencyManager
|
|
82
|
-
.runtimes)
|
|
83
|
-
.filter((runtime) => runtime.runtimeValue.mappings
|
|
84
|
-
.map((mapping) => mapping.value)
|
|
85
|
-
.includes(this.currentExecutionContext.mapping.value));
|
|
86
|
-
}
|
|
87
|
-
// NOTE: we have tried to use React to control the cursor and
|
|
88
|
-
// could not overcome the jank/lag problem, so we settle with CSS-based approach
|
|
89
|
-
// See https://css-tricks.com/using-css-cursors/
|
|
90
|
-
// See https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
|
|
91
|
-
get diagramCursorClass() {
|
|
92
|
-
if (!this.isDiagramRendererInitialized) {
|
|
93
|
-
return '';
|
|
94
|
-
}
|
|
95
|
-
if (this.renderer.middleClick || this.renderer.rightClick) {
|
|
96
|
-
return 'diagram-editor__cursor--grabbing';
|
|
97
|
-
}
|
|
98
|
-
switch (this.renderer.interactionMode) {
|
|
99
|
-
case DIAGRAM_INTERACTION_MODE.LAYOUT: {
|
|
100
|
-
if (this.renderer.mouseOverClassView) {
|
|
101
|
-
return 'diagram-editor__cursor--pointer';
|
|
102
|
-
}
|
|
103
|
-
return '';
|
|
104
|
-
}
|
|
105
|
-
default:
|
|
106
|
-
return '';
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
setRenderer(val) {
|
|
110
|
-
this._renderer = val;
|
|
111
|
-
}
|
|
112
|
-
setCurrentDiagram(val) {
|
|
113
|
-
this.currentDiagram = val;
|
|
114
|
-
}
|
|
115
|
-
setCurrentActivity(val) {
|
|
116
|
-
this.currentActivity = val;
|
|
117
|
-
}
|
|
118
|
-
setCurrentExecutionContext(val) {
|
|
119
|
-
this.currentExecutionContext = val;
|
|
120
|
-
this.currentRuntime = val.defaultRuntime.value;
|
|
121
|
-
}
|
|
122
|
-
setCurrentRuntime(val) {
|
|
123
|
-
this.currentRuntime = val;
|
|
124
|
-
}
|
|
125
|
-
setShowOnlyFeaturedDiagrams(val) {
|
|
126
|
-
this.showOnlyFeaturedDiagrams = val;
|
|
127
|
-
// if we only show featured diagrams and the current diagram is not featured
|
|
128
|
-
// either set it to the first featured diagram we can find or show nothing
|
|
129
|
-
if (val) {
|
|
130
|
-
if (this.currentDiagram &&
|
|
131
|
-
!this.featuredDiagrams.includes(this.currentDiagram)) {
|
|
132
|
-
this.currentDiagram = this.dataSpace.featuredDiagrams.length
|
|
133
|
-
? this.dataSpace.featuredDiagrams[0].value
|
|
134
|
-
: undefined;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
setupRenderer() {
|
|
139
|
-
this.renderer.setIsReadOnly(true);
|
|
140
|
-
this.renderer.onClassViewDoubleClick = (classView) => {
|
|
141
|
-
this.setupState.proceedToCreateQuery(classView.class.value);
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
21
|
+
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
145
22
|
export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
146
23
|
dataSpaces = [];
|
|
147
24
|
loadDataSpacesState = ActionState.create();
|
|
148
25
|
setUpDataSpaceState = ActionState.create();
|
|
149
26
|
currentDataSpace;
|
|
150
27
|
dataSpaceViewerState;
|
|
28
|
+
toGetSnapShot = false;
|
|
151
29
|
constructor(setupStore) {
|
|
152
30
|
super(setupStore);
|
|
153
31
|
makeObservable(this, {
|
|
154
32
|
dataSpaces: observable,
|
|
155
33
|
currentDataSpace: observable.ref,
|
|
156
34
|
dataSpaceViewerState: observable,
|
|
35
|
+
toGetSnapShot: observable,
|
|
157
36
|
setCurrentDataSpace: action,
|
|
158
37
|
setDataSpaceViewerState: action,
|
|
38
|
+
setToGetSnapShot: action,
|
|
159
39
|
loadDataSpaces: flow,
|
|
160
40
|
setUpDataSpace: flow,
|
|
161
41
|
proceedToCreateQuery: flow,
|
|
@@ -167,6 +47,9 @@ export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
|
167
47
|
setDataSpaceViewerState(val) {
|
|
168
48
|
this.dataSpaceViewerState = val;
|
|
169
49
|
}
|
|
50
|
+
setToGetSnapShot(val) {
|
|
51
|
+
this.toGetSnapShot = val;
|
|
52
|
+
}
|
|
170
53
|
*loadDataSpaces(searchText) {
|
|
171
54
|
if (this.queryStore.initState.isInInitialState) {
|
|
172
55
|
yield flowResult(this.queryStore.initialize());
|
|
@@ -179,17 +62,23 @@ export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
|
179
62
|
try {
|
|
180
63
|
this.dataSpaces = (yield this.queryStore.depotServerClient.getEntitiesByClassifierPath(DATA_SPACE_ELEMENT_CLASSIFIER_PATH, {
|
|
181
64
|
search: isValidSearchString ? searchText : undefined,
|
|
65
|
+
scope: this.toGetSnapShot
|
|
66
|
+
? DepotScope.SNAPSHOT
|
|
67
|
+
: DepotScope.RELEASES,
|
|
182
68
|
limit: 10,
|
|
183
|
-
}))
|
|
184
|
-
|
|
185
|
-
.
|
|
186
|
-
|
|
187
|
-
|
|
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,
|
|
188
77
|
content: {
|
|
189
|
-
...entity.content,
|
|
190
|
-
groupId: guaranteeNonNullable(entity.content.groupId, `Data space 'groupId' field is missing`),
|
|
191
|
-
artifactId: guaranteeNonNullable(entity.content.artifactId, `Data space 'artifactId' field is missing`),
|
|
192
|
-
versionId: guaranteeNonNullable(entity.content.versionId, `Data space 'versionId' field is missing`),
|
|
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`),
|
|
193
82
|
},
|
|
194
83
|
}));
|
|
195
84
|
this.loadDataSpacesState.pass();
|
|
@@ -212,7 +101,12 @@ export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
|
212
101
|
const projectData = ProjectData.serialization.fromJson((yield flowResult(this.queryStore.depotServerClient.getProject(dataSpace.content.groupId, dataSpace.content.artifactId))));
|
|
213
102
|
yield flowResult(this.queryStore.buildGraph(projectData, dataSpace.content.versionId));
|
|
214
103
|
const resolvedDataSpace = getResolvedDataSpace(dataSpace.content, this.queryStore.graphManagerState.graph);
|
|
215
|
-
this.dataSpaceViewerState = new DataSpaceViewerState(this, resolvedDataSpace
|
|
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
|
+
});
|
|
216
110
|
this.setUpDataSpaceState.pass();
|
|
217
111
|
}
|
|
218
112
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceQuerySetupState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"DataSpaceQuerySetupState.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,oBA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EACX,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.2",
|
|
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,33 +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.2.
|
|
45
|
-
"@finos/legend-model-storage": "0.0.
|
|
46
|
-
"@finos/legend-query": "0.1.
|
|
47
|
-
"@finos/legend-server-depot": "0.0.
|
|
48
|
-
"@finos/legend-shared": "0.0.
|
|
49
|
-
"@finos/legend-studio": "0.
|
|
50
|
-
"@types/react": "17.0.
|
|
51
|
-
"
|
|
52
|
-
"mobx
|
|
53
|
-
"
|
|
41
|
+
"@finos/legend-application": "0.2.2",
|
|
42
|
+
"@finos/legend-art": "0.1.2",
|
|
43
|
+
"@finos/legend-extension-dsl-diagram": "1.0.2",
|
|
44
|
+
"@finos/legend-graph": "0.2.5",
|
|
45
|
+
"@finos/legend-model-storage": "0.0.9",
|
|
46
|
+
"@finos/legend-query": "0.1.5",
|
|
47
|
+
"@finos/legend-server-depot": "0.0.12",
|
|
48
|
+
"@finos/legend-shared": "0.0.9",
|
|
49
|
+
"@finos/legend-studio": "2.0.2",
|
|
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",
|
|
54
55
|
"react": "17.0.2",
|
|
55
56
|
"react-dom": "17.0.2",
|
|
56
57
|
"react-resize-detector": "6.7.6",
|
|
58
|
+
"react-router": "5.2.1",
|
|
59
|
+
"react-router-dom": "5.3.0",
|
|
57
60
|
"serializr": "2.0.5"
|
|
58
61
|
},
|
|
59
62
|
"devDependencies": {
|
|
60
|
-
"@finos/legend-dev-utils": "0.1
|
|
63
|
+
"@finos/legend-dev-utils": "0.2.1",
|
|
61
64
|
"cross-env": "7.0.3",
|
|
62
|
-
"eslint": "8.
|
|
65
|
+
"eslint": "8.3.0",
|
|
63
66
|
"jest": "27.3.1",
|
|
64
67
|
"npm-run-all": "4.1.5",
|
|
65
68
|
"rimraf": "3.0.2",
|
|
66
69
|
"sass": "1.43.4",
|
|
67
|
-
"typescript": "4.
|
|
70
|
+
"typescript": "4.5.2"
|
|
68
71
|
},
|
|
69
72
|
"peerDependencies": {
|
|
70
73
|
"react": "^17.0.0"
|
|
@@ -77,7 +80,6 @@
|
|
|
77
80
|
"pureProtocolProcessorPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-protocol-processor",
|
|
78
81
|
"pureGraphManagerPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-graph-manager",
|
|
79
82
|
"pureGraphPlugin": "@finos/legend-graph-plugin-dsl-data-space-pure-graph",
|
|
80
|
-
"studioPreset": "@finos/legend-studio-preset-dsl-data-space",
|
|
81
83
|
"studioPlugin": "@finos/legend-studio-plugin-dsl-data-space",
|
|
82
84
|
"queryPlugin": "@finos/legend-query-plugin-dsl-data-space"
|
|
83
85
|
}
|
|
@@ -19,11 +19,7 @@ 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
|
-
import type { QueryPluginManager } from '@finos/legend-query';
|
|
26
|
-
import { DSLDataSpace_QueryPlugin } from './components/query/DSLDataSpace_QueryPlugin';
|
|
27
23
|
|
|
28
24
|
export class DSLDataSpace_GraphPreset extends AbstractPreset {
|
|
29
25
|
constructor() {
|
|
@@ -36,29 +32,3 @@ export class DSLDataSpace_GraphPreset extends AbstractPreset {
|
|
|
36
32
|
new DSLDataSpace_PureProtocolProcessorPlugin().install(pluginManager);
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
export class DSLDataSpace_StudioPreset extends AbstractPreset {
|
|
41
|
-
constructor() {
|
|
42
|
-
super(packageJson.extensions.studioPreset, packageJson.version);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
install(pluginManager: StudioPluginManager): void {
|
|
46
|
-
new DSLDataSpace_StudioPlugin().install(pluginManager);
|
|
47
|
-
new DSLDataSpace_PureGraphPlugin().install(pluginManager);
|
|
48
|
-
new DSLDataSpace_PureGraphManagerPlugin().install(pluginManager);
|
|
49
|
-
new DSLDataSpace_PureProtocolProcessorPlugin().install(pluginManager);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export class DSLDataSpace_QueryPreset extends AbstractPreset {
|
|
54
|
-
constructor() {
|
|
55
|
-
super(packageJson.extensions.studioPreset, packageJson.version);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
install(pluginManager: QueryPluginManager): void {
|
|
59
|
-
new DSLDataSpace_QueryPlugin().install(pluginManager);
|
|
60
|
-
new DSLDataSpace_PureGraphPlugin().install(pluginManager);
|
|
61
|
-
new DSLDataSpace_PureGraphManagerPlugin().install(pluginManager);
|
|
62
|
-
new DSLDataSpace_PureProtocolProcessorPlugin().install(pluginManager);
|
|
63
|
-
}
|
|
64
|
-
}
|