@syncfusion/ej2-pivotview 19.4.42 → 19.4.50

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.
@@ -4123,10 +4123,11 @@ class PivotEngine {
4123
4123
  (level > this.measureIndex && row.axis === 'row' && row.valueSort.axis)) {
4124
4124
  let vln = 0;
4125
4125
  let isValueIndexFound = false;
4126
+ let rowUniqueName = row.valueSort.uniqueName ? row.valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter) : [];
4126
4127
  for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4127
4128
  if (!isValueIndexFound) {
4128
4129
  for (vln = 0; vln < vlt; vln++) {
4129
- if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4130
+ if (rowUniqueName.indexOf(this.values[vln].name) > -1) {
4130
4131
  isValueIndexFound = true;
4131
4132
  isValueCellUpdated = true;
4132
4133
  break;
@@ -4159,9 +4160,10 @@ class PivotEngine {
4159
4160
  }
4160
4161
  else {
4161
4162
  for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4163
+ let columnUniqueName = columns[cln].valueSort.uniqueName ? columns[cln].valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter) : [];
4162
4164
  for (let vln = 0; vln < vlt; vln++) {
4163
4165
  if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
4164
- if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4166
+ if (columnUniqueName.indexOf(this.values[vln].name) > -1) {
4165
4167
  this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
4166
4168
  dln = data[tnum].length;
4167
4169
  }
@@ -9939,7 +9941,7 @@ class NodeStateModified {
9939
9941
  this.parent.engineModule.updateFieldlistData(fieldName);
9940
9942
  }
9941
9943
  }
9942
- this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
9944
+ nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
9943
9945
  return nodeDropped;
9944
9946
  }
9945
9947
  getButtonPosition(target, droppedClass) {
@@ -9986,6 +9988,7 @@ class DataSourceUpdate {
9986
9988
  let dataSourceItem;
9987
9989
  let draggedClass;
9988
9990
  let draggedPosition = -1;
9991
+ let nodeDropped = true;
9989
9992
  let row = this.parent.dataSourceSettings.rows;
9990
9993
  let column = this.parent.dataSourceSettings.columns;
9991
9994
  let value = this.parent.dataSourceSettings.values;
@@ -10112,7 +10115,11 @@ class DataSourceUpdate {
10112
10115
  });
10113
10116
  }
10114
10117
  }
10118
+ else {
10119
+ nodeDropped = false;
10120
+ }
10115
10121
  });
10122
+ return nodeDropped;
10116
10123
  }
10117
10124
  /**
10118
10125
  * Updates the dataSource by removing the given field from the dataSource.
@@ -12863,7 +12870,7 @@ class VirtualScroll$1 {
12863
12870
  let ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
12864
12871
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
12865
12872
  EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
12866
- EventHandler.add(mCont.parentElement.parentElement, 'mouseup touchend', this.common(mHdr, mCont, fCont), this);
12873
+ EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
12867
12874
  EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
12868
12875
  EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
12869
12876
  EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
@@ -15609,7 +15616,7 @@ class PivotChart {
15609
15616
  if (this.parent && this.parent.isDestroyed) {
15610
15617
  return;
15611
15618
  }
15612
- if (this.engineModule) {
15619
+ if (this.engineModule && !this.parent.destroyEngine) {
15613
15620
  this.engineModule.fieldList = {};
15614
15621
  this.engineModule = {};
15615
15622
  }
@@ -21853,6 +21860,8 @@ let PivotView = class PivotView extends Component {
21853
21860
  this.isServerWaitingPopup = false;
21854
21861
  /** @hidden */
21855
21862
  this.actionObj = {};
21863
+ /** @hidden */
21864
+ this.destroyEngine = false;
21856
21865
  this.pivotView = this;
21857
21866
  setValue('mergePersistData', this.mergePersistPivotData, this);
21858
21867
  }
