@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
@@ -2529,7 +2529,7 @@ export interface PivotAxisModel {
2529
2529
 
2530
2530
  /**
2531
2531
  * Allows to scale the axis by this value. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1.
2532
- * @default null
2532
+ * @default 1
2533
2533
  */
2534
2534
  zoomFactor?: number;
2535
2535
 
@@ -2567,7 +2567,7 @@ export interface PivotAxisModel {
2567
2567
  * * Shift: Shifts the edge labels.
2568
2568
  * * None: No action will be performed.
2569
2569
  * * Hide: Edge label will be hidden.
2570
- * @default 'None'
2570
+ * @default 'Shift'
2571
2571
  */
2572
2572
  edgeLabelPlacement?: EdgeLabelPlacement;
2573
2573
 
@@ -2142,7 +2142,7 @@ export declare class PivotAxis extends ChildProperty<PivotAxis> {
2142
2142
  title: string;
2143
2143
  /**
2144
2144
  * Allows to scale the axis by this value. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1.
2145
- * @default null
2145
+ * @default 1
2146
2146
  */
2147
2147
  zoomFactor: number;
2148
2148
  /**
@@ -2174,7 +2174,7 @@ export declare class PivotAxis extends ChildProperty<PivotAxis> {
2174
2174
  * * Shift: Shifts the edge labels.
2175
2175
  * * None: No action will be performed.
2176
2176
  * * Hide: Edge label will be hidden.
2177
- * @default 'None'
2177
+ * @default 'Shift'
2178
2178
  */
2179
2179
  edgeLabelPlacement: EdgeLabelPlacement;
2180
2180
  /**
@@ -1558,7 +1558,7 @@ var PivotAxis = /** @class */ (function (_super) {
1558
1558
  Property('')
1559
1559
  ], PivotAxis.prototype, "title", void 0);
1560
1560
  __decorate([
1561
- Property(null)
1561
+ Property(1)
1562
1562
  ], PivotAxis.prototype, "zoomFactor", void 0);
1563
1563
  __decorate([
1564
1564
  Complex({}, CrosshairTooltip)
@@ -1576,7 +1576,7 @@ var PivotAxis = /** @class */ (function (_super) {
1576
1576
  Property(0)
1577
1577
  ], PivotAxis.prototype, "plotOffset", void 0);
1578
1578
  __decorate([
1579
- Property('None')
1579
+ Property('Shift')
1580
1580
  ], PivotAxis.prototype, "edgeLabelPlacement", void 0);
1581
1581
  __decorate([
1582
1582
  Property('BetweenTicks')
@@ -1,4 +1,4 @@
1
- import { Property, Complex, Collection, ChildProperty, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import { IDataSet, IDataOptions, IFieldOptions, IFilter, ISort, ICalculatedFieldSettings } from '../../base/engine';import { IDrillOptions, IValueSortSettings, IFormatSettings, IConditionalFormatSettings, IGroupSettings } from '../../base/engine';import { SummaryTypes, Sorting, FilterType, Operators, Condition, DateGroup, GroupType, ProviderType, RenderMode } from '../../base/types';import { DataSourceType } from '../../base/types';import { IStyle, ICustomGroups, IAuthenticationInfo } from '../../base/engine';import { DataManager } from '@syncfusion/ej2-data';
1
+ import { Property, Complex, Collection, ChildProperty, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import { IDataSet, IDataOptions, IFieldOptions, IFilter, ISort, ICalculatedFieldSettings } from '../../base/engine';import { IDrillOptions, IValueSortSettings, IFormatSettings, IConditionalFormatSettings, IGroupSettings } from '../../base/engine';import { SummaryTypes, Sorting, FilterType, Operators, Condition, DateGroup, GroupType, ProviderType, RenderMode } from '../../base/types';import { DataSourceType } from '../../base/types';import { IStyle, ICustomGroups, IAuthenticationInfo } from '../../base/engine';import { DataManager } from '@syncfusion/ej2-data';import { GrandTotalsPosition } from '../../common/base/enum';
2
2
 
3
3
  /**
4
4
  * Interface for a class FieldOptions
@@ -821,6 +821,13 @@ export interface DataSourceSettingsModel {
821
821
  */
822
822
  showGrandTotals?: boolean;
823
823
 
824
+ /**
825
+ * Allows the grand totals to be displayed at the top or bottom of the pivot table's row and column axes.
826
+ * > By default, the grand totals are displayed at the bottom of the pivot table's row and column axes.
827
+ * @default Bottom
828
+ */
829
+ grandTotalsPosition?: GrandTotalsPosition;
830
+
824
831
  /**
825
832
  * Allows to show or hide grand totals in row axis of the pivot table.
826
833
  * @default true
@@ -8,6 +8,7 @@ import { FieldOptionsModel, FilterModel, SortModel, FormatSettingsModel, GroupSe
8
8
  import { DrillOptionsModel, ValueSortSettingsModel, CalculatedFieldSettingsModel } from './datasourcesettings-model';
9
9
  import { DataManager } from '@syncfusion/ej2-data';
10
10
  import { ConditionalFormatSettingsModel, AuthenticationModel } from './datasourcesettings-model';
11
+ import { GrandTotalsPosition } from '../../common/base/enum';
11
12
  /**
12
13
  * Allows specific fields associated with field information that needs to be displayed in the field axes of pivot table. The following configurations which are applicable are as follows:
13
14
  * * `name`: Allows you to set the field name that needs to be displayed in row/column/value/filter axis of pivot table.
@@ -808,6 +809,12 @@ export declare class DataSourceSettings extends ChildProperty<DataSourceSettings
808
809
  * @default true
809
810
  */
810
811
  showGrandTotals: boolean;
812
+ /**
813
+ * Allows the grand totals to be displayed at the top or bottom of the pivot table's row and column axes.
814
+ * > By default, the grand totals are displayed at the bottom of the pivot table's row and column axes.
815
+ * @default Bottom
816
+ */
817
+ grandTotalsPosition: GrandTotalsPosition;
811
818
  /**
812
819
  * Allows to show or hide grand totals in row axis of the pivot table.
813
820
  * @default true
@@ -573,6 +573,9 @@ var DataSourceSettings = /** @class */ (function (_super) {
573
573
  __decorate([
574
574
  Property(true)
575
575
  ], DataSourceSettings.prototype, "showGrandTotals", void 0);
576
+ __decorate([
577
+ Property('Bottom')
578
+ ], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
576
579
  __decorate([
577
580
  Property(true)
578
581
  ], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
@@ -48,7 +48,8 @@ export declare class Render {
48
48
  */
49
49
  constructor(parent: PivotView);
50
50
  /** @hidden */
51
- render(): void;
51
+ render(refreshRequired?: boolean): void;
52
+ private initProperties;
52
53
  private refreshHeader;
53
54
  /** @hidden */
54
55
  bindGrid(parent: PivotView, isEmpty: boolean): void;
@@ -32,13 +32,16 @@ var Render = /** @class */ (function () {
32
32
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
33
33
  (this.parent.isAdaptive ? 140 : 200);
34
34
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
35
- this.gridSettings = parent.gridSettings;
35
+ this.gridSettings = this.parent.gridSettings;
36
36
  this.formatList = this.getFormatList();
37
37
  this.aggMenu = new AggregateMenu(this.parent);
38
38
  }
39
39
  /* eslint-disable-next-line */
40
40
  /** @hidden */
41
- Render.prototype.render = function () {
41
+ Render.prototype.render = function (refreshRequired) {
42
+ if (refreshRequired) {
43
+ this.initProperties();
44
+ }
42
45
  this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
43
46
  (this.parent.isAdaptive ? 140 : 200);
44
47
  this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
@@ -102,6 +105,30 @@ var Render = /** @class */ (function () {
102
105
  }
103
106
  this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
104
107
  };
108
+ Render.prototype.initProperties = function () {
109
+ this.rowStartPos = undefined;
110
+ this.maxIndent = undefined;
111
+ this.resColWidth = undefined;
112
+ this.isOverflows = undefined;
113
+ this.indentCollection = {};
114
+ this.formatList = undefined;
115
+ this.colPos = 0;
116
+ this.colGrandPos = undefined;
117
+ this.rowGrandPos = undefined;
118
+ this.lastSpan = 0;
119
+ this.field = undefined;
120
+ this.fieldCaption = undefined;
121
+ this.lvlCollection = {};
122
+ this.hierarchyCollection = {};
123
+ this.lvlPosCollection = {};
124
+ this.hierarchyPosCollection = {};
125
+ this.position = 0;
126
+ this.measurePos = 0;
127
+ this.maxMeasurePos = 0;
128
+ this.hierarchyCount = 0;
129
+ this.actualText = '';
130
+ this.timeOutObj = undefined;
131
+ };
105
132
  Render.prototype.refreshHeader = function () {
106
133
  if (this.parent.enableVirtualization) {
107
134
  var mHdr = this.parent.element.querySelector('.' + cls.MOVABLEHEADER_DIV);
@@ -303,9 +330,9 @@ var Render = /** @class */ (function () {
303
330
  this.parent.renderReactTemplates(); /* eslint-disable-line */
304
331
  }
305
332
  if (this.parent.isInitial) {
333
+ this.parent.isInitial = false;
306
334
  this.parent.refreshData();
307
335
  }
308
- this.parent.isInitial = false;
309
336
  this.parent.notify(events.contentReady, {});
310
337
  };
311
338
  Render.prototype.setFocusOnLastCell = function () {
@@ -1121,7 +1148,7 @@ var Render = /** @class */ (function () {
1121
1148
  if (cell.isSum) {
1122
1149
  tCell.classList.add(cls.SUMMARY);
1123
1150
  }
1124
- var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && this.parent.dataSourceSettings.valueAxis === 'column' && this.parent.dataType === 'olap' &&
1151
+ var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
1125
1152
  ((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
1126
1153
  if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
1127
1154
  tCell.classList.add('e-gtot');
@@ -1264,6 +1291,12 @@ var Render = /** @class */ (function () {
1264
1291
  }
1265
1292
  lvlPos++;
1266
1293
  }
1294
+ if (this.parent.dataSourceSettings.grandTotalsPosition === 'Top' && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'row') && this.parent.dataType === 'olap' &&
1295
+ (cell.valueSort.levelName.toString()).indexOf(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) === 0) {
1296
+ tCell.appendChild(createElement('span', {
1297
+ className: cls.NEXTSPAN,
1298
+ }));
1299
+ }
1267
1300
  if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
1268
1301
  tCell.appendChild(createElement('span', {
1269
1302
  className: cls.NEXTSPAN,
@@ -1577,8 +1610,8 @@ var Render = /** @class */ (function () {
1577
1610
  if (this.parent.currentView !== 'Chart') {
1578
1611
  if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + cls.GRID_HEADER)) {
1579
1612
  var rowColHeight = this.parent.element.querySelector('.' + cls.GRID_HEADER).offsetHeight;
1580
- var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + cls.GROUPING_BAR_CLASS) ?
1581
- this.parent.element.querySelector('.' + cls.GROUPING_BAR_CLASS).offsetHeight : 0);
1613
+ var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + cls.GRID_GROUPING_BAR_CLASS) ?
1614
+ this.parent.element.querySelector('.' + cls.GRID_GROUPING_BAR_CLASS).offsetHeight : 0);
1582
1615
  var toolBarHeight = this.parent.element.querySelector('.' + cls.GRID_TOOLBAR) ? 42 : 0;
1583
1616
  gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
1584
1617
  gridHeight = gridHeight < 40 ? 40 : gridHeight;