@finos/legend-query-builder 4.14.47 → 4.14.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. package/lib/__lib__/QueryBuilderDocumentation.d.ts +3 -1
  2. package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderDocumentation.js +2 -0
  4. package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
  5. package/lib/components/QueryBuilder.d.ts +1 -1
  6. package/lib/components/QueryBuilder.d.ts.map +1 -1
  7. package/lib/components/QueryBuilder.js +59 -46
  8. package/lib/components/QueryBuilder.js.map +1 -1
  9. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +1 -1
  10. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  11. package/lib/components/QueryBuilderConstantExpressionPanel.js +22 -22
  12. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  13. package/lib/components/QueryBuilderDiffPanel.d.ts +2 -2
  14. package/lib/components/QueryBuilderDiffPanel.js +7 -6
  15. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  16. package/lib/components/QueryBuilderParametersPanel.d.ts +1 -1
  17. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  18. package/lib/components/QueryBuilderParametersPanel.js +29 -10
  19. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  20. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +3 -3
  21. package/lib/components/QueryBuilderPropertyExpressionEditor.js +14 -13
  22. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  23. package/lib/components/QueryBuilderSideBar.d.ts +2 -2
  24. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  25. package/lib/components/QueryBuilderSideBar.js +14 -24
  26. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  27. package/lib/components/QueryBuilderTextEditor.d.ts +1 -1
  28. package/lib/components/QueryBuilderTextEditor.js +8 -7
  29. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  30. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -1
  31. package/lib/components/QueryBuilderUnsupportedQueryEditor.js +4 -3
  32. package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
  33. package/lib/components/QueryChat.d.ts +1 -1
  34. package/lib/components/QueryChat.js +3 -2
  35. package/lib/components/QueryChat.js.map +1 -1
  36. package/lib/components/QueryLoader.d.ts +2 -2
  37. package/lib/components/QueryLoader.js +25 -24
  38. package/lib/components/QueryLoader.js.map +1 -1
  39. package/lib/components/QueryUsageViewer.d.ts +1 -1
  40. package/lib/components/QueryUsageViewer.js +4 -3
  41. package/lib/components/QueryUsageViewer.js.map +1 -1
  42. package/lib/components/ServiceQuerySetupUtils.js +4 -3
  43. package/lib/components/ServiceQuerySetupUtils.js.map +1 -1
  44. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +3 -2
  45. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
  46. package/lib/components/data-access/DataAccessOverview.d.ts +1 -1
  47. package/lib/components/data-access/DataAccessOverview.js +17 -16
  48. package/lib/components/data-access/DataAccessOverview.js.map +1 -1
  49. package/lib/components/execution-plan/AllocationExecutionNodeViewer.js +4 -3
  50. package/lib/components/execution-plan/AllocationExecutionNodeViewer.js.map +1 -1
  51. package/lib/components/execution-plan/ConstantExecutionNodeViewer.js +3 -2
  52. package/lib/components/execution-plan/ConstantExecutionNodeViewer.js.map +1 -1
  53. package/lib/components/execution-plan/DataTypeResultTypeViewer.js +4 -3
  54. package/lib/components/execution-plan/DataTypeResultTypeViewer.js.map +1 -1
  55. package/lib/components/execution-plan/ExecutionPlanViewer.d.ts +3 -3
  56. package/lib/components/execution-plan/ExecutionPlanViewer.js +34 -33
  57. package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
  58. package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js +3 -2
  59. package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js.map +1 -1
  60. package/lib/components/execution-plan/ImplementationViewer.js +4 -3
  61. package/lib/components/execution-plan/ImplementationViewer.js.map +1 -1
  62. package/lib/components/execution-plan/PartialClassResultViewer.js +3 -2
  63. package/lib/components/execution-plan/PartialClassResultViewer.js.map +1 -1
  64. package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
  65. package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
  66. package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js +7 -6
  67. package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
  68. package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
  69. package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
  70. package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js +4 -3
  71. package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js.map +1 -1
  72. package/lib/components/execution-plan/ResultTypeViewer.js +5 -4
  73. package/lib/components/execution-plan/ResultTypeViewer.js.map +1 -1
  74. package/lib/components/execution-plan/SQLExecutionNodeViewer.js +7 -6
  75. package/lib/components/execution-plan/SQLExecutionNodeViewer.js.map +1 -1
  76. package/lib/components/execution-plan/SequenceExecutionNodeViewer.js +6 -5
  77. package/lib/components/execution-plan/SequenceExecutionNodeViewer.js.map +1 -1
  78. package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js +6 -5
  79. package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js.map +1 -1
  80. package/lib/components/execution-plan/TDSResultTypeViewer.js +4 -3
  81. package/lib/components/execution-plan/TDSResultTypeViewer.js.map +1 -1
  82. package/lib/components/execution-plan/TempTableStrategyViewer.js +3 -2
  83. package/lib/components/execution-plan/TempTableStrategyViewer.js.map +1 -1
  84. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +1 -1
  85. package/lib/components/explorer/QueryBuilderExplorerPanel.js +31 -30
  86. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  87. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -1
  88. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +20 -19
  89. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  90. package/lib/components/explorer/{QueryBuilderMilestoningEditor.d.ts → QueryBuilderMilestoningParameterEditor.d.ts} +6 -3
  91. package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.d.ts.map +1 -0
  92. package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js +53 -0
  93. package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js.map +1 -0
  94. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -1
  95. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +18 -17
  96. package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
  97. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -1
  98. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +9 -8
  99. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
  100. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +3 -3
  101. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +24 -23
  102. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
  103. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +4 -3
  104. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  105. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +76 -54
  106. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  107. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -1
  108. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +3 -2
  109. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
  110. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -1
  111. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  112. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +201 -29
  113. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  114. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +9 -8
  115. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -1
  116. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -1
  117. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  118. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +55 -36
  119. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  120. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts +1 -1
  121. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +29 -28
  122. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  123. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -1
  124. package/lib/components/filter/QueryBuilderFilterPanel.js +20 -19
  125. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  126. package/lib/components/result/QueryBuilderResultPanel.d.ts +2 -2
  127. package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
  128. package/lib/components/result/QueryBuilderResultPanel.js +19 -17
  129. package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
  130. package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts +1 -1
  131. package/lib/components/result/tds/QueryBuilderTDSGridResult.js +11 -10
  132. package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
  133. package/lib/components/result/tds/QueryBuilderTDSResultShared.js +5 -4
  134. package/lib/components/result/tds/QueryBuilderTDSResultShared.js.map +1 -1
  135. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts +1 -1
  136. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +9 -8
  137. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
  138. package/lib/components/shared/BasicValueSpecificationEditor.js +38 -37
  139. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  140. package/lib/components/shared/CustomDatePicker.js +21 -20
  141. package/lib/components/shared/CustomDatePicker.js.map +1 -1
  142. package/lib/components/shared/LambdaEditor.d.ts +2 -2
  143. package/lib/components/shared/LambdaEditor.js +14 -13
  144. package/lib/components/shared/LambdaEditor.js.map +1 -1
  145. package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -1
  146. package/lib/components/shared/LambdaParameterValuesEditor.js +7 -6
  147. package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
  148. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +4 -3
  149. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
  150. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +10 -9
  151. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
  152. package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js +4 -3
  153. package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js.map +1 -1
  154. package/lib/components/shared/QueryBuilderVariableSelector.d.ts +2 -2
  155. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
  156. package/lib/components/shared/QueryBuilderVariableSelector.js +15 -7
  157. package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
  158. package/lib/components/workflows/ClassQueryBuilder.js +6 -5
  159. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  160. package/lib/components/workflows/MappingQueryBuilder.js +6 -5
  161. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  162. package/lib/components/workflows/ServiceQueryBuilder.js +6 -5
  163. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  164. package/lib/graph-manager/QueryBuilderConfig.d.ts +4 -0
  165. package/lib/graph-manager/QueryBuilderConfig.d.ts.map +1 -1
  166. package/lib/graph-manager/QueryBuilderConfig.js +5 -0
  167. package/lib/graph-manager/QueryBuilderConfig.js.map +1 -1
  168. package/lib/index.css +2 -2
  169. package/lib/index.css.map +1 -1
  170. package/lib/package.json +1 -1
  171. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
  172. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  173. package/lib/stores/QueryBuilderValueSpecificationHelper.js +3 -3
  174. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  175. package/lib/stores/QueryLoaderState.d.ts +1 -0
  176. package/lib/stores/QueryLoaderState.d.ts.map +1 -1
  177. package/lib/stores/QueryLoaderState.js +1 -0
  178. package/lib/stores/QueryLoaderState.js.map +1 -1
  179. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -0
  180. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  181. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +8 -0
  182. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  183. package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.d.ts.map +1 -1
  184. package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js +4 -2
  185. package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js.map +1 -1
  186. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  187. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -1
  188. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  189. package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -1
  190. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +1 -1
  191. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
  192. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +2 -0
  193. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -1
  194. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +13 -2
  195. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -1
  196. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +2 -0
  197. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -1
  198. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +8 -1
  199. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -1
  200. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +1 -1
  201. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -1
  202. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +25 -1
  203. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -1
  204. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +2 -0
  205. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -1
  206. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -1
  207. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts +5 -0
  208. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
  209. package/lib/stores/milestoning/QueryBuilderMilestoningState.js +62 -3
  210. package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
  211. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +2 -0
  212. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -1
  213. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +8 -1
  214. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -1
  215. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -0
  216. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  217. package/lib/stores/shared/ValueSpecificationEditorHelper.js +7 -1
  218. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  219. package/package.json +4 -4
  220. package/src/__lib__/QueryBuilderDocumentation.ts +2 -0
  221. package/src/components/QueryBuilder.tsx +44 -0
  222. package/src/components/QueryBuilderConstantExpressionPanel.tsx +13 -4
  223. package/src/components/QueryBuilderParametersPanel.tsx +55 -0
  224. package/src/components/QueryBuilderSideBar.tsx +0 -42
  225. package/src/components/explorer/QueryBuilderMilestoningParameterEditor.tsx +114 -0
  226. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +143 -78
  227. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +445 -19
  228. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +134 -21
  229. package/src/components/result/QueryBuilderResultPanel.tsx +9 -1
  230. package/src/components/shared/QueryBuilderVariableSelector.tsx +22 -0
  231. package/src/graph-manager/QueryBuilderConfig.ts +6 -0
  232. package/src/stores/QueryBuilderValueSpecificationHelper.ts +4 -1
  233. package/src/stores/QueryLoaderState.ts +1 -0
  234. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +11 -0
  235. package/src/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.ts +6 -2
  236. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
  237. package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +1 -0
  238. package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +23 -0
  239. package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +13 -0
  240. package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +45 -0
  241. package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +3 -0
  242. package/src/stores/milestoning/QueryBuilderMilestoningState.ts +95 -7
  243. package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +13 -0
  244. package/src/stores/shared/ValueSpecificationEditorHelper.ts +11 -0
  245. package/tsconfig.json +1 -1
  246. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +0 -1
  247. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +0 -102
  248. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +0 -1
  249. 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
- ) => Promise<void>;
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 = useCallback(
224
- (item: QueryBuilderProjectionColumnDragSource): Promise<void> =>
225
- onColumnChange(item.columnState),
226
- [onColumnChange],
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
- return (
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
- <div className="query-builder-column-badge__content">
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
- (item: QueryBuilderVariableDragSource): void => {
319
- const parameterType = item.variable.genericType?.value.rawType;
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
- conditionValueType &&
324
- isTypeCompatibleForAssignment(parameterType, conditionValueType)
325
- ) {
326
- node.condition.buildFromValueSpec(item.variable);
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: [QUERY_BUILDER_VARIABLE_DND_TYPE],
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: monitor.isOver({ shallow: true }),
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
- const { isDroppable } = useDragLayer((monitor) => ({
380
- isDroppable:
381
- monitor.isDragging() &&
382
- (monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
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={changeRightCol}
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
- isDroppable={isDroppable}
455
- label="Add New Logical Group"
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={isDragOver}
814
+ isDragOver={deepIsDragOver}
750
815
  />
751
816
  )}
752
817
  {node instanceof