@@ -22801,6 +22810,10 @@ let PivotView = class PivotView extends Component {
22801
22810
  let keyEntity = ['dataSourceSettings', 'pivotValues', 'gridSettings', 'chartSettings', 'displayOption'];
22802
22811
  /* eslint-disable */
22803
22812
  let columnRender = this.gridSettings['columnRender'];
22813
+ let excelQueryCellInfo$$1 = this.gridSettings['excelQueryCellInfo'];
22814
+ let excelHeaderQueryCellInfo$$1 = this.gridSettings['excelHeaderQueryCellInfo'];
22815
+ let pdfQueryCellInfo$$1 = this.gridSettings['pdfQueryCellInfo'];
22816
+ let pdfHeaderQueryCellInfo$$1 = this.gridSettings['pdfHeaderQueryCellInfo'];
22804
22817
  let chartLoadEvent = this.chartSettings['load'];
22805
22818
  let chartLoadedEvent = this.chartSettings['loaded'];
22806
22819
  let chartTextRenderEvent = this.chartSettings['textRender'];
@@ -22810,6 +22823,10 @@ let PivotView = class PivotView extends Component {
22810
22823
  let chartPointClickEvent = this.chartSettings['pointClick'];
22811
22824
  let chartTooltipRenderEvent = this.chartSettings['tooltipRender'];
22812
22825
  this.gridSettings['columnRender'] = undefined;
22826
+ this.gridSettings['excelQueryCellInfo'] = undefined;
22827
+ this.gridSettings['excelHeaderQueryCellInfo'] = undefined;
22828
+ this.gridSettings['pdfQueryCellInfo'] = undefined;
22829
+ this.gridSettings['pdfHeaderQueryCellInfo'] = undefined;
22813
22830
  this.chartSettings['tooltipRender'] = undefined;
22814
22831
  this.chartSettings['load'] = undefined;
22815
22832
  this.chartSettings['loaded'] = undefined;
@@ -22820,6 +22837,10 @@ let PivotView = class PivotView extends Component {
22820
22837
  this.chartSettings['pointClick'] = undefined;
22821
22838
  let persistData = this.addOnPersist(keyEntity);
22822
22839
  this.gridSettings['columnRender'] = columnRender;
22840
+ this.gridSettings['excelQueryCellInfo'] = excelQueryCellInfo$$1;
22841
+ this.gridSettings['excelHeaderQueryCellInfo'] = excelHeaderQueryCellInfo$$1;
22842
+ this.gridSettings['pdfQueryCellInfo'] = pdfQueryCellInfo$$1;
22843
+ this.gridSettings['pdfHeaderQueryCellInfo'] = pdfHeaderQueryCellInfo$$1;
22823
22844
  this.chartSettings['load'] = chartLoadEvent;
22824
22845
  this.chartSettings['loaded'] = chartLoadedEvent;
22825
22846
  this.chartSettings['textRender'] = chartTextRenderEvent;
@@ -22999,24 +23020,37 @@ let PivotView = class PivotView extends Component {
22999
23020
  this.displayOption.primary : newProp.displayOption.view);
23000
23021
  if (this.showGroupingBar || this.showFieldList) {
23001
23022
  if (this.showFieldList && this.pivotFieldListModule) {
23023
+ this.pivotFieldListModule.destroyEngine = true;
23002
23024
  this.pivotFieldListModule.destroy();
23025
+ this.pivotFieldListModule.destroyEngine = false;
23003
23026
  }
23004
- if (this.showGroupingBar && this.groupingBarModule) {
23005
- this.groupingBarModule.destroy();
23006
- }
23027
+ /**
23028
+ * Below lines are affected the grouping bar render between table and chart.
23029
+ * In "Init subcomponent" function, grouping bar rendered properly for table and chart view.
23030
+ * So, The below lines are commanded out.
23031
+ */
23032
+ // if (this.showGroupingBar && this.groupingBarModule) {
23033
+ // this.groupingBarModule.destroy();
23034
+ // }
23007
23035
  this.notify(initSubComponent, this);
23008
23036
  }
23009
23037
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
23010
23038
  this.renderEmptyGrid();
23011
23039
  if (newProp.displayOption.view === 'Table') {
23012
23040
  if (this.pivotChartModule) {
23041
+ this.destroyEngine = true;
23013
23042
  this.pivotChartModule.destroy();
23043
+ this.destroyEngine = false;
23014
23044
  this.chart = undefined;
23015
23045
  this.pivotChartModule = undefined;
23016
23046
  }
23017
23047
  }
23018
23048
  }
23019
23049
  else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
23050
+ if (this.grid) {
23051
+ this.grid.destroy();
23052
+ this.grid = undefined;
23053
+ }
23020
23054
  this.pivotChartModule = new PivotChart();
23021
23055
  }
23022
23056
  }
