@syncfusion/ej2-pivotview 19.3.53 → 19.4.40

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 (137) 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 +31 -25
  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 +2076 -1100
  8. package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
  9. package/dist/es6/ej2-pivotview.es5.js +2092 -1110
  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/base/pivotview-model.d.ts +46 -1
  52. package/src/pivotview/base/pivotview.d.ts +56 -2
  53. package/src/pivotview/base/pivotview.js +311 -107
  54. package/src/pivotview/model/chartsettings-model.d.ts +2 -2
  55. package/src/pivotview/model/chartsettings.d.ts +2 -2
  56. package/src/pivotview/model/chartsettings.js +2 -2
  57. package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
  58. package/src/pivotview/model/datasourcesettings.d.ts +7 -0
  59. package/src/pivotview/model/datasourcesettings.js +3 -0
  60. package/src/pivotview/renderer/render.d.ts +2 -1
  61. package/src/pivotview/renderer/render.js +52 -11
  62. package/styles/bootstrap-dark.css +115 -104
  63. package/styles/bootstrap.css +115 -104
  64. package/styles/bootstrap4.css +114 -81
  65. package/styles/bootstrap5-dark.css +220 -168
  66. package/styles/bootstrap5.css +215 -161
  67. package/styles/fabric-dark.css +117 -103
  68. package/styles/fabric.css +115 -102
  69. package/styles/highcontrast-light.css +116 -102
  70. package/styles/highcontrast.css +118 -104
  71. package/styles/material-dark.css +108 -97
  72. package/styles/material.css +108 -97
  73. package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
  74. package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
  75. package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
  76. package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
  77. package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
  78. package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
  79. package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
  80. package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
  81. package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
  82. package/styles/pivotfieldlist/_layout.scss +199 -109
  83. package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
  84. package/styles/pivotfieldlist/_material-definition.scss +1 -4
  85. package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
  86. package/styles/pivotfieldlist/_theme.scss +185 -35
  87. package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
  88. package/styles/pivotfieldlist/bootstrap.css +49 -58
  89. package/styles/pivotfieldlist/bootstrap4.css +44 -39
  90. package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
  91. package/styles/pivotfieldlist/bootstrap5.css +115 -89
  92. package/styles/pivotfieldlist/fabric-dark.css +49 -58
  93. package/styles/pivotfieldlist/fabric.css +49 -58
  94. package/styles/pivotfieldlist/highcontrast-light.css +49 -58
  95. package/styles/pivotfieldlist/highcontrast.css +49 -58
  96. package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
  97. package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
  98. package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
  99. package/styles/pivotfieldlist/material-dark.css +44 -53
  100. package/styles/pivotfieldlist/material.css +44 -53
  101. package/styles/pivotfieldlist/tailwind-dark.css +138 -81
  102. package/styles/pivotfieldlist/tailwind.css +140 -83
  103. package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
  104. package/styles/pivotview/_bootstrap-definition.scss +9 -6
  105. package/styles/pivotview/_bootstrap4-definition.scss +10 -7
  106. package/styles/pivotview/_bootstrap5-definition.scss +12 -9
  107. package/styles/pivotview/_fabric-dark-definition.scss +8 -5
  108. package/styles/pivotview/_fabric-definition.scss +7 -4
  109. package/styles/pivotview/_fluent-definition.scss +126 -0
  110. package/styles/pivotview/_highcontrast-definition.scss +8 -5
  111. package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
  112. package/styles/pivotview/_layout.scss +119 -64
  113. package/styles/pivotview/_material-dark-definition.scss +7 -4
  114. package/styles/pivotview/_material-definition.scss +8 -4
  115. package/styles/pivotview/_tailwind-definition.scss +8 -5
  116. package/styles/pivotview/_theme.scss +124 -70
  117. package/styles/pivotview/bootstrap-dark.css +66 -46
  118. package/styles/pivotview/bootstrap.css +66 -46
  119. package/styles/pivotview/bootstrap4.css +70 -42
  120. package/styles/pivotview/bootstrap5-dark.css +99 -73
  121. package/styles/pivotview/bootstrap5-dark.scss +0 -1
  122. package/styles/pivotview/bootstrap5.css +100 -72
  123. package/styles/pivotview/fabric-dark.css +68 -45
  124. package/styles/pivotview/fabric.css +66 -44
  125. package/styles/pivotview/highcontrast-light.css +67 -44
  126. package/styles/pivotview/highcontrast.css +69 -46
  127. package/styles/pivotview/icons/_bootstrap4.scss +1 -1
  128. package/styles/pivotview/icons/_bootstrap5.scss +1 -1
  129. package/styles/pivotview/icons/_fluent.scss +183 -0
  130. package/styles/pivotview/icons/_tailwind.scss +1 -1
  131. package/styles/pivotview/material-dark.css +64 -44
  132. package/styles/pivotview/material.css +64 -44
  133. package/styles/pivotview/tailwind-dark.css +106 -58
  134. package/styles/pivotview/tailwind-dark.scss +0 -1
  135. package/styles/pivotview/tailwind.css +107 -57
  136. package/styles/tailwind-dark.css +250 -145
  137. package/styles/tailwind.css +247 -140
