@syncfusion/ej2-pivotview 19.3.57 → 19.4.42
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +76 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +56 -0
- package/CHANGELOG.md +40 -27
- package/README.md +1 -1
- 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 +2052 -1101
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2068 -1111
- 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 +22 -22
- package/src/base/engine.d.ts +17 -1
- package/src/base/engine.js +78 -27
- package/src/base/export-util.d.ts +17 -0
- package/src/base/export-util.js +245 -0
- package/src/base/olap/engine.d.ts +7 -0
- package/src/base/olap/engine.js +138 -35
- package/src/base/util.d.ts +0 -9
- package/src/base/util.js +2 -215
- package/src/common/actions/field-list.js +1 -1
- package/src/common/actions/pivot-button.d.ts +5 -8
- package/src/common/actions/pivot-button.js +188 -171
- package/src/common/base/constant.d.ts +186 -0
- package/src/common/base/constant.js +186 -0
- package/src/common/base/css-constant.d.ts +2 -0
- package/src/common/base/css-constant.js +2 -0
- package/src/common/base/enum.d.ts +11 -0
- package/src/common/base/interface.d.ts +272 -2
- package/src/common/calculatedfield/calculated-field.js +108 -93
- package/src/common/conditionalformatting/conditional-formatting.js +8 -2
- package/src/common/grouping-bar/grouping-bar.js +1 -1
- package/src/common/popups/aggregate-menu.js +57 -35
- package/src/common/popups/drillthrough-dialog.js +187 -139
- package/src/common/popups/filter-dialog.d.ts +1 -0
- package/src/common/popups/filter-dialog.js +22 -1
- package/src/common/popups/formatting-dialog.js +4 -0
- package/src/common/popups/grouping.js +2 -1
- package/src/common/popups/toolbar.js +305 -203
- package/src/pivotchart/base/pivotchart.js +36 -15
- package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
- package/src/pivotfieldlist/base/field-list.d.ts +55 -1
- package/src/pivotfieldlist/base/field-list.js +68 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
- package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.js +10 -11
- package/src/pivotview/actions/pdf-export.js +13 -6
- package/src/pivotview/actions/virtualscroll.d.ts +1 -0
- package/src/pivotview/actions/virtualscroll.js +6 -2
- package/src/pivotview/base/pivotview-model.d.ts +46 -1
- package/src/pivotview/base/pivotview.d.ts +56 -2
- package/src/pivotview/base/pivotview.js +288 -107
- package/src/pivotview/model/chartsettings-model.d.ts +2 -2
- package/src/pivotview/model/chartsettings.d.ts +2 -2
- package/src/pivotview/model/chartsettings.js +2 -2
- package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
- package/src/pivotview/model/datasourcesettings.d.ts +7 -0
- package/src/pivotview/model/datasourcesettings.js +3 -0
- package/src/pivotview/renderer/render.d.ts +2 -1
- package/src/pivotview/renderer/render.js +39 -6
- package/styles/bootstrap-dark.css +145 -118
- package/styles/bootstrap.css +145 -118
- package/styles/bootstrap4.css +144 -95
- package/styles/bootstrap5-dark.css +250 -182
- package/styles/bootstrap5.css +245 -175
- package/styles/fabric-dark.css +147 -117
- package/styles/fabric.css +145 -116
- package/styles/highcontrast-light.css +146 -116
- package/styles/highcontrast.css +148 -118
- package/styles/material-dark.css +138 -111
- package/styles/material.css +138 -111
- package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
- package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
- package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
- package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
- package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
- package/styles/pivotfieldlist/_layout.scss +199 -109
- package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_material-definition.scss +1 -4
- package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
- package/styles/pivotfieldlist/_theme.scss +213 -47
- package/styles/pivotfieldlist/bootstrap-dark.css +79 -72
- package/styles/pivotfieldlist/bootstrap.css +79 -72
- package/styles/pivotfieldlist/bootstrap4.css +74 -53
- package/styles/pivotfieldlist/bootstrap5-dark.css +145 -103
- package/styles/pivotfieldlist/bootstrap5.css +145 -103
- package/styles/pivotfieldlist/fabric-dark.css +79 -72
- package/styles/pivotfieldlist/fabric.css +79 -72
- package/styles/pivotfieldlist/highcontrast-light.css +79 -72
- package/styles/pivotfieldlist/highcontrast.css +79 -72
- package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
- package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
- package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
- package/styles/pivotfieldlist/material-dark.css +74 -67
- package/styles/pivotfieldlist/material.css +74 -67
- package/styles/pivotfieldlist/tailwind-dark.css +168 -95
- package/styles/pivotfieldlist/tailwind.css +170 -97
- package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
- package/styles/pivotview/_bootstrap-definition.scss +9 -6
- package/styles/pivotview/_bootstrap4-definition.scss +10 -7
- package/styles/pivotview/_bootstrap5-definition.scss +12 -9
- package/styles/pivotview/_fabric-dark-definition.scss +8 -5
- package/styles/pivotview/_fabric-definition.scss +7 -4
- package/styles/pivotview/_fluent-definition.scss +126 -0
- package/styles/pivotview/_highcontrast-definition.scss +8 -5
- package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
- package/styles/pivotview/_layout.scss +119 -64
- package/styles/pivotview/_material-dark-definition.scss +7 -4
- package/styles/pivotview/_material-definition.scss +8 -4
- package/styles/pivotview/_tailwind-definition.scss +8 -5
- package/styles/pivotview/_theme.scss +124 -70
- package/styles/pivotview/bootstrap-dark.css +66 -46
- package/styles/pivotview/bootstrap.css +66 -46
- package/styles/pivotview/bootstrap4.css +70 -42
- package/styles/pivotview/bootstrap5-dark.css +99 -73
- package/styles/pivotview/bootstrap5-dark.scss +0 -1
- package/styles/pivotview/bootstrap5.css +100 -72
- package/styles/pivotview/fabric-dark.css +68 -45
- package/styles/pivotview/fabric.css +66 -44
- package/styles/pivotview/highcontrast-light.css +67 -44
- package/styles/pivotview/highcontrast.css +69 -46
- package/styles/pivotview/icons/_bootstrap4.scss +1 -1
- package/styles/pivotview/icons/_bootstrap5.scss +1 -1
- package/styles/pivotview/icons/_fluent.scss +183 -0
- package/styles/pivotview/icons/_tailwind.scss +1 -1
- package/styles/pivotview/material-dark.css +64 -44
- package/styles/pivotview/material.css +64 -44
- package/styles/pivotview/tailwind-dark.css +106 -58
- package/styles/pivotview/tailwind-dark.scss +0 -1
- package/styles/pivotview/tailwind.css +107 -57
- package/styles/tailwind-dark.css +280 -159
- package/styles/tailwind.css +277 -154
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.
|
|
3
|
+
* version : 19.4.42
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-pivotview@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-pivotview@19.
|
|
3
|
+
"_id": "@syncfusion/ej2-pivotview@19.4.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Z6SpeNyVSImPCIhvmcMuE5r7XIYQ18AtXKRM07I+8x+ya2ZYOiFTi7uRIXtY2bP7IqlbKJFCuOwffzPxToetTw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-pivotview",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-pivotview",
|
|
24
24
|
"/@syncfusion/ej2-vue-pivotview"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.41.tgz",
|
|
27
|
+
"_shasum": "87ada26a09554e3d155778f1d9ebedba1b86daa7",
|
|
28
28
|
"_spec": "@syncfusion/ej2-pivotview@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,23 +35,23 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~19.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~19.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.
|
|
41
|
-
"@syncfusion/ej2-charts": "~19.
|
|
42
|
-
"@syncfusion/ej2-compression": "~19.
|
|
43
|
-
"@syncfusion/ej2-data": "~19.
|
|
44
|
-
"@syncfusion/ej2-dropdowns": "~19.
|
|
45
|
-
"@syncfusion/ej2-excel-export": "~19.
|
|
46
|
-
"@syncfusion/ej2-file-utils": "~19.
|
|
47
|
-
"@syncfusion/ej2-grids": "~19.
|
|
48
|
-
"@syncfusion/ej2-inputs": "~19.
|
|
49
|
-
"@syncfusion/ej2-lists": "~19.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~19.
|
|
51
|
-
"@syncfusion/ej2-pdf-export": "~19.
|
|
52
|
-
"@syncfusion/ej2-popups": "~19.
|
|
53
|
-
"@syncfusion/ej2-splitbuttons": "~19.
|
|
54
|
-
"@syncfusion/ej2-svg-base": "~19.
|
|
38
|
+
"@syncfusion/ej2-base": "~19.4.42",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~19.4.42",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.42",
|
|
41
|
+
"@syncfusion/ej2-charts": "~19.4.42",
|
|
42
|
+
"@syncfusion/ej2-compression": "~19.4.38",
|
|
43
|
+
"@syncfusion/ej2-data": "~19.4.42",
|
|
44
|
+
"@syncfusion/ej2-dropdowns": "~19.4.42",
|
|
45
|
+
"@syncfusion/ej2-excel-export": "~19.4.38",
|
|
46
|
+
"@syncfusion/ej2-file-utils": "~19.4.38",
|
|
47
|
+
"@syncfusion/ej2-grids": "~19.4.42",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~19.4.42",
|
|
49
|
+
"@syncfusion/ej2-lists": "~19.4.38",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~19.4.41",
|
|
51
|
+
"@syncfusion/ej2-pdf-export": "~19.4.42",
|
|
52
|
+
"@syncfusion/ej2-popups": "~19.4.41",
|
|
53
|
+
"@syncfusion/ej2-splitbuttons": "~19.4.40",
|
|
54
|
+
"@syncfusion/ej2-svg-base": "~19.4.42"
|
|
55
55
|
},
|
|
56
56
|
"deprecated": false,
|
|
57
57
|
"description": "The pivot grid, or pivot table, is used to visualize large sets of relational data in a cross-tabular format, similar to an Excel pivot table.",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
79
79
|
},
|
|
80
80
|
"typings": "index.d.ts",
|
|
81
|
-
"version": "19.
|
|
81
|
+
"version": "19.4.42",
|
|
82
82
|
"sideEffects": false
|
|
83
83
|
}
|
package/src/base/engine.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { L10n } from '@syncfusion/ej2-base';
|
|
|
3
3
|
import { DataManager } from '@syncfusion/ej2-data';
|
|
4
4
|
import { Sorting, SummaryTypes, FilterType, Operators, Condition } from './types';
|
|
5
5
|
import { DateGroup, GroupType, ProviderType, DataSourceType } from './types';
|
|
6
|
-
import { HeaderCollection } from '../common';
|
|
6
|
+
import { HeaderCollection, GrandTotalsPosition } from '../common';
|
|
7
7
|
/**
|
|
8
8
|
* PivotEngine is used to manipulate the relational or Multi-Dimensional data as pivoting values.
|
|
9
9
|
*/
|
|
@@ -56,6 +56,8 @@ export declare class PivotEngine {
|
|
|
56
56
|
/** @hidden */
|
|
57
57
|
showGrandTotals: boolean;
|
|
58
58
|
/** @hidden */
|
|
59
|
+
grandTotalsPosition: GrandTotalsPosition;
|
|
60
|
+
/** @hidden */
|
|
59
61
|
showRowGrandTotals: boolean;
|
|
60
62
|
/** @hidden */
|
|
61
63
|
showHeaderWhenEmpty: boolean;
|
|
@@ -189,6 +191,7 @@ export declare class PivotEngine {
|
|
|
189
191
|
private formatRegex;
|
|
190
192
|
private clonedReport;
|
|
191
193
|
private measureNames;
|
|
194
|
+
private currencyCode;
|
|
192
195
|
renderEngine(dataSource?: IDataOptions, customProperties?: ICustomProperties, fn?: Function): void;
|
|
193
196
|
private removeIrrelevantFields;
|
|
194
197
|
private updateDataSourceSettings;
|
|
@@ -325,6 +328,7 @@ export declare class PivotEngine {
|
|
|
325
328
|
* * `showRowSubTotals`: Allows to show or hide sub-totals in row axis of the pivot table.
|
|
326
329
|
* * `showColumnSubTotals`: Allows to show or hide sub-totals in column axis of the pivot table.
|
|
327
330
|
* * `showGrandTotals`: Allows to show or hide grand totals in both rows and columns axis of the pivot table.
|
|
331
|
+
* * `grandTotalsPosition`: Allows the grand totals to be position at first position in the row and column axis of the pivot table.
|
|
328
332
|
* * `showRowGrandTotals`: Allows to show or hide grand totals in row axis of the pivot table.
|
|
329
333
|
* * `showColumnGrandTotals`: Allows to show or hide grand totals in column axis of the pivot table.
|
|
330
334
|
* * `showHeaderWhenEmpty`: Allows the undefined headers to be displayed in the pivot table, when the specific field(s) are not defined in the raw data.
|
|
@@ -538,6 +542,10 @@ export interface IDataOptions {
|
|
|
538
542
|
* Allows to show or hide grand totals in both rows and columns axis of the pivot table.
|
|
539
543
|
*/
|
|
540
544
|
showGrandTotals?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Allows the grand totals to be position at first position in the row and column axis of the pivot table.
|
|
547
|
+
*/
|
|
548
|
+
grandTotalsPosition?: GrandTotalsPosition;
|
|
541
549
|
/**
|
|
542
550
|
* Allows to show or hide grand totals in row axis of the pivot table.
|
|
543
551
|
*/
|
|
@@ -1420,6 +1428,14 @@ export interface ICustomProperties {
|
|
|
1420
1428
|
* Specifies the current locale information of the component.
|
|
1421
1429
|
*/
|
|
1422
1430
|
localeObj?: L10n;
|
|
1431
|
+
/**
|
|
1432
|
+
* Specifies the current culture information of the component.
|
|
1433
|
+
*/
|
|
1434
|
+
globalize?: Internationalization;
|
|
1435
|
+
/**
|
|
1436
|
+
* Specifies the current currency code of the component.
|
|
1437
|
+
*/
|
|
1438
|
+
currenyCode?: string;
|
|
1423
1439
|
/**
|
|
1424
1440
|
* Specifies the customized field type information.
|
|
1425
1441
|
*/
|
package/src/base/engine.js
CHANGED
|
@@ -148,7 +148,8 @@ var PivotEngine = /** @class */ (function () {
|
|
|
148
148
|
this.isLastHeaderHasMeasures = true;
|
|
149
149
|
this.isEditing = false;
|
|
150
150
|
var fields;
|
|
151
|
-
this.globalize = new Internationalization();
|
|
151
|
+
this.globalize = (customProperties && customProperties.globalize) ? customProperties.globalize : new Internationalization();
|
|
152
|
+
this.currencyCode = (customProperties && customProperties.currenyCode) ? customProperties.currenyCode : undefined;
|
|
152
153
|
this.localeObj = customProperties ? customProperties.localeObj : undefined;
|
|
153
154
|
this.fieldsType = customProperties ? customProperties.fieldsType : {};
|
|
154
155
|
this.clonedReport = customProperties ? (customProperties.clonedReport &&
|
|
@@ -162,6 +163,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
162
163
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
163
164
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
164
165
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
166
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
165
167
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
166
168
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
167
169
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -275,6 +277,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
275
277
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
276
278
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
277
279
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
280
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
278
281
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
279
282
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
280
283
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -577,6 +580,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
577
580
|
}
|
|
578
581
|
if (!PivotUtil.getFieldByName(groupKeys[gCnt], dataFields)) {
|
|
579
582
|
groupField = groupFields[groupKeys[gCnt]];
|
|
583
|
+
caption_1 = (caption_1.indexOf(' (') !== -1 && caption_1.indexOf(')') !== -1) ? caption_1.slice(caption_1.indexOf('(') + 1, caption_1.length - 1) : caption_1;
|
|
580
584
|
var newField = {
|
|
581
585
|
name: groupKeys[gCnt],
|
|
582
586
|
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_1 + ')',
|
|
@@ -604,6 +608,8 @@ var PivotEngine = /** @class */ (function () {
|
|
|
604
608
|
}
|
|
605
609
|
}
|
|
606
610
|
gCnt = Object.keys(groupKeys).length;
|
|
611
|
+
var field = this_1.getMappingField(fieldName, this_1.clonedReport ? this_1.clonedReport.fieldMapping : this_1.fieldMapping);
|
|
612
|
+
var caption_2 = field.caption ? field.caption : fieldName;
|
|
607
613
|
while (gCnt--) {
|
|
608
614
|
groupField = groupFields[groupKeys[gCnt]];
|
|
609
615
|
for (var i = 0, len_3 = this_1.formats.length; i < len_3; i++) {
|
|
@@ -622,6 +628,33 @@ var PivotEngine = /** @class */ (function () {
|
|
|
622
628
|
};
|
|
623
629
|
this_1.formats.push(formatSettings);
|
|
624
630
|
}
|
|
631
|
+
if (!isDataSource) {
|
|
632
|
+
var mappingField = this_1.getMappingField(groupKeys[gCnt], this_1.fieldMapping);
|
|
633
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
634
|
+
var newField = {
|
|
635
|
+
name: groupKeys[gCnt],
|
|
636
|
+
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
|
|
637
|
+
};
|
|
638
|
+
this_1.fieldMapping.push(newField);
|
|
639
|
+
}
|
|
640
|
+
else if (groupKeys[gCnt] !== fieldName) {
|
|
641
|
+
mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if (!isDataSource) {
|
|
646
|
+
var mappingField = this_1.getMappingField(fieldName, this_1.fieldMapping);
|
|
647
|
+
groupField = groupFields[fieldName];
|
|
648
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
649
|
+
var newField = {
|
|
650
|
+
name: fieldName,
|
|
651
|
+
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
|
|
652
|
+
};
|
|
653
|
+
this_1.fieldMapping.push(newField);
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
|
|
657
|
+
}
|
|
625
658
|
}
|
|
626
659
|
}
|
|
627
660
|
else if (group.type === 'Number' && group.rangeInterval) {
|
|
@@ -870,7 +903,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
870
903
|
this.fieldList = this.savedFieldList;
|
|
871
904
|
while (len--) { /** while is used for better performance than for */
|
|
872
905
|
var key = keys[len];
|
|
873
|
-
var field = this.getMappingField(key);
|
|
906
|
+
var field = this.getMappingField(key, this.fieldMapping);
|
|
874
907
|
if (this.fieldList[key]) {
|
|
875
908
|
this.fieldList[key].isSelected = false;
|
|
876
909
|
this.fieldList[key].index = len;
|
|
@@ -949,7 +982,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
949
982
|
this.fieldList = {};
|
|
950
983
|
while (len--) { /** while is used for better performance than for */
|
|
951
984
|
var key = keys[len];
|
|
952
|
-
var field = this.getMappingField(key);
|
|
985
|
+
var field = this.getMappingField(key, this.fieldMapping);
|
|
953
986
|
type = (field && 'dataType' in field && field.dataType && dataTypes.indexOf(field.dataType.toLowerCase()) > -1) ?
|
|
954
987
|
field.dataType.toLowerCase() : PivotUtil.getType(fields[this.fieldKeys[key]]);
|
|
955
988
|
this.fieldList[key] = {
|
|
@@ -993,12 +1026,12 @@ var PivotEngine = /** @class */ (function () {
|
|
|
993
1026
|
}
|
|
994
1027
|
this.updateTreeViewData(dataFields);
|
|
995
1028
|
};
|
|
996
|
-
PivotEngine.prototype.getMappingField = function (key) {
|
|
1029
|
+
PivotEngine.prototype.getMappingField = function (key, fieldMapping) {
|
|
997
1030
|
var field = {};
|
|
998
|
-
if (
|
|
999
|
-
for (var index = 0, cnt =
|
|
1000
|
-
if (
|
|
1001
|
-
field =
|
|
1031
|
+
if (fieldMapping.length > 0) {
|
|
1032
|
+
for (var index = 0, cnt = fieldMapping.length; index < cnt; index++) {
|
|
1033
|
+
if (fieldMapping[index].name === key) {
|
|
1034
|
+
field = fieldMapping[index];
|
|
1002
1035
|
break;
|
|
1003
1036
|
}
|
|
1004
1037
|
}
|
|
@@ -1572,8 +1605,8 @@ var PivotEngine = /** @class */ (function () {
|
|
|
1572
1605
|
field.filter = filter;
|
|
1573
1606
|
field.filterType = type;
|
|
1574
1607
|
field.isExcelFilter = isLabelFilter;
|
|
1575
|
-
var members = (this.formatFields[name] &&
|
|
1576
|
-
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) ?
|
|
1608
|
+
var members = ((this.formatFields[name] &&
|
|
1609
|
+
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) || (name in this.groupingFields)) ?
|
|
1577
1610
|
field.formattedMembers : field.members;
|
|
1578
1611
|
var allowFil = isInclude;
|
|
1579
1612
|
var final = {};
|
|
@@ -1620,7 +1653,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
1620
1653
|
};
|
|
1621
1654
|
PivotEngine.prototype.applyValueFiltering = function (rowData, level, rows, columns, valueFilter, rowFilterData, type) {
|
|
1622
1655
|
this.isValueFiltered = false;
|
|
1623
|
-
var allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : rows[rows.length - 1]), null, true);
|
|
1656
|
+
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);
|
|
1624
1657
|
this.getFilteredData(rows, columns, valueFilter, rowFilterData, level, rowData.name, allMember, type);
|
|
1625
1658
|
if (this.isValueFiltered) {
|
|
1626
1659
|
if ((type === 'row' && this.rowGrandTotal === null) || (type === 'column' && this.columnGrandTotal === null)) {
|
|
@@ -1967,14 +2000,14 @@ var PivotEngine = /** @class */ (function () {
|
|
|
1967
2000
|
for (var i = 0; i < rLen; i++) {
|
|
1968
2001
|
if (filterElement.name === rows[i].name && valueFields[filterElement.measure] && !isAvail) {
|
|
1969
2002
|
isAvail = true;
|
|
1970
|
-
rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
|
|
2003
|
+
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');
|
|
1971
2004
|
break;
|
|
1972
2005
|
}
|
|
1973
2006
|
}
|
|
1974
2007
|
for (var j = 0; j < cLen; j++) {
|
|
1975
2008
|
if (filterElement.name === columns[j].name && valueFields[filterElement.measure] && !isAvail) {
|
|
1976
2009
|
isAvail = true;
|
|
1977
|
-
columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
|
|
2010
|
+
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');
|
|
1978
2011
|
break;
|
|
1979
2012
|
}
|
|
1980
2013
|
}
|
|
@@ -2286,7 +2319,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
2286
2319
|
}
|
|
2287
2320
|
var engine = this;
|
|
2288
2321
|
return headers.filter(function (item) {
|
|
2289
|
-
return item.members.length > 0
|
|
2322
|
+
return (item.members.length > 0 || item.type === 'grand sum') ? true : engine.matchIndexes(item.indexObject, filterObjects);
|
|
2290
2323
|
});
|
|
2291
2324
|
};
|
|
2292
2325
|
PivotEngine.prototype.matchIndexes = function (index, filterObjects) {
|
|
@@ -2366,6 +2399,14 @@ var PivotEngine = /** @class */ (function () {
|
|
|
2366
2399
|
}
|
|
2367
2400
|
/* eslint-enable */
|
|
2368
2401
|
rawHeaders = this.getSortedHeaders(rawHeaders.concat(excessHeaders), this.fieldList[headersInfo.fields[0].name].sort).concat(grandHeader);
|
|
2402
|
+
if (headersInfo.axis === 'row') {
|
|
2403
|
+
this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, this.filterMembers, 'column', '');
|
|
2404
|
+
this.insertAllMember(this.cMembers, this.filterMembers, '', 'column');
|
|
2405
|
+
}
|
|
2406
|
+
else {
|
|
2407
|
+
this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, this.filterMembers, 'row', '');
|
|
2408
|
+
this.insertAllMember(this.rMembers, this.filterMembers, '', 'row');
|
|
2409
|
+
}
|
|
2369
2410
|
}
|
|
2370
2411
|
if (headersInfo.axis === 'row') {
|
|
2371
2412
|
this.rowCount = 0;
|
|
@@ -2512,8 +2553,8 @@ var PivotEngine = /** @class */ (function () {
|
|
|
2512
2553
|
}
|
|
2513
2554
|
}
|
|
2514
2555
|
if (stringValue.length > 0) {
|
|
2515
|
-
stringValue = childrens.sort === 'Ascending' ? (stringValue.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
|
|
2516
|
-
childrens.sort === 'Descending' ? (stringValue.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) : stringValue;
|
|
2556
|
+
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)); })) :
|
|
2557
|
+
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;
|
|
2517
2558
|
}
|
|
2518
2559
|
if (alphaNumbervalue.length > 0) {
|
|
2519
2560
|
alphaNumbervalue = childrens.sort === 'Ascending' ?
|
|
@@ -2526,9 +2567,9 @@ var PivotEngine = /** @class */ (function () {
|
|
|
2526
2567
|
}
|
|
2527
2568
|
else {
|
|
2528
2569
|
return sortOrder === 'Ascending' ?
|
|
2529
|
-
(headers.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
|
|
2570
|
+
(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)); })) :
|
|
2530
2571
|
sortOrder === 'Descending' ?
|
|
2531
|
-
(headers.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) :
|
|
2572
|
+
(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)); })) :
|
|
2532
2573
|
headers;
|
|
2533
2574
|
}
|
|
2534
2575
|
}
|
|
@@ -2548,7 +2589,8 @@ var PivotEngine = /** @class */ (function () {
|
|
|
2548
2589
|
this.valueSortHeaderText = undefined;
|
|
2549
2590
|
if (this.enableValueSorting && this.valueSortSettings.headerText && !this.valueSortHeaderText &&
|
|
2550
2591
|
this.valueSortSettings.headerText !== '' && this.values.length > 0) {
|
|
2551
|
-
|
|
2592
|
+
this.valueSortHeaderText = this.valueSortSettings.headerText;
|
|
2593
|
+
var textArray = this.valueSortHeaderText.split(this.valueSortSettings.headerDelimiter);
|
|
2552
2594
|
for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
|
|
2553
2595
|
var field = _a[_i];
|
|
2554
2596
|
var name_1 = field.caption ? field.caption : field.name;
|
|
@@ -3340,7 +3382,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
3340
3382
|
PivotEngine.prototype.insertAllMember = function (set, filter, customText, axis) {
|
|
3341
3383
|
var len = set.length;
|
|
3342
3384
|
customText = ' Total';
|
|
3343
|
-
|
|
3385
|
+
var grandTotalSet = {
|
|
3344
3386
|
hasChild: false,
|
|
3345
3387
|
index: filter,
|
|
3346
3388
|
level: 0,
|
|
@@ -3354,13 +3396,14 @@ var PivotEngine = /** @class */ (function () {
|
|
|
3354
3396
|
type: 'grand sum',
|
|
3355
3397
|
valueSort: {}
|
|
3356
3398
|
};
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3399
|
+
grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
|
|
3400
|
+
grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
|
|
3401
|
+
grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
|
|
3402
|
+
grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
|
|
3361
3403
|
for (var ln = 0, lt = filter.length; ln < lt; ln++) {
|
|
3362
|
-
|
|
3404
|
+
grandTotalSet.indexObject[filter[ln]] = filter[ln];
|
|
3363
3405
|
}
|
|
3406
|
+
(this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
|
|
3364
3407
|
// if (axis === 'row') {
|
|
3365
3408
|
// this.rowCount += this.rowValuesLength;
|
|
3366
3409
|
// } else {
|
|
@@ -3408,7 +3451,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
3408
3451
|
for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
3409
3452
|
if (!isValueIndexFound) {
|
|
3410
3453
|
for (vln = 0; vln < vlt; vln++) {
|
|
3411
|
-
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().
|
|
3454
|
+
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
3412
3455
|
isValueIndexFound = true;
|
|
3413
3456
|
isValueCellUpdated = true;
|
|
3414
3457
|
break;
|
|
@@ -3443,7 +3486,7 @@ var PivotEngine = /** @class */ (function () {
|
|
|
3443
3486
|
for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
3444
3487
|
for (var vln = 0; vln < vlt; vln++) {
|
|
3445
3488
|
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
3446
|
-
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().
|
|
3489
|
+
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
3447
3490
|
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
3448
3491
|
dln = data[tnum].length;
|
|
3449
3492
|
}
|
|
@@ -4400,6 +4443,10 @@ var PivotEngine = /** @class */ (function () {
|
|
|
4400
4443
|
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
4401
4444
|
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
|
|
4402
4445
|
}
|
|
4446
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
4447
|
+
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(0, 1), vcnt, -1);
|
|
4448
|
+
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(1, axis.length), vcnt, 0);
|
|
4449
|
+
}
|
|
4403
4450
|
else {
|
|
4404
4451
|
var hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
|
|
4405
4452
|
this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
|
|
@@ -4440,6 +4487,10 @@ var PivotEngine = /** @class */ (function () {
|
|
|
4440
4487
|
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
|
|
4441
4488
|
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
|
|
4442
4489
|
}
|
|
4490
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
4491
|
+
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(0, 1), this.values.length, -1);
|
|
4492
|
+
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(1, this.rMembers.length), this.values.length, 0);
|
|
4493
|
+
}
|
|
4443
4494
|
else {
|
|
4444
4495
|
var hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
|
|
4445
4496
|
this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPivotValues } from './engine';
|
|
2
|
+
/**
|
|
3
|
+
* This is a file to perform common utility for OLAP and Relational datasource
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export declare class PivotExportUtil {
|
|
7
|
+
private static getDefinedObj;
|
|
8
|
+
static getClonedPivotValues(pivotValues: IPivotValues): IPivotValues;
|
|
9
|
+
private static getClonedPivotValueObj;
|
|
10
|
+
static isContainCommonElements(collection1: Object[], collection2: Object[]): boolean;
|
|
11
|
+
static formatPdfHeaderFooter(pdf: any): any;
|
|
12
|
+
static formatPdfExportProperties(pdf: any): any;
|
|
13
|
+
static formatExcelStyle(style: any): any;
|
|
14
|
+
static formatExcelCell(cell: any): any;
|
|
15
|
+
static formatExcelHeaderFooter(excel: any): any;
|
|
16
|
+
static formatExcelExportProperties(excel: any): any;
|
|
17
|
+
}
|