@syncfusion/ej2-pivotview 19.4.43 → 19.4.47

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.43
3
+ * version : 19.4.47
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.42",
3
+ "_id": "@syncfusion/ej2-pivotview@19.4.43",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-zqgJ6FIg3l3S9avCSMts3EKnvSyYBwgjC8eKbpwx6j0Fuw/t7c311UbT6tOgxT2Nenq5Zj2lhWmFtKWdA8Vg8Q==",
5
+ "_integrity": "sha512-EDMViT3DDtBG78Vu8tUBvOo/DCVNS0gNonzwBPKaAvl1mIxDE04V0W8zQnF4+snkIS7OFj35ffNCoRL5Py/UnQ==",
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.42.tgz",
27
- "_shasum": "8cca2eb9992a61c1e519c06e22d977a24d37038c",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-19.4.43.tgz",
27
+ "_shasum": "201d8229eef37ac997d966855eba1d7b84e7f68b",
28
28
  "_spec": "@syncfusion/ej2-pivotview@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -38,19 +38,19 @@
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.43",
41
+ "@syncfusion/ej2-charts": "~19.4.47",
42
42
  "@syncfusion/ej2-compression": "~19.4.38",
43
- "@syncfusion/ej2-data": "~19.4.42",
44
- "@syncfusion/ej2-dropdowns": "~19.4.42",
43
+ "@syncfusion/ej2-data": "~19.4.47",
44
+ "@syncfusion/ej2-dropdowns": "~19.4.47",
45
45
  "@syncfusion/ej2-excel-export": "~19.4.38",
46
46
  "@syncfusion/ej2-file-utils": "~19.4.38",
47
- "@syncfusion/ej2-grids": "~19.4.43",
48
- "@syncfusion/ej2-inputs": "~19.4.43",
47
+ "@syncfusion/ej2-grids": "~19.4.47",
48
+ "@syncfusion/ej2-inputs": "~19.4.47",
49
49
  "@syncfusion/ej2-lists": "~19.4.38",
50
- "@syncfusion/ej2-navigations": "~19.4.41",
50
+ "@syncfusion/ej2-navigations": "~19.4.47",
51
51
  "@syncfusion/ej2-pdf-export": "~19.4.43",
52
- "@syncfusion/ej2-popups": "~19.4.41",
53
- "@syncfusion/ej2-splitbuttons": "~19.4.40",
52
+ "@syncfusion/ej2-popups": "~19.4.47",
53
+ "@syncfusion/ej2-splitbuttons": "~19.4.47",
54
54
  "@syncfusion/ej2-svg-base": "~19.4.42"
55
55
  },
56
56
  "deprecated": false,
@@ -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.43",
81
+ "version": "19.4.47",
82
82
  "sideEffects": false
83
83
  }
@@ -28,7 +28,7 @@ export declare class DataSourceUpdate {
28
28
  * @returns {void}
29
29
  * @hidden
30
30
  */
31
- updateDataSource(fieldName: string, droppedClass: string, droppedPosition: number): void;
31
+ updateDataSource(fieldName: string, droppedClass: string, droppedPosition: number): boolean;
32
32
  /**
33
33
  * Updates the dataSource by removing the given field from the dataSource.
34
34
  * @param {string} fieldName - Defines dropped field name to remove dataSource.
@@ -28,6 +28,7 @@ var DataSourceUpdate = /** @class */ (function () {
28
28
  var dataSourceItem;
29
29
  var draggedClass;
30
30
  var draggedPosition = -1;
31
+ var nodeDropped = true;
31
32
  var row = this.parent.dataSourceSettings.rows;
32
33
  var column = this.parent.dataSourceSettings.columns;
33
34
  var value = this.parent.dataSourceSettings.values;
@@ -154,7 +155,11 @@ var DataSourceUpdate = /** @class */ (function () {
154
155
  });
155
156
  }
156
157
  }
158
+ else {
159
+ nodeDropped = false;
160
+ }
157
161
  });
162
+ return nodeDropped;
158
163
  };
159
164
  /**
160
165
  * Updates the dataSource by removing the given field from the dataSource.
@@ -108,7 +108,7 @@ var NodeStateModified = /** @class */ (function () {
108
108
  this.parent.engineModule.updateFieldlistData(fieldName);
109
109
  }
110
110
  }
