@finos/legend-query-builder 4.14.58 → 4.14.59

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +3 -2
  2. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  3. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +33 -54
  4. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  5. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +5 -2
  6. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  7. package/lib/components/filter/QueryBuilderFilterPanel.js +37 -32
  8. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  9. package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
  10. package/lib/components/result/tds/QueryBuilderTDSGridResult.js +4 -2
  11. package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
  12. package/lib/index.css +1 -17
  13. package/lib/index.css.map +1 -1
  14. package/lib/package.json +1 -1
  15. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +3 -3
  16. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  17. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +3 -3
  18. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  19. package/lib/stores/filter/QueryBuilderFilterState.d.ts +3 -3
  20. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  21. package/lib/stores/filter/QueryBuilderFilterState.js +3 -3
  22. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  23. package/package.json +8 -8
  24. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +73 -116
  25. package/src/components/filter/QueryBuilderFilterPanel.tsx +43 -35
  26. package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +4 -2
  27. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +3 -3
  28. package/src/stores/filter/QueryBuilderFilterState.ts +3 -3
@@ -82,7 +82,6 @@ import {
82
82
  PostFilterTDSColumnValueConditionValueState,
83
83
  } from '../../stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js';
84
84
  import {
85
- type QueryBuilderProjectionColumnState,
86
85
  type QueryBuilderProjectionColumnDragSource,
87
86
  QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
88
87
  QueryBuilderDerivationProjectionColumnState,
@@ -115,6 +114,23 @@ import {
115
114
  import { QueryBuilderPropertyNameDisplay } from '../QueryBuilderPropertyExpressionEditor.js';
116
115
  import { convertTextToPrimitiveInstanceValue } from '../../stores/shared/ValueSpecificationEditorHelper.js';
117
116
 
117
+ export const CAN_DROP_MAIN_GROUP_DND_TYPES = [
118
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
119
+ QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
120
+ ];
121
+
122
+ export const CAN_DROP_POST_FILTER_NODE_DND_TYPES = [
123
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
124
+ QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
125
+ QUERY_BUILDER_POST_FILTER_DND_TYPE.CONDITION,
126
+ ];
127
+
128
+ export const CAN_DROP_POST_FILTER_VALUE_DND_TYPES = [
129
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
130
+ QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
131
+ QUERY_BUILDER_VARIABLE_DND_TYPE,
132
+ ];
133
+
118
134
  const QueryBuilderPostFilterConditionContextMenu = observer(
119
135
  forwardRef<
120
136
  HTMLDivElement,
@@ -169,7 +185,7 @@ const QueryBuilderPostFilterGroupConditionEditor = observer(
169
185
  isDragOver: boolean;
170
186
  isDroppable: boolean;
171
187
  }) => {
172
- const { node, isDragOver, isDroppable: isDroppable } = props;
188
+ const { node, isDragOver, isDroppable } = props;
173
189
  const switchOperation: React.MouseEventHandler<HTMLDivElement> = (
174
190
  event,
175
191
  ): void => {
@@ -211,94 +227,50 @@ export const QueryBuilderColumnBadge = observer(
211
227
  (props: {
212
228
  colState: QueryBuilderTDSColumnState;
213
229
  removeColumn: () => void;
214
- onColumnChange?:
215
- | ((columnState: QueryBuilderProjectionColumnState) => Promise<void>)
216
- | undefined;
217
230
  }) => {
218
- const { colState, onColumnChange, removeColumn } = props;
219
- const applicationStore = useApplicationStore();
231
+ const { colState, removeColumn } = props;
220
232
  const type = colState.getColumnType();
221
- const handleDrop = onColumnChange
222
- ? useCallback(
223
- (item: QueryBuilderProjectionColumnDragSource): Promise<void> =>
224
- onColumnChange(item.columnState),
225
- [onColumnChange],
226
- )
227
- : undefined;
228
- const [{ isDragOver }, dropConnector] = useDrop<
229
- QueryBuilderProjectionColumnDragSource,
230
- void,
231
- { isDragOver: boolean }
232
- >(
233
- () => ({
234
- accept: [
235
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
236
- QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
237
- ],
238
- drop: (item, monitor): void => {
239
- if (!monitor.didDrop()) {
240
- handleDrop?.(item).catch(applicationStore.alertUnhandledError);
241
- } // prevent drop event propagation to accomondate for nested DnD
242
- },
243
- collect: (monitor) => ({
244
- isDragOver: monitor.isOver({ shallow: true }),
245
- }),
246
- }),
247
- [applicationStore, handleDrop],
248
- );
249
233
 
250
- const renderColumnBadgeContent = (): React.ReactNode => (
251
- <div className="query-builder-column-badge__content">
252
- {type && (
234
+ return (
235
+ <div className="query-builder-column-badge">
236
+ <div className="query-builder-column-badge__content">
237
+ {type && (
238
+ <div
239
+ className={clsx('query-builder-column-badge__type', {
240
+ 'query-builder-column-badge__type--class':
241
+ type instanceof Class,
242
+ 'query-builder-column-badge__type--enumeration':
243
+ type instanceof Enumeration,
244
+ 'query-builder-column-badge__type--primitive':
245
+ type instanceof PrimitiveType,
246
+ })}
247
+ >
248
+ {renderPropertyTypeIcon(type)}
249
+ </div>
250
+ )}
253
251
  <div
254
- className={clsx('query-builder-column-badge__type', {
255
- 'query-builder-column-badge__type--class': type instanceof Class,
256
- 'query-builder-column-badge__type--enumeration':
257
- type instanceof Enumeration,
258
- 'query-builder-column-badge__type--primitive':
259
- type instanceof PrimitiveType,
260
- })}
252
+ className="query-builder-column-badge__property"
253
+ title={`${colState.columnName}`}
261
254
  >
262
- {renderPropertyTypeIcon(type)}
255
+ {colState.columnName}
263
256
  </div>
264
- )}
265
- <div
266
- className="query-builder-column-badge__property"
267
- title={`${colState.columnName}`}
268
- >
269
- {colState.columnName}
257
+ <QueryBuilderColumnInfoTooltip
258
+ columnState={colState}
259
+ placement="bottom-end"
260
+ >
261
+ <div className="query-builder-column-badge__property__info">
262
+ <InfoCircleIcon />
263
+ </div>
264
+ </QueryBuilderColumnInfoTooltip>
265
+ <button
266
+ className="query-builder-column-badge__action"
267
+ name="Reset"
268
+ title="Reset"
269
+ onClick={removeColumn}
270
+ >
271
+ <RefreshIcon />
272
+ </button>
270
273
  </div>
271
- <QueryBuilderColumnInfoTooltip
272
- columnState={colState}
273
- placement="bottom-end"
274
- >
275
- <div className="query-builder-column-badge__property__info">
276
- <InfoCircleIcon />
277
- </div>
278
- </QueryBuilderColumnInfoTooltip>
279
- <button
280
- className="query-builder-column-badge__action"
281
- name="Reset"
282
- title="Reset"
283
- onClick={removeColumn}
284
- >
285
- <RefreshIcon />
286
- </button>
287
- </div>
288
- );
289
-
290
- return onColumnChange ? (
291
- <div ref={dropConnector} className="query-builder-column-badge">
292
- <PanelEntryDropZonePlaceholder
293
- isDragOver={isDragOver}
294
- label="Change Property"
295
- >
296
- {renderColumnBadgeContent()}
297
- </PanelEntryDropZonePlaceholder>
298
- </div>
299
- ) : (
300
- <div className="query-builder-column-badge">
301
- {renderColumnBadgeContent()}
302
274
  </div>
303
275
  );
304
276
  },
@@ -378,10 +350,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
378
350
  { isFilterValueDragOver: boolean }
379
351
  >(
380
352
  () => ({
381
- accept: [
382
- QUERY_BUILDER_VARIABLE_DND_TYPE,
383
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
384
- ],
353
+ accept: CAN_DROP_POST_FILTER_VALUE_DND_TYPES,
385
354
  canDrop: (item): boolean =>
386
355
  canDropItemOntoNodeValue(item, node.condition),
387
356
  drop: (item, monitor): void => {
@@ -399,8 +368,9 @@ const QueryBuilderPostFilterConditionEditor = observer(
399
368
  const { isFilterValueDroppable } = useDragLayer((monitor) => ({
400
369
  isFilterValueDroppable:
401
370
  monitor.isDragging() &&
402
- (monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
403
- monitor.getItemType() === QUERY_BUILDER_VARIABLE_DND_TYPE) &&
371
+ CAN_DROP_POST_FILTER_VALUE_DND_TYPES.includes(
372
+ monitor.getItemType()?.toString() ?? '',
373
+ ) &&
404
374
  canDropItemOntoNodeValue(monitor.getItem(), node.condition),
405
375
  }));
406
376
  const resetNode = (): void => {
@@ -479,11 +449,6 @@ const QueryBuilderPostFilterConditionEditor = observer(
479
449
  rightConditionValue instanceof
480
450
  PostFilterTDSColumnValueConditionValueState
481
451
  ) {
482
- const changeRightCol = async (
483
- columnState: QueryBuilderProjectionColumnState,
484
- ): Promise<void> => {
485
- rightConditionValue.changeCol(columnState);
486
- };
487
452
  return (
488
453
  <div
489
454
  ref={dropConnector}
@@ -496,9 +461,6 @@ const QueryBuilderPostFilterConditionEditor = observer(
496
461
  >
497
462
  <QueryBuilderColumnBadge
498
463
  colState={rightConditionValue.tdsColumn}
499
- onColumnChange={
500
- isFilterValueDroppable ? changeRightCol : undefined
501
- }
502
464
  removeColumn={removeTDSColumnValue}
503
465
  />
504
466
  </PanelEntryDropZonePlaceholder>
@@ -703,11 +665,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
703
665
  { isDragOver: boolean; deepIsDragOver: boolean }
704
666
  >(
705
667
  () => ({
706
- accept: [
707
- ...Object.values(QUERY_BUILDER_POST_FILTER_DND_TYPE),
708
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
709
- QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
710
- ],
668
+ accept: CAN_DROP_POST_FILTER_NODE_DND_TYPES,
711
669
  drop: (item, monitor): void => {
712
670
  if (!monitor.didDrop()) {
713
671
  handleDrop(item, monitor.getItemType() as string);
@@ -744,8 +702,9 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
744
702
  const { isDroppable } = useDragLayer((monitor) => ({
745
703
  isDroppable:
746
704
  monitor.isDragging() &&
747
- (monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
748
- monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
705
+ CAN_DROP_POST_FILTER_NODE_DND_TYPES.includes(
706
+ monitor.getItemType()?.toString() ?? '',
707
+ ),
749
708
  }));
750
709
 
751
710
  // context menu
@@ -761,12 +720,6 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
761
720
  data-testid={
762
721
  QUERY_BUILDER_TEST_ID.QUERY_BUILDER_POST_FILTER_TREE_NODE_CONTAINER
763
722
  }
764
- onClick={
765
- node instanceof QueryBuilderPostFilterTreeConditionNodeData ||
766
- node instanceof QueryBuilderPostFilterTreeBlankConditionNodeData
767
- ? selectNode
768
- : undefined
769
- }
770
723
  className={clsx('query-builder-post-filter-tree__node__container', {
771
724
  'query-builder-post-filter-tree__node__container--group':
772
725
  node instanceof QueryBuilderPostFilterTreeGroupNodeData,
@@ -799,6 +752,12 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
799
752
  }
800
753
  className="query-builder-post-filter-tree__node__content"
801
754
  ref={dragRef}
755
+ onClick={
756
+ node instanceof QueryBuilderPostFilterTreeConditionNodeData ||
757
+ node instanceof QueryBuilderPostFilterTreeBlankConditionNodeData
758
+ ? selectNode
759
+ : undefined
760
+ }
802
761
  >
803
762
  {node instanceof QueryBuilderPostFilterTreeGroupNodeData && (
804
763
  <QueryBuilderPostFilterGroupConditionEditor
@@ -1013,8 +972,9 @@ const QueryBuilderPostFilterPanelContent = observer(
1013
972
  const { isDroppable } = useDragLayer((monitor) => ({
1014
973
  isDroppable:
1015
974
  monitor.isDragging() &&
1016
- (monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
1017
- monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
975
+ CAN_DROP_MAIN_GROUP_DND_TYPES.includes(
976
+ monitor.getItemType()?.toString() ?? '',
977
+ ),
1018
978
  }));
1019
979
 
1020
980
  // Drag and Drop
@@ -1071,10 +1031,7 @@ const QueryBuilderPostFilterPanelContent = observer(
1071
1031
  { isDragOver: boolean }
1072
1032
  >(
1073
1033
  () => ({
1074
- accept: [
1075
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
1076
- QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
1077
- ],
1034
+ accept: CAN_DROP_MAIN_GROUP_DND_TYPES,
1078
1035
  drop: (item, monitor): void => {
1079
1036
  if (!monitor.didDrop()) {
1080
1037
  handleDrop(item).catch(applicationStore.alertUnhandledError);
@@ -121,6 +121,34 @@ import { buildPropertyExpressionChain } from '../../stores/QueryBuilderValueSpec
121
121
  import { QueryBuilderPanelIssueCountBadge } from '../shared/QueryBuilderPanelIssueCountBadge.js';
122
122
  import { convertTextToPrimitiveInstanceValue } from '../../stores/shared/ValueSpecificationEditorHelper.js';
123
123
 
124
+ export const CAN_DROP_MAIN_GROUP_DND_TYPES_FETCH_SUPPORTED = [
125
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
126
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
127
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
128
+ ];
129
+
130
+ export const CAN_DROP_MAIN_GROUP_DND_TYPES = [
131
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
132
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
133
+ ];
134
+
135
+ export const CAN_DROP_FILTER_NODE_DND_TYPES_FETCH_SUPPORTED = [
136
+ QUERY_BUILDER_FILTER_DND_TYPE.CONDITION,
137
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
138
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
139
+ QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
140
+ ];
141
+
142
+ export const CAN_DROP_FILTER_NODE_DND_TYPES = [
143
+ QUERY_BUILDER_FILTER_DND_TYPE.CONDITION,
144
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
145
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
146
+ ];
147
+
148
+ export const CAN_DROP_FILTER_VALUE_DND_TYPES = [
149
+ QUERY_BUILDER_VARIABLE_DND_TYPE,
150
+ ];
151
+
124
152
  const isCollectionProperty = (
125
153
  propertyExpression: AbstractPropertyExpression,
126
154
  ): boolean => {
@@ -605,19 +633,6 @@ const buildFilterTree = (
605
633
  }
606
634
  };
607
635
 
608
- export const IS_DRAGGABLE_FILTER_DND_TYPES_FETCH_SUPPORTED = [
609
- QUERY_BUILDER_FILTER_DND_TYPE.CONDITION,
610
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
611
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
612
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
613
- ];
614
-
615
- export const IS_DRAGGABLE_FILTER_DND_TYPES = [
616
- QUERY_BUILDER_FILTER_DND_TYPE.CONDITION,
617
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
618
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
619
- ];
620
-
621
636
  const QueryBuilderFilterGroupConditionEditor = observer(
622
637
  (props: {
623
638
  node: QueryBuilderFilterTreeGroupNodeData;
@@ -762,7 +777,7 @@ const QueryBuilderFilterConditionEditor = observer(
762
777
  { isFilterValueDragOver: boolean }
763
778
  >(
764
779
  () => ({
765
- accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
780
+ accept: CAN_DROP_FILTER_VALUE_DND_TYPES,
766
781
  drop: (item, monitor): void => {
767
782
  if (!monitor.didDrop()) {
768
783
  handleDrop(item);
@@ -1084,8 +1099,8 @@ const QueryBuilderFilterTreeNodeContainer = observer(
1084
1099
  () => ({
1085
1100
  accept:
1086
1101
  queryBuilderState.TEMPORARY__isDnDFetchStructureToFilterSupported
1087
- ? IS_DRAGGABLE_FILTER_DND_TYPES_FETCH_SUPPORTED
1088
- : IS_DRAGGABLE_FILTER_DND_TYPES,
1102
+ ? CAN_DROP_FILTER_NODE_DND_TYPES_FETCH_SUPPORTED
1103
+ : CAN_DROP_FILTER_NODE_DND_TYPES,
1089
1104
  drop: (item, monitor): void => {
1090
1105
  if (!monitor.didDrop()) {
1091
1106
  handleDrop(item, monitor.getItemType() as string);
@@ -1121,8 +1136,8 @@ const QueryBuilderFilterTreeNodeContainer = observer(
1121
1136
  isDroppable:
1122
1137
  monitor.isDragging() &&
1123
1138
  (queryBuilderState.TEMPORARY__isDnDFetchStructureToFilterSupported
1124
- ? IS_DRAGGABLE_FILTER_DND_TYPES_FETCH_SUPPORTED
1125
- : IS_DRAGGABLE_FILTER_DND_TYPES
1139
+ ? CAN_DROP_FILTER_NODE_DND_TYPES_FETCH_SUPPORTED
1140
+ : CAN_DROP_FILTER_NODE_DND_TYPES
1126
1141
  ).includes(monitor.getItemType()?.toString() ?? ''),
1127
1142
  }));
1128
1143
 
@@ -1143,12 +1158,6 @@ const QueryBuilderFilterTreeNodeContainer = observer(
1143
1158
  data-testid={
1144
1159
  QUERY_BUILDER_TEST_ID.QUERY_BUILDER_FILTER_TREE_NODE_CONTAINER
1145
1160
  }
1146
- onClick={
1147
- node instanceof QueryBuilderFilterTreeConditionNodeData ||
1148
- node instanceof QueryBuilderFilterTreeBlankConditionNodeData
1149
- ? selectNode
1150
- : undefined
1151
- }
1152
1161
  className={clsx('query-builder-filter-tree__node__container', {
1153
1162
  'query-builder-filter-tree__node__container--group':
1154
1163
  node instanceof QueryBuilderFilterTreeGroupNodeData,
@@ -1185,6 +1194,12 @@ const QueryBuilderFilterTreeNodeContainer = observer(
1185
1194
  }
1186
1195
  className="query-builder-filter-tree__node__content"
1187
1196
  ref={dragRef}
1197
+ onClick={
1198
+ node instanceof QueryBuilderFilterTreeConditionNodeData ||
1199
+ node instanceof QueryBuilderFilterTreeBlankConditionNodeData
1200
+ ? selectNode
1201
+ : undefined
1202
+ }
1188
1203
  >
1189
1204
  {node instanceof QueryBuilderFilterTreeGroupNodeData && (
1190
1205
  <QueryBuilderFilterGroupConditionEditor
@@ -1408,8 +1423,8 @@ export const QueryBuilderFilterPanel = observer(
1408
1423
  isDroppable:
1409
1424
  monitor.isDragging() &&
1410
1425
  (queryBuilderState.TEMPORARY__isDnDFetchStructureToFilterSupported
1411
- ? IS_DRAGGABLE_FILTER_DND_TYPES_FETCH_SUPPORTED
1412
- : IS_DRAGGABLE_FILTER_DND_TYPES
1426
+ ? CAN_DROP_MAIN_GROUP_DND_TYPES_FETCH_SUPPORTED
1427
+ : CAN_DROP_MAIN_GROUP_DND_TYPES
1413
1428
  ).includes(monitor.getItemType()?.toString() ?? ''),
1414
1429
  }));
1415
1430
 
@@ -1459,15 +1474,8 @@ export const QueryBuilderFilterPanel = observer(
1459
1474
  () => ({
1460
1475
  accept:
1461
1476
  queryBuilderState.TEMPORARY__isDnDFetchStructureToFilterSupported
1462
- ? [
1463
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
1464
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
1465
- QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
1466
- ]
1467
- : [
1468
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY,
1469
- QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
1470
- ],
1477
+ ? CAN_DROP_MAIN_GROUP_DND_TYPES_FETCH_SUPPORTED
1478
+ : CAN_DROP_MAIN_GROUP_DND_TYPES,
1471
1479
  drop: (item, monitor): void => {
1472
1480
  if (!monitor.didDrop()) {
1473
1481
  handleDrop(item, monitor.getItemType() as string);
@@ -284,8 +284,10 @@ export const QueryBuilderTDSGridResult = observer(
284
284
  const selectedCells = [];
285
285
  if (selectedRanges) {
286
286
  for (const selectedRange of selectedRanges) {
287
- const startRow: number = selectedRange.startRow?.rowIndex ?? 0;
288
- const endRow: number = selectedRange.endRow?.rowIndex ?? 0;
287
+ const rangeStart: number = selectedRange.startRow?.rowIndex ?? 0;
288
+ const rangeEnd: number = selectedRange.endRow?.rowIndex ?? 0;
289
+ const startRow = rangeStart < rangeEnd ? rangeStart : rangeEnd;
290
+ const endRow = rangeStart < rangeEnd ? rangeEnd : rangeStart;
289
291
  const selectedColumns: string[] = selectedRange.columns.map((col) =>
290
292
  col.getColId(),
291
293
  );
@@ -81,9 +81,9 @@ import { buildtdsPropertyExpressionFromColState } from './operators/QueryBuilder
81
81
  import { TDS_COLUMN_GETTER } from '../../../../graph/QueryBuilderMetaModelConst.js';
82
82
 
83
83
  export enum QUERY_BUILDER_POST_FILTER_DND_TYPE {
84
- GROUP_CONDITION = 'GROUP_CONDITION',
85
- CONDITION = 'CONDITION',
86
- BLANK_CONDITION = 'BLANK_CONDITION',
84
+ GROUP_CONDITION = 'QUERY_BUILDER_POST_FILTER_DND_TYPE.GROUP_CONDITION',
85
+ CONDITION = 'QUERY_BUILDER_POST_FILTER_DND_TYPE.CONDITION',
86
+ BLANK_CONDITION = 'QUERY_BUILDER_POST_FILTER_DND_TYPE.BLANK_CONDITION',
87
87
  }
88
88
 
89
89
  export const getTypeFromDerivedProperty = (
@@ -62,9 +62,9 @@ import {
62
62
  import { instanceValue_setValues } from '../shared/ValueSpecificationModifierHelper.js';
63
63
 
64
64
  export enum QUERY_BUILDER_FILTER_DND_TYPE {
65
- GROUP_CONDITION = 'GROUP_CONDITION',
66
- CONDITION = 'CONDITION',
67
- BLANK_CONDITION = 'BLANK_CONDITION',
65
+ GROUP_CONDITION = 'QUERY_BUILDER_FILTER_DND_TYPE.GROUP_CONDITION',
66
+ CONDITION = 'QUERY_BUILDER_FILTER_DND_TYPE.CONDITION',
67
+ BLANK_CONDITION = 'QUERY_BUILDER_FILTER_DND_TYPE.BLANK_CONDITION',
68
68
  }
69
69
 
70
70
  export interface QueryBuilderFilterConditionDragSource {