@finos/legend-query-builder 0.2.1 → 0.2.3
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 +23 -51
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +4 -5
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderNavigationBlocker.d.ts +22 -0
- package/lib/components/QueryBuilderNavigationBlocker.d.ts.map +1 -0
- package/lib/components/QueryBuilderNavigationBlocker.js +48 -0
- package/lib/components/QueryBuilderNavigationBlocker.js.map +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +19 -19
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +1 -1
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +3 -3
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts +23 -0
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -0
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js +31 -0
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -0
- package/lib/components/QueryBuilder_TestID.d.ts +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.js +1 -1
- package/lib/components/QueryBuilder_TestID.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +4 -4
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +6 -6
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +23 -28
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +12 -12
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderProjectionPanel.d.ts → QueryBuilderTDSPanel.d.ts} +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderProjectionPanel.js → QueryBuilderTDSPanel.js} +37 -38
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +3 -3
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +1 -11
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +23 -63
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +14 -17
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -4
- package/lib/index.js.map +1 -1
- package/lib/package.json +6 -7
- package/lib/stores/QueryBuilderChangeDetectionState.js +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderCommand.d.ts +21 -0
- package/lib/stores/QueryBuilderCommand.d.ts.map +1 -0
- package/lib/stores/QueryBuilderCommand.js +26 -0
- package/lib/stores/QueryBuilderCommand.js.map +1 -0
- package/lib/stores/QueryBuilderPreviewDataHelper.js +25 -25
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +4 -4
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +13 -7
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +3 -3
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts +2 -2
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +14 -14
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +3 -4
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +4 -4
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
- package/lib/stores/fetch-structure/{projection/QueryBuilderProjectionState.d.ts → tds/QueryBuilderTDSState.d.ts} +4 -4
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection/QueryBuilderProjectionState.js → tds/QueryBuilderTDSState.js} +27 -27
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/QueryResultSetModifierState.d.ts +4 -4
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/QueryResultSetModifierState.js +4 -4
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperator.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperator.js +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperatorLoader.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperatorLoader.js +0 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationState.d.ts +4 -4
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationState.js +5 -5
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationStateBuilder.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Average.js +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Count.js +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Max.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Min.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperator.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperator.js +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperatorLoader.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperatorLoader.js +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterState.d.ts +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterState.js +10 -12
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterStateBuilder.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterStateBuilder.js +13 -14
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +7 -7
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_In.js +5 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts +0 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionColumnState.d.ts +9 -9
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionColumnState.js +20 -20
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionStateBuilder.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionStateBuilder.js +19 -19
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionValueSpecificationBuilder.js +28 -28
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +3 -4
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +3 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +5 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +13 -14
- package/src/components/QueryBuilder.tsx +96 -168
- package/src/components/QueryBuilderDiffPanel.tsx +3 -4
- package/src/components/QueryBuilderNavigationBlocker.tsx +62 -0
- package/src/components/QueryBuilderResultPanel.tsx +39 -48
- package/src/components/QueryBuilderSideBar.tsx +1 -0
- package/src/components/QueryBuilderTextEditor.tsx +3 -4
- package/src/components/QueryBuilder_LegendApplicationPlugin.ts +44 -0
- package/src/components/QueryBuilder_TestID.ts +1 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +4 -6
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +8 -10
- package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +4 -8
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +35 -46
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +17 -20
- package/src/components/fetch-structure/{QueryBuilderProjectionPanel.tsx → QueryBuilderTDSPanel.tsx} +47 -57
- package/src/components/filter/QueryBuilderFilterPanel.tsx +4 -7
- package/src/components/shared/LambdaEditor.tsx +22 -85
- package/src/components/workflows/ServiceQueryBuilder.tsx +34 -65
- package/src/index.ts +9 -4
- package/src/stores/QueryBuilderChangeDetectionState.ts +1 -1
- package/src/stores/QueryBuilderCommand.ts +28 -0
- package/src/stores/QueryBuilderPreviewDataHelper.ts +28 -28
- package/src/stores/QueryBuilderState.ts +31 -10
- package/src/stores/QueryBuilderStateBuilder.ts +3 -3
- package/src/stores/QueryBuilderTypeaheadHelper.ts +18 -18
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +3 -3
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +1 -1
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +4 -4
- package/src/stores/fetch-structure/{projection/QueryBuilderProjectionState.ts → tds/QueryBuilderTDSState.ts} +32 -27
- package/src/stores/fetch-structure/{projection → tds}/QueryResultSetModifierState.ts +6 -6
- package/src/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperator.ts +2 -2
- package/src/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregateOperatorLoader.ts +0 -0
- package/src/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationState.ts +10 -10
- package/src/stores/fetch-structure/{projection → tds}/aggregation/QueryBuilderAggregationStateBuilder.ts +10 -12
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.ts +2 -2
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +2 -2
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +2 -2
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +3 -3
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +3 -3
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +3 -3
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +3 -3
- package/src/stores/fetch-structure/{projection → tds}/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperator.ts +0 -0
- package/src/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterOperatorLoader.ts +0 -0
- package/src/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterState.ts +15 -17
- package/src/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterStateBuilder.ts +13 -15
- package/src/stores/fetch-structure/{projection → tds}/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +3 -3
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +2 -2
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +4 -4
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +4 -4
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +7 -7
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +4 -4
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +0 -0
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +5 -5
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +4 -4
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +0 -0
- package/src/stores/fetch-structure/{projection → tds}/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +4 -4
- package/src/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionColumnState.ts +23 -27
- package/src/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionStateBuilder.ts +23 -24
- package/src/stores/fetch-structure/{projection → tds/projection}/QueryBuilderProjectionValueSpecificationBuilder.ts +40 -45
- package/src/stores/filter/QueryBuilderFilterState.ts +1 -1
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +3 -4
- package/src/stores/workflows/ServiceQueryBuilderState.ts +6 -0
- package/tsconfig.json +41 -39
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +0 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +0 -43
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +0 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.js +0 -48
- package/lib/components/shared/QueryBuilderLambdaEditor.js.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperatorLoader.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperatorLoader.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +0 -1
- package/src/components/shared/QueryBuilderLambdaEditor.tsx +0 -120
@@ -28,21 +28,18 @@ import {
|
|
28
28
|
import {
|
29
29
|
COLUMN_SORT_TYPE,
|
30
30
|
SortColumnState,
|
31
|
-
} from '../../stores/fetch-structure/
|
32
|
-
import type { QueryBuilderProjectionColumnState } from '../../stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js';
|
31
|
+
} from '../../stores/fetch-structure/tds/QueryResultSetModifierState.js';
|
32
|
+
import type { QueryBuilderProjectionColumnState } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
33
33
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
34
34
|
import { useApplicationStore } from '@finos/legend-application';
|
35
|
-
import type {
|
35
|
+
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
36
36
|
|
37
37
|
const ColumnSortEditor = observer(
|
38
|
-
(props: {
|
39
|
-
|
40
|
-
sortState: SortColumnState;
|
41
|
-
}) => {
|
42
|
-
const { projectionState, sortState } = props;
|
38
|
+
(props: { tdsState: QueryBuilderTDSState; sortState: SortColumnState }) => {
|
39
|
+
const { tdsState, sortState } = props;
|
43
40
|
const applicationStore = useApplicationStore();
|
44
|
-
const sortColumns =
|
45
|
-
const projectionOptions =
|
41
|
+
const sortColumns = tdsState.resultSetModifierState.sortColumns;
|
42
|
+
const projectionOptions = tdsState.projectionColumns
|
46
43
|
.filter(
|
47
44
|
(projectionCol) =>
|
48
45
|
projectionCol === sortState.columnState ||
|
@@ -72,7 +69,7 @@ const ColumnSortEditor = observer(
|
|
72
69
|
);
|
73
70
|
};
|
74
71
|
const deleteColumnSort = (): void =>
|
75
|
-
|
72
|
+
tdsState.resultSetModifierState.deleteSortColumn(sortState);
|
76
73
|
|
77
74
|
return (
|
78
75
|
<div className="panel__content__form__section__list__item query-builder__projection__options__sort">
|
@@ -109,11 +106,11 @@ const ColumnSortEditor = observer(
|
|
109
106
|
);
|
110
107
|
|
111
108
|
const ColumnsSortEditor = observer(
|
112
|
-
(props: {
|
113
|
-
const {
|
114
|
-
const resultSetModifierState =
|
109
|
+
(props: { tdsState: QueryBuilderTDSState }) => {
|
110
|
+
const { tdsState } = props;
|
111
|
+
const resultSetModifierState = tdsState.resultSetModifierState;
|
115
112
|
const sortColumns = resultSetModifierState.sortColumns;
|
116
|
-
const projectionOptions =
|
113
|
+
const projectionOptions = tdsState.projectionColumns
|
117
114
|
.filter(
|
118
115
|
(projectionCol) =>
|
119
116
|
!sortColumns.some((sortCol) => sortCol.columnState === projectionCol),
|
@@ -146,7 +143,7 @@ const ColumnsSortEditor = observer(
|
|
146
143
|
{sortColumns.map((value) => (
|
147
144
|
<ColumnSortEditor
|
148
145
|
key={value.columnState.uuid}
|
149
|
-
|
146
|
+
tdsState={tdsState}
|
150
147
|
sortState={value}
|
151
148
|
/>
|
152
149
|
))}
|
@@ -168,9 +165,9 @@ const ColumnsSortEditor = observer(
|
|
168
165
|
);
|
169
166
|
|
170
167
|
export const QueryResultModifierModal = observer(
|
171
|
-
(props: {
|
172
|
-
const {
|
173
|
-
const resultSetModifierState =
|
168
|
+
(props: { tdsState: QueryBuilderTDSState }) => {
|
169
|
+
const { tdsState: tdsState } = props;
|
170
|
+
const resultSetModifierState = tdsState.resultSetModifierState;
|
174
171
|
const limitResults = resultSetModifierState.limit;
|
175
172
|
const distinct = resultSetModifierState.distinct;
|
176
173
|
const close = (): void => resultSetModifierState.setShowModal(false);
|
@@ -198,7 +195,7 @@ export const QueryResultModifierModal = observer(
|
|
198
195
|
</div>
|
199
196
|
<div className="modal__body query-builder__projection__modal__body">
|
200
197
|
<div className="query-builder__projection__options">
|
201
|
-
<ColumnsSortEditor
|
198
|
+
<ColumnsSortEditor tdsState={tdsState} />
|
202
199
|
<div className="panel__content__form__section">
|
203
200
|
<div className="panel__content__form__section__header__label">
|
204
201
|
Eliminate Duplicate Rows
|
package/src/components/fetch-structure/{QueryBuilderProjectionPanel.tsx → QueryBuilderTDSPanel.tsx}
RENAMED
@@ -49,13 +49,12 @@ import {
|
|
49
49
|
QueryBuilderDerivationProjectionColumnState,
|
50
50
|
QueryBuilderSimpleProjectionColumnState,
|
51
51
|
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
52
|
-
} from '../../stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js';
|
52
|
+
} from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
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/
|
56
|
+
import { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
|
57
57
|
import { flowResult } from 'mobx';
|
58
|
-
import { QueryBuilderLambdaEditor } from '../shared/QueryBuilderLambdaEditor.js';
|
59
58
|
import { useApplicationStore } from '@finos/legend-application';
|
60
59
|
import {
|
61
60
|
type QueryBuilderParameterDragSource,
|
@@ -72,10 +71,11 @@ import {
|
|
72
71
|
QUERY_BUILDER_FUNCTION_DND_TYPE,
|
73
72
|
} from '../../stores/explorer/QueryFunctionsExplorerState.js';
|
74
73
|
import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../stores/QueryBuilderConfig.js';
|
75
|
-
import { QueryBuilderPostFilterTreeConditionNodeData } from '../../stores/fetch-structure/
|
74
|
+
import { QueryBuilderPostFilterTreeConditionNodeData } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js';
|
76
75
|
import { filterByType } from '@finos/legend-shared';
|
77
|
-
import type { QueryBuilderAggregateOperator } from '../../stores/fetch-structure/
|
78
|
-
import type {
|
76
|
+
import type { QueryBuilderAggregateOperator } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js';
|
77
|
+
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
78
|
+
import { LambdaEditor } from '../shared/LambdaEditor.js';
|
79
79
|
|
80
80
|
const QueryBuilderProjectionColumnContextMenu = observer(
|
81
81
|
forwardRef<
|
@@ -86,12 +86,12 @@ const QueryBuilderProjectionColumnContextMenu = observer(
|
|
86
86
|
>(function QueryBuilderProjectionColumnContextMenu(props, ref) {
|
87
87
|
const { projectionColumnState } = props;
|
88
88
|
const removeColumn = (): void =>
|
89
|
-
projectionColumnState.
|
89
|
+
projectionColumnState.tdsState.removeColumn(projectionColumnState);
|
90
90
|
const convertToDerivation = (): void => {
|
91
91
|
if (
|
92
92
|
projectionColumnState instanceof QueryBuilderSimpleProjectionColumnState
|
93
93
|
) {
|
94
|
-
projectionColumnState.
|
94
|
+
projectionColumnState.tdsState.transformSimpleProjectionToDerivation(
|
95
95
|
projectionColumnState,
|
96
96
|
);
|
97
97
|
}
|
@@ -121,7 +121,7 @@ const QueryBuilderSimpleProjectionColumnEditor = observer(
|
|
121
121
|
): void =>
|
122
122
|
projectionColumnState.changeProperty(
|
123
123
|
node,
|
124
|
-
projectionColumnState.
|
124
|
+
projectionColumnState.tdsState.queryBuilderState.explorerState
|
125
125
|
.humanizePropertyName,
|
126
126
|
);
|
127
127
|
|
@@ -143,7 +143,7 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
143
143
|
projectionColumnState: QueryBuilderDerivationProjectionColumnState;
|
144
144
|
}) => {
|
145
145
|
const { projectionColumnState } = props;
|
146
|
-
const hasParserError = projectionColumnState.
|
146
|
+
const hasParserError = projectionColumnState.tdsState.hasParserError;
|
147
147
|
|
148
148
|
const handleDrop = useCallback(
|
149
149
|
(
|
@@ -210,14 +210,10 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
210
210
|
{ backdrop__element: hasParserError },
|
211
211
|
)}
|
212
212
|
>
|
213
|
-
<
|
213
|
+
<LambdaEditor
|
214
214
|
className="query-builder__lambda-editor"
|
215
|
-
queryBuilderState={
|
216
|
-
projectionColumnState.projectionState.queryBuilderState
|
217
|
-
}
|
218
215
|
disabled={
|
219
|
-
projectionColumnState.
|
220
|
-
.isConvertDerivationProjectionObjects
|
216
|
+
projectionColumnState.tdsState.isConvertDerivationProjectionObjects
|
221
217
|
}
|
222
218
|
lambdaEditorState={projectionColumnState.derivationLambdaEditorState}
|
223
219
|
forceBackdrop={hasParserError}
|
@@ -237,9 +233,9 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
237
233
|
const onContextMenuClose = (): void => setIsSelectedFromContextMenu(false);
|
238
234
|
|
239
235
|
const { projectionColumnState } = props;
|
240
|
-
const
|
236
|
+
const tdsState = projectionColumnState.tdsState;
|
241
237
|
const postFilterColumnStates = Array.from(
|
242
|
-
|
238
|
+
tdsState.postFilterState.nodes.values(),
|
243
239
|
)
|
244
240
|
.filter(filterByType(QueryBuilderPostFilterTreeConditionNodeData))
|
245
241
|
.map((n) => n.condition.columnState);
|
@@ -255,27 +251,27 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
255
251
|
postFilterColumnStates.includes(projectionColumnState);
|
256
252
|
|
257
253
|
const removeColumn = (): void =>
|
258
|
-
|
254
|
+
tdsState.removeColumn(projectionColumnState);
|
259
255
|
|
260
256
|
// name
|
261
257
|
const changeColumnName: React.ChangeEventHandler<HTMLInputElement> = (
|
262
258
|
event,
|
263
259
|
) => projectionColumnState.setColumnName(event.target.value);
|
264
260
|
const isDuplicatedColumnName =
|
265
|
-
projectionColumnState.
|
261
|
+
projectionColumnState.tdsState.projectionColumns.filter(
|
266
262
|
(column) => column.columnName === projectionColumnState.columnName,
|
267
263
|
).length > 1;
|
268
264
|
|
269
265
|
// aggregation
|
270
|
-
const aggregateColumnState =
|
266
|
+
const aggregateColumnState = tdsState.aggregationState.columns.find(
|
271
267
|
(column) => column.projectionColumnState === projectionColumnState,
|
272
268
|
);
|
273
|
-
const aggreateOperators =
|
274
|
-
|
269
|
+
const aggreateOperators = tdsState.aggregationState.operators.filter((op) =>
|
270
|
+
op.isCompatibleWithColumn(projectionColumnState),
|
275
271
|
);
|
276
272
|
const changeOperator =
|
277
273
|
(val: QueryBuilderAggregateOperator | undefined) => (): void =>
|
278
|
-
|
274
|
+
tdsState.aggregationState.changeColumnAggregateOperator(
|
279
275
|
val,
|
280
276
|
projectionColumnState,
|
281
277
|
);
|
@@ -286,10 +282,10 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
286
282
|
item: QueryBuilderProjectionColumnDragSource,
|
287
283
|
monitor: DropTargetMonitor,
|
288
284
|
): void => {
|
289
|
-
const dragIndex =
|
285
|
+
const dragIndex = tdsState.projectionColumns.findIndex(
|
290
286
|
(e) => e === item.columnState,
|
291
287
|
);
|
292
|
-
const hoverIndex =
|
288
|
+
const hoverIndex = tdsState.projectionColumns.findIndex(
|
293
289
|
(e) => e === projectionColumnState,
|
294
290
|
);
|
295
291
|
if (dragIndex === -1 || hoverIndex === -1 || dragIndex === hoverIndex) {
|
@@ -308,9 +304,9 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
308
304
|
if (dragIndex > hoverIndex && dragDistance > distanceThreshold) {
|
309
305
|
return;
|
310
306
|
}
|
311
|
-
|
307
|
+
tdsState.moveColumn(dragIndex, hoverIndex);
|
312
308
|
},
|
313
|
-
[projectionColumnState,
|
309
|
+
[projectionColumnState, tdsState],
|
314
310
|
);
|
315
311
|
const [, dropConnector] = useDrop<QueryBuilderProjectionColumnDragSource>(
|
316
312
|
() => ({
|
@@ -422,6 +418,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
422
418
|
|
423
419
|
<DropdownMenu
|
424
420
|
className="query-builder__projection__column__aggregate__operator__dropdown"
|
421
|
+
title="Choose Aggregate Operator..."
|
425
422
|
disabled={!aggreateOperators.length}
|
426
423
|
content={
|
427
424
|
<MenuContent>
|
@@ -450,7 +447,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
450
447
|
elevation: 7,
|
451
448
|
}}
|
452
449
|
>
|
453
|
-
<
|
450
|
+
<div
|
454
451
|
className={clsx(
|
455
452
|
'query-builder__projection__column__aggregate__operator__badge',
|
456
453
|
{
|
@@ -458,18 +455,12 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
458
455
|
Boolean(aggregateColumnState),
|
459
456
|
},
|
460
457
|
)}
|
461
|
-
tabIndex={-1}
|
462
|
-
title="Choose Aggregate Operator..."
|
463
458
|
>
|
464
459
|
<SigmaIcon />
|
465
|
-
</
|
466
|
-
<
|
467
|
-
className="query-builder__projection__column__aggregate__operator__dropdown__trigger"
|
468
|
-
tabIndex={-1}
|
469
|
-
title="Choose Aggregate Operator..."
|
470
|
-
>
|
460
|
+
</div>
|
461
|
+
<div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
|
471
462
|
<CaretDownIcon />
|
472
|
-
</
|
463
|
+
</div>
|
473
464
|
</DropdownMenu>
|
474
465
|
</div>
|
475
466
|
</div>
|
@@ -495,17 +486,16 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
495
486
|
},
|
496
487
|
);
|
497
488
|
|
498
|
-
export const
|
499
|
-
(props: {
|
489
|
+
export const QueryBuilderTDSPanel = observer(
|
490
|
+
(props: { tdsState: QueryBuilderTDSState }) => {
|
500
491
|
const applicationStore = useApplicationStore();
|
501
|
-
const {
|
502
|
-
const projectionColumns =
|
492
|
+
const { tdsState } = props;
|
493
|
+
const projectionColumns = tdsState.projectionColumns;
|
503
494
|
|
504
495
|
// Toolbar
|
505
496
|
const openResultSetModifierEditor = (): void =>
|
506
|
-
|
507
|
-
const addNewBlankDerivation = (): void =>
|
508
|
-
projectionState.addNewBlankDerivation();
|
497
|
+
tdsState.resultSetModifierState.setShowModal(true);
|
498
|
+
const addNewBlankDerivation = (): void => tdsState.addNewBlankDerivation();
|
509
499
|
|
510
500
|
// Drag and Drop
|
511
501
|
const handleDrop = useCallback(
|
@@ -519,8 +509,8 @@ export const QueryBuilderProjectionPanel = observer(
|
|
519
509
|
case QUERY_BUILDER_FUNCTION_DND_TYPE: {
|
520
510
|
const derivationProjectionColumn =
|
521
511
|
new QueryBuilderDerivationProjectionColumnState(
|
522
|
-
|
523
|
-
|
512
|
+
tdsState,
|
513
|
+
tdsState.queryBuilderState.graphManagerState.graphManager.createDefaultBasicRawLambda(
|
524
514
|
{ addDummyParameter: true },
|
525
515
|
),
|
526
516
|
);
|
@@ -530,19 +520,19 @@ export const QueryBuilderProjectionPanel = observer(
|
|
530
520
|
.packageableElement as ConcreteFunctionDefinition,
|
531
521
|
)}`,
|
532
522
|
);
|
533
|
-
|
523
|
+
tdsState.addColumn(derivationProjectionColumn);
|
534
524
|
break;
|
535
525
|
}
|
536
526
|
case QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY:
|
537
527
|
case QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY:
|
538
|
-
|
528
|
+
tdsState.addColumn(
|
539
529
|
new QueryBuilderSimpleProjectionColumnState(
|
540
|
-
|
530
|
+
tdsState,
|
541
531
|
buildPropertyExpressionFromExplorerTreeNodeData(
|
542
532
|
(item as QueryBuilderExplorerTreeDragSource).node,
|
543
|
-
|
533
|
+
tdsState.queryBuilderState.explorerState,
|
544
534
|
),
|
545
|
-
|
535
|
+
tdsState.queryBuilderState.explorerState.humanizePropertyName,
|
546
536
|
),
|
547
537
|
);
|
548
538
|
break;
|
@@ -550,7 +540,7 @@ export const QueryBuilderProjectionPanel = observer(
|
|
550
540
|
break;
|
551
541
|
}
|
552
542
|
},
|
553
|
-
[
|
543
|
+
[tdsState],
|
554
544
|
);
|
555
545
|
|
556
546
|
const [{ isDragOver }, dropTargetConnector] = useDrop<
|
@@ -578,10 +568,10 @@ export const QueryBuilderProjectionPanel = observer(
|
|
578
568
|
);
|
579
569
|
|
580
570
|
useEffect(() => {
|
581
|
-
flowResult(
|
571
|
+
flowResult(tdsState.convertDerivationProjectionObjects()).catch(
|
582
572
|
applicationStore.alertUnhandledError,
|
583
573
|
);
|
584
|
-
}, [applicationStore,
|
574
|
+
}, [applicationStore, tdsState]);
|
585
575
|
|
586
576
|
return (
|
587
577
|
<PanelContent>
|
@@ -616,7 +606,7 @@ export const QueryBuilderProjectionPanel = observer(
|
|
616
606
|
)}
|
617
607
|
{Boolean(projectionColumns.length) && (
|
618
608
|
<div
|
619
|
-
data-testid={QUERY_BUILDER_TEST_ID.
|
609
|
+
data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS}
|
620
610
|
className="query-builder__projection__columns"
|
621
611
|
>
|
622
612
|
<DragPreviewLayer
|
@@ -637,7 +627,7 @@ export const QueryBuilderProjectionPanel = observer(
|
|
637
627
|
))}
|
638
628
|
</div>
|
639
629
|
)}
|
640
|
-
<QueryResultModifierModal
|
630
|
+
<QueryResultModifierModal tdsState={tdsState} />
|
641
631
|
</PanelDropZone>
|
642
632
|
</div>
|
643
633
|
</PanelContent>
|
@@ -79,7 +79,7 @@ import {
|
|
79
79
|
type QueryBuilderProjectionColumnDragSource,
|
80
80
|
QueryBuilderSimpleProjectionColumnState,
|
81
81
|
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
82
|
-
} from '../../stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js';
|
82
|
+
} from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
83
83
|
import type { QueryBuilderFilterOperator } from '../../stores/filter/QueryBuilderFilterOperator.js';
|
84
84
|
import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
85
85
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
|
@@ -229,6 +229,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
229
229
|
</div>
|
230
230
|
<DropdownMenu
|
231
231
|
className="query-builder-filter-tree__condition-node__operator"
|
232
|
+
title="Choose Operator..."
|
232
233
|
content={
|
233
234
|
<MenuContent>
|
234
235
|
{node.condition.operators.map((op) => (
|
@@ -251,13 +252,9 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
251
252
|
<div className="query-builder-filter-tree__condition-node__operator__label">
|
252
253
|
{node.condition.operator.getLabel(node.condition)}
|
253
254
|
</div>
|
254
|
-
<
|
255
|
-
className="query-builder-filter-tree__condition-node__operator__dropdown__trigger"
|
256
|
-
tabIndex={-1}
|
257
|
-
title="Choose Operator..."
|
258
|
-
>
|
255
|
+
<div className="query-builder-filter-tree__condition-node__operator__dropdown__trigger">
|
259
256
|
<CaretDownIcon />
|
260
|
-
</
|
257
|
+
</div>
|
261
258
|
</DropdownMenu>
|
262
259
|
{node.condition.value && (
|
263
260
|
<div
|
@@ -15,17 +15,12 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import { useRef, useEffect, useState, useMemo } from 'react';
|
18
|
-
import {
|
19
|
-
editor as monacoEditorAPI,
|
20
|
-
type IDisposable,
|
21
|
-
type IKeyboardEvent,
|
22
|
-
} from 'monaco-editor';
|
18
|
+
import { editor as monacoEditorAPI, type IDisposable } from 'monaco-editor';
|
23
19
|
import { observer } from 'mobx-react-lite';
|
24
20
|
import {
|
25
21
|
clsx,
|
26
22
|
setErrorMarkers,
|
27
23
|
disposeEditor,
|
28
|
-
disableEditorHotKeys,
|
29
24
|
baseTextEditorSettings,
|
30
25
|
getEditorValue,
|
31
26
|
normalizeLineEnding,
|
@@ -45,6 +40,7 @@ import {
|
|
45
40
|
import { flowResult } from 'mobx';
|
46
41
|
import { ParserError, type EngineError, type Type } from '@finos/legend-graph';
|
47
42
|
import {
|
43
|
+
createPassThroughOnKeyHandler,
|
48
44
|
EDITOR_LANGUAGE,
|
49
45
|
EDITOR_THEME,
|
50
46
|
TAB_SIZE,
|
@@ -52,11 +48,6 @@ import {
|
|
52
48
|
} from '@finos/legend-application';
|
53
49
|
import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
|
54
50
|
|
55
|
-
export type LambdaEditorOnKeyDownEventHandler = {
|
56
|
-
matcher: (event: IKeyboardEvent) => boolean;
|
57
|
-
action: (event: IKeyboardEvent) => void;
|
58
|
-
};
|
59
|
-
|
60
51
|
const LambdaErrorFeedback: React.FC<{
|
61
52
|
error?: EngineError | undefined;
|
62
53
|
discardChanges: () => void;
|
@@ -102,9 +93,8 @@ const LambdaEditorInline = observer(
|
|
102
93
|
forceExpansion?: boolean | undefined;
|
103
94
|
disablePopUp?: boolean | undefined;
|
104
95
|
backdropSetter?: ((val: boolean) => void) | undefined;
|
105
|
-
onKeyDownEventHandlers: LambdaEditorOnKeyDownEventHandler[];
|
106
96
|
openInPopUp: () => void;
|
107
|
-
|
97
|
+
onEditorFocus?: (() => void) | undefined;
|
108
98
|
}) => {
|
109
99
|
const {
|
110
100
|
className,
|
@@ -121,15 +111,13 @@ const LambdaEditorInline = observer(
|
|
121
111
|
disablePopUp,
|
122
112
|
useBaseTextEditorSettings,
|
123
113
|
hideErrorBar,
|
124
|
-
onKeyDownEventHandlers,
|
125
114
|
openInPopUp,
|
126
|
-
|
115
|
+
onEditorFocus,
|
127
116
|
} = props;
|
128
117
|
const applicationStore = useApplicationStore();
|
129
118
|
const onDidChangeModelContentEventDisposer = useRef<
|
130
119
|
IDisposable | undefined
|
131
120
|
>(undefined);
|
132
|
-
const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
133
121
|
const onDidFocusEditorWidgetDisposer = useRef<IDisposable | undefined>(
|
134
122
|
undefined,
|
135
123
|
);
|
@@ -197,7 +185,13 @@ const LambdaEditorInline = observer(
|
|
197
185
|
: EDITOR_THEME.LEGEND,
|
198
186
|
...lambdaEditorOptions,
|
199
187
|
});
|
200
|
-
|
188
|
+
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
189
|
+
// else, we could risk triggering these hotkeys command multiple times
|
190
|
+
// e.g.
|
191
|
+
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
192
|
+
// onKeyDownEventDisposer.current?.dispose();
|
193
|
+
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
194
|
+
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
201
195
|
setEditor(_editor);
|
202
196
|
}
|
203
197
|
}, [editor, applicationStore, useBaseTextEditorSettings]);
|
@@ -290,36 +284,10 @@ const LambdaEditorInline = observer(
|
|
290
284
|
}
|
291
285
|
});
|
292
286
|
|
293
|
-
// set hotkeys (before calling the action, finish parsing the current text value)
|
294
|
-
onKeyDownEventDisposer.current?.dispose(); // dispose to avoid trigger hotkeys multiple times
|
295
|
-
/**
|
296
|
-
* NOTE: We can use `setCommand` here but that does not expose the event so we cannot `stopPropagation`, and we need to
|
297
|
-
* use `stopPropagation` to prevent the event top bubble up to global hotkeys listener.
|
298
|
-
* If we really want to use `setCommand` the other approach is to set <HotKeys/> around this lambda editor to override F9
|
299
|
-
* perhaps that's the cleaner approach because we use `react-hotkeys` to handle it's business, but there is an on-going
|
300
|
-
* issue with <HotKeys/> keybindings are lost when component rerenders and this happen as users type because we call `setValue`
|
301
|
-
* See https://github.com/greena13/react-hotkeys/issues/209
|
302
|
-
*
|
303
|
-
* The main role of this section is to disable `monaco-editor` command and override with global actions, such as generate, compile,
|
304
|
-
* toggle text mode, etc. The important thing is before we do so, we would like to finish the parsing of the current string, otherwise,
|
305
|
-
* those operations can end up flushing the current state and trashing the user input, which is bad, as such, we make sure the
|
306
|
-
* parsing passes before actually calling those global operations.
|
307
|
-
*/
|
308
|
-
onKeyDownEventDisposer.current = editor.onKeyDown((event) => {
|
309
|
-
onKeyDownEventHandlers.forEach((handler) => {
|
310
|
-
if (handler.matcher(event)) {
|
311
|
-
event.preventDefault();
|
312
|
-
event.stopPropagation();
|
313
|
-
transformStringToLambda?.cancel();
|
314
|
-
handler.action(event);
|
315
|
-
}
|
316
|
-
});
|
317
|
-
});
|
318
|
-
|
319
287
|
onDidFocusEditorWidgetDisposer.current?.dispose();
|
320
288
|
onDidFocusEditorWidgetDisposer.current = editor.onDidFocusEditorWidget(
|
321
289
|
() => {
|
322
|
-
|
290
|
+
onEditorFocus?.();
|
323
291
|
},
|
324
292
|
);
|
325
293
|
|
@@ -451,7 +419,6 @@ const LambdaEditorPopUp = observer(
|
|
451
419
|
disabled: boolean;
|
452
420
|
lambdaEditorState: LambdaEditorState;
|
453
421
|
transformStringToLambda: DebouncedFunc<() => GeneratorFn<void>> | undefined;
|
454
|
-
onKeyDownEventHandlers: LambdaEditorOnKeyDownEventHandler[];
|
455
422
|
onClose: () => void;
|
456
423
|
}) => {
|
457
424
|
const {
|
@@ -459,11 +426,9 @@ const LambdaEditorPopUp = observer(
|
|
459
426
|
disabled,
|
460
427
|
lambdaEditorState,
|
461
428
|
transformStringToLambda,
|
462
|
-
onKeyDownEventHandlers,
|
463
429
|
onClose,
|
464
430
|
} = props;
|
465
431
|
const applicationStore = useApplicationStore();
|
466
|
-
const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
467
432
|
const onDidChangeModelContentEventDisposer = useRef<
|
468
433
|
IDisposable | undefined
|
469
434
|
>(undefined);
|
@@ -500,7 +465,13 @@ const LambdaEditorPopUp = observer(
|
|
500
465
|
language: EDITOR_LANGUAGE.PURE,
|
501
466
|
theme: EDITOR_THEME.LEGEND,
|
502
467
|
});
|
503
|
-
|
468
|
+
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
469
|
+
// else, we could risk triggering these hotkeys command multiple times
|
470
|
+
// e.g.
|
471
|
+
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
472
|
+
// onKeyDownEventDisposer.current?.dispose();
|
473
|
+
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
474
|
+
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
504
475
|
setEditor(_editor);
|
505
476
|
}
|
506
477
|
};
|
@@ -555,32 +526,6 @@ const LambdaEditorPopUp = observer(
|
|
555
526
|
}
|
556
527
|
});
|
557
528
|
|
558
|
-
// set hotkeys (before calling the action, finish parsing the current text value)
|
559
|
-
onKeyDownEventDisposer.current?.dispose(); // dispose to avoid trigger hotkeys multiple times
|
560
|
-
/**
|
561
|
-
* NOTE: We can use `setCommand` here but that does not expose the event so we cannot `stopPropagation`, and we need to
|
562
|
-
* use `stopPropagation` to prevent the event top bubble up to global hotkeys listener.
|
563
|
-
* If we really want to use `setCommand` the other approach is to set <HotKeys/> around this lambda editor to override F9
|
564
|
-
* perhaps that's the cleaner approach because we use `react-hotkeys` to handle it's business, but there is an on-going
|
565
|
-
* issue with <HotKeys/> keybindings are lost when component rerenders and this happen as users type because we call `setValue`
|
566
|
-
* See https://github.com/greena13/react-hotkeys/issues/209
|
567
|
-
*
|
568
|
-
* The main role of this section is to disable `monaco-editor` command and override with global actions, such as generate, compile,
|
569
|
-
* toggle text mode, etc. The important thing is before we do so, we would like to finish the parsing of the current string, otherwise,
|
570
|
-
* those operations can end up flushing the current state and trashing the user input, which is bad, as such, we make sure the
|
571
|
-
* parsing passes before actually calling those global operations.
|
572
|
-
*/
|
573
|
-
onKeyDownEventDisposer.current = editor.onKeyDown((event) => {
|
574
|
-
onKeyDownEventHandlers.forEach((handler) => {
|
575
|
-
if (handler.matcher(event)) {
|
576
|
-
event.preventDefault();
|
577
|
-
event.stopPropagation();
|
578
|
-
transformStringToLambda?.cancel();
|
579
|
-
handler.action(event);
|
580
|
-
}
|
581
|
-
});
|
582
|
-
});
|
583
|
-
|
584
529
|
// Set the text value
|
585
530
|
const currentValue = getEditorValue(editor);
|
586
531
|
const editorModel = editor.getModel();
|
@@ -751,12 +696,7 @@ export const LambdaEditor = observer(
|
|
751
696
|
* To whether or not hide parser error bar in inline mode
|
752
697
|
*/
|
753
698
|
hideErrorBar?: boolean | undefined;
|
754
|
-
|
755
|
-
* Allow adding hotkeys handler to the editor, this is usually used
|
756
|
-
* to allow activating global hotkeys while typing in the editor
|
757
|
-
*/
|
758
|
-
onKeyDownEventHandlers?: LambdaEditorOnKeyDownEventHandler[];
|
759
|
-
onEditorFocusEventHandler?: (() => void) | undefined;
|
699
|
+
onEditorFocus?: (() => void) | undefined;
|
760
700
|
}) => {
|
761
701
|
const {
|
762
702
|
className,
|
@@ -772,8 +712,7 @@ export const LambdaEditor = observer(
|
|
772
712
|
disablePopUp,
|
773
713
|
useBaseTextEditorSettings,
|
774
714
|
hideErrorBar,
|
775
|
-
|
776
|
-
onEditorFocusEventHandler,
|
715
|
+
onEditorFocus,
|
777
716
|
} = props;
|
778
717
|
const [showPopUp, setShowPopUp] = useState(false);
|
779
718
|
const openInPopUp = (): void => setShowPopUp(true);
|
@@ -798,7 +737,6 @@ export const LambdaEditor = observer(
|
|
798
737
|
disabled={disabled}
|
799
738
|
lambdaEditorState={lambdaEditorState}
|
800
739
|
transformStringToLambda={debouncedTransformStringToLambda}
|
801
|
-
onKeyDownEventHandlers={onKeyDownEventHandlers ?? []}
|
802
740
|
onClose={closePopUp}
|
803
741
|
/>
|
804
742
|
</>
|
@@ -849,9 +787,8 @@ export const LambdaEditor = observer(
|
|
849
787
|
disablePopUp={disablePopUp}
|
850
788
|
useBaseTextEditorSettings={useBaseTextEditorSettings}
|
851
789
|
hideErrorBar={hideErrorBar}
|
852
|
-
onKeyDownEventHandlers={onKeyDownEventHandlers ?? []}
|
853
790
|
openInPopUp={openInPopUp}
|
854
|
-
|
791
|
+
onEditorFocus={onEditorFocus}
|
855
792
|
/>
|
856
793
|
);
|
857
794
|
},
|