@syncfusion/ej2-pivotview 19.3.57 → 19.4.38

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 (136) 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 +26 -38
  4. package/dist/ej2-pivotview.umd.min.js +2 -2
  5. package/dist/ej2-pivotview.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-pivotview.es2015.js +2026 -1092
  7. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  8. package/dist/es6/ej2-pivotview.es5.js +2042 -1102
  9. package/dist/es6/ej2-pivotview.es5.js.map +1 -1
  10. package/dist/global/ej2-pivotview.min.js +2 -2
  11. package/dist/global/ej2-pivotview.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +22 -22
  14. package/src/base/engine.d.ts +17 -1
  15. package/src/base/engine.js +70 -27
  16. package/src/base/export-util.d.ts +17 -0
  17. package/src/base/export-util.js +245 -0
  18. package/src/base/olap/engine.d.ts +7 -0
  19. package/src/base/olap/engine.js +138 -35
  20. package/src/base/util.d.ts +0 -9
  21. package/src/base/util.js +2 -215
  22. package/src/common/actions/field-list.js +1 -1
  23. package/src/common/actions/pivot-button.d.ts +5 -8
  24. package/src/common/actions/pivot-button.js +187 -171
  25. package/src/common/base/constant.d.ts +186 -0
  26. package/src/common/base/constant.js +186 -0
  27. package/src/common/base/css-constant.d.ts +2 -0
  28. package/src/common/base/css-constant.js +2 -0
  29. package/src/common/base/enum.d.ts +11 -0
  30. package/src/common/base/interface.d.ts +272 -2
  31. package/src/common/calculatedfield/calculated-field.js +108 -93
  32. package/src/common/conditionalformatting/conditional-formatting.js +8 -2
  33. package/src/common/grouping-bar/grouping-bar.js +1 -1
  34. package/src/common/popups/aggregate-menu.js +57 -35
  35. package/src/common/popups/drillthrough-dialog.js +187 -139
  36. package/src/common/popups/filter-dialog.d.ts +1 -0
  37. package/src/common/popups/filter-dialog.js +22 -1
  38. package/src/common/popups/formatting-dialog.js +4 -0
  39. package/src/common/popups/grouping.js +2 -1
  40. package/src/common/popups/toolbar.js +305 -203
  41. package/src/pivotchart/base/pivotchart.js +36 -15
  42. package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
  43. package/src/pivotfieldlist/base/field-list.d.ts +55 -1
  44. package/src/pivotfieldlist/base/field-list.js +68 -1
  45. package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
  46. package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
  47. package/src/pivotview/actions/drill-through.js +1 -1
  48. package/src/pivotview/actions/excel-export.js +9 -7
  49. package/src/pivotview/actions/pdf-export.js +3 -3
  50. package/src/pivotview/base/pivotview-model.d.ts +46 -1
  51. package/src/pivotview/base/pivotview.d.ts +56 -2
  52. package/src/pivotview/base/pivotview.js +288 -107
  53. package/src/pivotview/model/chartsettings-model.d.ts +1 -1
  54. package/src/pivotview/model/chartsettings.d.ts +1 -1
  55. package/src/pivotview/model/chartsettings.js +1 -1
  56. package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
  57. package/src/pivotview/model/datasourcesettings.d.ts +7 -0
  58. package/src/pivotview/model/datasourcesettings.js +3 -0
  59. package/src/pivotview/renderer/render.d.ts +2 -1
  60. package/src/pivotview/renderer/render.js +39 -6
  61. package/styles/bootstrap-dark.css +115 -104
  62. package/styles/bootstrap.css +115 -104
  63. package/styles/bootstrap4.css +114 -81
  64. package/styles/bootstrap5-dark.css +220 -168
  65. package/styles/bootstrap5.css +215 -161
  66. package/styles/fabric-dark.css +117 -103
  67. package/styles/fabric.css +115 -102
  68. package/styles/highcontrast-light.css +116 -102
  69. package/styles/highcontrast.css +118 -104
  70. package/styles/material-dark.css +108 -97
  71. package/styles/material.css +108 -97
  72. package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
  73. package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
  74. package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
  75. package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
  76. package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
  77. package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
  78. package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
  79. package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
  80. package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
  81. package/styles/pivotfieldlist/_layout.scss +199 -109
  82. package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
  83. package/styles/pivotfieldlist/_material-definition.scss +1 -4
  84. package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
  85. package/styles/pivotfieldlist/_theme.scss +185 -35
  86. package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
  87. package/styles/pivotfieldlist/bootstrap.css +49 -58
  88. package/styles/pivotfieldlist/bootstrap4.css +44 -39
  89. package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
  90. package/styles/pivotfieldlist/bootstrap5.css +115 -89
  91. package/styles/pivotfieldlist/fabric-dark.css +49 -58
  92. package/styles/pivotfieldlist/fabric.css +49 -58
  93. package/styles/pivotfieldlist/highcontrast-light.css +49 -58
  94. package/styles/pivotfieldlist/highcontrast.css +49 -58
  95. package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
  96. package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
  97. package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
  98. package/styles/pivotfieldlist/material-dark.css +44 -53
  99. package/styles/pivotfieldlist/material.css +44 -53
  100. package/styles/pivotfieldlist/tailwind-dark.css +138 -81
  101. package/styles/pivotfieldlist/tailwind.css +140 -83
  102. package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
  103. package/styles/pivotview/_bootstrap-definition.scss +9 -6
  104. package/styles/pivotview/_bootstrap4-definition.scss +10 -7
  105. package/styles/pivotview/_bootstrap5-definition.scss +12 -9
  106. package/styles/pivotview/_fabric-dark-definition.scss +8 -5
  107. package/styles/pivotview/_fabric-definition.scss +7 -4
  108. package/styles/pivotview/_fluent-definition.scss +126 -0
  109. package/styles/pivotview/_highcontrast-definition.scss +8 -5
  110. package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
  111. package/styles/pivotview/_layout.scss +119 -64
  112. package/styles/pivotview/_material-dark-definition.scss +7 -4
  113. package/styles/pivotview/_material-definition.scss +8 -4
  114. package/styles/pivotview/_tailwind-definition.scss +8 -5
  115. package/styles/pivotview/_theme.scss +124 -70
  116. package/styles/pivotview/bootstrap-dark.css +66 -46
  117. package/styles/pivotview/bootstrap.css +66 -46
  118. package/styles/pivotview/bootstrap4.css +70 -42
  119. package/styles/pivotview/bootstrap5-dark.css +99 -73
  120. package/styles/pivotview/bootstrap5-dark.scss +0 -1
  121. package/styles/pivotview/bootstrap5.css +100 -72
  122. package/styles/pivotview/fabric-dark.css +68 -45
  123. package/styles/pivotview/fabric.css +66 -44
  124. package/styles/pivotview/highcontrast-light.css +67 -44
  125. package/styles/pivotview/highcontrast.css +69 -46
  126. package/styles/pivotview/icons/_bootstrap4.scss +1 -1
  127. package/styles/pivotview/icons/_bootstrap5.scss +1 -1
  128. package/styles/pivotview/icons/_fluent.scss +183 -0
  129. package/styles/pivotview/icons/_tailwind.scss +1 -1
  130. package/styles/pivotview/material-dark.css +64 -44
  131. package/styles/pivotview/material.css +64 -44
  132. package/styles/pivotview/tailwind-dark.css +106 -58
  133. package/styles/pivotview/tailwind-dark.scss +0 -1
  134. package/styles/pivotview/tailwind.css +107 -57
  135. package/styles/tailwind-dark.css +250 -145
  136. package/styles/tailwind.css +247 -140
@@ -63,41 +63,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
63
63
  }
64
64
  return clonedData;
65
65
  };
66
- PivotUtil.getClonedPivotValues = function (pivotValues) {
67
- var clonedSets = [];
68
- for (var i = 0; i < pivotValues.length; i++) {
69
- if (pivotValues[i]) {
70
- clonedSets[i] = [];
71
- for (var j = 0; j < pivotValues[i].length; j++) {
72
- if (pivotValues[i][j]) {
73
- /* eslint-disable */
74
- clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
75
- /* eslint-enable */
76
- }
77
- }
78
- }
79
- }
80
- return clonedSets;
81
- };
82
- /* eslint-disable */
83
- PivotUtil.getClonedPivotValueObj = function (data) {
84
- /* eslint-enable */
85
- var keyPos = 0;
86
- /* eslint-disable @typescript-eslint/no-explicit-any */
87
- var framedSet = {};
88
- /* eslint-enable @typescript-eslint/no-explicit-any */
89
- if (!(data === null || data === undefined)) {
90
- var fields = Object.keys(data);
91
- while (keyPos < fields.length) {
92
- framedSet[fields[keyPos]] = data[fields[keyPos]];
93
- keyPos++;
94
- }
95
- }
96
- else {
97
- framedSet = data;
98
- }
99
- return framedSet;
100
- };
101
66
  /* eslint-disable @typescript-eslint/no-explicit-any */
102
67
  PivotUtil.getDefinedObj = function (data) {
103
68
  var keyPos = 0;
@@ -130,18 +95,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
130
95
  return -1;
131
96
  };
132
97
  /* eslint-disable */
133
- PivotUtil.isContainCommonElements = function (collection1, collection2) {
134
- /* eslint-enable */
135
- for (var i = 0, cnt = collection1.length; i < cnt; i++) {
136
- for (var j = 0, lnt = collection2.length; j < lnt; j++) {
137
- if (collection2[j] === collection1[i]) {
138
- return true;
139
- }
140
- }
141
- }
142
- return false;
143
- };
144
- /* eslint-disable */
145
98
  PivotUtil.setPivotProperties = function (control, properties) {
146
99
  /* eslint-enable */
147
100
  control.allowServerDataBinding = false;
@@ -178,6 +131,7 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
178
131
  drilledMembers: this.cloneDrillMemberSettings(dataSourceSettings.drilledMembers),
179
132
  valueSortSettings: this.CloneValueSortObject(dataSourceSettings.valueSortSettings),
180
133
  valueAxis: dataSourceSettings.valueAxis,
134
+ grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
181
135
  formatSettings: this.cloneFormatSettings(dataSourceSettings.formatSettings),
182
136
  calculatedFieldSettings: this.cloneCalculatedFieldSettings(dataSourceSettings.calculatedFieldSettings),
183
137
  fieldMapping: this.cloneFieldSettings(dataSourceSettings.fieldMapping),
@@ -224,6 +178,7 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
224
178
  drilledMembers: dataSourceSettings.drilledMembers,
225
179
  valueSortSettings: dataSourceSettings.valueSortSettings,
226
180
  valueAxis: dataSourceSettings.valueAxis,
181
+ grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
227
182
  formatSettings: dataSourceSettings.formatSettings,
228
183
  calculatedFieldSettings: dataSourceSettings.calculatedFieldSettings,
229
184
  fieldMapping: dataSourceSettings.fieldMapping,
@@ -645,174 +600,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
645
600
  return values;
646
601
  };
647
602
  /* eslint-disable */
648
- PivotUtil.formatPdfHeaderFooter = function (pdf) {
649
- var contents = [];
650
- if (!isNullOrUndefined(pdf)) {
651
- for (var i = 0; i < pdf.length; i++) {
652
- var a = pdf[i];
653
- var content = {
654
- /* eslint-enable */
655
- type: a.Type,
656
- pageNumberType: a.PageNumberType,
657
- style: a.Style ? {
658
- penColor: a.Style.PenColor,
659
- penSize: a.Style.PenSize,
660
- dashStyle: a.Style.DashStyle,
661
- textBrushColor: a.Style.TextBrushColor,
662
- textPenColor: a.Style.TextPenColor,
663
- fontSize: a.Style.FontSize,
664
- hAlign: a.Style.HAlign,
665
- vAlign: a.Style.VAlign
666
- } : a.Style,
667
- points: a.Points !== null ? {
668
- x1: a.Points.X1,
669
- y1: a.Points.Y1,
670
- x2: a.Points.X2,
671
- y2: a.Points.Y2
672
- } : null,
673
- format: a.Format,
674
- position: a.Position !== null ? {
675
- x: a.Position.X,
676
- y: a.Position.Y
677
- } : null,
678
- size: a.Size !== null ? {
679
- height: a.Size.Height,
680
- width: a.Size.Width
681
- } : null,
682
- src: a.Src,
683
- value: a.Value,
684
- font: a.Font
685
- };
686
- contents.push(content);
687
- }
688
- }
689
- return contents;
690
- };
691
- /* eslint-disable */
692
- PivotUtil.formatPdfExportProperties = function (pdf) {
693
- var values;
694
- /* eslint-enable */
695
- values = this.getDefinedObj({
696
- pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
697
- pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
698
- header: !isNullOrUndefined(pdf.Header) ? {
699
- fromTop: pdf.Header.FromTop,
700
- height: pdf.Header.Height,
701
- contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
702
- } : null,
703
- columns: pdf.Columns,
704
- footer: !isNullOrUndefined(pdf.Footer) ? {
705
- fromTop: pdf.Footer.FromBottom,
706
- height: pdf.Footer.Height,
707
- contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
708
- } : null,
709
- includeHiddenColumn: pdf.IncludeHiddenColumn,
710
- dataSource: pdf.DataSource,
711
- exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
712
- theme: !isNullOrUndefined(pdf.Theme) ? {
713
- header: pdf.Theme.Header,
714
- record: pdf.Theme.Record,
715
- caption: pdf.Theme.Caption
716
- } : null,
717
- fileName: pdf.FileName,
718
- hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
719
- allowHorizontalOverflow: pdf.AllowHorizontalOverflow
720
- });
721
- return values;
722
- };
723
- /* eslint-disable */
724
- PivotUtil.formatExcelStyle = function (style) {
725
- var prop;
726
- /* eslint-enable */
727
- if (!isNullOrUndefined(style)) {
728
- prop = this.getDefinedObj({
729
- fontColor: style.FontColor,
730
- fontName: style.FontName,
731
- fontSize: style.FontSize,
732
- hAlign: style.HAlign === String ? style.HAlign : null,
733
- vAlign: style.VAlign === String ? style.VAlign : null,
734
- bold: style.Bold,
735
- indent: style.Indent,
736
- italic: style.Italic,
737
- underline: style.Underline,
738
- backColor: style.BackColor,
739
- wrapText: style.WrapText,
740
- borders: style.Borders,
741
- numberFormat: style.NumberFormat,
742
- type: style.Type
743
- });
744
- }
745
- return prop;
746
- };
747
- /* eslint-disable */
748
- PivotUtil.formatExcelCell = function (cell) {
749
- var cells = [];
750
- if (!isNullOrUndefined(cell)) {
751
- for (var i = 0; i < cell.length; i++) {
752
- this.getDefinedObj({
753
- index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
754
- colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
755
- value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
756
- hyperlink: {
757
- target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
758
- displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
759
- },
760
- styles: this.formatExcelStyle(cell[i].Style),
761
- rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
762
- });
763
- /* eslint-enable */
764
- }
765
- }
766
- return cells;
767
- };
768
- /* eslint-disable */
769
- PivotUtil.formatExcelHeaderFooter = function (excel) {
770
- var rows = [];
771
- if (!isNullOrUndefined(excel)) {
772
- for (var i = 0; i < excel.Rows.length; i++) {
773
- var row = excel.Rows[i];
774
- var prop = this.getDefinedObj({
775
- index: !isNullOrUndefined(row.Index) ? row.Index : null,
776
- cells: this.formatExcelCell(row.Cells),
777
- grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
778
- });
779
- rows.push(prop);
780
- }
781
- }
782
- return rows;
783
- };
784
- PivotUtil.formatExcelExportProperties = function (excel) {
785
- /* eslint-enable */
786
- var prop;
787
- prop = this.getDefinedObj({
788
- dataSource: excel.DataSource,
789
- query: excel.Query,
790
- multipleExport: this.getDefinedObj({
791
- type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
792
- blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
793
- }),
794
- header: this.getDefinedObj({
795
- headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
796
- rows: this.formatExcelHeaderFooter(excel.Header)
797
- }),
798
- footer: this.getDefinedObj({
799
- footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
800
- rows: this.formatExcelHeaderFooter(excel.Footer)
801
- }),
802
- columns: excel.Columns,
803
- exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
804
- includeHiddenColumn: excel.IncludeHiddenColumn,
805
- theme: !isNullOrUndefined(excel.Theme) ? {
806
- header: this.formatExcelStyle(excel.Theme.Header),
807
- record: this.formatExcelStyle(excel.Theme.Record),
808
- caption: this.formatExcelStyle(excel.Theme.Caption)
809
- } : undefined,
810
- fileName: excel.FileName,
811
- hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
812
- });
813
- return prop;
814
- };
815
- /* eslint-disable */
816
603
  PivotUtil.formatFieldList = function (fieldList) {
817
604
  var keys = Object.keys(fieldList);
818
605
  var fList = {};
@@ -1124,7 +911,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1124
911
  this.isLastHeaderHasMeasures = true;
1125
912
  this.isEditing = false;
1126
913
  var fields;
1127
- this.globalize = new Internationalization();
914
+ this.globalize = (customProperties && customProperties.globalize) ? customProperties.globalize : new Internationalization();
915
+ this.currencyCode = (customProperties && customProperties.currenyCode) ? customProperties.currenyCode : undefined;
1128
916
  this.localeObj = customProperties ? customProperties.localeObj : undefined;
1129
917
  this.fieldsType = customProperties ? customProperties.fieldsType : {};
1130
918
  this.clonedReport = customProperties ? (customProperties.clonedReport &&
@@ -1138,6 +926,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1138
926
  this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
1139
927
  this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
1140
928
  this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
929
+ this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
1141
930
  this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
1142
931
  this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
1143
932
  this.allowValueFilter = dataSource.allowValueFilter;
@@ -1251,6 +1040,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1251
1040
  this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
1252
1041
  this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
1253
1042
  this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
1043
+ this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
1254
1044
  this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
1255
1045
  this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
1256
1046
  this.allowValueFilter = dataSource.allowValueFilter;
@@ -1553,6 +1343,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1553
1343
  }
1554
1344
  if (!PivotUtil.getFieldByName(groupKeys[gCnt], dataFields)) {
1555
1345
  groupField = groupFields[groupKeys[gCnt]];
1346
+ caption_1 = (caption_1.indexOf(' (') !== -1 && caption_1.indexOf(')') !== -1) ? caption_1.slice(caption_1.indexOf('(') + 1, caption_1.length - 1) : caption_1;
1556
1347
  var newField = {
1557
1348
  name: groupKeys[gCnt],
1558
1349
  caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_1 + ')',
@@ -1580,6 +1371,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1580
1371
  }
1581
1372
  }
1582
1373
  gCnt = Object.keys(groupKeys).length;
1374
+ var field = this_1.getMappingField(fieldName, this_1.clonedReport ? this_1.clonedReport.fieldMapping : this_1.fieldMapping);
1375
+ var caption_2 = field.caption ? field.caption : fieldName;
1583
1376
  while (gCnt--) {
1584
1377
  groupField = groupFields[groupKeys[gCnt]];
1585
1378
  for (var i = 0, len_3 = this_1.formats.length; i < len_3; i++) {
@@ -1598,6 +1391,33 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1598
1391
  };
1599
1392
  this_1.formats.push(formatSettings);
1600
1393
  }
1394
+ if (!isDataSource) {
1395
+ var mappingField = this_1.getMappingField(groupKeys[gCnt], this_1.fieldMapping);
1396
+ if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
1397
+ var newField = {
1398
+ name: groupKeys[gCnt],
1399
+ caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
1400
+ };
1401
+ this_1.fieldMapping.push(newField);
1402
+ }
1403
+ else if (groupKeys[gCnt] !== fieldName) {
1404
+ mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
1405
+ }
1406
+ }
1407
+ }
1408
+ if (!isDataSource) {
1409
+ var mappingField = this_1.getMappingField(fieldName, this_1.fieldMapping);
1410
+ groupField = groupFields[fieldName];
1411
+ if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
1412
+ var newField = {
1413
+ name: fieldName,
1414
+ caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
1415
+ };
1416
+ this_1.fieldMapping.push(newField);
1417
+ }
1418
+ else {
1419
+ mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
1420
+ }
1601
1421
  }
1602
1422
  }
1603
1423
  else if (group.type === 'Number' && group.rangeInterval) {
@@ -1846,7 +1666,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1846
1666
  this.fieldList = this.savedFieldList;
1847
1667
  while (len--) { /** while is used for better performance than for */
1848
1668
  var key = keys[len];
1849
- var field = this.getMappingField(key);
1669
+ var field = this.getMappingField(key, this.fieldMapping);
1850
1670
  if (this.fieldList[key]) {
1851
1671
  this.fieldList[key].isSelected = false;
1852
1672
  this.fieldList[key].index = len;
@@ -1925,7 +1745,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1925
1745
  this.fieldList = {};
1926
1746
  while (len--) { /** while is used for better performance than for */
1927
1747
  var key = keys[len];
1928
- var field = this.getMappingField(key);
1748
+ var field = this.getMappingField(key, this.fieldMapping);
1929
1749
  type = (field && 'dataType' in field && field.dataType && dataTypes.indexOf(field.dataType.toLowerCase()) > -1) ?
1930
1750
  field.dataType.toLowerCase() : PivotUtil.getType(fields[this.fieldKeys[key]]);
1931
1751
  this.fieldList[key] = {
@@ -1969,12 +1789,12 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
1969
1789
  }
1970
1790
  this.updateTreeViewData(dataFields);
1971
1791
  };
1972
- PivotEngine.prototype.getMappingField = function (key) {
1792
+ PivotEngine.prototype.getMappingField = function (key, fieldMapping) {
1973
1793
  var field = {};
1974
- if (this.fieldMapping.length > 0) {
1975
- for (var index = 0, cnt = this.fieldMapping.length; index < cnt; index++) {
1976
- if (this.fieldMapping[index].name === key) {
1977
- field = this.fieldMapping[index];
1794
+ if (fieldMapping.length > 0) {
1795
+ for (var index = 0, cnt = fieldMapping.length; index < cnt; index++) {
1796
+ if (fieldMapping[index].name === key) {
1797
+ field = fieldMapping[index];
1978
1798
  break;
1979
1799
  }
1980
1800
  }
@@ -2548,8 +2368,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
2548
2368
  field.filter = filter;
2549
2369
  field.filterType = type;
2550
2370
  field.isExcelFilter = isLabelFilter;
2551
- var members = (this.formatFields[name] &&
2552
- (['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) ?
2371
+ var members = ((this.formatFields[name] &&
2372
+ (['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) || (name in this.groupingFields)) ?
2553
2373
  field.formattedMembers : field.members;
2554
2374
  var allowFil = isInclude;
2555
2375
  var final = {};
@@ -2596,7 +2416,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
2596
2416
  };
2597
2417
  PivotEngine.prototype.applyValueFiltering = function (rowData, level, rows, columns, valueFilter, rowFilterData, type) {
2598
2418
  this.isValueFiltered = false;
2599
- var allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : rows[rows.length - 1]), null, true);
2419
+ var allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : (!(this.grandTotalsPosition === 'Top') ? rows[rows.length - 1] : rows[0])), null, true);
2600
2420
  this.getFilteredData(rows, columns, valueFilter, rowFilterData, level, rowData.name, allMember, type);
2601
2421
  if (this.isValueFiltered) {
2602
2422
  if ((type === 'row' && this.rowGrandTotal === null) || (type === 'column' && this.columnGrandTotal === null)) {
@@ -2942,14 +2762,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
2942
2762
  for (var i = 0; i < rLen; i++) {
2943
2763
  if (filterElement.name === rows[i].name && valueFields[filterElement.measure] && !isAvail) {
2944
2764
  isAvail = true;
2945
- rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
2765
+ rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : (this.grandTotalsPosition === 'Top' && this.showGrandTotals) ? columnHeaders[0] : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
2946
2766
  break;
2947
2767
  }
2948
2768
  }
2949
2769
  for (var j = 0; j < cLen; j++) {
2950
2770
  if (filterElement.name === columns[j].name && valueFields[filterElement.measure] && !isAvail) {
2951
2771
  isAvail = true;
2952
- columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
2772
+ columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : (this.grandTotalsPosition === 'Top' && this.showGrandTotals) ? rowHeaders[0] : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
2953
2773
  break;
2954
2774
  }
2955
2775
  }
@@ -3260,7 +3080,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3260
3080
  }
3261
3081
  var engine = this;
3262
3082
  return headers.filter(function (item) {
3263
- return item.members.length > 0 ? item.members.length > 0 : engine.matchIndexes(item.indexObject, filterObjects);
3083
+ return (item.members.length > 0 || item.type === 'grand sum') ? true : engine.matchIndexes(item.indexObject, filterObjects);
3264
3084
  });
3265
3085
  };
3266
3086
  PivotEngine.prototype.matchIndexes = function (index, filterObjects) {
@@ -3485,8 +3305,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3485
3305
  }
3486
3306
  }
3487
3307
  if (stringValue.length > 0) {
3488
- stringValue = childrens.sort === 'Ascending' ? (stringValue.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
3489
- childrens.sort === 'Descending' ? (stringValue.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) : stringValue;
3308
+ stringValue = childrens.sort === 'Ascending' ? (stringValue.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0)); })) :
3309
+ childrens.sort === 'Descending' ? (stringValue.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0)); })) : stringValue;
3490
3310
  }
3491
3311
  if (alphaNumbervalue.length > 0) {
3492
3312
  alphaNumbervalue = childrens.sort === 'Ascending' ?
@@ -3499,9 +3319,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3499
3319
  }
3500
3320
  else {
3501
3321
  return sortOrder === 'Ascending' ?
3502
- (headers.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
3322
+ (headers.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0)); })) :
3503
3323
  sortOrder === 'Descending' ?
3504
- (headers.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) :
3324
+ (headers.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0)); })) :
3505
3325
  headers;
