@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
@@ -9939,7 +9939,7 @@ class NodeStateModified {
9939
9939
  this.parent.engineModule.updateFieldlistData(fieldName);
9940
9940
  }
9941
9941
  }
9942
- this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
9942
+ nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
9943
9943
  return nodeDropped;
9944
9944
  }
9945
9945
  getButtonPosition(target, droppedClass) {
@@ -9986,6 +9986,7 @@ class DataSourceUpdate {
9986
9986
  let dataSourceItem;
9987
9987
  let draggedClass;
9988
9988
  let draggedPosition = -1;
9989
+ let nodeDropped = true;
9989
9990
  let row = this.parent.dataSourceSettings.rows;
9990
9991
  let column = this.parent.dataSourceSettings.columns;
9991
9992
  let value = this.parent.dataSourceSettings.values;
@@ -10112,7 +10113,11 @@ class DataSourceUpdate {
10112
10113
  });
10113
10114
  }
10114
10115
  }
10116
+ else {
10117
+ nodeDropped = false;
10118
+ }
10115
10119
  });
10120
+ return nodeDropped;
10116
10121
  }
10117
10122
  /**
10118
10123
  * Updates the dataSource by removing the given field from the dataSource.
@@ -12832,6 +12837,7 @@ class VirtualScroll$1 {
12832
12837
  this.previousValues = { top: 0, left: 0 };
12833
12838
  this.frozenPreviousValues = { top: 0, left: 0 };
12834
12839
  this.eventType = '';
12840
+ this.isFireFox = Browser.userAgent.toLowerCase().indexOf('firefox') > -1;
12835
12841
  this.parent = parent;
12836
12842
  this.engineModule = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule;
12837
12843
  this.addInternalEvents();
@@ -12855,11 +12861,14 @@ class VirtualScroll$1 {
12855
12861
  let mScrollBar = mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
12856
12862
  EventHandler.clearEvents(mCont);
12857
12863
  EventHandler.clearEvents(fCont);
12864
+ if (this.isFireFox) {
12865
+ EventHandler.clearEvents(mHdr);
12866
+ }
12858
12867
  if (this.engineModule) {
12859
12868
  let ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
12860
12869
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
12861
12870
  EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
12862
- EventHandler.add(mCont.parentElement.parentElement, 'mouseup touchend', this.common(mHdr, mCont, fCont), this);
12871
+ EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
12863
12872
  EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
12864
12873
  EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
12865
12874
  EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
@@ -12914,7 +12923,7 @@ class VirtualScroll$1 {
12914
12923
  }
12915
12924
  let target = e.target;
12916
12925
  let left = target.scrollLeft;
12917
- if (this.previousValues.left === left) {
12926
+ if (this.previousValues.left === left || (this.isFireFox && target.classList.contains(MOVABLEHEADER_DIV))) {
12918
12927
  return;
12919
12928
  }
12920
12929
  content.scrollLeft = left;
@@ -15605,7 +15614,7 @@ class PivotChart {
15605
15614
  if (this.parent && this.parent.isDestroyed) {
15606
15615
  return;
15607
15616
  }
15608
- if (this.engineModule) {
15617
+ if (this.engineModule && !this.parent.destroyEngine) {
15609
15618
  this.engineModule.fieldList = {};
15610
15619
  this.engineModule = {};
15611
15620
  }
@@ -21849,6 +21858,8 @@ let PivotView = class PivotView extends Component {
21849
21858
  this.isServerWaitingPopup = false;
21850
21859
  /** @hidden */
21851
21860
  this.actionObj = {};
21861
+ /** @hidden */
21862
+ this.destroyEngine = false;
21852
21863
  this.pivotView = this;
21853
21864
  setValue('mergePersistData', this.mergePersistPivotData, this);
21854
21865
  }
@@ -22995,24 +23006,37 @@ let PivotView = class PivotView extends Component {
22995
23006
  this.displayOption.primary : newProp.displayOption.view);
