@finos/legend-query-builder 4.2.4 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +3 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +16 -0
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +85 -7
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryChat.d.ts.map +1 -1
- package/lib/components/QueryChat.js +1 -1
- package/lib/components/QueryChat.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +2 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +5 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +13 -9
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +13 -11
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +3 -2
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderExecutionContextState.d.ts +34 -0
- package/lib/stores/QueryBuilderExecutionContextState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderExecutionContextState.js +59 -0
- package/lib/stores/QueryBuilderExecutionContextState.js.map +1 -0
- package/lib/stores/QueryBuilderInternalizeState.d.ts +24 -0
- package/lib/stores/QueryBuilderInternalizeState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderInternalizeState.js +26 -0
- package/lib/stores/QueryBuilderInternalizeState.js.map +1 -0
- package/lib/stores/QueryBuilderResultState.js +5 -5
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +7 -5
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +19 -17
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +27 -2
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +28 -2
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.d.ts.map +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js +2 -2
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.d.ts.map +1 -1
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js +6 -4
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +9 -9
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +25 -2
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.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 +3 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +2 -1
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/workflows/ClassQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ClassQueryBuilderState.js +2 -1
- package/lib/stores/workflows/ClassQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/FunctionQueryBuilderState.d.ts +23 -0
- package/lib/stores/workflows/FunctionQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/workflows/FunctionQueryBuilderState.js +27 -0
- package/lib/stores/workflows/FunctionQueryBuilderState.js.map +1 -0
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +7 -7
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +4 -4
- package/src/components/QueryBuilder.tsx +5 -1
- package/src/components/QueryBuilderSideBar.tsx +211 -7
- package/src/components/QueryChat.tsx +2 -1
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +2 -2
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -1
- package/src/components/workflows/ClassQueryBuilder.tsx +17 -9
- package/src/components/workflows/MappingQueryBuilder.tsx +15 -11
- package/src/components/workflows/ServiceQueryBuilder.tsx +3 -2
- package/src/index.ts +1 -0
- package/src/stores/QueryBuilderExecutionContextState.ts +69 -0
- package/src/stores/QueryBuilderInternalizeState.ts +34 -0
- package/src/stores/QueryBuilderResultState.ts +6 -6
- package/src/stores/QueryBuilderState.ts +28 -21
- package/src/stores/QueryBuilderStateBuilder.ts +79 -1
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +50 -1
- package/src/stores/__test-utils__/QueryBuilderStateTestUtils.ts +4 -2
- package/src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts +6 -4
- package/src/stores/explorer/QueryBuilderExplorerState.ts +9 -9
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +64 -2
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +4 -2
- package/src/stores/filter/QueryBuilderFilterState.ts +5 -2
- package/src/stores/workflows/ClassQueryBuilderState.ts +2 -1
- package/src/stores/workflows/FunctionQueryBuilderState.ts +38 -0
- package/src/stores/workflows/ServiceQueryBuilderState.ts +7 -11
- package/tsconfig.json +3 -0
@@ -78,12 +78,8 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
78
78
|
this.onExecutionContextChange = onExecutionContextChange;
|
79
79
|
|
80
80
|
if (service.execution instanceof PureSingleExecution) {
|
81
|
-
|
82
|
-
|
83
|
-
'Service queries without runtime/mapping are not supported',
|
84
|
-
);
|
85
|
-
this.mapping = service.execution.mapping?.value;
|
86
|
-
this.runtimeValue = service.execution.runtime;
|
81
|
+
this.executionContextState.mapping = service.execution.mapping?.value;
|
82
|
+
this.executionContextState.runtimeValue = service.execution.runtime;
|
87
83
|
} else if (service.execution instanceof PureMultiExecution) {
|
88
84
|
this.executionContexts = service.execution.executionParameters.map(
|
89
85
|
(ep) => ({
|
@@ -92,7 +88,6 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
92
88
|
runtimeValue: ep.runtime,
|
93
89
|
}),
|
94
90
|
);
|
95
|
-
|
96
91
|
let selectedExecutionContext: ServiceExecutionContext;
|
97
92
|
if (executionContextKey) {
|
98
93
|
const matchingExecutionContext = this.executionContexts.find(
|
@@ -115,8 +110,9 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
115
110
|
}
|
116
111
|
|
117
112
|
this.setSelectedExecutionContext(selectedExecutionContext);
|
118
|
-
this.mapping = selectedExecutionContext.mapping;
|
119
|
-
this.runtimeValue =
|
113
|
+
this.executionContextState.mapping = selectedExecutionContext.mapping;
|
114
|
+
this.executionContextState.runtimeValue =
|
115
|
+
selectedExecutionContext.runtimeValue;
|
120
116
|
}
|
121
117
|
}
|
122
118
|
|
@@ -131,11 +127,11 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
131
127
|
}
|
132
128
|
|
133
129
|
override get isMappingReadOnly(): boolean {
|
134
|
-
return
|
130
|
+
return !this.executionContextState.specifiedInQuery;
|
135
131
|
}
|
136
132
|
|
137
133
|
override get isRuntimeReadOnly(): boolean {
|
138
|
-
return
|
134
|
+
return !this.executionContextState.specifiedInQuery;
|
139
135
|
}
|
140
136
|
|
141
137
|
/**
|
package/tsconfig.json
CHANGED
@@ -58,7 +58,9 @@
|
|
58
58
|
"./src/stores/QueryBuilderCommand.ts",
|
59
59
|
"./src/stores/QueryBuilderConfig.ts",
|
60
60
|
"./src/stores/QueryBuilderConstantsState.ts",
|
61
|
+
"./src/stores/QueryBuilderExecutionContextState.ts",
|
61
62
|
"./src/stores/QueryBuilderGroupOperationHelper.ts",
|
63
|
+
"./src/stores/QueryBuilderInternalizeState.ts",
|
62
64
|
"./src/stores/QueryBuilderParametersState.ts",
|
63
65
|
"./src/stores/QueryBuilderPreviewDataHelper.ts",
|
64
66
|
"./src/stores/QueryBuilderPropertyEditorState.ts",
|
@@ -205,6 +207,7 @@
|
|
205
207
|
"./src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts",
|
206
208
|
"./src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts",
|
207
209
|
"./src/stores/workflows/ClassQueryBuilderState.ts",
|
210
|
+
"./src/stores/workflows/FunctionQueryBuilderState.ts",
|
208
211
|
"./src/stores/workflows/MappingQueryBuilderState.ts",
|
209
212
|
"./src/stores/workflows/ServiceQueryBuilderState.ts",
|
210
213
|
"./src/components/QueryBuilder.tsx",
|