3506
3326
  }
3507
3327
  }
@@ -3521,7 +3341,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3521
3341
  this.valueSortHeaderText = undefined;
3522
3342
  if (this.enableValueSorting && this.valueSortSettings.headerText && !this.valueSortHeaderText &&
3523
3343
  this.valueSortSettings.headerText !== '' && this.values.length > 0) {
3524
- var textArray = this.valueSortSettings.headerText.split(this.valueSortSettings.headerDelimiter);
3344
+ this.valueSortHeaderText = this.valueSortSettings.headerText;
3345
+ var textArray = this.valueSortHeaderText.split(this.valueSortSettings.headerDelimiter);
3525
3346
  for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
3526
3347
  var field = _a[_i];
3527
3348
  var name_1 = field.caption ? field.caption : field.name;
@@ -4311,7 +4132,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4311
4132
  PivotEngine.prototype.insertAllMember = function (set, filter, customText, axis) {
4312
4133
  var len = set.length;
4313
4134
  customText = ' Total';
4314
- set[len] = {
4135
+ var grandTotalSet = {
4315
4136
  hasChild: false,
4316
4137
  index: filter,
4317
4138
  level: 0,
@@ -4325,13 +4146,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4325
4146
  type: 'grand sum',
4326
4147
  valueSort: {}
4327
4148
  };
4328
- set[len].valueSort[set[len].formattedText] = 1;
4329
- set[len].valueSort.levelName = set[len].formattedText;
4330
- set[len].valueSort[set[len].actualText] = 1;
4331
- set[len].valueSort.uniqueName = set[len].actualText;
4149
+ grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
4150
+ grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
4151
+ grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
4152
+ grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
4332
4153
  for (var ln = 0, lt = filter.length; ln < lt; ln++) {
4333
- set[len].indexObject[filter[ln]] = filter[ln];
4154
+ grandTotalSet.indexObject[filter[ln]] = filter[ln];
4334
4155
  }
4156
+ (this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
4335
4157
  // if (axis === 'row') {
4336
4158
  // this.rowCount += this.rowValuesLength;
4337
4159
  // } else {
@@ -4379,7 +4201,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4379
4201
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4380
4202
  if (!isValueIndexFound) {
4381
4203
  for (vln = 0; vln < vlt; vln++) {
4382
- if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
4204
+ if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4383
4205
  isValueIndexFound = true;
4384
4206
  isValueCellUpdated = true;
4385
4207
  break;
@@ -4414,7 +4236,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4414
4236
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4415
4237
  for (var vln = 0; vln < vlt; vln++) {
4416
4238
  if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
4417
- if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
4239
+ if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4418
4240
  this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
4419
4241
  dln = data[tnum].length;
4420
4242
  }
@@ -5371,6 +5193,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
5371
5193
  this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
5372
5194
  this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
5373
5195
  }
5196
+ else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
5197
+ this.updateValueMembers(false, null, null, columnHeaders, axis.slice(0, 1), vcnt, -1);
5198
+ this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(1, axis.length), vcnt, 0);
5199
+ }
5374
5200
  else {
5375
5201
  var hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
5376
5202
  this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
@@ -5411,6 +5237,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
5411
5237
  this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
5412
5238
  this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
5413
5239
  }
5240
+ else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
5241
+ this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(0, 1), this.values.length, -1);
5242
+ this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(1, this.rMembers.length), this.values.length, 0);
5243
+ }
5414
5244
  else {
5415
5245
  var hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
5416
5246
  this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
@@ -6016,6 +5846,12 @@ var fieldDragStart = 'fieldDragStart';
6016
5846
  var chartPointClick = 'chartPointClick';
6017
5847
  /** @hidden */
6018
5848
  var beforeServiceInvoke = 'beforeServiceInvoke';
5849
+ /** @hidden */
5850
+ var actionBegin = 'actionBegin';
5851
+ /** @hidden */
5852
+ var actionComplete = 'actionComplete';
5853
+ /** @hidden */
5854
+ var actionFailure = 'actionFailure';
6019
5855
  /**
6020
5856
  * Specifies pivot internal events
6021
5857
  */
@@ -6045,6 +5881,186 @@ var initToolbar = 'init-toolbar';
6045
5881
  var initFormatting = 'init-formatting';
6046
5882
  /** @hidden */
6047
5883
  var initGrouping = 'init-grouping';
5884
+ /**
5885
+ * Specifies action names of actionBegin events
5886
+ */
5887
+ /** @hidden */
5888
+ var sortValue = 'Sort value';
5889
+ /** @hidden */
5890
+ var drillUp = 'Drill up';
5891
+ /** @hidden */
5892
+ var drillDown = 'Drill down';
5893
+ /** @hidden */
5894
+ var addNewReport = 'Add new report';
5895
+ /** @hidden */
5896
+ var saveCurrentReport = 'Save current report';
5897
+ /** @hidden */
5898
+ var saveAsCurrentReport = 'Save as current report';
5899
+ /** @hidden */
5900
+ var renameCurrentReport = 'Rename current report';
5901
+ /** @hidden */
5902
+ var removeCurrentReport = 'Remove current report';
5903
+ /** @hidden */
5904
+ var loadReports = 'Load report';
5905
+ /** @hidden */
5906
+ var openConditionalFormatting = 'Open conditional formatting dialog';
5907
+ /** @hidden */
5908
+ var openNumberFormatting = 'Open number formatting dialog';
5909
+ /** @hidden */
5910
+ var MdxQuery = 'MdxQuery';
5911
+ /** @hidden */
5912
+ var showFieldList = 'Open field list';
5913
+ /** @hidden */
5914
+ var tableView = 'Show table view';
5915
+ /** @hidden */
5916
+ var chartView = 'Show chart view';
5917
+ /** @hidden */
5918
+ var multipleAxis = 'Multiple Axis';
5919
+ /** @hidden */
5920
+ var showLegend = 'Show legend';
5921
+ /** @hidden */
5922
+ var pdfExport = 'PDF export';
5923
+ /** @hidden */
5924
+ var pngExport = 'PNG export';
5925
+ /** @hidden */
5926
+ var excelExport = 'Excel export';
5927
+ /** @hidden */
5928
+ var csvExport = 'CSV export';
5929
+ /** @hidden */
5930
+ var jpegExport = 'JPEG export';
5931
+ /** @hidden */
5932
+ var svgExport = 'SVG export';
5933
+ /** @hidden */
5934
+ var hideSubTotals = 'Hide sub-totals';
5935
+ /** @hidden */
5936
+ var subTotalsRow = 'Show row sub-totals';
5937
+ /** @hidden */
5938
+ var subTotalsColumn = 'Show column sub-totals';
5939
+ /** @hidden */
5940
+ var showSubTotals = 'Show sub-totals';
5941
+ /** @hidden */
5942
+ var hideGrandTotals = 'Hide grand totals';
5943
+ /** @hidden */
5944
+ var grandTotalsRow = 'Show row grand totals';
5945
+ /** @hidden */
5946
+ var grandTotalsColumn = 'Show column grand totals';
5947
+ /** @hidden */
5948
+ var showGrandTotals = 'Show grand totals';
5949
+ /** @hidden */
5950
+ var numberFormattingMenu = 'Number Formatting menu';
5951
+ /** @hidden */
5952
+ var conditionalFormattingMenu = 'Conditional Formatting menu';
5953
+ /** @hidden */
5954
+ var reportChange = 'Report change';
5955
+ /** @hidden */
5956
+ var sortFieldTree = 'Sort field tree';
5957
+ /** @hidden */
5958
+ var editCalculatedField = 'Edit calculated field';
5959
+ /** @hidden */
5960
+ var sortField = 'Sort field';
5961
+ /** @hidden */
5962
+ var filterField = 'Filter field';
5963
+ /** @hidden */
5964
+ var removeField = 'Remove field';
5965
+ /** @hidden */
5966
+ var openCalculatedField = 'Open calculated field dialog';
5967
+ /** @hidden */
5968
+ var editRecord = 'Edit record';
5969
+ /** @hidden */
5970
+ var saveEditedRecords = 'Save edited records';
5971
+ /** @hidden */
5972
+ var addNewRecord = 'Add new record';
5973
+ /** @hidden */
5974
+ var removeRecord = 'Remove record';
5975
+ /** @hidden */
5976
+ var aggregateField = 'Aggregate field';
5977
+ /** @hidden */
5978
+ var contextMenuCalculatedField = 'CalculatedField Context menu';
5979
+ /** @hidden */
5980
+ var windowResize = 'Window resize';
5981
+ /**
5982
+ * Specifies action names of actionComplete events
5983
+ */
5984
+ /** @hidden */
5985
+ var calculatedFieldApplied = 'Calculated field applied';
5986
+ /** @hidden */
5987
+ var editedRecordsSaved = 'Edited records saved';
5988
+ /** @hidden */
5989
+ var newRecordAdded = 'New record added';
5990
+ /** @hidden */
5991
+ var recordRemoved = 'Record removed';
5992
+ /** @hidden */
5993
+ var closeFieldlist = 'Field list closed';
5994
+ /** @hidden */
5995
+ var fieldTreeSorted = 'Field tree sorted';
5996
+ /** @hidden */
5997
+ var reportSaved = 'Report saved';
5998
+ /** @hidden */
5999
+ var newReportAdded = 'New report added';
6000
+ /** @hidden */
6001
+ var reportReSaved = 'Report re-saved';
6002
+ /** @hidden */
6003
+ var reportRenamed = 'Report renamed';
6004
+ /** @hidden */
6005
+ var reportRemoved = 'Report removed';
6006
+ /** @hidden */
6007
+ var excelExported = 'Excel exported';
6008
+ /** @hidden */
6009
+ var csvExported = 'CSV exported';
6010
+ /** @hidden */
6011
+ var pdfExported = 'PDF exported';
6012
+ /** @hidden */
6013
+ var pngExported = 'PNG exported';
6014
+ /** @hidden */
6015
+ var jpegExported = 'JPEG exported';
6016
+ /** @hidden */
6017
+ var svgExported = 'SVG exported';
6018
+ /** @hidden */
6019
+ var conditionallyFormatted = 'Conditional formatting applied';
6020
+ /** @hidden */
6021
+ var numberFormatted = 'Number formatting applied';
6022
+ /** @hidden */
6023
+ var tableViewed = 'Table view shown';
6024
+ /** @hidden */
6025
+ var chartViewed = 'Chart view shown';
6026
+ /** @hidden */
6027
+ var subTotalsHidden = 'Sub-totals hidden';
6028
+ /** @hidden */
6029
+ var subTotalsRowShown = 'Row sub-totals shown';
6030
+ /** @hidden */
6031
+ var subTotalsColumnShown = 'Column sub-totals shown';
6032
+ /** @hidden */
6033
+ var subTotalsShown = 'Sub-totals shown';
6034
+ /** @hidden */
6035
+ var grandTotalsHidden = 'Grand totals hidden';
6036
+ /** @hidden */
6037
+ var grandTotalsRowShown = 'Row grand totals shown';
6038
+ /** @hidden */
6039
+ var grandTotalsColumnShown = 'Column grand totals shown';
6040
+ /** @hidden */
6041
+ var grandTotalsShown = 'Grand totals shown';
6042
+ /** @hidden */
6043
+ var valueSorted = 'Value sorted';
6044
+ /** @hidden */
6045
+ var calculatedFieldEdited = 'Calculated field edited';
6046
+ /** @hidden */
6047
+ var fieldSorted = 'Field sorted';
6048
+ /** @hidden */
6049
+ var fieldFiltered = 'Field filtered';
6050
+ /** @hidden */
6051
+ var fieldRemoved = 'Field removed';
6052
+ /** @hidden */
6053
+ var fieldAggregated = 'Field aggregated';
6054
+ /** @hidden */
6055
+ var recordEdited = 'Record edited';
6056
+ /** @hidden */
6057
+ var reportChanged = 'Report changed';
6058
+ /** @hidden */
6059
+ var windowResized = 'Window resized';
6060
+ /** @hidden */
6061
+ var recordUpdated = 'Records updated';
6062
+ /** @hidden */
6063
+ var drillThroughClosed = 'Drill-through closed';
6048
6064
 
6049
6065
  /**
6050
6066
  * CSS Constants
@@ -6718,6 +6734,8 @@ var PIVOTCHART_TYPE_DIALOG = 'e-pivotchart-type-dialog';
6718
6734
  var FORMAT_FONT_COLOR_PICKER = 'e-format-font-color-picker';
6719
6735
  /** @hidden */
6720
6736
  var GROUP_PIVOT_ROW = 'e-group-pivot-rows';
6737
+ /** @hidden */
6738
+ var TOOLBAR_MENU = 'e-pivot-toolbar-menu';
6721
6739
 
6722
6740
  /**
6723
6741
  * `AggregateMenu` module to create aggregate type popup.
@@ -6747,28 +6765,39 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
6747
6765
  AggregateMenu.prototype.openContextMenu = function (args) {
6748
6766
  var _this = this;
6749
6767
  var fieldName = args.target.parentElement.id;
6768
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
6750
6769
  this.buttonElement = args.target.parentElement;
6751
6770
  var isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
6752
6771
  this.summaryTypes = this.getMenuItem(isStringField).slice();
6772
+ this.parent.actionObj.actionName = aggregateField;
6773
+ this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
6774
+ if (this.parent.actionBeginMethod()) {
6775
+ return;
6776
+ }
6753
6777
  var eventArgs = {
6754
6778
  cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
6755
6779
  };
6756
6780
  var control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
6757
6781
  this.parent.pivotGridModule : this.parent;
6758
- control.trigger(aggregateMenuOpen, eventArgs, function (observedArgs) {
6759
- if (!observedArgs.cancel) {
6760
- _this.summaryTypes = observedArgs.aggregateTypes;
6761
- _this.createContextMenu(isStringField, observedArgs.displayMenuCount);
6762
- _this.currentMenu = args.target;
6763
- var pos = _this.currentMenu.getBoundingClientRect();
6764
- if (_this.parent.enableRtl) {
6765
- _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
6766
- }
6767
- else {
6768
- _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
6782
+ try {
6783
+ control.trigger(aggregateMenuOpen, eventArgs, function (observedArgs) {
6784
+ if (!observedArgs.cancel) {
6785
+ _this.summaryTypes = observedArgs.aggregateTypes;
6786
+ _this.createContextMenu(isStringField, observedArgs.displayMenuCount);
6787
+ _this.currentMenu = args.target;
6788
+ var pos = _this.currentMenu.getBoundingClientRect();
6789
+ if (_this.parent.enableRtl) {
6790
+ _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
6791
+ }
6792
+ else {
6793
+ _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
6794
+ }
6769
6795
  }
6770
- }
6771
- });
6796
+ });
6797
+ }
6798
+ catch (execption) {
6799
+ this.parent.actionFailureMethod(execption);
6800
+ }
6772
6801
  };
6773
6802
  AggregateMenu.prototype.createContextMenu = function (isStringField, displayMenuCount) {
6774
6803
  var _this = this;
@@ -7045,31 +7074,42 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
7045
7074
  AggregateMenu.prototype.selectOptionInContextMenu = function (menu) {
7046
7075
  if (menu.item.text !== null) {
7047
7076
  var buttonElement = this.currentMenu.parentElement;
7048
- var type = menu.item.id.split('_').pop();
7049
- if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
7050
- || type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
7051
- this.createValueSettingsDialog(buttonElement, this.parentElement, type);
7077
+ var fieldInfo = PivotUtil.getFieldInfo((buttonElement ? buttonElement.id : ''), this.parent);
7078
+ this.parent.actionObj.actionName = aggregateField;
7079
+ this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
7080
+ if (this.parent.actionBeginMethod()) {
7081
+ return;
7052
7082
  }
7053
- else {
7054
- var field = buttonElement.getAttribute('data-uid');
7055
- var valuefields = this.parent.dataSourceSettings.values;
7056
- var contentElement = buttonElement.querySelector('.e-content');
7057
- var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
7058
- this.parent.engineModule.fieldList[field].caption;
7059
- contentElement.innerHTML = captionName;
7060
- contentElement.setAttribute('title', captionName);
7061
- buttonElement.setAttribute('data-type', type);
7062
- for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
7063
- if (this.parent.dataSourceSettings.values[vCnt].name === field) {
7064
- var dataSourceItem = extend({}, valuefields[vCnt].properties ?
7065
- valuefields[vCnt].properties : valuefields[vCnt], null, true);
7066
- dataSourceItem.type = type;
7067
- this.parent.engineModule.fieldList[field].aggregateType = type;
7068
- valuefields.splice(vCnt, 1, dataSourceItem);
7069
- this.parent.lastAggregationInfo = dataSourceItem;
7083
+ var type = menu.item.id.split('_').pop();
7084
+ try {
7085
+ if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
7086
+ || type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
7087
+ this.createValueSettingsDialog(buttonElement, this.parentElement, type);
7088
+ }
7089
+ else {
7090
+ var field = buttonElement.getAttribute('data-uid');
7091
+ var valuefields = this.parent.dataSourceSettings.values;
7092
+ var contentElement = buttonElement.querySelector('.e-content');
7093
+ var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
7094
+ this.parent.engineModule.fieldList[field].caption;
7095
+ contentElement.innerHTML = captionName;
7096
+ contentElement.setAttribute('title', captionName);
7097
+ buttonElement.setAttribute('data-type', type);
7098
+ for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
7099
+ if (this.parent.dataSourceSettings.values[vCnt].name === field) {
7100
+ var dataSourceItem = extend({}, valuefields[vCnt].properties ?
7101
+ valuefields[vCnt].properties : valuefields[vCnt], null, true);
7102
+ dataSourceItem.type = type;
7103
+ this.parent.engineModule.fieldList[field].aggregateType = type;
7104
+ valuefields.splice(vCnt, 1, dataSourceItem);
7105
+ this.parent.lastAggregationInfo = dataSourceItem;
7106
+ }
7070
7107
  }
7108
+ this.updateDataSource();
7071
7109
  }
7072
- this.updateDataSource();
7110
+ }
7111
+ catch (execption) {
7112
+ this.parent.actionFailureMethod(execption);
7073
7113
  }
7074
7114
  }
7075
7115
  };
@@ -7186,13 +7226,16 @@ var Render = /** @__PURE__ @class */ (function () {
7186
7226
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
7187
7227
  (this.parent.isAdaptive ? 140 : 200);
7188
7228
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
7189
- this.gridSettings = parent.gridSettings;
7229
+ this.gridSettings = this.parent.gridSettings;
7190
7230
  this.formatList = this.getFormatList();
7191
7231
  this.aggMenu = new AggregateMenu(this.parent);
7192
7232
  }
7193
7233
  /* eslint-disable-next-line */
7194
7234
  /** @hidden */
7195
- Render.prototype.render = function () {
7235
+ Render.prototype.render = function (refreshRequired) {
7236
+ if (refreshRequired) {
7237
+ this.initProperties();
7238
+ }
7196
7239
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
7197
7240
  (this.parent.isAdaptive ? 140 : 200);
7198
7241
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
@@ -7256,6 +7299,30 @@ var Render = /** @__PURE__ @class */ (function () {
7256
7299
  }
7257
7300
  this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
7258
7301
  };
7302
+ Render.prototype.initProperties = function () {
7303
+ this.rowStartPos = undefined;
7304
+ this.maxIndent = undefined;
7305
+ this.resColWidth = undefined;
7306
+ this.isOverflows = undefined;
7307
+ this.indentCollection = {};
7308
+ this.formatList = undefined;
7309
+ this.colPos = 0;
7310
+ this.colGrandPos = undefined;
7311
+ this.rowGrandPos = undefined;
7312
+ this.lastSpan = 0;
7313
+ this.field = undefined;
7314
+ this.fieldCaption = undefined;
7315
+ this.lvlCollection = {};
7316
+ this.hierarchyCollection = {};
7317
+ this.lvlPosCollection = {};
7318
+ this.hierarchyPosCollection = {};
7319
+ this.position = 0;
7320
+ this.measurePos = 0;
7321
+ this.maxMeasurePos = 0;
7322
+ this.hierarchyCount = 0;
7323
+ this.actualText = '';
7324
+ this.timeOutObj = undefined;
7325
+ };
7259
7326
  Render.prototype.refreshHeader = function () {
7260
7327
  if (this.parent.enableVirtualization) {
7261
7328
  var mHdr = this.parent.element.querySelector('.' + MOVABLEHEADER_DIV);
@@ -7457,9 +7524,9 @@ var Render = /** @__PURE__ @class */ (function () {
7457
7524
  this.parent.renderReactTemplates(); /* eslint-disable-line */
7458
7525
  }
7459
7526
  if (this.parent.isInitial) {
7527
+ this.parent.isInitial = false;
7460
7528
  this.parent.refreshData();
7461
7529
  }
7462
- this.parent.isInitial = false;
7463
7530
  this.parent.notify(contentReady, {});
7464
7531
  };
7465
7532
  Render.prototype.setFocusOnLastCell = function () {
@@ -8275,7 +8342,7 @@ var Render = /** @__PURE__ @class */ (function () {
8275
8342
  if (cell.isSum) {
8276
8343
  tCell.classList.add(SUMMARY);
8277
8344
  }
8278
- var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && this.parent.dataSourceSettings.valueAxis === 'column' && this.parent.dataType === 'olap' &&
8345
+ var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
8279
8346
  ((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
8280
8347
  if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
8281
8348
  tCell.classList.add('e-gtot');
@@ -8416,6 +8483,12 @@ var Render = /** @__PURE__ @class */ (function () {
8416
8483
  }
8417
8484
  lvlPos++;
8418
8485
  }
8486
+ if (this.parent.dataSourceSettings.grandTotalsPosition === 'Top' && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'row') && this.parent.dataType === 'olap' &&
8487
+ (cell.valueSort.levelName.toString()).indexOf(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) === 0) {
8488
+ tCell.appendChild(createElement('span', {
8489
+ className: NEXTSPAN,
8490
+ }));
8491
+ }
8419
8492
  if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
8420
8493
  tCell.appendChild(createElement('span', {
8421
8494
  className: NEXTSPAN,
@@ -8728,8 +8801,8 @@ var Render = /** @__PURE__ @class */ (function () {
8728
8801
  if (this.parent.currentView !== 'Chart') {
8729
8802
  if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
8730
8803
  var rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
8731
- var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GROUPING_BAR_CLASS) ?
8732
- this.parent.element.querySelector('.' + GROUPING_BAR_CLASS).offsetHeight : 0);
8804
+ var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS) ?
8805
+ this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS).offsetHeight : 0);
8733
8806
  var toolBarHeight = this.parent.element.querySelector('.' + GRID_TOOLBAR) ? 42 : 0;
8734
8807
  gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
8735
8808
  gridHeight = gridHeight < 40 ? 40 : gridHeight;
@@ -10464,7 +10537,6 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
10464
10537
  if (_this.allowExcelLikeFilter) {
10465
10538
  _this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
10466
10539
  }
10467
- _this.parent.control.pivotButtonModule.memberTreeView = _this.parent.filterDialog.memberTreeView;
10468
10540
  _this.memberTreeView.nodeChecked =
10469
10541
  _this.parent.control.pivotButtonModule.nodeStateModified.bind(_this.parent.control.pivotButtonModule);
10470
10542
  _this.allMemberSelect.nodeChecked =
@@ -11480,6 +11552,15 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
11480
11552
  if (this.dropMenu && !this.dropMenu.isDestroyed) {
11481
11553
  this.dropMenu.destroy();
11482
11554
  }
11555
+ if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
11556
+ this.memberTreeView.destroy();
11557
+ }
11558
+ if (this.allMemberSelect && !this.allMemberSelect.isDestroyed) {
11559
+ this.allMemberSelect.destroy();
11560
+ }
11561
+ if (this.editorSearch && !this.editorSearch.isDestroyed) {
11562
+ this.editorSearch.destroy();
11563
+ }
11483
11564
  if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
11484
11565
  remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
11485
11566
  }
@@ -11488,11 +11569,24 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
11488
11569
  FilterDialog.prototype.removeFilterDialog = function () {
11489
11570
  if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
11490
11571
  this.dialogPopUp.destroy();
11572
+ setTimeout(this.setFocus.bind(this));
11491
11573
  }
11492
11574
  if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
11493
11575
  remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
11494
11576
  }
11495
11577
  };
11578
+ FilterDialog.prototype.setFocus = function () {
11579
+ if (this.parent.control.pivotButtonModule.parentElement) {
11580
+ var pivotButtons = [].slice.call(this.parent.control.pivotButtonModule.parentElement.querySelectorAll('.e-pivot-button'));
11581
+ for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
11582
+ var item = pivotButtons_1[_i];
11583
+ if (item.getAttribute('data-uid') === this.parent.control.pivotButtonModule.fieldName) {
11584
+ item.focus();
11585
+ break;
11586
+ }
11587
+ }
11588
+ }
11589
+ };
11496
11590
  return FilterDialog;
11497
11591
  }());
11498
11592
 
@@ -12209,6 +12303,9 @@ var DataSourceSettings = /** @__PURE__ @class */ (function (_super) {
12209
12303
  __decorate$1([
12210
12304
  Property(true)
12211
12305
  ], DataSourceSettings.prototype, "showGrandTotals", void 0);
12306
+ __decorate$1([
12307
+ Property('Bottom')
12308
+ ], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
12212
12309
  __decorate$1([
12213
12310
  Property(true)
12214
12311
  ], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
@@ -13466,142 +13563,159 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13466
13563
  this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
13467
13564
  }
13468
13565
  var actualText = eventArgs.currentCell.actualText.toString();
13469
- if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
13470
- this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
13471
- this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
13472
- this.editCell(eventArgs);
13473
- }
13474
- else {
13475
- this.removeDrillThroughDialog();
13476
- var drillThroughDialog = createElement('div', {
13477
- id: this.parent.element.id + '_drillthrough',
13478
- className: DRILLTHROUGH_DIALOG
13479
- });
13480
- this.parent.element.appendChild(drillThroughDialog);
13481
- this.dialogPopUp = new Dialog({
13482
- animationSettings: { effect: 'Fade' },
13483
- allowDragging: false,
13484
- header: this.parent.localeObj.getConstant('details'),
13485
- content: this.createDrillThroughGrid(eventArgs),
13486
- beforeOpen: function () {
13487
- _this.drillThroughGrid.setProperties({
13488
- dataSource: _this.parent.editSettings.allowEditing ?
13489
- _this.dataWithPrimarykey(eventArgs) : _this.gridData,
13490
- height: !_this.parent.editSettings.allowEditing ? 300 : 220
13491
- }, false);
13492
- },
13493
- beforeClose: function () {
13494
- if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
13495
- if (_this.parent.dataSourceSettings.type === 'CSV') {
13496
- _this.updateData(_this.drillThroughGrid.dataSource);
13497
- }
13498
- var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
13499
- var previousPosition = [];
13500
- for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
13501
- var value = gridIndexObjectsValue_1[_i];
13502
- previousPosition.push(_this.gridIndexObjects[value]);
13503
- }
13504
- var count = Object.keys(_this.gridIndexObjects).length;
13505
- var addItems = [];
13506
- var prevItems = [];
13507
- var index = 0;
13508
- /* eslint-disable @typescript-eslint/dot-notation */
13509
- for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
13510
- var item = _b[_a];
13511
- if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
13512
- for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
13513
- var field = _d[_c];
13514
- if (isNullOrUndefined(item[field])) {
13515
- delete item[field];
13516
- }
13517
- }
13518
- delete item['__index'];
13519
- addItems.push(item);
13566
+ try {
13567
+ if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
13568
+ this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
13569
+ this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
13570
+ this.parent.actionObj.actionName = editRecord;
13571
+ if (this.parent.actionBeginMethod()) {
13572
+ return;
13573
+ }
13574
+ this.editCell(eventArgs);
13575
+ }
13576
+ else {
13577
+ this.removeDrillThroughDialog();
13578
+ var drillThroughDialog = createElement('div', {
13579
+ id: this.parent.element.id + '_drillthrough',
13580
+ className: DRILLTHROUGH_DIALOG
13581
+ });
13582
+ this.parent.element.appendChild(drillThroughDialog);
13583
+ this.dialogPopUp = new Dialog({
13584
+ animationSettings: { effect: 'Fade' },
13585
+ allowDragging: false,
13586
+ header: this.parent.localeObj.getConstant('details'),
13587
+ content: this.createDrillThroughGrid(eventArgs),
13588
+ beforeOpen: function () {
13589
+ _this.drillThroughGrid.setProperties({
13590
+ dataSource: _this.parent.editSettings.allowEditing ?
13591
+ _this.dataWithPrimarykey(eventArgs) : _this.gridData,
13592
+ height: !_this.parent.editSettings.allowEditing ? 300 : 220
13593
+ }, false);
13594
+ },
13595
+ beforeClose: function () {
13596
+ if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
13597
+ if (_this.parent.dataSourceSettings.type === 'CSV') {
13598
+ _this.updateData(_this.drillThroughGrid.dataSource);
13520
13599
  }
13521
- else if (count > 0) {
13522
- delete _this.gridIndexObjects[item['__index'].toString()];
13523
- prevItems.push(item);
13524
- count--;
13600
+ var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
13601
+ var previousPosition = [];
13602
+ for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
13603
+ var value = gridIndexObjectsValue_1[_i];
13604
+ previousPosition.push(_this.gridIndexObjects[value]);
13525
13605
  }
13526
- if (_this.parent.dataSourceSettings.mode === 'Server') {
13527
- if (item['__index']) {
13606
+ var count = Object.keys(_this.gridIndexObjects).length;
13607
+ var addItems = [];
13608
+ var prevItems = [];
13609
+ var index = 0;
13610
+ /* eslint-disable @typescript-eslint/dot-notation */
13611
+ for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
13612
+ var item = _b[_a];
13613
+ if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
13614
+ for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
13615
+ var field = _d[_c];
13616
+ if (isNullOrUndefined(item[field])) {
13617
+ delete item[field];
13618
+ }
13619
+ }
13528
13620
  delete item['__index'];
13621
+ addItems.push(item);
13529
13622
  }
13530
- if (_this.gridData[index]['__index']) {
13531
- delete _this.gridData[index]['__index'];
13623
+ else if (count > 0) {
13624
+ delete _this.gridIndexObjects[item['__index'].toString()];
13625
+ prevItems.push(item);
13626
+ count--;
13532
13627
  }
13628
+ if (_this.parent.dataSourceSettings.mode === 'Server') {
13629
+ if (item['__index']) {
13630
+ delete item['__index'];
13631
+ }
13632
+ if (_this.gridData[index]['__index']) {
13633
+ delete _this.gridData[index]['__index'];
13634
+ }
13635
+ }
13636
+ index++;
13533
13637
  }
13534
- index++;
13535
- }
13536
- count = 0;
13537
- if (_this.parent.dataSourceSettings.mode === 'Server') {
13538
- var gridIndex = []; /* eslint-disable-line */
13539
- var keys = Object.keys(_this.gridIndexObjects);
13540
- for (var len = 0; len < keys.length; len++) {
13541
- delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
13542
- gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
13543
- }
13544
- var indexObject = []; /* eslint-disable-line */
13545
- keys = Object.keys(_this.parent.drillThroughValue.indexObject);
13546
- for (var len = 0; len < keys.length; len++) {
13547
- indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
13638
+ count = 0;
13639
+ if (_this.parent.dataSourceSettings.mode === 'Server') {
13640
+ var gridIndex = []; /* eslint-disable-line */
13641
+ var keys = Object.keys(_this.gridIndexObjects);
13642
+ for (var len = 0; len < keys.length; len++) {
13643
+ delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
13644
+ gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
13645
+ }
13646
+ var indexObject = []; /* eslint-disable-line */
13647
+ keys = Object.keys(_this.parent.drillThroughValue.indexObject);
13648
+ for (var len = 0; len < keys.length; len++) {
13649
+ indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
13650
+ }
13651
+ _this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
13548
13652
  }
13549
- _this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
13550
- }
13551
- else {
13552
- var items = [];
13553
- var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
13554
- _this.parent.engineModule.actualData : _this.parent.engineModule.data;
13555
- for (var _e = 0, _f = data; _e < _f.length; _e++) {
13556
- var item = _f[_e];
13557
- delete item['__index'];
13558
- if (_this.gridIndexObjects[count.toString()] === undefined) {
13559
- items.push(item);
13653
+ else {
13654
+ var items = [];
13655
+ var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
13656
+ _this.parent.engineModule.actualData : _this.parent.engineModule.data;
13657
+ for (var _e = 0, _f = data; _e < _f.length; _e++) {
13658
+ var item = _f[_e];
13659
+ delete item['__index'];
13660
+ if (_this.gridIndexObjects[count.toString()] === undefined) {
13661
+ items.push(item);
13662
+ }
13663
+ count++;
13664
+ }
13665
+ /* eslint-enable @typescript-eslint/dot-notation */
13666
+ items = items.concat(addItems);
13667
+ var eventArgs_1 = {
13668
+ currentData: _this.drillThroughGrid.dataSource,
13669
+ previousData: _this.clonedData,
13670
+ previousPosition: previousPosition,
13671
+ cancel: false
13672
+ };
13673
+ _this.parent.trigger(editCompleted, eventArgs_1);
13674
+ if (!eventArgs_1.cancel) {
13675
+ _this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
13676
+ _this.engine.updateGridData(_this.parent.dataSourceSettings);
13677
+ _this.parent.pivotValues = _this.engine.pivotValues;
13560
13678
  }
13561
- count++;
13562
13679
  }
13563
- /* eslint-enable @typescript-eslint/dot-notation */
13564
- items = items.concat(addItems);
13565
- var eventArgs_1 = {
13566
- currentData: _this.drillThroughGrid.dataSource,
13567
- previousData: _this.clonedData,
13568
- previousPosition: previousPosition,
13569
- cancel: false
13680
+ _this.parent.actionObj.actionName = recordUpdated;
13681
+ var actionInfo = {
13682
+ editInfo: {
13683
+ type: _this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: _this.drillThroughGrid.dataSource,
13684
+ previousData: _this.clonedData, previousPosition: previousPosition
13685
+ }
13570
13686
  };
13571
- _this.parent.trigger(editCompleted, eventArgs_1);
13572
- if (!eventArgs_1.cancel) {
13573
- _this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
13574
- _this.engine.updateGridData(_this.parent.dataSourceSettings);
13575
- _this.parent.pivotValues = _this.engine.pivotValues;
13576
- }
13687
+ _this.parent.actionObj.actionInfo = actionInfo;
13577
13688
  }
13578
- }
13579
- _this.isUpdated = false;
13580
- _this.gridIndexObjects = {};
13581
- },
13582
- isModal: true,
13583
- visible: true,
13584
- showCloseIcon: true,
13585
- locale: this.parent.locale,
13586
- enableRtl: this.parent.enableRtl,
13587
- width: this.parent.isAdaptive ? '100%' : '60%',
13588
- position: { X: 'center', Y: 'center' },
13589
- closeOnEscape: !this.parent.editSettings.allowEditing,
13590
- target: document.body,
13591
- close: this.removeDrillThroughDialog.bind(this)
13592
- });
13593
- this.dialogPopUp.isStringTemplate = true;
13594
- this.dialogPopUp.appendTo(drillThroughDialog);
13595
- // this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
13596
- setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
13597
- if (this.parent.editSettings.allowEditing) {
13598
- this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
13599
- keyAction: this.drillthroughKeyActionHandler.bind(this),
13600
- keyConfigs: this.drillKeyConfigs,
13601
- eventName: 'keydown'
13689
+ _this.isUpdated = false;
13690
+ _this.gridIndexObjects = {};
13691
+ },
13692
+ isModal: true,
13693
+ visible: true,
13694
+ showCloseIcon: true,
13695
+ locale: this.parent.locale,
13696
+ enableRtl: this.parent.enableRtl,
13697
+ width: this.parent.isAdaptive ? '100%' : '60%',
13698
+ position: { X: 'center', Y: 'center' },
13699
+ closeOnEscape: !this.parent.editSettings.allowEditing,
13700
+ target: document.body,
13701
+ close: this.removeDrillThroughDialog.bind(this)
13602
13702
  });
13703
+ this.dialogPopUp.isStringTemplate = true;
13704
+ this.dialogPopUp.appendTo(drillThroughDialog);
13705
+ // this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
13706
+ setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
13707
+ if (this.parent.editSettings.allowEditing) {
13708
+ this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
13709
+ keyAction: this.drillthroughKeyActionHandler.bind(this),
13710
+ keyConfigs: this.drillKeyConfigs,
13711
+ eventName: 'keydown'
13712
+ });
13713
+ }
13603
13714
  }
13604
13715
  }
13716
+ catch (execption) {
13717
+ this.parent.actionFailureMethod(execption);
13718
+ }
13605
13719
  };
13606
13720
  DrillThroughDialog.prototype.editCell = function (eventArgs) {
13607
13721
  var _this = this;
@@ -13617,6 +13731,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13617
13731
  if (eventArgs.currentCell.actualText in previousData) {
13618
13732
  currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
13619
13733
  }
13734
+ var actionInfo = {
13735
+ editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
13736
+ };
13737
+ this.parent.actionObj.actionInfo = actionInfo;
13620
13738
  this.numericTextBox = new NumericTextBox({
13621
13739
  value: cellValue,
13622
13740
  enableRtl: this.parent.enableRtl,
@@ -13681,6 +13799,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13681
13799
  };
13682
13800
  DrillThroughDialog.prototype.removeDrillThroughDialog = function () {
13683
13801
  if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
13802
+ this.parent.actionObj.actionName = drillThroughClosed;
13803
+ if (this.parent.actionObj.actionName) {
13804
+ this.parent.actionCompleteMethod();
13805
+ }
13684
13806
  this.dialogPopUp.destroy();
13685
13807
  }
13686
13808
  var dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
@@ -13693,6 +13815,7 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13693
13815
  };
13694
13816
  /* eslint-disable */
13695
13817
  DrillThroughDialog.prototype.createDrillThroughGrid = function (eventArgs) {
13818
+ var _this = this;
13696
13819
  var drillThroughBody = createElement('div', { id: this.parent.element.id + '_drillthroughbody', className: DRILLTHROUGH_BODY_CLASS });
13697
13820
  var drillThroughBodyHeader = createElement('div', {
13698
13821
  id: this.parent.element.id +
@@ -13770,31 +13893,53 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13770
13893
  }
13771
13894
  if (this.parent.editSettings.allowEditing) {
13772
13895
  Grid.Inject(Edit, Page);
13773
- this.drillThroughGrid.editSettings = this.parent.editSettings;
13774
- if (this.parent.editSettings.allowCommandColumns) {
13775
- this.drillThroughGrid.editSettings.mode = 'Normal';
13776
- this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
13777
- Grid.Inject(CommandColumn);
13896
+ try {
13897
+ this.drillThroughGrid.editSettings = this.parent.editSettings;
13898
+ this.drillThroughGrid.actionBegin = function (args) {
13899
+ var actionName = (args.requestType == 'save') ? saveEditedRecords : (args.requestType == 'add') ? addNewRecord : (args.requestType == 'delete') ? removeRecord : '';
13900
+ _this.parent.actionObj.actionName = actionName;
13901
+ if (_this.parent.actionObj.actionName) {
13902
+ if (_this.parent.actionBeginMethod()) {
13903
+ return;
13904
+ }
13905
+ }
13906
+ };
13907
+ if (this.parent.editSettings.allowCommandColumns) {
13908
+ this.drillThroughGrid.editSettings.mode = 'Normal';
13909
+ this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
13910
+ Grid.Inject(CommandColumn);
13911
+ this.drillThroughGrid.columns.push({
13912
+ headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
13913
+ commands: [
13914
+ { type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
13915
+ { type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
13916
+ { type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
13917
+ { type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
13918
+ ]
13919
+ });
13920
+ }
13921
+ else {
13922
+ this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
13923
+ }
13778
13924
  this.drillThroughGrid.columns.push({
13779
- headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
13780
- commands: [
13781
- { type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
13782
- { type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
13783
- { type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
13784
- { type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
13785
- ]
13925
+ field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
13786
13926
  });
13787
13927
  }
13788
- else {
13789
- this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
13928
+ catch (execption) {
13929
+ this.parent.actionFailureMethod(execption);
13790
13930
  }
13791
- this.drillThroughGrid.columns.push({
13792
- field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
13793
- });
13794
13931
  this.drillThroughGrid.actionComplete = function (args) {
13795
13932
  if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
13796
13933
  dialogModule.isUpdated = true;
13797
13934
  }
13935
+ _this.parent.actionObj.actionName = _this.parent.getActionCompleteName();
13936
+ var actionInfo = {
13937
+ editInfo: { type: _this.drillThroughGrid.editSettings.mode, action: args.requestType, data: _this.gridData }
13938
+ };
13939
+ _this.parent.actionObj.actionInfo = actionInfo;
13940
+ if (_this.parent.actionObj.actionName) {
13941
+ _this.parent.actionCompleteMethod();
13942
+ }
13798
13943
  if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
13799
13944
  dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
13800
13945
  !dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
@@ -13988,7 +14133,7 @@ var DrillThrough = /** @__PURE__ @class */ (function () {
13988
14133
  * @hidden
13989
14134
  */
13990
14135
  DrillThrough.prototype.getModuleName = function () {
13991
- return 'drillthrough';
14136
+ return 'drillThrough';
13992
14137
  };
13993
14138
  DrillThrough.prototype.addInternalEvents = function () {
13994
14139
  this.parent.on(contentReady, this.wireEvents, this);
@@ -14196,7 +14341,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14196
14341
  * @private
14197
14342
  */
14198
14343
  PivotChart.prototype.getModuleName = function () {
14199
- return 'pivotchart';
14344
+ return 'pivotChart';
14200
14345
  };
14201
14346
  /* eslint-disable */
14202
14347
  PivotChart.prototype.loadChart = function (parent, chartSettings) {
@@ -14391,7 +14536,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14391
14536
  this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
14392
14537
  var name_1 = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
14393
14538
  (firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
14394
- var text = firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
14539
+ var values = this.engineModule.fieldList[this.currentMeasure];
14540
+ var text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
14541
+ this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
14395
14542
  var caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
14396
14543
  ((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
14397
14544
  var levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
@@ -14567,7 +14714,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14567
14714
  this.chartSettings.palettes = currentSeries.palettes;
14568
14715
  }
14569
14716
  for (var i = 0; i < this.columnGroupObject[key].length; i++) {
14570
- this.columnGroupObject[key][i].x = this.columnGroupObject[key][i].x === '' ? this.parent.localeObj.getConstant('blank') : this.columnGroupObject[key][i].x;
14717
+ var values = this.engineModule.fieldList[this.currentMeasure];
14718
+ 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) + ' ' +
14719
+ 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;
14571
14720
  }
14572
14721
  currentSeries.dataSource = this.columnGroupObject[key];
14573
14722
  currentSeries.xName = 'x';
@@ -14723,7 +14872,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14723
14872
  enableSmartLabels: this.chartSettings.enableSmartLabels,
14724
14873
  center: this.chartSettings.pieCenter,
14725
14874
  enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
14726
- highLightMode: this.chartSettings.highlightMode,
14875
+ highlightMode: this.chartSettings.highlightMode,
14727
14876
  highlightPattern: this.chartSettings.highlightPattern,
14728
14877
  titleStyle: this.chartSettings.titleStyle,
14729
14878
  subTitle: this.chartSettings.subTitle,
@@ -14851,7 +15000,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14851
15000
  this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
14852
15001
  if (this.accumulationType.indexOf(type) > -1) {
14853
15002
  this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
14854
- this.parent.chart.highLightMode = this.parent.chartSettings.highlightMode;
15003
+ this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
14855
15004
  this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
14856
15005
  }
14857
15006
  else {
@@ -14960,9 +15109,14 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14960
15109
  currentYAxis.labelFormat = currentYAxis.labelFormat ?
14961
15110
  currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
14962
15111
  currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
14963
- currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop :
14964
- this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
14965
- this.chartSettings.chartSeries.type === 'StackingBar100' ? 50 : 30;
15112
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
15113
+ if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
15114
+ this.chartSettings.chartSeries.type === 'StackingBar100') {
15115
+ currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
15116
+ }
15117
+ else {
15118
+ currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
15119
+ }
14966
15120
  if (!resFormat) {
14967
15121
  currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
14968
15122
  }
@@ -15009,6 +15163,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15009
15163
  currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
15010
15164
  currentYAxis.rowIndex = 0;
15011
15165
  currentYAxis.columnIndex = 0;
15166
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
15012
15167
  if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
15013
15168
  currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
15014
15169
  }
@@ -15331,6 +15486,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15331
15486
  };
15332
15487
  PivotChart.prototype.loaded = function (args) {
15333
15488
  this.parent.isChartLoaded = true;
15489
+ var width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
15334
15490
  if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
15335
15491
  this.parent.showFieldList && this.parent.currentView === 'Chart') {
15336
15492
  this.parent.groupingBarModule.alignIcon();
@@ -15342,13 +15498,15 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15342
15498
  this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
15343
15499
  }
15344
15500
  }
15345
- if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0)
15346
- && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15347
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
15348
- }
15349
- else if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15350
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
15351
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
15501
+ if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15502
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
15503
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
15504
+ }
15505
+ else {
15506
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
15507
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
15508
+ }
15509
+ this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
15352
15510
  }
15353
15511
  this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
15354
15512
  this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
@@ -15569,6 +15727,11 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15569
15727
  offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
15570
15728
  }
15571
15729
  if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
15730
+ var isNone = false;
15731
+ if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
15732
+ isNone = true;
15733
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
15734
+ }
15572
15735
  if (this.parent.showToolbar && this.parent.showGroupingBar) {
15573
15736
  height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
15574
15737
  this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
@@ -15586,6 +15749,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15586
15749
  else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
15587
15750
  height = '200';
15588
15751
  }
15752
+ if (isNone) {
15753
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
15754
+ }
15589
15755
  }
15590
15756
  else {
15591
15757
  height = 'auto';
@@ -17409,7 +17575,7 @@ var PivotAxis = /** @__PURE__ @class */ (function (_super) {
17409
17575
  Property(0)
17410
17576
  ], PivotAxis.prototype, "plotOffset", void 0);
17411
17577
  __decorate$3([
17412
- Property('None')
17578
+ Property('Shift')
17413
17579
  ], PivotAxis.prototype, "edgeLabelPlacement", void 0);
17414
17580
  __decorate$3([
17415
17581
  Property('BetweenTicks')
@@ -18744,6 +18910,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18744
18910
  this.updateTupCollection(customArgs.drillInfo.axis === 'row' ? rowTuples.length : columnTuples.length);
18745
18911
  }
18746
18912
  if (customArgs.action === 'down' ? customArgs.drillInfo.axis === 'column' : true) {
18913
+ this.olapValueAxis = isNullOrUndefined(this.getValueAxis(undefined, undefined)) ? 'column' : 'row';
18747
18914
  this.frameColumnHeader(columnTuples);
18748
18915
  if (!this.isPaging) {
18749
18916
  this.performColumnSorting();
@@ -18798,6 +18965,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18798
18965
  OlapEngine.prototype.frameRowHeader = function (tuples) {
18799
18966
  this.headerGrouping = {};
18800
18967
  this.lastLevel = [];
18968
+ var isGrandTotalAdd = true;
18801
18969
  var position = this.pivotValues.length;
18802
18970
  var pivotValues = [];
18803
18971
  var valueContent = [];
@@ -18858,6 +19026,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18858
19026
  var startTupPos = tupPos;
18859
19027
  var pagingAllowFlag = true;
18860
19028
  var lastMesPos = 0;
19029
+ var isGrandTotalTop = false;
18861
19030
  while (tupPos < tuplesLength && pagingAllowFlag) {
18862
19031
  var members = tuples[this.customArgs.action === 'down' ?
18863
19032
  (tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
@@ -18912,35 +19081,25 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18912
19081
  (allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
18913
19082
  : drillAllow;
18914
19083
  var withoutAllAllow = (withoutAllStartPos > -1 && allCount > 0) ? (attrDrill || allStartPos > withoutAllEndPos) : true;
18915
- if (members.length === allCount + (measure ? 1 : 0) && measure) {
19084
+ isGrandTotalTop = this.dataSourceSettings.grandTotalsPosition === 'Top' && this.olapRowValueIndex === 0 && this.olapValueAxis === 'row'
19085
+ && this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true);
19086
+ if (isGrandTotalTop && gTotals.length === 1) {
19087
+ gTotals = this.frameGrandTotalValues(tuples, gTotals, typeColl, measurePos);
19088
+ }
19089
+ if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
18916
19090
  var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
18917
- gTotals.push({
18918
- axis: 'row',
18919
- actualText: this.getUniqueName(members[measurePos].querySelector('UName').textContent),
18920
- colIndex: 0,
18921
- formattedText: (typeColl[measurePos] === '3' &&
18922
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
18923
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ?
18924
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
18925
- members[measurePos].querySelector('Caption').textContent,
18926
- hasChild: false,
18927
- level: -1,
18928
- rowIndex: position,
18929
- index: [],
18930
- ordinal: tupPos,
18931
- colSpan: 1,
18932
- rowSpan: 1,
18933
- memberType: Number(typeColl[measurePos]),
18934
- isDrilled: false,
18935
- parentUniqueName: members[measurePos].querySelector('PARENT_UNIQUE_NAME') ?
18936
- members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined,
18937
- levelUniqueName: members[measurePos].querySelector('LName').textContent,
18938
- hierarchy: members[measurePos].getAttribute('Hierarchy'),
18939
- valueSort: { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') }
18940
- });
19091
+ var formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
19092
+ this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
19093
+ members[measurePos].querySelector('Caption').textContent;
19094
+ gTotals = this.frameGrandTotalAxisSet(gTotals, this.getUniqueName(members[measurePos].querySelector('UName').textContent), formattedText, position, tupPos, Number(typeColl[measurePos]), members[measurePos].querySelector('PARENT_UNIQUE_NAME') ? members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined, members[measurePos].querySelector('LName').textContent, members[measurePos].getAttribute('Hierarchy'), { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') });
18941
19095
  gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
18942
19096
  }
18943
19097
  else if (!(allStartPos === 0 || (measurePos === 0 && allStartPos === 1)) && drillAllow && withoutAllAllow) {
19098
+ if (this.dataSourceSettings.grandTotalsPosition === 'Top' && isGrandTotalAdd && this.dataSourceSettings.showGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true)) {
19099
+ this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
19100
+ position = this.pivotValues.length;
19101
+ isGrandTotalAdd = false;
19102
+ }
18944
19103
  prevTupInfo = this.tupRowInfo[tupPos];
18945
19104
  var lastPos = position;
18946
19105
  var lastMemPos = memPos;
@@ -19031,6 +19190,11 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19031
19190
  }
19032
19191
  tupPos++;
19033
19192
  }
19193
+ if (!(this.dataSourceSettings.grandTotalsPosition === 'Top') || (this.olapValueAxis === 'row' && this.dataSourceSettings.rows.length === 1 && this.dataSourceSettings.grandTotalsPosition === 'Top') || this.dataSourceSettings.rows.length === 0) {
19194
+ this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
19195
+ }
19196
+ };
19197
+ OlapEngine.prototype.insertRowGrandTotal = function (gTotals, valueContent, pivotValues, tuples, position) {
19034
19198
  if (gTotals.length > 1 && gTotals[0].memberType !== 3) {
19035
19199
  gTotals[0].ordinal = -1;
19036
19200
  }
@@ -19056,6 +19220,41 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19056
19220
  this.updateRowEngine(pivotValues, valueContent, tuples.length);
19057
19221
  this.onDemandDrillEngine = pivotValues;
19058
19222
  }
19223
+ return gTotals;
19224
+ };
19225
+ OlapEngine.prototype.getValueAxis = function (valueAxis, valueIndex) {
19226
+ this.olapValueAxis = valueAxis;
19227
+ this.olapRowValueIndex = valueIndex;
19228
+ for (var i = 0; i < this.dataSourceSettings.rows.length; i++) {
19229
+ if (this.dataSourceSettings.rows[i].name === '[Measures]') {
19230
+ this.olapValueAxis = 'row';
19231
+ this.olapRowValueIndex = i;
19232
+ break;
19233
+ }
19234
+ }
19235
+ return this.olapValueAxis;
19236
+ };
19237
+ OlapEngine.prototype.frameGrandTotalAxisSet = function (gTotals, actualText, formattedText, rowIndex, ordinal, memberType, parentUniqueName, levelUniqueName, hierarchy, valueSort) {
19238
+ gTotals.push({
19239
+ axis: 'row',
19240
+ actualText: actualText,
19241
+ colIndex: 0,
19242
+ formattedText: formattedText,
19243
+ hasChild: false,
19244
+ level: -1,
19245
+ rowIndex: rowIndex,
19246
+ index: [],
19247
+ ordinal: ordinal,
19248
+ colSpan: 1,
19249
+ rowSpan: 1,
19250
+ memberType: memberType,
19251
+ isDrilled: false,
19252
+ parentUniqueName: parentUniqueName,
19253
+ levelUniqueName: levelUniqueName,
19254
+ hierarchy: hierarchy,
19255
+ valueSort: valueSort
19256
+ });
19257
+ return gTotals;
19059
19258
  };
19060
19259
  OlapEngine.prototype.getDepth = function (tupInfo, uniqueName, memberType) {
19061
19260
  var memberPosition = tupInfo.uNameCollection.indexOf(uniqueName);
@@ -19296,6 +19495,53 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19296
19495
  currTupCount--;
19297
19496
  }
19298
19497
  };
19498
+ OlapEngine.prototype.frameGrandTotalValues = function (tuples, gTotals, typeColl, measurePos) {
19499
+ var tupPos = 0;
19500
+ var lastAllStartPos;
19501
+ var lastAllCount;
19502
+ var availAllMember = false;
19503
+ var withoutAllEndPos = -1;
19504
+ var isGrandtoalDataAdd = false;
19505
+ var prevTupInfo;
19506
+ var isGrandTotalTop = false;
19507
+ while (tupPos < tuples.length && !isGrandtoalDataAdd) {
19508
+ var members = tuples[this.customArgs.action === 'down' ?
19509
+ (tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
19510
+ var allCount = this.tupRowInfo[tupPos].allCount;
19511
+ var allStartPos = this.tupRowInfo[tupPos].allStartPos;
19512
+ var measure = this.tupRowInfo[tupPos].measure;
19513
+ var typeColl_1 = this.tupRowInfo[tupPos].typeCollection;
19514
+ var drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
19515
+ var startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
19516
+ if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
19517
+ gTotals.pop();
19518
+ }
19519
+ if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
19520
+ (!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
19521
+ var attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
19522
+ var drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
19523
+ drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
19524
+ (prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
19525
+ ((withoutAllEndPos > prevTupInfo.measurePosition ? false :
19526
+ prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
19527
+ (allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
19528
+ : drillAllow;
19529
+ if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
19530
+ var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
19531
+ var formattedText = (typeColl_1[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
19532
+ this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
19533
+ members[measurePos].querySelector('Caption').textContent;
19534
+ gTotals = this.frameGrandTotalAxisSet(gTotals, this.getUniqueName(members[measurePos].querySelector('UName').textContent), formattedText, this.pivotValues.length, tupPos, Number(typeColl_1[measurePos]), members[measurePos].querySelector('PARENT_UNIQUE_NAME') ? members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined, members[measurePos].querySelector('LName').textContent, members[measurePos].getAttribute('Hierarchy'), { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') });
19535
+ gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
19536
+ }
19537
+ lastAllCount = allCount;
19538
+ lastAllStartPos = allStartPos;
19539
+ }
19540
+ isGrandtoalDataAdd = this.dataSourceSettings.values.length + 1 === gTotals.length ? true : false;
19541
+ tupPos++;
19542
+ }
19543
+ return gTotals;
19544
+ };
19299
19545
  OlapEngine.prototype.frameColumnHeader = function (tuples) {
19300
19546
  var _this = this;
19301
19547
  this.headerGrouping = {};
@@ -19360,8 +19606,18 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19360
19606
  withoutAllAvail = true;
19361
19607
  isStartCol = (allCount > 0 && isStartCol) ? (allStartPos > withoutAllStartPos) : isStartCol;
19362
19608
  }
19363
- if (isStartCol) {
19364
- if (allCount === 0) {
19609
+ var isGrandTotalTop = false;
19610
+ if (this_1.dataSourceSettings.grandTotalsPosition === 'Top' && this_1.dataSourceSettings.showGrandTotals && this_1.dataSourceSettings.showColumnGrandTotals) {
19611
+ var count = 0;
19612
+ for (var i = 0; i < members.length; i++) {
19613
+ if ((members[i].querySelector('Caption').textContent).indexOf('All') === 0) {
19614
+ count++;
19615
+ }
19616
+ }
19617
+ isGrandTotalTop = count === (this_1.olapValueAxis === 'column' ? this_1.dataSourceSettings.columns.length - 1 : this_1.dataSourceSettings.columns.length);
19618
+ }
19619
+ if (isStartCol || isGrandTotalTop) {
19620
+ if (allCount === 0 || isGrandTotalTop) {
19365
19621
  var levelComp = [-1, -1, -1];
19366
19622
  if (this_1.tupColumnInfo[tupPos - 1] && this_1.tupColumnInfo[tupPos - 1].allCount === 0) {
19367
19623
  levelComp = this_1.levelCompare(levelColl, this_1.tupColumnInfo[tupPos - 1].levelCollection);
@@ -19398,8 +19654,10 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19398
19654
  }
19399
19655
  this_1.setParentCollection(members);
19400
19656
  if (withoutAllAvail ? (withoutAllEndPos <= drillStartPos) : true) {
19401
- this_1.totalCollection[this_1.totalCollection.length] =
19402
- ({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
19657
+ if (!isGrandTotalTop) {
19658
+ this_1.totalCollection[this_1.totalCollection.length] =
19659
+ ({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
19660
+ }
19403
19661
  lastSavedInfo.allCount = allCount;
19404
19662
  lastSavedInfo.allStartPos = allStartPos;
19405
19663
  lastSavedInfo.drillStartPos = drillStartPos;
@@ -19424,10 +19682,12 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19424
19682
  }
19425
19683
  this_1.setParentCollection(members);
19426
19684
  if ((withoutAllAvail && drillStartPos > -1) ? (withoutAllEndPos <= drillStartPos) : true) {
19427
- this_1.totalCollection[this_1.totalCollection.length] =
19428
- ({
19429
- allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
19430
- });
19685
+ if (!isGrandTotalTop) {
19686
+ this_1.totalCollection[this_1.totalCollection.length] =
19687
+ ({
19688
+ allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
19689
+ });
19690
+ }
19431
19691
  lastSavedInfo.allCount = allCount;
19432
19692
  lastSavedInfo.allStartPos = allStartPos;
19433
19693
  lastSavedInfo.drillStartPos = drillStartPos;
@@ -19931,19 +20191,26 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19931
20191
  }
19932
20192
  var newPos = 0;
19933
20193
  var totPos = 0;
20194
+ var valuePos = 0;
19934
20195
  gSumFlag = false;
19935
20196
  gSumGrouping = this.sortRowHeaders(gSumGrouping);
19936
20197
  for (var rPos = this.colDepth; rPos < rowCount; rPos++) {
19937
20198
  /* eslint-disable @typescript-eslint/dot-notation */
20199
+ if (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) &&
20200
+ ((this.olapValueAxis === 'column' && this.colDepth + 1 === rPos) || (this.olapValueAxis === 'row' && this.colDepth + this.dataSourceSettings.values.length + 1 === rPos))) {
20201
+ newPos = 0;
20202
+ gSumFlag = false;
20203
+ }
19938
20204
  var cell = gSumFlag ? gSumGrouping : sortLvlGrouping[levels[0]]['parent'];
19939
20205
  /* eslint-enable @typescript-eslint/dot-notation */
19940
- var currPos = gSumFlag ? (newPos - totPos) : newPos;
20206
+ var currPos = (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) && this.colDepth === rPos) ? cell.length : gSumFlag ? (newPos - totPos) : newPos;
19941
20207
  if (cell[currPos]) {
19942
20208
  this.pivotValues[rPos] = [cell[currPos]];
19943
20209
  this.pivotValues[rPos][0].rowIndex = rPos;
19944
- this.valueContent[newPos][0] = this.pivotValues[rPos][0];
20210
+ this.valueContent[valuePos][0] = this.pivotValues[rPos][0];
19945
20211
  }
19946
20212
  newPos++;
20213
+ valuePos++;
19947
20214
  if (this.pivotValues[rPos][0].type === 'grand sum') {
19948
20215
  gSumFlag = true;
19949
20216
  totPos = newPos;
@@ -22260,6 +22527,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22260
22527
  _this_1.request = new XMLHttpRequest();
22261
22528
  /** @hidden */
22262
22529
  _this_1.isServerWaitingPopup = false;
22530
+ /** @hidden */
22531
+ _this_1.actionObj = {};
22263
22532
  _this_1.pivotView = _this_1;
22264
22533
  setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
22265
22534
  return _this_1;
@@ -22302,10 +22571,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22302
22571
  modules.push({ args: [this], member: 'grouping' });
22303
22572
  }
22304
22573
  if (this.allowDrillThrough || (this.editSettings && this.editSettings.allowEditing)) {
22305
- modules.push({ args: [this], member: 'drillthrough' });
22574
+ modules.push({ args: [this], member: 'drillThrough' });
22306
22575
  }
22307
22576
  if (this.displayOption.view !== 'Table') {
22308
- modules.push({ args: [this], member: 'pivotchart' });
22577
+ modules.push({ args: [this], member: 'pivotChart' });
22309
22578
  }
22310
22579
  return modules;
22311
22580
  };
@@ -22885,7 +23154,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22885
23154
  this.setProperties({ gridSettings: { allowSelection: true, selectionSettings: { cellSelectionMode: 'Box', mode: 'Cell', type: 'Multiple' } } }, true);
22886
23155
  }
22887
23156
  if (this.displayOption.view !== 'Table') {
22888
- this.chartModule = new PivotChart();
23157
+ this.pivotChartModule = new PivotChart();
22889
23158
  }
22890
23159
  this.currentView = this.currentView ? this.currentView : (this.displayOption.view === 'Both' ?
22891
23160
  this.displayOption.primary : this.displayOption.view);
@@ -23152,32 +23421,37 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23152
23421
  };
23153
23422
  PivotView.prototype.initialLoad = function () {
23154
23423
  var _this_1 = this;
23155
- this.cellTemplateFn = this.templateParser(this.cellTemplate);
23156
- this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
23157
- if (this.spinnerTemplate) {
23158
- createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
23424
+ try {
23425
+ this.cellTemplateFn = this.templateParser(this.cellTemplate);
23426
+ this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
23427
+ if (this.spinnerTemplate) {
23428
+ createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
23429
+ }
23430
+ else {
23431
+ createSpinner({ target: this.element }, this.createElement);
23432
+ }
23433
+ var loadArgs = {
23434
+ dataSourceSettings: this.dataSourceSettings,
23435
+ pivotview: this,
23436
+ fieldsType: {}
23437
+ };
23438
+ this.trigger(load, loadArgs, function (observedArgs) {
23439
+ _this_1.dataSourceSettings = observedArgs.dataSourceSettings;
23440
+ _this_1.fieldsType = observedArgs.fieldsType;
23441
+ _this_1.updateClass();
23442
+ _this_1.notify(initSubComponent, {});
23443
+ if (_this_1.dataSourceSettings.mode !== 'Server') {
23444
+ _this_1.notify(initialLoad, {});
23445
+ }
23446
+ if (_this_1.isAdaptive) {
23447
+ _this_1.contextMenuModule.render();
23448
+ }
23449
+ _this_1.notify(initToolbar, {});
23450
+ });
23159
23451
  }
23160
- else {
23161
- createSpinner({ target: this.element }, this.createElement);
23452
+ catch (execption) {
23453
+ this.actionFailureMethod(execption);
23162
23454
  }
23163
- var loadArgs = {
23164
- dataSourceSettings: this.dataSourceSettings,
23165
- pivotview: this,
23166
- fieldsType: {}
23167
- };
23168
- this.trigger(load, loadArgs, function (observedArgs) {
23169
- _this_1.dataSourceSettings = observedArgs.dataSourceSettings;
23170
- _this_1.fieldsType = observedArgs.fieldsType;
23171
- _this_1.updateClass();
23172
- _this_1.notify(initSubComponent, {});
23173
- if (_this_1.dataSourceSettings.mode !== 'Server') {
23174
- _this_1.notify(initialLoad, {});
23175
- }
23176
- if (_this_1.isAdaptive) {
23177
- _this_1.contextMenuModule.render();
23178
- }
23179
- _this_1.notify(initToolbar, {});
23180
- });
23181
23455
  };
23182
23456
  /**
23183
23457
  * Register the internal events.
@@ -23416,15 +23690,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23416
23690
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
23417
23691
  this.renderEmptyGrid();
23418
23692
  if (newProp.displayOption.view === 'Table') {
23419
- if (this.chartModule) {
23420
- this.chartModule.destroy();
23693
+ if (this.pivotChartModule) {
23694
+ this.pivotChartModule.destroy();
23421
23695
  this.chart = undefined;
23422
- this.chartModule = undefined;
23696
+ this.pivotChartModule = undefined;
23423
23697
  }
23424
23698
  }
23425
23699
  }
23426
- else if (!this.chartModule && this.displayOption.view !== 'Table') {
23427
- this.chartModule = new PivotChart();
23700
+ else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
23701
+ this.pivotChartModule = new PivotChart();
23428
23702
  }
23429
23703
  }
23430
23704
  else if (this.showToolbar && !isNullOrUndefined(newProp.displayOption) && newProp.displayOption.view) {
@@ -23454,12 +23728,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23454
23728
  (newProp.chartSettings.chartSeries && Object.keys(newProp.chartSettings.chartSeries).indexOf('type') !== -1))) {
23455
23729
  this.groupingBarModule.renderLayout();
23456
23730
  }
23457
- if (isNullOrUndefined(this.chartModule) && this.displayOption.view !== 'Table') {
23458
- this.chartModule = new PivotChart();
23731
+ if (isNullOrUndefined(this.pivotChartModule) && this.displayOption.view !== 'Table') {
23732
+ this.pivotChartModule = new PivotChart();
23459
23733
  }
23460
23734
  var engineModule = this.dataType === 'pivot' ? this.engineModule : this.olapEngineModule;
23461
- if (!isNullOrUndefined(this.chartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
23462
- this.chartModule.loadChart(this, this.chartSettings);
23735
+ if (!isNullOrUndefined(this.pivotChartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
23736
+ this.pivotChartModule.loadChart(this, this.chartSettings);
23463
23737
  }
23464
23738
  if (!isNullOrUndefined(engineModule.pivotValues) && !isNullOrUndefined(engineModule.fieldList)) {
23465
23739
  this.notify(uiUpdate, this);
@@ -23582,9 +23856,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23582
23856
  */
23583
23857
  PivotView.prototype.renderPivotGrid = function () {
23584
23858
  this.clearTemplate();
23585
- if (this.chartModule) {
23586
- this.chartModule.engineModule = this.engineModule;
23587
- this.chartModule.loadChart(this, this.chartSettings);
23859
+ if (this.pivotChartModule) {
23860
+ this.pivotChartModule.engineModule = this.engineModule;
23861
+ this.pivotChartModule.loadChart(this, this.chartSettings);
23588
23862
  if (this.enableRtl && this.chart && document.body.getAttribute('dir') !== 'rtl') {
23589
23863
  addClass([this.chart.element], PIVOTCHART_LTR);
23590
23864
  }
@@ -23615,7 +23889,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23615
23889
  this.applyHyperlinkSettings();
23616
23890
  }
23617
23891
  this.renderModule = this.renderModule ? this.renderModule : new Render(this);
23618
- this.renderModule.render();
23892
+ this.renderModule.render(true);
23619
23893
  }
23620
23894
  else if (this.grid) {
23621
23895
  remove(this.grid.element);
@@ -23631,7 +23905,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23631
23905
  if (this.toolbarModule && this.toolbarModule.toolbar) {
23632
23906
  this.toolbarModule.toolbar.width = this.getGridWidthAsNumber() - 2;
23633
23907
  }
23634
- this.chart.element.style.width = formatUnit(this.getGridWidthAsNumber());
23908
+ if (this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis) {
23909
+ this.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.getGridWidthAsNumber());
23910
+ }
23635
23911
  this.chart.width = formatUnit(this.getGridWidthAsNumber());
23636
23912
  if (this.currentView === 'Table') {
23637
23913
  this.grid.element.style.display = '';
@@ -23651,7 +23927,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23651
23927
  }
23652
23928
  if (this.toolbarModule) {
23653
23929
  if (this.showFieldList && select('#' + this.element.id + '_PivotFieldList', this.element)) {
23654
- select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
23930
+ if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1) {
23931
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
23932
+ }
23933
+ else {
23934
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.top = this.element.querySelector('.' + GRID_TOOLBAR).offsetHeight.toString() + 'px';
23935
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.position = 'relative';
23936
+ }
23655
23937
  }
23656
23938
  if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1 &&
23657
23939
  this.showToolbar && this.element.querySelector('.e-toggle-field-list')) {
@@ -23803,7 +24085,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23803
24085
  isDrillThrough: (pivot.allowDrillThrough || pivot.editSettings.allowEditing),
23804
24086
  localeObj: pivot.localeObj,
23805
24087
  fieldsType: pivot.fieldsType,
23806
- clonedReport: pivot.clonedReport
24088
+ clonedReport: pivot.clonedReport,
24089
+ globalize: pivot.globalize,
24090
+ currenyCode: pivot.currencyCode
23807
24091
  };
23808
24092
  /* eslint-enable @typescript-eslint/indent */
23809
24093
  if (pivot.dataSourceSettings.mode === 'Server') {
@@ -23853,6 +24137,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23853
24137
  this.exportType = 'Excel';
23854
24138
  this.grid.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);
23855
24139
  }
24140
+ this.actionObj.actionName = this.getActionCompleteName();
24141
+ var actionInfo = {
24142
+ exportInfo: { type: this.exportType, info: excelExportProperties }
24143
+ };
24144
+ this.actionObj.actionInfo = actionInfo;
24145
+ if (this.actionObj.actionName) {
24146
+ this.actionCompleteMethod();
24147
+ }
23856
24148
  };
23857
24149
  /**
23858
24150
  * Export PivotGrid data to CSV file.
@@ -23870,6 +24162,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23870
24162
  this.exportType = 'CSV';
23871
24163
  this.grid.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);
23872
24164
  }
24165
+ this.actionObj.actionName = this.getActionCompleteName();
24166
+ var actionInfo = {
24167
+ exportInfo: { type: this.exportType, info: excelExportProperties }
24168
+ };
24169
+ this.actionObj.actionInfo = actionInfo;
24170
+ if (this.actionObj.actionName) {
24171
+ this.actionCompleteMethod();
24172
+ }
23873
24173
  };
23874
24174
  /**
23875
24175
  * Export Pivot widget data to PDF document.
@@ -23886,6 +24186,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23886
24186
  else {
23887
24187
  this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
23888
24188
  }
24189
+ this.actionObj.actionName = this.getActionCompleteName();
24190
+ var actionInfo = {
24191
+ exportInfo: { type: 'PDF', info: pdfExportProperties }
24192
+ };
24193
+ this.actionObj.actionInfo = actionInfo;
24194
+ if (this.actionObj.actionName) {
24195
+ this.actionCompleteMethod();
24196
+ }
23889
24197
  };
23890
24198
  /**
23891
24199
  * Export method for the chart.
@@ -23900,6 +24208,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23900
24208
  if (this.chart && this.chart.enableExport) {
23901
24209
  this.chart.exportModule.export(type, fileName, orientation, null, width, height);
23902
24210
  }
24211
+ this.actionObj.actionName = this.getActionCompleteName();
24212
+ var actionInfo = {
24213
+ exportInfo: { type: type, info: fileName }
24214
+ };
24215
+ this.actionObj.actionInfo = actionInfo;
24216
+ if (this.actionObj.actionName) {
24217
+ this.actionCompleteMethod();
24218
+ }
23903
24219
  };
23904
24220
  /**
23905
24221
  * Print method for the chart.
@@ -24011,6 +24327,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24011
24327
  };
24012
24328
  _this_1.trigger(enginePopulated, eventArgs);
24013
24329
  pivot_1.engineModule.pivotValues = eventArgs.pivotValues;
24330
+ var actionInfo = {
24331
+ drillInfo: drilledItem_1
24332
+ };
24333
+ _this_1.actionObj.actionInfo = actionInfo;
24014
24334
  pivot_1.renderPivotGrid();
24015
24335
  }
24016
24336
  else {
@@ -24363,6 +24683,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24363
24683
  this.unwireEvents();
24364
24684
  this.wireEvents();
24365
24685
  this.isChartLoaded = false;
24686
+ this.actionObj.actionName = this.getActionCompleteName();
24687
+ if (this.actionObj.actionName) {
24688
+ if (this.actionObj.actionName !== windowResize) {
24689
+ this.actionCompleteMethod();
24690
+ }
24691
+ }
24366
24692
  };
24367
24693
  PivotView.prototype.setToolTip = function (args) {
24368
24694
  var colIndex = Number(args.target.getAttribute('aria-colindex'));
@@ -24394,6 +24720,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24394
24720
  if (cell && this.engineModule.fieldList[cell.actualText]) {
24395
24721
  var field = this.engineModule.fieldList[cell.actualText];
24396
24722
  aggregateType = field.aggregateType;
24723
+ if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
24724
+ field.type === 'exclude')) {
24725
+ aggregateType = 'Count';
24726
+ }
24727
+ else {
24728
+ aggregateType = (aggregateType === undefined) ? 'Sum' : field.aggregateType;
24729
+ }
24397
24730
  caption = field.caption;
24398
24731
  hasField = true;
24399
24732
  }
@@ -24613,76 +24946,105 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24613
24946
  ele = target.parentElement.parentElement;
24614
24947
  }
24615
24948
  this.CellClicked(target, e);
24616
- if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
24617
- && this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
24618
- this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
24619
- ele.classList.contains('e-stot'))) {
24620
- var colIndex = Number(ele.getAttribute('aria-colindex'));
24621
- var rowIndex = Number(ele.getAttribute('index'));
24622
- if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24623
- var header = this.pivotValues[rowIndex][colIndex];
24624
- if (this.dataSourceSettings.valueIndex === -1) {
24625
- rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
24626
- }
24627
- else {
24628
- var level = this.getLevel(header);
24629
- rowIndex = (level <= this.engineModule.measureIndex &&
24630
- header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
24949
+ try {
24950
+ if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
24951
+ && this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
24952
+ this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
24953
+ ele.classList.contains('e-stot'))) {
24954
+ var FieldName = target.parentElement.getAttribute('fieldname');
24955
+ var fieldInfo = PivotUtil.getFieldInfo(FieldName, this);
24956
+ this.actionObj.actionName = sortValue;
24957
+ this.actionObj.fieldInfo = fieldInfo.fieldItem;
24958
+ if (this.actionBeginMethod()) {
24959
+ return;
24631
24960
  }
24632
- }
24633
- else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24634
- colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
24635
- rowIndex = this.engineModule.headerContent.length - 1;
24636
- }
24637
- this.setProperties({
24638
- dataSourceSettings: {
24639
- valueSortSettings: {
24640
- columnIndex: (Number(ele.getAttribute('aria-colindex')) +
24641
- Number(ele.getAttribute('aria-colspan')) - 1),
24642
- sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
24643
- headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
24644
- headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
24645
- this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
24961
+ var colIndex = Number(ele.getAttribute('aria-colindex'));
24962
+ var rowIndex = Number(ele.getAttribute('index'));
24963
+ if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24964
+ var header = this.pivotValues[rowIndex][colIndex];
24965
+ if (this.dataSourceSettings.valueIndex === -1) {
24966
+ rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
24646
24967
  }
24647
- }
24648
- }, true);
24649
- this.showWaitingPopup();
24650
- var pivot = this; /* eslint-disable-line */
24651
- pivot.engineModule.enableValueSorting = true;
24652
- if (pivot.enableVirtualization) {
24653
- if (pivot.dataSourceSettings.enableSorting) {
24654
- for (var _i = 0, _a = Object.keys(pivot.engineModule.fieldList); _i < _a.length; _i++) {
24655
- var key = _a[_i];
24656
- pivot.engineModule.fieldList[key].sort = 'Ascending';
24968
+ else {
24969
+ var level = this.getLevel(header);
24970
+ rowIndex = (level <= this.engineModule.measureIndex &&
24971
+ header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
24972
+ }
24973
+ }
24974
+ else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24975
+ colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
24976
+ rowIndex = this.engineModule.headerContent.length - 1;
24977
+ }
24978
+ this.setProperties({
24979
+ dataSourceSettings: {
24980
+ valueSortSettings: {
24981
+ columnIndex: (Number(ele.getAttribute('aria-colindex')) +
24982
+ Number(ele.getAttribute('aria-colspan')) - 1),
24983
+ sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
24984
+ headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
24985
+ headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
24986
+ this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
24987
+ }
24988
+ }
24989
+ }, true);
24990
+ this.showWaitingPopup();
24991
+ var pivot = this; /* eslint-disable-line */
24992
+ pivot.engineModule.enableValueSorting = true;
24993
+ if (pivot.enableVirtualization) {
24994
+ if (pivot.dataSourceSettings.enableSorting) {
24995
+ for (var _i = 0, _a = Object.keys(pivot.engineModule.fieldList); _i < _a.length; _i++) {
24996
+ var key = _a[_i];
24997
+ pivot.engineModule.fieldList[key].sort = 'Ascending';
24998
+ }
24999
+ pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
25000
+ }
25001
+ if (pivot.dataSourceSettings.mode === 'Server') {
25002
+ pivot.getEngine('onValueSort', null, null, null, null, null, null);
25003
+ }
25004
+ else {
25005
+ pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
25006
+ pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
25007
+ pivot.engineModule.applyValueSorting();
25008
+ pivot.engineModule.updateEngine();
24657
25009
  }
24658
- pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
24659
25010
  }
24660
- if (pivot.dataSourceSettings.mode === 'Server') {
25011
+ else if (pivot.dataSourceSettings.mode === 'Server') {
24661
25012
  pivot.getEngine('onValueSort', null, null, null, null, null, null);
24662
25013
  }
24663
25014
  else {
24664
- pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
24665
- pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
24666
- pivot.engineModule.applyValueSorting();
24667
- pivot.engineModule.updateEngine();
25015
+ pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
24668
25016
  }
25017
+ pivot.allowServerDataBinding = false;
25018
+ pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
25019
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
25020
+ delete pivot.bulkChanges.pivotValues;
25021
+ pivot.allowServerDataBinding = true;
25022
+ var actionInfo = {
25023
+ valueSortInfo: this.engineModule.valueSortSettings
25024
+ };
25025
+ this.actionObj.actionInfo = actionInfo;
25026
+ pivot.renderPivotGrid();
24669
25027
  }
24670
- else if (pivot.dataSourceSettings.mode === 'Server') {
24671
- pivot.getEngine('onValueSort', null, null, null, null, null, null);
24672
- }
24673
- else {
24674
- pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
24675
- }
24676
- pivot.allowServerDataBinding = false;
24677
- pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
24678
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
24679
- delete pivot.bulkChanges.pivotValues;
24680
- pivot.allowServerDataBinding = true;
24681
- pivot.renderPivotGrid();
25028
+ }
25029
+ catch (execption) {
25030
+ this.actionFailureMethod(execption);
24682
25031
  }
24683
25032
  }
24684
25033
  else if (target.classList.contains(COLLAPSE) || target.classList.contains(EXPAND)) {
24685
- this.onDrill(target);
25034
+ var drillFieldName = target.parentElement.getAttribute('fieldname');
25035
+ var fieldInfo = PivotUtil.getFieldInfo(drillFieldName, this);
25036
+ var actionName = target.classList.contains(COLLAPSE) ? this.actionObj.actionName = drillUp : target.classList.contains(EXPAND) ? this.actionObj.actionName = drillDown : '';
25037
+ this.actionObj.actionName = actionName;
25038
+ this.actionObj.fieldInfo = fieldInfo.fieldItem;
25039
+ if (this.actionBeginMethod()) {
25040
+ return;
25041
+ }
25042
+ try {
25043
+ this.onDrill(target);
25044
+ }
25045
+ catch (execption) {
25046
+ this.actionFailureMethod(execption);
25047
+ }
24686
25048
  }
24687
25049
  else {
24688
25050
  this.CellClicked(target, e);
@@ -24784,7 +25146,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24784
25146
  var firstColWidth = this.pivotColumns[0].width;
24785
25147
  var eventArgs = {
24786
25148
  columns: this.pivotColumns,
24787
- dataSourceSettings: this.dataSourceSettings
25149
+ dataSourceSettings: this.dataSourceSettings,
25150
+ stackedColumns: this.getStackedColumns(gridcolumns, [])
24788
25151
  };
24789
25152
  this.trigger(beforeColumnsRender, eventArgs);
24790
25153
  if (this.enableVirtualization && eventArgs.columns.length > 0 && eventArgs.columns[0].width !== gridcolumns[0].width) {
@@ -24889,8 +25252,16 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24889
25252
  /* eslint-disable-next-line */
24890
25253
  /** @hidden */
24891
25254
  PivotView.prototype.onWindowResize = function () {
25255
+ this.actionObj.actionName = windowResize;
25256
+ if (this.actionBeginMethod()) {
25257
+ return;
25258
+ }
24892
25259
  clearTimeout(this.timeOutObj);
24893
25260
  this.timeOutObj = setTimeout(this.layoutRefresh.bind(this), 500);
25261
+ this.actionObj.actionName = this.getActionCompleteName();
25262
+ if (this.actionObj.actionName) {
25263
+ this.actionCompleteMethod();
25264
+ }
24894
25265
  };
24895
25266
  /**
24896
25267
  * Refreshes the Pivot Table for blazor layoutRefresh is called for other base refresh is called.
@@ -25285,7 +25656,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25285
25656
  isDrillThrough: (_this_1.allowDrillThrough || _this_1.editSettings.allowEditing),
25286
25657
  localeObj: _this_1.localeObj,
25287
25658
  fieldsType: _this_1.fieldsType,
25288
- clonedReport: _this_1.clonedReport
25659
+ clonedReport: _this_1.clonedReport,
25660
+ globalize: _this_1.globalize,
25661
+ currenyCode: _this_1.currencyCode
25289
25662
  };
25290
25663
  if (_this_1.dataType === 'pivot') {
25291
25664
  if (_this_1.dataSourceSettings.groupSettings && _this_1.dataSourceSettings.groupSettings.length > 0) {
@@ -25511,7 +25884,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25511
25884
  var str = 'color: ' + format[k].style.color + '!important;background-color: ' + format[k].style.backgroundColor +
25512
25885
  '!important;font-size: ' + format[k].style.fontSize + '!important;font-family: ' + format[k].style.fontFamily +
25513
25886
  ' !important;';
25514
- sheet.insertRule('.format' + this.element.id + k + '{' + str + '}', 0);
25887
+ var formatClass = '.format' + this.element.id + k;
25888
+ sheet.insertRule(formatClass + ', ' + formatClass + ' .e-cellvalue' + '{' + str + '}', 0);
25515
25889
  }
25516
25890
  }
25517
25891
  };
@@ -25738,6 +26112,65 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25738
26112
  EventHandler.remove(document, this.isAdaptive ? 'touchend' : 'click', this.removeButtonFocus);
25739
26113
  window.removeEventListener('resize', this.onWindowResize.bind(this), true);
25740
26114
  };
26115
+ /** @hidden */
26116
+ PivotView.prototype.actionBeginMethod = function () {
26117
+ var eventArgs = {
26118
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
26119
+ actionName: this.actionObj.actionName,
26120
+ fieldInfo: this.actionObj.fieldInfo,
26121
+ cancel: false
26122
+ };
26123
+ this.trigger(actionBegin, eventArgs);
26124
+ return eventArgs.cancel;
26125
+ };
26126
+ /** @hidden */
26127
+ PivotView.prototype.actionCompleteMethod = function () {
26128
+ var eventArgs = {
26129
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
26130
+ actionName: this.actionObj.actionName,
26131
+ fieldInfo: this.actionObj.fieldInfo,
26132
+ actionInfo: this.actionObj.actionInfo
26133
+ };
26134
+ this.trigger(actionComplete, eventArgs);
26135
+ this.actionObj.actionName = '';
26136
+ this.actionObj.actionInfo = undefined;
26137
+ this.actionObj.fieldInfo = undefined;
26138
+ };
26139
+ /** @hidden */
26140
+ PivotView.prototype.actionFailureMethod = function (error) {
26141
+ var eventArgs = {
26142
+ actionName: this.actionObj.actionName,
26143
+ errorInfo: error
26144
+ };
26145
+ this.trigger(actionFailure, eventArgs);
26146
+ };
26147
+ /** @hidden */
26148
+ PivotView.prototype.getActionCompleteName = function () {
26149
+ var actionName = (this.actionObj.actionName == openConditionalFormatting) ? conditionallyFormatted : (this.actionObj.actionName == openNumberFormatting) ? numberFormatted
26150
+ : (this.actionObj.actionName == tableView) ? tableViewed : (this.actionObj.actionName == chartView) ? chartViewed : (this.actionObj.actionName == hideSubTotals) ? subTotalsHidden : (this.actionObj.actionName == subTotalsRow) ? subTotalsRowShown
26151
+ : (this.actionObj.actionName == subTotalsColumn) ? subTotalsColumnShown : (this.actionObj.actionName == showSubTotals) ? subTotalsShown : (this.actionObj.actionName == hideGrandTotals) ? grandTotalsHidden
26152
+ : (this.actionObj.actionName == grandTotalsRow) ? grandTotalsRowShown : (this.actionObj.actionName == grandTotalsColumn) ? grandTotalsColumnShown : (this.actionObj.actionName == showGrandTotals) ? grandTotalsShown
26153
+ : (this.actionObj.actionName == sortValue) ? valueSorted : (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
26154
+ : (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == editRecord ? recordEdited : this.actionObj.actionName == reportChange ? reportChanged
26155
+ : this.actionObj.actionName == saveEditedRecords ? editedRecordsSaved : this.actionObj.actionName == addNewRecord ? newRecordAdded
26156
+ : this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
26157
+ : (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
26158
+ : this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
26159
+ : (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : this.actionObj.actionName;
26160
+ return actionName;
26161
+ };
26162
+ /* eslint-disable-next-line */
26163
+ /** @hidden */
26164
+ PivotView.prototype.getStackedColumns = function (gridcolumns, stackedColumns) {
26165
+ for (var _i = 0, gridcolumns_4 = gridcolumns; _i < gridcolumns_4.length; _i++) {
26166
+ var column = gridcolumns_4[_i];
26167
+ stackedColumns.push(column);
26168
+ if (column.columns && column.columns.length > 0) {
26169
+ this.getStackedColumns(column.columns, stackedColumns);
26170
+ }
26171
+ }
26172
+ return stackedColumns;
26173
+ };
25741
26174
  /**
25742
26175
  * To destroy the PivotView elements.
25743
26176
  * @returns {void}
@@ -25801,8 +26234,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25801
26234
  if (this.commonModule) {
25802
26235
  this.commonModule.destroy();
25803
26236
  }
25804
- if (this.chartModule) {
25805
- this.chartModule.destroy();
26237
+ if (this.pivotChartModule) {
26238
+ this.pivotChartModule.destroy();
25806
26239
  }
25807
26240
  if (this.pivotButtonModule && !this.pivotButtonModule.isDestroyed) {
25808
26241
  this.pivotButtonModule.destroy();
@@ -25857,8 +26290,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25857
26290
  if (this.commonModule) {
25858
26291
  this.commonModule = null;
25859
26292
  }
25860
- if (this.chartModule) {
25861
- this.chartModule = null;
26293
+ if (this.pivotChartModule) {
26294
+ this.pivotChartModule = null;
25862
26295
  }
25863
26296
  if (this.pivotButtonModule) {
25864
26297
  this.pivotButtonModule = null;
@@ -25878,6 +26311,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25878
26311
  if (this.drillThroughModule) {
25879
26312
  this.drillThroughModule = null;
25880
26313
  }
26314
+ if (this.clonedDataSet) {
26315
+ this.clonedDataSet = null;
26316
+ }
26317
+ if (this.clonedReport) {
26318
+ this.clonedReport = null;
26319
+ }
25881
26320
  this.element.innerHTML = '';
25882
26321
  removeClass([this.element], ROOT);
25883
26322
  removeClass([this.element], RTL);
@@ -26220,6 +26659,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26220
26659
  __decorate([
26221
26660
  Event()
26222
26661
  ], PivotView.prototype, "beforeServiceInvoke", void 0);
26662
+ __decorate([
26663
+ Event()
26664
+ ], PivotView.prototype, "actionBegin", void 0);
26665
+ __decorate([
26666
+ Event()
26667
+ ], PivotView.prototype, "actionComplete", void 0);
26668
+ __decorate([
26669
+ Event()
26670
+ ], PivotView.prototype, "actionFailure", void 0);
26223
26671
  PivotView = __decorate([
26224
26672
  NotifyPropertyChanges
26225
26673
  ], PivotView);
@@ -26234,6 +26682,250 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26234
26682
  * Renderer Export
26235
26683
  */
26236
26684
 
26685
+ /**
26686
+ * This is a file to perform common utility for OLAP and Relational datasource
26687
+ * @hidden
26688
+ */
26689
+ var PivotExportUtil = /** @__PURE__ @class */ (function () {
26690
+ function PivotExportUtil() {
26691
+ }
26692
+ /* eslint-disable @typescript-eslint/no-explicit-any */
26693
+ PivotExportUtil.getDefinedObj = function (data) {
26694
+ var keyPos = 0;
26695
+ var framedSet = {};
26696
+ /* eslint-enable @typescript-eslint/no-explicit-any */
26697
+ if (!(data === null || data === undefined)) {
26698
+ var fields = Object.keys(data);
26699
+ while (keyPos < fields.length) {
26700
+ if (!(data[fields[keyPos]] === null || data[fields[keyPos]] === undefined)) {
26701
+ framedSet[fields[keyPos]] = data[fields[keyPos]];
26702
+ }
26703
+ keyPos++;
26704
+ }
26705
+ }
26706
+ else {
26707
+ framedSet = data;
26708
+ }
26709
+ return framedSet;
26710
+ };
26711
+ PivotExportUtil.getClonedPivotValues = function (pivotValues) {
26712
+ var clonedSets = [];
26713
+ for (var i = 0; i < pivotValues.length; i++) {
26714
+ if (pivotValues[i]) {
26715
+ clonedSets[i] = [];
26716
+ for (var j = 0; j < pivotValues[i].length; j++) {
26717
+ if (pivotValues[i][j]) {
26718
+ /* eslint-disable */
26719
+ clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
26720
+ /* eslint-enable */
26721
+ }
26722
+ }
26723
+ }
26724
+ }
26725
+ return clonedSets;
26726
+ };
26727
+ /* eslint-disable */
26728
+ PivotExportUtil.getClonedPivotValueObj = function (data) {
26729
+ /* eslint-enable */
26730
+ var keyPos = 0;
26731
+ /* eslint-disable @typescript-eslint/no-explicit-any */
26732
+ var framedSet = {};
26733
+ /* eslint-enable @typescript-eslint/no-explicit-any */
26734
+ if (!(data === null || data === undefined)) {
26735
+ var fields = Object.keys(data);
26736
+ while (keyPos < fields.length) {
26737
+ framedSet[fields[keyPos]] = data[fields[keyPos]];
26738
+ keyPos++;
26739
+ }
26740
+ }
26741
+ else {
26742
+ framedSet = data;
26743
+ }
26744
+ return framedSet;
26745
+ };
26746
+ /* eslint-disable */
26747
+ PivotExportUtil.isContainCommonElements = function (collection1, collection2) {
26748
+ /* eslint-enable */
26749
+ for (var i = 0, cnt = collection1.length; i < cnt; i++) {
26750
+ for (var j = 0, lnt = collection2.length; j < lnt; j++) {
26751
+ if (collection2[j] === collection1[i]) {
26752
+ return true;
26753
+ }
26754
+ }
26755
+ }
26756
+ return false;
26757
+ };
26758
+ /* eslint-disable */
26759
+ PivotExportUtil.formatPdfHeaderFooter = function (pdf) {
26760
+ var contents = [];
26761
+ if (!isNullOrUndefined(pdf)) {
26762
+ for (var i = 0; i < pdf.length; i++) {
26763
+ var a = pdf[i];
26764
+ var content = {
26765
+ /* eslint-enable */
26766
+ type: a.Type,
26767
+ pageNumberType: a.PageNumberType,
26768
+ style: a.Style ? {
26769
+ penColor: a.Style.PenColor,
26770
+ penSize: a.Style.PenSize,
26771
+ dashStyle: a.Style.DashStyle,
26772
+ textBrushColor: a.Style.TextBrushColor,
26773
+ textPenColor: a.Style.TextPenColor,
26774
+ fontSize: a.Style.FontSize,
26775
+ hAlign: a.Style.HAlign,
26776
+ vAlign: a.Style.VAlign
26777
+ } : a.Style,
26778
+ points: a.Points !== null ? {
26779
+ x1: a.Points.X1,
26780
+ y1: a.Points.Y1,
26781
+ x2: a.Points.X2,
26782
+ y2: a.Points.Y2
26783
+ } : null,
26784
+ format: a.Format,
26785
+ position: a.Position !== null ? {
26786
+ x: a.Position.X,
26787
+ y: a.Position.Y
26788
+ } : null,
26789
+ size: a.Size !== null ? {
26790
+ height: a.Size.Height,
26791
+ width: a.Size.Width
26792
+ } : null,
26793
+ src: a.Src,
26794
+ value: a.Value,
26795
+ font: a.Font
26796
+ };
26797
+ contents.push(content);
26798
+ }
26799
+ }
26800
+ return contents;
26801
+ };
26802
+ /* eslint-disable */
26803
+ PivotExportUtil.formatPdfExportProperties = function (pdf) {
26804
+ var values;
26805
+ /* eslint-enable */
26806
+ values = this.getDefinedObj({
26807
+ pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
26808
+ pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
26809
+ header: !isNullOrUndefined(pdf.Header) ? {
26810
+ fromTop: pdf.Header.FromTop,
26811
+ height: pdf.Header.Height,
26812
+ contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
26813
+ } : null,
26814
+ columns: pdf.Columns,
26815
+ footer: !isNullOrUndefined(pdf.Footer) ? {
26816
+ fromTop: pdf.Footer.FromBottom,
26817
+ height: pdf.Footer.Height,
26818
+ contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
26819
+ } : null,
26820
+ includeHiddenColumn: pdf.IncludeHiddenColumn,
26821
+ dataSource: pdf.DataSource,
26822
+ exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
26823
+ theme: !isNullOrUndefined(pdf.Theme) ? {
26824
+ header: pdf.Theme.Header,
26825
+ record: pdf.Theme.Record,
26826
+ caption: pdf.Theme.Caption
26827
+ } : null,
26828
+ fileName: pdf.FileName,
26829
+ hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
26830
+ allowHorizontalOverflow: pdf.AllowHorizontalOverflow
26831
+ });
26832
+ return values;
26833
+ };
26834
+ /* eslint-disable */
26835
+ PivotExportUtil.formatExcelStyle = function (style) {
26836
+ var prop;
26837
+ /* eslint-enable */
26838
+ if (!isNullOrUndefined(style)) {
26839
+ prop = this.getDefinedObj({
26840
+ fontColor: style.FontColor,
26841
+ fontName: style.FontName,
26842
+ fontSize: style.FontSize,
26843
+ hAlign: style.HAlign === String ? style.HAlign : null,
26844
+ vAlign: style.VAlign === String ? style.VAlign : null,
26845
+ bold: style.Bold,
26846
+ indent: style.Indent,
26847
+ italic: style.Italic,
26848
+ underline: style.Underline,
26849
+ backColor: style.BackColor,
26850
+ wrapText: style.WrapText,
26851
+ borders: style.Borders,
26852
+ numberFormat: style.NumberFormat,
26853
+ type: style.Type
26854
+ });
26855
+ }
26856
+ return prop;
26857
+ };
26858
+ /* eslint-disable */
26859
+ PivotExportUtil.formatExcelCell = function (cell) {
26860
+ var cells = [];
26861
+ if (!isNullOrUndefined(cell)) {
26862
+ for (var i = 0; i < cell.length; i++) {
26863
+ this.getDefinedObj({
26864
+ index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
26865
+ colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
26866
+ value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
26867
+ hyperlink: {
26868
+ target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
26869
+ displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
26870
+ },
26871
+ styles: this.formatExcelStyle(cell[i].Style),
26872
+ rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
26873
+ });
26874
+ /* eslint-enable */
26875
+ }
26876
+ }
26877
+ return cells;
26878
+ };
26879
+ /* eslint-disable */
26880
+ PivotExportUtil.formatExcelHeaderFooter = function (excel) {
26881
+ var rows = [];
26882
+ if (!isNullOrUndefined(excel)) {
26883
+ for (var i = 0; i < excel.Rows.length; i++) {
26884
+ var row = excel.Rows[i];
26885
+ var prop = this.getDefinedObj({
26886
+ index: !isNullOrUndefined(row.Index) ? row.Index : null,
26887
+ cells: this.formatExcelCell(row.Cells),
26888
+ grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
26889
+ });
26890
+ rows.push(prop);
26891
+ }
26892
+ }
26893
+ return rows;
26894
+ };
26895
+ PivotExportUtil.formatExcelExportProperties = function (excel) {
26896
+ /* eslint-enable */
26897
+ var prop;
26898
+ prop = this.getDefinedObj({
26899
+ dataSource: excel.DataSource,
26900
+ query: excel.Query,
26901
+ multipleExport: this.getDefinedObj({
26902
+ type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
26903
+ blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
26904
+ }),
26905
+ header: this.getDefinedObj({
26906
+ headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
26907
+ rows: this.formatExcelHeaderFooter(excel.Header)
26908
+ }),
26909
+ footer: this.getDefinedObj({
26910
+ footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
26911
+ rows: this.formatExcelHeaderFooter(excel.Footer)
26912
+ }),
26913
+ columns: excel.Columns,
26914
+ exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
26915
+ includeHiddenColumn: excel.IncludeHiddenColumn,
26916
+ theme: !isNullOrUndefined(excel.Theme) ? {
26917
+ header: this.formatExcelStyle(excel.Theme.Header),
26918
+ record: this.formatExcelStyle(excel.Theme.Record),
26919
+ caption: this.formatExcelStyle(excel.Theme.Caption)
26920
+ } : undefined,
26921
+ fileName: excel.FileName,
26922
+ hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
26923
+ });
26924
+ return prop;
26925
+ };
26926
+ return PivotExportUtil;
26927
+ }());
26928
+
26237
26929
  /**
26238
26930
  * @hidden
26239
26931
  * `ExcelExport` module is used to handle the Excel export action.
@@ -26301,7 +26993,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26301
26993
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
26302
26994
  /** Event trigerring */
26303
26995
  var clonedValues;
26304
- var currentPivotValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
26996
+ var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26305
26997
  var customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
26306
26998
  if (isHeaderSet) {
26307
26999
  this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
@@ -26311,7 +27003,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26311
27003
  this.engine.pageSettings = null;
26312
27004
  this.engine.generateGridData(this.parent.dataSourceSettings, true);
26313
27005
  this.parent.applyFormatting(this.engine.pivotValues);
26314
- clonedValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27006
+ clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26315
27007
  this.engine.pivotValues = currentPivotValues;
26316
27008
  this.engine.pageSettings = pageSettings;
26317
27009
  }
@@ -26355,15 +27047,17 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26355
27047
  var pivotCell = pivotValues[rCnt][cCnt];
26356
27048
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26357
27049
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
26358
- if (pivotCell.type === 'grand sum') {
26359
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26360
- this.parent.localeObj.getConstant('grandTotal');
27050
+ var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
27051
+ || (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
27052
+ if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
27053
+ cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
26361
27054
  }
26362
27055
  else if (pivotCell.type === 'sum') {
26363
27056
  cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
26364
27057
  }
26365
27058
  else {
26366
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
27059
+ cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
27060
+ === pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26367
27061
  }
26368
27062
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26369
27063
  cells.push({
@@ -26877,13 +27571,13 @@ var PDFExport = /** @__PURE__ @class */ (function () {
26877
27571
  var _this = this;
26878
27572
  /** Event trigerring */
26879
27573
  var clonedValues;
26880
- var currentPivotValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27574
+ var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26881
27575
  if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
26882
27576
  var pageSettings = this.engine.pageSettings;
26883
27577
  this.engine.pageSettings = null;
26884
27578
  this.engine.generateGridData(this.parent.dataSourceSettings, true);
26885
27579
  this.parent.applyFormatting(this.engine.pivotValues);
26886
- clonedValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27580
+ clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26887
27581
  this.engine.pivotValues = currentPivotValues;
26888
27582
  this.engine.pageSettings = pageSettings;
26889
27583
  }
@@ -27375,31 +28069,50 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
27375
28069
  return axisWrapper;
27376
28070
  };
27377
28071
  DialogRenderer.prototype.showCalculatedField = function (event) {
27378
- if (!this.parent.isAdaptive) {
27379
- if (this.parent.dialogRenderer.fieldListDialog) {
27380
- this.parent.dialogRenderer.fieldListDialog.hide();
27381
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28072
+ try {
28073
+ if (!this.parent.isAdaptive) {
28074
+ this.parent.actionObj.actionName = openCalculatedField;
28075
+ if (this.parent.actionBeginMethod()) {
28076
+ return;
28077
+ }
28078
+ if (this.parent.dialogRenderer.fieldListDialog) {
28079
+ this.parent.dialogRenderer.fieldListDialog.hide();
28080
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28081
+ }
27382
28082
  }
28083
+ this.parent.notify(initCalculatedField, {});
28084
+ }
28085
+ catch (execption) {
28086
+ this.parent.actionFailureMethod(execption);
27383
28087
  }
27384
- this.parent.notify(initCalculatedField, {});
27385
28088
  };
27386
28089
  DialogRenderer.prototype.showFieldListDialog = function (event) {
27387
28090
  var activeindex = this.adaptiveElement.selectedItem;
27388
28091
  this.parent.treeViewModule.render(activeindex);
27389
28092
  };
27390
28093
  DialogRenderer.prototype.onShowFieldList = function () {
27391
- if (this.parent.allowDeferLayoutUpdate) {
27392
- if (this.parent.isAdaptive) {
27393
- this.parent.axisFieldModule.render();
28094
+ this.parent.actionObj.actionName = showFieldList;
28095
+ if (this.parent.actionBeginMethod()) {
28096
+ return;
28097
+ }
28098
+ this.parent.actionObj.actionName = '';
28099
+ try {
28100
+ if (this.parent.allowDeferLayoutUpdate) {
28101
+ if (this.parent.isAdaptive) {
28102
+ this.parent.axisFieldModule.render();
28103
+ }
28104
+ this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
28105
+ this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
27394
28106
  }
27395
- this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
27396
- this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
28107
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28108
+ this.parent.dialogRenderer.fieldListDialog.show();
28109
+ this.parent.dialogRenderer.fieldListDialog.element.style.top =
28110
+ parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
28111
+ '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
28112
+ }
28113
+ catch (execption) {
28114
+ this.parent.actionFailureMethod(execption);
27397
28115
  }
27398
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
27399
- this.parent.dialogRenderer.fieldListDialog.show();
27400
- this.parent.dialogRenderer.fieldListDialog.element.style.top =
27401
- parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
27402
- '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
27403
28116
  };
27404
28117
  DialogRenderer.prototype.onCloseFieldList = function () {
27405
28118
  if (this.parent.allowDeferLayoutUpdate) {
@@ -27427,6 +28140,10 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
27427
28140
  }
27428
28141
  }
27429
28142
  this.parent.dialogRenderer.fieldListDialog.hide();
28143
+ this.parent.actionObj.actionName = closeFieldlist;
28144
+ if (this.parent.actionObj.actionName) {
28145
+ this.parent.actionCompleteMethod();
28146
+ }
27430
28147
  };
27431
28148
  DialogRenderer.prototype.removeFieldListIcon = function () {
27432
28149
  if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
@@ -28316,28 +29033,41 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28316
29033
  TreeViewRenderer.prototype.updateSorting = function (args) {
28317
29034
  var target = args.target;
28318
29035
  var option = target.getAttribute('data-sort');
28319
- if (target.className.indexOf('e-selected') === -1) {
28320
- switch (option) {
28321
- case 'None':
28322
- this.fieldListSort = 'None';
28323
- addClass([target], 'e-selected');
28324
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
28325
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
28326
- break;
28327
- case 'Ascend':
28328
- this.fieldListSort = 'Ascend';
28329
- addClass([target], 'e-selected');
28330
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
28331
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
28332
- break;
28333
- case 'Descend':
28334
- this.fieldListSort = 'Descend';
28335
- addClass([target], 'e-selected');
28336
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
28337
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
28338
- break;
29036
+ this.parent.actionObj.actionName = sortFieldTree;
29037
+ if (this.parent.actionBeginMethod()) {
29038
+ return;
29039
+ }
29040
+ try {
29041
+ if (target.className.indexOf('e-selected') === -1) {
29042
+ switch (option) {
29043
+ case 'None':
29044
+ this.fieldListSort = 'None';
29045
+ addClass([target], 'e-selected');
29046
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
29047
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
29048
+ break;
29049
+ case 'Ascend':
29050
+ this.fieldListSort = 'Ascend';
29051
+ addClass([target], 'e-selected');
29052
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
29053
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
29054
+ break;
29055
+ case 'Descend':
29056
+ this.fieldListSort = 'Descend';
29057
+ addClass([target], 'e-selected');
29058
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
29059
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
29060
+ break;
29061
+ }
29062
+ this.refreshTreeView();
28339
29063
  }
28340
- this.refreshTreeView();
29064
+ }
29065
+ catch (execption) {
29066
+ this.parent.actionFailureMethod(execption);
29067
+ }
29068
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
29069
+ if (this.parent.actionObj.actionName) {
29070
+ this.parent.actionCompleteMethod();
28341
29071
  }
28342
29072
  };
28343
29073
  /* eslint-disable */
@@ -28705,7 +29435,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28705
29435
  attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
28706
29436
  className: ICON + ' ' + CALC_EDIT
28707
29437
  });
28708
- if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
29438
+ if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
28709
29439
  removeClass([calcElement], ICON_DISABLE);
28710
29440
  }
28711
29441
  else {
@@ -28718,7 +29448,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28718
29448
  className: ICON + ' ' + REMOVE_CLASS
28719
29449
  });
28720
29450
  if (this.parent.getModuleName() === 'pivotview') {
28721
- if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
29451
+ if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
28722
29452
  removeClass([removeElement], ICON_DISABLE);
28723
29453
  }
28724
29454
  else {
@@ -28726,7 +29456,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28726
29456
  }
28727
29457
  }
28728
29458
  else {
28729
- if (field[i].showRemoveIcon) {
29459
+ if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
28730
29460
  removeClass([removeElement], ICON_DISABLE);
28731
29461
  }
28732
29462
  else {
@@ -28758,13 +29488,13 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28758
29488
  }
28759
29489
  if (axis === 'values') {
28760
29490
  var _loop_1 = function (element) {
28761
- if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.chartModule) {
29491
+ if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.pivotChartModule) {
28762
29492
  var valueData = field.map(function (item) { return { text: item.caption ? item.caption : item.name, value: item.name }; });
28763
29493
  var parent_1 = this_1.parent;
28764
29494
  if (this_1.valueFiedDropDownList && element.querySelector('.' + GROUP_CHART_VALUE_DROPDOWN_DIV)) {
28765
29495
  this_1.valueFiedDropDownList.dataSource = valueData;
28766
29496
  this_1.valueFiedDropDownList.value = !parent_1.chartSettings.enableMultipleAxis ?
28767
- parent_1.chartModule.currentMeasure : valueData[0].value;
29497
+ parent_1.pivotChartModule.currentMeasure : valueData[0].value;
28768
29498
  }
28769
29499
  else {
28770
29500
  var ddlDiv = createElement('div', { className: GROUP_CHART_VALUE_DROPDOWN_DIV });
@@ -28774,7 +29504,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28774
29504
  enableRtl: this_1.parent.enableRtl,
28775
29505
  locale: this_1.parent.locale,
28776
29506
  value: !parent_1.chartSettings.enableMultipleAxis ?
28777
- parent_1.chartModule.currentMeasure : valueData[0].value,
29507
+ parent_1.pivotChartModule.currentMeasure : valueData[0].value,
28778
29508
  width: 200,
28779
29509
  fields: { value: 'value', text: 'text' },
28780
29510
  cssClass: GROUP_CHART_VALUE_DROPDOWN,
@@ -28799,14 +29529,14 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28799
29529
  var availColindex = undefined;
28800
29530
  for (var _g = 0, _h = this.parentElement.querySelectorAll('.e-group-' + axis); _g < _h.length; _g++) {
28801
29531
  var element = _h[_g];
28802
- if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.chartModule) {
28803
- var currentMeasure = this.parent.chartModule.currentMeasure;
29532
+ if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
29533
+ var currentMeasure = this.parent.pivotChartModule.currentMeasure;
28804
29534
  var delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
28805
29535
  var columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
28806
29536
  this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
28807
29537
  var engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
28808
29538
  var pivotValues = engineModule.pivotValues;
28809
- var totColIndex = this.parent.chartModule.getColumnTotalIndex(pivotValues);
29539
+ var totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
28810
29540
  var rKeys = Object.keys(pivotValues);
28811
29541
  var columnData = [];
28812
29542
  var firstValueRow = false;
@@ -28918,7 +29648,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28918
29648
  },
28919
29649
  className: PIVOT_BUTTON_CONTENT_CLASS + ' ' +
28920
29650
  (this.parent.getModuleName() === 'pivotview' ?
28921
- this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : DRAG_DISABLE_CLASS : ''),
29651
+ this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS : ''),
28922
29652
  innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
28923
29653
  text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
28924
29654
  text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
@@ -28984,43 +29714,54 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28984
29714
  };
28985
29715
  PivotButton.prototype.openCalculatedFieldDialog = function (args) {
28986
29716
  var fieldName = args.target.parentElement.id;
28987
- if (this.parent.getModuleName() === 'pivotview') {
28988
- if (this.parent.isAdaptive && (this.parent.showFieldList &&
28989
- this.parent.pivotFieldListModule &&
28990
- !this.parent.pivotFieldListModule.isDestroyed)) {
28991
- this.parent.pivotFieldListModule.element
28992
- .querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
28993
- this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
28994
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
28995
- this.parent.pivotFieldListModule.calculatedFieldModule
28996
- .updateAdaptiveCalculatedField(true, fieldName);
28997
- }
28998
- else {
28999
- if (!this.parent.isAdaptive) {
29000
- this.parent.calculatedFieldModule.buttonCall = true;
29001
- }
29002
- this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
29003
- }
29717
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
29718
+ this.parent.actionObj.actionName = editCalculatedField;
29719
+ this.parent.actionObj.fieldInfo = fieldInfo;
29720
+ if (this.parent.actionBeginMethod()) {
29721
+ return;
29004
29722
  }
29005
- else if (this.parent.getModuleName() === 'pivotfieldlist') {
29006
- if (this.parent.isAdaptive) {
29007
- this.parent.dialogRenderer.adaptiveElement.select(4);
29008
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
29009
- this.parent.calculatedFieldModule
29010
- .updateAdaptiveCalculatedField(true, fieldName);
29011
- this.parent.calculatedFieldModule.buttonCall = true;
29012
- }
29013
- else {
29014
- if (this.parent.dialogRenderer.fieldListDialog) {
29015
- this.parent.dialogRenderer.fieldListDialog.hide();
29016
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
29723
+ try {
29724
+ if (this.parent.getModuleName() === 'pivotview') {
29725
+ if (this.parent.isAdaptive && (this.parent.showFieldList &&
29726
+ this.parent.pivotFieldListModule &&
29727
+ !this.parent.pivotFieldListModule.isDestroyed)) {
29728
+ this.parent.pivotFieldListModule.element
29729
+ .querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
29730
+ this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
29731
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
29732
+ this.parent.pivotFieldListModule.calculatedFieldModule
29733
+ .updateAdaptiveCalculatedField(true, fieldName);
29734
+ }
29735
+ else {
29736
+ if (!this.parent.isAdaptive) {
29737
+ this.parent.calculatedFieldModule.buttonCall = true;
29738
+ }
29739
+ this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
29017
29740
  }
29018
- this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
29019
- if (this.parent.calculatedFieldModule) {
29741
+ }
29742
+ else if (this.parent.getModuleName() === 'pivotfieldlist') {
29743
+ if (this.parent.isAdaptive) {
29744
+ this.parent.dialogRenderer.adaptiveElement.select(4);
29745
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
29746
+ this.parent.calculatedFieldModule
29747
+ .updateAdaptiveCalculatedField(true, fieldName);
29020
29748
  this.parent.calculatedFieldModule.buttonCall = true;
29021
29749
  }
29750
+ else {
29751
+ if (this.parent.dialogRenderer.fieldListDialog) {
29752
+ this.parent.dialogRenderer.fieldListDialog.hide();
29753
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
29754
+ }
29755
+ this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
29756
+ if (this.parent.calculatedFieldModule) {
29757
+ this.parent.calculatedFieldModule.buttonCall = true;
29758
+ }
29759
+ }
29022
29760
  }
29023
29761
  }
29762
+ catch (execption) {
29763
+ this.parent.actionFailureMethod(execption);
29764
+ }
29024
29765
  };
29025
29766
  PivotButton.prototype.createDraggable = function (field, target) {
29026
29767
  this.draggable = new Draggable(target, {
@@ -29044,7 +29785,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29044
29785
  attrs: {
29045
29786
  'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
29046
29787
  },
29047
- className: ICON + ' ' + DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : DRAG_DISABLE_CLASS)
29788
+ className: ICON + ' ' + DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS)
29048
29789
  });
29049
29790
  dragWrapper.appendChild(dragElement);
29050
29791
  if (this.parent.getModuleName() === 'pivotfieldlist') {
@@ -29410,38 +30151,52 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29410
30151
  !(args.target.classList.contains(DRAG_CLASS)) &&
29411
30152
  (buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
29412
30153
  isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
29413
- if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
29414
- this.parent.dataSourceSettings.enableSorting &&
29415
- !(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
29416
- this.parent.pivotGridModule !== undefined &&
29417
- this.parent.pivotGridModule.enableVirtualization) ||
29418
- (this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
29419
- if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
29420
- (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
29421
- this.parent.pivotGridModule.enableValueSorting))) {
29422
- if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
29423
- if (args.target.classList.contains('e-pivot-button')) {
29424
- if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
29425
- this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: '' } } }, true);
30154
+ this.parent.actionObj.actionName = sortField;
30155
+ this.parent.actionObj.fieldInfo = fieldInfo;
30156
+ if (this.parent.actionBeginMethod()) {
30157
+ return;
30158
+ }
30159
+ try {
30160
+ if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
30161
+ this.parent.dataSourceSettings.enableSorting &&
30162
+ !(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
30163
+ this.parent.pivotGridModule !== undefined &&
30164
+ this.parent.pivotGridModule.enableVirtualization) ||
30165
+ (this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
30166
+ if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
30167
+ (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
30168
+ this.parent.pivotGridModule.enableValueSorting))) {
30169
+ if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
30170
+ if (args.target.classList.contains('e-pivot-button')) {
30171
+ if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
30172
+ this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
30173
+ }
29426
30174
  }
29427
- }
29428
- else {
29429
- if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
29430
- this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: '' } } }, true);
30175
+ else {
30176
+ if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
30177
+ this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
30178
+ }
29431
30179
  }
29432
30180
  }
29433
30181
  }
30182
+ this.parent.pivotCommon.eventBase.updateSorting(args);
30183
+ if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
30184
+ var actionInfo = {
30185
+ sortInfo: this.parent.lastSortInfo
30186
+ };
30187
+ this.parent.actionObj.actionInfo = actionInfo;
30188
+ this.updateDataSource(true);
30189
+ }
30190
+ /* eslint-disable */
30191
+ var thisObj = this;
30192
+ /* eslint-enable */
30193
+ if (thisObj.parent instanceof PivotFieldList) {
30194
+ thisObj.axisField.render();
30195
+ }
29434
30196
  }
29435
- this.parent.pivotCommon.eventBase.updateSorting(args);
29436
- if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
29437
- this.updateDataSource(true);
29438
- }
29439
- /* eslint-disable */
29440
- var thisObj = this;
29441
- /* eslint-enable */
29442
- if (thisObj.parent instanceof PivotFieldList) {
29443
- thisObj.axisField.render();
29444
- }
30197
+ }
30198
+ catch (execption) {
30199
+ this.parent.actionFailureMethod(execption);
29445
30200
  }
29446
30201
  }
29447
30202
  };
@@ -29473,26 +30228,37 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29473
30228
  PivotButton.prototype.updateFiltering = function (args) {
29474
30229
  /* eslint-disable */
29475
30230
  var pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
29476
- if (pivotObj.getModuleName() === 'pivotfieldlist') {
29477
- showSpinner(pivotObj.fieldListSpinnerElement);
29478
- }
29479
- else {
29480
- pivotObj.showWaitingPopup();
29481
- }
29482
- pivotObj.mouseEventArgs = args;
29483
- pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
29484
- this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
29485
30231
  var fieldName = args.target.parentElement.id;
29486
- if (pivotObj.dataSourceSettings.mode === 'Server') {
29487
- if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
29488
- this.updateFilterEvents();
30232
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
30233
+ this.parent.actionObj.actionName = filterField;
30234
+ this.parent.actionObj.fieldInfo = fieldInfo;
30235
+ if (this.parent.actionBeginMethod()) {
30236
+ return;
30237
+ }
30238
+ try {
30239
+ if (pivotObj.getModuleName() === 'pivotfieldlist') {
30240
+ showSpinner(pivotObj.fieldListSpinnerElement);
29489
30241
  }
29490
30242
  else {
29491
- pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
30243
+ pivotObj.showWaitingPopup();
30244
+ }
30245
+ pivotObj.mouseEventArgs = args;
30246
+ pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
30247
+ this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
30248
+ if (pivotObj.dataSourceSettings.mode === 'Server') {
30249
+ if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
30250
+ this.updateFilterEvents();
30251
+ }
30252
+ else {
30253
+ pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
30254
+ }
30255
+ }
30256
+ else {
30257
+ this.updateFilterEvents();
29492
30258
  }
29493
30259
  }
29494
- else {
29495
- this.updateFilterEvents();
30260
+ catch (execption) {
30261
+ this.parent.actionFailureMethod(execption);
29496
30262
  }
29497
30263
  /* eslint-enable */
29498
30264
  };
@@ -29505,11 +30271,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29505
30271
  var target = pivotObj.mouseEventArgs.target;
29506
30272
  this.fieldName = target.parentElement.id;
29507
30273
  if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
29508
- this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
29509
- this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
29510
- // this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
29511
- // this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
29512
- // this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
29513
30274
  this.bindDialogEvents();
29514
30275
  }
29515
30276
  if (pivotObj.getModuleName() === 'pivotfieldlist') {
@@ -29523,8 +30284,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29523
30284
  if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
29524
30285
  this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
29525
30286
  this.updateDialogButtonEvents();
29526
- this.dialogPopUp.buttons = this.buttonModel();
29527
- this.dialogPopUp.dataBind();
30287
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
30288
+ this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
29528
30289
  this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
29529
30290
  }
29530
30291
  else if (this.parent.dataSourceSettings.allowMemberFilter) {
@@ -29549,7 +30310,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29549
30310
  click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
29550
30311
  },
29551
30312
  {
29552
- click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
30313
+ click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
29553
30314
  buttonModel: { cssClass: CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
29554
30315
  }
29555
30316
  ];
@@ -29557,25 +30318,25 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29557
30318
  PivotButton.prototype.tabSelect = function (e) {
29558
30319
  this.index = e.selectedIndex;
29559
30320
  this.updateDialogButtonEvents();
29560
- removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
30321
+ removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
29561
30322
  if (e.selectedIndex > 0) {
29562
- addClass([this.dialogPopUp.element.querySelector('.e-filter-div-content' + '.' + (e.selectedIndex === 1 && this.parent.dataSourceSettings.allowLabelFilter ? 'e-label-filter' : 'e-value-filter'))], 'e-selected-tab');
30323
+ addClass([this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-filter-div-content' + '.' + (e.selectedIndex === 1 && this.parent.dataSourceSettings.allowLabelFilter ? 'e-label-filter' : 'e-value-filter'))], 'e-selected-tab');
29563
30324
  }
29564
30325
  if (e.selectedIndex === 0) {
29565
30326
  this.parent.pivotCommon.filterDialog.updateCheckedState();
29566
30327
  }
29567
30328
  else {
29568
- this.dialogPopUp.buttons[0].buttonModel.disabled = false;
29569
- this.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
30329
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
30330
+ this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
29570
30331
  }
29571
30332
  };
29572
30333
  PivotButton.prototype.updateDialogButtonEvents = function () {
29573
- this.dialogPopUp.buttons = this.buttonModel();
29574
- this.dialogPopUp.dataBind();
30334
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
30335
+ this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
29575
30336
  };
29576
30337
  PivotButton.prototype.updateCustomFilter = function (args) {
29577
30338
  var _this = this;
29578
- var dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
30339
+ var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
29579
30340
  var fieldName = dialogElement.getAttribute('data-fieldname');
29580
30341
  var levelName = dialogElement.getAttribute('data-selectedField');
29581
30342
  var filterType = dialogElement.getAttribute('data-type');
@@ -29646,39 +30407,18 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29646
30407
  if (type !== 'Value') {
29647
30408
  _this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, _this.parent.dataSourceSettings.filterSettings);
29648
30409
  }
29649
- _this.dialogPopUp.close();
30410
+ _this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29650
30411
  if (!observedArgs.cancel) {
29651
30412
  _this.refreshPivotButtonState(fieldName, true);
29652
30413
  _this.updateDataSource(true);
29653
30414
  }
29654
30415
  });
29655
30416
  };
29656
- PivotButton.prototype.removeFilterDialog = function () {
29657
- if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
29658
- this.dialogPopUp.destroy();
29659
- setTimeout(this.setFocus.bind(this));
29660
- }
29661
- if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
29662
- remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
29663
- }
29664
- };
29665
- PivotButton.prototype.setFocus = function () {
29666
- if (this.parentElement) {
29667
- var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
29668
- for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
29669
- var item = pivotButtons_1[_i];
29670
- if (item.getAttribute('data-uid') === this.fieldName) {
29671
- item.focus();
29672
- break;
29673
- }
29674
- }
29675
- }
29676
- };
29677
30417
  PivotButton.prototype.ClearFilter = function (e) {
29678
- var dialogElement = this.dialogPopUp.element;
30418
+ var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
29679
30419
  var fieldName = dialogElement.getAttribute('data-fieldname');
29680
30420
  var tabElement = dialogElement.querySelector('.e-selected-tab');
29681
- this.dialogPopUp.close();
30421
+ this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29682
30422
  if (this.parent.dataType === 'olap' && tabElement) {
29683
30423
  var levelName = tabElement.getAttribute('data-selectedField');
29684
30424
  this.removeDataSourceSettings(fieldName, levelName);
@@ -29695,63 +30435,73 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29695
30435
  var target = args.target;
29696
30436
  var fieldName = target.parentElement.id;
29697
30437
  var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
30438
+ this.parent.actionObj.actionName = removeField;
30439
+ this.parent.actionObj.fieldInfo = fieldInfo;
30440
+ if (this.parent.actionBeginMethod()) {
30441
+ return;
30442
+ }
29698
30443
  var removeFieldArgs = {
29699
30444
  cancel: false, fieldName: fieldName,
29700
30445
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
29701
30446
  fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
29702
30447
  };
29703
- var control = this.parent.getModuleName() === 'pivotfieldlist' &&
29704
- this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
29705
- control.trigger(fieldRemove, removeFieldArgs, function (observedArgs) {
29706
- if (!observedArgs.cancel) {
29707
- if (target.parentElement.getAttribute('isvalue') === 'true') {
29708
- _this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
29709
- if (_this.parent.dataType === 'olap') {
29710
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30448
+ try {
30449
+ var control = this.parent.getModuleName() === 'pivotfieldlist' &&
30450
+ this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
30451
+ control.trigger(fieldRemove, removeFieldArgs, function (observedArgs) {
30452
+ if (!observedArgs.cancel) {
30453
+ if (target.parentElement.getAttribute('isvalue') === 'true') {
30454
+ _this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
30455
+ if (_this.parent.dataType === 'olap') {
30456
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30457
+ }
29711
30458
  }
29712
- }
29713
- else {
29714
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
29715
- if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
29716
- fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
29717
- observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
29718
- _this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
30459
+ else {
30460
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
30461
+ if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
30462
+ fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
30463
+ observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
30464
+ _this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
30465
+ }
30466
+ if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
30467
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30468
+ }
29719
30469
  }
29720
- if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
29721
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30470
+ if (_this.parent.getModuleName() === 'pivotfieldlist') {
30471
+ _this.parent.axisFieldModule.render();
29722
30472
  }
30473
+ _this.updateDataSource();
29723
30474
  }
29724
- if (_this.parent.getModuleName() === 'pivotfieldlist') {
29725
- _this.parent.axisFieldModule.render();
29726
- }
29727
- _this.updateDataSource();
29728
- }
29729
- });
30475
+ });
30476
+ }
30477
+ catch (execption) {
30478
+ this.parent.actionFailureMethod(execption);
30479
+ }
29730
30480
  };
29731
30481
  /** @hidden */
29732
30482
  PivotButton.prototype.nodeStateModified = function (args) {
29733
30483
  var target = closest(args.node, 'li');
29734
30484
  var fieldName = target.getAttribute('data-fieldname');
29735
30485
  if (target.getAttribute('data-memberId') === 'all') {
29736
- this.memberTreeView.nodeChecked = null;
30486
+ this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
29737
30487
  if (args.action === 'check') {
29738
- this.memberTreeView.checkAll();
30488
+ this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
29739
30489
  }
29740
30490
  else {
29741
- this.memberTreeView.uncheckAll();
30491
+ this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
29742
30492
  }
29743
30493
  if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
29744
30494
  !this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
29745
- this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
30495
+ this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
29746
30496
  }
29747
30497
  this.checkedStateAll(args.action);
29748
- this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
30498
+ this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
29749
30499
  }
29750
30500
  else {
29751
30501
  if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
29752
30502
  !this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
29753
30503
  // let st1: number = new Date().getTime();
29754
- var checkedNodes = this.memberTreeView.getAllCheckedNodes();
30504
+ var checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
29755
30505
  // let st2: number = (new Date().getTime() - st1) / 1000;
29756
30506
  // console.log('getAllCheckedNodes:' + st2);
29757
30507
  this.updateNodeStates(checkedNodes, fieldName, args.action);
@@ -29794,8 +30544,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29794
30544
  }
29795
30545
  if (currentMembers[member]) {
29796
30546
  currentMembers[member].isSelected = false;
29797
- if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
29798
- var element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
30547
+ if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
30548
+ var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
29799
30549
  if (element && !element.querySelector('ul')) {
29800
30550
  this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
29801
30551
  }
@@ -29805,8 +30555,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29805
30555
  for (var _a = 0, checkedNodes_1 = checkedNodes; _a < checkedNodes_1.length; _a++) {
29806
30556
  var node = checkedNodes_1[_a];
29807
30557
  if (currentMembers[node]) {
29808
- if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
29809
- var element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
30558
+ if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
30559
+ var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
29810
30560
  if (element && !element.querySelector('ul')) {
29811
30561
  currentMembers[node].isSelected = true;
29812
30562
  this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
@@ -29844,10 +30594,10 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29844
30594
  !engineModule.fieldList[fieldName].isHierarchy) {
29845
30595
  var cMembers = engineModule.fieldList[fieldName].members;
29846
30596
  var sMembers = engineModule.fieldList[fieldName].currrentMembers;
29847
- filterItem.items = this.memberTreeView.getAllCheckedNodes();
30597
+ filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
29848
30598
  filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
29849
30599
  isNodeUnChecked = (filterItem.items.length ===
29850
- this.memberTreeView.fields.dataSource.length ? false : true);
30600
+ this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
29851
30601
  if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
29852
30602
  var cNodeLength = Object.keys(cMembers).length;
29853
30603
  var sNodeLength = Object.keys(sMembers).length;
@@ -29910,13 +30660,17 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29910
30660
  }
29911
30661
  _this.parent.dataSourceSettings.filterSettings.push(filterItem);
29912
30662
  }
29913
- _this.dialogPopUp.close();
30663
+ _this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29914
30664
  if (!observedArgs.cancel) {
29915
30665
  _this.refreshPivotButtonState(fieldName, isNodeUnChecked);
29916
30666
  if (!isNodeUnChecked) {
29917
30667
  _this.removeDataSourceSettings(fieldName);
29918
30668
  }
29919
30669
  _this.parent.lastFilterInfo = filterItem;
30670
+ var actionInfo = {
30671
+ filterInfo: _this.parent.lastFilterInfo
30672
+ };
30673
+ _this.parent.actionObj.actionInfo = actionInfo;
29920
30674
  _this.updateDataSource(true);
29921
30675
  var thisObj = _this;
29922
30676
  //setTimeout(() => {
@@ -29926,8 +30680,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29926
30680
  //});
29927
30681
  }
29928
30682
  var pivotButtons = [].slice.call(_this.parentElement.querySelectorAll('.e-pivot-button'));
29929
- for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
29930
- var item = pivotButtons_2[_i];
30683
+ for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
30684
+ var item = pivotButtons_1[_i];
29931
30685
  if (item.getAttribute('data-uid') === fieldName) {
29932
30686
  item.focus();
29933
30687
  break;
@@ -29938,8 +30692,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29938
30692
  PivotButton.prototype.refreshPivotButtonState = function (fieldName, isFiltered) {
29939
30693
  var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
29940
30694
  var selectedButton;
29941
- for (var _i = 0, pivotButtons_3 = pivotButtons; _i < pivotButtons_3.length; _i++) {
29942
- var item = pivotButtons_3[_i];
30695
+ for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
30696
+ var item = pivotButtons_2[_i];
29943
30697
  if (item.getAttribute('data-uid') === fieldName) {
29944
30698
  selectedButton = item.querySelector('.' + FILTER_COMMON_CLASS);
29945
30699
  break;
@@ -30072,14 +30826,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
30072
30826
  this.columnFieldDropDownList.destroy();
30073
30827
  this.columnFieldDropDownList = null;
30074
30828
  }
30075
- if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
30076
- this.memberTreeView.destroy();
30077
- this.memberTreeView = null;
30078
- }
30079
- if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
30080
- this.dialogPopUp.destroy();
30081
- this.dialogPopUp = null;
30082
- }
30083
30829
  if (this.draggable && !this.draggable.isDestroyed) {
30084
30830
  this.draggable.destroy();
30085
30831
  this.draggable = null;
@@ -30236,6 +30982,8 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
30236
30982
  _this.enableValueSorting = false;
30237
30983
  _this.request = new XMLHttpRequest();
30238
30984
  _this.remoteData = [];
30985
+ /** @hidden */
30986
+ _this.actionObj = {};
30239
30987
  return _this;
30240
30988
  }
30241
30989
  /**
@@ -30467,7 +31215,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
30467
31215
  enableValueSorting: enableValueSorting,
30468
31216
  isDrillThrough: isDrillThrough,
30469
31217
  localeObj: localeObj,
30470
- clonedReport: this.clonedReport
31218
+ clonedReport: this.clonedReport,
31219
+ globalize: this.globalize,
31220
+ currenyCode: this.currencyCode
30471
31221
  };
30472
31222
  }
30473
31223
  return customProperties;
@@ -31158,6 +31908,11 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31158
31908
  pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
31159
31909
  }
31160
31910
  });
31911
+ var actionName = this.getActionCompleteName();
31912
+ this.actionObj.actionName = actionName;
31913
+ if (this.actionObj.actionName) {
31914
+ this.actionCompleteMethod();
31915
+ }
31161
31916
  };
31162
31917
  PivotFieldList.prototype.updateOlapDataSource = function (pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
31163
31918
  var customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
@@ -31191,6 +31946,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31191
31946
  PivotFieldList.prototype.update = function (control) {
31192
31947
  if (control) {
31193
31948
  this.clonedDataSet = control.clonedDataSet;
31949
+ this.clonedReport = control.clonedReport;
31194
31950
  this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
31195
31951
  this.engineModule = control.engineModule;
31196
31952
  this.olapEngineModule = control.olapEngineModule;
@@ -31225,6 +31981,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31225
31981
  PivotFieldList.prototype.updateView = function (control) {
31226
31982
  if (control) {
31227
31983
  control.clonedDataSet = this.clonedDataSet;
31984
+ control.clonedReport = this.clonedReport;
31228
31985
  control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
31229
31986
  control.engineModule = this.engineModule;
31230
31987
  control.olapEngineModule = this.olapEngineModule;
@@ -31268,6 +32025,47 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31268
32025
  }
31269
32026
  });
31270
32027
  };
32028
+ /** @hidden */
32029
+ PivotFieldList.prototype.actionBeginMethod = function () {
32030
+ var eventArgs = {
32031
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
32032
+ actionName: this.actionObj.actionName,
32033
+ fieldInfo: this.actionObj.fieldInfo,
32034
+ cancel: false
32035
+ };
32036
+ var control = this.isPopupView ? this.pivotGridModule : this;
32037
+ control.trigger(actionBegin, eventArgs);
32038
+ return eventArgs.cancel;
32039
+ };
32040
+ /** @hidden */
32041
+ PivotFieldList.prototype.actionCompleteMethod = function () {
32042
+ var eventArgs = {
32043
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
32044
+ actionName: this.actionObj.actionName,
32045
+ fieldInfo: this.actionObj.fieldInfo,
32046
+ actionInfo: this.actionObj.actionInfo
32047
+ };
32048
+ var control = this.isPopupView ? this.pivotGridModule : this;
32049
+ control.trigger(actionComplete, eventArgs);
32050
+ this.actionObj.actionName = '';
32051
+ this.actionObj.actionInfo = undefined;
32052
+ this.actionObj.fieldInfo = undefined;
32053
+ };
32054
+ /** @hidden */
32055
+ PivotFieldList.prototype.actionFailureMethod = function (error) {
32056
+ var eventArgs = {
32057
+ actionName: this.actionObj.actionName,
32058
+ errorInfo: error
32059
+ };
32060
+ var control = this.isPopupView ? this.pivotGridModule : this;
32061
+ control.trigger(actionFailure, eventArgs);
32062
+ };
32063
+ /** @hidden */
32064
+ PivotFieldList.prototype.getActionCompleteName = function () {
32065
+ var actionName = (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
32066
+ : (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == sortFieldTree ? fieldTreeSorted : this.actionObj.actionName;
32067
+ return actionName;
32068
+ };
31271
32069
  /**
31272
32070
  * Destroys the Field Table component.
31273
32071
  * @function destroy
@@ -31342,6 +32140,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31342
32140
  if (this.clonedDataSet) {
31343
32141
  this.clonedDataSet = null;
31344
32142
  }
32143
+ if (this.clonedReport) {
32144
+ this.clonedReport = null;
32145
+ }
31345
32146
  if (this.clonedFieldList) {
31346
32147
  this.clonedFieldList = null;
31347
32148
  }
@@ -31389,6 +32190,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31389
32190
  __decorate$4([
31390
32191
  Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
31391
32192
  ], PivotFieldList.prototype, "aggregateTypes", void 0);
32193
+ __decorate$4([
32194
+ Property('USD')
32195
+ ], PivotFieldList.prototype, "currencyCode", void 0);
31392
32196
  __decorate$4([
31393
32197
  Event()
31394
32198
  ], PivotFieldList.prototype, "load", void 0);
@@ -31437,6 +32241,15 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31437
32241
  __decorate$4([
31438
32242
  Event()
31439
32243
  ], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
32244
+ __decorate$4([
32245
+ Event()
32246
+ ], PivotFieldList.prototype, "actionBegin", void 0);
32247
+ __decorate$4([
32248
+ Event()
32249
+ ], PivotFieldList.prototype, "actionComplete", void 0);
32250
+ __decorate$4([
32251
+ Event()
32252
+ ], PivotFieldList.prototype, "actionFailure", void 0);
31440
32253
  PivotFieldList = __decorate$4([
31441
32254
  NotifyPropertyChanges
31442
32255
  ], PivotFieldList);
@@ -31671,105 +32484,114 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
31671
32484
  CalculatedField.prototype.displayMenu = function (node, treeNode, target) {
31672
32485
  var edit = target ? target.classList.contains(CALC_EDIT) : true;
31673
32486
  var edited = target ? target.classList.contains(CALC_EDITED) : true;
31674
- if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
31675
- node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
31676
- !node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
31677
- !node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
31678
- !node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
31679
- if (this.menuObj && !this.menuObj.isDestroyed) {
31680
- this.menuObj.destroy();
31681
- }
31682
- this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
31683
- this.openContextMenu(node);
31684
- }
31685
- else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
31686
- node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
31687
- (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
31688
- this.isEdit = true;
31689
- var fieldName = node.getAttribute('data-field');
31690
- var caption = node.getAttribute('data-caption');
31691
- this.currentFieldName = fieldName;
31692
- this.inputObj.value = caption;
31693
- this.inputObj.dataBind();
31694
- var formatString = node.getAttribute('data-formatString');
31695
- var dialogElement = this.dialog.element;
31696
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
31697
- if (this.parent.dataType === 'olap') {
31698
- var memberType = node.getAttribute('data-membertype');
31699
- var parentHierarchy = node.getAttribute('data-hierarchy');
31700
- var expression = node.getAttribute('data-formula');
31701
- var customString = node.getAttribute('data-customString');
31702
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
31703
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
31704
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
31705
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
31706
- /* eslint-enable max-len */
31707
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
31708
- select('#' + this.parentID + 'droppable', document).value = expression;
31709
- memberTypeDrop.readonly = true;
31710
- memberTypeDrop.value = memberType;
31711
- memberTypeDrop.dataBind();
31712
- if (memberType === 'Dimension') {
31713
- hierarchyDrop.value = parentHierarchy;
32487
+ try {
32488
+ if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
32489
+ node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
32490
+ !node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
32491
+ !node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
32492
+ !node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
32493
+ if (this.menuObj && !this.menuObj.isDestroyed) {
32494
+ this.menuObj.destroy();
32495
+ }
32496
+ this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
32497
+ this.openContextMenu(node);
32498
+ }
32499
+ else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
32500
+ node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
32501
+ (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
32502
+ this.isEdit = true;
32503
+ var fieldName = node.getAttribute('data-field');
32504
+ var caption = node.getAttribute('data-caption');
32505
+ this.currentFieldName = fieldName;
32506
+ this.inputObj.value = caption;
32507
+ this.inputObj.dataBind();
32508
+ var formatString = node.getAttribute('data-formatString');
32509
+ var dialogElement = this.dialog.element;
32510
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
32511
+ if (this.parent.dataType === 'olap') {
32512
+ var memberType = node.getAttribute('data-membertype');
32513
+ var parentHierarchy = node.getAttribute('data-hierarchy');
32514
+ var expression = node.getAttribute('data-formula');
32515
+ var customString = node.getAttribute('data-customString');
32516
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
32517
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
32518
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
32519
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
32520
+ /* eslint-enable max-len */
32521
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
32522
+ select('#' + this.parentID + 'droppable', document).value = expression;
32523
+ memberTypeDrop.readonly = true;
32524
+ memberTypeDrop.value = memberType;
32525
+ memberTypeDrop.dataBind();
32526
+ if (memberType === 'Dimension') {
32527
+ hierarchyDrop.value = parentHierarchy;
32528
+ }
32529
+ if (formatString !== '') {
32530
+ formatDrop.value = formatString;
32531
+ formatDrop.dataBind();
32532
+ }
32533
+ customFormat.value = customString;
32534
+ }
32535
+ else {
32536
+ customFormat.value = formatString;
32537
+ addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
32538
+ removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
32539
+ addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
32540
+ removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
32541
+ node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
32542
+ select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
31714
32543
  }
31715
- if (formatString !== '') {
31716
- formatDrop.value = formatString;
32544
+ customFormat.dataBind();
32545
+ }
32546
+ else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
32547
+ node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
32548
+ (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
32549
+ this.isEdit = false;
32550
+ this.inputObj.value = '';
32551
+ this.inputObj.dataBind();
32552
+ var dialogElement = this.dialog.element;
32553
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
32554
+ customFormat.value = '';
32555
+ customFormat.dataBind();
32556
+ if (this.parent.dataType === 'olap') {
32557
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
32558
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
32559
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
32560
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
32561
+ /* eslint-enable max-len */
32562
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
32563
+ hierarchyDrop.index = 0;
32564
+ hierarchyDrop.dataBind();
32565
+ formatDrop.index = 0;
31717
32566
  formatDrop.dataBind();
32567
+ memberTypeDrop.index = 0;
32568
+ memberTypeDrop.readonly = false;
32569
+ memberTypeDrop.dataBind();
32570
+ }
32571
+ else {
32572
+ addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
32573
+ removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
32574
+ node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
31718
32575
  }
31719
- customFormat.value = customString;
32576
+ select('#' + this.parentID + 'droppable', document).value = '';
31720
32577
  }
31721
- else {
31722
- customFormat.value = formatString;
31723
- addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
31724
- removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
31725
- addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
31726
- removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
31727
- node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
31728
- select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
32578
+ else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
32579
+ node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
32580
+ this.parent.actionObj.actionName = removeField;
32581
+ if (this.parent.actionBeginMethod()) {
32582
+ return;
32583
+ }
32584
+ var dropField = select('#' + this.parentID + 'droppable', document);
32585
+ var field = {
32586
+ name: this.isEdit ? this.currentFieldName : this.inputObj.value,
32587
+ caption: this.inputObj.value,
32588
+ formula: dropField.value
32589
+ };
32590
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
31729
32591
  }
31730
- customFormat.dataBind();
31731
32592
  }
31732
- else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
31733
- node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
31734
- (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
31735
- this.isEdit = false;
31736
- this.inputObj.value = '';
31737
- this.inputObj.dataBind();
31738
- var dialogElement = this.dialog.element;
31739
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
31740
- customFormat.value = '';
31741
- customFormat.dataBind();
31742
- if (this.parent.dataType === 'olap') {
31743
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
31744
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
31745
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
31746
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
31747
- /* eslint-enable max-len */
31748
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
31749
- hierarchyDrop.index = 0;
31750
- hierarchyDrop.dataBind();
31751
- formatDrop.index = 0;
31752
- formatDrop.dataBind();
31753
- memberTypeDrop.index = 0;
31754
- memberTypeDrop.readonly = false;
31755
- memberTypeDrop.dataBind();
31756
- }
31757
- else {
31758
- addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
31759
- removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
31760
- node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
31761
- }
31762
- select('#' + this.parentID + 'droppable', document).value = '';
31763
- }
31764
- else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
31765
- node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
31766
- var dropField = select('#' + this.parentID + 'droppable', document);
31767
- var field = {
31768
- name: this.isEdit ? this.currentFieldName : this.inputObj.value,
31769
- caption: this.inputObj.value,
31770
- formula: dropField.value
31771
- };
31772
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
32593
+ catch (execption) {
32594
+ this.parent.actionFailureMethod(execption);
31773
32595
  }
31774
32596
  };
31775
32597
  CalculatedField.prototype.removeCalcField = function (node) {
@@ -32186,6 +33008,12 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
32186
33008
  this.parent.isRequiredUpdate = false;
32187
33009
  }
32188
33010
  try {
33011
+ var actionInfo = {
33012
+ calculatedFieldInfo: this.parent.lastCalcFieldInfo
33013
+ };
33014
+ this.parent.actionObj.actionInfo = actionInfo;
33015
+ var actionName = (this.parent.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : calculatedFieldApplied;
33016
+ this.parent.actionObj.actionName = actionName;
32189
33017
  this.parent.updateDataSource(false);
32190
33018
  var pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
32191
33019
  this.parent.pivotGridModule : this.parent;
@@ -33641,7 +34469,7 @@ var FieldList = /** @__PURE__ @class */ (function () {
33641
34469
  FieldList.prototype.update = function () {
33642
34470
  var currentWidth;
33643
34471
  if (this.parent.currentView !== 'Table') {
33644
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
34472
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
33645
34473
  }
33646
34474
  else {
33647
34475
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
@@ -34121,7 +34949,7 @@ var GroupingBar = /** @__PURE__ @class */ (function () {
34121
34949
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
34122
34950
  }
34123
34951
  else {
34124
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
34952
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
34125
34953
  }
34126
34954
  if (currentWidth) {
34127
34955
  var actWidth = currentWidth < 400 ? 400 : currentWidth;
@@ -34393,15 +35221,17 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
34393
35221
  },
34394
35222
  {
34395
35223
  click: this.applyButtonClick.bind(this),
35224
+ isFlat: true,
34396
35225
  buttonModel: {
34397
- cssClass: FLAT_CLASS + ' ' + FORMAT_APPLY_BUTTON,
35226
+ isPrimary: true, cssClass: FORMAT_APPLY_BUTTON,
34398
35227
  content: this.parent.localeObj.getConstant('apply')
34399
35228
  }
34400
35229
  },
34401
35230
  {
34402
35231
  click: this.cancelButtonClick.bind(this),
35232
+ isFlat: true,
34403
35233
  buttonModel: {
34404
- cssClass: FLAT_CLASS + ' ' + FORMAT_CANCEL_BUTTON,
35234
+ cssClass: FORMAT_CANCEL_BUTTON,
34405
35235
  content: this.parent.localeObj.getConstant('cancel')
34406
35236
  }
34407
35237
  }
@@ -34455,6 +35285,10 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
34455
35285
  ConditionalFormatting.prototype.applyButtonClick = function () {
34456
35286
  if (this.refreshConditionValues()) {
34457
35287
  this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
35288
+ var actionInfo = {
35289
+ conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
35290
+ };
35291
+ this.parent.actionObj.actionInfo = actionInfo;
34458
35292
  this.parent.renderPivotGrid();
34459
35293
  this.dialog.close();
34460
35294
  }
@@ -35153,12 +35987,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35153
35987
  };
35154
35988
  /* eslint-enable */
35155
35989
  Toolbar$$1.prototype.reportChange = function (args) {
35156
- this.dropArgs = args;
35157
- if (this.parent.isModified && this.currentReport !== '') {
35158
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
35990
+ this.parent.actionObj.actionName = reportChange;
35991
+ if (this.parent.actionBeginMethod()) {
35992
+ args.cancel = true;
35993
+ return;
35159
35994
  }
35160
- else {
35161
- this.reportLoad(args);
35995
+ try {
35996
+ this.dropArgs = args;
35997
+ if (this.parent.isModified && this.currentReport !== '') {
35998
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
35999
+ }
36000
+ else {
36001
+ this.reportLoad(args);
36002
+ }
36003
+ }
36004
+ catch (execption) {
36005
+ this.parent.actionFailureMethod(execption);
35162
36006
  }
35163
36007
  };
35164
36008
  Toolbar$$1.prototype.reportLoad = function (args) {
@@ -35167,6 +36011,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35167
36011
  var loadArgs = {
35168
36012
  reportName: args.itemData.value
35169
36013
  };
36014
+ var actionInfo = {
36015
+ reportName: args.itemData.value
36016
+ };
36017
+ this.parent.actionObj.actionInfo = actionInfo;
35170
36018
  this.parent.trigger(loadReport, loadArgs, function (observedArgs) {
35171
36019
  _this_1.currentReport = observedArgs.reportName;
35172
36020
  _this_1.parent.isModified = false;
@@ -35179,7 +36027,15 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35179
36027
  report: this.parent.getPersistData(),
35180
36028
  reportName: this.currentReport
35181
36029
  };
36030
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
36031
+ var actionInfo = {
36032
+ reportName: this.currentReport
36033
+ };
36034
+ this.parent.actionObj.actionInfo = actionInfo;
35182
36035
  this.parent.trigger(saveReport, saveArgs);
36036
+ if (this.parent.actionObj.actionName) {
36037
+ this.parent.actionCompleteMethod();
36038
+ }
35183
36039
  this.parent.isModified = false;
35184
36040
  }
35185
36041
  else if (this.currentReport === '' && (args.item.id === (this.parent.element.id + 'save') || args.item.id === (this.parent.element.id + 'saveas'))) {
@@ -35243,54 +36099,67 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35243
36099
  }
35244
36100
  };
35245
36101
  Toolbar$$1.prototype.actionClick = function (args) {
35246
- switch (args.item.id) {
35247
- case (this.parent.element.id + 'save'):
35248
- case (this.parent.element.id + 'saveas'):
35249
- this.saveReport(args);
35250
- break;
35251
- case (this.parent.element.id + 'remove'):
35252
- this.action = 'Remove';
35253
- if (this.currentReport && this.currentReport !== '') {
35254
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
35255
- }
35256
- else {
35257
- this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
35258
- }
35259
- return;
35260
- case (this.parent.element.id + 'rename'):
35261
- this.renameReport(args);
35262
- break;
35263
- case (this.parent.element.id + 'new'):
35264
- this.action = 'New';
35265
- this.newArgs = args;
35266
- if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
35267
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
35268
- }
35269
- else {
35270
- this.createNewReport(args);
35271
- }
35272
- break;
35273
- case (this.parent.element.id + 'load'):
35274
- this.action = 'Load';
35275
- break;
35276
- case (this.parent.element.id + 'fieldlist'):
35277
- if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
35278
- this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
35279
- }
35280
- break;
35281
- case (this.parent.element.id + 'formatting'):
35282
- if (this.parent.conditionalFormattingModule) {
35283
- this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
35284
- }
35285
- break;
35286
- case (this.parent.element.id + 'mdxQuery'):
35287
- this.mdxQueryDialog(args);
35288
- break;
35289
- case (this.parent.element.id + 'numberFormatting'):
35290
- if (this.parent.numberFormattingModule) {
35291
- this.parent.numberFormattingModule.showNumberFormattingDialog();
35292
- }
35293
- break;
36102
+ var actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
36103
+ : (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
36104
+ : (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
36105
+ : (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
36106
+ this.parent.actionObj.actionName = actionName;
36107
+ if (this.parent.actionBeginMethod()) {
36108
+ return;
36109
+ }
36110
+ try {
36111
+ switch (args.item.id) {
36112
+ case (this.parent.element.id + 'save'):
36113
+ case (this.parent.element.id + 'saveas'):
36114
+ this.saveReport(args);
36115
+ break;
36116
+ case (this.parent.element.id + 'remove'):
36117
+ this.action = 'Remove';
36118
+ if (this.currentReport && this.currentReport !== '') {
36119
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
36120
+ }
36121
+ else {
36122
+ this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
36123
+ }
36124
+ return;
36125
+ case (this.parent.element.id + 'rename'):
36126
+ this.renameReport(args);
36127
+ break;
36128
+ case (this.parent.element.id + 'new'):
36129
+ this.action = 'New';
36130
+ this.newArgs = args;
36131
+ if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
36132
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
36133
+ }
36134
+ else {
36135
+ this.createNewReport(args);
36136
+ }
36137
+ break;
36138
+ case (this.parent.element.id + 'load'):
36139
+ this.action = 'Load';
36140
+ break;
36141
+ case (this.parent.element.id + 'fieldlist'):
36142
+ if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
36143
+ this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
36144
+ }
36145
+ break;
36146
+ case (this.parent.element.id + 'formatting'):
36147
+ if (this.parent.conditionalFormattingModule) {
36148
+ this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36149
+ }
36150
+ break;
36151
+ case (this.parent.element.id + 'mdxQuery'):
36152
+ this.mdxQueryDialog(args);
36153
+ break;
36154
+ case (this.parent.element.id + 'numberFormatting'):
36155
+ if (this.parent.numberFormattingModule) {
36156
+ this.parent.numberFormattingModule.showNumberFormattingDialog();
36157
+ }
36158
+ break;
36159
+ }
36160
+ }
36161
+ catch (execption) {
36162
+ this.parent.actionFailureMethod(execption);
35294
36163
  }
35295
36164
  };
35296
36165
  Toolbar$$1.prototype.renderDialog = function () {
@@ -35382,6 +36251,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35382
36251
  return;
35383
36252
  };
35384
36253
  Toolbar$$1.prototype.okBtnClick = function () {
36254
+ var _this_1 = this;
35385
36255
  var reportInput = this.dialog.element.querySelector('.' + GRID_REPORT_INPUT);
35386
36256
  if (reportInput && reportInput.value === '') {
35387
36257
  reportInput.focus();
@@ -35413,6 +36283,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35413
36283
  report: _this_2.parent.getPersistData(),
35414
36284
  reportName: reportInput.value
35415
36285
  };
36286
+ var actionInfo = {
36287
+ reportName: reportInput.value
36288
+ };
36289
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35416
36290
  _this_2.parent.trigger(saveReport, saveArgs);
35417
36291
  _this_2.parent.isModified = false;
35418
36292
  _this_2.updateReportList();
@@ -35445,6 +36319,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35445
36319
  report: _this_3.parent.getPersistData(),
35446
36320
  reportName: reportInput.value
35447
36321
  };
36322
+ var actionInfo = {
36323
+ reportName: reportInput.value
36324
+ };
36325
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35448
36326
  _this_3.parent.trigger(saveReport, saveArgs);
35449
36327
  _this_3.parent.isModified = false;
35450
36328
  _this_3.updateReportList();
@@ -35479,12 +36357,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35479
36357
  reportName: _this_4.currentReport,
35480
36358
  rename: reportInput.value
35481
36359
  };
36360
+ var actionInfo = {
36361
+ reportName: { oldName: _this_4.currentReport, newName: reportInput.value }
36362
+ };
36363
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35482
36364
  _this_4.parent.trigger(renameReport, renameArgs);
35483
36365
  _this_4.currentReport = reportInput.value;
35484
36366
  _this_4.updateReportList();
35485
36367
  _this_4.dialog.hide();
35486
36368
  });
35487
36369
  }
36370
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
36371
+ if (this.parent.actionObj.actionName) {
36372
+ this.parent.actionCompleteMethod();
36373
+ }
35488
36374
  };
35489
36375
  Toolbar$$1.prototype.createNewReport = function (args) {
35490
36376
  this.dialogShow(args);
@@ -35543,6 +36429,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35543
36429
  var removeArgs = {
35544
36430
  reportName: this.currentReport
35545
36431
  };
36432
+ var actionInfo = {
36433
+ reportName: this.currentReport
36434
+ };
36435
+ this.parent.actionObj.actionInfo = actionInfo;
35546
36436
  this.parent.trigger(removeReport, removeArgs);
35547
36437
  var reports = this.fetchReports();
35548
36438
  if (reports.reportName && reports.reportName.length > 0) {
@@ -35561,6 +36451,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35561
36451
  this.action = '';
35562
36452
  }
35563
36453
  this.updateReportList();
36454
+ this.parent.actionObj.actionName = reportRemoved;
36455
+ if (this.parent.actionObj.actionName) {
36456
+ this.parent.actionCompleteMethod();
36457
+ }
35564
36458
  }
35565
36459
  else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
35566
36460
  if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
@@ -35568,12 +36462,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35568
36462
  report: this.parent.getPersistData(),
35569
36463
  reportName: this.currentReport
35570
36464
  };
36465
+ var actionInfo = {
36466
+ reportName: this.currentReport
36467
+ };
36468
+ this.parent.actionObj.actionInfo = actionInfo;
36469
+ this.parent.actionObj.actionName = reportSaved;
36470
+ if (this.parent.actionObj.actionName) {
36471
+ this.parent.actionCompleteMethod();
36472
+ }
35571
36473
  this.parent.trigger(saveReport, saveArgs);
35572
36474
  this.parent.isModified = false;
35573
36475
  if (this.action === 'New') {
36476
+ this.parent.actionObj.actionName = addNewReport;
35574
36477
  this.createNewReport(this.newArgs);
35575
36478
  }
35576
36479
  else {
36480
+ this.parent.actionObj.actionName = reportChange;
35577
36481
  this.reportLoad(this.dropArgs);
35578
36482
  }
35579
36483
  }
@@ -35679,6 +36583,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35679
36583
  this.chartMenu = new Menu({
35680
36584
  items: menu, enableRtl: this.parent.enableRtl,
35681
36585
  locale: this.parent.locale,
36586
+ cssClass: TOOLBAR_MENU,
35682
36587
  select: this.menuItemClick.bind(this),
35683
36588
  beforeOpen: this.whitespaceRemove.bind(this),
35684
36589
  onClose: function (args) {
@@ -35735,6 +36640,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35735
36640
  this.exportMenu = new Menu({
35736
36641
  items: menu, enableRtl: this.parent.enableRtl,
35737
36642
  locale: this.parent.locale,
36643
+ cssClass: TOOLBAR_MENU,
35738
36644
  select: this.menuItemClick.bind(this), beforeOpen: this.updateExportMenu.bind(this),
35739
36645
  onClose: function (args) {
35740
36646
  _this_1.focusToolBar();
@@ -35772,6 +36678,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35772
36678
  this.subTotalMenu = new Menu({
35773
36679
  items: menu, enableRtl: this.parent.enableRtl,
35774
36680
  locale: this.parent.locale,
36681
+ cssClass: TOOLBAR_MENU,
35775
36682
  select: this.menuItemClick.bind(this), beforeOpen: this.updateSubtotalSelection.bind(this),
35776
36683
  onClose: function (args) {
35777
36684
  _this_1.focusToolBar();
@@ -35809,6 +36716,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35809
36716
  this.grandTotalMenu = new Menu({
35810
36717
  items: menu, enableRtl: this.parent.enableRtl,
35811
36718
  locale: this.parent.locale,
36719
+ cssClass: TOOLBAR_MENU,
35812
36720
  select: this.menuItemClick.bind(this), beforeOpen: this.updateGrandtotalSelection.bind(this),
35813
36721
  onClose: function (args) {
35814
36722
  _this_1.focusToolBar();
@@ -35836,6 +36744,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35836
36744
  this.formattingMenu = new Menu({
35837
36745
  items: menu, enableRtl: this.parent.enableRtl,
35838
36746
  locale: this.parent.locale,
36747
+ cssClass: TOOLBAR_MENU,
35839
36748
  select: this.menuItemClick.bind(this)
35840
36749
  });
35841
36750
  this.formattingMenu.isStringTemplate = true;
@@ -36035,181 +36944,202 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36035
36944
  var _this_1 = this;
36036
36945
  var exportArgs = {};
36037
36946
  var type;
36947
+ var actionName = (args.item.id == "PivotViewgrid") ? tableView : (args.item.id == "PivotView_Column") ? chartView : (args.item.id == "PivotView_Bar") ? chartView : (args.item.id == "PivotView_Line") ? chartView
36948
+ : (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
36949
+ : (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
36950
+ : (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
36951
+ : (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
36952
+ : (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
36953
+ : (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
36954
+ : (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
36955
+ this.parent.actionObj.actionName = actionName;
36956
+ if (this.parent.actionBeginMethod()) {
36957
+ return;
36958
+ }
36038
36959
  if (this.getAllChartItems().indexOf(args.item.id.split(this.parent.element.id + '_')[1]) > -1 ||
36039
36960
  (args.item.id.split(this.parent.element.id + '_')[1] === 'ChartMoreOption') ||
36040
36961
  (args.item.id.split(this.parent.element.id + '_')[1] === 'multipleAxes') ||
36041
36962
  (args.item.id.split(this.parent.element.id + '_')[1] === 'showLegend')) {
36042
36963
  type = args.item.id.split(this.parent.element.id + '_')[1];
36043
36964
  }
36044
- switch (args.item.id) {
36045
- case (this.parent.element.id + 'grid'):
36046
- if (this.parent.grid && this.parent.chart) {
36047
- this.parent.grid.element.style.display = '';
36048
- this.parent.chart.element.style.display = 'none';
36049
- if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
36050
- this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
36051
- }
36052
- this.parent.currentView = 'Table';
36053
- this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
36054
- if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
36055
- this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
36056
- this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
36965
+ try {
36966
+ switch (args.item.id) {
36967
+ case (this.parent.element.id + 'grid'):
36968
+ if (this.parent.grid && this.parent.chart) {
36969
+ this.parent.grid.element.style.display = '';
36970
+ this.parent.chart.element.style.display = 'none';
36971
+ if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
36972
+ this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
36973
+ }
36974
+ this.parent.currentView = 'Table';
36975
+ this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
36976
+ if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
36977
+ this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
36978
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
36979
+ }
36980
+ var actionInfo = {
36981
+ toolbarInfo: { displayOption: this.parent.displayOption, gridSettings: this.parent.gridSettings }
36982
+ };
36983
+ this.parent.actionObj.actionInfo = actionInfo;
36984
+ this.parent.layoutRefresh();
36057
36985
  }
36058
- this.parent.layoutRefresh();
36059
- }
36060
- break;
36061
- case (this.parent.element.id + 'pdf'):
36062
- if (this.parent.currentView === 'Table') {
36986
+ break;
36987
+ case (this.parent.element.id + 'pdf'):
36988
+ if (this.parent.currentView === 'Table') {
36989
+ exportArgs = {
36990
+ pdfExportProperties: { fileName: 'Export.pdf' },
36991
+ pdfDoc: undefined,
36992
+ isBlob: false,
36993
+ isMultipleExport: false
36994
+ };
36995
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36996
+ _this_1.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
36997
+ });
36998
+ }
36999
+ else {
37000
+ exportArgs = {
37001
+ width: undefined,
37002
+ height: undefined,
37003
+ orientation: PdfPageOrientation.Landscape,
37004
+ type: 'PDF',
37005
+ fileName: 'result',
37006
+ };
37007
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37008
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37009
+ });
37010
+ }
37011
+ break;
37012
+ case (this.parent.element.id + 'excel'):
36063
37013
  exportArgs = {
36064
- pdfExportProperties: { fileName: 'Export.pdf' },
36065
- pdfDoc: undefined,
37014
+ excelExportProperties: { fileName: 'Export.xlsx' },
37015
+ isBlob: undefined,
37016
+ isMultipleExport: undefined,
37017
+ workbook: undefined
37018
+ };
37019
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37020
+ _this_1.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
37021
+ });
37022
+ break;
37023
+ case (this.parent.element.id + 'csv'):
37024
+ exportArgs = {
37025
+ excelExportProperties: { fileName: 'Export.csv' },
36066
37026
  isBlob: false,
36067
- isMultipleExport: false
37027
+ isMultipleExport: false,
37028
+ workbook: undefined
36068
37029
  };
36069
37030
  this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36070
- _this_1.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
37031
+ _this_1.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36071
37032
  });
36072
- }
36073
- else {
37033
+ break;
37034
+ case (this.parent.element.id + 'png'):
36074
37035
  exportArgs = {
37036
+ type: 'PNG',
36075
37037
  width: undefined,
36076
37038
  height: undefined,
37039
+ fileName: 'result',
36077
37040
  orientation: PdfPageOrientation.Landscape,
36078
- type: 'PDF',
37041
+ };
37042
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37043
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37044
+ });
37045
+ break;
37046
+ case (this.parent.element.id + 'jpeg'):
37047
+ exportArgs = {
37048
+ type: 'JPEG',
36079
37049
  fileName: 'result',
37050
+ orientation: PdfPageOrientation.Landscape,
37051
+ width: undefined,
37052
+ height: undefined,
36080
37053
  };
36081
37054
  this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36082
37055
  _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36083
37056
  });
36084
- }
36085
- break;
36086
- case (this.parent.element.id + 'excel'):
36087
- exportArgs = {
36088
- excelExportProperties: { fileName: 'Export.xlsx' },
36089
- isBlob: undefined,
36090
- isMultipleExport: undefined,
36091
- workbook: undefined
36092
- };
36093
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36094
- _this_1.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36095
- });
36096
- break;
36097
- case (this.parent.element.id + 'csv'):
36098
- exportArgs = {
36099
- excelExportProperties: { fileName: 'Export.csv' },
36100
- isBlob: false,
36101
- isMultipleExport: false,
36102
- workbook: undefined
36103
- };
36104
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36105
- _this_1.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36106
- });
36107
- break;
36108
- case (this.parent.element.id + 'png'):
36109
- exportArgs = {
36110
- type: 'PNG',
36111
- width: undefined,
36112
- height: undefined,
36113
- fileName: 'result',
36114
- orientation: PdfPageOrientation.Landscape,
36115
- };
36116
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36117
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36118
- });
36119
- break;
36120
- case (this.parent.element.id + 'jpeg'):
36121
- exportArgs = {
36122
- type: 'JPEG',
36123
- fileName: 'result',
36124
- orientation: PdfPageOrientation.Landscape,
36125
- width: undefined,
36126
- height: undefined,
36127
- };
36128
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36129
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36130
- });
36131
- break;
36132
- case (this.parent.element.id + 'svg'):
36133
- exportArgs = {
36134
- width: undefined,
36135
- height: undefined,
36136
- type: 'SVG',
36137
- fileName: 'result',
36138
- orientation: PdfPageOrientation.Landscape,
36139
- };
36140
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36141
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36142
- });
36143
- break;
36144
- case (this.parent.element.id + 'notsubtotal'):
36145
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
36146
- this.parent.refreshData();
36147
- break;
36148
- case (this.parent.element.id + 'subtotalrow'):
36149
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
36150
- this.parent.refreshData();
36151
- break;
36152
- case (this.parent.element.id + 'subtotalcolumn'):
36153
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
36154
- this.parent.refreshData();
36155
- break;
36156
- case (this.parent.element.id + 'subtotal'):
36157
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
36158
- this.parent.refreshData();
36159
- break;
36160
- case (this.parent.element.id + 'notgrandtotal'):
36161
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
36162
- this.parent.refreshData();
36163
- break;
36164
- case (this.parent.element.id + 'grandtotalrow'):
36165
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
36166
- this.parent.refreshData();
36167
- break;
36168
- case (this.parent.element.id + 'grandtotalcolumn'):
36169
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
36170
- this.parent.refreshData();
36171
- break;
36172
- case (this.parent.element.id + 'grandtotal'):
36173
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
36174
- this.parent.refreshData();
36175
- break;
36176
- case (this.parent.element.id + 'numberFormattingMenu'):
36177
- if (this.parent.numberFormattingModule) {
36178
- this.parent.numberFormattingModule.showNumberFormattingDialog();
36179
- }
36180
- break;
36181
- case (this.parent.element.id + 'conditionalFormattingMenu'):
36182
- if (this.parent.conditionalFormattingModule) {
36183
- this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36184
- }
36185
- break;
36186
- case (this.parent.element.id + '_' + type):
36187
- if (args.item && args.item.text) {
36188
- if (type === 'ChartMoreOption') {
36189
- this.createChartTypeDialog();
36190
- }
36191
- else if (type === 'multipleAxes') {
36192
- if (this.parent.chartSettings.enableScrollOnMultiAxis) {
36193
- this.isMultiAxisChange = true;
36194
- }
36195
- this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
36196
- this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
37057
+ break;
37058
+ case (this.parent.element.id + 'svg'):
37059
+ exportArgs = {
37060
+ width: undefined,
37061
+ height: undefined,
37062
+ type: 'SVG',
37063
+ fileName: 'result',
37064
+ orientation: PdfPageOrientation.Landscape,
37065
+ };
37066
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37067
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37068
+ });
37069
+ break;
37070
+ case (this.parent.element.id + 'notsubtotal'):
37071
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
37072
+ this.parent.refreshData();
37073
+ break;
37074
+ case (this.parent.element.id + 'subtotalrow'):
37075
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
37076
+ this.parent.refreshData();
37077
+ break;
37078
+ case (this.parent.element.id + 'subtotalcolumn'):
37079
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
37080
+ this.parent.refreshData();
37081
+ break;
37082
+ case (this.parent.element.id + 'subtotal'):
37083
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
37084
+ this.parent.refreshData();
37085
+ break;
37086
+ case (this.parent.element.id + 'notgrandtotal'):
37087
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
37088
+ this.parent.refreshData();
37089
+ break;
37090
+ case (this.parent.element.id + 'grandtotalrow'):
37091
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
37092
+ this.parent.refreshData();
37093
+ break;
37094
+ case (this.parent.element.id + 'grandtotalcolumn'):
37095
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
37096
+ this.parent.refreshData();
37097
+ break;
37098
+ case (this.parent.element.id + 'grandtotal'):
37099
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
37100
+ this.parent.refreshData();
37101
+ break;
37102
+ case (this.parent.element.id + 'numberFormattingMenu'):
37103
+ if (this.parent.numberFormattingModule) {
37104
+ this.parent.numberFormattingModule.showNumberFormattingDialog();
36197
37105
  }
36198
- else if (this.getAllChartItems().indexOf(type) > -1) {
36199
- this.updateChartType(type, false);
37106
+ break;
37107
+ case (this.parent.element.id + 'conditionalFormattingMenu'):
37108
+ if (this.parent.conditionalFormattingModule) {
37109
+ this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36200
37110
  }
36201
- else if (type === 'showLegend') {
36202
- this.parent.chart.legendSettings.visible = !this.showLableState;
36203
- if (this.parent.chartSettings.legendSettings) {
36204
- this.parent.chartSettings.legendSettings.visible = !this.showLableState;
37111
+ break;
37112
+ case (this.parent.element.id + '_' + type):
37113
+ if (args.item && args.item.text) {
37114
+ if (type === 'ChartMoreOption') {
37115
+ this.createChartTypeDialog();
37116
+ }
37117
+ else if (type === 'multipleAxes') {
37118
+ if (this.parent.chartSettings.enableScrollOnMultiAxis) {
37119
+ this.isMultiAxisChange = true;
37120
+ }
37121
+ this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
37122
+ this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36205
37123
  }
36206
- else {
36207
- this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
37124
+ else if (this.getAllChartItems().indexOf(type) > -1) {
37125
+ this.updateChartType(type, false);
37126
+ }
37127
+ else if (type === 'showLegend') {
37128
+ this.parent.chart.legendSettings.visible = !this.showLableState;
37129
+ if (this.parent.chartSettings.legendSettings) {
37130
+ this.parent.chartSettings.legendSettings.visible = !this.showLableState;
37131
+ }
37132
+ else {
37133
+ this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
37134
+ }
37135
+ this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36208
37136
  }
36209
- this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36210
37137
  }
36211
- }
36212
- break;
37138
+ break;
37139
+ }
37140
+ }
37141
+ catch (execption) {
37142
+ this.parent.actionFailureMethod(execption);
36213
37143
  }
36214
37144
  /* eslint-enable max-len */
36215
37145
  };
@@ -36301,14 +37231,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36301
37231
  if (this.parent.chart) {
36302
37232
  this.parent.currentView = 'Chart';
36303
37233
  this.parent.setProperties({ displayOption: { primary: 'Chart' } }, true);
36304
- this.parent.chart.element.style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
37234
+ if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
37235
+ this.parent.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
37236
+ }
36305
37237
  this.parent.chart.setProperties({ width: formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()) }, true); /* eslint-disable-line */
36306
37238
  if (this.parent.chartSettings.chartSeries.type === type && !isMultiAxis) {
36307
- this.parent.chartModule.updateView();
37239
+ this.parent.pivotChartModule.updateView();
36308
37240
  }
36309
37241
  else {
36310
37242
  this.parent.chartSettings.chartSeries.type = type;
36311
37243
  }
37244
+ var actionInfo = {
37245
+ toolbarInfo: { displayOption: this.parent.displayOption, chartSettings: this.parent.chartSettings }
37246
+ };
37247
+ this.parent.actionObj.actionInfo = actionInfo;
36312
37248
  }
36313
37249
  }
36314
37250
  };
@@ -36872,6 +37808,10 @@ var NumberFormatting = /** @__PURE__ @class */ (function () {
36872
37808
  this.parent.trigger(numberFormatting, eventArgs, function (observedArgs) {
36873
37809
  if (!observedArgs.cancel) {
36874
37810
  _this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
37811
+ var actionInfo = {
37812
+ numberFormattingInfo: _this.parent.dataSourceSettings.formatSettings
37813
+ };
37814
+ _this.parent.actionObj.actionInfo = actionInfo;
36875
37815
  try {
36876
37816
  _this.parent.updateDataSource(false);
36877
37817
  _this.dialog.close();
@@ -37536,7 +38476,7 @@ var Grouping = /** @__PURE__ @class */ (function () {
37536
38476
  for (var j = 0, len_1 = field.customGroups.length; j < len_1; j++) {
37537
38477
  if (field.customGroups[j]) {
37538
38478
  var group = field.customGroups[j];
37539
- if (group.items && PivotUtil.isContainCommonElements(group.items, selectedOptions)) {
38479
+ if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
37540
38480
  splicedItems = this.mergeArray(splicedItems, [group.groupName]);
37541
38481
  newItems = this.mergeArray(newItems, group.items);
37542
38482
  field.customGroups.splice(j, 1);
@@ -37794,5 +38734,5 @@ var Grouping = /** @__PURE__ @class */ (function () {
37794
38734
  * Export PivotGrid components
37795
38735
  */
37796
38736
 
37797
- 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, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, initialLoad, uiUpdate, scroll, contentReady, dataReady, initSubComponent, treeViewUpdate, pivotButtonUpdate, initCalculatedField, click, initToolbar, initFormatting, initGrouping, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
38737
+ 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, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, actionBegin, actionComplete, actionFailure, initialLoad, uiUpdate, scroll, 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, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
37798
38738
  //# sourceMappingURL=ej2-pivotview.es5.js.map