@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.42
3
+ * version : 19.4.50
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-pivotview@*",
3
- "_id": "@syncfusion/ej2-pivotview@19.4.41",
3
+ "_id": "@syncfusion/ej2-pivotview@19.4.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Z6SpeNyVSImPCIhvmcMuE5r7XIYQ18AtXKRM07I+8x+ya2ZYOiFTi7uRIXtY2bP7IqlbKJFCuOwffzPxToetTw==",
5
+ "_integrity": "sha512-+FvpR4z9zfuGPOEtf+JWydQI5oztIN3ntgS2NFz5+x8KnmYRSAPHu1UAN1Ye2x5Rnz1fTEcCWjQQ6PaCAqW7yw==",
6
6
  "_location": "/@syncfusion/ej2-pivotview",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-pivotview",
24
24
  "/@syncfusion/ej2-vue-pivotview"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.41.tgz",
27
- "_shasum": "87ada26a09554e3d155778f1d9ebedba1b86daa7",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.48.tgz",
27
+ "_shasum": "fbc8d464e24536440a7dd416cca4b624dafd112b",
28
28
  "_spec": "@syncfusion/ej2-pivotview@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,23 +35,23 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~19.4.42",
39
- "@syncfusion/ej2-buttons": "~19.4.42",
40
- "@syncfusion/ej2-calendars": "~19.4.42",
41
- "@syncfusion/ej2-charts": "~19.4.42",
42
- "@syncfusion/ej2-compression": "~19.4.38",
43
- "@syncfusion/ej2-data": "~19.4.42",
44
- "@syncfusion/ej2-dropdowns": "~19.4.42",
45
- "@syncfusion/ej2-excel-export": "~19.4.38",
46
- "@syncfusion/ej2-file-utils": "~19.4.38",
47
- "@syncfusion/ej2-grids": "~19.4.42",
48
- "@syncfusion/ej2-inputs": "~19.4.42",
49
- "@syncfusion/ej2-lists": "~19.4.38",
50
- "@syncfusion/ej2-navigations": "~19.4.41",
51
- "@syncfusion/ej2-pdf-export": "~19.4.42",
52
- "@syncfusion/ej2-popups": "~19.4.41",
53
- "@syncfusion/ej2-splitbuttons": "~19.4.40",
54
- "@syncfusion/ej2-svg-base": "~19.4.42"
38
+ "@syncfusion/ej2-base": "~19.4.48",
39
+ "@syncfusion/ej2-buttons": "~19.4.50",
40
+ "@syncfusion/ej2-calendars": "~19.4.50",
41
+ "@syncfusion/ej2-charts": "~19.4.50",
42
+ "@syncfusion/ej2-compression": "~19.4.48",
43
+ "@syncfusion/ej2-data": "~19.4.50",
44
+ "@syncfusion/ej2-dropdowns": "~19.4.50",
45
+ "@syncfusion/ej2-excel-export": "~19.4.50",
46
+ "@syncfusion/ej2-file-utils": "~19.4.48",
47
+ "@syncfusion/ej2-grids": "~19.4.50",
48
+ "@syncfusion/ej2-inputs": "~19.4.48",
49
+ "@syncfusion/ej2-lists": "~19.4.48",
50
+ "@syncfusion/ej2-navigations": "~19.4.50",
51
+ "@syncfusion/ej2-pdf-export": "~19.4.50",
52
+ "@syncfusion/ej2-popups": "~19.4.50",
53
+ "@syncfusion/ej2-splitbuttons": "~19.4.48",
54
+ "@syncfusion/ej2-svg-base": "~19.4.50"
55
55
  },
56
56
  "deprecated": false,
57
57
  "description": "The pivot grid, or pivot table, is used to visualize large sets of relational data in a cross-tabular format, similar to an Excel pivot table.",
@@ -78,6 +78,6 @@
78
78
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
79
79
  },
80
80
  "typings": "index.d.ts",
81
- "version": "19.4.42",
81
+ "version": "19.4.50",
82
82
  "sideEffects": false
83
83
  }
