@finos/legend-query-builder 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +42 -9
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js +2 -5
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +2 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +3 -3
- package/lib/components/QueryBuilderSideBar.d.ts +0 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +2 -1
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts +1 -0
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.js +1 -0
- package/lib/components/QueryBuilder_TestID.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +2 -2
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js +363 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +21 -53
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +32 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts +27 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +61 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -13
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +0 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +23 -7
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +5 -1
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +15 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +7 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.js +7 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +4 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +50 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +7 -1
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.js +2 -4
- package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +2 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js +3 -3
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +3 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js +20 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +23 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +41 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +11 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +44 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +4 -4
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +8 -7
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts +18 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js +36 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts +91 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js +272 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js +100 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js +83 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts +29 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js +30 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js +51 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js +51 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +6 -4
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +14 -3
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +8 -11
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +5 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +4 -6
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +6 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -0
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +2 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +6 -0
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +110 -35
- package/src/components/QueryBuilderComponentTestUtils.tsx +9 -11
- package/src/components/QueryBuilderDiffPanel.tsx +2 -2
- package/src/components/QueryBuilderResultPanel.tsx +4 -4
- package/src/components/QueryBuilderSideBar.tsx +4 -1
- package/src/components/QueryBuilder_TestID.ts +1 -0
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +2 -3
- package/src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx +1140 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +31 -106
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +69 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +4 -1
- package/src/components/fetch-structure/QueryBuilderTDSComponentHelper.tsx +118 -0
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +4 -23
- package/src/components/shared/LambdaEditor.tsx +25 -22
- package/src/components/workflows/ServiceQueryBuilder.tsx +10 -2
- package/src/graphManager/QueryBuilderHashUtils.ts +16 -0
- package/src/graphManager/QueryBuilderSupportedFunctions.ts +7 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +14 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +129 -0
- package/src/stores/QueryBuilderStateBuilder.ts +14 -1
- package/src/stores/QueryBuilderStateTestUtils.ts +9 -13
- package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -2
- package/src/stores/explorer/QueryBuilderExplorerState.ts +3 -3
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +2 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.ts +28 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +79 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +68 -1
- package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.ts +1 -1
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +11 -9
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts +39 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts +377 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts +237 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.ts +148 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.ts +43 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.ts +57 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.ts +57 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.ts +54 -0
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +2 -2
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +22 -10
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +11 -19
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +8 -7
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +4 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +9 -11
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +8 -4
- package/src/stores/filter/QueryBuilderFilterState.ts +7 -0
- package/tsconfig.json +19 -0
@@ -18,7 +18,6 @@ import { useApplicationStore } from '@finos/legend-application';
|
|
18
18
|
import {
|
19
19
|
type TreeNodeContainerProps,
|
20
20
|
type TreeNodeViewProps,
|
21
|
-
type TooltipPlacement,
|
22
21
|
BlankPanelPlaceholder,
|
23
22
|
CaretDownIcon,
|
24
23
|
ChevronDownIcon,
|
@@ -39,11 +38,6 @@ import {
|
|
39
38
|
NewFolderIcon,
|
40
39
|
PlusCircleIcon,
|
41
40
|
InfoCircleIcon,
|
42
|
-
Tooltip,
|
43
|
-
StringTypeIcon,
|
44
|
-
ToggleIcon,
|
45
|
-
HashtagIcon,
|
46
|
-
ClockIcon,
|
47
41
|
PanelDropZone,
|
48
42
|
DragPreviewLayer,
|
49
43
|
PanelEntryDropZonePlaceholder,
|
@@ -52,25 +46,20 @@ import {
|
|
52
46
|
PanelContent,
|
53
47
|
} from '@finos/legend-art';
|
54
48
|
import {
|
55
|
-
type Type,
|
56
49
|
type ValueSpecification,
|
57
50
|
Class,
|
58
51
|
Enumeration,
|
59
52
|
PrimitiveType,
|
60
|
-
PRIMITIVE_TYPE,
|
61
|
-
getMultiplicityDescription,
|
62
53
|
} from '@finos/legend-graph';
|
63
54
|
import {
|
64
55
|
assertErrorThrown,
|
65
56
|
guaranteeNonNullable,
|
66
|
-
returnUndefOnError,
|
67
57
|
debounce,
|
68
58
|
} from '@finos/legend-shared';
|
69
59
|
import { flowResult } from 'mobx';
|
70
60
|
import { observer } from 'mobx-react-lite';
|
71
61
|
import { forwardRef, useCallback, useMemo, useRef, useState } from 'react';
|
72
62
|
import { useDrop, useDrag } from 'react-dnd';
|
73
|
-
import { getColumnMultiplicity } from '../../stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js';
|
74
63
|
import { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
|
75
64
|
import type { QueryBuilderPostFilterOperator } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js';
|
76
65
|
import {
|
@@ -99,6 +88,15 @@ import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpe
|
|
99
88
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
|
100
89
|
import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
101
90
|
import { BasicValueSpecificationEditor } from '../shared/BasicValueSpecificationEditor.js';
|
91
|
+
import {
|
92
|
+
QueryBuilderColumnInfoTooltip,
|
93
|
+
renderPropertyTypeIcon,
|
94
|
+
} from './QueryBuilderTDSComponentHelper.js';
|
95
|
+
import {
|
96
|
+
type QueryBuilderOlapColumnDragSource,
|
97
|
+
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
98
|
+
} from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js';
|
99
|
+
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js';
|
102
100
|
|
103
101
|
const QueryBuilderPostFilterConditionContextMenu = observer(
|
104
102
|
forwardRef<
|
@@ -197,91 +195,6 @@ const QueryBuilderPostFilterGroupConditionEditor = observer(
|
|
197
195
|
},
|
198
196
|
);
|
199
197
|
|
200
|
-
const renderPropertyTypeIcon = (type: Type): React.ReactNode => {
|
201
|
-
if (type instanceof PrimitiveType) {
|
202
|
-
if (type.name === PRIMITIVE_TYPE.STRING) {
|
203
|
-
return <StringTypeIcon className="query-builder-column-badge__icon" />;
|
204
|
-
} else if (type.name === PRIMITIVE_TYPE.BOOLEAN) {
|
205
|
-
return <ToggleIcon className="query-builder-column-badge__icon" />;
|
206
|
-
} else if (
|
207
|
-
type.name === PRIMITIVE_TYPE.NUMBER ||
|
208
|
-
type.name === PRIMITIVE_TYPE.INTEGER ||
|
209
|
-
type.name === PRIMITIVE_TYPE.FLOAT ||
|
210
|
-
type.name === PRIMITIVE_TYPE.DECIMAL
|
211
|
-
) {
|
212
|
-
return <HashtagIcon className="query-builder-column-badge__icon" />;
|
213
|
-
} else if (
|
214
|
-
type.name === PRIMITIVE_TYPE.DATE ||
|
215
|
-
type.name === PRIMITIVE_TYPE.DATETIME ||
|
216
|
-
type.name === PRIMITIVE_TYPE.STRICTDATE
|
217
|
-
) {
|
218
|
-
return <ClockIcon className="query-builder-column-badge__icon" />;
|
219
|
-
}
|
220
|
-
} else if (type instanceof Enumeration) {
|
221
|
-
return <div className="icon query-builder-column-badge__icon">E</div>;
|
222
|
-
}
|
223
|
-
return null;
|
224
|
-
};
|
225
|
-
|
226
|
-
const QueryBuilderColumnInfoTooltip: React.FC<{
|
227
|
-
columnState:
|
228
|
-
| QueryBuilderProjectionColumnState
|
229
|
-
| QueryBuilderAggregateColumnState;
|
230
|
-
children: React.ReactElement;
|
231
|
-
placement?: TooltipPlacement | undefined;
|
232
|
-
}> = (props) => {
|
233
|
-
const { columnState, placement, children } = props;
|
234
|
-
const type = columnState.getReturnType();
|
235
|
-
const multiplicity = returnUndefOnError(() =>
|
236
|
-
getColumnMultiplicity(columnState),
|
237
|
-
);
|
238
|
-
return (
|
239
|
-
<Tooltip
|
240
|
-
arrow={true}
|
241
|
-
{...(placement !== undefined ? { placement } : {})}
|
242
|
-
classes={{
|
243
|
-
tooltip: 'query-builder__tooltip',
|
244
|
-
arrow: 'query-builder__tooltip__arrow',
|
245
|
-
tooltipPlacementRight: 'query-builder__tooltip--right',
|
246
|
-
}}
|
247
|
-
TransitionProps={{
|
248
|
-
// disable transition
|
249
|
-
// NOTE: somehow, this is the only workaround we have, if for example
|
250
|
-
// we set `appear = true`, the tooltip will jump out of position
|
251
|
-
timeout: 0,
|
252
|
-
}}
|
253
|
-
title={
|
254
|
-
<div className="query-builder__tooltip__content">
|
255
|
-
<div className="query-builder__tooltip__item">
|
256
|
-
<div className="query-builder__tooltip__item__label">Name</div>
|
257
|
-
<div className="query-builder__tooltip__item__value">
|
258
|
-
{columnState.columnName}
|
259
|
-
</div>
|
260
|
-
</div>
|
261
|
-
<div className="query-builder__tooltip__item">
|
262
|
-
<div className="query-builder__tooltip__item__label">Type</div>
|
263
|
-
<div className="query-builder__tooltip__item__value">
|
264
|
-
{type?.path}
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
{multiplicity && (
|
268
|
-
<div className="query-builder__tooltip__item">
|
269
|
-
<div className="query-builder__tooltip__item__label">
|
270
|
-
Multiplicity
|
271
|
-
</div>
|
272
|
-
<div className="query-builder__tooltip__item__value">
|
273
|
-
{getMultiplicityDescription(multiplicity)}
|
274
|
-
</div>
|
275
|
-
</div>
|
276
|
-
)}
|
277
|
-
</div>
|
278
|
-
}
|
279
|
-
>
|
280
|
-
{children}
|
281
|
-
</Tooltip>
|
282
|
-
);
|
283
|
-
};
|
284
|
-
|
285
198
|
export const QueryBuilderColumnBadge = observer(
|
286
199
|
(props: {
|
287
200
|
postFilterConditionState: PostFilterConditionState;
|
@@ -291,7 +204,7 @@ export const QueryBuilderColumnBadge = observer(
|
|
291
204
|
}) => {
|
292
205
|
const { postFilterConditionState, onColumnChange } = props;
|
293
206
|
const applicationStore = useApplicationStore();
|
294
|
-
const type = postFilterConditionState.columnState.
|
207
|
+
const type = postFilterConditionState.columnState.getColumnType();
|
295
208
|
const handleDrop = useCallback(
|
296
209
|
(item: QueryBuilderProjectionColumnDragSource): Promise<void> =>
|
297
210
|
onColumnChange(item.columnState),
|
@@ -303,7 +216,10 @@ export const QueryBuilderColumnBadge = observer(
|
|
303
216
|
{ isDragOver: boolean }
|
304
217
|
>(
|
305
218
|
() => ({
|
306
|
-
accept: [
|
219
|
+
accept: [
|
220
|
+
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
221
|
+
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
222
|
+
],
|
307
223
|
drop: (item, monitor): void => {
|
308
224
|
if (!monitor.didDrop()) {
|
309
225
|
handleDrop(item).catch(applicationStore.alertUnhandledError);
|
@@ -386,7 +302,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
386
302
|
(item: QueryBuilderParameterDragSource): void => {
|
387
303
|
const parameterType =
|
388
304
|
item.variable.parameter.genericType?.value.rawType;
|
389
|
-
const conditionValueType = node.condition.columnState.
|
305
|
+
const conditionValueType = node.condition.columnState.getColumnType();
|
390
306
|
if (
|
391
307
|
conditionValueType &&
|
392
308
|
isTypeCompatibleForAssignment(parameterType, conditionValueType)
|
@@ -507,7 +423,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
507
423
|
}
|
508
424
|
typeCheckOption={{
|
509
425
|
expectedType: guaranteeNonNullable(
|
510
|
-
node.condition.columnState.
|
426
|
+
node.condition.columnState.getColumnType(),
|
511
427
|
),
|
512
428
|
}}
|
513
429
|
resetValue={resetNode}
|
@@ -569,9 +485,15 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
569
485
|
postFilterState.removeNodeAndPruneBranch(node);
|
570
486
|
const handleDrop = useCallback(
|
571
487
|
(item: QueryBuilderPostFilterDropTarget, type: string): void => {
|
572
|
-
if (
|
573
|
-
|
574
|
-
|
488
|
+
if (
|
489
|
+
type === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
|
490
|
+
type === QUERY_BUILDER_OLAP_COLUMN_DND_TYPE
|
491
|
+
) {
|
492
|
+
const columnState = (
|
493
|
+
item as
|
494
|
+
| QueryBuilderProjectionColumnDragSource
|
495
|
+
| QueryBuilderOlapColumnDragSource
|
496
|
+
).columnState as QueryBuilderTDSColumnState;
|
575
497
|
let conditionState: PostFilterConditionState;
|
576
498
|
try {
|
577
499
|
conditionState = new PostFilterConditionState(
|
@@ -590,7 +512,6 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
590
512
|
applicationStore.notifyWarning(error.message);
|
591
513
|
return;
|
592
514
|
}
|
593
|
-
|
594
515
|
if (node instanceof QueryBuilderPostFilterTreeGroupNodeData) {
|
595
516
|
postFilterState.addNodeFromNode(
|
596
517
|
new QueryBuilderPostFilterTreeConditionNodeData(
|
@@ -633,6 +554,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
633
554
|
accept: [
|
634
555
|
...Object.values(QUERY_BUILDER_POST_FILTER_DND_TYPE),
|
635
556
|
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
557
|
+
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
636
558
|
],
|
637
559
|
drop: (item, monitor): void => {
|
638
560
|
if (!monitor.didDrop()) {
|
@@ -942,11 +864,14 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
942
864
|
{ isDragOver: boolean }
|
943
865
|
>(
|
944
866
|
() => ({
|
945
|
-
accept: [
|
867
|
+
accept: [
|
868
|
+
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
869
|
+
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
870
|
+
],
|
946
871
|
drop: (item, monitor): void => {
|
947
872
|
if (!monitor.didDrop()) {
|
948
873
|
handleDrop(item).catch(applicationStore.alertUnhandledError);
|
949
|
-
}
|
874
|
+
}
|
950
875
|
},
|
951
876
|
collect: (monitor) => ({
|
952
877
|
isDragOver: monitor.isOver({ shallow: true }),
|
@@ -0,0 +1,69 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { observer } from 'mobx-react-lite';
|
18
|
+
import {
|
19
|
+
ResizablePanelGroup,
|
20
|
+
ResizablePanel,
|
21
|
+
ResizablePanelSplitter,
|
22
|
+
} from '@finos/legend-art';
|
23
|
+
import { QueryBuilderFilterPanel } from '../filter/QueryBuilderFilterPanel.js';
|
24
|
+
import { QueryBuilderOlapGroupByPanel } from './QueryBuilderOlapGroupByPanel.js';
|
25
|
+
import { QueryBuilderPostFilterPanel } from './QueryBuilderPostFilterPanel.js';
|
26
|
+
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
27
|
+
|
28
|
+
export const QueryBuilderPostTDSPanel = observer(
|
29
|
+
(props: { tdsState: QueryBuilderTDSState }) => {
|
30
|
+
const { tdsState } = props;
|
31
|
+
const showFilterPanel = tdsState.queryBuilderState.filterState.showPanel;
|
32
|
+
const showOlapGroupByPanel = tdsState.showOlapGroupByPanel;
|
33
|
+
const showPostFilterPanel = tdsState.showPostFilterPanel;
|
34
|
+
if (!tdsState.TEMPORARY__showPostFetchStructurePanel) {
|
35
|
+
return null;
|
36
|
+
}
|
37
|
+
return (
|
38
|
+
<ResizablePanelGroup orientation="horizontal">
|
39
|
+
{showFilterPanel && (
|
40
|
+
<ResizablePanel minSize={40} direction={1}>
|
41
|
+
<QueryBuilderFilterPanel
|
42
|
+
queryBuilderState={tdsState.queryBuilderState}
|
43
|
+
/>
|
44
|
+
</ResizablePanel>
|
45
|
+
)}
|
46
|
+
{showFilterPanel && (showOlapGroupByPanel || showPostFilterPanel) && (
|
47
|
+
<ResizablePanelSplitter />
|
48
|
+
)}
|
49
|
+
{showOlapGroupByPanel && (
|
50
|
+
<ResizablePanel minSize={40}>
|
51
|
+
<QueryBuilderOlapGroupByPanel
|
52
|
+
olapGroupByState={tdsState.olapGroupByState}
|
53
|
+
/>
|
54
|
+
</ResizablePanel>
|
55
|
+
)}
|
56
|
+
{showOlapGroupByPanel && showPostFilterPanel && (
|
57
|
+
<ResizablePanelSplitter />
|
58
|
+
)}
|
59
|
+
{showPostFilterPanel && (
|
60
|
+
<ResizablePanel minSize={40}>
|
61
|
+
<QueryBuilderPostFilterPanel
|
62
|
+
queryBuilderState={tdsState.queryBuilderState}
|
63
|
+
/>
|
64
|
+
</ResizablePanel>
|
65
|
+
)}
|
66
|
+
</ResizablePanelGroup>
|
67
|
+
);
|
68
|
+
},
|
69
|
+
);
|
@@ -76,7 +76,10 @@ const ColumnSortEditor = observer(
|
|
76
76
|
<CustomSelectorInput
|
77
77
|
className="query-builder__projection__options__sort__dropdown"
|
78
78
|
options={projectionOptions}
|
79
|
-
disabled={
|
79
|
+
disabled={
|
80
|
+
projectionOptions.length < 1 ||
|
81
|
+
(projectionOptions.length === 1 && Boolean(value))
|
82
|
+
}
|
80
83
|
onChange={onChange}
|
81
84
|
value={value}
|
82
85
|
darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
|
@@ -0,0 +1,118 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
StringTypeIcon,
|
19
|
+
ToggleIcon,
|
20
|
+
HashtagIcon,
|
21
|
+
ClockIcon,
|
22
|
+
type TooltipPlacement,
|
23
|
+
Tooltip,
|
24
|
+
} from '@finos/legend-art';
|
25
|
+
import {
|
26
|
+
type Type,
|
27
|
+
Enumeration,
|
28
|
+
PrimitiveType,
|
29
|
+
PRIMITIVE_TYPE,
|
30
|
+
getMultiplicityDescription,
|
31
|
+
} from '@finos/legend-graph';
|
32
|
+
import { returnUndefOnError } from '@finos/legend-shared';
|
33
|
+
import type { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
|
34
|
+
import { getColumnMultiplicity } from '../../stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js';
|
35
|
+
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js';
|
36
|
+
|
37
|
+
export const renderPropertyTypeIcon = (type: Type): React.ReactNode => {
|
38
|
+
if (type instanceof PrimitiveType) {
|
39
|
+
if (type.name === PRIMITIVE_TYPE.STRING) {
|
40
|
+
return <StringTypeIcon className="query-builder-column-badge__icon" />;
|
41
|
+
} else if (type.name === PRIMITIVE_TYPE.BOOLEAN) {
|
42
|
+
return <ToggleIcon className="query-builder-column-badge__icon" />;
|
43
|
+
} else if (
|
44
|
+
type.name === PRIMITIVE_TYPE.NUMBER ||
|
45
|
+
type.name === PRIMITIVE_TYPE.INTEGER ||
|
46
|
+
type.name === PRIMITIVE_TYPE.FLOAT ||
|
47
|
+
type.name === PRIMITIVE_TYPE.DECIMAL
|
48
|
+
) {
|
49
|
+
return <HashtagIcon className="query-builder-column-badge__icon" />;
|
50
|
+
} else if (
|
51
|
+
type.name === PRIMITIVE_TYPE.DATE ||
|
52
|
+
type.name === PRIMITIVE_TYPE.DATETIME ||
|
53
|
+
type.name === PRIMITIVE_TYPE.STRICTDATE
|
54
|
+
) {
|
55
|
+
return <ClockIcon className="query-builder-column-badge__icon" />;
|
56
|
+
}
|
57
|
+
} else if (type instanceof Enumeration) {
|
58
|
+
return <div className="icon query-builder-column-badge__icon">E</div>;
|
59
|
+
}
|
60
|
+
return null;
|
61
|
+
};
|
62
|
+
|
63
|
+
export const QueryBuilderColumnInfoTooltip: React.FC<{
|
64
|
+
columnState: QueryBuilderTDSColumnState | QueryBuilderAggregateColumnState;
|
65
|
+
children: React.ReactElement;
|
66
|
+
placement?: TooltipPlacement | undefined;
|
67
|
+
}> = (props) => {
|
68
|
+
const { columnState, placement, children } = props;
|
69
|
+
const type = columnState.getColumnType();
|
70
|
+
const multiplicity = returnUndefOnError(() =>
|
71
|
+
getColumnMultiplicity(columnState),
|
72
|
+
);
|
73
|
+
return (
|
74
|
+
<Tooltip
|
75
|
+
arrow={true}
|
76
|
+
{...(placement !== undefined ? { placement } : {})}
|
77
|
+
classes={{
|
78
|
+
tooltip: 'query-builder__tooltip',
|
79
|
+
arrow: 'query-builder__tooltip__arrow',
|
80
|
+
tooltipPlacementRight: 'query-builder__tooltip--right',
|
81
|
+
}}
|
82
|
+
TransitionProps={{
|
83
|
+
// disable transition
|
84
|
+
// NOTE: somehow, this is the only workaround we have, if for example
|
85
|
+
// we set `appear = true`, the tooltip will jump out of position
|
86
|
+
timeout: 0,
|
87
|
+
}}
|
88
|
+
title={
|
89
|
+
<div className="query-builder__tooltip__content">
|
90
|
+
<div className="query-builder__tooltip__item">
|
91
|
+
<div className="query-builder__tooltip__item__label">Name</div>
|
92
|
+
<div className="query-builder__tooltip__item__value">
|
93
|
+
{columnState.columnName}
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div className="query-builder__tooltip__item">
|
97
|
+
<div className="query-builder__tooltip__item__label">Type</div>
|
98
|
+
<div className="query-builder__tooltip__item__value">
|
99
|
+
{type?.path}
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
{multiplicity && (
|
103
|
+
<div className="query-builder__tooltip__item">
|
104
|
+
<div className="query-builder__tooltip__item__label">
|
105
|
+
Multiplicity
|
106
|
+
</div>
|
107
|
+
<div className="query-builder__tooltip__item__value">
|
108
|
+
{getMultiplicityDescription(multiplicity)}
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
)}
|
112
|
+
</div>
|
113
|
+
}
|
114
|
+
>
|
115
|
+
{children}
|
116
|
+
</Tooltip>
|
117
|
+
);
|
118
|
+
};
|
@@ -53,7 +53,6 @@ import {
|
|
53
53
|
import { QueryBuilderPropertyExpressionBadge } from '../QueryBuilderPropertyExpressionEditor.js';
|
54
54
|
import { QueryResultModifierModal } from './QueryBuilderResultModifierPanel.js';
|
55
55
|
import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
|
56
|
-
import { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
|
57
56
|
import { flowResult } from 'mobx';
|
58
57
|
import { useApplicationStore } from '@finos/legend-application';
|
59
58
|
import {
|
@@ -71,8 +70,6 @@ import {
|
|
71
70
|
QUERY_BUILDER_FUNCTION_DND_TYPE,
|
72
71
|
} from '../../stores/explorer/QueryFunctionsExplorerState.js';
|
73
72
|
import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../stores/QueryBuilderConfig.js';
|
74
|
-
import { QueryBuilderPostFilterTreeConditionNodeData } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js';
|
75
|
-
import { filterByType } from '@finos/legend-shared';
|
76
73
|
import type { QueryBuilderAggregateOperator } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js';
|
77
74
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
78
75
|
import { LambdaEditor } from '../shared/LambdaEditor.js';
|
@@ -234,21 +231,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
234
231
|
|
235
232
|
const { projectionColumnState } = props;
|
236
233
|
const tdsState = projectionColumnState.tdsState;
|
237
|
-
const
|
238
|
-
tdsState.postFilterState.nodes.values(),
|
239
|
-
)
|
240
|
-
.filter(filterByType(QueryBuilderPostFilterTreeConditionNodeData))
|
241
|
-
.map((n) => n.condition.columnState);
|
242
|
-
|
243
|
-
const isRemovalDisabled =
|
244
|
-
postFilterColumnStates
|
245
|
-
.filter((co) => co instanceof QueryBuilderAggregateColumnState)
|
246
|
-
.map(
|
247
|
-
(co) =>
|
248
|
-
(co as QueryBuilderAggregateColumnState).projectionColumnState,
|
249
|
-
)
|
250
|
-
.includes(projectionColumnState) ||
|
251
|
-
postFilterColumnStates.includes(projectionColumnState);
|
234
|
+
const isRemovalDisabled = tdsState.isColumnInUse(projectionColumnState);
|
252
235
|
|
253
236
|
const removeColumn = (): void =>
|
254
237
|
tdsState.removeColumn(projectionColumnState);
|
@@ -258,9 +241,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
258
241
|
event,
|
259
242
|
) => projectionColumnState.setColumnName(event.target.value);
|
260
243
|
const isDuplicatedColumnName =
|
261
|
-
projectionColumnState.tdsState.
|
262
|
-
(column) => column.columnName === projectionColumnState.columnName,
|
263
|
-
).length > 1;
|
244
|
+
projectionColumnState.tdsState.isDuplicateColumn(projectionColumnState);
|
264
245
|
|
265
246
|
// aggregation
|
266
247
|
const aggregateColumnState = tdsState.aggregationState.columns.find(
|
@@ -415,7 +396,6 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
415
396
|
)}
|
416
397
|
</div>
|
417
398
|
)}
|
418
|
-
|
419
399
|
<DropdownMenu
|
420
400
|
className="query-builder__projection__column__aggregate__operator__dropdown"
|
421
401
|
title="Choose Aggregate Operator..."
|
@@ -472,7 +452,8 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
472
452
|
disabled={isRemovalDisabled}
|
473
453
|
title={
|
474
454
|
isRemovalDisabled
|
475
|
-
?
|
455
|
+
? // TODO: We may want to provide a list of all places where column is in use
|
456
|
+
"This column is used and can't be removed"
|
476
457
|
: 'Remove'
|
477
458
|
}
|
478
459
|
>
|
@@ -19,9 +19,8 @@ import { editor as monacoEditorAPI, type IDisposable } from 'monaco-editor';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
20
20
|
import {
|
21
21
|
clsx,
|
22
|
-
setErrorMarkers,
|
23
22
|
disposeEditor,
|
24
|
-
|
23
|
+
getBaseTextEditorOptions,
|
25
24
|
getEditorValue,
|
26
25
|
normalizeLineEnding,
|
27
26
|
FilledWindowMaximizeIcon,
|
@@ -29,6 +28,8 @@ import {
|
|
29
28
|
LongArrowAltUpIcon,
|
30
29
|
Dialog,
|
31
30
|
useResizeDetector,
|
31
|
+
clearMarkers,
|
32
|
+
setErrorMarkers,
|
32
33
|
} from '@finos/legend-art';
|
33
34
|
import type { LambdaEditorState } from '../../stores/shared/LambdaEditorState.js';
|
34
35
|
import {
|
@@ -178,7 +179,7 @@ const LambdaEditorInline = observer(
|
|
178
179
|
scrollbar: { vertical: 'hidden' },
|
179
180
|
};
|
180
181
|
const _editor = monacoEditorAPI.create(element, {
|
181
|
-
...
|
182
|
+
...getBaseTextEditorOptions(),
|
182
183
|
language: EDITOR_LANGUAGE.PURE,
|
183
184
|
theme: applicationStore.TEMPORARY__isLightThemeEnabled
|
184
185
|
? EDITOR_THEME.TEMPORARY__VSCODE_LIGHT
|
@@ -309,16 +310,17 @@ const LambdaEditorInline = observer(
|
|
309
310
|
editorModel.updateOptions({ tabSize: TAB_SIZE });
|
310
311
|
const error = parserError ?? compilationError;
|
311
312
|
if (error?.sourceInformation) {
|
312
|
-
setErrorMarkers(
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
313
|
+
setErrorMarkers(editorModel, [
|
314
|
+
{
|
315
|
+
message: error.message,
|
316
|
+
startLineNumber: error.sourceInformation.startLine,
|
317
|
+
startColumn: error.sourceInformation.startColumn,
|
318
|
+
endLineNumber: error.sourceInformation.endLine,
|
319
|
+
endColumn: error.sourceInformation.endColumn,
|
320
|
+
},
|
321
|
+
]);
|
320
322
|
} else {
|
321
|
-
|
323
|
+
clearMarkers();
|
322
324
|
}
|
323
325
|
}
|
324
326
|
}
|
@@ -461,7 +463,7 @@ const LambdaEditorPopUp = observer(
|
|
461
463
|
if (!editor && textInputRef.current) {
|
462
464
|
const element = textInputRef.current;
|
463
465
|
const _editor = monacoEditorAPI.create(element, {
|
464
|
-
...
|
466
|
+
...getBaseTextEditorOptions(),
|
465
467
|
language: EDITOR_LANGUAGE.PURE,
|
466
468
|
theme: EDITOR_THEME.LEGEND,
|
467
469
|
});
|
@@ -544,16 +546,17 @@ const LambdaEditorPopUp = observer(
|
|
544
546
|
editorModel.updateOptions({ tabSize: TAB_SIZE });
|
545
547
|
const error = parserError ?? compilationError;
|
546
548
|
if (error?.sourceInformation) {
|
547
|
-
setErrorMarkers(
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
549
|
+
setErrorMarkers(editorModel, [
|
550
|
+
{
|
551
|
+
message: error.message,
|
552
|
+
startLineNumber: error.sourceInformation.startLine,
|
553
|
+
startColumn: error.sourceInformation.startColumn,
|
554
|
+
endLineNumber: error.sourceInformation.endLine,
|
555
|
+
endColumn: error.sourceInformation.endColumn,
|
556
|
+
},
|
557
|
+
]);
|
555
558
|
} else {
|
556
|
-
|
559
|
+
clearMarkers();
|
557
560
|
}
|
558
561
|
}
|
559
562
|
}
|
@@ -114,7 +114,11 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
114
114
|
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
115
115
|
placeholder="Choose a service..."
|
116
116
|
options={serviceOptions}
|
117
|
-
disabled={
|
117
|
+
disabled={
|
118
|
+
serviceOptions.length < 1 ||
|
119
|
+
(serviceOptions.length === 1 &&
|
120
|
+
Boolean(selectedServiceOption))
|
121
|
+
}
|
118
122
|
onChange={onServiceOptionChange}
|
119
123
|
value={selectedServiceOption}
|
120
124
|
darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
|
@@ -134,7 +138,11 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
134
138
|
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
135
139
|
placeholder="Choose an execution context..."
|
136
140
|
options={executionContextOptions}
|
137
|
-
disabled={
|
141
|
+
disabled={
|
142
|
+
executionContextOptions.length < 1 ||
|
143
|
+
(executionContextOptions.length === 1 &&
|
144
|
+
Boolean(selectedExecutionContextOption))
|
145
|
+
}
|
138
146
|
onChange={onExecutionContextOptionChange}
|
139
147
|
value={selectedExecutionContextOption}
|
140
148
|
darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
|
@@ -61,6 +61,22 @@ export enum QUERY_BUILDER_HASH_STRUCTURE {
|
|
61
61
|
POST_FILTER_OPERATOR_NOT_START_WITH = 'POST_FILTER_OPERATOR_NOT_START_WITH',
|
62
62
|
POST_FILTER_STATE = 'POST_FILTER_STATE',
|
63
63
|
|
64
|
+
// OLAPGroup state
|
65
|
+
OLAP_GROUPBY_STATE = 'OLAP_GROUPBY_STATE',
|
66
|
+
OLAP_GROUPBY_OPERATION_STATE = 'OLAP_GROUPBY_OPERATION_STATE',
|
67
|
+
OLAP_GROUPBY_AGG_OPERATION_STATE = 'OLAP_GROUPBY_AGG_OPERATION_STATE',
|
68
|
+
OLAP_GROUPBY_COLUMN_STATE = 'OLAP_GROUPBY_COLUMN_STATE',
|
69
|
+
OLAP_GROUPBY_COLUMN_SORTBY_STATE = 'OLAP_GROUPBY_COLUMN_SORTBY_STATE',
|
70
|
+
OLAP_OPERATOR_RANK = 'OLAP_OPERATOR_RANK',
|
71
|
+
OLAP_OPERATOR_AVERAGE_RANK = 'OLAP_OPERATOR_AVERAGE_RANK',
|
72
|
+
OLAP_OPERATOR_DENSE_RANK = 'OLAP_OPERATOR_DENSE_RANK',
|
73
|
+
OLAP_OPERATOR_ROW_NUMBER = 'OLAP_OPERATOR_ROW_NUMBER',
|
74
|
+
OLAP_OPERATOR_SUM = 'OLAP_OPERATOR_SUM',
|
75
|
+
OLAP_OPERATOR_MAX = 'OLAP_OPERATOR_MAX',
|
76
|
+
OLAP_OPERATOR_MIN = 'OLAP_OPERATOR_MIN',
|
77
|
+
OLAP_OPERATOR_COUNT = 'OLAP_OPERATOR_COUNT',
|
78
|
+
OLAP_OPERATOR_AVERAGE = 'OLAP_OPERATOR_AVERAGE',
|
79
|
+
|
64
80
|
// filter state
|
65
81
|
FILTER_TREE_GROUP_NODE_DATA = 'FILTER_TREE_GROUP_NODE_DATA',
|
66
82
|
FILTER_TREE_CONDIITION_NODE_DATA = 'FILTER_TREE_CONDITION_NODE_DATA',
|
@@ -39,6 +39,7 @@ export enum QUERY_BUILDER_SUPPORTED_FUNCTIONS {
|
|
39
39
|
TDS_GROUP_BY = 'meta::pure::tds::groupBy',
|
40
40
|
TDS_SORT = 'meta::pure::tds::sort',
|
41
41
|
TDS_TAKE = 'meta::pure::tds::take',
|
42
|
+
TDS_FUNC = 'meta::pure::tds::func',
|
42
43
|
|
43
44
|
// filter
|
44
45
|
CONTAINS = 'meta::pure::functions::string::contains',
|
@@ -64,4 +65,10 @@ export enum QUERY_BUILDER_SUPPORTED_FUNCTIONS {
|
|
64
65
|
STD_DEV_SAMPLE = 'meta::pure::functions::math::stdDevSample',
|
65
66
|
SUM = 'meta::pure::functions::math::sum',
|
66
67
|
UNIQUE_VALUE_ONLY = 'meta::pure::functions::collection::uniqueValueOnly',
|
68
|
+
// OLAP
|
69
|
+
OLAP_GROUPBY = 'meta::pure::tds::olapGroupBy',
|
70
|
+
OLAP_RANK = 'meta::pure::functions::math::olap::rank',
|
71
|
+
OLAP_AVERAGE_RANK = 'meta::pure::functions::math::olap::averageRank',
|
72
|
+
OLAP_DENSE_RANK = 'meta::pure::functions::math::olap::denseRank',
|
73
|
+
OLAP_ROW_NUMBER = 'meta::pure::functions::math::olap::rowNumber',
|
67
74
|
}
|