@syncfusion/ej2-pivotview 19.4.42 → 19.4.43
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 +12 -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 +101 -40
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +101 -40
- 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 +9 -9
- package/src/common/popups/toolbar.js +12 -12
- package/src/pivotview/actions/excel-export.js +53 -21
- package/src/pivotview/actions/pdf-export.js +35 -6
- package/src/pivotview/actions/virtualscroll.js +1 -1
|
@@ -13161,7 +13161,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13161
13161
|
var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
|
|
13162
13162
|
EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
|
|
13163
13163
|
EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
|
|
13164
|
-
EventHandler.add(mCont
|
|
13164
|
+
EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
|
|
13165
13165
|
EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
|
|
13166
13166
|
EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
|
|
13167
13167
|
EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
|
|
@@ -27054,6 +27054,14 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
27054
27054
|
for (var cCnt = 0; cCnt < colLen; cCnt++) {
|
|
27055
27055
|
if (pivotValues[rCnt][cCnt]) {
|
|
27056
27056
|
var pivotCell = pivotValues[rCnt][cCnt];
|
|
27057
|
+
var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
27058
|
+
this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
|
|
27059
|
+
this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
|
|
27060
|
+
this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
|
|
27061
|
+
pivotCell.actualText;
|
|
27062
|
+
var styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
|
|
27063
|
+
var pivotCells = currentPivotValues[rCnt][cCnt];
|
|
27064
|
+
var headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
|
|
27057
27065
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
27058
27066
|
var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
|
|
27059
27067
|
var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
@@ -27073,33 +27081,21 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
27073
27081
|
index: cCnt + 1, value: cellValue,
|
|
27074
27082
|
colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
|
|
27075
27083
|
});
|
|
27084
|
+
var lastCell = cells[cells.length - 1];
|
|
27076
27085
|
if (pivotCell.axis === 'value') {
|
|
27077
27086
|
if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
|
|
27078
27087
|
pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
|
|
27079
|
-
|
|
27080
|
-
}
|
|
27081
|
-
var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
27082
|
-
this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
|
|
27083
|
-
this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
|
|
27084
|
-
this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
|
|
27085
|
-
pivotCell.actualText;
|
|
27086
|
-
cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
|
|
27087
|
-
if (pivotCell.style) {
|
|
27088
|
-
cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
|
|
27089
|
-
cells[cells.length - 1].style.fontColor = pivotCell.style.color;
|
|
27090
|
-
cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
|
|
27091
|
-
cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
|
|
27088
|
+
lastCell.value = type === 'Excel' ? null : '';
|
|
27092
27089
|
}
|
|
27090
|
+
lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
|
|
27093
27091
|
}
|
|
27094
27092
|
else {
|
|
27095
|
-
|
|
27096
|
-
bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
|
|
27097
|
-
};
|
|
27093
|
+
lastCell.style = headerStyle;
|
|
27098
27094
|
if (pivotCell.axis === 'row' && cCnt === 0) {
|
|
27099
|
-
|
|
27095
|
+
lastCell.style = styles;
|
|
27100
27096
|
if (this.parent.dataType === 'olap') {
|
|
27101
27097
|
var indent = this.parent.renderModule.indentCollection[rCnt];
|
|
27102
|
-
|
|
27098
|
+
lastCell.style.indent = indent * 2;
|
|
27103
27099
|
maxLevel = maxLevel > indent ? maxLevel : indent;
|
|
27104
27100
|
}
|
|
27105
27101
|
else {
|
|
@@ -27109,19 +27105,55 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
27109
27105
|
var levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
|
|
27110
27106
|
(memberPos ? memberPos - 1 : memberPos);
|
|
27111
27107
|
var level = levelPosition ? (levelPosition - 1) : 0;
|
|
27112
|
-
|
|
27108
|
+
lastCell.style.indent = level * 2;
|
|
27113
27109
|
maxLevel = level > maxLevel ? level : maxLevel;
|
|
27114
27110
|
}
|
|
27115
27111
|
}
|
|
27116
27112
|
}
|
|
27117
|
-
|
|
27113
|
+
if (pivotCell.style || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
|
|
27114
|
+
lastCell.style.backgroundColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
|
|
27115
|
+
lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
|
|
27116
|
+
lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
|
|
27117
|
+
lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
|
|
27118
|
+
}
|
|
27119
|
+
lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
|
|
27120
|
+
var excelHeaderQueryCellInfoArgs = void 0;
|
|
27121
|
+
var excelQueryCellInfoArgs = void 0;
|
|
27122
|
+
if (pivotCell.axis === 'column') {
|
|
27123
|
+
excelHeaderQueryCellInfoArgs = {
|
|
27124
|
+
style: headerStyle,
|
|
27125
|
+
cell: pivotCells,
|
|
27126
|
+
};
|
|
27127
|
+
this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
|
|
27128
|
+
}
|
|
27129
|
+
else {
|
|
27130
|
+
excelQueryCellInfoArgs = {
|
|
27131
|
+
style: styles,
|
|
27132
|
+
cell: pivotCells,
|
|
27133
|
+
column: undefined,
|
|
27134
|
+
data: pivotValues,
|
|
27135
|
+
value: cellValue
|
|
27136
|
+
};
|
|
27137
|
+
this.parent.trigger(excelQueryCellInfo, excelQueryCellInfoArgs);
|
|
27138
|
+
}
|
|
27139
|
+
lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
|
|
27140
|
+
lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
|
|
27118
27141
|
}
|
|
27119
27142
|
}
|
|
27120
27143
|
cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
|
|
27121
27144
|
}
|
|
27122
27145
|
else {
|
|
27146
|
+
var pivotCell = { formattedText: "" };
|
|
27147
|
+
var excelHeaderQueryCellInfoArgs = void 0;
|
|
27148
|
+
if (pivotCell) {
|
|
27149
|
+
excelHeaderQueryCellInfoArgs = {
|
|
27150
|
+
style: undefined,
|
|
27151
|
+
cell: pivotCell,
|
|
27152
|
+
};
|
|
27153
|
+
this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
|
|
27154
|
+
}
|
|
27123
27155
|
cells.push({
|
|
27124
|
-
index: cCnt + 1,
|
|
27156
|
+
index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
|
|
27125
27157
|
});
|
|
27126
27158
|
}
|
|
27127
27159
|
}
|
|
@@ -27389,12 +27421,12 @@ var PDFExport = /** @__PURE__ @class */ (function () {
|
|
|
27389
27421
|
var isValueCell = false;
|
|
27390
27422
|
if (pivotValues[rCnt][cCnt]) {
|
|
27391
27423
|
var pivotCell = pivotValues[rCnt][cCnt];
|
|
27424
|
+
var cellValue = pivotCell.formattedText;
|
|
27425
|
+
cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
27426
|
+
cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
|
|
27427
|
+
this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
|
|
27428
|
+
cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
|
|
27392
27429
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
27393
|
-
var cellValue = pivotCell.formattedText;
|
|
27394
|
-
cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
27395
|
-
cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
|
|
27396
|
-
this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
|
|
27397
|
-
cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
|
|
27398
27430
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
27399
27431
|
pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
|
|
27400
27432
|
(pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
|
|
@@ -27417,11 +27449,31 @@ var PDFExport = /** @__PURE__ @class */ (function () {
|
|
|
27417
27449
|
pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
|
|
27418
27450
|
}
|
|
27419
27451
|
var args = {
|
|
27420
|
-
style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
|
|
27452
|
+
style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
|
|
27421
27453
|
pivotCell: pivotCell,
|
|
27422
27454
|
cell: pdfGridRow.cells.getCell(localCnt)
|
|
27423
27455
|
};
|
|
27424
27456
|
this.parent.trigger(onPdfCellRender, args);
|
|
27457
|
+
if (pivotCell.axis == "column") {
|
|
27458
|
+
args = {
|
|
27459
|
+
style: args.style,
|
|
27460
|
+
cell: args.cell,
|
|
27461
|
+
gridCell: args.pivotCell
|
|
27462
|
+
};
|
|
27463
|
+
this.parent.trigger(pdfHeaderQueryCellInfo, args);
|
|
27464
|
+
pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
|
|
27465
|
+
}
|
|
27466
|
+
else {
|
|
27467
|
+
args = {
|
|
27468
|
+
style: args.style,
|
|
27469
|
+
cell: args.cell,
|
|
27470
|
+
column: undefined,
|
|
27471
|
+
data: args.pivotCell,
|
|
27472
|
+
value: cellValue,
|
|
27473
|
+
};
|
|
27474
|
+
this.parent.trigger(pdfQueryCellInfo, args);
|
|
27475
|
+
pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
|
|
27476
|
+
}
|
|
27425
27477
|
if (args.style) {
|
|
27426
27478
|
this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
|
|
27427
27479
|
}
|
|
@@ -27433,6 +27485,15 @@ var PDFExport = /** @__PURE__ @class */ (function () {
|
|
|
27433
27485
|
cell: pdfGridRow.cells.getCell(localCnt)
|
|
27434
27486
|
};
|
|
27435
27487
|
this.parent.trigger(onPdfCellRender, args);
|
|
27488
|
+
var pivotCell = { formattedText: "" };
|
|
27489
|
+
if (pivotCell.axis == "column") {
|
|
27490
|
+
args = {
|
|
27491
|
+
style: args.style,
|
|
27492
|
+
cell: args.cell,
|
|
27493
|
+
gridCell: args.pivotCell
|
|
27494
|
+
};
|
|
27495
|
+
this.parent.trigger(pdfHeaderQueryCellInfo, args);
|
|
27496
|
+
}
|
|
27436
27497
|
if (args.style) {
|
|
27437
27498
|
this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
|
|
27438
27499
|
}
|
|
@@ -36116,10 +36177,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
36116
36177
|
}
|
|
36117
36178
|
};
|
|
36118
36179
|
Toolbar$$1.prototype.actionClick = function (args) {
|
|
36119
|
-
var actionName = (args.item.id ==
|
|
36120
|
-
: (args.item.id ==
|
|
36121
|
-
: (args.item.id ==
|
|
36122
|
-
: (args.item.id ==
|
|
36180
|
+
var actionName = (args.item.id == this.parent.element.id + 'new') ? addNewReport : (args.item.id == this.parent.element.id + 'save') ? saveCurrentReport : (args.item.id == this.parent.element.id + 'saveas') ? saveAsCurrentReport
|
|
36181
|
+
: (args.item.id == this.parent.element.id + 'rename') ? renameCurrentReport : (args.item.id == this.parent.element.id + 'remove') ? removeCurrentReport : (args.item.id == this.parent.element.id + 'load') ? loadReports
|
|
36182
|
+
: (args.item.id == this.parent.element.id + 'formatting') ? openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? openNumberFormatting
|
|
36183
|
+
: (args.item.id == this.parent.element.id + 'mdxQuery') ? MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? showFieldList : '';
|
|
36123
36184
|
this.parent.actionObj.actionName = actionName;
|
|
36124
36185
|
if (this.parent.actionBeginMethod()) {
|
|
36125
36186
|
return;
|
|
@@ -36961,14 +37022,14 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
36961
37022
|
var _this_1 = this;
|
|
36962
37023
|
var exportArgs = {};
|
|
36963
37024
|
var type;
|
|
36964
|
-
var actionName = (args.item.id ==
|
|
36965
|
-
: (args.item.id == "
|
|
36966
|
-
: (args.item.id == "
|
|
36967
|
-
: (args.item.id == "
|
|
36968
|
-
: (args.item.id == "
|
|
36969
|
-
: (args.item.id == "
|
|
36970
|
-
: (args.item.id == "
|
|
36971
|
-
: (args.item.id == "
|
|
37025
|
+
var actionName = (args.item.id == this.parent.element.id + 'grid') ? tableView : (args.item.id == this.parent.element.id + '_' + "Column") ? chartView : (args.item.id == this.parent.element.id + '_' + "Bar") ? chartView : (args.item.id == this.parent.element.id + '_' + "Line") ? chartView
|
|
37026
|
+
: (args.item.id == this.parent.element.id + '_' + "Area") ? chartView : (args.item.id == this.parent.element.id + '_' + "Scatter") ? chartView : (args.item.id == this.parent.element.id + '_' + "Polar") ? chartView : (args.item.id == this.parent.element.id + '_' + "ChartMoreOption") ? chartView
|
|
37027
|
+
: (args.item.id == this.parent.element.id + '_' + "multipleAxes") ? multipleAxis : (args.item.id == this.parent.element.id + '_' + "showLegend") ? showLegend : (args.item.id == this.parent.element.id + "pdf") ? pdfExport : (args.item.id == this.parent.element.id + "png") ? pngExport
|
|
37028
|
+
: (args.item.id == this.parent.element.id + "excel") ? excelExport : (args.item.id == this.parent.element.id + "csv") ? csvExport : (args.item.id == this.parent.element.id + "jpeg") ? jpegExport : (args.item.id == this.parent.element.id + "svg") ? svgExport
|
|
37029
|
+
: (args.item.id == this.parent.element.id + "notsubtotal") ? hideSubTotals : (args.item.id == this.parent.element.id + "subtotalrow") ? subTotalsRow : (args.item.id == this.parent.element.id + "subtotalcolumn") ? subTotalsColumn
|
|
37030
|
+
: (args.item.id == this.parent.element.id + "subtotal") ? showSubTotals : (args.item.id == this.parent.element.id + "notgrandtotal") ? hideGrandTotals : (args.item.id == this.parent.element.id + "grandtotalrow") ? grandTotalsRow
|
|
37031
|
+
: (args.item.id == this.parent.element.id + "grandtotalcolumn") ? grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? showGrandTotals
|
|
37032
|
+
: (args.item.id == this.parent.element.id + "numberFormattingMenu") ? numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? conditionalFormattingMenu : '';
|
|
36972
37033
|
this.parent.actionObj.actionName = actionName;
|
|
36973
37034
|
if (this.parent.actionBeginMethod()) {
|
|
36974
37035
|
return;
|