@finos/legend-query-builder 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/lib/components/QueryBuilder.js +1 -1
  2. package/lib/components/QueryBuilder.js.map +1 -1
  3. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  4. package/lib/components/QueryBuilderResultPanel.js +15 -5
  5. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  6. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  7. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +19 -17
  8. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  9. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  10. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +34 -31
  11. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  12. package/lib/index.css +2 -2
  13. package/lib/index.css.map +1 -1
  14. package/lib/package.json +3 -3
  15. package/lib/stores/QueryBuilderResultState.d.ts +7 -3
  16. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  17. package/lib/stores/QueryBuilderResultState.js +14 -20
  18. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  19. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +3 -0
  20. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  21. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  22. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +10 -1
  23. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  24. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +36 -1
  25. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  26. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +6 -0
  27. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  28. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +21 -2
  29. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  30. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts +1 -0
  31. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts.map +1 -1
  32. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js +10 -1
  33. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js.map +1 -1
  34. package/package.json +10 -10
  35. package/src/components/QueryBuilder.tsx +1 -1
  36. package/src/components/QueryBuilderResultPanel.tsx +30 -17
  37. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +128 -126
  38. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +262 -256
  39. package/src/stores/QueryBuilderResultState.ts +28 -33
  40. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +5 -0
  41. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +44 -0
  42. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +28 -0
  43. package/src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts +14 -1
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderWindowState.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAa,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,IAAI,GAEL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAA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CAAC,SAAwC;QACtD,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAED,YAAY,CAAC,MAAqC;QAChD,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,OAAe;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,OAAO,IAAI,KAAK,EAAE;YACpB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YACtC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;SACvC;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,wBAAwB;YACrD,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"QueryBuilderWindowState.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAa,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,IAAI,GAEL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAK9E,MAAM,CAAC,MAAM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aAAa,CAAC,GAA8C;QAC1D,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,eAAe,CAAC,SAAwC;QACtD,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAED,YAAY,CAAC,MAAqC;QAChD,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,OAAe;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,OAAO,IAAI,KAAK,EAAE;YACpB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YACtC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;SACvC;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,wBAAwB;YACrD,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-query-builder",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Legend query builder core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,20 +45,20 @@
45
45
  "@ag-grid-community/core": "29.2.0",
46
46
  "@ag-grid-community/react": "29.2.0",
47
47
  "@ag-grid-community/styles": "29.2.0",
48
- "@finos/legend-application": "13.0.7",
49
- "@finos/legend-art": "5.0.40",
50
- "@finos/legend-graph": "26.0.0",
51
- "@finos/legend-server-depot": "4.4.10",
52
- "@finos/legend-shared": "8.0.4",
53
- "@finos/legend-storage": "3.0.44",
48
+ "@finos/legend-application": "13.0.9",
49
+ "@finos/legend-art": "5.0.42",
50
+ "@finos/legend-graph": "26.0.2",
51
+ "@finos/legend-server-depot": "4.4.12",
52
+ "@finos/legend-shared": "8.0.5",
53
+ "@finos/legend-storage": "3.0.46",
54
54
  "@testing-library/react": "14.0.0",
55
55
  "@types/papaparse": "5.3.7",
56
- "@types/react": "18.0.32",
56
+ "@types/react": "18.0.33",
57
57
  "@types/react-dom": "18.0.11",
58
58
  "mathjs": "11.8.0",
59
59
  "mobx": "6.9.0",
60
60
  "mobx-react-lite": "3.4.3",
61
- "monaco-editor": "0.36.1",
61
+ "monaco-editor": "0.37.1",
62
62
  "papaparse": "5.4.1",
63
63
  "react": "18.2.0",
64
64
  "react-dnd": "16.0.1",
@@ -66,7 +66,7 @@
66
66
  "serializr": "3.0.2"
67
67
  },
68
68
  "devDependencies": {
69
- "@finos/legend-dev-utils": "2.0.49",
69
+ "@finos/legend-dev-utils": "2.0.51",
70
70
  "@jest/globals": "29.5.0",
71
71
  "cross-env": "7.0.3",
72
72
  "eslint": "8.37.0",
@@ -478,7 +478,7 @@ export const QueryBuilder = observer(
478
478
  ) : null}
