@finos/legend-extension-dsl-data-space-studio 0.1.108 → 0.1.110
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/components/DataSpaceQueryAction.d.ts.map +1 -1
- package/lib/components/DataSpaceQueryAction.js +21 -3
- package/lib/components/DataSpaceQueryAction.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +7 -7
- package/package.json +18 -18
- package/src/components/DataSpaceQueryAction.tsx +35 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryAction.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,
|
1
|
+
{"version":3,"file":"DataSpaceQueryAction.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EACL,SAAS,EAEV,MAAM,8CAA8C,CAAC;AAWtD,eAAO,MAAM,cAAc,cACd,SAAS,eACP,WAAW,KACvB,OAAO,CAAC,IAAI,CA8Ed,CAAC;AAEF,eAAO,MAAM,oBAAoB,WACvB;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE;;CAUjC,CAAC"}
|
@@ -18,10 +18,11 @@ import { MenuContentItem } from '@finos/legend-art';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
19
19
|
import { useEditorStore, } from '@finos/legend-application-studio';
|
20
20
|
import { flowResult } from 'mobx';
|
21
|
-
import { guaranteeType } from '@finos/legend-shared';
|
22
|
-
import { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
21
|
+
import { getNullableFirstEntry, guaranteeType } from '@finos/legend-shared';
|
22
|
+
import { DataSpace, resolveUsableDataSpaceClasses, } from '@finos/legend-extension-dsl-data-space/graph';
|
23
23
|
import { DataSpaceQueryBuilderState, } from '@finos/legend-extension-dsl-data-space/application';
|
24
24
|
import { QueryBuilderActionConfig, QueryBuilderAdvancedWorkflowState, } from '@finos/legend-query-builder';
|
25
|
+
import { RuntimePointer } from '@finos/legend-graph';
|
25
26
|
export const queryDataSpace = async (dataSpace, editorStore) => {
|
26
27
|
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
27
28
|
await flowResult(embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
@@ -35,7 +36,24 @@ export const queryDataSpace = async (dataSpace, editorStore) => {
|
|
35
36
|
await queryBuilderState.propagateExecutionContextChange();
|
36
37
|
}, undefined, undefined, undefined, undefined, editorStore.applicationStore.config.options.queryBuilderConfig, sourceInfo);
|
37
38
|
queryBuilderState.setExecutionContext(dataSpace.defaultExecutionContext);
|
38
|
-
|
39
|
+
const mapping = queryBuilderState.executionContext.mapping.value;
|
40
|
+
queryBuilderState.changeMapping(mapping);
|
41
|
+
const mappingModelCoverageAnalysisResult = queryBuilderState.dataSpaceAnalysisResult?.mappingToMappingCoverageResult?.get(mapping.path);
|
42
|
+
if (mappingModelCoverageAnalysisResult) {
|
43
|
+
queryBuilderState.explorerState.mappingModelCoverageAnalysisResult =
|
44
|
+
mappingModelCoverageAnalysisResult;
|
45
|
+
}
|
46
|
+
queryBuilderState.changeRuntime(new RuntimePointer(queryBuilderState.executionContext.defaultRuntime));
|
47
|
+
const compatibleClasses = resolveUsableDataSpaceClasses(queryBuilderState.dataSpace, mapping, queryBuilderState.graphManagerState);
|
48
|
+
// if there is no chosen class or the chosen one is not compatible
|
49
|
+
// with the mapping then pick a compatible class if possible
|
50
|
+
if (!queryBuilderState.class ||
|
51
|
+
!compatibleClasses.includes(queryBuilderState.class)) {
|
52
|
+
const possibleNewClass = getNullableFirstEntry(compatibleClasses);
|
53
|
+
if (possibleNewClass) {
|
54
|
+
queryBuilderState.changeClass(possibleNewClass);
|
55
|
+
}
|
56
|
+
}
|
39
57
|
return queryBuilderState;
|
40
58
|
},
|
41
59
|
actionConfigs: [],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryAction.js","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAEL,cAAc,GACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"DataSpaceQueryAction.js","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAEL,cAAc,GACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,SAAS,EACT,6BAA6B,GAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,0BAA0B,GAE3B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,SAAoB,EACpB,WAAwB,EACT,EAAE;IACjB,MAAM,yBAAyB,GAAG,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HANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.110",
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -52,24 +52,24 @@
|
|
52
52
|
"@finos/legend-server-depot": "workspace:*",
|
53
53
|
"@finos/legend-server-sdlc": "workspace:*",
|
54
54
|
"@finos/legend-shared": "workspace:*",
|
55
|
-
"@types/react": "
|
55
|
+
"@types/react": "19.0.2",
|
56
56
|
"mobx": "6.13.5",
|
57
|
-
"mobx-react-lite": "4.0
|
58
|
-
"react": "
|
57
|
+
"mobx-react-lite": "4.1.0",
|
58
|
+
"react": "19.0.0"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
61
|
"@finos/legend-dev-utils": "workspace:*",
|
62
62
|
"@jest/globals": "29.7.0",
|
63
63
|
"cross-env": "7.0.3",
|
64
|
-
"eslint": "9.
|
64
|
+
"eslint": "9.17.0",
|
65
65
|
"jest": "29.7.0",
|
66
66
|
"npm-run-all": "4.1.5",
|
67
67
|
"rimraf": "6.0.1",
|
68
|
-
"sass": "1.
|
68
|
+
"sass": "1.83.0",
|
69
69
|
"typescript": "5.7.2"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
|
-
"react": "^
|
72
|
+
"react": "^19.0.0"
|
73
73
|
},
|
74
74
|
"publishConfig": {
|
75
75
|
"directory": "build/publishContent"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.110",
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -42,34 +42,34 @@
|
|
42
42
|
"test:watch": "jest --watch"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@finos/legend-application": "16.0.
|
46
|
-
"@finos/legend-application-studio": "28.18.
|
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-graph": "31.10.
|
51
|
-
"@finos/legend-query-builder": "4.15.
|
52
|
-
"@finos/legend-server-depot": "6.0.
|
53
|
-
"@finos/legend-server-sdlc": "5.3.
|
54
|
-
"@finos/legend-shared": "10.0.
|
55
|
-
"@types/react": "
|
45
|
+
"@finos/legend-application": "16.0.13",
|
46
|
+
"@finos/legend-application-studio": "28.18.70",
|
47
|
+
"@finos/legend-art": "7.1.70",
|
48
|
+
"@finos/legend-code-editor": "2.0.27",
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.22",
|
50
|
+
"@finos/legend-graph": "31.10.61",
|
51
|
+
"@finos/legend-query-builder": "4.15.30",
|
52
|
+
"@finos/legend-server-depot": "6.0.72",
|
53
|
+
"@finos/legend-server-sdlc": "5.3.40",
|
54
|
+
"@finos/legend-shared": "10.0.63",
|
55
|
+
"@types/react": "19.0.2",
|
56
56
|
"mobx": "6.13.5",
|
57
|
-
"mobx-react-lite": "4.0
|
58
|
-
"react": "
|
57
|
+
"mobx-react-lite": "4.1.0",
|
58
|
+
"react": "19.0.0"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
|
-
"@finos/legend-dev-utils": "2.1.
|
61
|
+
"@finos/legend-dev-utils": "2.1.32",
|
62
62
|
"@jest/globals": "29.7.0",
|
63
63
|
"cross-env": "7.0.3",
|
64
|
-
"eslint": "9.
|
64
|
+
"eslint": "9.17.0",
|
65
65
|
"jest": "29.7.0",
|
66
66
|
"npm-run-all": "4.1.5",
|
67
67
|
"rimraf": "6.0.1",
|
68
|
-
"sass": "1.
|
68
|
+
"sass": "1.83.0",
|
69
69
|
"typescript": "5.7.2"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
|
-
"react": "^
|
72
|
+
"react": "^19.0.0"
|
73
73
|
},
|
74
74
|
"publishConfig": {
|
75
75
|
"directory": "build/publishContent"
|
@@ -21,8 +21,11 @@ import {
|
|
21
21
|
useEditorStore,
|
22
22
|
} from '@finos/legend-application-studio';
|
23
23
|
import { flowResult } from 'mobx';
|
24
|
-
import { guaranteeType } from '@finos/legend-shared';
|
25
|
-
import {
|
24
|
+
import { getNullableFirstEntry, guaranteeType } from '@finos/legend-shared';
|
25
|
+
import {
|
26
|
+
DataSpace,
|
27
|
+
resolveUsableDataSpaceClasses,
|
28
|
+
} from '@finos/legend-extension-dsl-data-space/graph';
|
26
29
|
import {
|
27
30
|
DataSpaceQueryBuilderState,
|
28
31
|
type DataSpaceInfo,
|
@@ -31,6 +34,7 @@ import {
|
|
31
34
|
QueryBuilderActionConfig,
|
32
35
|
QueryBuilderAdvancedWorkflowState,
|
33
36
|
} from '@finos/legend-query-builder';
|
37
|
+
import { RuntimePointer } from '@finos/legend-graph';
|
34
38
|
|
35
39
|
export const queryDataSpace = async (
|
36
40
|
dataSpace: DataSpace,
|
@@ -78,7 +82,35 @@ export const queryDataSpace = async (
|
|
78
82
|
queryBuilderState.setExecutionContext(
|
79
83
|
dataSpace.defaultExecutionContext,
|
80
84
|
);
|
81
|
-
|
85
|
+
const mapping = queryBuilderState.executionContext.mapping.value;
|
86
|
+
queryBuilderState.changeMapping(mapping);
|
87
|
+
const mappingModelCoverageAnalysisResult =
|
88
|
+
queryBuilderState.dataSpaceAnalysisResult?.mappingToMappingCoverageResult?.get(
|
89
|
+
mapping.path,
|
90
|
+
);
|
91
|
+
if (mappingModelCoverageAnalysisResult) {
|
92
|
+
queryBuilderState.explorerState.mappingModelCoverageAnalysisResult =
|
93
|
+
mappingModelCoverageAnalysisResult;
|
94
|
+
}
|
95
|
+
queryBuilderState.changeRuntime(
|
96
|
+
new RuntimePointer(queryBuilderState.executionContext.defaultRuntime),
|
97
|
+
);
|
98
|
+
const compatibleClasses = resolveUsableDataSpaceClasses(
|
99
|
+
queryBuilderState.dataSpace,
|
100
|
+
mapping,
|
101
|
+
queryBuilderState.graphManagerState,
|
102
|
+
);
|
103
|
+
// if there is no chosen class or the chosen one is not compatible
|
104
|
+
// with the mapping then pick a compatible class if possible
|
105
|
+
if (
|
106
|
+
!queryBuilderState.class ||
|
107
|
+
!compatibleClasses.includes(queryBuilderState.class)
|
108
|
+
) {
|
109
|
+
const possibleNewClass = getNullableFirstEntry(compatibleClasses);
|
110
|
+
if (possibleNewClass) {
|
111
|
+
queryBuilderState.changeClass(possibleNewClass);
|
112
|
+
}
|
113
|
+
}
|
82
114
|
return queryBuilderState;
|
83
115
|
},
|
84
116
|
actionConfigs: [],
|