@finos/legend-application-studio 28.19.94 → 28.19.96
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/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js +5 -22
- package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/package.json +11 -11
- package/src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts +9 -41
package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProductQueryBuilderHelper.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"DataProductQueryBuilderHelper.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAyB5E,eAAO,MAAM,gBAAgB,GAC3B,aAAa,WAAW,EACxB,aAAa,WAAW,KACvB,OAAO,CAAC,IAAI,CAoDd,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ModelAccessPointGroup
|
|
16
|
+
import { ModelAccessPointGroup } from '@finos/legend-graph';
|
|
17
17
|
import { flowResult } from 'mobx';
|
|
18
18
|
import { DataProductQueryBuilderState, QueryBuilderActionConfig, QueryBuilderAdvancedWorkflowState, } from '@finos/legend-query-builder';
|
|
19
19
|
import { assertErrorThrown, assertTrue, filterByType, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
@@ -26,32 +26,15 @@ export const queryDataProduct = async (dataProduct, editorStore) => {
|
|
|
26
26
|
try {
|
|
27
27
|
assertTrue(isQueryableDataProduct(dataProduct), 'Data Product is not queryable. Must have either native model execution contexts or model access point groups defined to be queryable.');
|
|
28
28
|
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
|
29
|
-
const
|
|
29
|
+
const defaultExecutionContext = guaranteeNonNullable(dataProduct.nativeModelAccess?.defaultExecutionContext ??
|
|
30
|
+
dataProduct.accessPointGroups.filter(filterByType(ModelAccessPointGroup))[0], 'No execution context found for Data Product');
|
|
30
31
|
await flowResult(embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
|
31
32
|
setupQueryBuilderState: async () => {
|
|
32
33
|
const sourceInfo = Object.assign({}, editorStore.editorMode.getSourceInfo(), {
|
|
33
34
|
dataProduct: dataProduct.path,
|
|
34
35
|
});
|
|
35
|
-
const queryBuilderState = new DataProductQueryBuilderState(editorStore.applicationStore, editorStore.graphManagerState, QueryBuilderAdvancedWorkflowState.INSTANCE, dataProduct, undefined, QueryBuilderActionConfig.INSTANCE,
|
|
36
|
-
|
|
37
|
-
const runtime = guaranteeNonNullable(queryBuilderState.selectedExecContext.runtime, 'runtime unable to be resolved');
|
|
38
|
-
queryBuilderState.changeMapping(mapping);
|
|
39
|
-
// const mappingModelCoverageAnalysisResult =
|
|
40
|
-
// queryBuilderState.dataProductArtifact?.mappingToMappingCoverageResult?.get(
|
|
41
|
-
// mapping.path,
|
|
42
|
-
// );
|
|
43
|
-
queryBuilderState.changeRuntime(new RuntimePointer(runtime));
|
|
44
|
-
const compatibleClasses = resolveUsableDataProductClasses(queryBuilderState.dataProduct.nativeModelAccess?.featuredElements ??
|
|
45
|
-
[], mapping, queryBuilderState.graphManagerState, undefined);
|
|
46
|
-
// if there is no chosen class or the chosen one is not compatible
|
|
47
|
-
// with the mapping then pick a compatible class if possible
|
|
48
|
-
if (!queryBuilderState.class ||
|
|
49
|
-
!compatibleClasses.includes(queryBuilderState.class)) {
|
|
50
|
-
const possibleNewClass = compatibleClasses[0];
|
|
51
|
-
if (possibleNewClass) {
|
|
52
|
-
queryBuilderState.changeClass(possibleNewClass);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
36
|
+
const queryBuilderState = new DataProductQueryBuilderState(editorStore.applicationStore, editorStore.graphManagerState, QueryBuilderAdvancedWorkflowState.INSTANCE, dataProduct, undefined, QueryBuilderActionConfig.INSTANCE, defaultExecutionContext, undefined, async (val) => { }, undefined, undefined, editorStore.applicationStore.config.options.queryBuilderConfig, sourceInfo);
|
|
37
|
+
queryBuilderState.initWithDataProduct(dataProduct);
|
|
55
38
|
return queryBuilderState;
|
|
56
39
|
},
|
|
57
40
|
disableCompile: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProductQueryBuilderHelper.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"DataProductQueryBuilderHelper.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAoB,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,sB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O,CAAC,kBAAkB,EAC9D,UAAU,CACX,CAAC;gBACF,iBAAiB,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;gBACnD,OAAO,iBAAiB,CAAC;YAC3B,CAAC;YACD,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACzB,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAC1D,8CAA8C,KAAK,CAAC,OAAO,EAAE,CAC9D,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-studio",
|
|
3
|
-
"version": "28.19.
|
|
3
|
+
"version": "28.19.96",
|
|
4
4
|
"description": "Legend Studio application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"test:watch": "jest --watch"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@finos/legend-application": "16.0.
|
|
50
|
-
"@finos/legend-art": "7.1.
|
|
51
|
-
"@finos/legend-code-editor": "2.0.
|
|
52
|
-
"@finos/legend-data-cube": "0.3.
|
|
53
|
-
"@finos/legend-extension-dsl-data-product": "0.0.
|
|
54
|
-
"@finos/legend-extension-dsl-diagram": "8.1.
|
|
55
|
-
"@finos/legend-graph": "32.3.
|
|
56
|
-
"@finos/legend-lego": "2.0.
|
|
57
|
-
"@finos/legend-query-builder": "4.17.
|
|
49
|
+
"@finos/legend-application": "16.0.98",
|
|
50
|
+
"@finos/legend-art": "7.1.143",
|
|
51
|
+
"@finos/legend-code-editor": "2.0.153",
|
|
52
|
+
"@finos/legend-data-cube": "0.3.69",
|
|
53
|
+
"@finos/legend-extension-dsl-data-product": "0.0.54",
|
|
54
|
+
"@finos/legend-extension-dsl-diagram": "8.1.216",
|
|
55
|
+
"@finos/legend-graph": "32.3.33",
|
|
56
|
+
"@finos/legend-lego": "2.0.171",
|
|
57
|
+
"@finos/legend-query-builder": "4.17.87",
|
|
58
58
|
"@finos/legend-server-depot": "6.1.9",
|
|
59
|
-
"@finos/legend-server-lakehouse": "0.3.
|
|
59
|
+
"@finos/legend-server-lakehouse": "0.3.34",
|
|
60
60
|
"@finos/legend-server-sdlc": "5.3.73",
|
|
61
61
|
"@finos/legend-server-showcase": "0.2.63",
|
|
62
62
|
"@finos/legend-shared": "11.0.22",
|
|
@@ -14,12 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
type DataProduct,
|
|
19
|
-
ModelAccessPointGroup,
|
|
20
|
-
resolveUsableDataProductClasses,
|
|
21
|
-
RuntimePointer,
|
|
22
|
-
} from '@finos/legend-graph';
|
|
17
|
+
import { type DataProduct, ModelAccessPointGroup } from '@finos/legend-graph';
|
|
23
18
|
import type { EditorStore } from '../../../../stores/editor/EditorStore.js';
|
|
24
19
|
import { flowResult } from 'mobx';
|
|
25
20
|
import {
|
|
@@ -55,8 +50,12 @@ export const queryDataProduct = async (
|
|
|
55
50
|
'Data Product is not queryable. Must have either native model execution contexts or model access point groups defined to be queryable.',
|
|
56
51
|
);
|
|
57
52
|
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
|
58
|
-
const
|
|
59
|
-
dataProduct.nativeModelAccess
|
|
53
|
+
const defaultExecutionContext = guaranteeNonNullable(
|
|
54
|
+
dataProduct.nativeModelAccess?.defaultExecutionContext ??
|
|
55
|
+
dataProduct.accessPointGroups.filter(
|
|
56
|
+
filterByType(ModelAccessPointGroup),
|
|
57
|
+
)[0],
|
|
58
|
+
'No execution context found for Data Product',
|
|
60
59
|
);
|
|
61
60
|
await flowResult(
|
|
62
61
|
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
|
@@ -75,10 +74,7 @@ export const queryDataProduct = async (
|
|
|
75
74
|
dataProduct,
|
|
76
75
|
undefined,
|
|
77
76
|
QueryBuilderActionConfig.INSTANCE,
|
|
78
|
-
|
|
79
|
-
guaranteeNonNullable(
|
|
80
|
-
dataProduct.nativeModelAccess?.defaultExecutionContext,
|
|
81
|
-
),
|
|
77
|
+
defaultExecutionContext,
|
|
82
78
|
undefined,
|
|
83
79
|
async (val: DepotEntityWithOrigin) => {},
|
|
84
80
|
undefined,
|
|
@@ -86,35 +82,7 @@ export const queryDataProduct = async (
|
|
|
86
82
|
editorStore.applicationStore.config.options.queryBuilderConfig,
|
|
87
83
|
sourceInfo,
|
|
88
84
|
);
|
|
89
|
-
|
|
90
|
-
const runtime = guaranteeNonNullable(
|
|
91
|
-
queryBuilderState.selectedExecContext.runtime,
|
|
92
|
-
'runtime unable to be resolved',
|
|
93
|
-
);
|
|
94
|
-
queryBuilderState.changeMapping(mapping);
|
|
95
|
-
// const mappingModelCoverageAnalysisResult =
|
|
96
|
-
// queryBuilderState.dataProductArtifact?.mappingToMappingCoverageResult?.get(
|
|
97
|
-
// mapping.path,
|
|
98
|
-
// );
|
|
99
|
-
queryBuilderState.changeRuntime(new RuntimePointer(runtime));
|
|
100
|
-
const compatibleClasses = resolveUsableDataProductClasses(
|
|
101
|
-
queryBuilderState.dataProduct.nativeModelAccess?.featuredElements ??
|
|
102
|
-
[],
|
|
103
|
-
mapping,
|
|
104
|
-
queryBuilderState.graphManagerState,
|
|
105
|
-
undefined,
|
|
106
|
-
);
|
|
107
|
-
// if there is no chosen class or the chosen one is not compatible
|
|
108
|
-
// with the mapping then pick a compatible class if possible
|
|
109
|
-
if (
|
|
110
|
-
!queryBuilderState.class ||
|
|
111
|
-
!compatibleClasses.includes(queryBuilderState.class)
|
|
112
|
-
) {
|
|
113
|
-
const possibleNewClass = compatibleClasses[0];
|
|
114
|
-
if (possibleNewClass) {
|
|
115
|
-
queryBuilderState.changeClass(possibleNewClass);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
85
|
+
queryBuilderState.initWithDataProduct(dataProduct);
|
|
118
86
|
return queryBuilderState;
|
|
119
87
|
},
|
|
120
88
|
disableCompile: true,
|