igniteui-angular 12.3.12 → 12.3.15

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.
@@ -16244,8 +16244,8 @@
16244
16244
  }
16245
16245
  this.updateSize(info);
16246
16246
  info.settings.positionStrategy.position(info.elementRef.nativeElement.parentElement, { width: info.initialSize.width, height: info.initialSize.height }, document, true, info.settings.target);
16247
+ this.addModalClasses(info);
16247
16248
  if (info.settings.positionStrategy.settings.openAnimation) {
16248
- this.buildAnimationPlayers(info);
16249
16249
  this.playOpenAnimation(info);
16250
16250
  }
16251
16251
  else {
@@ -16342,6 +16342,7 @@
16342
16342
  if (eventArgs.cancel) {
16343
16343
  return;
16344
16344
  }
16345
+ this.removeModalClasses(info);
16345
16346
  if (info.settings.positionStrategy.settings.closeAnimation) {
16346
16347
  this.playCloseAnimation(info, event);
16347
16348
  }
@@ -16515,7 +16516,6 @@
16515
16516
  // to eliminate flickering show the element just before animation start
16516
16517
  info.wrapperElement.style.visibility = '';
16517
16518
  info.visible = true;
16518
- this.addModalClasses(info);
16519
16519
  info.openAnimationPlayer.play();
16520
16520
  };
16521
16521
  IgxOverlayService.prototype.playCloseAnimation = function (info, event) {
@@ -16541,7 +16541,6 @@
16541
16541
  }
16542
16542
  this.animationStarting.emit({ id: info.id, animationPlayer: info.closeAnimationPlayer, animationType: 'close' });
16543
16543
  info.event = event;
16544
- this.removeModalClasses(info);
16545
16544
  info.closeAnimationPlayer.play();
16546
16545
  };
16547
16546
  // TODO: check if applyAnimationParams will work with complex animations
@@ -43861,7 +43860,7 @@
43861
43860
  if (operand instanceof FilteringExpressionsTree) {
43862
43861
  var columnExprTree = operand;
43863
43862
  if (columnExprTree.fieldName === this.column.field) {
43864
- break;
43863
+ continue;
43865
43864
  }
43866
43865
  }
43867
43866
  expressionsTree.filteringOperands.push(operand);
@@ -44295,12 +44294,9 @@
44295
44294
  var col = grid.getColumnByName(field);
44296
44295
  var filteringIgnoreCase = ignoreCase || (col ? col.filteringIgnoreCase : false);
44297
44296
  var filteringTree = grid.filteringExpressionsTree;
44298
- var columnFilteringExpressionsTree = grid.filteringExpressionsTree.find(field);
44297
+ var columnFilteringExpressionsTree = filteringTree.find(field);
44299
44298
  conditionOrExpressionTree = conditionOrExpressionTree !== null && conditionOrExpressionTree !== void 0 ? conditionOrExpressionTree : columnFilteringExpressionsTree;
44300
44299
  var fieldFilterIndex = filteringTree.findIndex(field);
44301
- if (fieldFilterIndex > -1) {
44302
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
44303
- }
44304
44300
  var newFilteringTree = this.prepare_filtering_expression(filteringTree, field, value, conditionOrExpressionTree, filteringIgnoreCase, fieldFilterIndex, true);
44305
44301
  var eventArgs = { owner: grid,
44306
44302
  filteringExpressions: newFilteringTree.find(field), cancel: false };
@@ -44658,42 +44654,36 @@
44658
44654
  grid.paginator.page = 0;
44659
44655
  }
44660
44656
  var fieldFilterIndex = filteringTree.findIndex(fieldName);
44661
- if (fieldFilterIndex > -1) {
44662
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
44663
- }
44664
44657
  this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
44665
44658
  grid.filteringExpressionsTree = filteringTree;
44666
44659
  };
44667
- /** Modifies the filteringState object to contain the newly added fitering conditions/expressions.
44660
+ /** Modifies the filteringState object to contain the newly added filtering conditions/expressions.
44668
44661
  * If createNewTree is true, filteringState will not be modified (because it directly affects the grid.filteringExpressionsTree),
44669
44662
  * but a new object is created and returned.
44670
44663
  */
44671
44664
  IgxFilteringService.prototype.prepare_filtering_expression = function (filteringState, fieldName, searchVal, conditionOrExpressionsTree, ignoreCase, insertAtIndex, createNewTree) {
44672
44665
  if (insertAtIndex === void 0) { insertAtIndex = -1; }
44673
44666
  if (createNewTree === void 0) { createNewTree = false; }
44674
- var oldExpressionsTreeIndex = filteringState.findIndex(fieldName);
44675
44667
  var expressionsTree = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
44676
44668
  conditionOrExpressionsTree : null;
44677
44669
  var condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
44678
44670
  null : conditionOrExpressionsTree;
44679
- var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
44680
- var newExpressionsTree = createNewTree ?
44681
- new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName) : filteringState;
44682
- if (oldExpressionsTreeIndex === -1) {
44683
- // no expressions tree found for this field
44684
- if (expressionsTree) {
44685
- if (insertAtIndex > -1) {
44686
- newExpressionsTree.filteringOperands.splice(insertAtIndex, 0, expressionsTree);
44687
- }
44688
- else {
44689
- newExpressionsTree.filteringOperands.push(expressionsTree);
44690
- }
44671
+ var newExpressionsTree = filteringState;
44672
+ if (createNewTree) {
44673
+ newExpressionsTree = new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName);
44674
+ newExpressionsTree.filteringOperands = __spreadArray([], __read(filteringState.filteringOperands));
44675
+ }
44676
+ if (condition) {
44677
+ var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
44678
+ expressionsTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
44679
+ expressionsTree.filteringOperands.push(newExpression);
44680
+ }
44681
+ if (expressionsTree) {
44682
+ if (insertAtIndex > -1) {
44683
+ newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
44691
44684
  }
44692
- else if (condition) {
44693
- // create expressions tree for this field and add the new expression to it
44694
- var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
44695
- newExprTree.filteringOperands.push(newExpression);
44696
- newExpressionsTree.filteringOperands.push(newExprTree);
44685
+ else {
44686
+ newExpressionsTree.filteringOperands.push(expressionsTree);
44697
44687
  }
44698
44688
  }
44699
44689
  return newExpressionsTree;
@@ -44707,7 +44697,7 @@
44707
44697
  var expressionsTree = expressions;
44708
44698
  if (expressionsTree.operator === exports.FilteringLogic.Or) {
44709
44699
  var andOperatorsCount = this.getChildAndOperatorsCount(expressionsTree);
44710
- // having more that 'And' and operator in the sub-tree means that the filter could not be represented without parentheses.
44700
+ // having more than one 'And' operator in the sub-tree means that the filter could not be represented without parentheses.
44711
44701
  return andOperatorsCount > 1;
44712
44702
  }
44713
44703
  var isComplex = false;
@@ -47837,9 +47827,7 @@
47837
47827
  if (!this.searchValue) {
47838
47828
  var anyFiltered = this.esf.listData.some(function (i) { return i.isFiltered; });
47839
47829
  var anyUnfiltered = this.esf.listData.some(function (i) { return !i.isFiltered; });
47840
- if (anyFiltered && anyUnfiltered) {
47841
- searchAllBtn.indeterminate = true;
47842
- }
47830
+ searchAllBtn.indeterminate = anyFiltered && anyUnfiltered;
47843
47831
  this.esf.listData.forEach(function (i) { return i.isSelected = i.isFiltered; });
47844
47832
  this.displayedListData = this.esf.listData;
47845
47833
  searchAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;