@finos/legend-query-builder 4.0.1 → 4.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/lib/components/QueryBuilder.js +2 -2
  2. package/lib/components/QueryBuilder.js.map +1 -1
  3. package/lib/components/QueryBuilderDiffPanel.d.ts +5 -0
  4. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderDiffPanel.js +24 -20
  6. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  7. package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
  8. package/lib/components/QueryBuilderResultPanel.js +21 -20
  9. package/lib/components/QueryBuilderResultPanel.js.map +1 -1
  10. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  11. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +5 -0
  12. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
  13. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  14. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +5 -16
  15. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  16. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  17. package/lib/components/filter/QueryBuilderFilterPanel.js +7 -14
  18. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  19. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  20. package/lib/components/shared/LambdaEditor.js +3 -3
  21. package/lib/components/shared/LambdaEditor.js.map +1 -1
  22. package/lib/index.css +1 -1
  23. package/lib/index.d.ts +2 -0
  24. package/lib/index.d.ts.map +1 -1
  25. package/lib/index.js +2 -0
  26. package/lib/index.js.map +1 -1
  27. package/lib/package.json +4 -4
  28. package/lib/stores/QueryBuilderChangeDetectionState.d.ts +1 -0
  29. package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
  30. package/lib/stores/QueryBuilderChangeDetectionState.js +4 -1
  31. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  32. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
  33. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +1 -0
  34. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
  35. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +0 -3
  36. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  37. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +0 -12
  38. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  39. package/lib/stores/filter/QueryBuilderFilterState.d.ts +0 -3
  40. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  41. package/lib/stores/filter/QueryBuilderFilterState.js +0 -13
  42. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  43. package/package.json +12 -12
  44. package/src/components/QueryBuilder.tsx +2 -2
  45. package/src/components/QueryBuilderDiffPanel.tsx +103 -73
  46. package/src/components/QueryBuilderResultPanel.tsx +44 -43
  47. package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +5 -0
  48. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +17 -29
  49. package/src/components/filter/QueryBuilderFilterPanel.tsx +19 -28
  50. package/src/components/shared/LambdaEditor.tsx +5 -3
  51. package/src/index.ts +5 -0
  52. package/src/stores/QueryBuilderChangeDetectionState.ts +5 -1
  53. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +6 -0
  54. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +0 -14
  55. package/src/stores/filter/QueryBuilderFilterState.ts +0 -13