111
- this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
111
+ nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
112
112
  return nodeDropped;
113
113
  };
114
114
  NodeStateModified.prototype.getButtonPosition = function (target, droppedClass) {
@@ -464,7 +464,7 @@ var GroupingBar = /** @class */ (function () {
464
464
  };
465
465
  GroupingBar.prototype.dropIndicatorUpdate = function (e) {
466
466
  if ((this.parent.isDragging && e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseover') ||
467
- e.type === 'mouseleave') {
467
+ (!this.parent.isDragging || (!e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
468
468
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS)), cls.INDICATOR_HOVER_CLASS);
469
469
  removeClass([].slice.call(this.parent.element.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS + '-last')), cls.INDICATOR_HOVER_CLASS);
470
470
  }
@@ -1623,7 +1623,7 @@ var PivotChart = /** @class */ (function () {
1623
1623
  if (this.parent && this.parent.isDestroyed) {
1624
1624
  return;
1625
1625
  }
1626
- if (this.engineModule) {
1626
+ if (this.engineModule && !this.parent.destroyEngine) {
1627
1627
  this.engineModule.fieldList = {};
1628
1628
  this.engineModule = {};
1629
1629
  }
@@ -111,6 +111,8 @@ export declare class PivotFieldList extends Component<HTMLElement> implements IN
111
111
  private remoteData;
112
112
  /** @hidden */
113
113
  actionObj: PivotActionCompleteEventArgs;
114
+ /** @hidden */
115
+ destroyEngine: boolean;
114
116
  /**
115
117
  * Allows the following pivot report information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list.
116
118
  * * `catalog`: Allows to set the database name of SSAS cube as string type that used to retrieve the data from the specified connection string. **Note: It is applicable only for OLAP data source.**
@@ -68,6 +68,8 @@ var PivotFieldList = /** @class */ (function (_super) {
68
68
  _this.remoteData = [];
69
69
  /** @hidden */
70
70
  _this.actionObj = {};
71
+ /** @hidden */
72
+ _this.destroyEngine = false;
71
73
  return _this;
72
74
  }
73
75
  /**
@@ -1158,7 +1160,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1158
1160
  */
1159
1161
  PivotFieldList.prototype.destroy = function () {
1160
1162
  this.unWireEvent();
1161
- if (this.engineModule) {
1163
+ if (this.engineModule && !this.destroyEngine) {
1162
1164
  this.engineModule.fieldList = {};
1163
1165
  this.engineModule.rMembers = null;
1164
1166
  this.engineModule.cMembers = null;
@@ -1166,7 +1168,7 @@ var PivotFieldList = /** @class */ (function (_super) {
1166
1168
  this.engineModule.indexMatrix = null;
1167
1169
  this.engineModule = {};
1168
1170
  }
1169
- if (this.olapEngineModule) {
1171
+ if (this.olapEngineModule && !this.destroyEngine) {
1170
1172
  this.olapEngineModule.fieldList = {};
1171
1173
  this.olapEngineModule = {};
1172
1174
  }
@@ -110,7 +110,7 @@ var AxisTableRenderer = /** @class */ (function () {
110
110
  addClass([element[element.length - 1].querySelector('.' + cls.DROP_INDICATOR_CLASS + '-last')], cls.INDICATOR_HOVER_CLASS);
111
111
  }
112
112
  }
113
- else if (e.type === 'mouseleave') {
113
+ else if (!this.parent.isDragging || (!e.target.classList.contains(cls.DROPPABLE_CLASS) && e.type === 'mouseleave')) {
114
114
  removeClass([].slice.call(parentElement.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS)), cls.INDICATOR_HOVER_CLASS);
115
115
  removeClass([].slice.call(parentElement.querySelectorAll('.' + cls.DROP_INDICATOR_CLASS + '-last')), cls.INDICATOR_HOVER_CLASS);
116
116
  }
@@ -456,6 +456,9 @@ var TreeViewRenderer = /** @class */ (function () {
456
456
  };
457
457
  TreeViewRenderer.prototype.nodeStateChange = function (args) {
458
458
  var _this = this;
459
+ if (!args.isInteracted) {
460
+ return;
461
+ }
459
462
  var node = closest(args.node, '.' + cls.TEXT_CONTENT_CLASS);
460
463
  if (!isNullOrUndefined(node)) {
461
464
  var li_1 = closest(node, 'li');
@@ -487,7 +490,7 @@ var TreeViewRenderer = /** @class */ (function () {
487
490
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
488
491
  }
489
492
  else {
490
- _this.updateCheckState(selectedNode_1);
493
+ _this.updateCheckState(selectedNode_1, args.action);
491
494
  }
492
495
  });
493
496
  }
@@ -514,7 +517,7 @@ var TreeViewRenderer = /** @class */ (function () {
514
517
  _this.updateNodeStateChange(id_1, args, selectedNode_1);
515
518
  }
516
519
  else {
517
- _this.updateCheckState(selectedNode_1);
520
+ _this.updateCheckState(selectedNode_1, args.action);
518
521
  }
519
522
  });
520
523
  }
@@ -571,19 +574,17 @@ var TreeViewRenderer = /** @class */ (function () {
571
574
  break;
572
575
  }
573
576
  };
574
- TreeViewRenderer.prototype.updateCheckState = function (selectedNode) {
577
+ TreeViewRenderer.prototype.updateCheckState = function (selectedNode, action) {
575
578
  var chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
576
579
  var innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
577
580
  var checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
578
581
  for (var i = 0; i < chkState.length; i++) {
579
582
  if (selectedNode.caption === innerText[i].textContent) {
580
- if (chkState[i].getAttribute('aria-checked') === 'false') {
581
- chkState[i].setAttribute('aria-checked', 'false');
582
- checkClass[i].classList.add(cls.NODE_CHECK_CLASS);
583
+ if (action === 'check') {
584
+ this.fieldTable.uncheckAll([selectedNode['id']]);
583
585
  }
584
586
  else {
585
- chkState[i].setAttribute('aria-checked', 'true');
586
- checkClass[i].classList.remove(cls.NODE_CHECK_CLASS);
587
+ this.fieldTable.checkAll([selectedNode['id']]);
587
588
  }
588
589
  }
589
590
  }
@@ -634,6 +635,9 @@ var TreeViewRenderer = /** @class */ (function () {
634
635
  };
635
636
  TreeViewRenderer.prototype.addNode = function (args) {
636
637
  var _this = this;
638
+ if (!args.isInteracted) {
639
+ return;
640
+ }
637
641
  /* eslint-disable */
638
642
  var fieldList = this.parent.pivotFieldList;
639
643
  var selectedNode = fieldList[args.data[0].id.toString()];
@@ -641,17 +645,18 @@ var TreeViewRenderer = /** @class */ (function () {
641
645
  var fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
642
646
  var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
643
647
  if (args.action === 'check') {
648
+ var axis = ['filters', 'columns', 'rows', 'values'];
644
649
  var eventdrop = {
645
650
  fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
646
651
  dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
647
- dropAxis: 'rows', draggedAxis: 'fieldlist', cancel: false
652
+ dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
648
653
  };
649
654
  control.trigger(events.fieldDrop, eventdrop, function (observedArgs) {
650
655
  if (!observedArgs.cancel) {
651
656
  _this.selectedNodes.push(selectedNode.id.toString());
652
657
  }
653
658
  else {
654
- _this.updateCheckState(selectedNode);
659
+ _this.updateCheckState(selectedNode, args.action);
655
660
  }
656
661
  });
657
662
  }
@@ -672,7 +677,7 @@ var TreeViewRenderer = /** @class */ (function () {
672
677
  }
673
678
  }
674
679
  else {
675
- _this.updateCheckState(selectedNode);
680
+ _this.updateCheckState(selectedNode, args.action);
676
681
  }
677
682
  });
678
683
  }
@@ -1359,6 +1359,8 @@ export declare class PivotView extends Component<HTMLElement> implements INotify
1359
1359
  * @event
1360
1360
  */
1361
1361
  actionFailure: EmitType<PivotActionFailureEventArgs>;
1362
+ /** @hidden */
1363
+ destroyEngine: boolean;
1362
1364
  /**
1363
1365
  * Constructor for creating the widget
1364
1366
  * @param {PivotViewModel} options - options.
@@ -315,6 +315,8 @@ var PivotView = /** @class */ (function (_super) {
315
315
  _this_1.isServerWaitingPopup = false;
316
316
  /** @hidden */
317
317
  _this_1.actionObj = {};
318
+ /** @hidden */
319
+ _this_1.destroyEngine = false;
318
320
  _this_1.pivotView = _this_1;
319
321
  setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
320
322
  return _this_1;
@@ -1466,24 +1468,37 @@ var PivotView = /** @class */ (function (_super) {
1466
1468
  this.displayOption.primary : newProp.displayOption.view);
1467
1469
  if (this.showGroupingBar || this.showFieldList) {
1468
1470
  if (this.showFieldList && this.pivotFieldListModule) {
1471
+ this.pivotFieldListModule.destroyEngine = true;
1469
1472
  this.pivotFieldListModule.destroy();
1473
+ this.pivotFieldListModule.destroyEngine = false;
1470
1474
  }
1471
- if (this.showGroupingBar && this.groupingBarModule) {
1472
- this.groupingBarModule.destroy();
1473
- }
1475
+ /**
1476
+ * Below lines are affected the grouping bar render between table and chart.
1477
+ * In "Init subcomponent" function, grouping bar rendered properly for table and chart view.
1478
+ * So, The below lines are commanded out.
1479
+ */
1480
+ // if (this.showGroupingBar && this.groupingBarModule) {
1481
+ // this.groupingBarModule.destroy();
1482
+ // }
1474
1483
  this.notify(events.initSubComponent, this);
1475
1484
  }
1476
1485
  if (!this.grid && newProp.displayOption.view !== 'Chart') {
1477
1486
  this.renderEmptyGrid();
1478
1487
  if (newProp.displayOption.view === 'Table') {
1479
1488
  if (this.pivotChartModule) {
1489
+ this.destroyEngine = true;
1480
1490
  this.pivotChartModule.destroy();
1491
+ this.destroyEngine = false;
1481
1492
  this.chart = undefined;
1482
1493
  this.pivotChartModule = undefined;
1483
1494
  }
1484
1495
  }
1485
1496
  }
1486
1497
  else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
1498
+ if (this.grid) {
1499
+ this.grid.destroy();
1500
+ this.grid = undefined;
1501
+ }
1487
1502
  this.pivotChartModule = new PivotChart();
1488
1503
  }
1489
1504
  }
@@ -2489,12 +2504,12 @@ var PivotView = /** @class */ (function (_super) {
2489
2504
  var hasField = false;
2490
2505
  if (cell && this.dataType === 'olap') {
2491
2506
  var measureName = cell.actualText;
2492
- if (!isNullOrUndefined(measureName) && !this.olapEngineModule.fieldList[measureName]) {
2507
+ if (!isNullOrUndefined(measureName) && this.olapEngineModule.fieldList && !this.olapEngineModule.fieldList[measureName]) {
2493
2508
  var tupleInfo = this.olapEngineModule.tupRowInfo;
2494
2509
  measureName = cell.rowOrdinal > -1 && tupleInfo.length > 0 && tupleInfo[cell.rowOrdinal] &&
2495
2510
  !isNullOrUndefined(tupleInfo[cell.rowOrdinal].measureName) ? tupleInfo[cell.rowOrdinal].measureName : measureName;
2496
2511
  }
2497
- if (this.olapEngineModule.fieldList[measureName]) {
2512
+ if (this.olapEngineModule.fieldList && this.olapEngineModule.fieldList[measureName]) {
2498
2513
  var field = this.olapEngineModule.fieldList[measureName];
2499
2514
  aggregateType = field.isCalculatedField ? field.type : field.aggregateType;
2500
2515
  caption = (this.olapEngineModule.dataFields[measureName] &&
@@ -2504,7 +2519,7 @@ var PivotView = /** @class */ (function (_super) {
2504
2519
  }
2505
2520
  }
2506
2521
  else {
2507
- if (cell && this.engineModule.fieldList[cell.actualText]) {
2522
+ if (cell && this.engineModule.fieldList && this.engineModule.fieldList[cell.actualText]) {
2508
2523
  var field = this.engineModule.fieldList[cell.actualText];
2509
2524
  aggregateType = field.aggregateType;
2510
2525
  if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||