@@ -1,4 +1,4 @@
1
- import { IPivotValues, IDataOptions, PivotEngine, IFieldListOptions, IFieldOptions, IAxisSet, IDataSet, ISort } from '../../base/engine';
1
+ import { IPivotValues, IDataOptions, PivotEngine, IFieldListOptions, IFieldOptions, IAxisSet, IDataSet, ISort, IDrillOptions, FieldItemInfo, IConditionalFormatSettings, IValueSortSettings } from '../../base/engine';
2
2
  import { IDrilledItem, IStringIndex, ICalculatedFields, ICalculatedFieldSettings, IFormatSettings } from '../../base/engine';
3
3
  import { IFilter } from '../../base/engine';
4
4
  import { Mode, SelectionMode, PdfBorderStyle, AggregateTypes } from '../base/enum';
@@ -10,8 +10,10 @@ import { PdfStandardFont, PdfTrueTypeFont, PdfGridCell, PdfPageOrientation } fro
10
10
  import { SeriesModel, ExportType, Axis, FontModel, Alignment } from '@syncfusion/ej2-charts';
11
11
  import { ItemModel } from '@syncfusion/ej2-navigations';
12
12
  import { SummaryTypes } from '../../base/types';
13
- import { PivotView } from '../../pivotview/base/pivotview';
13
+ import { DisplayOption, PivotView } from '../../pivotview/base/pivotview';
14
14
  import { OlapEngine } from '../../base/olap/engine';
15
+ import { GridSettings } from '../../pivotview/model/gridsettings';
16
+ import { ChartSettings } from '../../pivotview/model/chartsettings';
15
17
  /**
16
18
  * Interface
17
19
  */
@@ -422,6 +424,10 @@ export interface ColumnRenderEventArgs {
422
424
  columns: PivotColumn[];
423
425
  /** Defines the current report. */
424
426
  dataSourceSettings: IDataOptions;
427
+ /**
428
+ * Defines the grid column information that used to display the column headers (stacked headers) based on its level in the Pivot Table.
429
+ */
430
+ stackedColumns?: ColumnModel[];
425
431
  }
426
432
  /**
427
433
  * The begin drill-through event arguments provide the necessary information about the cell clicked on the pivot table for drill-through and editing.
@@ -948,3 +954,267 @@ export interface FetchRawDataArgs {
948
954
  /** Defines the row index. */
949
955
  rowIndex: number;
950
956
  }
