@syncfusion/ej2-pivotview 19.4.54 → 19.4.55

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.54
3
+ * version : 19.4.55
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.53",
3
+ "_id": "@syncfusion/ej2-pivotview@19.4.54",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-FikLaOJ6Iw5qQKUyxTSOiIurmcPb1yk4d07QzermnBmCqUFcYoW5sS9cBuFveej/jiOmXOoq23vd0dMuWw4/9Q==",
5
+ "_integrity": "sha512-xGa9LmU3MC5JnOgNiTWhlTdG53cd+bGt//HHPclpGXdpbq0Ams6d49JhMKu7I8+yh2QsJr+UU9hoYET3C0xZ1A==",
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.53.tgz",
27
- "_shasum": "cbc4bdc7b9ad2fc52995487ea8b82ddbbd27c943",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.54.tgz",
27
+ "_shasum": "13dc25aa9847df467cfe7486a9c2448be8c4fe0a",
28
28
  "_spec": "@syncfusion/ej2-pivotview@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -36,18 +36,18 @@
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~19.4.52",
39
- "@syncfusion/ej2-buttons": "~19.4.53",
40
- "@syncfusion/ej2-calendars": "~19.4.54",
39
+ "@syncfusion/ej2-buttons": "~19.4.55",
40
+ "@syncfusion/ej2-calendars": "~19.4.55",
41
41
  "@syncfusion/ej2-charts": "~19.4.54",
42
42
  "@syncfusion/ej2-compression": "~19.4.52",
43
43
  "@syncfusion/ej2-data": "~19.4.54",
44
- "@syncfusion/ej2-dropdowns": "~19.4.54",
44
+ "@syncfusion/ej2-dropdowns": "~19.4.55",
45
45
  "@syncfusion/ej2-excel-export": "~19.4.52",
46
46
  "@syncfusion/ej2-file-utils": "~19.4.52",
47
- "@syncfusion/ej2-grids": "~19.4.54",
47
+ "@syncfusion/ej2-grids": "~19.4.55",
48
48
  "@syncfusion/ej2-inputs": "~19.4.52",
49
- "@syncfusion/ej2-lists": "~19.4.52",
50
- "@syncfusion/ej2-navigations": "~19.4.53",
49
+ "@syncfusion/ej2-lists": "~19.4.55",
50
+ "@syncfusion/ej2-navigations": "~19.4.55",
51
51
  "@syncfusion/ej2-pdf-export": "~19.4.52",
52
52
  "@syncfusion/ej2-popups": "~19.4.53",
53
53
  "@syncfusion/ej2-splitbuttons": "~19.4.52",
@@ -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.54",
81
+ "version": "19.4.55",
82
82
  "sideEffects": false
83
83
  }
@@ -3,6 +3,7 @@ import { IDrillOptions, IGroupSettings, FieldItemInfo } from './engine';
3
3
  import { ICalculatedFieldSettings, IGridValues } from './engine';
4
4
  import { PivotView, PivotViewModel } from '../pivotview';
5
5
  import { PivotFieldList, PivotFieldListModel } from '../pivotfieldlist';
6
+ import { IOlapField } from './olap/engine';
6
7
  /**
7
8
  * This is a file to perform common utility for OLAP and Relational datasource
8
9
  * @hidden
@@ -21,6 +22,7 @@ export declare class PivotUtil {
21
22
  static getClonedDataSourceSettings(dataSourceSettings: IDataOptions): IDataOptions;
22
23
  static updateDataSourceSettings(control: PivotView | PivotFieldList, dataSourceSettings: IDataOptions): void;
23
24
  static cloneFieldSettings(collection: IFieldOptions[]): IFieldOptions[];
25
+ static cloneOlapFieldSettings(collection: IOlapField[]): IOlapField[];
24
26
  static cloneFilterSettings(collection: IFilter[]): IFilter[];
25
27
  private static cloneSortSettings;
26
28
  static cloneDrillMemberSettings(collection: IDrillOptions[]): IDrillOptions[];
package/src/base/util.js CHANGED
@@ -222,11 +222,55 @@ var PivotUtil = /** @class */ (function () {
222
222
  return collection;
223
223
  }
224
224
  };