@@ -130,15 +130,13 @@ const QueryBuilderGridResultContextMenu = observer(
130
130
  new QueryBuilderPostFilterOperator_NotEqual();
131
131
  const postFilterNotInOperator = new QueryBuilderPostFilterOperator_NotIn();
132
132
  const postFilterState = tdsState.postFilterState;
133
- const projectionColumnState = guaranteeNonNullable(
134
- tdsState.projectionColumns
135
- .filter((c) => c.columnName === event.current?.column.getColId())
136
- .concat(
137
- tdsState.aggregationState.columns
138
- .filter((c) => c.columnName === event.current?.column.getColId())
139
- .map((ag) => ag.projectionColumnState),
140
- )[0],
141
- );
133
+ const projectionColumnState = tdsState.tdsColumns
134
+ .filter((c) => c.columnName === event.current?.column.getColId())
135
+ .concat(
136
+ tdsState.aggregationState.columns
137
+ .filter((c) => c.columnName === event.current?.column.getColId())
138
+ .map((ag) => ag.projectionColumnState),
139
+ )[0];
142
140
 
143
141
  const getExistingPostFilterNode = (
144
142
  operators: QueryBuilderPostFilterOperator[],
@@ -153,7 +151,7 @@ const QueryBuilderGridResultContextMenu = observer(
153
151
  .filter(
154
152
  (n) =>
155
153
  (n as QueryBuilderPostFilterTreeConditionNodeData).condition
156
- .columnState.columnName === projectionColumnState.columnName &&
154
+ .columnState.columnName === projectionColumnState?.columnName &&
157
155
  operators
158
156
  .map((op) => op.getLabel())
159
157
  .includes(
@@ -188,42 +186,43 @@ const QueryBuilderGridResultContextMenu = observer(
188
186
  const generateNewPostFilterConditionNodeData = async (
189
187
  operator: QueryBuilderPostFilterOperator,
190
188
  ): Promise<void> => {
191
- let postFilterConditionState: PostFilterConditionState;
192
- try {
193
- postFilterConditionState = new PostFilterConditionState(
194
- postFilterState,
195
- projectionColumnState,
196
- undefined,
197
- operator,
198
- );
199
- if (
200
- projectionColumnState instanceof
201
- QueryBuilderDerivationProjectionColumnState
202
- ) {
203
- await flowResult(
204
- projectionColumnState.fetchDerivationLambdaReturnType(),
189
+ if (projectionColumnState) {
190
+ try {
191
+ const postFilterConditionState = new PostFilterConditionState(
192
+ postFilterState,
193
+ projectionColumnState,
194
+ undefined,
195
+ operator,
205
196
  );
206
- }
207
- const defaultFilterConditionValue =
208
- postFilterConditionState.operator.getDefaultFilterConditionValue(
209
- postFilterConditionState,
197
+ if (
198
+ projectionColumnState instanceof
199
+ QueryBuilderDerivationProjectionColumnState
200
+ ) {
201
+ await flowResult(
202
+ projectionColumnState.fetchDerivationLambdaReturnType(),
203
+ );
204
+ }
205
+ const defaultFilterConditionValue =
206
+ postFilterConditionState.operator.getDefaultFilterConditionValue(
207
+ postFilterConditionState,
208
+ );
209
+ postFilterConditionState.setValue(defaultFilterConditionValue);
210
+ updateFilterConditionValue(
211
+ defaultFilterConditionValue as InstanceValue,
210
212
  );
211
- postFilterConditionState.setValue(defaultFilterConditionValue);
212
- updateFilterConditionValue(
213
- defaultFilterConditionValue as InstanceValue,
214
- );
215
- } catch (error) {
216
- assertErrorThrown(error);
217
- applicationStore.notificationService.notifyWarning(error.message);
218
- return;
213
+ postFilterState.addNodeFromNode(
214
+ new QueryBuilderPostFilterTreeConditionNodeData(
215
+ undefined,
216
+ postFilterConditionState,
217
+ ),
218
+ undefined,
219
+ );
220
+ } catch (error) {
221
+ assertErrorThrown(error);
222
+ applicationStore.notificationService.notifyWarning(error.message);
223
+ return;
224
+ }
219
225
  }
220
- postFilterState.addNodeFromNode(
221
- new QueryBuilderPostFilterTreeConditionNodeData(
222
- undefined,
223
- postFilterConditionState,
224
- ),
225
- undefined,
226
- );
227
226
  };
228
227
 
229
228
  const updateExistingPostFilterConditionNodeData = (
@@ -323,6 +322,7 @@ const QueryBuilderGridResultContextMenu = observer(
323
322
  return (
324
323
  <MenuContent ref={ref}>
325
324
  <MenuContentItem
325
+ disabled={!projectionColumnState}
326
326
  onClick={(): void => {
327
327
  filterByOrOut(true);
328
328
  }}
@@ -330,6 +330,7 @@ const QueryBuilderGridResultContextMenu = observer(
330
330
  Filter By
331
331
  </MenuContentItem>
332
332
  <MenuContentItem
333
+ disabled={!projectionColumnState}
333
334
  onClick={(): void => {
334
335
  filterByOrOut(false);
335
336
  }}
@@ -62,6 +62,11 @@ export const TEST__setUpQueryBuilder = async (
62
62
  new LogService(),
63
63
  );
64
64
 
65
+ await graphManagerState.graphManager.initialize({
66
+ env: 'test',
67
+ tabSize: 2,
68
+ clientConfig: {},
69
+ });
65
70
  await graphManagerState.initializeSystem();
66
71
  await graphManagerState.graphManager.buildGraph(
67
72
  graphManagerState.graph,
@@ -22,7 +22,6 @@ import {
22
22
  CaretDownIcon,
23
23
  ChevronDownIcon,
24
24
  ChevronRightIcon,
25
- ClickAwayListener,
26
25
  clsx,
27
26
  ContextMenu,
28
27
  DropdownMenu,
@@ -115,18 +114,15 @@ const QueryBuilderPostFilterConditionContextMenu = observer(
115
114
  const removeNode = (): void =>
116
115
  postFilterState.removeNodeAndPruneBranch(node);
117
116
  const createCondition = (): void => {
118
- postFilterState.suppressClickawayEventListener();
119
117
  postFilterState.addNodeFromNode(
120
118
  new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined),
121
119
  node,
122
120
  );
123
121
  };
124
122
  const createGroupCondition = (): void => {
125
- postFilterState.suppressClickawayEventListener();
126
123
  postFilterState.addGroupConditionNodeFromNode(node);
127
124
  };
128
125
  const newGroupWithCondition = (): void => {
129
- postFilterState.suppressClickawayEventListener();
130
126
  postFilterState.newGroupWithConditionFromNode(undefined, node);
131
127
  };
132
128
 
@@ -730,33 +726,30 @@ const QueryBuilderPostFilterTree = observer(
730
726
  postFilterState.getNode(rootId),
731
727
  );
732
728
  const onNodeSelect = (node: QueryBuilderPostFilterTreeNodeData): void =>
733
- postFilterState.setSelectedNode(node);
729
+ postFilterState.setSelectedNode(
730
+ postFilterState.selectedNode !== node ? node : undefined,
731
+ );
734
732
  const getChildNodes = (
735
733
  node: QueryBuilderPostFilterTreeNodeData,
736
734
  ): QueryBuilderPostFilterTreeNodeData[] =>
737
735
  node instanceof QueryBuilderPostFilterTreeGroupNodeData
738
736
  ? node.childrenIds.map((id) => postFilterState.getNode(id))
739
737
  : [];
740
- const onClickAway = (): void => {
741
- postFilterState.handleClickaway();
742
- };
743
738
  return (
744
- <ClickAwayListener onClickAway={onClickAway}>
745
- <div className="tree-view__node__root query-builder-post-filter-tree__root">
746
- {rootNodes.map((node) => (
747
- <QueryBuilderPostFilterTreeNodeView
748
- key={node.id}
749
- level={0}
750
- node={node}
751
- getChildNodes={getChildNodes}
752
- onNodeSelect={onNodeSelect}
753
- innerProps={{
754
- tdsState: tdsState,
755
- }}
756
- />
757
- ))}
758
- </div>
759
- </ClickAwayListener>
739
+ <div className="tree-view__node__root query-builder-post-filter-tree__root">
740
+ {rootNodes.map((node) => (
741
+ <QueryBuilderPostFilterTreeNodeView
742
+ key={node.id}
743
+ level={0}
744
+ node={node}
745
+ getChildNodes={getChildNodes}
746
+ onNodeSelect={onNodeSelect}
747
+ innerProps={{
748
+ tdsState: tdsState,
749
+ }}
750
+ />
751
+ ))}
752
+ </div>
760
753
  );
761
754
  },
762
755
  );
@@ -786,21 +779,18 @@ const QueryBuilderPostFilterPanelContent = observer(
786
779
  QueryBuilderTelemetryHelper.logEvent_PostFilterCleanupTreeLaunched(
787
780
  applicationStore.telemetryService,
788
781
  );
789
- postFilterState.suppressClickawayEventListener();
790
782
  postFilterState.pruneTree();
791
783
  };
792
784
  const simplifyTree = (): void => {
793
785
  QueryBuilderTelemetryHelper.logEvent_PostFilterSimplifyTreeLaunched(
794
786
  applicationStore.telemetryService,
795
787
  );
796
- postFilterState.suppressClickawayEventListener();
797
788
  postFilterState.simplifyTree();
798
789
  };
799
790
  const createCondition = (): void => {
800
791
  QueryBuilderTelemetryHelper.logEvent_PostFilterCreateConditionLaunched(
801
792
  applicationStore.telemetryService,
802
793
  );
803
- postFilterState.suppressClickawayEventListener();
804
794
  postFilterState.addNodeFromNode(
805
795
  new QueryBuilderPostFilterTreeBlankConditionNodeData(undefined),
806
796
  postFilterState.selectedNode,
@@ -816,7 +806,6 @@ const QueryBuilderPostFilterPanelContent = observer(
816
806
  QueryBuilderTelemetryHelper.logEvent_PostFilterCreateLogicalGroupLaunched(
817
807
  applicationStore.telemetryService,
818
808
  );
819
- postFilterState.suppressClickawayEventListener();
820
809
  if (allowGroupCreation) {
821
810
  postFilterState.addGroupConditionNodeFromNode(
822
811
  postFilterState.selectedNode,
@@ -827,7 +816,6 @@ const QueryBuilderPostFilterPanelContent = observer(
827
816
  QueryBuilderTelemetryHelper.logEvent_PostFilterCreateGroupFromConditionLaunched(
828
817
  applicationStore.telemetryService,
829
818
  );
830
- postFilterState.suppressClickawayEventListener();
831
819
  if (
832
820
  postFilterState.selectedNode instanceof
833
821
  QueryBuilderPostFilterTreeConditionNodeData
@@ -20,7 +20,6 @@ import {
20
20
  type TreeNodeContainerProps,
21
21
  type TreeNodeViewProps,
22
22
  clsx,
23
- ClickAwayListener,
24
23
  ContextMenu,
25
24
  DropdownMenu,
26
25
  MenuContent,
@@ -328,14 +327,12 @@ const QueryBuilderFilterConditionContextMenu = observer(
328
327
  const filterState = queryBuilderState.filterState;
329
328
  const removeNode = (): void => filterState.removeNodeAndPruneBranch(node);
330
329
  const createCondition = (): void => {
331
- filterState.suppressClickawayEventListener();
332
330
  filterState.addNodeFromNode(
333
331
  new QueryBuilderFilterTreeBlankConditionNodeData(undefined),
334
332
  node,
335
333
  );
336
334
  };
337
335
  const createGroupCondition = (): void => {
338
- filterState.suppressClickawayEventListener();
339
336
  filterState.addGroupConditionNodeFromNode(node);
340
337
  };
341
338
  const newGroupWithCondition = (): void => {
@@ -343,7 +340,6 @@ const QueryBuilderFilterConditionContextMenu = observer(
343
340
  queryBuilderState.applicationStore.telemetryService,
344
341
  );
345
342
 
346
- filterState.suppressClickawayEventListener();
347
343
  filterState.newGroupWithConditionFromNode(undefined, node);
348
344
  };
349
345
 
@@ -652,32 +648,32 @@ const QueryBuilderFilterTree = observer(
652
648
  const rootNodes = filterState.rootIds.map((rootId) =>
653
649
  filterState.getNode(rootId),
654
650
  );
655
- const onNodeSelect = (node: QueryBuilderFilterTreeNodeData): void =>
656
- filterState.setSelectedNode(node);
651
+ const onNodeSelect = (node: QueryBuilderFilterTreeNodeData): void => {
652
+ filterState.setSelectedNode(
653
+ filterState.selectedNode !== node ? node : undefined,
654
+ );
655
+ };
657
656
  const getChildNodes = (
658
657
  node: QueryBuilderFilterTreeNodeData,
659
658
  ): QueryBuilderFilterTreeNodeData[] =>
660
659
  node instanceof QueryBuilderFilterTreeGroupNodeData
661
660
  ? node.childrenIds.map((id) => filterState.getNode(id))
662
661
  : [];
663
- const onClickAway = (): void => filterState.handleClickaway();
664
662
  return (
665
- <ClickAwayListener onClickAway={onClickAway}>
666
- <div className="tree-view__node__root query-builder-filter-tree__root">
667
- {rootNodes.map((node) => (
668
- <QueryBuilderFilterTreeNodeView
669
- key={node.id}
670
- level={0}
671
- node={node}
672
- getChildNodes={getChildNodes}
673
- onNodeSelect={onNodeSelect}
674
- innerProps={{
675
- queryBuilderState,
676
- }}
677
- />
678
- ))}
679
- </div>
680
- </ClickAwayListener>
663
+ <div className="tree-view__node__root query-builder-filter-tree__root">
664
+ {rootNodes.map((node) => (
665
+ <QueryBuilderFilterTreeNodeView
666
+ key={node.id}
667
+ level={0}
668
+ node={node}
669
+ getChildNodes={getChildNodes}
670
+ onNodeSelect={onNodeSelect}
671
+ innerProps={{
672
+ queryBuilderState,
673
+ }}
674
+ />
675
+ ))}
676
+ </div>
681
677
  );
682
678
  },
683
679
  );
@@ -707,21 +703,18 @@ export const QueryBuilderFilterPanel = observer(
707
703
  QueryBuilderTelemetryHelper.logEvent_FilterCleanupTreeLaunched(
708
704
  queryBuilderState.applicationStore.telemetryService,
709
705
  );
710
- filterState.suppressClickawayEventListener();
711
706
  filterState.pruneTree();
712
707
  };
713
708
  const simplifyTree = (): void => {
714
709
  QueryBuilderTelemetryHelper.logEvent_FilterSimplifyTreeLaunched(
715
710
  queryBuilderState.applicationStore.telemetryService,
716
711
  );
717
- filterState.suppressClickawayEventListener();
718
712
  filterState.simplifyTree();
719
713
  };
720
714
  const createCondition = (): void => {
721
715
  QueryBuilderTelemetryHelper.logEvent_FilterCreateConditionLaunched(
722
716
  queryBuilderState.applicationStore.telemetryService,
723
717
  );
724
- filterState.suppressClickawayEventListener();
725
718
  filterState.addNodeFromNode(
726
719
  new QueryBuilderFilterTreeBlankConditionNodeData(undefined),
727
720
  filterState.selectedNode,
@@ -736,7 +729,6 @@ export const QueryBuilderFilterPanel = observer(
736
729
  QueryBuilderTelemetryHelper.logEvent_FilterCreateLogicalGroupLaunched(
737
730
  queryBuilderState.applicationStore.telemetryService,
738
731
  );
739
- filterState.suppressClickawayEventListener();
740
732
  if (allowGroupCreation) {
741
733
  filterState.addGroupConditionNodeFromNode(filterState.selectedNode);
742
734
  }
@@ -745,7 +737,6 @@ export const QueryBuilderFilterPanel = observer(
745
737
  QueryBuilderTelemetryHelper.logEvent_FilterCreateLogicalGroupLaunched(
746
738
  applicationStore.telemetryService,
747
739
  );
748
- filterState.suppressClickawayEventListener();
749
740
  if (
750
741
  filterState.selectedNode instanceof
751
742
  QueryBuilderFilterTreeConditionNodeData
@@ -329,9 +329,10 @@ const LambdaEditor_Inner = observer(
329
329
  () => (): void => {
330
330
  if (editor) {
331
331
  disposeCodeEditor(editor);
332
+
333
+ onDidChangeModelContentEventDisposer.current?.dispose();
334
+ onDidFocusEditorWidgetDisposer.current?.dispose();
332
335
  }
333
- onDidChangeModelContentEventDisposer.current?.dispose();
334
- onDidFocusEditorWidgetDisposer.current?.dispose();
335
336
  },
336
337
  [editor],
337
338
  );
@@ -562,8 +563,9 @@ const LambdaEditor_PopUp = observer(
562
563
  () => (): void => {
563
564
  if (editor) {
564
565
  disposeCodeEditor(editor);
566
+
567
+ onDidChangeModelContentEventDisposer.current?.dispose();
565
568
  }
566
- onDidChangeModelContentEventDisposer.current?.dispose();
567
569
  },
568
570
  [editor],
569
571
  );
package/src/index.ts CHANGED
@@ -54,6 +54,10 @@ export * from './components/QueryBuilderTextEditor.js';
54
54
  export { QueryBuilderTextEditorMode } from './stores/QueryBuilderTextEditorState.js';
55
55
  export { buildSerialzieFunctionWithGraphFetch } from './stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeValueSpecificationBuilder.js';
56
56
  export { buildGetAllFunction } from './stores/QueryBuilderValueSpecificationBuilder.js';
57
+ export {
58
+ QueryBuilderDiffViewState,
59
+ QueryBuilderChangeDetectionState,
60
+ } from './stores/QueryBuilderChangeDetectionState.js';
57
61
 
58
62
  // ------------------------------------------- Shared components -------------------------------------------
59
63
 
@@ -72,6 +76,7 @@ export * from './components/execution-plan/ExecutionPlanViewer.js';
72
76
  export * from './stores/execution-plan/ExecutionPlanState.js';
73
77
 
74
78
  export * from './components/QueryLoader.js';
79
+ export * from './components/QueryBuilderDiffPanel.js';
75
80
  export * from './stores/QueryLoaderState.js';
76
81
  export * from './stores/QueryBuilder_LegendApplicationPlugin_Extension.js';
77
82
 
@@ -114,11 +114,15 @@ export class QueryBuilderChangeDetectionState {
114
114
  }
115
115
 
116
116
  showDiffViewPanel(): void {
117
+ this.diffViewState = this.buildQueryBuilderDiffViewState();
118
+ }
119
+
120
+ buildQueryBuilderDiffViewState(): QueryBuilderDiffViewState {
117
121
  assertNonNullable(
118
122
  this.querySnapshot,
119
123
  `Can't show changes: change detection is not properly initialized`,
120
124
  );
121
- this.diffViewState = new QueryBuilderDiffViewState(
125
+ return new QueryBuilderDiffViewState(
122
126
  this,
123
127
  this.querySnapshot,
124
128
  this.querybuilderState.buildQuery(),
@@ -219,6 +219,12 @@ export const processGraphFetchSerializeExpression = (
219
219
  RootGraphFetchTree,
220
220
  `Can't process serialize() expression: serialize() graph-fetch tree root is missing`,
221
221
  );
222
+
223
+ assertTrue(
224
+ graphFetchTreeRoot.subTypeTrees.length === 0,
225
+ `Can't process serialize() expression: subTypeTree is not supported.`,
226
+ );
227
+
222
228
  graphFetchTreeState.setGraphFetchTree(
223
229
  buildGraphFetchTreeData(graphFetchTreeRoot),
224
230
  );
@@ -478,7 +478,6 @@ export class QueryBuilderPostFilterState
478
478
  operators: QueryBuilderPostFilterOperator[] = [];
479
479
  rootIds: string[] = [];
480
480
  nodes = new Map<string, QueryBuilderPostFilterTreeNodeData>();
481
- _suppressClickawayEventListener = false;
482
481
 
483
482
  constructor(
484
483
  tdsState: QueryBuilderTDSState,
@@ -502,7 +501,6 @@ export class QueryBuilderPostFilterState
502
501
  collapseTree: action,
503
502
  expandTree: action,
504
503
  replaceBlankNodeWithNode: action,
505
- suppressClickawayEventListener: action,
506
504
  setRearrangingConditions: action,
507
505
  hashCode: computed,
508
506
  });
@@ -515,10 +513,6 @@ export class QueryBuilderPostFilterState
515
513
  this.isRearrangingConditions = val;
516
514
  }
517
515
 
518
- suppressClickawayEventListener(): void {
519
- this._suppressClickawayEventListener = true;
520
- }
521
-
522
516
  setSelectedNode(val: QueryBuilderPostFilterTreeNodeData | undefined): void {
523
517
  this.selectedNode = val;
524
518
  }
@@ -652,14 +646,6 @@ export class QueryBuilderPostFilterState
652
646
  }
653
647
  }
654
648
 
655
- handleClickaway(): void {
656
- if (this._suppressClickawayEventListener) {
657
- this._suppressClickawayEventListener = false;
658
- return;
659
- }
660
- this.setSelectedNode(undefined);
661
- }
662
-
663
649
  addNodeFromNode(
664
650
  node: QueryBuilderPostFilterTreeNodeData,
665
651
  fromNode: QueryBuilderPostFilterTreeNodeData | undefined,
@@ -380,7 +380,6 @@ export class QueryBuilderFilterState
380
380
  selectedNode?: QueryBuilderFilterTreeNodeData | undefined;
381
381
  isRearrangingConditions = false;
382
382
  operators: QueryBuilderFilterOperator[] = [];
383
- private _suppressClickawayEventListener = false;
384
383
  showPanel = true;
385
384
 
386
385
  constructor(
@@ -396,8 +395,6 @@ export class QueryBuilderFilterState
396
395
  showPanel: observable,
397
396
  setLambdaParameterName: action,
398
397
  setRearrangingConditions: action,
399
- suppressClickawayEventListener: action,
400
- handleClickaway: action,
401
398
  setSelectedNode: action,
402
399
  addNodeFromNode: action,
403
400
  replaceBlankNodeWithNode: action,
@@ -431,16 +428,6 @@ export class QueryBuilderFilterState
431
428
  setRearrangingConditions(val: boolean): void {
432
429
  this.isRearrangingConditions = val;
433
430
  }
434
- suppressClickawayEventListener(): void {
435
- this._suppressClickawayEventListener = true;
436
- }
437
- handleClickaway(): void {
438
- if (this._suppressClickawayEventListener) {
439
- this._suppressClickawayEventListener = false;
440
- return;
441
- }
442
- this.setSelectedNode(undefined);
443
- }
444
431
  setSelectedNode(val: QueryBuilderFilterTreeNodeData | undefined): void {
445
432
  this.selectedNode = val;
446
433
  }