@syncfusion/ej2-pivotview 20.2.38 → 20.2.45

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 (84) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/ej2-pivotview.umd.min.js +2 -2
  3. package/dist/ej2-pivotview.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-pivotview.es2015.js +302 -254
  5. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  6. package/dist/es6/ej2-pivotview.es5.js +306 -258
  7. package/dist/es6/ej2-pivotview.es5.js.map +1 -1
  8. package/dist/global/ej2-pivotview.min.js +2 -2
  9. package/dist/global/ej2-pivotview.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +22 -22
  12. package/src/base/engine.js +7 -5
  13. package/src/common/base/constant.d.ts +2 -0
  14. package/src/common/base/constant.js +2 -0
  15. package/src/common/base/css-constant.d.ts +2 -4
  16. package/src/common/base/css-constant.js +3 -5
  17. package/src/common/base/interface.d.ts +11 -0
  18. package/src/common/calculatedfield/calculated-field.d.ts +3 -1
  19. package/src/common/calculatedfield/calculated-field.js +163 -168
  20. package/src/common/conditionalformatting/conditional-formatting.js +4 -3
  21. package/src/common/popups/grouping.js +2 -2
  22. package/src/common/popups/toolbar.js +6 -6
  23. package/src/pivotchart/base/pivotchart.js +32 -18
  24. package/src/pivotview/actions/drill-through.js +1 -1
  25. package/src/pivotview/actions/excel-export.d.ts +1 -1
  26. package/src/pivotview/actions/excel-export.js +13 -4
  27. package/src/pivotview/actions/keyboard.js +6 -6
  28. package/src/pivotview/actions/pdf-export.d.ts +1 -1
  29. package/src/pivotview/actions/pdf-export.js +13 -2
  30. package/src/pivotview/actions/virtualscroll.js +2 -2
  31. package/src/pivotview/base/pivotview-model.d.ts +7 -2
  32. package/src/pivotview/base/pivotview.d.ts +6 -2
  33. package/src/pivotview/base/pivotview.js +26 -20
  34. package/src/pivotview/renderer/render.js +26 -16
  35. package/styles/bootstrap-dark.css +26 -24
  36. package/styles/bootstrap.css +26 -24
  37. package/styles/bootstrap4.css +26 -24
  38. package/styles/bootstrap5-dark.css +26 -24
  39. package/styles/bootstrap5.css +26 -24
  40. package/styles/fabric-dark.css +26 -24
  41. package/styles/fabric.css +26 -24
  42. package/styles/fluent-dark.css +27 -25
  43. package/styles/fluent.css +27 -25
  44. package/styles/highcontrast-light.css +26 -24
  45. package/styles/highcontrast.css +26 -24
  46. package/styles/material-dark.css +26 -24
  47. package/styles/material.css +26 -24
  48. package/styles/pivotfieldlist/_fluent-definition.scss +1 -1
  49. package/styles/pivotfieldlist/_layout.scss +14 -10
  50. package/styles/pivotfieldlist/_tailwind-definition.scss +1 -1
  51. package/styles/pivotfieldlist/_theme.scss +1 -2
  52. package/styles/pivotfieldlist/bootstrap-dark.css +23 -21
  53. package/styles/pivotfieldlist/bootstrap.css +23 -21
  54. package/styles/pivotfieldlist/bootstrap4.css +23 -21
  55. package/styles/pivotfieldlist/bootstrap5-dark.css +23 -21
  56. package/styles/pivotfieldlist/bootstrap5.css +23 -21
  57. package/styles/pivotfieldlist/fabric-dark.css +23 -21
  58. package/styles/pivotfieldlist/fabric.css +23 -21
  59. package/styles/pivotfieldlist/fluent-dark.css +24 -22
  60. package/styles/pivotfieldlist/fluent.css +24 -22
  61. package/styles/pivotfieldlist/highcontrast-light.css +23 -21
  62. package/styles/pivotfieldlist/highcontrast.css +23 -21
  63. package/styles/pivotfieldlist/material-dark.css +23 -21
  64. package/styles/pivotfieldlist/material.css +23 -21
  65. package/styles/pivotfieldlist/tailwind-dark.css +24 -22
  66. package/styles/pivotfieldlist/tailwind.css +24 -22
  67. package/styles/pivotview/_theme.scss +3 -3
  68. package/styles/pivotview/bootstrap-dark.css +3 -3
  69. package/styles/pivotview/bootstrap.css +3 -3
  70. package/styles/pivotview/bootstrap4.css +3 -3
  71. package/styles/pivotview/bootstrap5-dark.css +3 -3
  72. package/styles/pivotview/bootstrap5.css +3 -3
  73. package/styles/pivotview/fabric-dark.css +3 -3
  74. package/styles/pivotview/fabric.css +3 -3
  75. package/styles/pivotview/fluent-dark.css +3 -3
  76. package/styles/pivotview/fluent.css +3 -3
  77. package/styles/pivotview/highcontrast-light.css +3 -3
  78. package/styles/pivotview/highcontrast.css +3 -3
  79. package/styles/pivotview/material-dark.css +3 -3
  80. package/styles/pivotview/material.css +3 -3
  81. package/styles/pivotview/tailwind-dark.css +3 -3
  82. package/styles/pivotview/tailwind.css +3 -3
  83. package/styles/tailwind-dark.css +27 -25
  84. package/styles/tailwind.css +27 -25
@@ -1354,7 +1354,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1354
1354
  if (this_1.fields.indexOf(newFieldName) === -1) {
1355
1355
  this_1.fields.push(newFieldName);
1356
1356
  }
1357
- item[this_1.fieldKeys[newFieldName]] = (isInRangeAvail ? undefined : new Date(newDate.setMonth(date.getMonth(), newDate.getDate())).toString());
1357
+ item[this_1.fieldKeys[newFieldName]] = (isInRangeAvail ? undefined : new Date(newDate.setMonth(date.getMonth(), 1)).toString());
1358
1358
  }
1359
1359
  break;
1360
1360
  case 'Days':