225
- PivotUtil.cloneFilterSettings = function (collection) {
225
+ PivotUtil.cloneOlapFieldSettings = function (collection) {
226
226
  if (collection) {
227
227
  var clonedCollection = [];
228
228
  for (var _i = 0, collection_2 = collection; _i < collection_2.length; _i++) {
229
229
  var set = collection_2[_i];
230
+ clonedCollection.push(this.getDefinedObj({
231
+ caption: set.caption,
232
+ hasChildren: set.hasChildren,
233
+ id: set.id,
234
+ isSelected: set.isSelected,
235
+ name: set.name,
236
+ spriteCssClass: set.spriteCssClass,
237
+ tag: set.tag,
238
+ type: set.type,
239
+ pid: set.pid,
240
+ expanded: set.expanded,
241
+ defaultHierarchy: set.defaultHierarchy,
242
+ hasAllMember: set.hasAllMember,
243
+ allMember: set.allMember,
244
+ isChecked: set.isChecked,
245
+ filterMembers: set.filterMembers,
246
+ childMembers: set.childMembers,
247
+ searchMembers: set.searchMembers,
248
+ htmlAttributes: set.htmlAttributes,
249
+ currrentMembers: set.currrentMembers,
250
+ isHierarchy: set.isHierarchy,
251
+ isNamedSets: set.isNamedSets,
252
+ formatString: set.formatString,
253
+ actualFilter: set.actualFilter,
254
+ levels: set.levels,
255
+ levelCount: set.levelCount,
256
+ memberType: set.memberType,
257
+ fieldType: set.fieldType,
258
+ parentHierarchy: set.parentHierarchy
259
+ /* eslint-disable @typescript-eslint/no-explicit-any */
260
+ }));
261
+ /* eslint-enable @typescript-eslint/no-explicit-any */
262
+ }
263
+ return clonedCollection;
264
+ }
265
+ else {
266
+ return collection;
267
+ }
268
+ };
269
+ PivotUtil.cloneFilterSettings = function (collection) {
270
+ if (collection) {
271
+ var clonedCollection = [];
272
+ for (var _i = 0, collection_3 = collection; _i < collection_3.length; _i++) {
273
+ var set = collection_3[_i];
230
274
  clonedCollection.push(this.getDefinedObj({
231
275
  name: set.name,
232
276
  type: set.type,
@@ -253,8 +297,8 @@ var PivotUtil = /** @class */ (function () {
253
297
  PivotUtil.cloneSortSettings = function (collection) {
254
298
  if (collection) {
255
299
  var clonedCollection = [];
256
- for (var _i = 0, collection_3 = collection; _i < collection_3.length; _i++) {
257
- var set = collection_3[_i];
300
+ for (var _i = 0, collection_4 = collection; _i < collection_4.length; _i++) {
301
+ var set = collection_4[_i];
258
302
  clonedCollection.push(this.getDefinedObj({
259
303
  name: set.name,
260
304
  order: set.order
@@ -271,8 +315,8 @@ var PivotUtil = /** @class */ (function () {
271
315
  PivotUtil.cloneDrillMemberSettings = function (collection) {
272
316
  if (collection) {
273
317
  var clonedCollection = [];
274
- for (var _i = 0, collection_4 = collection; _i < collection_4.length; _i++) {
275
- var set = collection_4[_i];
318
+ for (var _i = 0, collection_5 = collection; _i < collection_5.length; _i++) {
319
+ var set = collection_5[_i];
276
320
  clonedCollection.push(this.getDefinedObj({
277
321
  name: set.name,
278
322
  delimiter: set.delimiter,
@@ -290,8 +334,8 @@ var PivotUtil = /** @class */ (function () {
290
334
  PivotUtil.cloneFormatSettings = function (collection) {
291
335
  if (collection) {
292
336
  var clonedCollection = [];
293
- for (var _i = 0, collection_5 = collection; _i < collection_5.length; _i++) {
294
- var set = collection_5[_i];
337
+ for (var _i = 0, collection_6 = collection; _i < collection_6.length; _i++) {
338
+ var set = collection_6[_i];
295
339
  clonedCollection.push(this.getDefinedObj({
296
340
  name: set.name,
297
341
  calendar: set.calendar,
@@ -349,8 +393,8 @@ var PivotUtil = /** @class */ (function () {
349
393
  PivotUtil.cloneCalculatedFieldSettings = function (collection) {
350
394
  if (collection) {
351
395
  var clonedCollection = [];
352
- for (var _i = 0, collection_6 = collection; _i < collection_6.length; _i++) {
353
- var set = collection_6[_i];
396
+ for (var _i = 0, collection_7 = collection; _i < collection_7.length; _i++) {
397
+ var set = collection_7[_i];
354
398
  clonedCollection.push(this.getDefinedObj({
355
399
  name: set.name,
356
400
  formatString: set.formatString,
@@ -369,8 +413,8 @@ var PivotUtil = /** @class */ (function () {
369
413
  PivotUtil.cloneConditionalFormattingSettings = function (collection) {
370
414
  if (collection) {
371
415
  var clonedCollection = [];
372
- for (var _i = 0, collection_7 = collection; _i < collection_7.length; _i++) {
373
- var set = collection_7[_i];
416
+ for (var _i = 0, collection_8 = collection; _i < collection_8.length; _i++) {
417
+ var set = collection_8[_i];
374
418
  clonedCollection.push(this.getDefinedObj({
375
419
  applyGrandTotals: set.applyGrandTotals,
376
420
  conditions: set.conditions,
@@ -397,8 +441,8 @@ var PivotUtil = /** @class */ (function () {
397
441
  PivotUtil.cloneGroupSettings = function (collection) {
398
442
  if (collection) {
399
443
  var clonedCollection = [];
400
- for (var _i = 0, collection_8 = collection; _i < collection_8.length; _i++) {
401
- var set = collection_8[_i];
444
+ for (var _i = 0, collection_9 = collection; _i < collection_9.length; _i++) {
445
+ var set = collection_9[_i];
402
446
  clonedCollection.push(this.getDefinedObj({
403
447
  name: set.name,
404
448
  caption: set.caption,
@@ -421,8 +465,8 @@ var PivotUtil = /** @class */ (function () {
421
465
  PivotUtil.cloneCustomGroups = function (collection) {
422
466
  if (collection) {
423
467
  var clonedCollection = [];
424
- for (var _i = 0, collection_9 = collection; _i < collection_9.length; _i++) {
425
- var set = collection_9[_i];
468
+ for (var _i = 0, collection_10 = collection; _i < collection_10.length; _i++) {
469
+ var set = collection_10[_i];
426
470
  clonedCollection.push(this.getDefinedObj({
427
471
  groupName: set.groupName,
428
472
  items: set.items ? set.items.slice() : set.items
@@ -379,7 +379,7 @@ var Toolbar = /** @class */ (function () {
379
379
  break;
380
380
  case (this.parent.element.id + 'fieldlist'):
381
381
  if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
382
- this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
382
+ this.parent.pivotFieldListModule.dialogRenderer.onShowFieldList();
383
383
  }
384
384
  break;
385
385
  case (this.parent.element.id + 'formatting'):
@@ -21,7 +21,7 @@ import { PivotView } from '../../pivotview/base/pivotview';
21
21
  import { DataSourceSettingsModel } from '../../pivotview/model/datasourcesettings-model';
22
22
  import { CalculatedField } from '../../common/calculatedfield/calculated-field';
23
23
  import { PivotContextMenu } from '../../common/popups/context-menu';
24
- import { OlapEngine, IOlapFieldListOptions } from '../../base/olap/engine';
24
+ import { OlapEngine, IOlapFieldListOptions, IOlapField } from '../../base/olap/engine';
25
25
  /**
26
26
  * Represents the PivotFieldList component.
27
27
  * ```html
@@ -58,6 +58,8 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
58
58
  /** @hidden */
59
59
  clonedFieldList: IFieldListOptions | IOlapFieldListOptions;
60
60
  /** @hidden */
61
+ clonedFieldListData: IOlapField[];
62
+ /** @hidden */
61
63
  pivotChange: boolean;
62
64
  isRequiredUpdate: boolean;
63
65
  /** @hidden */
@@ -788,6 +788,9 @@ var PivotFieldList = /** @class */ (function (_super) {
788
788
  this.pivotCommon.control = this;
789
789
  if (this.allowDeferLayoutUpdate) {
790
790
  this.clonedDataSource = extend({}, this.dataSourceSettings, null, true);
791
+ if (this.dataType === 'olap') {
792
+ this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.olapEngineModule.fieldListData);
793
+ }
791
794
  this.clonedFieldList = extend({}, this.pivotFieldList, null, true);
792
795
  }
793
796
  };
@@ -970,6 +973,9 @@ var PivotFieldList = /** @class */ (function (_super) {
970
973
  if (pivot.isRequiredUpdate) {
971
974
  if (pivot.allowDeferLayoutUpdate) {
972
975
  pivot.clonedDataSource = extend({}, pivot.dataSourceSettings, null, true);
976
+ if (_this.dataType === 'olap') {
977
+ _this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(_this.olapEngineModule.fieldListData);
978
+ }
973
979
  pivot.clonedFieldList = extend({}, pivot.pivotFieldList, null, true);
974
980
  }
975
981
  pivot.updateView(pivot.pivotGridModule);
@@ -1055,6 +1061,9 @@ var PivotFieldList = /** @class */ (function (_super) {
1055
1061
  this.axisFieldModule.render();
1056
1062
  if (!this.isPopupView && this.allowDeferLayoutUpdate) {
1057
1063
  this.clonedDataSource = extend({}, this.dataSourceSettings, null, true);
1064
+ if (this.dataType === 'olap') {
1065
+ this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.olapEngineModule.fieldListData);
1066
+ }
1058
1067
  this.clonedFieldList = extend({}, this.pivotFieldList, null, true);
1059
1068
  }
1060
1069
  }
@@ -1233,6 +1242,9 @@ var PivotFieldList = /** @class */ (function (_super) {
1233
1242
  if (this.clonedFieldList) {
1234
1243
  this.clonedFieldList = null;
1235
1244
  }
1245
+ if (this.clonedFieldListData) {
1246
+ this.clonedFieldListData = null;
1247
+ }
1236
1248
  if (this.localeObj) {
1237
1249
  this.localeObj = null;
1238
1250
  }
@@ -51,7 +51,8 @@ export declare class DialogRenderer {
51
51
  private createAxisTable;
52
52
  private showCalculatedField;
53
53
  private showFieldListDialog;
54
- private onShowFieldList;
54
+ /** @hidden */
55
+ onShowFieldList(): void;
55
56
  private onCloseFieldList;
56
57
  private removeFieldListIcon;
57
58
  private keyPress;
@@ -5,6 +5,7 @@ import { Dialog } from '@syncfusion/ej2-popups';
5
5
  import { Button, CheckBox } from '@syncfusion/ej2-buttons';
6
6
  import { Tab } from '@syncfusion/ej2-navigations';
7
7
  import * as events from '../../common/base/constant';
8
+ import { PivotUtil } from '../../base/util';
8
9
  /**
9
10
  * Module to render Pivot Field List Dialog
10
11
  */
@@ -149,6 +150,9 @@ var DialogRenderer = /** @class */ (function () {
149
150
  DialogRenderer.prototype.onCheckChange = function (args) {
150
151
  if (args.checked) {
151
152
  this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
153
+ if (this.parent.dataType === 'olap') {
154
+ this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
155
+ }
152
156
  this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
153
157
  }
154
158
  this.parent.allowDeferLayoutUpdate = !this.parent.allowDeferLayoutUpdate;
@@ -178,6 +182,9 @@ var DialogRenderer = /** @class */ (function () {
178
182
  var parent = this.parent;
179
183
  parent.axisFieldModule.render();
180
184
  parent.clonedDataSource = extend({}, parent.dataSourceSettings, null, true);
185
+ if (this.parent.dataType === 'olap') {
186
+ this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
187
+ }
181
188
  parent.clonedFieldList = extend({}, parent.pivotFieldList, null, true);
182
189
  };
183
190
  DialogRenderer.prototype.cancelButtonClick = function () {
@@ -481,6 +488,7 @@ var DialogRenderer = /** @class */ (function () {
481
488
  var activeindex = this.adaptiveElement.selectedItem;
482
489
  this.parent.treeViewModule.render(activeindex);
483
490
  };
491
+ /** @hidden */
484
492
  DialogRenderer.prototype.onShowFieldList = function () {
485
493
  this.parent.actionObj.actionName = events.showFieldList;
486
494
  if (this.parent.actionBeginMethod()) {
@@ -493,6 +501,9 @@ var DialogRenderer = /** @class */ (function () {
493
501
  this.parent.axisFieldModule.render();
494
502
  }
495
503
  this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
504
+ if (this.parent.dataType === 'olap') {
505
+ this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
506
+ }
496
507
  this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
497
508
  }
498
509
  addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
@@ -518,9 +529,13 @@ var DialogRenderer = /** @class */ (function () {
518
529
  }, true);
519
530
  }
520
531
  if (Object.keys(this.parent.clonedFieldList).length > 0) {
521
- this.parent.dataType === 'olap' ? this.parent.olapEngineModule.fieldList = /* eslint-disable-line */
522
- extend({}, this.parent.clonedFieldList, null, true) :
532
+ if (this.parent.dataType === 'olap' && this.parent.clonedFieldListData && Object.keys(this.parent.clonedFieldListData).length > 0) {
533
+ this.parent.olapEngineModule.fieldListData = this.parent.clonedFieldListData;
534
+ this.parent.olapEngineModule.fieldList = extend({}, this.parent.clonedFieldList, null, true);
535
+ }
536
+ else {
523
537
  this.parent.engineModule.fieldList = extend({}, this.parent.clonedFieldList, null, true);
538
+ }
524
539
  }
525
540
  if (this.parent.isPopupView && this.parent.pivotGridModule) {
526
541
  this.parent.pivotGridModule.notify(events.uiUpdate, this);
@@ -1607,7 +1607,7 @@ var Render = /** @class */ (function () {
1607
1607
  if (isNaN(parHeight)) {
1608
1608
  parHeight = parHeight > this.parent.minHeight ? parHeight : this.parent.minHeight;
1609
1609
  }
1610
- if (this.parent.currentView !== 'Chart') {
1610
+ if ((this.parent.showToolbar && this.parent.currentView !== 'Chart') || (!this.parent.showToolbar && this.parent.displayOption.view !== 'Chart')) {
1611
1611
  if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + cls.GRID_HEADER)) {
1612
1612
  var rowColHeight = this.parent.element.querySelector('.' + cls.GRID_HEADER).offsetHeight;
1613
1613
  var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + cls.GRID_GROUPING_BAR_CLASS) ?