@syncfusion/ej2-pivotview 19.3.53 → 19.4.40

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 (137) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +76 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +56 -0
  3. package/CHANGELOG.md +31 -25
  4. package/README.md +1 -1
  5. package/dist/ej2-pivotview.umd.min.js +2 -2
  6. package/dist/ej2-pivotview.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-pivotview.es2015.js +2076 -1100
  8. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  9. package/dist/es6/ej2-pivotview.es5.js +2092 -1110
  10. package/dist/es6/ej2-pivotview.es5.js.map +1 -1
  11. package/dist/global/ej2-pivotview.min.js +2 -2
  12. package/dist/global/ej2-pivotview.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +22 -22
  15. package/src/base/engine.d.ts +17 -1
  16. package/src/base/engine.js +82 -29
  17. package/src/base/export-util.d.ts +17 -0
  18. package/src/base/export-util.js +245 -0
  19. package/src/base/olap/engine.d.ts +7 -0
  20. package/src/base/olap/engine.js +138 -35
  21. package/src/base/util.d.ts +0 -9
  22. package/src/base/util.js +2 -215
  23. package/src/common/actions/field-list.js +1 -1
  24. package/src/common/actions/pivot-button.d.ts +5 -8
  25. package/src/common/actions/pivot-button.js +188 -171
  26. package/src/common/base/constant.d.ts +186 -0
  27. package/src/common/base/constant.js +186 -0
  28. package/src/common/base/css-constant.d.ts +2 -0
  29. package/src/common/base/css-constant.js +2 -0
  30. package/src/common/base/enum.d.ts +11 -0
  31. package/src/common/base/interface.d.ts +272 -2
  32. package/src/common/calculatedfield/calculated-field.js +108 -93
  33. package/src/common/conditionalformatting/conditional-formatting.js +8 -2
  34. package/src/common/grouping-bar/grouping-bar.js +1 -1
  35. package/src/common/popups/aggregate-menu.js +57 -35
  36. package/src/common/popups/drillthrough-dialog.js +187 -139
  37. package/src/common/popups/filter-dialog.d.ts +1 -0
  38. package/src/common/popups/filter-dialog.js +22 -1
  39. package/src/common/popups/formatting-dialog.js +4 -0
  40. package/src/common/popups/grouping.js +2 -1
  41. package/src/common/popups/toolbar.js +305 -203
  42. package/src/pivotchart/base/pivotchart.js +36 -15
  43. package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
  44. package/src/pivotfieldlist/base/field-list.d.ts +55 -1
  45. package/src/pivotfieldlist/base/field-list.js +68 -1
  46. package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
  47. package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
  48. package/src/pivotview/actions/drill-through.js +1 -1
  49. package/src/pivotview/actions/excel-export.js +9 -7
  50. package/src/pivotview/actions/pdf-export.js +3 -3
  51. package/src/pivotview/base/pivotview-model.d.ts +46 -1
  52. package/src/pivotview/base/pivotview.d.ts +56 -2
  53. package/src/pivotview/base/pivotview.js +311 -107
  54. package/src/pivotview/model/chartsettings-model.d.ts +2 -2
  55. package/src/pivotview/model/chartsettings.d.ts +2 -2
  56. package/src/pivotview/model/chartsettings.js +2 -2
  57. package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
  58. package/src/pivotview/model/datasourcesettings.d.ts +7 -0
  59. package/src/pivotview/model/datasourcesettings.js +3 -0
  60. package/src/pivotview/renderer/render.d.ts +2 -1
  61. package/src/pivotview/renderer/render.js +52 -11
  62. package/styles/bootstrap-dark.css +115 -104
  63. package/styles/bootstrap.css +115 -104
  64. package/styles/bootstrap4.css +114 -81
  65. package/styles/bootstrap5-dark.css +220 -168
  66. package/styles/bootstrap5.css +215 -161
  67. package/styles/fabric-dark.css +117 -103
  68. package/styles/fabric.css +115 -102
  69. package/styles/highcontrast-light.css +116 -102
  70. package/styles/highcontrast.css +118 -104
  71. package/styles/material-dark.css +108 -97
  72. package/styles/material.css +108 -97
  73. package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
  74. package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
  75. package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
  76. package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
  77. package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
  78. package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
  79. package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
  80. package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
  81. package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
  82. package/styles/pivotfieldlist/_layout.scss +199 -109
  83. package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
  84. package/styles/pivotfieldlist/_material-definition.scss +1 -4
  85. package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
  86. package/styles/pivotfieldlist/_theme.scss +185 -35
  87. package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
  88. package/styles/pivotfieldlist/bootstrap.css +49 -58
  89. package/styles/pivotfieldlist/bootstrap4.css +44 -39
  90. package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
  91. package/styles/pivotfieldlist/bootstrap5.css +115 -89
  92. package/styles/pivotfieldlist/fabric-dark.css +49 -58
  93. package/styles/pivotfieldlist/fabric.css +49 -58
  94. package/styles/pivotfieldlist/highcontrast-light.css +49 -58
  95. package/styles/pivotfieldlist/highcontrast.css +49 -58
  96. package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
  97. package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
  98. package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
  99. package/styles/pivotfieldlist/material-dark.css +44 -53
  100. package/styles/pivotfieldlist/material.css +44 -53
  101. package/styles/pivotfieldlist/tailwind-dark.css +138 -81
  102. package/styles/pivotfieldlist/tailwind.css +140 -83
  103. package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
  104. package/styles/pivotview/_bootstrap-definition.scss +9 -6
  105. package/styles/pivotview/_bootstrap4-definition.scss +10 -7
  106. package/styles/pivotview/_bootstrap5-definition.scss +12 -9
  107. package/styles/pivotview/_fabric-dark-definition.scss +8 -5
  108. package/styles/pivotview/_fabric-definition.scss +7 -4
  109. package/styles/pivotview/_fluent-definition.scss +126 -0
  110. package/styles/pivotview/_highcontrast-definition.scss +8 -5
  111. package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
  112. package/styles/pivotview/_layout.scss +119 -64
  113. package/styles/pivotview/_material-dark-definition.scss +7 -4
  114. package/styles/pivotview/_material-definition.scss +8 -4
  115. package/styles/pivotview/_tailwind-definition.scss +8 -5
  116. package/styles/pivotview/_theme.scss +124 -70
  117. package/styles/pivotview/bootstrap-dark.css +66 -46
  118. package/styles/pivotview/bootstrap.css +66 -46
  119. package/styles/pivotview/bootstrap4.css +70 -42
  120. package/styles/pivotview/bootstrap5-dark.css +99 -73
  121. package/styles/pivotview/bootstrap5-dark.scss +0 -1
  122. package/styles/pivotview/bootstrap5.css +100 -72
  123. package/styles/pivotview/fabric-dark.css +68 -45
  124. package/styles/pivotview/fabric.css +66 -44
  125. package/styles/pivotview/highcontrast-light.css +67 -44
  126. package/styles/pivotview/highcontrast.css +69 -46
  127. package/styles/pivotview/icons/_bootstrap4.scss +1 -1
  128. package/styles/pivotview/icons/_bootstrap5.scss +1 -1
  129. package/styles/pivotview/icons/_fluent.scss +183 -0
  130. package/styles/pivotview/icons/_tailwind.scss +1 -1
  131. package/styles/pivotview/material-dark.css +64 -44
  132. package/styles/pivotview/material.css +64 -44
  133. package/styles/pivotview/tailwind-dark.css +106 -58
  134. package/styles/pivotview/tailwind-dark.scss +0 -1
  135. package/styles/pivotview/tailwind.css +107 -57
  136. package/styles/tailwind-dark.css +250 -145
  137. package/styles/tailwind.css +247 -140
