@syncfusion/ej2-pivotview 19.4.40 → 19.4.47

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-pivotview.umd.min.js +2 -2
  4. package/dist/ej2-pivotview.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-pivotview.es2015.js +167 -71
  6. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  7. package/dist/es6/ej2-pivotview.es5.js +167 -71
  8. package/dist/es6/ej2-pivotview.es5.js.map +1 -1
  9. package/dist/global/ej2-pivotview.min.js +2 -2
  10. package/dist/global/ej2-pivotview.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +18 -18
  13. package/src/common/actions/dataSource-update.d.ts +1 -1
  14. package/src/common/actions/dataSource-update.js +5 -0
  15. package/src/common/actions/node-state-modified.js +1 -1
  16. package/src/common/grouping-bar/grouping-bar.js +1 -1
  17. package/src/common/popups/toolbar.js +12 -12
  18. package/src/pivotchart/base/pivotchart.js +1 -1
  19. package/src/pivotfieldlist/base/field-list.d.ts +2 -0
  20. package/src/pivotfieldlist/base/field-list.js +4 -2
  21. package/src/pivotfieldlist/renderer/axis-table-renderer.js +1 -1
  22. package/src/pivotfieldlist/renderer/tree-renderer.js +16 -11
  23. package/src/pivotview/actions/excel-export.js +54 -25
  24. package/src/pivotview/actions/pdf-export.js +45 -9
  25. package/src/pivotview/actions/virtualscroll.d.ts +1 -0
  26. package/src/pivotview/actions/virtualscroll.js +7 -3
  27. package/src/pivotview/base/pivotview.d.ts +2 -0
  28. package/src/pivotview/base/pivotview.js +21 -6
  29. package/styles/bootstrap-dark.css +30 -14
  30. package/styles/bootstrap.css +30 -14
  31. package/styles/bootstrap4.css +30 -14
  32. package/styles/bootstrap5-dark.css +30 -14
  33. package/styles/bootstrap5.css +30 -14
  34. package/styles/fabric-dark.css +30 -14
  35. package/styles/fabric.css +30 -14
  36. package/styles/highcontrast-light.css +30 -14
  37. package/styles/highcontrast.css +30 -14
  38. package/styles/material-dark.css +30 -14
  39. package/styles/material.css +30 -14
  40. package/styles/pivotfieldlist/_theme.scss +28 -12
  41. package/styles/pivotfieldlist/bootstrap-dark.css +30 -14
  42. package/styles/pivotfieldlist/bootstrap.css +30 -14
  43. package/styles/pivotfieldlist/bootstrap4.css +30 -14
  44. package/styles/pivotfieldlist/bootstrap5-dark.css +30 -14
  45. package/styles/pivotfieldlist/bootstrap5.css +30 -14
  46. package/styles/pivotfieldlist/fabric-dark.css +30 -14
  47. package/styles/pivotfieldlist/fabric.css +30 -14
  48. package/styles/pivotfieldlist/highcontrast-light.css +30 -14
  49. package/styles/pivotfieldlist/highcontrast.css +30 -14
  50. package/styles/pivotfieldlist/material-dark.css +30 -14
  51. package/styles/pivotfieldlist/material.css +30 -14
  52. package/styles/pivotfieldlist/tailwind-dark.css +30 -14
  53. package/styles/pivotfieldlist/tailwind.css +30 -14
  54. package/styles/tailwind-dark.css +30 -14
  55. package/styles/tailwind.css +30 -14
@@ -10103,7 +10103,7 @@ var NodeStateModified = /** @__PURE__ @class */ (function () {
10103
10103
  this.parent.engineModule.updateFieldlistData(fieldName);
10104
10104
  }
10105
10105
  }
10106
- this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
10106
+ nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
10107
10107
  return nodeDropped;
10108
10108
  };
