@finos/legend-query-builder 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/components/QueryBuilder.d.ts +22 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -0
- package/lib/components/QueryBuilder.js +111 -0
- package/lib/components/QueryBuilder.js.map +1 -0
- package/lib/components/QueryBuilderComponentTestUtils.d.ts +24 -0
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -0
- package/lib/components/QueryBuilderComponentTestUtils.js +54 -0
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -0
- package/lib/components/QueryBuilderParametersPanel.d.ts +31 -0
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderParametersPanel.js +128 -0
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +29 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +116 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts +22 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderResultPanel.js +242 -0
- package/lib/components/QueryBuilderResultPanel.js.map +1 -0
- package/lib/components/QueryBuilderSideBar.d.ts +41 -0
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -0
- package/lib/components/QueryBuilderSideBar.js +169 -0
- package/lib/components/QueryBuilderSideBar.js.map +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts +22 -0
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderTextEditor.js +48 -0
- package/lib/components/QueryBuilderTextEditor.js.map +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +22 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +36 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -0
- package/lib/components/QueryBuilder_TestID.d.ts +26 -0
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -0
- package/lib/components/QueryBuilder_TestID.js +27 -0
- package/lib/components/QueryBuilder_TestID.js.map +1 -0
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +36 -0
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +340 -0
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +22 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +147 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -0
- package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts +22 -0
- package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderMilestoneEditor.js +122 -0
- package/lib/components/explorer/QueryBuilderMilestoneEditor.js.map +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +23 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +200 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +52 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +31 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +94 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +30 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +378 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +216 -0
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +88 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +22 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.js +316 -0
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -0
- package/lib/components/shared/ElementIconUtils.d.ts +18 -0
- package/lib/components/shared/ElementIconUtils.d.ts.map +1 -0
- package/lib/components/shared/ElementIconUtils.js +37 -0
- package/lib/components/shared/ElementIconUtils.js.map +1 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +42 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.js +47 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.js.map +1 -0
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.d.ts +20 -0
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +28 -0
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts +26 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +32 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -0
- package/lib/components/workflows/ClassQueryBuilder.d.ts +18 -0
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -0
- package/lib/components/workflows/ClassQueryBuilder.js +87 -0
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -0
- package/lib/components/workflows/MappingQueryBuilder.d.ts +18 -0
- package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -0
- package/lib/components/workflows/MappingQueryBuilder.js +88 -0
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -0
- package/lib/components/workflows/ServiceQueryBuilder.d.ts +18 -0
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -0
- package/lib/components/workflows/ServiceQueryBuilder.js +69 -0
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +60 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js +65 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPlugin.d.ts +21 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPlugin.d.ts.map +1 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPlugin.js +27 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPlugin.js.map +1 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPreset.d.ts +24 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPreset.d.ts.map +1 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPreset.js +32 -0
- package/lib/graphManager/QueryBuilder_GraphManagerPreset.js.map +1 -0
- package/lib/graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.d.ts +21 -0
- package/lib/graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.d.ts.map +1 -0
- package/lib/graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.js +20 -0
- package/lib/graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.js.map +1 -0
- package/lib/graphManager/action/analytics/ServiceExecutionAnalysis.d.ts +21 -0
- package/lib/graphManager/action/analytics/ServiceExecutionAnalysis.d.ts.map +1 -0
- package/lib/graphManager/action/analytics/ServiceExecutionAnalysis.js +20 -0
- package/lib/graphManager/action/analytics/ServiceExecutionAnalysis.js.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.d.ts +25 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.js +21 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.js.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtensionBuilder.d.ts +18 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtensionBuilder.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtensionBuilder.js +20 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtensionBuilder.js.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts +22 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +70 -0
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.d.ts +22 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.js +207 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.js.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts +18 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js +18 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.d.ts +29 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +182 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +95 -0
- package/lib/stores/QueryBuilderBootstraper.d.ts +17 -0
- package/lib/stores/QueryBuilderBootstraper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderBootstraper.js +22 -0
- package/lib/stores/QueryBuilderBootstraper.js.map +1 -0
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts +25 -0
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderChangeDetectionState.js +32 -0
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts +32 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -0
- package/lib/stores/QueryBuilderConfig.js +34 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -0
- package/lib/stores/QueryBuilderGroupOperationHelper.d.ts +22 -0
- package/lib/stores/QueryBuilderGroupOperationHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderGroupOperationHelper.js +43 -0
- package/lib/stores/QueryBuilderGroupOperationHelper.js.map +1 -0
- package/lib/stores/QueryBuilderMilestoningState.d.ts +32 -0
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderMilestoningState.js +95 -0
- package/lib/stores/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/QueryBuilderParametersState.d.ts +28 -0
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderParametersState.js +39 -0
- package/lib/stores/QueryBuilderParametersState.js.map +1 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts +26 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.js +138 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -0
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +62 -0
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPropertyEditorState.js +395 -0
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -0
- package/lib/stores/QueryBuilderResultState.d.ts +41 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderResultState.js +176 -0
- package/lib/stores/QueryBuilderResultState.js.map +1 -0
- package/lib/stores/QueryBuilderState.d.ts +110 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderState.js +334 -0
- package/lib/stores/QueryBuilderState.js.map +1 -0
- package/lib/stores/QueryBuilderStateBuilder.d.ts +124 -0
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -0
- package/lib/stores/QueryBuilderStateBuilder.js +311 -0
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -0
- package/lib/stores/QueryBuilderStateTestUtils.d.ts +24 -0
- package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -0
- package/lib/stores/QueryBuilderStateTestUtils.js +50 -0
- package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -0
- package/lib/stores/QueryBuilderTextEditorState.d.ts +49 -0
- package/lib/stores/QueryBuilderTextEditorState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderTextEditorState.js +145 -0
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts +24 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.js +85 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -0
- package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts +26 -0
- package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderUnsupportedQueryState.js +37 -0
- package/lib/stores/QueryBuilderUnsupportedQueryState.js.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts +20 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +87 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +27 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +161 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +61 -0
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +235 -0
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +99 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.js +446 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -0
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +46 -0
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -0
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js +242 -0
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -0
- package/lib/stores/explorer/QueryFunctionsExplorerState.d.ts +59 -0
- package/lib/stores/explorer/QueryFunctionsExplorerState.d.ts.map +1 -0
- package/lib/stores/explorer/QueryFunctionsExplorerState.js +228 -0
- package/lib/stores/explorer/QueryFunctionsExplorerState.js.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +40 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +34 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +27 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +73 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +49 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +157 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +20 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +62 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +42 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +173 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts +26 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js +72 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +73 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +187 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +68 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +305 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts +25 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js +186 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts +26 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +189 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts +43 -0
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js +77 -0
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js +36 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.d.ts +18 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.js +38 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts +42 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js +103 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts +20 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js +96 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.d.ts +22 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.js +40 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +50 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +55 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts +26 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +50 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +78 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +67 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts +26 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +86 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts +26 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +86 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +50 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +50 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts +26 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +45 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts +29 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js +30 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.d.ts +18 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.js +44 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts +135 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js +585 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.d.ts +22 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js +122 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +79 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +23 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +73 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +75 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +75 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +118 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +81 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +24 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +43 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +104 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +33 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +67 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts +27 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +81 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +24 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +43 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts +32 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +75 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +27 -0
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterOperator.js +20 -0
- package/lib/stores/filter/QueryBuilderFilterOperator.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterOperatorLoader.d.ts +18 -0
- package/lib/stores/filter/QueryBuilderFilterOperatorLoader.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterOperatorLoader.js +44 -0
- package/lib/stores/filter/QueryBuilderFilterOperatorLoader.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +123 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterState.js +531 -0
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts +19 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +74 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +78 -0
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts +21 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js +257 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +71 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +71 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +115 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +27 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +83 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +27 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +83 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +103 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +65 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +27 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +83 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +27 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +83 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +32 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +71 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -0
- package/lib/stores/workflows/ClassQueryBuilderState.d.ts +35 -0
- package/lib/stores/workflows/ClassQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/workflows/ClassQueryBuilderState.js +57 -0
- package/lib/stores/workflows/ClassQueryBuilderState.js.map +1 -0
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts +33 -0
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/workflows/MappingQueryBuilderState.js +55 -0
- package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -0
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +44 -0
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/workflows/ServiceQueryBuilderState.js +90 -0
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -0
- package/package.json +95 -0
- package/src/components/QueryBuilder.tsx +411 -0
- package/src/components/QueryBuilderComponentTestUtils.tsx +122 -0
- package/src/components/QueryBuilderParametersPanel.tsx +431 -0
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +376 -0
- package/src/components/QueryBuilderResultPanel.tsx +640 -0
- package/src/components/QueryBuilderSideBar.tsx +421 -0
- package/src/components/QueryBuilderTextEditor.tsx +127 -0
- package/src/components/QueryBuilderUnsupportedQueryEditor.tsx +88 -0
- package/src/components/QueryBuilder_TestID.ts +26 -0
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +934 -0
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +554 -0
- package/src/components/explorer/QueryBuilderMilestoneEditor.tsx +296 -0
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +617 -0
- package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +112 -0
- package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +276 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +1103 -0
- package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +649 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +254 -0
- package/src/components/filter/QueryBuilderFilterPanel.tsx +891 -0
- package/src/components/shared/ElementIconUtils.tsx +47 -0
- package/src/components/shared/QueryBuilderLambdaEditor.tsx +120 -0
- package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +40 -0
- package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +87 -0
- package/src/components/workflows/ClassQueryBuilder.tsx +198 -0
- package/src/components/workflows/MappingQueryBuilder.tsx +195 -0
- package/src/components/workflows/ServiceQueryBuilder.tsx +192 -0
- package/src/graphManager/QueryBuilderSupportedFunctions.ts +67 -0
- package/src/graphManager/QueryBuilder_GraphManagerPlugin.ts +32 -0
- package/src/graphManager/QueryBuilder_GraphManagerPreset.ts +33 -0
- package/src/graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.ts +22 -0
- package/src/graphManager/action/analytics/ServiceExecutionAnalysis.ts +22 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.ts +47 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtensionBuilder.ts +27 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +167 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.ts +571 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.ts +28 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +296 -0
- package/src/index.ts +38 -0
- package/src/stores/QueryBuilderBootstraper.ts +23 -0
- package/src/stores/QueryBuilderChangeDetectionState.ts +37 -0
- package/src/stores/QueryBuilderConfig.ts +34 -0
- package/src/stores/QueryBuilderGroupOperationHelper.ts +54 -0
- package/src/stores/QueryBuilderMilestoningState.ts +164 -0
- package/src/stores/QueryBuilderParametersState.ts +52 -0
- package/src/stores/QueryBuilderPreviewDataHelper.ts +202 -0
- package/src/stores/QueryBuilderPropertyEditorState.ts +668 -0
- package/src/stores/QueryBuilderResultState.ts +281 -0
- package/src/stores/QueryBuilderState.ts +465 -0
- package/src/stores/QueryBuilderStateBuilder.ts +585 -0
- package/src/stores/QueryBuilderStateTestUtils.ts +99 -0
- package/src/stores/QueryBuilderTextEditorState.ts +203 -0
- package/src/stores/QueryBuilderTypeaheadHelper.ts +152 -0
- package/src/stores/QueryBuilderUnsupportedQueryState.ts +44 -0
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +179 -0
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +256 -0
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +359 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +798 -0
- package/src/stores/explorer/QueryBuilderPropertySearchState.ts +333 -0
- package/src/stores/explorer/QueryFunctionsExplorerState.ts +375 -0
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +65 -0
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +107 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +240 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +131 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +282 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.ts +154 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +327 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +569 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts +426 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +416 -0
- package/src/stores/fetch-structure/projection/QueryResultSetModifierState.ts +95 -0
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.ts +79 -0
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.ts +41 -0
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts +145 -0
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.ts +228 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.ts +109 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +98 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +106 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +96 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +173 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +155 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +174 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +174 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +98 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +98 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +88 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts +66 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.ts +65 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts +807 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.ts +297 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +121 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +129 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +140 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +135 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +218 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +143 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +70 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +183 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +113 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +143 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +70 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +135 -0
- package/src/stores/filter/QueryBuilderFilterOperator.ts +52 -0
- package/src/stores/filter/QueryBuilderFilterOperatorLoader.ts +65 -0
- package/src/stores/filter/QueryBuilderFilterState.ts +736 -0
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +155 -0
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +120 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperatorHelper.ts +524 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +134 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +134 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +211 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +145 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +145 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +181 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +125 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +145 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +145 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +134 -0
- package/src/stores/workflows/ClassQueryBuilderState.ts +80 -0
- package/src/stores/workflows/MappingQueryBuilderState.ts +86 -0
- package/src/stores/workflows/ServiceQueryBuilderState.ts +143 -0
- package/tsconfig.json +166 -0
- package/tsconfig.package.json +38 -0
@@ -0,0 +1,807 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import type { TreeData, TreeNodeData } from '@finos/legend-art';
|
18
|
+
import {
|
19
|
+
type PureModel,
|
20
|
+
type Type,
|
21
|
+
type ValueSpecification,
|
22
|
+
type ExecutionResult,
|
23
|
+
Enumeration,
|
24
|
+
PRIMITIVE_TYPE,
|
25
|
+
observe_ValueSpecification,
|
26
|
+
} from '@finos/legend-graph';
|
27
|
+
import {
|
28
|
+
type GeneratorFn,
|
29
|
+
addUniqueEntry,
|
30
|
+
assertErrorThrown,
|
31
|
+
assertTrue,
|
32
|
+
deleteEntry,
|
33
|
+
getNullableFirstElement,
|
34
|
+
guaranteeNonNullable,
|
35
|
+
guaranteeType,
|
36
|
+
IllegalStateError,
|
37
|
+
UnsupportedOperationError,
|
38
|
+
uuid,
|
39
|
+
filterByType,
|
40
|
+
ActionState,
|
41
|
+
} from '@finos/legend-shared';
|
42
|
+
import {
|
43
|
+
action,
|
44
|
+
computed,
|
45
|
+
flow,
|
46
|
+
flowResult,
|
47
|
+
makeAutoObservable,
|
48
|
+
makeObservable,
|
49
|
+
observable,
|
50
|
+
} from 'mobx';
|
51
|
+
import { DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME } from '../../../QueryBuilderConfig.js';
|
52
|
+
import type { QueryBuilderAggregateColumnState } from '../aggregation/QueryBuilderAggregationState.js';
|
53
|
+
import type { QueryBuilderPostFilterOperator } from './QueryBuilderPostFilterOperator.js';
|
54
|
+
import {
|
55
|
+
type QueryBuilderProjectionColumnState,
|
56
|
+
type QueryBuilderProjectionColumnDragSource,
|
57
|
+
QueryBuilderDerivationProjectionColumnState,
|
58
|
+
} from '../QueryBuilderProjectionColumnState.js';
|
59
|
+
import {
|
60
|
+
buildProjectionColumnTypeaheadQuery,
|
61
|
+
buildTypeaheadOptions,
|
62
|
+
performTypeahead,
|
63
|
+
} from '../../../QueryBuilderTypeaheadHelper.js';
|
64
|
+
import { QUERY_BUILDER_GROUP_OPERATION } from '../../../QueryBuilderGroupOperationHelper.js';
|
65
|
+
import type { QueryBuilderProjectionState } from '../QueryBuilderProjectionState.js';
|
66
|
+
|
67
|
+
export enum QUERY_BUILDER_POST_FILTER_DND_TYPE {
|
68
|
+
GROUP_CONDITION = 'GROUP_CONDITION',
|
69
|
+
CONDITION = 'CONDITION',
|
70
|
+
BLANK_CONDITION = 'BLANK_CONDITION',
|
71
|
+
}
|
72
|
+
|
73
|
+
export enum TDS_COLUMN_GETTER {
|
74
|
+
GET_STRING = 'getString',
|
75
|
+
GET_NUMBER = 'getNumber',
|
76
|
+
GET_INTEGER = 'getInteger',
|
77
|
+
GET_FLOAT = 'getFloat',
|
78
|
+
GET_DECIMAL = 'getDecimal',
|
79
|
+
GET_DATE = 'getDate',
|
80
|
+
GET_DATETIME = 'getDateTime',
|
81
|
+
GET_STRICTDATE = 'getStrictDate',
|
82
|
+
GET_BOOLEAN = 'getBoolean',
|
83
|
+
GET_ENUM = 'getEnum',
|
84
|
+
IS_NULL = 'isNull',
|
85
|
+
IS_NOT_NULL = 'isNotNull',
|
86
|
+
}
|
87
|
+
|
88
|
+
export const getTDSColumnDerivedProperyFromType = (
|
89
|
+
type: Type,
|
90
|
+
): TDS_COLUMN_GETTER => {
|
91
|
+
if (type instanceof Enumeration) {
|
92
|
+
return TDS_COLUMN_GETTER.GET_ENUM;
|
93
|
+
}
|
94
|
+
switch (type.path) {
|
95
|
+
case PRIMITIVE_TYPE.STRING:
|
96
|
+
return TDS_COLUMN_GETTER.GET_STRING;
|
97
|
+
case PRIMITIVE_TYPE.NUMBER:
|
98
|
+
return TDS_COLUMN_GETTER.GET_NUMBER;
|
99
|
+
case PRIMITIVE_TYPE.INTEGER:
|
100
|
+
return TDS_COLUMN_GETTER.GET_INTEGER;
|
101
|
+
case PRIMITIVE_TYPE.FLOAT:
|
102
|
+
return TDS_COLUMN_GETTER.GET_FLOAT;
|
103
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
104
|
+
return TDS_COLUMN_GETTER.GET_DECIMAL;
|
105
|
+
case PRIMITIVE_TYPE.DATE:
|
106
|
+
return TDS_COLUMN_GETTER.GET_DATE;
|
107
|
+
case PRIMITIVE_TYPE.DATETIME:
|
108
|
+
return TDS_COLUMN_GETTER.GET_DATETIME;
|
109
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
110
|
+
return TDS_COLUMN_GETTER.GET_STRICTDATE;
|
111
|
+
case PRIMITIVE_TYPE.BOOLEAN:
|
112
|
+
return TDS_COLUMN_GETTER.GET_BOOLEAN;
|
113
|
+
default:
|
114
|
+
throw new UnsupportedOperationError(
|
115
|
+
`Can't find TDS column derived property name for type: '${type.path}'`,
|
116
|
+
);
|
117
|
+
}
|
118
|
+
};
|
119
|
+
|
120
|
+
export const getTypeFromDerivedProperty = (
|
121
|
+
derivedProperty: TDS_COLUMN_GETTER,
|
122
|
+
graph: PureModel,
|
123
|
+
): Type | undefined => {
|
124
|
+
switch (derivedProperty) {
|
125
|
+
case TDS_COLUMN_GETTER.GET_STRING:
|
126
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.STRING);
|
127
|
+
case TDS_COLUMN_GETTER.GET_NUMBER:
|
128
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.NUMBER);
|
129
|
+
case TDS_COLUMN_GETTER.GET_INTEGER:
|
130
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.INTEGER);
|
131
|
+
case TDS_COLUMN_GETTER.GET_FLOAT:
|
132
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.FLOAT);
|
133
|
+
case TDS_COLUMN_GETTER.GET_DECIMAL:
|
134
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.DECIMAL);
|
135
|
+
case TDS_COLUMN_GETTER.GET_DATE:
|
136
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.DATE);
|
137
|
+
case TDS_COLUMN_GETTER.GET_DATETIME:
|
138
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.DATETIME);
|
139
|
+
case TDS_COLUMN_GETTER.GET_STRICTDATE:
|
140
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.STRICTDATE);
|
141
|
+
case TDS_COLUMN_GETTER.GET_BOOLEAN:
|
142
|
+
return graph.getPrimitiveType(PRIMITIVE_TYPE.BOOLEAN);
|
143
|
+
default:
|
144
|
+
return undefined;
|
145
|
+
}
|
146
|
+
};
|
147
|
+
|
148
|
+
export abstract class QueryBuilderPostFilterTreeNodeData
|
149
|
+
implements TreeNodeData
|
150
|
+
{
|
151
|
+
readonly id = uuid();
|
152
|
+
readonly label = '';
|
153
|
+
// NOTE: we don't use the `isSelected` attribute is not used since we keep track of it from the tree data level
|
154
|
+
isOpen?: boolean | undefined;
|
155
|
+
parentId?: string | undefined;
|
156
|
+
|
157
|
+
constructor(parentId: string | undefined) {
|
158
|
+
this.parentId = parentId;
|
159
|
+
|
160
|
+
makeObservable(this, {
|
161
|
+
isOpen: observable,
|
162
|
+
parentId: observable,
|
163
|
+
setIsOpen: action,
|
164
|
+
setParentId: action,
|
165
|
+
});
|
166
|
+
}
|
167
|
+
|
168
|
+
abstract get dragPreviewLabel(): string;
|
169
|
+
setIsOpen(val: boolean): void {
|
170
|
+
this.isOpen = val;
|
171
|
+
}
|
172
|
+
setParentId(val: string | undefined): void {
|
173
|
+
this.parentId = val;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
export interface QueryBuilderPostFilterConditionDragSource {
|
178
|
+
node: QueryBuilderPostFilterTreeNodeData;
|
179
|
+
}
|
180
|
+
|
181
|
+
export type QueryBuilderPostFilterDropTarget =
|
182
|
+
| QueryBuilderProjectionColumnDragSource
|
183
|
+
| QueryBuilderPostFilterConditionDragSource;
|
184
|
+
|
185
|
+
export class QueryBuilderPostFilterTreeGroupNodeData extends QueryBuilderPostFilterTreeNodeData {
|
186
|
+
groupOperation: QUERY_BUILDER_GROUP_OPERATION;
|
187
|
+
childrenIds: string[] = [];
|
188
|
+
|
189
|
+
constructor(
|
190
|
+
parentId: string | undefined,
|
191
|
+
groupOperation: QUERY_BUILDER_GROUP_OPERATION,
|
192
|
+
) {
|
193
|
+
super(parentId);
|
194
|
+
makeObservable(this, {
|
195
|
+
groupOperation: observable,
|
196
|
+
childrenIds: observable,
|
197
|
+
setGroupOperation: action,
|
198
|
+
addChildNode: action,
|
199
|
+
removeChildNode: action,
|
200
|
+
dragPreviewLabel: computed,
|
201
|
+
});
|
202
|
+
this.groupOperation = groupOperation;
|
203
|
+
this.isOpen = true;
|
204
|
+
}
|
205
|
+
|
206
|
+
get dragPreviewLabel(): string {
|
207
|
+
return `${this.groupOperation.toUpperCase()} group`;
|
208
|
+
}
|
209
|
+
|
210
|
+
setGroupOperation(val: QUERY_BUILDER_GROUP_OPERATION): void {
|
211
|
+
this.groupOperation = val;
|
212
|
+
}
|
213
|
+
addChildNode(node: QueryBuilderPostFilterTreeNodeData): void {
|
214
|
+
addUniqueEntry(this.childrenIds, node.id);
|
215
|
+
node.setParentId(this.id);
|
216
|
+
}
|
217
|
+
removeChildNode(node: QueryBuilderPostFilterTreeNodeData): void {
|
218
|
+
deleteEntry(this.childrenIds, node.id);
|
219
|
+
node.setParentId(undefined);
|
220
|
+
}
|
221
|
+
addChildNodeAt(node: QueryBuilderPostFilterTreeNodeData, idx: number): void {
|
222
|
+
if (!this.childrenIds.find((childId) => childId === node.id)) {
|
223
|
+
idx = Math.max(0, Math.min(idx, this.childrenIds.length - 1));
|
224
|
+
this.childrenIds.splice(idx, 0, node.id);
|
225
|
+
node.setParentId(this.id);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
export class QueryBuilderPostFilterTreeConditionNodeData extends QueryBuilderPostFilterTreeNodeData {
|
231
|
+
condition: PostFilterConditionState;
|
232
|
+
|
233
|
+
constructor(
|
234
|
+
parentId: string | undefined,
|
235
|
+
condition: PostFilterConditionState,
|
236
|
+
) {
|
237
|
+
super(parentId);
|
238
|
+
|
239
|
+
makeObservable(this, {
|
240
|
+
condition: observable,
|
241
|
+
dragPreviewLabel: computed,
|
242
|
+
});
|
243
|
+
|
244
|
+
this.condition = condition;
|
245
|
+
}
|
246
|
+
|
247
|
+
get dragPreviewLabel(): string {
|
248
|
+
return this.condition.columnName;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
export class QueryBuilderPostFilterTreeBlankConditionNodeData extends QueryBuilderPostFilterTreeNodeData {
|
253
|
+
constructor(parentId: string | undefined) {
|
254
|
+
super(parentId);
|
255
|
+
|
256
|
+
makeObservable(this, {
|
257
|
+
dragPreviewLabel: computed,
|
258
|
+
});
|
259
|
+
}
|
260
|
+
|
261
|
+
get dragPreviewLabel(): string {
|
262
|
+
return '<blank>';
|
263
|
+
}
|
264
|
+
}
|
265
|
+
export class PostFilterConditionState {
|
266
|
+
postFilterState: QueryBuilderPostFilterState;
|
267
|
+
columnState:
|
268
|
+
| QueryBuilderProjectionColumnState
|
269
|
+
| QueryBuilderAggregateColumnState;
|
270
|
+
value?: ValueSpecification | undefined;
|
271
|
+
operator: QueryBuilderPostFilterOperator;
|
272
|
+
typeaheadSearchResults: string[] | undefined;
|
273
|
+
typeaheadSearchState = ActionState.create();
|
274
|
+
|
275
|
+
constructor(
|
276
|
+
postFilterState: QueryBuilderPostFilterState,
|
277
|
+
colState:
|
278
|
+
| QueryBuilderProjectionColumnState
|
279
|
+
| QueryBuilderAggregateColumnState,
|
280
|
+
value: ValueSpecification | undefined,
|
281
|
+
operator: QueryBuilderPostFilterOperator | undefined,
|
282
|
+
) {
|
283
|
+
makeAutoObservable(this, {
|
284
|
+
columnState: observable,
|
285
|
+
typeaheadSearchResults: observable,
|
286
|
+
changeOperator: action,
|
287
|
+
setColumnState: action,
|
288
|
+
setValue: action,
|
289
|
+
setOperator: action,
|
290
|
+
changeColumn: flow,
|
291
|
+
handleTypeaheadSearch: flow,
|
292
|
+
});
|
293
|
+
|
294
|
+
this.postFilterState = postFilterState;
|
295
|
+
this.columnState = colState;
|
296
|
+
this.setValue(value);
|
297
|
+
if (operator) {
|
298
|
+
this.operator = operator;
|
299
|
+
} else {
|
300
|
+
assertTrue(
|
301
|
+
this.operators.length !== 0,
|
302
|
+
`Can't find an operator for column '${this.columnState.columnName}`,
|
303
|
+
);
|
304
|
+
this.operator = guaranteeNonNullable(this.operators[0]);
|
305
|
+
}
|
306
|
+
}
|
307
|
+
|
308
|
+
get columnName(): string {
|
309
|
+
return this.columnState.columnName;
|
310
|
+
}
|
311
|
+
|
312
|
+
get operators(): QueryBuilderPostFilterOperator[] {
|
313
|
+
return this.postFilterState.operators.filter((op) =>
|
314
|
+
op.isCompatibleWithPostFilterColumn(this),
|
315
|
+
);
|
316
|
+
}
|
317
|
+
|
318
|
+
*handleTypeaheadSearch(): GeneratorFn<void> {
|
319
|
+
try {
|
320
|
+
this.typeaheadSearchState.inProgress();
|
321
|
+
this.typeaheadSearchResults = undefined;
|
322
|
+
if (performTypeahead(this.value)) {
|
323
|
+
const result =
|
324
|
+
(yield this.postFilterState.projectionState.queryBuilderState.graphManagerState.graphManager.executeMapping(
|
325
|
+
buildProjectionColumnTypeaheadQuery(
|
326
|
+
this.postFilterState.projectionState.queryBuilderState,
|
327
|
+
this.columnState,
|
328
|
+
this.value,
|
329
|
+
),
|
330
|
+
guaranteeNonNullable(
|
331
|
+
this.postFilterState.projectionState.queryBuilderState.mapping,
|
332
|
+
),
|
333
|
+
guaranteeNonNullable(
|
334
|
+
this.postFilterState.projectionState.queryBuilderState
|
335
|
+
.runtimeValue,
|
336
|
+
),
|
337
|
+
this.postFilterState.projectionState.queryBuilderState
|
338
|
+
.graphManagerState.graph,
|
339
|
+
)) as ExecutionResult;
|
340
|
+
this.typeaheadSearchResults = buildTypeaheadOptions(result);
|
341
|
+
}
|
342
|
+
this.typeaheadSearchState.pass();
|
343
|
+
} catch (error) {
|
344
|
+
assertErrorThrown(error);
|
345
|
+
this.typeaheadSearchState.fail();
|
346
|
+
} finally {
|
347
|
+
this.typeaheadSearchState.complete();
|
348
|
+
}
|
349
|
+
}
|
350
|
+
|
351
|
+
changeOperator(val: QueryBuilderPostFilterOperator): void {
|
352
|
+
this.setOperator(val);
|
353
|
+
if (!this.operator.isCompatibleWithConditionValue(this)) {
|
354
|
+
this.setValue(this.operator.getDefaultFilterConditionValue(this));
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
setValue(val: ValueSpecification | undefined): void {
|
359
|
+
this.value = val
|
360
|
+
? observe_ValueSpecification(
|
361
|
+
val,
|
362
|
+
this.postFilterState.projectionState.queryBuilderState
|
363
|
+
.observableContext,
|
364
|
+
)
|
365
|
+
: undefined;
|
366
|
+
}
|
367
|
+
|
368
|
+
setColumnState(
|
369
|
+
val: QueryBuilderProjectionColumnState | QueryBuilderAggregateColumnState,
|
370
|
+
): void {
|
371
|
+
this.columnState = val;
|
372
|
+
}
|
373
|
+
|
374
|
+
setOperator(val: QueryBuilderPostFilterOperator): void {
|
375
|
+
this.operator = val;
|
376
|
+
}
|
377
|
+
|
378
|
+
*changeColumn(
|
379
|
+
columnState: QueryBuilderProjectionColumnState,
|
380
|
+
): GeneratorFn<void> {
|
381
|
+
try {
|
382
|
+
const aggregateColumnState =
|
383
|
+
this.postFilterState.projectionState.aggregationState.columns.find(
|
384
|
+
(column) => column.projectionColumnState === columnState,
|
385
|
+
);
|
386
|
+
const colState = aggregateColumnState ?? columnState;
|
387
|
+
if (colState instanceof QueryBuilderDerivationProjectionColumnState) {
|
388
|
+
yield flowResult(colState.fetchDerivationLambdaReturnType());
|
389
|
+
}
|
390
|
+
|
391
|
+
//column
|
392
|
+
this.setColumnState(colState);
|
393
|
+
|
394
|
+
//operator
|
395
|
+
if (!this.operator.isCompatibleWithPostFilterColumn(this)) {
|
396
|
+
this.setOperator(guaranteeNonNullable(this.operators[0]));
|
397
|
+
}
|
398
|
+
|
399
|
+
// value
|
400
|
+
if (!this.operator.isCompatibleWithConditionValue(this)) {
|
401
|
+
this.setValue(this.operator.getDefaultFilterConditionValue(this));
|
402
|
+
}
|
403
|
+
} catch (error) {
|
404
|
+
assertErrorThrown(error);
|
405
|
+
this.postFilterState.projectionState.queryBuilderState.applicationStore.notifyError(
|
406
|
+
`Can't drag column '${columnState.columnName}' due to: ${error.message}`,
|
407
|
+
);
|
408
|
+
}
|
409
|
+
}
|
410
|
+
}
|
411
|
+
|
412
|
+
export class QueryBuilderPostFilterState
|
413
|
+
implements TreeData<QueryBuilderPostFilterTreeNodeData>
|
414
|
+
{
|
415
|
+
projectionState: QueryBuilderProjectionState;
|
416
|
+
lambdaParameterName = DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME;
|
417
|
+
selectedNode?: QueryBuilderPostFilterTreeNodeData | undefined;
|
418
|
+
isRearrangingConditions = false;
|
419
|
+
operators: QueryBuilderPostFilterOperator[] = [];
|
420
|
+
rootIds: string[] = [];
|
421
|
+
nodes = new Map<string, QueryBuilderPostFilterTreeNodeData>();
|
422
|
+
_suppressClickawayEventListener = false;
|
423
|
+
|
424
|
+
constructor(
|
425
|
+
projectionState: QueryBuilderProjectionState,
|
426
|
+
operators: QueryBuilderPostFilterOperator[],
|
427
|
+
) {
|
428
|
+
makeAutoObservable(this, {
|
429
|
+
projectionState: false,
|
430
|
+
setLambdaParameterName: action,
|
431
|
+
setSelectedNode: action,
|
432
|
+
addNodeFromNode: action,
|
433
|
+
addGroupConditionNodeFromNode: action,
|
434
|
+
newGroupWithConditionFromNode: action,
|
435
|
+
removeNodeAndPruneBranch: action,
|
436
|
+
pruneTree: action,
|
437
|
+
simplifyTree: action,
|
438
|
+
collapseTree: action,
|
439
|
+
expandTree: action,
|
440
|
+
replaceBlankNodeWithNode: action,
|
441
|
+
suppressClickawayEventListener: action,
|
442
|
+
});
|
443
|
+
|
444
|
+
this.projectionState = projectionState;
|
445
|
+
this.operators = operators;
|
446
|
+
}
|
447
|
+
|
448
|
+
setRearrangingConditions(val: boolean): void {
|
449
|
+
this.isRearrangingConditions = val;
|
450
|
+
}
|
451
|
+
|
452
|
+
suppressClickawayEventListener(): void {
|
453
|
+
this._suppressClickawayEventListener = true;
|
454
|
+
}
|
455
|
+
|
456
|
+
setSelectedNode(val: QueryBuilderPostFilterTreeNodeData | undefined): void {
|
457
|
+
this.selectedNode = val;
|
458
|
+
}
|
459
|
+
|
460
|
+
getNode(id: string): QueryBuilderPostFilterTreeNodeData {
|
461
|
+
return guaranteeNonNullable(
|
462
|
+
this.nodes.get(id),
|
463
|
+
`Can't find query builder post-filter tree node with ID '${id}'`,
|
464
|
+
);
|
465
|
+
}
|
466
|
+
|
467
|
+
get isEmpty(): boolean {
|
468
|
+
return !this.nodes.size && !this.rootIds.length;
|
469
|
+
}
|
470
|
+
private getParentNode(
|
471
|
+
node: QueryBuilderPostFilterTreeNodeData,
|
472
|
+
): QueryBuilderPostFilterTreeGroupNodeData | undefined {
|
473
|
+
return node.parentId
|
474
|
+
? guaranteeType(
|
475
|
+
this.nodes.get(node.parentId),
|
476
|
+
QueryBuilderPostFilterTreeGroupNodeData,
|
477
|
+
)
|
478
|
+
: undefined;
|
479
|
+
}
|
480
|
+
|
481
|
+
getRootNode(): QueryBuilderPostFilterTreeNodeData | undefined {
|
482
|
+
assertTrue(
|
483
|
+
this.rootIds.length < 2,
|
484
|
+
'Query builder post-filter tree cannot have more than 1 root',
|
485
|
+
);
|
486
|
+
const rootId = getNullableFirstElement(this.rootIds);
|
487
|
+
return rootId ? this.getNode(rootId) : undefined;
|
488
|
+
}
|
489
|
+
|
490
|
+
private addRootNode(node: QueryBuilderPostFilterTreeNodeData): void {
|
491
|
+
const rootNode = this.getRootNode();
|
492
|
+
this.nodes.set(node.id, node);
|
493
|
+
if (rootNode instanceof QueryBuilderPostFilterTreeGroupNodeData) {
|
494
|
+
rootNode.addChildNode(node);
|
495
|
+
} else if (
|
496
|
+
rootNode instanceof QueryBuilderPostFilterTreeConditionNodeData ||
|
497
|
+
rootNode instanceof QueryBuilderPostFilterTreeBlankConditionNodeData
|
498
|
+
) {
|
499
|
+
// if the root node is condition node, form a group between the root node and the new node and nominate the group node as the new root
|
500
|
+
const groupNode = new QueryBuilderPostFilterTreeGroupNodeData(
|
501
|
+
undefined,
|
502
|
+
QUERY_BUILDER_GROUP_OPERATION.AND,
|
503
|
+
);
|
504
|
+
groupNode.addChildNode(rootNode);
|
505
|
+
groupNode.addChildNode(node);
|
506
|
+
this.rootIds = [groupNode.id];
|
507
|
+
this.nodes.set(groupNode.id, groupNode);
|
508
|
+
} else if (!rootNode) {
|
509
|
+
// if there is no root node, set this node as the root
|
510
|
+
this.rootIds = [node.id];
|
511
|
+
}
|
512
|
+
}
|
513
|
+
|
514
|
+
replaceBlankNodeWithNode(
|
515
|
+
node: QueryBuilderPostFilterTreeNodeData,
|
516
|
+
blankNode: QueryBuilderPostFilterTreeBlankConditionNodeData,
|
517
|
+
): void {
|
518
|
+
this.nodes.set(node.id, node);
|
519
|
+
const blankNodeParent = this.getParentNode(blankNode);
|
520
|
+
if (blankNodeParent) {
|
521
|
+
const blankNodeIdx = blankNodeParent.childrenIds.findIndex(
|
522
|
+
(childId) => childId === blankNode.id,
|
523
|
+
);
|
524
|
+
blankNodeParent.addChildNodeAt(node, blankNodeIdx);
|
525
|
+
blankNodeParent.removeChildNode(blankNode);
|
526
|
+
} else {
|
527
|
+
this.addRootNode(node);
|
528
|
+
}
|
529
|
+
this.removeNode(blankNode);
|
530
|
+
}
|
531
|
+
setLambdaParameterName(val: string): void {
|
532
|
+
this.lambdaParameterName = val;
|
533
|
+
}
|
534
|
+
|
535
|
+
addGroupConditionNodeFromNode(
|
536
|
+
fromNode: QueryBuilderPostFilterTreeNodeData | undefined,
|
537
|
+
): void {
|
538
|
+
const newGroupNode = new QueryBuilderPostFilterTreeGroupNodeData(
|
539
|
+
undefined,
|
540
|
+
QUERY_BUILDER_GROUP_OPERATION.AND,
|
541
|
+
);
|
542
|
+
const newBlankConditionNode1 =
|
543
|
+
new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined);
|
544
|
+
const newBlankConditionNode2 =
|
545
|
+
new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined);
|
546
|
+
this.nodes.set(newBlankConditionNode1.id, newBlankConditionNode1);
|
547
|
+
this.nodes.set(newBlankConditionNode2.id, newBlankConditionNode2);
|
548
|
+
newGroupNode.addChildNode(newBlankConditionNode1);
|
549
|
+
newGroupNode.addChildNode(newBlankConditionNode2);
|
550
|
+
this.addNodeFromNode(newGroupNode, fromNode);
|
551
|
+
}
|
552
|
+
|
553
|
+
newGroupWithConditionFromNode(
|
554
|
+
node: QueryBuilderPostFilterTreeNodeData | undefined,
|
555
|
+
fromNode: QueryBuilderPostFilterTreeNodeData | undefined,
|
556
|
+
): void {
|
557
|
+
const newNode =
|
558
|
+
node ?? new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined);
|
559
|
+
if (fromNode instanceof QueryBuilderPostFilterTreeConditionNodeData) {
|
560
|
+
const fromNodeParent = this.getParentNode(fromNode);
|
561
|
+
if (fromNodeParent) {
|
562
|
+
const fromNodeIdx = fromNodeParent.childrenIds.findIndex(
|
563
|
+
(childId) => childId === fromNode.id,
|
564
|
+
);
|
565
|
+
fromNodeParent.removeChildNode(fromNode);
|
566
|
+
const newGroupNode = new QueryBuilderPostFilterTreeGroupNodeData(
|
567
|
+
undefined,
|
568
|
+
QUERY_BUILDER_GROUP_OPERATION.AND,
|
569
|
+
);
|
570
|
+
this.nodes.set(newNode.id, newNode);
|
571
|
+
this.nodes.set(newGroupNode.id, newGroupNode);
|
572
|
+
newGroupNode.addChildNode(fromNode);
|
573
|
+
newGroupNode.addChildNode(newNode);
|
574
|
+
fromNodeParent.addChildNodeAt(newGroupNode, fromNodeIdx);
|
575
|
+
} else {
|
576
|
+
this.addRootNode(newNode);
|
577
|
+
}
|
578
|
+
}
|
579
|
+
}
|
580
|
+
|
581
|
+
handleClickaway(): void {
|
582
|
+
if (this._suppressClickawayEventListener) {
|
583
|
+
this._suppressClickawayEventListener = false;
|
584
|
+
return;
|
585
|
+
}
|
586
|
+
this.setSelectedNode(undefined);
|
587
|
+
}
|
588
|
+
|
589
|
+
addNodeFromNode(
|
590
|
+
node: QueryBuilderPostFilterTreeNodeData,
|
591
|
+
fromNode: QueryBuilderPostFilterTreeNodeData | undefined,
|
592
|
+
): void {
|
593
|
+
if (fromNode instanceof QueryBuilderPostFilterTreeGroupNodeData) {
|
594
|
+
this.nodes.set(node.id, node);
|
595
|
+
fromNode.addChildNode(node);
|
596
|
+
} else if (
|
597
|
+
fromNode instanceof QueryBuilderPostFilterTreeConditionNodeData ||
|
598
|
+
fromNode instanceof QueryBuilderPostFilterTreeBlankConditionNodeData
|
599
|
+
) {
|
600
|
+
this.nodes.set(node.id, node);
|
601
|
+
const fromNodeParent = this.getParentNode(fromNode);
|
602
|
+
if (fromNodeParent) {
|
603
|
+
fromNodeParent.addChildNode(node);
|
604
|
+
} else {
|
605
|
+
this.addRootNode(node);
|
606
|
+
}
|
607
|
+
} else if (!this.selectedNode) {
|
608
|
+
// if no current node is selected, the node will be added to root
|
609
|
+
this.addRootNode(node);
|
610
|
+
}
|
611
|
+
}
|
612
|
+
|
613
|
+
private removeNode(node: QueryBuilderPostFilterTreeNodeData): void {
|
614
|
+
this.nodes.delete(node.id);
|
615
|
+
// remove relationship with children nodes
|
616
|
+
if (node instanceof QueryBuilderPostFilterTreeGroupNodeData) {
|
617
|
+
// NOTE: we are deleting child node, i.e. modifying `childrenIds` as we iterate
|
618
|
+
[...node.childrenIds].forEach((childId) =>
|
619
|
+
node.removeChildNode(this.getNode(childId)),
|
620
|
+
);
|
621
|
+
}
|
622
|
+
// remove relationship with parent node
|
623
|
+
const parentNode = this.getParentNode(node);
|
624
|
+
if (parentNode) {
|
625
|
+
parentNode.removeChildNode(node);
|
626
|
+
} else {
|
627
|
+
deleteEntry(this.rootIds, node.id);
|
628
|
+
}
|
629
|
+
}
|
630
|
+
|
631
|
+
removeNodeAndPruneBranch(node: QueryBuilderPostFilterTreeNodeData): void {
|
632
|
+
const parentNode = this.getParentNode(node);
|
633
|
+
this.removeNode(node);
|
634
|
+
// squash parent node after the current node is deleted
|
635
|
+
if (parentNode) {
|
636
|
+
parentNode.removeChildNode(node);
|
637
|
+
let currentParentNode:
|
638
|
+
| QueryBuilderPostFilterTreeGroupNodeData
|
639
|
+
| undefined = parentNode;
|
640
|
+
while (currentParentNode) {
|
641
|
+
if (currentParentNode.childrenIds.length >= 2) {
|
642
|
+
break;
|
643
|
+
}
|
644
|
+
this.squashGroupNode(currentParentNode);
|
645
|
+
currentParentNode = this.getParentNode(currentParentNode);
|
646
|
+
}
|
647
|
+
} else {
|
648
|
+
deleteEntry(this.rootIds, node.id);
|
649
|
+
}
|
650
|
+
this.pruneOrphanNodes();
|
651
|
+
// check if selected node is still around, if not, unset the selected node
|
652
|
+
if (this.selectedNode && !this.nodes.get(this.selectedNode.id)) {
|
653
|
+
this.setSelectedNode(undefined);
|
654
|
+
}
|
655
|
+
}
|
656
|
+
|
657
|
+
/**
|
658
|
+
* Cleanup unecessary group nodes (i.e. group node whose group operation is the same as its parent's)
|
659
|
+
*/
|
660
|
+
simplifyTree(): void {
|
661
|
+
this.setSelectedNode(undefined);
|
662
|
+
const getUnnecessaryNodes = (): QueryBuilderPostFilterTreeGroupNodeData[] =>
|
663
|
+
Array.from(this.nodes.values())
|
664
|
+
.filter(filterByType(QueryBuilderPostFilterTreeGroupNodeData))
|
665
|
+
.filter((node) => {
|
666
|
+
if (!node.parentId || !this.nodes.has(node.parentId)) {
|
667
|
+
return false;
|
668
|
+
}
|
669
|
+
const parentGroupNode = guaranteeType(
|
670
|
+
this.nodes.get(node.parentId),
|
671
|
+
QueryBuilderPostFilterTreeGroupNodeData,
|
672
|
+
);
|
673
|
+
return parentGroupNode.groupOperation === node.groupOperation;
|
674
|
+
});
|
675
|
+
// Squash these unnecessary group nodes
|
676
|
+
let nodesToProcess = getUnnecessaryNodes();
|
677
|
+
while (nodesToProcess.length) {
|
678
|
+
nodesToProcess.forEach((node) => {
|
679
|
+
const parentNode = guaranteeType(
|
680
|
+
this.nodes.get(guaranteeNonNullable(node.parentId)),
|
681
|
+
QueryBuilderPostFilterTreeGroupNodeData,
|
682
|
+
);
|
683
|
+
// send all children of the current group node to their grandparent node
|
684
|
+
[...node.childrenIds].forEach((childId) => {
|
685
|
+
const childNode = this.getNode(childId);
|
686
|
+
parentNode.addChildNode(childNode);
|
687
|
+
});
|
688
|
+
// remove the current group node
|
689
|
+
parentNode.removeChildNode(node);
|
690
|
+
// remove the node
|
691
|
+
this.nodes.delete(node.id);
|
692
|
+
});
|
693
|
+
nodesToProcess = getUnnecessaryNodes();
|
694
|
+
}
|
695
|
+
}
|
696
|
+
|
697
|
+
private pruneOrphanNodes(): void {
|
698
|
+
const getOrphanNodes = (): QueryBuilderPostFilterTreeNodeData[] =>
|
699
|
+
Array.from(this.nodes.values()).filter(
|
700
|
+
(node) => !node.parentId && !this.rootIds.includes(node.id),
|
701
|
+
); // nodes without parent, except for root nodes
|
702
|
+
let nodesToProcess = getOrphanNodes();
|
703
|
+
while (nodesToProcess.length) {
|
704
|
+
nodesToProcess.forEach((node) => this.removeNode(node));
|
705
|
+
nodesToProcess = getOrphanNodes();
|
706
|
+
}
|
707
|
+
}
|
708
|
+
|
709
|
+
private pruneChildlessGroupNodes(): void {
|
710
|
+
const getChildlessGroupNodes =
|
711
|
+
(): QueryBuilderPostFilterTreeGroupNodeData[] =>
|
712
|
+
Array.from(this.nodes.values())
|
713
|
+
.filter(filterByType(QueryBuilderPostFilterTreeGroupNodeData))
|
714
|
+
.filter((node) => !node.childrenIds.length);
|
715
|
+
let nodesToProcess = getChildlessGroupNodes();
|
716
|
+
while (nodesToProcess.length) {
|
717
|
+
nodesToProcess.forEach((node) => this.removeNode(node));
|
718
|
+
nodesToProcess = getChildlessGroupNodes();
|
719
|
+
}
|
720
|
+
}
|
721
|
+
|
722
|
+
pruneTree(): void {
|
723
|
+
this.setSelectedNode(undefined);
|
724
|
+
// remove all blank nodes
|
725
|
+
Array.from(this.nodes.values())
|
726
|
+
.filter(
|
727
|
+
(node) =>
|
728
|
+
node instanceof QueryBuilderPostFilterTreeBlankConditionNodeData,
|
729
|
+
)
|
730
|
+
.forEach((node) => this.removeNode(node));
|
731
|
+
// prune
|
732
|
+
this.pruneOrphanNodes();
|
733
|
+
this.pruneChildlessGroupNodes();
|
734
|
+
// squash group nodes
|
735
|
+
// NOTE: since we have pruned all blank nodes and childless group nodes, at this point, if there are group nodes to be squashed
|
736
|
+
// it will be group node with exactly 1 non-blank condition
|
737
|
+
const getSquashableGroupNodes =
|
738
|
+
(): QueryBuilderPostFilterTreeGroupNodeData[] =>
|
739
|
+
Array.from(this.nodes.values())
|
740
|
+
.filter(filterByType(QueryBuilderPostFilterTreeGroupNodeData))
|
741
|
+
.filter((node) => node.childrenIds.length < 2)
|
742
|
+
.filter((node) => {
|
743
|
+
if (!node.childrenIds.length) {
|
744
|
+
throw new IllegalStateError(
|
745
|
+
'Query builder post-filter tree found unexpected childless group nodes',
|
746
|
+
);
|
747
|
+
}
|
748
|
+
const firstChildNodeId = node.childrenIds[0] as string;
|
749
|
+
const childNode = this.getNode(firstChildNodeId);
|
750
|
+
if (
|
751
|
+
childNode instanceof
|
752
|
+
QueryBuilderPostFilterTreeBlankConditionNodeData
|
753
|
+
) {
|
754
|
+
throw new IllegalStateError(
|
755
|
+
'Query builder post-filter tree found unexpected blank nodes',
|
756
|
+
);
|
757
|
+
}
|
758
|
+
return (
|
759
|
+
this.getNode(firstChildNodeId) instanceof
|
760
|
+
QueryBuilderPostFilterTreeConditionNodeData
|
761
|
+
);
|
762
|
+
});
|
763
|
+
let nodesToProcess = getSquashableGroupNodes();
|
764
|
+
while (nodesToProcess.length) {
|
765
|
+
nodesToProcess.forEach((node) => this.squashGroupNode(node));
|
766
|
+
nodesToProcess = getSquashableGroupNodes();
|
767
|
+
}
|
768
|
+
// check if selected node is still around, if not, unset the selected node
|
769
|
+
if (this.selectedNode && !this.nodes.get(this.selectedNode.id)) {
|
770
|
+
this.setSelectedNode(undefined);
|
771
|
+
}
|
772
|
+
}
|
773
|
+
|
774
|
+
/**
|
775
|
+
* If group node has fewer than 2 children, flatten it
|
776
|
+
*/
|
777
|
+
private squashGroupNode(node: QueryBuilderPostFilterTreeGroupNodeData): void {
|
778
|
+
if (node.childrenIds.length < 2) {
|
779
|
+
const parentNode = this.getParentNode(node);
|
780
|
+
// NOTE: we are deleting child node, i.e. modifying `childrenIds` as we iterate
|
781
|
+
[...node.childrenIds].forEach((childId) => {
|
782
|
+
const childNode = this.getNode(childId);
|
783
|
+
node.removeChildNode(childNode);
|
784
|
+
if (parentNode) {
|
785
|
+
parentNode.addChildNode(childNode);
|
786
|
+
} else {
|
787
|
+
addUniqueEntry(this.rootIds, childId);
|
788
|
+
}
|
789
|
+
});
|
790
|
+
// remove the group node
|
791
|
+
this.nodes.delete(node.id);
|
792
|
+
if (parentNode) {
|
793
|
+
parentNode.removeChildNode(node);
|
794
|
+
} else {
|
795
|
+
deleteEntry(this.rootIds, node.id);
|
796
|
+
}
|
797
|
+
}
|
798
|
+
}
|
799
|
+
|
800
|
+
collapseTree(): void {
|
801
|
+
Array.from(this.nodes.values()).forEach((node) => node.setIsOpen(false));
|
802
|
+
}
|
803
|
+
|
804
|
+
expandTree(): void {
|
805
|
+
Array.from(this.nodes.values()).forEach((node) => node.setIsOpen(true));
|
806
|
+
}
|
807
|
+
}
|