@finos/legend-query-builder 4.9.4 → 4.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderTesting.d.ts +4 -1
- package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTesting.js +5 -1
- package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +80 -90
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +1 -0
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +13 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +42 -24
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +3 -2
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +145 -8
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/index.css +16 -0
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +5 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +14 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +3 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +31 -2
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.d.ts +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.js +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +3 -23
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +31 -5
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +125 -30
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +21 -8
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts +3 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +20 -17
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +5 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +32 -27
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +10 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +5 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +17 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +7 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +27 -0
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +5 -5
- package/src/__lib__/QueryBuilderTesting.ts +5 -1
- package/src/components/QueryBuilderResultPanel.tsx +127 -135
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +25 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +102 -49
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +6 -2
- package/src/components/filter/QueryBuilderFilterPanel.tsx +239 -21
- package/src/stores/QueryBuilderConstantsState.ts +30 -0
- package/src/stores/QueryBuilderResultState.ts +36 -1
- package/src/stores/QueryBuilderStateHashUtils.ts +2 -0
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +4 -50
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +180 -34
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +38 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +36 -20
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -6
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +6 -6
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +12 -13
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +10 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +5 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +48 -43
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +12 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +10 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +5 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +6 -6
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +26 -4
- package/src/stores/filter/QueryBuilderFilterState.ts +40 -1
@@ -466,6 +466,7 @@ export class QueryBuilderFilterState
|
|
466
466
|
addNodeFromNode: action,
|
467
467
|
replaceBlankNodeWithNode: action,
|
468
468
|
addGroupConditionNodeFromNode: action,
|
469
|
+
newGroupConditionFromNode: action,
|
469
470
|
newGroupWithConditionFromNode: action,
|
470
471
|
removeNodeAndPruneBranch: action,
|
471
472
|
pruneTree: action,
|
@@ -514,7 +515,7 @@ export class QueryBuilderFilterState
|
|
514
515
|
return rootId ? this.getNode(rootId) : undefined;
|
515
516
|
}
|
516
517
|
|
517
|
-
|
518
|
+
getParentNode(
|
518
519
|
node: QueryBuilderFilterTreeNodeData,
|
519
520
|
): QueryBuilderFilterTreeOperationNodeData | undefined {
|
520
521
|
return node.parentId
|
@@ -635,6 +636,44 @@ export class QueryBuilderFilterState
|
|
635
636
|
this.addNodeFromNode(newGroupNode, fromNode);
|
636
637
|
}
|
637
638
|
|
639
|
+
/**
|
640
|
+
*
|
641
|
+
* Function to create group condition from node where either of the
|
642
|
+
* child nodes of group condition is `exists` node
|
643
|
+
*/
|
644
|
+
newGroupConditionFromNode(
|
645
|
+
fromNode:
|
646
|
+
| QueryBuilderFilterTreeConditionNodeData
|
647
|
+
| QueryBuilderFilterTreeExistsNodeData,
|
648
|
+
node?:
|
649
|
+
| QueryBuilderFilterTreeConditionNodeData
|
650
|
+
| QueryBuilderFilterTreeExistsNodeData
|
651
|
+
| undefined,
|
652
|
+
operation?: QUERY_BUILDER_GROUP_OPERATION | undefined,
|
653
|
+
): QueryBuilderFilterTreeGroupNodeData {
|
654
|
+
const fromNodeParent = this.getParentNode(fromNode);
|
655
|
+
const newGroupNode = new QueryBuilderFilterTreeGroupNodeData(
|
656
|
+
undefined,
|
657
|
+
operation ?? QUERY_BUILDER_GROUP_OPERATION.AND,
|
658
|
+
);
|
659
|
+
this.nodes.set(newGroupNode.id, newGroupNode);
|
660
|
+
fromNodeParent?.removeChildNode(fromNode);
|
661
|
+
newGroupNode.addChildNode(fromNode);
|
662
|
+
if (node) {
|
663
|
+
this.nodes.set(node.id, node);
|
664
|
+
newGroupNode.addChildNode(node);
|
665
|
+
}
|
666
|
+
newGroupNode.lambdaParameterName =
|
667
|
+
fromNodeParent?.lambdaParameterName ?? this.lambdaParameterName;
|
668
|
+
if (fromNodeParent) {
|
669
|
+
fromNodeParent.addChildNode(newGroupNode);
|
670
|
+
} else {
|
671
|
+
deleteEntry(this.rootIds, fromNode.id);
|
672
|
+
this.addRootNode(newGroupNode);
|
673
|
+
}
|
674
|
+
return newGroupNode;
|
675
|
+
}
|
676
|
+
|
638
677
|
newGroupWithConditionFromNode(
|
639
678
|
node: QueryBuilderFilterTreeNodeData | undefined,
|
640
679
|
fromNode: QueryBuilderFilterTreeNodeData | undefined,
|