@syncfusion/ej2-pivotview 19.3.46 → 19.3.55

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.
@@ -1,4 +1,4 @@
1
- import { Property, Browser, Component, ModuleDeclaration, createElement, setStyleAttribute } from '@syncfusion/ej2-base';import { EmitType, EventHandler, Complex, extend, ChildProperty, Collection, isNullOrUndefined, remove } from '@syncfusion/ej2-base';import { Internationalization, L10n, NotifyPropertyChanges, INotifyPropertyChanged, compile, formatUnit } from '@syncfusion/ej2-base';import { removeClass, addClass, Event, KeyboardEventArgs, setValue, closest, select } from '@syncfusion/ej2-base';import { MouseEventArgs } from '@syncfusion/ej2-base';import { PivotEngine, IPivotValues, IAxisSet, IDataOptions, IDataSet } from '../../base/engine';import { IPageSettings, IGroupSettings, IGridValues, IFieldListOptions, IValueSortSettings } from '../../base/engine';import { IDrilledItem, ICustomProperties, ISort, IFilter, IFieldOptions, ICalculatedFields, IDrillOptions } from '../../base/engine';import { IConditionalFormatSettings, IStringIndex, IField, IFormatSettings } from '../../base/engine';import { Tooltip, TooltipEventArgs, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { AxisFields } from '../../common/grouping-bar/axis-field-renderer';import { LoadEventArgs, EnginePopulatingEventArgs, DrillThroughEventArgs, PivotColumn, ChartLabelInfo, EditCompletedEventArgs, MultiLevelLabelClickEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs } from '../../common/base/interface';import { FetchReportArgs, LoadReportArgs, RenameReportArgs, RemoveReportArgs, ToolbarArgs } from '../../common/base/interface';import { PdfCellRenderArgs, NewReportArgs, ChartSeriesCreatedEventArgs, AggregateEventArgs } from '../../common/base/interface';import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs } from '../../common/base/interface';import { CellClickEventArgs, FieldDroppedEventArgs, HyperCellClickEventArgs, CellTemplateArgs } from '../../common/base/interface';import { BeforeExportEventArgs, EnginePopulatedEventArgs, BeginDrillThroughEventArgs, DrillArgs } from '../../common/base/interface';import { FieldListRefreshedEventArgs, MemberFilteringEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { MemberEditorOpenEventArgs, FieldRemoveEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { CalculatedFieldCreateEventArgs, NumberFormattingEventArgs, FieldDragStartEventArgs } from '../../common/base/interface';import { Render } from '../renderer/render';import { PivotCommon } from '../../common/base/pivot-common';import { Common } from '../../common/actions/common';import { GroupingBar } from '../../common/grouping-bar/grouping-bar';import { DataSourceSettingsModel, DrillOptionsModel, FormatSettingsModel } from '../model/datasourcesettings-model';import { DataSourceSettings } from '../model/datasourcesettings';import { GridSettings } from '../model/gridsettings';import { GridSettingsModel } from '../model/gridsettings-model';import { PivotButton } from '../../common/actions/pivot-button';import { PivotFieldList } from '../../pivotfieldlist/base/field-list';import { Grid, QueryCellInfoEventArgs, ColumnModel, Reorder, Resize, getObject } from '@syncfusion/ej2-grids';import { SelectionType, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellSelectEventArgs, RowSelectEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { RowDeselectEventArgs, ContextMenuClickEventArgs } from '@syncfusion/ej2-grids';import { EditSettingsModel, HeaderCellInfoEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { PdfExportProperties, ExcelExportProperties, ExcelQueryCellInfoEventArgs, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { ExcelHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs, PdfHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExport } from '../actions/excel-export';import { PDFExport } from '../actions/pdf-export';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { KeyboardInteraction } from '../actions/keyboard';import { PivotContextMenu } from '../../common/popups/context-menu';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { ConditionalFormatting } from '../../common/conditionalformatting/conditional-formatting';import { VirtualScroll } from '../actions/virtualscroll';import { DrillThrough } from '../actions/drill-through';import { Condition, GroupType } from '../../base/types';import { EditMode, ToolbarItems, View, Primary, AggregateTypes, ChartSeriesType, PivotTableContextMenuItem } from '../../common';import { PivotUtil } from '../../base/util';import { Toolbar } from '../../common/popups/toolbar';import { PivotChart } from '../../pivotchart/index';import { ChartSettings } from '../model/chartsettings';import { ChartSettingsModel } from '../model/chartsettings-model';import { Chart, ITooltipRenderEventArgs, ILoadedEventArgs, IPointEventArgs, AccumulationChart } from '@syncfusion/ej2-charts';import { IResizeEventArgs, IAxisLabelRenderEventArgs, ExportType } from '@syncfusion/ej2-charts';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { ClickEventArgs, BeforeOpenCloseMenuEventArgs, ItemModel } from '@syncfusion/ej2-navigations';import { OlapEngine, IOlapCustomProperties, ITupInfo, IDrillInfo, IOlapField } from '../../base/olap/engine';import { NumberFormatting } from '../../common/popups/formatting-dialog';import { Grouping } from '../../common/popups/grouping';
1
+ import { Property, Browser, Component, ModuleDeclaration, createElement, setStyleAttribute } from '@syncfusion/ej2-base';import { EmitType, EventHandler, Complex, extend, ChildProperty, Collection, isNullOrUndefined, remove } from '@syncfusion/ej2-base';import { Internationalization, L10n, NotifyPropertyChanges, INotifyPropertyChanged, compile, formatUnit } from '@syncfusion/ej2-base';import { removeClass, addClass, Event, KeyboardEventArgs, setValue, closest, select } from '@syncfusion/ej2-base';import { MouseEventArgs } from '@syncfusion/ej2-base';import { PivotEngine, IPivotValues, IAxisSet, IDataOptions, IDataSet } from '../../base/engine';import { IPageSettings, IGroupSettings, IGridValues, IFieldListOptions, IValueSortSettings } from '../../base/engine';import { IDrilledItem, ICustomProperties, ISort, IFilter, IFieldOptions, ICalculatedFields, IDrillOptions } from '../../base/engine';import { IConditionalFormatSettings, IStringIndex, IField, IFormatSettings } from '../../base/engine';import { Tooltip, TooltipEventArgs, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import * as events from '../../common/base/constant';import * as cls from '../../common/base/css-constant';import { AxisFields } from '../../common/grouping-bar/axis-field-renderer';import { LoadEventArgs, EnginePopulatingEventArgs, DrillThroughEventArgs, PivotColumn, ChartLabelInfo, EditCompletedEventArgs, MultiLevelLabelClickEventArgs, BeforeServiceInvokeEventArgs, FetchRawDataArgs, UpdateRawDataArgs } from '../../common/base/interface';import { FetchReportArgs, LoadReportArgs, RenameReportArgs, RemoveReportArgs, ToolbarArgs } from '../../common/base/interface';import { PdfCellRenderArgs, NewReportArgs, ChartSeriesCreatedEventArgs, AggregateEventArgs } from '../../common/base/interface';import { ResizeInfo, ScrollInfo, ColumnRenderEventArgs, PivotCellSelectedEventArgs, SaveReportArgs } from '../../common/base/interface';import { CellClickEventArgs, FieldDroppedEventArgs, HyperCellClickEventArgs, CellTemplateArgs } from '../../common/base/interface';import { BeforeExportEventArgs, EnginePopulatedEventArgs, BeginDrillThroughEventArgs, DrillArgs } from '../../common/base/interface';import { FieldListRefreshedEventArgs, MemberFilteringEventArgs, FieldDropEventArgs } from '../../common/base/interface';import { MemberEditorOpenEventArgs, FieldRemoveEventArgs, AggregateMenuOpenEventArgs } from '../../common/base/interface';import { CalculatedFieldCreateEventArgs, NumberFormattingEventArgs, FieldDragStartEventArgs } from '../../common/base/interface';import { Render } from '../renderer/render';import { PivotCommon } from '../../common/base/pivot-common';import { Common } from '../../common/actions/common';import { GroupingBar } from '../../common/grouping-bar/grouping-bar';import { DataSourceSettingsModel, DrillOptionsModel, FieldOptionsModel, FormatSettingsModel } from '../model/datasourcesettings-model';import { DataSourceSettings } from '../model/datasourcesettings';import { GridSettings } from '../model/gridsettings';import { GridSettingsModel } from '../model/gridsettings-model';import { PivotButton } from '../../common/actions/pivot-button';import { PivotFieldList } from '../../pivotfieldlist/base/field-list';import { Grid, QueryCellInfoEventArgs, ColumnModel, Reorder, Resize, getObject } from '@syncfusion/ej2-grids';import { SelectionType, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellSelectEventArgs, RowSelectEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { RowDeselectEventArgs, ContextMenuClickEventArgs } from '@syncfusion/ej2-grids';import { EditSettingsModel, HeaderCellInfoEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { PdfExportProperties, ExcelExportProperties, ExcelQueryCellInfoEventArgs, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { ExcelHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs, PdfHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExport } from '../actions/excel-export';import { PDFExport } from '../actions/pdf-export';import { CalculatedField } from '../../common/calculatedfield/calculated-field';import { KeyboardInteraction } from '../actions/keyboard';import { PivotContextMenu } from '../../common/popups/context-menu';import { DataManager, ReturnOption, Query } from '@syncfusion/ej2-data';import { ConditionalFormatting } from '../../common/conditionalformatting/conditional-formatting';import { VirtualScroll } from '../actions/virtualscroll';import { DrillThrough } from '../actions/drill-through';import { Condition, GroupType } from '../../base/types';import { EditMode, ToolbarItems, View, Primary, AggregateTypes, ChartSeriesType, PivotTableContextMenuItem } from '../../common';import { PivotUtil } from '../../base/util';import { Toolbar } from '../../common/popups/toolbar';import { PivotChart } from '../../pivotchart/index';import { ChartSettings } from '../model/chartsettings';import { ChartSettingsModel } from '../model/chartsettings-model';import { Chart, ITooltipRenderEventArgs, ILoadedEventArgs, IPointEventArgs, AccumulationChart } from '@syncfusion/ej2-charts';import { IResizeEventArgs, IAxisLabelRenderEventArgs, ExportType } from '@syncfusion/ej2-charts';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { ClickEventArgs, BeforeOpenCloseMenuEventArgs, ItemModel } from '@syncfusion/ej2-navigations';import { OlapEngine, IOlapCustomProperties, ITupInfo, IDrillInfo, IOlapField } from '../../base/olap/engine';import { NumberFormatting } from '../../common/popups/formatting-dialog';import { Grouping } from '../../common/popups/grouping';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -1505,7 +1505,7 @@ export declare class PivotView extends Component<HTMLElement> implements INotify
1505
1505
  /** @hidden */
1506
1506
  getHeaderField(rowIndex: number, colIndex: number, axis: string): string;
1507
1507
  private getLevel;
1508
- private getRowText;
1508
+ getRowText(rowIndex: number, colIndex: number): string;
1509
1509
  private getColText;
1510
1510
  private updateClass;
1511
1511
  private mouseRclickHandler;
@@ -1585,4 +1585,6 @@ export declare class PivotView extends Component<HTMLElement> implements INotify
1585
1585
  * @returns {void}
1586
1586
  */
1587
1587
  showNumberFormattingDialog(): void;
1588
+ /** @hidden */
1589
+ getValuesHeader(pivotCell: IAxisSet, type: string): string;
1588
1590
  }
@@ -1644,7 +1644,7 @@ var PivotView = /** @class */ (function (_super) {
1644
1644
  true : this.hyperlinkSettings.showHyperlink ? true : false);
1645
1645
  this.applyHyperlinkSettings();
1646
1646
  }
1647
- this.renderModule = new Render(this);
1647
+ this.renderModule = this.renderModule ? this.renderModule : new Render(this);
1648
1648
  this.renderModule.render();
1649
1649
  }
1650
1650
  else if (this.grid) {
@@ -2506,13 +2506,21 @@ var PivotView = /** @class */ (function (_super) {
2506
2506
  var cell = this.pivotValues[rowIndex][colIndex];
2507
2507
  var level = this.getLevel(cell);
2508
2508
  var rowText = cell.type === 'grand sum' ? this.localeObj.getConstant('grandTotal') : cell.formattedText;
2509
- while (level > 0 || cell.index === undefined) {
2510
- rowIndex--;
2511
- cell = this.pivotValues[rowIndex][colIndex];
2512
- if (cell.index !== undefined) {
2513
- if (level > cell.level) {
2514
- rowText = rowText + ' - ' + cell.formattedText;
2515
- level = level - 1;
2509
+ if (this.dataSourceSettings.valueAxis === 'row') {
2510
+ rowText = (this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.values.length > 1) ? this.pivotValues[rowIndex][0].valueSort.levelName.toString().slice((this.localeObj.getConstant('grandTotal')
2511
+ + this.dataSourceSettings.valueSortSettings.headerDelimiter).length).toString() : this.dataSourceSettings.values.length === 1 ? !isNullOrUndefined(this.dataSourceSettings.values[0].caption) ?
2512
+ this.dataSourceSettings.values[0].caption : this.dataSourceSettings.values[0].name : this.pivotValues[rowIndex][0].valueSort.levelName.toString();
2513
+ return rowText.split(this.dataSourceSettings.valueSortSettings.headerDelimiter).join(' - ');
2514
+ }
2515
+ else {
2516
+ while (level > 0 || cell.index === undefined) {
2517
+ rowIndex--;
2518
+ cell = this.pivotValues[rowIndex][colIndex];
2519
+ if (cell.index !== undefined) {
2520
+ if (level > cell.level) {
2521
+ rowText = rowText + ' - ' + cell.formattedText;
2522
+ level = level - 1;
2523
+ }
2516
2524
  }
2517
2525
  }
2518
2526
  }
@@ -3243,7 +3251,7 @@ var PivotView = /** @class */ (function (_super) {
3243
3251
  this.isEmptyGrid = true;
3244
3252
  this.notEmpty = false;
3245
3253
  this.isInitial = true;
3246
- this.renderModule = new Render(this);
3254
+ this.renderModule = this.renderModule ? this.renderModule : new Render(this);
3247
3255
  if (this.grid && this.grid.element && this.element.querySelector('.e-grid')) {
3248
3256
  this.notEmpty = true;
3249
3257
  this.grid.setProperties({
@@ -3915,6 +3923,22 @@ var PivotView = /** @class */ (function (_super) {
3915
3923
  this.numberFormattingModule.showNumberFormattingDialog();
3916
3924
  }
3917
3925
  };
3926
+ /** @hidden */
3927
+ PivotView.prototype.getValuesHeader = function (pivotCell, type) {
3928
+ var values = this.dataSourceSettings.values;
3929
+ if (type === 'value' && !isNullOrUndefined(pivotCell.valueSort) && (this.localeObj.getConstant('grandTotal') + this.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText)
3930
+ === pivotCell.valueSort.levelName && ((pivotCell.axis === 'column' && this.dataSourceSettings.columns.length === 0 && this.dataSourceSettings.valueAxis === 'column') || (pivotCell.axis === 'row' &&
3931
+ this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.valueAxis === 'row'))) {
3932
+ return this.localeObj.getConstant('total') + ' ' + this.localeObj.getConstant(this.engineModule.fieldList[pivotCell.actualText].aggregateType) + ' ' +
3933
+ this.localeObj.getConstant('of') + ' ' + pivotCell.formattedText;
3934
+ }
3935
+ else if (type === 'grandTotal' && values.length === 1 && this.dataSourceSettings.valueAxis === 'row' && pivotCell.formattedText === this.localeObj.getConstant('grandTotal')) {
3936
+ return this.localeObj.getConstant('total') + ' ' + this.localeObj.getConstant(values[values.length - 1].type) + ' ' +
3937
+ this.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption
3938
+ : values[values.length - 1].name);
3939
+ }
3940
+ return pivotCell.formattedText;
3941
+ };
3918
3942
  __decorate([
3919
3943
  Property('USD')
3920
3944
  ], PivotView.prototype, "currencyCode", void 0);
@@ -111,6 +111,7 @@ export declare class Render {
111
111
  getFormatList(): {
112
112
  [key: string]: string;
113
113
  };
114
+ private getValidHeader;
114
115
  private excelColumnEvent;
115
116
  private pdfColumnEvent;
116
117
  private excelRowEvent;
@@ -39,27 +39,30 @@ var Render = /** @class */ (function () {
39
39
  /* eslint-disable-next-line */
40
40
  /** @hidden */
41
41
  Render.prototype.render = function () {
42
- var parent = this.parent;
43
- var engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
42
+ this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
43
+ (this.parent.isAdaptive ? 140 : 200);
44
+ this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
45
+ this.gridSettings = this.parent.gridSettings;
46
+ this.formatList = this.getFormatList();
44
47
  this.parent.gridHeaderCellInfo = [];
45
48
  this.parent.gridCellCollection = {};
46
- this.injectGridModules(parent);
49
+ this.injectGridModules(this.parent);
47
50
  this.rowStartPos = this.getRowStartPos();
48
51
  if (this.parent.grid && this.parent.grid.element && this.parent.element.querySelector('.e-grid')) {
49
52
  this.parent.notEmpty = true;
50
- if (!engine.isEngineUpdated) {
51
- engine.headerContent = this.frameDataSource('header');
52
- engine.valueContent = this.frameDataSource('value');
53
+ if (!this.engine.isEngineUpdated) {
54
+ this.engine.headerContent = this.frameDataSource('header');
55
+ this.engine.valueContent = this.frameDataSource('value');
53
56
  }
54
57
  else {
55
58
  if (this.parent.enableValueSorting) {
56
- engine.valueContent = this.frameDataSource('value');
59
+ this.engine.valueContent = this.frameDataSource('value');
57
60
  }
58
- engine.isEngineUpdated = false;
61
+ this.engine.isEngineUpdated = false;
59
62
  }
60
63
  this.parent.grid.setProperties({
61
64
  columns: this.frameStackedHeaders(), dataSource: (this.parent.dataType === 'olap' ? true :
62
- parent.dataSourceSettings.values.length > 0) && !this.engine.isEmptyData ? engine.valueContent :
65
+ this.parent.dataSourceSettings.values.length > 0) && !this.engine.isEmptyData ? this.engine.valueContent :
63
66
  this.frameDataSource('value')
64
67
  }, true);
65
68
  if (this.parent.grid.height === 'auto') {
@@ -1003,6 +1006,8 @@ var Render = /** @class */ (function () {
1003
1006
  if (tCell && (this.parent.notEmpty) && this.engine.headerContent) {
1004
1007
  var customClass = this.parent.hyperlinkSettings.cssClass;
1005
1008
  var cell = args.data[0];
1009
+ var isRowFieldsAvail = cell.valueSort && cell.valueSort.levelName === (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' &&
1010
+ this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText));
1006
1011
  tCell.setAttribute('index', cell.rowIndex ? cell.rowIndex.toString() : '0');
1007
1012
  if (tCell.getAttribute('aria-colindex') === '0') {
1008
1013
  if (this.parent.dataType === 'pivot') {
@@ -1057,11 +1062,17 @@ var Render = /** @class */ (function () {
1057
1062
  if (cell.type === 'grand sum') {
1058
1063
  this.rowGrandPos = cell.rowIndex;
1059
1064
  tCell.classList.add('e-gtot');
1060
- localizedText = isNullOrUndefined(cell.valueSort.axis) ? this.parent.localeObj.getConstant('grandTotal') : cell.formattedText;
1065
+ var values = this.parent.dataSourceSettings.values;
1066
+ localizedText = isNullOrUndefined(cell.valueSort.axis) ? (this.parent.dataSourceSettings.rows.length === 0 && values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row') ?
1067
+ this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type) + ' ' +
1068
+ this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name) :
1069
+ this.parent.localeObj.getConstant('grandTotal') : cell.formattedText;
1061
1070
  }
1062
1071
  else if (cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') +
1063
1072
  (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText))) {
1064
1073
  tCell.classList.add('e-gtot');
1074
+ localizedText = isRowFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType) + ' '
1075
+ + this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
1065
1076
  }
1066
1077
  else {
1067
1078
  tCell.classList.add('e-stot');
@@ -1083,8 +1094,9 @@ var Render = /** @class */ (function () {
1083
1094
  }));
1084
1095
  var vSort = this.parent.pivotView.dataSourceSettings.valueSortSettings;
1085
1096
  if (this.parent.enableValueSorting) {
1086
- if (vSort && vSort.headerText && this.parent.dataSourceSettings.valueAxis === 'row'
1087
- && this.parent.pivotValues[Number(tCell.getAttribute('index'))][0].valueSort.levelName) {
1097
+ if (vSort && vSort.headerText && this.parent.dataSourceSettings.valueAxis === 'row' &&
1098
+ this.parent.pivotValues[Number(tCell.getAttribute('index'))][0] &&
1099
+ this.parent.pivotValues[Number(tCell.getAttribute('index'))][0].valueSort.levelName) {
1088
1100
  if (this.parent.pivotValues[Number(tCell.getAttribute('index'))][0].valueSort.levelName
1089
1101
  === vSort.headerText) {
1090
1102
  var style = (tCell.querySelector('.e-expand') || tCell.querySelector('.e-collapse')) ?
@@ -1105,6 +1117,7 @@ var Render = /** @class */ (function () {
1105
1117
  tCell.classList.add(cls.VALUESCONTENT);
1106
1118
  cell = args.data[Number(tCell.getAttribute('aria-colindex'))];
1107
1119
  cell = isNullOrUndefined(cell) ? args.column.customAttributes.cell : cell;
1120
+ cell.isGrandSum = isRowFieldsAvail ? true : cell.isGrandSum;
1108
1121
  if (cell.isSum) {
1109
1122
  tCell.classList.add(cls.SUMMARY);
1110
1123
  }
@@ -1315,16 +1328,20 @@ var Render = /** @class */ (function () {
1315
1328
  else {
1316
1329
  tCell = this.onOlapColumnCellBoundEvent(tCell, cell);
1317
1330
  }
1318
- if (cell.type) {
1331
+ var isColumnFieldsAvail = (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' && cell.valueSort &&
1332
+ cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText)));
1333
+ if (cell.type || isColumnFieldsAvail) {
1319
1334
  tCell.classList.add(cell.type === 'grand sum' ? 'e-gtot' : 'e-stot');
1320
1335
  if (cell.type === 'grand sum') {
1321
1336
  this.colGrandPos = cell.colIndex;
1322
1337
  }
1323
- else {
1338
+ else if (cell.type) {
1324
1339
  tCell.classList.add('e-colstot');
1325
1340
  }
1326
1341
  var localizedText = cell.type === 'grand sum' ? (isNullOrUndefined(cell.valueSort.axis) ? this.parent.localeObj.getConstant('grandTotal') : cell.formattedText) :
1327
1342
  cell.formattedText.split('Total')[0] + this.parent.localeObj.getConstant('total');
1343
+ localizedText = isColumnFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType)
1344
+ + ' ' + this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
1328
1345
  if (tCell.querySelector('.e-headertext') !== null) {
1329
1346
  tCell.querySelector('.e-headertext').innerText = localizedText;
1330
1347
  }
@@ -1763,8 +1780,41 @@ var Render = /** @class */ (function () {
1763
1780
  }
1764
1781
  return formatArray;
1765
1782
  };
1783
+ Render.prototype.getValidHeader = function (args, axis) {
1784
+ var values = this.parent.dataSourceSettings.values;
1785
+ if (axis === 'row') {
1786
+ var cellInfo = args;
1787
+ if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
1788
+ if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' && (this.parent.localeObj.getConstant('grandTotal') +
1789
+ this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.value) === cellInfo.data[0].valueSort.levelName) {
1790
+ return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo.value.toString()].aggregateType)
1791
+ + ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.value.toString();
1792
+ }
1793
+ else if (values.length === 1 && this.parent.dataSourceSettings.rows.length === 0) {
1794
+ return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type)
1795
+ + ' ' + this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name);
1796
+ }
1797
+ }
1798
+ return cellInfo.value;
1799
+ }
1800
+ else if (axis === 'column') {
1801
+ var cellInfo = args;
1802
+ if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
1803
+ if (!isNullOrUndefined(args.gridCell.column.customAttributes) && this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' &&
1804
+ (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.gridCell.column.customAttributes.cell.formattedText)
1805
+ === cellInfo.gridCell.column.customAttributes.cell.valueSort.levelName) {
1806
+ return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo
1807
+ .gridCell.column.customAttributes.cell.actualText].aggregateType) + ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.gridCell.column.customAttributes.cell.formattedText;
1808
+ }
1809
+ }
1810
+ return (cellInfo.cell).value;
1811
+ }
1812
+ };
1766
1813
  /* eslint-disable */
1767
1814
  Render.prototype.excelColumnEvent = function (args) {
1815
+ if (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column') {
1816
+ (args.cell).value = this.getValidHeader(args, 'column');
1817
+ }
1768
1818
  if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
1769
1819
  this.parent.lastColumn = args.gridCell.column;
1770
1820
  args.gridCell.column.width = args.gridCell.column.minWidth;
@@ -1773,6 +1823,9 @@ var Render = /** @class */ (function () {
1773
1823
  this.parent.trigger(events.excelHeaderQueryCellInfo, args);
1774
1824
  };
1775
1825
  Render.prototype.pdfColumnEvent = function (args) {
1826
+ if (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column') {
1827
+ (args.cell).value = this.getValidHeader(args, 'column');
1828
+ }
1776
1829
  if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
1777
1830
  this.parent.lastColumn = args.gridCell.column;
1778
1831
  args.gridCell.column.width = args.gridCell.column.minWidth;
@@ -1813,6 +1866,9 @@ var Render = /** @class */ (function () {
1813
1866
  }
1814
1867
  }
1815
1868
  args = this.exportContentEvent(args);
1869
+ if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row') {
1870
+ args.value = args.column.field === '0.formattedText' ? this.getValidHeader(args, 'row') : args.value;
1871
+ }
1816
1872
  this.parent.trigger(events.excelQueryCellInfo, args);
1817
1873
  };
1818
1874
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -1836,6 +1892,9 @@ var Render = /** @class */ (function () {
1836
1892
  }
1837
1893
  args.style = { paragraphIndent: level * 10 };
1838
1894
  this.lastSpan = isValueCell ? this.lastSpan : level;
1895
+ if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row') {
1896
+ args.value = this.getValidHeader(args, 'row');
1897
+ }
1839
1898
  }
1840
1899
  this.parent.trigger(events.pdfQueryCellInfo, args);
1841
1900
  };