@syncfusion/ej2-pivotview 19.3.55 → 19.4.41

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 (139) 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 +34 -28
  4. package/README.md +1 -1
  5. package/dist/ej2-pivotview.umd.min.js +2 -2
  6. package/dist/ej2-pivotview.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-pivotview.es2015.js +2068 -1096
  8. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  9. package/dist/es6/ej2-pivotview.es5.js +2084 -1106
  10. package/dist/es6/ej2-pivotview.es5.js.map +1 -1
  11. package/dist/global/ej2-pivotview.min.js +2 -2
  12. package/dist/global/ej2-pivotview.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +22 -22
  15. package/src/base/engine.d.ts +17 -1
  16. package/src/base/engine.js +82 -29
  17. package/src/base/export-util.d.ts +17 -0
  18. package/src/base/export-util.js +245 -0
  19. package/src/base/olap/engine.d.ts +7 -0
  20. package/src/base/olap/engine.js +138 -35
  21. package/src/base/util.d.ts +0 -9
  22. package/src/base/util.js +2 -215
  23. package/src/common/actions/field-list.js +1 -1
  24. package/src/common/actions/pivot-button.d.ts +5 -8
  25. package/src/common/actions/pivot-button.js +188 -171
  26. package/src/common/base/constant.d.ts +186 -0
  27. package/src/common/base/constant.js +186 -0
  28. package/src/common/base/css-constant.d.ts +2 -0
  29. package/src/common/base/css-constant.js +2 -0
  30. package/src/common/base/enum.d.ts +11 -0
  31. package/src/common/base/interface.d.ts +272 -2
  32. package/src/common/calculatedfield/calculated-field.js +108 -93
  33. package/src/common/conditionalformatting/conditional-formatting.js +8 -2
  34. package/src/common/grouping-bar/grouping-bar.js +1 -1
  35. package/src/common/popups/aggregate-menu.js +57 -35
  36. package/src/common/popups/drillthrough-dialog.js +187 -139
  37. package/src/common/popups/filter-dialog.d.ts +1 -0
  38. package/src/common/popups/filter-dialog.js +22 -1
  39. package/src/common/popups/formatting-dialog.js +4 -0
  40. package/src/common/popups/grouping.js +2 -1
  41. package/src/common/popups/toolbar.js +305 -203
  42. package/src/pivotchart/base/pivotchart.js +36 -15
  43. package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
  44. package/src/pivotfieldlist/base/field-list.d.ts +55 -1
  45. package/src/pivotfieldlist/base/field-list.js +68 -1
  46. package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
  47. package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
  48. package/src/pivotview/actions/drill-through.js +1 -1
  49. package/src/pivotview/actions/excel-export.js +9 -7
  50. package/src/pivotview/actions/pdf-export.js +3 -3
  51. package/src/pivotview/actions/virtualscroll.d.ts +1 -0
  52. package/src/pivotview/actions/virtualscroll.js +6 -2
  53. package/src/pivotview/base/pivotview-model.d.ts +46 -1
  54. package/src/pivotview/base/pivotview.d.ts +56 -2
  55. package/src/pivotview/base/pivotview.js +311 -107
  56. package/src/pivotview/model/chartsettings-model.d.ts +2 -2
  57. package/src/pivotview/model/chartsettings.d.ts +2 -2
  58. package/src/pivotview/model/chartsettings.js +2 -2
  59. package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
  60. package/src/pivotview/model/datasourcesettings.d.ts +7 -0
  61. package/src/pivotview/model/datasourcesettings.js +3 -0
  62. package/src/pivotview/renderer/render.d.ts +2 -1
  63. package/src/pivotview/renderer/render.js +39 -6
  64. package/styles/bootstrap-dark.css +115 -104
  65. package/styles/bootstrap.css +115 -104
  66. package/styles/bootstrap4.css +114 -81
  67. package/styles/bootstrap5-dark.css +220 -168
  68. package/styles/bootstrap5.css +215 -161
  69. package/styles/fabric-dark.css +117 -103
  70. package/styles/fabric.css +115 -102
  71. package/styles/highcontrast-light.css +116 -102
  72. package/styles/highcontrast.css +118 -104
  73. package/styles/material-dark.css +108 -97
  74. package/styles/material.css +108 -97
  75. package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
  76. package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
  77. package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
  78. package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
  79. package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
  80. package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
  81. package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
  82. package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
  83. package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
  84. package/styles/pivotfieldlist/_layout.scss +199 -109
  85. package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
  86. package/styles/pivotfieldlist/_material-definition.scss +1 -4
  87. package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
  88. package/styles/pivotfieldlist/_theme.scss +185 -35
  89. package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
  90. package/styles/pivotfieldlist/bootstrap.css +49 -58
  91. package/styles/pivotfieldlist/bootstrap4.css +44 -39
  92. package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
  93. package/styles/pivotfieldlist/bootstrap5.css +115 -89
  94. package/styles/pivotfieldlist/fabric-dark.css +49 -58
  95. package/styles/pivotfieldlist/fabric.css +49 -58
  96. package/styles/pivotfieldlist/highcontrast-light.css +49 -58
  97. package/styles/pivotfieldlist/highcontrast.css +49 -58
  98. package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
  99. package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
  100. package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
  101. package/styles/pivotfieldlist/material-dark.css +44 -53
  102. package/styles/pivotfieldlist/material.css +44 -53
  103. package/styles/pivotfieldlist/tailwind-dark.css +138 -81
  104. package/styles/pivotfieldlist/tailwind.css +140 -83
  105. package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
  106. package/styles/pivotview/_bootstrap-definition.scss +9 -6
  107. package/styles/pivotview/_bootstrap4-definition.scss +10 -7
  108. package/styles/pivotview/_bootstrap5-definition.scss +12 -9
  109. package/styles/pivotview/_fabric-dark-definition.scss +8 -5
  110. package/styles/pivotview/_fabric-definition.scss +7 -4
  111. package/styles/pivotview/_fluent-definition.scss +126 -0
  112. package/styles/pivotview/_highcontrast-definition.scss +8 -5
  113. package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
  114. package/styles/pivotview/_layout.scss +119 -64
  115. package/styles/pivotview/_material-dark-definition.scss +7 -4
  116. package/styles/pivotview/_material-definition.scss +8 -4
  117. package/styles/pivotview/_tailwind-definition.scss +8 -5
  118. package/styles/pivotview/_theme.scss +124 -70
  119. package/styles/pivotview/bootstrap-dark.css +66 -46
  120. package/styles/pivotview/bootstrap.css +66 -46
  121. package/styles/pivotview/bootstrap4.css +70 -42
  122. package/styles/pivotview/bootstrap5-dark.css +99 -73
  123. package/styles/pivotview/bootstrap5-dark.scss +0 -1
  124. package/styles/pivotview/bootstrap5.css +100 -72
  125. package/styles/pivotview/fabric-dark.css +68 -45
  126. package/styles/pivotview/fabric.css +66 -44
  127. package/styles/pivotview/highcontrast-light.css +67 -44
  128. package/styles/pivotview/highcontrast.css +69 -46
  129. package/styles/pivotview/icons/_bootstrap4.scss +1 -1
  130. package/styles/pivotview/icons/_bootstrap5.scss +1 -1
  131. package/styles/pivotview/icons/_fluent.scss +183 -0
  132. package/styles/pivotview/icons/_tailwind.scss +1 -1
  133. package/styles/pivotview/material-dark.css +64 -44
  134. package/styles/pivotview/material.css +64 -44
  135. package/styles/pivotview/tailwind-dark.css +106 -58
  136. package/styles/pivotview/tailwind-dark.scss +0 -1
  137. package/styles/pivotview/tailwind.css +107 -57
  138. package/styles/tailwind-dark.css +250 -145
  139. 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) {
@@ -3340,6 +3160,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3340
3160
  }
3341
3161
  /* eslint-enable */
3342
3162
  rawHeaders = this.getSortedHeaders(rawHeaders.concat(excessHeaders), this.fieldList[headersInfo.fields[0].name].sort).concat(grandHeader);
3163
+ if (headersInfo.axis === 'row') {
3164
+ this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, this.filterMembers, 'column', '');
3165
+ this.insertAllMember(this.cMembers, this.filterMembers, '', 'column');
3166
+ }
3167
+ else {
3168
+ this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, this.filterMembers, 'row', '');
3169
+ this.insertAllMember(this.rMembers, this.filterMembers, '', 'row');
3170
+ }
3343
3171
  }
3344
3172
  if (headersInfo.axis === 'row') {
3345
3173
  this.rowCount = 0;
@@ -3485,8 +3313,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3485
3313
  }
3486
3314
  }
3487
3315
  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;
3316
+ 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)); })) :
3317
+ 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
3318
  }
3491
3319
  if (alphaNumbervalue.length > 0) {
3492
3320
  alphaNumbervalue = childrens.sort === 'Ascending' ?
@@ -3499,9 +3327,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3499
3327
  }
