@syncfusion/ej2-pivotview 19.3.43 → 19.3.48
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/CHANGELOG.md +31 -5
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +197 -86
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +221 -110
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +19 -19
- package/src/base/engine.d.ts +2 -0
- package/src/base/engine.js +126 -91
- package/src/global.js +1 -0
- package/src/pivotview/actions/drill-through.js +3 -1
- package/src/pivotview/actions/excel-export.js +3 -2
- package/src/pivotview/actions/pdf-export.js +4 -3
- package/src/pivotview/base/pivotview-model.d.ts +1 -1
- package/src/pivotview/base/pivotview.d.ts +3 -1
- package/src/pivotview/base/pivotview.js +32 -8
- package/src/pivotview/renderer/render.d.ts +1 -0
- package/src/pivotview/renderer/render.js +53 -5
|
@@ -3866,10 +3866,14 @@ class PivotEngine {
|
|
|
3866
3866
|
if (keyInd !== 0) {
|
|
3867
3867
|
member.valueSort.levelName = parentMember + this.valueSortSettings.headerDelimiter + member.formattedText;
|
|
3868
3868
|
member.valueSort[parentMember + this.valueSortSettings.headerDelimiter + member.formattedText] = 1;
|
|
3869
|
+
member.valueSort.uniqueName = parentMember + this.valueSortSettings.headerDelimiter + (member.actualText ? member.actualText : member.formattedText);
|
|
3870
|
+
member.valueSort[parentMember + this.valueSortSettings.headerDelimiter + (member.actualText ? member.actualText : member.formattedText)] = 1;
|
|
3869
3871
|
}
|
|
3870
3872
|
else {
|
|
3871
3873
|
member.valueSort[member.formattedText] = 1;
|
|
3872
3874
|
member.valueSort.levelName = member.formattedText;
|
|
3875
|
+
member.valueSort[member.actualText ? member.actualText : member.formattedText] = 1;
|
|
3876
|
+
member.valueSort.uniqueName = (member.actualText ? member.actualText : member.formattedText);
|
|
3873
3877
|
}
|
|
3874
3878
|
let memberString = member.valueSort.axis + this.valueSortSettings.headerDelimiter + member.valueSort.levelName;
|
|
3875
3879
|
member.isDrilled = (valueFil && this.isValueFiltersAvail) ?
|
|
@@ -4037,10 +4041,16 @@ class PivotEngine {
|
|
|
4037
4041
|
slicedHeader.formattedText;
|
|
4038
4042
|
slicedHeader.valueSort[parentMember + this.valueSortSettings.headerDelimiter +
|
|
4039
4043
|
slicedHeader.formattedText] = 1;
|
|
4044
|
+
slicedHeader.valueSort.uniqueName = parentMember + this.valueSortSettings.headerDelimiter +
|
|
4045
|
+
(slicedHeader.actualText ? slicedHeader.actualText : slicedHeader.formattedText);
|
|
4046
|
+
slicedHeader.valueSort[parentMember + this.valueSortSettings.headerDelimiter +
|
|
4047
|
+
(slicedHeader.actualText ? slicedHeader.actualText : slicedHeader.formattedText)] = 1;
|
|
4040
4048
|
}
|
|
4041
4049
|
else {
|
|
4042
4050
|
slicedHeader.valueSort[slicedHeader.formattedText] = 1;
|
|
4043
4051
|
slicedHeader.valueSort.levelName = slicedHeader.formattedText;
|
|
4052
|
+
slicedHeader.valueSort[(slicedHeader.actualText ? slicedHeader.actualText : slicedHeader.formattedText)] = 1;
|
|
4053
|
+
slicedHeader.valueSort.uniqueName = (slicedHeader.actualText ? slicedHeader.actualText : slicedHeader.formattedText);
|
|
4044
4054
|
}
|
|
4045
4055
|
member.members = [];
|
|
4046
4056
|
hierarchy.push(member);
|
|
@@ -4225,6 +4235,7 @@ class PivotEngine {
|
|
|
4225
4235
|
isDrilled: false,
|
|
4226
4236
|
indexObject: {},
|
|
4227
4237
|
members: [],
|
|
4238
|
+
actualText: 'Grand' + customText,
|
|
4228
4239
|
formattedText: 'Grand' + customText,
|
|
4229
4240
|
ordinal: len,
|
|
4230
4241
|
type: 'grand sum',
|
|
@@ -4232,6 +4243,8 @@ class PivotEngine {
|
|
|
4232
4243
|
};
|
|
4233
4244
|
set[len].valueSort[set[len].formattedText] = 1;
|
|
4234
4245
|
set[len].valueSort.levelName = set[len].formattedText;
|
|
4246
|
+
set[len].valueSort[set[len].actualText] = 1;
|
|
4247
|
+
set[len].valueSort.uniqueName = set[len].actualText;
|
|
4235
4248
|
for (let ln = 0, lt = filter.length; ln < lt; ln++) {
|
|
4236
4249
|
set[len].indexObject[filter[ln]] = filter[ln];
|
|
4237
4250
|
}
|
|
@@ -4252,74 +4265,85 @@ class PivotEngine {
|
|
|
4252
4265
|
let isLeastNode = !reformAxis[tnum].members.length;
|
|
4253
4266
|
row.colIndex = 0;
|
|
4254
4267
|
row.rowIndex = tnum;
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
this.
|
|
4258
|
-
|
|
4268
|
+
let isRowFieldsAvail = false;
|
|
4269
|
+
if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.values.length > 1) {
|
|
4270
|
+
this.rowIndex = (isNullOrUndefined(this.rowIndex) && !isLeastNode && this.dataSourceSettings.rows.length === 0) ? row.index : this.rowIndex;
|
|
4271
|
+
isRowFieldsAvail = (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total.') !== 0);
|
|
4272
|
+
if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total.') === 0) {
|
|
4273
|
+
row.index = this.rowIndex;
|
|
4274
|
+
}
|
|
4259
4275
|
}
|
|
4260
|
-
|
|
4261
|
-
data[tnum]
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
let
|
|
4271
|
-
let
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4276
|
+
if (!isRowFieldsAvail) {
|
|
4277
|
+
if (!data[tnum]) {
|
|
4278
|
+
data[tnum] = [];
|
|
4279
|
+
this.valueContent[actCnt] = {};
|
|
4280
|
+
data[tnum][0] = this.valueContent[actCnt][0] = this.frameHeaderWithKeys(row);
|
|
4281
|
+
}
|
|
4282
|
+
else {
|
|
4283
|
+
data[tnum][0] = this.valueContent[actCnt][0] = this.frameHeaderWithKeys(row);
|
|
4284
|
+
}
|
|
4285
|
+
if (this.valueAxis && (this.isMultiMeasures || this.alwaysShowValueHeader)) {
|
|
4286
|
+
let hpos = tnum;
|
|
4287
|
+
let actpos = actCnt;
|
|
4288
|
+
let rowIndex = tnum;
|
|
4289
|
+
let isValueCellUpdated = false;
|
|
4290
|
+
if ((((!(level === 0 && this.measureIndex === 0) && !isLeastNode) || isLeastNode) && row.type === 'value' && !row.valueSort.axis) ||
|
|
4291
|
+
(level > this.measureIndex && row.axis === 'row' && row.valueSort.axis)) {
|
|
4292
|
+
let vln = 0;
|
|
4293
|
+
let isValueIndexFound = false;
|
|
4294
|
+
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4295
|
+
if (!isValueIndexFound) {
|
|
4296
|
+
for (vln = 0; vln < vlt; vln++) {
|
|
4297
|
+
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
|
|
4298
|
+
isValueIndexFound = true;
|
|
4299
|
+
isValueCellUpdated = true;
|
|
4300
|
+
break;
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
}
|
|
4304
|
+
if (level > this.measureIndex && row.axis == 'row' && row.valueSort.axis) {
|
|
4305
|
+
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4306
|
+
}
|
|
4307
|
+
else {
|
|
4308
|
+
if (!reformAxis[pIndex]) {
|
|
4309
|
+
isValueCellUpdated = false;
|
|
4279
4310
|
break;
|
|
4280
4311
|
}
|
|
4312
|
+
this.updateRowData(reformAxis, columns, tnum, data, vln, pIndex, cln, dln, actCnt, rTotal, cTotal);
|
|
4281
4313
|
}
|
|
4314
|
+
dln = data[tnum].length;
|
|
4282
4315
|
}
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
}
|
|
4291
|
-
this.updateRowData(reformAxis, columns, tnum, data, vln, pIndex, cln, dln, actCnt, rTotal, cTotal);
|
|
4316
|
+
}
|
|
4317
|
+
if (!isValueCellUpdated) {
|
|
4318
|
+
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4319
|
+
dln = data[tnum].length;
|
|
4320
|
+
data[hpos][dln] = this.valueContent[actpos][dln] = {
|
|
4321
|
+
axis: 'value', actualText: '', colSpan: 1,
|
|
4322
|
+
colIndex: dln, formattedText: '', hasChild: false
|
|
4323
|
+
};
|
|
4292
4324
|
}
|
|
4293
|
-
dln = data[tnum].length;
|
|
4294
4325
|
}
|
|
4326
|
+
this.recursiveRowData(rows, reformAxis, columns, rowIndex, data, vlt, isLeastNode, rln, vlt, level, rTotal, cTotal);
|
|
4295
4327
|
}
|
|
4296
|
-
|
|
4328
|
+
else {
|
|
4297
4329
|
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
}
|
|
4307
|
-
else {
|
|
4308
|
-
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4309
|
-
for (let vln = 0; vln < vlt; vln++) {
|
|
4310
|
-
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
4311
|
-
let name = this.values[vln].caption ? this.values[vln].caption : this.values[vln].name;
|
|
4312
|
-
if (columns[cln].valueSort.levelName && columns[cln].valueSort.levelName.toString().indexOf(name) > -1) {
|
|
4330
|
+
for (let vln = 0; vln < vlt; vln++) {
|
|
4331
|
+
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
4332
|
+
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
|
|
4333
|
+
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4334
|
+
dln = data[tnum].length;
|
|
4335
|
+
}
|
|
4336
|
+
}
|
|
4337
|
+
else {
|
|
4313
4338
|
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4314
4339
|
dln = data[tnum].length;
|
|
4315
4340
|
}
|
|
4316
4341
|
}
|
|
4317
|
-
else {
|
|
4318
|
-
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4319
|
-
dln = data[tnum].length;
|
|
4320
|
-
}
|
|
4321
4342
|
}
|
|
4343
|
+
this.recursiveRowData(rows, reformAxis, columns, tnum, data, vlt, isLeastNode, rln, 0, level, rTotal, cTotal);
|
|
4322
4344
|
}
|
|
4345
|
+
}
|
|
4346
|
+
else if (!isLeastNode) {
|
|
4323
4347
|
this.recursiveRowData(rows, reformAxis, columns, tnum, data, vlt, isLeastNode, rln, 0, level, rTotal, cTotal);
|
|
4324
4348
|
}
|
|
4325
4349
|
}
|
|
@@ -5115,14 +5139,17 @@ class PivotEngine {
|
|
|
5115
5139
|
return currentCellSets;
|
|
5116
5140
|
}
|
|
5117
5141
|
/* eslint-disable , @typescript-eslint/no-explicit-any */
|
|
5118
|
-
updateValueMembers(hasMeasureIndex, headerInfo,
|
|
5142
|
+
updateValueMembers(hasMeasureIndex, headerInfo, levelInfo, columnHeaders, axis, vcnt, levelIndex) {
|
|
5143
|
+
let levelName = levelInfo && !isNullOrUndefined(levelInfo.levelName) ? levelInfo.levelName.toString() : undefined;
|
|
5144
|
+
let uniqueName = levelInfo && !isNullOrUndefined(levelInfo.uniqueName) ? levelInfo.uniqueName.toString() : undefined;
|
|
5119
5145
|
if (hasMeasureIndex) {
|
|
5120
5146
|
for (let vln = 0; vln < vcnt; vln++) {
|
|
5121
|
-
let
|
|
5147
|
+
let field = this.values[vln];
|
|
5148
|
+
let name = field.caption ? field.caption : field.name;
|
|
5122
5149
|
let calObj = {
|
|
5123
5150
|
axis: this.valueAxis ? 'row' : 'column',
|
|
5124
5151
|
rowIndex: !this.valueAxis ? (headerInfo && levelIndex <= headerInfo.rowIndex ? (headerInfo.rowIndex + 1) : levelIndex) : 0,
|
|
5125
|
-
actualText:
|
|
5152
|
+
actualText: field.name,
|
|
5126
5153
|
formattedText: name,
|
|
5127
5154
|
level: 0,
|
|
5128
5155
|
valueSort: {},
|
|
@@ -5134,14 +5161,16 @@ class PivotEngine {
|
|
|
5134
5161
|
indexObject: !this.valueAxis && headerInfo ? headerInfo.indexObject : null
|
|
5135
5162
|
};
|
|
5136
5163
|
if (axis.length > 0) {
|
|
5137
|
-
calObj.showSubTotals =
|
|
5164
|
+
calObj.showSubTotals = field.showSubTotals;
|
|
5138
5165
|
}
|
|
5139
5166
|
let vData = calObj.valueSort;
|
|
5140
|
-
vData.axis = !this.valueAxis ?
|
|
5167
|
+
vData.axis = !this.valueAxis ? field.name : undefined;
|
|
5141
5168
|
vData[(levelName ? (levelName + this.valueSortSettings.headerDelimiter) : '') + name] = 1;
|
|
5169
|
+
vData[(uniqueName ? (uniqueName + this.valueSortSettings.headerDelimiter) : '') + field.name] = 1;
|
|
5142
5170
|
vData.levelName = (levelName ? (levelName + this.valueSortSettings.headerDelimiter) : '') + name;
|
|
5171
|
+
vData.uniqueName = (uniqueName ? (uniqueName + this.valueSortSettings.headerDelimiter) : '') + field.name;
|
|
5143
5172
|
columnHeaders.push(calObj);
|
|
5144
|
-
this.updateValueMembers(false, headerInfo,
|
|
5173
|
+
this.updateValueMembers(false, headerInfo, vData, calObj.members, axis, vcnt, levelIndex + 1);
|
|
5145
5174
|
}
|
|
5146
5175
|
}
|
|
5147
5176
|
else {
|
|
@@ -5152,7 +5181,9 @@ class PivotEngine {
|
|
|
5152
5181
|
let hData = {};
|
|
5153
5182
|
hData.axis = header.valueSort.axis;
|
|
5154
5183
|
hData[(levelName ? (levelName + this.valueSortSettings.headerDelimiter) : '') + header.formattedText] = 1;
|
|
5184
|
+
hData[(uniqueName ? (uniqueName + this.valueSortSettings.headerDelimiter) : '') + header.actualText] = 1;
|
|
5155
5185
|
hData.levelName = (levelName ? (levelName + this.valueSortSettings.headerDelimiter) : '') + header.formattedText;
|
|
5186
|
+
hData.uniqueName = (uniqueName ? (uniqueName + this.valueSortSettings.headerDelimiter) : '') + header.actualText;
|
|
5156
5187
|
header.valueSort = hData;
|
|
5157
5188
|
let drillInfo = hData.axis + this.valueSortSettings.headerDelimiter + hData.levelName;
|
|
5158
5189
|
if (header.isDrilled && ((this.isExpandAll && this.fieldDrillCollection[drillInfo]) ||
|
|
@@ -5163,16 +5194,16 @@ class PivotEngine {
|
|
|
5163
5194
|
if (header.isDrilled && axis[rln].members.length > 0) {
|
|
5164
5195
|
if (this.valueAxis && levelIndex < this.measureIndex && this.measureIndex !== (levelIndex + 1) && (!(axis[rln].hasChild &&
|
|
5165
5196
|
((!isNullOrUndefined(axis[rln].showSubTotals) && !axis[rln].showSubTotals) || !this.showSubTotals || !this.showRowSubTotals)))) {
|
|
5166
|
-
this.updateValueMembers(true, header, hData
|
|
5197
|
+
this.updateValueMembers(true, header, hData, columnHeaders[columnHeaders.length - 1].members, [], vcnt, levelIndex);
|
|
5167
5198
|
}
|
|
5168
|
-
this.updateValueMembers(this.measureIndex === (levelIndex + 1), header, hData
|
|
5199
|
+
this.updateValueMembers(this.measureIndex === (levelIndex + 1), header, hData, columnHeaders[columnHeaders.length - 1].members, axis[rln].members, vcnt, levelIndex + 1);
|
|
5169
5200
|
if (!this.valueAxis && levelIndex < this.measureIndex && this.measureIndex !== (levelIndex + 1) && (!(axis[rln].hasChild &&
|
|
5170
5201
|
((!isNullOrUndefined(axis[rln].showSubTotals) && !axis[rln].showSubTotals) || !this.showSubTotals || !this.showColumnSubTotals)))) {
|
|
5171
|
-
this.updateValueMembers(true, header, hData
|
|
5202
|
+
this.updateValueMembers(true, header, hData, columnHeaders[columnHeaders.length - 1].members, [], vcnt, levelIndex);
|
|
5172
5203
|
}
|
|
5173
5204
|
}
|
|
5174
5205
|
else if (levelIndex < this.measureIndex) {
|
|
5175
|
-
this.updateValueMembers(true, header, hData
|
|
5206
|
+
this.updateValueMembers(true, header, hData, columnHeaders[columnHeaders.length - 1].members, [], vcnt, levelIndex);
|
|
5176
5207
|
}
|
|
5177
5208
|
}
|
|
5178
5209
|
}
|
|
@@ -5215,11 +5246,12 @@ class PivotEngine {
|
|
|
5215
5246
|
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
5216
5247
|
let columnHeaders = [];
|
|
5217
5248
|
if (this.showGrandTotals && this.showColumnGrandTotals && axis[axis.length - 1].type == 'grand sum') {
|
|
5218
|
-
this.updateValueMembers(this.measureIndex === 0, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
5249
|
+
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
5219
5250
|
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
|
|
5220
5251
|
}
|
|
5221
5252
|
else {
|
|
5222
|
-
|
|
5253
|
+
let hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
|
|
5254
|
+
this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
|
|
5223
5255
|
}
|
|
5224
5256
|
this.getAggregatedHeaders(rows, columns, this.rMembers, columnHeaders, values);
|
|
5225
5257
|
if (this.selectedHeaders.values.length > 0) {
|
|
@@ -5253,11 +5285,12 @@ class PivotEngine {
|
|
|
5253
5285
|
}
|
|
5254
5286
|
else if (rowAxis.length == 0 && (this.valueAxis && (this.isMultiMeasures || this.alwaysShowValueHeader)) && this.values.length > 0) {
|
|
5255
5287
|
if (this.showGrandTotals && this.showRowGrandTotals && this.rMembers[this.rMembers.length - 1].type == 'grand sum') {
|
|
5256
|
-
this.updateValueMembers(this.measureIndex == 0, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
|
|
5288
|
+
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
|
|
5257
5289
|
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
|
|
5258
5290
|
}
|
|
5259
5291
|
else {
|
|
5260
|
-
|
|
5292
|
+
let hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
|
|
5293
|
+
this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
|
|
5261
5294
|
}
|
|
5262
5295
|
this.getAggregatedHeaders(rows, columns, rowAxis, axis, values);
|
|
5263
5296
|
if (this.selectedHeaders.values.length > 0) {
|
|
@@ -5365,6 +5398,8 @@ class PivotEngine {
|
|
|
5365
5398
|
let vData = data[colItmLn][(tnum * vcnt) + 1 + vln].valueSort;
|
|
5366
5399
|
vData[axis[rln].valueSort.levelName + this.valueSortSettings.headerDelimiter + name] = 1;
|
|
5367
5400
|
vData.levelName = axis[rln].valueSort.levelName + this.valueSortSettings.headerDelimiter + name;
|
|
5401
|
+
vData[axis[rln].valueSort.uniqueName + this.valueSortSettings.headerDelimiter + this.values[vln].name] = 1;
|
|
5402
|
+
vData.uniqueName = axis[rln].valueSort.uniqueName + this.valueSortSettings.headerDelimiter + this.values[vln].name;
|
|
5368
5403
|
if (vData && vData[sortText]) {
|
|
5369
5404
|
this.valueSortSettings.columnIndex = (tnum * vcnt) + 1 + vln;
|
|
5370
5405
|
}
|
|
@@ -7980,6 +8015,8 @@ class Render {
|
|
|
7980
8015
|
if (tCell && (this.parent.notEmpty) && this.engine.headerContent) {
|
|
7981
8016
|
let customClass = this.parent.hyperlinkSettings.cssClass;
|
|
7982
8017
|
let cell = args.data[0];
|
|
8018
|
+
let isRowFieldsAvail = cell.valueSort && cell.valueSort.levelName === (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
8019
|
+
this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText));
|
|
7983
8020
|
tCell.setAttribute('index', cell.rowIndex ? cell.rowIndex.toString() : '0');
|
|
7984
8021
|
if (tCell.getAttribute('aria-colindex') === '0') {
|
|
7985
8022
|
if (this.parent.dataType === 'pivot') {
|
|
@@ -8033,11 +8070,17 @@ class Render {
|
|
|
8033
8070
|
if (cell.type === 'grand sum') {
|
|
8034
8071
|
this.rowGrandPos = cell.rowIndex;
|
|
8035
8072
|
tCell.classList.add('e-gtot');
|
|
8036
|
-
|
|
8073
|
+
let values = this.parent.dataSourceSettings.values;
|
|
8074
|
+
localizedText = isNullOrUndefined(cell.valueSort.axis) ? (this.parent.dataSourceSettings.rows.length === 0 && values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row') ?
|
|
8075
|
+
this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type) + ' ' +
|
|
8076
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name) :
|
|
8077
|
+
this.parent.localeObj.getConstant('grandTotal') : cell.formattedText;
|
|
8037
8078
|
}
|
|
8038
8079
|
else if (cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') +
|
|
8039
8080
|
(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText))) {
|
|
8040
8081
|
tCell.classList.add('e-gtot');
|
|
8082
|
+
localizedText = isRowFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType) + ' '
|
|
8083
|
+
+ this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
|
|
8041
8084
|
}
|
|
8042
8085
|
else {
|
|
8043
8086
|
tCell.classList.add('e-stot');
|
|
@@ -8059,8 +8102,9 @@ class Render {
|
|
|
8059
8102
|
}));
|
|
8060
8103
|
let vSort = this.parent.pivotView.dataSourceSettings.valueSortSettings;
|
|
8061
8104
|
if (this.parent.enableValueSorting) {
|
|
8062
|
-
if (vSort && vSort.headerText && this.parent.dataSourceSettings.valueAxis === 'row'
|
|
8063
|
-
|
|
8105
|
+
if (vSort && vSort.headerText && this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
8106
|
+
this.parent.pivotValues[Number(tCell.getAttribute('index'))][0] &&
|
|
8107
|
+
this.parent.pivotValues[Number(tCell.getAttribute('index'))][0].valueSort.levelName) {
|
|
8064
8108
|
if (this.parent.pivotValues[Number(tCell.getAttribute('index'))][0].valueSort.levelName
|
|
8065
8109
|
=== vSort.headerText) {
|
|
8066
8110
|
let style = (tCell.querySelector('.e-expand') || tCell.querySelector('.e-collapse')) ?
|
|
@@ -8081,6 +8125,7 @@ class Render {
|
|
|
8081
8125
|
tCell.classList.add(VALUESCONTENT);
|
|
8082
8126
|
cell = args.data[Number(tCell.getAttribute('aria-colindex'))];
|
|
8083
8127
|
cell = isNullOrUndefined(cell) ? args.column.customAttributes.cell : cell;
|
|
8128
|
+
cell.isGrandSum = isRowFieldsAvail ? true : cell.isGrandSum;
|
|
8084
8129
|
if (cell.isSum) {
|
|
8085
8130
|
tCell.classList.add(SUMMARY);
|
|
8086
8131
|
}
|
|
@@ -8288,16 +8333,20 @@ class Render {
|
|
|
8288
8333
|
else {
|
|
8289
8334
|
tCell = this.onOlapColumnCellBoundEvent(tCell, cell);
|
|
8290
8335
|
}
|
|
8291
|
-
|
|
8336
|
+
let isColumnFieldsAvail = (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' && cell.valueSort &&
|
|
8337
|
+
cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText)));
|
|
8338
|
+
if (cell.type || isColumnFieldsAvail) {
|
|
8292
8339
|
tCell.classList.add(cell.type === 'grand sum' ? 'e-gtot' : 'e-stot');
|
|
8293
8340
|
if (cell.type === 'grand sum') {
|
|
8294
8341
|
this.colGrandPos = cell.colIndex;
|
|
8295
8342
|
}
|
|
8296
|
-
else {
|
|
8343
|
+
else if (cell.type) {
|
|
8297
8344
|
tCell.classList.add('e-colstot');
|
|
8298
8345
|
}
|
|
8299
8346
|
let localizedText = cell.type === 'grand sum' ? (isNullOrUndefined(cell.valueSort.axis) ? this.parent.localeObj.getConstant('grandTotal') : cell.formattedText) :
|
|
8300
8347
|
cell.formattedText.split('Total')[0] + this.parent.localeObj.getConstant('total');
|
|
8348
|
+
localizedText = isColumnFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType)
|
|
8349
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
|
|
8301
8350
|
if (tCell.querySelector('.e-headertext') !== null) {
|
|
8302
8351
|
tCell.querySelector('.e-headertext').innerText = localizedText;
|
|
8303
8352
|
}
|
|
@@ -8735,8 +8784,39 @@ class Render {
|
|
|
8735
8784
|
}
|
|
8736
8785
|
return formatArray;
|
|
8737
8786
|
}
|
|
8787
|
+
getValidHeader(args, axis) {
|
|
8788
|
+
let values = this.parent.dataSourceSettings.values;
|
|
8789
|
+
if (axis === 'row') {
|
|
8790
|
+
let cellInfo = args;
|
|
8791
|
+
if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
|
|
8792
|
+
if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' && (this.parent.localeObj.getConstant('grandTotal') +
|
|
8793
|
+
this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.value) === cellInfo.data[0].valueSort.levelName) {
|
|
8794
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo.value.toString()].aggregateType)
|
|
8795
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.value.toString();
|
|
8796
|
+
}
|
|
8797
|
+
else if (values.length === 1) {
|
|
8798
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type)
|
|
8799
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name);
|
|
8800
|
+
}
|
|
8801
|
+
}
|
|
8802
|
+
return cellInfo.value;
|
|
8803
|
+
}
|
|
8804
|
+
else if (axis === 'column') {
|
|
8805
|
+
let cellInfo = args;
|
|
8806
|
+
if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
|
|
8807
|
+
if (!isNullOrUndefined(args.gridCell.column.customAttributes) && this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' &&
|
|
8808
|
+
(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.gridCell.column.customAttributes.cell.formattedText)
|
|
8809
|
+
=== cellInfo.gridCell.column.customAttributes.cell.valueSort.levelName) {
|
|
8810
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo
|
|
8811
|
+
.gridCell.column.customAttributes.cell.actualText].aggregateType) + ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.gridCell.column.customAttributes.cell.formattedText;
|
|
8812
|
+
}
|
|
8813
|
+
}
|
|
8814
|
+
return (cellInfo.cell).value;
|
|
8815
|
+
}
|
|
8816
|
+
}
|
|
8738
8817
|
/* eslint-disable */
|
|
8739
8818
|
excelColumnEvent(args) {
|
|
8819
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
8740
8820
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
8741
8821
|
this.parent.lastColumn = args.gridCell.column;
|
|
8742
8822
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -8745,6 +8825,7 @@ class Render {
|
|
|
8745
8825
|
this.parent.trigger(excelHeaderQueryCellInfo, args);
|
|
8746
8826
|
}
|
|
8747
8827
|
pdfColumnEvent(args) {
|
|
8828
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
8748
8829
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
8749
8830
|
this.parent.lastColumn = args.gridCell.column;
|
|
8750
8831
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -8785,6 +8866,7 @@ class Render {
|
|
|
8785
8866
|
}
|
|
8786
8867
|
}
|
|
8787
8868
|
args = this.exportContentEvent(args);
|
|
8869
|
+
args.value = args.column.field === '0.formattedText' ? this.getValidHeader(args, 'row') : args.value;
|
|
8788
8870
|
this.parent.trigger(excelQueryCellInfo, args);
|
|
8789
8871
|
}
|
|
8790
8872
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -8808,6 +8890,7 @@ class Render {
|
|
|
8808
8890
|
}
|
|
8809
8891
|
args.style = { paragraphIndent: level * 10 };
|
|
8810
8892
|
this.lastSpan = isValueCell ? this.lastSpan : level;
|
|
8893
|
+
args.value = this.getValidHeader(args, 'row');
|
|
8811
8894
|
}
|
|
8812
8895
|
this.parent.trigger(pdfQueryCellInfo, args);
|
|
8813
8896
|
}
|
|
@@ -13724,11 +13807,13 @@ class DrillThrough {
|
|
|
13724
13807
|
let valuetText = aggType === 'CalculatedField' ? valueCaption.toString() : aggType !== '' ?
|
|
13725
13808
|
(this.parent.localeObj.getConstant(aggType) + ' ' + this.parent.localeObj.getConstant('of') + ' ' + valueCaption) :
|
|
13726
13809
|
valueCaption;
|
|
13810
|
+
let rowHeaders = this.parent.dataSourceSettings.valueAxis === 'row' ? this.parent.getRowText(Number(element.getAttribute('index')), 0) :
|
|
13811
|
+
pivotValue.rowHeaders === '' ? '' : pivotValue.rowHeaders.toString().split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).join(' - ');
|
|
13727
13812
|
let eventArgs = {
|
|
13728
13813
|
currentTarget: element,
|
|
13729
13814
|
currentCell: pivotValue,
|
|
13730
13815
|
rawData: rawData,
|
|
13731
|
-
rowHeaders:
|
|
13816
|
+
rowHeaders: rowHeaders,
|
|
13732
13817
|
columnHeaders: pivotValue.columnHeaders === '' ? '' : pivotValue.columnHeaders.toString().split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).join(' - '),
|
|
13733
13818
|
value: valuetText + '(' + pivotValue.formattedText + ')',
|
|
13734
13819
|
gridColumns: this.drillThroughDialog.frameGridColumns(rawData),
|
|
@@ -23656,13 +23741,21 @@ let PivotView = class PivotView extends Component {
|
|
|
23656
23741
|
let cell = this.pivotValues[rowIndex][colIndex];
|
|
23657
23742
|
let level = this.getLevel(cell);
|
|
23658
23743
|
let rowText = cell.type === 'grand sum' ? this.localeObj.getConstant('grandTotal') : cell.formattedText;
|
|
23659
|
-
|
|
23660
|
-
rowIndex
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23744
|
+
if (this.dataSourceSettings.valueAxis === 'row') {
|
|
23745
|
+
rowText = (this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.values.length > 1) ? this.pivotValues[rowIndex][0].valueSort.levelName.toString().slice((this.localeObj.getConstant('grandTotal')
|
|
23746
|
+
+ this.dataSourceSettings.valueSortSettings.headerDelimiter).length).toString() : this.dataSourceSettings.values.length === 1 ? !isNullOrUndefined(this.dataSourceSettings.values[0].caption) ?
|
|
23747
|
+
this.dataSourceSettings.values[0].caption : this.dataSourceSettings.values[0].name : this.pivotValues[rowIndex][0].valueSort.levelName.toString();
|
|
23748
|
+
return rowText.split(this.dataSourceSettings.valueSortSettings.headerDelimiter).join(' - ');
|
|
23749
|
+
}
|
|
23750
|
+
else {
|
|
23751
|
+
while (level > 0 || cell.index === undefined) {
|
|
23752
|
+
rowIndex--;
|
|
23753
|
+
cell = this.pivotValues[rowIndex][colIndex];
|
|
23754
|
+
if (cell.index !== undefined) {
|
|
23755
|
+
if (level > cell.level) {
|
|
23756
|
+
rowText = rowText + ' - ' + cell.formattedText;
|
|
23757
|
+
level = level - 1;
|
|
23758
|
+
}
|
|
23666
23759
|
}
|
|
23667
23760
|
}
|
|
23668
23761
|
}
|
|
@@ -24113,7 +24206,7 @@ let PivotView = class PivotView extends Component {
|
|
|
24113
24206
|
ele = target;
|
|
24114
24207
|
}
|
|
24115
24208
|
else if (target.classList.contains('e-stackedheadercelldiv') || target.classList.contains('e-cellvalue') ||
|
|
24116
|
-
target.classList.contains('e-headercelldiv')) {
|
|
24209
|
+
target.classList.contains('e-headercelldiv') || target.classList.contains('e-sortfilterdiv')) {
|
|
24117
24210
|
ele = target.parentElement;
|
|
24118
24211
|
}
|
|
24119
24212
|
else if (target.classList.contains('e-headertext')) {
|
|
@@ -25047,6 +25140,22 @@ let PivotView = class PivotView extends Component {
|
|
|
25047
25140
|
this.numberFormattingModule.showNumberFormattingDialog();
|
|
25048
25141
|
}
|
|
25049
25142
|
}
|
|
25143
|
+
/** @hidden */
|
|
25144
|
+
getValuesHeader(pivotCell, type) {
|
|
25145
|
+
let values = this.dataSourceSettings.values;
|
|
25146
|
+
if (type === 'value' && !isNullOrUndefined(pivotCell.valueSort) && (this.localeObj.getConstant('grandTotal') + this.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText)
|
|
25147
|
+
=== pivotCell.valueSort.levelName && ((pivotCell.axis === 'column' && this.dataSourceSettings.columns.length === 0 && this.dataSourceSettings.valueAxis === 'column') || (pivotCell.axis === 'row' &&
|
|
25148
|
+
this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.valueAxis === 'row'))) {
|
|
25149
|
+
return this.localeObj.getConstant('total') + ' ' + this.localeObj.getConstant(this.engineModule.fieldList[pivotCell.actualText].aggregateType) + ' ' +
|
|
25150
|
+
this.localeObj.getConstant('of') + ' ' + pivotCell.formattedText;
|
|
25151
|
+
}
|
|
25152
|
+
else if (type === 'grandTotal' && values.length === 1 && this.dataSourceSettings.valueAxis === 'row' && pivotCell.formattedText === this.localeObj.getConstant('grandTotal')) {
|
|
25153
|
+
return this.localeObj.getConstant('total') + ' ' + this.localeObj.getConstant(values[values.length - 1].type) + ' ' +
|
|
25154
|
+
this.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption
|
|
25155
|
+
: values[values.length - 1].name);
|
|
25156
|
+
}
|
|
25157
|
+
return pivotCell.formattedText;
|
|
25158
|
+
}
|
|
25050
25159
|
};
|
|
25051
25160
|
__decorate([
|
|
25052
25161
|
Property('USD')
|
|
@@ -25494,13 +25603,14 @@ class ExcelExport$1 {
|
|
|
25494
25603
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25495
25604
|
let cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
|
|
25496
25605
|
if (pivotCell.type === 'grand sum') {
|
|
25497
|
-
cellValue = this.parent.
|
|
25606
|
+
cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
|
|
25607
|
+
this.parent.localeObj.getConstant('grandTotal');
|
|
25498
25608
|
}
|
|
25499
25609
|
else if (pivotCell.type === 'sum') {
|
|
25500
25610
|
cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
|
|
25501
25611
|
}
|
|
25502
25612
|
else {
|
|
25503
|
-
cellValue = cellValue;
|
|
25613
|
+
cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
25504
25614
|
}
|
|
25505
25615
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25506
25616
|
cells.push({
|
|
@@ -25817,9 +25927,10 @@ class PDFExport {
|
|
|
25817
25927
|
let pivotCell = pivotValues[rCnt][cCnt];
|
|
25818
25928
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25819
25929
|
let cellValue = pivotCell.formattedText;
|
|
25820
|
-
cellValue =
|
|
25821
|
-
|
|
25822
|
-
|
|
25930
|
+
cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
25931
|
+
cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
|
|
25932
|
+
this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
|
|
25933
|
+
cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
|
|
25823
25934
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25824
25935
|
pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
|
|
25825
25936
|
(pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
|