igniteui-angular 11.1.39 → 11.1.42

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.
@@ -18696,9 +18696,8 @@
18696
18696
  * ```
18697
18697
  */
18698
18698
  IgxTextSelectionDirective.prototype.trigger = function () {
18699
- var _this = this;
18700
18699
  if (this.selected && this.nativeElement.value.length) {
18701
- requestAnimationFrame(function () { return _this.nativeElement.setSelectionRange(0, _this.nativeElement.value.length); });
18700
+ this.nativeElement.select();
18702
18701
  }
18703
18702
  };
18704
18703
  return IgxTextSelectionDirective;
@@ -37835,7 +37834,7 @@
37835
37834
  if (operand instanceof FilteringExpressionsTree) {
37836
37835
  var columnExprTree = operand;
37837
37836
  if (columnExprTree.fieldName === this.column.field) {
37838
- break;
37837
+ continue;
37839
37838
  }
37840
37839
  }
37841
37840
  expressionsTree.filteringOperands.push(operand);
@@ -38267,12 +38266,9 @@
38267
38266
  var col = grid.getColumnByName(field);
38268
38267
  var filteringIgnoreCase = ignoreCase || (col ? col.filteringIgnoreCase : false);
38269
38268
  var filteringTree = grid.filteringExpressionsTree;
38270
- var columnFilteringExpressionsTree = grid.filteringExpressionsTree.find(field);
38269
+ var columnFilteringExpressionsTree = filteringTree.find(field);
38271
38270
  conditionOrExpressionTree = conditionOrExpressionTree !== null && conditionOrExpressionTree !== void 0 ? conditionOrExpressionTree : columnFilteringExpressionsTree;
38272
38271
  var fieldFilterIndex = filteringTree.findIndex(field);
38273
- if (fieldFilterIndex > -1) {
38274
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
38275
- }
38276
38272
  var newFilteringTree = this.prepare_filtering_expression(filteringTree, field, value, conditionOrExpressionTree, filteringIgnoreCase, fieldFilterIndex, true);
38277
38273
  var eventArgs = { owner: grid, filteringExpressions: newFilteringTree.find(field), cancel: false };
38278
38274
  this.grid.filtering.emit(eventArgs);
@@ -38629,42 +38625,36 @@
38629
38625
  grid.page = 0;
38630
38626
  }
38631
38627
  var fieldFilterIndex = filteringTree.findIndex(fieldName);
38632
- if (fieldFilterIndex > -1) {
38633
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
38634
- }
38635
38628
  this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
38636
38629
  grid.filteringExpressionsTree = filteringTree;
38637
38630
  };
38638
- /** Modifies the filteringState object to contain the newly added fitering conditions/expressions.
38631
+ /** Modifies the filteringState object to contain the newly added filtering conditions/expressions.
38639
38632
  * If createNewTree is true, filteringState will not be modified (because it directly affects the grid.filteringExpressionsTree),
38640
38633
  * but a new object is created and returned.
38641
38634
  */
38642
38635
  IgxFilteringService.prototype.prepare_filtering_expression = function (filteringState, fieldName, searchVal, conditionOrExpressionsTree, ignoreCase, insertAtIndex, createNewTree) {
38643
38636
  if (insertAtIndex === void 0) { insertAtIndex = -1; }
38644
38637
  if (createNewTree === void 0) { createNewTree = false; }
38645
- var oldExpressionsTreeIndex = filteringState.findIndex(fieldName);
38646
38638
  var expressionsTree = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
38647
38639
  conditionOrExpressionsTree : null;
38648
38640
  var condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
38649
38641
  null : conditionOrExpressionsTree;
38650
- var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
38651
- var newExpressionsTree = createNewTree ?
38652
- new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName) : filteringState;
38653
- if (oldExpressionsTreeIndex === -1) {
38654
- // no expressions tree found for this field
38655
- if (expressionsTree) {
38656
- if (insertAtIndex > -1) {
38657
- newExpressionsTree.filteringOperands.splice(insertAtIndex, 0, expressionsTree);
38658
- }
38659
- else {
38660
- newExpressionsTree.filteringOperands.push(expressionsTree);
38661
- }
38642
+ var newExpressionsTree = filteringState;
38643
+ if (createNewTree) {
38644
+ newExpressionsTree = new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName);
38645
+ newExpressionsTree.filteringOperands = __spread(filteringState.filteringOperands);
38646
+ }
38647
+ if (condition) {
38648
+ var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
38649
+ expressionsTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
38650
+ expressionsTree.filteringOperands.push(newExpression);
38651
+ }
38652
+ if (expressionsTree) {
38653
+ if (insertAtIndex > -1) {
38654
+ newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
38662
38655
  }
38663
- else if (condition) {
38664
- // create expressions tree for this field and add the new expression to it
38665
- var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
38666
- newExprTree.filteringOperands.push(newExpression);
38667
- newExpressionsTree.filteringOperands.push(newExprTree);
38656
+ else {
38657
+ newExpressionsTree.filteringOperands.push(expressionsTree);
38668
38658
  }
38669
38659
  }
38670
38660
  return newExpressionsTree;
@@ -38678,7 +38668,7 @@
38678
38668
  var expressionsTree = expressions;
38679
38669
  if (expressionsTree.operator === exports.FilteringLogic.Or) {
38680
38670
  var andOperatorsCount = this.getChildAndOperatorsCount(expressionsTree);
38681
- // having more that 'And' and operator in the sub-tree means that the filter could not be represented without parentheses.
38671
+ // having more than one 'And' operator in the sub-tree means that the filter could not be represented without parentheses.
38682
38672
  return andOperatorsCount > 1;
38683
38673
  }
38684
38674
  var isComplex = false;
@@ -44959,9 +44949,7 @@
44959
44949
  if (!this.searchValue) {
44960
44950
  var anyFiltered = this.esf.listData.some(function (i) { return i.isFiltered; });
44961
44951
  var anyUnfiltered = this.esf.listData.some(function (i) { return !i.isFiltered; });
44962
- if (anyFiltered && anyUnfiltered) {
44963
- searchAllBtn.indeterminate = true;
44964
- }
44952
+ searchAllBtn.indeterminate = anyFiltered && anyUnfiltered;
44965
44953
  this.esf.listData.forEach(function (i) { return i.isSelected = i.isFiltered; });
44966
44954
  this.displayedListData = this.esf.listData;
44967
44955
  searchAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;