@finos/legend-query-builder 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/lib/__lib__/QueryBuilderDocumentation.d.ts +0 -1
  2. package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderDocumentation.js +0 -1
  4. package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
  5. package/lib/__lib__/QueryBuilderEvent.d.ts +18 -0
  6. package/lib/__lib__/QueryBuilderEvent.d.ts.map +1 -1
  7. package/lib/__lib__/QueryBuilderEvent.js +20 -0
  8. package/lib/__lib__/QueryBuilderEvent.js.map +1 -1
  9. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +14 -0
  10. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
  11. package/lib/__lib__/QueryBuilderTelemetryHelper.js +43 -1
  12. package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
  13. package/lib/components/QueryBuilder.d.ts +0 -1
  14. package/lib/components/QueryBuilder.d.ts.map +1 -1
  15. package/lib/components/QueryBuilder.js +25 -34
  16. package/lib/components/QueryBuilder.js.map +1 -1
  17. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +0 -1
  18. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  19. package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
  20. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  21. package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
  22. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  23. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
  24. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  25. package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
  26. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  27. package/lib/components/QueryBuilderSideBar.d.ts +0 -1
  28. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  29. package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
  30. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  31. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
  32. package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
  33. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
  34. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  35. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
  36. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  37. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
  38. package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
  39. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
  40. package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
  41. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
  42. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  43. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
  44. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  45. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +13 -3
  46. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  47. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +0 -1
  48. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
  49. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
  50. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  51. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -1
  52. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  53. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +1 -1
  54. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  55. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts +0 -1
  56. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  57. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +2 -2
  58. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  59. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
  60. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  61. package/lib/components/filter/QueryBuilderFilterPanel.js +14 -3
  62. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  63. package/lib/components/shared/LambdaEditor.d.ts +0 -1
  64. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  65. package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
  66. package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
  67. package/lib/components/shared/LambdaParameterValuesEditor.js +2 -1
  68. package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
  69. package/lib/components/shared/QueryBuilderVariableSelector.d.ts +0 -1
  70. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
  71. package/lib/components/watermark/QueryBuilderWatermark.d.ts +0 -1
  72. package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
  73. package/lib/index.css +2 -2
  74. package/lib/index.css.map +1 -1
  75. package/lib/package.json +4 -4
  76. package/lib/stores/QueryBuilderState.d.ts +1 -2
  77. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  78. package/lib/stores/QueryBuilderState.js +5 -6
  79. package/lib/stores/QueryBuilderState.js.map +1 -1
  80. package/package.json +10 -10
  81. package/src/__lib__/QueryBuilderDocumentation.ts +0 -2
  82. package/src/__lib__/QueryBuilderEvent.ts +20 -0
  83. package/src/__lib__/QueryBuilderTelemetryHelper.ts +131 -1
  84. package/src/components/QueryBuilder.tsx +147 -188
  85. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +96 -60
  86. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +1 -3
  87. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +2 -4
  88. package/src/components/filter/QueryBuilderFilterPanel.tsx +102 -60
  89. package/src/components/shared/LambdaParameterValuesEditor.tsx +2 -1
  90. package/src/stores/QueryBuilderState.ts +4 -9
@@ -69,7 +69,6 @@ import { QueryBuilderConstantExpressionPanel } from './QueryBuilderConstantExpre
69
69
  import { QueryBuilder_LegendApplicationPlugin } from './QueryBuilder_LegendApplicationPlugin.js';
70
70
  import { QUERY_BUILDER_SETTING_KEY } from '../__lib__/QueryBuilderSetting.js';
71
71
  import { QUERY_BUILDER_COMPONENT_ELEMENT_ID } from './QueryBuilderComponentElement.js';
72
- import { QUERY_BUILDER_DOCUMENTATION_KEY } from '../__lib__/QueryBuilderDocumentation.js';
73
72
 
