@syncfusion/ej2-pivotview 19.4.42 → 19.4.43

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.42
3
+ * version : 19.4.43
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.4.41",
3
+ "_id": "@syncfusion/ej2-pivotview@19.4.42",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Z6SpeNyVSImPCIhvmcMuE5r7XIYQ18AtXKRM07I+8x+ya2ZYOiFTi7uRIXtY2bP7IqlbKJFCuOwffzPxToetTw==",
5
+ "_integrity": "sha512-zqgJ6FIg3l3S9avCSMts3EKnvSyYBwgjC8eKbpwx6j0Fuw/t7c311UbT6tOgxT2Nenq5Zj2lhWmFtKWdA8Vg8Q==",
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.4.41.tgz",
27
- "_shasum": "87ada26a09554e3d155778f1d9ebedba1b86daa7",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.42.tgz",
27
+ "_shasum": "8cca2eb9992a61c1e519c06e22d977a24d37038c",
28
28
  "_spec": "@syncfusion/ej2-pivotview@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -38,17 +38,17 @@
38
38
  "@syncfusion/ej2-base": "~19.4.42",
39
39
  "@syncfusion/ej2-buttons": "~19.4.42",
40
40
  "@syncfusion/ej2-calendars": "~19.4.42",
41
- "@syncfusion/ej2-charts": "~19.4.42",
41
+ "@syncfusion/ej2-charts": "~19.4.43",
42
42
  "@syncfusion/ej2-compression": "~19.4.38",
43
43
  "@syncfusion/ej2-data": "~19.4.42",
44
44
  "@syncfusion/ej2-dropdowns": "~19.4.42",
45
45
  "@syncfusion/ej2-excel-export": "~19.4.38",
46
46
  "@syncfusion/ej2-file-utils": "~19.4.38",
47
- "@syncfusion/ej2-grids": "~19.4.42",
48
- "@syncfusion/ej2-inputs": "~19.4.42",
47
+ "@syncfusion/ej2-grids": "~19.4.43",
48
+ "@syncfusion/ej2-inputs": "~19.4.43",
49
49
  "@syncfusion/ej2-lists": "~19.4.38",
50
50
  "@syncfusion/ej2-navigations": "~19.4.41",
51
- "@syncfusion/ej2-pdf-export": "~19.4.42",
51
+ "@syncfusion/ej2-pdf-export": "~19.4.43",
52
52
  "@syncfusion/ej2-popups": "~19.4.41",
53
53
  "@syncfusion/ej2-splitbuttons": "~19.4.40",
54
54
  "@syncfusion/ej2-svg-base": "~19.4.42"
@@ -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.4.42",
81
+ "version": "19.4.43",
82
82
  "sideEffects": false
83
83
  }
@@ -338,10 +338,10 @@ var Toolbar = /** @class */ (function () {
338
338
  }
339
339
  };