10109
10109
  NodeStateModified.prototype.getButtonPosition = function (target, droppedClass) {
@@ -10152,6 +10152,7 @@ var DataSourceUpdate = /** @__PURE__ @class */ (function () {
10152
10152
  var dataSourceItem;
10153
10153
  var draggedClass;
10154
10154
  var draggedPosition = -1;
10155
+ var nodeDropped = true;
10155
10156
  var row = this.parent.dataSourceSettings.rows;
10156
10157
  var column = this.parent.dataSourceSettings.columns;
10157
10158
  var value = this.parent.dataSourceSettings.values;
@@ -10278,7 +10279,11 @@ var DataSourceUpdate = /** @__PURE__ @class */ (function () {
10278
10279
  });
10279
10280
  }
10280
10281
  }
10282
+ else {
10283
+ nodeDropped = false;
10284
+ }
10281
10285
  });
10286
+ return nodeDropped;
10282
10287
  };
10283
10288
  /**
10284
10289
  * Updates the dataSource by removing the given field from the dataSource.
@@ -13130,6 +13135,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13130
13135
  this.previousValues = { top: 0, left: 0 };
13131
13136
  this.frozenPreviousValues = { top: 0, left: 0 };
13132
13137
  this.eventType = '';
13138
+ this.isFireFox = Browser.userAgent.toLowerCase().indexOf('firefox') > -1;
13133
13139
  this.parent = parent;
13134
13140
  this.engineModule = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule;
13135
13141
  this.addInternalEvents();
@@ -13153,11 +13159,14 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13153
13159
  var mScrollBar = mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
13154
13160
  EventHandler.clearEvents(mCont);
13155
13161
  EventHandler.clearEvents(fCont);
13162
+ if (this.isFireFox) {
13163
+ EventHandler.clearEvents(mHdr);
13164
+ }
13156
13165
  if (this.engineModule) {
13157
13166
  var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
13158
13167
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
13159
13168
  EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
13160
- EventHandler.add(mCont.parentElement.parentElement, 'mouseup touchend', this.common(mHdr, mCont, fCont), this);
13169
+ EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
13161
13170
  EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
13162
13171
  EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
13163
13172
  EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
@@ -13214,7 +13223,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13214
13223
  }
13215
13224
  var target = e.target;
13216
13225
  var left = target.scrollLeft;
13217
- if (_this.previousValues.left === left) {
13226
+ if (_this.previousValues.left === left || (_this.isFireFox && target.classList.contains(MOVABLEHEADER_DIV))) {
13218
13227
  return;
13219
13228
  }
13220
13229
  content.scrollLeft = left;
@@ -15942,7 +15951,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15942
15951
  if (this.parent && this.parent.isDestroyed) {
15943
15952
  return;
15944
15953
  }
15945
- if (this.engineModule) {
15954
+ if (this.engineModule && !this.parent.destroyEngine) {
15946
15955
  this.engineModule.fieldList = {};
15947
15956
  this.engineModule = {};
15948
15957
  }
@@ -22537,6 +22546,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22537
22546
  _this_1.isServerWaitingPopup = false;
22538
22547
  /** @hidden */
22539
22548
  _this_1.actionObj = {};
22549
+ /** @hidden */
22550
+ _this_1.destroyEngine = false;
22540
22551
  _this_1.pivotView = _this_1;
22541
22552
  setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
22542
22553
  return _this_1;
@@ -23688,24 +23699,37 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23688
23699
  this.displayOption.primary : newProp.displayOption.view);
23689
23700
  if (this.showGroupingBar || this.showFieldList) {
23690
23701
  if (this.showFieldList && this.pivotFieldListModule) {
23702
+ this.pivotFieldListModule.destroyEngine = true;
23691
23703
  this.pivotFieldListModule.destroy();
23704
+ this.pivotFieldListModule.destroyEngine = false;
23692
23705
  }
23693
- if (this.showGroupingBar && this.groupingBarModule) {
23694
- this.groupingBarModule.destroy();
23695
- }
23706
+ /**
23707
+ * Below lines are affected the grouping bar render between table and chart.
23708
+ * In "Init subcomponent" function, grouping bar rendered properly for table and chart view.
23709
+ * So, The below lines are commanded out.
23710
+ */
23711
+ // if (this.showGroupingBar && this.groupingBarModule) {
23712
+ // this.groupingBarModule.destroy();
23713
+ // }
23696
23714
  this.notify(initSubComponent, this);
23697
23715
  }