74
73
  const QueryBuilderStatusBar = observer(
75
74
  (props: { queryBuilderState: QueryBuilderState }) => {
@@ -250,18 +249,6 @@ export const QueryBuilder = observer(
250
249
  const applicationStore = queryBuilderState.applicationStore;
251
250
  const openLambdaEditor = (mode: QueryBuilderTextEditorMode): void =>
252
251
  queryBuilderState.textEditorState.openModal(mode);
253
- const toggleAssistant = (): void =>
254
- applicationStore.assistantService.toggleAssistant();
255
- const queryDocEntry = applicationStore.documentationService.getDocEntry(
256
- QUERY_BUILDER_DOCUMENTATION_KEY.TUTORIAL_QUERY_BUILDER,
257
- );
258
- const openQueryTutorial = (): void => {
259
- if (queryDocEntry?.url) {
260
- applicationStore.navigationService.navigator.visitAddress(
261
- queryDocEntry.url,
262
- );
263
- }
264
- };
265
252
  const toggleShowFunctionPanel = (): void => {
266
253
  queryBuilderState.setShowFunctionsExplorerPanel(
267
254
  !queryBuilderState.showFunctionsExplorerPanel,
@@ -373,206 +360,178 @@ export const QueryBuilder = observer(
373
360
  )}
374
361
  </div>
375
362
  <div className="query-builder__sub-header__content__actions">
376
- <div
377
- title="Query title"
378
- className="query-builder__sub-header__query__title"
379
- >
380
- {queryBuilderState.titleOfQuery}
381
- </div>
382
- <div className="query-builder__sub-header__actions">
383
- <DropdownMenu
384
- className="query-builder__sub-header__custom-action"
385
- title="Show Advanced Menu..."
386
- content={
387
- <MenuContent>
363
+ <DropdownMenu
364
+ className="query-builder__sub-header__custom-action"
365
+ title="Show Advanced Menu..."
366
+ content={
367
+ <MenuContent>
368
+ <MenuContentItem
369
+ onClick={toggleShowFunctionPanel}
370
+ disabled={!queryBuilderState.isQuerySupported}
371
+ >
372
+ <MenuContentItemIcon>
373
+ {queryBuilderState.showFunctionsExplorerPanel ? (
374
+ <CheckIcon />
375
+ ) : null}
376
+ </MenuContentItemIcon>
377
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
378
+ Show Function(s)
379
+ </MenuContentItemLabel>
380
+ </MenuContentItem>
381
+ {!queryBuilderState.isParameterSupportDisabled && (
388
382
  <MenuContentItem
389
- onClick={toggleShowFunctionPanel}
390
- disabled={!queryBuilderState.isQuerySupported}
391
- >
392
- <MenuContentItemIcon>
393
- {queryBuilderState.showFunctionsExplorerPanel ? (
394
- <CheckIcon />
395
- ) : null}
396
- </MenuContentItemIcon>
397
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
398
- Show Function(s)
399
- </MenuContentItemLabel>
400
- </MenuContentItem>
401
- {!queryBuilderState.isParameterSupportDisabled && (
402
- <MenuContentItem
403
- onClick={toggleShowParameterPanel}
404
- disabled={
405
- !queryBuilderState.isQuerySupported ||
406
- queryBuilderState.parametersState.parameterStates
407
- .length > 0
408
- }
409
- >
410
- <MenuContentItemIcon>
411
- {queryBuilderState.showParametersPanel ? (
412
- <CheckIcon />
413
- ) : null}
414
- </MenuContentItemIcon>
415
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
416
- Show Parameter(s)
417
- </MenuContentItemLabel>
418
- </MenuContentItem>
419
- )}
420
- {
421
- <MenuContentItem
422
- onClick={toggleConstantPanel}
423
- disabled={
424
- !queryBuilderState.isQuerySupported ||
425
- queryBuilderState.constantState.constants.length >
426
- 0
427
- }
428
- >
429
- <MenuContentItemIcon>
430
- {queryBuilderState.constantState
431
- .showConstantPanel ? (
432
- <CheckIcon />
433
- ) : null}
434
- </MenuContentItemIcon>
435
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
436
- Show Constant(s)
437
- </MenuContentItemLabel>
438
- </MenuContentItem>
439
- }
440
- <MenuContentItem
441
- onClick={toggleShowFilterPanel}
383
+ onClick={toggleShowParameterPanel}
442
384
  disabled={
443
385
  !queryBuilderState.isQuerySupported ||
444
- Array.from(
445
- queryBuilderState.filterState.nodes.values(),
446
- ).length > 0
386
+ queryBuilderState.parametersState.parameterStates
387
+ .length > 0
447
388
  }
448
389
  >
449
390
  <MenuContentItemIcon>
450
- {queryBuilderState.filterState.showPanel ? (
391
+ {queryBuilderState.showParametersPanel ? (
451
392
  <CheckIcon />
452
393
  ) : null}
453
394
  </MenuContentItemIcon>
454
395
  <MenuContentItemLabel className="query-builder__sub-header__menu-content">
455
- Show Filter
456
- </MenuContentItemLabel>
457
- </MenuContentItem>
458
- <MenuContentItem
459
- onClick={toggleShowOLAPGroupByPanel}
460
- disabled={
461
- !queryBuilderState.isQuerySupported ||
462
- !(
463
- queryBuilderState.fetchStructureState
464
- .implementation instanceof QueryBuilderTDSState
465
- ) ||
466
- queryBuilderState.fetchStructureState.implementation
467
- .windowState.windowColumns.length > 0
468
- }
469
- >
470
- <MenuContentItemIcon>
471
- {isTDSState &&
472
- guaranteeType(
473
- queryBuilderState.fetchStructureState
474
- .implementation,
475
- QueryBuilderTDSState,
476
- ).showWindowFuncPanel ? (
477
- <CheckIcon />
478
- ) : null}
479
- </MenuContentItemIcon>
480
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
481
- Show Window Func(s)
396
+ Show Parameter(s)
482
397
  </MenuContentItemLabel>
483
398
  </MenuContentItem>
399
+ )}
400
+ {
484
401
  <MenuContentItem
485
- onClick={toggleShowPostFilterPanel}
402
+ onClick={toggleConstantPanel}
486
403
  disabled={
487
404
  !queryBuilderState.isQuerySupported ||
488
- !(
489
- queryBuilderState.fetchStructureState
490
- .implementation instanceof QueryBuilderTDSState
491
- ) ||
492
- Array.from(
493
- queryBuilderState.fetchStructureState.implementation.postFilterState.nodes.values(),
494
- ).length > 0
405
+ queryBuilderState.constantState.constants.length > 0
495
406
  }
496
407
  >
497
408
  <MenuContentItemIcon>
498
- {queryBuilderState.fetchStructureState
499
- .implementation instanceof QueryBuilderTDSState &&
500
- queryBuilderState.fetchStructureState.implementation
501
- .showPostFilterPanel ? (
409
+ {queryBuilderState.constantState
410
+ .showConstantPanel ? (
502
411
  <CheckIcon />
503
412
  ) : null}
504
413
  </MenuContentItemIcon>
505
414
  <MenuContentItemLabel className="query-builder__sub-header__menu-content">
506
- Show Post-Filter
415
+ Show Constant(s)
507
416
  </MenuContentItemLabel>
508
417
  </MenuContentItem>
509
- <MenuContentItem onClick={openWatermark}>
510
- <MenuContentItemIcon>{null}</MenuContentItemIcon>
511
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
512
- Show Watermark
513
- </MenuContentItemLabel>
514
- </MenuContentItem>
515
- <MenuContentDivider />
516
- <MenuContentItem
517
- onClick={openCheckEntitlmentsEditor}
518
- disabled={
519
- queryBuilderState.isQuerySupported &&
418
+ }
419
+ <MenuContentItem
420
+ onClick={toggleShowFilterPanel}
421
+ disabled={
422
+ !queryBuilderState.isQuerySupported ||
423
+ Array.from(
424
+ queryBuilderState.filterState.nodes.values(),
425
+ ).length > 0
426
+ }
427
+ >
428
+ <MenuContentItemIcon>
429
+ {queryBuilderState.filterState.showPanel ? (
430
+ <CheckIcon />
431
+ ) : null}
432
+ </MenuContentItemIcon>
433
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
434
+ Show Filter
435
+ </MenuContentItemLabel>
436
+ </MenuContentItem>
437
+ <MenuContentItem
438
+ onClick={toggleShowOLAPGroupByPanel}
439
+ disabled={
440
+ !queryBuilderState.isQuerySupported ||
441
+ !(
520
442
  queryBuilderState.fetchStructureState
521
- .implementation instanceof QueryBuilderTDSState &&
522
- queryBuilderState.fetchStructureState.implementation
523
- .projectionColumns.length === 0
524
- }
525
- >
526
- <MenuContentItemIcon>{null}</MenuContentItemIcon>
527
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
528
- Check Entitlements
529
- </MenuContentItemLabel>
530
- </MenuContentItem>
531
- <MenuContentItem onClick={editQueryInPure}>
532
- <MenuContentItemIcon>{null}</MenuContentItemIcon>
533
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
534
- Edit Query in Pure
535
- </MenuContentItemLabel>
536
- </MenuContentItem>
537
- <MenuContentItem onClick={showQueryProtocol}>
538
- <MenuContentItemIcon>{null}</MenuContentItemIcon>
539
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
540
- Show Query Protocol
541
- </MenuContentItemLabel>
542
- </MenuContentItem>
543
- <MenuContentDivider />
544
- {queryDocEntry && (
545
- <MenuContentItem onClick={openQueryTutorial}>
546
- <MenuContentItemIcon>{null}</MenuContentItemIcon>
547
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
548
- Open Documentation
549
- </MenuContentItemLabel>
550
- </MenuContentItem>
551
- )}
552
- <MenuContentItem onClick={toggleAssistant}>
553
- <MenuContentItemIcon>
554
- {!applicationStore.assistantService.isHidden ? (
555
- <CheckIcon />
556
- ) : null}
557
- </MenuContentItemIcon>
558
- <MenuContentItemLabel className="query-builder__sub-header__menu-content">
559
- Show Virtual Assistant
560
- </MenuContentItemLabel>
561
- </MenuContentItem>
562
- </MenuContent>
563
- }
564
- menuProps={{
565
- anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
566
- transformOrigin: { vertical: 'top', horizontal: 'right' },
567
- elevation: 7,
568
- }}
569
- >
570
- <div className="query-builder__sub-header__custom-action__label">
571
- Advanced
572
- </div>
573
- <CaretDownIcon className="query-builder__sub-header__custom-action__icon" />
574
- </DropdownMenu>
575
- </div>
443
+ .implementation instanceof QueryBuilderTDSState
444
+ ) ||
445
+ queryBuilderState.fetchStructureState.implementation
446
+ .windowState.windowColumns.length > 0
447
+ }
448
+ >
449
+ <MenuContentItemIcon>
450
+ {isTDSState &&
451
+ guaranteeType(
452
+ queryBuilderState.fetchStructureState
453
+ .implementation,
454
+ QueryBuilderTDSState,
455
+ ).showWindowFuncPanel ? (
456
+ <CheckIcon />
457
+ ) : null}
458
+ </MenuContentItemIcon>
459
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
460
+ Show Window Func(s)
461
+ </MenuContentItemLabel>
462
+ </MenuContentItem>
463
+ <MenuContentItem
464
+ onClick={toggleShowPostFilterPanel}
465
+ disabled={
466
+ !queryBuilderState.isQuerySupported ||
467
+ !(
468
+ queryBuilderState.fetchStructureState
469
+ .implementation instanceof QueryBuilderTDSState
470
+ ) ||
471
+ Array.from(
472
+ queryBuilderState.fetchStructureState.implementation.postFilterState.nodes.values(),
473
+ ).length > 0
474
+ }
475
+ >
476
+ <MenuContentItemIcon>
477
+ {queryBuilderState.fetchStructureState
478
+ .implementation instanceof QueryBuilderTDSState &&
479
+ queryBuilderState.fetchStructureState.implementation
480
+ .showPostFilterPanel ? (
481
+ <CheckIcon />
482
+ ) : null}
483
+ </MenuContentItemIcon>
484
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
485
+ Show Post-Filter
486
+ </MenuContentItemLabel>
487
+ </MenuContentItem>
488
+ <MenuContentItem onClick={openWatermark}>
489
+ <MenuContentItemIcon>{null}</MenuContentItemIcon>
490
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
491
+ Show Watermark
492
+ </MenuContentItemLabel>
493
+ </MenuContentItem>
494
+ <MenuContentDivider />
495
+ <MenuContentItem
496
+ onClick={openCheckEntitlmentsEditor}
497
+ disabled={
498
+ queryBuilderState.isQuerySupported &&
499
+ queryBuilderState.fetchStructureState
500
+ .implementation instanceof QueryBuilderTDSState &&
501
+ queryBuilderState.fetchStructureState.implementation
502
+ .projectionColumns.length === 0
503
+ }
504
+ >
505
+ <MenuContentItemIcon>{null}</MenuContentItemIcon>
506
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
507
+ Check Entitlements
508
+ </MenuContentItemLabel>
509
+ </MenuContentItem>
510
+ <MenuContentItem onClick={editQueryInPure}>
511
+ <MenuContentItemIcon>{null}</MenuContentItemIcon>
512
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
513
+ Edit Query in Pure
514
+ </MenuContentItemLabel>
515
+ </MenuContentItem>
516
+ <MenuContentItem onClick={showQueryProtocol}>
517
+ <MenuContentItemIcon>{null}</MenuContentItemIcon>
518
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
519
+ Show Query Protocol
520
+ </MenuContentItemLabel>
521
+ </MenuContentItem>
522
+ </MenuContent>
523
+ }
524
+ menuProps={{
525
+ anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
526
+ transformOrigin: { vertical: 'top', horizontal: 'right' },
527
+ elevation: 7,
528
+ }}
529
+ >
530
+ <div className="query-builder__sub-header__custom-action__label">
531
+ Advanced
532
+ </div>
533
+ <CaretDownIcon className="query-builder__sub-header__custom-action__icon" />
534
+ </DropdownMenu>
576
535
  </div>
577
536
  </div>
578
537
  <div className="query-builder__main">
@@ -44,6 +44,9 @@ import {
44
44
  useDragPreviewLayer,
45
45
  BlankPanelContent,
46
46
  PanelContent,
47
+ MoreVerticalIcon,
48
+ MenuContentItemIcon,
49
+ MenuContentItemLabel,
47
50
  } from '@finos/legend-art';
48
51
  import {
49
52
  type ValueSpecification,
@@ -97,6 +100,7 @@ import {
97
100
  QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE,
98
101
  } from '../../stores/fetch-structure/tds/window/QueryBuilderWindowState.js';
99
102
  import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
103
+ import { QueryBuilderTelemetryHelper } from '../../__lib__/QueryBuilderTelemetryHelper.js';
100
104
 
101
105
  const QueryBuilderPostFilterConditionContextMenu = observer(
102
106
  forwardRef<
@@ -765,22 +769,37 @@ const QueryBuilderPostFilterPanelContent = observer(
765
769
  const rootNode = postFilterState.getRootNode();
766
770
  // actions
767
771
  const collapseTree = (): void => {
772
+ QueryBuilderTelemetryHelper.logEvent_PostFilterCollapseTreeLaunched(
773
+ applicationStore.telemetryService,
774
+ );
768
775
  postFilterState.setSelectedNode(undefined);
769
776
  postFilterState.collapseTree();
770
777
  };
771
778
  const expandTree = (): void => {
779
+ QueryBuilderTelemetryHelper.logEvent_PostFilterExpandTreeLaunched(
780
+ applicationStore.telemetryService,
781
+ );
772
782
  postFilterState.setSelectedNode(undefined);
773
783
  postFilterState.expandTree();
774
784
  };
775
785
  const pruneTree = (): void => {
786
+ QueryBuilderTelemetryHelper.logEvent_PostFilterCleanupTreeLaunched(
787
+ applicationStore.telemetryService,
788
+ );
776
789
  postFilterState.suppressClickawayEventListener();
777
790
  postFilterState.pruneTree();
778
791
  };
779
792
  const simplifyTree = (): void => {
793
+ QueryBuilderTelemetryHelper.logEvent_PostFilterSimplifyTreeLaunched(
794
+ applicationStore.telemetryService,
795
+ );
780
796
  postFilterState.suppressClickawayEventListener();
781
797
  postFilterState.simplifyTree();
782
798
  };
783
799
  const createCondition = (): void => {
800
+ QueryBuilderTelemetryHelper.logEvent_PostFilterCreateConditionLaunched(
801
+ applicationStore.telemetryService,
802
+ );
784
803
  postFilterState.suppressClickawayEventListener();
785
804
  postFilterState.addNodeFromNode(
786
805
  new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined),
@@ -794,6 +813,9 @@ const QueryBuilderPostFilterPanelContent = observer(
794
813
  rootNode instanceof QueryBuilderPostFilterTreeGroupNodeData)); // or if it is the root note, it has to be a group node
795
814
 
796
815
  const createGroupCondition = (): void => {
816
+ QueryBuilderTelemetryHelper.logEvent_PostFilterCreateLogicalGroupLaunched(
817
+ applicationStore.telemetryService,
818
+ );
797
819
  postFilterState.suppressClickawayEventListener();
798
820
  if (allowGroupCreation) {
799
821
  postFilterState.addGroupConditionNodeFromNode(
@@ -802,6 +824,9 @@ const QueryBuilderPostFilterPanelContent = observer(
802
824
  }
803
825
  };
804
826
  const newGroupWithCondition = (): void => {
827
+ QueryBuilderTelemetryHelper.logEvent_PostFilterCreateGroupFromConditionLaunched(
828
+ applicationStore.telemetryService,
829
+ );
805
830
  postFilterState.suppressClickawayEventListener();
806
831
  if (
807
832
  postFilterState.selectedNode instanceof
@@ -889,69 +914,80 @@ const QueryBuilderPostFilterPanelContent = observer(
889
914
  <div className="panel__header__title__label">post-filter</div>
890
915
  </div>
891
916
  <div className="panel__header__actions">
892
- <button
893
- className="panel__header__action"
894
- onClick={createCondition}
895
- tabIndex={-1}
896
- title="Create Condition"
897
- >
898
- <PlusIcon />
899
- </button>
900
- <button
917
+ <DropdownMenu
901
918
  className="panel__header__action"
902
- disabled={
903
- !(
904
- postFilterState.selectedNode instanceof
905
- QueryBuilderPostFilterTreeConditionNodeData
906
- )
919
+ title="Show Filter Options Menu..."
920
+ content={
921
+ <MenuContent>
922
+ <MenuContentItem onClick={createCondition}>
923
+ <MenuContentItemIcon>
924
+ <PlusIcon />
925
+ </MenuContentItemIcon>
926
+ <MenuContentItemLabel>
927
+ Create Condition
928
+ </MenuContentItemLabel>
929
+ </MenuContentItem>
930
+ <MenuContentItem
931
+ disabled={
932
+ !(
933
+ postFilterState.selectedNode instanceof
934
+ QueryBuilderPostFilterTreeConditionNodeData
935
+ )
936
+ }
937
+ onClick={newGroupWithCondition}
938
+ >
939
+ <MenuContentItemIcon>
940
+ <PlusCircleIcon />
941
+ </MenuContentItemIcon>
942
+ <MenuContentItemLabel>
943
+ Create Group From Condition
944
+ </MenuContentItemLabel>
945
+ </MenuContentItem>
946
+ <MenuContentItem
947
+ disabled={!allowGroupCreation}
948
+ title={
949
+ !allowGroupCreation
950
+ ? 'Please select a filter node first to create logical group'
951
+ : ''
952
+ }
953
+ onClick={createGroupCondition}
954
+ >
955
+ <MenuContentItemIcon>
956
+ <NewFolderIcon />
957
+ </MenuContentItemIcon>
958
+ <MenuContentItemLabel>
959
+ Create Logical Group
960
+ </MenuContentItemLabel>
961
+ </MenuContentItem>
962
+ <MenuContentItem onClick={pruneTree}>
963
+ <MenuContentItemIcon>
964
+ <TrashIcon />
965
+ </MenuContentItemIcon>
966
+ <MenuContentItemLabel>Cleanup Tree</MenuContentItemLabel>
967
+ </MenuContentItem>
968
+ <MenuContentItem onClick={simplifyTree}>
969
+ <MenuContentItemIcon>
970
+ <CircleIcon />
971
+ </MenuContentItemIcon>
972
+ <MenuContentItemLabel>Simplify Tree</MenuContentItemLabel>
973
+ </MenuContentItem>
974
+ <MenuContentItem onClick={collapseTree}>
975
+ <MenuContentItemIcon>
976
+ <CompressIcon />
977
+ </MenuContentItemIcon>
978
+ <MenuContentItemLabel>Collapse Tree</MenuContentItemLabel>
979
+ </MenuContentItem>
980
+ <MenuContentItem onClick={expandTree}>
981
+ <MenuContentItemIcon>
982
+ <ExpandIcon />
983
+ </MenuContentItemIcon>
984
+ <MenuContentItemLabel>Expand Tree</MenuContentItemLabel>
985
+ </MenuContentItem>
986
+ </MenuContent>
907
987
  }
908
- onClick={newGroupWithCondition}
909
- tabIndex={-1}
910
- title="Create Group From Condition"
911
- >
912
- <PlusCircleIcon />
913
- </button>
914
- <button
915
- className="panel__header__action"
916
- disabled={!allowGroupCreation}
917
- onClick={createGroupCondition}
918
- tabIndex={-1}
919
- title="Create Logical Group"
920
988
  >
921
- <NewFolderIcon />
922
- </button>
923
- <button
924
- className="panel__header__action"
925
- onClick={pruneTree}
926
- tabIndex={-1}
927
- title="Cleanup Tree"
928
- >
929
- <TrashIcon />
930
- </button>
931
- <button
932
- className="panel__header__action"
933
- onClick={simplifyTree}
934
- tabIndex={-1}
935
- title="Simplify Tree"
936
- >
937
- <CircleIcon />
938
- </button>
939
- <button
940
- className="panel__header__action"
941
- onClick={collapseTree}
942
- tabIndex={-1}
943
- title="Collapse Tree"
944
- >
945
- <CompressIcon />
946
- </button>
947
- <button
948
- className="panel__header__action"
949
- onClick={expandTree}
950
- tabIndex={-1}
951
- title="Expand Tree"
952
- >
953
- <ExpandIcon />
954
- </button>
989
+ <MoreVerticalIcon className="query-builder__icon__more-options" />
990
+ </DropdownMenu>
955
991
  </div>
956
992
  </div>
957
993
  <PanelContent>
@@ -372,9 +372,7 @@ const QueryBuilderProjectionColumnEditor = observer(
372
372
  spellCheck={false}
373
373
  value={projectionColumnState.columnName}
374
374
  onChange={changeColumnName}
375
- validationErrorMessage={
376
- isDuplicatedColumnName ? 'Duplicated column' : undefined
377
- }
375
+ error={isDuplicatedColumnName ? 'Duplicated column' : undefined}
378
376
  />
379
377
  </div>
380
378
  <div className="query-builder__projection__column__value">
@@ -513,9 +513,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
513
513
  spellCheck={false}
514
514
  value={windowColumnState.columnName}
515
515
  onChange={changeColumnName}
516
- validationErrorMessage={
517
- isDuplicatedColumnName ? 'Duplicated column' : undefined
518
- }
516
+ error={isDuplicatedColumnName ? 'Duplicated column' : undefined}
519
517
  />
520
518
  </PanelFormSection>
521
519
  </div>
@@ -1087,7 +1085,7 @@ const QueryBuilderWindowColumnEditor = observer(
1087
1085
  spellCheck={false}
1088
1086
  value={windowColumnState.columnName}
1089
1087
  onChange={changeColumnName}
1090
- validationErrorMessage={
1088
+ error={
1091
1089
  isDuplicatedColumnName
1092
1090
  ? 'Duplicated column'
1093
1091
  : isInvalidColumnName