@syncfusion/ej2-pivotview 20.2.39 → 20.2.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 +14 -1
- 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 +274 -237
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +278 -241
- 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 +22 -22
- package/src/common/base/constant.d.ts +2 -0
- package/src/common/base/constant.js +2 -0
- package/src/common/base/css-constant.d.ts +2 -4
- package/src/common/base/css-constant.js +3 -5
- package/src/common/base/interface.d.ts +11 -0
- package/src/common/calculatedfield/calculated-field.d.ts +3 -1
- package/src/common/calculatedfield/calculated-field.js +163 -168
- package/src/common/conditionalformatting/conditional-formatting.js +4 -3
- package/src/common/popups/grouping.js +2 -2
- package/src/common/popups/toolbar.js +6 -6
- package/src/pivotchart/base/pivotchart.js +16 -12
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.d.ts +1 -1
- package/src/pivotview/actions/excel-export.js +13 -4
- package/src/pivotview/actions/keyboard.js +6 -6
- package/src/pivotview/actions/pdf-export.d.ts +1 -1
- package/src/pivotview/actions/pdf-export.js +13 -2
- package/src/pivotview/base/pivotview-model.d.ts +7 -2
- package/src/pivotview/base/pivotview.d.ts +6 -2
- package/src/pivotview/base/pivotview.js +25 -18
- package/src/pivotview/renderer/render.js +24 -14
- package/styles/bootstrap-dark.css +22 -20
- package/styles/bootstrap.css +22 -20
- package/styles/bootstrap4.css +22 -20
- package/styles/bootstrap5-dark.css +22 -20
- package/styles/bootstrap5.css +22 -20
- package/styles/fabric-dark.css +22 -20
- package/styles/fabric.css +22 -20
- package/styles/fluent-dark.css +22 -20
- package/styles/fluent.css +22 -20
- package/styles/highcontrast-light.css +22 -20
- package/styles/highcontrast.css +22 -20
- package/styles/material-dark.css +22 -20
- package/styles/material.css +22 -20
- package/styles/pivotfieldlist/_layout.scss +13 -9
- package/styles/pivotfieldlist/_theme.scss +1 -2
- package/styles/pivotfieldlist/bootstrap-dark.css +22 -20
- package/styles/pivotfieldlist/bootstrap.css +22 -20
- package/styles/pivotfieldlist/bootstrap4.css +22 -20
- package/styles/pivotfieldlist/bootstrap5-dark.css +22 -20
- package/styles/pivotfieldlist/bootstrap5.css +22 -20
- package/styles/pivotfieldlist/fabric-dark.css +22 -20
- package/styles/pivotfieldlist/fabric.css +22 -20
- package/styles/pivotfieldlist/fluent-dark.css +22 -20
- package/styles/pivotfieldlist/fluent.css +22 -20
- package/styles/pivotfieldlist/highcontrast-light.css +22 -20
- package/styles/pivotfieldlist/highcontrast.css +22 -20
- package/styles/pivotfieldlist/material-dark.css +22 -20
- package/styles/pivotfieldlist/material.css +22 -20
- package/styles/pivotfieldlist/tailwind-dark.css +22 -20
- package/styles/pivotfieldlist/tailwind.css +22 -20
- package/styles/tailwind-dark.css +22 -20
- package/styles/tailwind.css +22 -20
|
@@ -1088,12 +1088,12 @@ var Toolbar = /** @class */ (function () {
|
|
|
1088
1088
|
});
|
|
1089
1089
|
args.element.innerText = '';
|
|
1090
1090
|
checkbox.appendTo('#' + this.parent.element.id + '_' + 'checkBox');
|
|
1091
|
-
if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) &&
|
|
1091
|
+
if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) &&
|
|
1092
1092
|
!args.element.classList.contains(cls.MENU_DISABLE)) {
|
|
1093
1093
|
args.element.classList.add(cls.MENU_DISABLE);
|
|
1094
1094
|
checkbox.disabled = true;
|
|
1095
1095
|
}
|
|
1096
|
-
else if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) < 0) &&
|
|
1096
|
+
else if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) < 0) &&
|
|
1097
1097
|
args.element.classList.contains(cls.MENU_DISABLE)) {
|
|
1098
1098
|
args.element.classList.remove(cls.MENU_DISABLE);
|
|
1099
1099
|
checkbox.disabled = false;
|
|
@@ -1129,7 +1129,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
1129
1129
|
this.showLableState = chartSettings.legendSettings.visible;
|
|
1130
1130
|
}
|
|
1131
1131
|
else {
|
|
1132
|
-
this.showLableState = ['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1 ?
|
|
1132
|
+
this.showLableState = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1 ?
|
|
1133
1133
|
false : true;
|
|
1134
1134
|
}
|
|
1135
1135
|
return this.showLableState;
|
|
@@ -1612,11 +1612,11 @@ var Toolbar = /** @class */ (function () {
|
|
|
1612
1612
|
Toolbar.prototype.changeDropDown = function (args) {
|
|
1613
1613
|
var chartSettings = JSON.parse(this.parent.getPersistData()).chartSettings;
|
|
1614
1614
|
if (!(chartSettings && chartSettings.legendSettings && chartSettings.legendSettings.visible !== undefined)) {
|
|
1615
|
-
var checked = ['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(args.value.toString()) > -1 ?
|
|
1615
|
+
var checked = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(args.value.toString()) > -1 ?
|
|
1616
1616
|
false : true;
|
|
1617
1617
|
getInstance(select('#' + this.parent.element.id + '_DialogShowLabel'), CheckBox).checked = checked;
|
|
1618
1618
|
}
|
|
1619
|
-
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(args.value.toString()) > -1) {
|
|
1619
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(args.value.toString()) > -1) {
|
|
1620
1620
|
getInstance(select('#' + this.parent.element.id + '_DialogMultipleAxis'), CheckBox).disabled = true;
|
|
1621
1621
|
getInstance(select('#' + this.parent.element.id + '_AxisModeOption'), DropDownList).enabled = false;
|
|
1622
1622
|
}
|
|
@@ -1648,7 +1648,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
1648
1648
|
});
|
|
1649
1649
|
checkbox1.appendTo(select('#' + this.parent.element.id + '_DialogShowLabel', this.chartTypesDialog.element));
|
|
1650
1650
|
checkbox.appendTo(select('#' + this.parent.element.id + '_DialogMultipleAxis', this.chartTypesDialog.element));
|
|
1651
|
-
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) {
|
|
1651
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) {
|
|
1652
1652
|
checkbox.disabled = true;
|
|
1653
1653
|
getInstance(select('#' + this.parent.element.id + '_AxisModeOption'), DropDownList).enabled = false;
|
|
1654
1654
|
}
|
|
@@ -47,7 +47,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
47
47
|
if (!this.parent.chart && (this.parent.element.querySelector('.e-chart') || this.parent.element.querySelector('.e-accumulationchart'))) {
|
|
48
48
|
remove(select('#' + this.parent.element.id + '_chart', this.parent.element));
|
|
49
49
|
}
|
|
50
|
-
if (this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) {
|
|
50
|
+
if (this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') {
|
|
51
51
|
this.measureList = this.dataSourceSettings.values.map(function (item) { return item.name; });
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
@@ -127,7 +127,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
127
127
|
this.columnGroupObject = {};
|
|
128
128
|
this.accEmptyPoint = false;
|
|
129
129
|
var pivotValues = this.engineModule.pivotValues;
|
|
130
|
-
this.currentMeasure = (chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ? this.measureList[0] :
|
|
130
|
+
this.currentMeasure = (chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ? this.measureList[0] :
|
|
131
131
|
(((chartSettings.value === '' || this.dataSourceSettings.values.filter(function (item) {
|
|
132
132
|
return item.name === chartSettings.value;
|
|
133
133
|
}).length === 0) && this.dataSourceSettings.values.length > 0) ? this.dataSourceSettings.values[0].name : chartSettings.value);
|
|
@@ -171,7 +171,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
171
171
|
header.valueSort.levelName.toString().split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) : undefined;
|
|
172
172
|
isValidHeader = false;
|
|
173
173
|
if (valueSort && valueSort[0] !== 'Grand Total') {
|
|
174
|
-
if ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ||
|
|
174
|
+
if ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ||
|
|
175
175
|
valueSort.indexOf(measureNames[this.currentMeasure]) > -1) {
|
|
176
176
|
isValidHeader = true;
|
|
177
177
|
}
|
|
@@ -297,7 +297,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
297
297
|
var actualText = (this.parent.dataType === 'olap' && tupInfo && tupInfo.measureName) ?
|
|
298
298
|
tupInfo.measureName : cell.actualText;
|
|
299
299
|
if (!(this.parent.dataType === 'olap' && cell.isGrandSum) && !totColIndex[cell.colIndex] && cell.axis === 'value' && firstRowCell.type !== 'header' &&
|
|
300
|
-
actualText !== '' && ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ? true : actualText === this.currentMeasure)) {
|
|
300
|
+
actualText !== '' && ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ? true : actualText === this.currentMeasure)) {
|
|
301
301
|
if (isNullOrUndefined(firstRowCell.members)) {
|
|
302
302
|
firstRowCell.members = [];
|
|
303
303
|
}
|
|
@@ -497,7 +497,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
497
497
|
className: cls.PIVOTCHART, id: this.parent.element.id + '_chart'
|
|
498
498
|
}));
|
|
499
499
|
}
|
|
500
|
-
if (!this.chartElement && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
500
|
+
if (!this.chartElement && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis && this.chartSettings.chartSeries.type !== 'Pareto') {
|
|
501
501
|
this.parent.element.querySelector('.' + cls.PIVOTCHART).innerHTML = '';
|
|
502
502
|
this.chartElement = this.parent.element.querySelector('.' + cls.PIVOTCHART).appendChild(createElement('div', {
|
|
503
503
|
className: cls.PIVOTCHART_INNER, id: this.parent.element.id + '_chartInner',
|
|
@@ -518,7 +518,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
518
518
|
}
|
|
519
519
|
var height = this.getChartHeight();
|
|
520
520
|
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
521
|
-
this.accumulationType.indexOf(type) < 0) {
|
|
521
|
+
this.accumulationType.indexOf(type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') {
|
|
522
522
|
this.parent.element.querySelector('.' + cls.PIVOTCHART).style.height =
|
|
523
523
|
(height === 'auto' ? this.getChartAutoHeight() : height) + 'px';
|
|
524
524
|
this.parent.element.querySelector('.' + cls.PIVOTCHART).style.width = width + 'px';
|
|
@@ -529,7 +529,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
529
529
|
}
|
|
530
530
|
if (this.parent.chart && ((this.parent.chart.getModuleName() === 'accumulationchart' &&
|
|
531
531
|
this.accumulationType.indexOf(type) < 0) || (this.parent.chart.getModuleName() === 'chart' &&
|
|
532
|
-
this.accumulationType.indexOf(type) > -1))) {
|
|
532
|
+
this.accumulationType.indexOf(type) > -1 && this.chartSettings.chartSeries.type !== 'Pareto'))) {
|
|
533
533
|
this.parent.chart.destroy();
|
|
534
534
|
if (select('#' + this.parent.element.id + '_chart', this.parent.element)) {
|
|
535
535
|
select('#' + this.parent.element.id + '_chart', this.parent.element).innerHTML = '';
|
|
@@ -608,7 +608,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
608
608
|
zoomSettings: currentZoomSettings,
|
|
609
609
|
axes: (type === 'Polar' || type === 'Radar') ? [] : axesWithRows.axes,
|
|
610
610
|
rows: (type === 'Polar' || type === 'Radar') ? [{}] :
|
|
611
|
-
(type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' &&
|
|
611
|
+
(type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' || type === 'Pareto' &&
|
|
612
612
|
this.chartSettings.enableMultipleAxis) ? [{ height: '100%' }] : axesWithRows.rows,
|
|
613
613
|
columns: (type === 'Polar' || type === 'Radar') ? [{}] :
|
|
614
614
|
(type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' &&
|
|
@@ -618,7 +618,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
618
618
|
width: width,
|
|
619
619
|
height: (this.parent.chartSettings.chartSeries.type !== 'Polar' &&
|
|
620
620
|
this.parent.chartSettings.chartSeries.type !== 'Radar' && this.parent.chartSettings.enableScrollOnMultiAxis &&
|
|
621
|
-
this.parent.chartSettings.enableMultipleAxis && this.parent.dataSourceSettings.values.length > 0) ?
|
|
621
|
+
this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.chartSeries.type !== 'Pareto' && this.parent.dataSourceSettings.values.length > 0) ?
|
|
622
622
|
Number(height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? isNaN(Number(height)) ?
|
|
623
623
|
height.toString() : (Number(height) - 5).toString() :
|
|
624
624
|
(!isNaN(Number(height)) || this.parent.dataSourceSettings.values.length > 1) ?
|
|
@@ -719,6 +719,10 @@ var PivotChart = /** @class */ (function () {
|
|
|
719
719
|
this.parent.chart.rows = [{ height: '100%' }];
|
|
720
720
|
this.parent.chart.columns = axesWithRows.columns;
|
|
721
721
|
}
|
|
722
|
+
else if (type === 'Pareto' && this.chartSettings.enableMultipleAxis) {
|
|
723
|
+
this.parent.chart.rows = [{ height: '100%' }];
|
|
724
|
+
this.parent.chart.columns = [{ width: '100%' }];
|
|
725
|
+
}
|
|
722
726
|
else {
|
|
723
727
|
this.parent.chart.rows = axesWithRows.rows;
|
|
724
728
|
this.parent.chart.columns = [{ width: '100%' }];
|
|
@@ -1122,7 +1126,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
1122
1126
|
};
|
|
1123
1127
|
PivotChart.prototype.tooltipRender = function (args) {
|
|
1124
1128
|
var measure = args.series.yAxisName ? (args.series.yAxisName.split('_CumulativeAxis')[0]) :
|
|
1125
|
-
((this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(this.chartSettings.chartSeries.type) < 0) ?
|
|
1129
|
+
((this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(this.chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ?
|
|
1126
1130
|
args.series.name ? args.series.name.split(' | ')[1] : args.data.seriesName ?
|
|
1127
1131
|
args.data.seriesName.split(' | ')[1] : this.currentMeasure : this.measuresNames[this.currentMeasure] ?
|
|
1128
1132
|
this.measuresNames[this.currentMeasure] : this.currentMeasure);
|
|
@@ -1194,7 +1198,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
1194
1198
|
}
|
|
1195
1199
|
}
|
|
1196
1200
|
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
1197
|
-
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
|
|
1201
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
|
|
1198
1202
|
this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflow = 'visible';
|
|
1199
1203
|
}
|
|
1200
1204
|
else {
|
|
@@ -1626,7 +1630,7 @@ var PivotChart = /** @class */ (function () {
|
|
|
1626
1630
|
/* eslint-disable */
|
|
1627
1631
|
/** @hidden */
|
|
1628
1632
|
PivotChart.prototype.getResizedChartHeight = function () {
|
|
1629
|
-
var height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
1633
|
+
var height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
1630
1634
|
this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
1631
1635
|
this.parent.dataSourceSettings.values.length > 0 ? Number(this.parent.chart.height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
|
|
1632
1636
|
isNaN(Number(this.getChartHeight())) ? this.getChartHeight().toString() : (Number(this.getChartHeight()) - 5).toString() :
|
|
@@ -52,7 +52,7 @@ var DrillThrough = /** @class */ (function () {
|
|
|
52
52
|
}
|
|
53
53
|
if (ele) {
|
|
54
54
|
if (this.parent.allowDrillThrough && ele.classList.contains('e-valuescontent') || this.parent.editSettings.allowEditing) {
|
|
55
|
-
var colIndex = Number(ele.getAttribute('
|
|
55
|
+
var colIndex = Number(ele.getAttribute('data-colindex'));
|
|
56
56
|
var rowIndex = Number(ele.getAttribute('index'));
|
|
57
57
|
this.executeDrillThrough(this.parent.pivotValues[rowIndex][colIndex], rowIndex, colIndex, ele);
|
|
58
58
|
}
|
|
@@ -26,7 +26,7 @@ export declare class ExcelExport {
|
|
|
26
26
|
* Method to perform excel export.
|
|
27
27
|
* @hidden
|
|
28
28
|
*/
|
|
29
|
-
exportToExcel(type: string, exportProperties?: ExcelExportProperties): void;
|
|
29
|
+
exportToExcel(type: string, exportProperties?: ExcelExportProperties, isBlob?: Boolean): void;
|
|
30
30
|
/**
|
|
31
31
|
* To destroy the excel export module
|
|
32
32
|
* @returns {void}
|
|
@@ -60,7 +60,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
60
60
|
* Method to perform excel export.
|
|
61
61
|
* @hidden
|
|
62
62
|
*/
|
|
63
|
-
ExcelExport.prototype.exportToExcel = function (type, exportProperties) {
|
|
63
|
+
ExcelExport.prototype.exportToExcel = function (type, exportProperties, isBlob) {
|
|
64
64
|
this.rows = [];
|
|
65
65
|
this.actualrCnt = 0;
|
|
66
66
|
var isHeaderSet = !isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.header);
|
|
@@ -247,12 +247,21 @@ var ExcelExport = /** @class */ (function () {
|
|
|
247
247
|
workSheets.push({ columns: columns, rows: this.rows });
|
|
248
248
|
}
|
|
249
249
|
var book = new Workbook({ worksheets: workSheets }, type === 'Excel' ? 'xlsx' : 'csv', undefined, this.parent.currencyCode);
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
var fileExtension = fileName.split(".").pop();
|
|
251
|
+
var blobData;
|
|
252
|
+
if (!isBlob) {
|
|
253
|
+
book.save(fileExtension === "xlsx" || fileExtension === "csv" ?
|
|
254
|
+
fileName : (fileName + (type === 'Excel' ? '.xlsx' : '.csv')));
|
|
252
255
|
}
|
|
253
256
|
else {
|
|
254
|
-
book.
|
|
257
|
+
blobData = book.saveAsBlob(fileExtension === "xlsx" || type === 'Excel' ?
|
|
258
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' : 'text/csv');
|
|
255
259
|
}
|
|
260
|
+
var exportCompleteEventArgs = {
|
|
261
|
+
type: type,
|
|
262
|
+
promise: isBlob ? blobData : null
|
|
263
|
+
};
|
|
264
|
+
this.parent.trigger(events.exportComplete, exportCompleteEventArgs);
|
|
256
265
|
};
|
|
257
266
|
/**
|
|
258
267
|
* To destroy the excel export module
|
|
@@ -346,7 +346,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
346
346
|
if (this.parent.grid && this.parent.gridSettings.allowSelection && this.parent.gridSettings.selectionSettings.mode !== 'Row' &&
|
|
347
347
|
!target.classList.contains('e-numerictextbox')) {
|
|
348
348
|
var control_1 = this.parent;
|
|
349
|
-
var colIndex_1 = Number(e.target.getAttribute('
|
|
349
|
+
var colIndex_1 = Number(e.target.getAttribute('data-colindex'));
|
|
350
350
|
var rowIndex_1 = Number(e.target.getAttribute('index'));
|
|
351
351
|
var ele_1;
|
|
352
352
|
/* eslint-disable */
|
|
@@ -356,7 +356,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
356
356
|
control_1.renderModule.rowStartPos !== rowIndex_1)) ? null : this.getParentElement(control_1, ele_1, colIndex_1, rowIndex_1 - 1);
|
|
357
357
|
}
|
|
358
358
|
else if (e.action === 'shiftDown' || e.action === 'downArrow') {
|
|
359
|
-
ele_1 = control_1.element.querySelector('th[
|
|
359
|
+
ele_1 = control_1.element.querySelector('th[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
|
|
360
360
|
}
|
|
361
361
|
else if (e.action === 'shiftLeft' || e.action === 'leftArrow') {
|
|
362
362
|
ele_1 = e.target.previousSibling;
|
|
@@ -367,7 +367,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
367
367
|
}
|
|
368
368
|
if (!isNullOrUndefined(ele_1)) {
|
|
369
369
|
if (control_1.gridSettings.selectionSettings.mode === 'Both' ? !ele_1.classList.contains(cls.ROW_CELL_CLASS) : true) {
|
|
370
|
-
colIndex_1 = Number(ele_1.getAttribute('
|
|
370
|
+
colIndex_1 = Number(ele_1.getAttribute('data-colindex'));
|
|
371
371
|
rowIndex_1 = Number(ele_1.getAttribute('index'));
|
|
372
372
|
var colSpan_1 = Number(ele_1.getAttribute('aria-colspan'));
|
|
373
373
|
control_1.clearSelection(ele_1, e, colIndex_1, rowIndex_1);
|
|
@@ -389,11 +389,11 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
389
389
|
}
|
|
390
390
|
else {
|
|
391
391
|
if (e.action === 'upArrow') {
|
|
392
|
-
ele_1 = control_1.element.querySelector('[
|
|
392
|
+
ele_1 = control_1.element.querySelector('[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 - 1) + '"]');
|
|
393
393
|
rowIndex_1--;
|
|
394
394
|
}
|
|
395
395
|
else if (e.action === 'downArrow') {
|
|
396
|
-
ele_1 = control_1.element.querySelector('[
|
|
396
|
+
ele_1 = control_1.element.querySelector('[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
|
|
397
397
|
rowIndex_1++;
|
|
398
398
|
}
|
|
399
399
|
if (!isNullOrUndefined(ele_1)) {
|
|
@@ -423,7 +423,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
423
423
|
};
|
|
424
424
|
KeyboardInteraction.prototype.getParentElement = function (control, ele, colIndex, rowIndex) {
|
|
425
425
|
while (!ele) {
|
|
426
|
-
ele = control.element.querySelector('[
|
|
426
|
+
ele = control.element.querySelector('[data-colindex="' + colIndex + '"][index="' + rowIndex + '"]');
|
|
427
427
|
colIndex--;
|
|
428
428
|
}
|
|
429
429
|
return ele;
|
|
@@ -31,7 +31,7 @@ export declare class PDFExport {
|
|
|
31
31
|
* Method to perform pdf export.
|
|
32
32
|
* @hidden
|
|
33
33
|
*/
|
|
34
|
-
exportToPDF(pdfExportProperties?: PdfExportProperties): void;
|
|
34
|
+
exportToPDF(pdfExportProperties?: PdfExportProperties, isBlob?: Boolean): void;
|
|
35
35
|
private applyStyle;
|
|
36
36
|
private getFontFamily;
|
|
37
37
|
private getFont;
|
|
@@ -170,7 +170,7 @@ var PDFExport = /** @class */ (function () {
|
|
|
170
170
|
* @hidden
|
|
171
171
|
*/
|
|
172
172
|
/* eslint-disable */
|
|
173
|
-
PDFExport.prototype.exportToPDF = function (pdfExportProperties) {
|
|
173
|
+
PDFExport.prototype.exportToPDF = function (pdfExportProperties, isBlob) {
|
|
174
174
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
175
175
|
var eventParams = this.applyEvent();
|
|
176
176
|
var headerStyle = this.getStyle();
|
|
@@ -361,7 +361,18 @@ var PDFExport = /** @class */ (function () {
|
|
|
361
361
|
integratedCnt = 0;
|
|
362
362
|
}
|
|
363
363
|
} while (integratedCnt < colLength);
|
|
364
|
-
|
|
364
|
+
var blobData;
|
|
365
|
+
if (!isBlob) {
|
|
366
|
+
eventParams.document.save(eventParams.args.fileName + '.pdf');
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
blobData = eventParams.document.save();
|
|
370
|
+
}
|
|
371
|
+
var exportCompleteEventArgs = {
|
|
372
|
+
type: 'PDF',
|
|
373
|
+
promise: isBlob ? blobData : null
|
|
374
|
+
};
|
|
375
|
+
this.parent.trigger(events.exportComplete, exportCompleteEventArgs);
|
|
365
376
|
eventParams.document.destroy();
|
|
366
377
|
};
|
|
367
378
|
PDFExport.prototype.applyStyle = function (pdfGridRow, pivotCell, localCnt) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, Browser, Component, ModuleDeclaration, createElement, setStyleAttribute } from '@syncfusion/ej2-base';import { EmitType, EventHandler, Complex, extend, ChildProperty, Collection, isNullOrUndefined, remove } from '@syncfusion/ej2-base';import { Internationalization, L10n, NotifyPropertyChanges, INotifyPropertyChanged, compile, formatUnit } from '@syncfusion/ej2-base';import { removeClass, addClass, Event, KeyboardEventArgs, setValue, closest, select } from '@syncfusion/ej2-base';import { MouseEventArgs } from '@syncfusion/ej2-base';import { PivotEngine, IPivotValues, IAxisSet, IDataOptions, IDataSet, FieldItemInfo } from '../../base/engine';import { IPageSettings, IGroupSettings, IGridValues, IFieldListOptions, IValueSortSettings } from '../../base/engine';import { IDrilledItem, ICustomProperties, ISort, IFilter, IFieldOptions, ICalculatedFields, IDrillOptions } from '../../base/engine';import { IConditionalFormatSettings, IStringIndex, IField, IFormatSettings } from '../../base/engine';import { Tooltip, TooltipEventArgs, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { AxisFields } from '../../common/grouping-bar/axis-field-renderer';import { LoadEventArgs, EnginePopulatingEventArgs, DrillThroughEventArgs, PivotColumn, ChartLabelInfo, EditCompletedEventArgs, MultiLevelLabelClickEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs, PivotActionBeginEventArgs, PivotActionCompleteEventArgs, PivotActionFailureEventArgs, PivotActionInfo } from '../../common/base/interface';import { FetchReportArgs, LoadReportArgs, RenameReportArgs, RemoveReportArgs, ToolbarArgs } from '../../common/base/interface';import { PdfCellRenderArgs, NewReportArgs, ChartSeriesCreatedEventArgs, AggregateEventArgs } from '../../common/base/interface';import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs } from '../../common/base/interface';import { CellClickEventArgs, FieldDroppedEventArgs, HyperCellClickEventArgs, CellTemplateArgs } from '../../common/base/interface';import { BeforeExportEventArgs, EnginePopulatedEventArgs, BeginDrillThroughEventArgs, DrillArgs } from '../../common/base/interface';import { FieldListRefreshedEventArgs, MemberFilteringEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { MemberEditorOpenEventArgs, FieldRemoveEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { CalculatedFieldCreateEventArgs, NumberFormattingEventArgs, FieldDragStartEventArgs, HeadersSortEventArgs } from '../../common/base/interface';import { Render } from '../renderer/render';import { PivotCommon } from '../../common/base/pivot-common';import { Common } from '../../common/actions/common';import { GroupingBar } from '../../common/grouping-bar/grouping-bar';import { DataSourceSettingsModel, DrillOptionsModel, FieldOptionsModel, FormatSettingsModel } from '../model/datasourcesettings-model';import { DataSourceSettings } from '../model/datasourcesettings';import { GridSettings } from '../model/gridsettings';import { GridSettingsModel } from '../model/gridsettings-model';import { PivotButton } from '../../common/actions/pivot-button';import { PivotFieldList } from '../../pivotfieldlist/base/field-list';import { Grid, QueryCellInfoEventArgs, ColumnModel, Reorder, Resize, getObject } from '@syncfusion/ej2-grids';import { SelectionType, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellSelectEventArgs, RowSelectEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { RowDeselectEventArgs, ContextMenuClickEventArgs } from '@syncfusion/ej2-grids';import { EditSettingsModel, HeaderCellInfoEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { PdfExportProperties, ExcelExportProperties, ExcelQueryCellInfoEventArgs, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { ExcelHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs, PdfHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExport } from '../actions/excel-export';import { PDFExport } from '../actions/pdf-export';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { KeyboardInteraction } from '../actions/keyboard';import { PivotContextMenu } from '../../common/popups/context-menu';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { ConditionalFormatting } from '../../common/conditionalformatting/conditional-formatting';import { VirtualScroll } from '../actions/virtualscroll';import { DrillThrough } from '../actions/drill-through';import { Condition, GroupType } from '../../base/types';import { EditMode, ToolbarItems, View, Primary, AggregateTypes, ChartSeriesType, PivotTableContextMenuItem } from '../../common';import { PivotUtil } from '../../base/util';import { Toolbar } from '../../common/popups/toolbar';import { PivotChart } from '../../pivotchart/index';import { ChartSettings } from '../model/chartsettings';import { ChartSettingsModel } from '../model/chartsettings-model';import { Chart, ITooltipRenderEventArgs, ILoadedEventArgs, IPointEventArgs, AccumulationChart } from '@syncfusion/ej2-charts';import { IResizeEventArgs, IAxisLabelRenderEventArgs, ExportType } from '@syncfusion/ej2-charts';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { ClickEventArgs, BeforeOpenCloseMenuEventArgs, ItemModel } from '@syncfusion/ej2-navigations';import { OlapEngine, IOlapCustomProperties, ITupInfo, IDrillInfo, IOlapField } from '../../base/olap/engine';import { NumberFormatting } from '../../common/popups/formatting-dialog';import { Grouping } from '../../common/popups/grouping';
|
|
1
|
+
import { Property, Browser, Component, ModuleDeclaration, createElement, setStyleAttribute } from '@syncfusion/ej2-base';import { EmitType, EventHandler, Complex, extend, ChildProperty, Collection, isNullOrUndefined, remove } from '@syncfusion/ej2-base';import { Internationalization, L10n, NotifyPropertyChanges, INotifyPropertyChanged, compile, formatUnit } from '@syncfusion/ej2-base';import { removeClass, addClass, Event, KeyboardEventArgs, setValue, closest, select } from '@syncfusion/ej2-base';import { MouseEventArgs } from '@syncfusion/ej2-base';import { PivotEngine, IPivotValues, IAxisSet, IDataOptions, IDataSet, FieldItemInfo } from '../../base/engine';import { IPageSettings, IGroupSettings, IGridValues, IFieldListOptions, IValueSortSettings } from '../../base/engine';import { IDrilledItem, ICustomProperties, ISort, IFilter, IFieldOptions, ICalculatedFields, IDrillOptions } from '../../base/engine';import { IConditionalFormatSettings, IStringIndex, IField, IFormatSettings } from '../../base/engine';import { Tooltip, TooltipEventArgs, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { AxisFields } from '../../common/grouping-bar/axis-field-renderer';import { LoadEventArgs, EnginePopulatingEventArgs, DrillThroughEventArgs, PivotColumn, ChartLabelInfo, EditCompletedEventArgs, MultiLevelLabelClickEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs, PivotActionBeginEventArgs, PivotActionCompleteEventArgs, PivotActionFailureEventArgs, PivotActionInfo } from '../../common/base/interface';import { FetchReportArgs, LoadReportArgs, RenameReportArgs, RemoveReportArgs, ToolbarArgs } from '../../common/base/interface';import { PdfCellRenderArgs, NewReportArgs, ChartSeriesCreatedEventArgs, AggregateEventArgs } from '../../common/base/interface';import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs, ExportCompleteEventArgs } from '../../common/base/interface';import { CellClickEventArgs, FieldDroppedEventArgs, HyperCellClickEventArgs, CellTemplateArgs } from '../../common/base/interface';import { BeforeExportEventArgs, EnginePopulatedEventArgs, BeginDrillThroughEventArgs, DrillArgs } from '../../common/base/interface';import { FieldListRefreshedEventArgs, MemberFilteringEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { MemberEditorOpenEventArgs, FieldRemoveEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { CalculatedFieldCreateEventArgs, NumberFormattingEventArgs, FieldDragStartEventArgs, HeadersSortEventArgs } from '../../common/base/interface';import { Render } from '../renderer/render';import { PivotCommon } from '../../common/base/pivot-common';import { Common } from '../../common/actions/common';import { GroupingBar } from '../../common/grouping-bar/grouping-bar';import { DataSourceSettingsModel, DrillOptionsModel, FieldOptionsModel, FormatSettingsModel } from '../model/datasourcesettings-model';import { DataSourceSettings } from '../model/datasourcesettings';import { GridSettings } from '../model/gridsettings';import { GridSettingsModel } from '../model/gridsettings-model';import { PivotButton } from '../../common/actions/pivot-button';import { PivotFieldList } from '../../pivotfieldlist/base/field-list';import { Grid, QueryCellInfoEventArgs, ColumnModel, Reorder, Resize, getObject } from '@syncfusion/ej2-grids';import { SelectionType, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellSelectEventArgs, RowSelectEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { RowDeselectEventArgs, ContextMenuClickEventArgs } from '@syncfusion/ej2-grids';import { EditSettingsModel, HeaderCellInfoEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { PdfExportProperties, ExcelExportProperties, ExcelQueryCellInfoEventArgs, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { ExcelHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs, PdfHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExport } from '../actions/excel-export';import { PDFExport } from '../actions/pdf-export';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { KeyboardInteraction } from '../actions/keyboard';import { PivotContextMenu } from '../../common/popups/context-menu';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { ConditionalFormatting } from '../../common/conditionalformatting/conditional-formatting';import { VirtualScroll } from '../actions/virtualscroll';import { DrillThrough } from '../actions/drill-through';import { Condition, GroupType } from '../../base/types';import { EditMode, ToolbarItems, View, Primary, AggregateTypes, ChartSeriesType, PivotTableContextMenuItem } from '../../common';import { PivotUtil } from '../../base/util';import { Toolbar } from '../../common/popups/toolbar';import { PivotChart } from '../../pivotchart/index';import { ChartSettings } from '../model/chartsettings';import { ChartSettingsModel } from '../model/chartsettings-model';import { Chart, ITooltipRenderEventArgs, ILoadedEventArgs, IPointEventArgs, AccumulationChart } from '@syncfusion/ej2-charts';import { IResizeEventArgs, IAxisLabelRenderEventArgs, ExportType } from '@syncfusion/ej2-charts';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { ClickEventArgs, BeforeOpenCloseMenuEventArgs, ItemModel } from '@syncfusion/ej2-navigations';import { OlapEngine, IOlapCustomProperties, ITupInfo, IDrillInfo, IOlapField } from '../../base/olap/engine';import { NumberFormatting } from '../../common/popups/formatting-dialog';import { Grouping } from '../../common/popups/grouping';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1068,10 +1068,15 @@ export interface PivotViewModel extends ComponentModel{
|
|
|
1068
1068
|
/**
|
|
1069
1069
|
* It allows to set properties for exporting.
|
|
1070
1070
|
* @event
|
|
1071
|
-
|
|
1072
1071
|
*/
|
|
1073
1072
|
beforeExport?: EmitType<BeforeExportEventArgs>;
|
|
1074
1073
|
|
|
1074
|
+
/**
|
|
1075
|
+
* It triggers when exporting to PDF, Excel, or CSV is complete
|
|
1076
|
+
* @event
|
|
1077
|
+
*/
|
|
1078
|
+
exportComplete?: EmitType<ExportCompleteEventArgs>
|
|
1079
|
+
|
|
1075
1080
|
/**
|
|
1076
1081
|
* It allows to do changes before applying the conditional formatting.
|
|
1077
1082
|
* @event
|
|
@@ -14,7 +14,7 @@ import { AxisFields } from '../../common/grouping-bar/axis-field-renderer';
|
|
|
14
14
|
import { LoadEventArgs, EnginePopulatingEventArgs, DrillThroughEventArgs, PivotColumn, ChartLabelInfo, EditCompletedEventArgs, MultiLevelLabelClickEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs, PivotActionBeginEventArgs, PivotActionCompleteEventArgs, PivotActionFailureEventArgs } from '../../common/base/interface';
|
|
15
15
|
import { FetchReportArgs, LoadReportArgs, RenameReportArgs, RemoveReportArgs, ToolbarArgs } from '../../common/base/interface';
|
|
16
16
|
import { PdfCellRenderArgs, NewReportArgs, ChartSeriesCreatedEventArgs, AggregateEventArgs } from '../../common/base/interface';
|
|
17
|
-
import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs } from '../../common/base/interface';
|
|
17
|
+
import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs, ExportCompleteEventArgs } from '../../common/base/interface';
|
|
18
18
|
import { CellClickEventArgs, FieldDroppedEventArgs, HyperCellClickEventArgs, CellTemplateArgs } from '../../common/base/interface';
|
|
19
19
|
import { BeforeExportEventArgs, EnginePopulatedEventArgs, BeginDrillThroughEventArgs, DrillArgs } from '../../common/base/interface';
|
|
20
20
|
import { FieldListRefreshedEventArgs, MemberFilteringEventArgs, FieldDropEventArgs } from '../../common/base/interface';
|
|
@@ -1232,9 +1232,13 @@ export declare class PivotView extends Component<HTMLElement> implements INotify
|
|
|
1232
1232
|
/**
|
|
1233
1233
|
* It allows to set properties for exporting.
|
|
1234
1234
|
* @event
|
|
1235
|
-
|
|
1236
1235
|
*/
|
|
1237
1236
|
beforeExport: EmitType<BeforeExportEventArgs>;
|
|
1237
|
+
/**
|
|
1238
|
+
* It triggers when exporting to PDF, Excel, or CSV is complete
|
|
1239
|
+
* @event
|
|
1240
|
+
*/
|
|
1241
|
+
exportComplete: EmitType<ExportCompleteEventArgs>;
|
|
1238
1242
|
/**
|
|
1239
1243
|
* It allows to do changes before applying the conditional formatting.
|
|
1240
1244
|
* @event
|
|
@@ -1954,7 +1954,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
1954
1954
|
*/
|
|
1955
1955
|
PivotView.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
1956
1956
|
if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
|
|
1957
|
-
this.excelExportModule.exportToExcel('Excel', excelExportProperties);
|
|
1957
|
+
this.excelExportModule.exportToExcel('Excel', excelExportProperties, isBlob);
|
|
1958
1958
|
}
|
|
1959
1959
|
else {
|
|
1960
1960
|
this.exportType = 'Excel';
|
|
@@ -1979,7 +1979,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
1979
1979
|
*/
|
|
1980
1980
|
PivotView.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
1981
1981
|
if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
|
|
1982
|
-
this.excelExportModule.exportToExcel('CSV', excelExportProperties);
|
|
1982
|
+
this.excelExportModule.exportToExcel('CSV', excelExportProperties, isBlob);
|
|
1983
1983
|
}
|
|
1984
1984
|
else {
|
|
1985
1985
|
this.exportType = 'CSV';
|
|
@@ -2004,7 +2004,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2004
2004
|
*/
|
|
2005
2005
|
PivotView.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
2006
2006
|
if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
|
|
2007
|
-
this.pdfExportModule.exportToPDF(pdfExportProperties);
|
|
2007
|
+
this.pdfExportModule.exportToPDF(pdfExportProperties, isBlob);
|
|
2008
2008
|
}
|
|
2009
2009
|
else {
|
|
2010
2010
|
this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
@@ -2070,7 +2070,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
if (this.dataType === 'pivot') {
|
|
2072
2072
|
var clonedDrillMembers_1 = PivotUtil.cloneDrillMemberSettings(this.dataSourceSettings.drilledMembers);
|
|
2073
|
-
var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('
|
|
2073
|
+
var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('data-colindex')) : Number(closest(target, 'th').getAttribute('data-colindex'));
|
|
2074
2074
|
var rowIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('index')) : Number(closest(target, 'th').getAttribute('index'));
|
|
2075
2075
|
var currentCell = chartDrillInfo ? chartDrillInfo.cell :
|
|
2076
2076
|
this.engineModule.pivotValues[rowIndex][colIndex];
|
|
@@ -2178,7 +2178,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2178
2178
|
currentCell = chartDrillInfo.cell;
|
|
2179
2179
|
}
|
|
2180
2180
|
else {
|
|
2181
|
-
var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('
|
|
2181
|
+
var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('data-colindex')) : Number(closest(target, 'th').getAttribute('data-colindex'));
|
|
2182
2182
|
var rowIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('index')) : Number(closest(target, 'th').getAttribute('index'));
|
|
2183
2183
|
currentCell = this.olapEngineModule.pivotValues[rowIndex][colIndex];
|
|
2184
2184
|
}
|
|
@@ -2481,6 +2481,10 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2481
2481
|
(mCntVScrollPos === mCntScrollPos ? (mCntScrollPos - hScrollPos) :
|
|
2482
2482
|
(mCntScrollPos < mCntVScrollPos && (hScrollPos === mCntVScrollPos || hScrollPos > mCntScrollPos) ?
|
|
2483
2483
|
-(mCntVScrollPos - mCntScrollPos) : 0)));
|
|
2484
|
+
if (this.actionObj.actionName === 'Sort value' || this.actionObj.actionName === 'Sort field') {
|
|
2485
|
+
var excessMove = -this.scrollPosObject.horizontalSection;
|
|
2486
|
+
this.scrollPosObject.horizontalSection = this.scrollPosObject.horizontalSection + excessMove;
|
|
2487
|
+
}
|
|
2484
2488
|
horiOffset = (ele.scrollLeft > this.scrollerBrowserLimit) ?
|
|
2485
2489
|
(mCnt.querySelector('.' + cls.TABLE).style.transform.split(',')[0].trim() + ',') :
|
|
2486
2490
|
'translate(' + -(((ele.scrollLeft * this.horizontalScrollScale) -
|
|
@@ -2523,7 +2527,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2523
2527
|
}
|
|
2524
2528
|
};
|
|
2525
2529
|
PivotView.prototype.setToolTip = function (args) {
|
|
2526
|
-
var colIndex = Number(args.target.getAttribute('
|
|
2530
|
+
var colIndex = Number(args.target.getAttribute('data-colindex'));
|
|
2527
2531
|
var rowIndex = Number(args.target.getAttribute('index'));
|
|
2528
2532
|
var cell = (this.dataSourceSettings.values.length > 0 && this.pivotValues &&
|
|
2529
2533
|
this.pivotValues[rowIndex] && this.pivotValues[rowIndex][colIndex]) ?
|
|
@@ -2720,7 +2724,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2720
2724
|
var ele_1 = e.target;
|
|
2721
2725
|
var axis = (ele_1.parentElement.classList.contains(cls.ROWSHEADER) || ele_1.classList.contains(cls.ROWSHEADER)) ? 'row' : 'column';
|
|
2722
2726
|
ele_1 = axis === 'column' ? closest(ele_1, 'th') : closest(ele_1, 'td');
|
|
2723
|
-
var colIndex = Number(ele_1.getAttribute('
|
|
2727
|
+
var colIndex = Number(ele_1.getAttribute('data-colindex'));
|
|
2724
2728
|
var rowIndex = Number(ele_1.getAttribute('index'));
|
|
2725
2729
|
var selectArgs = {
|
|
2726
2730
|
cancel: false,
|
|
@@ -2797,7 +2801,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2797
2801
|
if (this.actionBeginMethod()) {
|
|
2798
2802
|
return;
|
|
2799
2803
|
}
|
|
2800
|
-
var colIndex = Number(ele.getAttribute('
|
|
2804
|
+
var colIndex = Number(ele.getAttribute('data-colindex'));
|
|
2801
2805
|
var rowIndex = Number(ele.getAttribute('index'));
|
|
2802
2806
|
if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
2803
2807
|
var header = this.pivotValues[rowIndex][colIndex];
|
|
@@ -2811,13 +2815,13 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
2811
2815
|
}
|
|
2812
2816
|
}
|
|
2813
2817
|
else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
2814
|
-
colIndex = (Number(ele.getAttribute('
|
|
2818
|
+
colIndex = (Number(ele.getAttribute('data-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
|
|
2815
2819
|
rowIndex = this.engineModule.headerContent.length - 1;
|
|
2816
2820
|
}
|
|
2817
2821
|
this.setProperties({
|
|
2818
2822
|
dataSourceSettings: {
|
|
2819
2823
|
valueSortSettings: {
|
|
2820
|
-
columnIndex: (Number(ele.getAttribute('
|
|
2824
|
+
columnIndex: (Number(ele.getAttribute('data-colindex')) +
|
|
2821
2825
|
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
2822
2826
|
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
2823
2827
|
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
@@ -3166,7 +3170,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
3166
3170
|
}
|
|
3167
3171
|
/* eslint-disable */
|
|
3168
3172
|
if (ele && !isNullOrUndefined(this.pivotValues) && this.pivotValues.length > 0) {
|
|
3169
|
-
var colIndex_1 = Number(ele.getAttribute('
|
|
3173
|
+
var colIndex_1 = Number(ele.getAttribute('data-colindex'));
|
|
3170
3174
|
var rowIndex_1 = Number(ele.getAttribute('index'));
|
|
3171
3175
|
var colSpan_1 = Number(ele.getAttribute('aria-colspan'));
|
|
3172
3176
|
var selectArgs = {
|
|
@@ -3336,10 +3340,10 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
3336
3340
|
for (var _i = 0, _a = [].slice.call(this.element.querySelectorAll('.' + cls.CELL_ACTIVE_BGCOLOR)); _i < _a.length; _i++) {
|
|
3337
3341
|
var ele = _a[_i];
|
|
3338
3342
|
removeClass([ele], [cls.CELL_ACTIVE_BGCOLOR, cls.SELECTED_BGCOLOR]);
|
|
3339
|
-
if (activeColumns.indexOf(ele.getAttribute('
|
|
3343
|
+
if (activeColumns.indexOf(ele.getAttribute('data-colindex')) === -1) {
|
|
3340
3344
|
isToggle = false;
|
|
3341
3345
|
}
|
|
3342
|
-
var colIndex = Number(ele.getAttribute('
|
|
3346
|
+
var colIndex = Number(ele.getAttribute('data-colindex'));
|
|
3343
3347
|
actColPos[colIndex] = colIndex;
|
|
3344
3348
|
}
|
|
3345
3349
|
activeColumns = Object.keys(actColPos).length > 0 ? Object.keys(actColPos).sort(function (a, b) {
|
|
@@ -3371,7 +3375,7 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
3371
3375
|
}
|
|
3372
3376
|
var count = colStart;
|
|
3373
3377
|
while (count <= colEnd) {
|
|
3374
|
-
queryStringArray.push('[
|
|
3378
|
+
queryStringArray.push('[data-colindex="' + count + '"]' + (this.gridSettings.selectionSettings.mode === 'Cell' ?
|
|
3375
3379
|
'[index="' + rowStart + '"]' : "") + '');
|
|
3376
3380
|
count++;
|
|
3377
3381
|
}
|
|
@@ -3399,23 +3403,23 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
3399
3403
|
control.cellSelectionPos = [];
|
|
3400
3404
|
for (var _i = 0, _a = [].slice.call(this.element.querySelectorAll('.' + cls.SELECTED_BGCOLOR)); _i < _a.length; _i++) {
|
|
3401
3405
|
var ele = _a[_i];
|
|
3402
|
-
control.savedSelectedCellsPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('
|
|
3406
|
+
control.savedSelectedCellsPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('data-colindex') });
|
|
3403
3407
|
}
|
|
3404
3408
|
for (var _b = 0, _c = [].slice.call(this.element.querySelectorAll('.' + cls.CELL_SELECTED_BGCOLOR)); _b < _c.length; _b++) {
|
|
3405
3409
|
var ele = _c[_b];
|
|
3406
|
-
control.cellSelectionPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('
|
|
3410
|
+
control.cellSelectionPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('data-colindex') });
|
|
3407
3411
|
}
|
|
3408
3412
|
};
|
|
3409
3413
|
PivotView.prototype.setSavedSelectedCells = function () {
|
|
3410
3414
|
var control = this;
|
|
3411
3415
|
for (var _i = 0, _a = [].slice.call(this.savedSelectedCellsPos); _i < _a.length; _i++) {
|
|
3412
3416
|
var item = _a[_i];
|
|
3413
|
-
var query = '[
|
|
3417
|
+
var query = '[data-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
|
|
3414
3418
|
addClass([control.element.querySelector(query)], [cls.CELL_ACTIVE_BGCOLOR, cls.SELECTED_BGCOLOR]);
|
|
3415
3419
|
}
|
|
3416
3420
|
for (var _b = 0, _c = [].slice.call(this.cellSelectionPos); _b < _c.length; _b++) {
|
|
3417
3421
|
var item = _c[_b];
|
|
3418
|
-
var query = '[
|
|
3422
|
+
var query = '[data-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
|
|
3419
3423
|
addClass([control.element.querySelector(query)], [cls.CELL_SELECTED_BGCOLOR]);
|
|
3420
3424
|
}
|
|
3421
3425
|
};
|
|
@@ -4449,6 +4453,9 @@ var PivotView = /** @class */ (function (_super) {
|
|
|
4449
4453
|
__decorate([
|
|
4450
4454
|
Event()
|
|
4451
4455
|
], PivotView.prototype, "beforeExport", void 0);
|
|
4456
|
+
__decorate([
|
|
4457
|
+
Event()
|
|
4458
|
+
], PivotView.prototype, "exportComplete", void 0);
|
|
4452
4459
|
__decorate([
|
|
4453
4460
|
Event()
|
|
4454
4461
|
], PivotView.prototype, "conditionalFormatting", void 0);
|