igniteui-angular 18.2.21 → 18.2.22
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/esm2022/lib/services/csv/char-separated-value-data.mjs +5 -2
- package/esm2022/lib/services/csv/csv-exporter.mjs +23 -4
- package/esm2022/lib/services/exporter-common/base-export-service.mjs +8 -1
- package/fesm2022/igniteui-angular.mjs +32 -3
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/core/styles/components/icon-button/_icon-button-theme.scss +2 -2
- package/lib/core/styles/components/input/_input-group-theme.scss +4 -0
- package/lib/services/exporter-common/base-export-service.d.ts +2 -0
- package/package.json +1 -1
- package/styles/igniteui-angular-dark.css +1 -1
- package/styles/igniteui-angular.css +1 -1
- package/styles/igniteui-bootstrap-dark.css +1 -1
- package/styles/igniteui-bootstrap-light.css +1 -1
- package/styles/igniteui-dark-green.css +1 -1
- package/styles/igniteui-fluent-dark-excel.css +1 -1
- package/styles/igniteui-fluent-dark-word.css +1 -1
- package/styles/igniteui-fluent-dark.css +1 -1
- package/styles/igniteui-fluent-light-excel.css +1 -1
- package/styles/igniteui-fluent-light-word.css +1 -1
- package/styles/igniteui-fluent-light.css +1 -1
- package/styles/igniteui-indigo-dark.css +1 -1
- package/styles/igniteui-indigo-light.css +1 -1
- package/styles/maps/igniteui-angular-dark.css.map +1 -1
- package/styles/maps/igniteui-angular.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
- package/styles/maps/igniteui-dark-green.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-light.css.map +1 -1
- package/styles/maps/igniteui-indigo-dark.css.map +1 -1
- package/styles/maps/igniteui-indigo-light.css.map +1 -1
|
@@ -2267,11 +2267,15 @@ class IgxBaseExporter {
|
|
|
2267
2267
|
if (!isSpecialData) {
|
|
2268
2268
|
const owner = record.owner === undefined ? DEFAULT_OWNER : record.owner;
|
|
2269
2269
|
const ownerCols = this._ownersMap.get(owner).columns;
|
|
2270
|
+
const hasRowHeaders = ownerCols.some(c => c.headerType === ExportHeaderType.RowHeader);
|
|
2270
2271
|
if (record.type !== ExportRecordType.HeaderRecord) {
|
|
2271
2272
|
const columns = ownerCols
|
|
2272
2273
|
.filter(c => c.headerType === ExportHeaderType.ColumnHeader && !c.skip)
|
|
2273
2274
|
.sort((a, b) => a.startIndex - b.startIndex)
|
|
2274
2275
|
.sort((a, b) => a.pinnedIndex - b.pinnedIndex);
|
|
2276
|
+
if (hasRowHeaders) {
|
|
2277
|
+
record.rawData = record.data;
|
|
2278
|
+
}
|
|
2275
2279
|
record.data = columns.reduce((a, e) => {
|
|
2276
2280
|
if (!e.skip) {
|
|
2277
2281
|
let rawValue = resolveNestedPath(record.data, e.field);
|
|
@@ -2393,6 +2397,9 @@ class IgxBaseExporter {
|
|
|
2393
2397
|
};
|
|
2394
2398
|
this.flatRecords.push(pivotGridRecord);
|
|
2395
2399
|
}
|
|
2400
|
+
if (this.flatRecords.length) {
|
|
2401
|
+
this.flatRecords[0].dimensionKeys = Object.values(this.pivotGridRowDimensionsMap);
|
|
2402
|
+
}
|
|
2396
2403
|
}
|
|
2397
2404
|
prepareHierarchicalGridData(grid, hasFiltering, hasSorting) {
|
|
2398
2405
|
const skipOperations = (!hasFiltering || !this.options.ignoreFiltering) &&
|
|
@@ -3132,7 +3139,10 @@ class CharSeparatedValueData {
|
|
|
3132
3139
|
this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);
|
|
3133
3140
|
this._escapeCharacters.push(this._delimiter);
|
|
3134
3141
|
const headers = columns && columns.length ?
|
|
3135
|
-
|
|
3142
|
+
/* When column groups are present, always use the field as it indicates the group the column belongs to.
|
|
3143
|
+
* Otherwise, in PivotGrid scenarios we can end up with many duplicated column names without a hint what they represent.
|
|
3144
|
+
*/
|
|
3145
|
+
columns.map(c => c.columnGroupParent ? c.field : c.header ?? c.field) :
|
|
3136
3146
|
keys;
|
|
3137
3147
|
this._headerRecord = this.processHeaderRecord(headers, this._data.length);
|
|
3138
3148
|
if (keys.length === 0 || ((!this._data || this._data.length === 0) && keys.length === 0)) {
|
|
@@ -3471,9 +3481,28 @@ class IgxCsvExporterService extends IgxBaseExporter {
|
|
|
3471
3481
|
this.exportEnded = new EventEmitter();
|
|
3472
3482
|
}
|
|
3473
3483
|
exportDataImplementation(data, options, done) {
|
|
3474
|
-
|
|
3484
|
+
const dimensionKeys = data[0]?.dimensionKeys;
|
|
3485
|
+
data = dimensionKeys?.length ?
|
|
3486
|
+
data.map((item) => item.rawData) :
|
|
3487
|
+
data.map((item) => item.data);
|
|
3475
3488
|
const columnList = this._ownersMap.get(DEFAULT_OWNER);
|
|
3476
|
-
const
|
|
3489
|
+
const columns = columnList?.columns.filter(c => c.headerType === ExportHeaderType.ColumnHeader);
|
|
3490
|
+
if (dimensionKeys) {
|
|
3491
|
+
const dimensionCols = dimensionKeys.map((key) => {
|
|
3492
|
+
const columnInfo = {
|
|
3493
|
+
header: key,
|
|
3494
|
+
field: key,
|
|
3495
|
+
dataType: 'string',
|
|
3496
|
+
skip: false,
|
|
3497
|
+
headerType: ExportHeaderType.ColumnHeader,
|
|
3498
|
+
columnSpan: 1,
|
|
3499
|
+
startIndex: 0
|
|
3500
|
+
};
|
|
3501
|
+
return columnInfo;
|
|
3502
|
+
});
|
|
3503
|
+
columns.unshift(...dimensionCols);
|
|
3504
|
+
}
|
|
3505
|
+
const csvData = new CharSeparatedValueData(data, options.valueDelimiter, columns);
|
|
3477
3506
|
csvData.prepareDataAsync((r) => {
|
|
3478
3507
|
this._stringData = r;
|
|
3479
3508
|
this.saveFile(options);
|