@finos/legend-query-builder 4.14.47 → 4.14.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__lib__/QueryBuilderDocumentation.d.ts +3 -1
- package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderDocumentation.js +2 -0
- package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts +1 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +59 -46
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +22 -22
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +2 -2
- package/lib/components/QueryBuilderDiffPanel.js +7 -6
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +29 -10
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +3 -3
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +14 -13
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +2 -2
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +14 -24
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +1 -1
- package/lib/components/QueryBuilderTextEditor.js +8 -7
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +4 -3
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
- package/lib/components/QueryChat.d.ts +1 -1
- package/lib/components/QueryChat.js +3 -2
- package/lib/components/QueryChat.js.map +1 -1
- package/lib/components/QueryLoader.d.ts +2 -2
- package/lib/components/QueryLoader.js +25 -24
- package/lib/components/QueryLoader.js.map +1 -1
- package/lib/components/QueryUsageViewer.d.ts +1 -1
- package/lib/components/QueryUsageViewer.js +4 -3
- package/lib/components/QueryUsageViewer.js.map +1 -1
- package/lib/components/ServiceQuerySetupUtils.js +4 -3
- package/lib/components/ServiceQuerySetupUtils.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +3 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/data-access/DataAccessOverview.d.ts +1 -1
- package/lib/components/data-access/DataAccessOverview.js +17 -16
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js +4 -3
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js +3 -2
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js +4 -3
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts +3 -3
- package/lib/components/execution-plan/ExecutionPlanViewer.js +34 -33
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js +3 -2
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ImplementationViewer.js +4 -3
- package/lib/components/execution-plan/ImplementationViewer.js.map +1 -1
- package/lib/components/execution-plan/PartialClassResultViewer.js +3 -2
- package/lib/components/execution-plan/PartialClassResultViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js +7 -6
- package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js +4 -3
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ResultTypeViewer.js +5 -4
- package/lib/components/execution-plan/ResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js +7 -6
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/TDSResultTypeViewer.js +4 -3
- package/lib/components/execution-plan/TDSResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/TempTableStrategyViewer.js +3 -2
- package/lib/components/execution-plan/TempTableStrategyViewer.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +31 -30
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +20 -19
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/explorer/{QueryBuilderMilestoningEditor.d.ts → QueryBuilderMilestoningParameterEditor.d.ts} +6 -3
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js +53 -0
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js.map +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +18 -17
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +9 -8
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +3 -3
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +24 -23
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +4 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +76 -54
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +3 -2
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +201 -29
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +9 -8
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +55 -36
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +29 -28
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +20 -19
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.d.ts +2 -2
- package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.js +19 -17
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +11 -10
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js +5 -4
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +9 -8
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +38 -37
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +21 -20
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +2 -2
- package/lib/components/shared/LambdaEditor.js +14 -13
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js +7 -6
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +4 -3
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +10 -9
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js +4 -3
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +2 -2
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js +15 -7
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +6 -5
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +6 -5
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +6 -5
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.d.ts +4 -0
- package/lib/graph-manager/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.js +5 -0
- package/lib/graph-manager/QueryBuilderConfig.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +3 -3
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/QueryLoaderState.d.ts +1 -0
- package/lib/stores/QueryLoaderState.d.ts.map +1 -1
- package/lib/stores/QueryLoaderState.js +1 -0
- package/lib/stores/QueryLoaderState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +8 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js +4 -2
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +13 -2
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +8 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +25 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts +5 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js +62 -3
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +8 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +7 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/package.json +4 -4
- package/src/__lib__/QueryBuilderDocumentation.ts +2 -0
- package/src/components/QueryBuilder.tsx +44 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +13 -4
- package/src/components/QueryBuilderParametersPanel.tsx +55 -0
- package/src/components/QueryBuilderSideBar.tsx +0 -42
- package/src/components/explorer/QueryBuilderMilestoningParameterEditor.tsx +114 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +143 -78
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +445 -19
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +134 -21
- package/src/components/result/QueryBuilderResultPanel.tsx +9 -1
- package/src/components/shared/QueryBuilderVariableSelector.tsx +22 -0
- package/src/graph-manager/QueryBuilderConfig.ts +6 -0
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +4 -1
- package/src/stores/QueryLoaderState.ts +1 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +11 -0
- package/src/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.ts +6 -2
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +1 -0
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +23 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +13 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +45 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +3 -0
- package/src/stores/milestoning/QueryBuilderMilestoningState.ts +95 -7
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +13 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +11 -0
- package/tsconfig.json +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +0 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +0 -102
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +0 -1
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +0 -364
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
MenuContentItemIcon,
|
|
48
48
|
MenuContentItemLabel,
|
|
49
49
|
PanelLoadingIndicator,
|
|
50
|
+
RefreshIcon,
|
|
50
51
|
} from '@finos/legend-art';
|
|
51
52
|
import {
|
|
52
53
|
type ValueSpecification,
|
|
@@ -69,7 +70,6 @@ import React, {
|
|
|
69
70
|
useState,
|
|
70
71
|
} from 'react';
|
|
71
72
|
import { useDrop, useDrag, useDragLayer } from 'react-dnd';
|
|
72
|
-
import { QueryBuilderAggregateColumnState } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
|
|
73
73
|
import type { QueryBuilderPostFilterOperator } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js';
|
|
74
74
|
import {
|
|
75
75
|
type QueryBuilderPostFilterTreeNodeData,
|
|
@@ -110,6 +110,10 @@ import {
|
|
|
110
110
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
|
111
111
|
import { QueryBuilderTelemetryHelper } from '../../__lib__/QueryBuilderTelemetryHelper.js';
|
|
112
112
|
import { QueryBuilderPanelIssueCountBadge } from '../shared/QueryBuilderPanelIssueCountBadge.js';
|
|
113
|
+
import {
|
|
114
|
+
QueryBuilderPostFilterOperator_In,
|
|
115
|
+
QueryBuilderPostFilterOperator_NotIn,
|
|
116
|
+
} from '../../stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js';
|
|
113
117
|
|
|
114
118
|
const QueryBuilderPostFilterConditionContextMenu = observer(
|
|
115
119
|
forwardRef<
|
|
@@ -213,18 +217,21 @@ const QueryBuilderPostFilterGroupConditionEditor = observer(
|
|
|
213
217
|
export const QueryBuilderColumnBadge = observer(
|
|
214
218
|
(props: {
|
|
215
219
|
colState: QueryBuilderTDSColumnState;
|
|
216
|
-
onColumnChange
|
|
217
|
-
columnState: QueryBuilderProjectionColumnState
|
|
218
|
-
|
|
220
|
+
onColumnChange?:
|
|
221
|
+
| ((columnState: QueryBuilderProjectionColumnState) => Promise<void>)
|
|
222
|
+
| undefined;
|
|
223
|
+
removeColumn?: () => void;
|
|
219
224
|
}) => {
|
|
220
|
-
const { colState, onColumnChange } = props;
|
|
225
|
+
const { colState, onColumnChange, removeColumn } = props;
|
|
221
226
|
const applicationStore = useApplicationStore();
|
|
222
227
|
const type = colState.getColumnType();
|
|
223
|
-
const handleDrop =
|
|
224
|
-
(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
const handleDrop = onColumnChange
|
|
229
|
+
? useCallback(
|
|
230
|
+
(item: QueryBuilderProjectionColumnDragSource): Promise<void> =>
|
|
231
|
+
onColumnChange(item.columnState),
|
|
232
|
+
[onColumnChange],
|
|
233
|
+
)
|
|
234
|
+
: undefined;
|
|
228
235
|
const [{ isDragOver }, dropConnector] = useDrop<
|
|
229
236
|
QueryBuilderProjectionColumnDragSource,
|
|
230
237
|
void,
|
|
@@ -237,7 +244,7 @@ export const QueryBuilderColumnBadge = observer(
|
|
|
237
244
|
],
|
|
238
245
|
drop: (item, monitor): void => {
|
|
239
246
|
if (!monitor.didDrop()) {
|
|
240
|
-
handleDrop(item).catch(applicationStore.alertUnhandledError);
|
|
247
|
+
handleDrop?.(item).catch(applicationStore.alertUnhandledError);
|
|
241
248
|
} // prevent drop event propagation to accomondate for nested DnD
|
|
242
249
|
},
|
|
243
250
|
collect: (monitor) => ({
|
|
@@ -247,47 +254,89 @@ export const QueryBuilderColumnBadge = observer(
|
|
|
247
254
|
[applicationStore, handleDrop],
|
|
248
255
|
);
|
|
249
256
|
|
|
250
|
-
|
|
257
|
+
const renderColumnBadgeContent = (): React.ReactNode => (
|
|
258
|
+
<div className="query-builder-column-badge__content">
|
|
259
|
+
{type && (
|
|
260
|
+
<div
|
|
261
|
+
className={clsx('query-builder-column-badge__type', {
|
|
262
|
+
'query-builder-column-badge__type--class': type instanceof Class,
|
|
263
|
+
'query-builder-column-badge__type--enumeration':
|
|
264
|
+
type instanceof Enumeration,
|
|
265
|
+
'query-builder-column-badge__type--primitive':
|
|
266
|
+
type instanceof PrimitiveType,
|
|
267
|
+
})}
|
|
268
|
+
>
|
|
269
|
+
{renderPropertyTypeIcon(type)}
|
|
270
|
+
</div>
|
|
271
|
+
)}
|
|
272
|
+
<div
|
|
273
|
+
className="query-builder-column-badge__property"
|
|
274
|
+
title={`${colState.columnName}`}
|
|
275
|
+
>
|
|
276
|
+
{colState.columnName}
|
|
277
|
+
</div>
|
|
278
|
+
<QueryBuilderColumnInfoTooltip
|
|
279
|
+
columnState={colState}
|
|
280
|
+
placement="bottom-end"
|
|
281
|
+
>
|
|
282
|
+
<div className="query-builder-column-badge__property__info">
|
|
283
|
+
<InfoCircleIcon />
|
|
284
|
+
</div>
|
|
285
|
+
</QueryBuilderColumnInfoTooltip>
|
|
286
|
+
{removeColumn && (
|
|
287
|
+
<button
|
|
288
|
+
className="query-builder-column-badge__action"
|
|
289
|
+
name="Reset"
|
|
290
|
+
title="Reset"
|
|
291
|
+
onClick={removeColumn}
|
|
292
|
+
>
|
|
293
|
+
<RefreshIcon />
|
|
294
|
+
</button>
|
|
295
|
+
)}
|
|
296
|
+
</div>
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
return onColumnChange ? (
|
|
251
300
|
<div ref={dropConnector} className="query-builder-column-badge">
|
|
252
301
|
<PanelEntryDropZonePlaceholder
|
|
253
302
|
isDragOver={isDragOver}
|
|
254
303
|
label="Change Property"
|
|
255
304
|
>
|
|
256
|
-
|
|
257
|
-
{type && (
|
|
258
|
-
<div
|
|
259
|
-
className={clsx('query-builder-column-badge__type', {
|
|
260
|
-
'query-builder-column-badge__type--class':
|
|
261
|
-
type instanceof Class,
|
|
262
|
-
'query-builder-column-badge__type--enumeration':
|
|
263
|
-
type instanceof Enumeration,
|
|
264
|
-
'query-builder-column-badge__type--primitive':
|
|
265
|
-
type instanceof PrimitiveType,
|
|
266
|
-
})}
|
|
267
|
-
>
|
|
268
|
-
{renderPropertyTypeIcon(type)}
|
|
269
|
-
</div>
|
|
270
|
-
)}
|
|
271
|
-
<div
|
|
272
|
-
className="query-builder-column-badge__property"
|
|
273
|
-
title={`${colState.columnName}`}
|
|
274
|
-
>
|
|
275
|
-
{colState.columnName}
|
|
276
|
-
</div>
|
|
277
|
-
<QueryBuilderColumnInfoTooltip
|
|
278
|
-
columnState={colState}
|
|
279
|
-
placement="bottom-end"
|
|
280
|
-
>
|
|
281
|
-
<div className="query-builder-column-badge__property__info">
|
|
282
|
-
<InfoCircleIcon />
|
|
283
|
-
</div>
|
|
284
|
-
</QueryBuilderColumnInfoTooltip>
|
|
285
|
-
</div>
|
|
305
|
+
{renderColumnBadgeContent()}
|
|
286
306
|
</PanelEntryDropZonePlaceholder>
|
|
287
307
|
</div>
|
|
308
|
+
) : (
|
|
309
|
+
<div className="query-builder-column-badge">
|
|
310
|
+
{renderColumnBadgeContent()}
|
|
311
|
+
</div>
|
|
288
312
|
);
|
|
289
313
|
},
|
|
290
314
|
);
|
|
315
|
+
|
|
316
|
+
const isProjectionColumnDragSource = (
|
|
317
|
+
itemToTest:
|
|
318
|
+
| QueryBuilderVariableDragSource
|
|
319
|
+
| QueryBuilderProjectionColumnDragSource,
|
|
320
|
+
): itemToTest is QueryBuilderProjectionColumnDragSource =>
|
|
321
|
+
Object.hasOwn(itemToTest, 'columnState');
|
|
322
|
+
|
|
323
|
+
const canDropItemOntoNodeValue = (
|
|
324
|
+
item: QueryBuilderVariableDragSource | QueryBuilderProjectionColumnDragSource,
|
|
325
|
+
condition: PostFilterConditionState,
|
|
326
|
+
): boolean => {
|
|
327
|
+
const itemParameterType = isProjectionColumnDragSource(item)
|
|
328
|
+
? item.columnState.getColumnType()
|
|
329
|
+
: item.variable.genericType?.value.rawType;
|
|
330
|
+
const conditionOperator = condition.operator;
|
|
331
|
+
const conditionValueType = condition.leftConditionValue.getColumnType();
|
|
332
|
+
return (
|
|
333
|
+
conditionValueType !== undefined &&
|
|
334
|
+
!(conditionOperator instanceof QueryBuilderPostFilterOperator_In) &&
|
|
335
|
+
!(conditionOperator instanceof QueryBuilderPostFilterOperator_NotIn) &&
|
|
336
|
+
isTypeCompatibleForAssignment(itemParameterType, conditionValueType)
|
|
337
|
+
);
|
|
338
|
+
};
|
|
339
|
+
|
|
291
340
|
const QueryBuilderPostFilterConditionEditor = observer(
|
|
292
341
|
(props: {
|
|
293
342
|
node: QueryBuilderPostFilterTreeConditionNodeData;
|
|
@@ -301,29 +350,29 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
301
350
|
const changeOperator = (val: QueryBuilderPostFilterOperator) => (): void =>
|
|
302
351
|
node.condition.changeOperator(val);
|
|
303
352
|
const rightConditionValue = node.condition.rightConditionValue;
|
|
304
|
-
const changeColumn = async (
|
|
305
|
-
columnState: QueryBuilderProjectionColumnState,
|
|
306
|
-
): Promise<void> => {
|
|
307
|
-
const currentColState =
|
|
308
|
-
node.condition.leftConditionValue instanceof
|
|
309
|
-
QueryBuilderAggregateColumnState
|
|
310
|
-
? node.condition.leftConditionValue.projectionColumnState
|
|
311
|
-
: node.condition.leftConditionValue;
|
|
312
|
-
if (currentColState !== columnState) {
|
|
313
|
-
await flowResult(node.condition.changeColumn(columnState));
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
353
|
// Drag and Drop on filter condition value
|
|
317
354
|
const handleDrop = useCallback(
|
|
318
|
-
(
|
|
319
|
-
|
|
355
|
+
(
|
|
356
|
+
item:
|
|
357
|
+
| QueryBuilderVariableDragSource
|
|
358
|
+
| QueryBuilderProjectionColumnDragSource,
|
|
359
|
+
): void => {
|
|
360
|
+
const parameterType = isProjectionColumnDragSource(item)
|
|
361
|
+
? item.columnState.getColumnType()
|
|
362
|
+
: item.variable.genericType?.value.rawType;
|
|
320
363
|
const conditionValueType =
|
|
321
364
|
node.condition.leftConditionValue.getColumnType();
|
|
322
|
-
if (
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
365
|
+
if (canDropItemOntoNodeValue(item, node.condition)) {
|
|
366
|
+
if (isProjectionColumnDragSource(item)) {
|
|
367
|
+
node.condition.setRightConditionVal(
|
|
368
|
+
new PostFilterTDSColumnValueConditionValueState(
|
|
369
|
+
node.condition,
|
|
370
|
+
item.columnState,
|
|
371
|
+
),
|
|
372
|
+
);
|
|
373
|
+
} else {
|
|
374
|
+
node.condition.buildFromValueSpec(item.variable);
|
|
375
|
+
}
|
|
327
376
|
} else {
|
|
328
377
|
applicationStore.notificationService.notifyWarning(
|
|
329
378
|
`Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType?.name}.`,
|
|
@@ -338,18 +387,31 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
338
387
|
{ isFilterValueDragOver: boolean }
|
|
339
388
|
>(
|
|
340
389
|
() => ({
|
|
341
|
-
accept: [
|
|
390
|
+
accept: [
|
|
391
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
|
392
|
+
QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
|
|
393
|
+
],
|
|
394
|
+
canDrop: (item): boolean =>
|
|
395
|
+
canDropItemOntoNodeValue(item, node.condition),
|
|
342
396
|
drop: (item, monitor): void => {
|
|
343
397
|
if (!monitor.didDrop()) {
|
|
344
398
|
handleDrop(item);
|
|
345
399
|
} // prevent drop event propagation to accomondate for nested DnD
|
|
346
400
|
},
|
|
347
401
|
collect: (monitor) => ({
|
|
348
|
-
isFilterValueDragOver:
|
|
402
|
+
isFilterValueDragOver:
|
|
403
|
+
monitor.isOver({ shallow: true }) && monitor.canDrop(),
|
|
349
404
|
}),
|
|
350
405
|
}),
|
|
351
406
|
[handleDrop],
|
|
352
407
|
);
|
|
408
|
+
const { isFilterValueDroppable } = useDragLayer((monitor) => ({
|
|
409
|
+
isFilterValueDroppable:
|
|
410
|
+
monitor.isDragging() &&
|
|
411
|
+
(monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
|
|
412
|
+
monitor.getItemType() === QUERY_BUILDER_VARIABLE_DND_TYPE) &&
|
|
413
|
+
canDropItemOntoNodeValue(monitor.getItem(), node.condition),
|
|
414
|
+
}));
|
|
353
415
|
const resetNode = (): void => {
|
|
354
416
|
node.condition.buildFromValueSpec(
|
|
355
417
|
node.condition.operator.getDefaultFilterConditionValue(node.condition),
|
|
@@ -375,13 +437,11 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
375
437
|
reloadValues: debouncedTypeaheadSearch,
|
|
376
438
|
cleanUpReloadValues,
|
|
377
439
|
};
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
|
|
384
|
-
}));
|
|
440
|
+
const removeTDSColumnValue = (): void => {
|
|
441
|
+
node.condition.buildFromValueSpec(
|
|
442
|
+
node.condition.operator.getDefaultFilterConditionValue(node.condition),
|
|
443
|
+
);
|
|
444
|
+
};
|
|
385
445
|
|
|
386
446
|
const renderRightVal = (): React.ReactNode => {
|
|
387
447
|
if (
|
|
@@ -395,6 +455,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
395
455
|
>
|
|
396
456
|
<PanelEntryDropZonePlaceholder
|
|
397
457
|
isDragOver={isFilterValueDragOver}
|
|
458
|
+
isDroppable={isFilterValueDroppable}
|
|
398
459
|
label="Change Filter Value"
|
|
399
460
|
>
|
|
400
461
|
<BasicValueSpecificationEditor
|
|
@@ -432,12 +493,16 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
432
493
|
>
|
|
433
494
|
<PanelEntryDropZonePlaceholder
|
|
434
495
|
isDragOver={isFilterValueDragOver}
|
|
496
|
+
isDroppable={isFilterValueDroppable}
|
|
435
497
|
label="Change Filter Value"
|
|
436
498
|
>
|
|
437
499
|
<div className="query-builder-post-filter-tree__condition-node__property">
|
|
438
500
|
<QueryBuilderColumnBadge
|
|
439
501
|
colState={rightConditionValue.tdsColumn}
|
|
440
|
-
onColumnChange={
|
|
502
|
+
onColumnChange={
|
|
503
|
+
isFilterValueDroppable ? changeRightCol : undefined
|
|
504
|
+
}
|
|
505
|
+
removeColumn={removeTDSColumnValue}
|
|
441
506
|
/>
|
|
442
507
|
</div>
|
|
443
508
|
</PanelEntryDropZonePlaceholder>
|
|
@@ -450,15 +515,14 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
|
450
515
|
return (
|
|
451
516
|
<div className="query-builder-post-filter-tree__node__label__content dnd__entry__container">
|
|
452
517
|
<PanelEntryDropZonePlaceholder
|
|
453
|
-
isDragOver={isDragOver}
|
|
454
|
-
|
|
455
|
-
|
|
518
|
+
isDragOver={isDragOver && !isFilterValueDragOver}
|
|
519
|
+
alwaysShowChildren={true}
|
|
520
|
+
className="query-builder-post-filter-tree__node__drop-zone-placeholder"
|
|
456
521
|
>
|
|
457
522
|
<div className="query-builder-post-filter-tree__condition-node">
|
|
458
523
|
<div className="query-builder-post-filter-tree__condition-node__property">
|
|
459
524
|
<QueryBuilderColumnBadge
|
|
460
525
|
colState={node.condition.leftConditionValue}
|
|
461
|
-
onColumnChange={changeColumn}
|
|
462
526
|
/>
|
|
463
527
|
</div>
|
|
464
528
|
<DropdownMenu
|
|
@@ -631,10 +695,10 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
|
631
695
|
},
|
|
632
696
|
[applicationStore, postFilterState, node],
|
|
633
697
|
);
|
|
634
|
-
const [{ isDragOver }, dropConnector] = useDrop<
|
|
698
|
+
const [{ isDragOver, deepIsDragOver }, dropConnector] = useDrop<
|
|
635
699
|
QueryBuilderPostFilterConditionDragSource,
|
|
636
700
|
void,
|
|
637
|
-
{ isDragOver: boolean }
|
|
701
|
+
{ isDragOver: boolean; deepIsDragOver: boolean }
|
|
638
702
|
>(
|
|
639
703
|
() => ({
|
|
640
704
|
accept: [
|
|
@@ -649,6 +713,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
|
649
713
|
},
|
|
650
714
|
collect: (monitor) => ({
|
|
651
715
|
isDragOver: monitor.isOver({ shallow: true }),
|
|
716
|
+
deepIsDragOver: monitor.isOver({ shallow: false }),
|
|
652
717
|
}),
|
|
653
718
|
}),
|
|
654
719
|
[handleDrop],
|
|
@@ -746,7 +811,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
|
746
811
|
{node instanceof QueryBuilderPostFilterTreeConditionNodeData && (
|
|
747
812
|
<QueryBuilderPostFilterConditionEditor
|
|
748
813
|
node={node}
|
|
749
|
-
isDragOver={
|
|
814
|
+
isDragOver={deepIsDragOver}
|
|
750
815
|
/>
|
|
751
816
|
)}
|
|
752
817
|
{node instanceof
|