479
479
  </MenuContentItemIcon>
480
480
  <MenuContentItemLabel className="query-builder__sub-header__menu-content">
481
- Show Window Funcs
481
+ Show Window Func(s)
482
482
  </MenuContentItemLabel>
483
483
  </MenuContentItem>
484
484
  <MenuContentItem
@@ -41,7 +41,6 @@ import {
41
41
  extractExecutionResultValues,
42
42
  TDSExecutionResult,
43
43
  RawExecutionResult,
44
- EXECUTION_SERIALIZATION_FORMAT,
45
44
  EnumValueInstanceValue,
46
45
  EnumValueExplicitReference,
47
46
  } from '@finos/legend-graph';
@@ -60,6 +59,7 @@ import {
60
59
  isBoolean,
61
60
  type PlainObject,
62
61
  prettyDuration,
62
+ prettyCONSTName,
63
63
  } from '@finos/legend-shared';
64
64
  import { forwardRef, useState } from 'react';
65
65
  import type { CellMouseOverEvent } from '@ag-grid-community/core';
@@ -440,11 +440,11 @@ export const QueryBuilderResultPanel = observer(
440
440
  const resultState = queryBuilderState.resultState;
441
441
  const queryParametersState = queryBuilderState.parametersState;
442
442
  const executionResult = resultState.executionResult;
443
+ const fetchStructureImplementation =
444
+ queryBuilderState.fetchStructureState.implementation;
443
445
  const USER_ATTESTATION_MESSAGE =
444
446
  'I attest that I am aware of the sensitive data leakage risk when exporting queried data. The data I export will only be used by me.';
445
- const exportQueryResults = async (
446
- format: EXECUTION_SERIALIZATION_FORMAT,
447
- ): Promise<void> => {
447
+ const exportQueryResults = async (format: string): Promise<void> => {
448
448
  if (queryBuilderState.parametersState.parameterStates.length) {
449
449
  queryParametersState.parameterValuesEditorState.open(
450
450
  (): Promise<void> =>
@@ -460,7 +460,7 @@ export const QueryBuilderResultPanel = observer(
460
460
  }
461
461
  };
462
462
 
463
- const confirmExport = (format: EXECUTION_SERIALIZATION_FORMAT): void => {
463
+ const confirmExport = (format: string): void => {
464
464
  applicationStore.alertService.setActionAlertInfo({
465
465
  message: USER_ATTESTATION_MESSAGE,
466
466
  type: ActionAlertType.CAUTION,
@@ -481,8 +481,17 @@ export const QueryBuilderResultPanel = observer(
481
481
  });
482
482
  };
483
483
  const queryValidationIssues = queryBuilderState.validationIssues;
484
+ const queryWindowValidationIssues =
485
+ fetchStructureImplementation instanceof QueryBuilderTDSState
486
+ ? fetchStructureImplementation.windowState.validationIssues
487
+ : undefined;
488
+ const queryWindowStateIsValid = !queryWindowValidationIssues;
489
+
490
+ const isSupportedQueryValid =
491
+ queryBuilderState.validationIssues && queryWindowStateIsValid;
484
492
  const isQueryValid =
485
- !queryBuilderState.isQuerySupported || !queryValidationIssues;
493
+ !queryBuilderState.isQuerySupported || !isSupportedQueryValid;
494
+
486
495
  const runQuery = (): void => {
487
496
  resultState.pressedRunQuery.inProgress();
488
497
  if (queryParametersState.parameterStates.length) {
@@ -614,6 +623,10 @@ export const QueryBuilderResultPanel = observer(
614
623
  ? `Query is not valid:\n${queryValidationIssues
615
624
  .map((issue) => `\u2022 ${issue}`)
616
625
  .join('\n')}`
626
+ : queryWindowValidationIssues
627
+ ? `Query is not valid:\n${queryWindowValidationIssues
628
+ .map((issue) => `\u2022 ${issue}`)
629
+ .join('\n')}`
617
630
  : undefined
618
631
  }
619
632
  disabled={isRunQueryDisabled}
@@ -659,17 +672,17 @@ export const QueryBuilderResultPanel = observer(
659
672
  disabled={!isQueryValid}
660
673
  content={
661
674
  <MenuContent>
662
- {Object.values(EXECUTION_SERIALIZATION_FORMAT).map(
663
- (format) => (
664
- <MenuContentItem
665
- key={format}
666
- className="query-builder__result__export__dropdown__menu__item"
667
- onClick={(): void => confirmExport(format)}
668
- >
669
- {format}
670
- </MenuContentItem>
671
- ),
672
- )}
675
+ {Object.values(
676
+ fetchStructureImplementation.exportDataFormatOptions,
677
+ ).map((format) => (
678
+ <MenuContentItem
679
+ key={format}
680
+ className="query-builder__result__export__dropdown__menu__item"
681
+ onClick={(): void => confirmExport(format)}
682
+ >
683
+ {prettyCONSTName(format)}
684
+ </MenuContentItem>
685
+ ))}
673
686
  </MenuContent>
674
687
  }
675
688
  menuProps={{
@@ -24,18 +24,18 @@ import {
24
24
  MenuContent,
25
25
  MenuContentItem,
26
26
  CaretDownIcon,
27
- VerticalDragHandleIcon,
28
27
  ContextMenu,
29
28
  InputWithInlineValidation,
30
29
  SigmaIcon,
31
30
  PanelDropZone,
32
31
  DragPreviewLayer,
33
- PanelEntryDropZonePlaceholder,
34
32
  useDragPreviewLayer,
35
33
  OptionsIcon,
36
34
  PlusIcon,
37
35
  PanelContent,
38
36
  TrashIcon,
37
+ PanelDnDEntry,
38
+ PanelDnDEntryDragHandle,
39
39
  } from '@finos/legend-art';
40
40
  import {
41
41
  type QueryBuilderExplorerTreeDragSource,
@@ -223,8 +223,8 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
223
223
 
224
224
  const QueryBuilderProjectionColumnEditor = observer(
225
225
  (props: { projectionColumnState: QueryBuilderProjectionColumnState }) => {
226
+ const handleRef = useRef<HTMLDivElement>(null);
226
227
  const ref = useRef<HTMLDivElement>(null);
227
-
228
228
  const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] =
229
229
  useState(false);
230
230
  const onContextMenuOpen = (): void => setIsSelectedFromContextMenu(true);
@@ -275,6 +275,7 @@ const QueryBuilderProjectionColumnEditor = observer(
275
275
  }
276
276
  // move the item being hovered on when the dragged item position is beyond the its middle point
277
277
  const hoverBoundingReact = ref.current?.getBoundingClientRect();
278
+
278
279
  const distanceThreshold =
279
280
  ((hoverBoundingReact?.bottom ?? 0) - (hoverBoundingReact?.top ?? 0)) /
280
281
  2;
@@ -329,141 +330,142 @@ const QueryBuilderProjectionColumnEditor = observer(
329
330
  );
330
331
  const isBeingDragged =
331
332
  projectionColumnState === projectionColumnBeingDragged;
332
- dragConnector(dropConnector(ref));
333
+ dragConnector(handleRef);
334
+ dropConnector(ref);
335
+
333
336
  useDragPreviewLayer(dragPreviewConnector);
334
337
 
335
338
  return (
336
- <div ref={ref} className="query-builder__projection__column">
337
- <PanelEntryDropZonePlaceholder
338
- showPlaceholder={isBeingDragged}
339
- className="query-builder__dnd__placeholder"
339
+ <PanelDnDEntry
340
+ ref={ref}
341
+ showPlaceholder={isBeingDragged}
342
+ className="query-builder__projection__column"
343
+ >
344
+ <ContextMenu
345
+ content={
346
+ <QueryBuilderProjectionColumnContextMenu
347
+ projectionColumnState={projectionColumnState}
348
+ />
349
+ }
350
+ disabled={
351
+ !(
352
+ projectionColumnState instanceof
353
+ QueryBuilderSimpleProjectionColumnState
354
+ )
355
+ }
356
+ className={clsx('query-builder__projection__column__context-menu', {
357
+ 'query-builder__projection__column--selected-from-context-menu':
358
+ isSelectedFromContextMenu,
359
+ })}
360
+ menuProps={{ elevation: 7 }}
361
+ onOpen={onContextMenuOpen}
362
+ onClose={onContextMenuClose}
340
363
  >
341
- <ContextMenu
342
- content={
343
- <QueryBuilderProjectionColumnContextMenu
364
+ <PanelDnDEntryDragHandle
365
+ isBeingDragged={isBeingDragged}
366
+ dropTargetConnector={handleRef}
367
+ className="query-builder__projection__column__drag-handle__container"
368
+ />
369
+ <div className="query-builder__projection__column__name">
370
+ <InputWithInlineValidation
371
+ className="query-builder__projection__column__name__input input-group__input"
372
+ spellCheck={false}
373
+ value={projectionColumnState.columnName}
374
+ onChange={changeColumnName}
375
+ validationErrorMessage={
376
+ isDuplicatedColumnName ? 'Duplicated column' : undefined
377
+ }
378
+ />
379
+ </div>
380
+ <div className="query-builder__projection__column__value">
381
+ {projectionColumnState instanceof
382
+ QueryBuilderSimpleProjectionColumnState && (
383
+ <QueryBuilderSimpleProjectionColumnEditor
344
384
  projectionColumnState={projectionColumnState}
345
385
  />
346
- }
347
- disabled={
348
- !(
349
- projectionColumnState instanceof
350
- QueryBuilderSimpleProjectionColumnState
351
- )
352
- }
353
- className={clsx('query-builder__projection__column__context-menu', {
354
- 'query-builder__projection__column--selected-from-context-menu':
355
- isSelectedFromContextMenu,
356
- })}
357
- menuProps={{ elevation: 7 }}
358
- onOpen={onContextMenuOpen}
359
- onClose={onContextMenuClose}
360
- >
361
- <div className="query-builder__projection__column__drag-handle__container">
362
- <div className="query-builder__projection__column__drag-handle">
363
- <VerticalDragHandleIcon />
364
- </div>
365
- </div>
366
- <div className="query-builder__projection__column__name">
367
- <InputWithInlineValidation
368
- className="query-builder__projection__column__name__input input-group__input"
369
- spellCheck={false}
370
- value={projectionColumnState.columnName}
371
- onChange={changeColumnName}
372
- validationErrorMessage={
373
- isDuplicatedColumnName ? 'Duplicated column' : undefined
374
- }
386
+ )}
387
+ {projectionColumnState instanceof
388
+ QueryBuilderDerivationProjectionColumnState && (
389
+ <QueryBuilderDerivationProjectionColumnEditor
390
+ projectionColumnState={projectionColumnState}
375
391
  />
376
- </div>
377
- <div className="query-builder__projection__column__value">
378
- {projectionColumnState instanceof
379
- QueryBuilderSimpleProjectionColumnState && (
380
- <QueryBuilderSimpleProjectionColumnEditor
381
- projectionColumnState={projectionColumnState}
382
- />
383
- )}
384
- {projectionColumnState instanceof
385
- QueryBuilderDerivationProjectionColumnState && (
386
- <QueryBuilderDerivationProjectionColumnEditor
387
- projectionColumnState={projectionColumnState}
388
- />
392
+ )}
393
+ </div>
394
+ <div className="query-builder__projection__column__aggregate">
395
+ <div className="query-builder__projection__column__aggregate__operator">
396
+ {aggregateColumnState && (
397
+ <div className="query-builder__projection__column__aggregate__operator__label">
398
+ {aggregateColumnState.operator.getLabel(
399
+ projectionColumnState,
400
+ )}
401
+ </div>
389
402
  )}
390
- </div>
391
- <div className="query-builder__projection__column__aggregate">
392
- <div className="query-builder__projection__column__aggregate__operator">
393
- {aggregateColumnState && (
394
- <div className="query-builder__projection__column__aggregate__operator__label">
395
- {aggregateColumnState.operator.getLabel(
396
- projectionColumnState,
403
+ <DropdownMenu
404
+ className="query-builder__projection__column__aggregate__operator__dropdown"
405
+ title="Choose Aggregate Operator..."
406
+ disabled={!aggreateOperators.length}
407
+ content={
408
+ <MenuContent>
409
+ {aggregateColumnState && (
410
+ <MenuContentItem
411
+ className="query-builder__projection__column__aggregate__operator__dropdown__option"
412
+ onClick={changeOperator(undefined)}
413
+ >
414
+ (none)
415
+ </MenuContentItem>
397
416
  )}
398
- </div>
399
- )}
400
- <DropdownMenu
401
- className="query-builder__projection__column__aggregate__operator__dropdown"
402
- title="Choose Aggregate Operator..."
403
- disabled={!aggreateOperators.length}
404
- content={
405
- <MenuContent>
406
- {aggregateColumnState && (
407
- <MenuContentItem
408
- className="query-builder__projection__column__aggregate__operator__dropdown__option"
409
- onClick={changeOperator(undefined)}
410
- >
411
- (none)
412
- </MenuContentItem>
413
- )}
414
- {aggreateOperators.map((op) => (
415
- <MenuContentItem
416
- key={op.uuid}
417
- className="query-builder__projection__column__aggregate__operator__dropdown__option"
418
- onClick={changeOperator(op)}
419
- >
420
- {op.getLabel(projectionColumnState)}
421
- </MenuContentItem>
422
- ))}
423
- </MenuContent>
424
- }
425
- menuProps={{
426
- anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
427
- transformOrigin: { vertical: 'top', horizontal: 'left' },
428
- elevation: 7,
429
- }}
430
- >
431
- <div
432
- className={clsx(
433
- 'query-builder__projection__column__aggregate__operator__badge',
434
- {
435
- 'query-builder__projection__column__aggregate__operator__badge--activated':
436
- Boolean(aggregateColumnState),
437
- },
438
- )}
439
- >
440
- <SigmaIcon />
441
- </div>
442
- <div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
443
- <CaretDownIcon />
444
- </div>
445
- </DropdownMenu>
446
- </div>
447
- </div>
448
- <div className="query-builder__projection__column__actions">
449
- <button
450
- className="query-builder__projection__column__action"
451
- tabIndex={-1}
452
- onClick={removeColumn}
453
- disabled={isRemovalDisabled}
454
- title={
455
- isRemovalDisabled
456
- ? // TODO: We may want to provide a list of all places where column is in use
457
- "This column is used and can't be removed"
458
- : 'Remove'
417
+ {aggreateOperators.map((op) => (
418
+ <MenuContentItem
419
+ key={op.uuid}
420
+ className="query-builder__projection__column__aggregate__operator__dropdown__option"
421
+ onClick={changeOperator(op)}
422
+ >
423
+ {op.getLabel(projectionColumnState)}
424
+ </MenuContentItem>
425
+ ))}
426
+ </MenuContent>
459
427
  }
428
+ menuProps={{
429
+ anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
430
+ transformOrigin: { vertical: 'top', horizontal: 'left' },
431
+ elevation: 7,
432
+ }}
460
433
  >
461
- <TimesIcon />
462
- </button>
434
+ <div
435
+ className={clsx(
436
+ 'query-builder__projection__column__aggregate__operator__badge',
437
+ {
438
+ 'query-builder__projection__column__aggregate__operator__badge--activated':
439
+ Boolean(aggregateColumnState),
440
+ },
441
+ )}
442
+ >
443
+ <SigmaIcon />
444
+ </div>
445
+ <div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
446
+ <CaretDownIcon />
447
+ </div>
448
+ </DropdownMenu>
463
449
  </div>
464
- </ContextMenu>
465
- </PanelEntryDropZonePlaceholder>
466
- </div>
450
+ </div>
451
+ <div className="query-builder__projection__column__actions">
452
+ <button
453
+ className="query-builder__projection__column__action"
454
+ tabIndex={-1}
455
+ onClick={removeColumn}
456
+ disabled={isRemovalDisabled}
457
+ title={
458
+ isRemovalDisabled
459
+ ? // TODO: We may want to provide a list of all places where column is in use
460
+ "This column is used and can't be removed"
461
+ : 'Remove'
462
+ }
463
+ >
464
+ <TimesIcon />
465
+ </button>
466
+ </div>
467
+ </ContextMenu>
468
+ </PanelDnDEntry>
467
469
  );
468
470
  },
469
471
  );