@@ -3448,10 +3448,11 @@ var PivotEngine = /** @class */ (function () {
3448
3448
  (level > this.measureIndex && row.axis === 'row' && row.valueSort.axis)) {
3449
3449
  var vln = 0;
3450
3450
  var isValueIndexFound = false;
3451
+ var rowUniqueName = row.valueSort.uniqueName ? row.valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter) : [];
3451
3452
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
3452
3453
  if (!isValueIndexFound) {
3453
3454
  for (vln = 0; vln < vlt; vln++) {
3454
- if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
3455
+ if (rowUniqueName.indexOf(this.values[vln].name) > -1) {
3455
3456
  isValueIndexFound = true;
3456
3457
  isValueCellUpdated = true;
3457
3458
  break;
@@ -3484,9 +3485,10 @@ var PivotEngine = /** @class */ (function () {
3484
3485
  }
3485
3486
  else {
3486
3487
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
3488
+ var columnUniqueName = columns[cln].valueSort.uniqueName ? columns[cln].valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter) : [];
3487
3489
  for (var vln = 0; vln < vlt; vln++) {
3488
3490
  if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
3489
- if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
3491
+ if (columnUniqueName.indexOf(this.values[vln].name) > -1) {
3490
3492
  this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
3491
3493
  dln = data[tnum].length;
3492
3494
  }
@@ -28,7 +28,7 @@ export declare class DataSourceUpdate {
28
28
  * @returns {void}
29
29
  * @hidden
30
30
  */
31
- updateDataSource(fieldName: string, droppedClass: string, droppedPosition: number): void;
31
+ updateDataSource(fieldName: string, droppedClass: string, droppedPosition: number): boolean;
32
32
  /**
33
33
  * Updates the dataSource by removing the given field from the dataSource.
34
34
  * @param {string} fieldName - Defines dropped field name to remove dataSource.
@@ -28,6 +28,7 @@ var DataSourceUpdate = /** @class */ (function () {
28
28
  var dataSourceItem;
29
29
  var draggedClass;
30
30
  var draggedPosition = -1;
31
+ var nodeDropped = true;
31
32
  var row = this.parent.dataSourceSettings.rows;
32
33
  var column = this.parent.dataSourceSettings.columns;
33
34
  var value = this.parent.dataSourceSettings.values;
@@ -154,7 +155,11 @@ var DataSourceUpdate = /** @class */ (function () {
154
155
  });
155
156
  }
156
157
  }
158
+ else {
159
+ nodeDropped = false;
160
+ }
157
161
  });
162
+ return nodeDropped;
158
163
  };
159
164
  /**
160
165
  * Updates the dataSource by removing the given field from the dataSource.
@@ -108,7 +108,7 @@ var NodeStateModified = /** @class */ (function () {
108
108
  this.parent.engineModule.updateFieldlistData(fieldName);
109
109
  }
110
110
  }
111
- this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
111
+ nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
112
112
  return nodeDropped;
113
113
  };
114
114
  NodeStateModified.prototype.getButtonPosition = function (target, droppedClass) {
@@ -464,7 +464,7 @@ var GroupingBar = /** @class */ (function () {
464
464
  };
465
465
  GroupingBar.prototype.dropIndicatorUpdate = function (e) {
466
466
  if ((this.parent.isDragging && e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseover') ||
467
- e.type === 'mouseleave') {
467
+ (!this.parent.isDragging || (!e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
468
468
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS)), cls.INDICATOR_HOVER_CLASS);
469
469
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS + '-last')), cls.INDICATOR_HOVER_CLASS);
470
470
  }
@@ -338,10 +338,10 @@ var Toolbar = /** @class */ (function () {
338
338
  }
339
339
  };
340
340
  Toolbar.prototype.actionClick = function (args) {
341
- var actionName = (args.item.id == "PivotViewnew") ? events.addNewReport : (args.item.id == "PivotViewsave") ? events.saveCurrentReport : (args.item.id == "PivotViewsaveas") ? events.saveAsCurrentReport
342
- : (args.item.id == "PivotViewrename") ? events.renameCurrentReport : (args.item.id == "PivotViewremove") ? events.removeCurrentReport : (args.item.id == "PivotViewload") ? events.loadReports
343
- : (args.item.id == "PivotViewformatting") ? events.openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? events.openNumberFormatting
344
- : (args.item.id == "PivotViewmdxQuery") ? events.MdxQuery : (args.item.id == "PivotViewfieldlist") ? events.showFieldList : '';
341
+ var actionName = (args.item.id == this.parent.element.id + 'new') ? events.addNewReport : (args.item.id == this.parent.element.id + 'save') ? events.saveCurrentReport : (args.item.id == this.parent.element.id + 'saveas') ? events.saveAsCurrentReport
342
+ : (args.item.id == this.parent.element.id + 'rename') ? events.renameCurrentReport : (args.item.id == this.parent.element.id + 'remove') ? events.removeCurrentReport : (args.item.id == this.parent.element.id + 'load') ? events.loadReports
343
+ : (args.item.id == this.parent.element.id + 'formatting') ? events.openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? events.openNumberFormatting
344
+ : (args.item.id == this.parent.element.id + 'mdxQuery') ? events.MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? events.showFieldList : '';
345
345
  this.parent.actionObj.actionName = actionName;
346
346
  if (this.parent.actionBeginMethod()) {
347
347
  return;
@@ -1036,6 +1036,7 @@ var Toolbar = /** @class */ (function () {
1036
1036
  }
1037
1037
  };
1038
1038
  Toolbar.prototype.multipleAxesCheckbox = function (args) {
1039
+ var _this_1 = this;
1039
1040
  if (this.parent.element.id + '_' + 'multipleAxes' === args.element.id) {
1040
1041
  var inputCheckbox = createElement('input', {
1041
1042
  id: this.parent.element.id + '_' + 'checkBox'
@@ -1046,6 +1047,9 @@ var Toolbar = /** @class */ (function () {
1046
1047
  label: this.parent.localeObj.getConstant('multipleAxes'),
1047
1048
  cssClass: 'e-multipleAxes',
1048
1049
  checked: this.parent.chartSettings.enableMultipleAxis,
1050
+ change: function (args) {
1051
+ document.getElementById(_this_1.parent.element.id + '_' + 'multipleAxes').click();
1052
+ },
1049
1053
  enableRtl: this.parent.enableRtl,
1050
1054
  locale: this.parent.locale
1051
1055
  });
@@ -1074,6 +1078,9 @@ var Toolbar = /** @class */ (function () {
1074
1078
  label: this.parent.localeObj.getConstant('showLegend'),
1075
1079
  checked: this.getLableState(this.parent.chartSettings.chartSeries.type),
1076
1080
  cssClass: 'e-showLegend',
1081
+ change: function (args) {
1082
+ document.getElementById(_this_1.parent.element.id + '_' + 'showLegend').click();
1083
+ },
1077
1084
  enableRtl: this.parent.enableRtl,
1078
1085
  locale: this.parent.locale
1079
1086
  });
@@ -1183,14 +1190,14 @@ var Toolbar = /** @class */ (function () {
1183
1190
  var _this_1 = this;
1184
1191
  var exportArgs = {};
1185
1192
  var type;
1186
- var actionName = (args.item.id == "PivotViewgrid") ? events.tableView : (args.item.id == "PivotView_Column") ? events.chartView : (args.item.id == "PivotView_Bar") ? events.chartView : (args.item.id == "PivotView_Line") ? events.chartView
1187
- : (args.item.id == "PivotView_Area") ? events.chartView : (args.item.id == "PivotView_Scatter") ? events.chartView : (args.item.id == "PivotView_Polar") ? events.chartView : (args.item.id == "PivotView_ChartMoreOption") ? events.chartView
1188
- : (args.item.id == "PivotView_multipleAxes") ? events.multipleAxis : (args.item.id == "PivotView_showLegend") ? events.showLegend : (args.item.id == "PivotViewpdf") ? events.pdfExport : (args.item.id == "PivotViewpng") ? events.pngExport
1189
- : (args.item.id == "PivotViewexcel") ? events.excelExport : (args.item.id == "PivotViewcsv") ? events.csvExport : (args.item.id == "PivotViewjpeg") ? events.jpegExport : (args.item.id == "PivotViewsvg") ? events.svgExport
1190
- : (args.item.id == "PivotViewnotsubtotal") ? events.hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? events.subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? events.subTotalsColumn
1191
- : (args.item.id == "PivotViewsubtotal") ? events.showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? events.hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? events.grandTotalsRow
1192
- : (args.item.id == "PivotViewgrandtotalcolumn") ? events.grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? events.showGrandTotals
1193
- : (args.item.id == "PivotViewnumberFormattingMenu") ? events.numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? events.conditionalFormattingMenu : '';
1193
+ var actionName = (args.item.id == this.parent.element.id + 'grid') ? events.tableView : (args.item.id == this.parent.element.id + '_' + "Column") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Bar") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Line") ? events.chartView
1194
+ : (args.item.id == this.parent.element.id + '_' + "Area") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Scatter") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Polar") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "ChartMoreOption") ? events.chartView
1195
+ : (args.item.id == this.parent.element.id + '_' + "multipleAxes") ? events.multipleAxis : (args.item.id == this.parent.element.id + '_' + "showLegend") ? events.showLegend : (args.item.id == this.parent.element.id + "pdf") ? events.pdfExport : (args.item.id == this.parent.element.id + "png") ? events.pngExport
1196
+ : (args.item.id == this.parent.element.id + "excel") ? events.excelExport : (args.item.id == this.parent.element.id + "csv") ? events.csvExport : (args.item.id == this.parent.element.id + "jpeg") ? events.jpegExport : (args.item.id == this.parent.element.id + "svg") ? events.svgExport
1197
+ : (args.item.id == this.parent.element.id + "notsubtotal") ? events.hideSubTotals : (args.item.id == this.parent.element.id + "subtotalrow") ? events.subTotalsRow : (args.item.id == this.parent.element.id + "subtotalcolumn") ? events.subTotalsColumn
1198
+ : (args.item.id == this.parent.element.id + "subtotal") ? events.showSubTotals : (args.item.id == this.parent.element.id + "notgrandtotal") ? events.hideGrandTotals : (args.item.id == this.parent.element.id + "grandtotalrow") ? events.grandTotalsRow
1199
+ : (args.item.id == this.parent.element.id + "grandtotalcolumn") ? events.grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? events.showGrandTotals
1200
+ : (args.item.id == this.parent.element.id + "numberFormattingMenu") ? events.numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? events.conditionalFormattingMenu : '';
1194
1201
  this.parent.actionObj.actionName = actionName;
1195
1202
  if (this.parent.actionBeginMethod()) {
1196
1203
  return;
@@ -1623,7 +1623,7 @@ var PivotChart = /** @class */ (function () {
1623
1623
  if (this.parent && this.parent.isDestroyed) {
1624
1624
  return;
1625
1625
  }
1626
- if (this.engineModule) {
1626
+ if (this.engineModule && !this.parent.destroyEngine) {
1627
1627
  this.engineModule.fieldList = {};
1628
1628
  this.engineModule = {};
1629
1629
  }
@@ -111,6 +111,8 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
111
111
  private remoteData;
112
112
  /** @hidden */
113
113
  actionObj: PivotActionCompleteEventArgs;
114
+ /** @hidden */
115
+ destroyEngine: boolean;
114
116
  /**
115
117
  * Allows the following pivot report information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list.
116
118
  * * `catalog`: Allows to set the database name of SSAS cube as string type that used to retrieve the data from the specified connection string. **Note: It is applicable only for OLAP data source.**
@@ -68,6 +68,8 @@ var PivotFieldList = /** @class */ (function (_super) {
68
68
  _this.remoteData = [];
69
69
  /** @hidden */
70
70
  _this.actionObj = {};
71
+ /** @hidden */
72
+ _this.destroyEngine = false;
71
73
  return _this;
72
74
  }
73
75
  /**
@@ -1158,7 +1160,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1158
1160
  */
1159
1161
  PivotFieldList.prototype.destroy = function () {
1160
1162
  this.unWireEvent();
1161
- if (this.engineModule) {
1163
+ if (this.engineModule && !this.destroyEngine) {
1162
1164
  this.engineModule.fieldList = {};
1163
1165
  this.engineModule.rMembers = null;
1164
1166
  this.engineModule.cMembers = null;
@@ -1166,7 +1168,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1166
1168
  this.engineModule.indexMatrix = null;
1167
1169
  this.engineModule = {};
1168
1170
  }
1169
- if (this.olapEngineModule) {
1171
+ if (this.olapEngineModule && !this.destroyEngine) {
1170
1172
  this.olapEngineModule.fieldList = {};
1171
1173
  this.olapEngineModule = {};
1172
1174
  }
@@ -110,7 +110,7 @@ var AxisTableRenderer = /** @class */ (function () {
110
110
  addClass([element[element.length - 1].querySelector('.' + cls.DROP_INDICATOR_CLASS + '-last')], cls.INDICATOR_HOVER_CLASS);
111
111
  }
112
112
  }
113
- else if (e.type === 'mouseleave') {
113
+ else if (!this.parent.isDragging || (!e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseleave')) {
114
114
  removeClass([].slice.call(parentElement.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS)), cls.INDICATOR_HOVER_CLASS);
115
115
  removeClass([].slice.call(parentElement.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS + '-last')), cls.INDICATOR_HOVER_CLASS);
116
116
  }
@@ -456,6 +456,9 @@ var TreeViewRenderer = /** @class */ (function () {
456
456
  };
457
457
  TreeViewRenderer.prototype.nodeStateChange = function (args) {
458
458
  var _this = this;
459
+ if (!args.isInteracted) {
460
+ return;
461
+ }
459
462
  var node = closest(args.node, '.' + cls.TEXT_CONTENT_CLASS);
460
463
  if (!isNullOrUndefined(node)) {
461
464
  var li_1 = closest(node, 'li');
@@ -487,7 +490,7 @@ var TreeViewRenderer = /** @class */ (function () {
487
490
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
488
491
  }
489
492
  else {
490
- _this.updateCheckState(selectedNode_1);
493
+ _this.updateCheckState(selectedNode_1, args.action);
491
494
  }
492
495
  });
493
496
  }
@@ -514,7 +517,7 @@ var TreeViewRenderer = /** @class */ (function () {
514
517
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
515
518
  }
516
519
  else {
517
- _this.updateCheckState(selectedNode_1);
520
+ _this.updateCheckState(selectedNode_1, args.action);
518
521
  }
519
522
  });
520
523
  }
@@ -571,19 +574,17 @@ var TreeViewRenderer = /** @class */ (function () {
571
574
  break;
572
575
  }
573
576
  };
574
- TreeViewRenderer.prototype.updateCheckState = function (selectedNode) {
577
+ TreeViewRenderer.prototype.updateCheckState = function (selectedNode, action) {
575
578
  var chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
576
579
  var innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
577
580
  var checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
578
581
  for (var i = 0; i < chkState.length; i++) {
579
582
  if (selectedNode.caption === innerText[i].textContent) {
580
- if (chkState[i].getAttribute('aria-checked') === 'false') {
581
- chkState[i].setAttribute('aria-checked', 'false');
582
- checkClass[i].classList.add(cls.NODE_CHECK_CLASS);
583
+ if (action === 'check') {
584
+ this.fieldTable.uncheckAll([selectedNode['id']]);
583
585
  }
584
586
  else {
585
- chkState[i].setAttribute('aria-checked', 'true');
586
- checkClass[i].classList.remove(cls.NODE_CHECK_CLASS);
587
+ this.fieldTable.checkAll([selectedNode['id']]);
587
588
  }
588
589
  }
589
590
  }
@@ -634,6 +635,9 @@ var TreeViewRenderer = /** @class */ (function () {
634
635
  };
635
636
  TreeViewRenderer.prototype.addNode = function (args) {
636
637
  var _this = this;
638
+ if (!args.isInteracted) {
639
+ return;
640
+ }
637
641
  /* eslint-disable */
638
642
  var fieldList = this.parent.pivotFieldList;
639
643
  var selectedNode = fieldList[args.data[0].id.toString()];
@@ -641,17 +645,18 @@ var TreeViewRenderer = /** @class */ (function () {
641
645
  var fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
642
646
  var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
643
647
  if (args.action === 'check') {
648
+ var axis = ['filters', 'columns', 'rows', 'values'];
644
649
  var eventdrop = {
645
650
  fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
646
651
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
647
- dropAxis: 'rows', draggedAxis: 'fieldlist', cancel: false
652
+ dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
648
653
  };
649
654
  control.trigger(events.fieldDrop, eventdrop, function (observedArgs) {
650
655
  if (!observedArgs.cancel) {
651
656
  _this.selectedNodes.push(selectedNode.id.toString());
652
657
  }
653
658
  else {
654
- _this.updateCheckState(selectedNode);
659
+ _this.updateCheckState(selectedNode, args.action);
655
660
  }
656
661
  });
657
662
  }
@@ -672,7 +677,7 @@ var TreeViewRenderer = /** @class */ (function () {
672
677
  }
673
678
  }
674
679
  else {
675
- _this.updateCheckState(selectedNode);
680
+ _this.updateCheckState(selectedNode, args.action);
676
681
  }
677
682
  });
678
683
  }
@@ -118,6 +118,13 @@ var ExcelExport = /** @class */ (function () {
118
118
  for (var cCnt = 0; cCnt < colLen; cCnt++) {
119
119
  if (pivotValues[rCnt][cCnt]) {
120
120
  var pivotCell = pivotValues[rCnt][cCnt];
121
+ var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
122
+ this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
123
+ this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
124
+ this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
125
+ pivotCell.actualText;
126
+ var styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
127
+ var headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
121
128
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
122
129
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
123
130
  var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
@@ -137,33 +144,21 @@ var ExcelExport = /** @class */ (function () {
137
144
  index: cCnt + 1, value: cellValue,
138
145
  colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
139
146
  });
147
+ var lastCell = cells[cells.length - 1];
140
148
  if (pivotCell.axis === 'value') {
141
149
  if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
142
150
  pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
143
- cells[cells.length - 1].value = type === 'Excel' ? null : '';
144
- }
145
- var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
146
- this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
147
- this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
148
- this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
149
- pivotCell.actualText;
150
- cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
151
- if (pivotCell.style) {
152
- cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
153
- cells[cells.length - 1].style.fontColor = pivotCell.style.color;
154
- cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
155
- cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
151
+ lastCell.value = type === 'Excel' ? null : '';
156
152
  }
153
+ lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
157
154
  }
158
155
  else {
159
- cells[cells.length - 1].style = {
160
- bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
161
- };
156
+ lastCell.style = headerStyle;
162
157
  if (pivotCell.axis === 'row' && cCnt === 0) {
163
- cells[cells.length - 1].style.hAlign = 'Left';
158
+ lastCell.style = styles;
164
159
  if (this.parent.dataType === 'olap') {
165
160
  var indent = this.parent.renderModule.indentCollection[rCnt];
166
- cells[cells.length - 1].style.indent = indent * 2;
161
+ lastCell.style.indent = indent * 2;
167
162
  maxLevel = maxLevel > indent ? maxLevel : indent;
168
163
  }
169
164
  else {
@@ -173,19 +168,55 @@ var ExcelExport = /** @class */ (function () {
173
168
  var levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
174
169
  (memberPos ? memberPos - 1 : memberPos);
175
170
  var level = levelPosition ? (levelPosition - 1) : 0;
176
- cells[cells.length - 1].style.indent = level * 2;
171
+ lastCell.style.indent = level * 2;
177
172
  maxLevel = level > maxLevel ? level : maxLevel;
178
173
  }
179
174
  }
180
175
  }
181
- cells[cells.length - 1].style.borders = { color: '#000000', lineStyle: 'Thin' };
176
+ if (pivotCell.style || lastCell.style.backColor || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
177
+ lastCell.style.backColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
178
+ lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
179
+ lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
180
+ lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
181
+ }
182
+ lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
183
+ var excelHeaderQueryCellInfoArgs = void 0;
184
+ var excelQueryCellInfoArgs = void 0;
185
+ if (pivotCell.axis === 'column') {
186
+ excelHeaderQueryCellInfoArgs = {
187
+ style: headerStyle,
188
+ cell: pivotCell,
189
+ };
190
+ this.parent.trigger(events.excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
191
+ }
192
+ else {
193
+ excelQueryCellInfoArgs = {
194
+ style: styles,
195
+ cell: pivotCell,
196
+ column: undefined,
197
+ data: pivotValues,
198
+ value: cellValue
199
+ };
200
+ this.parent.trigger(events.excelQueryCellInfo, excelQueryCellInfoArgs);
201
+ }
202
+ lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
203
+ lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
182
204
  }
183
205
  }
184
206
  cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
185
207
  }
186
208
  else {
209
+ var pivotCell = { formattedText: "" };
210
+ var excelHeaderQueryCellInfoArgs = void 0;
211
+ if (pivotCell) {
212
+ excelHeaderQueryCellInfoArgs = {
213
+ style: undefined,
214
+ cell: pivotCell,
215
+ };
216
+ this.parent.trigger(events.excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
217
+ }
187
218
  cells.push({
188
- index: cCnt + 1, value: '', colSpan: 1, rowSpan: 1,
219
+ index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
189
220
  });
190
221
  }
191
222
  }
@@ -227,12 +227,12 @@ var PDFExport = /** @class */ (function () {
227
227
  var isValueCell = false;
228
228
  if (pivotValues[rCnt][cCnt]) {
229
229
  var pivotCell = pivotValues[rCnt][cCnt];
230
+ var cellValue = pivotCell.formattedText;
231
+ cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
232
+ cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
233
+ this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
234
+ cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
230
235
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
231
- var cellValue = pivotCell.formattedText;
232
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
233
- cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
234
- this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
235
- cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
236
236
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
237
237
  pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
238
238
  (pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
@@ -255,11 +255,31 @@ var PDFExport = /** @class */ (function () {
255
255
  pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
256
256
  }
257
257
  var args = {
258
- style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
258
+ style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
259
259
  pivotCell: pivotCell,
260
260
  cell: pdfGridRow.cells.getCell(localCnt)
261
261
  };
262
262
  this.parent.trigger(events.onPdfCellRender, args);
263
+ if (pivotCell.axis == "column") {
264
+ args = {
265
+ style: args.style,
266
+ cell: args.cell,
267
+ gridCell: args.pivotCell
268
+ };
269
+ this.parent.trigger(events.pdfHeaderQueryCellInfo, args);
270
+ pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
271
+ }
272
+ else {
273
+ args = {
274
+ style: args.style,
275
+ cell: args.cell,
276
+ column: undefined,
277
+ data: args.pivotCell,
278
+ value: cellValue,
279
+ };
280
+ this.parent.trigger(events.pdfQueryCellInfo, args);
281
+ pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
282
+ }
263
283
  if (args.style) {
264
284
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
265
285
  }
@@ -271,6 +291,15 @@ var PDFExport = /** @class */ (function () {
271
291
  cell: pdfGridRow.cells.getCell(localCnt)
272
292
  };
273
293
  this.parent.trigger(events.onPdfCellRender, args);
294
+ var pivotCell = { formattedText: "" };
295
+ if (pivotCell.axis == "column") {
296
+ args = {
297
+ style: args.style,
298
+ cell: args.cell,
299
+ gridCell: args.pivotCell
300
+ };
301
+ this.parent.trigger(events.pdfHeaderQueryCellInfo, args);
302
+ }
274
303
  if (args.style) {
275
304
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
276
305
  }
@@ -45,7 +45,7 @@ var VirtualScroll = /** @class */ (function () {
45
45
  var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + cls.MOVABLESCROLL_DIV);
46
46
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
47
47
  EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
48
- EventHandler.add(mCont.parentElement.parentElement, 'mouseup touchend', this.common(mHdr, mCont, fCont), this);
48
+ EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
49
49
  EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
50
50
  EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
51
51
  EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
@@ -1359,6 +1359,8 @@ export declare class PivotView extends Component<HTMLElement> implements INotify
1359
1359
  * @event
1360
1360
  */
1361
1361
  actionFailure: EmitType<PivotActionFailureEventArgs>;
1362
+ /** @hidden */
1363
+ destroyEngine: boolean;
1362
1364
  /**
1363
1365
  * Constructor for creating the widget
1364
1366
  * @param {PivotViewModel} options - options.