22996
23007
  if (this.showGroupingBar || this.showFieldList) {
22997
23008
  if (this.showFieldList && this.pivotFieldListModule) {
23009
+ this.pivotFieldListModule.destroyEngine = true;
22998
23010
  this.pivotFieldListModule.destroy();
23011
+ this.pivotFieldListModule.destroyEngine = false;
22999
23012
  }
23000
- if (this.showGroupingBar && this.groupingBarModule) {
23001
- this.groupingBarModule.destroy();
23002
- }
23013
+ /**
23014
+ * Below lines are affected the grouping bar render between table and chart.
23015
+ * In "Init subcomponent" function, grouping bar rendered properly for table and chart view.
23016
+ * So, The below lines are commanded out.
23017
+ */
23018
+ // if (this.showGroupingBar && this.groupingBarModule) {
23019
+ // this.groupingBarModule.destroy();
23020
+ // }
23003
23021
  this.notify(initSubComponent, this);
23004
23022
  }
23005
23023
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
23006
23024
  this.renderEmptyGrid();
23007
23025
  if (newProp.displayOption.view === 'Table') {
23008
23026
  if (this.pivotChartModule) {
23027
+ this.destroyEngine = true;
23009
23028
  this.pivotChartModule.destroy();
23029
+ this.destroyEngine = false;
23010
23030
  this.chart = undefined;
23011
23031
  this.pivotChartModule = undefined;
23012
23032
  }
23013
23033
  }
23014
23034
  }
23015
23035
  else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
23036
+ if (this.grid) {
23037
+ this.grid.destroy();
23038
+ this.grid = undefined;
23039
+ }
23016
23040
  this.pivotChartModule = new PivotChart();
23017
23041
  }
23018
23042
  }
