@finos/legend-query-builder 0.6.31 → 0.6.33
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/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +3 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js +2 -2
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +3 -2
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -1
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderNavigationBlocker.js +4 -4
- package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +4 -3
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +4 -4
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +9 -6
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +3 -3
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -2
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +9 -6
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +3 -3
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.js +3 -3
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +6 -4
- 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 +6 -4
- 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/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +2 -2
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/LegendQueryStorage.d.ts +19 -0
- package/lib/stores/LegendQueryStorage.d.ts.map +1 -0
- package/lib/stores/LegendQueryStorage.js +20 -0
- package/lib/stores/LegendQueryStorage.js.map +1 -0
- package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +1 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +6 -6
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +10 -10
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js +4 -4
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +4 -4
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +7 -4
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +2 -2
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +10 -10
- package/src/components/QueryBuilder.tsx +8 -1
- package/src/components/QueryBuilderComponentTestUtils.tsx +5 -2
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +6 -2
- package/src/components/QueryBuilderDiffPanel.tsx +1 -1
- package/src/components/QueryBuilderNavigationBlocker.tsx +4 -4
- package/src/components/QueryBuilderParametersPanel.tsx +9 -3
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +1 -1
- package/src/components/QueryBuilderResultPanel.tsx +4 -4
- package/src/components/QueryBuilderSideBar.tsx +18 -6
- package/src/components/QueryBuilderTextEditor.tsx +14 -6
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +2 -2
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +3 -3
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -1
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +13 -6
- package/src/components/filter/QueryBuilderFilterPanel.tsx +3 -3
- package/src/components/shared/BasicValueSpecificationEditor.tsx +3 -1
- package/src/components/shared/LambdaEditor.tsx +3 -3
- package/src/components/workflows/ClassQueryBuilder.tsx +12 -4
- package/src/components/workflows/MappingQueryBuilder.tsx +12 -4
- package/src/components/workflows/ServiceQueryBuilder.tsx +7 -2
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +2 -2
- package/src/stores/LegendQueryStorage.ts +19 -0
- package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
- package/src/stores/QueryBuilderConstantsState.ts +3 -1
- package/src/stores/QueryBuilderResultState.ts +12 -6
- package/src/stores/QueryBuilderState.ts +16 -10
- package/src/stores/QueryBuilderTextEditorState.ts +4 -4
- package/src/stores/explorer/QueryBuilderExplorerState.ts +6 -4
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +3 -3
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +1 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +10 -4
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +2 -2
- package/src/stores/filter/QueryBuilderFilterState.ts +3 -1
- package/tsconfig.json +1 -0
|
@@ -679,7 +679,9 @@ export class QueryBuilderExplorerState {
|
|
|
679
679
|
this.refreshTreeData();
|
|
680
680
|
} catch (error) {
|
|
681
681
|
assertErrorThrown(error);
|
|
682
|
-
this.queryBuilderState.applicationStore.notifyError(
|
|
682
|
+
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
683
|
+
error.message,
|
|
684
|
+
);
|
|
683
685
|
} finally {
|
|
684
686
|
this.mappingModelCoverageAnalysisState.complete();
|
|
685
687
|
}
|
|
@@ -691,7 +693,7 @@ export class QueryBuilderExplorerState {
|
|
|
691
693
|
): GeneratorFn<void> {
|
|
692
694
|
const runtime = this.queryBuilderState.runtimeValue;
|
|
693
695
|
if (!runtime) {
|
|
694
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
696
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
695
697
|
`Can't preview data for property '${node.property.name}': runtime is not specified`,
|
|
696
698
|
);
|
|
697
699
|
return;
|
|
@@ -704,7 +706,7 @@ export class QueryBuilderExplorerState {
|
|
|
704
706
|
return;
|
|
705
707
|
}
|
|
706
708
|
if (this.previewDataState.isGeneratingPreviewData) {
|
|
707
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
709
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
708
710
|
`Can't preview data for property '${node.property.name}': another preview request is being executed`,
|
|
709
711
|
);
|
|
710
712
|
return;
|
|
@@ -786,7 +788,7 @@ export class QueryBuilderExplorerState {
|
|
|
786
788
|
}
|
|
787
789
|
} catch (error) {
|
|
788
790
|
assertErrorThrown(error);
|
|
789
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
791
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
790
792
|
`Can't preview data for property '${node.property.name}'. Error: ${error.message}`,
|
|
791
793
|
);
|
|
792
794
|
this.previewDataState.setPreviewData(undefined);
|
|
@@ -181,7 +181,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
181
181
|
},
|
|
182
182
|
): void {
|
|
183
183
|
if (!this.treeData) {
|
|
184
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
184
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
185
185
|
`Can't add property: graph-fetch tree has not been properly initialized`,
|
|
186
186
|
);
|
|
187
187
|
return;
|
|
@@ -211,7 +211,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
211
211
|
|
|
212
212
|
fetchProperties(nodes: QueryBuilderExplorerTreePropertyNodeData[]): void {
|
|
213
213
|
if (!this.treeData) {
|
|
214
|
-
this.queryBuilderState.applicationStore.notifyWarning(
|
|
214
|
+
this.queryBuilderState.applicationStore.notificationService.notifyWarning(
|
|
215
215
|
`Can't add property: graph-fetch tree has not been properly initialized`,
|
|
216
216
|
);
|
|
217
217
|
return;
|
|
@@ -224,7 +224,7 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
224
224
|
|
|
225
225
|
checkBeforeChangingImplementation(onChange: () => void): void {
|
|
226
226
|
if (this.treeData?.rootIds.length) {
|
|
227
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
227
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
228
228
|
message:
|
|
229
229
|
'Current graph-fetch will be lost when switching to projection mode. Do you still want to proceed?',
|
|
230
230
|
type: ActionAlertType.CAUTION,
|
|
@@ -253,7 +253,7 @@ export const addQueryBuilderPropertyNode = (
|
|
|
253
253
|
parentExplorerTreeNode.parentId,
|
|
254
254
|
);
|
|
255
255
|
} else {
|
|
256
|
-
queryBuilderState.applicationStore.notifyError(
|
|
256
|
+
queryBuilderState.applicationStore.notificationService.notifyError(
|
|
257
257
|
`Can't cast the root class of graph fetch structure to its subtype`,
|
|
258
258
|
);
|
|
259
259
|
return;
|
|
@@ -96,6 +96,7 @@ import { QueryBuilderWindowState } from './window/QueryBuilderWindowState.js';
|
|
|
96
96
|
import type { QueryBuilderTDS_WindowOperator } from './window/operators/QueryBuilderTDS_WindowOperator.js';
|
|
97
97
|
import { getQueryBuilderCoreWindowOperators } from './window/QueryBuilderWindowGroupByOperatorLoader.js';
|
|
98
98
|
import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
|
|
99
|
+
import { LEGEND_QUERY_SETTINGS_KEY } from '../../LegendQueryStorage.js';
|
|
99
100
|
|
|
100
101
|
export class QueryBuilderTDSState
|
|
101
102
|
extends QueryBuilderFetchStructureImplementationState
|
|
@@ -107,7 +108,7 @@ export class QueryBuilderTDSState
|
|
|
107
108
|
readonly resultSetModifierState: QueryResultSetModifierState;
|
|
108
109
|
projectionColumns: QueryBuilderProjectionColumnState[] = [];
|
|
109
110
|
isConvertDerivationProjectionObjects = false;
|
|
110
|
-
showPostFilterPanel
|
|
111
|
+
showPostFilterPanel: boolean;
|
|
111
112
|
showWindowFuncPanel = false;
|
|
112
113
|
|
|
113
114
|
postFilterOperators: QueryBuilderPostFilterOperator[] =
|
|
@@ -152,6 +153,11 @@ export class QueryBuilderTDSState
|
|
|
152
153
|
this,
|
|
153
154
|
this.windowFuncOperators,
|
|
154
155
|
);
|
|
156
|
+
this.showPostFilterPanel =
|
|
157
|
+
this.queryBuilderState.applicationStore.storageService.settingsStore.getBooleanValue(
|
|
158
|
+
LEGEND_QUERY_SETTINGS_KEY.EDITOR_SHOW_POST_FILTER,
|
|
159
|
+
false,
|
|
160
|
+
);
|
|
155
161
|
}
|
|
156
162
|
|
|
157
163
|
get type(): string {
|
|
@@ -360,7 +366,7 @@ export class QueryBuilderTDSState
|
|
|
360
366
|
});
|
|
361
367
|
} catch (error) {
|
|
362
368
|
assertErrorThrown(error);
|
|
363
|
-
this.queryBuilderState.applicationStore.
|
|
369
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
364
370
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
365
371
|
error,
|
|
366
372
|
);
|
|
@@ -609,7 +615,7 @@ export class QueryBuilderTDSState
|
|
|
609
615
|
}
|
|
610
616
|
|
|
611
617
|
checkBeforeClearingColumns(onChange: () => void): void {
|
|
612
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
618
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
613
619
|
message:
|
|
614
620
|
'You will be clearing all projection columns. Do you still want to proceed?',
|
|
615
621
|
type: ActionAlertType.CAUTION,
|
|
@@ -637,7 +643,7 @@ export class QueryBuilderTDSState
|
|
|
637
643
|
// but we make the assumption that if there is no projection column, there should
|
|
638
644
|
// not be any post-filter at all
|
|
639
645
|
) {
|
|
640
|
-
this.queryBuilderState.applicationStore.setActionAlertInfo({
|
|
646
|
+
this.queryBuilderState.applicationStore.alertService.setActionAlertInfo({
|
|
641
647
|
message:
|
|
642
648
|
this.showPostFilterPanel && this.postFilterState.nodes.size > 0
|
|
643
649
|
? 'With graph-fetch mode, post filter is not supported. Current projection columns and post filters will be lost when switching to the graph-fetch mode. Do you still want to proceed?'
|
|
@@ -452,7 +452,7 @@ export class PostFilterConditionState implements Hashable {
|
|
|
452
452
|
}
|
|
453
453
|
} catch (error) {
|
|
454
454
|
assertErrorThrown(error);
|
|
455
|
-
this.postFilterState.tdsState.queryBuilderState.applicationStore.notifyError(
|
|
455
|
+
this.postFilterState.tdsState.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
456
456
|
`Can't drag column '${columnState.columnName}' due to: ${error.message}`,
|
|
457
457
|
);
|
|
458
458
|
}
|
|
@@ -215,7 +215,7 @@ class QueryBuilderDerivationProjectionLambdaState extends LambdaEditorState {
|
|
|
215
215
|
if (error instanceof ParserError) {
|
|
216
216
|
this.setParserError(error);
|
|
217
217
|
}
|
|
218
|
-
this.queryBuilderState.applicationStore.
|
|
218
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
219
219
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
220
220
|
error,
|
|
221
221
|
);
|
|
@@ -251,7 +251,7 @@ class QueryBuilderDerivationProjectionLambdaState extends LambdaEditorState {
|
|
|
251
251
|
this.clearErrors();
|
|
252
252
|
} catch (error) {
|
|
253
253
|
assertErrorThrown(error);
|
|
254
|
-
this.queryBuilderState.applicationStore.
|
|
254
|
+
this.queryBuilderState.applicationStore.logService.error(
|
|
255
255
|
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
|
256
256
|
error,
|
|
257
257
|
);
|
|
@@ -158,7 +158,9 @@ export class FilterConditionState implements Hashable {
|
|
|
158
158
|
new FilterConditionState(this.filterState, propertyExpression);
|
|
159
159
|
} catch (error) {
|
|
160
160
|
assertErrorThrown(error);
|
|
161
|
-
this.filterState.queryBuilderState.applicationStore.notifyError(
|
|
161
|
+
this.filterState.queryBuilderState.applicationStore.notificationService.notifyError(
|
|
162
|
+
error,
|
|
163
|
+
);
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
166
|
|
package/tsconfig.json
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"./src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts",
|
|
49
49
|
"./src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts",
|
|
50
50
|
"./src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts",
|
|
51
|
+
"./src/stores/LegendQueryStorage.ts",
|
|
51
52
|
"./src/stores/QueryBuilderBootstraper.ts",
|
|
52
53
|
"./src/stores/QueryBuilderChangeDetectionState.ts",
|
|
53
54
|
"./src/stores/QueryBuilderCommand.ts",
|