@finos/legend-query-builder 0.0.2 → 0.1.1
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 +14 -4
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +23 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.js +103 -0
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -0
- package/lib/components/QueryBuilderParametersPanel.d.ts +1 -0
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +2 -2
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +9 -10
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +1 -0
- 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 +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +2 -2
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
- package/lib/components/QuerySetupUtils.d.ts +22 -0
- package/lib/components/QuerySetupUtils.d.ts.map +1 -0
- package/lib/components/QuerySetupUtils.js +20 -0
- package/lib/components/QuerySetupUtils.js.map +1 -0
- package/lib/components/ServiceQuerySetupUtils.d.ts +23 -0
- package/lib/components/ServiceQuerySetupUtils.d.ts.map +1 -0
- package/lib/components/ServiceQuerySetupUtils.js +25 -0
- package/lib/components/ServiceQuerySetupUtils.js.map +1 -0
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +4 -10
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +8 -6
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/explorer/{QueryBuilderMilestoneEditor.d.ts → QueryBuilderMilestoningEditor.d.ts} +2 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -0
- package/lib/components/explorer/{QueryBuilderMilestoneEditor.js → QueryBuilderMilestoningEditor.js} +9 -9
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +69 -61
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +3 -5
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +5 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +1 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +7 -2
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +84 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -0
- package/lib/graphManager/QueryBuilderHashUtils.js +91 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -0
- package/lib/index.css +17 -1
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +11 -9
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts +27 -5
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js +106 -10
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderConfig.d.ts +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +1 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts +3 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderMilestoningState.js +10 -0
- package/lib/stores/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/QueryBuilderParametersState.d.ts +4 -2
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +11 -2
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +5 -3
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +15 -5
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +5 -3
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +26 -6
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +3 -5
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +32 -22
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.js +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +3 -4
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts +4 -2
- package/lib/stores/QueryBuilderUnsupportedQueryState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderUnsupportedQueryState.js +10 -1
- package/lib/stores/QueryBuilderUnsupportedQueryState.js.map +1 -1
- package/lib/stores/ServiceInfo.d.ts +28 -0
- package/lib/stores/ServiceInfo.d.ts.map +1 -0
- package/lib/stores/ServiceInfo.js +34 -0
- package/lib/stores/ServiceInfo.js.map +1 -0
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +6 -6
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +19 -14
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +36 -17
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js +203 -161
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +5 -3
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +3 -3
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +3 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +9 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +7 -5
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +20 -5
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +7 -4
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +20 -5
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +6 -5
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +14 -9
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts +6 -3
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js +28 -5
- package/lib/stores/fetch-structure/projection/QueryResultSetModifierState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js +7 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts +8 -5
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js +24 -7
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +5 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +5 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +7 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +7 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +7 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +5 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +5 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +7 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +7 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +5 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts +14 -8
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js +54 -4
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +12 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +12 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +7 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +7 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +10 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +4 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +12 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +7 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts +3 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +7 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts +5 -2
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +12 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +3 -1
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterOperator.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +14 -8
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +54 -9
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +10 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +10 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +8 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +3 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +7 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +3 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +7 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +8 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +10 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +3 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +5 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +3 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +7 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +4 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +10 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +15 -7
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +17 -15
- package/src/components/QueryBuilder.tsx +41 -1
- package/src/components/QueryBuilderDiffPanel.tsx +222 -0
- package/src/components/QueryBuilderParametersPanel.tsx +2 -2
- package/src/components/QueryBuilderResultPanel.tsx +34 -20
- package/src/components/QueryBuilderSideBar.tsx +1 -1
- package/src/components/QueryBuilderUnsupportedQueryEditor.tsx +8 -9
- package/src/components/QuerySetupUtils.ts +23 -0
- package/src/components/ServiceQuerySetupUtils.tsx +54 -0
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -12
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +24 -14
- package/src/components/explorer/{QueryBuilderMilestoneEditor.tsx → QueryBuilderMilestoningEditor.tsx} +12 -8
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +156 -145
- package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +10 -5
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +5 -4
- package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +4 -7
- package/src/components/filter/QueryBuilderFilterPanel.tsx +6 -15
- package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +22 -0
- package/src/graphManager/QueryBuilderHashUtils.ts +95 -0
- package/src/index.ts +4 -0
- package/src/stores/QueryBuilderChangeDetectionState.ts +143 -10
- package/src/stores/QueryBuilderConfig.ts +2 -0
- package/src/stores/QueryBuilderMilestoningState.ts +12 -1
- package/src/stores/QueryBuilderParametersState.ts +18 -3
- package/src/stores/QueryBuilderPropertyEditorState.ts +19 -7
- package/src/stores/QueryBuilderResultState.ts +30 -8
- package/src/stores/QueryBuilderState.ts +50 -37
- package/src/stores/QueryBuilderStateTestUtils.ts +1 -1
- package/src/stores/QueryBuilderTextEditorState.ts +1 -1
- package/src/stores/QueryBuilderTypeaheadHelper.ts +6 -5
- package/src/stores/QueryBuilderUnsupportedQueryState.ts +13 -3
- package/src/stores/ServiceInfo.ts +52 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +26 -30
- package/src/stores/explorer/QueryBuilderPropertySearchState.ts +259 -193
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +8 -3
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +4 -4
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +18 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +31 -6
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +34 -9
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +23 -16
- package/src/stores/fetch-structure/projection/QueryResultSetModifierState.ts +38 -8
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregateOperator.ts +15 -2
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationState.ts +37 -12
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +10 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +10 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +12 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +17 -2
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +17 -2
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +10 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +10 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +12 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +12 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +10 -1
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterOperator.ts +4 -2
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterState.ts +78 -10
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +19 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +22 -2
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +17 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +13 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +8 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +20 -2
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +18 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +13 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +12 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +26 -3
- package/src/stores/filter/QueryBuilderFilterOperator.ts +4 -2
- package/src/stores/filter/QueryBuilderFilterState.ts +80 -22
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +20 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +20 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +18 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +16 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +16 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +14 -1
- package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +16 -1
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +14 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +16 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +20 -2
- package/src/stores/workflows/ServiceQueryBuilderState.ts +24 -9
- package/tsconfig.json +8 -2
- package/lib/components/explorer/QueryBuilderMilestoneEditor.d.ts.map +0 -1
- package/lib/components/explorer/QueryBuilderMilestoneEditor.js.map +0 -1
@@ -42,6 +42,7 @@ import {
|
|
42
42
|
DragPreviewLayer,
|
43
43
|
PanelEntryDropZonePlaceholder,
|
44
44
|
useDragPreviewLayer,
|
45
|
+
PanelContent,
|
45
46
|
} from '@finos/legend-art';
|
46
47
|
import {
|
47
48
|
type QueryBuilderFilterConditionDragSource,
|
@@ -148,12 +149,8 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
148
149
|
): void =>
|
149
150
|
node.condition.changeProperty(
|
150
151
|
buildPropertyExpressionFromExplorerTreeNodeData(
|
151
|
-
node.condition.filterState.queryBuilderState.explorerState
|
152
|
-
.nonNullableTreeData,
|
153
152
|
propertyNode,
|
154
|
-
|
155
|
-
node.condition.filterState.queryBuilderState.explorerState
|
156
|
-
.propertySearchState.allMappedPropertyNodes,
|
153
|
+
node.condition.filterState.queryBuilderState.explorerState,
|
157
154
|
),
|
158
155
|
);
|
159
156
|
// Drag and Drop on filter condition value
|
@@ -402,11 +399,8 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
402
399
|
filterConditionState = new FilterConditionState(
|
403
400
|
filterState,
|
404
401
|
buildPropertyExpressionFromExplorerTreeNodeData(
|
405
|
-
filterState.queryBuilderState.explorerState.nonNullableTreeData,
|
406
402
|
dropNode,
|
407
|
-
filterState.queryBuilderState.
|
408
|
-
filterState.queryBuilderState.explorerState.propertySearchState
|
409
|
-
.allMappedPropertyNodes,
|
403
|
+
filterState.queryBuilderState.explorerState,
|
410
404
|
),
|
411
405
|
);
|
412
406
|
} catch (error) {
|
@@ -729,11 +723,8 @@ export const QueryBuilderFilterPanel = observer(
|
|
729
723
|
} else {
|
730
724
|
propertyExpression =
|
731
725
|
buildPropertyExpressionFromExplorerTreeNodeData(
|
732
|
-
filterState.queryBuilderState.explorerState.nonNullableTreeData,
|
733
726
|
(item as QueryBuilderExplorerTreeDragSource).node,
|
734
|
-
filterState.queryBuilderState.
|
735
|
-
filterState.queryBuilderState.explorerState.propertySearchState
|
736
|
-
.allMappedPropertyNodes,
|
727
|
+
filterState.queryBuilderState.explorerState,
|
737
728
|
);
|
738
729
|
}
|
739
730
|
filterConditionState = new FilterConditionState(
|
@@ -861,7 +852,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
861
852
|
</button>
|
862
853
|
</div>
|
863
854
|
</div>
|
864
|
-
<
|
855
|
+
<PanelContent>
|
865
856
|
<PanelDropZone
|
866
857
|
isDragOver={isDragOver}
|
867
858
|
dropTargetConnector={dropTargetConnector}
|
@@ -884,7 +875,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
884
875
|
</>
|
885
876
|
)}
|
886
877
|
</PanelDropZone>
|
887
|
-
</
|
878
|
+
</PanelContent>
|
888
879
|
</div>
|
889
880
|
);
|
890
881
|
},
|
@@ -19,6 +19,8 @@ import {
|
|
19
19
|
type AbstractProperty,
|
20
20
|
DerivedProperty,
|
21
21
|
getMultiplicityDescription,
|
22
|
+
CORE_PURE_PATH,
|
23
|
+
PURE_DOC_TAG,
|
22
24
|
} from '@finos/legend-graph';
|
23
25
|
|
24
26
|
export const QueryBuilderPropertyInfoTooltip: React.FC<{
|
@@ -29,6 +31,15 @@ export const QueryBuilderPropertyInfoTooltip: React.FC<{
|
|
29
31
|
placement?: TooltipPlacement | undefined;
|
30
32
|
}> = (props) => {
|
31
33
|
const { property, path, isMapped, children, placement } = props;
|
34
|
+
const documentation = property.taggedValues
|
35
|
+
.filter(
|
36
|
+
(taggedValue) =>
|
37
|
+
taggedValue.tag.ownerReference.value.path ===
|
38
|
+
CORE_PURE_PATH.PROFILE_DOC &&
|
39
|
+
taggedValue.tag.value.value === PURE_DOC_TAG,
|
40
|
+
)
|
41
|
+
.map((taggedValue) => taggedValue.value);
|
42
|
+
|
32
43
|
return (
|
33
44
|
<Tooltip
|
34
45
|
arrow={true}
|
@@ -78,6 +89,17 @@ export const QueryBuilderPropertyInfoTooltip: React.FC<{
|
|
78
89
|
{isMapped ? 'Yes' : 'No'}
|
79
90
|
</div>
|
80
91
|
</div>
|
92
|
+
|
93
|
+
{Boolean(documentation.length) && (
|
94
|
+
<div className="query-builder__tooltip__item">
|
95
|
+
<div className="query-builder__tooltip__item__label">
|
96
|
+
Documentation
|
97
|
+
</div>
|
98
|
+
<div className="query-builder__tooltip__item__value">
|
99
|
+
{documentation.join('\n\n')}
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
)}
|
81
103
|
</div>
|
82
104
|
}
|
83
105
|
>
|
@@ -0,0 +1,95 @@
|
|
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
|
+
export enum QUERY_BUILDER_HASH_STRUCTURE {
|
18
|
+
// parameters state
|
19
|
+
PARAMETERS_STATE = 'PARAMETERS_STATE',
|
20
|
+
|
21
|
+
// projection state
|
22
|
+
AGGREGATE_OPERATOR_AVERAGE = 'AGGREGATE_OPERATOR_AVERAGE',
|
23
|
+
AGGREGATE_OPERATOR_COUNT = 'AGGREGATE_OPERATOR_COUNT',
|
24
|
+
AGGREGATE_OPERATOR_DISTINCT = 'AGGREGATE_OPERATOR_DISTINCT',
|
25
|
+
AGGREGATE_OPERATOR_DISTINCT_COUNT = 'AGGREGATE_OPERATOR_DISTINCT_COUNT',
|
26
|
+
AGGREGATE_OPERATOR_JOIN_STRING = 'AGGREGATE_OPERATOR_JOIN_STRING',
|
27
|
+
AGGREGATE_OPERATOR_MAX = 'AGGREGATE_OPERATOR_MAX',
|
28
|
+
AGGREGATE_OPERATOR_MIN = 'AGGREGATE_OPERATOR_MIN',
|
29
|
+
AGGREGATE_OPERATOR_STD_DEV_POPULATION = 'AGGREGATE_OPERATOR_STD_DEV_POPULATION',
|
30
|
+
AGGREGATE_OPERATOR_STD_DEV_SAMPLE = 'AGGREGATE_OPERATOR_STD_DEV_SAMPLE',
|
31
|
+
AGGREGATE_OPERATOR_SUM = 'AGGREGATE_OPERATOR_SUM',
|
32
|
+
AGGREGATE_COLUMN_STATE = 'AGGREGATE_COLUMN_STATE',
|
33
|
+
AGGREGATION_STATE = 'AGGREGATION_STATE',
|
34
|
+
SIMPLE_PROJECTION_COLUMN_STATE = 'SIMPLE_PROJECTION_COLUMN_STATE',
|
35
|
+
PROPERTY_EXPRESSION_STATE = 'PROPERTY_EXPRESSION_STATE',
|
36
|
+
DERIVATION_PROJECTION_COLUMN_STATE = 'DERIVATION_PROJECTION_COLUMN_STATE',
|
37
|
+
RESULT_SET_MODIFIER_STATE = 'RESULT_SET_MODIFIER_STATE',
|
38
|
+
SORT_COLUMN_STATE = 'SORT_COLUMN_STATE',
|
39
|
+
PROJECTION_STATE = 'PROJECTION_STATE',
|
40
|
+
|
41
|
+
// post-filter
|
42
|
+
POST_FILTER_TREE_GROUP_NODE_DATA = 'POST_FILTER_TREE_GROUP_NODE_DATA',
|
43
|
+
POST_FILTER_TREE_CONDIITION_NODE_DATA = 'POST_FILTER_TREE_CONDITION_NODE_DATA',
|
44
|
+
POST_FILTER_TREE_BLANK_CONDITION_NODE_DATA = 'POST_FILTER_TREE_BLANK_CONDITION_NODE_DATA',
|
45
|
+
POST_FILTER_CONDITION_STATE = 'POST_FILTER_CONDITION_STATE',
|
46
|
+
POST_FILTER_OPERATOR_CONTAIN = 'POST_FILTER_OPERATOR_CONTAIN',
|
47
|
+
POST_FILTER_OPERATOR_NOT_CONTAIN = 'POST_FILTER_OPERATOR_NOT_CONTAIN',
|
48
|
+
POST_FILTER_OPERATOR_END_WITH = 'POST_FILTER_OPERATOR_END_WITH',
|
49
|
+
POST_FILTER_OPERATOR_NOT_END_WITH = 'POST_FILTER_OPERATOR_NOT_END_WITH',
|
50
|
+
POST_FILTER_OPERATOR_EQUAL = 'POST_FILTER_OPERATOR_EQUAL',
|
51
|
+
POST_FILTER_OPERATOR_NOT_EQUAL = 'POST_FILTER_OPERATOR_NOT_EQUAL',
|
52
|
+
POST_FILTER_OPERATOR_GREATER_THAN = 'POST_FILTER_OPERATOR_GREATER_THAN',
|
53
|
+
POST_FILTER_OPERATOR_GREATER_THAN_EQUAL = 'POST_FILTER_OPERATOR_GREATER_THAN_EQUAL',
|
54
|
+
POST_FILTER_OPERATOR_IN = 'POST_FILTER_OPERATOR_IN',
|
55
|
+
POST_FILTER_OPERATOR_NOT_IN = 'POST_FILTER_OPERATOR_IN',
|
56
|
+
POST_FILTER_OPERATOR_IS_EMPTY = 'POST_FILTER_OPERATOR_IS_EMPTY',
|
57
|
+
POST_FILTER_OPERATOR_IS_NOT_EMPTY = 'POST_FILTER_OPERATOR_IS_NOT_EMPTY',
|
58
|
+
POST_FILTER_OPERATOR_LESS_THAN = 'POST_FILTER_OPERATOR_LESS_THAN',
|
59
|
+
POST_FILTER_OPERATOR_LESS_THAN_EQUAL = 'POST_FILTER_OPERATOR_LESS_THAN_EQUAL',
|
60
|
+
POST_FILTER_OPERATOR_START_WITH = 'POST_FILTER_OPERATOR_START_WITH',
|
61
|
+
POST_FILTER_OPERATOR_NOT_START_WITH = 'POST_FILTER_OPERATOR_NOT_START_WITH',
|
62
|
+
POST_FILTER_STATE = 'POST_FILTER_STATE',
|
63
|
+
|
64
|
+
// filter state
|
65
|
+
FILTER_TREE_GROUP_NODE_DATA = 'FILTER_TREE_GROUP_NODE_DATA',
|
66
|
+
FILTER_TREE_CONDIITION_NODE_DATA = 'FILTER_TREE_CONDITION_NODE_DATA',
|
67
|
+
FILTER_TREE_BLANK_CONDITION_NODE_DATA = 'FILTER_TREE_BLANK_CONDITION_NODE_DATA',
|
68
|
+
FILTER_CONDITION_STATE = 'FILTER_CONDITION_STATE',
|
69
|
+
FILTER_OPERATOR_CONTAIN = 'FILTER_OPERATOR_CONTAIN',
|
70
|
+
FILTER_OPERATOR_NOT_CONTAIN = 'FILTER_OPERATOR_NOT_CONTAIN',
|
71
|
+
FILTER_OPERATOR_END_WITH = 'FILTER_OPERATOR_END_WITH',
|
72
|
+
FILTER_OPERATOR_NOT_END_WITH = 'FILTER_OPERATOR_NOT_END_WITH',
|
73
|
+
FILTER_OPERATOR_EQUAL = 'FILTER_OPERATOR_EQUAL',
|
74
|
+
FILTER_OPERATOR_NOT_EQUAL = 'FILTER_OPERATOR_NOT_EQUAL',
|
75
|
+
FILTER_OPERATOR_GREATER_THAN = 'FILTER_OPERATOR_GREATER_THAN',
|
76
|
+
FILTER_OPERATOR_GREATER_THAN_EQUAL = 'FILTER_OPERATOR_GREATER_THAN_EQUAL',
|
77
|
+
FILTER_OPERATOR_IN = 'FILTER_OPERATOR_IN',
|
78
|
+
FILTER_OPERATOR_NOT_IN = 'FILTER_OPERATOR_IN',
|
79
|
+
FILTER_OPERATOR_IS_EMPTY = 'FILTER_OPERATOR_IS_EMPTY',
|
80
|
+
FILTER_OPERATOR_IS_NOT_EMPTY = 'FILTER_OPERATOR_IS_NOT_EMPTY',
|
81
|
+
FILTER_OPERATOR_LESS_THAN = 'FILTER_OPERATOR_LESS_THAN',
|
82
|
+
FILTER_OPERATOR_LESS_THAN_EQUAL = 'FILTER_OPERATOR_LESS_THAN_EQUAL',
|
83
|
+
FILTER_OPERATOR_START_WITH = 'FILTER_OPERATOR_START_WITH',
|
84
|
+
FILTER_OPERATOR_NOT_START_WITH = 'FILTER_OPERATOR_NOT_START_WITH',
|
85
|
+
FILTER_STATE = 'FILTER_STATE',
|
86
|
+
|
87
|
+
// graph fetch state
|
88
|
+
GRAPH_FETCH_STATE = 'GRAPH_FETCH_STATE',
|
89
|
+
GRAPH_FETCH_TREE_NODE_DATA = 'GRAPH_FETCH_TREE_NODE_DATA',
|
90
|
+
|
91
|
+
// general
|
92
|
+
MILESTONING_STATE = 'MILESTONING_STATE',
|
93
|
+
UNSUPPORTED_QUERY_STATE = 'UNSUPPORTED_QUERY_STATE',
|
94
|
+
QUERY_BUILDER_STATE = 'QUERY_BUILDER_STATE',
|
95
|
+
}
|
package/src/index.ts
CHANGED
@@ -21,6 +21,7 @@ export { QUERY_BUILDER_TEST_ID } from './components//QueryBuilder_TestID.js';
|
|
21
21
|
export { QueryBuilder } from './components//QueryBuilder.js';
|
22
22
|
export { QueryBuilderState } from './stores//QueryBuilderState.js';
|
23
23
|
|
24
|
+
export { QueryBuilderPropertySearchState } from './stores/explorer/QueryBuilderPropertySearchState.js';
|
24
25
|
export {
|
25
26
|
QueryBuilderClassSelector,
|
26
27
|
buildRuntimeValueOption,
|
@@ -36,3 +37,6 @@ export {
|
|
36
37
|
export { getQueryBuilderGraphManagerExtension } from './graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.js';
|
37
38
|
export type { ServiceExecutionAnalysisResult } from './graphManager/action/analytics/ServiceExecutionAnalysis.js';
|
38
39
|
export type { MappingRuntimeCompatibilityAnalysisResult } from './graphManager/action/analytics/MappingRuntimeCompatibilityAnalysis.js';
|
40
|
+
export * from './stores/ServiceInfo.js';
|
41
|
+
export * from './components/ServiceQuerySetupUtils.js';
|
42
|
+
export * from './components/QuerySetupUtils.js';
|
@@ -14,24 +14,157 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import {
|
18
|
-
|
17
|
+
import {
|
18
|
+
ActionAlertActionType,
|
19
|
+
ActionAlertType,
|
20
|
+
} from '@finos/legend-application';
|
21
|
+
import type { RawLambda } from '@finos/legend-graph';
|
22
|
+
import {
|
23
|
+
ActionState,
|
24
|
+
assertErrorThrown,
|
25
|
+
assertNonNullable,
|
26
|
+
type GeneratorFn,
|
27
|
+
} from '@finos/legend-shared';
|
28
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
19
29
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
20
30
|
|
31
|
+
export enum QueryBuilderDiffViewMode {
|
32
|
+
JSON = 'JSON',
|
33
|
+
GRAMMAR = 'Grammar',
|
34
|
+
}
|
35
|
+
|
36
|
+
export class QueryBuilderDiffViewState {
|
37
|
+
readonly changeDetectionState: QueryBuilderChangeDetectionState;
|
38
|
+
readonly initialQuery: RawLambda;
|
39
|
+
readonly currentQuery: RawLambda;
|
40
|
+
|
41
|
+
mode = QueryBuilderDiffViewMode.GRAMMAR;
|
42
|
+
initialQueryGrammarText?: string | undefined;
|
43
|
+
currentQueryGrammarText?: string | undefined;
|
44
|
+
|
45
|
+
constructor(
|
46
|
+
changeDetectionState: QueryBuilderChangeDetectionState,
|
47
|
+
initialQuery: RawLambda,
|
48
|
+
currentQuery: RawLambda,
|
49
|
+
) {
|
50
|
+
makeObservable(this, {
|
51
|
+
mode: observable,
|
52
|
+
initialQueryGrammarText: observable,
|
53
|
+
currentQueryGrammarText: observable,
|
54
|
+
setMode: action,
|
55
|
+
generateGrammarDiff: flow,
|
56
|
+
});
|
57
|
+
|
58
|
+
this.changeDetectionState = changeDetectionState;
|
59
|
+
this.initialQuery = initialQuery;
|
60
|
+
this.currentQuery = currentQuery;
|
61
|
+
}
|
62
|
+
|
63
|
+
setMode(val: QueryBuilderDiffViewMode): void {
|
64
|
+
this.mode = val;
|
65
|
+
}
|
66
|
+
|
67
|
+
*generateGrammarDiff(): GeneratorFn<void> {
|
68
|
+
try {
|
69
|
+
this.initialQueryGrammarText =
|
70
|
+
(yield this.changeDetectionState.querybuilderState.graphManagerState.graphManager.lambdaToPureCode(
|
71
|
+
this.initialQuery,
|
72
|
+
true,
|
73
|
+
)) as string;
|
74
|
+
} catch (error) {
|
75
|
+
assertErrorThrown(error);
|
76
|
+
this.initialQueryGrammarText =
|
77
|
+
'/* Failed to transform grammar text, see JSON diff instead */';
|
78
|
+
}
|
79
|
+
try {
|
80
|
+
this.currentQueryGrammarText =
|
81
|
+
(yield this.changeDetectionState.querybuilderState.graphManagerState.graphManager.lambdaToPureCode(
|
82
|
+
this.currentQuery,
|
83
|
+
true,
|
84
|
+
)) as string;
|
85
|
+
} catch (error) {
|
86
|
+
assertErrorThrown(error);
|
87
|
+
this.currentQueryGrammarText =
|
88
|
+
'/* Failed to transform grammar text, see JSON diff instead */';
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
21
93
|
export class QueryBuilderChangeDetectionState {
|
22
|
-
|
23
|
-
|
24
|
-
|
94
|
+
querybuilderState: QueryBuilderState;
|
95
|
+
initState = ActionState.create();
|
96
|
+
diffViewState?: QueryBuilderDiffViewState | undefined;
|
97
|
+
initialQuery?: RawLambda | undefined;
|
98
|
+
initialHashCode?: string | undefined;
|
25
99
|
|
26
100
|
constructor(queryBuilderState: QueryBuilderState) {
|
27
|
-
this
|
101
|
+
makeObservable(this, {
|
102
|
+
diffViewState: observable,
|
103
|
+
initialHashCode: observable,
|
104
|
+
initialQuery: observable,
|
105
|
+
hasChanged: computed,
|
106
|
+
initialize: action,
|
107
|
+
showDiffViewPanel: action,
|
108
|
+
hideDiffViewPanel: action,
|
109
|
+
});
|
110
|
+
|
111
|
+
this.querybuilderState = queryBuilderState;
|
112
|
+
}
|
113
|
+
|
114
|
+
showDiffViewPanel(): void {
|
115
|
+
assertNonNullable(
|
116
|
+
this.initialQuery,
|
117
|
+
`Can't show changes: change detection is not properly initialized`,
|
118
|
+
);
|
119
|
+
this.diffViewState = new QueryBuilderDiffViewState(
|
120
|
+
this,
|
121
|
+
this.initialQuery,
|
122
|
+
this.querybuilderState.buildQuery(),
|
123
|
+
);
|
124
|
+
}
|
125
|
+
|
126
|
+
hideDiffViewPanel(): void {
|
127
|
+
this.diffViewState = undefined;
|
128
|
+
}
|
129
|
+
|
130
|
+
get hasChanged(): boolean {
|
131
|
+
if (!this.initState.hasCompleted) {
|
132
|
+
return false;
|
133
|
+
}
|
134
|
+
return this.querybuilderState.hashCode !== this.initialHashCode;
|
28
135
|
}
|
29
136
|
|
30
|
-
|
31
|
-
this.
|
137
|
+
initialize(initialQuery: RawLambda): void {
|
138
|
+
this.initState.inProgress();
|
139
|
+
this.initialHashCode = this.querybuilderState.hashCode;
|
140
|
+
this.initialQuery = initialQuery;
|
141
|
+
this.initState.complete();
|
32
142
|
}
|
33
143
|
|
34
|
-
|
35
|
-
this.
|
144
|
+
alertUnsavedChanges(onProceed: () => void): void {
|
145
|
+
if (this.hasChanged) {
|
146
|
+
this.querybuilderState.applicationStore.setActionAlertInfo({
|
147
|
+
message:
|
148
|
+
'Unsaved changes to your query will be lost if you continue. Do you still want to proceed?',
|
149
|
+
type: ActionAlertType.CAUTION,
|
150
|
+
actions: [
|
151
|
+
{
|
152
|
+
label: 'Proceed',
|
153
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
154
|
+
handler:
|
155
|
+
this.querybuilderState.applicationStore.guardUnhandledError(
|
156
|
+
async () => onProceed(),
|
157
|
+
),
|
158
|
+
},
|
159
|
+
{
|
160
|
+
label: 'Cancel',
|
161
|
+
type: ActionAlertActionType.PROCEED,
|
162
|
+
default: true,
|
163
|
+
},
|
164
|
+
],
|
165
|
+
});
|
166
|
+
} else {
|
167
|
+
onProceed();
|
168
|
+
}
|
36
169
|
}
|
37
170
|
}
|
@@ -24,7 +24,9 @@ export const DEFAULT_VARIABLE_NAME = 'var';
|
|
24
24
|
export const DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME = 'row';
|
25
25
|
|
26
26
|
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH = 5;
|
27
|
+
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_NODES = 10000;
|
27
28
|
export const QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT = 100;
|
29
|
+
|
28
30
|
export enum QUERY_BUILDER_PROPERTY_SEARCH_TYPE {
|
29
31
|
CLASS = 'CLASS',
|
30
32
|
STRING = 'STRING',
|
@@ -28,10 +28,12 @@ import {
|
|
28
28
|
VariableExpression,
|
29
29
|
type ValueSpecification,
|
30
30
|
} from '@finos/legend-graph';
|
31
|
+
import { type Hashable, hashArray } from '@finos/legend-shared';
|
31
32
|
import { action, computed, makeObservable, observable } from 'mobx';
|
33
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
|
32
34
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
33
35
|
|
34
|
-
export class QueryBuilderMilestoningState {
|
36
|
+
export class QueryBuilderMilestoningState implements Hashable {
|
35
37
|
queryBuilderState: QueryBuilderState;
|
36
38
|
|
37
39
|
showMilestoningEditor = false;
|
@@ -49,6 +51,7 @@ export class QueryBuilderMilestoningState {
|
|
49
51
|
setProcessingDate: action,
|
50
52
|
setBusinessDate: action,
|
51
53
|
setShowMilestoningEditor: action,
|
54
|
+
hashCode: computed,
|
52
55
|
});
|
53
56
|
|
54
57
|
this.queryBuilderState = queryBuilderState;
|
@@ -161,4 +164,12 @@ export class QueryBuilderMilestoningState {
|
|
161
164
|
}
|
162
165
|
return milestoningParameter;
|
163
166
|
}
|
167
|
+
|
168
|
+
get hashCode(): string {
|
169
|
+
return hashArray([
|
170
|
+
QUERY_BUILDER_HASH_STRUCTURE.MILESTONING_STATE,
|
171
|
+
this.businessDate ?? '',
|
172
|
+
this.processingDate ?? '',
|
173
|
+
]);
|
174
|
+
}
|
164
175
|
}
|
@@ -18,7 +18,9 @@ import {
|
|
18
18
|
LambdaParametersState,
|
19
19
|
type LambdaParameterState,
|
20
20
|
} from '@finos/legend-application';
|
21
|
-
import {
|
21
|
+
import { type Hashable, hashArray } from '@finos/legend-shared';
|
22
|
+
import { observable, makeObservable, action, override } from 'mobx';
|
23
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
|
22
24
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
23
25
|
|
24
26
|
export const QUERY_BUILDER_PARAMETER_DND_TYPE = 'PARAMETER';
|
@@ -27,12 +29,17 @@ export interface QueryBuilderParameterDragSource {
|
|
27
29
|
variable: LambdaParameterState;
|
28
30
|
}
|
29
31
|
|
30
|
-
export class QueryBuilderParametersState
|
32
|
+
export class QueryBuilderParametersState
|
33
|
+
extends LambdaParametersState
|
34
|
+
implements Hashable
|
35
|
+
{
|
36
|
+
readonly queryBuilderState: QueryBuilderState;
|
37
|
+
|
31
38
|
selectedParameter: LambdaParameterState | undefined;
|
32
|
-
queryBuilderState: QueryBuilderState;
|
33
39
|
|
34
40
|
constructor(queryBuilderState: QueryBuilderState) {
|
35
41
|
super();
|
42
|
+
|
36
43
|
makeObservable(this, {
|
37
44
|
parameterValuesEditorState: observable,
|
38
45
|
parameterStates: observable,
|
@@ -41,11 +48,19 @@ export class QueryBuilderParametersState extends LambdaParametersState {
|
|
41
48
|
setParameters: action,
|
42
49
|
selectedParameter: observable,
|
43
50
|
setSelectedParameter: action,
|
51
|
+
hashCode: override,
|
44
52
|
});
|
45
53
|
|
46
54
|
this.queryBuilderState = queryBuilderState;
|
47
55
|
}
|
48
56
|
|
57
|
+
override get hashCode(): string {
|
58
|
+
return hashArray([
|
59
|
+
QUERY_BUILDER_HASH_STRUCTURE.PARAMETERS_STATE,
|
60
|
+
hashArray(this.parameterStates),
|
61
|
+
]);
|
62
|
+
}
|
63
|
+
|
49
64
|
setSelectedParameter(val: LambdaParameterState | undefined): void {
|
50
65
|
this.selectedParameter = val;
|
51
66
|
}
|
@@ -14,11 +14,13 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { action,
|
17
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
18
18
|
import {
|
19
19
|
getNullableFirstElement,
|
20
20
|
guaranteeNonNullable,
|
21
21
|
guaranteeType,
|
22
|
+
type Hashable,
|
23
|
+
hashArray,
|
22
24
|
isCamelCase,
|
23
25
|
prettyCamelCase,
|
24
26
|
prettyCONSTName,
|
@@ -59,6 +61,7 @@ import type { QueryBuilderState } from './QueryBuilderState.js';
|
|
59
61
|
import { functionExpression_setParametersValues } from '@finos/legend-application';
|
60
62
|
import type { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
|
61
63
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
64
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUtils.js';
|
62
65
|
|
63
66
|
export const getDerivedPropertyMilestoningSteoreotype = (
|
64
67
|
property: DerivedProperty,
|
@@ -556,12 +559,11 @@ export class QueryBuilderDerivedPropertyExpressionState {
|
|
556
559
|
}
|
557
560
|
}
|
558
561
|
|
559
|
-
export class QueryBuilderPropertyExpressionState {
|
560
|
-
queryBuilderState: QueryBuilderState;
|
562
|
+
export class QueryBuilderPropertyExpressionState implements Hashable {
|
563
|
+
readonly queryBuilderState: QueryBuilderState;
|
564
|
+
readonly propertyExpression: AbstractPropertyExpression;
|
561
565
|
path: string;
|
562
566
|
title: string;
|
563
|
-
readonly propertyExpression: AbstractPropertyExpression;
|
564
|
-
|
565
567
|
isEditingDerivedPropertyExpression = false;
|
566
568
|
// Since this property is a chain expression, some link of the chain can be
|
567
569
|
// derived property, as such, we need to keep track of the derived properties state in an array
|
@@ -580,13 +582,16 @@ export class QueryBuilderPropertyExpressionState {
|
|
580
582
|
queryBuilderState: QueryBuilderState,
|
581
583
|
propertyExpression: AbstractPropertyExpression,
|
582
584
|
) {
|
583
|
-
|
585
|
+
makeObservable<
|
584
586
|
QueryBuilderPropertyExpressionState,
|
585
587
|
'initDerivedPropertyExpressionStates'
|
586
588
|
>(this, {
|
587
|
-
|
589
|
+
isEditingDerivedPropertyExpression: observable,
|
590
|
+
derivedPropertyExpressionStates: observable,
|
588
591
|
setIsEditingDerivedProperty: action,
|
589
592
|
initDerivedPropertyExpressionStates: action,
|
593
|
+
isValid: computed,
|
594
|
+
hashCode: computed,
|
590
595
|
});
|
591
596
|
|
592
597
|
this.queryBuilderState = queryBuilderState;
|
@@ -665,4 +670,11 @@ export class QueryBuilderPropertyExpressionState {
|
|
665
670
|
this.requiresExistsHandling = requiresExistsHandling;
|
666
671
|
this.derivedPropertyExpressionStates = result.slice().reverse();
|
667
672
|
}
|
673
|
+
|
674
|
+
get hashCode(): string {
|
675
|
+
return hashArray([
|
676
|
+
QUERY_BUILDER_HASH_STRUCTURE.PROPERTY_EXPRESSION_STATE,
|
677
|
+
this.propertyExpression,
|
678
|
+
]);
|
679
|
+
}
|
668
680
|
}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { action,
|
17
|
+
import { action, flow, makeObservable, observable } from 'mobx';
|
18
18
|
import {
|
19
19
|
type GeneratorFn,
|
20
20
|
assertErrorThrown,
|
@@ -45,22 +45,35 @@ import {
|
|
45
45
|
const DEFAULT_LIMIT = 1000;
|
46
46
|
|
47
47
|
export class QueryBuilderResultState {
|
48
|
-
queryBuilderState: QueryBuilderState;
|
49
|
-
exportDataState = ActionState.create();
|
48
|
+
readonly queryBuilderState: QueryBuilderState;
|
49
|
+
readonly exportDataState = ActionState.create();
|
50
|
+
readonly executionPlanState: ExecutionPlanState;
|
51
|
+
|
50
52
|
previewLimit = DEFAULT_LIMIT;
|
51
53
|
isRunningQuery = false;
|
52
54
|
isGeneratingPlan = false;
|
53
55
|
executionResult?: ExecutionResult | undefined;
|
54
|
-
executionPlanState: ExecutionPlanState;
|
55
56
|
executionDuration?: number | undefined;
|
57
|
+
latestRunHashCode?: string | undefined;
|
56
58
|
queryRunPromise: Promise<ExecutionResult> | undefined = undefined;
|
57
59
|
|
58
60
|
constructor(queryBuilderState: QueryBuilderState) {
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
makeObservable(this, {
|
62
|
+
executionResult: observable,
|
63
|
+
previewLimit: observable,
|
64
|
+
executionDuration: observable,
|
65
|
+
latestRunHashCode: observable,
|
66
|
+
queryRunPromise: observable,
|
67
|
+
isGeneratingPlan: observable,
|
68
|
+
isRunningQuery: observable,
|
62
69
|
setIsRunningQuery: action,
|
63
70
|
setExecutionResult: action,
|
71
|
+
setExecutionDuration: action,
|
72
|
+
setPreviewLimit: action,
|
73
|
+
setQueryRunPromise: action,
|
74
|
+
exportData: flow,
|
75
|
+
runQuery: flow,
|
76
|
+
generatePlan: flow,
|
64
77
|
});
|
65
78
|
|
66
79
|
this.queryBuilderState = queryBuilderState;
|
@@ -92,6 +105,13 @@ export class QueryBuilderResultState {
|
|
92
105
|
this.queryRunPromise = promise;
|
93
106
|
};
|
94
107
|
|
108
|
+
get checkForStaleResults(): boolean {
|
109
|
+
if (this.latestRunHashCode !== this.queryBuilderState.hashCode) {
|
110
|
+
return true;
|
111
|
+
}
|
112
|
+
return false;
|
113
|
+
}
|
114
|
+
|
95
115
|
buildExecutionRawLambda(): RawLambda {
|
96
116
|
let query: RawLambda;
|
97
117
|
if (this.queryBuilderState.isQuerySupported) {
|
@@ -188,7 +208,8 @@ export class QueryBuilderResultState {
|
|
188
208
|
|
189
209
|
*runQuery(): GeneratorFn<void> {
|
190
210
|
try {
|
191
|
-
this.
|
211
|
+
this.setIsRunningQuery(true);
|
212
|
+
const currentHashCode = this.queryBuilderState.hashCode;
|
192
213
|
const mapping = guaranteeNonNullable(
|
193
214
|
this.queryBuilderState.mapping,
|
194
215
|
'Mapping is required to execute query',
|
@@ -210,6 +231,7 @@ export class QueryBuilderResultState {
|
|
210
231
|
const result = (yield promise) as ExecutionResult;
|
211
232
|
if (this.queryRunPromise === promise) {
|
212
233
|
this.setExecutionResult(result);
|
234
|
+
this.latestRunHashCode = currentHashCode;
|
213
235
|
this.setExecutionDuration(Date.now() - startTime);
|
214
236
|
}
|
215
237
|
} catch (error) {
|