@finos/legend-query-builder 0.4.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts +1 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +11 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js +105 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +1 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +10 -27
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +60 -12
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +3 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +6 -14
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +12 -18
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +3 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.js → QueryBuilderOLAPGroupByPanel.js} +2 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +9 -11
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +3 -3
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +1 -0
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -0
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +37 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +53 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +9 -11
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/index.css +1 -17
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/QueryBuilderConfig.d.ts +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +1 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +43 -0
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderConstantsState.js +116 -0
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -0
- package/lib/stores/QueryBuilderParametersState.d.ts +0 -4
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +0 -1
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +3 -10
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +6 -140
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +10 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +27 -4
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +50 -42
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +23 -25
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +13 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +4 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +3 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +15 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +9 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +4 -0
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +2 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +9 -1
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +7 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +30 -20
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +58 -2
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +2 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js +6 -0
- package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +38 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +291 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +29 -103
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
- package/src/components/QueryBuilderSideBar.tsx +5 -22
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
- package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
- package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
- package/src/components/shared/CustomDatePicker.tsx +3 -2
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +193 -0
- package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
- package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
- package/src/stores/QueryBuilderConfig.ts +1 -0
- package/src/stores/QueryBuilderConstantsState.ts +173 -0
- package/src/stores/QueryBuilderParametersState.ts +0 -6
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
- package/src/stores/QueryBuilderState.ts +36 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +34 -51
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +23 -29
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +2 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +14 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +21 -4
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +13 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +12 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterState.ts +13 -0
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
- package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +66 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkState.ts +8 -0
- package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
- package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
- package/tsconfig.json +14 -6
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
@@ -28,7 +28,6 @@ import {
|
|
28
28
|
} from '@finos/legend-art';
|
29
29
|
import { observer } from 'mobx-react-lite';
|
30
30
|
import {
|
31
|
-
generateMilestonedPropertyParameterValue,
|
32
31
|
generateValueSpecificationForParameter,
|
33
32
|
getPropertyPath,
|
34
33
|
type QueryBuilderDerivedPropertyExpressionState,
|
@@ -41,11 +40,6 @@ import {
|
|
41
40
|
type QueryBuilderExplorerTreePropertyNodeData,
|
42
41
|
} from '../stores/explorer/QueryBuilderExplorerState.js';
|
43
42
|
import { QueryBuilderPropertyInfoTooltip } from './shared/QueryBuilderPropertyInfoTooltip.js';
|
44
|
-
import { VariableExpressionViewer } from './QueryBuilderParametersPanel.js';
|
45
|
-
import {
|
46
|
-
type QueryBuilderParameterDragSource,
|
47
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
48
|
-
} from '../stores/QueryBuilderParametersState.js';
|
49
43
|
import {
|
50
44
|
type ValueSpecification,
|
51
45
|
type VariableExpression,
|
@@ -53,10 +47,27 @@ import {
|
|
53
47
|
Enumeration,
|
54
48
|
PrimitiveType,
|
55
49
|
isSuperType,
|
50
|
+
AbstractPropertyExpression,
|
51
|
+
INTERNAL__PropagatedValue,
|
52
|
+
getMilestoneTemporalStereotype,
|
56
53
|
} from '@finos/legend-graph';
|
57
|
-
import { guaranteeNonNullable } from '@finos/legend-shared';
|
58
|
-
import {
|
54
|
+
import { guaranteeNonNullable, guaranteeType } from '@finos/legend-shared';
|
55
|
+
import {
|
56
|
+
type QueryBuilderVariableDragSource,
|
57
|
+
BasicValueSpecificationEditor,
|
58
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
59
|
+
} from './shared/BasicValueSpecificationEditor.js';
|
59
60
|
import { functionExpression_setParameterValue } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
61
|
+
import {
|
62
|
+
ActionAlertActionType,
|
63
|
+
ActionAlertType,
|
64
|
+
} from '@finos/legend-application';
|
65
|
+
import { VariableSelector } from './shared/QueryBuilderVariableSelector.js';
|
66
|
+
import {
|
67
|
+
generateMilestonedPropertyParameterValue,
|
68
|
+
isDefaultDatePropagationSupported,
|
69
|
+
matchMilestoningParameterValue,
|
70
|
+
} from '../stores/milestoning/QueryBuilderMilestoningHelper.js';
|
60
71
|
|
61
72
|
const DerivedPropertyParameterValueEditor = observer(
|
62
73
|
(props: {
|
@@ -71,10 +82,10 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
71
82
|
derivedPropertyExpressionState.parameters[idx]?.genericType,
|
72
83
|
).value.rawType;
|
73
84
|
const handleDrop = useCallback(
|
74
|
-
(item:
|
85
|
+
(item: QueryBuilderVariableDragSource): void => {
|
75
86
|
functionExpression_setParameterValue(
|
76
87
|
derivedPropertyExpressionState.propertyExpression,
|
77
|
-
item.variable
|
88
|
+
item.variable,
|
78
89
|
idx + 1,
|
79
90
|
derivedPropertyExpressionState.queryBuilderState.observableContext,
|
80
91
|
);
|
@@ -82,14 +93,14 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
82
93
|
[derivedPropertyExpressionState, idx],
|
83
94
|
);
|
84
95
|
const [{ isParameterValueDragOver }, dropTargetConnector] = useDrop<
|
85
|
-
|
96
|
+
QueryBuilderVariableDragSource,
|
86
97
|
void,
|
87
98
|
{ isParameterValueDragOver: boolean }
|
88
99
|
>(
|
89
100
|
() => ({
|
90
|
-
accept: [
|
101
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
91
102
|
drop: (item, monitor): void => {
|
92
|
-
const itemType = item.variable.
|
103
|
+
const itemType = item.variable.genericType?.value.rawType;
|
93
104
|
if (
|
94
105
|
!monitor.didDrop() &&
|
95
106
|
// Doing a type check, which only allows dragging and dropping parameters of the same type or of child types
|
@@ -108,6 +119,76 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
108
119
|
}),
|
109
120
|
[handleDrop],
|
110
121
|
);
|
122
|
+
const queryBuilderState = derivedPropertyExpressionState.queryBuilderState;
|
123
|
+
// Resets the next property expression in the property chain for milestoned properties when the user changes
|
124
|
+
// the milestoned dates of current property expression and it propagates those dates to next property expression.
|
125
|
+
const resetNextExpression = (
|
126
|
+
nextExpression: AbstractPropertyExpression,
|
127
|
+
): void => {
|
128
|
+
const milestoningStereotype = getMilestoneTemporalStereotype(
|
129
|
+
guaranteeType(
|
130
|
+
nextExpression.func.value.genericType.value.rawType,
|
131
|
+
Class,
|
132
|
+
),
|
133
|
+
queryBuilderState.graphManagerState.graph,
|
134
|
+
);
|
135
|
+
nextExpression.parametersValues.slice(1).forEach((parameter, index) => {
|
136
|
+
if (
|
137
|
+
milestoningStereotype &&
|
138
|
+
parameter instanceof INTERNAL__PropagatedValue &&
|
139
|
+
!matchMilestoningParameterValue(
|
140
|
+
milestoningStereotype,
|
141
|
+
index,
|
142
|
+
parameter.getValue(),
|
143
|
+
queryBuilderState.milestoningState,
|
144
|
+
)
|
145
|
+
) {
|
146
|
+
const newParameterValue = new INTERNAL__PropagatedValue(() =>
|
147
|
+
guaranteeNonNullable(
|
148
|
+
queryBuilderState.milestoningState
|
149
|
+
.getMilestoningImplementation(milestoningStereotype)
|
150
|
+
.getMilestoningDate(index),
|
151
|
+
),
|
152
|
+
);
|
153
|
+
newParameterValue.isPropagatedValue = false;
|
154
|
+
functionExpression_setParameterValue(
|
155
|
+
guaranteeType(nextExpression, AbstractPropertyExpression),
|
156
|
+
guaranteeNonNullable(newParameterValue),
|
157
|
+
index + 1,
|
158
|
+
queryBuilderState.observableContext,
|
159
|
+
);
|
160
|
+
}
|
161
|
+
});
|
162
|
+
};
|
163
|
+
const checkDatePropagation = (
|
164
|
+
nextExpression: ValueSpecification | undefined,
|
165
|
+
): void => {
|
166
|
+
if (
|
167
|
+
nextExpression instanceof AbstractPropertyExpression &&
|
168
|
+
isDefaultDatePropagationSupported(nextExpression, queryBuilderState) &&
|
169
|
+
nextExpression.func.value.genericType.value.rawType instanceof Class
|
170
|
+
) {
|
171
|
+
queryBuilderState.applicationStore.setActionAlertInfo({
|
172
|
+
message:
|
173
|
+
'You have just changed a milestoning date in the property expression chain, this date will be propagated down the rest of the chain. Do you want to proceed? Otherwise, you can choose to propagate the default milestoning dates instead.',
|
174
|
+
type: ActionAlertType.CAUTION,
|
175
|
+
actions: [
|
176
|
+
{
|
177
|
+
label: 'Proceed',
|
178
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
179
|
+
default: true,
|
180
|
+
},
|
181
|
+
{
|
182
|
+
label: 'Propagate default milestoning date(s)',
|
183
|
+
type: ActionAlertActionType.PROCEED,
|
184
|
+
handler: queryBuilderState.applicationStore.guardUnhandledError(
|
185
|
+
async () => resetNextExpression(nextExpression),
|
186
|
+
),
|
187
|
+
},
|
188
|
+
],
|
189
|
+
});
|
190
|
+
}
|
191
|
+
};
|
111
192
|
const resetParameterValue = (): void => {
|
112
193
|
functionExpression_setParameterValue(
|
113
194
|
derivedPropertyExpressionState.propertyExpression,
|
@@ -123,7 +204,23 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
123
204
|
idx + 1,
|
124
205
|
derivedPropertyExpressionState.queryBuilderState.observableContext,
|
125
206
|
);
|
207
|
+
const derivedPropertyExpressionStates =
|
208
|
+
derivedPropertyExpressionState.propertyExpressionState
|
209
|
+
.derivedPropertyExpressionStates;
|
210
|
+
const currentDerivedPropertyStateindex =
|
211
|
+
derivedPropertyExpressionStates.indexOf(derivedPropertyExpressionState);
|
212
|
+
checkDatePropagation(
|
213
|
+
currentDerivedPropertyStateindex + 1 <
|
214
|
+
derivedPropertyExpressionStates.length
|
215
|
+
? derivedPropertyExpressionStates[
|
216
|
+
currentDerivedPropertyStateindex + 1
|
217
|
+
]?.propertyExpression
|
218
|
+
: undefined,
|
219
|
+
);
|
126
220
|
};
|
221
|
+
const valueSpec = guaranteeNonNullable(
|
222
|
+
derivedPropertyExpressionState.parameterValues[idx],
|
223
|
+
);
|
127
224
|
|
128
225
|
return (
|
129
226
|
<div key={variable.name} className="panel__content__form__section">
|
@@ -133,15 +230,13 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
133
230
|
<div className="panel__content__form__section__header__prompt">{`${
|
134
231
|
variable.multiplicity.lowerBound === 0 ? 'optional' : ''
|
135
232
|
}`}</div>
|
136
|
-
<div className="query-
|
233
|
+
<div className="query-builder__variable-editor">
|
137
234
|
<PanelDropZone
|
138
235
|
isDragOver={isParameterValueDragOver}
|
139
236
|
dropTargetConnector={dropTargetConnector}
|
140
237
|
>
|
141
238
|
<BasicValueSpecificationEditor
|
142
|
-
valueSpecification={
|
143
|
-
derivedPropertyExpressionState.parameterValues[idx],
|
144
|
-
)}
|
239
|
+
valueSpecification={valueSpec}
|
145
240
|
setValueSpecification={(val: ValueSpecification): void => {
|
146
241
|
functionExpression_setParameterValue(
|
147
242
|
derivedPropertyExpressionState.propertyExpression,
|
@@ -161,6 +256,9 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
161
256
|
match: parameterType === PrimitiveType.DATETIME,
|
162
257
|
}}
|
163
258
|
resetValue={resetParameterValue}
|
259
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
260
|
+
valueSpec,
|
261
|
+
)}
|
164
262
|
/>
|
165
263
|
</PanelDropZone>
|
166
264
|
</div>
|
@@ -233,25 +331,10 @@ export const QueryBuilderPropertyExpressionEditor = observer(
|
|
233
331
|
/>
|
234
332
|
),
|
235
333
|
)}
|
236
|
-
<ModalBody className="query-
|
237
|
-
<
|
238
|
-
|
239
|
-
|
240
|
-
<div className="panel__content__form__section__list__items">
|
241
|
-
{propertyExpressionState.queryBuilderState.parametersState.parameterStates.map(
|
242
|
-
(parameter) => (
|
243
|
-
<VariableExpressionViewer
|
244
|
-
key={parameter.uuid}
|
245
|
-
queryBuilderState={
|
246
|
-
propertyExpressionState.queryBuilderState
|
247
|
-
}
|
248
|
-
variableExpressionState={parameter}
|
249
|
-
isReadOnly={true}
|
250
|
-
hideActions={true}
|
251
|
-
/>
|
252
|
-
),
|
253
|
-
)}
|
254
|
-
</div>
|
334
|
+
<ModalBody className="query-builder__variables__modal__body">
|
335
|
+
<VariableSelector
|
336
|
+
queryBuilderState={propertyExpressionState.queryBuilderState}
|
337
|
+
/>
|
255
338
|
</ModalBody>
|
256
339
|
</ModalBody>
|
257
340
|
<ModalFooter>
|
@@ -33,7 +33,6 @@ import {
|
|
33
33
|
type Runtime,
|
34
34
|
type ValueSpecification,
|
35
35
|
LATEST_DATE,
|
36
|
-
MILESTONING_STEREOTYPE,
|
37
36
|
PrimitiveInstanceValue,
|
38
37
|
VariableExpression,
|
39
38
|
getMilestoneTemporalStereotype,
|
@@ -51,7 +50,7 @@ import {
|
|
51
50
|
} from '@finos/legend-application';
|
52
51
|
import { MilestoningParametersEditor } from './explorer/QueryBuilderMilestoningEditor.js';
|
53
52
|
|
54
|
-
const getParameterValue = (
|
53
|
+
export const getParameterValue = (
|
55
54
|
parameter: ValueSpecification | undefined,
|
56
55
|
): string | undefined => {
|
57
56
|
if (parameter instanceof VariableExpression) {
|
@@ -87,26 +86,10 @@ const generateClassLabel = (
|
|
87
86
|
);
|
88
87
|
|
89
88
|
let milestoningTooltipText: string | undefined;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
)}`;
|
95
|
-
break;
|
96
|
-
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL:
|
97
|
-
milestoningTooltipText = `Processing Date: ${getParameterValue(
|
98
|
-
queryBuilderState.milestoningState.processingDate,
|
99
|
-
)}`;
|
100
|
-
break;
|
101
|
-
case MILESTONING_STEREOTYPE.BITEMPORAL:
|
102
|
-
milestoningTooltipText = `Processing Date: ${getParameterValue(
|
103
|
-
queryBuilderState.milestoningState.processingDate,
|
104
|
-
)}, Business Date: ${getParameterValue(
|
105
|
-
queryBuilderState.milestoningState.businessDate,
|
106
|
-
)}`;
|
107
|
-
break;
|
108
|
-
default:
|
109
|
-
milestoningTooltipText = undefined;
|
89
|
+
if (milestoneStereotype) {
|
90
|
+
milestoningTooltipText = queryBuilderState.milestoningState
|
91
|
+
.getMilestoningImplementation(milestoneStereotype)
|
92
|
+
.getMilestoningToolTipText();
|
110
93
|
}
|
111
94
|
|
112
95
|
return (
|
@@ -16,13 +16,10 @@
|
|
16
16
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
18
18
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
19
|
-
import {
|
20
|
-
type QueryBuilderParameterDragSource,
|
21
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
22
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
23
19
|
import { useCallback } from 'react';
|
24
20
|
import {
|
25
21
|
type ValueSpecification,
|
22
|
+
type VariableExpression,
|
26
23
|
GenericType,
|
27
24
|
GenericTypeExplicitReference,
|
28
25
|
MILESTONING_STEREOTYPE,
|
@@ -33,7 +30,6 @@ import {
|
|
33
30
|
} from '@finos/legend-graph';
|
34
31
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
35
32
|
import { useDrop } from 'react-dnd';
|
36
|
-
import { VariableExpressionViewer } from '../QueryBuilderParametersPanel.js';
|
37
33
|
import {
|
38
34
|
Dialog,
|
39
35
|
Modal,
|
@@ -44,8 +40,13 @@ import {
|
|
44
40
|
PanelFormSection,
|
45
41
|
} from '@finos/legend-art';
|
46
42
|
import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
47
|
-
import {
|
43
|
+
import {
|
44
|
+
BasicValueSpecificationEditor,
|
45
|
+
type QueryBuilderVariableDragSource,
|
46
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
47
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
48
48
|
import { instanceValue_setValues } from '../../stores/shared/ValueSpecificationModifierHelper.js';
|
49
|
+
import { VariableSelector } from '../shared/QueryBuilderVariableSelector.js';
|
49
50
|
|
50
51
|
const MilestoningParameterEditor = observer(
|
51
52
|
(props: {
|
@@ -54,26 +55,22 @@ const MilestoningParameterEditor = observer(
|
|
54
55
|
}) => {
|
55
56
|
const { queryBuilderState, stereotype } = props;
|
56
57
|
const handleDrop = useCallback(
|
57
|
-
(item:
|
58
|
+
(item: QueryBuilderVariableDragSource): void => {
|
58
59
|
if (stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
|
59
|
-
queryBuilderState.milestoningState.setBusinessDate(
|
60
|
-
item.variable.parameter,
|
61
|
-
);
|
60
|
+
queryBuilderState.milestoningState.setBusinessDate(item.variable);
|
62
61
|
} else {
|
63
|
-
queryBuilderState.milestoningState.setProcessingDate(
|
64
|
-
item.variable.parameter,
|
65
|
-
);
|
62
|
+
queryBuilderState.milestoningState.setProcessingDate(item.variable);
|
66
63
|
}
|
67
64
|
},
|
68
65
|
[queryBuilderState, stereotype],
|
69
66
|
);
|
70
67
|
const [{ isMilestoningParameterValueDragOver }, dropConnector] = useDrop<
|
71
|
-
|
68
|
+
QueryBuilderVariableDragSource,
|
72
69
|
void,
|
73
70
|
{ isMilestoningParameterValueDragOver: boolean }
|
74
71
|
>(
|
75
72
|
() => ({
|
76
|
-
accept: [
|
73
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
77
74
|
drop: (item, monitor): void => {
|
78
75
|
if (!monitor.didDrop()) {
|
79
76
|
handleDrop(item);
|
@@ -119,7 +116,7 @@ const MilestoningParameterEditor = observer(
|
|
119
116
|
};
|
120
117
|
|
121
118
|
return (
|
122
|
-
<div ref={dropConnector} className="query-
|
119
|
+
<div ref={dropConnector} className="query-builder__variable-editor">
|
123
120
|
<PanelEntryDropZonePlaceholder
|
124
121
|
showPlaceholder={isMilestoningParameterValueDragOver}
|
125
122
|
label="Change Milestoning Parameter Value"
|
@@ -138,6 +135,9 @@ const MilestoningParameterEditor = observer(
|
|
138
135
|
expectedType: PrimitiveType.DATE,
|
139
136
|
}}
|
140
137
|
resetValue={resetMilestoningParameter}
|
138
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
139
|
+
milestoningParameter,
|
140
|
+
)}
|
141
141
|
/>
|
142
142
|
</PanelEntryDropZonePlaceholder>
|
143
143
|
</div>
|
@@ -243,6 +243,13 @@ export const MilestoningParametersEditor = observer(
|
|
243
243
|
const { queryBuilderState } = props;
|
244
244
|
const milestoningState = queryBuilderState.milestoningState;
|
245
245
|
const close = (): void => milestoningState.setShowMilestoningEditor(false);
|
246
|
+
const isCompatibleMilestoningParameter = (
|
247
|
+
variable: VariableExpression,
|
248
|
+
): boolean =>
|
249
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
|
250
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.LATESTDATE ||
|
251
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATE ||
|
252
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATETIME;
|
246
253
|
|
247
254
|
return (
|
248
255
|
<Dialog
|
@@ -256,36 +263,19 @@ export const MilestoningParametersEditor = observer(
|
|
256
263
|
>
|
257
264
|
<Modal
|
258
265
|
darkMode={true}
|
259
|
-
className="editor-modal query-
|
266
|
+
className="editor-modal query-builder__variables__modal"
|
260
267
|
>
|
261
268
|
<ModalHeader title="Milestoning Parameters" />
|
262
|
-
<ModalBody className="query-
|
269
|
+
<ModalBody className="query-builder__variables__modal__body">
|
263
270
|
<TemporalMilestoningEditor queryBuilderState={queryBuilderState} />
|
264
271
|
<div className="panel__content__form__section__header__label">
|
265
272
|
List of compatible milestoning parameters
|
266
273
|
</div>
|
267
274
|
<div className="panel__content__form__section__list__items">
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
PRIMITIVE_TYPE.STRICTDATE ||
|
273
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
274
|
-
PRIMITIVE_TYPE.LATESTDATE ||
|
275
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
276
|
-
PRIMITIVE_TYPE.DATE ||
|
277
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
278
|
-
PRIMITIVE_TYPE.DATETIME,
|
279
|
-
)
|
280
|
-
.map((parameter) => (
|
281
|
-
<VariableExpressionViewer
|
282
|
-
key={parameter.uuid}
|
283
|
-
queryBuilderState={queryBuilderState}
|
284
|
-
variableExpressionState={parameter}
|
285
|
-
isReadOnly={true}
|
286
|
-
hideActions={true}
|
287
|
-
/>
|
288
|
-
))}
|
275
|
+
<VariableSelector
|
276
|
+
queryBuilderState={queryBuilderState}
|
277
|
+
filterBy={isCompatibleMilestoningParameter}
|
278
|
+
/>
|
289
279
|
</div>
|
290
280
|
</ModalBody>
|
291
281
|
<ModalFooter>
|
@@ -56,7 +56,7 @@ import {
|
|
56
56
|
QueryBuilderTDS_OLAPRankOperatorState,
|
57
57
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
58
58
|
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
59
|
-
} from '../../stores/fetch-structure/tds/olapGroupBy/
|
59
|
+
} from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
60
60
|
import { QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
61
61
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
62
62
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
@@ -79,15 +79,15 @@ import {
|
|
79
79
|
QueryBuilderDerivationProjectionColumnState,
|
80
80
|
} from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
81
81
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
82
|
-
import {
|
83
|
-
type QueryBuilderParameterDragSource,
|
84
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
85
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
86
82
|
import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
|
87
83
|
import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
88
84
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
|
89
85
|
import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
90
|
-
import {
|
86
|
+
import {
|
87
|
+
type QueryBuilderVariableDragSource,
|
88
|
+
BasicValueSpecificationEditor,
|
89
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
90
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
91
91
|
import {
|
92
92
|
QueryBuilderColumnInfoTooltip,
|
93
93
|
renderPropertyTypeIcon,
|
@@ -95,7 +95,7 @@ import {
|
|
95
95
|
import {
|
96
96
|
type QueryBuilderOLAPColumnDragSource,
|
97
97
|
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
98
|
-
} from '../../stores/fetch-structure/tds/olapGroupBy/
|
98
|
+
} from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
99
99
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
100
100
|
|
101
101
|
const QueryBuilderPostFilterConditionContextMenu = observer(
|
@@ -280,9 +280,9 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
280
280
|
isDragOver: boolean;
|
281
281
|
}) => {
|
282
282
|
const { node, isDragOver } = props;
|
283
|
-
const
|
284
|
-
node.condition.postFilterState.tdsState.queryBuilderState
|
285
|
-
|
283
|
+
const queryBuilderState =
|
284
|
+
node.condition.postFilterState.tdsState.queryBuilderState;
|
285
|
+
const graph = queryBuilderState.graphManagerState.graph;
|
286
286
|
const applicationStore = useApplicationStore();
|
287
287
|
const changeOperator = (val: QueryBuilderPostFilterOperator) => (): void =>
|
288
288
|
node.condition.changeOperator(val);
|
@@ -299,15 +299,14 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
299
299
|
};
|
300
300
|
// Drag and Drop on filter condition value
|
301
301
|
const handleDrop = useCallback(
|
302
|
-
(item:
|
303
|
-
const parameterType =
|
304
|
-
item.variable.parameter.genericType?.value.rawType;
|
302
|
+
(item: QueryBuilderVariableDragSource): void => {
|
303
|
+
const parameterType = item.variable.genericType?.value.rawType;
|
305
304
|
const conditionValueType = node.condition.columnState.getColumnType();
|
306
305
|
if (
|
307
306
|
conditionValueType &&
|
308
307
|
isTypeCompatibleForAssignment(parameterType, conditionValueType)
|
309
308
|
) {
|
310
|
-
node.condition.setValue(item.variable
|
309
|
+
node.condition.setValue(item.variable);
|
311
310
|
} else {
|
312
311
|
applicationStore.notifyWarning(
|
313
312
|
`Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType?.name}.`,
|
@@ -317,12 +316,12 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
317
316
|
[applicationStore, node.condition],
|
318
317
|
);
|
319
318
|
const [{ isFilterValueDragOver }, dropConnector] = useDrop<
|
320
|
-
|
319
|
+
QueryBuilderVariableDragSource,
|
321
320
|
void,
|
322
321
|
{ isFilterValueDragOver: boolean }
|
323
322
|
>(
|
324
323
|
() => ({
|
325
|
-
accept: [
|
324
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
326
325
|
drop: (item, monitor): void => {
|
327
326
|
if (!monitor.didDrop()) {
|
328
327
|
handleDrop(item);
|
@@ -417,10 +416,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
417
416
|
valueSpecification={node.condition.value}
|
418
417
|
setValueSpecification={changeValueSpecification}
|
419
418
|
graph={graph}
|
420
|
-
obseverContext={
|
421
|
-
node.condition.postFilterState.tdsState.queryBuilderState
|
422
|
-
.observableContext
|
423
|
-
}
|
419
|
+
obseverContext={queryBuilderState.observableContext}
|
424
420
|
typeCheckOption={{
|
425
421
|
expectedType: guaranteeNonNullable(
|
426
422
|
node.condition.columnState.getColumnType(),
|
@@ -428,6 +424,9 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
428
424
|
}}
|
429
425
|
resetValue={resetNode}
|
430
426
|
selectorConfig={selectorConfig}
|
427
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
428
|
+
node.condition.value,
|
429
|
+
)}
|
431
430
|
/>
|
432
431
|
</PanelEntryDropZonePlaceholder>
|
433
432
|
</div>
|
@@ -21,7 +21,7 @@ import {
|
|
21
21
|
ResizablePanelSplitter,
|
22
22
|
} from '@finos/legend-art';
|
23
23
|
import { QueryBuilderFilterPanel } from '../filter/QueryBuilderFilterPanel.js';
|
24
|
-
import { QueryBuilderOlapGroupByPanel } from './
|
24
|
+
import { QueryBuilderOlapGroupByPanel } from './QueryBuilderOLAPGroupByPanel.js';
|
25
25
|
import { QueryBuilderPostFilterPanel } from './QueryBuilderPostFilterPanel.js';
|
26
26
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
27
27
|
|
@@ -55,10 +55,6 @@ import { QueryResultModifierModal } from './QueryBuilderResultModifierPanel.js';
|
|
55
55
|
import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
|
56
56
|
import { flowResult } from 'mobx';
|
57
57
|
import { useApplicationStore } from '@finos/legend-application';
|
58
|
-
import {
|
59
|
-
type QueryBuilderParameterDragSource,
|
60
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
61
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
62
58
|
import {
|
63
59
|
type ConcreteFunctionDefinition,
|
64
60
|
generateFunctionCallString,
|
@@ -73,6 +69,10 @@ import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../stores/QueryBuilderConfig.js
|
|
73
69
|
import type { QueryBuilderAggregateOperator } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js';
|
74
70
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
75
71
|
import { LambdaEditor } from '../shared/LambdaEditor.js';
|
72
|
+
import {
|
73
|
+
type QueryBuilderVariableDragSource,
|
74
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
75
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
76
76
|
|
77
77
|
const QueryBuilderProjectionColumnContextMenu = observer(
|
78
78
|
forwardRef<
|
@@ -146,16 +146,16 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
146
146
|
(
|
147
147
|
item:
|
148
148
|
| QueryBuilderExplorerTreeDragSource
|
149
|
-
|
|
149
|
+
| QueryBuilderVariableDragSource
|
150
150
|
| QueryBuilderFunctionsExplorerDragSource,
|
151
151
|
type: string,
|
152
152
|
): void => {
|
153
|
-
if (type ===
|
153
|
+
if (type === QUERY_BUILDER_VARIABLE_DND_TYPE) {
|
154
154
|
projectionColumnState.derivationLambdaEditorState.setLambdaString(
|
155
155
|
`${
|
156
156
|
projectionColumnState.derivationLambdaEditorState.lambdaString
|
157
157
|
}${VARIABLE_REFERENCE_TOKEN}${
|
158
|
-
(item as
|
158
|
+
(item as QueryBuilderVariableDragSource).variable.name
|
159
159
|
}`,
|
160
160
|
);
|
161
161
|
} else if (type === QUERY_BUILDER_FUNCTION_DND_TYPE) {
|
@@ -178,7 +178,7 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
178
178
|
);
|
179
179
|
const [, dropConnector] = useDrop<
|
180
180
|
| QueryBuilderExplorerTreeDragSource
|
181
|
-
|
|
181
|
+
| QueryBuilderVariableDragSource
|
182
182
|
| QueryBuilderFunctionsExplorerDragSource
|
183
183
|
>(
|
184
184
|
() => ({
|
@@ -187,7 +187,7 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
187
187
|
QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.CLASS_PROPERTY,
|
188
188
|
QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
|
189
189
|
QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
|
190
|
-
|
190
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
191
191
|
QUERY_BUILDER_FUNCTION_DND_TYPE,
|
192
192
|
],
|
193
193
|
drop: (item, monitor): void => {
|