@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
@@ -21,17 +21,27 @@ import {
|
|
21
21
|
getAllClassDerivedProperties,
|
22
22
|
PrimitiveType,
|
23
23
|
PRIMITIVE_TYPE,
|
24
|
+
CORE_PURE_PATH,
|
25
|
+
PURE_DOC_TAG,
|
24
26
|
} from '@finos/legend-graph';
|
25
27
|
import {
|
28
|
+
ActionState,
|
26
29
|
addUniqueEntry,
|
27
30
|
deleteEntry,
|
28
31
|
guaranteeNonNullable,
|
29
32
|
} from '@finos/legend-shared';
|
30
|
-
import {
|
33
|
+
import {
|
34
|
+
observable,
|
35
|
+
computed,
|
36
|
+
action,
|
37
|
+
makeObservable,
|
38
|
+
runInAction,
|
39
|
+
} from 'mobx';
|
31
40
|
import {
|
32
41
|
QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH,
|
33
42
|
QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT,
|
34
43
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE,
|
44
|
+
QUERY_BUILDER_PROPERTY_SEARCH_MAX_NODES,
|
35
45
|
} from '../QueryBuilderConfig.js';
|
36
46
|
import {
|
37
47
|
getQueryBuilderPropertyNodeData,
|
@@ -41,206 +51,190 @@ import {
|
|
41
51
|
QueryBuilderExplorerTreeSubTypeNodeData,
|
42
52
|
} from './QueryBuilderExplorerState.js';
|
43
53
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
54
|
+
import { Fuse } from '@finos/legend-art';
|
55
|
+
import { TextSearchAdvancedConfigState } from '@finos/legend-application';
|
44
56
|
|
45
57
|
export class QueryBuilderPropertySearchState {
|
46
58
|
queryBuilderState: QueryBuilderState;
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
59
|
+
|
60
|
+
/**
|
61
|
+
* When we initialize property search engine, we practically extend
|
62
|
+
* the existing explorer by a few depth. As such, we create new explorer
|
63
|
+
* nodes which are not part of the main explorer tree. Together with the
|
64
|
+
* nodes already explored in the tree, these nodes are stored here to help
|
65
|
+
* searching. Think of this as the knowledge base of property search
|
66
|
+
*
|
67
|
+
* NOTE: a big reason why we want to store these as explorer tree nodes
|
68
|
+
* is that we could interact with the searched nodes, i.e. drag them to
|
69
|
+
* various panels to create filter, fetch-structure, etc.
|
70
|
+
*/
|
71
|
+
indexedExplorerTreeNodes: QueryBuilderExplorerTreeNodeData[] = [];
|
72
|
+
|
73
|
+
// search
|
74
|
+
searchEngine: Fuse<QueryBuilderExplorerTreeNodeData>;
|
75
|
+
searchConfigurationState: TextSearchAdvancedConfigState;
|
76
|
+
searchState = ActionState.create();
|
77
|
+
searchText = '';
|
78
|
+
searchResults: QueryBuilderExplorerTreeNodeData[] = [];
|
79
|
+
isOverSearchLimit = false;
|
51
80
|
isSearchPanelOpen = false;
|
52
81
|
isSearchPanelHidden = false;
|
53
|
-
|
54
|
-
|
55
|
-
|
82
|
+
showSearchConfigurationMenu = false;
|
83
|
+
|
84
|
+
// filter
|
85
|
+
typeFilters = [
|
86
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS,
|
87
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING,
|
88
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
89
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
90
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
91
|
+
];
|
56
92
|
|
57
93
|
constructor(queryBuilderState: QueryBuilderState) {
|
58
|
-
|
59
|
-
|
60
|
-
|
94
|
+
makeObservable(this, {
|
95
|
+
indexedExplorerTreeNodes: observable,
|
96
|
+
searchText: observable,
|
97
|
+
searchResults: observable,
|
98
|
+
isOverSearchLimit: observable,
|
61
99
|
isSearchPanelOpen: observable,
|
62
100
|
isSearchPanelHidden: observable,
|
63
|
-
|
64
|
-
|
101
|
+
showSearchConfigurationMenu: observable,
|
102
|
+
typeFilters: observable,
|
103
|
+
filteredSearchResults: computed,
|
104
|
+
search: action,
|
105
|
+
resetSearch: action,
|
65
106
|
setSearchText: action,
|
66
|
-
|
107
|
+
setShowSearchConfigurationMenu: action,
|
67
108
|
setIsSearchPanelOpen: action,
|
68
109
|
setIsSearchPanelHidden: action,
|
69
|
-
|
70
|
-
|
71
|
-
toggleTypeFilter: action,
|
110
|
+
toggleFilterForType: action,
|
111
|
+
initialize: action,
|
72
112
|
});
|
73
113
|
|
74
114
|
this.queryBuilderState = queryBuilderState;
|
75
|
-
this.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
80
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
81
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
82
|
-
];
|
115
|
+
this.searchConfigurationState = new TextSearchAdvancedConfigState(
|
116
|
+
(): void => this.search(),
|
117
|
+
);
|
118
|
+
this.searchEngine = new Fuse(this.indexedExplorerTreeNodes);
|
83
119
|
}
|
84
120
|
|
85
|
-
|
86
|
-
|
87
|
-
deleteEntry(this.typeFilters, val);
|
88
|
-
} else {
|
89
|
-
addUniqueEntry(this.typeFilters, val);
|
90
|
-
}
|
121
|
+
setIsSearchPanelOpen(val: boolean): void {
|
122
|
+
this.isSearchPanelOpen = val;
|
91
123
|
}
|
92
124
|
|
93
|
-
|
94
|
-
this.
|
125
|
+
setIsSearchPanelHidden(val: boolean): void {
|
126
|
+
this.isSearchPanelHidden = val;
|
95
127
|
}
|
96
128
|
|
97
|
-
|
98
|
-
|
99
|
-
if (node instanceof QueryBuilderExplorerTreePropertyNodeData) {
|
100
|
-
if (
|
101
|
-
node.property.multiplicity.upperBound === undefined ||
|
102
|
-
node.property.multiplicity.upperBound > 1
|
103
|
-
) {
|
104
|
-
return true;
|
105
|
-
}
|
106
|
-
const parentNode = this.allMappedPropertyNodes.find(
|
107
|
-
(pn) => pn.id === node.parentId,
|
108
|
-
);
|
109
|
-
if (
|
110
|
-
parentNode instanceof QueryBuilderExplorerTreePropertyNodeData &&
|
111
|
-
(parentNode.property.multiplicity.upperBound === undefined ||
|
112
|
-
parentNode.property.multiplicity.upperBound > 1)
|
113
|
-
) {
|
114
|
-
return true;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
return false;
|
118
|
-
});
|
129
|
+
setShowSearchConfigurationMenu(val: boolean): void {
|
130
|
+
this.showSearchConfigurationMenu = val;
|
119
131
|
}
|
120
132
|
|
121
|
-
|
122
|
-
|
123
|
-
if (node.type instanceof Class) {
|
124
|
-
return true;
|
125
|
-
}
|
126
|
-
return false;
|
127
|
-
});
|
133
|
+
setSearchText(val: string): void {
|
134
|
+
this.searchText = val;
|
128
135
|
}
|
129
136
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
node.type.name === PRIMITIVE_TYPE.STRING
|
135
|
-
) {
|
136
|
-
return true;
|
137
|
-
}
|
138
|
-
return false;
|
139
|
-
});
|
137
|
+
resetSearch(): void {
|
138
|
+
this.searchText = '';
|
139
|
+
this.searchResults = [];
|
140
|
+
this.searchState.complete();
|
140
141
|
}
|
141
142
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
node.type.name === PRIMITIVE_TYPE.INTEGER ||
|
149
|
-
node.type.name === PRIMITIVE_TYPE.FLOAT)
|
150
|
-
) {
|
151
|
-
return true;
|
152
|
-
}
|
153
|
-
return false;
|
154
|
-
});
|
143
|
+
toggleFilterForType(val: QUERY_BUILDER_PROPERTY_SEARCH_TYPE): void {
|
144
|
+
if (this.typeFilters.includes(val)) {
|
145
|
+
deleteEntry(this.typeFilters, val);
|
146
|
+
} else {
|
147
|
+
addUniqueEntry(this.typeFilters, val);
|
148
|
+
}
|
155
149
|
}
|
156
150
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
node.type.name === PRIMITIVE_TYPE.STRICTDATE ||
|
164
|
-
node.type.name === PRIMITIVE_TYPE.STRICTTIME ||
|
165
|
-
node.type.name === PRIMITIVE_TYPE.LATESTDATE)
|
166
|
-
) {
|
167
|
-
return true;
|
168
|
-
}
|
169
|
-
return false;
|
170
|
-
});
|
171
|
-
}
|
151
|
+
search(): void {
|
152
|
+
if (!this.searchText) {
|
153
|
+
this.searchResults = [];
|
154
|
+
return;
|
155
|
+
}
|
156
|
+
this.searchState.inProgress();
|
172
157
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
158
|
+
// NOTE: performanced of fuzzy search is impacted by the number of indexed entries and the length
|
159
|
+
// of the search pattern, so to a certain extent this could become laggy. If this becomes too inconvenient
|
160
|
+
// for the users, we might need to use another fuzzy-search implementation, or have appropriate search
|
161
|
+
// policy, e.g. limit length of search text, etc.
|
162
|
+
//
|
163
|
+
// See https://github.com/farzher/fuzzysort
|
164
|
+
const searchResults = Array.from(
|
165
|
+
this.searchEngine
|
166
|
+
.search(
|
167
|
+
this.searchConfigurationState.generateSearchText(
|
168
|
+
this.searchText.toLowerCase(),
|
169
|
+
),
|
170
|
+
{
|
171
|
+
// NOTE: search for limit + 1 item so we can know if there are more search results
|
172
|
+
limit: QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT + 1,
|
173
|
+
},
|
174
|
+
)
|
175
|
+
.values(),
|
176
|
+
).map((result) => result.item);
|
184
177
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
}
|
199
|
-
if (
|
200
|
-
!this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING) &&
|
201
|
-
this.stringPropertyNodes().includes(p)
|
202
|
-
) {
|
203
|
-
return false;
|
204
|
-
}
|
205
|
-
if (
|
206
|
-
!this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER) &&
|
207
|
-
this.numberPropertyNodes().includes(p)
|
208
|
-
) {
|
209
|
-
return false;
|
210
|
-
}
|
211
|
-
if (
|
212
|
-
!this.typeFilters.includes(
|
213
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
214
|
-
) &&
|
215
|
-
this.booleanPropertyNodes().includes(p)
|
216
|
-
) {
|
217
|
-
return false;
|
218
|
-
}
|
219
|
-
if (
|
220
|
-
!this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE) &&
|
221
|
-
this.datePropertyNodes().includes(p)
|
222
|
-
) {
|
223
|
-
return false;
|
224
|
-
}
|
225
|
-
return true;
|
226
|
-
});
|
178
|
+
// check if the search results exceed the limit
|
179
|
+
if (searchResults.length > QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT) {
|
180
|
+
this.isOverSearchLimit = true;
|
181
|
+
this.searchResults = searchResults.slice(
|
182
|
+
0,
|
183
|
+
QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT,
|
184
|
+
);
|
185
|
+
} else {
|
186
|
+
this.isOverSearchLimit = false;
|
187
|
+
this.searchResults = searchResults;
|
188
|
+
}
|
189
|
+
|
190
|
+
this.searchState.complete();
|
227
191
|
}
|
228
192
|
|
229
|
-
|
230
|
-
|
193
|
+
/**
|
194
|
+
* From the current explorer tree, navigate breadth-first to find more mapped
|
195
|
+
* property nodes, then index these property nodes for searching.
|
196
|
+
*
|
197
|
+
* NOTE: fortunately, since we restrict the depth and number of nodes in this navigation
|
198
|
+
* this process is often not the performance bottleneck, else, we would need to make this
|
199
|
+
* asynchronous and block the UI while waiting.
|
200
|
+
*/
|
201
|
+
initialize(): void {
|
202
|
+
this.indexedExplorerTreeNodes = [];
|
203
|
+
|
231
204
|
let currentLevelPropertyNodes: QueryBuilderExplorerTreeNodeData[] = [];
|
232
205
|
let nextLevelPropertyNodes: QueryBuilderExplorerTreeNodeData[] = [];
|
233
|
-
|
206
|
+
|
207
|
+
Array.from(
|
208
|
+
this.queryBuilderState.explorerState.nonNullableTreeData.nodes.values(),
|
209
|
+
)
|
234
210
|
.slice(1)
|
235
211
|
.forEach((node) => {
|
236
212
|
if (node.mappingData.mapped && !node.isPartOfDerivedPropertyBranch) {
|
237
213
|
currentLevelPropertyNodes.push(node);
|
238
|
-
this.
|
214
|
+
this.indexedExplorerTreeNodes.push(node);
|
239
215
|
}
|
240
216
|
});
|
217
|
+
|
218
|
+
// ensure we don't navigate more nodes than the limit so we could
|
219
|
+
// keep the initialization/indexing time within acceptable range
|
220
|
+
const NODE_LIMIT =
|
221
|
+
this.indexedExplorerTreeNodes.length +
|
222
|
+
QUERY_BUILDER_PROPERTY_SEARCH_MAX_NODES;
|
223
|
+
const addNode = (node: QueryBuilderExplorerTreeNodeData): void =>
|
224
|
+
runInAction(() => {
|
225
|
+
if (this.indexedExplorerTreeNodes.length > NODE_LIMIT) {
|
226
|
+
return;
|
227
|
+
}
|
228
|
+
this.indexedExplorerTreeNodes.push(node);
|
229
|
+
});
|
230
|
+
|
231
|
+
// limit the depth of navigation to keep the initialization/indexing
|
232
|
+
// time within acceptable range
|
241
233
|
let currentDepth = 1;
|
242
|
-
|
243
|
-
|
234
|
+
while (
|
235
|
+
currentLevelPropertyNodes.length &&
|
236
|
+
currentDepth <= QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH
|
237
|
+
) {
|
244
238
|
const node = currentLevelPropertyNodes.shift();
|
245
239
|
if (node) {
|
246
240
|
if (node.childrenIds.length) {
|
@@ -268,7 +262,7 @@ export class QueryBuilderPropertySearchState {
|
|
268
262
|
!propertyTreeNodeData.isPartOfDerivedPropertyBranch
|
269
263
|
) {
|
270
264
|
nextLevelPropertyNodes.push(propertyTreeNodeData);
|
271
|
-
|
265
|
+
addNode(propertyTreeNodeData);
|
272
266
|
}
|
273
267
|
});
|
274
268
|
node.type._subclasses.forEach((subclass) => {
|
@@ -281,53 +275,125 @@ export class QueryBuilderPropertySearchState {
|
|
281
275
|
),
|
282
276
|
);
|
283
277
|
nextLevelPropertyNodes.push(subTypeTreeNodeData);
|
284
|
-
|
278
|
+
addNode(subTypeTreeNodeData);
|
285
279
|
});
|
286
280
|
}
|
287
281
|
}
|
288
282
|
}
|
289
|
-
|
283
|
+
|
284
|
+
// when we done processing one depth, we will do check on the depth and the total
|
285
|
+
// number of indexed nodes to figureo ut if we should proceed further
|
286
|
+
if (
|
287
|
+
!currentLevelPropertyNodes.length &&
|
288
|
+
this.indexedExplorerTreeNodes.length < NODE_LIMIT
|
289
|
+
) {
|
290
290
|
currentLevelPropertyNodes = nextLevelPropertyNodes;
|
291
291
|
nextLevelPropertyNodes = [];
|
292
292
|
currentDepth++;
|
293
293
|
}
|
294
294
|
}
|
295
|
+
|
296
|
+
// indexing
|
297
|
+
this.searchEngine = new Fuse(this.indexedExplorerTreeNodes, {
|
298
|
+
includeScore: true,
|
299
|
+
shouldSort: true,
|
300
|
+
// Ignore location when computing the search score
|
301
|
+
// See https://fusejs.io/concepts/scoring-theory.html
|
302
|
+
ignoreLocation: true,
|
303
|
+
// This specifies the point the search gives up
|
304
|
+
// `0.0` means exact match where `1.0` would match anything
|
305
|
+
// We set a relatively low threshold to filter out irrelevant results
|
306
|
+
threshold: 0.2,
|
307
|
+
keys: [
|
308
|
+
{
|
309
|
+
name: 'label',
|
310
|
+
weight: 4,
|
311
|
+
},
|
312
|
+
{
|
313
|
+
name: 'taggedValues',
|
314
|
+
weight: 2,
|
315
|
+
// aggregate the property documentation, do not account for class documentation
|
316
|
+
getFn: (node: QueryBuilderExplorerTreeNodeData) =>
|
317
|
+
node instanceof QueryBuilderExplorerTreePropertyNodeData
|
318
|
+
? node.property.taggedValues
|
319
|
+
.filter(
|
320
|
+
(taggedValue) =>
|
321
|
+
taggedValue.tag.ownerReference.value.path ===
|
322
|
+
CORE_PURE_PATH.PROFILE_DOC &&
|
323
|
+
taggedValue.tag.value.value === PURE_DOC_TAG,
|
324
|
+
)
|
325
|
+
.map((taggedValue) => taggedValue.value)
|
326
|
+
.join('\n')
|
327
|
+
: '',
|
328
|
+
},
|
329
|
+
],
|
330
|
+
// extended search allows for exact word match through single quote
|
331
|
+
// See https://fusejs.io/examples.html#extended-search
|
332
|
+
useExtendedSearch: true,
|
333
|
+
});
|
295
334
|
}
|
296
335
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
336
|
+
get filteredSearchResults(): QueryBuilderExplorerTreeNodeData[] {
|
337
|
+
return this.searchResults.filter((node) => {
|
338
|
+
if (this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS)) {
|
339
|
+
if (node.type instanceof Class) {
|
340
|
+
return true;
|
341
|
+
}
|
342
|
+
}
|
343
|
+
if (
|
344
|
+
this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING)
|
345
|
+
) {
|
302
346
|
if (
|
303
|
-
|
304
|
-
|
347
|
+
node.type instanceof PrimitiveType &&
|
348
|
+
node.type.name === PRIMITIVE_TYPE.STRING
|
305
349
|
) {
|
306
|
-
|
350
|
+
return true;
|
307
351
|
}
|
308
352
|
}
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
353
|
+
if (
|
354
|
+
this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER)
|
355
|
+
) {
|
356
|
+
if (
|
357
|
+
node.type instanceof PrimitiveType &&
|
358
|
+
(
|
359
|
+
[
|
360
|
+
PRIMITIVE_TYPE.NUMBER,
|
361
|
+
PRIMITIVE_TYPE.DECIMAL,
|
362
|
+
PRIMITIVE_TYPE.INTEGER,
|
363
|
+
PRIMITIVE_TYPE.FLOAT,
|
364
|
+
] as string[]
|
365
|
+
).includes(node.type.name)
|
366
|
+
) {
|
367
|
+
return true;
|
368
|
+
}
|
369
|
+
}
|
370
|
+
if (
|
371
|
+
this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN)
|
372
|
+
) {
|
373
|
+
if (
|
374
|
+
node.type instanceof PrimitiveType &&
|
375
|
+
node.type.name === PRIMITIVE_TYPE.BOOLEAN
|
376
|
+
) {
|
377
|
+
return true;
|
378
|
+
}
|
379
|
+
}
|
380
|
+
if (this.typeFilters.includes(QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE)) {
|
381
|
+
if (
|
382
|
+
node.type instanceof PrimitiveType &&
|
383
|
+
(
|
384
|
+
[
|
385
|
+
PRIMITIVE_TYPE.DATE,
|
386
|
+
PRIMITIVE_TYPE.DATETIME,
|
387
|
+
PRIMITIVE_TYPE.STRICTDATE,
|
388
|
+
PRIMITIVE_TYPE.STRICTTIME,
|
389
|
+
PRIMITIVE_TYPE.LATESTDATE,
|
390
|
+
] as string[]
|
391
|
+
).includes(node.type.name)
|
392
|
+
) {
|
393
|
+
return true;
|
394
|
+
}
|
395
|
+
}
|
396
|
+
return false;
|
397
|
+
});
|
332
398
|
}
|
333
399
|
}
|
@@ -19,6 +19,7 @@ import type {
|
|
19
19
|
CompilationError,
|
20
20
|
LambdaFunction,
|
21
21
|
} from '@finos/legend-graph';
|
22
|
+
import type { Hashable } from '@finos/legend-shared';
|
22
23
|
import { computed, makeObservable } from 'mobx';
|
23
24
|
import type { QueryBuilderExplorerTreePropertyNodeData } from '../explorer/QueryBuilderExplorerState.js';
|
24
25
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
@@ -30,9 +31,11 @@ export enum FETCH_STRUCTURE_IMPLEMENTATION {
|
|
30
31
|
GRAPH_FETCH = 'GRAPH_FETCH',
|
31
32
|
}
|
32
33
|
|
33
|
-
export abstract class QueryBuilderFetchStructureImplementationState
|
34
|
-
|
35
|
-
|
34
|
+
export abstract class QueryBuilderFetchStructureImplementationState
|
35
|
+
implements Hashable
|
36
|
+
{
|
37
|
+
readonly queryBuilderState: QueryBuilderState;
|
38
|
+
readonly fetchStructureState: QueryBuilderFetchStructureState;
|
36
39
|
|
37
40
|
constructor(
|
38
41
|
queryBuilderState: QueryBuilderState,
|
@@ -41,6 +44,7 @@ export abstract class QueryBuilderFetchStructureImplementationState {
|
|
41
44
|
makeObservable(this, {
|
42
45
|
usedExplorerTreePropertyNodeIDs: computed,
|
43
46
|
validationIssues: computed,
|
47
|
+
hashCode: computed,
|
44
48
|
});
|
45
49
|
|
46
50
|
this.queryBuilderState = queryBuilderState;
|
@@ -62,4 +66,5 @@ export abstract class QueryBuilderFetchStructureImplementationState {
|
|
62
66
|
lambdaFunction: LambdaFunction,
|
63
67
|
options?: LambdaFunctionBuilderOption,
|
64
68
|
): void;
|
69
|
+
abstract get hashCode(): string;
|
65
70
|
}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { action,
|
17
|
+
import { action, makeObservable, observable } from 'mobx';
|
18
18
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
19
19
|
import { QueryBuilderGraphFetchTreeState } from './graph-fetch/QueryBuilderGraphFetchTreeState.js';
|
20
20
|
import { QueryBuilderProjectionState } from './projection/QueryBuilderProjectionState.js';
|
@@ -30,12 +30,12 @@ import {
|
|
30
30
|
} from './QueryBuilderFetchStructureImplementationState.js';
|
31
31
|
|
32
32
|
export class QueryBuilderFetchStructureState {
|
33
|
-
queryBuilderState: QueryBuilderState;
|
33
|
+
readonly queryBuilderState: QueryBuilderState;
|
34
34
|
implementation: QueryBuilderFetchStructureImplementationState;
|
35
35
|
|
36
36
|
constructor(queryBuilderState: QueryBuilderState) {
|
37
|
-
|
38
|
-
|
37
|
+
makeObservable(this, {
|
38
|
+
implementation: observable,
|
39
39
|
changeImplementation: action,
|
40
40
|
});
|
41
41
|
|
@@ -45,9 +45,17 @@ import {
|
|
45
45
|
} from '@finos/legend-application';
|
46
46
|
import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecificationBuilderHelper.js';
|
47
47
|
import { appendGraphFetch } from './QueryBuilderGraphFetchValueSpecificationBuilder.js';
|
48
|
-
import {
|
48
|
+
import {
|
49
|
+
guaranteeNonNullable,
|
50
|
+
hashArray,
|
51
|
+
type Hashable,
|
52
|
+
} from '@finos/legend-shared';
|
53
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
49
54
|
|
50
|
-
export class QueryBuilderGraphFetchTreeState
|
55
|
+
export class QueryBuilderGraphFetchTreeState
|
56
|
+
extends QueryBuilderFetchStructureImplementationState
|
57
|
+
implements Hashable
|
58
|
+
{
|
51
59
|
treeData?: QueryBuilderGraphFetchTreeData | undefined;
|
52
60
|
/**
|
53
61
|
* If set to `true` we will use `graphFetchChecked` function instead of `graphFetch`.
|
@@ -237,4 +245,12 @@ export class QueryBuilderGraphFetchTreeState extends QueryBuilderFetchStructureI
|
|
237
245
|
onChange();
|
238
246
|
}
|
239
247
|
}
|
248
|
+
|
249
|
+
get hashCode(): string {
|
250
|
+
return hashArray([
|
251
|
+
QUERY_BUILDER_HASH_STRUCTURE.GRAPH_FETCH_STATE,
|
252
|
+
this.isChecked.toString(),
|
253
|
+
this.treeData?.tree ?? '',
|
254
|
+
]);
|
255
|
+
}
|
240
256
|
}
|