@finos/legend-query-builder 4.15.39 → 4.15.41
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/data-access/DataAccessOverview.d.ts.map +1 -1
- package/lib/components/data-access/DataAccessOverview.js +2 -3
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +9 -7
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +3 -3
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +2 -2
- package/lib/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +5 -5
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +6 -6
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +3 -3
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +3 -3
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/data-access/DataAccessState.js +2 -2
- package/lib/stores/data-access/DataAccessState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +2 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +3 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +4 -4
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/workflows/ClassQueryBuilderState.d.ts +0 -1
- package/lib/stores/workflows/ClassQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ClassQueryBuilderState.js +2 -3
- package/lib/stores/workflows/ClassQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.js +2 -3
- package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -2
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +15 -15
- package/src/components/data-access/DataAccessOverview.tsx +2 -4
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +16 -18
- package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +1 -1
- package/src/components/shared/BasicValueSpecificationEditor.tsx +3 -2
- package/src/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +2 -2
- package/src/stores/QueryBuilderPropertyEditorState.ts +5 -16
- package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -5
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +3 -9
- package/src/stores/data-access/DataAccessState.ts +2 -2
- package/src/stores/explorer/QueryBuilderExplorerState.ts +2 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -2
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +3 -2
- package/src/stores/filter/QueryBuilderFilterState.ts +3 -8
- package/src/stores/workflows/ClassQueryBuilderState.ts +2 -4
- package/src/stores/workflows/MappingQueryBuilderState.ts +2 -3
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -2
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { getClassCompatibleMappings, getMappingCompatibleRuntimes, RuntimePointer, PackageableElementExplicitReference, } from '@finos/legend-graph';
|
|
17
|
-
import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
18
17
|
import { renderClassQueryBuilderSetupPanelContent } from '../../components/workflows/ClassQueryBuilder.js';
|
|
19
18
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
20
19
|
export class ClassQueryBuilderState extends QueryBuilderState {
|
|
@@ -34,7 +33,7 @@ export class ClassQueryBuilderState extends QueryBuilderState {
|
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
// try to select the first compatible mapping
|
|
37
|
-
const possibleNewMapping =
|
|
36
|
+
const possibleNewMapping = compatibleMappings[0];
|
|
38
37
|
if (possibleNewMapping) {
|
|
39
38
|
this.changeMapping(possibleNewMapping);
|
|
40
39
|
this.propagateMappingChange(possibleNewMapping);
|
|
@@ -49,7 +48,7 @@ export class ClassQueryBuilderState extends QueryBuilderState {
|
|
|
49
48
|
// try to choose the first compatible runtime,
|
|
50
49
|
// if none found, just unset the current runtime value
|
|
51
50
|
const compatibleRuntimes = getMappingCompatibleRuntimes(mapping, this.graphManagerState.usableRuntimes);
|
|
52
|
-
const possibleNewRuntime =
|
|
51
|
+
const possibleNewRuntime = compatibleRuntimes[0];
|
|
53
52
|
if (possibleNewRuntime) {
|
|
54
53
|
this.changeRuntime(new RuntimePointer(PackageableElementExplicitReference.create(possibleNewRuntime)));
|
|
55
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ClassQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,GACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ClassQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ClassQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,GACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,wCAAwC,EAAE,MAAM,iDAAiD,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IAClD,oCAAoC,GAAG,GAAoB,EAAE,CACpE,wCAAwC,CAAC,IAAI,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,oBAAoB,CAAC,MAAa;QAChC,MAAM,kBAAkB,GAAG,0BAA0B,CACnD,MAAM,EACN,IAAI,CAAC,iBAAiB,CAAC,cAAc,CACtC,CAAC;QACF,YAAY;QACZ,MAAM,0BAA0B,GAC9B,IAAI,CAAC,qBAAqB,CAAC,OAAO;YAClC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,IAAI,CAAC,iBAAiB,IAAI,0BAA0B,EAAE,CAAC;YACzD,OAAO;QACT,CAAC;QACD,6CAA6C;QAC7C,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,kBAAkB,EAAE,CAAC;YACvB,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;YACvC,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,sBAAsB,CAAC,OAAgB;QACrC,8CAA8C;QAC9C,sDAAsD;QACtD,MAAM,kBAAkB,GAAG,4BAA4B,CACrD,OAAO,EACP,IAAI,CAAC,iBAAiB,CAAC,cAAc,CACtC,CAAC;QACF,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,kBAAkB,EAAE,CAAC;YACvB,IAAI,CAAC,aAAa,CAChB,IAAI,cAAc,CAChB,mCAAmC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAC/D,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"MappingQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AAExD,qBAAa,wBAAyB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAEvD,oCAAoC,QAAO,KAAK,CAAC,SAAS,CAChB;gBAGjD,gBAAgB,EAAE,6BAA6B,EAC/C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,yBAAyB,EACxC,YAAY,EAAE,wBAAwB,EACtC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,EACtD,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,EACtD,MAAM,CAAC,EAAE,kBAAkB,GAAG,SAAS,EACvC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS;IAgBjC;;;;;;OAMG;IACH,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CA6B/C"}
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { getMappingCompatibleRuntimes, RuntimePointer, PackageableElementExplicitReference, getMappingCompatibleClasses, } from '@finos/legend-graph';
|
|
17
|
-
import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
18
17
|
import { renderMappingQueryBuilderSetupPanelContent } from '../../components/workflows/MappingQueryBuilder.js';
|
|
19
18
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
20
19
|
export class MappingQueryBuilderState extends QueryBuilderState {
|
|
@@ -38,7 +37,7 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
38
37
|
// try to select the first compatible runtime,
|
|
39
38
|
// if none found, just unset the current runtime value
|
|
40
39
|
const compatibleRuntimes = getMappingCompatibleRuntimes(mapping, this.graphManagerState.usableRuntimes);
|
|
41
|
-
const possibleNewRuntime =
|
|
40
|
+
const possibleNewRuntime = compatibleRuntimes[0];
|
|
42
41
|
if (possibleNewRuntime) {
|
|
43
42
|
this.changeRuntime(new RuntimePointer(PackageableElementExplicitReference.create(possibleNewRuntime)));
|
|
44
43
|
}
|
|
@@ -46,7 +45,7 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
46
45
|
// if there is no chosen class or the chosen one is not compatible
|
|
47
46
|
// with the mapping then pick a compatible class if possible
|
|
48
47
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
49
|
-
const possibleNewClass =
|
|
48
|
+
const possibleNewClass = compatibleClasses[0];
|
|
50
49
|
if (possibleNewClass) {
|
|
51
50
|
this.changeClass(possibleNewClass);
|
|
52
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MappingQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,E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,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3D,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,gBAAgB,EAAE,CAAC;gBACrB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,OAAO,EAIb,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,OAAO,EAIb,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;CACv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,CAAC,EAAE,OAAO,GACnC,OAAO,CAAC,IAAI,CAAC;CAoBjB"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { getMappingCompatibleClasses, PureMultiExecution, PureSingleExecution, } from '@finos/legend-graph';
|
|
17
|
-
import { assertTrue,
|
|
17
|
+
import { assertTrue, guaranteeNonNullable, IllegalStateError, } from '@finos/legend-shared';
|
|
18
18
|
import { action, makeObservable, observable } from 'mobx';
|
|
19
19
|
import { renderServiceQueryBuilderSetupPanelContent } from '../../components/workflows/ServiceQueryBuilder.js';
|
|
20
20
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
@@ -96,7 +96,7 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
|
96
96
|
// if there is no chosen class or the chosen one is not compatible
|
|
97
97
|
// with the mapping then pick a compatible class if possible
|
|
98
98
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
99
|
-
const possibleNewClass =
|
|
99
|
+
const possibleNewClass = compatibleClasses[0];
|
|
100
100
|
if (possibleNewClass) {
|
|
101
101
|
this.changeClass(possibleNewClass);
|
|
102
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,E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-builder",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.41",
|
|
4
4
|
"description": "Legend query builder core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.0.
|
|
46
|
-
"@finos/legend-art": "7.1.
|
|
47
|
-
"@finos/legend-code-editor": "2.0.
|
|
48
|
-
"@finos/legend-data-cube": "0.0.
|
|
49
|
-
"@finos/legend-graph": "32.0.
|
|
50
|
-
"@finos/legend-lego": "2.0.
|
|
51
|
-
"@finos/legend-server-depot": "6.0.
|
|
52
|
-
"@finos/legend-shared": "
|
|
53
|
-
"@finos/legend-storage": "3.0.
|
|
45
|
+
"@finos/legend-application": "16.0.20",
|
|
46
|
+
"@finos/legend-art": "7.1.77",
|
|
47
|
+
"@finos/legend-code-editor": "2.0.36",
|
|
48
|
+
"@finos/legend-data-cube": "0.0.43",
|
|
49
|
+
"@finos/legend-graph": "32.0.4",
|
|
50
|
+
"@finos/legend-lego": "2.0.39",
|
|
51
|
+
"@finos/legend-server-depot": "6.0.77",
|
|
52
|
+
"@finos/legend-shared": "11.0.0",
|
|
53
|
+
"@finos/legend-storage": "3.0.119",
|
|
54
54
|
"@testing-library/dom": "10.4.0",
|
|
55
55
|
"@testing-library/react": "16.1.0",
|
|
56
|
-
"@types/react": "19.0.
|
|
57
|
-
"@types/react-dom": "19.0.
|
|
56
|
+
"@types/react": "19.0.7",
|
|
57
|
+
"@types/react-dom": "19.0.3",
|
|
58
58
|
"chart.js": "4.4.7",
|
|
59
59
|
"mathjs": "14.0.1",
|
|
60
60
|
"mobx": "6.13.5",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"sql-formatter": "15.4.9"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@finos/legend-dev-utils": "2.1.
|
|
70
|
+
"@finos/legend-dev-utils": "2.1.36",
|
|
71
71
|
"@jest/globals": "29.7.0",
|
|
72
72
|
"cross-env": "7.0.3",
|
|
73
|
-
"eslint": "9.
|
|
73
|
+
"eslint": "9.18.0",
|
|
74
74
|
"jest": "29.7.0",
|
|
75
75
|
"npm-run-all": "4.1.5",
|
|
76
76
|
"rimraf": "6.0.1",
|
|
77
|
-
"sass": "1.83.
|
|
77
|
+
"sass": "1.83.4",
|
|
78
78
|
"typescript": "5.7.3"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
@@ -42,7 +42,6 @@ import {
|
|
|
42
42
|
DatasetEntitlementUnsupportedReport,
|
|
43
43
|
} from '@finos/legend-graph';
|
|
44
44
|
import { Chart as ChartJS, DoughnutController, ArcElement } from 'chart.js';
|
|
45
|
-
import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
46
45
|
import type { QueryBuilder_LegendApplicationPlugin_Extension } from '../../stores/QueryBuilder_LegendApplicationPlugin_Extension.js';
|
|
47
46
|
|
|
48
47
|
ChartJS.register(DoughnutController, ArcElement);
|
|
@@ -54,10 +53,9 @@ const DataAccessOverviewChart = observer(
|
|
|
54
53
|
const chartRef = useRef<ChartJS>(null);
|
|
55
54
|
const entitlementCheckInfo = dataAccessState.entitlementCheckInfo;
|
|
56
55
|
const total = entitlementCheckInfo.total;
|
|
57
|
-
const accessGrantedCount =
|
|
58
|
-
getNullableFirstEntry(entitlementCheckInfo.data)?.count ?? 0;
|
|
56
|
+
const accessGrantedCount = entitlementCheckInfo.data[0]?.count ?? 0;
|
|
59
57
|
const accessGrantedPercentage =
|
|
60
|
-
|
|
58
|
+
entitlementCheckInfo.data[0]?.percentage ?? 0;
|
|
61
59
|
|
|
62
60
|
useEffect(() => {
|
|
63
61
|
if (canvasRef.current && !chartRef.current) {
|
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
} from '@finos/legend-graph';
|
|
49
49
|
import {
|
|
50
50
|
ADVANCED_FUZZY_SEARCH_MODE,
|
|
51
|
+
at,
|
|
51
52
|
guaranteeNonNullable,
|
|
52
53
|
prettyCONSTName,
|
|
53
54
|
} from '@finos/legend-shared';
|
|
@@ -167,12 +168,11 @@ export const formatTextWithHighlightedMatches = (
|
|
|
167
168
|
|
|
168
169
|
// Create formatted node
|
|
169
170
|
const formattedNode: React.ReactNode[] = [];
|
|
170
|
-
|
|
171
|
+
const highlightRange = at(combinedHighlightRanges, 0)[0];
|
|
172
|
+
if (highlightRange > 0) {
|
|
171
173
|
formattedNode.push(
|
|
172
|
-
<span
|
|
173
|
-
|
|
174
|
-
>
|
|
175
|
-
{displayText.substring(0, combinedHighlightRanges[0]![0])}
|
|
174
|
+
<span key={`${id}-0-${displayText.substring(0, highlightRange)}`}>
|
|
175
|
+
{displayText.substring(0, highlightRange)}
|
|
176
176
|
</span>,
|
|
177
177
|
);
|
|
178
178
|
}
|
|
@@ -190,34 +190,32 @@ export const formatTextWithHighlightedMatches = (
|
|
|
190
190
|
index < combinedHighlightRanges.length - 1 &&
|
|
191
191
|
range[1] < displayText.length
|
|
192
192
|
) {
|
|
193
|
+
const highlightRange2 = at(combinedHighlightRanges, index + 1)[0];
|
|
193
194
|
formattedNode.push(
|
|
194
195
|
<span
|
|
195
196
|
key={`${id}-${index * 2 + 1}--${displayText.substring(
|
|
196
197
|
range[1],
|
|
197
|
-
|
|
198
|
+
highlightRange2,
|
|
198
199
|
)}`}
|
|
199
200
|
>
|
|
200
|
-
{displayText.substring(
|
|
201
|
-
range[1],
|
|
202
|
-
combinedHighlightRanges[index + 1]![0],
|
|
203
|
-
)}
|
|
201
|
+
{displayText.substring(range[1], highlightRange2)}
|
|
204
202
|
</span>,
|
|
205
203
|
);
|
|
206
204
|
}
|
|
207
205
|
});
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
|
|
207
|
+
const highlightRange3 = at(
|
|
208
|
+
combinedHighlightRanges,
|
|
209
|
+
combinedHighlightRanges.length - 1,
|
|
210
|
+
)[1];
|
|
211
|
+
if (highlightRange3 < displayText.length) {
|
|
212
212
|
formattedNode.push(
|
|
213
213
|
<span
|
|
214
214
|
key={`${id}-${combinedHighlightRanges.length * 2 + 2}-${displayText.substring(
|
|
215
|
-
|
|
215
|
+
highlightRange3,
|
|
216
216
|
)}`}
|
|
217
217
|
>
|
|
218
|
-
{displayText.substring(
|
|
219
|
-
combinedHighlightRanges[combinedHighlightRanges.length - 1]![1],
|
|
220
|
-
)}
|
|
218
|
+
{displayText.substring(highlightRange3)}
|
|
221
219
|
</span>,
|
|
222
220
|
);
|
|
223
221
|
}
|
|
@@ -478,7 +478,7 @@ export const QueryBuilderTDSGridResult = observer(
|
|
|
478
478
|
useEffect(() => {
|
|
479
479
|
if (aggFuncParams) {
|
|
480
480
|
aggFuncParams.api.setColumnAggFunc(
|
|
481
|
-
aggFuncParams.colDef.field
|
|
481
|
+
guaranteeNonNullable(aggFuncParams.colDef.field),
|
|
482
482
|
QueryBuilderDataGridCustomAggregationFunction.WAVG,
|
|
483
483
|
);
|
|
484
484
|
}
|
|
@@ -72,6 +72,7 @@ import {
|
|
|
72
72
|
isNonEmptyString,
|
|
73
73
|
parseCSVString,
|
|
74
74
|
uniq,
|
|
75
|
+
at,
|
|
75
76
|
} from '@finos/legend-shared';
|
|
76
77
|
import { flowResult } from 'mobx';
|
|
77
78
|
import { observer } from 'mobx-react-lite';
|
|
@@ -1036,8 +1037,8 @@ const EnumCollectionInstanceValueEditor = observer(
|
|
|
1036
1037
|
(valueSpecification.values as EnumValueInstanceValue[])
|
|
1037
1038
|
.filter((valueSpec) => valueSpec.values[0]?.value !== undefined)
|
|
1038
1039
|
.map((valueSpec) => ({
|
|
1039
|
-
label: valueSpec.values
|
|
1040
|
-
value: valueSpec.values
|
|
1040
|
+
label: at(valueSpec.values, 0).value.name,
|
|
1041
|
+
value: at(valueSpec.values, 0).value,
|
|
1041
1042
|
})),
|
|
1042
1043
|
);
|
|
1043
1044
|
|
|
@@ -96,7 +96,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
|
|
|
96
96
|
if (mapping) {
|
|
97
97
|
mapping.includes = element.includedMappings
|
|
98
98
|
.map((mappingInclude) => {
|
|
99
|
-
// TODO : handle for mapping include
|
|
99
|
+
// TODO : handle for mapping include data product
|
|
100
100
|
if (mappingInclude instanceof V1_MappingIncludeMapping) {
|
|
101
101
|
return new MappingIncludeMapping(
|
|
102
102
|
mapping,
|
|
@@ -202,7 +202,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
|
|
|
202
202
|
if (mapping) {
|
|
203
203
|
mapping.includes = element.includedMappings
|
|
204
204
|
.map((mappingInclude) => {
|
|
205
|
-
// TODO : handle for mapping include
|
|
205
|
+
// TODO : handle for mapping include data product
|
|
206
206
|
if (mappingInclude instanceof V1_MappingIncludeMapping) {
|
|
207
207
|
return new MappingIncludeMapping(
|
|
208
208
|
mapping,
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
18
18
|
import {
|
|
19
|
-
getNullableFirstEntry,
|
|
20
19
|
guaranteeNonNullable,
|
|
21
20
|
guaranteeType,
|
|
22
21
|
type Hashable,
|
|
@@ -68,9 +67,7 @@ export const getPropertyChainName = (
|
|
|
68
67
|
const chunks = [propertyNameDecorator(propertyExpression.func.value.name)];
|
|
69
68
|
let currentExpression: ValueSpecification | undefined = propertyExpression;
|
|
70
69
|
while (currentExpression instanceof AbstractPropertyExpression) {
|
|
71
|
-
currentExpression =
|
|
72
|
-
currentExpression.parametersValues,
|
|
73
|
-
);
|
|
70
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
74
71
|
// Take care of chain of subtypes (a pattern that is not useful, but we want to support and potentially rectify)
|
|
75
72
|
// $x.employees->subType(@Person)->subType(@Staff).department
|
|
76
73
|
while (
|
|
@@ -86,9 +83,7 @@ export const getPropertyChainName = (
|
|
|
86
83
|
)[0]?.genericType?.value.rawType.name ?? '',
|
|
87
84
|
)})`;
|
|
88
85
|
chunks.unshift(subtypeChunk);
|
|
89
|
-
currentExpression =
|
|
90
|
-
currentExpression.parametersValues,
|
|
91
|
-
);
|
|
86
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
92
87
|
}
|
|
93
88
|
if (currentExpression instanceof AbstractPropertyExpression) {
|
|
94
89
|
chunks.unshift(propertyNameDecorator(currentExpression.func.value.name));
|
|
@@ -119,9 +114,7 @@ export const getPropertyPath = (
|
|
|
119
114
|
const propertyNameChain = [propertyExpression.func.value.name];
|
|
120
115
|
let currentExpression: ValueSpecification | undefined = propertyExpression;
|
|
121
116
|
while (currentExpression instanceof AbstractPropertyExpression) {
|
|
122
|
-
currentExpression =
|
|
123
|
-
currentExpression.parametersValues,
|
|
124
|
-
);
|
|
117
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
125
118
|
if (currentExpression instanceof AbstractPropertyExpression) {
|
|
126
119
|
propertyNameChain.unshift(currentExpression.func.value.name);
|
|
127
120
|
}
|
|
@@ -364,9 +357,7 @@ export class QueryBuilderPropertyExpressionState implements Hashable {
|
|
|
364
357
|
);
|
|
365
358
|
result.push(derivedPropertyExpressionState);
|
|
366
359
|
}
|
|
367
|
-
currentExpression =
|
|
368
|
-
currentExpression.parametersValues,
|
|
369
|
-
);
|
|
360
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
370
361
|
// Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
|
|
371
362
|
// $x.employees->subType(@Person)->subType(@Staff)
|
|
372
363
|
while (
|
|
@@ -376,9 +367,7 @@ export class QueryBuilderPropertyExpressionState implements Hashable {
|
|
|
376
367
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
|
377
368
|
)
|
|
378
369
|
) {
|
|
379
|
-
currentExpression =
|
|
380
|
-
currentExpression.parametersValues,
|
|
381
|
-
);
|
|
370
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
382
371
|
}
|
|
383
372
|
}
|
|
384
373
|
this.requiresExistsHandling = requiresExistsHandling;
|
|
@@ -49,7 +49,6 @@ import {
|
|
|
49
49
|
V1_serializeRawValueSpecification,
|
|
50
50
|
} from '@finos/legend-graph';
|
|
51
51
|
import {
|
|
52
|
-
getNullableFirstEntry,
|
|
53
52
|
guaranteeNonNullable,
|
|
54
53
|
guaranteeType,
|
|
55
54
|
isNonNullable,
|
|
@@ -102,7 +101,7 @@ const buildPropertyExpressionChainWithDefaultMilestoningDates = (
|
|
|
102
101
|
let nextExpression: ValueSpecification | undefined;
|
|
103
102
|
let currentExpression: ValueSpecification | undefined = newPropertyExpression;
|
|
104
103
|
while (currentExpression instanceof AbstractPropertyExpression) {
|
|
105
|
-
nextExpression =
|
|
104
|
+
nextExpression = currentExpression.parametersValues[0];
|
|
106
105
|
if (nextExpression instanceof AbstractPropertyExpression) {
|
|
107
106
|
const parameterValue = new AbstractPropertyExpression('');
|
|
108
107
|
parameterValue.func = nextExpression.func;
|
|
@@ -147,9 +146,7 @@ const buildPropertyExpressionChainWithDefaultMilestoningDates = (
|
|
|
147
146
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
|
148
147
|
)
|
|
149
148
|
) {
|
|
150
|
-
currentExpression =
|
|
151
|
-
currentExpression.parametersValues,
|
|
152
|
-
);
|
|
149
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
153
150
|
}
|
|
154
151
|
}
|
|
155
152
|
|
|
@@ -26,11 +26,7 @@ import {
|
|
|
26
26
|
VariableExpression,
|
|
27
27
|
type ValueSpecification,
|
|
28
28
|
} from '@finos/legend-graph';
|
|
29
|
-
import {
|
|
30
|
-
getNullableFirstEntry,
|
|
31
|
-
guaranteeNonNullable,
|
|
32
|
-
guaranteeType,
|
|
33
|
-
} from '@finos/legend-shared';
|
|
29
|
+
import { guaranteeNonNullable, guaranteeType } from '@finos/legend-shared';
|
|
34
30
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graph/QueryBuilderMetaModelConst.js';
|
|
35
31
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
|
36
32
|
import {
|
|
@@ -76,7 +72,7 @@ export const buildPropertyExpressionChain = (
|
|
|
76
72
|
let nextExpression: ValueSpecification | undefined;
|
|
77
73
|
let currentExpression: ValueSpecification | undefined = newPropertyExpression;
|
|
78
74
|
while (currentExpression instanceof AbstractPropertyExpression) {
|
|
79
|
-
nextExpression =
|
|
75
|
+
nextExpression = currentExpression.parametersValues[0];
|
|
80
76
|
if (nextExpression instanceof AbstractPropertyExpression) {
|
|
81
77
|
const parameterValue = new AbstractPropertyExpression('');
|
|
82
78
|
parameterValue.func = nextExpression.func;
|
|
@@ -173,9 +169,7 @@ export const buildPropertyExpressionChain = (
|
|
|
173
169
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
|
174
170
|
)
|
|
175
171
|
) {
|
|
176
|
-
currentExpression =
|
|
177
|
-
currentExpression.parametersValues,
|
|
178
|
-
);
|
|
172
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
179
173
|
}
|
|
180
174
|
}
|
|
181
175
|
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
assertErrorThrown,
|
|
33
33
|
uuid,
|
|
34
34
|
type GeneratorFn,
|
|
35
|
-
|
|
35
|
+
at,
|
|
36
36
|
} from '@finos/legend-shared';
|
|
37
37
|
import {
|
|
38
38
|
action,
|
|
@@ -239,7 +239,7 @@ export class DataAccessState {
|
|
|
239
239
|
|
|
240
240
|
let currentPercentageSum = 0;
|
|
241
241
|
for (let i = 0; i < info.data.length; ++i) {
|
|
242
|
-
const data =
|
|
242
|
+
const data = at(info.data, i);
|
|
243
243
|
if (currentPercentageSum + data.percentage >= 100) {
|
|
244
244
|
data.percentage = 100 - currentPercentageSum;
|
|
245
245
|
info.data = info.data.slice(0, i + 1);
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
assertType,
|
|
25
25
|
UnsupportedOperationError,
|
|
26
26
|
StopWatch,
|
|
27
|
+
at,
|
|
27
28
|
} from '@finos/legend-shared';
|
|
28
29
|
import {
|
|
29
30
|
type AbstractProperty,
|
|
@@ -871,7 +872,7 @@ export class QueryBuilderExplorerState {
|
|
|
871
872
|
parentNodeIdElements.length > 0 &&
|
|
872
873
|
parentNodeIdElements[parentNodeIdElements.length - 1] !== undefined
|
|
873
874
|
) {
|
|
874
|
-
parentNodeIdElements
|
|
875
|
+
at(parentNodeIdElements, parentNodeIdElements.length - 1).pop();
|
|
875
876
|
}
|
|
876
877
|
|
|
877
878
|
let currentNodeId = '';
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
assertErrorThrown,
|
|
35
35
|
assertTrue,
|
|
36
36
|
deleteEntry,
|
|
37
|
-
getNullableFirstEntry,
|
|
38
37
|
guaranteeNonNullable,
|
|
39
38
|
guaranteeType,
|
|
40
39
|
IllegalStateError,
|
|
@@ -695,7 +694,7 @@ export class QueryBuilderPostFilterState
|
|
|
695
694
|
this.rootIds.length < 2,
|
|
696
695
|
'Query builder post-filter tree cannot have more than 1 root',
|
|
697
696
|
);
|
|
698
|
-
const rootId =
|
|
697
|
+
const rootId = this.rootIds[0];
|
|
699
698
|
return rootId ? this.getNode(rootId) : undefined;
|
|
700
699
|
}
|
|
701
700
|
|
package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
LambdaFunctionInstanceValue,
|
|
33
33
|
} from '@finos/legend-graph';
|
|
34
34
|
import {
|
|
35
|
+
at,
|
|
35
36
|
guaranteeNonNullable,
|
|
36
37
|
UnsupportedOperationError,
|
|
37
38
|
} from '@finos/legend-shared';
|
|
@@ -402,10 +403,10 @@ export const appendProjection = (
|
|
|
402
403
|
aggregateCalendarLambda &&
|
|
403
404
|
aggregateCalendarLambda instanceof LambdaFunctionInstanceValue
|
|
404
405
|
) {
|
|
405
|
-
aggregateCalendarLambda.values
|
|
406
|
+
at(aggregateCalendarLambda.values, 0).expressionSequence[0] =
|
|
406
407
|
wavgRowMapper;
|
|
407
408
|
} else if (columnLambda instanceof LambdaFunctionInstanceValue) {
|
|
408
|
-
columnLambda.values
|
|
409
|
+
at(columnLambda.values, 0).expressionSequence[0] = wavgRowMapper;
|
|
409
410
|
}
|
|
410
411
|
}
|
|
411
412
|
aggregateFunctionExpression.parametersValues = [
|
|
@@ -19,7 +19,6 @@ import type { TreeNodeData, TreeData } from '@finos/legend-art';
|
|
|
19
19
|
import {
|
|
20
20
|
type GeneratorFn,
|
|
21
21
|
assertTrue,
|
|
22
|
-
getNullableFirstEntry,
|
|
23
22
|
guaranteeNonNullable,
|
|
24
23
|
guaranteeType,
|
|
25
24
|
IllegalStateError,
|
|
@@ -103,9 +102,7 @@ export const isCollectionProperty = (
|
|
|
103
102
|
) {
|
|
104
103
|
return true;
|
|
105
104
|
}
|
|
106
|
-
currentExpression =
|
|
107
|
-
currentExpression.parametersValues,
|
|
108
|
-
);
|
|
105
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
109
106
|
// Take care of chains of subtype
|
|
110
107
|
while (
|
|
111
108
|
currentExpression instanceof SimpleFunctionExpression &&
|
|
@@ -114,9 +111,7 @@ export const isCollectionProperty = (
|
|
|
114
111
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
|
115
112
|
)
|
|
116
113
|
) {
|
|
117
|
-
currentExpression =
|
|
118
|
-
currentExpression.parametersValues,
|
|
119
|
-
);
|
|
114
|
+
currentExpression = currentExpression.parametersValues[0];
|
|
120
115
|
}
|
|
121
116
|
}
|
|
122
117
|
return false;
|
|
@@ -750,7 +745,7 @@ export class QueryBuilderFilterState
|
|
|
750
745
|
this.rootIds.length < 2,
|
|
751
746
|
'Query builder filter tree cannot have more than 1 root',
|
|
752
747
|
);
|
|
753
|
-
const rootId =
|
|
748
|
+
const rootId = this.rootIds[0];
|
|
754
749
|
return rootId ? this.getNode(rootId) : undefined;
|
|
755
750
|
}
|
|
756
751
|
|
|
@@ -22,8 +22,6 @@ import {
|
|
|
22
22
|
RuntimePointer,
|
|
23
23
|
PackageableElementExplicitReference,
|
|
24
24
|
} from '@finos/legend-graph';
|
|
25
|
-
import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
26
|
-
import type React from 'react';
|
|
27
25
|
import { renderClassQueryBuilderSetupPanelContent } from '../../components/workflows/ClassQueryBuilder.js';
|
|
28
26
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
29
27
|
|
|
@@ -50,7 +48,7 @@ export class ClassQueryBuilderState extends QueryBuilderState {
|
|
|
50
48
|
return;
|
|
51
49
|
}
|
|
52
50
|
// try to select the first compatible mapping
|
|
53
|
-
const possibleNewMapping =
|
|
51
|
+
const possibleNewMapping = compatibleMappings[0];
|
|
54
52
|
if (possibleNewMapping) {
|
|
55
53
|
this.changeMapping(possibleNewMapping);
|
|
56
54
|
this.propagateMappingChange(possibleNewMapping);
|
|
@@ -69,7 +67,7 @@ export class ClassQueryBuilderState extends QueryBuilderState {
|
|
|
69
67
|
mapping,
|
|
70
68
|
this.graphManagerState.usableRuntimes,
|
|
71
69
|
);
|
|
72
|
-
const possibleNewRuntime =
|
|
70
|
+
const possibleNewRuntime = compatibleRuntimes[0];
|
|
73
71
|
if (possibleNewRuntime) {
|
|
74
72
|
this.changeRuntime(
|
|
75
73
|
new RuntimePointer(
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
PackageableElementExplicitReference,
|
|
25
25
|
getMappingCompatibleClasses,
|
|
26
26
|
} from '@finos/legend-graph';
|
|
27
|
-
import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
28
27
|
import { renderMappingQueryBuilderSetupPanelContent } from '../../components/workflows/MappingQueryBuilder.js';
|
|
29
28
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
30
29
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
@@ -78,7 +77,7 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
78
77
|
mapping,
|
|
79
78
|
this.graphManagerState.usableRuntimes,
|
|
80
79
|
);
|
|
81
|
-
const possibleNewRuntime =
|
|
80
|
+
const possibleNewRuntime = compatibleRuntimes[0];
|
|
82
81
|
if (possibleNewRuntime) {
|
|
83
82
|
this.changeRuntime(
|
|
84
83
|
new RuntimePointer(
|
|
@@ -94,7 +93,7 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
94
93
|
// if there is no chosen class or the chosen one is not compatible
|
|
95
94
|
// with the mapping then pick a compatible class if possible
|
|
96
95
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
97
|
-
const possibleNewClass =
|
|
96
|
+
const possibleNewClass = compatibleClasses[0];
|
|
98
97
|
if (possibleNewClass) {
|
|
99
98
|
this.changeClass(possibleNewClass);
|
|
100
99
|
}
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
} from '@finos/legend-graph';
|
|
27
27
|
import {
|
|
28
28
|
assertTrue,
|
|
29
|
-
getNullableFirstEntry,
|
|
30
29
|
guaranteeNonNullable,
|
|
31
30
|
IllegalStateError,
|
|
32
31
|
} from '@finos/legend-shared';
|
|
@@ -171,7 +170,7 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
|
171
170
|
// if there is no chosen class or the chosen one is not compatible
|
|
172
171
|
// with the mapping then pick a compatible class if possible
|
|
173
172
|
if (!this.class || !compatibleClasses.includes(this.class)) {
|
|
174
|
-
const possibleNewClass =
|
|
173
|
+
const possibleNewClass = compatibleClasses[0];
|
|
175
174
|
if (possibleNewClass) {
|
|
176
175
|
this.changeClass(possibleNewClass);
|
|
177
176
|
}
|