@@ -24014,12 +24048,12 @@ let PivotView = class PivotView extends Component {
24014
24048
  let hasField = false;
24015
24049
  if (cell && this.dataType === 'olap') {
24016
24050
  let measureName = cell.actualText;
24017
- if (!isNullOrUndefined(measureName) && !this.olapEngineModule.fieldList[measureName]) {
24051
+ if (!isNullOrUndefined(measureName) && this.olapEngineModule.fieldList && !this.olapEngineModule.fieldList[measureName]) {
24018
24052
  let tupleInfo = this.olapEngineModule.tupRowInfo;
24019
24053
  measureName = cell.rowOrdinal > -1 && tupleInfo.length > 0 && tupleInfo[cell.rowOrdinal] &&
24020
24054
  !isNullOrUndefined(tupleInfo[cell.rowOrdinal].measureName) ? tupleInfo[cell.rowOrdinal].measureName : measureName;
24021
24055
  }
24022
- if (this.olapEngineModule.fieldList[measureName]) {
24056
+ if (this.olapEngineModule.fieldList && this.olapEngineModule.fieldList[measureName]) {
24023
24057
  let field = this.olapEngineModule.fieldList[measureName];
24024
24058
  aggregateType = field.isCalculatedField ? field.type : field.aggregateType;
24025
24059
  caption = (this.olapEngineModule.dataFields[measureName] &&
@@ -24029,7 +24063,7 @@ let PivotView = class PivotView extends Component {
24029
24063
  }
24030
24064
  }
24031
24065
  else {
24032
- if (cell && this.engineModule.fieldList[cell.actualText]) {
24066
+ if (cell && this.engineModule.fieldList && this.engineModule.fieldList[cell.actualText]) {
24033
24067
  let field = this.engineModule.fieldList[cell.actualText];
24034
24068
  aggregateType = field.aggregateType;
24035
24069
  if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
@@ -26331,6 +26365,13 @@ class ExcelExport$1 {
26331
26365
  for (let cCnt = 0; cCnt < colLen; cCnt++) {
26332
26366
  if (pivotValues[rCnt][cCnt]) {
26333
26367
  let pivotCell = pivotValues[rCnt][cCnt];
26368
+ let field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
26369
+ this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
26370
+ this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
26371
+ this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
26372
+ pivotCell.actualText;
26373
+ let styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
26374
+ let headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
26334
26375
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26335
26376
  let cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
26336
26377
  let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
@@ -26350,33 +26391,21 @@ class ExcelExport$1 {
26350
26391
  index: cCnt + 1, value: cellValue,
26351
26392
  colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
26352
26393
  });
26394
+ let lastCell = cells[cells.length - 1];
26353
26395
  if (pivotCell.axis === 'value') {
26354
26396
  if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
26355
26397
  pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
26356
- cells[cells.length - 1].value = type === 'Excel' ? null : '';
26357
- }
26358
- let field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
26359
- this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
26360
- this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
26361
- this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
26362
- pivotCell.actualText;
26363
- cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
26364
- if (pivotCell.style) {
26365
- cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
26366
- cells[cells.length - 1].style.fontColor = pivotCell.style.color;
26367
- cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
26368
- cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
26398
+ lastCell.value = type === 'Excel' ? null : '';
26369
26399
  }
26400
+ lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
26370
26401
  }
26371
26402
  else {
26372
- cells[cells.length - 1].style = {
26373
- bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
26374
- };
26403
+ lastCell.style = headerStyle;
26375
26404
  if (pivotCell.axis === 'row' && cCnt === 0) {
26376
- cells[cells.length - 1].style.hAlign = 'Left';
26405
+ lastCell.style = styles;
26377
26406
  if (this.parent.dataType === 'olap') {
26378
26407
  let indent = this.parent.renderModule.indentCollection[rCnt];
26379
- cells[cells.length - 1].style.indent = indent * 2;
26408
+ lastCell.style.indent = indent * 2;
26380
26409
  maxLevel = maxLevel > indent ? maxLevel : indent;
26381
26410
  }
26382
26411
  else {
@@ -26386,19 +26415,55 @@ class ExcelExport$1 {
26386
26415
  let levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
26387
26416
  (memberPos ? memberPos - 1 : memberPos);
26388
26417
  let level = levelPosition ? (levelPosition - 1) : 0;
26389
- cells[cells.length - 1].style.indent = level * 2;
26418
+ lastCell.style.indent = level * 2;
26390
26419
  maxLevel = level > maxLevel ? level : maxLevel;
26391
26420
  }
26392
26421
  }
26393
26422
  }
26394
- cells[cells.length - 1].style.borders = { color: '#000000', lineStyle: 'Thin' };
26423
+ if (pivotCell.style || lastCell.style.backColor || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
26424
+ lastCell.style.backColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
26425
+ lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
26426
+ lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
26427
+ lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
26428
+ }
26429
+ lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
26430
+ let excelHeaderQueryCellInfoArgs;
26431
+ let excelQueryCellInfoArgs;
26432
+ if (pivotCell.axis === 'column') {
26433
+ excelHeaderQueryCellInfoArgs = {
26434
+ style: headerStyle,
26435
+ cell: pivotCell,
26436
+ };
26437
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
26438
+ }
26439
+ else {
26440
+ excelQueryCellInfoArgs = {
26441
+ style: styles,
26442
+ cell: pivotCell,
26443
+ column: undefined,
26444
+ data: pivotValues,
26445
+ value: cellValue
26446
+ };
26447
+ this.parent.trigger(excelQueryCellInfo, excelQueryCellInfoArgs);
26448
+ }
26449
+ lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
26450
+ lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
26395
26451
  }
26396
26452
  }
26397
26453
  cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
26398
26454
  }
26399
26455
  else {
26456
+ let pivotCell = { formattedText: "" };
26457
+ let excelHeaderQueryCellInfoArgs;
26458
+ if (pivotCell) {
26459
+ excelHeaderQueryCellInfoArgs = {
26460
+ style: undefined,
26461
+ cell: pivotCell,
26462
+ };
26463
+ this.parent.trigger(excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
26464
+ }
26400
26465
  cells.push({
26401
- index: cCnt + 1, value: '', colSpan: 1, rowSpan: 1,
26466
+ index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
26402
26467
  });
26403
26468
  }
26404
26469
  }
@@ -26665,12 +26730,12 @@ class PDFExport {
26665
26730
  let isValueCell = false;
26666
26731
  if (pivotValues[rCnt][cCnt]) {
26667
26732
  let pivotCell = pivotValues[rCnt][cCnt];
26733
+ let cellValue = pivotCell.formattedText;
26734
+ cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26735
+ cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26736
+ this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
26737
+ cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
26668
26738
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26669
- let cellValue = pivotCell.formattedText;
26670
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26671
- cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26672
- this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
26673
- cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
26674
26739
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26675
26740
  pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
26676
26741
  (pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
@@ -26693,11 +26758,31 @@ class PDFExport {
26693
26758
  pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
26694
26759
  }
26695
26760
  let args = {
26696
- style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
26761
+ style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
26697
26762
  pivotCell: pivotCell,
26698
26763
  cell: pdfGridRow.cells.getCell(localCnt)
26699
26764
  };
26700
26765
  this.parent.trigger(onPdfCellRender, args);
26766
+ if (pivotCell.axis == "column") {
26767
+ args = {
26768
+ style: args.style,
26769
+ cell: args.cell,
26770
+ gridCell: args.pivotCell
26771
+ };
26772
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
26773
+ pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
26774
+ }
26775
+ else {
26776
+ args = {
26777
+ style: args.style,
26778
+ cell: args.cell,
26779
+ column: undefined,
26780
+ data: args.pivotCell,
26781
+ value: cellValue,
26782
+ };
26783
+ this.parent.trigger(pdfQueryCellInfo, args);
26784
+ pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
26785
+ }
26701
26786
  if (args.style) {
26702
26787
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
26703
26788
  }
@@ -26709,6 +26794,15 @@ class PDFExport {
26709
26794
  cell: pdfGridRow.cells.getCell(localCnt)
26710
26795
  };
26711
26796
  this.parent.trigger(onPdfCellRender, args);
26797
+ let pivotCell = { formattedText: "" };
26798
+ if (pivotCell.axis == "column") {
26799
+ args = {
26800
+ style: args.style,
26801
+ cell: args.cell,
26802
+ gridCell: args.pivotCell
26803
+ };
26804
+ this.parent.trigger(pdfHeaderQueryCellInfo, args);
26805
+ }
26712
26806
  if (args.style) {
26713
26807
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
26714
26808
  }
@@ -27944,6 +28038,9 @@ class TreeViewRenderer {
27944
28038
  return buttonElement;
27945
28039
  }
27946
28040
  nodeStateChange(args) {
28041
+ if (!args.isInteracted) {
28042
+ return;
28043
+ }
27947
28044
  let node = closest(args.node, '.' + TEXT_CONTENT_CLASS);
27948
28045
  if (!isNullOrUndefined(node)) {
27949
28046
  let li = closest(node, 'li');
@@ -27975,7 +28072,7 @@ class TreeViewRenderer {
27975
28072
  this.updateNodeStateChange(id, args, selectedNode);
27976
28073
  }
27977
28074
  else {
27978
- this.updateCheckState(selectedNode);
28075
+ this.updateCheckState(selectedNode, args.action);
27979
28076
  }
27980
28077
  });
27981
28078
  }
@@ -28002,7 +28099,7 @@ class TreeViewRenderer {
28002
28099
  this.updateNodeStateChange(id, args, selectedNode);
28003
28100
  }
28004
28101
  else {
28005
- this.updateCheckState(selectedNode);
28102
+ this.updateCheckState(selectedNode, args.action);
28006
28103
  }
28007
28104
  });
28008
28105
  }
@@ -28059,19 +28156,17 @@ class TreeViewRenderer {
28059
28156
  break;
28060
28157
  }
28061
28158
  }
28062
- updateCheckState(selectedNode) {
28159
+ updateCheckState(selectedNode, action) {
28063
28160
  let chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
28064
28161
  let innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
28065
28162
  let checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
28066
28163
  for (let i = 0; i < chkState.length; i++) {
28067
28164
  if (selectedNode.caption === innerText[i].textContent) {
28068
- if (chkState[i].getAttribute('aria-checked') === 'false') {
28069
- chkState[i].setAttribute('aria-checked', 'false');
28070
- checkClass[i].classList.add(NODE_CHECK_CLASS);
28165
+ if (action === 'check') {
28166
+ this.fieldTable.uncheckAll([selectedNode['id']]);
28071
28167
  }
28072
28168
  else {
28073
- chkState[i].setAttribute('aria-checked', 'true');
28074
- checkClass[i].classList.remove(NODE_CHECK_CLASS);
28169
+ this.fieldTable.checkAll([selectedNode['id']]);
28075
28170
  }
28076
28171
  }
28077
28172
  }
@@ -28120,6 +28215,9 @@ class TreeViewRenderer {
28120
28215
  }
28121
28216
  }
28122
28217
  addNode(args) {
28218
+ if (!args.isInteracted) {
28219
+ return;
28220
+ }
28123
28221
  /* eslint-disable */
28124
28222
  let fieldList = this.parent.pivotFieldList;
28125
28223
  let selectedNode = fieldList[args.data[0].id.toString()];
@@ -28127,17 +28225,18 @@ class TreeViewRenderer {
28127
28225
  let fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
28128
28226
  let control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
28129
28227
  if (args.action === 'check') {
28228
+ let axis = ['filters', 'columns', 'rows', 'values'];
28130
28229
  let eventdrop = {
28131
28230
  fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
28132
28231
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
28133
- dropAxis: 'rows', draggedAxis: 'fieldlist', cancel: false
28232
+ dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
28134
28233
  };
28135
28234
  control.trigger(fieldDrop, eventdrop, (observedArgs) => {
28136
28235
  if (!observedArgs.cancel) {
28137
28236
  this.selectedNodes.push(selectedNode.id.toString());
28138
28237
  }
28139
28238
  else {
28140
- this.updateCheckState(selectedNode);
28239
+ this.updateCheckState(selectedNode, args.action);
28141
28240
  }
28142
28241
  });
28143
28242
  }
@@ -28158,7 +28257,7 @@ class TreeViewRenderer {
28158
28257
  }
28159
28258
  }
28160
28259
  else {
28161
- this.updateCheckState(selectedNode);
28260
+ this.updateCheckState(selectedNode, args.action);
28162
28261
  }
28163
28262
  });
28164
28263
  }
@@ -28551,7 +28650,7 @@ class AxisTableRenderer {
28551
28650
  addClass([element[element.length - 1].querySelector('.' + DROP_INDICATOR_CLASS + '-last')], INDICATOR_HOVER_CLASS);
28552
28651
  }
28553
28652
  }
28554
- else if (e.type === 'mouseleave') {
28653
+ else if (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave')) {
28555
28654
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
28556
28655
  removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
28557
28656
  }
@@ -30209,6 +30308,8 @@ let PivotFieldList = class PivotFieldList extends Component {
30209
30308
  this.remoteData = [];
30210
30309
  /** @hidden */
30211
30310
  this.actionObj = {};
30311
+ /** @hidden */
30312
+ this.destroyEngine = false;
30212
30313
  }
30213
30314
  /**
30214
30315
  * To provide the array of modules needed for control rendering
@@ -31290,7 +31391,7 @@ let PivotFieldList = class PivotFieldList extends Component {
31290
31391
  */
31291
31392
  destroy() {
31292
31393
  this.unWireEvent();
31293
- if (this.engineModule) {
31394
+ if (this.engineModule && !this.destroyEngine) {
31294
31395
  this.engineModule.fieldList = {};
31295
31396
  this.engineModule.rMembers = null;
31296
31397
  this.engineModule.cMembers = null;
@@ -31298,7 +31399,7 @@ let PivotFieldList = class PivotFieldList extends Component {
31298
31399
  this.engineModule.indexMatrix = null;
31299
31400
  this.engineModule = {};
31300
31401
  }
31301
- if (this.olapEngineModule) {
31402
+ if (this.olapEngineModule && !this.destroyEngine) {
31302
31403
  this.olapEngineModule.fieldList = {};
31303
31404
  this.olapEngineModule = {};
31304
31405
  }
@@ -34256,7 +34357,7 @@ class GroupingBar {
34256
34357
  }
34257
34358
  dropIndicatorUpdate(e) {
34258
34359
  if ((this.parent.isDragging && e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseover') ||
34259
- e.type === 'mouseleave') {
34360
+ (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
34260
34361
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
34261
34362
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
34262
34363
  }
@@ -35276,10 +35377,10 @@ class Toolbar$2 {
35276
35377
  }
35277
35378
  }
35278
35379
  actionClick(args) {
35279
- let actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
35280
- : (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
35281
- : (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
35282
- : (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
35380
+ 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
35381
+ : (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
35382
+ : (args.item.id == this.parent.element.id + 'formatting') ? openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? openNumberFormatting
35383
+ : (args.item.id == this.parent.element.id + 'mdxQuery') ? MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? showFieldList : '';
35283
35384
  this.parent.actionObj.actionName = actionName;
35284
35385
  if (this.parent.actionBeginMethod()) {
35285
35386
  return;
@@ -35979,6 +36080,9 @@ class Toolbar$2 {
35979
36080
  label: this.parent.localeObj.getConstant('multipleAxes'),
35980
36081
  cssClass: 'e-multipleAxes',
35981
36082
  checked: this.parent.chartSettings.enableMultipleAxis,
36083
+ change: (args) => {
36084
+ document.getElementById(this.parent.element.id + '_' + 'multipleAxes').click();
36085
+ },
35982
36086
  enableRtl: this.parent.enableRtl,
35983
36087
  locale: this.parent.locale
35984
36088
  });
@@ -36007,6 +36111,9 @@ class Toolbar$2 {
36007
36111
  label: this.parent.localeObj.getConstant('showLegend'),
36008
36112
  checked: this.getLableState(this.parent.chartSettings.chartSeries.type),
36009
36113
  cssClass: 'e-showLegend',
36114
+ change: (args) => {
36115
+ document.getElementById(this.parent.element.id + '_' + 'showLegend').click();
36116
+ },
36010
36117
  enableRtl: this.parent.enableRtl,
36011
36118
  locale: this.parent.locale
36012
36119
  });
@@ -36115,14 +36222,14 @@ class Toolbar$2 {
36115
36222
  menuItemClick(args) {
36116
36223
  let exportArgs = {};
36117
36224
  let type;
36118
- 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
36119
- : (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
36120
- : (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
36121
- : (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
36122
- : (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
36123
- : (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
36124
- : (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
36125
- : (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
36225
+ 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
36226
+ : (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
36227
+ : (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
36228
+ : (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
36229
+ : (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
36230
+ : (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
36231
+ : (args.item.id == this.parent.element.id + "grandtotalcolumn") ? grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? showGrandTotals
36232
+ : (args.item.id == this.parent.element.id + "numberFormattingMenu") ? numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? conditionalFormattingMenu : '';
36126
36233
  this.parent.actionObj.actionName = actionName;
36127
36234
  if (this.parent.actionBeginMethod()) {
36128
36235
  return;