@finos/legend-extension-dsl-data-space-studio 0.2.4 → 0.2.6
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/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DataSpacePreviewState.d.ts +2 -2
- package/lib/stores/DataSpacePreviewState.d.ts.map +1 -1
- package/lib/stores/DataSpacePreviewState.js +5 -9
- package/lib/stores/DataSpacePreviewState.js.map +1 -1
- package/package.json +12 -12
- package/src/stores/DataSpacePreviewState.ts +11 -25
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { EditorExtensionState, type EditorStore } from '@finos/legend-application-studio';
|
|
17
|
-
import { DataSpaceViewerState } from '@finos/legend-extension-dsl-data-space/application';
|
|
18
|
-
import {
|
|
17
|
+
import { type DataSpaceViewerState } from '@finos/legend-extension-dsl-data-space/application';
|
|
18
|
+
import type { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
|
19
19
|
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
|
20
20
|
export declare class DataSpacePreviewState extends EditorExtensionState {
|
|
21
21
|
private static readonly IDENTIFIER;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAGpB,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAGpB,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAE9E,OAAO,EACL,KAAK,WAAW,EAEhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,qBAAsB,SAAQ,oBAAoB;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAwB;IAE1D,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,kBAAkB,cAAwB;IAEnD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;gBAE5C,WAAW,EAAE,WAAW;IAapC,IAAa,uBAAuB,IAAI,MAAM,CAE7C;IAED,MAAM,CAAC,qBAAqB,CAC1B,WAAW,EAAE,WAAW,GACvB,qBAAqB,GAAG,SAAS;IAqBpC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,qBAAqB;IAOrE,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAO7C,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;CAuG3D"}
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { EditorExtensionState, queryClass, EXTERNAL_APPLICATION_NAVIGATION__generateMarketplaceDataSpaceViewUrl, } from '@finos/legend-application-studio';
|
|
17
|
-
import {
|
|
18
|
-
import { DSL_DataSpace_getGraphManagerExtension, } from '@finos/legend-extension-dsl-data-space/graph';
|
|
19
|
-
import { InMemoryGraphData } from '@finos/legend-graph';
|
|
17
|
+
import { EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl, previewDataSpace, } from '@finos/legend-extension-dsl-data-space/application';
|
|
20
18
|
import { guaranteeNonNullable, ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
|
21
19
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
22
20
|
export class DataSpacePreviewState extends EditorExtensionState {
|
|
@@ -74,12 +72,10 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
74
72
|
const artifactId = this.editorStore.projectConfigurationEditorState
|
|
75
73
|
.currentProjectConfiguration.artifactId;
|
|
76
74
|
const versionId = 'LOCAL';
|
|
77
|
-
//
|
|
78
|
-
|
|
75
|
+
// the editor's graph, already built: analysed and viewed as is
|
|
76
|
+
this.dataSpaceViewerState = (yield previewDataSpace(this.editorStore.applicationStore, this.editorStore.graphManagerState, dataSpace.path, async () => this.editorStore.graphManagerState.graph.allOwnElements
|
|
79
77
|
.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))
|
|
80
|
-
.concat(this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))),
|
|
81
|
-
this.dataSpaceViewerState = new DataSpaceViewerState(this.editorStore.applicationStore, this.editorStore.graphManagerState, groupId, artifactId, versionId, analysisResult, this.editorStore.depotServerClient, {
|
|
82
|
-
retrieveGraphData: () => new InMemoryGraphData(this.editorStore.graphManagerState.graph),
|
|
78
|
+
.concat(this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))), { groupId, artifactId, versionId }, this.editorStore.depotServerClient, {
|
|
83
79
|
queryDataSpace: () => {
|
|
84
80
|
this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
|
|
85
81
|
},
|
|
@@ -109,7 +105,7 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
109
105
|
this.editorStore.applicationStore.notificationService.notifyWarning('Query application URL is not configured');
|
|
110
106
|
}
|
|
111
107
|
},
|
|
112
|
-
});
|
|
108
|
+
}, this.loadDataSpaceState));
|
|
113
109
|
this.loadDataSpaceState.pass();
|
|
114
110
|
}
|
|
115
111
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.js","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,oEAAoE,GAErE,MAAM,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpacePreviewState.js","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,oEAAoE,GAErE,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,+DAA+D,EAC/D,gBAAgB,GACjB,MAAM,oDAAoD,CAAC;AAG5D,OAAO,EAEL,oBAAoB,EACpB,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEhE,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IACrD,MAAM,CAAU,UAAU,GAAG,oBAAoB,CAAC;IAEjD,WAAW,CAAc;IACzB,kBAAkB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAEnD,SAAS,CAAyB;IAClC,oBAAoB,CAAoC;IAExD,YAAY,WAAwB;QAClC,KAAK,EAAE,CAAC;QAER,cAAc,CAAC,IAAI,EAAE;YACnB,SAAS,EAAE,UAAU;YACrB,oBAAoB,EAAE,UAAU;YAChC,YAAY,EAAE,MAAM;YACpB,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,IAAa,uBAAuB;QAClC,OAAO,qBAAqB,CAAC,UAAU,CAAC;IAC1C,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CAAC,CAAC;QAC3E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;IACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.1.
|
|
46
|
-
"@finos/legend-application-studio": "28.22.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
|
49
|
-
"@finos/legend-extension-dsl-data-space": "10.4.
|
|
50
|
-
"@finos/legend-extension-dsl-diagram": "8.1.
|
|
51
|
-
"@finos/legend-graph": "32.
|
|
52
|
-
"@finos/legend-query-builder": "4.19.
|
|
53
|
-
"@finos/legend-server-depot": "6.1.
|
|
54
|
-
"@finos/legend-server-sdlc": "5.5.
|
|
55
|
-
"@finos/legend-shared": "11.0.
|
|
45
|
+
"@finos/legend-application": "16.1.4",
|
|
46
|
+
"@finos/legend-application-studio": "28.22.6",
|
|
47
|
+
"@finos/legend-art": "7.1.175",
|
|
48
|
+
"@finos/legend-code-editor": "2.0.218",
|
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.274",
|
|
50
|
+
"@finos/legend-extension-dsl-diagram": "8.1.283",
|
|
51
|
+
"@finos/legend-graph": "32.10.0",
|
|
52
|
+
"@finos/legend-query-builder": "4.19.28",
|
|
53
|
+
"@finos/legend-server-depot": "6.1.27",
|
|
54
|
+
"@finos/legend-server-sdlc": "5.5.5",
|
|
55
|
+
"@finos/legend-shared": "11.0.34",
|
|
56
56
|
"@types/react": "19.0.10",
|
|
57
57
|
"mobx": "6.13.6",
|
|
58
58
|
"mobx-react-lite": "4.1.0",
|
|
@@ -21,15 +21,12 @@ import {
|
|
|
21
21
|
type EditorStore,
|
|
22
22
|
} from '@finos/legend-application-studio';
|
|
23
23
|
import {
|
|
24
|
-
DataSpaceViewerState,
|
|
24
|
+
type DataSpaceViewerState,
|
|
25
25
|
EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl,
|
|
26
|
+
previewDataSpace,
|
|
26
27
|
} from '@finos/legend-extension-dsl-data-space/application';
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
type DataSpaceAnalysisResult,
|
|
30
|
-
type DataSpace,
|
|
31
|
-
} from '@finos/legend-extension-dsl-data-space/graph';
|
|
32
|
-
import { InMemoryGraphData, type Class } from '@finos/legend-graph';
|
|
28
|
+
import type { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
|
29
|
+
import type { Class } from '@finos/legend-graph';
|
|
33
30
|
import {
|
|
34
31
|
type GeneratorFn,
|
|
35
32
|
guaranteeNonNullable,
|
|
@@ -115,10 +112,10 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
115
112
|
.currentProjectConfiguration.artifactId;
|
|
116
113
|
const versionId = 'LOCAL';
|
|
117
114
|
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
this.editorStore.
|
|
121
|
-
|
|
115
|
+
// the editor's graph, already built: analysed and viewed as is
|
|
116
|
+
this.dataSpaceViewerState = (yield previewDataSpace(
|
|
117
|
+
this.editorStore.applicationStore,
|
|
118
|
+
this.editorStore.graphManagerState,
|
|
122
119
|
dataSpace.path,
|
|
123
120
|
async () =>
|
|
124
121
|
this.editorStore.graphManagerState.graph.allOwnElements
|
|
@@ -135,21 +132,9 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
135
132
|
),
|
|
136
133
|
),
|
|
137
134
|
),
|
|
138
|
-
|
|
139
|
-
this.loadDataSpaceState,
|
|
140
|
-
)) as DataSpaceAnalysisResult;
|
|
141
|
-
|
|
142
|
-
this.dataSpaceViewerState = new DataSpaceViewerState(
|
|
143
|
-
this.editorStore.applicationStore,
|
|
144
|
-
this.editorStore.graphManagerState,
|
|
145
|
-
groupId,
|
|
146
|
-
artifactId,
|
|
147
|
-
versionId,
|
|
148
|
-
analysisResult,
|
|
135
|
+
{ groupId, artifactId, versionId },
|
|
149
136
|
this.editorStore.depotServerClient,
|
|
150
137
|
{
|
|
151
|
-
retrieveGraphData: () =>
|
|
152
|
-
new InMemoryGraphData(this.editorStore.graphManagerState.graph),
|
|
153
138
|
queryDataSpace: () => {
|
|
154
139
|
this.editorStore.applicationStore.notificationService.notifyWarning(
|
|
155
140
|
'This feature is not supported in preview mode',
|
|
@@ -205,7 +190,8 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
205
190
|
}
|
|
206
191
|
},
|
|
207
192
|
},
|
|
208
|
-
|
|
193
|
+
this.loadDataSpaceState,
|
|
194
|
+
)) as DataSpaceViewerState;
|
|
209
195
|
this.loadDataSpaceState.pass();
|
|
210
196
|
} catch (error) {
|
|
211
197
|
assertErrorThrown(error);
|