@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.
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 +40 -27
  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 +2052 -1101
  8. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  9. package/dist/es6/ej2-pivotview.es5.js +2068 -1111
  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 +78 -27
  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 +10 -11
  50. package/src/pivotview/actions/pdf-export.js +13 -6
  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 +288 -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 +145 -118
  65. package/styles/bootstrap.css +145 -118
  66. package/styles/bootstrap4.css +144 -95
  67. package/styles/bootstrap5-dark.css +250 -182
  68. package/styles/bootstrap5.css +245 -175
  69. package/styles/fabric-dark.css +147 -117
  70. package/styles/fabric.css +145 -116
  71. package/styles/highcontrast-light.css +146 -116
  72. package/styles/highcontrast.css +148 -118
  73. package/styles/material-dark.css +138 -111
  74. package/styles/material.css +138 -111
  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 +213 -47
  89. package/styles/pivotfieldlist/bootstrap-dark.css +79 -72
  90. package/styles/pivotfieldlist/bootstrap.css +79 -72
  91. package/styles/pivotfieldlist/bootstrap4.css +74 -53
  92. package/styles/pivotfieldlist/bootstrap5-dark.css +145 -103
  93. package/styles/pivotfieldlist/bootstrap5.css +145 -103
  94. package/styles/pivotfieldlist/fabric-dark.css +79 -72
  95. package/styles/pivotfieldlist/fabric.css +79 -72
  96. package/styles/pivotfieldlist/highcontrast-light.css +79 -72
  97. package/styles/pivotfieldlist/highcontrast.css +79 -72
  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 +74 -67
  102. package/styles/pivotfieldlist/material.css +74 -67
  103. package/styles/pivotfieldlist/tailwind-dark.css +168 -95
  104. package/styles/pivotfieldlist/tailwind.css +170 -97
  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 +280 -159
  139. package/styles/tailwind.css +277 -154
package/src/base/util.js CHANGED
@@ -51,41 +51,6 @@ var PivotUtil = /** @class */ (function () {
51
51
  }
52
52
  return clonedData;
53
53
  };
54
- PivotUtil.getClonedPivotValues = function (pivotValues) {
55
- var clonedSets = [];
56
- for (var i = 0; i < pivotValues.length; i++) {
57
- if (pivotValues[i]) {
58
- clonedSets[i] = [];
59
- for (var j = 0; j < pivotValues[i].length; j++) {
60
- if (pivotValues[i][j]) {
61
- /* eslint-disable */
62
- clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
63
- /* eslint-enable */
64
- }
65
- }
66
- }
67
- }
68
- return clonedSets;
69
- };
70
- /* eslint-disable */
71
- PivotUtil.getClonedPivotValueObj = function (data) {
72
- /* eslint-enable */
73
- var keyPos = 0;
74
- /* eslint-disable @typescript-eslint/no-explicit-any */
75
- var framedSet = {};
76
- /* eslint-enable @typescript-eslint/no-explicit-any */
77
- if (!(data === null || data === undefined)) {
78
- var fields = Object.keys(data);
79
- while (keyPos < fields.length) {
80
- framedSet[fields[keyPos]] = data[fields[keyPos]];
81
- keyPos++;
82
- }
83
- }
84
- else {
85
- framedSet = data;
86
- }
87
- return framedSet;
88
- };
89
54
  /* eslint-disable @typescript-eslint/no-explicit-any */
