@syncfusion/ej2-pivotview 20.1.56 → 20.1.57

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.
@@ -3770,7 +3770,7 @@ class PivotEngine {
3770
3770
  /* eslint-disable */
3771
3771
  getIndexedHeaders(keys, data, keyInd, position, axis, parentMember, valueFil) {
3772
3772
  let hierarchy = [];
3773
- if (keys) {
3773
+ if (keys && keys.length > 0) {
3774
3774
  let rlen = keys.length;
3775
3775
  let decisionObj = {};
3776
3776
  let fieldName = keys[keyInd].name;
@@ -5123,8 +5123,8 @@ class PivotEngine {
5123
5123
  axis: 'value', actualText: field, indexObject: this.isDrillThrough ? this.rawIndexObject : {},
5124
5124
  rowHeaders: rows[rln].type === 'grand sum' ? '' : rows[rln].valueSort.levelName,
5125
5125
  columnHeaders: columns[cln].type === 'grand sum' ? '' : columns[cln].valueSort.levelName,
5126
- formattedText: formattedText, value: isNullOrUndefined(value) ? 0 : value,
5127
- actualValue: isNullOrUndefined(actualValue) ? 0 : actualValue,
5126
+ formattedText: formattedText, value: value,
5127
+ actualValue: actualValue,
5128
5128
  rowIndex: tnum, colIndex: dln, isSum: isSum, isGrandSum: isGrand, showSubTotals: !subTotal
5129
5129
  };
5130
5130
  this.rawIndexObject = {};
@@ -7406,6 +7406,7 @@ class Render {
7406
7406
  bindGrid(parent, isEmpty) {
7407
7407
  this.injectGridModules(parent);
7408
7408
  this.parent.grid = new Grid({
7409
+ cssClass: this.parent.cssClass,
7409
7410
  frozenColumns: 1,
7410
7411
  frozenRows: 0,
7411
7412
  enableHover: false,
@@ -7596,9 +7597,6 @@ class Render {
7596
7597
  }
7597
7598
  /* eslint-disable */
7598
7599
  contextMenuOpen(args) {
7599
- if (args.element && this.parent.cssClass) {
7600
- addClass([args.element.parentElement], this.parent.cssClass);
7601
- }
7602
7600
  for (let item of args.items) {
7603
7601
  let cellTarget = this.parent.lastCellClicked;
7604
7602
  let elem = null;
@@ -13924,6 +13922,7 @@ class DrillThroughDialog {
13924
13922
  let drillThroughGrid = createElement('div', { id: this.parent.element.id + '_drillthroughgrid', className: DRILLTHROUGH_GRID_CLASS });
13925
13923
  Grid.Inject(Selection, Reorder, Resize, Toolbar, ColumnChooser);
13926
13924
  this.drillThroughGrid = new Grid({
13925
+ cssClass: this.parent.cssClass,
13927
13926
  gridLines: 'Default',
13928
13927
  allowResizing: true,
13929
13928
  allowReordering: true,
@@ -14674,7 +14673,7 @@ class PivotChart {
14674
14673
  let columnSeries = colHeaders + ' | ' + actualText;
14675
14674
  let yValue = (this.parent.dataType === 'pivot' ? (this.engineModule.aggregatedValueMatrix[rowIndex] &&
14676
14675
  !isNullOrUndefined(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex])) ?
14677
- Number(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex]) : Number(cell.value) : Number(cell.value));
14676
+ Number(this.engineModule.aggregatedValueMatrix[rowIndex][cellIndex]) : (!isNullOrUndefined(cell.value) ? Number(cell.value) : cell.value) : (!isNullOrUndefined(cell.value) ? Number(cell.value) : cell.value));
14678
14677
  yValue = yValue === Infinity ? null : yValue;
14679
14678
  if (yValue === 0) {
14680
14679
  this.accEmptyPoint = true;
@@ -24585,7 +24584,7 @@ let PivotView = class PivotView extends Component {
24585
24584
  if (cell && hasField) {
24586
24585
  let rowHeaders = this.getRowText(rowIndex, 0);
24587
24586
  let columnHeaders = this.getColText(0, colIndex, rowIndex);
24588
- let value = ((cell.formattedText === '0' || cell.formattedText === '') ? this.localeObj.getConstant('noValue') :
24587
+ let value = (cell.formattedText === '' ? this.localeObj.getConstant('noValue') :
24589
24588
  cell.formattedText);
24590
24589
  if (this.tooltipTemplate && this.getTooltipTemplate() !== undefined) {
24591
24590
  let rowFields = this.getHeaderField(rowIndex, colIndex, 'row');
@@ -24793,9 +24792,12 @@ let PivotView = class PivotView extends Component {
24793
24792
  }
24794
24793
  let target = e.target;
24795
24794
  let ele = null;
24795
+ let axis = (target.parentElement.classList.contains(ROWSHEADER) || target.classList.contains(ROWSHEADER)) ? 'row' : 'column';
24796
+ ele = axis === 'column' ? closest(target, 'th') : closest(target, 'td');
24797
+ if (axis === 'column' && !ele && this.gridSettings.selectionSettings.mode !== 'Row') {
24798
+ ele = closest(target, 'td');
24799
+ }
24796
24800
  if (!target.classList.contains(COLLAPSE) && !target.classList.contains(EXPAND) && this.enableValueSorting && this.dataType === 'pivot') {
24797
- let axis = (target.parentElement.classList.contains(ROWSHEADER) || target.classList.contains(ROWSHEADER)) ? 'row' : 'column';
24798
- ele = axis === 'column' ? closest(target, 'th') : closest(target, 'td');
24799
24801
  this.cellClicked(target, ele, e);
24800
24802
  try {
24801
24803
  if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
@@ -28021,7 +28023,7 @@ class DialogRenderer {
28021
28023
  this.parent.actionFailureMethod(execption);
28022
28024
  }
28023
28025
  }
28024
- onCloseFieldList() {
28026
+ onCloseFieldList(args) {
28025
28027
  if (this.parent.allowDeferLayoutUpdate) {
28026
28028
  this.parent.dataSourceSettings =
28027
28029
  extend({}, this.parent.clonedDataSource.properties, null, true); /* eslint-disable-line */
@@ -28044,7 +28046,9 @@ class DialogRenderer {
28044
28046
  }
28045
28047
  if (this.parent.isPopupView && this.parent.pivotGridModule) {
28046
28048
  this.parent.pivotGridModule.notify(uiUpdate, this);
28047
- this.parent.pivotGridModule.notify(contentReady, this);
28049
+ if (!args.currentTarget.classList.contains('e-defer-cancel-button')) {
28050
+ this.parent.pivotGridModule.notify(contentReady, this);
28051
+ }
28048
28052
  }
28049
28053
  else {
28050
28054
  this.cancelButtonClick();