@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.
- package/CHANGELOG.md +12 -4
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +50 -23
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +50 -23
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/common/actions/dataSource-update.d.ts +1 -1
- package/src/common/actions/dataSource-update.js +5 -0
- package/src/common/actions/node-state-modified.js +1 -1
- package/src/common/grouping-bar/grouping-bar.js +1 -1
- package/src/pivotchart/base/pivotchart.js +1 -1
- package/src/pivotfieldlist/base/field-list.d.ts +2 -0
- package/src/pivotfieldlist/base/field-list.js +4 -2
- package/src/pivotfieldlist/renderer/axis-table-renderer.js +1 -1
- package/src/pivotfieldlist/renderer/tree-renderer.js +16 -11
- package/src/pivotview/base/pivotview.d.ts +2 -0
- package/src/pivotview/base/pivotview.js +21 -6
|
@@ -10103,7 +10103,7 @@ var NodeStateModified = /** @__PURE__ @class */ (function () {
|
|
|
10103
10103
|
this.parent.engineModule.updateFieldlistData(fieldName);
|
|
10104
10104
|
}
|
|
10105
10105
|
}
|
|
10106
|
-
this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
|
|
10106
|
+
nodeDropped = this.parent.dataSourceUpdate.updateDataSource(fieldName, droppedClass, droppedPosition);
|
|
10107
10107
|
return nodeDropped;
|
|
10108
10108
|
};
|
|
10109
10109
|
NodeStateModified.prototype.getButtonPosition = function (target, droppedClass) {
|
|
@@ -10152,6 +10152,7 @@ var DataSourceUpdate = /** @__PURE__ @class */ (function () {
|
|
|
10152
10152
|
var dataSourceItem;
|
|
10153
10153
|
var draggedClass;
|
|
10154
10154
|
var draggedPosition = -1;
|
|
10155
|
+
var nodeDropped = true;
|
|
10155
10156
|
var row = this.parent.dataSourceSettings.rows;
|
|
10156
10157
|
var column = this.parent.dataSourceSettings.columns;
|
|
10157
10158
|
var value = this.parent.dataSourceSettings.values;
|
|
@@ -10278,7 +10279,11 @@ var DataSourceUpdate = /** @__PURE__ @class */ (function () {
|
|
|
10278
10279
|
});
|
|
10279
10280
|
}
|
|
10280
10281
|
}
|
|
10282
|
+
else {
|
|
10283
|
+
nodeDropped = false;
|
|
10284
|
+
}
|
|
10281
10285
|
});
|
|
10286
|
+
return nodeDropped;
|
|
10282
10287
|
};
|
|
10283
10288
|
/**
|
|
10284
10289
|
* Updates the dataSource by removing the given field from the dataSource.
|
|
@@ -15946,7 +15951,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15946
15951
|
if (this.parent && this.parent.isDestroyed) {
|
|
15947
15952
|
return;
|
|
15948
15953
|
}
|
|
15949
|
-
if (this.engineModule) {
|
|
15954
|
+
if (this.engineModule && !this.parent.destroyEngine) {
|
|
15950
15955
|
this.engineModule.fieldList = {};
|
|
15951
15956
|
this.engineModule = {};
|
|
15952
15957
|
}
|
|
@@ -22541,6 +22546,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22541
22546
|
_this_1.isServerWaitingPopup = false;
|
|
22542
22547
|
/** @hidden */
|
|
22543
22548
|
_this_1.actionObj = {};
|
|
22549
|
+
/** @hidden */
|
|
22550
|
+
_this_1.destroyEngine = false;
|
|
22544
22551
|
_this_1.pivotView = _this_1;
|
|
22545
22552
|
setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
|
|
22546
22553
|
return _this_1;
|
|
@@ -23692,24 +23699,37 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23692
23699
|
this.displayOption.primary : newProp.displayOption.view);
|
|
23693
23700
|
if (this.showGroupingBar || this.showFieldList) {
|
|
23694
23701
|
if (this.showFieldList && this.pivotFieldListModule) {
|
|
23702
|
+
this.pivotFieldListModule.destroyEngine = true;
|
|
23695
23703
|
this.pivotFieldListModule.destroy();
|
|
23704
|
+
this.pivotFieldListModule.destroyEngine = false;
|
|
23696
23705
|
}
|
|
23697
|
-
|
|
23698
|
-
|
|
23699
|
-
|
|
23706
|
+
/**
|
|
23707
|
+
* Below lines are affected the grouping bar render between table and chart.
|
|
23708
|
+
* In "Init subcomponent" function, grouping bar rendered properly for table and chart view.
|
|
23709
|
+
* So, The below lines are commanded out.
|
|
23710
|
+
*/
|
|
23711
|
+
// if (this.showGroupingBar && this.groupingBarModule) {
|
|
23712
|
+
// this.groupingBarModule.destroy();
|
|
23713
|
+
// }
|
|
23700
23714
|
this.notify(initSubComponent, this);
|
|
23701
23715
|
}
|
|
23702
23716
|
if (!this.grid && newProp.displayOption.view !== 'Chart') {
|
|
23703
23717
|
this.renderEmptyGrid();
|
|
23704
23718
|
if (newProp.displayOption.view === 'Table') {
|
|
23705
23719
|
if (this.pivotChartModule) {
|
|
23720
|
+
this.destroyEngine = true;
|
|
23706
23721
|
this.pivotChartModule.destroy();
|
|
23722
|
+
this.destroyEngine = false;
|
|
23707
23723
|
this.chart = undefined;
|
|
23708
23724
|
this.pivotChartModule = undefined;
|
|
23709
23725
|
}
|
|
23710
23726
|
}
|
|
23711
23727
|
}
|
|
23712
23728
|
else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
|
|
23729
|
+
if (this.grid) {
|
|
23730
|
+
this.grid.destroy();
|
|
23731
|
+
this.grid = undefined;
|
|
23732
|
+
}
|
|
23713
23733
|
this.pivotChartModule = new PivotChart();
|
|
23714
23734
|
}
|
|
23715
23735
|
}
|
|
@@ -24714,12 +24734,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24714
24734
|
var hasField = false;
|
|
24715
24735
|
if (cell && this.dataType === 'olap') {
|
|
24716
24736
|
var measureName = cell.actualText;
|
|
24717
|
-
if (!isNullOrUndefined(measureName) && !this.olapEngineModule.fieldList[measureName]) {
|
|
24737
|
+
if (!isNullOrUndefined(measureName) && this.olapEngineModule.fieldList && !this.olapEngineModule.fieldList[measureName]) {
|
|
24718
24738
|
var tupleInfo = this.olapEngineModule.tupRowInfo;
|
|
24719
24739
|
measureName = cell.rowOrdinal > -1 && tupleInfo.length > 0 && tupleInfo[cell.rowOrdinal] &&
|
|
24720
24740
|
!isNullOrUndefined(tupleInfo[cell.rowOrdinal].measureName) ? tupleInfo[cell.rowOrdinal].measureName : measureName;
|
|
24721
24741
|
}
|
|
24722
|
-
if (this.olapEngineModule.fieldList[measureName]) {
|
|
24742
|
+
if (this.olapEngineModule.fieldList && this.olapEngineModule.fieldList[measureName]) {
|
|
24723
24743
|
var field = this.olapEngineModule.fieldList[measureName];
|
|
24724
24744
|
aggregateType = field.isCalculatedField ? field.type : field.aggregateType;
|
|
24725
24745
|
caption = (this.olapEngineModule.dataFields[measureName] &&
|
|
@@ -24729,7 +24749,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24729
24749
|
}
|
|
24730
24750
|
}
|
|
24731
24751
|
else {
|
|
24732
|
-
if (cell && this.engineModule.fieldList[cell.actualText]) {
|
|
24752
|
+
if (cell && this.engineModule.fieldList && this.engineModule.fieldList[cell.actualText]) {
|
|
24733
24753
|
var field = this.engineModule.fieldList[cell.actualText];
|
|
24734
24754
|
aggregateType = field.aggregateType;
|
|
24735
24755
|
if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
|
|
@@ -28739,6 +28759,9 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28739
28759
|
};
|
|
28740
28760
|
TreeViewRenderer.prototype.nodeStateChange = function (args) {
|
|
28741
28761
|
var _this = this;
|
|
28762
|
+
if (!args.isInteracted) {
|
|
28763
|
+
return;
|
|
28764
|
+
}
|
|
28742
28765
|
var node = closest(args.node, '.' + TEXT_CONTENT_CLASS);
|
|
28743
28766
|
if (!isNullOrUndefined(node)) {
|
|
28744
28767
|
var li_1 = closest(node, 'li');
|
|
@@ -28770,7 +28793,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28770
28793
|
_this.updateNodeStateChange(id_1, args, selectedNode_1);
|
|
28771
28794
|
}
|
|
28772
28795
|
else {
|
|
28773
|
-
_this.updateCheckState(selectedNode_1);
|
|
28796
|
+
_this.updateCheckState(selectedNode_1, args.action);
|
|
28774
28797
|
}
|
|
28775
28798
|
});
|
|
28776
28799
|
}
|
|
@@ -28797,7 +28820,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28797
28820
|
_this.updateNodeStateChange(id_1, args, selectedNode_1);
|
|
28798
28821
|
}
|
|
28799
28822
|
else {
|
|
28800
|
-
_this.updateCheckState(selectedNode_1);
|
|
28823
|
+
_this.updateCheckState(selectedNode_1, args.action);
|
|
28801
28824
|
}
|
|
28802
28825
|
});
|
|
28803
28826
|
}
|
|
@@ -28854,19 +28877,17 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28854
28877
|
break;
|
|
28855
28878
|
}
|
|
28856
28879
|
};
|
|
28857
|
-
TreeViewRenderer.prototype.updateCheckState = function (selectedNode) {
|
|
28880
|
+
TreeViewRenderer.prototype.updateCheckState = function (selectedNode, action) {
|
|
28858
28881
|
var chkState = this.fieldTable.element.querySelectorAll('.e-checkbox-wrapper');
|
|
28859
28882
|
var innerText = this.fieldTable.element.querySelectorAll('.e-list-text');
|
|
28860
28883
|
var checkClass = this.fieldTable.element.querySelectorAll('.e-frame');
|
|
28861
28884
|
for (var i = 0; i < chkState.length; i++) {
|
|
28862
28885
|
if (selectedNode.caption === innerText[i].textContent) {
|
|
28863
|
-
if (
|
|
28864
|
-
|
|
28865
|
-
checkClass[i].classList.add(NODE_CHECK_CLASS);
|
|
28886
|
+
if (action === 'check') {
|
|
28887
|
+
this.fieldTable.uncheckAll([selectedNode['id']]);
|
|
28866
28888
|
}
|
|
28867
28889
|
else {
|
|
28868
|
-
|
|
28869
|
-
checkClass[i].classList.remove(NODE_CHECK_CLASS);
|
|
28890
|
+
this.fieldTable.checkAll([selectedNode['id']]);
|
|
28870
28891
|
}
|
|
28871
28892
|
}
|
|
28872
28893
|
}
|
|
@@ -28917,6 +28938,9 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28917
28938
|
};
|
|
28918
28939
|
TreeViewRenderer.prototype.addNode = function (args) {
|
|
28919
28940
|
var _this = this;
|
|
28941
|
+
if (!args.isInteracted) {
|
|
28942
|
+
return;
|
|
28943
|
+
}
|
|
28920
28944
|
/* eslint-disable */
|
|
28921
28945
|
var fieldList = this.parent.pivotFieldList;
|
|
28922
28946
|
var selectedNode = fieldList[args.data[0].id.toString()];
|
|
@@ -28924,17 +28948,18 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28924
28948
|
var fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent);
|
|
28925
28949
|
var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
|
|
28926
28950
|
if (args.action === 'check') {
|
|
28951
|
+
var axis = ['filters', 'columns', 'rows', 'values'];
|
|
28927
28952
|
var eventdrop = {
|
|
28928
28953
|
fieldName: fieldInfo.fieldName, dropField: fieldInfo.fieldItem,
|
|
28929
28954
|
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
|
|
28930
|
-
dropAxis:
|
|
28955
|
+
dropAxis: axis[this.parent.dialogRenderer.adaptiveElement.selectedItem], draggedAxis: 'fieldlist', cancel: false
|
|
28931
28956
|
};
|
|
28932
28957
|
control.trigger(fieldDrop, eventdrop, function (observedArgs) {
|
|
28933
28958
|
if (!observedArgs.cancel) {
|
|
28934
28959
|
_this.selectedNodes.push(selectedNode.id.toString());
|
|
28935
28960
|
}
|
|
28936
28961
|
else {
|
|
28937
|
-
_this.updateCheckState(selectedNode);
|
|
28962
|
+
_this.updateCheckState(selectedNode, args.action);
|
|
28938
28963
|
}
|
|
28939
28964
|
});
|
|
28940
28965
|
}
|
|
@@ -28955,7 +28980,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28955
28980
|
}
|
|
28956
28981
|
}
|
|
28957
28982
|
else {
|
|
28958
|
-
_this.updateCheckState(selectedNode);
|
|
28983
|
+
_this.updateCheckState(selectedNode, args.action);
|
|
28959
28984
|
}
|
|
28960
28985
|
});
|
|
28961
28986
|
}
|
|
@@ -29355,7 +29380,7 @@ var AxisTableRenderer = /** @__PURE__ @class */ (function () {
|
|
|
29355
29380
|
addClass([element[element.length - 1].querySelector('.' + DROP_INDICATOR_CLASS + '-last')], INDICATOR_HOVER_CLASS);
|
|
29356
29381
|
}
|
|
29357
29382
|
}
|
|
29358
|
-
else if (e.type === 'mouseleave') {
|
|
29383
|
+
else if (!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave')) {
|
|
29359
29384
|
removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
|
|
29360
29385
|
removeClass([].slice.call(parentElement.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
|
|
29361
29386
|
}
|
|
@@ -31062,6 +31087,8 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31062
31087
|
_this.remoteData = [];
|
|
31063
31088
|
/** @hidden */
|
|
31064
31089
|
_this.actionObj = {};
|
|
31090
|
+
/** @hidden */
|
|
31091
|
+
_this.destroyEngine = false;
|
|
31065
31092
|
return _this;
|
|
31066
31093
|
}
|
|
31067
31094
|
/**
|
|
@@ -32151,7 +32178,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
32151
32178
|
*/
|
|
32152
32179
|
PivotFieldList.prototype.destroy = function () {
|
|
32153
32180
|
this.unWireEvent();
|
|
32154
|
-
if (this.engineModule) {
|
|
32181
|
+
if (this.engineModule && !this.destroyEngine) {
|
|
32155
32182
|
this.engineModule.fieldList = {};
|
|
32156
32183
|
this.engineModule.rMembers = null;
|
|
32157
32184
|
this.engineModule.cMembers = null;
|
|
@@ -32159,7 +32186,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
32159
32186
|
this.engineModule.indexMatrix = null;
|
|
32160
32187
|
this.engineModule = {};
|
|
32161
32188
|
}
|
|
32162
|
-
if (this.olapEngineModule) {
|
|
32189
|
+
if (this.olapEngineModule && !this.destroyEngine) {
|
|
32163
32190
|
this.olapEngineModule.fieldList = {};
|
|
32164
32191
|
this.olapEngineModule = {};
|
|
32165
32192
|
}
|
|
@@ -35151,7 +35178,7 @@ var GroupingBar = /** @__PURE__ @class */ (function () {
|
|
|
35151
35178
|
};
|
|
35152
35179
|
GroupingBar.prototype.dropIndicatorUpdate = function (e) {
|
|
35153
35180
|
if ((this.parent.isDragging && e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseover') ||
|
|
35154
|
-
e.type === 'mouseleave') {
|
|
35181
|
+
(!this.parent.isDragging || (!e.target.classList.contains(DROPPABLE_CLASS) && e.type === 'mouseleave'))) {
|
|
35155
35182
|
removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS)), INDICATOR_HOVER_CLASS);
|
|
35156
35183
|
removeClass([].slice.call(this.parent.element.querySelectorAll('.' + DROP_INDICATOR_CLASS + '-last')), INDICATOR_HOVER_CLASS);
|
|
35157
35184
|
}
|