@finos/legend-query-builder 4.0.2 → 4.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) 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/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  8. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +5 -0
  9. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
  10. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  11. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +5 -16
  12. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  13. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  14. package/lib/components/filter/QueryBuilderFilterPanel.js +7 -14
  15. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  16. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  17. package/lib/components/shared/LambdaEditor.js +3 -3
  18. package/lib/components/shared/LambdaEditor.js.map +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/index.d.ts +2 -0
  21. package/lib/index.d.ts.map +1 -1
  22. package/lib/index.js +2 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib/package.json +1 -1
  25. package/lib/stores/QueryBuilderChangeDetectionState.d.ts +1 -0
  26. package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
  27. package/lib/stores/QueryBuilderChangeDetectionState.js +4 -1
  28. package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
  29. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
  30. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +1 -0
  31. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
  32. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +0 -3
  33. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  34. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +0 -12
  35. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  36. package/lib/stores/filter/QueryBuilderFilterState.d.ts +0 -3
  37. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  38. package/lib/stores/filter/QueryBuilderFilterState.js +0 -13
  39. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  40. package/package.json +9 -9
  41. package/src/components/QueryBuilder.tsx +2 -2
  42. package/src/components/QueryBuilderDiffPanel.tsx +103 -73
  43. package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +5 -0
  44. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +17 -29
  45. package/src/components/filter/QueryBuilderFilterPanel.tsx +19 -28
  46. package/src/components/shared/LambdaEditor.tsx +5 -3
  47. package/src/index.ts +5 -0
  48. package/src/stores/QueryBuilderChangeDetectionState.ts +5 -1
  49. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +6 -0
  50. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +0 -14
  51. package/src/stores/filter/QueryBuilderFilterState.ts +0 -13
@@ -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
  }