@@ -24010,12 +24034,12 @@ let PivotView = class PivotView extends Component {
24010
24034
  let hasField = false;
24011
24035
  if (cell && this.dataType === 'olap') {
24012
24036
  let measureName = cell.actualText;
24013
- if (!isNullOrUndefined(measureName) && !this.olapEngineModule.fieldList[measureName]) {
24037
+ if (!isNullOrUndefined(measureName) && this.olapEngineModule.fieldList && !this.olapEngineModule.fieldList[measureName]) {
24014
24038
  let tupleInfo = this.olapEngineModule.tupRowInfo;
24015
24039
  measureName = cell.rowOrdinal > -1 && tupleInfo.length > 0 && tupleInfo[cell.rowOrdinal] &&
24016
24040
  !isNullOrUndefined(tupleInfo[cell.rowOrdinal].measureName) ? tupleInfo[cell.rowOrdinal].measureName : measureName;
24017
24041
  }
24018
- if (this.olapEngineModule.fieldList[measureName]) {
24042
+ if (this.olapEngineModule.fieldList && this.olapEngineModule.fieldList[measureName]) {
24019
24043
  let field = this.olapEngineModule.fieldList[measureName];
24020
24044
  aggregateType = field.isCalculatedField ? field.type : field.aggregateType;
24021
24045
  caption = (this.olapEngineModule.dataFields[measureName] &&
@@ -24025,7 +24049,7 @@ let PivotView = class PivotView extends Component {
24025
24049
  }
24026
24050
  }
24027
24051
  else {
24028
- if (cell && this.engineModule.fieldList[cell.actualText]) {
24052
+ if (cell && this.engineModule.fieldList && this.engineModule.fieldList[cell.actualText]) {
24029
24053
  let field = this.engineModule.fieldList[cell.actualText];
24030
24054
  aggregateType = field.aggregateType;
24031
24055
  if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
@@ -26280,9 +26304,6 @@ class ExcelExport$1 {
26280
26304
  let clonedValues;
26281
26305
  let currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26282
26306
  let customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
26283
- if (isHeaderSet) {
26284
- this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
26285
- }
26286
26307
  if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
26287
26308
  let pageSettings = this.engine.pageSettings;
26288
26309
  this.engine.pageSettings = null;
@@ -26296,7 +26317,7 @@ class ExcelExport$1 {
26296
26317
  clonedValues = currentPivotValues;
26297
26318
  }
26298
26319
  let args = {
26299
- fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues]
26320
+ fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues], excelExportProperties: exportProperties
26300
26321
  };
26301
26322
  let fileName;
26302
26323
  let header;
@@ -26330,6 +26351,14 @@ class ExcelExport$1 {
26330
26351
  for (let cCnt = 0; cCnt < colLen; cCnt++) {
26331
26352
  if (pivotValues[rCnt][cCnt]) {
26332
26353
  let pivotCell = pivotValues[rCnt][cCnt];
26354
+ let field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
26355
+ this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
26356
+ this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
26357
+ this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
26358
+ pivotCell.actualText;
26359
+ let styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
26360
+ let pivotCells = currentPivotValues[rCnt][cCnt];
26361
+ let headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
26333
26362
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26334
26363
  let cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
26335
26364
  let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
@@ -26349,33 +26378,21 @@ class ExcelExport$1 {
26349
26378
  index: cCnt + 1, value: cellValue,
26350
26379
  colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
26351
26380
  });
26381
+ let lastCell = cells[cells.length - 1];
26352
26382
  if (pivotCell.axis === 'value') {
26353
26383
  if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
26354
26384
  pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
26355
- cells[cells.length - 1].value = type === 'Excel' ? null : '';
26356
- }
26357
- let field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
26358
- this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
26359
- this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
26360
- this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
26361
- pivotCell.actualText;
26362
- cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
26363
- if (pivotCell.style) {
26364
- cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
26365
- cells[cells.length - 1].style.fontColor = pivotCell.style.color;
26366
- cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
26367
- cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
26385
+ lastCell.value = type === 'Excel' ? null : '';
26368
26386
  }
26387
+ lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
26369
26388
  }
26370
26389
  else {
26371
- cells[cells.length - 1].style = {
26372
- bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
26373
- };
26390
+ lastCell.style = headerStyle;
26374
26391
  if (pivotCell.axis === 'row' && cCnt === 0) {
26375
- cells[cells.length - 1].style.hAlign = 'Left';
26392
+ lastCell.style = styles;
26376
26393
  if (this.parent.dataType === 'olap') {
26377
26394
  let indent = this.parent.renderModule.indentCollection[rCnt];
26378
- cells[cells.length - 1].style.indent = indent * 2;
26395
+ lastCell.style.indent = indent * 2;
26379
26396
  maxLevel = maxLevel > indent ? maxLevel : indent;
26380
26397
  }
26381
26398
  else {
@@ -26385,19 +26402,55 @@ class ExcelExport$1 {
26385
26402
  let levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
26386
26403
  (memberPos ? memberPos - 1 : memberPos);
26387
26404
  let level = levelPosition ? (levelPosition - 1) : 0;
26388
- cells[cells.length - 1].style.indent = level * 2;
26405
+ lastCell.style.indent = level * 2;
26389
26406
  maxLevel = level > maxLevel ? level : maxLevel;
26390
26407
  }
26391
26408
  }
26392
26409
  }
26393
- cells[cells.length - 1].style.borders = { color: '#000000', lineStyle: 'Thin' };
26410
+ if (pivotCell.style || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
26411
+ lastCell.style.backgroundColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
26412
+ lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
26413
+ lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
26414
+ lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
26415
+ }
26416
+ lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
26417
+ let excelHeaderQueryCellInfoArgs;
26418
+ let excelQueryCellInfoArgs;
26419
+ if (pivotCell.axis === 'column') {
26420
+ excelHeaderQueryCellInfoArgs = {
26421
+ style: headerStyle,
26422
+ cell: pivotCells,
26423
+ };
26424
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
26425
+ }
26426
+ else {
26427
+ excelQueryCellInfoArgs = {
26428
+ style: styles,
26429
+ cell: pivotCells,
26430
+ column: undefined,
26431
+ data: pivotValues,
26432
+ value: cellValue
26433
+ };
26434
+ this.parent.trigger(excelQueryCellInfo, excelQueryCellInfoArgs);
26435
+ }
26436
+ lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
26437
+ lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
26394
26438
  }
26395
26439
  }
26396
26440
  cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
26397
26441
  }
26398
26442
  else {
26443
+ let pivotCell = { formattedText: "" };
26444
+ let excelHeaderQueryCellInfoArgs;
26445
+ if (pivotCell) {
26446
+ excelHeaderQueryCellInfoArgs = {
26447
+ style: undefined,
26448
+ cell: pivotCell,
26449
+ };
26450
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
26451
+ }
26399
26452
  cells.push({
26400
- index: cCnt + 1, value: '', colSpan: 1, rowSpan: 1,
26453
+ index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
26401
26454
  });
26402
26455
  }
26403
26456
  }
@@ -26468,14 +26521,21 @@ class PDFExport {
26468
26521
  let footer = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer) && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].value)) ?
26469
26522
  pdfExportProperties.footer.contents[0].value : eventParams.args.footer;
26470
26523
  let font = new PdfStandardFont(PdfFontFamily.TimesRoman, 15, PdfFontStyle.Regular);
26471
- let brush = new PdfSolidBrush(new PdfColor(0, 0, 0));
26524
+ let headerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.header)
26525
+ && !isNullOrUndefined(pdfExportProperties.header.contents) && !isNullOrUndefined(pdfExportProperties.header.contents[0].style));
26526
+ let footerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer)
26527
+ && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].style));
26528
+ let headerColor = (headerCondition) ? this.hexDecToRgb(pdfExportProperties.header.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
26529
+ let brushHeader = (headerCondition) ? new PdfSolidBrush(new PdfColor(headerColor.r, headerColor.g, headerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
26530
+ let footerColor = (footerCondition) ? this.hexDecToRgb(pdfExportProperties.footer.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
26531
+ let brushFooter = (footerCondition) ? new PdfSolidBrush(new PdfColor(footerColor.r, footerColor.g, footerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
26472
26532
  let pen = new PdfPen(new PdfColor(0, 0, 0), .5);
26473
26533
  /** Header and Footer to be set */
26474
26534
  let headerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
26475
- headerTemplate.graphics.drawString(header, font, pen, brush, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
26535
+ headerTemplate.graphics.drawString(header, font, pen, brushHeader, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
26476
26536
  eventParams.document.template.top = headerTemplate;
26477
26537
  let footerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
26478
- footerTemplate.graphics.drawString(footer, font, pen, brush, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
26538
+ footerTemplate.graphics.drawString(footer, font, pen, brushFooter, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
26479
26539
  eventParams.document.template.bottom = footerTemplate;
26480
26540
  return page;
26481
26541
  }
@@ -26657,12 +26717,12 @@ class PDFExport {
26657
26717
  let isValueCell = false;
26658
26718
  if (pivotValues[rCnt][cCnt]) {
26659
26719
  let pivotCell = pivotValues[rCnt][cCnt];
26720
+ let cellValue = pivotCell.formattedText;
26721
+ cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26722
+ cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26723
+ this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
26724
+ cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
26660
26725
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26661
- let cellValue = pivotCell.formattedText;
26662
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26663
- cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26664
- this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
26665
- cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
26666
26726
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26667
26727
  pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
26668
26728
  (pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
@@ -26685,11 +26745,31 @@ class PDFExport {
26685
26745
  pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
26686
26746
  }
26687
26747
  let args = {
26688
- style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
26748
+ style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
26689
26749
  pivotCell: pivotCell,
26690
26750
  cell: pdfGridRow.cells.getCell(localCnt)
26691
26751
  };
26692
26752
  this.parent.trigger(onPdfCellRender, args);
26753
+ if (pivotCell.axis == "column") {
26754
+ args = {
26755
+ style: args.style,
26756
+ cell: args.cell,
26757
+ gridCell: args.pivotCell
26758
+ };
26759
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
26760
+ pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
26761
+ }
26762
+ else {
26763
+ args = {
26764
+ style: args.style,
26765
+ cell: args.cell,
26766
+ column: undefined,
26767
+ data: args.pivotCell,
26768
+ value: cellValue,
26769
+ };
26770
+ this.parent.trigger(pdfQueryCellInfo, args);
26771
+ pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
26772
+ }
26693
26773
  if (args.style) {
26694
26774
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
26695
26775
  }
@@ -26701,6 +26781,15 @@ class PDFExport {
26701
26781
  cell: pdfGridRow.cells.getCell(localCnt)
26702
26782
  };
26703
26783
  this.parent.trigger(onPdfCellRender, args);
26784
+ let pivotCell = { formattedText: "" };
26785
+ if (pivotCell.axis == "column") {
26786
+ args = {
26787
+ style: args.style,
26788
+ cell: args.cell,
26789
+ gridCell: args.pivotCell
26790
+ };
26791
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
26792
+ }
26704
26793
  if (args.style) {
26705
26794
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
26706
26795
  }
@@ -27936,6 +28025,9 @@ class TreeViewRenderer {
27936
28025
  return buttonElement;
27937
28026
  }
27938
28027
  nodeStateChange(args) {
28028
+ if (!args.isInteracted) {
28029
+ return;
28030
+ }
27939
28031
  let node = closest(args.node, '.' + TEXT_CONTENT_CLASS);
27940
28032
  if (!isNullOrUndefined(node)) {
27941
28033
  let li = closest(node, 'li');
@@ -27967,7 +28059,7 @@ class TreeViewRenderer {
27967
28059
  this.updateNodeStateChange(id, args, selectedNode);
27968
28060
  }
27969
28061
  else {
27970
- this.updateCheckState(selectedNode);
28062
+ this.updateCheckState(selectedNode, args.action);
27971
28063
  }
27972
28064
  });
27973
28065
  }
@@ -27994,7 +28086,7 @@ class TreeViewRenderer {
27994
28086
  this.updateNodeStateChange(id, args, selectedNode);
27995
28087
  }
27996
28088
  else {
27997
- this.updateCheckState(selectedNode);
28089
+ this.updateCheckState(selectedNode, args.action);
27998
28090
  }
27999
28091
  });
28000
28092
  }
@@ -28051,19 +28143,17 @@ class TreeViewRenderer {
28051
28143
  break;
28052
28144
  }
28053
28145
  }
28054
- updateCheckState(selectedNode) {
28146
+ updateCheckState(selectedNode, action) {
28055
28147
  let chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
28056
28148
  let innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
28057
28149
  let checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
28058
28150
  for (let i = 0; i < chkState.length; i++) {
28059
28151
  if (selectedNode.caption === innerText[i].textContent) {
28060
- if (chkState[i].getAttribute('aria-checked') === 'false') {
28061
- chkState[i].setAttribute('aria-checked', 'false');
28062
- checkClass[i].classList.add(NODE_CHECK_CLASS);
28152
+ if (action === 'check') {
28153
+ this.fieldTable.uncheckAll([selectedNode['id']]);
28063
28154
  }
28064
28155
  else {
28065
- chkState[i].setAttribute('aria-checked', 'true');
28066
- checkClass[i].classList.remove(NODE_CHECK_CLASS);
28156
+ this.fieldTable.checkAll([selectedNode['id']]);
28067
28157
  }
28068
28158
  }
28069
28159
  }
@@ -28112,6 +28202,9 @@ class TreeViewRenderer {
28112
28202
  }
28113
28203
  }
28114
28204
  addNode(args) {
28205
+ if (!args.isInteracted) {
28206
+ return;
28207
+ }
28115
28208
  /* eslint-disable */
28116
28209
  let fieldList = this.parent.pivotFieldList;
28117
28210
  let selectedNode = fieldList[args.data[0].id.toString()];
@@ -28119,17 +28212,18 @@ class TreeViewRenderer {
28119
28212
  let fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
28120
28213
  let control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
28121
28214
  if (args.action === 'check') {
28215
+ let axis = ['filters', 'columns', 'rows', 'values'];
28122
28216
  let eventdrop = {
28123
28217
  fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
28124
28218
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
28125
- dropAxis: 'rows', draggedAxis: 'fieldlist', cancel: false
28219
+ dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
28126
28220
  };
28127
28221
  control.trigger(fieldDrop, eventdrop, (observedArgs) => {
28128
28222
  if (!observedArgs.cancel) {
28129
28223
  this.selectedNodes.push(selectedNode.id.toString());
28130
28224
  }
28131
28225
  else {
28132
- this.updateCheckState(selectedNode);
28226
+ this.updateCheckState(selectedNode, args.action);
28133
28227
  }
28134
28228
  });
28135
28229
  }
@@ -28150,7 +28244,7 @@ class TreeViewRenderer {
28150
28244
  }
28151
28245
  }
28152
28246
  else {
28153
- this.updateCheckState(selectedNode);
28247
+ this.updateCheckState(selectedNode, args.action);
28154
28248
  }
28155
28249
  });
28156
28250
  }
@@ -28543,7 +28637,7 @@ class AxisTableRenderer {
28543
28637
  addClass([element[element.length - 1].querySelector('.' + DROP_INDICATOR_CLASS + '-last')], INDICATOR_HOVER_CLASS);
28544
28638
  }
28545
28639
  }
28546
- else if (e.type === 'mouseleave') {
28640
+ else if (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave')) {
28547
28641
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
28548
28642
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
28549
28643
  }
@@ -30201,6 +30295,8 @@ let PivotFieldList = class PivotFieldList extends Component {
30201
30295
  this.remoteData = [];
30202
30296
  /** @hidden */
30203
30297
  this.actionObj = {};
30298
+ /** @hidden */
30299
+ this.destroyEngine = false;
30204
30300
  }
30205
30301
  /**
30206
30302
  * To provide the array of modules needed for control rendering
@@ -31282,7 +31378,7 @@ let PivotFieldList = class PivotFieldList extends Component {
31282
31378
  */
31283
31379
  destroy() {
31284
31380
  this.unWireEvent();
31285
- if (this.engineModule) {
31381
+ if (this.engineModule && !this.destroyEngine) {
31286
31382
  this.engineModule.fieldList = {};
31287
31383
  this.engineModule.rMembers = null;
31288
31384
  this.engineModule.cMembers = null;
@@ -31290,7 +31386,7 @@ let PivotFieldList = class PivotFieldList extends Component {
31290
31386
  this.engineModule.indexMatrix = null;
31291
31387
  this.engineModule = {};
31292
31388
  }
31293
- if (this.olapEngineModule) {
31389
+ if (this.olapEngineModule && !this.destroyEngine) {
31294
31390
  this.olapEngineModule.fieldList = {};
31295
31391
  this.olapEngineModule = {};
31296
31392
  }
@@ -34248,7 +34344,7 @@ class GroupingBar {
34248
34344
  }
34249
34345
  dropIndicatorUpdate(e) {
34250
34346
  if ((this.parent.isDragging && e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseover') ||
34251
- e.type === 'mouseleave') {
34347
+ (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
34252
34348
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
34253
34349
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
34254
34350
  }
@@ -35268,10 +35364,10 @@ class Toolbar$2 {
35268
35364
  }
35269
35365
  }
35270
35366
  actionClick(args) {
35271
- let actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
35272
- : (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
35273
- : (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
35274
- : (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
35367
+ let 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
35368
+ : (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
35369
+ : (args.item.id == this.parent.element.id + 'formatting') ? openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? openNumberFormatting
35370
+ : (args.item.id == this.parent.element.id + 'mdxQuery') ? MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? showFieldList : '';
35275
35371
  this.parent.actionObj.actionName = actionName;
35276
35372
  if (this.parent.actionBeginMethod()) {
35277
35373
  return;
@@ -36107,14 +36203,14 @@ class Toolbar$2 {
36107
36203
  menuItemClick(args) {
36108
36204
  let exportArgs = {};
36109
36205
  let type;
36110
- let actionName = (args.item.id == "PivotViewgrid") ? tableView : (args.item.id == "PivotView_Column") ? chartView : (args.item.id == "PivotView_Bar") ? chartView : (args.item.id == "PivotView_Line") ? chartView
36111
- : (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
36112
- : (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
36113
- : (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
36114
- : (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
36115
- : (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
36116
- : (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
36117
- : (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
36206
+ let 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
36207
+ : (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
36208
+ : (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
36209
+ : (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
36210
+ : (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
36211
+ : (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
36212
+ : (args.item.id == this.parent.element.id + "grandtotalcolumn") ? grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? showGrandTotals
36213
+ : (args.item.id == this.parent.element.id + "numberFormattingMenu") ? numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? conditionalFormattingMenu : '';
36118
36214
  this.parent.actionObj.actionName = actionName;
36119
36215
  if (this.parent.actionBeginMethod()) {
36120
36216
  return;