@finos/legend-application-query 5.0.0
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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/LegendQueryAppEvent.d.ts +19 -0
- package/lib/LegendQueryAppEvent.d.ts.map +1 -0
- package/lib/LegendQueryAppEvent.js +21 -0
- package/lib/LegendQueryAppEvent.js.map +1 -0
- package/lib/QueryBuilder_Const.d.ts +77 -0
- package/lib/QueryBuilder_Const.d.ts.map +1 -0
- package/lib/QueryBuilder_Const.js +85 -0
- package/lib/QueryBuilder_Const.js.map +1 -0
- package/lib/application/LegendQuery.d.ts +27 -0
- package/lib/application/LegendQuery.d.ts.map +1 -0
- package/lib/application/LegendQuery.js +58 -0
- package/lib/application/LegendQuery.js.map +1 -0
- package/lib/application/LegendQueryApplicationConfig.d.ts +46 -0
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -0
- package/lib/application/LegendQueryApplicationConfig.js +35 -0
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -0
- package/lib/application/LegendQueryPluginManager.d.ts +32 -0
- package/lib/application/LegendQueryPluginManager.d.ts.map +1 -0
- package/lib/application/LegendQueryPluginManager.js +46 -0
- package/lib/application/LegendQueryPluginManager.js.map +1 -0
- package/lib/components/LegendQueryApplication.d.ts +25 -0
- package/lib/components/LegendQueryApplication.d.ts.map +1 -0
- package/lib/components/LegendQueryApplication.js +39 -0
- package/lib/components/LegendQueryApplication.js.map +1 -0
- package/lib/components/LegendQueryBaseStoreProvider.d.ts +28 -0
- package/lib/components/LegendQueryBaseStoreProvider.d.ts.map +1 -0
- package/lib/components/LegendQueryBaseStoreProvider.js +32 -0
- package/lib/components/LegendQueryBaseStoreProvider.js.map +1 -0
- package/lib/components/QueryBuilder.d.ts +23 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -0
- package/lib/components/QueryBuilder.js +91 -0
- package/lib/components/QueryBuilder.js.map +1 -0
- package/lib/components/QueryBuilderExplorerPanel.d.ts +34 -0
- package/lib/components/QueryBuilderExplorerPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderExplorerPanel.js +379 -0
- package/lib/components/QueryBuilderExplorerPanel.js.map +1 -0
- package/lib/components/QueryBuilderFetchStructurePanel.d.ts +23 -0
- package/lib/components/QueryBuilderFetchStructurePanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderFetchStructurePanel.js +89 -0
- package/lib/components/QueryBuilderFetchStructurePanel.js.map +1 -0
- package/lib/components/QueryBuilderFilterPanel.d.ts +23 -0
- package/lib/components/QueryBuilderFilterPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderFilterPanel.js +301 -0
- package/lib/components/QueryBuilderFilterPanel.js.map +1 -0
- package/lib/components/QueryBuilderFunctionsExplorerPanel.d.ts +23 -0
- package/lib/components/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderFunctionsExplorerPanel.js +177 -0
- package/lib/components/QueryBuilderFunctionsExplorerPanel.js.map +1 -0
- package/lib/components/QueryBuilderGraphFetchTreePanel.d.ts +33 -0
- package/lib/components/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderGraphFetchTreePanel.js +96 -0
- package/lib/components/QueryBuilderGraphFetchTreePanel.js.map +1 -0
- package/lib/components/QueryBuilderLambdaEditor.d.ts +42 -0
- package/lib/components/QueryBuilderLambdaEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderLambdaEditor.js +47 -0
- package/lib/components/QueryBuilderLambdaEditor.js.map +1 -0
- package/lib/components/QueryBuilderMilestoneEditor.d.ts +24 -0
- package/lib/components/QueryBuilderMilestoneEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderMilestoneEditor.js +120 -0
- package/lib/components/QueryBuilderMilestoneEditor.js.map +1 -0
- package/lib/components/QueryBuilderParameterPanel.d.ts +30 -0
- package/lib/components/QueryBuilderParameterPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderParameterPanel.js +148 -0
- package/lib/components/QueryBuilderParameterPanel.js.map +1 -0
- package/lib/components/QueryBuilderPostFilterPanel.d.ts +31 -0
- package/lib/components/QueryBuilderPostFilterPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderPostFilterPanel.js +373 -0
- package/lib/components/QueryBuilderPostFilterPanel.js.map +1 -0
- package/lib/components/QueryBuilderProjectionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderProjectionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderProjectionPanel.js +229 -0
- package/lib/components/QueryBuilderProjectionPanel.js.map +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +30 -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/QueryBuilderPropertyInfoTooltip.d.ts +26 -0
- package/lib/components/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -0
- package/lib/components/QueryBuilderPropertyInfoTooltip.js +32 -0
- package/lib/components/QueryBuilderPropertyInfoTooltip.js.map +1 -0
- package/lib/components/QueryBuilderPropertySearchPanel.d.ts +24 -0
- package/lib/components/QueryBuilderPropertySearchPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderPropertySearchPanel.js +202 -0
- package/lib/components/QueryBuilderPropertySearchPanel.js.map +1 -0
- package/lib/components/QueryBuilderResultModifierPanel.d.ts +23 -0
- package/lib/components/QueryBuilderResultModifierPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderResultModifierPanel.js +88 -0
- package/lib/components/QueryBuilderResultModifierPanel.js.map +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts +23 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderResultPanel.js +223 -0
- package/lib/components/QueryBuilderResultPanel.js.map +1 -0
- package/lib/components/QueryBuilderSetupPanel.d.ts +23 -0
- package/lib/components/QueryBuilderSetupPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderSetupPanel.js +148 -0
- package/lib/components/QueryBuilderSetupPanel.js.map +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts +23 -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 +23 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +35 -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/QueryEditor.d.ts +29 -0
- package/lib/components/QueryEditor.d.ts.map +1 -0
- package/lib/components/QueryEditor.js +130 -0
- package/lib/components/QueryEditor.js.map +1 -0
- package/lib/components/QueryEditorComponentTestUtils.d.ts +35 -0
- package/lib/components/QueryEditorComponentTestUtils.d.ts.map +1 -0
- package/lib/components/QueryEditorComponentTestUtils.js +108 -0
- package/lib/components/QueryEditorComponentTestUtils.js.map +1 -0
- package/lib/components/QueryEditorStoreProvider.d.ts +37 -0
- package/lib/components/QueryEditorStoreProvider.d.ts.map +1 -0
- package/lib/components/QueryEditorStoreProvider.js +48 -0
- package/lib/components/QueryEditorStoreProvider.js.map +1 -0
- package/lib/components/QuerySetup.d.ts +18 -0
- package/lib/components/QuerySetup.d.ts.map +1 -0
- package/lib/components/QuerySetup.js +388 -0
- package/lib/components/QuerySetup.js.map +1 -0
- package/lib/components/QuerySetupStoreProvider.d.ts +23 -0
- package/lib/components/QuerySetupStoreProvider.d.ts.map +1 -0
- package/lib/components/QuerySetupStoreProvider.js +35 -0
- package/lib/components/QuerySetupStoreProvider.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/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 +68 -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 +36 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +36 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +99 -0
- package/lib/stores/LegendQueryApplicationPlugin.d.ts +47 -0
- package/lib/stores/LegendQueryApplicationPlugin.d.ts.map +1 -0
- package/lib/stores/LegendQueryApplicationPlugin.js +27 -0
- package/lib/stores/LegendQueryApplicationPlugin.js.map +1 -0
- package/lib/stores/LegendQueryBaseStore.d.ts +28 -0
- package/lib/stores/LegendQueryBaseStore.d.ts.map +1 -0
- package/lib/stores/LegendQueryBaseStore.js +28 -0
- package/lib/stores/LegendQueryBaseStore.js.map +1 -0
- package/lib/stores/LegendQueryEventService.d.ts +27 -0
- package/lib/stores/LegendQueryEventService.d.ts.map +1 -0
- package/lib/stores/LegendQueryEventService.js +29 -0
- package/lib/stores/LegendQueryEventService.js.map +1 -0
- package/lib/stores/LegendQueryRouter.d.ts +55 -0
- package/lib/stores/LegendQueryRouter.d.ts.map +1 -0
- package/lib/stores/LegendQueryRouter.js +50 -0
- package/lib/stores/LegendQueryRouter.js.map +1 -0
- package/lib/stores/QueryBuilderAggregationState.d.ts +53 -0
- package/lib/stores/QueryBuilderAggregationState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderAggregationState.js +122 -0
- package/lib/stores/QueryBuilderAggregationState.js.map +1 -0
- package/lib/stores/QueryBuilderExplorerState.d.ts +93 -0
- package/lib/stores/QueryBuilderExplorerState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderExplorerState.js +310 -0
- package/lib/stores/QueryBuilderExplorerState.js.map +1 -0
- package/lib/stores/QueryBuilderFetchStructureState.d.ts +33 -0
- package/lib/stores/QueryBuilderFetchStructureState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderFetchStructureState.js +50 -0
- package/lib/stores/QueryBuilderFetchStructureState.js.map +1 -0
- package/lib/stores/QueryBuilderFilterState.d.ts +127 -0
- package/lib/stores/QueryBuilderFilterState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderFilterState.js +566 -0
- package/lib/stores/QueryBuilderFilterState.js.map +1 -0
- package/lib/stores/QueryBuilderGraphFetchTreeState.d.ts +35 -0
- package/lib/stores/QueryBuilderGraphFetchTreeState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderGraphFetchTreeState.js +65 -0
- package/lib/stores/QueryBuilderGraphFetchTreeState.js.map +1 -0
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.d.ts +41 -0
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.js +173 -0
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.js.map +1 -0
- package/lib/stores/QueryBuilderLambdaBuilder.d.ts +30 -0
- package/lib/stores/QueryBuilderLambdaBuilder.d.ts.map +1 -0
- package/lib/stores/QueryBuilderLambdaBuilder.js +407 -0
- package/lib/stores/QueryBuilderLambdaBuilder.js.map +1 -0
- package/lib/stores/QueryBuilderLambdaProcessor.d.ts +56 -0
- package/lib/stores/QueryBuilderLambdaProcessor.d.ts.map +1 -0
- package/lib/stores/QueryBuilderLambdaProcessor.js +544 -0
- package/lib/stores/QueryBuilderLambdaProcessor.js.map +1 -0
- package/lib/stores/QueryBuilderOperatorsHelper.d.ts +28 -0
- package/lib/stores/QueryBuilderOperatorsHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderOperatorsHelper.js +123 -0
- package/lib/stores/QueryBuilderOperatorsHelper.js.map +1 -0
- package/lib/stores/QueryBuilderPostFilterOperator.d.ts +29 -0
- package/lib/stores/QueryBuilderPostFilterOperator.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPostFilterOperator.js +30 -0
- package/lib/stores/QueryBuilderPostFilterOperator.js.map +1 -0
- package/lib/stores/QueryBuilderPostFilterProcessor.d.ts +24 -0
- package/lib/stores/QueryBuilderPostFilterProcessor.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPostFilterProcessor.js +111 -0
- package/lib/stores/QueryBuilderPostFilterProcessor.js.map +1 -0
- package/lib/stores/QueryBuilderPostFilterState.d.ts +132 -0
- package/lib/stores/QueryBuilderPostFilterState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPostFilterState.js +559 -0
- package/lib/stores/QueryBuilderPostFilterState.js.map +1 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts +25 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.js +161 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -0
- package/lib/stores/QueryBuilderProjectionState.d.ts +104 -0
- package/lib/stores/QueryBuilderProjectionState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderProjectionState.js +432 -0
- package/lib/stores/QueryBuilderProjectionState.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 +384 -0
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -0
- package/lib/stores/QueryBuilderPropertySearchPanelState.d.ts +46 -0
- package/lib/stores/QueryBuilderPropertySearchPanelState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderPropertySearchPanelState.js +240 -0
- package/lib/stores/QueryBuilderPropertySearchPanelState.js.map +1 -0
- package/lib/stores/QueryBuilderResultState.d.ts +38 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderResultState.js +164 -0
- package/lib/stores/QueryBuilderResultState.js.map +1 -0
- package/lib/stores/QueryBuilderSetupState.d.ts +46 -0
- package/lib/stores/QueryBuilderSetupState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderSetupState.js +163 -0
- package/lib/stores/QueryBuilderSetupState.js.map +1 -0
- package/lib/stores/QueryBuilderState.d.ts +101 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderState.js +371 -0
- package/lib/stores/QueryBuilderState.js.map +1 -0
- package/lib/stores/QueryBuilderUnsupportedState.d.ts +26 -0
- package/lib/stores/QueryBuilderUnsupportedState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderUnsupportedState.js +36 -0
- package/lib/stores/QueryBuilderUnsupportedState.js.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +19 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +50 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/stores/QueryEditorStore.d.ts +98 -0
- package/lib/stores/QueryEditorStore.d.ts.map +1 -0
- package/lib/stores/QueryEditorStore.js +370 -0
- package/lib/stores/QueryEditorStore.js.map +1 -0
- package/lib/stores/QueryEditorStoreTestUtils.d.ts +18 -0
- package/lib/stores/QueryEditorStoreTestUtils.d.ts.map +1 -0
- package/lib/stores/QueryEditorStoreTestUtils.js +42 -0
- package/lib/stores/QueryEditorStoreTestUtils.js.map +1 -0
- package/lib/stores/QueryFunctionsExplorerState.d.ts +63 -0
- package/lib/stores/QueryFunctionsExplorerState.d.ts.map +1 -0
- package/lib/stores/QueryFunctionsExplorerState.js +238 -0
- package/lib/stores/QueryFunctionsExplorerState.js.map +1 -0
- package/lib/stores/QueryParametersState.d.ts +30 -0
- package/lib/stores/QueryParametersState.d.ts.map +1 -0
- package/lib/stores/QueryParametersState.js +42 -0
- package/lib/stores/QueryParametersState.js.map +1 -0
- package/lib/stores/QueryResultSetModifierState.d.ts +52 -0
- package/lib/stores/QueryResultSetModifierState.d.ts.map +1 -0
- package/lib/stores/QueryResultSetModifierState.js +165 -0
- package/lib/stores/QueryResultSetModifierState.js.map +1 -0
- package/lib/stores/QuerySetupStore.d.ts +86 -0
- package/lib/stores/QuerySetupStore.d.ts.map +1 -0
- package/lib/stores/QuerySetupStore.js +297 -0
- package/lib/stores/QuerySetupStore.js.map +1 -0
- package/lib/stores/QueryTextEditorState.d.ts +49 -0
- package/lib/stores/QueryTextEditorState.d.ts.map +1 -0
- package/lib/stores/QueryTextEditorState.js +145 -0
- package/lib/stores/QueryTextEditorState.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.d.ts +21 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.js +40 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.js +50 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.js +55 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.d.ts +25 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.js +50 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.js +77 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.js +66 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.d.ts +25 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.js +86 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.d.ts +25 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.js +86 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.js +50 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +26 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.js +50 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.d.ts +25 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.js +45 -0
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.d.ts +20 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.js +257 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.js +72 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.js +72 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.js +139 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.d.ts +26 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.js +107 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +26 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js +107 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.js +103 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.js +65 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.d.ts +26 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.js +108 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.d.ts +26 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.js +107 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.d.ts +31 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.js +72 -0
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.d.ts +23 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.js +74 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.d.ts +32 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.js +76 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.d.ts +32 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.js +76 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.d.ts +32 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.js +142 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +27 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js +105 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +24 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +43 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.d.ts +32 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.js +104 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +33 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.js +67 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.d.ts +27 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js +105 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +24 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.js +43 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.d.ts +32 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.js +76 -0
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -0
- package/package.json +99 -0
- package/src/LegendQueryAppEvent.ts +20 -0
- package/src/QueryBuilder_Const.ts +88 -0
- package/src/application/LegendQuery.tsx +92 -0
- package/src/application/LegendQueryApplicationConfig.ts +77 -0
- package/src/application/LegendQueryPluginManager.ts +67 -0
- package/src/components/LegendQueryApplication.tsx +104 -0
- package/src/components/LegendQueryBaseStoreProvider.tsx +68 -0
- package/src/components/QueryBuilder.tsx +375 -0
- package/src/components/QueryBuilderExplorerPanel.tsx +998 -0
- package/src/components/QueryBuilderFetchStructurePanel.tsx +184 -0
- package/src/components/QueryBuilderFilterPanel.tsx +858 -0
- package/src/components/QueryBuilderFunctionsExplorerPanel.tsx +598 -0
- package/src/components/QueryBuilderGraphFetchTreePanel.tsx +270 -0
- package/src/components/QueryBuilderLambdaEditor.tsx +117 -0
- package/src/components/QueryBuilderMilestoneEditor.tsx +291 -0
- package/src/components/QueryBuilderParameterPanel.tsx +434 -0
- package/src/components/QueryBuilderPostFilterPanel.tsx +1061 -0
- package/src/components/QueryBuilderProjectionPanel.tsx +652 -0
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +370 -0
- package/src/components/QueryBuilderPropertyInfoTooltip.tsx +87 -0
- package/src/components/QueryBuilderPropertySearchPanel.tsx +617 -0
- package/src/components/QueryBuilderResultModifierPanel.tsx +252 -0
- package/src/components/QueryBuilderResultPanel.tsx +582 -0
- package/src/components/QueryBuilderSetupPanel.tsx +341 -0
- package/src/components/QueryBuilderTextEditor.tsx +127 -0
- package/src/components/QueryBuilderUnsupportedQueryEditor.tsx +110 -0
- package/src/components/QueryBuilder_TestID.ts +26 -0
- package/src/components/QueryEditor.tsx +345 -0
- package/src/components/QueryEditorComponentTestUtils.tsx +200 -0
- package/src/components/QueryEditorStoreProvider.tsx +128 -0
- package/src/components/QuerySetup.tsx +907 -0
- package/src/components/QuerySetupStoreProvider.tsx +65 -0
- package/src/components/shared/ElementIconUtils.tsx +47 -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 +170 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.ts +573 -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 +57 -0
- package/src/stores/LegendQueryApplicationPlugin.ts +61 -0
- package/src/stores/LegendQueryBaseStore.ts +47 -0
- package/src/stores/LegendQueryEventService.ts +38 -0
- package/src/stores/LegendQueryRouter.ts +114 -0
- package/src/stores/QueryBuilderAggregationState.ts +208 -0
- package/src/stores/QueryBuilderExplorerState.ts +590 -0
- package/src/stores/QueryBuilderFetchStructureState.ts +59 -0
- package/src/stores/QueryBuilderFilterState.ts +815 -0
- package/src/stores/QueryBuilderGraphFetchTreeState.ts +90 -0
- package/src/stores/QueryBuilderGraphFetchTreeUtil.ts +281 -0
- package/src/stores/QueryBuilderLambdaBuilder.ts +755 -0
- package/src/stores/QueryBuilderLambdaProcessor.ts +1239 -0
- package/src/stores/QueryBuilderOperatorsHelper.ts +191 -0
- package/src/stores/QueryBuilderPostFilterOperator.ts +66 -0
- package/src/stores/QueryBuilderPostFilterProcessor.ts +275 -0
- package/src/stores/QueryBuilderPostFilterState.ts +762 -0
- package/src/stores/QueryBuilderPreviewDataHelper.ts +300 -0
- package/src/stores/QueryBuilderProjectionState.ts +796 -0
- package/src/stores/QueryBuilderPropertyEditorState.ts +656 -0
- package/src/stores/QueryBuilderPropertySearchPanelState.ts +331 -0
- package/src/stores/QueryBuilderResultState.ts +263 -0
- package/src/stores/QueryBuilderSetupState.ts +236 -0
- package/src/stores/QueryBuilderState.ts +561 -0
- package/src/stores/QueryBuilderUnsupportedState.ts +42 -0
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +76 -0
- package/src/stores/QueryEditorStore.ts +648 -0
- package/src/stores/QueryEditorStoreTestUtils.ts +46 -0
- package/src/stores/QueryFunctionsExplorerState.ts +386 -0
- package/src/stores/QueryParametersState.ts +54 -0
- package/src/stores/QueryResultSetModifierState.ts +307 -0
- package/src/stores/QuerySetupStore.ts +430 -0
- package/src/stores/QueryTextEditorState.ts +203 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.ts +111 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.ts +100 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.ts +108 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.ts +98 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.ts +175 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.ts +157 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.ts +176 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.ts +176 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.ts +100 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.ts +100 -0
- package/src/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.ts +90 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperatorHelper.ts +524 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_Contain.ts +134 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_EndWith.ts +134 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_Equal.ts +233 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.ts +164 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.ts +164 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_In.ts +181 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.ts +125 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_LessThan.ts +165 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.ts +164 -0
- package/src/stores/filterOperators/QueryBuilderFilterOperator_StartWith.ts +134 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.ts +129 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.ts +140 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.ts +135 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.ts +238 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.ts +161 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +70 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.ts +183 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.ts +113 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.ts +161 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.ts +70 -0
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.ts +135 -0
- package/tsconfig.json +155 -0
- package/tsconfig.package.json +38 -0
@@ -0,0 +1,90 @@
|
|
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 {
|
18
|
+
PRIMITIVE_TYPE,
|
19
|
+
type ValueSpecification,
|
20
|
+
type SimpleFunctionExpression,
|
21
|
+
type VariableExpression,
|
22
|
+
type AbstractPropertyExpression,
|
23
|
+
type PureModel,
|
24
|
+
} from '@finos/legend-graph';
|
25
|
+
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../QueryBuilder_Const.js';
|
26
|
+
import {
|
27
|
+
type QueryBuilderAggregateColumnState,
|
28
|
+
QueryBuilderAggregateOperator,
|
29
|
+
} from '../QueryBuilderAggregationState.js';
|
30
|
+
import {
|
31
|
+
type QueryBuilderProjectionColumnState,
|
32
|
+
QueryBuilderSimpleProjectionColumnState,
|
33
|
+
} from '../QueryBuilderProjectionState.js';
|
34
|
+
import {
|
35
|
+
buildAggregateColumnState,
|
36
|
+
buildAggregateExpression,
|
37
|
+
} from './QueryBuilderAggregateOperatorHelper.js';
|
38
|
+
|
39
|
+
export class QueryBuilderAggregateOperator_Sum extends QueryBuilderAggregateOperator {
|
40
|
+
getLabel(projectionColumnState: QueryBuilderProjectionColumnState): string {
|
41
|
+
return 'sum';
|
42
|
+
}
|
43
|
+
|
44
|
+
isCompatibleWithColumn(
|
45
|
+
projectionColumnState: QueryBuilderProjectionColumnState,
|
46
|
+
): boolean {
|
47
|
+
if (
|
48
|
+
projectionColumnState instanceof QueryBuilderSimpleProjectionColumnState
|
49
|
+
) {
|
50
|
+
const propertyType =
|
51
|
+
projectionColumnState.propertyExpressionState.propertyExpression.func
|
52
|
+
.genericType.value.rawType;
|
53
|
+
return (
|
54
|
+
[
|
55
|
+
PRIMITIVE_TYPE.NUMBER,
|
56
|
+
PRIMITIVE_TYPE.INTEGER,
|
57
|
+
PRIMITIVE_TYPE.DECIMAL,
|
58
|
+
PRIMITIVE_TYPE.FLOAT,
|
59
|
+
] as string[]
|
60
|
+
).includes(propertyType.path);
|
61
|
+
}
|
62
|
+
return true;
|
63
|
+
}
|
64
|
+
|
65
|
+
buildAggregateExpression(
|
66
|
+
propertyExpression: AbstractPropertyExpression | undefined,
|
67
|
+
variableName: string,
|
68
|
+
graph: PureModel,
|
69
|
+
): ValueSpecification {
|
70
|
+
return buildAggregateExpression(
|
71
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUM,
|
72
|
+
graph,
|
73
|
+
variableName,
|
74
|
+
);
|
75
|
+
}
|
76
|
+
|
77
|
+
buildAggregateColumnState(
|
78
|
+
expression: SimpleFunctionExpression,
|
79
|
+
lambdaParam: VariableExpression,
|
80
|
+
projectionColumnState: QueryBuilderProjectionColumnState,
|
81
|
+
): QueryBuilderAggregateColumnState | undefined {
|
82
|
+
return buildAggregateColumnState(
|
83
|
+
projectionColumnState,
|
84
|
+
lambdaParam,
|
85
|
+
expression,
|
86
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUM,
|
87
|
+
this,
|
88
|
+
);
|
89
|
+
}
|
90
|
+
}
|
@@ -0,0 +1,524 @@
|
|
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 {
|
18
|
+
type ValueSpecification,
|
19
|
+
extractElementNameFromPath,
|
20
|
+
matchFunctionName,
|
21
|
+
LambdaFunctionInstanceValue,
|
22
|
+
VariableExpression,
|
23
|
+
AbstractPropertyExpression,
|
24
|
+
SimpleFunctionExpression,
|
25
|
+
TYPICAL_MULTIPLICITY_TYPE,
|
26
|
+
} from '@finos/legend-graph';
|
27
|
+
import {
|
28
|
+
guaranteeType,
|
29
|
+
guaranteeNonNullable,
|
30
|
+
assertTrue,
|
31
|
+
generateEnumerableNameFromToken,
|
32
|
+
} from '@finos/legend-shared';
|
33
|
+
import {
|
34
|
+
FilterConditionState,
|
35
|
+
type QueryBuilderFilterState,
|
36
|
+
type QueryBuilderFilterOperator,
|
37
|
+
} from '../QueryBuilderFilterState.js';
|
38
|
+
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../QueryBuilder_Const.js';
|
39
|
+
import { buildGenericLambdaFunctionInstanceValue } from '../QueryBuilderValueSpecificationBuilderHelper.js';
|
40
|
+
import { buildPropertyExpressionChain } from '../QueryBuilderLambdaBuilder.js';
|
41
|
+
|
42
|
+
const getPropertyExpressionChainVariable = (
|
43
|
+
propertyExpression: AbstractPropertyExpression,
|
44
|
+
): VariableExpression => {
|
45
|
+
let currentExpression: ValueSpecification = propertyExpression;
|
46
|
+
while (currentExpression instanceof AbstractPropertyExpression) {
|
47
|
+
currentExpression = guaranteeNonNullable(
|
48
|
+
currentExpression.parametersValues[0],
|
49
|
+
);
|
50
|
+
// Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
|
51
|
+
// $x.employees->subType(@Person)->subType(@Staff)
|
52
|
+
while (
|
53
|
+
currentExpression instanceof SimpleFunctionExpression &&
|
54
|
+
matchFunctionName(
|
55
|
+
currentExpression.functionName,
|
56
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
57
|
+
)
|
58
|
+
) {
|
59
|
+
currentExpression = guaranteeNonNullable(
|
60
|
+
currentExpression.parametersValues[0],
|
61
|
+
);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
return guaranteeType(currentExpression, VariableExpression);
|
65
|
+
};
|
66
|
+
|
67
|
+
const buildFilterConditionExpressionWithExists = (
|
68
|
+
filterConditionState: FilterConditionState,
|
69
|
+
operatorFunctionFullPath: string,
|
70
|
+
): ValueSpecification => {
|
71
|
+
const multiplicityOne =
|
72
|
+
filterConditionState.filterState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
|
73
|
+
TYPICAL_MULTIPLICITY_TYPE.ONE,
|
74
|
+
);
|
75
|
+
assertTrue(
|
76
|
+
filterConditionState.propertyExpressionState.requiresExistsHandling,
|
77
|
+
);
|
78
|
+
// 1. Decompose property expression
|
79
|
+
const expressions: (AbstractPropertyExpression | SimpleFunctionExpression)[] =
|
80
|
+
[];
|
81
|
+
let currentPropertyExpression: ValueSpecification =
|
82
|
+
buildPropertyExpressionChain(
|
83
|
+
filterConditionState.propertyExpressionState.propertyExpression,
|
84
|
+
filterConditionState.propertyExpressionState.queryBuilderState,
|
85
|
+
);
|
86
|
+
while (
|
87
|
+
currentPropertyExpression instanceof AbstractPropertyExpression ||
|
88
|
+
(currentPropertyExpression instanceof SimpleFunctionExpression &&
|
89
|
+
matchFunctionName(
|
90
|
+
currentPropertyExpression.functionName,
|
91
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
92
|
+
))
|
93
|
+
) {
|
94
|
+
let exp: AbstractPropertyExpression | SimpleFunctionExpression;
|
95
|
+
if (currentPropertyExpression instanceof SimpleFunctionExpression) {
|
96
|
+
exp = new SimpleFunctionExpression(
|
97
|
+
extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE),
|
98
|
+
multiplicityOne,
|
99
|
+
);
|
100
|
+
} else {
|
101
|
+
exp = new AbstractPropertyExpression('', multiplicityOne);
|
102
|
+
exp.func = currentPropertyExpression.func;
|
103
|
+
}
|
104
|
+
// NOTE: we must retain the rest of the parameters as those are derived property parameters
|
105
|
+
exp.parametersValues =
|
106
|
+
currentPropertyExpression.parametersValues.length > 1
|
107
|
+
? currentPropertyExpression.parametersValues.slice(1)
|
108
|
+
: [];
|
109
|
+
expressions.push(exp);
|
110
|
+
currentPropertyExpression = guaranteeNonNullable(
|
111
|
+
currentPropertyExpression.parametersValues[0],
|
112
|
+
);
|
113
|
+
}
|
114
|
+
const rootVariable = guaranteeType(
|
115
|
+
currentPropertyExpression,
|
116
|
+
VariableExpression,
|
117
|
+
);
|
118
|
+
|
119
|
+
// 2. Traverse the list of decomposed property expression backward, every time we encounter a property of
|
120
|
+
// multiplicity many, create a new property expression and keep track of it to later form the lambda chain
|
121
|
+
const existsLambdaParamNames = [
|
122
|
+
...filterConditionState.existsLambdaParamNames,
|
123
|
+
];
|
124
|
+
const existsLambdaPropertyChains: ValueSpecification[] = [rootVariable];
|
125
|
+
let currentParamNameIndex = 0;
|
126
|
+
|
127
|
+
for (let i = expressions.length - 1; i >= 0; --i) {
|
128
|
+
const exp = expressions[i] as
|
129
|
+
| AbstractPropertyExpression
|
130
|
+
| SimpleFunctionExpression;
|
131
|
+
// just keep adding to the property chain
|
132
|
+
exp.parametersValues.unshift(
|
133
|
+
existsLambdaPropertyChains[
|
134
|
+
existsLambdaPropertyChains.length - 1
|
135
|
+
] as ValueSpecification,
|
136
|
+
);
|
137
|
+
existsLambdaPropertyChains[existsLambdaPropertyChains.length - 1] = exp;
|
138
|
+
// ... but if the property is of multiplicity multiple, start a new property chain
|
139
|
+
if (
|
140
|
+
exp instanceof AbstractPropertyExpression &&
|
141
|
+
(exp.func.multiplicity.upperBound === undefined ||
|
142
|
+
exp.func.multiplicity.upperBound > 1)
|
143
|
+
) {
|
144
|
+
// NOTE: we need to find/generate the property chain variable name
|
145
|
+
// here, by doing this, we try our best to respect original/user-input variable name
|
146
|
+
if (currentParamNameIndex > existsLambdaParamNames.length - 1) {
|
147
|
+
existsLambdaParamNames.push(
|
148
|
+
generateEnumerableNameFromToken(
|
149
|
+
existsLambdaParamNames,
|
150
|
+
filterConditionState.filterState.lambdaParameterName,
|
151
|
+
),
|
152
|
+
);
|
153
|
+
assertTrue(currentParamNameIndex === existsLambdaParamNames.length - 1);
|
154
|
+
}
|
155
|
+
existsLambdaPropertyChains.push(
|
156
|
+
new VariableExpression(
|
157
|
+
existsLambdaParamNames[currentParamNameIndex] as string,
|
158
|
+
multiplicityOne,
|
159
|
+
),
|
160
|
+
);
|
161
|
+
currentParamNameIndex++;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
// 3. Build each property chain into an exists() simple function expression
|
166
|
+
const simpleFunctionExpressions: SimpleFunctionExpression[] = [];
|
167
|
+
for (let i = 0; i < existsLambdaPropertyChains.length - 1; ++i) {
|
168
|
+
const simpleFunctionExpression = new SimpleFunctionExpression(
|
169
|
+
extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.EXISTS),
|
170
|
+
multiplicityOne,
|
171
|
+
);
|
172
|
+
simpleFunctionExpression.parametersValues.push(
|
173
|
+
existsLambdaPropertyChains[i] as ValueSpecification,
|
174
|
+
);
|
175
|
+
simpleFunctionExpressions.push(simpleFunctionExpression);
|
176
|
+
}
|
177
|
+
// build the leaf simple function expression which uses the operator
|
178
|
+
const operatorEpression = new SimpleFunctionExpression(
|
179
|
+
extractElementNameFromPath(operatorFunctionFullPath),
|
180
|
+
multiplicityOne,
|
181
|
+
);
|
182
|
+
operatorEpression.parametersValues.push(
|
183
|
+
existsLambdaPropertyChains[
|
184
|
+
existsLambdaPropertyChains.length - 1
|
185
|
+
] as ValueSpecification,
|
186
|
+
);
|
187
|
+
// NOTE: there are simple operators which do not require any params (e.g. isEmpty)
|
188
|
+
if (filterConditionState.value) {
|
189
|
+
operatorEpression.parametersValues.push(filterConditionState.value);
|
190
|
+
}
|
191
|
+
simpleFunctionExpressions.push(operatorEpression);
|
192
|
+
|
193
|
+
// 4. Build the exists() lambda chain
|
194
|
+
assertTrue(simpleFunctionExpressions.length >= 2);
|
195
|
+
for (let i = simpleFunctionExpressions.length - 2; i >= 0; --i) {
|
196
|
+
const currentSFE = simpleFunctionExpressions[i] as SimpleFunctionExpression;
|
197
|
+
const childSFE = simpleFunctionExpressions[
|
198
|
+
i + 1
|
199
|
+
] as SimpleFunctionExpression;
|
200
|
+
// build child SFE lambda
|
201
|
+
const _existsLambdaVariable = childSFE.parametersValues[0];
|
202
|
+
const existsLambdaVariable =
|
203
|
+
_existsLambdaVariable instanceof AbstractPropertyExpression
|
204
|
+
? getPropertyExpressionChainVariable(_existsLambdaVariable)
|
205
|
+
: guaranteeType(_existsLambdaVariable, VariableExpression);
|
206
|
+
const existsLambda = buildGenericLambdaFunctionInstanceValue(
|
207
|
+
existsLambdaVariable.name,
|
208
|
+
[childSFE],
|
209
|
+
filterConditionState.filterState.queryBuilderState.graphManagerState
|
210
|
+
.graph,
|
211
|
+
);
|
212
|
+
// add the child SFE lambda to the current SFE parameters
|
213
|
+
currentSFE.parametersValues.push(existsLambda);
|
214
|
+
}
|
215
|
+
|
216
|
+
return simpleFunctionExpressions[0] as SimpleFunctionExpression;
|
217
|
+
};
|
218
|
+
|
219
|
+
export const buildFilterConditionExpression = (
|
220
|
+
filterConditionState: FilterConditionState,
|
221
|
+
operatorFunctionFullPath: string,
|
222
|
+
): ValueSpecification => {
|
223
|
+
const multiplicityOne =
|
224
|
+
filterConditionState.filterState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
|
225
|
+
TYPICAL_MULTIPLICITY_TYPE.ONE,
|
226
|
+
);
|
227
|
+
if (filterConditionState.propertyExpressionState.requiresExistsHandling) {
|
228
|
+
return buildFilterConditionExpressionWithExists(
|
229
|
+
filterConditionState,
|
230
|
+
operatorFunctionFullPath,
|
231
|
+
);
|
232
|
+
}
|
233
|
+
const expression = new SimpleFunctionExpression(
|
234
|
+
extractElementNameFromPath(operatorFunctionFullPath),
|
235
|
+
multiplicityOne,
|
236
|
+
);
|
237
|
+
const propertyExpression = buildPropertyExpressionChain(
|
238
|
+
filterConditionState.propertyExpressionState.propertyExpression,
|
239
|
+
filterConditionState.propertyExpressionState.queryBuilderState,
|
240
|
+
);
|
241
|
+
expression.parametersValues.push(guaranteeNonNullable(propertyExpression));
|
242
|
+
// NOTE: there are simple operators which do not require any params (e.g. isEmpty)
|
243
|
+
if (filterConditionState.value) {
|
244
|
+
expression.parametersValues.push(filterConditionState.value);
|
245
|
+
}
|
246
|
+
return expression;
|
247
|
+
};
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Handling exists() lambda found in the filter condition expression.
|
251
|
+
* The general approach for handling exists() is we will flat out the chain
|
252
|
+
* of exists() expressions into a normal filter condition state.
|
253
|
+
*
|
254
|
+
* When we build the condition function expression from the filter condition state,
|
255
|
+
* we walk the property expression chain, find property with multiplitiy upper bound
|
256
|
+
* other than 1 and create an exists() lambda there
|
257
|
+
*
|
258
|
+
* NOTE: to ensure we respect user's choice of variable name, as we build the state
|
259
|
+
* we record the lambda parameter names, so we can use those while re-building the function
|
260
|
+
* If for some reason, this list is stale, we can start adding our own parameter names
|
261
|
+
*/
|
262
|
+
const buildFilterConditionStateWithExists = (
|
263
|
+
filterState: QueryBuilderFilterState,
|
264
|
+
precedingExpression: SimpleFunctionExpression,
|
265
|
+
operatorFunctionFullPath: string,
|
266
|
+
): [FilterConditionState | undefined, SimpleFunctionExpression | undefined] => {
|
267
|
+
if (
|
268
|
+
matchFunctionName(
|
269
|
+
precedingExpression.functionName,
|
270
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.EXISTS,
|
271
|
+
)
|
272
|
+
) {
|
273
|
+
// 1. Decompose the exists() lambda chain into property expression chains
|
274
|
+
const existsLambdaParameterNames: string[] = [];
|
275
|
+
|
276
|
+
// `existsLambdaExpressions` should be a list of `AbstractPropertyExpression`
|
277
|
+
// e.g. |Firm.all()->filter(x|$x.employees->exists(x_1|$x_1->subType(@Develper).id->exists(x_2|$x_2 == 1))
|
278
|
+
// In the first exists() lambda, `$x_1->subType(@Develper).id` is an `AbstractPropertyExpression`.
|
279
|
+
const existsLambdaExpressions: AbstractPropertyExpression[] = [];
|
280
|
+
let mainFilterExpression: SimpleFunctionExpression = precedingExpression;
|
281
|
+
while (
|
282
|
+
matchFunctionName(
|
283
|
+
mainFilterExpression.functionName,
|
284
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.EXISTS,
|
285
|
+
)
|
286
|
+
) {
|
287
|
+
const existsLambda = guaranteeNonNullable(
|
288
|
+
guaranteeType(
|
289
|
+
mainFilterExpression.parametersValues[1],
|
290
|
+
LambdaFunctionInstanceValue,
|
291
|
+
).values[0],
|
292
|
+
`Can't process exists() expression: exists() lambda is missing`,
|
293
|
+
);
|
294
|
+
assertTrue(
|
295
|
+
existsLambda.expressionSequence.length === 1,
|
296
|
+
`Can't process exists() expression: exists() lambda body should hold an expression`,
|
297
|
+
);
|
298
|
+
mainFilterExpression = guaranteeType(
|
299
|
+
existsLambda.expressionSequence[0],
|
300
|
+
SimpleFunctionExpression,
|
301
|
+
`Can't process exists() expression: exists() lambda body should hold an expression`,
|
302
|
+
);
|
303
|
+
|
304
|
+
// record the lambda parameter name
|
305
|
+
assertTrue(
|
306
|
+
existsLambda.functionType.parameters.length === 1,
|
307
|
+
`Can't process exists() expression: exists() lambda should have 1 parameter`,
|
308
|
+
);
|
309
|
+
existsLambdaParameterNames.push(
|
310
|
+
guaranteeType(
|
311
|
+
existsLambda.functionType.parameters[0],
|
312
|
+
VariableExpression,
|
313
|
+
`Can't process exists() expression: exists() lambda should have 1 parameter`,
|
314
|
+
).name,
|
315
|
+
);
|
316
|
+
|
317
|
+
// record the lambda property expression
|
318
|
+
if (
|
319
|
+
mainFilterExpression.parametersValues[0] instanceof
|
320
|
+
AbstractPropertyExpression
|
321
|
+
) {
|
322
|
+
existsLambdaExpressions.push(mainFilterExpression.parametersValues[0]);
|
323
|
+
}
|
324
|
+
}
|
325
|
+
// NOTE: make sure that the inner most function expression is the one we support
|
326
|
+
if (
|
327
|
+
!matchFunctionName(
|
328
|
+
mainFilterExpression.functionName,
|
329
|
+
operatorFunctionFullPath,
|
330
|
+
)
|
331
|
+
) {
|
332
|
+
return [undefined, undefined];
|
333
|
+
}
|
334
|
+
|
335
|
+
// 2. Build the property expression
|
336
|
+
const multiplicityOne =
|
337
|
+
filterState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(
|
338
|
+
TYPICAL_MULTIPLICITY_TYPE.ONE,
|
339
|
+
);
|
340
|
+
const initialPropertyExpression = guaranteeType(
|
341
|
+
precedingExpression.parametersValues[0],
|
342
|
+
AbstractPropertyExpression,
|
343
|
+
);
|
344
|
+
let flattenedPropertyExpressionChain = new AbstractPropertyExpression(
|
345
|
+
'',
|
346
|
+
multiplicityOne,
|
347
|
+
);
|
348
|
+
flattenedPropertyExpressionChain.func = initialPropertyExpression.func;
|
349
|
+
flattenedPropertyExpressionChain.parametersValues =
|
350
|
+
initialPropertyExpression.parametersValues;
|
351
|
+
|
352
|
+
for (const expression of existsLambdaExpressions) {
|
353
|
+
// when rebuilding the property expression chain, disregard the initial variable that starts the chain
|
354
|
+
const expressions: (
|
355
|
+
| AbstractPropertyExpression
|
356
|
+
| SimpleFunctionExpression
|
357
|
+
)[] = [];
|
358
|
+
let currentExpression: ValueSpecification = expression;
|
359
|
+
while (
|
360
|
+
currentExpression instanceof AbstractPropertyExpression ||
|
361
|
+
(currentExpression instanceof SimpleFunctionExpression &&
|
362
|
+
matchFunctionName(
|
363
|
+
currentExpression.functionName,
|
364
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
365
|
+
))
|
366
|
+
) {
|
367
|
+
if (currentExpression instanceof SimpleFunctionExpression) {
|
368
|
+
const functionExpression = new SimpleFunctionExpression(
|
369
|
+
extractElementNameFromPath(
|
370
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
|
371
|
+
),
|
372
|
+
multiplicityOne,
|
373
|
+
);
|
374
|
+
functionExpression.parametersValues.unshift(
|
375
|
+
guaranteeNonNullable(currentExpression.parametersValues[1]),
|
376
|
+
);
|
377
|
+
expressions.push(functionExpression);
|
378
|
+
} else if (currentExpression instanceof AbstractPropertyExpression) {
|
379
|
+
const propertyExpression = new AbstractPropertyExpression(
|
380
|
+
'',
|
381
|
+
multiplicityOne,
|
382
|
+
);
|
383
|
+
propertyExpression.func = currentExpression.func;
|
384
|
+
if (currentExpression.parametersValues.length > 1) {
|
385
|
+
// NOTE: we must retain the rest of the parameters as those are derived property parameters
|
386
|
+
propertyExpression.parametersValues =
|
387
|
+
currentExpression.parametersValues.slice(1);
|
388
|
+
} else {
|
389
|
+
propertyExpression.parametersValues = [];
|
390
|
+
}
|
391
|
+
expressions.push(propertyExpression);
|
392
|
+
}
|
393
|
+
currentExpression = guaranteeNonNullable(
|
394
|
+
currentExpression.parametersValues[0],
|
395
|
+
);
|
396
|
+
}
|
397
|
+
assertTrue(
|
398
|
+
expressions.length > 0,
|
399
|
+
`Can't process exists() expression: exists() usage with non-chain property expression is not supported`,
|
400
|
+
);
|
401
|
+
for (let i = 0; i < expressions.length - 1; ++i) {
|
402
|
+
(
|
403
|
+
expressions[i] as
|
404
|
+
| AbstractPropertyExpression
|
405
|
+
| SimpleFunctionExpression
|
406
|
+
).parametersValues.unshift(
|
407
|
+
expressions[i + 1] as
|
408
|
+
| AbstractPropertyExpression
|
409
|
+
| SimpleFunctionExpression,
|
410
|
+
);
|
411
|
+
}
|
412
|
+
(
|
413
|
+
expressions[expressions.length - 1] as
|
414
|
+
| AbstractPropertyExpression
|
415
|
+
| SimpleFunctionExpression
|
416
|
+
).parametersValues.unshift(flattenedPropertyExpressionChain);
|
417
|
+
flattenedPropertyExpressionChain = guaranteeType(
|
418
|
+
expressions[0],
|
419
|
+
AbstractPropertyExpression,
|
420
|
+
`Can't process exists() expression: can't flatten to a property expression`,
|
421
|
+
);
|
422
|
+
}
|
423
|
+
|
424
|
+
// 3. Build the filter condition state with the simplified property expression
|
425
|
+
const filterConditionState = new FilterConditionState(
|
426
|
+
filterState,
|
427
|
+
flattenedPropertyExpressionChain,
|
428
|
+
);
|
429
|
+
existsLambdaParameterNames.forEach((paramName) =>
|
430
|
+
filterConditionState.addExistsLambdaParamNames(paramName),
|
431
|
+
);
|
432
|
+
return [filterConditionState, mainFilterExpression];
|
433
|
+
}
|
434
|
+
return [undefined, undefined];
|
435
|
+
};
|
436
|
+
|
437
|
+
export const buildFilterConditionState = (
|
438
|
+
filterState: QueryBuilderFilterState,
|
439
|
+
expression: SimpleFunctionExpression,
|
440
|
+
operatorFunctionFullPath: string,
|
441
|
+
operator: QueryBuilderFilterOperator,
|
442
|
+
/**
|
443
|
+
* Use this flag for operator that does not require any param (e.g. isEmpty)
|
444
|
+
* NOTE: this is not the cleanest way to do this, if we find ourselves adding more and more customization
|
445
|
+
* to this utility function, we should just create a bunch of different methods
|
446
|
+
*/
|
447
|
+
hasNoValue = false,
|
448
|
+
): FilterConditionState | undefined => {
|
449
|
+
let filterConditionState: FilterConditionState | undefined;
|
450
|
+
// This is the simple expression of form `{property} {operator} {value}`
|
451
|
+
// This is used for post-build checks (useful when this expression is nested inside a longer
|
452
|
+
// chain of expression, e.g. ->exists($x|x == 'something'), etc.)
|
453
|
+
let mainExpressionWithOperator: SimpleFunctionExpression | undefined;
|
454
|
+
|
455
|
+
if (matchFunctionName(expression.functionName, operatorFunctionFullPath)) {
|
456
|
+
assertTrue(
|
457
|
+
expression.parametersValues.length === (hasNoValue ? 1 : 2),
|
458
|
+
`Can't process ${extractElementNameFromPath(
|
459
|
+
operatorFunctionFullPath,
|
460
|
+
)}() expression: ${extractElementNameFromPath(
|
461
|
+
operatorFunctionFullPath,
|
462
|
+
)}() expects ${hasNoValue ? 'no argument' : '1 argument'}`,
|
463
|
+
);
|
464
|
+
|
465
|
+
const propertyExpression = guaranteeType(
|
466
|
+
expression.parametersValues[0],
|
467
|
+
AbstractPropertyExpression,
|
468
|
+
`Can't process ${extractElementNameFromPath(
|
469
|
+
operatorFunctionFullPath,
|
470
|
+
)}() expression: expects property expression in lambda body`,
|
471
|
+
);
|
472
|
+
|
473
|
+
const variableName =
|
474
|
+
getPropertyExpressionChainVariable(propertyExpression).name;
|
475
|
+
assertTrue(
|
476
|
+
filterState.lambdaParameterName === variableName,
|
477
|
+
`Can't process ${extractElementNameFromPath(
|
478
|
+
operatorFunctionFullPath,
|
479
|
+
)}() expression: expects variable used in lambda body '${variableName}' to match lambda parameter '${
|
480
|
+
filterState.lambdaParameterName
|
481
|
+
}'`,
|
482
|
+
);
|
483
|
+
|
484
|
+
filterConditionState = new FilterConditionState(
|
485
|
+
filterState,
|
486
|
+
propertyExpression,
|
487
|
+
);
|
488
|
+
mainExpressionWithOperator = expression;
|
489
|
+
} else if (
|
490
|
+
matchFunctionName(
|
491
|
+
expression.functionName,
|
492
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.EXISTS,
|
493
|
+
)
|
494
|
+
) {
|
495
|
+
[filterConditionState, mainExpressionWithOperator] =
|
496
|
+
buildFilterConditionStateWithExists(
|
497
|
+
filterState,
|
498
|
+
expression,
|
499
|
+
operatorFunctionFullPath,
|
500
|
+
);
|
501
|
+
}
|
502
|
+
|
503
|
+
// Post-build check: make sure the simple filter condition LHS, RHS, and operator are compatible
|
504
|
+
// and set the value of the condition in the state accordingly.
|
505
|
+
if (filterConditionState && mainExpressionWithOperator) {
|
506
|
+
assertTrue(
|
507
|
+
operator.isCompatibleWithFilterConditionProperty(filterConditionState),
|
508
|
+
`Can't process ${extractElementNameFromPath(
|
509
|
+
operatorFunctionFullPath,
|
510
|
+
)}() expression: property is not compatible with operator`,
|
511
|
+
);
|
512
|
+
filterConditionState.setOperator(operator);
|
513
|
+
filterConditionState.setValue(
|
514
|
+
hasNoValue ? undefined : mainExpressionWithOperator.parametersValues[1],
|
515
|
+
);
|
516
|
+
if (!operator.isCompatibleWithFilterConditionValue(filterConditionState)) {
|
517
|
+
filterConditionState.setValue(
|
518
|
+
operator.getDefaultFilterConditionValue(filterConditionState),
|
519
|
+
);
|
520
|
+
}
|
521
|
+
return filterConditionState;
|
522
|
+
}
|
523
|
+
return undefined;
|
524
|
+
};
|