@syncfusion/ej2-pivotview 19.3.46 → 19.3.47
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.
- package/CHANGELOG.md +13 -5
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +193 -83
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +217 -107
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/base/engine.d.ts +2 -0
- package/src/base/engine.js +126 -91
- package/src/pivotview/actions/drill-through.js +3 -1
- package/src/pivotview/actions/excel-export.js +3 -2
- package/src/pivotview/actions/pdf-export.js +4 -3
- package/src/pivotview/base/pivotview-model.d.ts +1 -1
- package/src/pivotview/base/pivotview.d.ts +3 -1
- package/src/pivotview/base/pivotview.js +31 -7
- package/src/pivotview/renderer/render.d.ts +1 -0
- package/src/pivotview/renderer/render.js +50 -3
|
@@ -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
|
-
|
|
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
|
}
|
|
@@ -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
|
-
|
|
2510
|
-
rowIndex
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
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
|
}
|
|
@@ -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);
|
|
@@ -1003,6 +1003,8 @@ var Render = /** @class */ (function () {
|
|
|
1003
1003
|
if (tCell && (this.parent.notEmpty) && this.engine.headerContent) {
|
|
1004
1004
|
var customClass = this.parent.hyperlinkSettings.cssClass;
|
|
1005
1005
|
var cell = args.data[0];
|
|
1006
|
+
var isRowFieldsAvail = cell.valueSort.levelName === (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
1007
|
+
this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText));
|
|
1006
1008
|
tCell.setAttribute('index', cell.rowIndex ? cell.rowIndex.toString() : '0');
|
|
1007
1009
|
if (tCell.getAttribute('aria-colindex') === '0') {
|
|
1008
1010
|
if (this.parent.dataType === 'pivot') {
|
|
@@ -1057,11 +1059,17 @@ var Render = /** @class */ (function () {
|
|
|
1057
1059
|
if (cell.type === 'grand sum') {
|
|
1058
1060
|
this.rowGrandPos = cell.rowIndex;
|
|
1059
1061
|
tCell.classList.add('e-gtot');
|
|
1060
|
-
|
|
1062
|
+
var values = this.parent.dataSourceSettings.values;
|
|
1063
|
+
localizedText = isNullOrUndefined(cell.valueSort.axis) ? (this.parent.dataSourceSettings.rows.length === 0 && values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row') ?
|
|
1064
|
+
this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type) + ' ' +
|
|
1065
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name) :
|
|
1066
|
+
this.parent.localeObj.getConstant('grandTotal') : cell.formattedText;
|
|
1061
1067
|
}
|
|
1062
1068
|
else if (cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') +
|
|
1063
1069
|
(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText))) {
|
|
1064
1070
|
tCell.classList.add('e-gtot');
|
|
1071
|
+
localizedText = isRowFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType) + ' '
|
|
1072
|
+
+ this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
|
|
1065
1073
|
}
|
|
1066
1074
|
else {
|
|
1067
1075
|
tCell.classList.add('e-stot');
|
|
@@ -1105,6 +1113,7 @@ var Render = /** @class */ (function () {
|
|
|
1105
1113
|
tCell.classList.add(cls.VALUESCONTENT);
|
|
1106
1114
|
cell = args.data[Number(tCell.getAttribute('aria-colindex'))];
|
|
1107
1115
|
cell = isNullOrUndefined(cell) ? args.column.customAttributes.cell : cell;
|
|
1116
|
+
cell.isGrandSum = isRowFieldsAvail ? true : cell.isGrandSum;
|
|
1108
1117
|
if (cell.isSum) {
|
|
1109
1118
|
tCell.classList.add(cls.SUMMARY);
|
|
1110
1119
|
}
|
|
@@ -1315,16 +1324,20 @@ var Render = /** @class */ (function () {
|
|
|
1315
1324
|
else {
|
|
1316
1325
|
tCell = this.onOlapColumnCellBoundEvent(tCell, cell);
|
|
1317
1326
|
}
|
|
1318
|
-
|
|
1327
|
+
var isColumnFieldsAvail = (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' &&
|
|
1328
|
+
cell.valueSort.levelName === (this.parent.localeObj.getConstant('grandTotal') + (this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) + (cell.formattedText)));
|
|
1329
|
+
if (cell.type || isColumnFieldsAvail) {
|
|
1319
1330
|
tCell.classList.add(cell.type === 'grand sum' ? 'e-gtot' : 'e-stot');
|
|
1320
1331
|
if (cell.type === 'grand sum') {
|
|
1321
1332
|
this.colGrandPos = cell.colIndex;
|
|
1322
1333
|
}
|
|
1323
|
-
else {
|
|
1334
|
+
else if (cell.type) {
|
|
1324
1335
|
tCell.classList.add('e-colstot');
|
|
1325
1336
|
}
|
|
1326
1337
|
var localizedText = cell.type === 'grand sum' ? (isNullOrUndefined(cell.valueSort.axis) ? this.parent.localeObj.getConstant('grandTotal') : cell.formattedText) :
|
|
1327
1338
|
cell.formattedText.split('Total')[0] + this.parent.localeObj.getConstant('total');
|
|
1339
|
+
localizedText = isColumnFieldsAvail ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cell.actualText].aggregateType)
|
|
1340
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + cell.formattedText : localizedText;
|
|
1328
1341
|
if (tCell.querySelector('.e-headertext') !== null) {
|
|
1329
1342
|
tCell.querySelector('.e-headertext').innerText = localizedText;
|
|
1330
1343
|
}
|
|
@@ -1763,8 +1776,39 @@ var Render = /** @class */ (function () {
|
|
|
1763
1776
|
}
|
|
1764
1777
|
return formatArray;
|
|
1765
1778
|
};
|
|
1779
|
+
Render.prototype.getValidHeader = function (args, axis) {
|
|
1780
|
+
var values = this.parent.dataSourceSettings.values;
|
|
1781
|
+
if (axis === 'row') {
|
|
1782
|
+
var cellInfo = args;
|
|
1783
|
+
if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
|
|
1784
|
+
if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row' && (this.parent.localeObj.getConstant('grandTotal') +
|
|
1785
|
+
this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.value) === cellInfo.data[0].valueSort.levelName) {
|
|
1786
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo.value.toString()].aggregateType)
|
|
1787
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.value.toString();
|
|
1788
|
+
}
|
|
1789
|
+
else if (values.length === 1) {
|
|
1790
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type)
|
|
1791
|
+
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
return cellInfo.value;
|
|
1795
|
+
}
|
|
1796
|
+
else if (axis === 'column') {
|
|
1797
|
+
var cellInfo = args;
|
|
1798
|
+
if (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) {
|
|
1799
|
+
if (!isNullOrUndefined(args.gridCell.column.customAttributes) && this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column' &&
|
|
1800
|
+
(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + cellInfo.gridCell.column.customAttributes.cell.formattedText)
|
|
1801
|
+
=== cellInfo.gridCell.column.customAttributes.cell.valueSort.levelName) {
|
|
1802
|
+
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo
|
|
1803
|
+
.gridCell.column.customAttributes.cell.actualText].aggregateType) + ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.gridCell.column.customAttributes.cell.formattedText;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
return (cellInfo.cell).value;
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1766
1809
|
/* eslint-disable */
|
|
1767
1810
|
Render.prototype.excelColumnEvent = function (args) {
|
|
1811
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
1768
1812
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
1769
1813
|
this.parent.lastColumn = args.gridCell.column;
|
|
1770
1814
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -1773,6 +1817,7 @@ var Render = /** @class */ (function () {
|
|
|
1773
1817
|
this.parent.trigger(events.excelHeaderQueryCellInfo, args);
|
|
1774
1818
|
};
|
|
1775
1819
|
Render.prototype.pdfColumnEvent = function (args) {
|
|
1820
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
1776
1821
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
1777
1822
|
this.parent.lastColumn = args.gridCell.column;
|
|
1778
1823
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -1813,6 +1858,7 @@ var Render = /** @class */ (function () {
|
|
|
1813
1858
|
}
|
|
1814
1859
|
}
|
|
1815
1860
|
args = this.exportContentEvent(args);
|
|
1861
|
+
args.value = args.column.field === '0.formattedText' ? this.getValidHeader(args, 'row') : args.value;
|
|
1816
1862
|
this.parent.trigger(events.excelQueryCellInfo, args);
|
|
1817
1863
|
};
|
|
1818
1864
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1836,6 +1882,7 @@ var Render = /** @class */ (function () {
|
|
|
1836
1882
|
}
|
|
1837
1883
|
args.style = { paragraphIndent: level * 10 };
|
|
1838
1884
|
this.lastSpan = isValueCell ? this.lastSpan : level;
|
|
1885
|
+
args.value = this.getValidHeader(args, 'row');
|
|
1839
1886
|
}
|
|
1840
1887
|
this.parent.trigger(events.pdfQueryCellInfo, args);
|
|
1841
1888
|
};
|