23698
23716
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
23699
23717
  this.renderEmptyGrid();
23700
23718
  if (newProp.displayOption.view === 'Table') {
23701
23719
  if (this.pivotChartModule) {
23720
+ this.destroyEngine = true;
23702
23721
  this.pivotChartModule.destroy();
23722
+ this.destroyEngine = false;
23703
23723
  this.chart = undefined;
23704
23724
  this.pivotChartModule = undefined;
23705
23725
  }
23706
23726
  }
23707
23727
  }
23708
23728
  else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
23729
+ if (this.grid) {
23730
+ this.grid.destroy();
23731
+ this.grid = undefined;
23732
+ }
23709
23733
  this.pivotChartModule = new PivotChart();
23710
23734
  }
23711
23735
  }
@@ -24710,12 +24734,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24710
24734
  var hasField = false;
24711
24735
  if (cell && this.dataType === 'olap') {
24712
24736
  var measureName = cell.actualText;
24713
- if (!isNullOrUndefined(measureName) && !this.olapEngineModule.fieldList[measureName]) {
24737
+ if (!isNullOrUndefined(measureName) && this.olapEngineModule.fieldList && !this.olapEngineModule.fieldList[measureName]) {
24714
24738
  var tupleInfo = this.olapEngineModule.tupRowInfo;
24715
24739
  measureName = cell.rowOrdinal > -1 && tupleInfo.length > 0 && tupleInfo[cell.rowOrdinal] &&
24716
24740
  !isNullOrUndefined(tupleInfo[cell.rowOrdinal].measureName) ? tupleInfo[cell.rowOrdinal].measureName : measureName;
24717
24741
  }
24718
- if (this.olapEngineModule.fieldList[measureName]) {
24742
+ if (this.olapEngineModule.fieldList && this.olapEngineModule.fieldList[measureName]) {
24719
24743
  var field = this.olapEngineModule.fieldList[measureName];
24720
24744
  aggregateType = field.isCalculatedField ? field.type : field.aggregateType;
24721
24745
  caption = (this.olapEngineModule.dataFields[measureName] &&
@@ -24725,7 +24749,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24725
24749
  }
24726
24750
  }
24727
24751
  else {
24728
- if (cell && this.engineModule.fieldList[cell.actualText]) {
24752
+ if (cell && this.engineModule.fieldList && this.engineModule.fieldList[cell.actualText]) {
24729
24753
  var field = this.engineModule.fieldList[cell.actualText];
24730
24754
  aggregateType = field.aggregateType;
24731
24755
  if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
@@ -27003,9 +27027,6 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27003
27027
  var clonedValues;
27004
27028
  var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
27005
27029
  var customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
27006
- if (isHeaderSet) {
27007
- this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
27008
- }
27009
27030
  if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
27010
27031
  var pageSettings = this.engine.pageSettings;
27011
27032
  this.engine.pageSettings = null;
@@ -27019,7 +27040,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27019
27040
  clonedValues = currentPivotValues;
27020
27041
  }
27021
27042
  var args = {
27022
- fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues]
27043
+ fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues], excelExportProperties: exportProperties
27023
27044
  };
27024
27045
  var fileName;
27025
27046
  var header;
@@ -27053,6 +27074,14 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27053
27074
  for (var cCnt = 0; cCnt < colLen; cCnt++) {
27054
27075
  if (pivotValues[rCnt][cCnt]) {
27055
27076
  var pivotCell = pivotValues[rCnt][cCnt];
27077
+ var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
27078
+ this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
27079
+ this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
27080
+ this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
27081
+ pivotCell.actualText;
27082
+ var styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
27083
+ var pivotCells = currentPivotValues[rCnt][cCnt];
27084
+ var headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
27056
27085
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
27057
27086
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
27058
27087
  var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
@@ -27072,33 +27101,21 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27072
27101
  index: cCnt + 1, value: cellValue,
27073
27102
  colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
27074
27103
  });
27104
+ var lastCell = cells[cells.length - 1];
27075
27105
  if (pivotCell.axis === 'value') {
27076
27106
  if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
27077
27107
  pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
27078
- cells[cells.length - 1].value = type === 'Excel' ? null : '';
27079
- }
27080
- var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
27081
- this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
27082
- this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
27083
- this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
27084
- pivotCell.actualText;
27085
- cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
27086
- if (pivotCell.style) {
27087
- cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
27088
- cells[cells.length - 1].style.fontColor = pivotCell.style.color;
27089
- cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
27090
- cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
27108
+ lastCell.value = type === 'Excel' ? null : '';
27091
27109
  }
27110
+ lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
27092
27111
  }
27093
27112
  else {
27094
- cells[cells.length - 1].style = {
27095
- bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
27096
- };
27113
+ lastCell.style = headerStyle;
27097
27114
  if (pivotCell.axis === 'row' && cCnt === 0) {
27098
- cells[cells.length - 1].style.hAlign = 'Left';
27115
+ lastCell.style = styles;
27099
27116
  if (this.parent.dataType === 'olap') {
27100
27117
  var indent = this.parent.renderModule.indentCollection[rCnt];
27101
- cells[cells.length - 1].style.indent = indent * 2;
27118
+ lastCell.style.indent = indent * 2;
27102
27119
  maxLevel = maxLevel > indent ? maxLevel : indent;
27103
27120
  }
27104
27121
  else {
@@ -27108,19 +27125,55 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27108
27125
  var levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
27109
27126
  (memberPos ? memberPos - 1 : memberPos);
27110
27127
  var level = levelPosition ? (levelPosition - 1) : 0;
27111
- cells[cells.length - 1].style.indent = level * 2;
27128
+ lastCell.style.indent = level * 2;
27112
27129
  maxLevel = level > maxLevel ? level : maxLevel;
27113
27130
  }
27114
27131
  }
27115
27132
  }
27116
- cells[cells.length - 1].style.borders = { color: '#000000', lineStyle: 'Thin' };
27133
+ if (pivotCell.style || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
27134
+ lastCell.style.backgroundColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
27135
+ lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
27136
+ lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
27137
+ lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
27138
+ }
27139
+ lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
27140
+ var excelHeaderQueryCellInfoArgs = void 0;
27141
+ var excelQueryCellInfoArgs = void 0;
27142
+ if (pivotCell.axis === 'column') {
27143
+ excelHeaderQueryCellInfoArgs = {
27144
+ style: headerStyle,
27145
+ cell: pivotCells,
27146
+ };
27147
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
27148
+ }
27149
+ else {
27150
+ excelQueryCellInfoArgs = {
27151
+ style: styles,
27152
+ cell: pivotCells,
27153
+ column: undefined,
27154
+ data: pivotValues,
27155
+ value: cellValue
27156
+ };
27157
+ this.parent.trigger(excelQueryCellInfo, excelQueryCellInfoArgs);
27158
+ }
27159
+ lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
27160
+ lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
27117
27161
  }
27118
27162
  }