@@ -30,7 +30,7 @@ var PivotChart = /** @class */ (function () {
30
30
  * @private
31
31
  */
32
32
  PivotChart.prototype.getModuleName = function () {
33
- return 'pivotchart';
33
+ return 'pivotChart';
34
34
  };
35
35
  /* eslint-disable */
36
36
  PivotChart.prototype.loadChart = function (parent, chartSettings) {
@@ -225,7 +225,9 @@ var PivotChart = /** @class */ (function () {
225
225
  this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
226
226
  var name_1 = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
227
227
  (firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
228
- var text = firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
228
+ var values = this.engineModule.fieldList[this.currentMeasure];
229
+ var text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
230
+ this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
229
231
  var caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
230
232
  ((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
231
233
  var levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
@@ -401,7 +403,9 @@ var PivotChart = /** @class */ (function () {
401
403
  this.chartSettings.palettes = currentSeries.palettes;
402
404
  }
403
405
  for (var i = 0; i < this.columnGroupObject[key].length; i++) {
404
- this.columnGroupObject[key][i].x = this.columnGroupObject[key][i].x === '' ? this.parent.localeObj.getConstant('blank') : this.columnGroupObject[key][i].x;
406
+ var values = this.engineModule.fieldList[this.currentMeasure];
407
+ this.columnGroupObject[key][i].x = (this.parent.dataSourceSettings.rows.length === 0 && !this.chartSettings.showMultiLevelLabels) ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
408
+ this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : this.columnGroupObject[key][i].x === '' ? this.parent.localeObj.getConstant('blank') : this.columnGroupObject[key][i].x;
405
409
  }
406
410
  currentSeries.dataSource = this.columnGroupObject[key];
407
411
  currentSeries.xName = 'x';
@@ -557,7 +561,7 @@ var PivotChart = /** @class */ (function () {
557
561
  enableSmartLabels: this.chartSettings.enableSmartLabels,
558
562
  center: this.chartSettings.pieCenter,
559
563
  enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
560
- highLightMode: this.chartSettings.highlightMode,
564
+ highlightMode: this.chartSettings.highlightMode,
561
565
  highlightPattern: this.chartSettings.highlightPattern,
562
566
  titleStyle: this.chartSettings.titleStyle,
563
567
  subTitle: this.chartSettings.subTitle,
@@ -685,7 +689,7 @@ var PivotChart = /** @class */ (function () {
685
689
  this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
686
690
  if (this.accumulationType.indexOf(type) > -1) {
687
691
  this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
688
- this.parent.chart.highLightMode = this.parent.chartSettings.highlightMode;
692
+ this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
689
693
  this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
690
694
  }
691
695
  else {
@@ -794,9 +798,14 @@ var PivotChart = /** @class */ (function () {
794
798
  currentYAxis.labelFormat = currentYAxis.labelFormat ?
795
799
  currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
796
800
  currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
797
- currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop :
798
- this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
799
- this.chartSettings.chartSeries.type === 'StackingBar100' ? 50 : 30;
801
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
802
+ if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
803
+ this.chartSettings.chartSeries.type === 'StackingBar100') {
804
+ currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
805
+ }
806
+ else {
807
+ currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
808
+ }
800
809
  if (!resFormat) {
801
810
  currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
802
811
  }
@@ -843,6 +852,7 @@ var PivotChart = /** @class */ (function () {
843
852
  currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
844
853
  currentYAxis.rowIndex = 0;
845
854
  currentYAxis.columnIndex = 0;
855
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
846
856
  if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
847
857
  currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
848
858
  }
@@ -1165,6 +1175,7 @@ var PivotChart = /** @class */ (function () {
1165
1175
  };
1166
1176
  PivotChart.prototype.loaded = function (args) {
1167
1177
  this.parent.isChartLoaded = true;
1178
+ var width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
1168
1179
  if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
1169
1180
  this.parent.showFieldList && this.parent.currentView === 'Chart') {
1170
1181
  this.parent.groupingBarModule.alignIcon();
@@ -1176,13 +1187,15 @@ var PivotChart = /** @class */ (function () {
1176
1187
  this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
1177
1188
  }
1178
1189
  }
1179
- if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0)
1180
- && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
1181
- this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflow = 'visible';
1182
- }
1183
- else if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
1184
- this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflow = 'auto';
1185
- this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflowX = 'hidden';
1190
+ if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
1191
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
1192
+ this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflow = 'visible';
1193
+ }
1194
+ else {
1195
+ this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflow = 'auto';
1196
+ this.parent.element.querySelector('.' + cls.PIVOTCHART).style.overflowX = 'hidden';
1197
+ }
1198
+ this.parent.element.querySelector('.' + cls.PIVOTCHART).style.width = width + 'px';
1186
1199
  }
1187
1200
  this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
1188
1201
  this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
@@ -1403,6 +1416,11 @@ var PivotChart = /** @class */ (function () {
1403
1416
  offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
1404
1417
  }
1405
1418
  if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
1419
+ var isNone = false;
1420
+ if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
1421
+ isNone = true;
1422
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
1423
+ }
1406
1424
  if (this.parent.showToolbar && this.parent.showGroupingBar) {
1407
1425
  height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
1408
1426
  this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
@@ -1420,6 +1438,9 @@ var PivotChart = /** @class */ (function () {
1420
1438
  else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
1421
1439
  height = '200';
1422
1440
  }
1441
+ if (isNone) {
1442
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
1443
+ }
1423
1444
  }
1424
1445
  else {
1425
1446
  height = 'auto';
@@ -1,4 +1,4 @@
1
- import { Property, Event, Component, EmitType, Internationalization, extend } from '@syncfusion/ej2-base';import { L10n, remove, addClass, Browser, Complex, ModuleDeclaration, getInstance } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, removeClass, isNullOrUndefined } from '@syncfusion/ej2-base';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { PivotEngine, IFieldListOptions, IPageSettings, IDataOptions, ICustomProperties, IDrilledItem } from '../../base/engine';import { ISort, IFilter, IFieldOptions, ICalculatedFields, IDataSet } from '../../base/engine';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { LoadEventArgs, EnginePopulatingEventArgs, EnginePopulatedEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs } from '../../common/base/interface';import { AggregateEventArgs, CalculatedFieldCreateEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { FieldDroppedEventArgs, FieldListRefreshedEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { FieldDragStartEventArgs, FieldRemoveEventArgs } from '../../common/base/interface';import { CommonArgs, MemberFilteringEventArgs, MemberEditorOpenEventArgs } from '../../common/base/interface';import { Mode, AggregateTypes } from '../../common/base/enum';import { PivotCommon } from '../../common/base/pivot-common';import { Render } from '../renderer/renderer';import { DialogRenderer } from '../renderer/dialog-renderer';import { TreeViewRenderer } from '../renderer/tree-renderer';import { AxisTableRenderer } from '../renderer/axis-table-renderer';import { AxisFieldRenderer } from '../renderer/axis-field-renderer';import { PivotButton } from '../../common/actions/pivot-button';import { PivotView } from '../../pivotview/base/pivotview';import { DataSourceSettingsModel, FieldOptionsModel } from '../../pivotview/model/datasourcesettings-model';import { DataSourceSettings } from '../../pivotview/model/datasourcesettings';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { PivotContextMenu } from '../../common/popups/context-menu';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { PivotUtil } from '../../base/util';import { OlapEngine, IOlapFieldListOptions, IOlapCustomProperties, IOlapField } from '../../base/olap/engine';
1
+ import { Property, Event, Component, EmitType, Internationalization, extend } from '@syncfusion/ej2-base';import { L10n, remove, addClass, Browser, Complex, ModuleDeclaration, getInstance } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, removeClass, isNullOrUndefined } from '@syncfusion/ej2-base';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { PivotEngine, IFieldListOptions, IPageSettings, IDataOptions, ICustomProperties, IDrilledItem } from '../../base/engine';import { ISort, IFilter, IFieldOptions, ICalculatedFields, IDataSet } from '../../base/engine';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { LoadEventArgs, EnginePopulatingEventArgs, EnginePopulatedEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs, PivotActionBeginEventArgs, PivotActionCompleteEventArgs, PivotActionFailureEventArgs } from '../../common/base/interface';import { AggregateEventArgs, CalculatedFieldCreateEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { FieldDroppedEventArgs, FieldListRefreshedEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { FieldDragStartEventArgs, FieldRemoveEventArgs } from '../../common/base/interface';import { CommonArgs, MemberFilteringEventArgs, MemberEditorOpenEventArgs } from '../../common/base/interface';import { Mode, AggregateTypes } from '../../common/base/enum';import { PivotCommon } from '../../common/base/pivot-common';import { Render } from '../renderer/renderer';import { DialogRenderer } from '../renderer/dialog-renderer';import { TreeViewRenderer } from '../renderer/tree-renderer';import { AxisTableRenderer } from '../renderer/axis-table-renderer';import { AxisFieldRenderer } from '../renderer/axis-field-renderer';import { PivotButton } from '../../common/actions/pivot-button';import { PivotView } from '../../pivotview/base/pivotview';import { DataSourceSettingsModel, FieldOptionsModel } from '../../pivotview/model/datasourcesettings-model';import { DataSourceSettings } from '../../pivotview/model/datasourcesettings';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { PivotContextMenu } from '../../common/popups/context-menu';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { PivotUtil } from '../../base/util';import { OlapEngine, IOlapFieldListOptions, IOlapCustomProperties, IOlapField } from '../../base/olap/engine';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -170,6 +170,15 @@ export interface PivotFieldListModel extends ComponentModel{
170
170
  */
171
171
  aggregateTypes?: AggregateTypes[];
172
172
 
173
+ /**
174
+ * Allows values with a specific country currency format to be displayed in the pivot table.
175
+ * Standard currency codes referred to as ISO 4217 can be used for the formatting of currency values.
176
+ * For example, to display "US Dollar($)" currency values, set the `currencyCode` to **USD**.
177
+ * > It is applicable ony for Relational data.
178
+ * @private
179
+ */
180
+ currencyCode?: string;
181
+
173
182
  /**
174
183
  * It allows any customization of Pivot Field List properties on initial rendering.
175
184
  * Based on the changes, the pivot field list will be redered.
@@ -268,4 +277,43 @@ export interface PivotFieldListModel extends ComponentModel{
268
277
  */
269
278
  beforeServiceInvoke?: EmitType<BeforeServiceInvokeEventArgs>;
270
279
 
280
+ /**
281
+ * It triggers when UI action begins in the Pivot FieldList. The UI actions used to trigger this event such as
282
+ * sorting fields through icon click in the field list tree,
283
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
284
+ * Button actions such as
285
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
286
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
287
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
288
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
289
+ * @event
290
+ */
291
+ actionBegin?: EmitType<PivotActionBeginEventArgs>;
292
+
293
+ /**
294
+ * It triggers when UI action in the Pivot FieldList completed. The UI actions used to trigger this event such as
295
+ * sorting fields through icon click in the field list tree,
296
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
297
+ * Button actions such as
298
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
299
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
300
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
301
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
302
+ * @event
303
+ */
304
+ actionComplete?: EmitType<PivotActionCompleteEventArgs>;
305
+
306
+ /**
307
+ * It triggers when UI action failed to achieve the desired results in the Pivot FieldList. The UI actions used to trigger this event such as
308
+ * sorting fields through icon click in the field list tree,
309
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
310
+ * Button actions such as
311
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
312
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
313
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
314
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
315
+ * @event
316
+ */
317
+ actionFailure?: EmitType<PivotActionFailureEventArgs>;
318
+
271
319
  }
@@ -4,7 +4,7 @@ import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
4
4
  import { PivotEngine, IFieldListOptions, IPageSettings, IDataOptions, IDrilledItem } from '../../base/engine';
5
5
  import { ISort, IFilter, IFieldOptions, ICalculatedFields, IDataSet } from '../../base/engine';
6
6
  import { PivotFieldListModel } from './field-list-model';
7
- import { LoadEventArgs, EnginePopulatingEventArgs, EnginePopulatedEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs } from '../../common/base/interface';
7
+ import { LoadEventArgs, EnginePopulatingEventArgs, EnginePopulatedEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs, PivotActionBeginEventArgs, PivotActionCompleteEventArgs, PivotActionFailureEventArgs } from '../../common/base/interface';
8
8
  import { AggregateEventArgs, CalculatedFieldCreateEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';
9
9
  import { FieldDroppedEventArgs, FieldDropEventArgs } from '../../common/base/interface';
10
10
  import { FieldDragStartEventArgs, FieldRemoveEventArgs } from '../../common/base/interface';
@@ -109,6 +109,8 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
109
109
  private request;
110
110
  private savedDataSourceSettings;
111
111
  private remoteData;
112
+ /** @hidden */
113
+ actionObj: PivotActionCompleteEventArgs;
112
114
  /**
113
115
  * Allows the following pivot report information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list.
114
116
  * * `catalog`: Allows to set the database name of SSAS cube as string type that used to retrieve the data from the specified connection string. **Note: It is applicable only for OLAP data source.**
@@ -262,6 +264,14 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
262
264
  * 'PercentageOfParentTotal']
263
265
  */
264
266
  aggregateTypes: AggregateTypes[];
267
+ /**
268
+ * Allows values with a specific country currency format to be displayed in the pivot table.
269
+ * Standard currency codes referred to as ISO 4217 can be used for the formatting of currency values.
270
+ * For example, to display "US Dollar($)" currency values, set the `currencyCode` to **USD**.
271
+ * > It is applicable ony for Relational data.
272
+ * @private
273
+ */
274
+ private currencyCode;
265
275
  /**
266
276
  * It allows any customization of Pivot Field List properties on initial rendering.
267
277
  * Based on the changes, the pivot field list will be redered.
@@ -344,6 +354,42 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
344
354
  * @event
345
355
  */
346
356
  beforeServiceInvoke: EmitType<BeforeServiceInvokeEventArgs>;
357
+ /**
358
+ * It triggers when UI action begins in the Pivot FieldList. The UI actions used to trigger this event such as
359
+ * sorting fields through icon click in the field list tree,
360
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
361
+ * Button actions such as
362
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
363
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
364
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
365
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
366
+ * @event
367
+ */
368
+ actionBegin: EmitType<PivotActionBeginEventArgs>;
369
+ /**
370
+ * It triggers when UI action in the Pivot FieldList completed. The UI actions used to trigger this event such as
371
+ * sorting fields through icon click in the field list tree,
372
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
373
+ * Button actions such as
374
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
375
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
376
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
377
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
378
+ * @event
379
+ */
380
+ actionComplete: EmitType<PivotActionCompleteEventArgs>;
381
+ /**
382
+ * It triggers when UI action failed to achieve the desired results in the Pivot FieldList. The UI actions used to trigger this event such as
383
+ * sorting fields through icon click in the field list tree,
384
+ * [`Calculated field`](../../pivotview/field-list/#calculated-fields) UI,
385
+ * Button actions such as
386
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
387
+ * [`sorting`](../../pivotview/field-list/#sorting-members),
388
+ * [`filtering`](../../pivotview/field-list/#filtering-members) and
389
+ * [`aggregation`](pivotview/field-list/#changing-aggregation-type-of-value-fields-at-runtime).
390
+ * @event
391
+ */
392
+ actionFailure: EmitType<PivotActionFailureEventArgs>;
347
393
  /**
348
394
  * Constructor for creating the widget
349
395
  * @param {PivotFieldListModel} options - options
@@ -442,6 +488,14 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
442
488
  * @hidden
443
489
  */
444
490
  triggerPopulateEvent(): void;
491
+ /** @hidden */
492
+ actionBeginMethod(): boolean;
493
+ /** @hidden */
494
+ actionCompleteMethod(): void;
495
+ /** @hidden */
496
+ actionFailureMethod(error: Error): void;
497
+ /** @hidden */
498
+ getActionCompleteName(): any;
445
499
  /**
446
500
  * Destroys the Field Table component.
447
501
  * @function destroy
@@ -66,6 +66,8 @@ var PivotFieldList = /** @class */ (function (_super) {
66
66
  _this.enableValueSorting = false;
67
67
  _this.request = new XMLHttpRequest();
68
68
  _this.remoteData = [];
69
+ /** @hidden */
70
+ _this.actionObj = {};
69
71
  return _this;
70
72
  }
71
73
  /**
@@ -297,7 +299,9 @@ var PivotFieldList = /** @class */ (function (_super) {
297
299
  enableValueSorting: enableValueSorting,
298
300
  isDrillThrough: isDrillThrough,
299
301
  localeObj: localeObj,
300
- clonedReport: this.clonedReport
302
+ clonedReport: this.clonedReport,
303
+ globalize: this.globalize,
304
+ currenyCode: this.currencyCode
301
305
  };
302
306
  }
303
307
  return customProperties;
@@ -989,6 +993,11 @@ var PivotFieldList = /** @class */ (function (_super) {
989
993
  pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
990
994
  }
991
995
  });
996
+ var actionName = this.getActionCompleteName();
997
+ this.actionObj.actionName = actionName;
998
+ if (this.actionObj.actionName) {
999
+ this.actionCompleteMethod();
1000
+ }
992
1001
  };
993
1002
  PivotFieldList.prototype.updateOlapDataSource = function (pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
994
1003
  var customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
@@ -1022,6 +1031,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1022
1031
  PivotFieldList.prototype.update = function (control) {
1023
1032
  if (control) {
1024
1033
  this.clonedDataSet = control.clonedDataSet;
1034
+ this.clonedReport = control.clonedReport;
1025
1035
  this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
1026
1036
  this.engineModule = control.engineModule;
1027
1037
  this.olapEngineModule = control.olapEngineModule;
@@ -1056,6 +1066,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1056
1066
  PivotFieldList.prototype.updateView = function (control) {
1057
1067
  if (control) {
1058
1068
  control.clonedDataSet = this.clonedDataSet;
1069
+ control.clonedReport = this.clonedReport;
1059
1070
  control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
1060
1071
  control.engineModule = this.engineModule;
1061
1072
  control.olapEngineModule = this.olapEngineModule;
@@ -1099,6 +1110,47 @@ var PivotFieldList = /** @class */ (function (_super) {
1099
1110
  }
1100
1111
  });
1101
1112
  };
1113
+ /** @hidden */
1114
+ PivotFieldList.prototype.actionBeginMethod = function () {
1115
+ var eventArgs = {
1116
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
1117
+ actionName: this.actionObj.actionName,
1118
+ fieldInfo: this.actionObj.fieldInfo,
1119
+ cancel: false
1120
+ };
1121
+ var control = this.isPopupView ? this.pivotGridModule : this;
1122
+ control.trigger(events.actionBegin, eventArgs);
1123
+ return eventArgs.cancel;
1124
+ };
1125
+ /** @hidden */
1126
+ PivotFieldList.prototype.actionCompleteMethod = function () {
1127
+ var eventArgs = {
1128
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
1129
+ actionName: this.actionObj.actionName,
1130
+ fieldInfo: this.actionObj.fieldInfo,
1131
+ actionInfo: this.actionObj.actionInfo
1132
+ };
1133
+ var control = this.isPopupView ? this.pivotGridModule : this;
1134
+ control.trigger(events.actionComplete, eventArgs);
1135
+ this.actionObj.actionName = '';
1136
+ this.actionObj.actionInfo = undefined;
1137
+ this.actionObj.fieldInfo = undefined;
1138
+ };
1139
+ /** @hidden */
1140
+ PivotFieldList.prototype.actionFailureMethod = function (error) {
1141
+ var eventArgs = {
1142
+ actionName: this.actionObj.actionName,
1143
+ errorInfo: error
1144
+ };
1145
+ var control = this.isPopupView ? this.pivotGridModule : this;
1146
+ control.trigger(events.actionFailure, eventArgs);
1147
+ };
1148
+ /** @hidden */
1149
+ PivotFieldList.prototype.getActionCompleteName = function () {
1150
+ var actionName = (this.actionObj.actionName == events.openCalculatedField) ? events.calculatedFieldApplied : (this.actionObj.actionName == events.editCalculatedField) ? events.calculatedFieldEdited : (this.actionObj.actionName == events.sortField) ? events.fieldSorted
1151
+ : (this.actionObj.actionName == events.filterField) ? events.fieldFiltered : (this.actionObj.actionName == events.removeField) ? events.fieldRemoved : (this.actionObj.actionName == events.aggregateField) ? events.fieldAggregated : this.actionObj.actionName == events.sortFieldTree ? events.fieldTreeSorted : this.actionObj.actionName;
1152
+ return actionName;
1153
+ };
1102
1154
  /**
1103
1155
  * Destroys the Field Table component.
1104
1156
  * @function destroy
@@ -1173,6 +1225,9 @@ var PivotFieldList = /** @class */ (function (_super) {
1173
1225
  if (this.clonedDataSet) {
1174
1226
  this.clonedDataSet = null;
1175
1227
  }
1228
+ if (this.clonedReport) {
1229
+ this.clonedReport = null;
1230
+ }
1176
1231
  if (this.clonedFieldList) {
1177
1232
  this.clonedFieldList = null;
1178
1233
  }
@@ -1220,6 +1275,9 @@ var PivotFieldList = /** @class */ (function (_super) {
1220
1275
  __decorate([
1221
1276
  Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
1222
1277
  ], PivotFieldList.prototype, "aggregateTypes", void 0);
1278
+ __decorate([
1279
+ Property('USD')
1280
+ ], PivotFieldList.prototype, "currencyCode", void 0);
1223
1281
  __decorate([
1224
1282
  Event()
1225
1283
  ], PivotFieldList.prototype, "load", void 0);
@@ -1268,6 +1326,15 @@ var PivotFieldList = /** @class */ (function (_super) {
1268
1326
  __decorate([
1269
1327
  Event()
1270
1328
  ], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
1329
+ __decorate([
1330
+ Event()
1331
+ ], PivotFieldList.prototype, "actionBegin", void 0);
1332
+ __decorate([
1333
+ Event()
1334
+ ], PivotFieldList.prototype, "actionComplete", void 0);
1335
+ __decorate([
1336
+ Event()
1337
+ ], PivotFieldList.prototype, "actionFailure", void 0);
1271
1338
  PivotFieldList = __decorate([
1272
1339
  NotifyPropertyChanges
1273
1340
  ], PivotFieldList);
@@ -460,31 +460,50 @@ var DialogRenderer = /** @class */ (function () {
460
460
  return axisWrapper;
461
461
  };
462
462
  DialogRenderer.prototype.showCalculatedField = function (event) {
463
- if (!this.parent.isAdaptive) {
464
- if (this.parent.dialogRenderer.fieldListDialog) {
465
- this.parent.dialogRenderer.fieldListDialog.hide();
466
- addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
463
+ try {
464
+ if (!this.parent.isAdaptive) {
465
+ this.parent.actionObj.actionName = events.openCalculatedField;
466
+ if (this.parent.actionBeginMethod()) {
467
+ return;
468
+ }
469
+ if (this.parent.dialogRenderer.fieldListDialog) {
470
+ this.parent.dialogRenderer.fieldListDialog.hide();
471
+ addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
472
+ }
467
473
  }
474
+ this.parent.notify(events.initCalculatedField, {});
475
+ }
476
+ catch (execption) {
477
+ this.parent.actionFailureMethod(execption);
468
478
  }
469
- this.parent.notify(events.initCalculatedField, {});
470
479
  };
471
480
  DialogRenderer.prototype.showFieldListDialog = function (event) {
472
481
  var activeindex = this.adaptiveElement.selectedItem;
473
482
  this.parent.treeViewModule.render(activeindex);
474
483
  };
475
484
  DialogRenderer.prototype.onShowFieldList = function () {
476
- if (this.parent.allowDeferLayoutUpdate) {
477
- if (this.parent.isAdaptive) {
478
- this.parent.axisFieldModule.render();
485
+ this.parent.actionObj.actionName = events.showFieldList;
486
+ if (this.parent.actionBeginMethod()) {
487
+ return;
488
+ }
489
+ this.parent.actionObj.actionName = '';
490
+ try {
491
+ if (this.parent.allowDeferLayoutUpdate) {
492
+ if (this.parent.isAdaptive) {
493
+ this.parent.axisFieldModule.render();
494
+ }
495
+ this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
496
+ this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
479
497
  }
480
- this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
481
- this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
498
+ addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
499
+ this.parent.dialogRenderer.fieldListDialog.show();
500
+ this.parent.dialogRenderer.fieldListDialog.element.style.top =
501
+ parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
502
+ '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
503
+ }
504
+ catch (execption) {
505
+ this.parent.actionFailureMethod(execption);
482
506
  }
483
- addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
484
- this.parent.dialogRenderer.fieldListDialog.show();
485
- this.parent.dialogRenderer.fieldListDialog.element.style.top =
486
- parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
487
- '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
488
507
  };
489
508
  DialogRenderer.prototype.onCloseFieldList = function () {
490
509
  if (this.parent.allowDeferLayoutUpdate) {
@@ -512,6 +531,10 @@ var DialogRenderer = /** @class */ (function () {
512
531
  }
513
532
  }
514
533
  this.parent.dialogRenderer.fieldListDialog.hide();
534
+ this.parent.actionObj.actionName = events.closeFieldlist;
535
+ if (this.parent.actionObj.actionName) {
536
+ this.parent.actionCompleteMethod();
537
+ }
515
538
  };
516
539
  DialogRenderer.prototype.removeFieldListIcon = function () {
517
540
  if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
@@ -827,28 +827,41 @@ var TreeViewRenderer = /** @class */ (function () {
827
827
  TreeViewRenderer.prototype.updateSorting = function (args) {
828
828
  var target = args.target;
829
829
  var option = target.getAttribute('data-sort');
830
- if (target.className.indexOf('e-selected') === -1) {
831
- switch (option) {
832
- case 'None':
833
- this.fieldListSort = 'None';
834
- addClass([target], 'e-selected');
835
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
836
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
837
- break;
838
- case 'Ascend':
839
- this.fieldListSort = 'Ascend';
840
- addClass([target], 'e-selected');
841
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
842
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
843
- break;
844
- case 'Descend':
845
- this.fieldListSort = 'Descend';
846
- addClass([target], 'e-selected');
847
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
848
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
849
- break;
850
- }
851
- this.refreshTreeView();
830
+ this.parent.actionObj.actionName = events.sortFieldTree;
831
+ if (this.parent.actionBeginMethod()) {
832
+ return;
833
+ }
834
+ try {
835
+ if (target.className.indexOf('e-selected') === -1) {
836
+ switch (option) {
837
+ case 'None':
838
+ this.fieldListSort = 'None';
839
+ addClass([target], 'e-selected');
840
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
841
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
842
+ break;
843
+ case 'Ascend':
844
+ this.fieldListSort = 'Ascend';
845
+ addClass([target], 'e-selected');
846
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
847
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
848
+ break;
849
+ case 'Descend':
850
+ this.fieldListSort = 'Descend';
851
+ addClass([target], 'e-selected');
852
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
853
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
854
+ break;
855
+ }
856
+ this.refreshTreeView();
857
+ }
858
+ }
859
+ catch (execption) {
860
+ this.parent.actionFailureMethod(execption);
861
+ }
862
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
863
+ if (this.parent.actionObj.actionName) {
864
+ this.parent.actionCompleteMethod();
852
865
  }
853
866
  };
854
867
  /* eslint-disable */
@@ -22,7 +22,7 @@ var DrillThrough = /** @class */ (function () {
22
22
  * @hidden
23
23
  */
24
24
  DrillThrough.prototype.getModuleName = function () {
25
- return 'drillthrough';
25
+ return 'drillThrough';
26
26
  };
27
27
  DrillThrough.prototype.addInternalEvents = function () {
28
28
  this.parent.on(contentReady, this.wireEvents, this);
@@ -1,7 +1,7 @@
1
1
  import { Workbook } from '@syncfusion/ej2-excel-export';
2
2
  import * as events from '../../common/base/constant';
3
3
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
4
- import { PivotUtil } from '../../base/util';
4
+ import { PivotExportUtil } from '../../base/export-util';
5
5
  /**
6
6
  * @hidden
7
7
  * `ExcelExport` module is used to handle the Excel export action.
@@ -69,7 +69,7 @@ var ExcelExport = /** @class */ (function () {
69
69
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
70
70
  /** Event trigerring */
71
71
  var clonedValues;
72
- var currentPivotValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
72
+ var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
73
73
  var customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
74
74
  if (isHeaderSet) {
75
75
  this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
@@ -79,7 +79,7 @@ var ExcelExport = /** @class */ (function () {
79
79
  this.engine.pageSettings = null;
80
80
  this.engine.generateGridData(this.parent.dataSourceSettings, true);
81
81
  this.parent.applyFormatting(this.engine.pivotValues);
82
- clonedValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
82
+ clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
83
83
  this.engine.pivotValues = currentPivotValues;
84
84
  this.engine.pageSettings = pageSettings;
85
85
  }
@@ -123,15 +123,17 @@ var ExcelExport = /** @class */ (function () {
123
123
  var pivotCell = pivotValues[rCnt][cCnt];
124
124
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
125
125
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
126
- if (pivotCell.type === 'grand sum') {
127
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
128
- this.parent.localeObj.getConstant('grandTotal');
126
+ var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
127
+ || (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
128
+ if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
129
+ cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
129
130
  }
130
131
  else if (pivotCell.type === 'sum') {
131
132
  cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
132
133
  }
133
134
  else {
134
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
135
+ cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
136
+ === pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
135
137
  }
136
138
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
137
139
  cells.push({