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
|
@@ -2622,6 +2622,19 @@ class ExportUtilities {
|
|
|
2622
2622
|
static isNullOrWhitespaces(value) {
|
|
2623
2623
|
return value === undefined || value === null || !value.trim();
|
|
2624
2624
|
}
|
|
2625
|
+
static sanitizeValue(value) {
|
|
2626
|
+
if (!this.hasValue(value)) {
|
|
2627
|
+
return '';
|
|
2628
|
+
}
|
|
2629
|
+
else {
|
|
2630
|
+
const stringValue = String(value);
|
|
2631
|
+
return stringValue.replace(/&/g, '&')
|
|
2632
|
+
.replace(/</g, '<')
|
|
2633
|
+
.replace(/>/g, '>')
|
|
2634
|
+
.replace(/"/g, '"')
|
|
2635
|
+
.replace(/'/g, ''');
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2625
2638
|
}
|
|
2626
2639
|
|
|
2627
2640
|
var FilteringExpressionsTreeType;
|
|
@@ -3734,7 +3747,7 @@ class IgxBaseExporter {
|
|
|
3734
3747
|
.length :
|
|
3735
3748
|
1;
|
|
3736
3749
|
const columnInfo = {
|
|
3737
|
-
header: columnHeader,
|
|
3750
|
+
header: ExportUtilities.sanitizeValue(columnHeader),
|
|
3738
3751
|
dataType: column.dataType,
|
|
3739
3752
|
field: column.field,
|
|
3740
3753
|
skip: !exportColumn,
|
|
@@ -4775,7 +4788,7 @@ class WorksheetFile {
|
|
|
4775
4788
|
const rowCoordinate = isVertical
|
|
4776
4789
|
? startValue + owner.maxLevel + 2
|
|
4777
4790
|
: this.rowIndex;
|
|
4778
|
-
const columnValue = dictionary.saveValue(currentCol.header, true);
|
|
4791
|
+
const columnValue = dictionary.saveValue(currentCol.header, true, false);
|
|
4779
4792
|
columnCoordinate = ExcelStrings.getExcelColumn(column) + rowCoordinate;
|
|
4780
4793
|
rowStyle = isVertical && currentCol.rowSpan > 1 ? ' s="4"' : rowStyle;
|
|
4781
4794
|
str = `<c r="${columnCoordinate}"${rowStyle} t="s"><v>${columnValue}</v></c>`;
|
|
@@ -5118,12 +5131,12 @@ class WorksheetDataDictionary {
|
|
|
5118
5131
|
get columnWidths() {
|
|
5119
5132
|
return this._columnWidths;
|
|
5120
5133
|
}
|
|
5121
|
-
saveValue(value, isHeader) {
|
|
5134
|
+
saveValue(value, isHeader, shouldSanitizeValue = true) {
|
|
5122
5135
|
let sanitizedValue = '';
|
|
5123
5136
|
const isDate = value instanceof Date;
|
|
5124
5137
|
const isSavedAsString = isHeader || (typeof value !== 'number' && value !== Number(value) && !Number.isFinite(value) && !isDate);
|
|
5125
5138
|
if (isSavedAsString) {
|
|
5126
|
-
sanitizedValue =
|
|
5139
|
+
sanitizedValue = shouldSanitizeValue ? ExportUtilities.sanitizeValue(value) : value;
|
|
5127
5140
|
if (this._dictionary[sanitizedValue] === undefined) {
|
|
5128
5141
|
this._dictionary[sanitizedValue] = this._counter++;
|
|
5129
5142
|
this.dirtyKeyCollections();
|
|
@@ -5139,7 +5152,7 @@ class WorksheetDataDictionary {
|
|
|
5139
5152
|
return isSavedAsString ? this.getSanitizedValue(sanitizedValue) : -1;
|
|
5140
5153
|
}
|
|
5141
5154
|
getValue(value) {
|
|
5142
|
-
return this.getSanitizedValue(
|
|
5155
|
+
return this.getSanitizedValue(ExportUtilities.sanitizeValue(value));
|
|
5143
5156
|
}
|
|
5144
5157
|
getSanitizedValue(sanitizedValue) {
|
|
5145
5158
|
return this._dictionary[sanitizedValue];
|
|
@@ -5167,19 +5180,6 @@ class WorksheetDataDictionary {
|
|
|
5167
5180
|
}
|
|
5168
5181
|
return this._context;
|
|
5169
5182
|
}
|
|
5170
|
-
sanitizeValue(value) {
|
|
5171
|
-
if (ExportUtilities.hasValue(value) === false) {
|
|
5172
|
-
return '';
|
|
5173
|
-
}
|
|
5174
|
-
else {
|
|
5175
|
-
const stringValue = String(value);
|
|
5176
|
-
return stringValue.replace(/&/g, '&')
|
|
5177
|
-
.replace(/</g, '<')
|
|
5178
|
-
.replace(/>/g, '>')
|
|
5179
|
-
.replace(/"/g, '"')
|
|
5180
|
-
.replace(/'/g, ''');
|
|
5181
|
-
}
|
|
5182
|
-
}
|
|
5183
5183
|
dirtyKeyCollections() {
|
|
5184
5184
|
this._keysAreValid = false;
|
|
5185
5185
|
}
|
|
@@ -66540,9 +66540,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
66540
66540
|
columnsArray = this.getSelectableColumnsAt(each);
|
|
66541
66541
|
columnsArray.forEach((col) => {
|
|
66542
66542
|
if (col) {
|
|
66543
|
-
const key = headers ? col.header || col.field : col.field;
|
|
66543
|
+
const key = !this.isPivot && headers ? col.header || col.field : col.field;
|
|
66544
66544
|
const rowData = source[row].ghostRecord ? source[row].recordRef : source[row];
|
|
66545
|
-
const value =
|
|
66545
|
+
const value = this.isPivot ? rowData.aggregationValues.get(col.field)
|
|
66546
|
+
: resolveNestedPath(rowData, col.field);
|
|
66546
66547
|
record[key] = formatters && col.formatter ? col.formatter(value, rowData) : value;
|
|
66547
66548
|
if (columnData) {
|
|
66548
66549
|
if (!record[key]) {
|