90
55
  PivotUtil.getDefinedObj = function (data) {
91
56
  var keyPos = 0;
@@ -118,18 +83,6 @@ var PivotUtil = /** @class */ (function () {
118
83
  return -1;
119
84
  };
120
85
  /* eslint-disable */
121
- PivotUtil.isContainCommonElements = function (collection1, collection2) {
122
- /* eslint-enable */
123
- for (var i = 0, cnt = collection1.length; i < cnt; i++) {
124
- for (var j = 0, lnt = collection2.length; j < lnt; j++) {
125
- if (collection2[j] === collection1[i]) {
126
- return true;
127
- }
128
- }
129
- }
130
- return false;
131
- };
132
- /* eslint-disable */
133
86
  PivotUtil.setPivotProperties = function (control, properties) {
134
87
  /* eslint-enable */
135
88
  control.allowServerDataBinding = false;
@@ -166,6 +119,7 @@ var PivotUtil = /** @class */ (function () {
166
119
  drilledMembers: this.cloneDrillMemberSettings(dataSourceSettings.drilledMembers),
167
120
  valueSortSettings: this.CloneValueSortObject(dataSourceSettings.valueSortSettings),
168
121
  valueAxis: dataSourceSettings.valueAxis,
122
+ grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
169
123
  formatSettings: this.cloneFormatSettings(dataSourceSettings.formatSettings),
170
124
  calculatedFieldSettings: this.cloneCalculatedFieldSettings(dataSourceSettings.calculatedFieldSettings),
171
125
  fieldMapping: this.cloneFieldSettings(dataSourceSettings.fieldMapping),
@@ -212,6 +166,7 @@ var PivotUtil = /** @class */ (function () {
212
166
  drilledMembers: dataSourceSettings.drilledMembers,
213
167
  valueSortSettings: dataSourceSettings.valueSortSettings,
214
168
  valueAxis: dataSourceSettings.valueAxis,
169
+ grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
215
170
  formatSettings: dataSourceSettings.formatSettings,
216
171
  calculatedFieldSettings: dataSourceSettings.calculatedFieldSettings,
217
172
  fieldMapping: dataSourceSettings.fieldMapping,
@@ -633,174 +588,6 @@ var PivotUtil = /** @class */ (function () {
633
588
  return values;
634
589
  };
635
590
  /* eslint-disable */
636
- PivotUtil.formatPdfHeaderFooter = function (pdf) {
637
- var contents = [];
638
- if (!isNullOrUndefined(pdf)) {
639
- for (var i = 0; i < pdf.length; i++) {
640
- var a = pdf[i];
641
- var content = {
642
- /* eslint-enable */
643
- type: a.Type,
644
- pageNumberType: a.PageNumberType,
645
- style: a.Style ? {
646
- penColor: a.Style.PenColor,
647
- penSize: a.Style.PenSize,
648
- dashStyle: a.Style.DashStyle,
649
- textBrushColor: a.Style.TextBrushColor,
650
- textPenColor: a.Style.TextPenColor,
651
- fontSize: a.Style.FontSize,
652
- hAlign: a.Style.HAlign,
653
- vAlign: a.Style.VAlign
654
- } : a.Style,
655
- points: a.Points !== null ? {
656
- x1: a.Points.X1,
657
- y1: a.Points.Y1,
658
- x2: a.Points.X2,
659
- y2: a.Points.Y2
660
- } : null,
661
- format: a.Format,
662
- position: a.Position !== null ? {
663
- x: a.Position.X,
664
- y: a.Position.Y
665
- } : null,
666
- size: a.Size !== null ? {
667
- height: a.Size.Height,
668
- width: a.Size.Width
669
- } : null,
670
- src: a.Src,
671
- value: a.Value,
672
- font: a.Font
673
- };
674
- contents.push(content);
675
- }
676
- }
677
- return contents;
678
- };
679
- /* eslint-disable */
680
- PivotUtil.formatPdfExportProperties = function (pdf) {
681
- var values;
682
- /* eslint-enable */
683
- values = this.getDefinedObj({
684
- pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
685
- pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
686
- header: !isNullOrUndefined(pdf.Header) ? {
687
- fromTop: pdf.Header.FromTop,
688
- height: pdf.Header.Height,
689
- contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
690
- } : null,
691
- columns: pdf.Columns,
692
- footer: !isNullOrUndefined(pdf.Footer) ? {
693
- fromTop: pdf.Footer.FromBottom,
694
- height: pdf.Footer.Height,
695
- contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
696
- } : null,
697
- includeHiddenColumn: pdf.IncludeHiddenColumn,
698
- dataSource: pdf.DataSource,
699
- exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
700
- theme: !isNullOrUndefined(pdf.Theme) ? {
701
- header: pdf.Theme.Header,
702
- record: pdf.Theme.Record,
703
- caption: pdf.Theme.Caption
704
- } : null,
705
- fileName: pdf.FileName,
706
- hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
707
- allowHorizontalOverflow: pdf.AllowHorizontalOverflow
708
- });
709
- return values;
710
- };
711
- /* eslint-disable */
712
- PivotUtil.formatExcelStyle = function (style) {
713
- var prop;
714
- /* eslint-enable */
715
- if (!isNullOrUndefined(style)) {
716
- prop = this.getDefinedObj({
717
- fontColor: style.FontColor,
718
- fontName: style.FontName,
719
- fontSize: style.FontSize,
720
- hAlign: style.HAlign === String ? style.HAlign : null,
721
- vAlign: style.VAlign === String ? style.VAlign : null,
722
- bold: style.Bold,
723
- indent: style.Indent,
724
- italic: style.Italic,
725
- underline: style.Underline,
726
- backColor: style.BackColor,
727
- wrapText: style.WrapText,
728
- borders: style.Borders,
729
- numberFormat: style.NumberFormat,
730
- type: style.Type
731
- });
732
- }
733
- return prop;
734
- };
735
- /* eslint-disable */
736
- PivotUtil.formatExcelCell = function (cell) {
737
- var cells = [];
738
- if (!isNullOrUndefined(cell)) {
739
- for (var i = 0; i < cell.length; i++) {
740
- this.getDefinedObj({
741
- index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
742
- colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
743
- value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
744
- hyperlink: {
745
- target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
746
- displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
747
- },
748
- styles: this.formatExcelStyle(cell[i].Style),
749
- rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
750
- });
751
- /* eslint-enable */
752
- }
753
- }
754
- return cells;
755
- };
756
- /* eslint-disable */
757
- PivotUtil.formatExcelHeaderFooter = function (excel) {
758
- var rows = [];
759
- if (!isNullOrUndefined(excel)) {
760
- for (var i = 0; i < excel.Rows.length; i++) {
761
- var row = excel.Rows[i];
762
- var prop = this.getDefinedObj({
763
- index: !isNullOrUndefined(row.Index) ? row.Index : null,
764
- cells: this.formatExcelCell(row.Cells),
765
- grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
766
- });
767
- rows.push(prop);
768
- }
769
- }
770
- return rows;
771
- };
772
- PivotUtil.formatExcelExportProperties = function (excel) {
773
- /* eslint-enable */
774
- var prop;
775
- prop = this.getDefinedObj({
776
- dataSource: excel.DataSource,
777
- query: excel.Query,
778
- multipleExport: this.getDefinedObj({
779
- type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
780
- blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
781
- }),
782
- header: this.getDefinedObj({
783
- headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
784
- rows: this.formatExcelHeaderFooter(excel.Header)
785
- }),
786
- footer: this.getDefinedObj({
787
- footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
788
- rows: this.formatExcelHeaderFooter(excel.Footer)
789
- }),
790
- columns: excel.Columns,
791
- exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
792
- includeHiddenColumn: excel.IncludeHiddenColumn,
793
- theme: !isNullOrUndefined(excel.Theme) ? {
794
- header: this.formatExcelStyle(excel.Theme.Header),
795
- record: this.formatExcelStyle(excel.Theme.Record),
796
- caption: this.formatExcelStyle(excel.Theme.Caption)
797
- } : undefined,
798
- fileName: excel.FileName,
799
- hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
800
- });
801
- return prop;
802
- };
803
- /* eslint-disable */
804
591
  PivotUtil.formatFieldList = function (fieldList) {
805
592
  var keys = Object.keys(fieldList);
806
593
  var fList = {};
@@ -92,7 +92,7 @@ var FieldList = /** @class */ (function () {
92
92
  FieldList.prototype.update = function () {
93
93
  var currentWidth;
94
94
  if (this.parent.currentView !== 'Table') {
95
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
95
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
96
96
  }
97
97
  else {
98
98
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
@@ -1,7 +1,7 @@
1
1
  import { PivotView } from '../../pivotview/base/pivotview';
2
2
  import { PivotFieldList } from '../../pivotfieldlist/base/field-list';
3
3
  import { IAction } from '../../common/base/interface';
4
- import { TreeView, NodeCheckEventArgs } from '@syncfusion/ej2-navigations';
4
+ import { NodeCheckEventArgs } from '@syncfusion/ej2-navigations';
5
5
  import { AggregateMenu } from '../popups/aggregate-menu';
6
6
  import { AxisFieldRenderer } from '../../pivotfieldlist/renderer/axis-field-renderer';
7
7
  /**
@@ -10,19 +10,18 @@ import { AxisFieldRenderer } from '../../pivotfieldlist/renderer/axis-field-rend
10
10
  /** @hidden */
11
11
  export declare class PivotButton implements IAction {
12
12
  parent: PivotView | PivotFieldList;
13
- private parentElement;
14
- private dialogPopUp;
13
+ /** @hidden */
14
+ parentElement: HTMLElement;
15
15
  private draggable;
16
16
  private handlers;
17
17
  menuOption: AggregateMenu;
18
18
  axisField: AxisFieldRenderer;
19
- private fieldName;
19
+ /** @hidden */
20
+ fieldName: string;
20
21
  private valueFiedDropDownList;
21
22
  private columnFieldDropDownList;
22
23
  private index;
23
24
  /** @hidden */
24
- memberTreeView: TreeView;
25
- /** @hidden */
26
25
  isDestroyed: boolean;
27
26
  /**
28
27
  * Constructor for render module.
@@ -58,8 +57,6 @@ export declare class PivotButton implements IAction {
58
57
  private tabSelect;
59
58
  private updateDialogButtonEvents;
60
59
  private updateCustomFilter;
61
- private removeFilterDialog;
62
- private setFocus;
63
60
  private ClearFilter;
64
61
  private removeButton;
65
62
  /** @hidden */