@syncfusion/ej2-pivotview 20.1.56 → 20.1.61
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 +26 -0
- 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 +209 -118
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +211 -120
- 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 +15 -15
- package/src/base/engine.d.ts +1 -1
- package/src/base/engine.js +127 -79
- package/src/base/olap/engine.js +0 -12
- package/src/base/util.js +2 -2
- package/src/common/actions/event-base.js +27 -0
- package/src/common/popups/drillthrough-dialog.js +6 -6
- package/src/common/popups/toolbar.d.ts +1 -0
- package/src/common/popups/toolbar.js +15 -6
- package/src/pivotchart/base/pivotchart.js +4 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +4 -2
- package/src/pivotview/actions/drill-through.js +2 -2
- package/src/pivotview/actions/excel-export.js +2 -1
- package/src/pivotview/base/pivotview.js +6 -3
- package/src/pivotview/model/chartsettings-model.d.ts +2 -2
- package/src/pivotview/model/chartsettings.d.ts +2 -2
- package/src/pivotview/model/chartsettings.js +2 -2
- package/src/pivotview/renderer/render.js +16 -6
- package/styles/bootstrap4.css +1 -1
- package/styles/pivotfieldlist/_layout.scss +7 -7
- package/styles/pivotfieldlist/_theme.scss +1 -1
- package/styles/pivotview/_layout.scss +14 -14
- package/styles/pivotview/_theme.scss +3 -3
- package/styles/pivotview/bootstrap4.css +1 -1
|
@@ -862,9 +862,9 @@ class PivotUtil {
|
|
|
862
862
|
}
|
|
863
863
|
else if (type === true) {
|
|
864
864
|
sortOrder === 'Ascending' ?
|
|
865
|
-
(sortMembersOrder.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : (Number(a.actualText.toString().match(/\d+/)
|
|
865
|
+
(sortMembersOrder.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : (a.actualText === 'Out of Range') ? 1 : (b.actualText === 'Out of Range') ? -1 : (Number(a.actualText.toString().match(/\d+/)) > Number(b.actualText.toString().match(/\d+/))) ? 1 : ((Number(b.actualText.toString().match(/\d+/)) > Number(a.actualText.toString().match(/\d+/))) ? -1 : 0))) :
|
|
866
866
|
sortOrder === 'Descending' ?
|
|
867
|
-
(sortMembersOrder.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : (Number(a.actualText.toString().match(/\d+/)
|
|
867
|
+
(sortMembersOrder.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : (a.actualText === 'Out of Range') ? -1 : (b.actualText === 'Out of Range') ? 1 : (Number(a.actualText.toString().match(/\d+/)) < Number(b.actualText.toString().match(/\d+/))) ? 1 : ((Number(b.actualText.toString().match(/\d+/)) < Number(a.actualText.toString().match(/\d+/))) ? -1 : 0))) :
|
|
868
868
|
sortMembersOrder;
|
|
869
869
|
}
|
|
870
870
|
else {
|
|
@@ -2536,8 +2536,8 @@ class PivotEngine {
|
|
|
2536
2536
|
let mPos = this.fieldList[measure].index;
|
|
2537
2537
|
let aggregate = this.fieldList[measure].aggregateType;
|
|
2538
2538
|
this.rawIndexObject = {};
|
|
2539
|
-
value = (type === 'row' ? this.getAggregateValue(rows[i].index, columns.indexObject, mPos, aggregate) :
|
|
2540
|
-
this.getAggregateValue(columns.index, rows[i].indexObject, mPos, aggregate));
|
|
2539
|
+
value = (type === 'row' ? this.getAggregateValue(rows[i].index, columns.indexObject, mPos, aggregate, false) :
|
|
2540
|
+
this.getAggregateValue(columns.index, rows[i].indexObject, mPos, aggregate, false));
|
|
2541
2541
|
let cellDetails = {
|
|
2542
2542
|
fieldName: measure,
|
|
2543
2543
|
row: rows[i],
|
|
@@ -3202,68 +3202,92 @@ class PivotEngine {
|
|
|
3202
3202
|
return headers;
|
|
3203
3203
|
}
|
|
3204
3204
|
performFilterCommonUpdate(filterItem, headersInfo, addPos) {
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3205
|
+
if (headersInfo.axis === 'row' || headersInfo.axis === 'column') {
|
|
3206
|
+
let rawHeaders = headersInfo.axis === 'row' ? this.rMembers : this.cMembers;
|
|
3207
|
+
let filterObjects = {};
|
|
3208
|
+
for (let item of this.filterMembers) {
|
|
3209
|
+
filterObjects[item] = item;
|
|
3210
|
+
}
|
|
3211
|
+
if (this.fieldFilterMem[filterItem.name]) {
|
|
3212
|
+
rawHeaders = this.performFilterDeletion(headersInfo.headers, filterItem, headersInfo, filterObjects, 0);
|
|
3213
|
+
}
|
|
3214
|
+
if (addPos.length > 0 && headersInfo.fields.length > 0) {
|
|
3215
|
+
this.frameHeaderObjectsCollection = true;
|
|
3216
|
+
if (headersInfo.fields.filter((item) => { return item.showNoDataItems; }).length > 0) {
|
|
3217
|
+
for (let i = 0; i < this.data.length; i++) {
|
|
3218
|
+
addPos.push(i);
|
|
3219
|
+
}
|
|
3220
|
+
//addPos = (this.data as any).map((item, pos) => { return pos; });
|
|
3221
|
+
}
|
|
3222
|
+
/* eslint-disable */
|
|
3223
|
+
this.headerObjectsCollection['parent'] = this.getIndexedHeaders(headersInfo.fields, this.data, 0, addPos, headersInfo.axis, '');
|
|
3224
|
+
rawHeaders = this.performFilterAddition(rawHeaders, headersInfo.fields, headersInfo);
|
|
3225
|
+
let headerNames = {};
|
|
3226
|
+
for (let header of rawHeaders) {
|
|
3227
|
+
headerNames[header.valueSort.levelName.toString()] = header.valueSort.levelName.toString();
|
|
3228
|
+
}
|
|
3229
|
+
let excessHeaders = this.headerObjectsCollection['parent'].filter((header) => {
|
|
3230
|
+
return !headerNames[header.valueSort.levelName.toString()];
|
|
3231
|
+
});
|
|
3232
|
+
let grandHeader = rawHeaders.filter((item) => { return item.type === 'grand sum'; });
|
|
3233
|
+
if (grandHeader.length > 0) {
|
|
3234
|
+
rawHeaders.pop();
|
|
3235
|
+
}
|
|
3236
|
+
/* eslint-enable */
|
|
3237
|
+
rawHeaders = this.getSortedHeaders(rawHeaders.concat(excessHeaders), this.fieldList[headersInfo.fields[0].name].sort).concat(grandHeader);
|
|
3238
|
+
if (headersInfo.axis === 'row') {
|
|
3239
|
+
this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, this.filterMembers, 'column', '');
|
|
3240
|
+
this.insertAllMember(this.cMembers, this.filterMembers, '', 'column');
|
|
3241
|
+
}
|
|
3242
|
+
else {
|
|
3243
|
+
this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, this.filterMembers, 'row', '');
|
|
3244
|
+
this.insertAllMember(this.rMembers, this.filterMembers, '', 'row');
|
|
3218
3245
|
}
|
|
3219
|
-
//addPos = (this.data as any).map((item, pos) => { return pos; });
|
|
3220
3246
|
}
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
rawHeaders = this.performFilterAddition(rawHeaders, headersInfo.fields, headersInfo);
|
|
3224
|
-
let headerNames = {};
|
|
3225
|
-
for (let header of rawHeaders) {
|
|
3226
|
-
headerNames[header.valueSort.levelName.toString()] = header.valueSort.levelName.toString();
|
|
3227
|
-
}
|
|
3228
|
-
let excessHeaders = this.headerObjectsCollection['parent'].filter((header) => {
|
|
3229
|
-
return !headerNames[header.valueSort.levelName.toString()];
|
|
3230
|
-
});
|
|
3231
|
-
let grandHeader = rawHeaders.filter((item) => { return item.type === 'grand sum'; });
|
|
3232
|
-
if (grandHeader.length > 0) {
|
|
3233
|
-
rawHeaders.pop();
|
|
3247
|
+
if (headersInfo.axis === 'row') {
|
|
3248
|
+
this.rowCount = 0;
|
|
3234
3249
|
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3250
|
+
else {
|
|
3251
|
+
this.columnCount = 0;
|
|
3252
|
+
}
|
|
3253
|
+
this.updateHeadersCount(rawHeaders, headersInfo.axis, 0, headersInfo.fields, 'plus', false);
|
|
3237
3254
|
if (headersInfo.axis === 'row') {
|
|
3238
|
-
|
|
3239
|
-
|
|
3255
|
+
if (headersInfo.position > 0) {
|
|
3256
|
+
this.insertPosition(this.rows, this.data, 0, this.filterMembers, 'row', '', rawHeaders);
|
|
3257
|
+
}
|
|
3258
|
+
this.insertTotalPosition(rawHeaders);
|
|
3259
|
+
this.rMembers = this.headerCollection.rowHeaders = rawHeaders;
|
|
3260
|
+
this.headerCollection.rowHeadersCount = this.rowCount;
|
|
3240
3261
|
}
|
|
3241
3262
|
else {
|
|
3242
|
-
|
|
3243
|
-
|
|
3263
|
+
if (headersInfo.position > 0) {
|
|
3264
|
+
this.insertPosition(this.columns, this.data, 0, this.filterMembers, 'column', '', rawHeaders);
|
|
3265
|
+
}
|
|
3266
|
+
this.insertTotalPosition(rawHeaders);
|
|
3267
|
+
this.cMembers = this.headerCollection.columnHeaders = rawHeaders;
|
|
3268
|
+
this.headerCollection.columnHeadersCount = this.columnCount;
|
|
3244
3269
|
}
|
|
3245
3270
|
}
|
|
3246
|
-
if (headersInfo.axis === 'row') {
|
|
3247
|
-
this.rowCount = 0;
|
|
3248
|
-
}
|
|
3249
3271
|
else {
|
|
3272
|
+
let showNoDataItems = (this.rows[0] && this.rows[0].showNoDataItems) || (this.columns[0] && this.columns[0].showNoDataItems);
|
|
3273
|
+
if (this.rows.length > 0) {
|
|
3274
|
+
this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, showNoDataItems ? addPos : this.filterMembers, 'row', '');
|
|
3275
|
+
}
|
|
3276
|
+
if (this.columns.length > 0) {
|
|
3277
|
+
this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, showNoDataItems ? addPos : this.filterMembers, 'column', '');
|
|
3278
|
+
}
|
|
3279
|
+
this.insertAllMembersCommon();
|
|
3280
|
+
this.rowCount = 0;
|
|
3250
3281
|
this.columnCount = 0;
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
this.insertPosition(this.
|
|
3282
|
+
this.updateHeadersCount(this.cMembers, 'column', 0, this.columns, 'plus', false);
|
|
3283
|
+
this.updateHeadersCount(this.rMembers, 'row', 0, this.rows, 'plus', false);
|
|
3284
|
+
if (showNoDataItems) {
|
|
3285
|
+
this.insertPosition(this.rows, this.data, 0, this.filterMembers, 'row', '', this.rMembers);
|
|
3286
|
+
this.insertPosition(this.columns, this.data, 0, this.filterMembers, 'column', '', this.cMembers);
|
|
3256
3287
|
}
|
|
3257
|
-
this.
|
|
3258
|
-
this.rMembers = this.headerCollection.rowHeaders = rawHeaders;
|
|
3288
|
+
this.headerCollection.rowHeaders = this.rMembers;
|
|
3259
3289
|
this.headerCollection.rowHeadersCount = this.rowCount;
|
|
3260
|
-
|
|
3261
|
-
else {
|
|
3262
|
-
if (headersInfo.position > 0) {
|
|
3263
|
-
this.insertPosition(this.columns, this.data, 0, this.filterMembers, 'column', '', rawHeaders);
|
|
3264
|
-
}
|
|
3265
|
-
this.insertTotalPosition(rawHeaders);
|
|
3266
|
-
this.cMembers = this.headerCollection.columnHeaders = rawHeaders;
|
|
3290
|
+
this.headerCollection.columnHeaders = this.cMembers;
|
|
3267
3291
|
this.headerCollection.columnHeadersCount = this.columnCount;
|
|
3268
3292
|
}
|
|
3269
3293
|
this.applyValueSorting();
|
|
@@ -3384,15 +3408,13 @@ class PivotEngine {
|
|
|
3384
3408
|
}
|
|
3385
3409
|
else {
|
|
3386
3410
|
alphaNumbervalue.push(headers[i]);
|
|
3411
|
+
break;
|
|
3387
3412
|
}
|
|
3388
3413
|
}
|
|
3389
|
-
if (stringValue.length > 1) {
|
|
3390
|
-
stringValue = this.sortHeaders(fieldName, childrens, headers, childrens.sort, childrens.type);
|
|
3391
|
-
}
|
|
3392
3414
|
if (alphaNumbervalue.length > 0) {
|
|
3393
3415
|
alphaNumbervalue = this.sortHeaders(fieldName, childrens, headers, childrens.sort, childrens.isAlphanumeric);
|
|
3394
3416
|
}
|
|
3395
|
-
return headers
|
|
3417
|
+
return headers;
|
|
3396
3418
|
}
|
|
3397
3419
|
else {
|
|
3398
3420
|
return this.sortHeaders(fieldName, childrens, headers, sortOrder, childrens.type);
|
|
@@ -3549,7 +3571,7 @@ class PivotEngine {
|
|
|
3549
3571
|
}
|
|
3550
3572
|
else {
|
|
3551
3573
|
this.rawIndexObject = {};
|
|
3552
|
-
let value = this.getAggregateValue(header.index, member.indexObject, mIndex, mType);
|
|
3574
|
+
let value = this.getAggregateValue(header.index, member.indexObject, mIndex, mType, false);
|
|
3553
3575
|
let cellDetails = {
|
|
3554
3576
|
fieldName: this.fields[mIndex],
|
|
3555
3577
|
row: header,
|
|
@@ -3770,7 +3792,7 @@ class PivotEngine {
|
|
|
3770
3792
|
/* eslint-disable */
|
|
3771
3793
|
getIndexedHeaders(keys, data, keyInd, position, axis, parentMember, valueFil) {
|
|
3772
3794
|
let hierarchy = [];
|
|
3773
|
-
if (keys) {
|
|
3795
|
+
if (keys && keys.length > 0) {
|
|
3774
3796
|
let rlen = keys.length;
|
|
3775
3797
|
let decisionObj = {};
|
|
3776
3798
|
let fieldName = keys[keyInd].name;
|
|
@@ -3960,27 +3982,50 @@ class PivotEngine {
|
|
|
3960
3982
|
else {
|
|
3961
3983
|
if (childrens.type === 'number' && hierarchy.length > 0 && (typeof (hierarchy[0].actualText) === 'string')) {
|
|
3962
3984
|
let stringValue = [];
|
|
3985
|
+
let outOfRange;
|
|
3963
3986
|
let alphaNumbervalue = [];
|
|
3964
3987
|
let nullValue = [];
|
|
3965
3988
|
for (let i = 0; i < hierarchy.length; i++) {
|
|
3966
3989
|
if (isNaN(hierarchy[i].actualText.toString().charAt(0))) {
|
|
3967
3990
|
stringValue.push(hierarchy[i]);
|
|
3991
|
+
if (!outOfRange && childrens.sort !== 'None') {
|
|
3992
|
+
if (hierarchy[i].actualText === 'Out of Range') {
|
|
3993
|
+
outOfRange = hierarchy[i];
|
|
3994
|
+
hierarchy.splice(i, 1);
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3968
3997
|
}
|
|
3969
3998
|
else if (hierarchy[i].actualText === "") {
|
|
3970
3999
|
nullValue.push(hierarchy[i]);
|
|
3971
4000
|
}
|
|
3972
4001
|
else {
|
|
4002
|
+
this.fieldList[fieldName].isAlphanumeric = true;
|
|
3973
4003
|
alphaNumbervalue.push(hierarchy[i]);
|
|
4004
|
+
break;
|
|
3974
4005
|
}
|
|
3975
4006
|
}
|
|
3976
|
-
if (
|
|
3977
|
-
|
|
4007
|
+
if (outOfRange) {
|
|
4008
|
+
if (childrens.sort === 'Ascending') {
|
|
4009
|
+
if (hierarchy[0].actualText === 'Grand Total') {
|
|
4010
|
+
hierarchy.splice(1, 0, outOfRange);
|
|
4011
|
+
}
|
|
4012
|
+
else {
|
|
4013
|
+
hierarchy.splice(0, 0, outOfRange);
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
else {
|
|
4017
|
+
if (hierarchy[hierarchy.length - 1].actualText === 'Grand Total') {
|
|
4018
|
+
hierarchy.splice(hierarchy.length - 1, 0, outOfRange);
|
|
4019
|
+
}
|
|
4020
|
+
else {
|
|
4021
|
+
hierarchy.splice(hierarchy.length, 0, outOfRange);
|
|
4022
|
+
}
|
|
4023
|
+
}
|
|
3978
4024
|
}
|
|
3979
4025
|
if (alphaNumbervalue.length > 0) {
|
|
3980
|
-
this.
|
|
3981
|
-
alphaNumbervalue = this.sortHeaders(fieldName, childrens, hierarchy, childrens.sort, childrens.isAlphanumeric);
|
|
4026
|
+
this.sortHeaders(fieldName, childrens, hierarchy, childrens.sort, childrens.isAlphanumeric);
|
|
3982
4027
|
}
|
|
3983
|
-
return hierarchy
|
|
4028
|
+
return hierarchy;
|
|
3984
4029
|
}
|
|
3985
4030
|
else {
|
|
3986
4031
|
return this.sortHeaders(fieldName, childrens, hierarchy, childrens.sort, childrens.type);
|
|
@@ -4818,7 +4863,7 @@ class PivotEngine {
|
|
|
4818
4863
|
let selectedColumnValue = 0;
|
|
4819
4864
|
if (selectedColumnValues.length === 0) {
|
|
4820
4865
|
let selectedRow = this.getSelectedRow(currentSet.rowHeaders, rowheads);
|
|
4821
|
-
selectedColumnValue = this.getAggregateValue(selectedRow.index, selectedColumn.indexObject, this.fieldList[name].index, headers.type);
|
|
4866
|
+
selectedColumnValue = this.getAggregateValue(selectedRow.index, selectedColumn.indexObject, this.fieldList[name].index, headers.type, false);
|
|
4822
4867
|
}
|
|
4823
4868
|
else {
|
|
4824
4869
|
selectedColumnValue = selectedColumnValues[index[0]].value;
|
|
@@ -4873,7 +4918,7 @@ class PivotEngine {
|
|
|
4873
4918
|
// let cVal: number = currentSet.value / (selectedRowValues[i[1]] as IAxisSet).value;
|
|
4874
4919
|
let selectedRowValue = 0;
|
|
4875
4920
|
if (selectedRowValues.length === 0 && activeValues) {
|
|
4876
|
-
selectedRowValue = this.getAggregateValue(activeValues.index, colheads[i[1] - 1].indexObject, this.fieldList[name].index, headers.type);
|
|
4921
|
+
selectedRowValue = this.getAggregateValue(activeValues.index, colheads[i[1] - 1].indexObject, this.fieldList[name].index, headers.type, false);
|
|
4877
4922
|
}
|
|
4878
4923
|
else {
|
|
4879
4924
|
selectedRowValue = selectedRowValues[i[1]] ? selectedRowValues[i[1]].actualValue : 0;
|
|
@@ -4917,7 +4962,7 @@ class PivotEngine {
|
|
|
4917
4962
|
let selectedColValue = 0;
|
|
4918
4963
|
if (selectedColumnValues.length === 0) {
|
|
4919
4964
|
let selectedRow = this.getSelectedRow(currentSet.rowHeaders, rowheads);
|
|
4920
|
-
selectedColValue = this.getAggregateValue(selectedRow.index, selectedCol.indexObject, this.fieldList[name].index, headers.type);
|
|
4965
|
+
selectedColValue = this.getAggregateValue(selectedRow.index, selectedCol.indexObject, this.fieldList[name].index, headers.type, false);
|
|
4921
4966
|
}
|
|
4922
4967
|
else {
|
|
4923
4968
|
selectedColValue = selectedColumnValues[i[0]].value;
|
|
@@ -4946,7 +4991,7 @@ class PivotEngine {
|
|
|
4946
4991
|
rowheads[rlen].level === item.level && currentSet.axis === 'value' &&
|
|
4947
4992
|
currentSet.actualText === name) {
|
|
4948
4993
|
if (rowheads[rlen].type !== 'grand sum') {
|
|
4949
|
-
cVal += (!currentSet.showSubTotals && !(!isNullOrUndefined(currentSet.actualValue) && isNaN(currentSet.actualValue))) ? currentSet.actualValue : currentSet.value;
|
|
4994
|
+
cVal += (!currentSet.showSubTotals && !(!isNullOrUndefined(currentSet.actualValue) && isNaN(currentSet.actualValue))) ? currentSet.actualValue : (!isNullOrUndefined(currentSet.value) && !isNaN(currentSet.value)) ? currentSet.value : null;
|
|
4950
4995
|
currentSet.formattedText = currentSet.showSubTotals ? (cVal === 0 && (currentSet.actualValue && currentSet.actualValue !== 0) ? '' : this.getFormattedValue(cVal, name).formattedText) : currentSet.formattedText;
|
|
4951
4996
|
if (!this.aggregatedValueMatrix[rlen]) {
|
|
4952
4997
|
this.aggregatedValueMatrix[rlen] = [];
|
|
@@ -5046,7 +5091,7 @@ class PivotEngine {
|
|
|
5046
5091
|
let valueContent = ['cVal', 'rTotalVal', 'cTotalVal', 'gTotalVal'];
|
|
5047
5092
|
let i = 0;
|
|
5048
5093
|
for (let rIndex of gTotalIndex) {
|
|
5049
|
-
totalValues[valueContent[i]] = this.getAggregateValue((rIndex[0]).index, (rIndex[1]).indexObject, mPos, aggregate);
|
|
5094
|
+
totalValues[valueContent[i]] = this.getAggregateValue((rIndex[0]).index, (rIndex[1]).indexObject, mPos, aggregate, i === 0 ? false : true);
|
|
5050
5095
|
i++;
|
|
5051
5096
|
}
|
|
5052
5097
|
let val = ((totalValues.cVal) * (totalValues.gTotalVal)) / ((totalValues.rTotalVal) * (totalValues.cTotalVal));
|
|
@@ -5066,7 +5111,7 @@ class PivotEngine {
|
|
|
5066
5111
|
let valueContent = ['cVal', 'gTotalVal'];
|
|
5067
5112
|
let i = 0;
|
|
5068
5113
|
for (let rIndex of gTotalIndex) {
|
|
5069
|
-
totalValues[valueContent[i]] = this.getAggregateValue((rIndex[0]).index, (rIndex[1]).indexObject, mPos, aggregate);
|
|
5114
|
+
totalValues[valueContent[i]] = this.getAggregateValue((rIndex[0]).index, (rIndex[1]).indexObject, mPos, aggregate, i === 0 ? false : true);
|
|
5070
5115
|
i++;
|
|
5071
5116
|
}
|
|
5072
5117
|
let val = ((totalValues.cVal) / (totalValues.gTotalVal));
|
|
@@ -5077,7 +5122,7 @@ class PivotEngine {
|
|
|
5077
5122
|
}
|
|
5078
5123
|
break;
|
|
5079
5124
|
default:
|
|
5080
|
-
let val = this.getAggregateValue(rows[rln].index, columns[cln].indexObject, mPos, aggregate);
|
|
5125
|
+
let val = this.getAggregateValue(rows[rln].index, columns[cln].indexObject, mPos, aggregate, false);
|
|
5081
5126
|
value = (rows[rln].members.length > 0 && rows[rln].hasChild && rows[rln].isDrilled && ((!isNullOrUndefined(rows[rln].showSubTotals) && !rows[rln].showSubTotals) ||
|
|
5082
5127
|
!this.showSubTotals || !this.showRowSubTotals)) ? undefined : val;
|
|
5083
5128
|
actualValue = val;
|
|
@@ -5115,6 +5160,7 @@ class PivotEngine {
|
|
|
5115
5160
|
isNaN(value) && !isNullOrUndefined(value) &&
|
|
5116
5161
|
(['PopulationStDev', 'SampleStDev', 'PopulationVar', 'SampleVar']).indexOf(aggregate) !== -1) {
|
|
5117
5162
|
formattedText = '#DIV/0!';
|
|
5163
|
+
value = 0;
|
|
5118
5164
|
}
|
|
5119
5165
|
//dln = data[tnum].length;
|
|
5120
5166
|
formattedText = (cellDetails.skipFormatting ? isNullOrUndefined(value) ?
|
|
@@ -5123,8 +5169,8 @@ class PivotEngine {
|
|
|
5123
5169
|
axis: 'value', actualText: field, indexObject: this.isDrillThrough ? this.rawIndexObject : {},
|
|
5124
5170
|
rowHeaders: rows[rln].type === 'grand sum' ? '' : rows[rln].valueSort.levelName,
|
|
5125
5171
|
columnHeaders: columns[cln].type === 'grand sum' ? '' : columns[cln].valueSort.levelName,
|
|
5126
|
-
formattedText: formattedText, value:
|
|
5127
|
-
actualValue:
|
|
5172
|
+
formattedText: formattedText, value: value,
|
|
5173
|
+
actualValue: actualValue,
|
|
5128
5174
|
rowIndex: tnum, colIndex: dln, isSum: isSum, isGrandSum: isGrand, showSubTotals: !subTotal
|
|
5129
5175
|
};
|
|
5130
5176
|
this.rawIndexObject = {};
|
|
@@ -5425,7 +5471,7 @@ class PivotEngine {
|
|
|
5425
5471
|
}
|
|
5426
5472
|
}
|
|
5427
5473
|
/* eslint-disable */
|
|
5428
|
-
getAggregateValue(rowIndex, columnIndex, value, type) {
|
|
5474
|
+
getAggregateValue(rowIndex, columnIndex, value, type, isGrandTotal) {
|
|
5429
5475
|
//rowIndex = rowIndex.sort();
|
|
5430
5476
|
//columnIndex = columnIndex.sort();
|
|
5431
5477
|
let rlt = rowIndex.length;
|
|
@@ -5603,7 +5649,7 @@ class PivotEngine {
|
|
|
5603
5649
|
let value = aggregateField[aggregatedValue.formula];
|
|
5604
5650
|
if (value === undefined) {
|
|
5605
5651
|
let type = aggregatedValue.type;
|
|
5606
|
-
value = this.getAggregateValue(rowIndex, columnIndex, aggregatedValue.index, type);
|
|
5652
|
+
value = this.getAggregateValue(rowIndex, columnIndex, aggregatedValue.index, type, false);
|
|
5607
5653
|
aggregateField[aggregatedValue.formula] = value;
|
|
5608
5654
|
}
|
|
5609
5655
|
actualFormula = (actualFormula).replace(aggregatedValue.formula, String(value));
|
|
@@ -5617,7 +5663,9 @@ class PivotEngine {
|
|
|
5617
5663
|
while (rowIndex[ri] !== undefined) {
|
|
5618
5664
|
if (columnIndex[rowIndex[ri]] !== undefined) {
|
|
5619
5665
|
isValueExist = true;
|
|
5620
|
-
|
|
5666
|
+
if (!isGrandTotal) {
|
|
5667
|
+
this.rawIndexObject[rowIndex[ri]] = rowIndex[ri];
|
|
5668
|
+
}
|
|
5621
5669
|
//let cIndx: number = isLeastLevel ? columnIndex.splice(columnIndex.indexOf(rowIndex[ri]), 1)[0] : rowIndex[ri];
|
|
5622
5670
|
let currentVal = this.valueMatrix[rowIndex[ri]][value];
|
|
5623
5671
|
if (isNullOrUndefined(cellValue) && isNullOrUndefined(currentVal)) {
|
|
@@ -7406,6 +7454,7 @@ class Render {
|
|
|
7406
7454
|
bindGrid(parent, isEmpty) {
|
|
7407
7455
|
this.injectGridModules(parent);
|
|
7408
7456
|
this.parent.grid = new Grid({
|
|
7457
|
+
cssClass: this.parent.cssClass,
|
|
7409
7458
|
frozenColumns: 1,
|
|
7410
7459
|
frozenRows: 0,
|
|
7411
7460
|
enableHover: false,
|
|
@@ -7596,9 +7645,6 @@ class Render {
|
|
|
7596
7645
|
}
|
|
7597
7646
|
/* eslint-disable */
|
|
7598
7647
|
contextMenuOpen(args) {
|
|
7599
|
-
if (args.element && this.parent.cssClass) {
|
|
7600
|
-
addClass([args.element.parentElement], this.parent.cssClass);
|
|
7601
|
-
}
|
|
7602
7648
|
for (let item of args.items) {
|
|
7603
7649
|
let cellTarget = this.parent.lastCellClicked;
|
|
7604
7650
|
let elem = null;
|
|
@@ -9054,6 +9100,12 @@ class Render {
|
|
|
9054
9100
|
}
|
|
9055
9101
|
}
|
|
9056
9102
|
else {
|
|
9103
|
+
if ((['PercentageOfDifferenceFrom', 'PercentageOfRowTotal', 'PercentageOfColumnTotal', 'PercentageOfGrandTotal', 'PercentageOfParentRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentTotal']).indexOf(field.type) > -1) {
|
|
9104
|
+
format = 'P2';
|
|
9105
|
+
}
|
|
9106
|
+
else if (['PopulationStDev', 'SampleStDev', 'PopulationVar', 'SampleVar', 'Index'].indexOf(field.type) > -1) {
|
|
9107
|
+
format = undefined;
|
|
9108
|
+
}
|
|
9057
9109
|
if (this.parent.dataSourceSettings.formatSettings.length > 0) {
|
|
9058
9110
|
for (let fCnt = 0; fCnt < this.parent.dataSourceSettings.formatSettings.length; fCnt++) {
|
|
9059
9111
|
let formatSettings = this.parent.dataSourceSettings.formatSettings[fCnt];
|
|
@@ -9148,12 +9200,18 @@ class Render {
|
|
|
9148
9200
|
else {
|
|
9149
9201
|
this.colPos++;
|
|
9150
9202
|
/* eslint-disable-next-line */
|
|
9151
|
-
|
|
9203
|
+
let pivotValue = args.data[this.colPos];
|
|
9204
|
+
if (isNullOrUndefined(pivotValue.value) || isNullOrUndefined(pivotValue.formattedText) || pivotValue.formattedText === "") {
|
|
9152
9205
|
args.value = this.parent.exportType === 'Excel' ? null : '';
|
|
9153
9206
|
}
|
|
9154
9207
|
else {
|
|
9155
|
-
|
|
9156
|
-
|
|
9208
|
+
let aggMatrix = this.parent.dataType === 'pivot' && this.parent.engineModule ? this.parent.engineModule.aggregatedValueMatrix : undefined;
|
|
9209
|
+
if (aggMatrix && aggMatrix[pivotValue.rowIndex] && aggMatrix[pivotValue.rowIndex][pivotValue.colIndex]) {
|
|
9210
|
+
args.value = aggMatrix[pivotValue.rowIndex][pivotValue.colIndex];
|
|
9211
|
+
}
|
|
9212
|
+
else {
|
|
9213
|
+
args.value = !isNullOrUndefined(pivotValue.value) ? (pivotValue.formattedText === '#DIV/0!' ? pivotValue.formattedText : pivotValue.value) : pivotValue.formattedText;
|
|
9214
|
+
}
|
|
9157
9215
|
}
|
|
9158
9216
|
}
|
|
9159
9217
|
args = this.exportContentEvent(args);
|
|
@@ -9592,6 +9650,15 @@ class EventBase {
|
|
|
9592
9650
|
/* eslint-disable */
|
|
9593
9651
|
let membersInfo = fieldInfo && fieldInfo.membersOrder ?
|
|
9594
9652
|
[...fieldInfo.membersOrder] : [];
|
|
9653
|
+
let outOfRange;
|
|
9654
|
+
if (members[0].actualText === 'Out of Range') {
|
|
9655
|
+
outOfRange = members[0];
|
|
9656
|
+
members.splice(0, 1);
|
|
9657
|
+
}
|
|
9658
|
+
else if (members[members.length - 1].actualText === 'Out of Range') {
|
|
9659
|
+
outOfRange = members[members.length - 1];
|
|
9660
|
+
members.splice(members.length - 1, 1);
|
|
9661
|
+
}
|
|
9595
9662
|
let sortDetails = {
|
|
9596
9663
|
fieldName: fieldName,
|
|
9597
9664
|
sortOrder: fieldInfo.sort,
|
|
@@ -9613,6 +9680,24 @@ class EventBase {
|
|
|
9613
9680
|
isInclude = this.isValidFilterItemsAvail(fieldName, filterObj) && filterObj.type === 'Include' ? true : false;
|
|
9614
9681
|
filterItems = filterObj.items ? filterObj.items : [];
|
|
9615
9682
|
}
|
|
9683
|
+
if (outOfRange) {
|
|
9684
|
+
if (sortDetails.sortOrder === 'Ascending') {
|
|
9685
|
+
if (members[members.length - 1].actualText === 'Grand Total') {
|
|
9686
|
+
members.splice(members.length - 1, 0, outOfRange);
|
|
9687
|
+
}
|
|
9688
|
+
else {
|
|
9689
|
+
members.splice(members.length, 0, outOfRange);
|
|
9690
|
+
}
|
|
9691
|
+
}
|
|
9692
|
+
else {
|
|
9693
|
+
if (members[0].actualText === 'Grand Total') {
|
|
9694
|
+
members.splice(1, 0, outOfRange);
|
|
9695
|
+
}
|
|
9696
|
+
else {
|
|
9697
|
+
members.splice(0, 0, outOfRange);
|
|
9698
|
+
}
|
|
9699
|
+
}
|
|
9700
|
+
}
|
|
9616
9701
|
if (isHeaderSortByDefault) {
|
|
9617
9702
|
let copyOrder = [];
|
|
9618
9703
|
for (let m = 0, n = 0; m < members.length; m++) {
|
|
@@ -13631,9 +13716,8 @@ class DrillThroughDialog {
|
|
|
13631
13716
|
}
|
|
13632
13717
|
let actualText = eventArgs.currentCell.actualText.toString();
|
|
13633
13718
|
try {
|
|
13634
|
-
if (this.parent.currentView === 'Table' && this.
|
|
13635
|
-
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1
|
|
13636
|
-
this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
|
|
13719
|
+
if (this.parent.currentView === 'Table' && this.parent.editSettings.allowInlineEditing &&
|
|
13720
|
+
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1) {
|
|
13637
13721
|
this.parent.actionObj.actionName = editRecord;
|
|
13638
13722
|
if (this.parent.actionBeginMethod()) {
|
|
13639
13723
|
return;
|
|
@@ -13791,9 +13875,9 @@ class DrillThroughDialog {
|
|
|
13791
13875
|
let previousData = this.frameHeaderWithKeys(eventArgs.rawData[eventArgs.rawData.length - 1]);
|
|
13792
13876
|
let currentData = eventArgs.rawData[eventArgs.rawData.length - 1];
|
|
13793
13877
|
/* eslint-enable */
|
|
13794
|
-
if (eventArgs.currentCell.actualText in previousData) {
|
|
13795
|
-
|
|
13796
|
-
}
|
|
13878
|
+
// if (eventArgs.currentCell.actualText in previousData) {
|
|
13879
|
+
// currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
|
|
13880
|
+
// }
|
|
13797
13881
|
let actionInfo = {
|
|
13798
13882
|
editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
|
|
13799
13883
|
};
|
|
@@ -13924,6 +14008,7 @@ class DrillThroughDialog {
|
|
|
13924
14008
|
let drillThroughGrid = createElement('div', { id: this.parent.element.id + '_drillthroughgrid', className: DRILLTHROUGH_GRID_CLASS });
|
|
13925
14009
|
Grid.Inject(Selection, Reorder, Resize, Toolbar, ColumnChooser);
|
|
13926
14010
|
this.drillThroughGrid = new Grid({
|
|
14011
|
+
cssClass: this.parent.cssClass,
|
|
13927
14012
|
gridLines: 'Default',
|
|
13928
14013
|
allowResizing: true,
|
|
13929
14014
|
allowReordering: true,
|
|
@@ -14235,7 +14320,7 @@ class DrillThrough {
|
|
|
14235
14320
|
let valueCaption = '';
|
|
14236
14321
|
let aggType = '';
|
|
14237
14322
|
let rawData = [];
|
|
14238
|
-
if (pivotValue.rowHeaders !== undefined && pivotValue.columnHeaders !== undefined
|
|
14323
|
+
if (pivotValue.rowHeaders !== undefined && pivotValue.columnHeaders !== undefined) {
|
|
14239
14324
|
if (this.parent.dataType === 'olap') {
|
|
14240
14325
|
let tupleInfo;
|
|
14241
14326
|
if (this.parent.dataSourceSettings.valueAxis === 'row') {
|
|
@@ -14305,7 +14390,7 @@ class DrillThrough {
|
|
|
14305
14390
|
}
|
|
14306
14391
|
}
|
|
14307
14392
|
if (!isNullOrUndefined(rawData[k])) {
|
|
14308
|
-
let calculatedFeildValue = this.parent.engineModule.getAggregateValue([Number(indexArray[k])], colIndex, indexValue, 'calculatedfield');
|
|
14393
|
+
let calculatedFeildValue = this.parent.engineModule.getAggregateValue([Number(indexArray[k])], colIndex, indexValue, 'calculatedfield', false);
|
|
14309
14394
|
rawData[k][this.parent.dataSourceSettings.calculatedFieldSettings[i].name] = (isNaN(calculatedFeildValue) && isNullOrUndefined(calculatedFeildValue)) ? '#DIV/0!' : calculatedFeildValue;
|
|
14310
14395
|
}
|
|
14311
14396
|
}
|
|
@@ -14674,7 +14759,7 @@ class PivotChart {
|
|
|
14674
14759
|
let columnSeries = colHeaders + ' | ' + actualText;
|
|
14675
14760
|
let yValue = (this.parent.dataType === 'pivot' ? (this.engineModule.aggregatedValueMatrix[rowIndex] &&
|
|
14676
14761
|
!isNullOrUndefined(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex])) ?
|
|
14677
|
-
Number(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex]) : Number(cell.value) : Number(cell.value));
|
|
14762
|
+
Number(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex]) : (!isNullOrUndefined(cell.value) ? Number(cell.value) : cell.value) : (!isNullOrUndefined(cell.value) ? Number(cell.value) : cell.value));
|
|
14678
14763
|
yValue = yValue === Infinity ? null : yValue;
|
|
14679
14764
|
if (yValue === 0) {
|
|
14680
14765
|
this.accEmptyPoint = true;
|
|
@@ -14782,6 +14867,9 @@ class PivotChart {
|
|
|
14782
14867
|
if (this.persistSettings.chartSeries && this.persistSettings.chartSeries.emptyPointSettings) {
|
|
14783
14868
|
currentSeries.emptyPointSettings = this.persistSettings.chartSeries.emptyPointSettings;
|
|
14784
14869
|
}
|
|
14870
|
+
if (!currentSeries.emptyPointSettings) {
|
|
14871
|
+
currentSeries.emptyPointSettings = { mode: 'Zero' };
|
|
14872
|
+
}
|
|
14785
14873
|
this.chartSeries = this.chartSeries.concat(currentSeries);
|
|
14786
14874
|
}
|
|
14787
14875
|
}
|
|
@@ -16511,7 +16599,7 @@ __decorate$3([
|
|
|
16511
16599
|
Complex({ color: 'transparent', width: 0 }, Border)
|
|
16512
16600
|
], EmptyPointSettings.prototype, "border", void 0);
|
|
16513
16601
|
__decorate$3([
|
|
16514
|
-
Property('
|
|
16602
|
+
Property('Zero')
|
|
16515
16603
|
], EmptyPointSettings.prototype, "mode", void 0);
|
|
16516
16604
|
/**
|
|
16517
16605
|
* Allows to customize the rounded corners of the column series in the chart.
|
|
@@ -16885,7 +16973,7 @@ __decorate$3([
|
|
|
16885
16973
|
Complex({ color: 'transparent', width: 0 }, Border)
|
|
16886
16974
|
], PivotChartSeriesEmptyPointSettings.prototype, "border", void 0);
|
|
16887
16975
|
__decorate$3([
|
|
16888
|
-
Property('
|
|
16976
|
+
Property('Zero')
|
|
16889
16977
|
], PivotChartSeriesEmptyPointSettings.prototype, "mode", void 0);
|
|
16890
16978
|
/**
|
|
16891
16979
|
* Allows to customize the rounded corners of the column series in the chart.
|
|
@@ -19283,9 +19371,7 @@ class OlapEngine {
|
|
|
19283
19371
|
let lastAllStartPos;
|
|
19284
19372
|
let lastAllCount;
|
|
19285
19373
|
let availAllMember = false;
|
|
19286
|
-
let withoutAllEndPos = -1;
|
|
19287
19374
|
let isGrandtoalDataAdd = false;
|
|
19288
|
-
let prevTupInfo;
|
|
19289
19375
|
let isGrandTotalTop = false;
|
|
19290
19376
|
while (tupPos < tuples.length && !isGrandtoalDataAdd) {
|
|
19291
19377
|
let members = tuples[this.customArgs.action === 'down' ?
|
|
@@ -19294,21 +19380,11 @@ class OlapEngine {
|
|
|
19294
19380
|
let allStartPos = this.tupRowInfo[tupPos].allStartPos;
|
|
19295
19381
|
let measure = this.tupRowInfo[tupPos].measure;
|
|
19296
19382
|
let typeColl = this.tupRowInfo[tupPos].typeCollection;
|
|
19297
|
-
let drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
|
|
19298
|
-
let startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
|
|
19299
19383
|
if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
|
|
19300
19384
|
gTotals.pop();
|
|
19301
19385
|
}
|
|
19302
19386
|
if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
|
|
19303
19387
|
(!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
|
|
19304
|
-
let attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
|
|
19305
|
-
let drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
|
|
19306
|
-
drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
|
|
19307
|
-
(prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
|
|
19308
|
-
((withoutAllEndPos > prevTupInfo.measurePosition ? false :
|
|
19309
|
-
prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
|
|
19310
|
-
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
19311
|
-
: drillAllow;
|
|
19312
19388
|
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
19313
19389
|
let levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
19314
19390
|
let formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
@@ -24585,7 +24661,7 @@ let PivotView = class PivotView extends Component {
|
|
|
24585
24661
|
if (cell && hasField) {
|
|
24586
24662
|
let rowHeaders = this.getRowText(rowIndex, 0);
|
|
24587
24663
|
let columnHeaders = this.getColText(0, colIndex, rowIndex);
|
|
24588
|
-
let value = (
|
|
24664
|
+
let value = (cell.formattedText === '' ? this.localeObj.getConstant('noValue') :
|
|
24589
24665
|
cell.formattedText);
|
|
24590
24666
|
if (this.tooltipTemplate && this.getTooltipTemplate() !== undefined) {
|
|
24591
24667
|
let rowFields = this.getHeaderField(rowIndex, colIndex, 'row');
|
|
@@ -24793,9 +24869,12 @@ let PivotView = class PivotView extends Component {
|
|
|
24793
24869
|
}
|
|
24794
24870
|
let target = e.target;
|
|
24795
24871
|
let ele = null;
|
|
24872
|
+
let axis = (target.parentElement.classList.contains(ROWSHEADER) || target.classList.contains(ROWSHEADER)) ? 'row' : 'column';
|
|
24873
|
+
ele = axis === 'column' ? closest(target, 'th') : closest(target, 'td');
|
|
24874
|
+
if (axis === 'column' && !ele && this.gridSettings.selectionSettings.mode !== 'Row') {
|
|
24875
|
+
ele = closest(target, 'td');
|
|
24876
|
+
}
|
|
24796
24877
|
if (!target.classList.contains(COLLAPSE) && !target.classList.contains(EXPAND) && this.enableValueSorting && this.dataType === 'pivot') {
|
|
24797
|
-
let axis = (target.parentElement.classList.contains(ROWSHEADER) || target.classList.contains(ROWSHEADER)) ? 'row' : 'column';
|
|
24798
|
-
ele = axis === 'column' ? closest(target, 'th') : closest(target, 'td');
|
|
24799
24878
|
this.cellClicked(target, ele, e);
|
|
24800
24879
|
try {
|
|
24801
24880
|
if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
|
|
@@ -26885,7 +26964,8 @@ class ExcelExport$1 {
|
|
|
26885
26964
|
let styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
|
|
26886
26965
|
let headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
|
|
26887
26966
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
26888
|
-
let
|
|
26967
|
+
let aggMatrix = this.parent.engineModule.aggregatedValueMatrix;
|
|
26968
|
+
let cellValue = pivotCell.axis === 'value' ? ((aggMatrix[rCnt] && aggMatrix[rCnt][cCnt]) ? aggMatrix[rCnt][cCnt] : (pivotCell.formattedText === '#DIV/0!' ? pivotCell.formattedText : pivotCell.value)) : pivotCell.formattedText;
|
|
26889
26969
|
let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
26890
26970
|
|| (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
|
|
26891
26971
|
if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
|
|
@@ -28021,7 +28101,7 @@ class DialogRenderer {
|
|
|
28021
28101
|
this.parent.actionFailureMethod(execption);
|
|
28022
28102
|
}
|
|
28023
28103
|
}
|
|
28024
|
-
onCloseFieldList() {
|
|
28104
|
+
onCloseFieldList(args) {
|
|
28025
28105
|
if (this.parent.allowDeferLayoutUpdate) {
|
|
28026
28106
|
this.parent.dataSourceSettings =
|
|
28027
28107
|
extend({}, this.parent.clonedDataSource.properties, null, true); /* eslint-disable-line */
|
|
@@ -28044,7 +28124,9 @@ class DialogRenderer {
|
|
|
28044
28124
|
}
|
|
28045
28125
|
if (this.parent.isPopupView && this.parent.pivotGridModule) {
|
|
28046
28126
|
this.parent.pivotGridModule.notify(uiUpdate, this);
|
|
28047
|
-
|
|
28127
|
+
if (!args.currentTarget.classList.contains('e-defer-cancel-button')) {
|
|
28128
|
+
this.parent.pivotGridModule.notify(contentReady, this);
|
|
28129
|
+
}
|
|
28048
28130
|
}
|
|
28049
28131
|
else {
|
|
28050
28132
|
this.cancelButtonClick();
|
|
@@ -35871,7 +35953,7 @@ class Toolbar$2 {
|
|
|
35871
35953
|
saveReport(args) {
|
|
35872
35954
|
if (this.currentReport && this.currentReport !== '' && args.item.id === (this.parent.element.id + 'save')) {
|
|
35873
35955
|
let saveArgs = {
|
|
35874
|
-
report: this.
|
|
35956
|
+
report: this.getCurrentReport(),
|
|
35875
35957
|
reportName: this.currentReport
|
|
35876
35958
|
};
|
|
35877
35959
|
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
@@ -36128,7 +36210,7 @@ class Toolbar$2 {
|
|
|
36128
36210
|
return;
|
|
36129
36211
|
}
|
|
36130
36212
|
let saveArgs = {
|
|
36131
|
-
report: _this.
|
|
36213
|
+
report: _this.getCurrentReport(),
|
|
36132
36214
|
reportName: reportInput.value
|
|
36133
36215
|
};
|
|
36134
36216
|
let actionInfo = {
|
|
@@ -36164,7 +36246,7 @@ class Toolbar$2 {
|
|
|
36164
36246
|
}
|
|
36165
36247
|
_this.parent.trigger(newReport);
|
|
36166
36248
|
let saveArgs = {
|
|
36167
|
-
report: _this.
|
|
36249
|
+
report: _this.getCurrentReport(),
|
|
36168
36250
|
reportName: reportInput.value
|
|
36169
36251
|
};
|
|
36170
36252
|
let actionInfo = {
|
|
@@ -36307,7 +36389,7 @@ class Toolbar$2 {
|
|
|
36307
36389
|
else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
|
|
36308
36390
|
if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
|
|
36309
36391
|
let saveArgs = {
|
|
36310
|
-
report: this.
|
|
36392
|
+
report: this.getCurrentReport(),
|
|
36311
36393
|
reportName: this.currentReport
|
|
36312
36394
|
};
|
|
36313
36395
|
let actionInfo = {
|
|
@@ -36332,7 +36414,7 @@ class Toolbar$2 {
|
|
|
36332
36414
|
else if (this.action === 'New') {
|
|
36333
36415
|
this.parent.trigger(newReport);
|
|
36334
36416
|
let saveArgs = {
|
|
36335
|
-
report: this.
|
|
36417
|
+
report: this.getCurrentReport(),
|
|
36336
36418
|
reportName: this.currentReport
|
|
36337
36419
|
};
|
|
36338
36420
|
this.parent.trigger(saveReport, saveArgs);
|
|
@@ -36343,7 +36425,7 @@ class Toolbar$2 {
|
|
|
36343
36425
|
}
|
|
36344
36426
|
else if (this.action === 'Save') {
|
|
36345
36427
|
let saveArgs = {
|
|
36346
|
-
report: this.
|
|
36428
|
+
report: this.getCurrentReport(),
|
|
36347
36429
|
reportName: this.currentReport
|
|
36348
36430
|
};
|
|
36349
36431
|
this.parent.trigger(saveReport, saveArgs);
|
|
@@ -36640,6 +36722,15 @@ class Toolbar$2 {
|
|
|
36640
36722
|
}
|
|
36641
36723
|
this.updateItemElements();
|
|
36642
36724
|
}
|
|
36725
|
+
getCurrentReport() {
|
|
36726
|
+
let reportStr = this.parent.getPersistData();
|
|
36727
|
+
if (this.parent.dataSourceSettings.type === 'CSV') {
|
|
36728
|
+
let reportSettings = JSON.parse(reportStr);
|
|
36729
|
+
reportSettings.dataSourceSettings.dataSource.splice(0, 0, this.parent.engineModule.fields);
|
|
36730
|
+
reportStr = JSON.stringify(reportSettings);
|
|
36731
|
+
}
|
|
36732
|
+
return reportStr;
|
|
36733
|
+
}
|
|
36643
36734
|
updateItemElements() {
|
|
36644
36735
|
let itemElements = [].slice.call(this.toolbar.element.querySelectorAll('.e-toolbar-item'));
|
|
36645
36736
|
for (let element of itemElements) {
|