@@ -4885,8 +4885,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4885
4885
  for (var _g = 0, indexCollection_2 = indexCollection; _g < indexCollection_2.length; _g++) {
4886
4886
  var index = indexCollection_2[_g];
4887
4887
  var currentSet = data[index[0]][index[1]];
4888
+ var actualValue = isNullOrUndefined(selectedRowValues[index[1]].actualValue) ? 0 : selectedRowValues[index[1]].actualValue;
4888
4889
  // let cVal: number = currentSet.value - (selectedRowValues[index[1]] as IAxisSet).value;
4889
- var cVal = currentSet.actualValue - selectedRowValues[index[1]].actualValue;
4890
+ var cVal = (isNullOrUndefined(currentSet.actualValue) ? 0 : currentSet.actualValue) - actualValue;
4890
4891
  cVal = isNaN(cVal) ? 0 : (currentSet.value === 0 && selectedRowValues[index[1]].value === 0) ? 0 : cVal;
4891
4892
  if (!this.aggregatedValueMatrix[index[0]]) {
4892
4893
  this.aggregatedValueMatrix[index[0]] = [];
@@ -4898,8 +4899,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4898
4899
  else {
4899
4900
  // cVal = ((selectedRowValues[index[1]] as IAxisSet).value === 0 ?
4900
4901
  // 0 : (cVal / (selectedRowValues[index[1]] as IAxisSet).value));
4901
- cVal = (selectedRowValues[index[1]].actualValue === 0 ?
4902
- 0 : (cVal / selectedRowValues[index[1]].actualValue));
4902
+ cVal = (actualValue === 0 ? 0 : (cVal / actualValue));
4903
4903
  this.aggregatedValueMatrix[index[0]][index[1]] = cVal;
4904
4904
  currentSet.formattedText = currentSet.showSubTotals ? (cVal !== 0 ? this.globalize.formatNumber(cVal, { format: 'P', maximumFractionDigits: this.getPercentFormat(this.formatFields, currentSet.actualText) }) : this.emptyCellTextContent) : currentSet.formattedText;
4905
4905
  }
@@ -5138,7 +5138,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
5138
5138
  activeColumn[cln].valueSort[item.valueSort.levelName] &&
5139
5139
  currentSet.axis === 'value' && currentSet.actualText === name_3) {
5140
5140
  if (activeColumn[cln].type !== 'grand sum') {
5141
- cVal += currentSet.value;
5141
+ if (!isNullOrUndefined(currentSet.value)) {
5142
+ cVal += currentSet.value;
5143
+ }
5142
5144
  currentSet.formattedText = subTotal ? '' : this.getFormattedValue(cVal, name_3).formattedText;
5143
5145
  if (!this.aggregatedValueMatrix[rln]) {
5144
5146
  this.aggregatedValueMatrix[rln] = [];
@@ -5968,6 +5970,8 @@ var afterPivotTableRender = 'afterPivotTableRender';
5968
5970
  /** @hidden */
5969
5971
  var beforeExport = 'beforeExport';
5970
5972
  /** @hidden */
5973
+ var exportComplete = 'exportComplete';
5974
+ /** @hidden */
5971
5975
  var excelHeaderQueryCellInfo = 'excelHeaderQueryCellInfo';
5972
5976
  /** @hidden */
5973
5977
  var pdfHeaderQueryCellInfo = 'pdfHeaderQueryCellInfo';
@@ -6644,13 +6648,11 @@ var CALC_FORMAT_INPUT = 'e-custom-format-input';
6644
6648
  /** @hidden */
6645
6649
  var CALCINPUTDIV = 'e-pivot-calc-input-div';
6646
6650
  /** @hidden */
6647
- var CALC_CUSTOM_FORMAT_INPUTDIV = 'e-pivot-calc-custom-format-div';
6648
- /** @hidden */
6649
- var OLAP_CALC_CUSTOM_FORMAT_INPUTDIV = 'e-olap-calc-custom-format-div';
6651
+ var PIVOT_CALC_CUSTOM_FORMAT_INPUTDIV = 'e-pivot-calc-custom-format-div';
6650
6652
  /** @hidden */
6651
6653
  var CALC_HIERARCHY_LIST_DIV = 'e-olap-calc-hierarchy-list-div';
6652
6654
  /** @hidden */
6653
- var CALC_FORMAT_TYPE_DIV = 'e-olap-calc-format-type-div';
6655
+ var CALC_FORMAT_TYPE_DIV = 'e-pivot-calc-format-type-div';
6654
6656
  /** @hidden */
6655
6657
  var CALC_MEMBER_TYPE_DIV = 'e-olap-calc-member-type-div';
6656
6658
  /** @hidden */
@@ -6720,7 +6722,7 @@ var PIVOT_FORMULA_TITLE_CLASS = 'e-pivot-formula-title';
6720
6722
  /** @hidden */
6721
6723
  var OLAP_HIERARCHY_TITLE_CLASS = 'e-olap-hierarchy-title';
6722
6724
  /** @hidden */
6723
- var OLAP_FORMAT_TITLE_CLASS = 'e-olap-format-title';
6725
+ var PIVOT_FORMAT_TITLE_CLASS = 'e-pivot-format-title';
6724
6726
  /** @hidden */
6725
6727
  var OLAP_MEMBER_TITLE_CLASS = 'e-olap-member-title';
6726
6728
  /** @hidden */
@@ -7735,12 +7737,22 @@ var Render = /** @__PURE__ @class */ (function () {
7735
7737
  this.parent.lastColumn.width = 'auto';
7736
7738
  this.parent.lastColumn = undefined;
7737
7739
  }
7740
+ var exportCompleteEventArgs = {
7741
+ type: 'PDF',
7742
+ promise: args.promise
7743
+ };
7744
+ this.parent.trigger(exportComplete, exportCompleteEventArgs);
7738
7745
  };
7739
7746
  Render.prototype.excelExportComplete = function (args) {
7740
7747
  if (this.parent.lastColumn !== undefined && this.parent.lastColumn.width !== 'auto') {
7741
7748
  this.parent.lastColumn.width = 'auto';
7742
7749
  this.parent.lastColumn = undefined;
7743
7750
  }
7751
+ var exportCompleteEventArgs = {
7752
+ type: 'Excel/CSV',
7753
+ promise: args.promise
7754
+ };
7755
+ this.parent.trigger(exportComplete, exportCompleteEventArgs);
7744
7756
  };
7745
7757
  /* eslint-enable */
7746
7758
  Render.prototype.dataBound = function (args) {
@@ -7832,7 +7844,7 @@ var Render = /** @__PURE__ @class */ (function () {
7832
7844
  isGroupElement = true;
7833
7845
  }
7834
7846
  var rowIndex = Number(elem.getAttribute('index'));
7835
- var colIndex = Number(elem.getAttribute('aria-colindex'));
7847
+ var colIndex = Number(elem.getAttribute('data-colindex'));
7836
7848
  var pivotValue1 = this_1.parent.pivotValues[rowIndex][colIndex];
7837
7849
  var selectedID = item.id;
7838
7850
  switch (selectedID) {
@@ -7904,7 +7916,7 @@ var Render = /** @__PURE__ @class */ (function () {
7904
7916
  if (groupField && groupField.type === 'Custom' || (this_1.parent.engineModule.fieldList[fieldName].isCustomField && fieldName.indexOf('_custom_group') > -1)) {
7905
7917
  groupField = PivotUtil.getFieldByName(fieldName.replace('_custom_group', ''), this_1.parent.dataSourceSettings.groupSettings);
7906
7918
  if (groupField) {
7907
- var cell = this_1.parent.engineModule.pivotValues[Number(elem.getAttribute('index'))][Number(elem.getAttribute('aria-colindex'))];
7919
+ var cell = this_1.parent.engineModule.pivotValues[Number(elem.getAttribute('index'))][Number(elem.getAttribute('data-colindex'))];
7908
7920
  var selectedCellsInfo = this_1.parent.groupingModule.getSelectedCells(cell.axis, fieldName, cell.actualText.toString());
7909
7921
  selectedCellsInfo.push({ axis: cell.axis, fieldName: fieldName, name: cell.actualText.toString(), cellInfo: cell });
7910
7922
  var selectedOptions = this_1.parent.groupingModule.getSelectedOptions(selectedCellsInfo);
@@ -8113,7 +8125,7 @@ var Render = /** @__PURE__ @class */ (function () {
8113
8125
  ele = target.parentElement.parentElement;
8114
8126
  }
8115
8127
  var rowIndx = Number(ele.getAttribute('index'));
8116
- var colIndx = Number(ele.getAttribute('aria-colindex'));
8128
+ var colIndx = Number(ele.getAttribute('data-colindex'));
8117
8129
  var pivotValue = this.parent.pivotValues[rowIndx][colIndx];
8118
8130
  var aggregateType;
8119
8131
  if (args.item.id.indexOf(this.parent.element.id + '_Agg') > -1) {
@@ -8257,7 +8269,7 @@ var Render = /** @__PURE__ @class */ (function () {
8257
8269
  var fieldName = target.getAttribute('fieldName');
8258
8270
  if (!fieldName || fieldName == '') {
8259
8271
  var rowIndx = Number(target.getAttribute('index'));
8260
- var colIndx = Number(target.getAttribute('aria-colindex'));
8272
+ var colIndx = Number(target.getAttribute('data-colindex'));
8261
8273
  fieldName = this.engine.pivotValues[rowIndx][colIndx].actualText;
8262
8274
  }
8263
8275
  var valuefields = this.parent.dataSourceSettings.values;
@@ -8445,7 +8457,7 @@ var Render = /** @__PURE__ @class */ (function () {
8445
8457
  var selectedElements = this.parent.element.querySelectorAll('.' + CELL_SELECTED_BGCOLOR + ',.' + SELECTED_BGCOLOR);
8446
8458
  for (var _i = 0, selectedElements_1 = selectedElements; _i < selectedElements_1.length; _i++) {
8447
8459
  var element = selectedElements_1[_i];
8448
- var colIndex = Number(element.getAttribute('aria-colindex'));
8460
+ var colIndex = Number(element.getAttribute('data-colindex'));
8449
8461
  var rowIndex = Number(element.getAttribute('index'));
8450
8462
  var cell = this.engine.pivotValues[rowIndex][colIndex];
8451
8463
  if (cell) {
@@ -8488,7 +8500,7 @@ var Render = /** @__PURE__ @class */ (function () {
8488
8500
  var isRowFieldsAvail = cell.valueSort && cell.valueSort.levelName === (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' &&
8489
8501
  this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText));
8490
8502
  tCell.setAttribute('index', cell.rowIndex ? cell.rowIndex.toString() : '0');
8491
- if (tCell.getAttribute('aria-colindex') === '0') {
8503
+ if (tCell.getAttribute('data-colindex') === '0') {
8492
8504
  if (this.parent.dataType === 'pivot') {
8493
8505
  var isValueCell = cell.type && cell.type === 'value';
8494
8506
  tCell.innerText = '';
@@ -8592,18 +8604,18 @@ var Render = /** @__PURE__ @class */ (function () {
8592
8604
  var innerText = tCell.innerText;
8593
8605
  tCell.innerText = '';
8594
8606
  tCell.classList.add(VALUESCONTENT);
8595
- cell = args.data[Number(tCell.getAttribute('aria-colindex'))];
8607
+ cell = args.data[Number(tCell.getAttribute('data-colindex'))];
8596
8608
  cell = isNullOrUndefined(cell) ? args.column.customAttributes.cell : cell;
8597
8609
  cell.isGrandSum = isRowFieldsAvail ? true : cell.isGrandSum;
8598
8610
  if (cell.isSum) {
8599
8611
  tCell.classList.add(SUMMARY);
8600
8612
  }
8601
8613
  var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
8602
- ((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
8603
- if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
8614
+ ((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('data-colindex'))));
8615
+ if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('data-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
8604
8616
  tCell.classList.add('e-gtot');
8605
8617
  }
8606
- else if (this.parent.dataType === 'olap' ? cell.isSum : this.validateColumnTotalcell(!isNullOrUndefined(cell.value) ? cell.colIndex : cell.colIndex - 1)) {
8618
+ else if (this.parent.dataType === 'olap' ? cell.isSum : this.validateColumnTotalcell(cell.colIndex)) {
8607
8619
  tCell.classList.add('e-colstot');
8608
8620
  }
8609
8621
  if (cell.cssClass) {
@@ -8616,12 +8628,12 @@ var Render = /** @__PURE__ @class */ (function () {
8616
8628
  '<a data-url="' + innerText + '" class="e-hyperlinkcell ' + customClass + '">' + innerText + '</a>' : innerText)
8617
8629
  }));
8618
8630
  if (this.parent.gridSettings.allowReordering && !this.parent.showGroupingBar) {
8619
- tCell.setAttribute('aria-colindex', args.column.customAttributes.cell.colIndex.toString());
8631
+ tCell.setAttribute('data-colindex', args.column.customAttributes.cell.colIndex.toString());
8620
8632
  }
8621
8633
  }
8622
8634
  if (this.parent.cellTemplate) {
8623
8635
  var index = tCell.getAttribute('index');
8624
- var colindex = tCell.getAttribute('aria-colindex');
8636
+ var colindex = tCell.getAttribute('data-colindex');
8625
8637
  var element = this.parent.getCellTemplate()({ targetCell: tCell, cellInfo: cell }, this.parent, 'cellTemplate', this.parent.element.id + '_cellTemplate', null, null, tCell);
8626
8638
  if (element && element !== '' && element.length > 0) {
8627
8639
  if (this.parent.enableHtmlSanitizer) {
@@ -8790,7 +8802,7 @@ var Render = /** @__PURE__ @class */ (function () {
8790
8802
  args.node.style.borderBottomWidth = '0px';
8791
8803
  }
8792
8804
  }
8793
- args.node.setAttribute('aria-colindex', cell.colIndex.toString());
8805
+ args.node.setAttribute('data-colindex', cell.colIndex.toString());
8794
8806
  args.node.setAttribute('index', cell.rowIndex.toString());
8795
8807
  var fieldName = void 0;
8796
8808
  if (this.parent.dataType === 'pivot') {
@@ -8860,7 +8872,7 @@ var Render = /** @__PURE__ @class */ (function () {
8860
8872
  tCell.children[0].style.display = 'table';
8861
8873
  }
8862
8874
  else {
8863
- tCell.children[0].style.display = 'block';
8875
+ tCell.children[0].style.display = this.gridSettings.allowTextWrap ? 'inline' : 'block';
8864
8876
  }
8865
8877
  if (tCell.children[0].classList.contains('e-stackedheadercelldiv')) {
8866
8878
  var span = createElement('span', {
@@ -8881,7 +8893,7 @@ var Render = /** @__PURE__ @class */ (function () {
8881
8893
  tCell = this.appendValueSortIcon(cell, tCell, cell.rowIndex, cell.colIndex);
8882
8894
  if (this.parent.cellTemplate) {
8883
8895
  var index = tCell.getAttribute('index');
8884
- var colindex = tCell.getAttribute('aria-colindex');
8896
+ var colindex = tCell.getAttribute('data-colindex');
8885
8897
  this.parent.gridHeaderCellInfo.push({ targetCell: tCell });
8886
8898
  }
8887
8899
  var len = this.parent.dataSourceSettings.values.length;
@@ -8964,7 +8976,7 @@ var Render = /** @__PURE__ @class */ (function () {
8964
8976
  cell = (cell.className.indexOf('e-headercelldiv') > -1 ? cell.parentElement : cell);
8965
8977
  var args = {
8966
8978
  currentCell: cell,
8967
- data: this.engine.pivotValues[Number(cell.getAttribute('index'))][Number(cell.getAttribute('aria-colindex'))],
8979
+ data: this.engine.pivotValues[Number(cell.getAttribute('index'))][Number(cell.getAttribute('data-colindex'))],
8968
8980
  cancel: true,
8969
8981
  nativeEvent: e
8970
8982
  };
@@ -13385,7 +13397,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
13385
13397
  if (this.parent.grid && this.parent.gridSettings.allowSelection && this.parent.gridSettings.selectionSettings.mode !== 'Row' &&
13386
13398
  !target.classList.contains('e-numerictextbox')) {
13387
13399
  var control_1 = this.parent;
13388
- var colIndex_1 = Number(e.target.getAttribute('aria-colIndex'));
13400
+ var colIndex_1 = Number(e.target.getAttribute('data-colindex'));
13389
13401
  var rowIndex_1 = Number(e.target.getAttribute('index'));
13390
13402
  var ele_1;
13391
13403
  /* eslint-disable */
@@ -13395,7 +13407,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
13395
13407
  control_1.renderModule.rowStartPos !== rowIndex_1)) ? null : this.getParentElement(control_1, ele_1, colIndex_1, rowIndex_1 - 1);
13396
13408
  }
13397
13409
  else if (e.action === 'shiftDown' || e.action === 'downArrow') {
13398
- ele_1 = control_1.element.querySelector('th[aria-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
13410
+ ele_1 = control_1.element.querySelector('th[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
13399
13411
  }
13400
13412
  else if (e.action === 'shiftLeft' || e.action === 'leftArrow') {
13401
13413
  ele_1 = e.target.previousSibling;
@@ -13406,7 +13418,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
13406
13418
  }
13407
13419
  if (!isNullOrUndefined(ele_1)) {
13408
13420
  if (control_1.gridSettings.selectionSettings.mode === 'Both' ? !ele_1.classList.contains(ROW_CELL_CLASS) : true) {
13409
- colIndex_1 = Number(ele_1.getAttribute('aria-colindex'));
13421
+ colIndex_1 = Number(ele_1.getAttribute('data-colindex'));
13410
13422
  rowIndex_1 = Number(ele_1.getAttribute('index'));
13411
13423
  var colSpan_1 = Number(ele_1.getAttribute('aria-colspan'));
13412
13424
  control_1.clearSelection(ele_1, e, colIndex_1, rowIndex_1);
@@ -13428,11 +13440,11 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
13428
13440
  }
13429
13441
  else {
13430
13442
  if (e.action === 'upArrow') {
13431
- ele_1 = control_1.element.querySelector('[aria-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 - 1) + '"]');
13443
+ ele_1 = control_1.element.querySelector('[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 - 1) + '"]');
13432
13444
  rowIndex_1--;
13433
13445
  }
13434
13446
  else if (e.action === 'downArrow') {
13435
- ele_1 = control_1.element.querySelector('[aria-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
13447
+ ele_1 = control_1.element.querySelector('[data-colindex="' + colIndex_1 + '"][index="' + (rowIndex_1 + 1) + '"]');
13436
13448
  rowIndex_1++;
13437
13449
  }
13438
13450
  if (!isNullOrUndefined(ele_1)) {
@@ -13462,7 +13474,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
13462
13474
  };
13463
13475
  KeyboardInteraction.prototype.getParentElement = function (control, ele, colIndex, rowIndex) {
13464
13476
  while (!ele) {
13465
- ele = control.element.querySelector('[aria-colindex="' + colIndex + '"][index="' + rowIndex + '"]');
13477
+ ele = control.element.querySelector('[data-colindex="' + colIndex + '"][index="' + rowIndex + '"]');
13466
13478
  colIndex--;
13467
13479
  }
13468
13480
  return ele;
@@ -13773,7 +13785,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13773
13785
  this.parent.actionBeginMethod();
13774
13786
  this.parent.showWaitingPopup();
13775
13787
  this.parent.scrollPosObject.vertical = section;
13776
- engine.pageSettings.rowCurrentPage = section > 1 ? section : 1;
13788
+ this.parent.pageSettings.rowCurrentPage = engine.pageSettings.rowCurrentPage = section > 1 ? section : 1;
13777
13789
  var rowStartPos_1 = 0;
13778
13790
  this.parent.trigger(enginePopulating, args, function (observedArgs) {
13779
13791
  if (_this.parent.dataType === 'pivot') {
@@ -13811,7 +13823,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13811
13823
  this.parent.showWaitingPopup();
13812
13824
  var pivot_1 = this.parent;
13813
13825
  pivot_1.scrollPosObject.horizontal = section;
13814
- engine.pageSettings.columnCurrentPage = section > 1 ? section : 1;
13826
+ this.parent.pageSettings.columnCurrentPage = engine.pageSettings.columnCurrentPage = section > 1 ? section : 1;
13815
13827
  var colStartPos_1 = 0;
13816
13828
  this.parent.trigger(enginePopulating, args, function (observedArgs) {
13817
13829
  if (pivot_1.dataType === 'pivot') {
@@ -14700,7 +14712,7 @@ var DrillThrough = /** @__PURE__ @class */ (function () {
14700
14712
  }
14701
14713
  if (ele) {
14702
14714
  if (this.parent.allowDrillThrough && ele.classList.contains('e-valuescontent') || this.parent.editSettings.allowEditing) {
14703
- var colIndex = Number(ele.getAttribute('aria-colindex'));
14715
+ var colIndex = Number(ele.getAttribute('data-colindex'));
14704
14716
  var rowIndex = Number(ele.getAttribute('index'));
14705
14717
  this.executeDrillThrough(this.parent.pivotValues[rowIndex][colIndex], rowIndex, colIndex, ele);
14706
14718
  }
@@ -14895,7 +14907,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14895
14907
  if (!this.parent.chart && (this.parent.element.querySelector('.e-chart') || this.parent.element.querySelector('.e-accumulationchart'))) {
14896
14908
  remove(select('#' + this.parent.element.id + '_chart', this.parent.element));
14897
14909
  }
14898
- if (this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) {
14910
+ if (this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') {
14899
14911
  this.measureList = this.dataSourceSettings.values.map(function (item) { return item.name; });
14900
14912
  }
14901
14913
  else {
@@ -14975,7 +14987,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14975
14987
  this.columnGroupObject = {};
14976
14988
  this.accEmptyPoint = false;
14977
14989
  var pivotValues = this.engineModule.pivotValues;
14978
- this.currentMeasure = (chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ? this.measureList[0] :
14990
+ this.currentMeasure = (chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ? this.measureList[0] :
14979
14991
  (((chartSettings.value === '' || this.dataSourceSettings.values.filter(function (item) {
14980
14992
  return item.name === chartSettings.value;
14981
14993
  }).length === 0) && this.dataSourceSettings.values.length > 0) ? this.dataSourceSettings.values[0].name : chartSettings.value);
@@ -15019,7 +15031,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15019
15031
  header.valueSort.levelName.toString().split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) : undefined;
15020
15032
  isValidHeader = false;
15021
15033
  if (valueSort && valueSort[0] !== 'Grand Total') {
15022
- if ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ||
15034
+ if ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ||
15023
15035
  valueSort.indexOf(measureNames[this.currentMeasure]) > -1) {
15024
15036
  isValidHeader = true;
15025
15037
  }
@@ -15145,7 +15157,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15145
15157
  var actualText = (this.parent.dataType === 'olap' && tupInfo && tupInfo.measureName) ?
15146
15158
  tupInfo.measureName : cell.actualText;
15147
15159
  if (!(this.parent.dataType === 'olap' && cell.isGrandSum) && !totColIndex[cell.colIndex] && cell.axis === 'value' && firstRowCell.type !== 'header' &&
15148
- actualText !== '' && ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0) ? true : actualText === this.currentMeasure)) {
15160
+ actualText !== '' && ((chartSettings.enableMultipleAxis && this.accumulationType.indexOf(chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ? true : actualText === this.currentMeasure)) {
15149
15161
  if (isNullOrUndefined(firstRowCell.members)) {
15150
15162
  firstRowCell.members = [];
15151
15163
  }
@@ -15345,7 +15357,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15345
15357
  className: PIVOTCHART, id: this.parent.element.id + '_chart'
15346
15358
  }));
15347
15359
  }
15348
- if (!this.chartElement && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15360
+ if (!this.chartElement && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis && this.chartSettings.chartSeries.type !== 'Pareto') {
15349
15361
  this.parent.element.querySelector('.' + PIVOTCHART).innerHTML = '';
15350
15362
  this.chartElement = this.parent.element.querySelector('.' + PIVOTCHART).appendChild(createElement('div', {
15351
15363
  className: PIVOTCHART_INNER, id: this.parent.element.id + '_chartInner',
@@ -15366,7 +15378,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15366
15378
  }
15367
15379
  var height = this.getChartHeight();
15368
15380
  if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
15369
- this.accumulationType.indexOf(type) < 0) {
15381
+ this.accumulationType.indexOf(type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') {
15370
15382
  this.parent.element.querySelector('.' + PIVOTCHART).style.height =
15371
15383
  (height === 'auto' ? this.getChartAutoHeight() : height) + 'px';
15372
15384
  this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
@@ -15377,7 +15389,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15377
15389
  }
15378
15390
  if (this.parent.chart && ((this.parent.chart.getModuleName() === 'accumulationchart' &&
15379
15391
  this.accumulationType.indexOf(type) < 0) || (this.parent.chart.getModuleName() === 'chart' &&
15380
- this.accumulationType.indexOf(type) > -1))) {
15392
+ this.accumulationType.indexOf(type) > -1 && this.chartSettings.chartSeries.type !== 'Pareto'))) {
15381
15393
  this.parent.chart.destroy();
15382
15394
  if (select('#' + this.parent.element.id + '_chart', this.parent.element)) {
15383
15395
  select('#' + this.parent.element.id + '_chart', this.parent.element).innerHTML = '';
@@ -15456,7 +15468,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15456
15468
  zoomSettings: currentZoomSettings,
15457
15469
  axes: (type === 'Polar' || type === 'Radar') ? [] : axesWithRows.axes,
15458
15470
  rows: (type === 'Polar' || type === 'Radar') ? [{}] :
15459
- (type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' &&
15471
+ (type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' || type === 'Pareto' &&
15460
15472
  this.chartSettings.enableMultipleAxis) ? [{ height: '100%' }] : axesWithRows.rows,
15461
15473
  columns: (type === 'Polar' || type === 'Radar') ? [{}] :
15462
15474
  (type === 'Bar' || type === 'StackingBar' || type === 'StackingBar100' &&
@@ -15466,7 +15478,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15466
15478
  width: width,
15467
15479
  height: (this.parent.chartSettings.chartSeries.type !== 'Polar' &&
15468
15480
  this.parent.chartSettings.chartSeries.type !== 'Radar' && this.parent.chartSettings.enableScrollOnMultiAxis &&
15469
- this.parent.chartSettings.enableMultipleAxis && this.parent.dataSourceSettings.values.length > 0) ?
15481
+ this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.chartSeries.type !== 'Pareto' && this.parent.dataSourceSettings.values.length > 0) ?
15470
15482
  Number(height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? isNaN(Number(height)) ?
15471
15483
  height.toString() : (Number(height) - 5).toString() :
15472
15484
  (!isNaN(Number(height)) || this.parent.dataSourceSettings.values.length > 1) ?
@@ -15567,6 +15579,10 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15567
15579
  this.parent.chart.rows = [{ height: '100%' }];
15568
15580
  this.parent.chart.columns = axesWithRows.columns;
15569
15581
  }
15582
+ else if (type === 'Pareto' && this.chartSettings.enableMultipleAxis) {
15583
+ this.parent.chart.rows = [{ height: '100%' }];
15584
+ this.parent.chart.columns = [{ width: '100%' }];
15585
+ }
15570
15586
  else {
15571
15587
  this.parent.chart.rows = axesWithRows.rows;
15572
15588
  this.parent.chart.columns = [{ width: '100%' }];
@@ -15970,7 +15986,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15970
15986
  };
15971
15987
  PivotChart.prototype.tooltipRender = function (args) {
15972
15988
  var measure = args.series.yAxisName ? (args.series.yAxisName.split('_CumulativeAxis')[0]) :
15973
- ((this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(this.chartSettings.chartSeries.type) < 0) ?
15989
+ ((this.chartSettings.enableMultipleAxis && this.accumulationType.indexOf(this.chartSettings.chartSeries.type) < 0 && this.chartSettings.chartSeries.type !== 'Pareto') ?
15974
15990
  args.series.name ? args.series.name.split(' | ')[1] : args.data.seriesName ?
15975
15991
  args.data.seriesName.split(' | ')[1] : this.currentMeasure : this.measuresNames[this.currentMeasure] ?
15976
15992
  this.measuresNames[this.currentMeasure] : this.currentMeasure);
@@ -15982,14 +15998,14 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15982
15998
  var aggregateType = this.parent.dataType === 'olap' ? '' : this.parent.localeObj.getConstant(measureField.aggregateType);
15983
15999
  var measureAggregatedName = (this.parent.dataType === 'olap' ? '' : aggregateType + ' ' +
15984
16000
  this.parent.localeObj.getConstant('of') + ' ') + measureField.caption;
15985
- var formattedText = this.accumulationType.indexOf(this.parent.chartSettings.chartSeries.type) < 0 ?
15986
- args.text.split('<b>')[1].split('</b>')[0] : this.engineModule.pivotValues[rowIndex][colIndex].formattedText;
16001
+ var formattedText = this.engineModule.pivotValues[rowIndex][colIndex].formattedText;
15987
16002
  var formatField = this.engineModule.formatFields[measureField.id];
15988
- var formattedValue = ((formatField && formatField.format && formatField.format.toLowerCase().match(/n|p|c/) !== null &&
16003
+ var valueFormat = this.engineModule.getFormattedValue(args.point.y, measureField.id, formattedText);
16004
+ var formattedValue = (formatField && formatField.format && formatField.format.toLowerCase().match(/n|p|c/) !== null &&
15989
16005
  this.chartSettings.useGroupingSeparator) ? this.parent.dataType === 'olap' ?
15990
- this.engineModule.getFormattedValue(args.point.y, measureField.id, formattedText) :
15991
- this.parent.engineModule.getFormattedValue(args.point.y, measureField.id).formattedText :
15992
- formattedText);
16006
+ valueFormat.toString() :
16007
+ valueFormat.formattedText :
16008
+ formattedText;
15993
16009
  var columnText = (args.series.name ? args.series.name.split(' | ')[0] : args.data.seriesName.split(' | ')[0]);
15994
16010
  var rowText = args.point.x;
15995
16011
  if (this.parent.tooltipTemplate && this.parent.getTooltipTemplate() !== undefined || this.chartSettings.tooltip.template) {
@@ -16042,7 +16058,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
16042
16058
  }
16043
16059
  }
16044
16060
  if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
16045
- if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
16061
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
16046
16062
  this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
16047
16063
  }
16048
16064
  else {
@@ -16318,6 +16334,16 @@ var PivotChart = /** @__PURE__ @class */ (function () {
16318
16334
  args.text = '';
16319
16335
  }
16320
16336
  }
16337
+ if (args.axis.name !== 'primaryXAxis') {
16338
+ var formatField = this.engineModule.formatFields[args.axis.name];
16339
+ var valueFormat = this.engineModule.getFormattedValue(args.value, args.axis.name, args.text);
16340
+ var formattedValue = ((formatField && formatField.format && formatField.format.toLowerCase().match(/n|p|c/) !== null &&
16341
+ this.chartSettings.useGroupingSeparator) ? this.parent.dataType === 'olap' ?
16342
+ valueFormat.toString() :
16343
+ valueFormat.formattedText :
16344
+ args.value.toString());
16345
+ args.text = formattedValue;
16346
+ }
16321
16347
  this.parent.trigger(chartAxisLabelRender, args);
16322
16348
  };
16323
16349
  PivotChart.prototype.multiLevelLabelClick = function (args) {
@@ -16464,7 +16490,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
16464
16490
  /* eslint-disable */
16465
16491
  /** @hidden */
16466
16492
  PivotChart.prototype.getResizedChartHeight = function () {
16467
- var height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
16493
+ var height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
16468
16494
  this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
16469
16495
  this.parent.dataSourceSettings.values.length > 0 ? Number(this.parent.chart.height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
16470
16496
  isNaN(Number(this.getChartHeight())) ? this.getChartHeight().toString() : (Number(this.getChartHeight()) - 5).toString() :
@@ -24842,7 +24868,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24842
24868
  */
24843
24869
  PivotView.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
24844
24870
  if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
24845
- this.excelExportModule.exportToExcel('Excel', excelExportProperties);
24871
+ this.excelExportModule.exportToExcel('Excel', excelExportProperties, isBlob);
24846
24872
  }
24847
24873
  else {
24848
24874
  this.exportType = 'Excel';
@@ -24867,7 +24893,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24867
24893
  */
24868
24894
  PivotView.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
24869
24895
  if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
24870
- this.excelExportModule.exportToExcel('CSV', excelExportProperties);
24896
+ this.excelExportModule.exportToExcel('CSV', excelExportProperties, isBlob);
24871
24897
  }
24872
24898
  else {
24873
24899
  this.exportType = 'CSV';
@@ -24892,7 +24918,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24892
24918
  */
24893
24919
  PivotView.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
24894
24920
  if (this.enableVirtualization && this.dataSourceSettings.mode !== 'Server') {
24895
- this.pdfExportModule.exportToPDF(pdfExportProperties);
24921
+ this.pdfExportModule.exportToPDF(pdfExportProperties, isBlob);
24896
24922
  }
24897
24923
  else {
24898
24924
  this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
@@ -24958,7 +24984,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24958
24984
  }
24959
24985
  if (this.dataType === 'pivot') {
24960
24986
  var clonedDrillMembers_1 = PivotUtil.cloneDrillMemberSettings(this.dataSourceSettings.drilledMembers);
24961
- var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('aria-colindex')) : Number(closest(target, 'th').getAttribute('aria-colindex'));
24987
+ var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('data-colindex')) : Number(closest(target, 'th').getAttribute('data-colindex'));
24962
24988
  var rowIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('index')) : Number(closest(target, 'th').getAttribute('index'));
24963
24989
  var currentCell = chartDrillInfo ? chartDrillInfo.cell :
24964
24990
  this.engineModule.pivotValues[rowIndex][colIndex];
@@ -25066,7 +25092,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25066
25092
  currentCell = chartDrillInfo.cell;
25067
25093
  }
25068
25094
  else {
25069
- var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('aria-colindex')) : Number(closest(target, 'th').getAttribute('aria-colindex'));
25095
+ var colIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('data-colindex')) : Number(closest(target, 'th').getAttribute('data-colindex'));
25070
25096
  var rowIndex = axis === 'row' ? Number(closest(target, 'td').getAttribute('index')) : Number(closest(target, 'th').getAttribute('index'));
25071
25097
  currentCell = this.olapEngineModule.pivotValues[rowIndex][colIndex];
25072
25098
  }
@@ -25369,6 +25395,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25369
25395
  (mCntVScrollPos === mCntScrollPos ? (mCntScrollPos - hScrollPos) :
25370
25396
  (mCntScrollPos < mCntVScrollPos && (hScrollPos === mCntVScrollPos || hScrollPos > mCntScrollPos) ?
25371
25397
  -(mCntVScrollPos - mCntScrollPos) : 0)));
25398
+ if (this.actionObj.actionName === 'Sort value' || this.actionObj.actionName === 'Sort field') {
25399
+ var excessMove = -this.scrollPosObject.horizontalSection;
25400
+ this.scrollPosObject.horizontalSection = this.scrollPosObject.horizontalSection + excessMove;
25401
+ }
25372
25402
  horiOffset = (ele.scrollLeft > this.scrollerBrowserLimit) ?
25373
25403
  (mCnt.querySelector('.' + TABLE).style.transform.split(',')[0].trim() + ',') :
25374
25404
  'translate(' + -(((ele.scrollLeft * this.horizontalScrollScale) -
@@ -25411,7 +25441,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25411
25441
  }
25412
25442
  };
25413
25443
  PivotView.prototype.setToolTip = function (args) {
25414
- var colIndex = Number(args.target.getAttribute('aria-colindex'));
25444
+ var colIndex = Number(args.target.getAttribute('data-colindex'));
25415
25445
  var rowIndex = Number(args.target.getAttribute('index'));
25416
25446
  var cell = (this.dataSourceSettings.values.length > 0 && this.pivotValues &&
25417
25447
  this.pivotValues[rowIndex] && this.pivotValues[rowIndex][colIndex]) ?
@@ -25608,7 +25638,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25608
25638
  var ele_1 = e.target;
25609
25639
  var axis = (ele_1.parentElement.classList.contains(ROWSHEADER) || ele_1.classList.contains(ROWSHEADER)) ? 'row' : 'column';
25610
25640
  ele_1 = axis === 'column' ? closest(ele_1, 'th') : closest(ele_1, 'td');
25611
- var colIndex = Number(ele_1.getAttribute('aria-colindex'));
25641
+ var colIndex = Number(ele_1.getAttribute('data-colindex'));
25612
25642
  var rowIndex = Number(ele_1.getAttribute('index'));
25613
25643
  var selectArgs = {
25614
25644
  cancel: false,
@@ -25685,7 +25715,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25685
25715
  if (this.actionBeginMethod()) {
25686
25716
  return;
25687
25717
  }
25688
- var colIndex = Number(ele.getAttribute('aria-colindex'));
25718
+ var colIndex = Number(ele.getAttribute('data-colindex'));
25689
25719
  var rowIndex = Number(ele.getAttribute('index'));
25690
25720
  if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
25691
25721
  var header = this.pivotValues[rowIndex][colIndex];
@@ -25699,13 +25729,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25699
25729
  }
25700
25730
  }
25701
25731
  else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
25702
- colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
25732
+ colIndex = (Number(ele.getAttribute('data-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
25703
25733
  rowIndex = this.engineModule.headerContent.length - 1;
25704
25734
  }
25705
25735
  this.setProperties({
25706
25736
  dataSourceSettings: {
25707
25737
  valueSortSettings: {
25708
- columnIndex: (Number(ele.getAttribute('aria-colindex')) +
25738
+ columnIndex: (Number(ele.getAttribute('data-colindex')) +
25709
25739
  Number(ele.getAttribute('aria-colspan')) - 1),
25710
25740
  sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
25711
25741
  headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
@@ -26054,7 +26084,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26054
26084
  }
26055
26085
  /* eslint-disable */
26056
26086
  if (ele && !isNullOrUndefined(this.pivotValues) && this.pivotValues.length > 0) {
26057
- var colIndex_1 = Number(ele.getAttribute('aria-colindex'));
26087
+ var colIndex_1 = Number(ele.getAttribute('data-colindex'));
26058
26088
  var rowIndex_1 = Number(ele.getAttribute('index'));
26059
26089
  var colSpan_1 = Number(ele.getAttribute('aria-colspan'));
26060
26090
  var selectArgs = {
@@ -26224,10 +26254,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26224
26254
  for (var _i = 0, _a = [].slice.call(this.element.querySelectorAll('.' + CELL_ACTIVE_BGCOLOR)); _i < _a.length; _i++) {
26225
26255
  var ele = _a[_i];
26226
26256
  removeClass([ele], [CELL_ACTIVE_BGCOLOR, SELECTED_BGCOLOR]);
26227
- if (activeColumns.indexOf(ele.getAttribute('aria-colindex')) === -1) {
26257
+ if (activeColumns.indexOf(ele.getAttribute('data-colindex')) === -1) {
26228
26258
  isToggle = false;
26229
26259
  }
26230
- var colIndex = Number(ele.getAttribute('aria-colindex'));
26260
+ var colIndex = Number(ele.getAttribute('data-colindex'));
26231
26261
  actColPos[colIndex] = colIndex;
26232
26262
  }
26233
26263
  activeColumns = Object.keys(actColPos).length > 0 ? Object.keys(actColPos).sort(function (a, b) {
@@ -26259,7 +26289,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26259
26289
  }
26260
26290
  var count = colStart;
26261
26291
  while (count <= colEnd) {
26262
- queryStringArray.push('[aria-colindex="' + count + '"]' + (this.gridSettings.selectionSettings.mode === 'Cell' ?
26292
+ queryStringArray.push('[data-colindex="' + count + '"]' + (this.gridSettings.selectionSettings.mode === 'Cell' ?
26263
26293
  '[index="' + rowStart + '"]' : "") + '');
26264
26294
  count++;
26265
26295
  }
@@ -26287,23 +26317,23 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26287
26317
  control.cellSelectionPos = [];
26288
26318
  for (var _i = 0, _a = [].slice.call(this.element.querySelectorAll('.' + SELECTED_BGCOLOR)); _i < _a.length; _i++) {
26289
26319
  var ele = _a[_i];
26290
- control.savedSelectedCellsPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('aria-colindex') });
26320
+ control.savedSelectedCellsPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('data-colindex') });
26291
26321
  }
26292
26322
  for (var _b = 0, _c = [].slice.call(this.element.querySelectorAll('.' + CELL_SELECTED_BGCOLOR)); _b < _c.length; _b++) {
26293
26323
  var ele = _c[_b];
26294
- control.cellSelectionPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('aria-colindex') });
26324
+ control.cellSelectionPos.push({ rowIndex: ele.getAttribute('index'), colIndex: ele.getAttribute('data-colindex') });
26295
26325
  }
26296
26326
  };
26297
26327
  PivotView.prototype.setSavedSelectedCells = function () {
26298
26328
  var control = this;
26299
26329
  for (var _i = 0, _a = [].slice.call(this.savedSelectedCellsPos); _i < _a.length; _i++) {
26300
26330
  var item = _a[_i];
26301
- var query = '[aria-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
26331
+ var query = '[data-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
26302
26332
  addClass([control.element.querySelector(query)], [CELL_ACTIVE_BGCOLOR, SELECTED_BGCOLOR]);
26303
26333
  }
26304
26334
  for (var _b = 0, _c = [].slice.call(this.cellSelectionPos); _b < _c.length; _b++) {
26305
26335
  var item = _c[_b];
26306
- var query = '[aria-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
26336
+ var query = '[data-colindex="' + item.colIndex + '"][index="' + item.rowIndex + '"]';
26307
26337
  addClass([control.element.querySelector(query)], [CELL_SELECTED_BGCOLOR]);
26308
26338
  }
26309
26339
  };
@@ -26884,8 +26914,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26884
26914
  : this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
26885
26915
  : (this.actionObj.actionName == svgExport) ? svgExported : (this.actionObj.actionName == pdfExport) ? pdfExported : (this.actionObj.actionName == csvExport) ? csvExported : (this.actionObj.actionName == excelExport) ? excelExported : this.actionObj.actionName == windowResize ? windowResized
26886
26916
  : this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
26887
- : (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : (this.actionObj.actionName == horizontalScroll) ? horizontalScrolled
26888
- : (this.actionObj.actionName == verticalScroll) ? verticalScrolled : this.actionObj.actionName;
26917
+ : (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : (this.actionObj.actionName == horizontalScroll) ? horizontalScrolled : (this.actionObj.actionName == verticalScroll) ? verticalScrolled : this.actionObj.actionName;
26889
26918
  return actionName;
26890
26919
  };
26891
26920
  /* eslint-disable-next-line */
@@ -27337,6 +27366,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
27337
27366
  __decorate([
27338
27367
  Event()
27339
27368
  ], PivotView.prototype, "beforeExport", void 0);
27369
+ __decorate([
27370
+ Event()
27371
+ ], PivotView.prototype, "exportComplete", void 0);
27340
27372
  __decorate([
27341
27373
  Event()
27342
27374
  ], PivotView.prototype, "conditionalFormatting", void 0);
@@ -27722,7 +27754,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27722
27754
  * Method to perform excel export.
27723
27755
  * @hidden
27724
27756
  */
27725
- ExcelExport$$1.prototype.exportToExcel = function (type, exportProperties) {
27757
+ ExcelExport$$1.prototype.exportToExcel = function (type, exportProperties, isBlob) {
27726
27758
  this.rows = [];
27727
27759
  this.actualrCnt = 0;
27728
27760
  var isHeaderSet = !isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.header);
@@ -27909,12 +27941,21 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
27909
27941
  workSheets.push({ columns: columns, rows: this.rows });
27910
27942
  }
27911
27943
  var book = new Workbook({ worksheets: workSheets }, type === 'Excel' ? 'xlsx' : 'csv', undefined, this.parent.currencyCode);
27912
- if ('.xlsx' === fileName.substring(fileName.length - 5, fileName.length) || '.csv' === fileName.substring(fileName.length - 4, fileName.length)) {
27913
- book.save(fileName);
27944
+ var fileExtension = fileName.split(".").pop();
27945
+ var blobData;
27946
+ if (!isBlob) {
27947
+ book.save(fileExtension === "xlsx" || fileExtension === "csv" ?
27948
+ fileName : (fileName + (type === 'Excel' ? '.xlsx' : '.csv')));
27914
27949
  }
27915
27950
  else {
27916
- book.save(fileName + (type === 'Excel' ? '.xlsx' : '.csv'));
27951
+ blobData = book.saveAsBlob(fileExtension === "xlsx" || type === 'Excel' ?
27952
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' : 'text/csv');
27917
27953
  }
27954
+ var exportCompleteEventArgs = {
27955
+ type: type,
27956
+ promise: isBlob ? blobData : null
27957
+ };
27958
+ this.parent.trigger(exportComplete, exportCompleteEventArgs);
27918
27959
  };
27919
27960
  /**
27920
27961
  * To destroy the excel export module
@@ -28094,7 +28135,7 @@ var PDFExport = /** @__PURE__ @class */ (function () {
28094
28135
  * @hidden
28095
28136
  */
28096
28137
  /* eslint-disable */
28097
- PDFExport.prototype.exportToPDF = function (pdfExportProperties) {
28138
+ PDFExport.prototype.exportToPDF = function (pdfExportProperties, isBlob) {
28098
28139
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
28099
28140
  var eventParams = this.applyEvent();
28100
28141
  var headerStyle = this.getStyle();
@@ -28285,7 +28326,18 @@ var PDFExport = /** @__PURE__ @class */ (function () {
28285
28326
  integratedCnt = 0;
28286
28327
  }
28287
28328
  } while (integratedCnt < colLength);
28288
- eventParams.document.save(eventParams.args.fileName + '.pdf');
28329
+ var blobData;
28330
+ if (!isBlob) {
28331
+ eventParams.document.save(eventParams.args.fileName + '.pdf');
28332
+ }
28333
+ else {
28334
+ blobData = eventParams.document.save();
28335
+ }
28336
+ var exportCompleteEventArgs = {
28337
+ type: 'PDF',
28338
+ promise: isBlob ? blobData : null
28339
+ };
28340
+ this.parent.trigger(exportComplete, exportCompleteEventArgs);
28289
28341
  eventParams.document.destroy();
28290
28342
  };
28291
28343
  PDFExport.prototype.applyStyle = function (pdfGridRow, pivotCell, localCnt) {
@@ -33267,6 +33319,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33267
33319
  this.isFormula = false;
33268
33320
  /** @hidden */
33269
33321
  this.isRequireUpdate = false;
33322
+ this.formatTypes = ['Standard', 'Currency', 'Percent', 'Custom', 'None'];
33270
33323
  this.parent = parent;
33271
33324
  this.existingReport = null;
33272
33325
  this.parent.calculatedFieldModule = this;
@@ -33372,7 +33425,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33372
33425
  this.fieldText = node.getAttribute('data-caption');
33373
33426
  this.formulaText = node.getAttribute('data-formula');
33374
33427
  this.formatType = node.getAttribute('data-formatString');
33375
- this.formatText = this.formatType === 'Custom' ? node.getAttribute('data-customString') : null;
33428
+ this.formatText = this.formatType === 'Custom' ? node.getAttribute('data-customformatstring') : null;
33376
33429
  this.fieldType = node.getAttribute('data-membertype');
33377
33430
  this.parentHierarchy = this.fieldType === 'Dimension' ? node.getAttribute('data-hierarchy') : null;
33378
33431
  addClass([node.querySelector('.e-list-edit-icon')], CALC_EDITED);
@@ -33402,11 +33455,19 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33402
33455
  closest(e.originalEvent.target, '.e-acrdn-header-icon')) {
33403
33456
  var node = closest(e.originalEvent.target, '.e-acrdn-header').querySelector('.' + CALCCHECK);
33404
33457
  var fieldName = node.getAttribute('data-field');
33458
+ var captionName = node.getAttribute('data-caption');
33405
33459
  var formatObj = PivotUtil.getFieldByName(fieldName, this.parent.dataSourceSettings.formatSettings);
33406
33460
  var optionElement = closest(e.originalEvent.target, '.e-acrdn-header-icon');
33461
+ if (formatObj) {
33462
+ var pivotFormat = this.getFormat(formatObj.format);
33463
+ var formatString = (pivotFormat ? this.formatTypes.indexOf(pivotFormat) > -1 ?
33464
+ formatObj.format : 'Custom' : 'None');
33465
+ this.formatType = formatString;
33466
+ }
33407
33467
  if (optionElement.querySelector('.' + CALC_EDIT) && e.originalEvent.target.classList.contains(CALC_EDIT)) {
33408
33468
  this.isEdit = true;
33409
- this.currentFieldName = this.fieldText = fieldName;
33469
+ this.currentFieldName = fieldName;
33470
+ this.fieldText = captionName ? captionName : fieldName;
33410
33471
  this.formulaText = this.parent.engineModule.fieldList[fieldName].formula;
33411
33472
  this.formatText = formatObj ? formatObj.format : '';
33412
33473
  addClass([optionElement.querySelector('.e-list-icon')], CALC_EDITED);
@@ -33475,16 +33536,16 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33475
33536
  this.inputObj.dataBind();
33476
33537
  var formatString = node.getAttribute('data-formatString');
33477
33538
  var dialogElement = this.dialog.element;
33539
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33478
33540
  var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
33541
+ var customFormatString = node.getAttribute('data-customformatstring');
33479
33542
  if (this.parent.dataType === 'olap') {
33480
33543
  var memberType = node.getAttribute('data-membertype');
33481
33544
  var parentHierarchy = node.getAttribute('data-hierarchy');
33482
33545
  var expression = node.getAttribute('data-formula');
33483
- var customString = node.getAttribute('data-customString');
33484
33546
  var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
33485
33547
  var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
33486
33548
  var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
33487
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33488
33549
  /* eslint-enable max-len */
33489
33550
  fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
33490
33551
  select('#' + this.parentID + 'droppable', document).value = expression;
@@ -33494,14 +33555,8 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33494
33555
  if (memberType === 'Dimension') {
33495
33556
  hierarchyDrop.value = parentHierarchy;
33496
33557
  }
33497
- if (formatString !== '') {
33498
- formatDrop.value = formatString;
33499
- formatDrop.dataBind();
33500
- }
33501
- customFormat.value = customString;
33502
33558
  }
33503
33559
  else {
33504
- customFormat.value = formatString;
33505
33560
  addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
33506
33561
  removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
33507
33562
  addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
@@ -33509,6 +33564,11 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33509
33564
  node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
33510
33565
  select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
33511
33566
  }
33567
+ if (formatString !== '') {
33568
+ ddlFormatTypes.value = formatString;
33569
+ ddlFormatTypes.dataBind();
33570
+ }
33571
+ customFormat.value = customFormatString;
33512
33572
  customFormat.dataBind();
33513
33573
  }
33514
33574
  else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
@@ -33523,15 +33583,15 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33523
33583
  customFormat.dataBind();
33524
33584
  if (this.parent.dataType === 'olap') {
33525
33585
  var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
33526
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33586
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33527
33587
  var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
33528
33588
  var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
33529
33589
  /* eslint-enable max-len */
33530
33590
  fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
33531
33591
  hierarchyDrop.index = 0;
33532
33592
  hierarchyDrop.dataBind();
33533
- formatDrop.index = 0;
33534
- formatDrop.dataBind();
33593
+ ddlFormatTypes.index = 0;
33594
+ ddlFormatTypes.dataBind();
33535
33595
  memberTypeDrop.index = 0;
33536
33596
  memberTypeDrop.readonly = false;
33537
33597
  memberTypeDrop.dataBind();
@@ -33924,18 +33984,15 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
33924
33984
  caption: this.inputObj.value,
33925
33985
  formula: dropField.value
33926
33986
  };
33987
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33988
+ field.formatString = (ddlFormatTypes.value === 'Custom' ? customFormat.value : (ddlFormatTypes.value === 'None' ? null : ddlFormatTypes.value));
33927
33989
  if (this.parent.dataType === 'olap') {
33928
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
33929
33990
  var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
33930
33991
  var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
33931
- field.formatString = (formatDrop.value === 'Custom' ? customFormat.value : (formatDrop.value === 'None' ? null : formatDrop.value));
33932
33992
  if (memberTypeDrop.value === 'Dimension') {
33933
33993
  field.hierarchyUniqueName = hierarchyDrop.value;
33934
33994
  }
33935
33995
  }
33936
- else {
33937
- field.formatString = customFormat.value;
33938
- }
33939
33996
  return field;
33940
33997
  };
33941
33998
  /* eslint-enable max-len */
@@ -34016,21 +34073,21 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34016
34073
  select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement).value = '';
34017
34074
  select('#' + this.parentID + 'Custom_Format_Element', this.parent.dialogRenderer.parentElement).value = '';
34018
34075
  if (this.parent.dataType === 'olap') {
34019
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
34020
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
34021
34076
  var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
34022
34077
  var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
34023
- formatDrop.index = 0;
34024
- formatDrop.dataBind();
34025
34078
  memberTypeDrop.index = 0;
34026
34079
  memberTypeDrop.readonly = false;
34027
34080
  memberTypeDrop.dataBind();
34028
34081
  hierarchyDrop.index = 0;
34029
34082
  hierarchyDrop.enabled = false;
34030
34083
  hierarchyDrop.dataBind();
34031
- customFormat.enabled = false;
34032
- customFormat.dataBind();
34033
34084
  }
34085
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
34086
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
34087
+ ddlFormatTypes.index = this.parent.dataType === 'olap' ? 0 : 4;
34088
+ ddlFormatTypes.dataBind();
34089
+ customFormat.enabled = false;
34090
+ customFormat.dataBind();
34034
34091
  /* eslint-enable max-len */
34035
34092
  }
34036
34093
  };
@@ -34323,7 +34380,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34323
34380
  className: (this.parent.dataType === 'olap' ? OLAP_CALCOUTERDIV + ' ' : '') + CALCOUTERDIV
34324
34381
  });
34325
34382
  var olapFieldTreeDiv = createElement('div', { id: this.parentID + 'Olap_Tree_Div', className: 'e-olap-field-tree-div' });
34326
- var olapCalcDiv = createElement('div', { id: this.parentID + 'Olap_Calc_Div', className: 'e-olap-calculated-div' });
34383
+ var pivotCalcDiv = createElement('div', { id: this.parentID + 'Pivot_Calc_Div', className: 'e-pivot-calculated-div' });
34327
34384
  if (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.
34328
34385
  dialogRenderer.parentElement.querySelector('.' + FORMULA) !== null && this.parent.isAdaptive) {
34329
34386
  var accordDiv = createElement('div', { id: this.parentID + 'accordDiv', className: CALCACCORD });
@@ -34347,7 +34404,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34347
34404
  className: PIVOT_FIELD_TITLE_CLASS, id: this.parentID + '_' + 'FieldNameTitle',
34348
34405
  innerHTML: this.parent.localeObj.getConstant('fieldTitle')
34349
34406
  });
34350
- olapCalcDiv.appendChild(formulaTitle);
34407
+ pivotCalcDiv.appendChild(formulaTitle);
34351
34408
  }
34352
34409
  var inputDiv = createElement('div', { id: this.parentID + 'outerDiv', className: CALCINPUTDIV });
34353
34410
  var inputObj = createElement('input', {
@@ -34356,7 +34413,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34356
34413
  className: CALCINPUT
34357
34414
  });
34358
34415
  inputDiv.appendChild(inputObj);
34359
- (this.parent.dataType === 'olap' && !this.parent.isAdaptive ? olapCalcDiv.appendChild(inputDiv) : outerDiv.appendChild(inputDiv));
34416
+ (this.parent.dataType === 'olap' && !this.parent.isAdaptive ? pivotCalcDiv.appendChild(inputDiv) : outerDiv.appendChild(inputDiv));
34360
34417
  var wrapDiv = createElement('div', { id: this.parentID + 'control_container', className: TREEVIEWOUTER });
34361
34418
  if (!this.parent.isAdaptive) {
34362
34419
  var fieldTitle = createElement('div', {
@@ -34403,7 +34460,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34403
34460
  innerHTML: (this.parent.dataType === 'olap' ? this.parent.localeObj.getConstant('expressionField') :
34404
34461
  this.parent.localeObj.getConstant('formula'))
34405
34462
  });
34406
- (this.parent.dataType === 'olap' ? olapCalcDiv.appendChild(formulaTitle) : outerDiv.appendChild(formulaTitle));
34463
+ (this.parent.dataType === 'olap' ? pivotCalcDiv.appendChild(formulaTitle) : outerDiv.appendChild(formulaTitle));
34407
34464
  }
34408
34465
  var dropDiv = createElement('textarea', {
34409
34466
  id: this.parentID + 'droppable',
@@ -34414,7 +34471,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34414
34471
  this.parent.localeObj.getConstant('dropText'))
34415
34472
  }
34416
34473
  });
34417
- (this.parent.dataType === 'olap' && !this.parent.isAdaptive ? olapCalcDiv.appendChild(dropDiv) : outerDiv.appendChild(dropDiv));
34474
+ (this.parent.dataType === 'olap' && !this.parent.isAdaptive ? pivotCalcDiv.appendChild(dropDiv) : outerDiv.appendChild(dropDiv));
34418
34475
  if (this.parent.isAdaptive) {
34419
34476
  var buttonDiv = createElement('div', { id: this.parentID + 'buttonDiv', className: CALCBUTTONDIV });
34420
34477
  var okBtn = createElement('button', {
@@ -34430,63 +34487,51 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34430
34487
  className: OLAP_MEMBER_TITLE_CLASS,
34431
34488
  innerHTML: this.parent.localeObj.getConstant('memberType')
34432
34489
  });
34433
- olapCalcDiv.appendChild(memberTypeTitle);
34490
+ pivotCalcDiv.appendChild(memberTypeTitle);
34434
34491
  }
34435
34492
  var memberTypeDrop = createElement('div', { id: this.parentID + 'Member_Type_Div', className: CALC_MEMBER_TYPE_DIV });
34436
- (this.parent.isAdaptive ? outerDiv.appendChild(memberTypeDrop) : olapCalcDiv.appendChild(memberTypeDrop));
34493
+ (this.parent.isAdaptive ? outerDiv.appendChild(memberTypeDrop) : pivotCalcDiv.appendChild(memberTypeDrop));
34437
34494
  if (!this.parent.isAdaptive) {
34438
34495
  var hierarchyTitle = createElement('div', {
34439
34496
  className: OLAP_HIERARCHY_TITLE_CLASS,
34440
34497
  innerHTML: this.parent.localeObj.getConstant('selectedHierarchy')
34441
34498
  });
34442
- olapCalcDiv.appendChild(hierarchyTitle);
34499
+ pivotCalcDiv.appendChild(hierarchyTitle);
34443
34500
  }
34444
34501
  var hierarchyDrop = createElement('div', { id: this.parentID + 'Hierarchy_List_Div', className: CALC_HIERARCHY_LIST_DIV });
34445
- (this.parent.isAdaptive ? outerDiv.appendChild(hierarchyDrop) : olapCalcDiv.appendChild(hierarchyDrop));
34446
- if (!this.parent.isAdaptive) {
34447
- var formatTitle = createElement('div', {
34448
- className: OLAP_FORMAT_TITLE_CLASS,
34449
- innerHTML: this.parent.localeObj.getConstant('formatString')
34450
- });
34451
- olapCalcDiv.appendChild(formatTitle);
34452
- }
34453
- var formatDrop = createElement('div', { id: this.parentID + 'Format_Div', className: CALC_FORMAT_TYPE_DIV });
34454
- (this.parent.isAdaptive ? outerDiv.appendChild(formatDrop) : olapCalcDiv.appendChild(formatDrop));
34455
- var customFormatDiv = createElement('div', { id: this.parentID + 'custom_Format_Div', className: OLAP_CALC_CUSTOM_FORMAT_INPUTDIV });
34456
- var customFormatObj = createElement('input', {
34457
- id: this.parentID + 'Custom_Format_Element',
34458
- attrs: { 'type': 'text' },
34459
- className: CALC_FORMAT_INPUT
34502
+ (this.parent.isAdaptive ? outerDiv.appendChild(hierarchyDrop) : pivotCalcDiv.appendChild(hierarchyDrop));
34503
+ }
34504
+ if (!this.parent.isAdaptive) {
34505
+ var formatTitle = createElement('div', {
34506
+ className: PIVOT_FORMAT_TITLE_CLASS,
34507
+ innerHTML: this.parent.localeObj.getConstant('formatString')
34460
34508
  });
34461
- customFormatDiv.appendChild(customFormatObj);
34462
- olapCalcDiv.appendChild(customFormatDiv);
34463
- (this.parent.isAdaptive ? outerDiv.appendChild(customFormatDiv) : olapCalcDiv.appendChild(customFormatDiv));
34464
- if (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.
34465
- dialogRenderer.parentElement.querySelector('.' + FORMULA) === null && this.parent.isAdaptive) {
34466
- var okBtn = outerDiv.querySelector('.' + CALCOKBTN);
34467
- outerDiv.appendChild(okBtn);
34468
- }
34469
- else {
34470
- outerDiv.appendChild(olapFieldTreeDiv);
34471
- outerDiv.appendChild(olapCalcDiv);
34472
- }
34509
+ pivotCalcDiv.appendChild(formatTitle);
34510
+ }
34511
+ var ddlFormatTypes = createElement('div', { id: this.parentID + 'Format_Div', className: CALC_FORMAT_TYPE_DIV });
34512
+ (this.parent.isAdaptive ? outerDiv.appendChild(ddlFormatTypes) : pivotCalcDiv.appendChild(ddlFormatTypes));
34513
+ var customFormatDiv = createElement('div', {
34514
+ id: this.parentID + 'custom_Format_Div',
34515
+ className: PIVOT_CALC_CUSTOM_FORMAT_INPUTDIV
34516
+ });
34517
+ var customFormatObj = createElement('input', {
34518
+ id: this.parentID + 'Custom_Format_Element',
34519
+ attrs: { 'type': 'text' },
34520
+ className: CALC_FORMAT_INPUT
34521
+ });
34522
+ customFormatDiv.appendChild(customFormatObj);
34523
+ pivotCalcDiv.appendChild(customFormatDiv);
34524
+ (this.parent.isAdaptive ? outerDiv.appendChild(customFormatDiv) : pivotCalcDiv.appendChild(customFormatDiv));
34525
+ if (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.
34526
+ dialogRenderer.parentElement.querySelector('.' + FORMULA) === null && this.parent.isAdaptive) {
34527
+ var okBtn = outerDiv.querySelector('.' + CALCOKBTN);
34528
+ outerDiv.appendChild(okBtn);
34473
34529
  }
34474
34530
  else {
34475
- var customFormatDiv = createElement('div', { id: this.parentID + 'custom_Format_Div', className: CALC_CUSTOM_FORMAT_INPUTDIV });
34476
- if (!this.parent.isAdaptive) {
34477
- var formatTitle = createElement('div', {
34478
- className: OLAP_FORMAT_TITLE_CLASS,
34479
- innerHTML: this.parent.localeObj.getConstant('formatString')
34480
- });
34481
- customFormatDiv.appendChild(formatTitle);
34531
+ if (this.parent.dataType === 'olap') {
34532
+ outerDiv.appendChild(olapFieldTreeDiv);
34482
34533
  }
34483
- var customFormatObj = createElement('input', {
34484
- id: this.parentID + 'Custom_Format_Element',
34485
- attrs: { 'type': 'text' },
34486
- className: CALC_FORMAT_INPUT
34487
- });
34488
- customFormatDiv.appendChild(customFormatObj);
34489
- (this.parent.isAdaptive ? outerDiv.insertBefore(customFormatDiv, select('#' + this.parentID + 'buttonDiv', outerDiv)) : outerDiv.appendChild(customFormatDiv));
34534
+ outerDiv.appendChild(pivotCalcDiv);
34490
34535
  }
34491
34536
  }
34492
34537
  return outerDiv;
@@ -34511,12 +34556,12 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34511
34556
  this.parentHierarchy = this.fieldType === 'Dimension' ? hierarchyDrop.value : null;
34512
34557
  }
34513
34558
  if (dialogElement.element.querySelector('.' + CALC_FORMAT_TYPE_DIV)) {
34514
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement.element), DropDownList);
34515
- this.formatType = formatDrop.value;
34559
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement.element), DropDownList);
34560
+ this.formatType = ddlFormatTypes.value;
34516
34561
  }
34517
34562
  if (dialogElement.element.querySelector('.' + CALC_FORMAT_INPUT)) {
34518
34563
  var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement.element), MaskedTextBox);
34519
- this.formatText = this.parent.dataType === 'olap' ? this.formatType === 'Custom' ? customFormat.value : null : customFormat.value;
34564
+ this.formatText = (this.parent.dataType === 'olap' ? this.formatType : this.getFormat(this.formatType)) === 'Custom' ? customFormat.value : null;
34520
34565
  }
34521
34566
  }
34522
34567
  else {
@@ -34562,9 +34607,8 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34562
34607
  hierarchyDrop.dataBind();
34563
34608
  }
34564
34609
  if (dialogElement.querySelector('.' + CALC_FORMAT_TYPE_DIV)) {
34565
- var formatStringData = ['Standard', 'Currency', 'Percent', 'None'];
34566
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
34567
- this.formatType = formatDrop.value = (formatStringData.indexOf(calcInfo.formatString) > -1 ? calcInfo.formatString : 'Custom');
34610
+ var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
34611
+ this.formatType = ddlFormatTypes.value = (this.formatTypes.indexOf(calcInfo.formatString) > -1 ? calcInfo.formatString : 'Custom');
34568
34612
  }
34569
34613
  if (dialogElement.querySelector('.' + CALC_FORMAT_INPUT)) {
34570
34614
  var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
@@ -34583,67 +34627,69 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34583
34627
  * To create treeview.
34584
34628
  * @returns {void}
34585
34629
  */
34586
- CalculatedField.prototype.createOlapDropElements = function () {
34630
+ CalculatedField.prototype.createDropElements = function () {
34587
34631
  var _this = this;
34588
34632
  var dialogElement = (this.parent.isAdaptive ?
34589
34633
  this.parent.dialogRenderer.parentElement : this.dialog.element);
34590
- var mData = [];
34591
34634
  var fData = [];
34592
34635
  var fieldData = [];
34593
- var memberTypeData = ['Measure', 'Dimension'];
34594
- var formatStringData = ['Standard', 'Currency', 'Percent', 'Custom', 'None'];
34595
- for (var _i = 0, memberTypeData_1 = memberTypeData; _i < memberTypeData_1.length; _i++) {
34596
- var type = memberTypeData_1[_i];
34597
- mData.push({ value: type, text: this.parent.localeObj.getConstant(type) });
34598
- }
34599
- for (var _a = 0, formatStringData_1 = formatStringData; _a < formatStringData_1.length; _a++) {
34600
- var format = formatStringData_1[_a];
34601
- fData.push({ value: format, text: this.parent.localeObj.getConstant(format) });
34602
- }
34603
- var fields = PivotUtil.getClonedData(this.parent.olapEngineModule.fieldListData);
34604
- for (var _b = 0, _c = fields; _b < _c.length; _b++) {
34605
- var item = _c[_b];
34606
- if (item.spriteCssClass &&
34607
- (item.spriteCssClass.indexOf('e-attributeCDB-icon') > -1 ||
34608
- item.spriteCssClass.indexOf('e-hierarchyCDB-icon') > -1)) {
34609
- fieldData.push({ value: item.id, text: item.caption });
34610
- }
34636
+ for (var _i = 0, _a = this.formatTypes; _i < _a.length; _i++) {
34637
+ var format = _a[_i];
34638
+ fData.push({ value: (this.parent.dataType === 'pivot' ? this.getFormat(format) : format), text: this.parent.localeObj.getConstant(format) });
34611
34639
  }
34612
- var memberTypeObj = new DropDownList({
34613
- dataSource: mData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
34614
- fields: { value: 'value', text: 'text' },
34615
- value: this.fieldType !== null ? this.fieldType : mData[0].value,
34616
- readonly: this.isEdit,
34617
- cssClass: MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
34618
- change: function (args) {
34619
- hierarchyListObj.enabled = args.value === 'Dimension' ? true : false;
34620
- _this.fieldType = args.value;
34621
- _this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
34622
- hierarchyListObj.dataBind();
34623
- }
34624
- });
34625
- memberTypeObj.isStringTemplate = true;
34626
- memberTypeObj.appendTo(select('#' + this.parentID + 'Member_Type_Div', dialogElement));
34627
- var hierarchyListObj = new DropDownList({
34628
- dataSource: fieldData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
34629
- allowFiltering: true,
34630
- enabled: memberTypeObj.value === 'Dimension' ? true : false,
34631
- filterBarPlaceholder: this.parent.localeObj.getConstant('example') + ' ' + fieldData[0].text.toString(),
34632
- fields: { value: 'value', text: 'text' },
34633
- value: this.parentHierarchy !== null && memberTypeObj.value === 'Dimension' ?
34634
- this.parentHierarchy : fieldData[0].value,
34635
- cssClass: MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
34636
- change: function (args) {
34637
- _this.parentHierarchy = args.value;
34638
- _this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
34640
+ if (this.parent.dataType === 'olap') {
34641
+ var mData = [];
34642
+ var memberTypeData = ['Measure', 'Dimension'];
34643
+ for (var _b = 0, memberTypeData_1 = memberTypeData; _b < memberTypeData_1.length; _b++) {
34644
+ var type = memberTypeData_1[_b];
34645
+ mData.push({ value: type, text: this.parent.localeObj.getConstant(type) });
34646
+ }
34647
+ var fields = PivotUtil.getClonedData(this.parent.olapEngineModule.fieldListData);
34648
+ for (var _c = 0, _d = fields; _c < _d.length; _c++) {
34649
+ var item = _d[_c];
34650
+ if (item.spriteCssClass &&
34651
+ (item.spriteCssClass.indexOf('e-attributeCDB-icon') > -1 ||
34652
+ item.spriteCssClass.indexOf('e-hierarchyCDB-icon') > -1)) {
34653
+ fieldData.push({ value: item.id, text: item.caption });
34654
+ }
34639
34655
  }
34640
- });
34641
- hierarchyListObj.isStringTemplate = true;
34642
- hierarchyListObj.appendTo(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement));
34656
+ var memberTypeObj = new DropDownList({
34657
+ dataSource: mData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
34658
+ fields: { value: 'value', text: 'text' },
34659
+ value: this.fieldType !== null ? this.fieldType : mData[0].value,
34660
+ readonly: this.isEdit,
34661
+ cssClass: MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
34662
+ change: function (args) {
34663
+ hierarchyListObj_1.enabled = args.value === 'Dimension' ? true : false;
34664
+ _this.fieldType = args.value;
34665
+ _this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
34666
+ hierarchyListObj_1.dataBind();
34667
+ }
34668
+ });
34669
+ memberTypeObj.isStringTemplate = true;
34670
+ memberTypeObj.appendTo(select('#' + this.parentID + 'Member_Type_Div', dialogElement));
34671
+ var hierarchyListObj_1 = new DropDownList({
34672
+ dataSource: fieldData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
34673
+ allowFiltering: true,
34674
+ enabled: memberTypeObj.value === 'Dimension' ? true : false,
34675
+ filterBarPlaceholder: this.parent.localeObj.getConstant('example') + ' ' + fieldData[0].text.toString(),
34676
+ fields: { value: 'value', text: 'text' },
34677
+ value: this.parentHierarchy !== null && memberTypeObj.value === 'Dimension' ?
34678
+ this.parentHierarchy : fieldData[0].value,
34679
+ cssClass: MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
34680
+ change: function (args) {
34681
+ _this.parentHierarchy = args.value;
34682
+ _this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
34683
+ }
34684
+ });
34685
+ hierarchyListObj_1.isStringTemplate = true;
34686
+ hierarchyListObj_1.appendTo(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement));
34687
+ }
34643
34688
  var formatStringObj = new DropDownList({
34644
34689
  dataSource: fData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
34645
34690
  fields: { value: 'value', text: 'text' },
34646
- value: this.formatType !== null ? this.formatType : fData[0].value,
34691
+ value: this.parent.isAdaptive && this.formatType !== null ? this.formatType
34692
+ : this.parent.dataType === 'olap' ? fData[0].value : fData[4].value,
34647
34693
  cssClass: MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
34648
34694
  change: function (args) {
34649
34695
  customerFormatObj.enabled = args.value === 'Custom' ? true : false;
@@ -34668,6 +34714,30 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34668
34714
  customerFormatObj.isStringTemplate = true;
34669
34715
  customerFormatObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
34670
34716
  };
34717
+ CalculatedField.prototype.getFormat = function (pivotFormat) {
34718
+ var format = pivotFormat;
34719
+ switch (format) {
34720
+ case 'Standard':
34721
+ format = 'N';
34722
+ break;
34723
+ case 'Currency':
34724
+ format = 'C';
34725
+ break;
34726
+ case 'Percent':
34727
+ format = 'P';
34728
+ break;
34729
+ case 'N':
34730
+ format = 'Standard';
34731
+ break;
34732
+ case 'C':
34733
+ format = 'Currency';
34734
+ break;
34735
+ case 'P':
34736
+ format = 'Percent';
34737
+ break;
34738
+ }
34739
+ return format;
34740
+ };
34671
34741
  /**
34672
34742
  * To create treeview.
34673
34743
  * @returns {void}
@@ -34823,12 +34893,11 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34823
34893
  args.node.setAttribute('data-membertype', field.fieldType);
34824
34894
  args.node.setAttribute('data-hierarchy', field.parentHierarchy ? field.parentHierarchy : '');
34825
34895
  args.node.setAttribute('data-formula', field.formula);
34826
- var formatStringData = ['Standard', 'Currency', 'Percent', 'None'];
34827
34896
  var formatString = void 0;
34828
- formatString = (field.formatString ? formatStringData.indexOf(field.formatString) > -1 ?
34897
+ formatString = (field.formatString ? this.formatTypes.indexOf(field.formatString) > -1 ?
34829
34898
  field.formatString : 'Custom' : 'None');
34830
34899
  args.node.setAttribute('data-formatString', formatString);
34831
- args.node.setAttribute('data-customString', (formatString === 'Custom' ? field.formatString : ''));
34900
+ args.node.setAttribute('data-customformatstring', (formatString === 'Custom' ? field.formatString : ''));
34832
34901
  var removeElement = createElement('span', {
34833
34902
  className: GRID_REMOVE + ' e-icons e-list-icon'
34834
34903
  });
@@ -34868,6 +34937,13 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34868
34937
  args.node.setAttribute('data-type', args.nodeData.type);
34869
34938
  var formatObj = PivotUtil.getFieldByName(field, this.parent.dataSourceSettings.formatSettings);
34870
34939
  args.node.setAttribute('data-formatString', formatObj ? formatObj.format : '');
34940
+ if (formatObj) {
34941
+ var pivotFormat = this.getFormat(formatObj.format);
34942
+ var formatString = (pivotFormat ? this.formatTypes.indexOf(pivotFormat) > -1 ?
34943
+ formatObj.format : 'Custom' : 'None');
34944
+ args.node.setAttribute('data-customformatstring', (formatString === 'Custom' ? pivotFormat : ''));
34945
+ args.node.setAttribute('data-formatString', formatObj ? formatString : '');
34946
+ }
34871
34947
  var dragElement = createElement('span', {
34872
34948
  attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('dragField') },
34873
34949
  className: ICON + ' e-drag'
@@ -34946,7 +35022,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34946
35022
  var key = keys[index];
34947
35023
  data.push({
34948
35024
  header: '<input id=' + this.parentID + '_' + index + ' class=' + CALCCHECK + ' type="checkbox" data-field=' +
34949
- key + ' data-caption=' + this.parent.engineModule.fieldList[key].caption + ' data-type=' +
35025
+ key + ' data-caption="' + this.parent.engineModule.fieldList[key].caption + '" data-type=' +
34950
35026
  this.parent.engineModule.fieldList[key].type + '/>',
34951
35027
  content: (this.parent.engineModule.fieldList[key].aggregateType === CALC ||
34952
35028
  (this.getMenuItems(this.parent.engineModule.fieldList[key].type).length < 1)) ? '' :
@@ -34966,9 +35042,9 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34966
35042
  var _this = this;
34967
35043
  tabObj.items[4].content = this.renderDialogElements().outerHTML;
34968
35044
  tabObj.dataBind();
34969
- if (this.parent.dataType === 'olap' && this.parent.isAdaptive && this.parent.
35045
+ if (this.parent.isAdaptive && this.parent.
34970
35046
  dialogRenderer.parentElement.querySelector('.' + FORMULA) !== null) {
34971
- this.createOlapDropElements();
35047
+ this.createDropElements();
34972
35048
  }
34973
35049
  var cancelBtn = new Button({ cssClass: FLAT + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), isPrimary: true, locale: this.parent.locale, enableRtl: this.parent.enableRtl });
34974
35050
  cancelBtn.isStringTemplate = true;
@@ -34992,25 +35068,6 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
34992
35068
  });
34993
35069
  this.inputObj.isStringTemplate = true;
34994
35070
  this.inputObj.appendTo('#' + this.parentID + 'ddlelement');
34995
- if (this.parent.dataType === 'pivot') {
34996
- var formatInputObj = new MaskedTextBox({
34997
- locale: this.parent.locale, enableRtl: this.parent.enableRtl,
34998
- placeholder: this.parent.localeObj.getConstant('numberFormatString'),
34999
- change: function (args) {
35000
- _this.formatText = args.value;
35001
- _this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
35002
- },
35003
- cssClass: this.parent.cssClass
35004
- });
35005
- formatInputObj.isStringTemplate = true;
35006
- formatInputObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
35007
- if (this.formatText !== null && this.parent.
35008
- dialogRenderer.parentElement.querySelector('.' + CALC_FORMAT_INPUT) !== null) {
35009
- this.parent.
35010
- dialogRenderer.parentElement.querySelector('.' + CALC_FORMAT_INPUT).value = this.formatText;
35011
- formatInputObj.value = this.formatText;
35012
- }
35013
- }
35014
35071
  if (this.formulaText !== null && select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement) !== null) {
35015
35072
  var drop = select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement);
35016
35073
  drop.value = this.formulaText;
@@ -35223,18 +35280,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
35223
35280
  });
35224
35281
  this.inputObj.isStringTemplate = true;
35225
35282
  this.inputObj.appendTo('#' + this.parentID + 'ddlelement');
35226
- if (this.parent.dataType === 'pivot') {
35227
- var customerFormatObj = new MaskedTextBox({
35228
- placeholder: this.parent.localeObj.getConstant('numberFormatString'),
35229
- locale: this.parent.locale, enableRtl: this.parent.enableRtl,
35230
- cssClass: this.parent.cssClass
35231
- });
35232
- customerFormatObj.isStringTemplate = true;
35233
- customerFormatObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
35234
- }
35235
- if (this.parent.dataType === 'olap' && !this.parent.isAdaptive) {
35236
- this.createOlapDropElements();
35237
- }
35283
+ this.createDropElements();
35238
35284
  this.createTreeView();
35239
35285
  this.droppable = new Droppable(select('#' + this.parentID + 'droppable'));
35240
35286
  this.keyboardEvents = new KeyboardEvents(this.parent.calculatedFieldModule.dialog.element, {
@@ -35359,6 +35405,7 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
35359
35405
  */
35360
35406
  CalculatedField.prototype.destroy = function () {
35361
35407
  this.removeEventListener();
35408
+ this.formatTypes = null;
35362
35409
  };
35363
35410
  return CalculatedField;
35364
35411
  }());
@@ -36193,7 +36240,8 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
36193
36240
  remove(select('#' + this.parentID + 'conditionalformatting', document));
36194
36241
  }
36195
36242
  this.parent.element.appendChild(createElement('div', {
36196
- id: this.parentID + 'conditionalformatting'
36243
+ id: this.parentID + 'conditionalformatting',
36244
+ className: FORMAT_DIALOG
36197
36245
  }));
36198
36246
  var buttonModel = [
36199
36247
  {
@@ -36228,14 +36276,14 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
36228
36276
  showCloseIcon: false, closeOnEscape: false, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
36229
36277
  position: { X: 'center', Y: 'center' }, allowDragging: true, buttons: buttonModel,
36230
36278
  beforeOpen: this.beforeOpen.bind(this), close: this.removeDialog.bind(this),
36231
- cssClass: FORMAT_DIALOG + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), header: this.parent.localeObj.getConstant('conditionalFormating'), target: document.body
36279
+ cssClass: this.parent.cssClass, header: this.parent.localeObj.getConstant('conditionalFormating'), target: document.body
36232
36280
  });
36233
36281
  }
36234
36282
  else {
36235
36283
  this.dialog = new Dialog({
36236
36284
  allowDragging: true, position: { X: 'center', Y: this.parent.element.offsetTop }, buttons: buttonModel,
36237
36285
  beforeOpen: this.beforeOpen.bind(this), close: this.removeDialog.bind(this),
36238
- cssClass: FORMAT_DIALOG + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), isModal: false, closeOnEscape: true, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
36286
+ cssClass: this.parent.cssClass, isModal: false, closeOnEscape: true, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
36239
36287
  showCloseIcon: true, header: this.parent.localeObj.getConstant('conditionalFormating'), target: this.parent.element
36240
36288
  });
36241
36289
  }
@@ -37839,12 +37887,12 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
37839
37887
  });
37840
37888
  args.element.innerText = '';
37841
37889
  checkbox.appendTo('#' + this.parent.element.id + '_' + 'checkBox');
37842
- if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) &&
37890
+ if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) &&
37843
37891
  !args.element.classList.contains(MENU_DISABLE)) {
37844
37892
  args.element.classList.add(MENU_DISABLE);
37845
37893
  checkbox.disabled = true;
37846
37894
  }
37847
- else if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) < 0) &&
37895
+ else if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) < 0) &&
37848
37896
  args.element.classList.contains(MENU_DISABLE)) {
37849
37897
  args.element.classList.remove(MENU_DISABLE);
37850
37898
  checkbox.disabled = false;
@@ -37880,7 +37928,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
37880
37928
  this.showLableState = chartSettings.legendSettings.visible;
37881
37929
  }
37882
37930
  else {
37883
- this.showLableState = ['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1 ?
37931
+ this.showLableState = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1 ?
37884
37932
  false : true;
37885
37933
  }
37886
37934
  return this.showLableState;
@@ -38363,11 +38411,11 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
38363
38411
  Toolbar$$1.prototype.changeDropDown = function (args) {
38364
38412
  var chartSettings = JSON.parse(this.parent.getPersistData()).chartSettings;
38365
38413
  if (!(chartSettings && chartSettings.legendSettings && chartSettings.legendSettings.visible !== undefined)) {
38366
- var checked = ['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(args.value.toString()) > -1 ?
38414
+ var checked = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(args.value.toString()) > -1 ?
38367
38415
  false : true;
38368
38416
  getInstance(select('#' + this.parent.element.id + '_DialogShowLabel'), CheckBox).checked = checked;
38369
38417
  }
38370
- if (['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(args.value.toString()) > -1) {
38418
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(args.value.toString()) > -1) {
38371
38419
  getInstance(select('#' + this.parent.element.id + '_DialogMultipleAxis'), CheckBox).disabled = true;
38372
38420
  getInstance(select('#' + this.parent.element.id + '_AxisModeOption'), DropDownList).enabled = false;
38373
38421
  }
@@ -38399,7 +38447,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
38399
38447
  });
38400
38448
  checkbox1.appendTo(select('#' + this.parent.element.id + '_DialogShowLabel', this.chartTypesDialog.element));
38401
38449
  checkbox.appendTo(select('#' + this.parent.element.id + '_DialogMultipleAxis', this.chartTypesDialog.element));
38402
- if (['Pie', 'Funnel', 'Pyramid', 'Doughnut'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) {
38450
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Pareto'].indexOf(this.parent.chartSettings.chartSeries.type) > -1) {
38403
38451
  checkbox.disabled = true;
38404
38452
  getInstance(select('#' + this.parent.element.id + '_AxisModeOption'), DropDownList).enabled = false;
38405
38453
  }
@@ -38969,7 +39017,7 @@ var Grouping = /** @__PURE__ @class */ (function () {
38969
39017
  this.parentElement = parentElement;
38970
39018
  this.selectedCellsInfo = [];
38971
39019
  this.isUpdate = false;
38972
- var colIndex = Number(target.getAttribute('aria-colindex'));
39020
+ var colIndex = Number(target.getAttribute('data-colindex'));
38973
39021
  var rowIndex = Number(target.getAttribute('index'));
38974
39022
  var cell = this.parent.engineModule.pivotValues[rowIndex][colIndex];
38975
39023
  var fieldName = cell.valueSort.axis.toString();
@@ -39165,7 +39213,7 @@ var Grouping = /** @__PURE__ @class */ (function () {
39165
39213
  /* eslint-enable */
39166
39214
  for (var _i = 0, selectedElements_1 = selectedElements; _i < selectedElements_1.length; _i++) {
39167
39215
  var element = selectedElements_1[_i];
39168
- var colIndex = Number(element.getAttribute('aria-colindex'));
39216
+ var colIndex = Number(element.getAttribute('data-colindex'));
39169
39217
  var rowIndex = Number(element.getAttribute('index'));
39170
39218
  var cell = this.parent.engineModule.pivotValues[rowIndex][colIndex];
39171
39219
  if (cell && (cell.axis === axis) && !(cell.type === 'grand sum' || cell.type === 'sum') &&
@@ -39799,5 +39847,5 @@ var Grouping = /** @__PURE__ @class */ (function () {
39799
39847
  * Export PivotGrid components
39800
39848
  */
39801
39849
 
39802
- export { GroupingBarSettings, CellEditSettings, ConditionalSettings, HyperlinkSettings, DisplayOption, PivotView, Render, ExcelExport$1 as ExcelExport, PDFExport, KeyboardInteraction, VirtualScroll$1 as VirtualScroll, DrillThrough, PivotChart, PivotFieldList, TreeViewRenderer, AxisFieldRenderer, AxisTableRenderer, DialogRenderer, EventBase, NodeStateModified, DataSourceUpdate, FieldList, CommonKeyboardInteraction, Common, GroupingBar, CalculatedField, ConditionalFormatting, PivotCommon, load, enginePopulating, enginePopulated, onFieldDropped, fieldDrop, beforePivotTableRender, afterPivotTableRender, beforeExport, excelHeaderQueryCellInfo, pdfHeaderQueryCellInfo, excelQueryCellInfo, pdfQueryCellInfo, onPdfCellRender, dataBound, queryCellInfo, headerCellInfo, hyperlinkCellClick, resizing, resizeStop, cellClick, drillThrough, beforeColumnsRender, selected, cellSelecting, drill, cellSelected, cellDeselected, rowSelected, rowDeselected, beginDrillThrough, editCompleted, multiLevelLabelClick, saveReport, fetchReport, loadReport, renameReport, removeReport, newReport, toolbarRender, toolbarClick, chartTooltipRender, chartLoaded, chartLoad, chartResized, chartAxisLabelRender, chartSeriesCreated, aggregateCellInfo, onHeadersSort, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, actionBegin, actionComplete, actionFailure, initialLoad, uiUpdate, scroll, verticalScroll, horizontalScroll, contentReady, dataReady, initSubComponent, treeViewUpdate, pivotButtonUpdate, initCalculatedField, click, initToolbar, initFormatting, initGrouping, sortValue, drillUp, drillDown, addNewReport, saveCurrentReport, saveAsCurrentReport, renameCurrentReport, removeCurrentReport, loadReports, openConditionalFormatting, openNumberFormatting, MdxQuery, showFieldList, tableView, chartView, multipleAxis, showLegend, pdfExport, pngExport, excelExport, csvExport, jpegExport, svgExport, hideSubTotals, subTotalsRow, subTotalsColumn, showSubTotals, hideGrandTotals, grandTotalsRow, grandTotalsColumn, showGrandTotals, numberFormattingMenu, conditionalFormattingMenu, reportChange, sortFieldTree, editCalculatedField, sortField, filterField, removeField, openCalculatedField, editRecord, saveEditedRecords, addNewRecord, removeRecord, aggregateField, contextMenuCalculatedField, windowResize, calculatedFieldApplied, editedRecordsSaved, newRecordAdded, recordRemoved, closeFieldlist, fieldTreeSorted, reportSaved, newReportAdded, reportReSaved, reportRenamed, reportRemoved, excelExported, csvExported, pdfExported, pngExported, jpegExported, svgExported, conditionallyFormatted, numberFormatted, tableViewed, chartViewed, subTotalsHidden, subTotalsRowShown, subTotalsColumnShown, subTotalsShown, grandTotalsHidden, grandTotalsRowShown, grandTotalsColumnShown, grandTotalsShown, valueSorted, calculatedFieldEdited, fieldSorted, fieldFiltered, fieldRemoved, fieldAggregated, recordEdited, reportChanged, windowResized, recordUpdated, drillThroughClosed, verticalScrolled, horizontalScrolled, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
39850
+ export { GroupingBarSettings, CellEditSettings, ConditionalSettings, HyperlinkSettings, DisplayOption, PivotView, Render, ExcelExport$1 as ExcelExport, PDFExport, KeyboardInteraction, VirtualScroll$1 as VirtualScroll, DrillThrough, PivotChart, PivotFieldList, TreeViewRenderer, AxisFieldRenderer, AxisTableRenderer, DialogRenderer, EventBase, NodeStateModified, DataSourceUpdate, FieldList, CommonKeyboardInteraction, Common, GroupingBar, CalculatedField, ConditionalFormatting, PivotCommon, load, enginePopulating, enginePopulated, onFieldDropped, fieldDrop, beforePivotTableRender, afterPivotTableRender, beforeExport, exportComplete, excelHeaderQueryCellInfo, pdfHeaderQueryCellInfo, excelQueryCellInfo, pdfQueryCellInfo, onPdfCellRender, dataBound, queryCellInfo, headerCellInfo, hyperlinkCellClick, resizing, resizeStop, cellClick, drillThrough, beforeColumnsRender, selected, cellSelecting, drill, cellSelected, cellDeselected, rowSelected, rowDeselected, beginDrillThrough, editCompleted, multiLevelLabelClick, saveReport, fetchReport, loadReport, renameReport, removeReport, newReport, toolbarRender, toolbarClick, chartTooltipRender, chartLoaded, chartLoad, chartResized, chartAxisLabelRender, chartSeriesCreated, aggregateCellInfo, onHeadersSort, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, actionBegin, actionComplete, actionFailure, initialLoad, uiUpdate, scroll, verticalScroll, horizontalScroll, contentReady, dataReady, initSubComponent, treeViewUpdate, pivotButtonUpdate, initCalculatedField, click, initToolbar, initFormatting, initGrouping, sortValue, drillUp, drillDown, addNewReport, saveCurrentReport, saveAsCurrentReport, renameCurrentReport, removeCurrentReport, loadReports, openConditionalFormatting, openNumberFormatting, MdxQuery, showFieldList, tableView, chartView, multipleAxis, showLegend, pdfExport, pngExport, excelExport, csvExport, jpegExport, svgExport, hideSubTotals, subTotalsRow, subTotalsColumn, showSubTotals, hideGrandTotals, grandTotalsRow, grandTotalsColumn, showGrandTotals, numberFormattingMenu, conditionalFormattingMenu, reportChange, sortFieldTree, editCalculatedField, sortField, filterField, removeField, openCalculatedField, editRecord, saveEditedRecords, addNewRecord, removeRecord, aggregateField, contextMenuCalculatedField, windowResize, calculatedFieldApplied, editedRecordsSaved, newRecordAdded, recordRemoved, closeFieldlist, fieldTreeSorted, reportSaved, newReportAdded, reportReSaved, reportRenamed, reportRemoved, excelExported, csvExported, pdfExported, pngExported, jpegExported, svgExported, conditionallyFormatted, numberFormatted, tableViewed, chartViewed, subTotalsHidden, subTotalsRowShown, subTotalsColumnShown, subTotalsShown, grandTotalsHidden, grandTotalsRowShown, grandTotalsColumnShown, grandTotalsShown, valueSorted, calculatedFieldEdited, fieldSorted, fieldFiltered, fieldRemoved, fieldAggregated, recordEdited, reportChanged, windowResized, recordUpdated, drillThroughClosed, verticalScrolled, horizontalScrolled, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
39803
39851
  //# sourceMappingURL=ej2-pivotview.es5.js.map