3500
3328
  else {
3501
3329
  return sortOrder === 'Ascending' ?
3502
- (headers.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
3330
+ (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
3331
  sortOrder === 'Descending' ?
3504
- (headers.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) :
3332
+ (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
3333
  headers;
3506
3334
  }
3507
3335
  }
@@ -3521,7 +3349,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
3521
3349
  this.valueSortHeaderText = undefined;
3522
3350
  if (this.enableValueSorting && this.valueSortSettings.headerText && !this.valueSortHeaderText &&
3523
3351
  this.valueSortSettings.headerText !== '' && this.values.length > 0) {
3524
- var textArray = this.valueSortSettings.headerText.split(this.valueSortSettings.headerDelimiter);
3352
+ this.valueSortHeaderText = this.valueSortSettings.headerText;
3353
+ var textArray = this.valueSortHeaderText.split(this.valueSortSettings.headerDelimiter);
3525
3354
  for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
3526
3355
  var field = _a[_i];
3527
3356
  var name_1 = field.caption ? field.caption : field.name;
@@ -4169,6 +3998,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4169
3998
  var summCell = headers[headers.length - 1];
4170
3999
  if (summCell && summCell.type === 'grand sum') {
4171
4000
  summCell.index = this.filterMembers;
4001
+ summCell.indexObject = {};
4172
4002
  /* eslint-disable */
4173
4003
  for (var ln = 0, lt_1 = this.filterMembers.length; ln < lt_1; ln++) {
4174
4004
  summCell.indexObject[this.filterMembers[ln]] = this.filterMembers[ln];
@@ -4310,7 +4140,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4310
4140
  PivotEngine.prototype.insertAllMember = function (set, filter, customText, axis) {
4311
4141
  var len = set.length;
4312
4142
  customText = ' Total';
4313
- set[len] = {
4143
+ var grandTotalSet = {
4314
4144
  hasChild: false,
4315
4145
  index: filter,
4316
4146
  level: 0,
@@ -4324,13 +4154,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4324
4154
  type: 'grand sum',
4325
4155
  valueSort: {}
4326
4156
  };
4327
- set[len].valueSort[set[len].formattedText] = 1;
4328
- set[len].valueSort.levelName = set[len].formattedText;
4329
- set[len].valueSort[set[len].actualText] = 1;
4330
- set[len].valueSort.uniqueName = set[len].actualText;
4157
+ grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
4158
+ grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
4159
+ grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
4160
+ grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
4331
4161
  for (var ln = 0, lt = filter.length; ln < lt; ln++) {
4332
- set[len].indexObject[filter[ln]] = filter[ln];
4162
+ grandTotalSet.indexObject[filter[ln]] = filter[ln];
4333
4163
  }
4164
+ (this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
4334
4165
  // if (axis === 'row') {
4335
4166
  // this.rowCount += this.rowValuesLength;
4336
4167
  // } else {
@@ -4349,10 +4180,11 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4349
4180
  row.colIndex = 0;
4350
4181
  row.rowIndex = tnum;
4351
4182
  var isRowFieldsAvail = false;
4183
+ var delimiter = this.dataSourceSettings.valueSortSettings.headerDelimiter;
4352
4184
  if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.values.length > 1) {
4353
4185
  this.rowIndex = (isNullOrUndefined(this.rowIndex) && !isLeastNode && this.dataSourceSettings.rows.length === 0) ? row.index : this.rowIndex;
4354
- isRowFieldsAvail = (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total.') !== 0);
4355
- if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total.') === 0) {
4186
+ isRowFieldsAvail = (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName && row.valueSort.levelName.toString().indexOf('Grand Total' + delimiter) !== 0);
4187
+ if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total' + delimiter) === 0) {
4356
4188
  row.index = this.rowIndex;
4357
4189
  }
4358
4190
  }
@@ -4377,7 +4209,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4377
4209
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4378
4210
  if (!isValueIndexFound) {
4379
4211
  for (vln = 0; vln < vlt; vln++) {
4380
- if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
4212
+ if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4381
4213
  isValueIndexFound = true;
4382
4214
  isValueCellUpdated = true;
4383
4215
  break;
@@ -4412,7 +4244,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
4412
4244
  for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
4413
4245
  for (var vln = 0; vln < vlt; vln++) {
4414
4246
  if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
4415
- if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().split(this.valueSortSettings.headerDelimiter).indexOf(this.values[vln].name) > -1) {
4247
+ if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
4416
4248
  this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
4417
4249
  dln = data[tnum].length;
4418
4250
  }
@@ -5369,6 +5201,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
5369
5201
  this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
5370
5202
  this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
5371
5203
  }
5204
+ else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
5205
+ this.updateValueMembers(false, null, null, columnHeaders, axis.slice(0, 1), vcnt, -1);
5206
+ this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(1, axis.length), vcnt, 0);
5207
+ }
5372
5208
  else {
5373
5209
  var hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
5374
5210
  this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
@@ -5409,6 +5245,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
5409
5245
  this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
5410
5246
  this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
5411
5247
  }
5248
+ else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
5249
+ this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(0, 1), this.values.length, -1);
5250
+ this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(1, this.rMembers.length), this.values.length, 0);
5251
+ }
5412
5252
  else {
5413
5253
  var hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
5414
5254
  this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
@@ -6014,6 +5854,12 @@ var fieldDragStart = 'fieldDragStart';
6014
5854
  var chartPointClick = 'chartPointClick';
6015
5855
  /** @hidden */
6016
5856
  var beforeServiceInvoke = 'beforeServiceInvoke';
5857
+ /** @hidden */
5858
+ var actionBegin = 'actionBegin';
5859
+ /** @hidden */
5860
+ var actionComplete = 'actionComplete';
5861
+ /** @hidden */
5862
+ var actionFailure = 'actionFailure';
6017
5863
  /**
6018
5864
  * Specifies pivot internal events
6019
5865
  */
@@ -6043,6 +5889,186 @@ var initToolbar = 'init-toolbar';
6043
5889
  var initFormatting = 'init-formatting';
6044
5890
  /** @hidden */
6045
5891
  var initGrouping = 'init-grouping';
5892
+ /**
5893
+ * Specifies action names of actionBegin events
5894
+ */
5895
+ /** @hidden */
5896
+ var sortValue = 'Sort value';
5897
+ /** @hidden */
5898
+ var drillUp = 'Drill up';
5899
+ /** @hidden */
5900
+ var drillDown = 'Drill down';
5901
+ /** @hidden */
5902
+ var addNewReport = 'Add new report';
5903
+ /** @hidden */
5904
+ var saveCurrentReport = 'Save current report';
5905
+ /** @hidden */
5906
+ var saveAsCurrentReport = 'Save as current report';
5907
+ /** @hidden */
5908
+ var renameCurrentReport = 'Rename current report';
5909
+ /** @hidden */
5910
+ var removeCurrentReport = 'Remove current report';
5911
+ /** @hidden */
5912
+ var loadReports = 'Load report';
5913
+ /** @hidden */
5914
+ var openConditionalFormatting = 'Open conditional formatting dialog';
5915
+ /** @hidden */
5916
+ var openNumberFormatting = 'Open number formatting dialog';
5917
+ /** @hidden */
5918
+ var MdxQuery = 'MdxQuery';
5919
+ /** @hidden */
5920
+ var showFieldList = 'Open field list';
5921
+ /** @hidden */
5922
+ var tableView = 'Show table view';
5923
+ /** @hidden */
5924
+ var chartView = 'Show chart view';
5925
+ /** @hidden */
5926
+ var multipleAxis = 'Multiple Axis';
5927
+ /** @hidden */
5928
+ var showLegend = 'Show legend';
5929
+ /** @hidden */
5930
+ var pdfExport = 'PDF export';
5931
+ /** @hidden */
5932
+ var pngExport = 'PNG export';
5933
+ /** @hidden */
5934
+ var excelExport = 'Excel export';
5935
+ /** @hidden */
5936
+ var csvExport = 'CSV export';
5937
+ /** @hidden */
5938
+ var jpegExport = 'JPEG export';
5939
+ /** @hidden */
5940
+ var svgExport = 'SVG export';
5941
+ /** @hidden */
5942
+ var hideSubTotals = 'Hide sub-totals';
5943
+ /** @hidden */
5944
+ var subTotalsRow = 'Show row sub-totals';
5945
+ /** @hidden */
5946
+ var subTotalsColumn = 'Show column sub-totals';
5947
+ /** @hidden */
5948
+ var showSubTotals = 'Show sub-totals';
5949
+ /** @hidden */
5950
+ var hideGrandTotals = 'Hide grand totals';
5951
+ /** @hidden */
5952
+ var grandTotalsRow = 'Show row grand totals';
5953
+ /** @hidden */
5954
+ var grandTotalsColumn = 'Show column grand totals';
5955
+ /** @hidden */
5956
+ var showGrandTotals = 'Show grand totals';
5957
+ /** @hidden */
5958
+ var numberFormattingMenu = 'Number Formatting menu';
5959
+ /** @hidden */
5960
+ var conditionalFormattingMenu = 'Conditional Formatting menu';
5961
+ /** @hidden */
5962
+ var reportChange = 'Report change';
5963
+ /** @hidden */
5964
+ var sortFieldTree = 'Sort field tree';
5965
+ /** @hidden */
5966
+ var editCalculatedField = 'Edit calculated field';
5967
+ /** @hidden */
5968
+ var sortField = 'Sort field';
5969
+ /** @hidden */
5970
+ var filterField = 'Filter field';
5971
+ /** @hidden */
5972
+ var removeField = 'Remove field';
5973
+ /** @hidden */
5974
+ var openCalculatedField = 'Open calculated field dialog';
5975
+ /** @hidden */
5976
+ var editRecord = 'Edit record';
5977
+ /** @hidden */
5978
+ var saveEditedRecords = 'Save edited records';
5979
+ /** @hidden */
5980
+ var addNewRecord = 'Add new record';
5981
+ /** @hidden */
5982
+ var removeRecord = 'Remove record';
5983
+ /** @hidden */
5984
+ var aggregateField = 'Aggregate field';
5985
+ /** @hidden */
5986
+ var contextMenuCalculatedField = 'CalculatedField Context menu';
5987
+ /** @hidden */
5988
+ var windowResize = 'Window resize';
5989
+ /**
5990
+ * Specifies action names of actionComplete events
5991
+ */
5992
+ /** @hidden */
5993
+ var calculatedFieldApplied = 'Calculated field applied';
5994
+ /** @hidden */
5995
+ var editedRecordsSaved = 'Edited records saved';
5996
+ /** @hidden */
5997
+ var newRecordAdded = 'New record added';
5998
+ /** @hidden */
5999
+ var recordRemoved = 'Record removed';
6000
+ /** @hidden */
6001
+ var closeFieldlist = 'Field list closed';
6002
+ /** @hidden */
6003
+ var fieldTreeSorted = 'Field tree sorted';
6004
+ /** @hidden */
6005
+ var reportSaved = 'Report saved';
6006
+ /** @hidden */
6007
+ var newReportAdded = 'New report added';
6008
+ /** @hidden */
6009
+ var reportReSaved = 'Report re-saved';
6010
+ /** @hidden */
6011
+ var reportRenamed = 'Report renamed';
6012
+ /** @hidden */
6013
+ var reportRemoved = 'Report removed';
6014
+ /** @hidden */
6015
+ var excelExported = 'Excel exported';
6016
+ /** @hidden */
6017
+ var csvExported = 'CSV exported';
6018
+ /** @hidden */
6019
+ var pdfExported = 'PDF exported';
6020
+ /** @hidden */
6021
+ var pngExported = 'PNG exported';
6022
+ /** @hidden */
6023
+ var jpegExported = 'JPEG exported';
6024
+ /** @hidden */
6025
+ var svgExported = 'SVG exported';
6026
+ /** @hidden */
6027
+ var conditionallyFormatted = 'Conditional formatting applied';
6028
+ /** @hidden */
6029
+ var numberFormatted = 'Number formatting applied';
6030
+ /** @hidden */
6031
+ var tableViewed = 'Table view shown';
6032
+ /** @hidden */
6033
+ var chartViewed = 'Chart view shown';
6034
+ /** @hidden */
6035
+ var subTotalsHidden = 'Sub-totals hidden';
6036
+ /** @hidden */
6037
+ var subTotalsRowShown = 'Row sub-totals shown';
6038
+ /** @hidden */
6039
+ var subTotalsColumnShown = 'Column sub-totals shown';
6040
+ /** @hidden */
6041
+ var subTotalsShown = 'Sub-totals shown';
6042
+ /** @hidden */
6043
+ var grandTotalsHidden = 'Grand totals hidden';
6044
+ /** @hidden */
6045
+ var grandTotalsRowShown = 'Row grand totals shown';
6046
+ /** @hidden */
6047
+ var grandTotalsColumnShown = 'Column grand totals shown';
6048
+ /** @hidden */
6049
+ var grandTotalsShown = 'Grand totals shown';
6050
+ /** @hidden */
6051
+ var valueSorted = 'Value sorted';
6052
+ /** @hidden */
6053
+ var calculatedFieldEdited = 'Calculated field edited';
6054
+ /** @hidden */
6055
+ var fieldSorted = 'Field sorted';
6056
+ /** @hidden */
6057
+ var fieldFiltered = 'Field filtered';
6058
+ /** @hidden */
6059
+ var fieldRemoved = 'Field removed';
6060
+ /** @hidden */
6061
+ var fieldAggregated = 'Field aggregated';
6062
+ /** @hidden */
6063
+ var recordEdited = 'Record edited';
6064
+ /** @hidden */
6065
+ var reportChanged = 'Report changed';
6066
+ /** @hidden */
6067
+ var windowResized = 'Window resized';
6068
+ /** @hidden */
6069
+ var recordUpdated = 'Records updated';
6070
+ /** @hidden */
6071
+ var drillThroughClosed = 'Drill-through closed';
6046
6072
 
6047
6073
  /**
6048
6074
  * CSS Constants
@@ -6716,6 +6742,8 @@ var PIVOTCHART_TYPE_DIALOG = 'e-pivotchart-type-dialog';
6716
6742
  var FORMAT_FONT_COLOR_PICKER = 'e-format-font-color-picker';
6717
6743
  /** @hidden */
6718
6744
  var GROUP_PIVOT_ROW = 'e-group-pivot-rows';
6745
+ /** @hidden */
6746
+ var TOOLBAR_MENU = 'e-pivot-toolbar-menu';
6719
6747
 
6720
6748
  /**
6721
6749
  * `AggregateMenu` module to create aggregate type popup.
@@ -6745,28 +6773,39 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
6745
6773
  AggregateMenu.prototype.openContextMenu = function (args) {
6746
6774
  var _this = this;
6747
6775
  var fieldName = args.target.parentElement.id;
6776
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
6748
6777
  this.buttonElement = args.target.parentElement;
6749
6778
  var isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
6750
6779
  this.summaryTypes = this.getMenuItem(isStringField).slice();
6780
+ this.parent.actionObj.actionName = aggregateField;
6781
+ this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
6782
+ if (this.parent.actionBeginMethod()) {
6783
+ return;
6784
+ }
6751
6785
  var eventArgs = {
6752
6786
  cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
6753
6787
  };
6754
6788
  var control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
6755
6789
  this.parent.pivotGridModule : this.parent;
6756
- control.trigger(aggregateMenuOpen, eventArgs, function (observedArgs) {
6757
- if (!observedArgs.cancel) {
6758
- _this.summaryTypes = observedArgs.aggregateTypes;
6759
- _this.createContextMenu(isStringField, observedArgs.displayMenuCount);
6760
- _this.currentMenu = args.target;
6761
- var pos = _this.currentMenu.getBoundingClientRect();
6762
- if (_this.parent.enableRtl) {
6763
- _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
6764
- }
6765
- else {
6766
- _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
6790
+ try {
6791
+ control.trigger(aggregateMenuOpen, eventArgs, function (observedArgs) {
6792
+ if (!observedArgs.cancel) {
6793
+ _this.summaryTypes = observedArgs.aggregateTypes;
6794
+ _this.createContextMenu(isStringField, observedArgs.displayMenuCount);
6795
+ _this.currentMenu = args.target;
6796
+ var pos = _this.currentMenu.getBoundingClientRect();
6797
+ if (_this.parent.enableRtl) {
6798
+ _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
6799
+ }
6800
+ else {
6801
+ _this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
6802
+ }
6767
6803
  }
6768
- }
6769
- });
6804
+ });
6805
+ }
6806
+ catch (execption) {
6807
+ this.parent.actionFailureMethod(execption);
6808
+ }
6770
6809
  };
6771
6810
  AggregateMenu.prototype.createContextMenu = function (isStringField, displayMenuCount) {
6772
6811
  var _this = this;
@@ -7043,31 +7082,42 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
7043
7082
  AggregateMenu.prototype.selectOptionInContextMenu = function (menu) {
7044
7083
  if (menu.item.text !== null) {
7045
7084
  var buttonElement = this.currentMenu.parentElement;
7046
- var type = menu.item.id.split('_').pop();
7047
- if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
7048
- || type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
7049
- this.createValueSettingsDialog(buttonElement, this.parentElement, type);
7085
+ var fieldInfo = PivotUtil.getFieldInfo((buttonElement ? buttonElement.id : ''), this.parent);
7086
+ this.parent.actionObj.actionName = aggregateField;
7087
+ this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
7088
+ if (this.parent.actionBeginMethod()) {
7089
+ return;
7050
7090
  }
7051
- else {
7052
- var field = buttonElement.getAttribute('data-uid');
7053
- var valuefields = this.parent.dataSourceSettings.values;
7054
- var contentElement = buttonElement.querySelector('.e-content');
7055
- var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
7056
- this.parent.engineModule.fieldList[field].caption;
7057
- contentElement.innerHTML = captionName;
7058
- contentElement.setAttribute('title', captionName);
7059
- buttonElement.setAttribute('data-type', type);
7060
- for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
7061
- if (this.parent.dataSourceSettings.values[vCnt].name === field) {
7062
- var dataSourceItem = extend({}, valuefields[vCnt].properties ?
7063
- valuefields[vCnt].properties : valuefields[vCnt], null, true);
7064
- dataSourceItem.type = type;
7065
- this.parent.engineModule.fieldList[field].aggregateType = type;
7066
- valuefields.splice(vCnt, 1, dataSourceItem);
7067
- this.parent.lastAggregationInfo = dataSourceItem;
7091
+ var type = menu.item.id.split('_').pop();
7092
+ try {
7093
+ if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
7094
+ || type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
7095
+ this.createValueSettingsDialog(buttonElement, this.parentElement, type);
7096
+ }
7097
+ else {
7098
+ var field = buttonElement.getAttribute('data-uid');
7099
+ var valuefields = this.parent.dataSourceSettings.values;
7100
+ var contentElement = buttonElement.querySelector('.e-content');
7101
+ var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
7102
+ this.parent.engineModule.fieldList[field].caption;
7103
+ contentElement.innerHTML = captionName;
7104
+ contentElement.setAttribute('title', captionName);
7105
+ buttonElement.setAttribute('data-type', type);
7106
+ for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
7107
+ if (this.parent.dataSourceSettings.values[vCnt].name === field) {
7108
+ var dataSourceItem = extend({}, valuefields[vCnt].properties ?
7109
+ valuefields[vCnt].properties : valuefields[vCnt], null, true);
7110
+ dataSourceItem.type = type;
7111
+ this.parent.engineModule.fieldList[field].aggregateType = type;
7112
+ valuefields.splice(vCnt, 1, dataSourceItem);
7113
+ this.parent.lastAggregationInfo = dataSourceItem;
7114
+ }
7068
7115
  }
7116
+ this.updateDataSource();
7069
7117
  }
7070
- this.updateDataSource();
7118
+ }
7119
+ catch (execption) {
7120
+ this.parent.actionFailureMethod(execption);
7071
7121
  }
7072
7122
  }
7073
7123
  };
@@ -7184,13 +7234,16 @@ var Render = /** @__PURE__ @class */ (function () {
7184
7234
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
7185
7235
  (this.parent.isAdaptive ? 140 : 200);
7186
7236
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
7187
- this.gridSettings = parent.gridSettings;
7237
+ this.gridSettings = this.parent.gridSettings;
7188
7238
  this.formatList = this.getFormatList();
7189
7239
  this.aggMenu = new AggregateMenu(this.parent);
7190
7240
  }
7191
7241
  /* eslint-disable-next-line */
7192
7242
  /** @hidden */
7193
- Render.prototype.render = function () {
7243
+ Render.prototype.render = function (refreshRequired) {
7244
+ if (refreshRequired) {
7245
+ this.initProperties();
7246
+ }
7194
7247
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
7195
7248
  (this.parent.isAdaptive ? 140 : 200);
7196
7249
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
@@ -7254,6 +7307,30 @@ var Render = /** @__PURE__ @class */ (function () {
7254
7307
  }
7255
7308
  this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
7256
7309
  };
7310
+ Render.prototype.initProperties = function () {
7311
+ this.rowStartPos = undefined;
7312
+ this.maxIndent = undefined;
7313
+ this.resColWidth = undefined;
7314
+ this.isOverflows = undefined;
7315
+ this.indentCollection = {};
7316
+ this.formatList = undefined;
7317
+ this.colPos = 0;
7318
+ this.colGrandPos = undefined;
7319
+ this.rowGrandPos = undefined;
7320
+ this.lastSpan = 0;
7321
+ this.field = undefined;
7322
+ this.fieldCaption = undefined;
7323
+ this.lvlCollection = {};
7324
+ this.hierarchyCollection = {};
7325
+ this.lvlPosCollection = {};
7326
+ this.hierarchyPosCollection = {};
7327
+ this.position = 0;
7328
+ this.measurePos = 0;
7329
+ this.maxMeasurePos = 0;
7330
+ this.hierarchyCount = 0;
7331
+ this.actualText = '';
7332
+ this.timeOutObj = undefined;
7333
+ };
7257
7334
  Render.prototype.refreshHeader = function () {
7258
7335
  if (this.parent.enableVirtualization) {
7259
7336
  var mHdr = this.parent.element.querySelector('.' + MOVABLEHEADER_DIV);
@@ -7455,9 +7532,9 @@ var Render = /** @__PURE__ @class */ (function () {
7455
7532
  this.parent.renderReactTemplates(); /* eslint-disable-line */
7456
7533
  }
7457
7534
  if (this.parent.isInitial) {
7535
+ this.parent.isInitial = false;
7458
7536
  this.parent.refreshData();
7459
7537
  }
7460
- this.parent.isInitial = false;
7461
7538
  this.parent.notify(contentReady, {});
7462
7539
  };
7463
7540
  Render.prototype.setFocusOnLastCell = function () {
@@ -8273,7 +8350,7 @@ var Render = /** @__PURE__ @class */ (function () {
8273
8350
  if (cell.isSum) {
8274
8351
  tCell.classList.add(SUMMARY);
8275
8352
  }
8276
- var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && this.parent.dataSourceSettings.valueAxis === 'column' && this.parent.dataType === 'olap' &&
8353
+ var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
8277
8354
  ((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
8278
8355
  if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
8279
8356
  tCell.classList.add('e-gtot');
@@ -8414,6 +8491,12 @@ var Render = /** @__PURE__ @class */ (function () {
8414
8491
  }
8415
8492
  lvlPos++;
8416
8493
  }
8494
+ if (this.parent.dataSourceSettings.grandTotalsPosition === 'Top' && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'row') && this.parent.dataType === 'olap' &&
8495
+ (cell.valueSort.levelName.toString()).indexOf(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) === 0) {
8496
+ tCell.appendChild(createElement('span', {
8497
+ className: NEXTSPAN,
8498
+ }));
8499
+ }
8417
8500
  if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
8418
8501
  tCell.appendChild(createElement('span', {
8419
8502
  className: NEXTSPAN,
@@ -8726,8 +8809,8 @@ var Render = /** @__PURE__ @class */ (function () {
8726
8809
  if (this.parent.currentView !== 'Chart') {
8727
8810
  if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
8728
8811
  var rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
8729
- var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GROUPING_BAR_CLASS) ?
8730
- this.parent.element.querySelector('.' + GROUPING_BAR_CLASS).offsetHeight : 0);
8812
+ var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS) ?
8813
+ this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS).offsetHeight : 0);
8731
8814
  var toolBarHeight = this.parent.element.querySelector('.' + GRID_TOOLBAR) ? 42 : 0;
8732
8815
  gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
8733
8816
  gridHeight = gridHeight < 40 ? 40 : gridHeight;
@@ -10462,7 +10545,6 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
10462
10545
  if (_this.allowExcelLikeFilter) {
10463
10546
  _this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
10464
10547
  }
10465
- _this.parent.control.pivotButtonModule.memberTreeView = _this.parent.filterDialog.memberTreeView;
10466
10548
  _this.memberTreeView.nodeChecked =
10467
10549
  _this.parent.control.pivotButtonModule.nodeStateModified.bind(_this.parent.control.pivotButtonModule);
10468
10550
  _this.allMemberSelect.nodeChecked =
@@ -11478,6 +11560,15 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
11478
11560
  if (this.dropMenu && !this.dropMenu.isDestroyed) {
11479
11561
  this.dropMenu.destroy();
11480
11562
  }
11563
+ if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
11564
+ this.memberTreeView.destroy();
11565
+ }
11566
+ if (this.allMemberSelect && !this.allMemberSelect.isDestroyed) {
11567
+ this.allMemberSelect.destroy();
11568
+ }
11569
+ if (this.editorSearch && !this.editorSearch.isDestroyed) {
11570
+ this.editorSearch.destroy();
11571
+ }
11481
11572
  if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
11482
11573
  remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
11483
11574
  }
@@ -11486,11 +11577,24 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
11486
11577
  FilterDialog.prototype.removeFilterDialog = function () {
11487
11578
  if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
11488
11579
  this.dialogPopUp.destroy();
11580
+ setTimeout(this.setFocus.bind(this));
11489
11581
  }
11490
11582
  if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
11491
11583
  remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
11492
11584
  }
11493
11585
  };
11586
+ FilterDialog.prototype.setFocus = function () {
11587
+ if (this.parent.control.pivotButtonModule.parentElement) {
11588
+ var pivotButtons = [].slice.call(this.parent.control.pivotButtonModule.parentElement.querySelectorAll('.e-pivot-button'));
11589
+ for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
11590
+ var item = pivotButtons_1[_i];
11591
+ if (item.getAttribute('data-uid') === this.parent.control.pivotButtonModule.fieldName) {
11592
+ item.focus();
11593
+ break;
11594
+ }
11595
+ }
11596
+ }
11597
+ };
11494
11598
  return FilterDialog;
11495
11599
  }());
11496
11600
 
@@ -12207,6 +12311,9 @@ var DataSourceSettings = /** @__PURE__ @class */ (function (_super) {
12207
12311
  __decorate$1([
12208
12312
  Property(true)
12209
12313
  ], DataSourceSettings.prototype, "showGrandTotals", void 0);
12314
+ __decorate$1([
12315
+ Property('Bottom')
12316
+ ], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
12210
12317
  __decorate$1([
12211
12318
  Property(true)
12212
12319
  ], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
@@ -13023,6 +13130,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13023
13130
  this.previousValues = { top: 0, left: 0 };
13024
13131
  this.frozenPreviousValues = { top: 0, left: 0 };
13025
13132
  this.eventType = '';
13133
+ this.isFireFox = Browser.userAgent.toLowerCase().indexOf('firefox') > -1;
13026
13134
  this.parent = parent;
13027
13135
  this.engineModule = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule;
13028
13136
  this.addInternalEvents();
@@ -13046,6 +13154,9 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13046
13154
  var mScrollBar = mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
13047
13155
  EventHandler.clearEvents(mCont);
13048
13156
  EventHandler.clearEvents(fCont);
13157
+ if (this.isFireFox) {
13158
+ EventHandler.clearEvents(mHdr);
13159
+ }
13049
13160
  if (this.engineModule) {
13050
13161
  var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
13051
13162
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
@@ -13107,7 +13218,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13107
13218
  }
13108
13219
  var target = e.target;
13109
13220
  var left = target.scrollLeft;
13110
- if (_this.previousValues.left === left) {
13221
+ if (_this.previousValues.left === left || (_this.isFireFox && target.classList.contains(MOVABLEHEADER_DIV))) {
13111
13222
  return;
13112
13223
  }
13113
13224
  content.scrollLeft = left;
@@ -13464,142 +13575,159 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13464
13575
  this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
13465
13576
  }
13466
13577
  var actualText = eventArgs.currentCell.actualText.toString();
13467
- if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
13468
- this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
13469
- this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
13470
- this.editCell(eventArgs);
13471
- }
13472
- else {
13473
- this.removeDrillThroughDialog();
13474
- var drillThroughDialog = createElement('div', {
13475
- id: this.parent.element.id + '_drillthrough',
13476
- className: DRILLTHROUGH_DIALOG
13477
- });
13478
- this.parent.element.appendChild(drillThroughDialog);
13479
- this.dialogPopUp = new Dialog({
13480
- animationSettings: { effect: 'Fade' },
13481
- allowDragging: false,
13482
- header: this.parent.localeObj.getConstant('details'),
13483
- content: this.createDrillThroughGrid(eventArgs),
13484
- beforeOpen: function () {
13485
- _this.drillThroughGrid.setProperties({
13486
- dataSource: _this.parent.editSettings.allowEditing ?
13487
- _this.dataWithPrimarykey(eventArgs) : _this.gridData,
13488
- height: !_this.parent.editSettings.allowEditing ? 300 : 220
13489
- }, false);
13490
- },
13491
- beforeClose: function () {
13492
- if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
13493
- if (_this.parent.dataSourceSettings.type === 'CSV') {
13494
- _this.updateData(_this.drillThroughGrid.dataSource);
13495
- }
13496
- var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
13497
- var previousPosition = [];
13498
- for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
13499
- var value = gridIndexObjectsValue_1[_i];
13500
- previousPosition.push(_this.gridIndexObjects[value]);
13501
- }
13502
- var count = Object.keys(_this.gridIndexObjects).length;
13503
- var addItems = [];
13504
- var prevItems = [];
13505
- var index = 0;
13506
- /* eslint-disable @typescript-eslint/dot-notation */
13507
- for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
13508
- var item = _b[_a];
13509
- if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
13510
- for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
13511
- var field = _d[_c];
13512
- if (isNullOrUndefined(item[field])) {
13513
- delete item[field];
13514
- }
13515
- }
13516
- delete item['__index'];
13517
- addItems.push(item);
13578
+ try {
13579
+ if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
13580
+ this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
13581
+ this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
13582
+ this.parent.actionObj.actionName = editRecord;
13583
+ if (this.parent.actionBeginMethod()) {
13584
+ return;
13585
+ }
13586
+ this.editCell(eventArgs);
13587
+ }
13588
+ else {
13589
+ this.removeDrillThroughDialog();
13590
+ var drillThroughDialog = createElement('div', {
13591
+ id: this.parent.element.id + '_drillthrough',
13592
+ className: DRILLTHROUGH_DIALOG
13593
+ });
13594
+ this.parent.element.appendChild(drillThroughDialog);
13595
+ this.dialogPopUp = new Dialog({
13596
+ animationSettings: { effect: 'Fade' },
13597
+ allowDragging: false,
13598
+ header: this.parent.localeObj.getConstant('details'),
13599
+ content: this.createDrillThroughGrid(eventArgs),
13600
+ beforeOpen: function () {
13601
+ _this.drillThroughGrid.setProperties({
13602
+ dataSource: _this.parent.editSettings.allowEditing ?
13603
+ _this.dataWithPrimarykey(eventArgs) : _this.gridData,
13604
+ height: !_this.parent.editSettings.allowEditing ? 300 : 220
13605
+ }, false);
13606
+ },
13607
+ beforeClose: function () {
13608
+ if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
13609
+ if (_this.parent.dataSourceSettings.type === 'CSV') {
13610
+ _this.updateData(_this.drillThroughGrid.dataSource);
13518
13611
  }
13519
- else if (count > 0) {
13520
- delete _this.gridIndexObjects[item['__index'].toString()];
13521
- prevItems.push(item);
13522
- count--;
13612
+ var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
13613
+ var previousPosition = [];
13614
+ for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
13615
+ var value = gridIndexObjectsValue_1[_i];
13616
+ previousPosition.push(_this.gridIndexObjects[value]);
13523
13617
  }
13524
- if (_this.parent.dataSourceSettings.mode === 'Server') {
13525
- if (item['__index']) {
13618
+ var count = Object.keys(_this.gridIndexObjects).length;
13619
+ var addItems = [];
13620
+ var prevItems = [];
13621
+ var index = 0;
13622
+ /* eslint-disable @typescript-eslint/dot-notation */
13623
+ for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
13624
+ var item = _b[_a];
13625
+ if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
13626
+ for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
13627
+ var field = _d[_c];
13628
+ if (isNullOrUndefined(item[field])) {
13629
+ delete item[field];
13630
+ }
13631
+ }
13526
13632
  delete item['__index'];
13633
+ addItems.push(item);
13527
13634
  }
13528
- if (_this.gridData[index]['__index']) {
13529
- delete _this.gridData[index]['__index'];
13635
+ else if (count > 0) {
13636
+ delete _this.gridIndexObjects[item['__index'].toString()];
13637
+ prevItems.push(item);
13638
+ count--;
13530
13639
  }
13640
+ if (_this.parent.dataSourceSettings.mode === 'Server') {
13641
+ if (item['__index']) {
13642
+ delete item['__index'];
13643
+ }
13644
+ if (_this.gridData[index]['__index']) {
13645
+ delete _this.gridData[index]['__index'];
13646
+ }
13647
+ }
13648
+ index++;
13531
13649
  }
13532
- index++;
13533
- }
13534
- count = 0;
13535
- if (_this.parent.dataSourceSettings.mode === 'Server') {
13536
- var gridIndex = []; /* eslint-disable-line */
13537
- var keys = Object.keys(_this.gridIndexObjects);
13538
- for (var len = 0; len < keys.length; len++) {
13539
- delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
13540
- gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
13541
- }
13542
- var indexObject = []; /* eslint-disable-line */
13543
- keys = Object.keys(_this.parent.drillThroughValue.indexObject);
13544
- for (var len = 0; len < keys.length; len++) {
13545
- indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
13650
+ count = 0;
13651
+ if (_this.parent.dataSourceSettings.mode === 'Server') {
13652
+ var gridIndex = []; /* eslint-disable-line */
13653
+ var keys = Object.keys(_this.gridIndexObjects);
13654
+ for (var len = 0; len < keys.length; len++) {
13655
+ delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
13656
+ gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
13657
+ }
13658
+ var indexObject = []; /* eslint-disable-line */
13659
+ keys = Object.keys(_this.parent.drillThroughValue.indexObject);
13660
+ for (var len = 0; len < keys.length; len++) {
13661
+ indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
13662
+ }
13663
+ _this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
13546
13664
  }
13547
- _this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
13548
- }
13549
- else {
13550
- var items = [];
13551
- var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
13552
- _this.parent.engineModule.actualData : _this.parent.engineModule.data;
13553
- for (var _e = 0, _f = data; _e < _f.length; _e++) {
13554
- var item = _f[_e];
13555
- delete item['__index'];
13556
- if (_this.gridIndexObjects[count.toString()] === undefined) {
13557
- items.push(item);
13665
+ else {
13666
+ var items = [];
13667
+ var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
13668
+ _this.parent.engineModule.actualData : _this.parent.engineModule.data;
13669
+ for (var _e = 0, _f = data; _e < _f.length; _e++) {
13670
+ var item = _f[_e];
13671
+ delete item['__index'];
13672
+ if (_this.gridIndexObjects[count.toString()] === undefined) {
13673
+ items.push(item);
13674
+ }
13675
+ count++;
13676
+ }
13677
+ /* eslint-enable @typescript-eslint/dot-notation */
13678
+ items = items.concat(addItems);
13679
+ var eventArgs_1 = {
13680
+ currentData: _this.drillThroughGrid.dataSource,
13681
+ previousData: _this.clonedData,
13682
+ previousPosition: previousPosition,
13683
+ cancel: false
13684
+ };
13685
+ _this.parent.trigger(editCompleted, eventArgs_1);
13686
+ if (!eventArgs_1.cancel) {
13687
+ _this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
13688
+ _this.engine.updateGridData(_this.parent.dataSourceSettings);
13689
+ _this.parent.pivotValues = _this.engine.pivotValues;
13558
13690
  }
13559
- count++;
13560
13691
  }
13561
- /* eslint-enable @typescript-eslint/dot-notation */
13562
- items = items.concat(addItems);
13563
- var eventArgs_1 = {
13564
- currentData: _this.drillThroughGrid.dataSource,
13565
- previousData: _this.clonedData,
13566
- previousPosition: previousPosition,
13567
- cancel: false
13692
+ _this.parent.actionObj.actionName = recordUpdated;
13693
+ var actionInfo = {
13694
+ editInfo: {
13695
+ type: _this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: _this.drillThroughGrid.dataSource,
13696
+ previousData: _this.clonedData, previousPosition: previousPosition
13697
+ }
13568
13698
  };
13569
- _this.parent.trigger(editCompleted, eventArgs_1);
13570
- if (!eventArgs_1.cancel) {
13571
- _this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
13572
- _this.engine.updateGridData(_this.parent.dataSourceSettings);
13573
- _this.parent.pivotValues = _this.engine.pivotValues;
13574
- }
13699
+ _this.parent.actionObj.actionInfo = actionInfo;
13575
13700
  }
13576
- }
13577
- _this.isUpdated = false;
13578
- _this.gridIndexObjects = {};
13579
- },
13580
- isModal: true,
13581
- visible: true,
13582
- showCloseIcon: true,
13583
- locale: this.parent.locale,
13584
- enableRtl: this.parent.enableRtl,
13585
- width: this.parent.isAdaptive ? '100%' : '60%',
13586
- position: { X: 'center', Y: 'center' },
13587
- closeOnEscape: !this.parent.editSettings.allowEditing,
13588
- target: document.body,
13589
- close: this.removeDrillThroughDialog.bind(this)
13590
- });
13591
- this.dialogPopUp.isStringTemplate = true;
13592
- this.dialogPopUp.appendTo(drillThroughDialog);
13593
- // this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
13594
- setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
13595
- if (this.parent.editSettings.allowEditing) {
13596
- this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
13597
- keyAction: this.drillthroughKeyActionHandler.bind(this),
13598
- keyConfigs: this.drillKeyConfigs,
13599
- eventName: 'keydown'
13701
+ _this.isUpdated = false;
13702
+ _this.gridIndexObjects = {};
13703
+ },
13704
+ isModal: true,
13705
+ visible: true,
13706
+ showCloseIcon: true,
13707
+ locale: this.parent.locale,
13708
+ enableRtl: this.parent.enableRtl,
13709
+ width: this.parent.isAdaptive ? '100%' : '60%',
13710
+ position: { X: 'center', Y: 'center' },
13711
+ closeOnEscape: !this.parent.editSettings.allowEditing,
13712
+ target: document.body,
13713
+ close: this.removeDrillThroughDialog.bind(this)
13600
13714
  });
13715
+ this.dialogPopUp.isStringTemplate = true;
13716
+ this.dialogPopUp.appendTo(drillThroughDialog);
13717
+ // this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
13718
+ setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
13719
+ if (this.parent.editSettings.allowEditing) {
13720
+ this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
13721
+ keyAction: this.drillthroughKeyActionHandler.bind(this),
13722
+ keyConfigs: this.drillKeyConfigs,
13723
+ eventName: 'keydown'
13724
+ });
13725
+ }
13601
13726
  }
13602
13727
  }
13728
+ catch (execption) {
13729
+ this.parent.actionFailureMethod(execption);
13730
+ }
13603
13731
  };
13604
13732
  DrillThroughDialog.prototype.editCell = function (eventArgs) {
13605
13733
  var _this = this;
@@ -13615,6 +13743,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13615
13743
  if (eventArgs.currentCell.actualText in previousData) {
13616
13744
  currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
13617
13745
  }
13746
+ var actionInfo = {
13747
+ editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
13748
+ };
13749
+ this.parent.actionObj.actionInfo = actionInfo;
13618
13750
  this.numericTextBox = new NumericTextBox({
13619
13751
  value: cellValue,
13620
13752
  enableRtl: this.parent.enableRtl,
@@ -13679,6 +13811,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13679
13811
  };
13680
13812
  DrillThroughDialog.prototype.removeDrillThroughDialog = function () {
13681
13813
  if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
13814
+ this.parent.actionObj.actionName = drillThroughClosed;
13815
+ if (this.parent.actionObj.actionName) {
13816
+ this.parent.actionCompleteMethod();
13817
+ }
13682
13818
  this.dialogPopUp.destroy();
13683
13819
  }
13684
13820
  var dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
@@ -13691,6 +13827,7 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13691
13827
  };
13692
13828
  /* eslint-disable */
13693
13829
  DrillThroughDialog.prototype.createDrillThroughGrid = function (eventArgs) {
13830
+ var _this = this;
13694
13831
  var drillThroughBody = createElement('div', { id: this.parent.element.id + '_drillthroughbody', className: DRILLTHROUGH_BODY_CLASS });
13695
13832
  var drillThroughBodyHeader = createElement('div', {
13696
13833
  id: this.parent.element.id +
@@ -13768,31 +13905,53 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
13768
13905
  }
13769
13906
  if (this.parent.editSettings.allowEditing) {
13770
13907
  Grid.Inject(Edit, Page);
13771
- this.drillThroughGrid.editSettings = this.parent.editSettings;
13772
- if (this.parent.editSettings.allowCommandColumns) {
13773
- this.drillThroughGrid.editSettings.mode = 'Normal';
13774
- this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
13775
- Grid.Inject(CommandColumn);
13908
+ try {
13909
+ this.drillThroughGrid.editSettings = this.parent.editSettings;
13910
+ this.drillThroughGrid.actionBegin = function (args) {
13911
+ var actionName = (args.requestType == 'save') ? saveEditedRecords : (args.requestType == 'add') ? addNewRecord : (args.requestType == 'delete') ? removeRecord : '';
13912
+ _this.parent.actionObj.actionName = actionName;
13913
+ if (_this.parent.actionObj.actionName) {
13914
+ if (_this.parent.actionBeginMethod()) {
13915
+ return;
13916
+ }
13917
+ }
13918
+ };
13919
+ if (this.parent.editSettings.allowCommandColumns) {
13920
+ this.drillThroughGrid.editSettings.mode = 'Normal';
13921
+ this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
13922
+ Grid.Inject(CommandColumn);
13923
+ this.drillThroughGrid.columns.push({
13924
+ headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
13925
+ commands: [
13926
+ { type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
13927
+ { type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
13928
+ { type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
13929
+ { type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
13930
+ ]
13931
+ });
13932
+ }
13933
+ else {
13934
+ this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
13935
+ }
13776
13936
  this.drillThroughGrid.columns.push({
13777
- headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
13778
- commands: [
13779
- { type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
13780
- { type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
13781
- { type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
13782
- { type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
13783
- ]
13937
+ field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
13784
13938
  });
13785
13939
  }
13786
- else {
13787
- this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
13940
+ catch (execption) {
13941
+ this.parent.actionFailureMethod(execption);
13788
13942
  }
13789
- this.drillThroughGrid.columns.push({
13790
- field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
13791
- });
13792
13943
  this.drillThroughGrid.actionComplete = function (args) {
13793
13944
  if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
13794
13945
  dialogModule.isUpdated = true;
13795
13946
  }
13947
+ _this.parent.actionObj.actionName = _this.parent.getActionCompleteName();
13948
+ var actionInfo = {
13949
+ editInfo: { type: _this.drillThroughGrid.editSettings.mode, action: args.requestType, data: _this.gridData }
13950
+ };
13951
+ _this.parent.actionObj.actionInfo = actionInfo;
13952
+ if (_this.parent.actionObj.actionName) {
13953
+ _this.parent.actionCompleteMethod();
13954
+ }
13796
13955
  if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
13797
13956
  dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
13798
13957
  !dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
@@ -13986,7 +14145,7 @@ var DrillThrough = /** @__PURE__ @class */ (function () {
13986
14145
  * @hidden
13987
14146
  */
13988
14147
  DrillThrough.prototype.getModuleName = function () {
13989
- return 'drillthrough';
14148
+ return 'drillThrough';
13990
14149
  };
13991
14150
  DrillThrough.prototype.addInternalEvents = function () {
13992
14151
  this.parent.on(contentReady, this.wireEvents, this);
@@ -14194,7 +14353,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14194
14353
  * @private
14195
14354
  */
14196
14355
  PivotChart.prototype.getModuleName = function () {
14197
- return 'pivotchart';
14356
+ return 'pivotChart';
14198
14357
  };
14199
14358
  /* eslint-disable */
14200
14359
  PivotChart.prototype.loadChart = function (parent, chartSettings) {
@@ -14389,7 +14548,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14389
14548
  this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
14390
14549
  var name_1 = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
14391
14550
  (firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
14392
- var text = firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
14551
+ var values = this.engineModule.fieldList[this.currentMeasure];
14552
+ var text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
14553
+ this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
14393
14554
  var caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
14394
14555
  ((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
14395
14556
  var levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
@@ -14565,7 +14726,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14565
14726
  this.chartSettings.palettes = currentSeries.palettes;
14566
14727
  }
14567
14728
  for (var i = 0; i < this.columnGroupObject[key].length; i++) {
14568
- this.columnGroupObject[key][i].x = this.columnGroupObject[key][i].x === '' ? this.parent.localeObj.getConstant('blank') : this.columnGroupObject[key][i].x;
14729
+ var values = this.engineModule.fieldList[this.currentMeasure];
14730
+ 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) + ' ' +
14731
+ 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;
14569
14732
  }
14570
14733
  currentSeries.dataSource = this.columnGroupObject[key];
14571
14734
  currentSeries.xName = 'x';
@@ -14721,7 +14884,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14721
14884
  enableSmartLabels: this.chartSettings.enableSmartLabels,
14722
14885
  center: this.chartSettings.pieCenter,
14723
14886
  enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
14724
- highLightMode: this.chartSettings.highlightMode,
14887
+ highlightMode: this.chartSettings.highlightMode,
14725
14888
  highlightPattern: this.chartSettings.highlightPattern,
14726
14889
  titleStyle: this.chartSettings.titleStyle,
14727
14890
  subTitle: this.chartSettings.subTitle,
@@ -14849,7 +15012,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14849
15012
  this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
14850
15013
  if (this.accumulationType.indexOf(type) > -1) {
14851
15014
  this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
14852
- this.parent.chart.highLightMode = this.parent.chartSettings.highlightMode;
15015
+ this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
14853
15016
  this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
14854
15017
  }
14855
15018
  else {
@@ -14958,9 +15121,14 @@ var PivotChart = /** @__PURE__ @class */ (function () {
14958
15121
  currentYAxis.labelFormat = currentYAxis.labelFormat ?
14959
15122
  currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
14960
15123
  currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
14961
- currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop :
14962
- this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
14963
- this.chartSettings.chartSeries.type === 'StackingBar100' ? 50 : 30;
15124
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
15125
+ if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
15126
+ this.chartSettings.chartSeries.type === 'StackingBar100') {
15127
+ currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
15128
+ }
15129
+ else {
15130
+ currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
15131
+ }
14964
15132
  if (!resFormat) {
14965
15133
  currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
14966
15134
  }
@@ -15007,6 +15175,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15007
15175
  currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
15008
15176
  currentYAxis.rowIndex = 0;
15009
15177
  currentYAxis.columnIndex = 0;
15178
+ currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
15010
15179
  if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
15011
15180
  currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
15012
15181
  }
@@ -15329,6 +15498,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15329
15498
  };
15330
15499
  PivotChart.prototype.loaded = function (args) {
15331
15500
  this.parent.isChartLoaded = true;
15501
+ var width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
15332
15502
  if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
15333
15503
  this.parent.showFieldList && this.parent.currentView === 'Chart') {
15334
15504
  this.parent.groupingBarModule.alignIcon();
@@ -15340,13 +15510,15 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15340
15510
  this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
15341
15511
  }
15342
15512
  }
15343
- if ((['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0)
15344
- && this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15345
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
15346
- }
15347
- else if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15348
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
15349
- this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
15513
+ if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
15514
+ if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
15515
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
15516
+ }
15517
+ else {
15518
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
15519
+ this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
15520
+ }
15521
+ this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
15350
15522
  }
15351
15523
  this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
15352
15524
  this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
@@ -15567,6 +15739,11 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15567
15739
  offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
15568
15740
  }
15569
15741
  if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
15742
+ var isNone = false;
15743
+ if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
15744
+ isNone = true;
15745
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
15746
+ }
15570
15747
  if (this.parent.showToolbar && this.parent.showGroupingBar) {
15571
15748
  height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
15572
15749
  this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
@@ -15584,6 +15761,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15584
15761
  else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
15585
15762
  height = '200';
15586
15763
  }
15764
+ if (isNone) {
15765
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
15766
+ }
15587
15767
  }
15588
15768
  else {
15589
15769
  height = 'auto';
@@ -17389,7 +17569,7 @@ var PivotAxis = /** @__PURE__ @class */ (function (_super) {
17389
17569
  Property('')
17390
17570
  ], PivotAxis.prototype, "title", void 0);
17391
17571
  __decorate$3([
17392
- Property(null)
17572
+ Property(1)
17393
17573
  ], PivotAxis.prototype, "zoomFactor", void 0);
17394
17574
  __decorate$3([
17395
17575
  Complex({}, CrosshairTooltip)
@@ -17407,7 +17587,7 @@ var PivotAxis = /** @__PURE__ @class */ (function (_super) {
17407
17587
  Property(0)
17408
17588
  ], PivotAxis.prototype, "plotOffset", void 0);
17409
17589
  __decorate$3([
17410
- Property('None')
17590
+ Property('Shift')
17411
17591
  ], PivotAxis.prototype, "edgeLabelPlacement", void 0);
17412
17592
  __decorate$3([
17413
17593
  Property('BetweenTicks')
@@ -18742,6 +18922,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18742
18922
  this.updateTupCollection(customArgs.drillInfo.axis === 'row' ? rowTuples.length : columnTuples.length);
18743
18923
  }
18744
18924
  if (customArgs.action === 'down' ? customArgs.drillInfo.axis === 'column' : true) {
18925
+ this.olapValueAxis = isNullOrUndefined(this.getValueAxis(undefined, undefined)) ? 'column' : 'row';
18745
18926
  this.frameColumnHeader(columnTuples);
18746
18927
  if (!this.isPaging) {
18747
18928
  this.performColumnSorting();
@@ -18796,6 +18977,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18796
18977
  OlapEngine.prototype.frameRowHeader = function (tuples) {
18797
18978
  this.headerGrouping = {};
18798
18979
  this.lastLevel = [];
18980
+ var isGrandTotalAdd = true;
18799
18981
  var position = this.pivotValues.length;
18800
18982
  var pivotValues = [];
18801
18983
  var valueContent = [];
@@ -18856,6 +19038,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18856
19038
  var startTupPos = tupPos;
18857
19039
  var pagingAllowFlag = true;
18858
19040
  var lastMesPos = 0;
19041
+ var isGrandTotalTop = false;
18859
19042
  while (tupPos < tuplesLength && pagingAllowFlag) {
18860
19043
  var members = tuples[this.customArgs.action === 'down' ?
18861
19044
  (tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
@@ -18910,35 +19093,25 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
18910
19093
  (allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
18911
19094
  : drillAllow;
18912
19095
  var withoutAllAllow = (withoutAllStartPos > -1 && allCount > 0) ? (attrDrill || allStartPos > withoutAllEndPos) : true;
18913
- if (members.length === allCount + (measure ? 1 : 0) && measure) {
19096
+ isGrandTotalTop = this.dataSourceSettings.grandTotalsPosition === 'Top' && this.olapRowValueIndex === 0 && this.olapValueAxis === 'row'
19097
+ && this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true);
19098
+ if (isGrandTotalTop && gTotals.length === 1) {
19099
+ gTotals = this.frameGrandTotalValues(tuples, gTotals, typeColl, measurePos);
19100
+ }
19101
+ if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
18914
19102
  var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
18915
- gTotals.push({
18916
- axis: 'row',
18917
- actualText: this.getUniqueName(members[measurePos].querySelector('UName').textContent),
18918
- colIndex: 0,
18919
- formattedText: (typeColl[measurePos] === '3' &&
18920
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
18921
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ?
18922
- this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
18923
- members[measurePos].querySelector('Caption').textContent,
18924
- hasChild: false,
18925
- level: -1,
18926
- rowIndex: position,
18927
- index: [],
18928
- ordinal: tupPos,
18929
- colSpan: 1,
18930
- rowSpan: 1,
18931
- memberType: Number(typeColl[measurePos]),
18932
- isDrilled: false,
18933
- parentUniqueName: members[measurePos].querySelector('PARENT_UNIQUE_NAME') ?
18934
- members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined,
18935
- levelUniqueName: members[measurePos].querySelector('LName').textContent,
18936
- hierarchy: members[measurePos].getAttribute('Hierarchy'),
18937
- valueSort: { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') }
18938
- });
19103
+ var formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
19104
+ this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
19105
+ members[measurePos].querySelector('Caption').textContent;
19106
+ 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') });
18939
19107
  gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
18940
19108
  }
18941
19109
  else if (!(allStartPos === 0 || (measurePos === 0 && allStartPos === 1)) && drillAllow && withoutAllAllow) {
19110
+ if (this.dataSourceSettings.grandTotalsPosition === 'Top' && isGrandTotalAdd && this.dataSourceSettings.showGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true)) {
19111
+ this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
19112
+ position = this.pivotValues.length;
19113
+ isGrandTotalAdd = false;
19114
+ }
18942
19115
  prevTupInfo = this.tupRowInfo[tupPos];
18943
19116
  var lastPos = position;
18944
19117
  var lastMemPos = memPos;
@@ -19029,6 +19202,11 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19029
19202
  }
19030
19203
  tupPos++;
19031
19204
  }
19205
+ if (!(this.dataSourceSettings.grandTotalsPosition === 'Top') || (this.olapValueAxis === 'row' && this.dataSourceSettings.rows.length === 1 && this.dataSourceSettings.grandTotalsPosition === 'Top') || this.dataSourceSettings.rows.length === 0) {
19206
+ this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
19207
+ }
19208
+ };
19209
+ OlapEngine.prototype.insertRowGrandTotal = function (gTotals, valueContent, pivotValues, tuples, position) {
19032
19210
  if (gTotals.length > 1 && gTotals[0].memberType !== 3) {
19033
19211
  gTotals[0].ordinal = -1;
19034
19212
  }
@@ -19054,6 +19232,41 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19054
19232
  this.updateRowEngine(pivotValues, valueContent, tuples.length);
19055
19233
  this.onDemandDrillEngine = pivotValues;
19056
19234
  }
19235
+ return gTotals;
19236
+ };
19237
+ OlapEngine.prototype.getValueAxis = function (valueAxis, valueIndex) {
19238
+ this.olapValueAxis = valueAxis;
19239
+ this.olapRowValueIndex = valueIndex;
19240
+ for (var i = 0; i < this.dataSourceSettings.rows.length; i++) {
19241
+ if (this.dataSourceSettings.rows[i].name === '[Measures]') {
19242
+ this.olapValueAxis = 'row';
19243
+ this.olapRowValueIndex = i;
19244
+ break;
19245
+ }
19246
+ }
19247
+ return this.olapValueAxis;
19248
+ };
19249
+ OlapEngine.prototype.frameGrandTotalAxisSet = function (gTotals, actualText, formattedText, rowIndex, ordinal, memberType, parentUniqueName, levelUniqueName, hierarchy, valueSort) {
19250
+ gTotals.push({
19251
+ axis: 'row',
19252
+ actualText: actualText,
19253
+ colIndex: 0,
19254
+ formattedText: formattedText,
19255
+ hasChild: false,
19256
+ level: -1,
19257
+ rowIndex: rowIndex,
19258
+ index: [],
19259
+ ordinal: ordinal,
19260
+ colSpan: 1,
19261
+ rowSpan: 1,
19262
+ memberType: memberType,
19263
+ isDrilled: false,
19264
+ parentUniqueName: parentUniqueName,
19265
+ levelUniqueName: levelUniqueName,
19266
+ hierarchy: hierarchy,
19267
+ valueSort: valueSort
19268
+ });
19269
+ return gTotals;
19057
19270
  };
19058
19271
  OlapEngine.prototype.getDepth = function (tupInfo, uniqueName, memberType) {
19059
19272
  var memberPosition = tupInfo.uNameCollection.indexOf(uniqueName);
@@ -19294,6 +19507,53 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19294
19507
  currTupCount--;
19295
19508
  }
19296
19509
  };
19510
+ OlapEngine.prototype.frameGrandTotalValues = function (tuples, gTotals, typeColl, measurePos) {
19511
+ var tupPos = 0;
19512
+ var lastAllStartPos;
19513
+ var lastAllCount;
19514
+ var availAllMember = false;
19515
+ var withoutAllEndPos = -1;
19516
+ var isGrandtoalDataAdd = false;
19517
+ var prevTupInfo;
19518
+ var isGrandTotalTop = false;
19519
+ while (tupPos < tuples.length && !isGrandtoalDataAdd) {
19520
+ var members = tuples[this.customArgs.action === 'down' ?
19521
+ (tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
19522
+ var allCount = this.tupRowInfo[tupPos].allCount;
19523
+ var allStartPos = this.tupRowInfo[tupPos].allStartPos;
19524
+ var measure = this.tupRowInfo[tupPos].measure;
19525
+ var typeColl_1 = this.tupRowInfo[tupPos].typeCollection;
19526
+ var drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
19527
+ var startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
19528
+ if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
19529
+ gTotals.pop();
19530
+ }
19531
+ if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
19532
+ (!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
19533
+ var attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
19534
+ var drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
19535
+ drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
19536
+ (prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
19537
+ ((withoutAllEndPos > prevTupInfo.measurePosition ? false :
19538
+ prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
19539
+ (allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
19540
+ : drillAllow;
19541
+ if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
19542
+ var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
19543
+ var formattedText = (typeColl_1[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
19544
+ this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
19545
+ members[measurePos].querySelector('Caption').textContent;
19546
+ 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') });
19547
+ gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
19548
+ }
19549
+ lastAllCount = allCount;
19550
+ lastAllStartPos = allStartPos;
19551
+ }
19552
+ isGrandtoalDataAdd = this.dataSourceSettings.values.length + 1 === gTotals.length ? true : false;
19553
+ tupPos++;
19554
+ }
19555
+ return gTotals;
19556
+ };
19297
19557
  OlapEngine.prototype.frameColumnHeader = function (tuples) {
19298
19558
  var _this = this;
19299
19559
  this.headerGrouping = {};
@@ -19358,8 +19618,18 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19358
19618
  withoutAllAvail = true;
19359
19619
  isStartCol = (allCount > 0 && isStartCol) ? (allStartPos > withoutAllStartPos) : isStartCol;
19360
19620
  }
19361
- if (isStartCol) {
19362
- if (allCount === 0) {
19621
+ var isGrandTotalTop = false;
19622
+ if (this_1.dataSourceSettings.grandTotalsPosition === 'Top' && this_1.dataSourceSettings.showGrandTotals && this_1.dataSourceSettings.showColumnGrandTotals) {
19623
+ var count = 0;
19624
+ for (var i = 0; i < members.length; i++) {
19625
+ if ((members[i].querySelector('Caption').textContent).indexOf('All') === 0) {
19626
+ count++;
19627
+ }
19628
+ }
19629
+ isGrandTotalTop = count === (this_1.olapValueAxis === 'column' ? this_1.dataSourceSettings.columns.length - 1 : this_1.dataSourceSettings.columns.length);
19630
+ }
19631
+ if (isStartCol || isGrandTotalTop) {
19632
+ if (allCount === 0 || isGrandTotalTop) {
19363
19633
  var levelComp = [-1, -1, -1];
19364
19634
  if (this_1.tupColumnInfo[tupPos - 1] && this_1.tupColumnInfo[tupPos - 1].allCount === 0) {
19365
19635
  levelComp = this_1.levelCompare(levelColl, this_1.tupColumnInfo[tupPos - 1].levelCollection);
@@ -19396,8 +19666,10 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19396
19666
  }
19397
19667
  this_1.setParentCollection(members);
19398
19668
  if (withoutAllAvail ? (withoutAllEndPos <= drillStartPos) : true) {
19399
- this_1.totalCollection[this_1.totalCollection.length] =
19400
- ({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
19669
+ if (!isGrandTotalTop) {
19670
+ this_1.totalCollection[this_1.totalCollection.length] =
19671
+ ({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
19672
+ }
19401
19673
  lastSavedInfo.allCount = allCount;
19402
19674
  lastSavedInfo.allStartPos = allStartPos;
19403
19675
  lastSavedInfo.drillStartPos = drillStartPos;
@@ -19422,10 +19694,12 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19422
19694
  }
19423
19695
  this_1.setParentCollection(members);
19424
19696
  if ((withoutAllAvail && drillStartPos > -1) ? (withoutAllEndPos <= drillStartPos) : true) {
19425
- this_1.totalCollection[this_1.totalCollection.length] =
19426
- ({
19427
- allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
19428
- });
19697
+ if (!isGrandTotalTop) {
19698
+ this_1.totalCollection[this_1.totalCollection.length] =
19699
+ ({
19700
+ allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
19701
+ });
19702
+ }
19429
19703
  lastSavedInfo.allCount = allCount;
19430
19704
  lastSavedInfo.allStartPos = allStartPos;
19431
19705
  lastSavedInfo.drillStartPos = drillStartPos;
@@ -19929,19 +20203,26 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
19929
20203
  }
19930
20204
  var newPos = 0;
19931
20205
  var totPos = 0;
20206
+ var valuePos = 0;
19932
20207
  gSumFlag = false;
19933
20208
  gSumGrouping = this.sortRowHeaders(gSumGrouping);
19934
20209
  for (var rPos = this.colDepth; rPos < rowCount; rPos++) {
19935
20210
  /* eslint-disable @typescript-eslint/dot-notation */
20211
+ if (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) &&
20212
+ ((this.olapValueAxis === 'column' && this.colDepth + 1 === rPos) || (this.olapValueAxis === 'row' && this.colDepth + this.dataSourceSettings.values.length + 1 === rPos))) {
20213
+ newPos = 0;
20214
+ gSumFlag = false;
20215
+ }
19936
20216
  var cell = gSumFlag ? gSumGrouping : sortLvlGrouping[levels[0]]['parent'];
19937
20217
  /* eslint-enable @typescript-eslint/dot-notation */
19938
- var currPos = gSumFlag ? (newPos - totPos) : newPos;
20218
+ var currPos = (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) && this.colDepth === rPos) ? cell.length : gSumFlag ? (newPos - totPos) : newPos;
19939
20219
  if (cell[currPos]) {
19940
20220
  this.pivotValues[rPos] = [cell[currPos]];
19941
20221
  this.pivotValues[rPos][0].rowIndex = rPos;
19942
- this.valueContent[newPos][0] = this.pivotValues[rPos][0];
20222
+ this.valueContent[valuePos][0] = this.pivotValues[rPos][0];
19943
20223
  }
19944
20224
  newPos++;
20225
+ valuePos++;
19945
20226
  if (this.pivotValues[rPos][0].type === 'grand sum') {
19946
20227
  gSumFlag = true;
19947
20228
  totPos = newPos;
@@ -22258,6 +22539,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22258
22539
  _this_1.request = new XMLHttpRequest();
22259
22540
  /** @hidden */
22260
22541
  _this_1.isServerWaitingPopup = false;
22542
+ /** @hidden */
22543
+ _this_1.actionObj = {};
22261
22544
  _this_1.pivotView = _this_1;
22262
22545
  setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
22263
22546
  return _this_1;
@@ -22300,10 +22583,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22300
22583
  modules.push({ args: [this], member: 'grouping' });
22301
22584
  }
22302
22585
  if (this.allowDrillThrough || (this.editSettings && this.editSettings.allowEditing)) {
22303
- modules.push({ args: [this], member: 'drillthrough' });
22586
+ modules.push({ args: [this], member: 'drillThrough' });
22304
22587
  }
22305
22588
  if (this.displayOption.view !== 'Table') {
22306
- modules.push({ args: [this], member: 'pivotchart' });
22589
+ modules.push({ args: [this], member: 'pivotChart' });
22307
22590
  }
22308
22591
  return modules;
22309
22592
  };
@@ -22883,7 +23166,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
22883
23166
  this.setProperties({ gridSettings: { allowSelection: true, selectionSettings: { cellSelectionMode: 'Box', mode: 'Cell', type: 'Multiple' } } }, true);
22884
23167
  }
22885
23168
  if (this.displayOption.view !== 'Table') {
22886
- this.chartModule = new PivotChart();
23169
+ this.pivotChartModule = new PivotChart();
22887
23170
  }
22888
23171
  this.currentView = this.currentView ? this.currentView : (this.displayOption.view === 'Both' ?
22889
23172
  this.displayOption.primary : this.displayOption.view);
@@ -23150,32 +23433,37 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23150
23433
  };
23151
23434
  PivotView.prototype.initialLoad = function () {
23152
23435
  var _this_1 = this;
23153
- this.cellTemplateFn = this.templateParser(this.cellTemplate);
23154
- this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
23155
- if (this.spinnerTemplate) {
23156
- createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
23436
+ try {
23437
+ this.cellTemplateFn = this.templateParser(this.cellTemplate);
23438
+ this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
23439
+ if (this.spinnerTemplate) {
23440
+ createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
23441
+ }
23442
+ else {
23443
+ createSpinner({ target: this.element }, this.createElement);
23444
+ }
23445
+ var loadArgs = {
23446
+ dataSourceSettings: this.dataSourceSettings,
23447
+ pivotview: this,
23448
+ fieldsType: {}
23449
+ };
23450
+ this.trigger(load, loadArgs, function (observedArgs) {
23451
+ _this_1.dataSourceSettings = observedArgs.dataSourceSettings;
23452
+ _this_1.fieldsType = observedArgs.fieldsType;
23453
+ _this_1.updateClass();
23454
+ _this_1.notify(initSubComponent, {});
23455
+ if (_this_1.dataSourceSettings.mode !== 'Server') {
23456
+ _this_1.notify(initialLoad, {});
23457
+ }
23458
+ if (_this_1.isAdaptive) {
23459
+ _this_1.contextMenuModule.render();
23460
+ }
23461
+ _this_1.notify(initToolbar, {});
23462
+ });
23157
23463
  }
23158
- else {
23159
- createSpinner({ target: this.element }, this.createElement);
23464
+ catch (execption) {
23465
+ this.actionFailureMethod(execption);
23160
23466
  }
23161
- var loadArgs = {
23162
- dataSourceSettings: this.dataSourceSettings,
23163
- pivotview: this,
23164
- fieldsType: {}
23165
- };
23166
- this.trigger(load, loadArgs, function (observedArgs) {
23167
- _this_1.dataSourceSettings = observedArgs.dataSourceSettings;
23168
- _this_1.fieldsType = observedArgs.fieldsType;
23169
- _this_1.updateClass();
23170
- _this_1.notify(initSubComponent, {});
23171
- if (_this_1.dataSourceSettings.mode !== 'Server') {
23172
- _this_1.notify(initialLoad, {});
23173
- }
23174
- if (_this_1.isAdaptive) {
23175
- _this_1.contextMenuModule.render();
23176
- }
23177
- _this_1.notify(initToolbar, {});
23178
- });
23179
23467
  };
23180
23468
  /**
23181
23469
  * Register the internal events.
@@ -23206,12 +23494,32 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23206
23494
  /* eslint-disable */
23207
23495
  var columnRender = this.gridSettings['columnRender'];
23208
23496
  var chartLoadEvent = this.chartSettings['load'];
23497
+ var chartLoadedEvent = this.chartSettings['loaded'];
23498
+ var chartTextRenderEvent = this.chartSettings['textRender'];
23499
+ var chartPointRenderEvent = this.chartSettings['pointRender'];
23500
+ var chartSeriesRenderEvent = this.chartSettings['seriesRender'];
23501
+ var chartLegendRenderEvent = this.chartSettings['legendRender'];
23502
+ var chartPointClickEvent = this.chartSettings['pointClick'];
23503
+ var chartTooltipRenderEvent = this.chartSettings['tooltipRender'];
23209
23504
  this.gridSettings['columnRender'] = undefined;
23210
23505
  this.chartSettings['tooltipRender'] = undefined;
23211
23506
  this.chartSettings['load'] = undefined;
23507
+ this.chartSettings['loaded'] = undefined;
23508
+ this.chartSettings['textRender'] = undefined;
23509
+ this.chartSettings['pointRender'] = undefined;
23510
+ this.chartSettings['seriesRender'] = undefined;
23511
+ this.chartSettings['legendRender'] = undefined;
23512
+ this.chartSettings['pointClick'] = undefined;
23212
23513
  var persistData = this.addOnPersist(keyEntity);
23213
23514
  this.gridSettings['columnRender'] = columnRender;
23214
23515
  this.chartSettings['load'] = chartLoadEvent;
23516
+ this.chartSettings['loaded'] = chartLoadedEvent;
23517
+ this.chartSettings['textRender'] = chartTextRenderEvent;
23518
+ this.chartSettings['pointRender'] = chartPointRenderEvent;
23519
+ this.chartSettings['seriesRender'] = chartSeriesRenderEvent;
23520
+ this.chartSettings['legendRender'] = chartLegendRenderEvent;
23521
+ this.chartSettings['pointClick'] = chartPointClickEvent;
23522
+ this.chartSettings['tooltipRender'] = chartTooltipRenderEvent;
23215
23523
  /* eslint-enable */
23216
23524
  return persistData;
23217
23525
  };
@@ -23394,15 +23702,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23394
23702
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
23395
23703
  this.renderEmptyGrid();
23396
23704
  if (newProp.displayOption.view === 'Table') {
23397
- if (this.chartModule) {
23398
- this.chartModule.destroy();
23705
+ if (this.pivotChartModule) {
23706
+ this.pivotChartModule.destroy();
23399
23707
  this.chart = undefined;
23400
- this.chartModule = undefined;
23708
+ this.pivotChartModule = undefined;
23401
23709
  }
23402
23710
  }
23403
23711
  }
23404
- else if (!this.chartModule && this.displayOption.view !== 'Table') {
23405
- this.chartModule = new PivotChart();
23712
+ else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
23713
+ this.pivotChartModule = new PivotChart();
23406
23714
  }
23407
23715
  }
23408
23716
  else if (this.showToolbar && !isNullOrUndefined(newProp.displayOption) && newProp.displayOption.view) {
@@ -23432,12 +23740,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23432
23740
  (newProp.chartSettings.chartSeries && Object.keys(newProp.chartSettings.chartSeries).indexOf('type') !== -1))) {
23433
23741
  this.groupingBarModule.renderLayout();
23434
23742
  }
23435
- if (isNullOrUndefined(this.chartModule) && this.displayOption.view !== 'Table') {
23436
- this.chartModule = new PivotChart();
23743
+ if (isNullOrUndefined(this.pivotChartModule) && this.displayOption.view !== 'Table') {
23744
+ this.pivotChartModule = new PivotChart();
23437
23745
  }
23438
23746
  var engineModule = this.dataType === 'pivot' ? this.engineModule : this.olapEngineModule;
23439
- if (!isNullOrUndefined(this.chartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
23440
- this.chartModule.loadChart(this, this.chartSettings);
23747
+ if (!isNullOrUndefined(this.pivotChartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
23748
+ this.pivotChartModule.loadChart(this, this.chartSettings);
23441
23749
  }
23442
23750
  if (!isNullOrUndefined(engineModule.pivotValues) && !isNullOrUndefined(engineModule.fieldList)) {
23443
23751
  this.notify(uiUpdate, this);
@@ -23464,6 +23772,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23464
23772
  if (this.element.querySelector('.e-grouping-bar')) {
23465
23773
  this.element.querySelector('.e-grouping-bar').remove();
23466
23774
  }
23775
+ else if (this.groupingBarModule) {
23776
+ this.groupingBarModule.renderLayout();
23777
+ }
23467
23778
  if (isNullOrUndefined(newProp.showFieldList))
23468
23779
  this.renderPivotGrid();
23469
23780
  break;
@@ -23557,9 +23868,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23557
23868
  */
23558
23869
  PivotView.prototype.renderPivotGrid = function () {
23559
23870
  this.clearTemplate();
23560
- if (this.chartModule) {
23561
- this.chartModule.engineModule = this.engineModule;
23562
- this.chartModule.loadChart(this, this.chartSettings);
23871
+ if (this.pivotChartModule) {
23872
+ this.pivotChartModule.engineModule = this.engineModule;
23873
+ this.pivotChartModule.loadChart(this, this.chartSettings);
23563
23874
  if (this.enableRtl && this.chart && document.body.getAttribute('dir') !== 'rtl') {
23564
23875
  addClass([this.chart.element], PIVOTCHART_LTR);
23565
23876
  }
@@ -23590,7 +23901,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23590
23901
  this.applyHyperlinkSettings();
23591
23902
  }
23592
23903
  this.renderModule = this.renderModule ? this.renderModule : new Render(this);
23593
- this.renderModule.render();
23904
+ this.renderModule.render(true);
23594
23905
  }
23595
23906
  else if (this.grid) {
23596
23907
  remove(this.grid.element);
@@ -23606,7 +23917,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23606
23917
  if (this.toolbarModule && this.toolbarModule.toolbar) {
23607
23918
  this.toolbarModule.toolbar.width = this.getGridWidthAsNumber() - 2;
23608
23919
  }
23609
- this.chart.element.style.width = formatUnit(this.getGridWidthAsNumber());
23920
+ if (this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis) {
23921
+ this.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.getGridWidthAsNumber());
23922
+ }
23610
23923
  this.chart.width = formatUnit(this.getGridWidthAsNumber());
23611
23924
  if (this.currentView === 'Table') {
23612
23925
  this.grid.element.style.display = '';
@@ -23626,7 +23939,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23626
23939
  }
23627
23940
  if (this.toolbarModule) {
23628
23941
  if (this.showFieldList && select('#' + this.element.id + '_PivotFieldList', this.element)) {
23629
- select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
23942
+ if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1) {
23943
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
23944
+ }
23945
+ else {
23946
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.top = this.element.querySelector('.' + GRID_TOOLBAR).offsetHeight.toString() + 'px';
23947
+ select('#' + this.element.id + '_PivotFieldList', this.element).style.position = 'relative';
23948
+ }
23630
23949
  }
23631
23950
  if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1 &&
23632
23951
  this.showToolbar && this.element.querySelector('.e-toggle-field-list')) {
@@ -23778,7 +24097,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23778
24097
  isDrillThrough: (pivot.allowDrillThrough || pivot.editSettings.allowEditing),
23779
24098
  localeObj: pivot.localeObj,
23780
24099
  fieldsType: pivot.fieldsType,
23781
- clonedReport: pivot.clonedReport
24100
+ clonedReport: pivot.clonedReport,
24101
+ globalize: pivot.globalize,
24102
+ currenyCode: pivot.currencyCode
23782
24103
  };
23783
24104
  /* eslint-enable @typescript-eslint/indent */
23784
24105
  if (pivot.dataSourceSettings.mode === 'Server') {
@@ -23828,6 +24149,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23828
24149
  this.exportType = 'Excel';
23829
24150
  this.grid.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);
23830
24151
  }
24152
+ this.actionObj.actionName = this.getActionCompleteName();
24153
+ var actionInfo = {
24154
+ exportInfo: { type: this.exportType, info: excelExportProperties }
24155
+ };
24156
+ this.actionObj.actionInfo = actionInfo;
24157
+ if (this.actionObj.actionName) {
24158
+ this.actionCompleteMethod();
24159
+ }
23831
24160
  };
23832
24161
  /**
23833
24162
  * Export PivotGrid data to CSV file.
@@ -23845,6 +24174,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23845
24174
  this.exportType = 'CSV';
23846
24175
  this.grid.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);
23847
24176
  }
24177
+ this.actionObj.actionName = this.getActionCompleteName();
24178
+ var actionInfo = {
24179
+ exportInfo: { type: this.exportType, info: excelExportProperties }
24180
+ };
24181
+ this.actionObj.actionInfo = actionInfo;
24182
+ if (this.actionObj.actionName) {
24183
+ this.actionCompleteMethod();
24184
+ }
23848
24185
  };
23849
24186
  /**
23850
24187
  * Export Pivot widget data to PDF document.
@@ -23861,6 +24198,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23861
24198
  else {
23862
24199
  this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
23863
24200
  }
24201
+ this.actionObj.actionName = this.getActionCompleteName();
24202
+ var actionInfo = {
24203
+ exportInfo: { type: 'PDF', info: pdfExportProperties }
24204
+ };
24205
+ this.actionObj.actionInfo = actionInfo;
24206
+ if (this.actionObj.actionName) {
24207
+ this.actionCompleteMethod();
24208
+ }
23864
24209
  };
23865
24210
  /**
23866
24211
  * Export method for the chart.
@@ -23875,6 +24220,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23875
24220
  if (this.chart && this.chart.enableExport) {
23876
24221
  this.chart.exportModule.export(type, fileName, orientation, null, width, height);
23877
24222
  }
24223
+ this.actionObj.actionName = this.getActionCompleteName();
24224
+ var actionInfo = {
24225
+ exportInfo: { type: type, info: fileName }
24226
+ };
24227
+ this.actionObj.actionInfo = actionInfo;
24228
+ if (this.actionObj.actionName) {
24229
+ this.actionCompleteMethod();
24230
+ }
23878
24231
  };
23879
24232
  /**
23880
24233
  * Print method for the chart.
@@ -23986,6 +24339,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
23986
24339
  };
23987
24340
  _this_1.trigger(enginePopulated, eventArgs);
23988
24341
  pivot_1.engineModule.pivotValues = eventArgs.pivotValues;
24342
+ var actionInfo = {
24343
+ drillInfo: drilledItem_1
24344
+ };
24345
+ _this_1.actionObj.actionInfo = actionInfo;
23989
24346
  pivot_1.renderPivotGrid();
23990
24347
  }
23991
24348
  else {
@@ -24338,6 +24695,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24338
24695
  this.unwireEvents();
24339
24696
  this.wireEvents();
24340
24697
  this.isChartLoaded = false;
24698
+ this.actionObj.actionName = this.getActionCompleteName();
24699
+ if (this.actionObj.actionName) {
24700
+ if (this.actionObj.actionName !== windowResize) {
24701
+ this.actionCompleteMethod();
24702
+ }
24703
+ }
24341
24704
  };
24342
24705
  PivotView.prototype.setToolTip = function (args) {
24343
24706
  var colIndex = Number(args.target.getAttribute('aria-colindex'));
@@ -24369,6 +24732,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24369
24732
  if (cell && this.engineModule.fieldList[cell.actualText]) {
24370
24733
  var field = this.engineModule.fieldList[cell.actualText];
24371
24734
  aggregateType = field.aggregateType;
24735
+ if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
24736
+ field.type === 'exclude')) {
24737
+ aggregateType = 'Count';
24738
+ }
24739
+ else {
24740
+ aggregateType = (aggregateType === undefined) ? 'Sum' : field.aggregateType;
24741
+ }
24372
24742
  caption = field.caption;
24373
24743
  hasField = true;
24374
24744
  }
@@ -24588,76 +24958,105 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24588
24958
  ele = target.parentElement.parentElement;
24589
24959
  }
24590
24960
  this.CellClicked(target, e);
24591
- if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
24592
- && this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
24593
- this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
24594
- ele.classList.contains('e-stot'))) {
24595
- var colIndex = Number(ele.getAttribute('aria-colindex'));
24596
- var rowIndex = Number(ele.getAttribute('index'));
24597
- if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24598
- var header = this.pivotValues[rowIndex][colIndex];
24599
- if (this.dataSourceSettings.valueIndex === -1) {
24600
- rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
24601
- }
24602
- else {
24603
- var level = this.getLevel(header);
24604
- rowIndex = (level <= this.engineModule.measureIndex &&
24605
- header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
24961
+ try {
24962
+ if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
24963
+ && this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
24964
+ this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
24965
+ ele.classList.contains('e-stot'))) {
24966
+ var FieldName = target.parentElement.getAttribute('fieldname');
24967
+ var fieldInfo = PivotUtil.getFieldInfo(FieldName, this);
24968
+ this.actionObj.actionName = sortValue;
24969
+ this.actionObj.fieldInfo = fieldInfo.fieldItem;
24970
+ if (this.actionBeginMethod()) {
24971
+ return;
24606
24972
  }
24607
- }
24608
- else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24609
- colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
24610
- rowIndex = this.engineModule.headerContent.length - 1;
24611
- }
24612
- this.setProperties({
24613
- dataSourceSettings: {
24614
- valueSortSettings: {
24615
- columnIndex: (Number(ele.getAttribute('aria-colindex')) +
24616
- Number(ele.getAttribute('aria-colspan')) - 1),
24617
- sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
24618
- headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
24619
- headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
24620
- this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
24973
+ var colIndex = Number(ele.getAttribute('aria-colindex'));
24974
+ var rowIndex = Number(ele.getAttribute('index'));
24975
+ if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24976
+ var header = this.pivotValues[rowIndex][colIndex];
24977
+ if (this.dataSourceSettings.valueIndex === -1) {
24978
+ rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
24621
24979
  }
24622
- }
24623
- }, true);
24624
- this.showWaitingPopup();
24625
- var pivot = this; /* eslint-disable-line */
24626
- pivot.engineModule.enableValueSorting = true;
24627
- if (pivot.enableVirtualization) {
24628
- if (pivot.dataSourceSettings.enableSorting) {
24629
- for (var _i = 0, _a = Object.keys(pivot.engineModule.fieldList); _i < _a.length; _i++) {
24630
- var key = _a[_i];
24631
- pivot.engineModule.fieldList[key].sort = 'Ascending';
24980
+ else {
24981
+ var level = this.getLevel(header);
24982
+ rowIndex = (level <= this.engineModule.measureIndex &&
24983
+ header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
24984
+ }
24985
+ }
24986
+ else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
24987
+ colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
24988
+ rowIndex = this.engineModule.headerContent.length - 1;
24989
+ }
24990
+ this.setProperties({
24991
+ dataSourceSettings: {
24992
+ valueSortSettings: {
24993
+ columnIndex: (Number(ele.getAttribute('aria-colindex')) +
24994
+ Number(ele.getAttribute('aria-colspan')) - 1),
24995
+ sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
24996
+ headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
24997
+ headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
24998
+ this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
24999
+ }
25000
+ }
25001
+ }, true);
25002
+ this.showWaitingPopup();
25003
+ var pivot = this; /* eslint-disable-line */
25004
+ pivot.engineModule.enableValueSorting = true;
25005
+ if (pivot.enableVirtualization) {
25006
+ if (pivot.dataSourceSettings.enableSorting) {
25007
+ for (var _i = 0, _a = Object.keys(pivot.engineModule.fieldList); _i < _a.length; _i++) {
25008
+ var key = _a[_i];
25009
+ pivot.engineModule.fieldList[key].sort = 'Ascending';
25010
+ }
25011
+ pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
25012
+ }
25013
+ if (pivot.dataSourceSettings.mode === 'Server') {
25014
+ pivot.getEngine('onValueSort', null, null, null, null, null, null);
25015
+ }
25016
+ else {
25017
+ pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
25018
+ pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
25019
+ pivot.engineModule.applyValueSorting();
25020
+ pivot.engineModule.updateEngine();
24632
25021
  }
24633
- pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
24634
25022
  }
24635
- if (pivot.dataSourceSettings.mode === 'Server') {
25023
+ else if (pivot.dataSourceSettings.mode === 'Server') {
24636
25024
  pivot.getEngine('onValueSort', null, null, null, null, null, null);
24637
25025
  }
24638
25026
  else {
24639
- pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
24640
- pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
24641
- pivot.engineModule.applyValueSorting();
24642
- pivot.engineModule.updateEngine();
25027
+ pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
24643
25028
  }
25029
+ pivot.allowServerDataBinding = false;
25030
+ pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
25031
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
25032
+ delete pivot.bulkChanges.pivotValues;
25033
+ pivot.allowServerDataBinding = true;
25034
+ var actionInfo = {
25035
+ valueSortInfo: this.engineModule.valueSortSettings
25036
+ };
25037
+ this.actionObj.actionInfo = actionInfo;
25038
+ pivot.renderPivotGrid();
24644
25039
  }
24645
- else if (pivot.dataSourceSettings.mode === 'Server') {
24646
- pivot.getEngine('onValueSort', null, null, null, null, null, null);
24647
- }
24648
- else {
24649
- pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
24650
- }
24651
- pivot.allowServerDataBinding = false;
24652
- pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
24653
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
24654
- delete pivot.bulkChanges.pivotValues;
24655
- pivot.allowServerDataBinding = true;
24656
- pivot.renderPivotGrid();
25040
+ }
25041
+ catch (execption) {
25042
+ this.actionFailureMethod(execption);
24657
25043
  }
24658
25044
  }
24659
25045
  else if (target.classList.contains(COLLAPSE) || target.classList.contains(EXPAND)) {
24660
- this.onDrill(target);
25046
+ var drillFieldName = target.parentElement.getAttribute('fieldname');
25047
+ var fieldInfo = PivotUtil.getFieldInfo(drillFieldName, this);
25048
+ var actionName = target.classList.contains(COLLAPSE) ? this.actionObj.actionName = drillUp : target.classList.contains(EXPAND) ? this.actionObj.actionName = drillDown : '';
25049
+ this.actionObj.actionName = actionName;
25050
+ this.actionObj.fieldInfo = fieldInfo.fieldItem;
25051
+ if (this.actionBeginMethod()) {
25052
+ return;
25053
+ }
25054
+ try {
25055
+ this.onDrill(target);
25056
+ }
25057
+ catch (execption) {
25058
+ this.actionFailureMethod(execption);
25059
+ }
24661
25060
  }
24662
25061
  else {
24663
25062
  this.CellClicked(target, e);
@@ -24759,7 +25158,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24759
25158
  var firstColWidth = this.pivotColumns[0].width;
24760
25159
  var eventArgs = {
24761
25160
  columns: this.pivotColumns,
24762
- dataSourceSettings: this.dataSourceSettings
25161
+ dataSourceSettings: this.dataSourceSettings,
25162
+ stackedColumns: this.getStackedColumns(gridcolumns, [])
24763
25163
  };
24764
25164
  this.trigger(beforeColumnsRender, eventArgs);
24765
25165
  if (this.enableVirtualization && eventArgs.columns.length > 0 && eventArgs.columns[0].width !== gridcolumns[0].width) {
@@ -24864,8 +25264,16 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
24864
25264
  /* eslint-disable-next-line */
24865
25265
  /** @hidden */
24866
25266
  PivotView.prototype.onWindowResize = function () {
25267
+ this.actionObj.actionName = windowResize;
25268
+ if (this.actionBeginMethod()) {
25269
+ return;
25270
+ }
24867
25271
  clearTimeout(this.timeOutObj);
24868
25272
  this.timeOutObj = setTimeout(this.layoutRefresh.bind(this), 500);
25273
+ this.actionObj.actionName = this.getActionCompleteName();
25274
+ if (this.actionObj.actionName) {
25275
+ this.actionCompleteMethod();
25276
+ }
24869
25277
  };
24870
25278
  /**
24871
25279
  * Refreshes the Pivot Table for blazor layoutRefresh is called for other base refresh is called.
@@ -25260,7 +25668,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25260
25668
  isDrillThrough: (_this_1.allowDrillThrough || _this_1.editSettings.allowEditing),
25261
25669
  localeObj: _this_1.localeObj,
25262
25670
  fieldsType: _this_1.fieldsType,
25263
- clonedReport: _this_1.clonedReport
25671
+ clonedReport: _this_1.clonedReport,
25672
+ globalize: _this_1.globalize,
25673
+ currenyCode: _this_1.currencyCode
25264
25674
  };
25265
25675
  if (_this_1.dataType === 'pivot') {
25266
25676
  if (_this_1.dataSourceSettings.groupSettings && _this_1.dataSourceSettings.groupSettings.length > 0) {
@@ -25486,7 +25896,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25486
25896
  var str = 'color: ' + format[k].style.color + '!important;background-color: ' + format[k].style.backgroundColor +
25487
25897
  '!important;font-size: ' + format[k].style.fontSize + '!important;font-family: ' + format[k].style.fontFamily +
25488
25898
  ' !important;';
25489
- sheet.insertRule('.format' + this.element.id + k + '{' + str + '}', 0);
25899
+ var formatClass = '.format' + this.element.id + k;
25900
+ sheet.insertRule(formatClass + ', ' + formatClass + ' .e-cellvalue' + '{' + str + '}', 0);
25490
25901
  }
25491
25902
  }
25492
25903
  };
@@ -25713,6 +26124,65 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25713
26124
  EventHandler.remove(document, this.isAdaptive ? 'touchend' : 'click', this.removeButtonFocus);
25714
26125
  window.removeEventListener('resize', this.onWindowResize.bind(this), true);
25715
26126
  };
26127
+ /** @hidden */
26128
+ PivotView.prototype.actionBeginMethod = function () {
26129
+ var eventArgs = {
26130
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
26131
+ actionName: this.actionObj.actionName,
26132
+ fieldInfo: this.actionObj.fieldInfo,
26133
+ cancel: false
26134
+ };
26135
+ this.trigger(actionBegin, eventArgs);
26136
+ return eventArgs.cancel;
26137
+ };
26138
+ /** @hidden */
26139
+ PivotView.prototype.actionCompleteMethod = function () {
26140
+ var eventArgs = {
26141
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
26142
+ actionName: this.actionObj.actionName,
26143
+ fieldInfo: this.actionObj.fieldInfo,
26144
+ actionInfo: this.actionObj.actionInfo
26145
+ };
26146
+ this.trigger(actionComplete, eventArgs);
26147
+ this.actionObj.actionName = '';
26148
+ this.actionObj.actionInfo = undefined;
26149
+ this.actionObj.fieldInfo = undefined;
26150
+ };
26151
+ /** @hidden */
26152
+ PivotView.prototype.actionFailureMethod = function (error) {
26153
+ var eventArgs = {
26154
+ actionName: this.actionObj.actionName,
26155
+ errorInfo: error
26156
+ };
26157
+ this.trigger(actionFailure, eventArgs);
26158
+ };
26159
+ /** @hidden */
26160
+ PivotView.prototype.getActionCompleteName = function () {
26161
+ var actionName = (this.actionObj.actionName == openConditionalFormatting) ? conditionallyFormatted : (this.actionObj.actionName == openNumberFormatting) ? numberFormatted
26162
+ : (this.actionObj.actionName == tableView) ? tableViewed : (this.actionObj.actionName == chartView) ? chartViewed : (this.actionObj.actionName == hideSubTotals) ? subTotalsHidden : (this.actionObj.actionName == subTotalsRow) ? subTotalsRowShown
26163
+ : (this.actionObj.actionName == subTotalsColumn) ? subTotalsColumnShown : (this.actionObj.actionName == showSubTotals) ? subTotalsShown : (this.actionObj.actionName == hideGrandTotals) ? grandTotalsHidden
26164
+ : (this.actionObj.actionName == grandTotalsRow) ? grandTotalsRowShown : (this.actionObj.actionName == grandTotalsColumn) ? grandTotalsColumnShown : (this.actionObj.actionName == showGrandTotals) ? grandTotalsShown
26165
+ : (this.actionObj.actionName == sortValue) ? valueSorted : (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
26166
+ : (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
26167
+ : this.actionObj.actionName == saveEditedRecords ? editedRecordsSaved : this.actionObj.actionName == addNewRecord ? newRecordAdded
26168
+ : this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
26169
+ : (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
26170
+ : this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
26171
+ : (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : this.actionObj.actionName;
26172
+ return actionName;
26173
+ };
26174
+ /* eslint-disable-next-line */
26175
+ /** @hidden */
26176
+ PivotView.prototype.getStackedColumns = function (gridcolumns, stackedColumns) {
26177
+ for (var _i = 0, gridcolumns_4 = gridcolumns; _i < gridcolumns_4.length; _i++) {
26178
+ var column = gridcolumns_4[_i];
26179
+ stackedColumns.push(column);
26180
+ if (column.columns && column.columns.length > 0) {
26181
+ this.getStackedColumns(column.columns, stackedColumns);
26182
+ }
26183
+ }
26184
+ return stackedColumns;
26185
+ };
25716
26186
  /**
25717
26187
  * To destroy the PivotView elements.
25718
26188
  * @returns {void}
@@ -25776,8 +26246,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25776
26246
  if (this.commonModule) {
25777
26247
  this.commonModule.destroy();
25778
26248
  }
25779
- if (this.chartModule) {
25780
- this.chartModule.destroy();
26249
+ if (this.pivotChartModule) {
26250
+ this.pivotChartModule.destroy();
25781
26251
  }
25782
26252
  if (this.pivotButtonModule && !this.pivotButtonModule.isDestroyed) {
25783
26253
  this.pivotButtonModule.destroy();
@@ -25832,8 +26302,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25832
26302
  if (this.commonModule) {
25833
26303
  this.commonModule = null;
25834
26304
  }
25835
- if (this.chartModule) {
25836
- this.chartModule = null;
26305
+ if (this.pivotChartModule) {
26306
+ this.pivotChartModule = null;
25837
26307
  }
25838
26308
  if (this.pivotButtonModule) {
25839
26309
  this.pivotButtonModule = null;
@@ -25853,6 +26323,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25853
26323
  if (this.drillThroughModule) {
25854
26324
  this.drillThroughModule = null;
25855
26325
  }
26326
+ if (this.clonedDataSet) {
26327
+ this.clonedDataSet = null;
26328
+ }
26329
+ if (this.clonedReport) {
26330
+ this.clonedReport = null;
26331
+ }
25856
26332
  this.element.innerHTML = '';
25857
26333
  removeClass([this.element], ROOT);
25858
26334
  removeClass([this.element], RTL);
@@ -26195,6 +26671,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26195
26671
  __decorate([
26196
26672
  Event()
26197
26673
  ], PivotView.prototype, "beforeServiceInvoke", void 0);
26674
+ __decorate([
26675
+ Event()
26676
+ ], PivotView.prototype, "actionBegin", void 0);
26677
+ __decorate([
26678
+ Event()
26679
+ ], PivotView.prototype, "actionComplete", void 0);
26680
+ __decorate([
26681
+ Event()
26682
+ ], PivotView.prototype, "actionFailure", void 0);
26198
26683
  PivotView = __decorate([
26199
26684
  NotifyPropertyChanges
26200
26685
  ], PivotView);
@@ -26209,6 +26694,250 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
26209
26694
  * Renderer Export
26210
26695
  */
26211
26696
 
26697
+ /**
26698
+ * This is a file to perform common utility for OLAP and Relational datasource
26699
+ * @hidden
26700
+ */
26701
+ var PivotExportUtil = /** @__PURE__ @class */ (function () {
26702
+ function PivotExportUtil() {
26703
+ }
26704
+ /* eslint-disable @typescript-eslint/no-explicit-any */
26705
+ PivotExportUtil.getDefinedObj = function (data) {
26706
+ var keyPos = 0;
26707
+ var framedSet = {};
26708
+ /* eslint-enable @typescript-eslint/no-explicit-any */
26709
+ if (!(data === null || data === undefined)) {
26710
+ var fields = Object.keys(data);
26711
+ while (keyPos < fields.length) {
26712
+ if (!(data[fields[keyPos]] === null || data[fields[keyPos]] === undefined)) {
26713
+ framedSet[fields[keyPos]] = data[fields[keyPos]];
26714
+ }
26715
+ keyPos++;
26716
+ }
26717
+ }
26718
+ else {
26719
+ framedSet = data;
26720
+ }
26721
+ return framedSet;
26722
+ };
26723
+ PivotExportUtil.getClonedPivotValues = function (pivotValues) {
26724
+ var clonedSets = [];
26725
+ for (var i = 0; i < pivotValues.length; i++) {
26726
+ if (pivotValues[i]) {
26727
+ clonedSets[i] = [];
26728
+ for (var j = 0; j < pivotValues[i].length; j++) {
26729
+ if (pivotValues[i][j]) {
26730
+ /* eslint-disable */
26731
+ clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
26732
+ /* eslint-enable */
26733
+ }
26734
+ }
26735
+ }
26736
+ }
26737
+ return clonedSets;
26738
+ };
26739
+ /* eslint-disable */
26740
+ PivotExportUtil.getClonedPivotValueObj = function (data) {
26741
+ /* eslint-enable */
26742
+ var keyPos = 0;
26743
+ /* eslint-disable @typescript-eslint/no-explicit-any */
26744
+ var framedSet = {};
26745
+ /* eslint-enable @typescript-eslint/no-explicit-any */
26746
+ if (!(data === null || data === undefined)) {
26747
+ var fields = Object.keys(data);
26748
+ while (keyPos < fields.length) {
26749
+ framedSet[fields[keyPos]] = data[fields[keyPos]];
26750
+ keyPos++;
26751
+ }
26752
+ }
26753
+ else {
26754
+ framedSet = data;
26755
+ }
26756
+ return framedSet;
26757
+ };
26758
+ /* eslint-disable */
26759
+ PivotExportUtil.isContainCommonElements = function (collection1, collection2) {
26760
+ /* eslint-enable */
26761
+ for (var i = 0, cnt = collection1.length; i < cnt; i++) {
26762
+ for (var j = 0, lnt = collection2.length; j < lnt; j++) {
26763
+ if (collection2[j] === collection1[i]) {
26764
+ return true;
26765
+ }
26766
+ }
26767
+ }
26768
+ return false;
26769
+ };
26770
+ /* eslint-disable */
26771
+ PivotExportUtil.formatPdfHeaderFooter = function (pdf) {
26772
+ var contents = [];
26773
+ if (!isNullOrUndefined(pdf)) {
26774
+ for (var i = 0; i < pdf.length; i++) {
26775
+ var a = pdf[i];
26776
+ var content = {
26777
+ /* eslint-enable */
26778
+ type: a.Type,
26779
+ pageNumberType: a.PageNumberType,
26780
+ style: a.Style ? {
26781
+ penColor: a.Style.PenColor,
26782
+ penSize: a.Style.PenSize,
26783
+ dashStyle: a.Style.DashStyle,
26784
+ textBrushColor: a.Style.TextBrushColor,
26785
+ textPenColor: a.Style.TextPenColor,
26786
+ fontSize: a.Style.FontSize,
26787
+ hAlign: a.Style.HAlign,
26788
+ vAlign: a.Style.VAlign
26789
+ } : a.Style,
26790
+ points: a.Points !== null ? {
26791
+ x1: a.Points.X1,
26792
+ y1: a.Points.Y1,
26793
+ x2: a.Points.X2,
26794
+ y2: a.Points.Y2
26795
+ } : null,
26796
+ format: a.Format,
26797
+ position: a.Position !== null ? {
26798
+ x: a.Position.X,
26799
+ y: a.Position.Y
26800
+ } : null,
26801
+ size: a.Size !== null ? {
26802
+ height: a.Size.Height,
26803
+ width: a.Size.Width
26804
+ } : null,
26805
+ src: a.Src,
26806
+ value: a.Value,
26807
+ font: a.Font
26808
+ };
26809
+ contents.push(content);
26810
+ }
26811
+ }
26812
+ return contents;
26813
+ };
26814
+ /* eslint-disable */
26815
+ PivotExportUtil.formatPdfExportProperties = function (pdf) {
26816
+ var values;
26817
+ /* eslint-enable */
26818
+ values = this.getDefinedObj({
26819
+ pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
26820
+ pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
26821
+ header: !isNullOrUndefined(pdf.Header) ? {
26822
+ fromTop: pdf.Header.FromTop,
26823
+ height: pdf.Header.Height,
26824
+ contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
26825
+ } : null,
26826
+ columns: pdf.Columns,
26827
+ footer: !isNullOrUndefined(pdf.Footer) ? {
26828
+ fromTop: pdf.Footer.FromBottom,
26829
+ height: pdf.Footer.Height,
26830
+ contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
26831
+ } : null,
26832
+ includeHiddenColumn: pdf.IncludeHiddenColumn,
26833
+ dataSource: pdf.DataSource,
26834
+ exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
26835
+ theme: !isNullOrUndefined(pdf.Theme) ? {
26836
+ header: pdf.Theme.Header,
26837
+ record: pdf.Theme.Record,
26838
+ caption: pdf.Theme.Caption
26839
+ } : null,
26840
+ fileName: pdf.FileName,
26841
+ hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
26842
+ allowHorizontalOverflow: pdf.AllowHorizontalOverflow
26843
+ });
26844
+ return values;
26845
+ };
26846
+ /* eslint-disable */
26847
+ PivotExportUtil.formatExcelStyle = function (style) {
26848
+ var prop;
26849
+ /* eslint-enable */
26850
+ if (!isNullOrUndefined(style)) {
26851
+ prop = this.getDefinedObj({
26852
+ fontColor: style.FontColor,
26853
+ fontName: style.FontName,
26854
+ fontSize: style.FontSize,
26855
+ hAlign: style.HAlign === String ? style.HAlign : null,
26856
+ vAlign: style.VAlign === String ? style.VAlign : null,
26857
+ bold: style.Bold,
26858
+ indent: style.Indent,
26859
+ italic: style.Italic,
26860
+ underline: style.Underline,
26861
+ backColor: style.BackColor,
26862
+ wrapText: style.WrapText,
26863
+ borders: style.Borders,
26864
+ numberFormat: style.NumberFormat,
26865
+ type: style.Type
26866
+ });
26867
+ }
26868
+ return prop;
26869
+ };
26870
+ /* eslint-disable */
26871
+ PivotExportUtil.formatExcelCell = function (cell) {
26872
+ var cells = [];
26873
+ if (!isNullOrUndefined(cell)) {
26874
+ for (var i = 0; i < cell.length; i++) {
26875
+ this.getDefinedObj({
26876
+ index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
26877
+ colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
26878
+ value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
26879
+ hyperlink: {
26880
+ target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
26881
+ displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
26882
+ },
26883
+ styles: this.formatExcelStyle(cell[i].Style),
26884
+ rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
26885
+ });
26886
+ /* eslint-enable */
26887
+ }
26888
+ }
26889
+ return cells;
26890
+ };
26891
+ /* eslint-disable */
26892
+ PivotExportUtil.formatExcelHeaderFooter = function (excel) {
26893
+ var rows = [];
26894
+ if (!isNullOrUndefined(excel)) {
26895
+ for (var i = 0; i < excel.Rows.length; i++) {
26896
+ var row = excel.Rows[i];
26897
+ var prop = this.getDefinedObj({
26898
+ index: !isNullOrUndefined(row.Index) ? row.Index : null,
26899
+ cells: this.formatExcelCell(row.Cells),
26900
+ grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
26901
+ });
26902
+ rows.push(prop);
26903
+ }
26904
+ }
26905
+ return rows;
26906
+ };
26907
+ PivotExportUtil.formatExcelExportProperties = function (excel) {
26908
+ /* eslint-enable */
26909
+ var prop;
26910
+ prop = this.getDefinedObj({
26911
+ dataSource: excel.DataSource,
26912
+ query: excel.Query,
26913
+ multipleExport: this.getDefinedObj({
26914
+ type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
26915
+ blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
26916
+ }),
26917
+ header: this.getDefinedObj({
26918
+ headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
26919
+ rows: this.formatExcelHeaderFooter(excel.Header)
26920
+ }),
26921
+ footer: this.getDefinedObj({
26922
+ footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
26923
+ rows: this.formatExcelHeaderFooter(excel.Footer)
26924
+ }),
26925
+ columns: excel.Columns,
26926
+ exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
26927
+ includeHiddenColumn: excel.IncludeHiddenColumn,
26928
+ theme: !isNullOrUndefined(excel.Theme) ? {
26929
+ header: this.formatExcelStyle(excel.Theme.Header),
26930
+ record: this.formatExcelStyle(excel.Theme.Record),
26931
+ caption: this.formatExcelStyle(excel.Theme.Caption)
26932
+ } : undefined,
26933
+ fileName: excel.FileName,
26934
+ hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
26935
+ });
26936
+ return prop;
26937
+ };
26938
+ return PivotExportUtil;
26939
+ }());
26940
+
26212
26941
  /**
26213
26942
  * @hidden
26214
26943
  * `ExcelExport` module is used to handle the Excel export action.
@@ -26276,7 +27005,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26276
27005
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
26277
27006
  /** Event trigerring */
26278
27007
  var clonedValues;
26279
- var currentPivotValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27008
+ var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26280
27009
  var customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
26281
27010
  if (isHeaderSet) {
26282
27011
  this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
@@ -26286,7 +27015,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26286
27015
  this.engine.pageSettings = null;
26287
27016
  this.engine.generateGridData(this.parent.dataSourceSettings, true);
26288
27017
  this.parent.applyFormatting(this.engine.pivotValues);
26289
- clonedValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27018
+ clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26290
27019
  this.engine.pivotValues = currentPivotValues;
26291
27020
  this.engine.pageSettings = pageSettings;
26292
27021
  }
@@ -26330,15 +27059,17 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
26330
27059
  var pivotCell = pivotValues[rCnt][cCnt];
26331
27060
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26332
27061
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
26333
- if (pivotCell.type === 'grand sum') {
26334
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
26335
- this.parent.localeObj.getConstant('grandTotal');
27062
+ var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
27063
+ || (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
27064
+ if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
27065
+ cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
26336
27066
  }
26337
27067
  else if (pivotCell.type === 'sum') {
26338
27068
  cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
26339
27069
  }
26340
27070
  else {
26341
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
27071
+ cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
27072
+ === pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
26342
27073
  }
26343
27074
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
26344
27075
  cells.push({
@@ -26852,13 +27583,13 @@ var PDFExport = /** @__PURE__ @class */ (function () {
26852
27583
  var _this = this;
26853
27584
  /** Event trigerring */
26854
27585
  var clonedValues;
26855
- var currentPivotValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27586
+ var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26856
27587
  if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
26857
27588
  var pageSettings = this.engine.pageSettings;
26858
27589
  this.engine.pageSettings = null;
26859
27590
  this.engine.generateGridData(this.parent.dataSourceSettings, true);
26860
27591
  this.parent.applyFormatting(this.engine.pivotValues);
26861
- clonedValues = PivotUtil.getClonedPivotValues(this.engine.pivotValues);
27592
+ clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
26862
27593
  this.engine.pivotValues = currentPivotValues;
26863
27594
  this.engine.pageSettings = pageSettings;
26864
27595
  }
@@ -27350,31 +28081,50 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
27350
28081
  return axisWrapper;
27351
28082
  };
27352
28083
  DialogRenderer.prototype.showCalculatedField = function (event) {
27353
- if (!this.parent.isAdaptive) {
27354
- if (this.parent.dialogRenderer.fieldListDialog) {
27355
- this.parent.dialogRenderer.fieldListDialog.hide();
27356
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28084
+ try {
28085
+ if (!this.parent.isAdaptive) {
28086
+ this.parent.actionObj.actionName = openCalculatedField;
28087
+ if (this.parent.actionBeginMethod()) {
28088
+ return;
28089
+ }
28090
+ if (this.parent.dialogRenderer.fieldListDialog) {
28091
+ this.parent.dialogRenderer.fieldListDialog.hide();
28092
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28093
+ }
27357
28094
  }
28095
+ this.parent.notify(initCalculatedField, {});
28096
+ }
28097
+ catch (execption) {
28098
+ this.parent.actionFailureMethod(execption);
27358
28099
  }
27359
- this.parent.notify(initCalculatedField, {});
27360
28100
  };
27361
28101
  DialogRenderer.prototype.showFieldListDialog = function (event) {
27362
28102
  var activeindex = this.adaptiveElement.selectedItem;
27363
28103
  this.parent.treeViewModule.render(activeindex);
27364
28104
  };
27365
28105
  DialogRenderer.prototype.onShowFieldList = function () {
27366
- if (this.parent.allowDeferLayoutUpdate) {
27367
- if (this.parent.isAdaptive) {
27368
- this.parent.axisFieldModule.render();
28106
+ this.parent.actionObj.actionName = showFieldList;
28107
+ if (this.parent.actionBeginMethod()) {
28108
+ return;
28109
+ }
28110
+ this.parent.actionObj.actionName = '';
28111
+ try {
28112
+ if (this.parent.allowDeferLayoutUpdate) {
28113
+ if (this.parent.isAdaptive) {
28114
+ this.parent.axisFieldModule.render();
28115
+ }
28116
+ this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
28117
+ this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
27369
28118
  }
27370
- this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
27371
- this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
28119
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
28120
+ this.parent.dialogRenderer.fieldListDialog.show();
28121
+ this.parent.dialogRenderer.fieldListDialog.element.style.top =
28122
+ parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
28123
+ '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
28124
+ }
28125
+ catch (execption) {
28126
+ this.parent.actionFailureMethod(execption);
27372
28127
  }
27373
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
27374
- this.parent.dialogRenderer.fieldListDialog.show();
27375
- this.parent.dialogRenderer.fieldListDialog.element.style.top =
27376
- parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
27377
- '0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
27378
28128
  };
27379
28129
  DialogRenderer.prototype.onCloseFieldList = function () {
27380
28130
  if (this.parent.allowDeferLayoutUpdate) {
@@ -27402,6 +28152,10 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
27402
28152
  }
27403
28153
  }
27404
28154
  this.parent.dialogRenderer.fieldListDialog.hide();
28155
+ this.parent.actionObj.actionName = closeFieldlist;
28156
+ if (this.parent.actionObj.actionName) {
28157
+ this.parent.actionCompleteMethod();
28158
+ }
27405
28159
  };
27406
28160
  DialogRenderer.prototype.removeFieldListIcon = function () {
27407
28161
  if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
@@ -28291,28 +29045,41 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28291
29045
  TreeViewRenderer.prototype.updateSorting = function (args) {
28292
29046
  var target = args.target;
28293
29047
  var option = target.getAttribute('data-sort');
28294
- if (target.className.indexOf('e-selected') === -1) {
28295
- switch (option) {
28296
- case 'None':
28297
- this.fieldListSort = 'None';
28298
- addClass([target], 'e-selected');
28299
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
28300
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
28301
- break;
28302
- case 'Ascend':
28303
- this.fieldListSort = 'Ascend';
28304
- addClass([target], 'e-selected');
28305
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
28306
- removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
28307
- break;
28308
- case 'Descend':
28309
- this.fieldListSort = 'Descend';
28310
- addClass([target], 'e-selected');
28311
- removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
28312
- removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
28313
- break;
29048
+ this.parent.actionObj.actionName = sortFieldTree;
29049
+ if (this.parent.actionBeginMethod()) {
29050
+ return;
29051
+ }
29052
+ try {
29053
+ if (target.className.indexOf('e-selected') === -1) {
29054
+ switch (option) {
29055
+ case 'None':
29056
+ this.fieldListSort = 'None';
29057
+ addClass([target], 'e-selected');
29058
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
29059
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
29060
+ break;
29061
+ case 'Ascend':
29062
+ this.fieldListSort = 'Ascend';
29063
+ addClass([target], 'e-selected');
29064
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
29065
+ removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
29066
+ break;
29067
+ case 'Descend':
29068
+ this.fieldListSort = 'Descend';
29069
+ addClass([target], 'e-selected');
29070
+ removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
29071
+ removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
29072
+ break;
29073
+ }
29074
+ this.refreshTreeView();
28314
29075
  }
28315
- this.refreshTreeView();
29076
+ }
29077
+ catch (execption) {
29078
+ this.parent.actionFailureMethod(execption);
29079
+ }
29080
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
29081
+ if (this.parent.actionObj.actionName) {
29082
+ this.parent.actionCompleteMethod();
28316
29083
  }
28317
29084
  };
28318
29085
  /* eslint-disable */
@@ -28680,7 +29447,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28680
29447
  attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
28681
29448
  className: ICON + ' ' + CALC_EDIT
28682
29449
  });
28683
- if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
29450
+ if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
28684
29451
  removeClass([calcElement], ICON_DISABLE);
28685
29452
  }
28686
29453
  else {
@@ -28693,7 +29460,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28693
29460
  className: ICON + ' ' + REMOVE_CLASS
28694
29461
  });
28695
29462
  if (this.parent.getModuleName() === 'pivotview') {
28696
- if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
29463
+ if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
28697
29464
  removeClass([removeElement], ICON_DISABLE);
28698
29465
  }
28699
29466
  else {
@@ -28701,7 +29468,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28701
29468
  }
28702
29469
  }
28703
29470
  else {
28704
- if (field[i].showRemoveIcon) {
29471
+ if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
28705
29472
  removeClass([removeElement], ICON_DISABLE);
28706
29473
  }
28707
29474
  else {
@@ -28733,13 +29500,13 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28733
29500
  }
28734
29501
  if (axis === 'values') {
28735
29502
  var _loop_1 = function (element) {
28736
- if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.chartModule) {
29503
+ if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.pivotChartModule) {
28737
29504
  var valueData = field.map(function (item) { return { text: item.caption ? item.caption : item.name, value: item.name }; });
28738
29505
  var parent_1 = this_1.parent;
28739
29506
  if (this_1.valueFiedDropDownList && element.querySelector('.' + GROUP_CHART_VALUE_DROPDOWN_DIV)) {
28740
29507
  this_1.valueFiedDropDownList.dataSource = valueData;
28741
29508
  this_1.valueFiedDropDownList.value = !parent_1.chartSettings.enableMultipleAxis ?
28742
- parent_1.chartModule.currentMeasure : valueData[0].value;
29509
+ parent_1.pivotChartModule.currentMeasure : valueData[0].value;
28743
29510
  }
28744
29511
  else {
28745
29512
  var ddlDiv = createElement('div', { className: GROUP_CHART_VALUE_DROPDOWN_DIV });
@@ -28749,7 +29516,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28749
29516
  enableRtl: this_1.parent.enableRtl,
28750
29517
  locale: this_1.parent.locale,
28751
29518
  value: !parent_1.chartSettings.enableMultipleAxis ?
28752
- parent_1.chartModule.currentMeasure : valueData[0].value,
29519
+ parent_1.pivotChartModule.currentMeasure : valueData[0].value,
28753
29520
  width: 200,
28754
29521
  fields: { value: 'value', text: 'text' },
28755
29522
  cssClass: GROUP_CHART_VALUE_DROPDOWN,
@@ -28774,14 +29541,14 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28774
29541
  var availColindex = undefined;
28775
29542
  for (var _g = 0, _h = this.parentElement.querySelectorAll('.e-group-' + axis); _g < _h.length; _g++) {
28776
29543
  var element = _h[_g];
28777
- if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.chartModule) {
28778
- var currentMeasure = this.parent.chartModule.currentMeasure;
29544
+ if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
29545
+ var currentMeasure = this.parent.pivotChartModule.currentMeasure;
28779
29546
  var delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
28780
29547
  var columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
28781
29548
  this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
28782
29549
  var engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
28783
29550
  var pivotValues = engineModule.pivotValues;
28784
- var totColIndex = this.parent.chartModule.getColumnTotalIndex(pivotValues);
29551
+ var totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
28785
29552
  var rKeys = Object.keys(pivotValues);
28786
29553
  var columnData = [];
28787
29554
  var firstValueRow = false;
@@ -28893,7 +29660,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28893
29660
  },
28894
29661
  className: PIVOT_BUTTON_CONTENT_CLASS + ' ' +
28895
29662
  (this.parent.getModuleName() === 'pivotview' ?
28896
- this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : DRAG_DISABLE_CLASS : ''),
29663
+ this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS : ''),
28897
29664
  innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
28898
29665
  text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
28899
29666
  text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
@@ -28959,43 +29726,54 @@ var PivotButton = /** @__PURE__ @class */ (function () {
28959
29726
  };
28960
29727
  PivotButton.prototype.openCalculatedFieldDialog = function (args) {
28961
29728
  var fieldName = args.target.parentElement.id;
28962
- if (this.parent.getModuleName() === 'pivotview') {
28963
- if (this.parent.isAdaptive && (this.parent.showFieldList &&
28964
- this.parent.pivotFieldListModule &&
28965
- !this.parent.pivotFieldListModule.isDestroyed)) {
28966
- this.parent.pivotFieldListModule.element
28967
- .querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
28968
- this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
28969
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
28970
- this.parent.pivotFieldListModule.calculatedFieldModule
28971
- .updateAdaptiveCalculatedField(true, fieldName);
28972
- }
28973
- else {
28974
- if (!this.parent.isAdaptive) {
28975
- this.parent.calculatedFieldModule.buttonCall = true;
28976
- }
28977
- this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
28978
- }
29729
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
29730
+ this.parent.actionObj.actionName = editCalculatedField;
29731
+ this.parent.actionObj.fieldInfo = fieldInfo;
29732
+ if (this.parent.actionBeginMethod()) {
29733
+ return;
28979
29734
  }
28980
- else if (this.parent.getModuleName() === 'pivotfieldlist') {
28981
- if (this.parent.isAdaptive) {
28982
- this.parent.dialogRenderer.adaptiveElement.select(4);
28983
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
28984
- this.parent.calculatedFieldModule
28985
- .updateAdaptiveCalculatedField(true, fieldName);
28986
- this.parent.calculatedFieldModule.buttonCall = true;
28987
- }
28988
- else {
28989
- if (this.parent.dialogRenderer.fieldListDialog) {
28990
- this.parent.dialogRenderer.fieldListDialog.hide();
28991
- addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
29735
+ try {
29736
+ if (this.parent.getModuleName() === 'pivotview') {
29737
+ if (this.parent.isAdaptive && (this.parent.showFieldList &&
29738
+ this.parent.pivotFieldListModule &&
29739
+ !this.parent.pivotFieldListModule.isDestroyed)) {
29740
+ this.parent.pivotFieldListModule.element
29741
+ .querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
29742
+ this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
29743
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
29744
+ this.parent.pivotFieldListModule.calculatedFieldModule
29745
+ .updateAdaptiveCalculatedField(true, fieldName);
29746
+ }
29747
+ else {
29748
+ if (!this.parent.isAdaptive) {
29749
+ this.parent.calculatedFieldModule.buttonCall = true;
29750
+ }
29751
+ this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
28992
29752
  }
28993
- this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
28994
- if (this.parent.calculatedFieldModule) {
29753
+ }
29754
+ else if (this.parent.getModuleName() === 'pivotfieldlist') {
29755
+ if (this.parent.isAdaptive) {
29756
+ this.parent.dialogRenderer.adaptiveElement.select(4);
29757
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
29758
+ this.parent.calculatedFieldModule
29759
+ .updateAdaptiveCalculatedField(true, fieldName);
28995
29760
  this.parent.calculatedFieldModule.buttonCall = true;
28996
29761
  }
29762
+ else {
29763
+ if (this.parent.dialogRenderer.fieldListDialog) {
29764
+ this.parent.dialogRenderer.fieldListDialog.hide();
29765
+ addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
29766
+ }
29767
+ this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
29768
+ if (this.parent.calculatedFieldModule) {
29769
+ this.parent.calculatedFieldModule.buttonCall = true;
29770
+ }
29771
+ }
28997
29772
  }
28998
29773
  }
29774
+ catch (execption) {
29775
+ this.parent.actionFailureMethod(execption);
29776
+ }
28999
29777
  };
29000
29778
  PivotButton.prototype.createDraggable = function (field, target) {
29001
29779
  this.draggable = new Draggable(target, {
@@ -29019,7 +29797,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29019
29797
  attrs: {
29020
29798
  'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
29021
29799
  },
29022
- className: ICON + ' ' + DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : DRAG_DISABLE_CLASS)
29800
+ className: ICON + ' ' + DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS)
29023
29801
  });
29024
29802
  dragWrapper.appendChild(dragElement);
29025
29803
  if (this.parent.getModuleName() === 'pivotfieldlist') {
@@ -29385,38 +30163,52 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29385
30163
  !(args.target.classList.contains(DRAG_CLASS)) &&
29386
30164
  (buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
29387
30165
  isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
29388
- if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
29389
- this.parent.dataSourceSettings.enableSorting &&
29390
- !(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
29391
- this.parent.pivotGridModule !== undefined &&
29392
- this.parent.pivotGridModule.enableVirtualization) ||
29393
- (this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
29394
- if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
29395
- (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
29396
- this.parent.pivotGridModule.enableValueSorting))) {
29397
- if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
29398
- if (args.target.classList.contains('e-pivot-button')) {
29399
- if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
29400
- this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: '' } } }, true);
30166
+ this.parent.actionObj.actionName = sortField;
30167
+ this.parent.actionObj.fieldInfo = fieldInfo;
30168
+ if (this.parent.actionBeginMethod()) {
30169
+ return;
30170
+ }
30171
+ try {
30172
+ if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
30173
+ this.parent.dataSourceSettings.enableSorting &&
30174
+ !(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
30175
+ this.parent.pivotGridModule !== undefined &&
30176
+ this.parent.pivotGridModule.enableVirtualization) ||
30177
+ (this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
30178
+ if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
30179
+ (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
30180
+ this.parent.pivotGridModule.enableValueSorting))) {
30181
+ if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
30182
+ if (args.target.classList.contains('e-pivot-button')) {
30183
+ if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
30184
+ this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
30185
+ }
29401
30186
  }
29402
- }
29403
- else {
29404
- if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
29405
- this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: '' } } }, true);
30187
+ else {
30188
+ if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
30189
+ this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
30190
+ }
29406
30191
  }
29407
30192
  }
29408
30193
  }
30194
+ this.parent.pivotCommon.eventBase.updateSorting(args);
30195
+ if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
30196
+ var actionInfo = {
30197
+ sortInfo: this.parent.lastSortInfo
30198
+ };
30199
+ this.parent.actionObj.actionInfo = actionInfo;
30200
+ this.updateDataSource(true);
30201
+ }
30202
+ /* eslint-disable */
30203
+ var thisObj = this;
30204
+ /* eslint-enable */
30205
+ if (thisObj.parent instanceof PivotFieldList) {
30206
+ thisObj.axisField.render();
30207
+ }
29409
30208
  }
29410
- this.parent.pivotCommon.eventBase.updateSorting(args);
29411
- if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
29412
- this.updateDataSource(true);
29413
- }
29414
- /* eslint-disable */
29415
- var thisObj = this;
29416
- /* eslint-enable */
29417
- if (thisObj.parent instanceof PivotFieldList) {
29418
- thisObj.axisField.render();
29419
- }
30209
+ }
30210
+ catch (execption) {
30211
+ this.parent.actionFailureMethod(execption);
29420
30212
  }
29421
30213
  }
29422
30214
  };
@@ -29448,26 +30240,37 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29448
30240
  PivotButton.prototype.updateFiltering = function (args) {
29449
30241
  /* eslint-disable */
29450
30242
  var pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
29451
- if (pivotObj.getModuleName() === 'pivotfieldlist') {
29452
- showSpinner(pivotObj.fieldListSpinnerElement);
29453
- }
29454
- else {
29455
- pivotObj.showWaitingPopup();
29456
- }
29457
- pivotObj.mouseEventArgs = args;
29458
- pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
29459
- this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
29460
30243
  var fieldName = args.target.parentElement.id;
29461
- if (pivotObj.dataSourceSettings.mode === 'Server') {
29462
- if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
29463
- this.updateFilterEvents();
30244
+ var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
30245
+ this.parent.actionObj.actionName = filterField;
30246
+ this.parent.actionObj.fieldInfo = fieldInfo;
30247
+ if (this.parent.actionBeginMethod()) {
30248
+ return;
30249
+ }
30250
+ try {
30251
+ if (pivotObj.getModuleName() === 'pivotfieldlist') {
30252
+ showSpinner(pivotObj.fieldListSpinnerElement);
29464
30253
  }
29465
30254
  else {
29466
- pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
30255
+ pivotObj.showWaitingPopup();
30256
+ }
30257
+ pivotObj.mouseEventArgs = args;
30258
+ pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
30259
+ this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
30260
+ if (pivotObj.dataSourceSettings.mode === 'Server') {
30261
+ if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
30262
+ this.updateFilterEvents();
30263
+ }
30264
+ else {
30265
+ pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
30266
+ }
30267
+ }
30268
+ else {
30269
+ this.updateFilterEvents();
29467
30270
  }
29468
30271
  }
29469
- else {
29470
- this.updateFilterEvents();
30272
+ catch (execption) {
30273
+ this.parent.actionFailureMethod(execption);
29471
30274
  }
29472
30275
  /* eslint-enable */
29473
30276
  };
@@ -29480,11 +30283,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29480
30283
  var target = pivotObj.mouseEventArgs.target;
29481
30284
  this.fieldName = target.parentElement.id;
29482
30285
  if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
29483
- this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
29484
- this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
29485
- // this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
29486
- // this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
29487
- // this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
29488
30286
  this.bindDialogEvents();
29489
30287
  }
29490
30288
  if (pivotObj.getModuleName() === 'pivotfieldlist') {
@@ -29498,8 +30296,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29498
30296
  if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
29499
30297
  this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
29500
30298
  this.updateDialogButtonEvents();
29501
- this.dialogPopUp.buttons = this.buttonModel();
29502
- this.dialogPopUp.dataBind();
30299
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
30300
+ this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
29503
30301
  this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
29504
30302
  }
29505
30303
  else if (this.parent.dataSourceSettings.allowMemberFilter) {
@@ -29524,7 +30322,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29524
30322
  click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
29525
30323
  },
29526
30324
  {
29527
- click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
30325
+ click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
29528
30326
  buttonModel: { cssClass: CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
29529
30327
  }
29530
30328
  ];
@@ -29532,25 +30330,25 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29532
30330
  PivotButton.prototype.tabSelect = function (e) {
29533
30331
  this.index = e.selectedIndex;
29534
30332
  this.updateDialogButtonEvents();
29535
- removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
30333
+ removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
29536
30334
  if (e.selectedIndex > 0) {
29537
- 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');
30335
+ 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');
29538
30336
  }
29539
30337
  if (e.selectedIndex === 0) {
29540
30338
  this.parent.pivotCommon.filterDialog.updateCheckedState();
29541
30339
  }
29542
30340
  else {
29543
- this.dialogPopUp.buttons[0].buttonModel.disabled = false;
29544
- this.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
30341
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
30342
+ this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
29545
30343
  }
29546
30344
  };
29547
30345
  PivotButton.prototype.updateDialogButtonEvents = function () {
29548
- this.dialogPopUp.buttons = this.buttonModel();
29549
- this.dialogPopUp.dataBind();
30346
+ this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
30347
+ this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
29550
30348
  };
29551
30349
  PivotButton.prototype.updateCustomFilter = function (args) {
29552
30350
  var _this = this;
29553
- var dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
30351
+ var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
29554
30352
  var fieldName = dialogElement.getAttribute('data-fieldname');
29555
30353
  var levelName = dialogElement.getAttribute('data-selectedField');
29556
30354
  var filterType = dialogElement.getAttribute('data-type');
@@ -29621,39 +30419,18 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29621
30419
  if (type !== 'Value') {
29622
30420
  _this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, _this.parent.dataSourceSettings.filterSettings);
29623
30421
  }
29624
- _this.dialogPopUp.close();
30422
+ _this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29625
30423
  if (!observedArgs.cancel) {
29626
30424
  _this.refreshPivotButtonState(fieldName, true);
29627
30425
  _this.updateDataSource(true);
29628
30426
  }
29629
30427
  });
29630
30428
  };
29631
- PivotButton.prototype.removeFilterDialog = function () {
29632
- if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
29633
- this.dialogPopUp.destroy();
29634
- setTimeout(this.setFocus.bind(this));
29635
- }
29636
- if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
29637
- remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
29638
- }
29639
- };
29640
- PivotButton.prototype.setFocus = function () {
29641
- if (this.parentElement) {
29642
- var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
29643
- for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
29644
- var item = pivotButtons_1[_i];
29645
- if (item.getAttribute('data-uid') === this.fieldName) {
29646
- item.focus();
29647
- break;
29648
- }
29649
- }
29650
- }
29651
- };
29652
30429
  PivotButton.prototype.ClearFilter = function (e) {
29653
- var dialogElement = this.dialogPopUp.element;
30430
+ var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
29654
30431
  var fieldName = dialogElement.getAttribute('data-fieldname');
29655
30432
  var tabElement = dialogElement.querySelector('.e-selected-tab');
29656
- this.dialogPopUp.close();
30433
+ this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29657
30434
  if (this.parent.dataType === 'olap' && tabElement) {
29658
30435
  var levelName = tabElement.getAttribute('data-selectedField');
29659
30436
  this.removeDataSourceSettings(fieldName, levelName);
@@ -29670,63 +30447,73 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29670
30447
  var target = args.target;
29671
30448
  var fieldName = target.parentElement.id;
29672
30449
  var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
30450
+ this.parent.actionObj.actionName = removeField;
30451
+ this.parent.actionObj.fieldInfo = fieldInfo;
30452
+ if (this.parent.actionBeginMethod()) {
30453
+ return;
30454
+ }
29673
30455
  var removeFieldArgs = {
29674
30456
  cancel: false, fieldName: fieldName,
29675
30457
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
29676
30458
  fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
29677
30459
  };
29678
- var control = this.parent.getModuleName() === 'pivotfieldlist' &&
29679
- this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
29680
- control.trigger(fieldRemove, removeFieldArgs, function (observedArgs) {
29681
- if (!observedArgs.cancel) {
29682
- if (target.parentElement.getAttribute('isvalue') === 'true') {
29683
- _this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
29684
- if (_this.parent.dataType === 'olap') {
29685
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30460
+ try {
30461
+ var control = this.parent.getModuleName() === 'pivotfieldlist' &&
30462
+ this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
30463
+ control.trigger(fieldRemove, removeFieldArgs, function (observedArgs) {
30464
+ if (!observedArgs.cancel) {
30465
+ if (target.parentElement.getAttribute('isvalue') === 'true') {
30466
+ _this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
30467
+ if (_this.parent.dataType === 'olap') {
30468
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30469
+ }
29686
30470
  }
29687
- }
29688
- else {
29689
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
29690
- if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
29691
- fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
29692
- observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
29693
- _this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
30471
+ else {
30472
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
30473
+ if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
30474
+ fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
30475
+ observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
30476
+ _this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
30477
+ }
30478
+ if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
30479
+ _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30480
+ }
29694
30481
  }
29695
- if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
29696
- _this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
30482
+ if (_this.parent.getModuleName() === 'pivotfieldlist') {
30483
+ _this.parent.axisFieldModule.render();
29697
30484
  }
30485
+ _this.updateDataSource();
29698
30486
  }
29699
- if (_this.parent.getModuleName() === 'pivotfieldlist') {
29700
- _this.parent.axisFieldModule.render();
29701
- }
29702
- _this.updateDataSource();
29703
- }
29704
- });
30487
+ });
30488
+ }
30489
+ catch (execption) {
30490
+ this.parent.actionFailureMethod(execption);
30491
+ }
29705
30492
  };
29706
30493
  /** @hidden */
29707
30494
  PivotButton.prototype.nodeStateModified = function (args) {
29708
30495
  var target = closest(args.node, 'li');
29709
30496
  var fieldName = target.getAttribute('data-fieldname');
29710
30497
  if (target.getAttribute('data-memberId') === 'all') {
29711
- this.memberTreeView.nodeChecked = null;
30498
+ this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
29712
30499
  if (args.action === 'check') {
29713
- this.memberTreeView.checkAll();
30500
+ this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
29714
30501
  }
29715
30502
  else {
29716
- this.memberTreeView.uncheckAll();
30503
+ this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
29717
30504
  }
29718
30505
  if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
29719
30506
  !this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
29720
- this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
30507
+ this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
29721
30508
  }
29722
30509
  this.checkedStateAll(args.action);
29723
- this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
30510
+ this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
29724
30511
  }
29725
30512
  else {
29726
30513
  if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
29727
30514
  !this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
29728
30515
  // let st1: number = new Date().getTime();
29729
- var checkedNodes = this.memberTreeView.getAllCheckedNodes();
30516
+ var checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
29730
30517
  // let st2: number = (new Date().getTime() - st1) / 1000;
29731
30518
  // console.log('getAllCheckedNodes:' + st2);
29732
30519
  this.updateNodeStates(checkedNodes, fieldName, args.action);
@@ -29769,8 +30556,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29769
30556
  }
29770
30557
  if (currentMembers[member]) {
29771
30558
  currentMembers[member].isSelected = false;
29772
- if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
29773
- var element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
30559
+ if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
30560
+ var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
29774
30561
  if (element && !element.querySelector('ul')) {
29775
30562
  this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
29776
30563
  }
@@ -29780,8 +30567,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29780
30567
  for (var _a = 0, checkedNodes_1 = checkedNodes; _a < checkedNodes_1.length; _a++) {
29781
30568
  var node = checkedNodes_1[_a];
29782
30569
  if (currentMembers[node]) {
29783
- if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
29784
- var element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
30570
+ if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
30571
+ var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
29785
30572
  if (element && !element.querySelector('ul')) {
29786
30573
  currentMembers[node].isSelected = true;
29787
30574
  this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
@@ -29819,10 +30606,10 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29819
30606
  !engineModule.fieldList[fieldName].isHierarchy) {
29820
30607
  var cMembers = engineModule.fieldList[fieldName].members;
29821
30608
  var sMembers = engineModule.fieldList[fieldName].currrentMembers;
29822
- filterItem.items = this.memberTreeView.getAllCheckedNodes();
30609
+ filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
29823
30610
  filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
29824
30611
  isNodeUnChecked = (filterItem.items.length ===
29825
- this.memberTreeView.fields.dataSource.length ? false : true);
30612
+ this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
29826
30613
  if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
29827
30614
  var cNodeLength = Object.keys(cMembers).length;
29828
30615
  var sNodeLength = Object.keys(sMembers).length;
@@ -29885,13 +30672,18 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29885
30672
  }
29886
30673
  _this.parent.dataSourceSettings.filterSettings.push(filterItem);
29887
30674
  }
29888
- _this.dialogPopUp.close();
30675
+ _this.parent.pivotCommon.filterDialog.dialogPopUp.close();
29889
30676
  if (!observedArgs.cancel) {
29890
30677
  _this.refreshPivotButtonState(fieldName, isNodeUnChecked);
29891
30678
  if (!isNodeUnChecked) {
29892
30679
  _this.removeDataSourceSettings(fieldName);
30680
+ filterItem = {};
29893
30681
  }
29894
30682
  _this.parent.lastFilterInfo = filterItem;
30683
+ var actionInfo = {
30684
+ filterInfo: _this.parent.lastFilterInfo
30685
+ };
30686
+ _this.parent.actionObj.actionInfo = actionInfo;
29895
30687
  _this.updateDataSource(true);
29896
30688
  var thisObj = _this;
29897
30689
  //setTimeout(() => {
@@ -29901,8 +30693,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29901
30693
  //});
29902
30694
  }
29903
30695
  var pivotButtons = [].slice.call(_this.parentElement.querySelectorAll('.e-pivot-button'));
29904
- for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
29905
- var item = pivotButtons_2[_i];
30696
+ for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
30697
+ var item = pivotButtons_1[_i];
29906
30698
  if (item.getAttribute('data-uid') === fieldName) {
29907
30699
  item.focus();
29908
30700
  break;
@@ -29913,8 +30705,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
29913
30705
  PivotButton.prototype.refreshPivotButtonState = function (fieldName, isFiltered) {
29914
30706
  var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
29915
30707
  var selectedButton;
29916
- for (var _i = 0, pivotButtons_3 = pivotButtons; _i < pivotButtons_3.length; _i++) {
29917
- var item = pivotButtons_3[_i];
30708
+ for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
30709
+ var item = pivotButtons_2[_i];
29918
30710
  if (item.getAttribute('data-uid') === fieldName) {
29919
30711
  selectedButton = item.querySelector('.' + FILTER_COMMON_CLASS);
29920
30712
  break;
@@ -30047,14 +30839,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
30047
30839
  this.columnFieldDropDownList.destroy();
30048
30840
  this.columnFieldDropDownList = null;
30049
30841
  }
30050
- if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
30051
- this.memberTreeView.destroy();
30052
- this.memberTreeView = null;
30053
- }
30054
- if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
30055
- this.dialogPopUp.destroy();
30056
- this.dialogPopUp = null;
30057
- }
30058
30842
  if (this.draggable && !this.draggable.isDestroyed) {
30059
30843
  this.draggable.destroy();
30060
30844
  this.draggable = null;
@@ -30211,6 +30995,8 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
30211
30995
  _this.enableValueSorting = false;
30212
30996
  _this.request = new XMLHttpRequest();
30213
30997
  _this.remoteData = [];
30998
+ /** @hidden */
30999
+ _this.actionObj = {};
30214
31000
  return _this;
30215
31001
  }
30216
31002
  /**
@@ -30442,7 +31228,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
30442
31228
  enableValueSorting: enableValueSorting,
30443
31229
  isDrillThrough: isDrillThrough,
30444
31230
  localeObj: localeObj,
30445
- clonedReport: this.clonedReport
31231
+ clonedReport: this.clonedReport,
31232
+ globalize: this.globalize,
31233
+ currenyCode: this.currencyCode
30446
31234
  };
30447
31235
  }
30448
31236
  return customProperties;
@@ -31133,6 +31921,11 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31133
31921
  pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
31134
31922
  }
31135
31923
  });
31924
+ var actionName = this.getActionCompleteName();
31925
+ this.actionObj.actionName = actionName;
31926
+ if (this.actionObj.actionName) {
31927
+ this.actionCompleteMethod();
31928
+ }
31136
31929
  };
31137
31930
  PivotFieldList.prototype.updateOlapDataSource = function (pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
31138
31931
  var customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
@@ -31166,6 +31959,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31166
31959
  PivotFieldList.prototype.update = function (control) {
31167
31960
  if (control) {
31168
31961
  this.clonedDataSet = control.clonedDataSet;
31962
+ this.clonedReport = control.clonedReport;
31169
31963
  this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
31170
31964
  this.engineModule = control.engineModule;
31171
31965
  this.olapEngineModule = control.olapEngineModule;
@@ -31200,6 +31994,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31200
31994
  PivotFieldList.prototype.updateView = function (control) {
31201
31995
  if (control) {
31202
31996
  control.clonedDataSet = this.clonedDataSet;
31997
+ control.clonedReport = this.clonedReport;
31203
31998
  control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
31204
31999
  control.engineModule = this.engineModule;
31205
32000
  control.olapEngineModule = this.olapEngineModule;
@@ -31243,6 +32038,47 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31243
32038
  }
31244
32039
  });
31245
32040
  };
32041
+ /** @hidden */
32042
+ PivotFieldList.prototype.actionBeginMethod = function () {
32043
+ var eventArgs = {
32044
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
32045
+ actionName: this.actionObj.actionName,
32046
+ fieldInfo: this.actionObj.fieldInfo,
32047
+ cancel: false
32048
+ };
32049
+ var control = this.isPopupView ? this.pivotGridModule : this;
32050
+ control.trigger(actionBegin, eventArgs);
32051
+ return eventArgs.cancel;
32052
+ };
32053
+ /** @hidden */
32054
+ PivotFieldList.prototype.actionCompleteMethod = function () {
32055
+ var eventArgs = {
32056
+ dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
32057
+ actionName: this.actionObj.actionName,
32058
+ fieldInfo: this.actionObj.fieldInfo,
32059
+ actionInfo: this.actionObj.actionInfo
32060
+ };
32061
+ var control = this.isPopupView ? this.pivotGridModule : this;
32062
+ control.trigger(actionComplete, eventArgs);
32063
+ this.actionObj.actionName = '';
32064
+ this.actionObj.actionInfo = undefined;
32065
+ this.actionObj.fieldInfo = undefined;
32066
+ };
32067
+ /** @hidden */
32068
+ PivotFieldList.prototype.actionFailureMethod = function (error) {
32069
+ var eventArgs = {
32070
+ actionName: this.actionObj.actionName,
32071
+ errorInfo: error
32072
+ };
32073
+ var control = this.isPopupView ? this.pivotGridModule : this;
32074
+ control.trigger(actionFailure, eventArgs);
32075
+ };
32076
+ /** @hidden */
32077
+ PivotFieldList.prototype.getActionCompleteName = function () {
32078
+ var actionName = (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
32079
+ : (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == sortFieldTree ? fieldTreeSorted : this.actionObj.actionName;
32080
+ return actionName;
32081
+ };
31246
32082
  /**
31247
32083
  * Destroys the Field Table component.
31248
32084
  * @function destroy
@@ -31317,6 +32153,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31317
32153
  if (this.clonedDataSet) {
31318
32154
  this.clonedDataSet = null;
31319
32155
  }
32156
+ if (this.clonedReport) {
32157
+ this.clonedReport = null;
32158
+ }
31320
32159
  if (this.clonedFieldList) {
31321
32160
  this.clonedFieldList = null;
31322
32161
  }
@@ -31364,6 +32203,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31364
32203
  __decorate$4([
31365
32204
  Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
31366
32205
  ], PivotFieldList.prototype, "aggregateTypes", void 0);
32206
+ __decorate$4([
32207
+ Property('USD')
32208
+ ], PivotFieldList.prototype, "currencyCode", void 0);
31367
32209
  __decorate$4([
31368
32210
  Event()
31369
32211
  ], PivotFieldList.prototype, "load", void 0);
@@ -31412,6 +32254,15 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
31412
32254
  __decorate$4([
31413
32255
  Event()
31414
32256
  ], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
32257
+ __decorate$4([
32258
+ Event()
32259
+ ], PivotFieldList.prototype, "actionBegin", void 0);
32260
+ __decorate$4([
32261
+ Event()
32262
+ ], PivotFieldList.prototype, "actionComplete", void 0);
32263
+ __decorate$4([
32264
+ Event()
32265
+ ], PivotFieldList.prototype, "actionFailure", void 0);
31415
32266
  PivotFieldList = __decorate$4([
31416
32267
  NotifyPropertyChanges
31417
32268
  ], PivotFieldList);
@@ -31646,105 +32497,114 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
31646
32497
  CalculatedField.prototype.displayMenu = function (node, treeNode, target) {
31647
32498
  var edit = target ? target.classList.contains(CALC_EDIT) : true;
31648
32499
  var edited = target ? target.classList.contains(CALC_EDITED) : true;
31649
- if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
31650
- node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
31651
- !node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
31652
- !node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
31653
- !node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
31654
- if (this.menuObj && !this.menuObj.isDestroyed) {
31655
- this.menuObj.destroy();
31656
- }
31657
- this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
31658
- this.openContextMenu(node);
31659
- }
31660
- else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
31661
- node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
31662
- (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
31663
- this.isEdit = true;
31664
- var fieldName = node.getAttribute('data-field');
31665
- var caption = node.getAttribute('data-caption');
31666
- this.currentFieldName = fieldName;
31667
- this.inputObj.value = caption;
31668
- this.inputObj.dataBind();
31669
- var formatString = node.getAttribute('data-formatString');
31670
- var dialogElement = this.dialog.element;
31671
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
31672
- if (this.parent.dataType === 'olap') {
31673
- var memberType = node.getAttribute('data-membertype');
31674
- var parentHierarchy = node.getAttribute('data-hierarchy');
31675
- var expression = node.getAttribute('data-formula');
31676
- var customString = node.getAttribute('data-customString');
31677
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
31678
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
31679
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
31680
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
31681
- /* eslint-enable max-len */
31682
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
31683
- select('#' + this.parentID + 'droppable', document).value = expression;
31684
- memberTypeDrop.readonly = true;
31685
- memberTypeDrop.value = memberType;
31686
- memberTypeDrop.dataBind();
31687
- if (memberType === 'Dimension') {
31688
- hierarchyDrop.value = parentHierarchy;
32500
+ try {
32501
+ if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
32502
+ node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
32503
+ !node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
32504
+ !node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
32505
+ !node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
32506
+ if (this.menuObj && !this.menuObj.isDestroyed) {
32507
+ this.menuObj.destroy();
32508
+ }
32509
+ this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
32510
+ this.openContextMenu(node);
32511
+ }
32512
+ else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
32513
+ node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
32514
+ (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
32515
+ this.isEdit = true;
32516
+ var fieldName = node.getAttribute('data-field');
32517
+ var caption = node.getAttribute('data-caption');
32518
+ this.currentFieldName = fieldName;
32519
+ this.inputObj.value = caption;
32520
+ this.inputObj.dataBind();
32521
+ var formatString = node.getAttribute('data-formatString');
32522
+ var dialogElement = this.dialog.element;
32523
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
32524
+ if (this.parent.dataType === 'olap') {
32525
+ var memberType = node.getAttribute('data-membertype');
32526
+ var parentHierarchy = node.getAttribute('data-hierarchy');
32527
+ var expression = node.getAttribute('data-formula');
32528
+ var customString = node.getAttribute('data-customString');
32529
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
32530
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
32531
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
32532
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
32533
+ /* eslint-enable max-len */
32534
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
32535
+ select('#' + this.parentID + 'droppable', document).value = expression;
32536
+ memberTypeDrop.readonly = true;
32537
+ memberTypeDrop.value = memberType;
32538
+ memberTypeDrop.dataBind();
32539
+ if (memberType === 'Dimension') {
32540
+ hierarchyDrop.value = parentHierarchy;
32541
+ }
32542
+ if (formatString !== '') {
32543
+ formatDrop.value = formatString;
32544
+ formatDrop.dataBind();
32545
+ }
32546
+ customFormat.value = customString;
32547
+ }
32548
+ else {
32549
+ customFormat.value = formatString;
32550
+ addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
32551
+ removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
32552
+ addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
32553
+ removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
32554
+ node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
32555
+ select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
31689
32556
  }
31690
- if (formatString !== '') {
31691
- formatDrop.value = formatString;
32557
+ customFormat.dataBind();
32558
+ }
32559
+ else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
32560
+ node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
32561
+ (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
32562
+ this.isEdit = false;
32563
+ this.inputObj.value = '';
32564
+ this.inputObj.dataBind();
32565
+ var dialogElement = this.dialog.element;
32566
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
32567
+ customFormat.value = '';
32568
+ customFormat.dataBind();
32569
+ if (this.parent.dataType === 'olap') {
32570
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
32571
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
32572
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
32573
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
32574
+ /* eslint-enable max-len */
32575
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
32576
+ hierarchyDrop.index = 0;
32577
+ hierarchyDrop.dataBind();
32578
+ formatDrop.index = 0;
31692
32579
  formatDrop.dataBind();
32580
+ memberTypeDrop.index = 0;
32581
+ memberTypeDrop.readonly = false;
32582
+ memberTypeDrop.dataBind();
32583
+ }
32584
+ else {
32585
+ addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
32586
+ removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
32587
+ node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
31693
32588
  }
31694
- customFormat.value = customString;
32589
+ select('#' + this.parentID + 'droppable', document).value = '';
31695
32590
  }
31696
- else {
31697
- customFormat.value = formatString;
31698
- addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
31699
- removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
31700
- addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
31701
- removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
31702
- node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
31703
- select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
32591
+ else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
32592
+ node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
32593
+ this.parent.actionObj.actionName = removeField;
32594
+ if (this.parent.actionBeginMethod()) {
32595
+ return;
32596
+ }
32597
+ var dropField = select('#' + this.parentID + 'droppable', document);
32598
+ var field = {
32599
+ name: this.isEdit ? this.currentFieldName : this.inputObj.value,
32600
+ caption: this.inputObj.value,
32601
+ formula: dropField.value
32602
+ };
32603
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
31704
32604
  }
31705
- customFormat.dataBind();
31706
32605
  }
31707
- else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
31708
- node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
31709
- (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
31710
- this.isEdit = false;
31711
- this.inputObj.value = '';
31712
- this.inputObj.dataBind();
31713
- var dialogElement = this.dialog.element;
31714
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
31715
- customFormat.value = '';
31716
- customFormat.dataBind();
31717
- if (this.parent.dataType === 'olap') {
31718
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
31719
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
31720
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
31721
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
31722
- /* eslint-enable max-len */
31723
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
31724
- hierarchyDrop.index = 0;
31725
- hierarchyDrop.dataBind();
31726
- formatDrop.index = 0;
31727
- formatDrop.dataBind();
31728
- memberTypeDrop.index = 0;
31729
- memberTypeDrop.readonly = false;
31730
- memberTypeDrop.dataBind();
31731
- }
31732
- else {
31733
- addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
31734
- removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
31735
- node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
31736
- }
31737
- select('#' + this.parentID + 'droppable', document).value = '';
31738
- }
31739
- else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
31740
- node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
31741
- var dropField = select('#' + this.parentID + 'droppable', document);
31742
- var field = {
31743
- name: this.isEdit ? this.currentFieldName : this.inputObj.value,
31744
- caption: this.inputObj.value,
31745
- formula: dropField.value
31746
- };
31747
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
32606
+ catch (execption) {
32607
+ this.parent.actionFailureMethod(execption);
31748
32608
  }
31749
32609
  };
31750
32610
  CalculatedField.prototype.removeCalcField = function (node) {
@@ -32161,6 +33021,12 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
32161
33021
  this.parent.isRequiredUpdate = false;
32162
33022
  }
32163
33023
  try {
33024
+ var actionInfo = {
33025
+ calculatedFieldInfo: this.parent.lastCalcFieldInfo
33026
+ };
33027
+ this.parent.actionObj.actionInfo = actionInfo;
33028
+ var actionName = (this.parent.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : calculatedFieldApplied;
33029
+ this.parent.actionObj.actionName = actionName;
32164
33030
  this.parent.updateDataSource(false);
32165
33031
  var pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
32166
33032
  this.parent.pivotGridModule : this.parent;
@@ -33616,7 +34482,7 @@ var FieldList = /** @__PURE__ @class */ (function () {
33616
34482
  FieldList.prototype.update = function () {
33617
34483
  var currentWidth;
33618
34484
  if (this.parent.currentView !== 'Table') {
33619
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
34485
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
33620
34486
  }
33621
34487
  else {
33622
34488
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
@@ -34096,7 +34962,7 @@ var GroupingBar = /** @__PURE__ @class */ (function () {
34096
34962
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
34097
34963
  }
34098
34964
  else {
34099
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
34965
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
34100
34966
  }
34101
34967
  if (currentWidth) {
34102
34968
  var actWidth = currentWidth < 400 ? 400 : currentWidth;
@@ -34368,15 +35234,17 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
34368
35234
  },
34369
35235
  {
34370
35236
  click: this.applyButtonClick.bind(this),
35237
+ isFlat: true,
34371
35238
  buttonModel: {
34372
- cssClass: FLAT_CLASS + ' ' + FORMAT_APPLY_BUTTON,
35239
+ isPrimary: true, cssClass: FORMAT_APPLY_BUTTON,
34373
35240
  content: this.parent.localeObj.getConstant('apply')
34374
35241
  }
34375
35242
  },
34376
35243
  {
34377
35244
  click: this.cancelButtonClick.bind(this),
35245
+ isFlat: true,
34378
35246
  buttonModel: {
34379
- cssClass: FLAT_CLASS + ' ' + FORMAT_CANCEL_BUTTON,
35247
+ cssClass: FORMAT_CANCEL_BUTTON,
34380
35248
  content: this.parent.localeObj.getConstant('cancel')
34381
35249
  }
34382
35250
  }
@@ -34430,6 +35298,10 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
34430
35298
  ConditionalFormatting.prototype.applyButtonClick = function () {
34431
35299
  if (this.refreshConditionValues()) {
34432
35300
  this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
35301
+ var actionInfo = {
35302
+ conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
35303
+ };
35304
+ this.parent.actionObj.actionInfo = actionInfo;
34433
35305
  this.parent.renderPivotGrid();
34434
35306
  this.dialog.close();
34435
35307
  }
@@ -35128,12 +36000,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35128
36000
  };
35129
36001
  /* eslint-enable */
35130
36002
  Toolbar$$1.prototype.reportChange = function (args) {
35131
- this.dropArgs = args;
35132
- if (this.parent.isModified && this.currentReport !== '') {
35133
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
36003
+ this.parent.actionObj.actionName = reportChange;
36004
+ if (this.parent.actionBeginMethod()) {
36005
+ args.cancel = true;
36006
+ return;
35134
36007
  }
35135
- else {
35136
- this.reportLoad(args);
36008
+ try {
36009
+ this.dropArgs = args;
36010
+ if (this.parent.isModified && this.currentReport !== '') {
36011
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
36012
+ }
36013
+ else {
36014
+ this.reportLoad(args);
36015
+ }
36016
+ }
36017
+ catch (execption) {
36018
+ this.parent.actionFailureMethod(execption);
35137
36019
  }
35138
36020
  };
35139
36021
  Toolbar$$1.prototype.reportLoad = function (args) {
@@ -35142,6 +36024,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35142
36024
  var loadArgs = {
35143
36025
  reportName: args.itemData.value
35144
36026
  };
36027
+ var actionInfo = {
36028
+ reportName: args.itemData.value
36029
+ };
36030
+ this.parent.actionObj.actionInfo = actionInfo;
35145
36031
  this.parent.trigger(loadReport, loadArgs, function (observedArgs) {
35146
36032
  _this_1.currentReport = observedArgs.reportName;
35147
36033
  _this_1.parent.isModified = false;
@@ -35154,7 +36040,15 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35154
36040
  report: this.parent.getPersistData(),
35155
36041
  reportName: this.currentReport
35156
36042
  };
36043
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
36044
+ var actionInfo = {
36045
+ reportName: this.currentReport
36046
+ };
36047
+ this.parent.actionObj.actionInfo = actionInfo;
35157
36048
  this.parent.trigger(saveReport, saveArgs);
36049
+ if (this.parent.actionObj.actionName) {
36050
+ this.parent.actionCompleteMethod();
36051
+ }
35158
36052
  this.parent.isModified = false;
35159
36053
  }
35160
36054
  else if (this.currentReport === '' && (args.item.id === (this.parent.element.id + 'save') || args.item.id === (this.parent.element.id + 'saveas'))) {
@@ -35218,54 +36112,67 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35218
36112
  }
35219
36113
  };
35220
36114
  Toolbar$$1.prototype.actionClick = function (args) {
35221
- switch (args.item.id) {
35222
- case (this.parent.element.id + 'save'):
35223
- case (this.parent.element.id + 'saveas'):
35224
- this.saveReport(args);
35225
- break;
35226
- case (this.parent.element.id + 'remove'):
35227
- this.action = 'Remove';
35228
- if (this.currentReport && this.currentReport !== '') {
35229
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
35230
- }
35231
- else {
35232
- this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
35233
- }
35234
- return;
35235
- case (this.parent.element.id + 'rename'):
35236
- this.renameReport(args);
35237
- break;
35238
- case (this.parent.element.id + 'new'):
35239
- this.action = 'New';
35240
- this.newArgs = args;
35241
- if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
35242
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
35243
- }
35244
- else {
35245
- this.createNewReport(args);
35246
- }
35247
- break;
35248
- case (this.parent.element.id + 'load'):
35249
- this.action = 'Load';
35250
- break;
35251
- case (this.parent.element.id + 'fieldlist'):
35252
- if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
35253
- this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
35254
- }
35255
- break;
35256
- case (this.parent.element.id + 'formatting'):
35257
- if (this.parent.conditionalFormattingModule) {
35258
- this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
35259
- }
35260
- break;
35261
- case (this.parent.element.id + 'mdxQuery'):
35262
- this.mdxQueryDialog(args);
35263
- break;
35264
- case (this.parent.element.id + 'numberFormatting'):
35265
- if (this.parent.numberFormattingModule) {
35266
- this.parent.numberFormattingModule.showNumberFormattingDialog();
35267
- }
35268
- break;
36115
+ var actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
36116
+ : (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
36117
+ : (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
36118
+ : (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
36119
+ this.parent.actionObj.actionName = actionName;
36120
+ if (this.parent.actionBeginMethod()) {
36121
+ return;
36122
+ }
36123
+ try {
36124
+ switch (args.item.id) {
36125
+ case (this.parent.element.id + 'save'):
36126
+ case (this.parent.element.id + 'saveas'):
36127
+ this.saveReport(args);
36128
+ break;
36129
+ case (this.parent.element.id + 'remove'):
36130
+ this.action = 'Remove';
36131
+ if (this.currentReport && this.currentReport !== '') {
36132
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
36133
+ }
36134
+ else {
36135
+ this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
36136
+ }
36137
+ return;
36138
+ case (this.parent.element.id + 'rename'):
36139
+ this.renameReport(args);
36140
+ break;
36141
+ case (this.parent.element.id + 'new'):
36142
+ this.action = 'New';
36143
+ this.newArgs = args;
36144
+ if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
36145
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
36146
+ }
36147
+ else {
36148
+ this.createNewReport(args);
36149
+ }
36150
+ break;
36151
+ case (this.parent.element.id + 'load'):
36152
+ this.action = 'Load';
36153
+ break;
36154
+ case (this.parent.element.id + 'fieldlist'):
36155
+ if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
36156
+ this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
36157
+ }
36158
+ break;
36159
+ case (this.parent.element.id + 'formatting'):
36160
+ if (this.parent.conditionalFormattingModule) {
36161
+ this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36162
+ }
36163
+ break;
36164
+ case (this.parent.element.id + 'mdxQuery'):
36165
+ this.mdxQueryDialog(args);
36166
+ break;
36167
+ case (this.parent.element.id + 'numberFormatting'):
36168
+ if (this.parent.numberFormattingModule) {
36169
+ this.parent.numberFormattingModule.showNumberFormattingDialog();
36170
+ }
36171
+ break;
36172
+ }
36173
+ }
36174
+ catch (execption) {
36175
+ this.parent.actionFailureMethod(execption);
35269
36176
  }
35270
36177
  };
35271
36178
  Toolbar$$1.prototype.renderDialog = function () {
@@ -35357,6 +36264,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35357
36264
  return;
35358
36265
  };
35359
36266
  Toolbar$$1.prototype.okBtnClick = function () {
36267
+ var _this_1 = this;
35360
36268
  var reportInput = this.dialog.element.querySelector('.' + GRID_REPORT_INPUT);
35361
36269
  if (reportInput && reportInput.value === '') {
35362
36270
  reportInput.focus();
@@ -35388,6 +36296,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35388
36296
  report: _this_2.parent.getPersistData(),
35389
36297
  reportName: reportInput.value
35390
36298
  };
36299
+ var actionInfo = {
36300
+ reportName: reportInput.value
36301
+ };
36302
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35391
36303
  _this_2.parent.trigger(saveReport, saveArgs);
35392
36304
  _this_2.parent.isModified = false;
35393
36305
  _this_2.updateReportList();
@@ -35420,6 +36332,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35420
36332
  report: _this_3.parent.getPersistData(),
35421
36333
  reportName: reportInput.value
35422
36334
  };
36335
+ var actionInfo = {
36336
+ reportName: reportInput.value
36337
+ };
36338
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35423
36339
  _this_3.parent.trigger(saveReport, saveArgs);
35424
36340
  _this_3.parent.isModified = false;
35425
36341
  _this_3.updateReportList();
@@ -35454,12 +36370,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35454
36370
  reportName: _this_4.currentReport,
35455
36371
  rename: reportInput.value
35456
36372
  };
36373
+ var actionInfo = {
36374
+ reportName: { oldName: _this_4.currentReport, newName: reportInput.value }
36375
+ };
36376
+ _this_1.parent.actionObj.actionInfo = actionInfo;
35457
36377
  _this_4.parent.trigger(renameReport, renameArgs);
35458
36378
  _this_4.currentReport = reportInput.value;
35459
36379
  _this_4.updateReportList();
35460
36380
  _this_4.dialog.hide();
35461
36381
  });
35462
36382
  }
36383
+ this.parent.actionObj.actionName = this.parent.getActionCompleteName();
36384
+ if (this.parent.actionObj.actionName) {
36385
+ this.parent.actionCompleteMethod();
36386
+ }
35463
36387
  };
35464
36388
  Toolbar$$1.prototype.createNewReport = function (args) {
35465
36389
  this.dialogShow(args);
@@ -35518,6 +36442,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35518
36442
  var removeArgs = {
35519
36443
  reportName: this.currentReport
35520
36444
  };
36445
+ var actionInfo = {
36446
+ reportName: this.currentReport
36447
+ };
36448
+ this.parent.actionObj.actionInfo = actionInfo;
35521
36449
  this.parent.trigger(removeReport, removeArgs);
35522
36450
  var reports = this.fetchReports();
35523
36451
  if (reports.reportName && reports.reportName.length > 0) {
@@ -35536,6 +36464,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35536
36464
  this.action = '';
35537
36465
  }
35538
36466
  this.updateReportList();
36467
+ this.parent.actionObj.actionName = reportRemoved;
36468
+ if (this.parent.actionObj.actionName) {
36469
+ this.parent.actionCompleteMethod();
36470
+ }
35539
36471
  }
35540
36472
  else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
35541
36473
  if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
@@ -35543,12 +36475,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35543
36475
  report: this.parent.getPersistData(),
35544
36476
  reportName: this.currentReport
35545
36477
  };
36478
+ var actionInfo = {
36479
+ reportName: this.currentReport
36480
+ };
36481
+ this.parent.actionObj.actionInfo = actionInfo;
36482
+ this.parent.actionObj.actionName = reportSaved;
36483
+ if (this.parent.actionObj.actionName) {
36484
+ this.parent.actionCompleteMethod();
36485
+ }
35546
36486
  this.parent.trigger(saveReport, saveArgs);
35547
36487
  this.parent.isModified = false;
35548
36488
  if (this.action === 'New') {
36489
+ this.parent.actionObj.actionName = addNewReport;
35549
36490
  this.createNewReport(this.newArgs);
35550
36491
  }
35551
36492
  else {
36493
+ this.parent.actionObj.actionName = reportChange;
35552
36494
  this.reportLoad(this.dropArgs);
35553
36495
  }
35554
36496
  }
@@ -35654,6 +36596,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35654
36596
  this.chartMenu = new Menu({
35655
36597
  items: menu, enableRtl: this.parent.enableRtl,
35656
36598
  locale: this.parent.locale,
36599
+ cssClass: TOOLBAR_MENU,
35657
36600
  select: this.menuItemClick.bind(this),
35658
36601
  beforeOpen: this.whitespaceRemove.bind(this),
35659
36602
  onClose: function (args) {
@@ -35710,6 +36653,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35710
36653
  this.exportMenu = new Menu({
35711
36654
  items: menu, enableRtl: this.parent.enableRtl,
35712
36655
  locale: this.parent.locale,
36656
+ cssClass: TOOLBAR_MENU,
35713
36657
  select: this.menuItemClick.bind(this), beforeOpen: this.updateExportMenu.bind(this),
35714
36658
  onClose: function (args) {
35715
36659
  _this_1.focusToolBar();
@@ -35747,6 +36691,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35747
36691
  this.subTotalMenu = new Menu({
35748
36692
  items: menu, enableRtl: this.parent.enableRtl,
35749
36693
  locale: this.parent.locale,
36694
+ cssClass: TOOLBAR_MENU,
35750
36695
  select: this.menuItemClick.bind(this), beforeOpen: this.updateSubtotalSelection.bind(this),
35751
36696
  onClose: function (args) {
35752
36697
  _this_1.focusToolBar();
@@ -35784,6 +36729,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35784
36729
  this.grandTotalMenu = new Menu({
35785
36730
  items: menu, enableRtl: this.parent.enableRtl,
35786
36731
  locale: this.parent.locale,
36732
+ cssClass: TOOLBAR_MENU,
35787
36733
  select: this.menuItemClick.bind(this), beforeOpen: this.updateGrandtotalSelection.bind(this),
35788
36734
  onClose: function (args) {
35789
36735
  _this_1.focusToolBar();
@@ -35811,6 +36757,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
35811
36757
  this.formattingMenu = new Menu({
35812
36758
  items: menu, enableRtl: this.parent.enableRtl,
35813
36759
  locale: this.parent.locale,
36760
+ cssClass: TOOLBAR_MENU,
35814
36761
  select: this.menuItemClick.bind(this)
35815
36762
  });
35816
36763
  this.formattingMenu.isStringTemplate = true;
@@ -36010,181 +36957,202 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36010
36957
  var _this_1 = this;
36011
36958
  var exportArgs = {};
36012
36959
  var type;
36960
+ 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
36961
+ : (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
36962
+ : (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
36963
+ : (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
36964
+ : (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
36965
+ : (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
36966
+ : (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
36967
+ : (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
36968
+ this.parent.actionObj.actionName = actionName;
36969
+ if (this.parent.actionBeginMethod()) {
36970
+ return;
36971
+ }
36013
36972
  if (this.getAllChartItems().indexOf(args.item.id.split(this.parent.element.id + '_')[1]) > -1 ||
36014
36973
  (args.item.id.split(this.parent.element.id + '_')[1] === 'ChartMoreOption') ||
36015
36974
  (args.item.id.split(this.parent.element.id + '_')[1] === 'multipleAxes') ||
36016
36975
  (args.item.id.split(this.parent.element.id + '_')[1] === 'showLegend')) {
36017
36976
  type = args.item.id.split(this.parent.element.id + '_')[1];
36018
36977
  }
36019
- switch (args.item.id) {
36020
- case (this.parent.element.id + 'grid'):
36021
- if (this.parent.grid && this.parent.chart) {
36022
- this.parent.grid.element.style.display = '';
36023
- this.parent.chart.element.style.display = 'none';
36024
- if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
36025
- this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
36026
- }
36027
- this.parent.currentView = 'Table';
36028
- this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
36029
- if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
36030
- this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
36031
- this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
36978
+ try {
36979
+ switch (args.item.id) {
36980
+ case (this.parent.element.id + 'grid'):
36981
+ if (this.parent.grid && this.parent.chart) {
36982
+ this.parent.grid.element.style.display = '';
36983
+ this.parent.chart.element.style.display = 'none';
36984
+ if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
36985
+ this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
36986
+ }
36987
+ this.parent.currentView = 'Table';
36988
+ this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
36989
+ if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
36990
+ this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
36991
+ this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
36992
+ }
36993
+ var actionInfo = {
36994
+ toolbarInfo: { displayOption: this.parent.displayOption, gridSettings: this.parent.gridSettings }
36995
+ };
36996
+ this.parent.actionObj.actionInfo = actionInfo;
36997
+ this.parent.layoutRefresh();
36032
36998
  }
36033
- this.parent.layoutRefresh();
36034
- }
36035
- break;
36036
- case (this.parent.element.id + 'pdf'):
36037
- if (this.parent.currentView === 'Table') {
36999
+ break;
37000
+ case (this.parent.element.id + 'pdf'):
37001
+ if (this.parent.currentView === 'Table') {
37002
+ exportArgs = {
37003
+ pdfExportProperties: { fileName: 'Export.pdf' },
37004
+ pdfDoc: undefined,
37005
+ isBlob: false,
37006
+ isMultipleExport: false
37007
+ };
37008
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37009
+ _this_1.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
37010
+ });
37011
+ }
37012
+ else {
37013
+ exportArgs = {
37014
+ width: undefined,
37015
+ height: undefined,
37016
+ orientation: PdfPageOrientation.Landscape,
37017
+ type: 'PDF',
37018
+ fileName: 'result',
37019
+ };
37020
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37021
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37022
+ });
37023
+ }
37024
+ break;
37025
+ case (this.parent.element.id + 'excel'):
36038
37026
  exportArgs = {
36039
- pdfExportProperties: { fileName: 'Export.pdf' },
36040
- pdfDoc: undefined,
37027
+ excelExportProperties: { fileName: 'Export.xlsx' },
37028
+ isBlob: undefined,
37029
+ isMultipleExport: undefined,
37030
+ workbook: undefined
37031
+ };
37032
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37033
+ _this_1.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
37034
+ });
37035
+ break;
37036
+ case (this.parent.element.id + 'csv'):
37037
+ exportArgs = {
37038
+ excelExportProperties: { fileName: 'Export.csv' },
36041
37039
  isBlob: false,
36042
- isMultipleExport: false
37040
+ isMultipleExport: false,
37041
+ workbook: undefined
36043
37042
  };
36044
37043
  this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36045
- _this_1.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
37044
+ _this_1.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36046
37045
  });
36047
- }
36048
- else {
37046
+ break;
37047
+ case (this.parent.element.id + 'png'):
36049
37048
  exportArgs = {
37049
+ type: 'PNG',
36050
37050
  width: undefined,
36051
37051
  height: undefined,
37052
+ fileName: 'result',
36052
37053
  orientation: PdfPageOrientation.Landscape,
36053
- type: 'PDF',
37054
+ };
37055
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37056
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37057
+ });
37058
+ break;
37059
+ case (this.parent.element.id + 'jpeg'):
37060
+ exportArgs = {
37061
+ type: 'JPEG',
36054
37062
  fileName: 'result',
37063
+ orientation: PdfPageOrientation.Landscape,
37064
+ width: undefined,
37065
+ height: undefined,
36055
37066
  };
36056
37067
  this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36057
37068
  _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36058
37069
  });
36059
- }
36060
- break;
36061
- case (this.parent.element.id + 'excel'):
36062
- exportArgs = {
36063
- excelExportProperties: { fileName: 'Export.xlsx' },
36064
- isBlob: undefined,
36065
- isMultipleExport: undefined,
36066
- workbook: undefined
36067
- };
36068
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36069
- _this_1.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36070
- });
36071
- break;
36072
- case (this.parent.element.id + 'csv'):
36073
- exportArgs = {
36074
- excelExportProperties: { fileName: 'Export.csv' },
36075
- isBlob: false,
36076
- isMultipleExport: false,
36077
- workbook: undefined
36078
- };
36079
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36080
- _this_1.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
36081
- });
36082
- break;
36083
- case (this.parent.element.id + 'png'):
36084
- exportArgs = {
36085
- type: 'PNG',
36086
- width: undefined,
36087
- height: undefined,
36088
- fileName: 'result',
36089
- orientation: PdfPageOrientation.Landscape,
36090
- };
36091
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36092
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36093
- });
36094
- break;
36095
- case (this.parent.element.id + 'jpeg'):
36096
- exportArgs = {
36097
- type: 'JPEG',
36098
- fileName: 'result',
36099
- orientation: PdfPageOrientation.Landscape,
36100
- width: undefined,
36101
- height: undefined,
36102
- };
36103
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36104
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36105
- });
36106
- break;
36107
- case (this.parent.element.id + 'svg'):
36108
- exportArgs = {
36109
- width: undefined,
36110
- height: undefined,
36111
- type: 'SVG',
36112
- fileName: 'result',
36113
- orientation: PdfPageOrientation.Landscape,
36114
- };
36115
- this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
36116
- _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
36117
- });
36118
- break;
36119
- case (this.parent.element.id + 'notsubtotal'):
36120
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
36121
- this.parent.refreshData();
36122
- break;
36123
- case (this.parent.element.id + 'subtotalrow'):
36124
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
36125
- this.parent.refreshData();
36126
- break;
36127
- case (this.parent.element.id + 'subtotalcolumn'):
36128
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
36129
- this.parent.refreshData();
36130
- break;
36131
- case (this.parent.element.id + 'subtotal'):
36132
- this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
36133
- this.parent.refreshData();
36134
- break;
36135
- case (this.parent.element.id + 'notgrandtotal'):
36136
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
36137
- this.parent.refreshData();
36138
- break;
36139
- case (this.parent.element.id + 'grandtotalrow'):
36140
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
36141
- this.parent.refreshData();
36142
- break;
36143
- case (this.parent.element.id + 'grandtotalcolumn'):
36144
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
36145
- this.parent.refreshData();
36146
- break;
36147
- case (this.parent.element.id + 'grandtotal'):
36148
- this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
36149
- this.parent.refreshData();
36150
- break;
36151
- case (this.parent.element.id + 'numberFormattingMenu'):
36152
- if (this.parent.numberFormattingModule) {
36153
- this.parent.numberFormattingModule.showNumberFormattingDialog();
36154
- }
36155
- break;
36156
- case (this.parent.element.id + 'conditionalFormattingMenu'):
36157
- if (this.parent.conditionalFormattingModule) {
36158
- this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36159
- }
36160
- break;
36161
- case (this.parent.element.id + '_' + type):
36162
- if (args.item && args.item.text) {
36163
- if (type === 'ChartMoreOption') {
36164
- this.createChartTypeDialog();
36165
- }
36166
- else if (type === 'multipleAxes') {
36167
- if (this.parent.chartSettings.enableScrollOnMultiAxis) {
36168
- this.isMultiAxisChange = true;
36169
- }
36170
- this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
36171
- this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
37070
+ break;
37071
+ case (this.parent.element.id + 'svg'):
37072
+ exportArgs = {
37073
+ width: undefined,
37074
+ height: undefined,
37075
+ type: 'SVG',
37076
+ fileName: 'result',
37077
+ orientation: PdfPageOrientation.Landscape,
37078
+ };
37079
+ this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
37080
+ _this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
37081
+ });
37082
+ break;
37083
+ case (this.parent.element.id + 'notsubtotal'):
37084
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
37085
+ this.parent.refreshData();
37086
+ break;
37087
+ case (this.parent.element.id + 'subtotalrow'):
37088
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
37089
+ this.parent.refreshData();
37090
+ break;
37091
+ case (this.parent.element.id + 'subtotalcolumn'):
37092
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
37093
+ this.parent.refreshData();
37094
+ break;
37095
+ case (this.parent.element.id + 'subtotal'):
37096
+ this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
37097
+ this.parent.refreshData();
37098
+ break;
37099
+ case (this.parent.element.id + 'notgrandtotal'):
37100
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
37101
+ this.parent.refreshData();
37102
+ break;
37103
+ case (this.parent.element.id + 'grandtotalrow'):
37104
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
37105
+ this.parent.refreshData();
37106
+ break;
37107
+ case (this.parent.element.id + 'grandtotalcolumn'):
37108
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
37109
+ this.parent.refreshData();
37110
+ break;
37111
+ case (this.parent.element.id + 'grandtotal'):
37112
+ this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
37113
+ this.parent.refreshData();
37114
+ break;
37115
+ case (this.parent.element.id + 'numberFormattingMenu'):
37116
+ if (this.parent.numberFormattingModule) {
37117
+ this.parent.numberFormattingModule.showNumberFormattingDialog();
36172
37118
  }
36173
- else if (this.getAllChartItems().indexOf(type) > -1) {
36174
- this.updateChartType(type, false);
37119
+ break;
37120
+ case (this.parent.element.id + 'conditionalFormattingMenu'):
37121
+ if (this.parent.conditionalFormattingModule) {
37122
+ this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
36175
37123
  }
36176
- else if (type === 'showLegend') {
36177
- this.parent.chart.legendSettings.visible = !this.showLableState;
36178
- if (this.parent.chartSettings.legendSettings) {
36179
- this.parent.chartSettings.legendSettings.visible = !this.showLableState;
37124
+ break;
37125
+ case (this.parent.element.id + '_' + type):
37126
+ if (args.item && args.item.text) {
37127
+ if (type === 'ChartMoreOption') {
37128
+ this.createChartTypeDialog();
37129
+ }
37130
+ else if (type === 'multipleAxes') {
37131
+ if (this.parent.chartSettings.enableScrollOnMultiAxis) {
37132
+ this.isMultiAxisChange = true;
37133
+ }
37134
+ this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
37135
+ this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36180
37136
  }
36181
- else {
36182
- this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
37137
+ else if (this.getAllChartItems().indexOf(type) > -1) {
37138
+ this.updateChartType(type, false);
37139
+ }
37140
+ else if (type === 'showLegend') {
37141
+ this.parent.chart.legendSettings.visible = !this.showLableState;
37142
+ if (this.parent.chartSettings.legendSettings) {
37143
+ this.parent.chartSettings.legendSettings.visible = !this.showLableState;
37144
+ }
37145
+ else {
37146
+ this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
37147
+ }
37148
+ this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36183
37149
  }
36184
- this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
36185
37150
  }
36186
- }
36187
- break;
37151
+ break;
37152
+ }
37153
+ }
37154
+ catch (execption) {
37155
+ this.parent.actionFailureMethod(execption);
36188
37156
  }
36189
37157
  /* eslint-enable max-len */
36190
37158
  };
@@ -36276,14 +37244,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
36276
37244
  if (this.parent.chart) {
36277
37245
  this.parent.currentView = 'Chart';
36278
37246
  this.parent.setProperties({ displayOption: { primary: 'Chart' } }, true);
36279
- this.parent.chart.element.style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
37247
+ if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
37248
+ this.parent.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
37249
+ }
36280
37250
  this.parent.chart.setProperties({ width: formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()) }, true); /* eslint-disable-line */
36281
37251
  if (this.parent.chartSettings.chartSeries.type === type && !isMultiAxis) {
36282
- this.parent.chartModule.updateView();
37252
+ this.parent.pivotChartModule.updateView();
36283
37253
  }
36284
37254
  else {
36285
37255
  this.parent.chartSettings.chartSeries.type = type;
36286
37256
  }
37257
+ var actionInfo = {
37258
+ toolbarInfo: { displayOption: this.parent.displayOption, chartSettings: this.parent.chartSettings }
37259
+ };
37260
+ this.parent.actionObj.actionInfo = actionInfo;
36287
37261
  }
36288
37262
  }
36289
37263
  };
@@ -36847,6 +37821,10 @@ var NumberFormatting = /** @__PURE__ @class */ (function () {
36847
37821
  this.parent.trigger(numberFormatting, eventArgs, function (observedArgs) {
36848
37822
  if (!observedArgs.cancel) {
36849
37823
  _this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
37824
+ var actionInfo = {
37825
+ numberFormattingInfo: _this.parent.dataSourceSettings.formatSettings
37826
+ };
37827
+ _this.parent.actionObj.actionInfo = actionInfo;
36850
37828
  try {
36851
37829
  _this.parent.updateDataSource(false);
36852
37830
  _this.dialog.close();
@@ -37511,7 +38489,7 @@ var Grouping = /** @__PURE__ @class */ (function () {
37511
38489
  for (var j = 0, len_1 = field.customGroups.length; j < len_1; j++) {
37512
38490
  if (field.customGroups[j]) {
37513
38491
  var group = field.customGroups[j];
37514
- if (group.items && PivotUtil.isContainCommonElements(group.items, selectedOptions)) {
38492
+ if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
37515
38493
  splicedItems = this.mergeArray(splicedItems, [group.groupName]);
37516
38494
  newItems = this.mergeArray(newItems, group.items);
37517
38495
  field.customGroups.splice(j, 1);
@@ -37769,5 +38747,5 @@ var Grouping = /** @__PURE__ @class */ (function () {
37769
38747
  * Export PivotGrid components
37770
38748
  */
37771
38749
 
37772
- 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 };
38750
+ 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 };
37773
38751
  //# sourceMappingURL=ej2-pivotview.es5.js.map