27119
27163
  cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
27120
27164
  }
27121
27165
  else {
27166
+ var pivotCell = { formattedText: "" };
27167
+ var excelHeaderQueryCellInfoArgs = void 0;
27168
+ if (pivotCell) {
27169
+ excelHeaderQueryCellInfoArgs = {
27170
+ style: undefined,
27171
+ cell: pivotCell,
27172
+ };
27173
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
27174
+ }
27122
27175
  cells.push({
27123
- index: cCnt + 1, value: '', colSpan: 1, rowSpan: 1,
27176
+ index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
27124
27177
  });
27125
27178
  }
27126
27179
  }
@@ -27192,14 +27245,21 @@ var PDFExport = /** @__PURE__ @class */ (function () {
27192
27245
  var footer = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer) && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].value)) ?
27193
27246
  pdfExportProperties.footer.contents[0].value : eventParams.args.footer;
27194
27247
  var font = new PdfStandardFont(PdfFontFamily.TimesRoman, 15, PdfFontStyle.Regular);
27195
- var brush = new PdfSolidBrush(new PdfColor(0, 0, 0));
27248
+ var headerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.header)
27249
+ && !isNullOrUndefined(pdfExportProperties.header.contents) && !isNullOrUndefined(pdfExportProperties.header.contents[0].style));
27250
+ var footerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer)
27251
+ && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].style));
27252
+ var headerColor = (headerCondition) ? this.hexDecToRgb(pdfExportProperties.header.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
27253
+ var brushHeader = (headerCondition) ? new PdfSolidBrush(new PdfColor(headerColor.r, headerColor.g, headerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
27254
+ var footerColor = (footerCondition) ? this.hexDecToRgb(pdfExportProperties.footer.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
27255
+ var brushFooter = (footerCondition) ? new PdfSolidBrush(new PdfColor(footerColor.r, footerColor.g, footerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
27196
27256
  var pen = new PdfPen(new PdfColor(0, 0, 0), .5);
27197
27257
  /** Header and Footer to be set */
27198
27258
  var headerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
27199
- headerTemplate.graphics.drawString(header, font, pen, brush, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
27259
+ headerTemplate.graphics.drawString(header, font, pen, brushHeader, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
27200
27260
  eventParams.document.template.top = headerTemplate;
27201
27261
  var footerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
27202
- footerTemplate.graphics.drawString(footer, font, pen, brush, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
27262
+ footerTemplate.graphics.drawString(footer, font, pen, brushFooter, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
27203
27263
  eventParams.document.template.bottom = footerTemplate;
27204
27264
  return page;
27205
27265
  };
@@ -27381,12 +27441,12 @@ var PDFExport = /** @__PURE__ @class */ (function () {
27381
27441
  var isValueCell = false;
27382
27442
  if (pivotValues[rCnt][cCnt]) {
27383
27443
  var pivotCell = pivotValues[rCnt][cCnt];
27444
+ var cellValue = pivotCell.formattedText;
27445
+ cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
27446
+ cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
27447
+ this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
27448
+ cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
27384
27449
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
27385
- var cellValue = pivotCell.formattedText;
27386
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
27387
- cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
27388
- this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
27389
- cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
27390
27450
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
27391
27451
  pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
27392
27452
  (pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
@@ -27409,11 +27469,31 @@ var PDFExport = /** @__PURE__ @class */ (function () {
27409
27469
  pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
27410
27470
  }
27411
27471
  var args = {
27412
- style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
27472
+ style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
27413
27473
  pivotCell: pivotCell,
27414
27474
  cell: pdfGridRow.cells.getCell(localCnt)
27415
27475
  };
27416
27476
  this.parent.trigger(onPdfCellRender, args);
27477
+ if (pivotCell.axis == "column") {
27478
+ args = {
27479
+ style: args.style,
27480
+ cell: args.cell,
27481
+ gridCell: args.pivotCell
27482
+ };
27483
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
27484
+ pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
27485
+ }
27486
+ else {
27487
+ args = {
27488
+ style: args.style,
27489
+ cell: args.cell,
27490
+ column: undefined,
27491
+ data: args.pivotCell,
27492
+ value: cellValue,
27493
+ };
27494
+ this.parent.trigger(pdfQueryCellInfo, args);
27495
+ pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
27496
+ }
27417
27497
  if (args.style) {
27418
27498
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
27419
27499
  }
@@ -27425,6 +27505,15 @@ var PDFExport = /** @__PURE__ @class */ (function () {
27425
27505
  cell: pdfGridRow.cells.getCell(localCnt)
27426
27506
  };
27427
27507
  this.parent.trigger(onPdfCellRender, args);
27508
+ var pivotCell = { formattedText: "" };
27509
+ if (pivotCell.axis == "column") {
27510
+ args = {
27511
+ style: args.style,
27512
+ cell: args.cell,
27513
+ gridCell: args.pivotCell
27514
+ };
27515
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
27516
+ }
27428
27517
  if (args.style) {
27429
27518
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
27430
27519
  }
@@ -28670,6 +28759,9 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28670
28759
  };
28671
28760
  TreeViewRenderer.prototype.nodeStateChange = function (args) {
28672
28761
  var _this = this;
28762
+ if (!args.isInteracted) {
28763
+ return;
28764
+ }
28673
28765
  var node = closest(args.node, '.' + TEXT_CONTENT_CLASS);
28674
28766
  if (!isNullOrUndefined(node)) {
28675
28767
  var li_1 = closest(node, 'li');
@@ -28701,7 +28793,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28701
28793
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
28702
28794
  }
28703
28795
  else {
28704
- _this.updateCheckState(selectedNode_1);
28796
+ _this.updateCheckState(selectedNode_1, args.action);
28705
28797
  }
28706
28798
  });
28707
28799
  }
@@ -28728,7 +28820,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28728
28820
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
28729
28821
  }
28730
28822
  else {
28731
- _this.updateCheckState(selectedNode_1);
28823
+ _this.updateCheckState(selectedNode_1, args.action);
28732
28824
  }
28733
28825
  });
28734
28826
  }
@@ -28785,19 +28877,17 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28785
28877
  break;
28786
28878
  }
28787
28879
  };
28788
- TreeViewRenderer.prototype.updateCheckState = function (selectedNode) {
28880
+ TreeViewRenderer.prototype.updateCheckState = function (selectedNode, action) {
28789
28881
  var chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
28790
28882
  var innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
28791
28883
  var checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
28792
28884
  for (var i = 0; i < chkState.length; i++) {
28793
28885
  if (selectedNode.caption === innerText[i].textContent) {
28794
- if (chkState[i].getAttribute('aria-checked') === 'false') {
28795
- chkState[i].setAttribute('aria-checked', 'false');
28796
- checkClass[i].classList.add(NODE_CHECK_CLASS);
28886
+ if (action === 'check') {
28887
+ this.fieldTable.uncheckAll([selectedNode['id']]);
28797
28888
  }
28798
28889
  else {
28799
- chkState[i].setAttribute('aria-checked', 'true');
28800
- checkClass[i].classList.remove(NODE_CHECK_CLASS);
28890
+ this.fieldTable.checkAll([selectedNode['id']]);
28801
28891
  }
28802
28892
  }
28803
28893
  }
@@ -28848,6 +28938,9 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28848
28938
  };
28849
28939
  TreeViewRenderer.prototype.addNode = function (args) {
28850
28940
  var _this = this;
28941
+ if (!args.isInteracted) {
28942
+ return;
28943
+ }
28851
28944
  /* eslint-disable */
28852
28945
  var fieldList = this.parent.pivotFieldList;
28853
28946
  var selectedNode = fieldList[args.data[0].id.toString()];
@@ -28855,17 +28948,18 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28855
28948
  var fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
28856
28949
  var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
28857
28950
  if (args.action === 'check') {
28951
+ var axis = ['filters', 'columns', 'rows', 'values'];
28858
28952
  var eventdrop = {
28859
28953
  fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
28860
28954
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
28861
- dropAxis: 'rows', draggedAxis: 'fieldlist', cancel: false
28955
+ dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
28862
28956
  };
28863
28957
  control.trigger(fieldDrop, eventdrop, function (observedArgs) {
28864
28958
  if (!observedArgs.cancel) {
28865
28959
  _this.selectedNodes.push(selectedNode.id.toString());
28866
28960
  }
28867
28961
  else {
28868
- _this.updateCheckState(selectedNode);
28962
+ _this.updateCheckState(selectedNode, args.action);
28869
28963
  }
28870
28964
  });
28871
28965
  }
@@ -28886,7 +28980,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28886
28980
  }
28887
28981
  }
28888
28982
  else {
28889
- _this.updateCheckState(selectedNode);
28983
+ _this.updateCheckState(selectedNode, args.action);
28890
28984
  }
28891
28985
  });
28892
28986
  }
@@ -29286,7 +29380,7 @@ var AxisTableRenderer = /** @__PURE__ @class */ (function () {
29286
29380
  addClass([element[element.length - 1].querySelector('.' + DROP_INDICATOR_CLASS + '-last')], INDICATOR_HOVER_CLASS);
29287
29381
  }
29288
29382
  }
29289
- else if (e.type === 'mouseleave') {
29383
+ else if (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave')) {
29290
29384
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
29291
29385
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
29292
29386
  }
@@ -30993,6 +31087,8 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
30993
31087
  _this.remoteData = [];
30994
31088
  /** @hidden */
30995
31089
  _this.actionObj = {};
31090
+ /** @hidden */
31091
+ _this.destroyEngine = false;
30996
31092
  return _this;
30997
31093
  }
30998
31094
  /**
@@ -32082,7 +32178,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
32082
32178
  */
32083
32179
  PivotFieldList.prototype.destroy = function () {
32084
32180
  this.unWireEvent();
32085
- if (this.engineModule) {
32181
+ if (this.engineModule && !this.destroyEngine) {
32086
32182
  this.engineModule.fieldList = {};
32087
32183
  this.engineModule.rMembers = null;
32088
32184
  this.engineModule.cMembers = null;
@@ -32090,7 +32186,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
32090
32186
  this.engineModule.indexMatrix = null;
32091
32187
  this.engineModule = {};
32092
32188
  }
32093
- if (this.olapEngineModule) {
32189
+ if (this.olapEngineModule && !this.destroyEngine) {
32094
32190
  this.olapEngineModule.fieldList = {};
32095
32191
  this.olapEngineModule = {};
32096
32192
  }
@@ -35082,7 +35178,7 @@ var GroupingBar = /** @__PURE__ @class */ (function () {
35082
35178
  };
35083
35179
  GroupingBar.prototype.dropIndicatorUpdate = function (e) {
35084
35180
  if ((this.parent.isDragging && e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseover') ||
35085
- e.type === 'mouseleave') {
35181
+ (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
35086
35182
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
35087
35183
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
35088
35184
  }
@@ -36108,10 +36204,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36108
36204
  }
36109
36205
  };
36110
36206
  Toolbar$$1.prototype.actionClick = function (args) {
36111
- var actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
36112
- : (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
36113
- : (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
36114
- : (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
36207
+ 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
36208
+ : (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
36209
+ : (args.item.id == this.parent.element.id + 'formatting') ? openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? openNumberFormatting
36210
+ : (args.item.id == this.parent.element.id + 'mdxQuery') ? MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? showFieldList : '';
36115
36211
  this.parent.actionObj.actionName = actionName;
36116
36212
  if (this.parent.actionBeginMethod()) {
36117
36213
  return;
@@ -36953,14 +37049,14 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36953
37049
  var _this_1 = this;
36954
37050
  var exportArgs = {};
36955
37051
  var type;
36956
- var actionName = (args.item.id == "PivotViewgrid") ? tableView : (args.item.id == "PivotView_Column") ? chartView : (args.item.id == "PivotView_Bar") ? chartView : (args.item.id == "PivotView_Line") ? chartView
36957
- : (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
36958
- : (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
36959
- : (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
36960
- : (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
36961
- : (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
36962
- : (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
36963
- : (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
37052
+ 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
37053
+ : (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
37054
+ : (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
37055
+ : (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
37056
+ : (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
37057
+ : (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
37058
+ : (args.item.id == this.parent.element.id + "grandtotalcolumn") ? grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? showGrandTotals
37059
+ : (args.item.id == this.parent.element.id + "numberFormattingMenu") ? numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? conditionalFormattingMenu : '';
36964
37060
  this.parent.actionObj.actionName = actionName;
36965
37061
  if (this.parent.actionBeginMethod()) {
36966
37062
  return;