957
+ /**
958
+ * The action begins event arguments provide information about the current UI action, such as the action name, current datasource settings,
959
+ * and the selected field information which are configured based on the UI actions like
960
+ * [`drill down/up`](../../pivotview/drill-down/#drill-down-and-drill-up),
961
+ * [`value sorting`](../../pivotview/sorting/#value-sorting),
962
+ * built-in [`toolbar`](../../pivotview/tool-bar/#built-in-toolbar-options) options,
963
+ * [`grouping bar`](../../pivotview/grouping-bar/) and
964
+ * [`field list`](../../pivotview/field-list/) buttons actions such as
965
+ * [`sorting`](../../pivotview/sorting/), [`filtering`](../../pivotview/filtering/),
966
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
967
+ * [`aggregate type`](../../pivotview/aggregation/#modifying-aggregation-type-for-value-fields-at-runtime) change and so on,
968
+ * CRUD operation in [`editing`](../../pivotview/editing/) in the Pivot Table.
969
+ */
970
+ export interface PivotActionBeginEventArgs {
971
+ /** Defines the current data source settings information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list. */
972
+ dataSourceSettings?: IDataOptions;
973
+ /** Defines name of the current UI action when it begins. The following are the UI actions and their names:
974
+ *
975
+ * **Pivot Table**
976
+ * * **Drill down** and **drill up** - Drill down/up.
977
+ * * **Value sorting** - Sort value.
978
+ *
979
+ * **Toolbar**
980
+ * * **New report** - Add new report.
981
+ * * **Save report** - Save current report.
982
+ * * **Save as report** - Save as current report.
983
+ * * **Rename report** - Rename current report.
984
+ * * **Remove report** - Remove current report.
985
+ * * **Load report** - Load report.
986
+ * * **Conditional Formatting** - Open conditional formatting dialog.
987
+ * * **Number Formatting** - Open number formatting dialog.
988
+ * * **Show Fieldlist** - Open field list.
989
+ * * **Show Table** - Show table view.
990
+ * * **Chart menu** - Show chart view.
991
+ * * **Export menu** - PDF/Excel/CSV export.
992
+ * * **Sub-totals menu** - Show/hide sub-totals.
993
+ * * **Grand totals menu** - Show/hide grand totals.
994
+ * * **MDX** - Open MDX dialog.
995
+ *
996
+ * **Grouping bar** and **Field List** buttons
997
+ * * **Editing** - Edit calculated field.
998
+ * * **Remove** - Remove field.
999
+ * * **Sorting** - Sort field.
1000
+ * * **Filtering** - Filter field.
1001
+ * * **Aggregation** - Aggregate field.
1002
+ *
1003
+ * **Field List UI**
1004
+ * * **Field list tree** - Sort field tree.
1005
+ * * **Calculated field button** - Open calculated field dialog.
1006
+ *
1007
+ * **Editing**
1008
+ * * **Edit** - Edit record.
1009
+ * * **Save** - Save edited records.
1010
+ * * **Add** - Add new record.
1011
+ * * **Delete** - Remove record.
1012
+ */
1013
+ actionName?: string;
1014
+ /**
1015
+ * Defines the current field information on which field the action takes.
1016
+ * > This option is applicable only when the field-based UI actions are performed such as filtering, sorting, field remove, editing and aggregation change.
1017
+ */
1018
+ fieldInfo?: FieldItemInfo;
1019
+ /** Allow to restrict the current UI action. */
1020
+ cancel?: boolean;
1021
+ }
1022
+ /**
1023
+ * The action complete event arguments provide information about the current UI action, such as the current action name, current datasource settings, selected field information, and the current action information
1024
+ * which are configured based on the UI actions like
1025
+ * [`drill down/up`](../../pivotview/drill-down/#drill-down-and-drill-up),
1026
+ * [`value sorting`](../../pivotview/sorting/#value-sorting),
1027
+ * built-in [`toolbar`](../../pivotview/tool-bar/#built-in-toolbar-options) options,
1028
+ * [`grouping bar`](../../pivotview/grouping-bar/) and
1029
+ * [`field list`](../../pivotview/field-list/) buttons actions such as
1030
+ * [`sorting`](../../pivotview/sorting/), [`filtering`](../../pivotview/filtering/),
1031
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
1032
+ * [`aggregate type`](../../pivotview/aggregation/#modifying-aggregation-type-for-value-fields-at-runtime) change and so on,
1033
+ * CRUD operation in [`editing`](../../pivotview/editing/) in the Pivot Table.
1034
+ */
1035
+ export interface PivotActionCompleteEventArgs {
1036
+ /** Defines the current data source settings information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list. */
1037
+ dataSourceSettings?: IDataOptions;
1038
+ /** Defines name of the current UI action completed. The following are the UI actions and their names:
1039
+ *
1040
+ * **Pivot Table**
1041
+ * * **Drill down** and **drill up** - Drill down/up.
1042
+ * * **Value sorting** - Value sorted.
1043
+ *
1044
+ * **Toolbar**
1045
+ * * **New report** - New report added.
1046
+ * * **Save report** - Report saved.
1047
+ * * **Save as report** - Report re-saved.
1048
+ * * **Rename report** - Report renamed.
1049
+ * * **Remove report** - Report removed.
1050
+ * * **Load report** - Report loaded.
1051
+ * * **Conditional Formatting** - Conditional formatting applied.
1052
+ * * **Number Formatting** - Number formatting applied.
1053
+ * * **Show Fieldlist** - Field list closed.
1054
+ * * **Show Table** - Table view shown.
1055
+ * * **Chart menu** - Chart view shown.
1056
+ * * **Export menu** - PDF/Excel/CSV exported.
1057
+ * * **Sub-totals menu** - Sub-totals shown/hidden.
1058
+ * * **Grand totals menu** - Grand totals shown/hidden.
1059
+ * * **MDX** - MDX dialog closed.
1060
+ *
1061
+ * **Grouping bar** and **Field List** buttons
1062
+ * * **Editing** - Calculated field edited.
1063
+ * * **Remove** - Field removed.
1064
+ * * **Sorting** - Field sorted.
1065
+ * * **Filtering** - Field filtered.
1066
+ * * **Aggregation** - Field aggregated.
1067
+ *
1068
+ * **Field List UI**
1069
+ * * **Field list tree** - Field tree sorted.
1070
+ * * **Calculated field button** - Calculated field applied.
1071
+ *
1072
+ * **Editing**
1073
+ * * **Save** - Edited records saved.
1074
+ * * **Add** - New record added.
1075
+ * * **Delete** - Record removed.
1076
+ * * **Update** - Edited records updated.
1077
+ */
1078
+ actionName?: string;
1079
+ /** Defines the current field information on which field the action takes.
1080
+ * > This option is applicable only when the field-based UI actions are performed such as filtering, sorting, field remove, editing and aggregation change.
1081
+ */
1082
+ fieldInfo?: FieldItemInfo;
1083
+ /** Defines the unique information of the current UI action performed. */
1084
+ actionInfo?: PivotActionInfo;
1085
+ }
1086
+ /**
1087
+ * When the current UI action fails to achieve the desired result, the action failure event arguments provide necessary information about the current UI action, such as the current action name and failure information
1088
+ * which are configured based on the UI actions like
1089
+ * [`drill down/up`](../../pivotview/drill-down/#drill-down-and-drill-up),
1090
+ * [`value sorting`](../../pivotview/sorting/#value-sorting),
1091
+ * built-in [`toolbar`](../../pivotview/tool-bar/#built-in-toolbar-options) options,
1092
+ * [`grouping bar`](../../pivotview/grouping-bar/) and
1093
+ * [`field list`](../../pivotview/field-list/) buttons actions such as
1094
+ * [`sorting`](../../pivotview/sorting/), [`filtering`](../../pivotview/filtering/),
1095
+ * [`editing`](../../pivotview/calculated-field/#editing-through-the-field-list-and-the-groupingbar),
1096
+ * [`aggregate type`](../../pivotview/aggregation/#modifying-aggregation-type-for-value-fields-at-runtime) change and so on,
1097
+ * CRUD operation in [`editing`](../../pivotview/editing/) in the Pivot Table.
1098
+ */
1099
+ export interface PivotActionFailureEventArgs {
1100
+ /** Defines the error information of the current action. */
1101
+ errorInfo?: Error;
1102
+ /** Defines the name of the current action before it is completed. The following are the UI actions and their names:
1103
+ *
1104
+ * **Pivot Table**
1105
+ * * **Drill down** and **drill up** - Drill down/up.
1106
+ * * **Value sorting** - Sort value.
1107
+ *
1108
+ * **Toolbar**
1109
+ * * **New report** - Add new report.
1110
+ * * **Save report** - Save current report.
1111
+ * * **Save as report** - Save as current report.
1112
+ * * **Rename report** - Rename current report.
1113
+ * * **Remove report** - Remove current report.
1114
+ * * **Load report** - Load report.
1115
+ * * **Conditional Formatting** - Open conditional formatting dialog.
1116
+ * * **Number Formatting** - Open number formatting dialog.
1117
+ * * **Show Fieldlist** - Open field list.
1118
+ * * **Show Table** - Show table view.
1119
+ * * **Chart menu** - Show chart view.
1120
+ * * **Export menu** - PDF/Excel/CSV export.
1121
+ * * **Sub-totals menu** - Show/hide sub-totals.
1122
+ * * **Grand totals menu** - Show/hide grand totals.
1123
+ * * **MDX** - Open MDX dialog.
1124
+ *
1125
+ * **Grouping bar** and **Field List** buttons
1126
+ * * **Editing** - Edit calculated field.
1127
+ * * **Remove** - Remove field.
1128
+ * * **Sorting** - Sort field.
1129
+ * * **Filtering** - Filter field.
1130
+ * * **Aggregation** - Aggregate field.
1131
+ *
1132
+ * **Field List UI**
1133
+ * * **Field list tree** - Sort field tree.
1134
+ * * **Calculated field button** - Open calculated field dialog.
1135
+ *
1136
+ * **Editing**
1137
+ * * **Edit** - Edit record.
1138
+ * * **Save** - Save edited records.
1139
+ * * **Add** - Add new record.
1140
+ * * **Delete** - Remove record.
1141
+ */
1142
+ actionName?: string;
1143
+ }
1144
+ /**
1145
+ * Defines the unique information of the current UI action performed such as sorting, filtering, dril, editing, report manipulation, summarization, etc.
1146
+ */
1147
+ export interface PivotActionInfo {
1148
+ /** Defines the selected field’s sort settings to order their members either in ascending or descending that used to be displayed in the pivot table. */
1149
+ sortInfo?: ISort;
1150
+ /** Defines the selected field’s filter settings with either selective or conditional-based filter members that used to be displayed in the pivot table. */
1151
+ filterInfo?: IFilter;
1152
+ /** Defines the selected field’s drilled members settings that used to display the headers to be either expanded or collapsed in the pivot table. */
1153
+ drillInfo?: IDrillOptions;
1154
+ /** Defines the selected calculated field’s settings that used to create new calculated fields from the bound data source or using simple formula with basic arithmetic operators in the pivot table. */
1155
+ calculatedFieldInfo?: ICalculatedFieldSettings;
1156
+ /** Defines the report name that used to create, load, rename save and save as current report. */
1157
+ reportName?: string | PivotReportInfo;
1158
+ /** Defines the export information such as current export type and its additional settings such as page size, orientation, header, footer, etc. */
1159
+ exportInfo?: PivotExportInfo;
1160
+ /**
1161
+ * Defines the edited information such as current edit type, action and its edited record information such as edited data, previous data and index positions of before editing performed.
1162
+ */
1163
+ editInfo?: PivotEditInfo;
1164
+ /** Defines the current condition formatting settings that used to change the appearance of the pivot table value cells with different style properties such as background color,
1165
+ * font color, font family, and font size based on specific conditions.
1166
+ */
1167
+ conditionalFormattingInfo?: IConditionalFormatSettings[];
1168
+ /** Defines the current format settings that used to display the values with specific format that used to be displayed in the pivot table. */
1169
+ numberFormattingInfo?: IFormatSettings[];
1170
+ /** Defines the current toolbar information such as current display options and its settings such as chart settings, grid settings, etc. */
1171
+ toolbarInfo?: PivotToolbarInfo;
1172
+ /** Defines the current value sort settings from current pivot report. */
1173
+ valueSortInfo?: IValueSortSettings;
1174
+ }
1175
+ /**
1176
+ * Defines the report name that used to create, load, rename save and save as current report.
1177
+ */
1178
+ export interface PivotReportInfo {
1179
+ /** Defines the report name that used to be renamed. */
1180
+ oldName?: string;
1181
+ /** Defines the current report name after renamed. */
1182
+ newName?: string;
1183
+ }
1184
+ /**
1185
+ * Defines the export information such as current export type and its additional settings such as page size, orientation, header, footer, etc.
1186
+ */
1187
+ export interface PivotExportInfo {
1188
+ /** Defines the current export type such as PDF, Excel, and CSV. */
1189
+ type?: string;
1190
+ /** Defines the additional settings for PDF, Excel, and CSV export such as page size, orientation, header, footer, etc. */
1191
+ info?: PdfExportProperties | ExcelExportProperties | string;
1192
+ }
1193
+ /**
1194
+ * Defines the edited information such as current edit type, action and its edited record information such as edited data, previous data and index positions of before editing performed.
1195
+ */
1196
+ export interface PivotEditInfo {
1197
+ /** Defines the current edit type such as batch, inline, dialog and command columns. */
1198
+ type?: string;
1199
+ /** Defines the current edit action such as add, edit, save and delete. */
1200
+ action?: string;
1201
+ /** Defines the data that used to update the pivot table. */
1202
+ data?: IDataSet[];
1203
+ /** Defines the edited raw data */
1204
+ currentData?: IDataSet[];
1205
+ /** Defines the actual raw data */
1206
+ previousData?: IDataSet[];
1207
+ /** Defines the index position of the actual raw data */
1208
+ previousPosition?: number[];
1209
+ }
1210
+ /**
1211
+ * Defines the current toolbar information such as current display options and its settings such as chart settings, grid settings, etc.
1212
+ */
1213
+ export interface PivotToolbarInfo {
1214
+ /** Defines the current display settings such as current view port as either pivot table or pivot chart or both table and chart. */
1215
+ displayOption?: DisplayOption;
1216
+ /** Defines the pivot table settings such as column width, row height, grid lines, text wrap settings, selection settings, etc. */
1217
+ gridSettings?: GridSettings;
1218
+ /** Defines the pivot chart settings such as chart series, chart area, axis labels, legends, border, crosshairs, theme, title, tooltip, zooming, etc. */
1219
+ chartSettings?: ChartSettings;
1220
+ }
@@ -223,105 +223,114 @@ var CalculatedField = /** @class */ (function () {
223
223
  CalculatedField.prototype.displayMenu = function (node, treeNode, target) {
224
224
  var edit = target ? target.classList.contains(cls.CALC_EDIT) : true;
225
225
  var edited = target ? target.classList.contains(cls.CALC_EDITED) : true;
226
- if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
227
- node.querySelector('.e-list-icon.e-format').classList.contains(cls.ICON) &&
228
- !node.querySelector('.e-list-icon').classList.contains(cls.CALC_EDITED) &&
229
- !node.querySelector('.e-list-icon').classList.contains(cls.GRID_REMOVE) &&
230
- !node.querySelector('.e-list-icon').classList.contains(cls.CALC_EDIT) && node.tagName === 'LI') {
231
- if (this.menuObj && !this.menuObj.isDestroyed) {
232
- this.menuObj.destroy();
233
- }
234
- this.curMenu = node.querySelector('.' + cls.LIST_TEXT_CLASS);
235
- this.openContextMenu(node);
236
- }
237
- else if (node.tagName === 'LI' && (node.querySelector('.' + cls.CALC_EDIT) &&
238
- node.querySelector('.' + cls.CALC_EDIT).classList.contains('e-list-icon') && edit ||
239
- (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(cls.GRID_REMOVE)) || !target)))) {
240
- this.isEdit = true;
241
- var fieldName = node.getAttribute('data-field');
242
- var caption = node.getAttribute('data-caption');
243
- this.currentFieldName = fieldName;
244
- this.inputObj.value = caption;
245
- this.inputObj.dataBind();
246
- var formatString = node.getAttribute('data-formatString');
247
- var dialogElement = this.dialog.element;
248
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
249
- if (this.parent.dataType === 'olap') {
250
- var memberType = node.getAttribute('data-membertype');
251
- var parentHierarchy = node.getAttribute('data-hierarchy');
252
- var expression = node.getAttribute('data-formula');
253
- var customString = node.getAttribute('data-customString');
254
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
255
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
256
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
257
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
258
- /* eslint-enable max-len */
259
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
260
- select('#' + this.parentID + 'droppable', document).value = expression;
261
- memberTypeDrop.readonly = true;
262
- memberTypeDrop.value = memberType;
263
- memberTypeDrop.dataBind();
264
- if (memberType === 'Dimension') {
265
- hierarchyDrop.value = parentHierarchy;
226
+ try {
227
+ if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
228
+ node.querySelector('.e-list-icon.e-format').classList.contains(cls.ICON) &&
229
+ !node.querySelector('.e-list-icon').classList.contains(cls.CALC_EDITED) &&
230
+ !node.querySelector('.e-list-icon').classList.contains(cls.GRID_REMOVE) &&
231
+ !node.querySelector('.e-list-icon').classList.contains(cls.CALC_EDIT) && node.tagName === 'LI') {
232
+ if (this.menuObj && !this.menuObj.isDestroyed) {
233
+ this.menuObj.destroy();
266
234
  }
267
- if (formatString !== '') {
268
- formatDrop.value = formatString;
235
+ this.curMenu = node.querySelector('.' + cls.LIST_TEXT_CLASS);
236
+ this.openContextMenu(node);
237
+ }
238
+ else if (node.tagName === 'LI' && (node.querySelector('.' + cls.CALC_EDIT) &&
239
+ node.querySelector('.' + cls.CALC_EDIT).classList.contains('e-list-icon') && edit ||
240
+ (this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(cls.GRID_REMOVE)) || !target)))) {
241
+ this.isEdit = true;
242
+ var fieldName = node.getAttribute('data-field');
243
+ var caption = node.getAttribute('data-caption');
244
+ this.currentFieldName = fieldName;
245
+ this.inputObj.value = caption;
246
+ this.inputObj.dataBind();
247
+ var formatString = node.getAttribute('data-formatString');
248
+ var dialogElement = this.dialog.element;
249
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
250
+ if (this.parent.dataType === 'olap') {
251
+ var memberType = node.getAttribute('data-membertype');
252
+ var parentHierarchy = node.getAttribute('data-hierarchy');
253
+ var expression = node.getAttribute('data-formula');
254
+ var customString = node.getAttribute('data-customString');
255
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
256
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
257
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
258
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
259
+ /* eslint-enable max-len */
260
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
261
+ select('#' + this.parentID + 'droppable', document).value = expression;
262
+ memberTypeDrop.readonly = true;
263
+ memberTypeDrop.value = memberType;
264
+ memberTypeDrop.dataBind();
265
+ if (memberType === 'Dimension') {
266
+ hierarchyDrop.value = parentHierarchy;
267
+ }
268
+ if (formatString !== '') {
269
+ formatDrop.value = formatString;
270
+ formatDrop.dataBind();
271
+ }
272
+ customFormat.value = customString;
273
+ }
274
+ else {
275
+ customFormat.value = formatString;
276
+ addClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDIT);
277
+ removeClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDITED);
278
+ addClass([node.querySelector('.e-list-icon')], cls.CALC_EDITED);
279
+ removeClass([node.querySelector('.e-list-icon')], cls.CALC_EDIT);
280
+ node.querySelector('.' + cls.CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
281
+ select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
282
+ }
283
+ customFormat.dataBind();
284
+ }
285
+ else if (node.tagName === 'LI' && (node.querySelector('.' + cls.CALC_EDITED) &&
286
+ node.querySelector('.' + cls.CALC_EDITED).classList.contains('e-list-icon') && edited ||
287
+ (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
288
+ this.isEdit = false;
289
+ this.inputObj.value = '';
290
+ this.inputObj.dataBind();
291
+ var dialogElement = this.dialog.element;
292
+ var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
293
+ customFormat.value = '';
294
+ customFormat.dataBind();
295
+ if (this.parent.dataType === 'olap') {
296
+ var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
297
+ var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
298
+ var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
299
+ var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
300
+ /* eslint-enable max-len */
301
+ fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
302
+ hierarchyDrop.index = 0;
303
+ hierarchyDrop.dataBind();
304
+ formatDrop.index = 0;
269
305
  formatDrop.dataBind();
306
+ memberTypeDrop.index = 0;
307
+ memberTypeDrop.readonly = false;
308
+ memberTypeDrop.dataBind();
309
+ }
310
+ else {
311
+ addClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDIT);
312
+ removeClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDITED);
313
+ node.querySelector('.' + cls.CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
270
314
  }
271
- customFormat.value = customString;
315
+ select('#' + this.parentID + 'droppable', document).value = '';
272
316
  }
273
- else {
274
- customFormat.value = formatString;
275
- addClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDIT);
276
- removeClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDITED);
277
- addClass([node.querySelector('.e-list-icon')], cls.CALC_EDITED);
278
- removeClass([node.querySelector('.e-list-icon')], cls.CALC_EDIT);
279
- node.querySelector('.' + cls.CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
280
- select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
317
+ else if (node.tagName === 'LI' && (node.querySelector('.' + cls.GRID_REMOVE) &&
318
+ node.querySelector('.' + cls.GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
319
+ this.parent.actionObj.actionName = events.removeField;
320
+ if (this.parent.actionBeginMethod()) {
321
+ return;
322
+ }
323
+ var dropField = select('#' + this.parentID + 'droppable', document);
324
+ var field = {
325
+ name: this.isEdit ? this.currentFieldName : this.inputObj.value,
326
+ caption: this.inputObj.value,
327
+ formula: dropField.value
328
+ };
329
+ this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
281
330
  }
282
- customFormat.dataBind();
283
331
  }
284
- else if (node.tagName === 'LI' && (node.querySelector('.' + cls.CALC_EDITED) &&
285
- node.querySelector('.' + cls.CALC_EDITED).classList.contains('e-list-icon') && edited ||
286
- (this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
287
- this.isEdit = false;
288
- this.inputObj.value = '';
289
- this.inputObj.dataBind();
290
- var dialogElement = this.dialog.element;
291
- var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
292
- customFormat.value = '';
293
- customFormat.dataBind();
294
- if (this.parent.dataType === 'olap') {
295
- var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
296
- var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
297
- var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
298
- var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
299
- /* eslint-enable max-len */
300
- fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
301
- hierarchyDrop.index = 0;
302
- hierarchyDrop.dataBind();
303
- formatDrop.index = 0;
304
- formatDrop.dataBind();
305
- memberTypeDrop.index = 0;
306
- memberTypeDrop.readonly = false;
307
- memberTypeDrop.dataBind();
308
- }
309
- else {
310
- addClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDIT);
311
- removeClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDITED);
312
- node.querySelector('.' + cls.CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
313
- }
314
- select('#' + this.parentID + 'droppable', document).value = '';
315
- }
316
- else if (node.tagName === 'LI' && (node.querySelector('.' + cls.GRID_REMOVE) &&
317
- node.querySelector('.' + cls.GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
318
- var dropField = select('#' + this.parentID + 'droppable', document);
319
- var field = {
320
- name: this.isEdit ? this.currentFieldName : this.inputObj.value,
321
- caption: this.inputObj.value,
322
- formula: dropField.value
323
- };
324
- this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
332
+ catch (execption) {
333
+ this.parent.actionFailureMethod(execption);
325
334
  }
326
335
  };
327
336
  CalculatedField.prototype.removeCalcField = function (node) {
@@ -738,6 +747,12 @@ var CalculatedField = /** @class */ (function () {
738
747
  this.parent.isRequiredUpdate = false;
739
748
  }
740
749
  try {
750
+ var actionInfo = {
751
+ calculatedFieldInfo: this.parent.lastCalcFieldInfo
752
+ };
753
+ this.parent.actionObj.actionInfo = actionInfo;
754
+ var actionName = (this.parent.actionObj.actionName == events.editCalculatedField) ? events.calculatedFieldEdited : events.calculatedFieldApplied;
755
+ this.parent.actionObj.actionName = actionName;
741
756
  this.parent.updateDataSource(false);
742
757
  var pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
743
758
  this.parent.pivotGridModule : this.parent;
@@ -52,15 +52,17 @@ var ConditionalFormatting = /** @class */ (function () {
52
52
  },
53
53
  {
54
54
  click: this.applyButtonClick.bind(this),
55
+ isFlat: true,
55
56
  buttonModel: {
56
- cssClass: cls.FLAT_CLASS + ' ' + cls.FORMAT_APPLY_BUTTON,
57
+ isPrimary: true, cssClass: cls.FORMAT_APPLY_BUTTON,
57
58
  content: this.parent.localeObj.getConstant('apply')
58
59
  }
59
60
  },
60
61
  {
61
62
  click: this.cancelButtonClick.bind(this),
63
+ isFlat: true,
62
64
  buttonModel: {
63
- cssClass: cls.FLAT_CLASS + ' ' + cls.FORMAT_CANCEL_BUTTON,
65
+ cssClass: cls.FORMAT_CANCEL_BUTTON,
64
66
  content: this.parent.localeObj.getConstant('cancel')
65
67
  }
66
68
  }
@@ -114,6 +116,10 @@ var ConditionalFormatting = /** @class */ (function () {
114
116
  ConditionalFormatting.prototype.applyButtonClick = function () {
115
117
  if (this.refreshConditionValues()) {
116
118
  this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
119
+ var actionInfo = {
120
+ conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
121
+ };
122
+ this.parent.actionObj.actionInfo = actionInfo;
117
123
  this.parent.renderPivotGrid();
118
124
  this.dialog.close();
119
125
  }
@@ -340,7 +340,7 @@ var GroupingBar = /** @class */ (function () {
340
340
  currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
341
341
  }
342
342
  else {
343
- currentWidth = this.parent.chart ? this.parent.chartModule.getCalulatedWidth() : currentWidth;
343
+ currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
344
344
  }
345
345
  if (currentWidth) {
346
346
  var actWidth = currentWidth < 400 ? 400 : currentWidth;