igniteui-angular 18.2.23 → 18.2.25
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/directives/tooltip/tooltip-target.directive.mjs +2 -1
- package/esm2022/lib/services/excel/excel-files.mjs +5 -3
- package/esm2022/lib/services/exporter-common/base-export-service.mjs +47 -33
- package/fesm2022/igniteui-angular.mjs +53 -36
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/core/styles/components/stepper/_stepper-theme.scss +8 -1
- package/lib/core/styles/components/tabs/_tabs-theme.scss +17 -14
- package/lib/services/exporter-common/base-export-service.d.ts +3 -0
- package/package.json +2 -2
- 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
|
@@ -3000,31 +3000,49 @@ class IgxBaseExporter {
|
|
|
3000
3000
|
if (keys.length === 0) {
|
|
3001
3001
|
return;
|
|
3002
3002
|
}
|
|
3003
|
-
let startIndex = 0;
|
|
3004
|
-
const key = keys[0];
|
|
3005
3003
|
const records = this.flatRecords.map(r => r.data);
|
|
3006
|
-
const groupedRecords =
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
const
|
|
3016
|
-
const
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3004
|
+
const groupedRecords = this.groupByKeys(records, keys);
|
|
3005
|
+
this.createRowDimension(groupedRecords, keys, columnGroupParent);
|
|
3006
|
+
}
|
|
3007
|
+
groupByKeys(items, keys) {
|
|
3008
|
+
const group = (data, groupKeys) => {
|
|
3009
|
+
if (groupKeys.length === 0)
|
|
3010
|
+
return data;
|
|
3011
|
+
const newKeys = [...groupKeys];
|
|
3012
|
+
const key = newKeys.shift().name;
|
|
3013
|
+
const map = new Map();
|
|
3014
|
+
for (const item of data) {
|
|
3015
|
+
const keyValue = item[key];
|
|
3016
|
+
if (!map.has(keyValue)) {
|
|
3017
|
+
map.set(keyValue, []);
|
|
3018
|
+
}
|
|
3019
|
+
map.get(keyValue).push(item);
|
|
3020
|
+
}
|
|
3021
|
+
for (const [keyValue, value] of map) {
|
|
3022
|
+
map.set(keyValue, group(value, newKeys));
|
|
3023
|
+
}
|
|
3024
|
+
return map;
|
|
3025
|
+
};
|
|
3026
|
+
return group(items, keys);
|
|
3027
|
+
}
|
|
3028
|
+
calculateRowSpan(value) {
|
|
3029
|
+
if (value instanceof Map) {
|
|
3030
|
+
return Array.from(value.values()).reduce((total, current) => total + this.calculateRowSpan(current), 0);
|
|
3031
|
+
}
|
|
3032
|
+
else if (Array.isArray(value)) {
|
|
3033
|
+
return value.length;
|
|
3024
3034
|
}
|
|
3025
|
-
|
|
3035
|
+
return 0;
|
|
3036
|
+
}
|
|
3037
|
+
createRowDimension(node, keys, columnGroupParent) {
|
|
3038
|
+
if (!(node instanceof Map))
|
|
3039
|
+
return;
|
|
3040
|
+
const key = keys[0];
|
|
3041
|
+
const newKeys = keys.filter(k => k.level > key.level);
|
|
3042
|
+
let startIndex = 0;
|
|
3043
|
+
for (const k of node.keys()) {
|
|
3026
3044
|
let groupKey = k;
|
|
3027
|
-
const rowSpan =
|
|
3045
|
+
const rowSpan = this.calculateRowSpan(node.get(k));
|
|
3028
3046
|
const rowDimensionColumn = {
|
|
3029
3047
|
columnSpan: 1,
|
|
3030
3048
|
rowSpan,
|
|
@@ -3035,30 +3053,26 @@ class IgxBaseExporter {
|
|
|
3035
3053
|
pinnedIndex: 0,
|
|
3036
3054
|
level: key.level,
|
|
3037
3055
|
dataType: 'string',
|
|
3038
|
-
headerType:
|
|
3056
|
+
headerType: rowSpan > 1 ? ExportHeaderType.MultiRowHeader : ExportHeaderType.RowHeader,
|
|
3039
3057
|
};
|
|
3040
|
-
if (groupKey
|
|
3041
|
-
this.pivotGridColumns
|
|
3058
|
+
if (!groupKey) {
|
|
3059
|
+
// if (this.pivotGridColumns?.length)
|
|
3060
|
+
// this.pivotGridColumns[this.pivotGridColumns.length - 1].columnSpan += 1;
|
|
3042
3061
|
rowDimensionColumn.headerType = ExportHeaderType.PivotMergedHeader;
|
|
3043
3062
|
groupKey = columnGroupParent;
|
|
3044
3063
|
}
|
|
3045
|
-
if (
|
|
3064
|
+
if (key.level > 0) {
|
|
3046
3065
|
rowDimensionColumn.columnGroupParent = columnGroupParent;
|
|
3047
3066
|
}
|
|
3048
3067
|
else {
|
|
3049
3068
|
rowDimensionColumn.columnGroup = groupKey;
|
|
3050
3069
|
}
|
|
3051
3070
|
this.pivotGridColumns.push(rowDimensionColumn);
|
|
3052
|
-
if (keys.length > 1) {
|
|
3053
|
-
if (groupKey !== columnGroupParent) {
|
|
3054
|
-
this.pivotGridKeyValueMap.set(key.name, groupKey);
|
|
3055
|
-
}
|
|
3056
|
-
const newKeys = keys.filter(kdd => kdd !== key);
|
|
3057
|
-
this.preparePivotGridColumns(newKeys, groupKey);
|
|
3058
|
-
this.pivotGridKeyValueMap.delete(key.name);
|
|
3059
|
-
}
|
|
3060
3071
|
startIndex += rowSpan;
|
|
3061
3072
|
}
|
|
3073
|
+
for (const k of node.keys()) {
|
|
3074
|
+
this.createRowDimension(node.get(k), newKeys, columnGroupParent);
|
|
3075
|
+
}
|
|
3062
3076
|
}
|
|
3063
3077
|
addLevelColumns() {
|
|
3064
3078
|
if (this.options.exportSummaries && this.summaries.size > 0) {
|
|
@@ -4166,7 +4180,7 @@ class WorksheetFile {
|
|
|
4166
4180
|
: owner.maxLevel;
|
|
4167
4181
|
for (const currentCol of headersForLevel) {
|
|
4168
4182
|
const spanLength = isVertical ? currentCol.rowSpan : currentCol.columnSpan;
|
|
4169
|
-
if (currentCol.level === i
|
|
4183
|
+
if (currentCol.level === i) {
|
|
4170
4184
|
let columnCoordinate;
|
|
4171
4185
|
const column = isVertical
|
|
4172
4186
|
? this.rowIndex
|
|
@@ -4177,7 +4191,9 @@ class WorksheetFile {
|
|
|
4177
4191
|
if (currentCol.headerType === ExportHeaderType.PivotRowHeader) {
|
|
4178
4192
|
rowCoordinate = startValue + 1;
|
|
4179
4193
|
}
|
|
4180
|
-
const columnValue =
|
|
4194
|
+
const columnValue = currentCol.headerType === ExportHeaderType.PivotMergedHeader ?
|
|
4195
|
+
dictionary.saveValue(currentCol.field, true, true) :
|
|
4196
|
+
dictionary.saveValue(currentCol.header, true, false);
|
|
4181
4197
|
columnCoordinate = (currentCol.field === GRID_LEVEL_COL
|
|
4182
4198
|
? ExcelStrings.getExcelColumn(worksheetData.columnCount + 1)
|
|
4183
4199
|
: ExcelStrings.getExcelColumn(column)) + rowCoordinate;
|
|
@@ -19631,6 +19647,7 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
19631
19647
|
* @hidden
|
|
19632
19648
|
*/
|
|
19633
19649
|
ngOnDestroy() {
|
|
19650
|
+
this.hideTooltip();
|
|
19634
19651
|
this.destroy$.next();
|
|
19635
19652
|
this.destroy$.complete();
|
|
19636
19653
|
}
|