igniteui-angular 12.3.12 → 12.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/igniteui-angular.umd.js +17 -25
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/esm2015/lib/grids/filtering/excel-style/excel-style-search.component.js +2 -4
- package/esm2015/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.js +2 -2
- package/esm2015/lib/grids/filtering/grid-filtering.service.js +16 -22
- package/fesm2015/igniteui-angular.js +17 -25
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/lib/grids/filtering/grid-filtering.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -43861,7 +43861,7 @@
|
|
|
43861
43861
|
if (operand instanceof FilteringExpressionsTree) {
|
|
43862
43862
|
var columnExprTree = operand;
|
|
43863
43863
|
if (columnExprTree.fieldName === this.column.field) {
|
|
43864
|
-
|
|
43864
|
+
continue;
|
|
43865
43865
|
}
|
|
43866
43866
|
}
|
|
43867
43867
|
expressionsTree.filteringOperands.push(operand);
|
|
@@ -44295,12 +44295,9 @@
|
|
|
44295
44295
|
var col = grid.getColumnByName(field);
|
|
44296
44296
|
var filteringIgnoreCase = ignoreCase || (col ? col.filteringIgnoreCase : false);
|
|
44297
44297
|
var filteringTree = grid.filteringExpressionsTree;
|
|
44298
|
-
var columnFilteringExpressionsTree =
|
|
44298
|
+
var columnFilteringExpressionsTree = filteringTree.find(field);
|
|
44299
44299
|
conditionOrExpressionTree = conditionOrExpressionTree !== null && conditionOrExpressionTree !== void 0 ? conditionOrExpressionTree : columnFilteringExpressionsTree;
|
|
44300
44300
|
var fieldFilterIndex = filteringTree.findIndex(field);
|
|
44301
|
-
if (fieldFilterIndex > -1) {
|
|
44302
|
-
filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
|
|
44303
|
-
}
|
|
44304
44301
|
var newFilteringTree = this.prepare_filtering_expression(filteringTree, field, value, conditionOrExpressionTree, filteringIgnoreCase, fieldFilterIndex, true);
|
|
44305
44302
|
var eventArgs = { owner: grid,
|
|
44306
44303
|
filteringExpressions: newFilteringTree.find(field), cancel: false };
|
|
@@ -44664,14 +44661,13 @@
|
|
|
44664
44661
|
this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
|
|
44665
44662
|
grid.filteringExpressionsTree = filteringTree;
|
|
44666
44663
|
};
|
|
44667
|
-
/** Modifies the filteringState object to contain the newly added
|
|
44664
|
+
/** Modifies the filteringState object to contain the newly added filtering conditions/expressions.
|
|
44668
44665
|
* If createNewTree is true, filteringState will not be modified (because it directly affects the grid.filteringExpressionsTree),
|
|
44669
44666
|
* but a new object is created and returned.
|
|
44670
44667
|
*/
|
|
44671
44668
|
IgxFilteringService.prototype.prepare_filtering_expression = function (filteringState, fieldName, searchVal, conditionOrExpressionsTree, ignoreCase, insertAtIndex, createNewTree) {
|
|
44672
44669
|
if (insertAtIndex === void 0) { insertAtIndex = -1; }
|
|
44673
44670
|
if (createNewTree === void 0) { createNewTree = false; }
|
|
44674
|
-
var oldExpressionsTreeIndex = filteringState.findIndex(fieldName);
|
|
44675
44671
|
var expressionsTree = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
|
|
44676
44672
|
conditionOrExpressionsTree : null;
|
|
44677
44673
|
var condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
|
|
@@ -44679,23 +44675,21 @@
|
|
|
44679
44675
|
var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
|
|
44680
44676
|
var newExpressionsTree = createNewTree ?
|
|
44681
44677
|
new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName) : filteringState;
|
|
44682
|
-
|
|
44683
|
-
|
|
44684
|
-
if (
|
|
44685
|
-
|
|
44686
|
-
newExpressionsTree.filteringOperands.splice(insertAtIndex, 0, expressionsTree);
|
|
44687
|
-
}
|
|
44688
|
-
else {
|
|
44689
|
-
newExpressionsTree.filteringOperands.push(expressionsTree);
|
|
44690
|
-
}
|
|
44678
|
+
// no expressions tree found for this field
|
|
44679
|
+
if (expressionsTree) {
|
|
44680
|
+
if (insertAtIndex > -1) {
|
|
44681
|
+
newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
|
|
44691
44682
|
}
|
|
44692
|
-
else
|
|
44693
|
-
|
|
44694
|
-
var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
|
|
44695
|
-
newExprTree.filteringOperands.push(newExpression);
|
|
44696
|
-
newExpressionsTree.filteringOperands.push(newExprTree);
|
|
44683
|
+
else {
|
|
44684
|
+
newExpressionsTree.filteringOperands.push(expressionsTree);
|
|
44697
44685
|
}
|
|
44698
44686
|
}
|
|
44687
|
+
else if (condition) {
|
|
44688
|
+
// create expressions tree for this field and add the new expression to it
|
|
44689
|
+
var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
|
|
44690
|
+
newExprTree.filteringOperands.push(newExpression);
|
|
44691
|
+
newExpressionsTree.filteringOperands.push(newExprTree);
|
|
44692
|
+
}
|
|
44699
44693
|
return newExpressionsTree;
|
|
44700
44694
|
};
|
|
44701
44695
|
IgxFilteringService.prototype.isFilteringTreeComplex = function (expressions) {
|
|
@@ -44707,7 +44701,7 @@
|
|
|
44707
44701
|
var expressionsTree = expressions;
|
|
44708
44702
|
if (expressionsTree.operator === exports.FilteringLogic.Or) {
|
|
44709
44703
|
var andOperatorsCount = this.getChildAndOperatorsCount(expressionsTree);
|
|
44710
|
-
// having more
|
|
44704
|
+
// having more than one 'And' operator in the sub-tree means that the filter could not be represented without parentheses.
|
|
44711
44705
|
return andOperatorsCount > 1;
|
|
44712
44706
|
}
|
|
44713
44707
|
var isComplex = false;
|
|
@@ -47837,9 +47831,7 @@
|
|
|
47837
47831
|
if (!this.searchValue) {
|
|
47838
47832
|
var anyFiltered = this.esf.listData.some(function (i) { return i.isFiltered; });
|
|
47839
47833
|
var anyUnfiltered = this.esf.listData.some(function (i) { return !i.isFiltered; });
|
|
47840
|
-
|
|
47841
|
-
searchAllBtn.indeterminate = true;
|
|
47842
|
-
}
|
|
47834
|
+
searchAllBtn.indeterminate = anyFiltered && anyUnfiltered;
|
|
47843
47835
|
this.esf.listData.forEach(function (i) { return i.isSelected = i.isFiltered; });
|
|
47844
47836
|
this.displayedListData = this.esf.listData;
|
|
47845
47837
|
searchAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;
|