igniteui-angular 15.0.16 → 15.0.17

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.
@@ -2623,6 +2623,19 @@ class ExportUtilities {
2623
2623
  static isNullOrWhitespaces(value) {
2624
2624
  return value === undefined || value === null || !value.trim();
2625
2625
  }
2626
+ static sanitizeValue(value) {
2627
+ if (!this.hasValue(value)) {
2628
+ return '';
2629
+ }
2630
+ else {
2631
+ const stringValue = String(value);
2632
+ return stringValue.replace(/&/g, '&')
2633
+ .replace(/</g, '&lt;')
2634
+ .replace(/>/g, '&gt;')
2635
+ .replace(/"/g, '&quot;')
2636
+ .replace(/'/g, '&apos;');
2637
+ }
2638
+ }
2626
2639
  }
2627
2640
 
2628
2641
  var FilteringExpressionsTreeType;
@@ -3910,7 +3923,7 @@ class IgxBaseExporter {
3910
3923
  .length :
3911
3924
  1;
3912
3925
  const columnInfo = {
3913
- header: columnHeader,
3926
+ header: ExportUtilities.sanitizeValue(columnHeader),
3914
3927
  dataType: column.dataType,
3915
3928
  field: column.field,
3916
3929
  skip: !exportColumn,
@@ -5158,7 +5171,7 @@ class WorksheetFile {
5158
5171
  const rowCoordinate = isVertical
5159
5172
  ? startValue + owner.maxLevel + 2
5160
5173
  : this.rowIndex;
5161
- const columnValue = dictionary.saveValue(currentCol.header, true);
5174
+ const columnValue = dictionary.saveValue(currentCol.header, true, false);
5162
5175
  columnCoordinate = (currentCol.field === GRID_LEVEL_COL
5163
5176
  ? ExcelStrings.getExcelColumn(worksheetData.columnCount + 1)
5164
5177
  : ExcelStrings.getExcelColumn(column)) + rowCoordinate;
@@ -5503,12 +5516,12 @@ class WorksheetDataDictionary {
5503
5516
  get columnWidths() {
5504
5517
  return this._columnWidths;
5505
5518
  }
5506
- saveValue(value, isHeader) {
5519
+ saveValue(value, isHeader, shouldSanitizeValue = true) {
5507
5520
  let sanitizedValue = '';
5508
5521
  const isDate = value instanceof Date;
5509
5522
  const isSavedAsString = isHeader || (typeof value !== 'number' && value !== Number(value) && !Number.isFinite(value) && !isDate);
5510
5523
  if (isSavedAsString) {
5511
- sanitizedValue = this.sanitizeValue(value);
5524
+ sanitizedValue = shouldSanitizeValue ? ExportUtilities.sanitizeValue(value) : value;
5512
5525
  if (this._dictionary[sanitizedValue] === undefined) {
5513
5526
  this._dictionary[sanitizedValue] = this._counter++;
5514
5527
  this.dirtyKeyCollections();
@@ -5524,7 +5537,7 @@ class WorksheetDataDictionary {
5524
5537
  return isSavedAsString ? this.getSanitizedValue(sanitizedValue) : -1;
5525
5538
  }
5526
5539
  getValue(value) {
5527
- return this.getSanitizedValue(this.sanitizeValue(value));
5540
+ return this.getSanitizedValue(ExportUtilities.sanitizeValue(value));
5528
5541
  }
5529
5542
  getSanitizedValue(sanitizedValue) {
5530
5543
  return this._dictionary[sanitizedValue];
@@ -5552,19 +5565,6 @@ class WorksheetDataDictionary {
5552
5565
  }
5553
5566
  return this._context;
5554
5567
  }
5555
- sanitizeValue(value) {
5556
- if (ExportUtilities.hasValue(value) === false) {
5557
- return '';
5558
- }
5559
- else {
5560
- const stringValue = String(value);
5561
- return stringValue.replace(/&/g, '&amp;')
5562
- .replace(/</g, '&lt;')
5563
- .replace(/>/g, '&gt;')
5564
- .replace(/"/g, '&quot;')
5565
- .replace(/'/g, '&apos;');
5566
- }
5567
- }
5568
5568
  dirtyKeyCollections() {
5569
5569
  this._keysAreValid = false;
5570
5570
  }
@@ -67373,9 +67373,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
67373
67373
  columnsArray = this.getSelectableColumnsAt(each);
67374
67374
  columnsArray.forEach((col) => {
67375
67375
  if (col) {
67376
- const key = headers ? col.header || col.field : col.field;
67376
+ const key = !this.isPivot && headers ? col.header || col.field : col.field;
67377
67377
  const rowData = source[row].ghostRecord ? source[row].recordRef : source[row];
67378
- const value = resolveNestedPath(rowData, col.field);
67378
+ const value = this.isPivot ? rowData.aggregationValues.get(col.field)
67379
+ : resolveNestedPath(rowData, col.field);
67379
67380
  record[key] = formatters && col.formatter ? col.formatter(value, rowData) : value;
67380
67381
  if (columnData) {
67381
67382
  if (!record[key]) {
@@ -79181,6 +79182,9 @@ class IgxTreeGridHierarchizingPipe {
79181
79182
  const treeGridRecordsMap = new Map();
79182
79183
  const flatData = [];
79183
79184
  if (!collection || !collection.length) {
79185
+ this.grid.flatData = collection;
79186
+ this.grid.records = treeGridRecordsMap;
79187
+ this.grid.rootRecords = collection;
79184
79188
  return collection;
79185
79189
  }
79186
79190
  if (childDataKey) {