igniteui-angular 21.1.3 → 21.1.5

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.
Files changed (26) hide show
  1. package/fesm2022/igniteui-angular-combo.mjs +1 -0
  2. package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
  3. package/fesm2022/igniteui-angular-core.mjs +1 -1
  4. package/fesm2022/igniteui-angular-core.mjs.map +1 -1
  5. package/fesm2022/igniteui-angular-directives.mjs +41 -12
  6. package/fesm2022/igniteui-angular-directives.mjs.map +1 -1
  7. package/fesm2022/igniteui-angular-grids-core.mjs +30 -4
  8. package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
  9. package/fesm2022/igniteui-angular-grids-grid.mjs +38 -16
  10. package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
  11. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +3 -0
  12. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
  13. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +5 -2
  14. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
  15. package/fesm2022/igniteui-angular-simple-combo.mjs +1 -0
  16. package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/skills/igniteui-angular-components/references/directives.md +5 -5
  19. package/skills/igniteui-angular-components/references/feedback.md +2 -2
  20. package/skills/igniteui-angular-components/references/form-controls.md +50 -2
  21. package/skills/igniteui-angular-components/references/setup.md +1 -2
  22. package/types/igniteui-angular-core.d.ts +1 -0
  23. package/types/igniteui-angular-directives.d.ts +13 -3
  24. package/types/igniteui-angular-grids-core.d.ts +1 -0
  25. package/types/igniteui-angular-grids-grid.d.ts +1 -0
  26. package/types/igniteui-angular-grids-hierarchical-grid.d.ts +2 -0
@@ -8912,9 +8912,17 @@ class IgxExcelStyleSearchComponent {
8912
8912
  const matchedData = cloneHierarchicalArray(this.esf.listData, 'children');
8913
8913
  this.displayedListData = this.hierarchicalSelectMatches(matchedData, searchVal);
8914
8914
  this.cdr.detectChanges();
8915
+ /**
8916
+ * There are two calls of `matchesNumericValue` in this method: one when we generate the displayedListData in hierarchicalSelectMatches method
8917
+ * and another one when going through the tree nodes. We can avoid the second call by storing the items in a set.
8918
+ * However, if the datasource is small there is no significant difference in performance but we would be adding extra memory overhead.
8919
+ * We should test this when https://github.com/IgniteUI/igniteui-angular/issues/17144 issue is fixed with 100k or 1m records
8920
+ */
8915
8921
  this.tree.nodes.forEach(n => {
8916
8922
  n.selected = true;
8917
- if (n.data.label.toString().toLowerCase().indexOf(searchVal) > -1) {
8923
+ const item = n.data;
8924
+ if (item.label.toString().toLowerCase().indexOf(searchVal) > -1 ||
8925
+ this.matchesNumericValue(item, searchVal)) {
8918
8926
  this.expandAllParentNodes(n);
8919
8927
  }
8920
8928
  });
@@ -8923,7 +8931,8 @@ class IgxExcelStyleSearchComponent {
8923
8931
  this.displayedListData = this.esf.listData.filter((it, i) => (i === 0 && it.isSpecial) ||
8924
8932
  (it.label !== null && it.label !== undefined) &&
8925
8933
  !it.isBlanks &&
8926
- it.label.toString().toLowerCase().indexOf(searchVal) > -1);
8934
+ (it.label.toString().toLowerCase().indexOf(searchVal) > -1 ||
8935
+ this.matchesNumericValue(it, searchVal)));
8927
8936
  this.esf.listData.forEach(i => i.isSelected = false);
8928
8937
  this.displayedListData.forEach(i => i.isSelected = true);
8929
8938
  this.displayedListData.splice(1, 0, this.addToCurrentFilterItem);
@@ -9143,7 +9152,8 @@ class IgxExcelStyleSearchComponent {
9143
9152
  if (node) {
9144
9153
  node.expanded = false;
9145
9154
  }
9146
- if (element.label.toString().toLowerCase().indexOf(searchVal) > -1) {
9155
+ if (element.label.toString().toLowerCase().indexOf(searchVal) > -1 ||
9156
+ this.matchesNumericValue(element, searchVal)) {
9147
9157
  element.isSelected = true;
9148
9158
  this.hierarchicalSelectAllChildren(element);
9149
9159
  this._hierarchicalSelectedItems.push(element);
@@ -9214,6 +9224,20 @@ class IgxExcelStyleSearchComponent {
9214
9224
  this.searchValue = this.searchInput.value;
9215
9225
  }
9216
9226
  }
9227
+ matchesNumericValue(item, searchVal) {
9228
+ const columnDataType = this.esf.column?.dataType;
9229
+ if (typeof item.value !== 'number' ||
9230
+ (columnDataType !== GridColumnDataType.Number &&
9231
+ columnDataType !== GridColumnDataType.Currency &&
9232
+ columnDataType !== GridColumnDataType.Percent)) {
9233
+ return false;
9234
+ }
9235
+ let numericValue = item.value;
9236
+ if (columnDataType === GridColumnDataType.Percent) {
9237
+ numericValue = parseFloat((item.value * 100).toPrecision(15));
9238
+ }
9239
+ return numericValue.toString().toLowerCase().indexOf(searchVal) > -1;
9240
+ }
9217
9241
  onArrowUpKeyDown() {
9218
9242
  if (this.focusedItem && this.focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
9219
9243
  // on ArrowUp the focus stays on the same element if it is the first focused
@@ -10491,7 +10515,9 @@ class IgxGridPinningActionsComponent extends IgxGridActionsBaseDirective {
10491
10515
  const context = this.strip.context;
10492
10516
  const grid = context.grid;
10493
10517
  grid.scrollTo(context.data, 0);
10494
- this.strip.hide();
10518
+ if (this.asMenuItems) {
10519
+ this.strip.hide();
10520
+ }
10495
10521
  }
10496
10522
  registerSVGIcons() {
10497
10523
  if (!this.isRow(this.strip.context)) {