@finos/legend-application-query 5.1.0 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application/LegendQueryApplicationConfig.d.ts +17 -1
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.js +23 -1
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +17 -8
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderParameterPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParameterPanel.js +14 -35
- package/lib/components/QueryBuilderParameterPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +13 -13
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +34 -26
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSetupPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSetupPanel.js +11 -12
- package/lib/components/QueryBuilderSetupPanel.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +1 -1
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +4 -2
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +16 -4
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/components/QueryEditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryEditorComponentTestUtils.js +0 -2
- package/lib/components/QueryEditorComponentTestUtils.js.map +1 -1
- package/lib/components/{QueryBuilderExplorerPanel.d.ts → explorer/QueryBuilderExplorerPanel.d.ts} +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderExplorerPanel.js → explorer/QueryBuilderExplorerPanel.js} +19 -81
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -0
- package/lib/components/{QueryBuilderFunctionsExplorerPanel.d.ts → explorer/QueryBuilderFunctionsExplorerPanel.d.ts} +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderFunctionsExplorerPanel.js → explorer/QueryBuilderFunctionsExplorerPanel.js} +9 -39
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -0
- package/lib/components/{QueryBuilderMilestoneEditor.d.ts → explorer/QueryBuilderMilestoneEditor.d.ts} +1 -1
- package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts.map +1 -0
- package/lib/components/{QueryBuilderMilestoneEditor.js → explorer/QueryBuilderMilestoneEditor.js} +7 -7
- package/lib/components/explorer/QueryBuilderMilestoneEditor.js.map +1 -0
- package/lib/components/{QueryBuilderPropertySearchPanel.d.ts → explorer/QueryBuilderPropertySearchPanel.d.ts} +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderPropertySearchPanel.js → explorer/QueryBuilderPropertySearchPanel.js} +8 -11
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -0
- package/lib/components/{QueryBuilderFetchStructurePanel.d.ts → fetch-structure/QueryBuilderFetchStructurePanel.d.ts} +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +135 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -0
- package/lib/components/{QueryBuilderGraphFetchTreePanel.d.ts → fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts} +3 -3
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderGraphFetchTreePanel.js → fetch-structure/QueryBuilderGraphFetchTreePanel.js} +9 -9
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -0
- package/lib/components/{QueryBuilderPostFilterPanel.d.ts → fetch-structure/QueryBuilderPostFilterPanel.d.ts} +3 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderPostFilterPanel.js → fetch-structure/QueryBuilderPostFilterPanel.js} +51 -74
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -0
- package/lib/components/{QueryBuilderProjectionPanel.d.ts → fetch-structure/QueryBuilderProjectionPanel.d.ts} +1 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderProjectionPanel.js → fetch-structure/QueryBuilderProjectionPanel.js} +53 -73
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -0
- package/lib/components/{QueryBuilderResultModifierPanel.d.ts → fetch-structure/QueryBuilderResultModifierPanel.d.ts} +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderResultModifierPanel.js → fetch-structure/QueryBuilderResultModifierPanel.js} +12 -7
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -0
- package/lib/components/{QueryBuilderFilterPanel.d.ts → filter/QueryBuilderFilterPanel.d.ts} +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -0
- package/lib/components/{QueryBuilderFilterPanel.js → filter/QueryBuilderFilterPanel.js} +35 -64
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -0
- package/lib/components/{QueryBuilderLambdaEditor.d.ts → shared/QueryBuilderLambdaEditor.d.ts} +2 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -0
- package/lib/components/{QueryBuilderLambdaEditor.js → shared/QueryBuilderLambdaEditor.js} +2 -2
- 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/{QueryBuilderPropertyInfoTooltip.d.ts → shared/QueryBuilderPropertyInfoTooltip.d.ts} +0 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -0
- package/lib/components/{QueryBuilderPropertyInfoTooltip.js → shared/QueryBuilderPropertyInfoTooltip.js} +0 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -4
- package/lib/index.js.map +1 -1
- package/lib/package.json +10 -9
- 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/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js +16 -17
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +5 -4
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +1 -1
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderSetupState.js +1 -1
- package/lib/stores/QueryBuilderSetupState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +14 -16
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +27 -34
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTestUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTestUtils.js +2 -1
- package/lib/stores/QueryBuilderTestUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts +7 -7
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +23 -28
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/{QueryBuilderLambdaBuilder.d.ts → QueryBuilderValueSpecificationBuilder.d.ts} +1 -3
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderLambdaBuilder.js → QueryBuilderValueSpecificationBuilder.js} +179 -190
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/{QueryBuilderOperatorsHelper.d.ts → QueryBuilderValueSpecificationHelper.d.ts} +5 -9
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderOperatorsHelper.js → QueryBuilderValueSpecificationHelper.js} +38 -30
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -0
- package/lib/stores/{QueryBuilderLambdaProcessor.d.ts → QueryBuilderValueSpecificationProcessor.d.ts} +1 -1
- package/lib/stores/QueryBuilderValueSpecificationProcessor.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderLambdaProcessor.js → QueryBuilderValueSpecificationProcessor.js} +18 -14
- package/lib/stores/QueryBuilderValueSpecificationProcessor.js.map +1 -0
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +14 -3
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/QueryParametersState.d.ts +1 -3
- package/lib/stores/QueryParametersState.d.ts.map +1 -1
- package/lib/stores/QueryParametersState.js +1 -4
- package/lib/stores/QueryParametersState.js.map +1 -1
- package/lib/stores/{QueryBuilderExplorerState.d.ts → explorer/QueryBuilderExplorerState.d.ts} +3 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderExplorerState.js → explorer/QueryBuilderExplorerState.js} +76 -3
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -0
- package/lib/stores/{QueryBuilderPropertySearchPanelState.d.ts → explorer/QueryBuilderPropertySearchPanelState.d.ts} +2 -2
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderPropertySearchPanelState.js → explorer/QueryBuilderPropertySearchPanelState.js} +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.js.map +1 -0
- package/lib/stores/{QueryFunctionsExplorerState.d.ts → explorer/QueryFunctionsExplorerState.d.ts} +3 -7
- package/lib/stores/explorer/QueryFunctionsExplorerState.d.ts.map +1 -0
- package/lib/stores/{QueryFunctionsExplorerState.js → explorer/QueryFunctionsExplorerState.js} +2 -11
- package/lib/stores/explorer/QueryFunctionsExplorerState.js.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +23 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +24 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +44 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +116 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -0
- package/lib/stores/{QueryBuilderGraphFetchTreeState.d.ts → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts} +6 -5
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderGraphFetchTreeState.js → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js} +23 -20
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -0
- package/lib/stores/{QueryBuilderGraphFetchTreeUtil.d.ts → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts} +2 -2
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderGraphFetchTreeUtil.js → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js} +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js +49 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/{QueryBuilderProjectionState.d.ts → fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts} +7 -40
- 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 +59 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +203 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts +21 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +73 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/{QueryResultSetModifierState.d.ts → fetch-structure/projection/QueryResultSetModifierState.d.ts} +5 -14
- 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/{QueryBuilderAggregationState.d.ts → fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts} +4 -15
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderAggregationState.js → fetch-structure/projection/aggregation/QueryBuilderAggregationState.js} +2 -21
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperatorHelper.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Average.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Average.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Count.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Count.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Distinct.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Distinct.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_DistinctCount.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_DistinctCount.js +4 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_JoinString.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_JoinString.js +4 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Max.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Max.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Min.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Min.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Population.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Population.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Sample.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Sum.d.ts +3 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -0
- package/lib/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Sum.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -0
- package/lib/stores/{QueryBuilderPostFilterOperator.d.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts} +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderPostFilterOperator.js → fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js} +0 -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/{QueryBuilderPostFilterState.d.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts} +10 -10
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderPostFilterState.js → fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js} +24 -21
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.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 +82 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/{QueryBuilderPostFilterProcessor.d.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.d.ts} +2 -5
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderPostFilterProcessor.js → fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.js} +13 -11
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperatorHelper.d.ts +2 -2
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperatorHelper.js +5 -5
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Contain.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Contain.js +7 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_EndWith.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_EndWith.js +7 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Equal.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Equal.js +13 -11
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThan.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThan.js +10 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThanEqual.js +2 -2
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_In.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_In.js +8 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_IsEmpty.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_IsEmpty.js +3 -3
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThan.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThan.js +10 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThanEqual.js +2 -2
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_StartWith.d.ts +0 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_StartWith.js +7 -8
- 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/{QueryBuilderFilterState.d.ts → filter/QueryBuilderFilterState.d.ts} +11 -25
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderFilterState.js → filter/QueryBuilderFilterState.js} +15 -81
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -0
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.js +78 -0
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperatorHelper.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperatorHelper.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Contain.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Contain.js +3 -4
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_EndWith.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_EndWith.js +3 -4
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Equal.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Equal.js +8 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThan.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThan.js +8 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThanEqual.js +8 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_In.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_In.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_IsEmpty.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_IsEmpty.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThan.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThan.js +8 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThanEqual.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThanEqual.js +8 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_StartWith.d.ts +2 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_StartWith.js +3 -4
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -0
- package/package.json +17 -16
- package/src/application/LegendQueryApplicationConfig.ts +35 -1
- package/src/components/QueryBuilder.tsx +30 -12
- package/src/components/QueryBuilderParameterPanel.tsx +22 -54
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +63 -59
- package/src/components/QueryBuilderResultPanel.tsx +81 -59
- package/src/components/QueryBuilderSetupPanel.tsx +11 -12
- package/src/components/QueryBuilderTextEditor.tsx +1 -1
- package/src/components/QueryBuilderUnsupportedQueryEditor.tsx +4 -2
- package/src/components/QueryEditor.tsx +39 -1
- package/src/components/QueryEditorComponentTestUtils.tsx +0 -2
- package/src/components/{QueryBuilderExplorerPanel.tsx → explorer/QueryBuilderExplorerPanel.tsx} +35 -148
- package/src/components/{QueryBuilderFunctionsExplorerPanel.tsx → explorer/QueryBuilderFunctionsExplorerPanel.tsx} +25 -70
- package/src/components/{QueryBuilderMilestoneEditor.tsx → explorer/QueryBuilderMilestoneEditor.tsx} +38 -38
- package/src/components/{QueryBuilderPropertySearchPanel.tsx → explorer/QueryBuilderPropertySearchPanel.tsx} +14 -15
- package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +246 -0
- package/src/components/{QueryBuilderGraphFetchTreePanel.tsx → fetch-structure/QueryBuilderGraphFetchTreePanel.tsx} +40 -31
- package/src/components/{QueryBuilderPostFilterPanel.tsx → fetch-structure/QueryBuilderPostFilterPanel.tsx} +228 -266
- package/src/components/{QueryBuilderProjectionPanel.tsx → fetch-structure/QueryBuilderProjectionPanel.tsx} +135 -181
- package/src/components/{QueryBuilderResultModifierPanel.tsx → fetch-structure/QueryBuilderResultModifierPanel.tsx} +20 -10
- package/src/components/{QueryBuilderFilterPanel.tsx → filter/QueryBuilderFilterPanel.tsx} +195 -243
- package/src/components/{QueryBuilderLambdaEditor.tsx → shared/QueryBuilderLambdaEditor.tsx} +4 -1
- package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +38 -0
- package/src/components/{QueryBuilderPropertyInfoTooltip.tsx → shared/QueryBuilderPropertyInfoTooltip.tsx} +0 -0
- package/src/index.ts +0 -4
- package/src/stores/QueryBuilderGroupOperationHelper.ts +54 -0
- package/src/stores/QueryBuilderPreviewDataHelper.ts +17 -21
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -3
- package/src/stores/QueryBuilderResultState.ts +1 -1
- package/src/stores/QueryBuilderSetupState.ts +1 -1
- package/src/stores/QueryBuilderState.ts +31 -54
- package/src/stores/QueryBuilderTestUtils.ts +4 -1
- package/src/stores/QueryBuilderTypeaheadHelper.ts +31 -32
- package/src/stores/{QueryBuilderLambdaBuilder.ts → QueryBuilderValueSpecificationBuilder.ts} +331 -347
- package/src/stores/{QueryBuilderOperatorsHelper.ts → QueryBuilderValueSpecificationHelper.ts} +66 -47
- package/src/stores/{QueryBuilderLambdaProcessor.ts → QueryBuilderValueSpecificationProcessor.ts} +28 -13
- package/src/stores/QueryEditorStore.ts +19 -3
- package/src/stores/QueryParametersState.ts +1 -3
- package/src/stores/{QueryBuilderExplorerState.ts → explorer/QueryBuilderExplorerState.ts} +143 -3
- package/src/stores/{QueryBuilderPropertySearchPanelState.ts → explorer/QueryBuilderPropertySearchPanelState.ts} +2 -2
- package/src/stores/{QueryFunctionsExplorerState.ts → explorer/QueryFunctionsExplorerState.ts} +2 -12
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +34 -0
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +173 -0
- package/src/stores/{QueryBuilderGraphFetchTreeState.ts → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts} +43 -33
- package/src/stores/{QueryBuilderGraphFetchTreeUtil.ts → fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts} +2 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.ts +90 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +329 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +390 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +170 -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/{QueryBuilderAggregationState.ts → fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts} +6 -69
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperatorHelper.ts +3 -5
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Average.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Count.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Distinct.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_DistinctCount.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_JoinString.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Max.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Min.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Population.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_StdDev_Sample.ts +4 -6
- package/src/stores/{aggregateOperators → fetch-structure/projection/aggregation/operators}/QueryBuilderAggregateOperator_Sum.ts +4 -6
- package/src/stores/{QueryBuilderPostFilterOperator.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts} +0 -0
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.ts +65 -0
- package/src/stores/{QueryBuilderPostFilterState.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts} +42 -35
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +131 -0
- package/src/stores/{QueryBuilderPostFilterProcessor.ts → fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.ts} +13 -11
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperatorHelper.ts +5 -5
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Contain.ts +12 -12
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_EndWith.ts +12 -12
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_Equal.ts +23 -16
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThan.ts +18 -11
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +2 -2
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_In.ts +12 -12
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_IsEmpty.ts +3 -3
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThan.ts +18 -11
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_LessThanEqual.ts +2 -2
- package/src/stores/{postFilterOperators → fetch-structure/projection/post-filter/operators}/QueryBuilderPostFilterOperator_StartWith.ts +12 -12
- package/src/stores/filter/QueryBuilderFilterOperator.ts +52 -0
- package/src/stores/filter/QueryBuilderFilterOperatorLoader.ts +65 -0
- package/src/stores/{QueryBuilderFilterState.ts → filter/QueryBuilderFilterState.ts} +33 -160
- package/src/stores/filter/QueryBuilderValueSpecificationBuilder.ts +120 -0
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperatorHelper.ts +4 -4
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Contain.ts +8 -8
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_EndWith.ts +8 -8
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_Equal.ts +18 -11
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThan.ts +17 -10
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_GreaterThanEqual.ts +17 -10
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_In.ts +7 -7
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_IsEmpty.ts +6 -6
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThan.ts +17 -10
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_LessThanEqual.ts +17 -10
- package/src/stores/{filterOperators → filter/operators}/QueryBuilderFilterOperator_StartWith.ts +7 -7
- package/tsconfig.json +75 -64
- package/lib/components/QueryBuilderExplorerPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderExplorerPanel.js.map +0 -1
- package/lib/components/QueryBuilderFetchStructurePanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderFetchStructurePanel.js +0 -121
- package/lib/components/QueryBuilderFetchStructurePanel.js.map +0 -1
- package/lib/components/QueryBuilderFilterPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderFilterPanel.js.map +0 -1
- package/lib/components/QueryBuilderFunctionsExplorerPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderFunctionsExplorerPanel.js.map +0 -1
- package/lib/components/QueryBuilderGraphFetchTreePanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderGraphFetchTreePanel.js.map +0 -1
- package/lib/components/QueryBuilderLambdaEditor.d.ts.map +0 -1
- package/lib/components/QueryBuilderLambdaEditor.js.map +0 -1
- package/lib/components/QueryBuilderMilestoneEditor.d.ts.map +0 -1
- package/lib/components/QueryBuilderMilestoneEditor.js.map +0 -1
- package/lib/components/QueryBuilderPostFilterPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderPostFilterPanel.js.map +0 -1
- package/lib/components/QueryBuilderProjectionPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderProjectionPanel.js.map +0 -1
- package/lib/components/QueryBuilderPropertyInfoTooltip.d.ts.map +0 -1
- package/lib/components/QueryBuilderPropertyInfoTooltip.js.map +0 -1
- package/lib/components/QueryBuilderPropertySearchPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderPropertySearchPanel.js.map +0 -1
- package/lib/components/QueryBuilderResultModifierPanel.d.ts.map +0 -1
- package/lib/components/QueryBuilderResultModifierPanel.js.map +0 -1
- package/lib/stores/QueryBuilderAggregationState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderAggregationState.js.map +0 -1
- package/lib/stores/QueryBuilderExplorerState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderExplorerState.js.map +0 -1
- package/lib/stores/QueryBuilderFetchStructureState.d.ts +0 -34
- package/lib/stores/QueryBuilderFetchStructureState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderFetchStructureState.js +0 -50
- package/lib/stores/QueryBuilderFetchStructureState.js.map +0 -1
- package/lib/stores/QueryBuilderFilterState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderFilterState.js.map +0 -1
- package/lib/stores/QueryBuilderGraphFetchTreeState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderGraphFetchTreeState.js.map +0 -1
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.d.ts.map +0 -1
- package/lib/stores/QueryBuilderGraphFetchTreeUtil.js.map +0 -1
- package/lib/stores/QueryBuilderLambdaBuilder.d.ts.map +0 -1
- package/lib/stores/QueryBuilderLambdaBuilder.js.map +0 -1
- package/lib/stores/QueryBuilderLambdaProcessor.d.ts.map +0 -1
- package/lib/stores/QueryBuilderLambdaProcessor.js.map +0 -1
- package/lib/stores/QueryBuilderOperatorLoader.d.ts +0 -47
- package/lib/stores/QueryBuilderOperatorLoader.d.ts.map +0 -1
- package/lib/stores/QueryBuilderOperatorLoader.js +0 -94
- package/lib/stores/QueryBuilderOperatorLoader.js.map +0 -1
- package/lib/stores/QueryBuilderOperatorsHelper.d.ts.map +0 -1
- package/lib/stores/QueryBuilderOperatorsHelper.js.map +0 -1
- package/lib/stores/QueryBuilderPostFilterOperator.d.ts.map +0 -1
- package/lib/stores/QueryBuilderPostFilterOperator.js.map +0 -1
- package/lib/stores/QueryBuilderPostFilterProcessor.d.ts.map +0 -1
- package/lib/stores/QueryBuilderPostFilterProcessor.js.map +0 -1
- package/lib/stores/QueryBuilderPostFilterState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderPostFilterState.js.map +0 -1
- package/lib/stores/QueryBuilderProjectionState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderProjectionState.js +0 -428
- package/lib/stores/QueryBuilderProjectionState.js.map +0 -1
- package/lib/stores/QueryBuilderPropertySearchPanelState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderPropertySearchPanelState.js.map +0 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +0 -19
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +0 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +0 -50
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +0 -1
- package/lib/stores/QueryFunctionsExplorerState.d.ts.map +0 -1
- package/lib/stores/QueryFunctionsExplorerState.js.map +0 -1
- package/lib/stores/QueryResultSetModifierState.d.ts.map +0 -1
- package/lib/stores/QueryResultSetModifierState.js +0 -165
- package/lib/stores/QueryResultSetModifierState.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperatorHelper.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Average.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Count.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Distinct.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_JoinString.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Max.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Min.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Population.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.d.ts.map +0 -1
- package/lib/stores/aggregateOperators/QueryBuilderAggregateOperator_Sum.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperatorHelper.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Contain.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_EndWith.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_In.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_IsEmpty.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.js.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.d.ts.map +0 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_StartWith.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperatorHelper.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Contain.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_EndWith.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_In.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +0 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_StartWith.js.map +0 -1
- package/src/components/QueryBuilderFetchStructurePanel.tsx +0 -224
- package/src/stores/QueryBuilderFetchStructureState.ts +0 -66
- package/src/stores/QueryBuilderOperatorLoader.ts +0 -133
- package/src/stores/QueryBuilderProjectionState.ts +0 -794
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +0 -76
- package/src/stores/QueryResultSetModifierState.ts +0 -307
@@ -0,0 +1,187 @@
|
|
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
|
+
import { action, makeObservable, observable, flow } from 'mobx';
|
17
|
+
import { LogEvent, assertErrorThrown, uuid, guaranteeNonNullable, assertTrue, assertNonEmptyString, } from '@finos/legend-shared';
|
18
|
+
import { buildPropertyExpressionFromExplorerTreeNodeData, } from '../../explorer/QueryBuilderExplorerState.js';
|
19
|
+
import { getPropertyChainName, QueryBuilderPropertyExpressionState, } from '../../QueryBuilderPropertyEditorState.js';
|
20
|
+
import { PackageableElementExplicitReference, GRAPH_MANAGER_EVENT, PRIMITIVE_TYPE, buildSourceInformationSourceId, ParserError, TYPICAL_MULTIPLICITY_TYPE, RawVariableExpression, Enumeration, RawLambda, stub_RawLambda, } from '@finos/legend-graph';
|
21
|
+
import { DEFAULT_LAMBDA_VARIABLE_NAME, QUERY_BUILDER_SOURCE_ID_LABEL, } from '../../../QueryBuilder_Const.js';
|
22
|
+
import { LambdaEditorState } from '@finos/legend-application';
|
23
|
+
export const QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE = 'PROJECTION_COLUMN';
|
24
|
+
export class QueryBuilderProjectionColumnState {
|
25
|
+
uuid = uuid();
|
26
|
+
projectionState;
|
27
|
+
columnName;
|
28
|
+
constructor(projectionState, columnName) {
|
29
|
+
makeObservable(this, {
|
30
|
+
uuid: false,
|
31
|
+
projectionState: false,
|
32
|
+
columnName: observable,
|
33
|
+
setColumnName: action,
|
34
|
+
});
|
35
|
+
this.projectionState = projectionState;
|
36
|
+
this.columnName = columnName;
|
37
|
+
}
|
38
|
+
setColumnName(val) {
|
39
|
+
this.columnName = val;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
export class QueryBuilderSimpleProjectionColumnState extends QueryBuilderProjectionColumnState {
|
43
|
+
lambdaParameterName = DEFAULT_LAMBDA_VARIABLE_NAME;
|
44
|
+
propertyExpressionState;
|
45
|
+
constructor(projectionState, propertyExpression, humanizePropertyName) {
|
46
|
+
super(projectionState, '');
|
47
|
+
makeObservable(this, {
|
48
|
+
lambdaParameterName: observable,
|
49
|
+
propertyExpressionState: observable,
|
50
|
+
setLambdaParameterName: action,
|
51
|
+
changeProperty: action,
|
52
|
+
});
|
53
|
+
this.propertyExpressionState = new QueryBuilderPropertyExpressionState(projectionState.queryBuilderState, propertyExpression);
|
54
|
+
this.columnName = getPropertyChainName(this.propertyExpressionState.propertyExpression, humanizePropertyName);
|
55
|
+
}
|
56
|
+
setLambdaParameterName(val) {
|
57
|
+
this.lambdaParameterName = val;
|
58
|
+
}
|
59
|
+
changeProperty(node, humanizePropertyName) {
|
60
|
+
this.propertyExpressionState = new QueryBuilderPropertyExpressionState(this.projectionState.queryBuilderState, buildPropertyExpressionFromExplorerTreeNodeData(this.projectionState.queryBuilderState.explorerState
|
61
|
+
.nonNullableTreeData, node, this.projectionState.queryBuilderState.graphManagerState.graph, this.projectionState.queryBuilderState.explorerState
|
62
|
+
.propertySearchPanelState.allMappedPropertyNodes));
|
63
|
+
this.columnName = getPropertyChainName(this.propertyExpressionState.propertyExpression, humanizePropertyName);
|
64
|
+
}
|
65
|
+
getReturnType() {
|
66
|
+
return this.propertyExpressionState.propertyExpression.func.genericType
|
67
|
+
.value.rawType;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
class QueryBuilderDerivationProjectionLambdaState extends LambdaEditorState {
|
71
|
+
queryBuilderState;
|
72
|
+
derivationProjectionColumnState;
|
73
|
+
/**
|
74
|
+
* This is used to store the JSON string when viewing the query in JSON mode
|
75
|
+
* TODO: consider moving this to another state if we need to simplify the logic of text-mode
|
76
|
+
*/
|
77
|
+
readOnlylambdaJson = '';
|
78
|
+
constructor(queryBuilderState, derivationProjectionColumnState) {
|
79
|
+
super('', '');
|
80
|
+
this.queryBuilderState = queryBuilderState;
|
81
|
+
this.derivationProjectionColumnState = derivationProjectionColumnState;
|
82
|
+
}
|
83
|
+
get lambdaId() {
|
84
|
+
return buildSourceInformationSourceId([
|
85
|
+
// TODO: to be reworked
|
86
|
+
// See https://github.com/finos/legend-studio/issues/1168
|
87
|
+
QUERY_BUILDER_SOURCE_ID_LABEL.QUERY_BUILDER,
|
88
|
+
QUERY_BUILDER_SOURCE_ID_LABEL.PROJECTION,
|
89
|
+
this.derivationProjectionColumnState.uuid,
|
90
|
+
]);
|
91
|
+
}
|
92
|
+
setLambdaJson(lambdaJson) {
|
93
|
+
this.readOnlylambdaJson = lambdaJson;
|
94
|
+
}
|
95
|
+
*convertLambdaGrammarStringToObject() {
|
96
|
+
const emptyLambda = stub_RawLambda();
|
97
|
+
if (this.lambdaString) {
|
98
|
+
try {
|
99
|
+
const lambda = (yield this.queryBuilderState.graphManagerState.graphManager.pureCodeToLambda(this.fullLambdaString, this.lambdaId));
|
100
|
+
this.setParserError(undefined);
|
101
|
+
this.derivationProjectionColumnState.setLambda(lambda);
|
102
|
+
}
|
103
|
+
catch (error) {
|
104
|
+
assertErrorThrown(error);
|
105
|
+
if (error instanceof ParserError) {
|
106
|
+
this.setParserError(error);
|
107
|
+
}
|
108
|
+
this.queryBuilderState.applicationStore.log.error(LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE), error);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
else {
|
112
|
+
this.clearErrors();
|
113
|
+
this.derivationProjectionColumnState.setLambda(emptyLambda);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
*convertLambdaObjectToGrammarString(pretty) {
|
117
|
+
if (this.derivationProjectionColumnState.lambda.body) {
|
118
|
+
try {
|
119
|
+
const lambdas = new Map();
|
120
|
+
lambdas.set(this.lambdaId, new RawLambda(this.derivationProjectionColumnState.lambda.parameters, this.derivationProjectionColumnState.lambda.body));
|
121
|
+
const isolatedLambdas = (yield this.queryBuilderState.graphManagerState.graphManager.lambdasToPureCode(lambdas, pretty));
|
122
|
+
const grammarText = isolatedLambdas.get(this.lambdaId);
|
123
|
+
this.setLambdaString(grammarText !== undefined
|
124
|
+
? this.extractLambdaString(grammarText)
|
125
|
+
: '');
|
126
|
+
this.clearErrors();
|
127
|
+
}
|
128
|
+
catch (error) {
|
129
|
+
assertErrorThrown(error);
|
130
|
+
this.queryBuilderState.applicationStore.log.error(LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE), error);
|
131
|
+
}
|
132
|
+
}
|
133
|
+
else {
|
134
|
+
this.clearErrors();
|
135
|
+
this.setLambdaString('');
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
export class QueryBuilderDerivationProjectionColumnState extends QueryBuilderProjectionColumnState {
|
140
|
+
derivationLambdaEditorState;
|
141
|
+
lambda;
|
142
|
+
returnType;
|
143
|
+
constructor(projectionState, lambda) {
|
144
|
+
super(projectionState, '(derivation)');
|
145
|
+
makeObservable(this, {
|
146
|
+
lambda: observable,
|
147
|
+
returnType: observable,
|
148
|
+
setLambda: action,
|
149
|
+
fetchDerivationLambdaReturnType: flow,
|
150
|
+
});
|
151
|
+
this.derivationLambdaEditorState =
|
152
|
+
new QueryBuilderDerivationProjectionLambdaState(projectionState.queryBuilderState, this);
|
153
|
+
this.lambda = lambda;
|
154
|
+
}
|
155
|
+
setLambda(val) {
|
156
|
+
this.lambda = val;
|
157
|
+
}
|
158
|
+
setReturnType(val) {
|
159
|
+
this.returnType = val;
|
160
|
+
}
|
161
|
+
/**
|
162
|
+
* Fetches lambda return type for derivation column.
|
163
|
+
* Throws error if unable to fetch type or if type is not primitive or an enumeration
|
164
|
+
* as expected by a projection column
|
165
|
+
*/
|
166
|
+
*fetchDerivationLambdaReturnType() {
|
167
|
+
assertTrue(Array.isArray(this.lambda.parameters));
|
168
|
+
const projectionParameter = this.lambda.parameters;
|
169
|
+
const graph = this.projectionState.queryBuilderState.graphManagerState.graph;
|
170
|
+
const multiplicityOne = graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
|
171
|
+
assertTrue(projectionParameter.length === 1);
|
172
|
+
const variable = projectionParameter[0];
|
173
|
+
assertNonEmptyString(variable.name);
|
174
|
+
// assign variable to query class
|
175
|
+
const rawVariableExpression = new RawVariableExpression(variable.name, multiplicityOne, PackageableElementExplicitReference.create(guaranteeNonNullable(this.projectionState.queryBuilderState.querySetupState._class)));
|
176
|
+
const _rawVariableExpression = this.projectionState.queryBuilderState.graphManagerState.graphManager.serializeRawValueSpecification(rawVariableExpression);
|
177
|
+
const isolatedLambda = new RawLambda([_rawVariableExpression], this.lambda.body);
|
178
|
+
const type = (yield this.projectionState.queryBuilderState.graphManagerState.graphManager.getLambdaReturnType(isolatedLambda, graph));
|
179
|
+
const resolvedType = graph.getType(type);
|
180
|
+
assertTrue(Object.values(PRIMITIVE_TYPE).includes(resolvedType.path) || resolvedType instanceof Enumeration, 'projection column must have primitive return type');
|
181
|
+
this.setReturnType(resolvedType);
|
182
|
+
}
|
183
|
+
getReturnType() {
|
184
|
+
return this.returnType;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
//# sourceMappingURL=QueryBuilderProjectionColumnState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProjectionColumnState.js","sourceRoot":"","sources":["../../../../src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,IAAI,EACJ,oBAAoB,EACpB,UAAU,EACV,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,+CAA+C,GAChD,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,mCAAmC,GACpC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAIL,mCAAmC,EACnC,mBAAmB,EACnB,cAAc,EACd,8BAA8B,EAC9B,WAAW,EACX,yBAAyB,EACzB,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,MAAM,CAAC,MAAM,wCAAwC,GAAG,mBAAmB,CAAC;AAM5E,MA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C,IAAsB,CACpC,IAAI,YAAY,YAAY,WAAW,EACxC,mDAAmD,CACpD,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IAEQ,aAAa;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF"}
|
@@ -0,0 +1,59 @@
|
|
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
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
17
|
+
import type { QueryBuilderState } from '../../QueryBuilderState.js';
|
18
|
+
import { type CompilationError } from '@finos/legend-graph';
|
19
|
+
import { QueryBuilderAggregationState } from './aggregation/QueryBuilderAggregationState.js';
|
20
|
+
import { QueryBuilderFetchStructureImplementationState } from '../QueryBuilderFetchStructureImplementationState.js';
|
21
|
+
import { QueryResultSetModifierState } from './QueryResultSetModifierState.js';
|
22
|
+
import { QueryBuilderPostFilterState } from './post-filter/QueryBuilderPostFilterState.js';
|
23
|
+
import type { QueryBuilderPostFilterOperator } from './post-filter/QueryBuilderPostFilterOperator.js';
|
24
|
+
import type { QueryBuilderAggregateOperator } from './aggregation/QueryBuilderAggregateOperator.js';
|
25
|
+
import { QueryBuilderDerivationProjectionColumnState, type QueryBuilderProjectionColumnState, type QueryBuilderSimpleProjectionColumnState } from './QueryBuilderProjectionColumnState.js';
|
26
|
+
import type { QueryBuilderFetchStructureState } from '../QueryBuilderFetchStructureState.js';
|
27
|
+
export declare class QueryBuilderProjectionState extends QueryBuilderFetchStructureImplementationState {
|
28
|
+
columns: QueryBuilderProjectionColumnState[];
|
29
|
+
aggregationState: QueryBuilderAggregationState;
|
30
|
+
postFilterState: QueryBuilderPostFilterState;
|
31
|
+
resultSetModifierState: QueryResultSetModifierState;
|
32
|
+
isConvertDerivationProjectionObjects: boolean;
|
33
|
+
showPostFilterPanel: boolean;
|
34
|
+
postFilterOperators: QueryBuilderPostFilterOperator[];
|
35
|
+
aggregationOperators: QueryBuilderAggregateOperator[];
|
36
|
+
constructor(queryBuilderState: QueryBuilderState, fetchStructureState: QueryBuilderFetchStructureState);
|
37
|
+
get derivations(): QueryBuilderDerivationProjectionColumnState[];
|
38
|
+
get hasParserError(): boolean;
|
39
|
+
get validationIssues(): string[] | undefined;
|
40
|
+
setShowPostFilterPanel(val: boolean): void;
|
41
|
+
convertDerivationProjectionObjects(): GeneratorFn<void>;
|
42
|
+
transformSimpleProjectionToDerivation(simpleProjectionColumnState: QueryBuilderSimpleProjectionColumnState): void;
|
43
|
+
replaceColumn(oldVal: QueryBuilderProjectionColumnState, newVal: QueryBuilderProjectionColumnState): void;
|
44
|
+
removeColumn(val: QueryBuilderProjectionColumnState): void;
|
45
|
+
addColumn(val: QueryBuilderProjectionColumnState, options?: {
|
46
|
+
/**
|
47
|
+
* Often time, we would want to enforce doing a sort when adding new column
|
48
|
+
* to ensure aggregate columns stay at the bottom of the list of projections
|
49
|
+
* But sometimes, we can opt in to use this flag to disable this sorting behavior,
|
50
|
+
* such as when we build/process.
|
51
|
+
*/
|
52
|
+
skipSorting?: boolean | undefined;
|
53
|
+
}): void;
|
54
|
+
moveColumn(sourceIndex: number, targetIndex: number): void;
|
55
|
+
addNewBlankDerivation(): void;
|
56
|
+
revealCompilationError(compilationError: CompilationError): boolean;
|
57
|
+
clearCompilationError(): void;
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=QueryBuilderProjectionState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProjectionState.d.ts","sourceRoot":"","sources":["../../../../src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,KAAK,WAAW,EAUjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,6CAA6C,EAAE,MAAM,qDAAqD,CAAC;AACpH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEtG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAEpG,OAAO,EACL,2CAA2C,EAC3C,KAAK,iCAAiC,EACtC,KAAK,uCAAuC,EAC7C,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAE7F,qBAAa,2BAA4B,SAAQ,6CAA6C;IAC5F,OAAO,EAAE,iCAAiC,EAAE,CAAM;IAClD,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,eAAe,EAAE,2BAA2B,CAAC;IAC7C,sBAAsB,EAAE,2BAA2B,CAAC;IACpD,oCAAoC,UAAS;IAC7C,mBAAmB,UAAS;IAE5B,mBAAmB,EAAE,8BAA8B,EAAE,CACV;IAC3C,oBAAoB,EAAE,6BAA6B,EAAE,CACR;gBAG3C,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,+BAA+B;IAgCtD,IAAI,WAAW,IAAI,2CAA2C,EAAE,CAI/D;IAED,IAAI,cAAc,IAAI,OAAO,CAI5B;IAED,IAAI,gBAAgB,IAAI,MAAM,EAAE,GAAG,SAAS,CAc3C;IAED,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIzC,kCAAkC,IAAI,WAAW,CAAC,IAAI,CAAC;IA8CxD,qCAAqC,CACnC,2BAA2B,EAAE,uCAAuC,GACnE,IAAI;IA8BP,aAAa,CACX,MAAM,EAAE,iCAAiC,EACzC,MAAM,EAAE,iCAAiC,GACxC,IAAI;IAuBP,YAAY,CAAC,GAAG,EAAE,iCAAiC,GAAG,IAAI;IAc1D,SAAS,CACP,GAAG,EAAE,iCAAiC,EACtC,OAAO,CAAC,EAAE;QACR;;;;;WAKG;QACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KACnC,GACA,IAAI;IAuBP,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IA8C1D,qBAAqB,IAAI,IAAI;IAa7B,sBAAsB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO;IA2BnE,qBAAqB,IAAI,IAAI;CAO9B"}
|
@@ -0,0 +1,203 @@
|
|
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
|
+
import { action, flowResult, makeObservable, observable, flow, computed, } from 'mobx';
|
17
|
+
import { LogEvent, assertErrorThrown, changeEntry, guaranteeType, deleteEntry, addUniqueEntry, guaranteeNonNullable, findLast, filterByType, } from '@finos/legend-shared';
|
18
|
+
import { GRAPH_MANAGER_EVENT, extractSourceInformationCoordinates, LAMBDA_PIPE, RawLambda, isStubbed_RawLambda, } from '@finos/legend-graph';
|
19
|
+
import { DEFAULT_LAMBDA_VARIABLE_NAME, QUERY_BUILDER_SOURCE_ID_LABEL, } from '../../../QueryBuilder_Const.js';
|
20
|
+
import { QueryBuilderAggregationState } from './aggregation/QueryBuilderAggregationState.js';
|
21
|
+
import { buildGenericLambdaFunctionInstanceValue } from '../../QueryBuilderValueSpecificationHelper.js';
|
22
|
+
import { QueryBuilderFetchStructureImplementationState } from '../QueryBuilderFetchStructureImplementationState.js';
|
23
|
+
import { QueryResultSetModifierState } from './QueryResultSetModifierState.js';
|
24
|
+
import { QueryBuilderPostFilterState } from './post-filter/QueryBuilderPostFilterState.js';
|
25
|
+
import { getQueryBuilderCorePostFilterOperators } from './post-filter/QueryBuilderPostFilterOperatorLoader.js';
|
26
|
+
import { getQueryBuilderCoreAggregrationOperators } from './aggregation/QueryBuilderAggregateOperatorLoader.js';
|
27
|
+
import { QueryBuilderDerivationProjectionColumnState, } from './QueryBuilderProjectionColumnState.js';
|
28
|
+
export class QueryBuilderProjectionState extends QueryBuilderFetchStructureImplementationState {
|
29
|
+
columns = [];
|
30
|
+
aggregationState;
|
31
|
+
postFilterState;
|
32
|
+
resultSetModifierState;
|
33
|
+
isConvertDerivationProjectionObjects = false;
|
34
|
+
showPostFilterPanel = false;
|
35
|
+
postFilterOperators = getQueryBuilderCorePostFilterOperators();
|
36
|
+
aggregationOperators = getQueryBuilderCoreAggregrationOperators();
|
37
|
+
constructor(queryBuilderState, fetchStructureState) {
|
38
|
+
super(queryBuilderState, fetchStructureState);
|
39
|
+
makeObservable(this, {
|
40
|
+
columns: observable,
|
41
|
+
aggregationState: observable,
|
42
|
+
postFilterState: observable,
|
43
|
+
resultSetModifierState: observable,
|
44
|
+
isConvertDerivationProjectionObjects: observable,
|
45
|
+
showPostFilterPanel: observable,
|
46
|
+
derivations: computed,
|
47
|
+
hasParserError: computed,
|
48
|
+
validationIssues: computed,
|
49
|
+
addColumn: action,
|
50
|
+
moveColumn: action,
|
51
|
+
replaceColumn: action,
|
52
|
+
setShowPostFilterPanel: action,
|
53
|
+
convertDerivationProjectionObjects: flow,
|
54
|
+
});
|
55
|
+
this.resultSetModifierState = new QueryResultSetModifierState(this);
|
56
|
+
this.postFilterState = new QueryBuilderPostFilterState(this, this.postFilterOperators);
|
57
|
+
this.aggregationState = new QueryBuilderAggregationState(this, this.aggregationOperators);
|
58
|
+
}
|
59
|
+
get derivations() {
|
60
|
+
return this.columns.filter(filterByType(QueryBuilderDerivationProjectionColumnState));
|
61
|
+
}
|
62
|
+
get hasParserError() {
|
63
|
+
return this.derivations.some((derivation) => derivation.derivationLambdaEditorState.parserError);
|
64
|
+
}
|
65
|
+
get validationIssues() {
|
66
|
+
const hasDuplicatedProjectionColumns = this.columns.some((column) => this.columns.filter((c) => c.columnName === column.columnName).length >
|
67
|
+
1);
|
68
|
+
if (hasDuplicatedProjectionColumns) {
|
69
|
+
return ['Query has duplicated projection columns'];
|
70
|
+
}
|
71
|
+
const hasNoProjectionColumns = this.columns.length === 0;
|
72
|
+
if (hasNoProjectionColumns) {
|
73
|
+
return ['Query has no projection columns'];
|
74
|
+
}
|
75
|
+
return undefined;
|
76
|
+
}
|
77
|
+
setShowPostFilterPanel(val) {
|
78
|
+
this.showPostFilterPanel = val;
|
79
|
+
}
|
80
|
+
*convertDerivationProjectionObjects() {
|
81
|
+
const lambdas = new Map();
|
82
|
+
const derivationProjectionColumnStateMap = new Map();
|
83
|
+
this.derivations.forEach((derivationProjectionColumnState) => {
|
84
|
+
if (!isStubbed_RawLambda(derivationProjectionColumnState.lambda)) {
|
85
|
+
lambdas.set(derivationProjectionColumnState.derivationLambdaEditorState.lambdaId, derivationProjectionColumnState.lambda);
|
86
|
+
derivationProjectionColumnStateMap.set(derivationProjectionColumnState.derivationLambdaEditorState.lambdaId, derivationProjectionColumnState);
|
87
|
+
}
|
88
|
+
});
|
89
|
+
if (lambdas.size) {
|
90
|
+
this.isConvertDerivationProjectionObjects = true;
|
91
|
+
try {
|
92
|
+
const isolatedLambdas = (yield this.queryBuilderState.graphManagerState.graphManager.lambdasToPureCode(lambdas));
|
93
|
+
isolatedLambdas.forEach((grammarText, key) => {
|
94
|
+
const derivationProjectionColumnState = derivationProjectionColumnStateMap.get(key);
|
95
|
+
derivationProjectionColumnState?.derivationLambdaEditorState.setLambdaString(derivationProjectionColumnState.derivationLambdaEditorState.extractLambdaString(grammarText));
|
96
|
+
});
|
97
|
+
}
|
98
|
+
catch (error) {
|
99
|
+
assertErrorThrown(error);
|
100
|
+
this.queryBuilderState.applicationStore.log.error(LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE), error);
|
101
|
+
}
|
102
|
+
finally {
|
103
|
+
this.isConvertDerivationProjectionObjects = false;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
transformSimpleProjectionToDerivation(simpleProjectionColumnState) {
|
108
|
+
// setup new derivation column state
|
109
|
+
const columnColumnLambda = buildGenericLambdaFunctionInstanceValue(simpleProjectionColumnState.lambdaParameterName, [simpleProjectionColumnState.propertyExpressionState.propertyExpression], this.queryBuilderState.graphManagerState.graph);
|
110
|
+
const derivationColumnState = new QueryBuilderDerivationProjectionColumnState(this, guaranteeType(this.queryBuilderState.graphManagerState.graphManager.buildRawValueSpecification(columnColumnLambda, this.queryBuilderState.graphManagerState.graph), RawLambda));
|
111
|
+
derivationColumnState.setColumnName(simpleProjectionColumnState.columnName);
|
112
|
+
this.replaceColumn(simpleProjectionColumnState, derivationColumnState);
|
113
|
+
// convert to grammar for display
|
114
|
+
flowResult(derivationColumnState.derivationLambdaEditorState.convertLambdaObjectToGrammarString(false)).catch(this.queryBuilderState.applicationStore.alertUnhandledError);
|
115
|
+
}
|
116
|
+
replaceColumn(oldVal, newVal) {
|
117
|
+
// reassociation with column aggregation state if applicable
|
118
|
+
const corresspondingAggregateColumnState = this.aggregationState.columns.find((aggregateColState) => aggregateColState.projectionColumnState === oldVal);
|
119
|
+
if (corresspondingAggregateColumnState) {
|
120
|
+
corresspondingAggregateColumnState.setColumnState(newVal);
|
121
|
+
}
|
122
|
+
// reassociation with column sorting state if applicable
|
123
|
+
const corresspondingSortColumnState = this.resultSetModifierState.sortColumns.find((sortColState) => sortColState.columnState === oldVal);
|
124
|
+
if (corresspondingSortColumnState) {
|
125
|
+
corresspondingSortColumnState.setColumnState(newVal);
|
126
|
+
}
|
127
|
+
changeEntry(this.columns, oldVal, newVal);
|
128
|
+
}
|
129
|
+
removeColumn(val) {
|
130
|
+
deleteEntry(this.columns, val);
|
131
|
+
// remove aggregation that goes with the projection
|
132
|
+
const existingAggregateColumnState = this.aggregationState.columns.find((column) => column.projectionColumnState === val);
|
133
|
+
if (existingAggregateColumnState) {
|
134
|
+
this.aggregationState.removeColumn(existingAggregateColumnState);
|
135
|
+
}
|
136
|
+
this.resultSetModifierState.updateSortColumns();
|
137
|
+
}
|
138
|
+
addColumn(val, options) {
|
139
|
+
addUniqueEntry(this.columns, val);
|
140
|
+
if (!options?.skipSorting) {
|
141
|
+
// sort columns: aggregate columns go last
|
142
|
+
this.columns = this.columns
|
143
|
+
.slice()
|
144
|
+
.sort((colA, colB) => (this.aggregationState.columns.find((column) => column.projectionColumnState === colA)
|
145
|
+
? 1
|
146
|
+
: 0) -
|
147
|
+
(this.aggregationState.columns.find((column) => column.projectionColumnState === colB)
|
148
|
+
? 1
|
149
|
+
: 0));
|
150
|
+
}
|
151
|
+
}
|
152
|
+
moveColumn(sourceIndex, targetIndex) {
|
153
|
+
if (sourceIndex < 0 ||
|
154
|
+
sourceIndex >= this.columns.length ||
|
155
|
+
targetIndex < 0 ||
|
156
|
+
targetIndex >= this.columns.length) {
|
157
|
+
return;
|
158
|
+
}
|
159
|
+
const sourceColumn = guaranteeNonNullable(this.columns[sourceIndex]);
|
160
|
+
// find last non aggregate column index for computation
|
161
|
+
const lastNonAggregateColumn = findLast(this.columns, (projectionCol) => !this.aggregationState.columns.find((column) => column.projectionColumnState === projectionCol));
|
162
|
+
const lastNonAggregateColumnIndex = lastNonAggregateColumn
|
163
|
+
? this.columns.lastIndexOf(lastNonAggregateColumn)
|
164
|
+
: 0;
|
165
|
+
if (this.aggregationState.columns.find((column) => column.projectionColumnState === sourceColumn)) {
|
166
|
+
// if the column being moved is an aggregate column,
|
167
|
+
// it cannot be moved to before the first aggregate column
|
168
|
+
targetIndex = Math.max(targetIndex, Math.min(lastNonAggregateColumnIndex + 1, this.columns.length - 1));
|
169
|
+
}
|
170
|
+
else {
|
171
|
+
// if the column being moved is not an aggregate column,
|
172
|
+
// it cannot be moved to after the last non-aggregate column
|
173
|
+
targetIndex = Math.min(targetIndex, lastNonAggregateColumnIndex);
|
174
|
+
}
|
175
|
+
// move
|
176
|
+
this.columns.splice(sourceIndex, 1);
|
177
|
+
this.columns.splice(targetIndex, 0, sourceColumn);
|
178
|
+
}
|
179
|
+
addNewBlankDerivation() {
|
180
|
+
const derivation = new QueryBuilderDerivationProjectionColumnState(this, this.queryBuilderState.graphManagerState.graphManager.createDefaultBasicRawLambda({ addDummyParameter: true }));
|
181
|
+
this.addColumn(derivation);
|
182
|
+
derivation.derivationLambdaEditorState.setLambdaString(`${DEFAULT_LAMBDA_VARIABLE_NAME}${LAMBDA_PIPE}''`);
|
183
|
+
}
|
184
|
+
revealCompilationError(compilationError) {
|
185
|
+
const elementCoordinates = extractSourceInformationCoordinates(compilationError.sourceInformation);
|
186
|
+
if (elementCoordinates &&
|
187
|
+
elementCoordinates.length === 3 &&
|
188
|
+
elementCoordinates[0] === QUERY_BUILDER_SOURCE_ID_LABEL.QUERY_BUILDER &&
|
189
|
+
elementCoordinates[1] === QUERY_BUILDER_SOURCE_ID_LABEL.PROJECTION) {
|
190
|
+
const derivationProjectionState = this.columns.find((projectionColumnState) => projectionColumnState.uuid === elementCoordinates[2]);
|
191
|
+
if (derivationProjectionState instanceof
|
192
|
+
QueryBuilderDerivationProjectionColumnState) {
|
193
|
+
derivationProjectionState.derivationLambdaEditorState.setCompilationError(compilationError);
|
194
|
+
return true;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
return false;
|
198
|
+
}
|
199
|
+
clearCompilationError() {
|
200
|
+
this.derivations.forEach((derivationProjectionColumnState) => derivationProjectionColumnState.derivationLambdaEditorState.setCompilationError(undefined));
|
201
|
+
}
|
202
|
+
}
|
203
|
+
//# sourceMappingURL=QueryBuilderProjectionState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProjectionState.js","sourceRoot":"","sources":["../../../../src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,UAAU,EACV,cAAc,EACd,UAAU,EACV,IAAI,EACJ,QAAQ,GACT,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,QAAQ,EACR,YAAY,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,mBAAmB,EACnB,mCAAmC,EACnC,WAAW,EACX,SAAS,EACT,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,+CAA+C,CAAC;AACxG,OAAO,EAAE,6CAA6C,EAAE,MAAM,qDAAqD,CAAC;AACpH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CA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C,CAAC;QAC3B,UAAU,CAAC,2BAA2B,CAAC,eAAe,CACpD,GAAG,4BAA4B,GAAG,WAAW,IAAI,CAClD,CAAC;IACJ,CAAC;IAED,sBAAsB,CAAC,gBAAkC;QACvD,MAAM,kBAAkB,GAAG,mCAAmC,CAC5D,gBAAgB,CAAC,iBAAiB,CACnC,CAAC;QACF,IACE,kBAAkB;YAClB,kBAAkB,CAAC,MAAM,KAAK,CAAC;YAC/B,kBAAkB,CAAC,CAAC,CAAC,KAAK,6BAA6B,CAAC,aAAa;YACrE,kBAAkB,CAAC,CAAC,CAAC,KAAK,6BAA6B,CAAC,UAAU,EAClE;YACA,MAAM,yBAAyB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CACjD,CAAC,qBAAqB,EAAE,EAAE,CACxB,qBAAqB,CAAC,IAAI,KAAK,kBAAkB,CAAC,CAAC,CAAC,CACvD,CAAC;YACF,IACE,yBAAyB;gBACzB,2CAA2C,EAC3C;gBACA,yBAAyB,CAAC,2BAA2B,CAAC,mBAAmB,CACvE,gBAAgB,CACjB,CAAC;gBACF,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,+BAA+B,EAAE,EAAE,CAC3D,+BAA+B,CAAC,2BAA2B,CAAC,mBAAmB,CAC7E,SAAS,CACV,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts
ADDED
@@ -0,0 +1,21 @@
|
|
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
|
+
import { type LambdaFunction } from '@finos/legend-graph';
|
17
|
+
import { type QueryResultSetModifierState } from './QueryResultSetModifierState.js';
|
18
|
+
export declare const appendResultSetModifiers: (resultModifiersState: QueryResultSetModifierState, lambda: LambdaFunction, options?: {
|
19
|
+
overridingLimit?: number | undefined;
|
20
|
+
} | undefined) => LambdaFunction;
|
21
|
+
//# sourceMappingURL=QueryBuilderProjectionValueSpecificationBuilder.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProjectionValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../../src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,cAAc,EAWpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,KAAK,2BAA2B,EAEjC,MAAM,kCAAkC,CAAC;AAgC1C,eAAO,MAAM,wBAAwB,yBACb,2BAA2B,UACzC,cAAc,YAElB;IACE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,GACD,SAAS,KACZ,cA+FF,CAAC"}
|
package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js
ADDED
@@ -0,0 +1,73 @@
|
|
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
|
+
import { CollectionInstanceValue, extractElementNameFromPath, GenericType, GenericTypeExplicitReference, matchFunctionName, Multiplicity, PrimitiveInstanceValue, PRIMITIVE_TYPE, SimpleFunctionExpression, TYPICAL_MULTIPLICITY_TYPE, } from '@finos/legend-graph';
|
17
|
+
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../QueryBuilder_Const.js';
|
18
|
+
import { COLUMN_SORT_TYPE, } from './QueryResultSetModifierState.js';
|
19
|
+
const buildSortExpression = (sortColumnState) => {
|
20
|
+
const multiplicityOne = sortColumnState.columnState.projectionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
|
21
|
+
const sortColumnFunction = new SimpleFunctionExpression(extractElementNameFromPath(sortColumnState.sortType === COLUMN_SORT_TYPE.ASC
|
22
|
+
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_ASC
|
23
|
+
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DESC), multiplicityOne);
|
24
|
+
const sortColumnName = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(sortColumnState.columnState.projectionState.queryBuilderState.graphManagerState.graph.getPrimitiveType(PRIMITIVE_TYPE.STRING))), multiplicityOne);
|
25
|
+
sortColumnName.values = [sortColumnState.columnState.columnName];
|
26
|
+
sortColumnFunction.parametersValues[0] = sortColumnName;
|
27
|
+
return sortColumnFunction;
|
28
|
+
};
|
29
|
+
export const appendResultSetModifiers = (resultModifiersState, lambda, options) => {
|
30
|
+
const multiplicityOne = resultModifiersState.projectionState.queryBuilderState.graphManagerState.graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
|
31
|
+
if (lambda.expressionSequence.length === 1) {
|
32
|
+
const func = lambda.expressionSequence[0];
|
33
|
+
if (func instanceof SimpleFunctionExpression) {
|
34
|
+
if (matchFunctionName(func.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT) ||
|
35
|
+
matchFunctionName(func.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY) ||
|
36
|
+
matchFunctionName(func.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER)) {
|
37
|
+
let currentExpression = func;
|
38
|
+
// build distinct()
|
39
|
+
if (resultModifiersState.distinct) {
|
40
|
+
const distinctFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DISTINCT), multiplicityOne);
|
41
|
+
distinctFunction.parametersValues[0] = currentExpression;
|
42
|
+
currentExpression = distinctFunction;
|
43
|
+
}
|
44
|
+
// build sort()
|
45
|
+
if (resultModifiersState.sortColumns.length) {
|
46
|
+
const sortFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_SORT), multiplicityOne);
|
47
|
+
const multiplicity = new Multiplicity(resultModifiersState.sortColumns.length, resultModifiersState.sortColumns.length);
|
48
|
+
const collection = new CollectionInstanceValue(multiplicity, undefined);
|
49
|
+
collection.values =
|
50
|
+
resultModifiersState.sortColumns.map(buildSortExpression);
|
51
|
+
sortFunction.parametersValues[0] = currentExpression;
|
52
|
+
sortFunction.parametersValues[1] = collection;
|
53
|
+
currentExpression = sortFunction;
|
54
|
+
}
|
55
|
+
// build take()
|
56
|
+
if (resultModifiersState.limit || options?.overridingLimit) {
|
57
|
+
const limit = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(resultModifiersState.projectionState.queryBuilderState.graphManagerState.graph.getPrimitiveType(PRIMITIVE_TYPE.INTEGER))), multiplicityOne);
|
58
|
+
limit.values = [
|
59
|
+
Math.min(resultModifiersState.limit ?? Number.MAX_SAFE_INTEGER, options?.overridingLimit ?? Number.MAX_SAFE_INTEGER),
|
60
|
+
];
|
61
|
+
const takeFunction = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_TAKE), multiplicityOne);
|
62
|
+
takeFunction.parametersValues[0] = currentExpression;
|
63
|
+
takeFunction.parametersValues[1] = limit;
|
64
|
+
currentExpression = takeFunction;
|
65
|
+
}
|
66
|
+
lambda.expressionSequence[0] = currentExpression;
|
67
|
+
return lambda;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
return lambda;
|
72
|
+
};
|
73
|
+
//# sourceMappingURL=QueryBuilderProjectionValueSpecificationBuilder.js.map
|
package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProjectionValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../../src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,4BAA4B,EAC5B,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EACL,gBAAgB,GAGjB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,mBAAmB,GAAG,CAC1B,eAAgC,EACN,EAAE;IAC5B,MAAM,eAAe,GACnB,eAAe,CAAC,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAAC,sBAAsB,CAC1G,yBAAyB,CAAC,GAAG,CAC9B,CAAC;IACJ,MAAM,kBAAkB,GAAG,IAAI,wBAAwB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F,EACD,eAAe,CAChB,CAAC;oBACF,KAAK,CAAC,MAAM,GAAG;wBACb,IAAI,CAAC,GAAG,CACN,oBAAoB,CAAC,KAAK,IAAI,MAAM,CAAC,gBAAgB,EACrD,OAAO,EAAE,eAAe,IAAI,MAAM,CAAC,gBAAgB,CACpD;qBACF,CAAC;oBACF,MAAM,YAAY,GAAG,IAAI,wBAAwB,CAC/C,0BAA0B,CACxB,iCAAiC,CAAC,QAAQ,CAC3C,EACD,eAAe,CAChB,CAAC;oBAEF,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC;oBACrD,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;oBACzC,iBAAiB,GAAG,YAAY,CAAC;iBAClC;gBAED,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC;gBACjD,OAAO,MAAM,CAAC;aACf;SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
@@ -13,40 +13,31 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import type {
|
17
|
-
import type {
|
18
|
-
import { type LambdaFunction, SimpleFunctionExpression } from '@finos/legend-graph';
|
16
|
+
import type { QueryBuilderProjectionState } from './QueryBuilderProjectionState.js';
|
17
|
+
import type { QueryBuilderProjectionColumnState } from './QueryBuilderProjectionColumnState.js';
|
19
18
|
export declare enum COLUMN_SORT_TYPE {
|
20
19
|
ASC = 0,
|
21
20
|
DESC = 1
|
22
21
|
}
|
23
22
|
export declare class SortColumnState {
|
24
|
-
queryBuilderState: QueryBuilderState;
|
25
23
|
columnState: QueryBuilderProjectionColumnState;
|
26
24
|
sortType: COLUMN_SORT_TYPE;
|
27
|
-
constructor(
|
25
|
+
constructor(columnState: QueryBuilderProjectionColumnState);
|
28
26
|
setColumnState(val: QueryBuilderProjectionColumnState): void;
|
29
27
|
setSortType(val: COLUMN_SORT_TYPE): void;
|
30
|
-
buildFunctionExpression(): SimpleFunctionExpression;
|
31
28
|
}
|
32
29
|
export declare class QueryResultSetModifierState {
|
33
|
-
|
30
|
+
projectionState: QueryBuilderProjectionState;
|
34
31
|
showModal: boolean;
|
35
32
|
limit?: number | undefined;
|
36
33
|
distinct: boolean;
|
37
34
|
sortColumns: SortColumnState[];
|
38
|
-
constructor(
|
35
|
+
constructor(projectionState: QueryBuilderProjectionState);
|
39
36
|
setShowModal(val: boolean): void;
|
40
37
|
setLimit(val: number | undefined): void;
|
41
38
|
toggleDistinct(): void;
|
42
39
|
deleteSortColumn(val: SortColumnState): void;
|
43
40
|
addSortColumn(val: SortColumnState): void;
|
44
41
|
updateSortColumns(): void;
|
45
|
-
/**
|
46
|
-
* Build result set modifiers into the lambda.
|
47
|
-
*/
|
48
|
-
buildResultSetModifiers(lambda: LambdaFunction, options?: {
|
49
|
-
overridingLimit?: number | undefined;
|
50
|
-
} | undefined): LambdaFunction;
|
51
42
|
}
|
52
43
|
//# sourceMappingURL=QueryResultSetModifierState.d.ts.map
|