340
340
  Toolbar.prototype.actionClick = function (args) {
341
- var actionName = (args.item.id == "PivotViewnew") ? events.addNewReport : (args.item.id == "PivotViewsave") ? events.saveCurrentReport : (args.item.id == "PivotViewsaveas") ? events.saveAsCurrentReport
342
- : (args.item.id == "PivotViewrename") ? events.renameCurrentReport : (args.item.id == "PivotViewremove") ? events.removeCurrentReport : (args.item.id == "PivotViewload") ? events.loadReports
343
- : (args.item.id == "PivotViewformatting") ? events.openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? events.openNumberFormatting
344
- : (args.item.id == "PivotViewmdxQuery") ? events.MdxQuery : (args.item.id == "PivotViewfieldlist") ? events.showFieldList : '';
341
+ var actionName = (args.item.id == this.parent.element.id + 'new') ? events.addNewReport : (args.item.id == this.parent.element.id + 'save') ? events.saveCurrentReport : (args.item.id == this.parent.element.id + 'saveas') ? events.saveAsCurrentReport
342
+ : (args.item.id == this.parent.element.id + 'rename') ? events.renameCurrentReport : (args.item.id == this.parent.element.id + 'remove') ? events.removeCurrentReport : (args.item.id == this.parent.element.id + 'load') ? events.loadReports
343
+ : (args.item.id == this.parent.element.id + 'formatting') ? events.openConditionalFormatting : (args.item.id == this.parent.element.id + 'numberFormatting') ? events.openNumberFormatting
344
+ : (args.item.id == this.parent.element.id + 'mdxQuery') ? events.MdxQuery : (args.item.id == this.parent.element.id + 'fieldlist') ? events.showFieldList : '';
345
345
  this.parent.actionObj.actionName = actionName;
346
346
  if (this.parent.actionBeginMethod()) {
347
347
  return;
@@ -1183,14 +1183,14 @@ var Toolbar = /** @class */ (function () {
1183
1183
  var _this_1 = this;
1184
1184
  var exportArgs = {};
1185
1185
  var type;
1186
- var actionName = (args.item.id == "PivotViewgrid") ? events.tableView : (args.item.id == "PivotView_Column") ? events.chartView : (args.item.id == "PivotView_Bar") ? events.chartView : (args.item.id == "PivotView_Line") ? events.chartView
1187
- : (args.item.id == "PivotView_Area") ? events.chartView : (args.item.id == "PivotView_Scatter") ? events.chartView : (args.item.id == "PivotView_Polar") ? events.chartView : (args.item.id == "PivotView_ChartMoreOption") ? events.chartView
1188
- : (args.item.id == "PivotView_multipleAxes") ? events.multipleAxis : (args.item.id == "PivotView_showLegend") ? events.showLegend : (args.item.id == "PivotViewpdf") ? events.pdfExport : (args.item.id == "PivotViewpng") ? events.pngExport
1189
- : (args.item.id == "PivotViewexcel") ? events.excelExport : (args.item.id == "PivotViewcsv") ? events.csvExport : (args.item.id == "PivotViewjpeg") ? events.jpegExport : (args.item.id == "PivotViewsvg") ? events.svgExport
1190
- : (args.item.id == "PivotViewnotsubtotal") ? events.hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? events.subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? events.subTotalsColumn
1191
- : (args.item.id == "PivotViewsubtotal") ? events.showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? events.hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? events.grandTotalsRow
1192
- : (args.item.id == "PivotViewgrandtotalcolumn") ? events.grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? events.showGrandTotals
1193
- : (args.item.id == "PivotViewnumberFormattingMenu") ? events.numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? events.conditionalFormattingMenu : '';
1186
+ var actionName = (args.item.id == this.parent.element.id + 'grid') ? events.tableView : (args.item.id == this.parent.element.id + '_' + "Column") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Bar") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Line") ? events.chartView
1187
+ : (args.item.id == this.parent.element.id + '_' + "Area") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Scatter") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "Polar") ? events.chartView : (args.item.id == this.parent.element.id + '_' + "ChartMoreOption") ? events.chartView
1188
+ : (args.item.id == this.parent.element.id + '_' + "multipleAxes") ? events.multipleAxis : (args.item.id == this.parent.element.id + '_' + "showLegend") ? events.showLegend : (args.item.id == this.parent.element.id + "pdf") ? events.pdfExport : (args.item.id == this.parent.element.id + "png") ? events.pngExport
1189
+ : (args.item.id == this.parent.element.id + "excel") ? events.excelExport : (args.item.id == this.parent.element.id + "csv") ? events.csvExport : (args.item.id == this.parent.element.id + "jpeg") ? events.jpegExport : (args.item.id == this.parent.element.id + "svg") ? events.svgExport
1190
+ : (args.item.id == this.parent.element.id + "notsubtotal") ? events.hideSubTotals : (args.item.id == this.parent.element.id + "subtotalrow") ? events.subTotalsRow : (args.item.id == this.parent.element.id + "subtotalcolumn") ? events.subTotalsColumn
1191
+ : (args.item.id == this.parent.element.id + "subtotal") ? events.showSubTotals : (args.item.id == this.parent.element.id + "notgrandtotal") ? events.hideGrandTotals : (args.item.id == this.parent.element.id + "grandtotalrow") ? events.grandTotalsRow
1192
+ : (args.item.id == this.parent.element.id + "grandtotalcolumn") ? events.grandTotalsColumn : (args.item.id == this.parent.element.id + "grandtotal") ? events.showGrandTotals
1193
+ : (args.item.id == this.parent.element.id + "numberFormattingMenu") ? events.numberFormattingMenu : (args.item.id == this.parent.element.id + "conditionalFormattingMenu") ? events.conditionalFormattingMenu : '';
1194
1194
  this.parent.actionObj.actionName = actionName;
1195
1195
  if (this.parent.actionBeginMethod()) {
1196
1196
  return;
@@ -118,6 +118,14 @@ var ExcelExport = /** @class */ (function () {
118
118
  for (var cCnt = 0; cCnt < colLen; cCnt++) {
119
119
  if (pivotValues[rCnt][cCnt]) {
120
120
  var pivotCell = pivotValues[rCnt][cCnt];
121
+ var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
122
+ this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
123
+ this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
124
+ this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
125
+ pivotCell.actualText;
126
+ var styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
127
+ var pivotCells = currentPivotValues[rCnt][cCnt];
128
+ var headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
121
129
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
122
130
  var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
123
131
  var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
@@ -137,33 +145,21 @@ var ExcelExport = /** @class */ (function () {
137
145
  index: cCnt + 1, value: cellValue,
138
146
  colSpan: pivotCell.colSpan, rowSpan: (pivotCell.rowSpan === -1 ? 1 : pivotCell.rowSpan),
139
147
  });
148
+ var lastCell = cells[cells.length - 1];
140
149
  if (pivotCell.axis === 'value') {
141
150
  if (isNaN(pivotCell.value) || pivotCell.formattedText === '' ||
142
151
  pivotCell.formattedText === undefined || isNullOrUndefined(pivotCell.value)) {
143
- cells[cells.length - 1].value = type === 'Excel' ? null : '';
144
- }
145
- var field = (this.parent.dataSourceSettings.valueAxis === 'row' &&
146
- this.parent.dataType === 'olap' && pivotCell.rowOrdinal &&
147
- this.engine.tupRowInfo[pivotCell.rowOrdinal]) ?
148
- this.engine.tupRowInfo[pivotCell.rowOrdinal].measureName :
149
- pivotCell.actualText;
150
- cells[cells.length - 1].style = !isNullOrUndefined(cells[cells.length - 1].value) ? { numberFormat: formatList[field], bold: false, wrapText: true } : { bold: false, wrapText: true };
151
- if (pivotCell.style) {
152
- cells[cells.length - 1].style.backColor = pivotCell.style.backgroundColor;
153
- cells[cells.length - 1].style.fontColor = pivotCell.style.color;
154
- cells[cells.length - 1].style.fontName = pivotCell.style.fontFamily;
155
- cells[cells.length - 1].style.fontSize = Number(pivotCell.style.fontSize.split('px')[0]);
152
+ lastCell.value = type === 'Excel' ? null : '';
156
153
  }
154
+ lastCell.style = !isNullOrUndefined(lastCell.value) ? styles : { bold: false, wrapText: true };
157
155
  }
158
156
  else {
159
- cells[cells.length - 1].style = {
160
- bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0
161
- };
157
+ lastCell.style = headerStyle;
162
158
  if (pivotCell.axis === 'row' && cCnt === 0) {
163
- cells[cells.length - 1].style.hAlign = 'Left';
159
+ lastCell.style = styles;
164
160
  if (this.parent.dataType === 'olap') {
165
161
  var indent = this.parent.renderModule.indentCollection[rCnt];
166
- cells[cells.length - 1].style.indent = indent * 2;
162
+ lastCell.style.indent = indent * 2;
167
163
  maxLevel = maxLevel > indent ? maxLevel : indent;
168
164
  }
169
165
  else {
@@ -173,19 +169,55 @@ var ExcelExport = /** @class */ (function () {
173
169
  var levelPosition = levelName.split(this.parent.dataSourceSettings.valueSortSettings.headerDelimiter).length -
174
170
  (memberPos ? memberPos - 1 : memberPos);
175
171
  var level = levelPosition ? (levelPosition - 1) : 0;
176
- cells[cells.length - 1].style.indent = level * 2;
172
+ lastCell.style.indent = level * 2;
177
173
  maxLevel = level > maxLevel ? level : maxLevel;
178
174
  }
179
175
  }
180
176
  }
181
- cells[cells.length - 1].style.borders = { color: '#000000', lineStyle: 'Thin' };
177
+ if (pivotCell.style || lastCell.style.backgroundColor || lastCell.style.fontColor || lastCell.style.fontName || lastCell.style.fontSize) {
178
+ lastCell.style.backgroundColor = lastCell.style.backgroundColor ? lastCell.style.backgroundColor : pivotCell.style.backgroundColor;
179
+ lastCell.style.fontColor = lastCell.style.fontColor ? lastCell.style.fontColor : pivotCell.style.color;
180
+ lastCell.style.fontName = lastCell.style.fontName ? lastCell.style.fontName : pivotCell.style.fontFamily;
181
+ lastCell.style.fontSize = lastCell.style.fontSize ? Number(lastCell.style.fontSize) : Number(pivotCell.style.fontSize.split('px')[0]);
182
+ }
183
+ lastCell.style.borders = { color: '#000000', lineStyle: 'Thin' };
184
+ var excelHeaderQueryCellInfoArgs = void 0;
185
+ var excelQueryCellInfoArgs = void 0;
186
+ if (pivotCell.axis === 'column') {
187
+ excelHeaderQueryCellInfoArgs = {
188
+ style: headerStyle,
189
+ cell: pivotCells,
190
+ };
191
+ this.parent.trigger(events.excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
192
+ }
193
+ else {
194
+ excelQueryCellInfoArgs = {
195
+ style: styles,
196
+ cell: pivotCells,
197
+ column: undefined,
198
+ data: pivotValues,
199
+ value: cellValue
200
+ };
201
+ this.parent.trigger(events.excelQueryCellInfo, excelQueryCellInfoArgs);
202
+ }
203
+ lastCell.value = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.cell.formattedText : excelQueryCellInfoArgs.value;
204
+ lastCell.style = (pivotCell.axis == 'column') ? excelHeaderQueryCellInfoArgs.style : excelQueryCellInfoArgs.style;
182
205
  }
183
206
  }
184
207
  cCnt = cCnt + (pivotCell.colSpan ? (pivotCell.colSpan - 1) : 0);
185
208
  }
186
209
  else {
210
+ var pivotCell = { formattedText: "" };
211
+ var excelHeaderQueryCellInfoArgs = void 0;
212
+ if (pivotCell) {
213
+ excelHeaderQueryCellInfoArgs = {
214
+ style: undefined,
215
+ cell: pivotCell,
216
+ };
217
+ this.parent.trigger(events.excelHeaderQueryCellInfo, excelHeaderQueryCellInfoArgs);
218
+ }
187
219
  cells.push({
188
- index: cCnt + 1, value: '', colSpan: 1, rowSpan: 1,
220
+ index: cCnt + 1, colSpan: 1, rowSpan: 1, value: pivotCell.formattedText, style: excelHeaderQueryCellInfoArgs.style
189
221
  });
190
222
  }
191
223
  }
@@ -227,12 +227,12 @@ var PDFExport = /** @class */ (function () {
227
227
  var isValueCell = false;
228
228
  if (pivotValues[rCnt][cCnt]) {
229
229
  var pivotCell = pivotValues[rCnt][cCnt];
230
+ var cellValue = pivotCell.formattedText;
231
+ cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
232
+ cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
233
+ this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
234
+ cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
230
235
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
231
- var cellValue = pivotCell.formattedText;
232
- cellValue = (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
233
- cellValue = pivotCell.type === 'grand sum' ? (this.parent.dataSourceSettings.rows.length === 0 || this.parent.dataSourceSettings.columns.length === 0) ? this.parent.getValuesHeader(pivotCell, 'grandTotal') :
234
- this.parent.localeObj.getConstant('grandTotal') : (pivotCell.type === 'sum' ?
235
- cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total')) : cellValue);
236
236
  if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
237
237
  pdfGridRow.cells.getCell(localCnt).columnSpan = pivotCell.colSpan ?
238
238
  (pageSize - localCnt < pivotCell.colSpan ? pageSize - localCnt : pivotCell.colSpan) : 1;
@@ -255,11 +255,31 @@ var PDFExport = /** @class */ (function () {
255
255
  pdfGridRow = this.applyStyle(pdfGridRow, pivotCell, localCnt);
256
256
  }
257
257
  var args = {
258
- style: (pivotCell && pivotCell.isSum) ? { bold: true } : undefined,
258
+ style: (pivotCell.axis == "column") ? { bold: false } : ((pivotCell && pivotCell.isSum) || (pivotCell.axis == "row")) ? { bold: true } : undefined,
259
259
  pivotCell: pivotCell,
260
260
  cell: pdfGridRow.cells.getCell(localCnt)
261
261
  };
262
262
  this.parent.trigger(events.onPdfCellRender, args);
263
+ if (pivotCell.axis == "column") {
264
+ args = {
265
+ style: args.style,
266
+ cell: args.cell,
267
+ gridCell: args.pivotCell
268
+ };
269
+ this.parent.trigger(events.pdfHeaderQueryCellInfo, args);
270
+ pdfGridRow.cells.getCell(localCnt).value = args.gridCell.formattedText ? args.gridCell.formattedText : cellValue;
271
+ }
272
+ else {
273
+ args = {
274
+ style: args.style,
275
+ cell: args.cell,
276
+ column: undefined,
277
+ data: args.pivotCell,
278
+ value: cellValue,
279
+ };
280
+ this.parent.trigger(events.pdfQueryCellInfo, args);
281
+ pdfGridRow.cells.getCell(localCnt).value = args.value ? args.value : cellValue;
282
+ }
263
283
  if (args.style) {
264
284
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
265
285
  }
@@ -271,6 +291,15 @@ var PDFExport = /** @class */ (function () {
271
291
  cell: pdfGridRow.cells.getCell(localCnt)
272
292
  };
273
293
  this.parent.trigger(events.onPdfCellRender, args);
294
+ var pivotCell = { formattedText: "" };
295
+ if (pivotCell.axis == "column") {
296
+ args = {
297
+ style: args.style,
298
+ cell: args.cell,
299
+ gridCell: args.pivotCell
300
+ };
301
+ this.parent.trigger(events.pdfHeaderQueryCellInfo, args);
302
+ }
274
303
  if (args.style) {
275
304
  this.processCellStyle(pdfGridRow.cells.getCell(localCnt), args);
276
305
  }
@@ -45,7 +45,7 @@ var VirtualScroll = /** @class */ (function () {
45
45
  var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + cls.MOVABLESCROLL_DIV);
46
46
  EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
47
47
  EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(fCont, mCont), this);
48
- EventHandler.add(mCont.parentElement.parentElement, 'mouseup touchend', this.common(mHdr, mCont, fCont), this);
48
+ EventHandler.add(mCont, 'mouseup touchend scroll', this.common(mHdr, mCont, fCont), this);
49
49
  EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
50
50
  EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
51
51
  EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);