igniteui-angular 14.2.23 → 14.2.24
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/esm2020/lib/grids/grid-base.directive.mjs +4 -3
- package/esm2020/lib/services/excel/excel-files.mjs +2 -2
- package/esm2020/lib/services/excel/worksheet-data-dictionary.mjs +4 -17
- package/esm2020/lib/services/exporter-common/base-export-service.mjs +2 -2
- package/esm2020/lib/services/exporter-common/export-utilities.mjs +14 -1
- package/fesm2015/igniteui-angular.mjs +21 -20
- package/fesm2015/igniteui-angular.mjs.map +1 -1
- package/fesm2020/igniteui-angular.mjs +21 -20
- package/fesm2020/igniteui-angular.mjs.map +1 -1
- package/lib/services/excel/worksheet-data-dictionary.d.ts +1 -2
- package/lib/services/exporter-common/export-utilities.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2123,6 +2123,19 @@ class ExportUtilities {
|
|
|
2123
2123
|
static isNullOrWhitespaces(value) {
|
|
2124
2124
|
return value === undefined || value === null || !value.trim();
|
|
2125
2125
|
}
|
|
2126
|
+
static sanitizeValue(value) {
|
|
2127
|
+
if (!this.hasValue(value)) {
|
|
2128
|
+
return '';
|
|
2129
|
+
}
|
|
2130
|
+
else {
|
|
2131
|
+
const stringValue = String(value);
|
|
2132
|
+
return stringValue.replace(/&/g, '&')
|
|
2133
|
+
.replace(/</g, '<')
|
|
2134
|
+
.replace(/>/g, '>')
|
|
2135
|
+
.replace(/"/g, '"')
|
|
2136
|
+
.replace(/'/g, ''');
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2126
2139
|
}
|
|
2127
2140
|
|
|
2128
2141
|
var FilteringExpressionsTreeType;
|
|
@@ -3238,7 +3251,7 @@ class IgxBaseExporter {
|
|
|
3238
3251
|
.length :
|
|
3239
3252
|
1;
|
|
3240
3253
|
const columnInfo = {
|
|
3241
|
-
header: columnHeader,
|
|
3254
|
+
header: ExportUtilities.sanitizeValue(columnHeader),
|
|
3242
3255
|
dataType: column.dataType,
|
|
3243
3256
|
field: column.field,
|
|
3244
3257
|
skip: !exportColumn,
|
|
@@ -4283,7 +4296,7 @@ class WorksheetFile {
|
|
|
4283
4296
|
const rowCoordinate = isVertical
|
|
4284
4297
|
? startValue + owner.maxLevel + 2
|
|
4285
4298
|
: this.rowIndex;
|
|
4286
|
-
const columnValue = dictionary.saveValue(currentCol.header, true);
|
|
4299
|
+
const columnValue = dictionary.saveValue(currentCol.header, true, false);
|
|
4287
4300
|
columnCoordinate = ExcelStrings.getExcelColumn(column) + rowCoordinate;
|
|
4288
4301
|
rowStyle = isVertical && currentCol.rowSpan > 1 ? ' s="4"' : rowStyle;
|
|
4289
4302
|
str = `<c r="${columnCoordinate}"${rowStyle} t="s"><v>${columnValue}</v></c>`;
|
|
@@ -4626,12 +4639,12 @@ class WorksheetDataDictionary {
|
|
|
4626
4639
|
get columnWidths() {
|
|
4627
4640
|
return this._columnWidths;
|
|
4628
4641
|
}
|
|
4629
|
-
saveValue(value, isHeader) {
|
|
4642
|
+
saveValue(value, isHeader, shouldSanitizeValue = true) {
|
|
4630
4643
|
let sanitizedValue = '';
|
|
4631
4644
|
const isDate = value instanceof Date;
|
|
4632
4645
|
const isSavedAsString = isHeader || (typeof value !== 'number' && value !== Number(value) && !Number.isFinite(value) && !isDate);
|
|
4633
4646
|
if (isSavedAsString) {
|
|
4634
|
-
sanitizedValue =
|
|
4647
|
+
sanitizedValue = shouldSanitizeValue ? ExportUtilities.sanitizeValue(value) : value;
|
|
4635
4648
|
if (this._dictionary[sanitizedValue] === undefined) {
|
|
4636
4649
|
this._dictionary[sanitizedValue] = this._counter++;
|
|
4637
4650
|
this.dirtyKeyCollections();
|
|
@@ -4647,7 +4660,7 @@ class WorksheetDataDictionary {
|
|
|
4647
4660
|
return isSavedAsString ? this.getSanitizedValue(sanitizedValue) : -1;
|
|
4648
4661
|
}
|
|
4649
4662
|
getValue(value) {
|
|
4650
|
-
return this.getSanitizedValue(
|
|
4663
|
+
return this.getSanitizedValue(ExportUtilities.sanitizeValue(value));
|
|
4651
4664
|
}
|
|
4652
4665
|
getSanitizedValue(sanitizedValue) {
|
|
4653
4666
|
return this._dictionary[sanitizedValue];
|
|
@@ -4675,19 +4688,6 @@ class WorksheetDataDictionary {
|
|
|
4675
4688
|
}
|
|
4676
4689
|
return this._context;
|
|
4677
4690
|
}
|
|
4678
|
-
sanitizeValue(value) {
|
|
4679
|
-
if (ExportUtilities.hasValue(value) === false) {
|
|
4680
|
-
return '';
|
|
4681
|
-
}
|
|
4682
|
-
else {
|
|
4683
|
-
const stringValue = String(value);
|
|
4684
|
-
return stringValue.replace(/&/g, '&')
|
|
4685
|
-
.replace(/</g, '<')
|
|
4686
|
-
.replace(/>/g, '>')
|
|
4687
|
-
.replace(/"/g, '"')
|
|
4688
|
-
.replace(/'/g, ''');
|
|
4689
|
-
}
|
|
4690
|
-
}
|
|
4691
4691
|
dirtyKeyCollections() {
|
|
4692
4692
|
this._keysAreValid = false;
|
|
4693
4693
|
}
|
|
@@ -66324,9 +66324,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
66324
66324
|
columnsArray = this.getSelectableColumnsAt(each);
|
|
66325
66325
|
columnsArray.forEach((col) => {
|
|
66326
66326
|
if (col) {
|
|
66327
|
-
const key = headers ? col.header || col.field : col.field;
|
|
66327
|
+
const key = !this.isPivot && headers ? col.header || col.field : col.field;
|
|
66328
66328
|
const rowData = source[row].ghostRecord ? source[row].recordRef : source[row];
|
|
66329
|
-
const value =
|
|
66329
|
+
const value = this.isPivot ? rowData.aggregationValues.get(col.field)
|
|
66330
|
+
: resolveNestedPath(rowData, col.field);
|
|
66330
66331
|
record[key] = formatters && col.formatter ? col.formatter(value, rowData) : value;
|
|
66331
66332
|
if (columnData) {
|
|
66332
66333
|
if (!record[key]) {
|