@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.
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +76 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +56 -0
- package/CHANGELOG.md +31 -25
- package/README.md +1 -1
- 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 +2076 -1100
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2092 -1110
- 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 +22 -22
- package/src/base/engine.d.ts +17 -1
- package/src/base/engine.js +82 -29
- package/src/base/export-util.d.ts +17 -0
- package/src/base/export-util.js +245 -0
- package/src/base/olap/engine.d.ts +7 -0
- package/src/base/olap/engine.js +138 -35
- package/src/base/util.d.ts +0 -9
- package/src/base/util.js +2 -215
- package/src/common/actions/field-list.js +1 -1
- package/src/common/actions/pivot-button.d.ts +5 -8
- package/src/common/actions/pivot-button.js +188 -171
- package/src/common/base/constant.d.ts +186 -0
- package/src/common/base/constant.js +186 -0
- package/src/common/base/css-constant.d.ts +2 -0
- package/src/common/base/css-constant.js +2 -0
- package/src/common/base/enum.d.ts +11 -0
- package/src/common/base/interface.d.ts +272 -2
- package/src/common/calculatedfield/calculated-field.js +108 -93
- package/src/common/conditionalformatting/conditional-formatting.js +8 -2
- package/src/common/grouping-bar/grouping-bar.js +1 -1
- package/src/common/popups/aggregate-menu.js +57 -35
- package/src/common/popups/drillthrough-dialog.js +187 -139
- package/src/common/popups/filter-dialog.d.ts +1 -0
- package/src/common/popups/filter-dialog.js +22 -1
- package/src/common/popups/formatting-dialog.js +4 -0
- package/src/common/popups/grouping.js +2 -1
- package/src/common/popups/toolbar.js +305 -203
- package/src/pivotchart/base/pivotchart.js +36 -15
- package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
- package/src/pivotfieldlist/base/field-list.d.ts +55 -1
- package/src/pivotfieldlist/base/field-list.js +68 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
- package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.js +9 -7
- package/src/pivotview/actions/pdf-export.js +3 -3
- package/src/pivotview/base/pivotview-model.d.ts +46 -1
- package/src/pivotview/base/pivotview.d.ts +56 -2
- package/src/pivotview/base/pivotview.js +311 -107
- package/src/pivotview/model/chartsettings-model.d.ts +2 -2
- package/src/pivotview/model/chartsettings.d.ts +2 -2
- package/src/pivotview/model/chartsettings.js +2 -2
- package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
- package/src/pivotview/model/datasourcesettings.d.ts +7 -0
- package/src/pivotview/model/datasourcesettings.js +3 -0
- package/src/pivotview/renderer/render.d.ts +2 -1
- package/src/pivotview/renderer/render.js +52 -11
- package/styles/bootstrap-dark.css +115 -104
- package/styles/bootstrap.css +115 -104
- package/styles/bootstrap4.css +114 -81
- package/styles/bootstrap5-dark.css +220 -168
- package/styles/bootstrap5.css +215 -161
- package/styles/fabric-dark.css +117 -103
- package/styles/fabric.css +115 -102
- package/styles/highcontrast-light.css +116 -102
- package/styles/highcontrast.css +118 -104
- package/styles/material-dark.css +108 -97
- package/styles/material.css +108 -97
- package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
- package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
- package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
- package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
- package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
- package/styles/pivotfieldlist/_layout.scss +199 -109
- package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_material-definition.scss +1 -4
- package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
- package/styles/pivotfieldlist/_theme.scss +185 -35
- package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
- package/styles/pivotfieldlist/bootstrap.css +49 -58
- package/styles/pivotfieldlist/bootstrap4.css +44 -39
- package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
- package/styles/pivotfieldlist/bootstrap5.css +115 -89
- package/styles/pivotfieldlist/fabric-dark.css +49 -58
- package/styles/pivotfieldlist/fabric.css +49 -58
- package/styles/pivotfieldlist/highcontrast-light.css +49 -58
- package/styles/pivotfieldlist/highcontrast.css +49 -58
- package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
- package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
- package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
- package/styles/pivotfieldlist/material-dark.css +44 -53
- package/styles/pivotfieldlist/material.css +44 -53
- package/styles/pivotfieldlist/tailwind-dark.css +138 -81
- package/styles/pivotfieldlist/tailwind.css +140 -83
- package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
- package/styles/pivotview/_bootstrap-definition.scss +9 -6
- package/styles/pivotview/_bootstrap4-definition.scss +10 -7
- package/styles/pivotview/_bootstrap5-definition.scss +12 -9
- package/styles/pivotview/_fabric-dark-definition.scss +8 -5
- package/styles/pivotview/_fabric-definition.scss +7 -4
- package/styles/pivotview/_fluent-definition.scss +126 -0
- package/styles/pivotview/_highcontrast-definition.scss +8 -5
- package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
- package/styles/pivotview/_layout.scss +119 -64
- package/styles/pivotview/_material-dark-definition.scss +7 -4
- package/styles/pivotview/_material-definition.scss +8 -4
- package/styles/pivotview/_tailwind-definition.scss +8 -5
- package/styles/pivotview/_theme.scss +124 -70
- package/styles/pivotview/bootstrap-dark.css +66 -46
- package/styles/pivotview/bootstrap.css +66 -46
- package/styles/pivotview/bootstrap4.css +70 -42
- package/styles/pivotview/bootstrap5-dark.css +99 -73
- package/styles/pivotview/bootstrap5-dark.scss +0 -1
- package/styles/pivotview/bootstrap5.css +100 -72
- package/styles/pivotview/fabric-dark.css +68 -45
- package/styles/pivotview/fabric.css +66 -44
- package/styles/pivotview/highcontrast-light.css +67 -44
- package/styles/pivotview/highcontrast.css +69 -46
- package/styles/pivotview/icons/_bootstrap4.scss +1 -1
- package/styles/pivotview/icons/_bootstrap5.scss +1 -1
- package/styles/pivotview/icons/_fluent.scss +183 -0
- package/styles/pivotview/icons/_tailwind.scss +1 -1
- package/styles/pivotview/material-dark.css +64 -44
- package/styles/pivotview/material.css +64 -44
- package/styles/pivotview/tailwind-dark.css +106 -58
- package/styles/pivotview/tailwind-dark.scss +0 -1
- package/styles/pivotview/tailwind.css +107 -57
- package/styles/tailwind-dark.css +250 -145
- package/styles/tailwind.css +247 -140
|
@@ -34,28 +34,39 @@ var AggregateMenu = /** @class */ (function () {
|
|
|
34
34
|
AggregateMenu.prototype.openContextMenu = function (args) {
|
|
35
35
|
var _this = this;
|
|
36
36
|
var fieldName = args.target.parentElement.id;
|
|
37
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
37
38
|
this.buttonElement = args.target.parentElement;
|
|
38
39
|
var isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
|
|
39
40
|
this.summaryTypes = this.getMenuItem(isStringField).slice();
|
|
41
|
+
this.parent.actionObj.actionName = events.aggregateField;
|
|
42
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
43
|
+
if (this.parent.actionBeginMethod()) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
40
46
|
var eventArgs = {
|
|
41
47
|
cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
|
|
42
48
|
};
|
|
43
49
|
var control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
|
|
44
50
|
this.parent.pivotGridModule : this.parent;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
try {
|
|
52
|
+
control.trigger(events.aggregateMenuOpen, eventArgs, function (observedArgs) {
|
|
53
|
+
if (!observedArgs.cancel) {
|
|
54
|
+
_this.summaryTypes = observedArgs.aggregateTypes;
|
|
55
|
+
_this.createContextMenu(isStringField, observedArgs.displayMenuCount);
|
|
56
|
+
_this.currentMenu = args.target;
|
|
57
|
+
var pos = _this.currentMenu.getBoundingClientRect();
|
|
58
|
+
if (_this.parent.enableRtl) {
|
|
59
|
+
_this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
_this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
|
|
63
|
+
}
|
|
56
64
|
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
catch (execption) {
|
|
68
|
+
this.parent.actionFailureMethod(execption);
|
|
69
|
+
}
|
|
59
70
|
};
|
|
60
71
|
AggregateMenu.prototype.createContextMenu = function (isStringField, displayMenuCount) {
|
|
61
72
|
var _this = this;
|
|
@@ -332,31 +343,42 @@ var AggregateMenu = /** @class */ (function () {
|
|
|
332
343
|
AggregateMenu.prototype.selectOptionInContextMenu = function (menu) {
|
|
333
344
|
if (menu.item.text !== null) {
|
|
334
345
|
var buttonElement = this.currentMenu.parentElement;
|
|
335
|
-
var
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
346
|
+
var fieldInfo = PivotUtil.getFieldInfo((buttonElement ? buttonElement.id : ''), this.parent);
|
|
347
|
+
this.parent.actionObj.actionName = events.aggregateField;
|
|
348
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
349
|
+
if (this.parent.actionBeginMethod()) {
|
|
350
|
+
return;
|
|
339
351
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
this.parent.
|
|
352
|
+
var type = menu.item.id.split('_').pop();
|
|
353
|
+
try {
|
|
354
|
+
if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
|
|
355
|
+
|| type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
|
|
356
|
+
this.createValueSettingsDialog(buttonElement, this.parentElement, type);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
var field = buttonElement.getAttribute('data-uid');
|
|
360
|
+
var valuefields = this.parent.dataSourceSettings.values;
|
|
361
|
+
var contentElement = buttonElement.querySelector('.e-content');
|
|
362
|
+
var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
|
|
363
|
+
this.parent.engineModule.fieldList[field].caption;
|
|
364
|
+
contentElement.innerHTML = captionName;
|
|
365
|
+
contentElement.setAttribute('title', captionName);
|
|
366
|
+
buttonElement.setAttribute('data-type', type);
|
|
367
|
+
for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
|
|
368
|
+
if (this.parent.dataSourceSettings.values[vCnt].name === field) {
|
|
369
|
+
var dataSourceItem = extend({}, valuefields[vCnt].properties ?
|
|
370
|
+
valuefields[vCnt].properties : valuefields[vCnt], null, true);
|
|
371
|
+
dataSourceItem.type = type;
|
|
372
|
+
this.parent.engineModule.fieldList[field].aggregateType = type;
|
|
373
|
+
valuefields.splice(vCnt, 1, dataSourceItem);
|
|
374
|
+
this.parent.lastAggregationInfo = dataSourceItem;
|
|
375
|
+
}
|
|
357
376
|
}
|
|
377
|
+
this.updateDataSource();
|
|
358
378
|
}
|
|
359
|
-
|
|
379
|
+
}
|
|
380
|
+
catch (execption) {
|
|
381
|
+
this.parent.actionFailureMethod(execption);
|
|
360
382
|
}
|
|
361
383
|
}
|
|
362
384
|
};
|
|
@@ -48,142 +48,159 @@ var DrillThroughDialog = /** @class */ (function () {
|
|
|
48
48
|
this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
|
|
49
49
|
}
|
|
50
50
|
var actualText = eventArgs.currentCell.actualText.toString();
|
|
51
|
-
|
|
52
|
-
this.parent.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
previousPosition.push(_this.gridIndexObjects[value]);
|
|
85
|
-
}
|
|
86
|
-
var count = Object.keys(_this.gridIndexObjects).length;
|
|
87
|
-
var addItems = [];
|
|
88
|
-
var prevItems = [];
|
|
89
|
-
var index = 0;
|
|
90
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
91
|
-
for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
|
|
92
|
-
var item = _b[_a];
|
|
93
|
-
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
94
|
-
for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
|
|
95
|
-
var field = _d[_c];
|
|
96
|
-
if (isNullOrUndefined(item[field])) {
|
|
97
|
-
delete item[field];
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
delete item['__index'];
|
|
101
|
-
addItems.push(item);
|
|
51
|
+
try {
|
|
52
|
+
if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
|
|
53
|
+
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
|
|
54
|
+
this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
|
|
55
|
+
this.parent.actionObj.actionName = events.editRecord;
|
|
56
|
+
if (this.parent.actionBeginMethod()) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this.editCell(eventArgs);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this.removeDrillThroughDialog();
|
|
63
|
+
var drillThroughDialog = createElement('div', {
|
|
64
|
+
id: this.parent.element.id + '_drillthrough',
|
|
65
|
+
className: cls.DRILLTHROUGH_DIALOG
|
|
66
|
+
});
|
|
67
|
+
this.parent.element.appendChild(drillThroughDialog);
|
|
68
|
+
this.dialogPopUp = new Dialog({
|
|
69
|
+
animationSettings: { effect: 'Fade' },
|
|
70
|
+
allowDragging: false,
|
|
71
|
+
header: this.parent.localeObj.getConstant('details'),
|
|
72
|
+
content: this.createDrillThroughGrid(eventArgs),
|
|
73
|
+
beforeOpen: function () {
|
|
74
|
+
_this.drillThroughGrid.setProperties({
|
|
75
|
+
dataSource: _this.parent.editSettings.allowEditing ?
|
|
76
|
+
_this.dataWithPrimarykey(eventArgs) : _this.gridData,
|
|
77
|
+
height: !_this.parent.editSettings.allowEditing ? 300 : 220
|
|
78
|
+
}, false);
|
|
79
|
+
},
|
|
80
|
+
beforeClose: function () {
|
|
81
|
+
if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
|
|
82
|
+
if (_this.parent.dataSourceSettings.type === 'CSV') {
|
|
83
|
+
_this.updateData(_this.drillThroughGrid.dataSource);
|
|
102
84
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
|
|
86
|
+
var previousPosition = [];
|
|
87
|
+
for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
|
|
88
|
+
var value = gridIndexObjectsValue_1[_i];
|
|
89
|
+
previousPosition.push(_this.gridIndexObjects[value]);
|
|
107
90
|
}
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
var count = Object.keys(_this.gridIndexObjects).length;
|
|
92
|
+
var addItems = [];
|
|
93
|
+
var prevItems = [];
|
|
94
|
+
var index = 0;
|
|
95
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
96
|
+
for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
|
|
97
|
+
var item = _b[_a];
|
|
98
|
+
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
99
|
+
for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
|
|
100
|
+
var field = _d[_c];
|
|
101
|
+
if (isNullOrUndefined(item[field])) {
|
|
102
|
+
delete item[field];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
110
105
|
delete item['__index'];
|
|
106
|
+
addItems.push(item);
|
|
111
107
|
}
|
|
112
|
-
if (
|
|
113
|
-
delete _this.
|
|
108
|
+
else if (count > 0) {
|
|
109
|
+
delete _this.gridIndexObjects[item['__index'].toString()];
|
|
110
|
+
prevItems.push(item);
|
|
111
|
+
count--;
|
|
114
112
|
}
|
|
113
|
+
if (_this.parent.dataSourceSettings.mode === 'Server') {
|
|
114
|
+
if (item['__index']) {
|
|
115
|
+
delete item['__index'];
|
|
116
|
+
}
|
|
117
|
+
if (_this.gridData[index]['__index']) {
|
|
118
|
+
delete _this.gridData[index]['__index'];
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
index++;
|
|
115
122
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
count = 0;
|
|
124
|
+
if (_this.parent.dataSourceSettings.mode === 'Server') {
|
|
125
|
+
var gridIndex = []; /* eslint-disable-line */
|
|
126
|
+
var keys = Object.keys(_this.gridIndexObjects);
|
|
127
|
+
for (var len = 0; len < keys.length; len++) {
|
|
128
|
+
delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
|
|
129
|
+
gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
|
|
130
|
+
}
|
|
131
|
+
var indexObject = []; /* eslint-disable-line */
|
|
132
|
+
keys = Object.keys(_this.parent.drillThroughValue.indexObject);
|
|
133
|
+
for (var len = 0; len < keys.length; len++) {
|
|
134
|
+
indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
|
|
135
|
+
}
|
|
136
|
+
_this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
|
|
130
137
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
else {
|
|
139
|
+
var items = [];
|
|
140
|
+
var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
|
|
141
|
+
_this.parent.engineModule.actualData : _this.parent.engineModule.data;
|
|
142
|
+
for (var _e = 0, _f = data; _e < _f.length; _e++) {
|
|
143
|
+
var item = _f[_e];
|
|
144
|
+
delete item['__index'];
|
|
145
|
+
if (_this.gridIndexObjects[count.toString()] === undefined) {
|
|
146
|
+
items.push(item);
|
|
147
|
+
}
|
|
148
|
+
count++;
|
|
149
|
+
}
|
|
150
|
+
/* eslint-enable @typescript-eslint/dot-notation */
|
|
151
|
+
items = items.concat(addItems);
|
|
152
|
+
var eventArgs_1 = {
|
|
153
|
+
currentData: _this.drillThroughGrid.dataSource,
|
|
154
|
+
previousData: _this.clonedData,
|
|
155
|
+
previousPosition: previousPosition,
|
|
156
|
+
cancel: false
|
|
157
|
+
};
|
|
158
|
+
_this.parent.trigger(events.editCompleted, eventArgs_1);
|
|
159
|
+
if (!eventArgs_1.cancel) {
|
|
160
|
+
_this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
161
|
+
_this.engine.updateGridData(_this.parent.dataSourceSettings);
|
|
162
|
+
_this.parent.pivotValues = _this.engine.pivotValues;
|
|
142
163
|
}
|
|
143
|
-
count++;
|
|
144
164
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
cancel: false
|
|
165
|
+
_this.parent.actionObj.actionName = events.recordUpdated;
|
|
166
|
+
var actionInfo = {
|
|
167
|
+
editInfo: {
|
|
168
|
+
type: _this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: _this.drillThroughGrid.dataSource,
|
|
169
|
+
previousData: _this.clonedData, previousPosition: previousPosition
|
|
170
|
+
}
|
|
152
171
|
};
|
|
153
|
-
_this.parent.
|
|
154
|
-
if (!eventArgs_1.cancel) {
|
|
155
|
-
_this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
156
|
-
_this.engine.updateGridData(_this.parent.dataSourceSettings);
|
|
157
|
-
_this.parent.pivotValues = _this.engine.pivotValues;
|
|
158
|
-
}
|
|
172
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
159
173
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
close: this.removeDrillThroughDialog.bind(this)
|
|
174
|
-
});
|
|
175
|
-
this.dialogPopUp.isStringTemplate = true;
|
|
176
|
-
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
177
|
-
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
178
|
-
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
179
|
-
if (this.parent.editSettings.allowEditing) {
|
|
180
|
-
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
181
|
-
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
182
|
-
keyConfigs: this.drillKeyConfigs,
|
|
183
|
-
eventName: 'keydown'
|
|
174
|
+
_this.isUpdated = false;
|
|
175
|
+
_this.gridIndexObjects = {};
|
|
176
|
+
},
|
|
177
|
+
isModal: true,
|
|
178
|
+
visible: true,
|
|
179
|
+
showCloseIcon: true,
|
|
180
|
+
locale: this.parent.locale,
|
|
181
|
+
enableRtl: this.parent.enableRtl,
|
|
182
|
+
width: this.parent.isAdaptive ? '100%' : '60%',
|
|
183
|
+
position: { X: 'center', Y: 'center' },
|
|
184
|
+
closeOnEscape: !this.parent.editSettings.allowEditing,
|
|
185
|
+
target: document.body,
|
|
186
|
+
close: this.removeDrillThroughDialog.bind(this)
|
|
184
187
|
});
|
|
188
|
+
this.dialogPopUp.isStringTemplate = true;
|
|
189
|
+
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
190
|
+
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
191
|
+
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
192
|
+
if (this.parent.editSettings.allowEditing) {
|
|
193
|
+
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
194
|
+
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
195
|
+
keyConfigs: this.drillKeyConfigs,
|
|
196
|
+
eventName: 'keydown'
|
|
197
|
+
});
|
|
198
|
+
}
|
|
185
199
|
}
|
|
186
200
|
}
|
|
201
|
+
catch (execption) {
|
|
202
|
+
this.parent.actionFailureMethod(execption);
|
|
203
|
+
}
|
|
187
204
|
};
|
|
188
205
|
DrillThroughDialog.prototype.editCell = function (eventArgs) {
|
|
189
206
|
var _this = this;
|
|
@@ -199,6 +216,10 @@ var DrillThroughDialog = /** @class */ (function () {
|
|
|
199
216
|
if (eventArgs.currentCell.actualText in previousData) {
|
|
200
217
|
currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
|
|
201
218
|
}
|
|
219
|
+
var actionInfo = {
|
|
220
|
+
editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
|
|
221
|
+
};
|
|
222
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
202
223
|
this.numericTextBox = new NumericTextBox({
|
|
203
224
|
value: cellValue,
|
|
204
225
|
enableRtl: this.parent.enableRtl,
|
|
@@ -263,6 +284,10 @@ var DrillThroughDialog = /** @class */ (function () {
|
|
|
263
284
|
};
|
|
264
285
|
DrillThroughDialog.prototype.removeDrillThroughDialog = function () {
|
|
265
286
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
287
|
+
this.parent.actionObj.actionName = events.drillThroughClosed;
|
|
288
|
+
if (this.parent.actionObj.actionName) {
|
|
289
|
+
this.parent.actionCompleteMethod();
|
|
290
|
+
}
|
|
266
291
|
this.dialogPopUp.destroy();
|
|
267
292
|
}
|
|
268
293
|
var dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
|
|
@@ -275,6 +300,7 @@ var DrillThroughDialog = /** @class */ (function () {
|
|
|
275
300
|
};
|
|
276
301
|
/* eslint-disable */
|
|
277
302
|
DrillThroughDialog.prototype.createDrillThroughGrid = function (eventArgs) {
|
|
303
|
+
var _this = this;
|
|
278
304
|
var drillThroughBody = createElement('div', { id: this.parent.element.id + '_drillthroughbody', className: cls.DRILLTHROUGH_BODY_CLASS });
|
|
279
305
|
var drillThroughBodyHeader = createElement('div', {
|
|
280
306
|
id: this.parent.element.id +
|
|
@@ -352,31 +378,53 @@ var DrillThroughDialog = /** @class */ (function () {
|
|
|
352
378
|
}
|
|
353
379
|
if (this.parent.editSettings.allowEditing) {
|
|
354
380
|
Grid.Inject(Edit, Page);
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
this.drillThroughGrid.
|
|
358
|
-
|
|
359
|
-
|
|
381
|
+
try {
|
|
382
|
+
this.drillThroughGrid.editSettings = this.parent.editSettings;
|
|
383
|
+
this.drillThroughGrid.actionBegin = function (args) {
|
|
384
|
+
var actionName = (args.requestType == 'save') ? events.saveEditedRecords : (args.requestType == 'add') ? events.addNewRecord : (args.requestType == 'delete') ? events.removeRecord : '';
|
|
385
|
+
_this.parent.actionObj.actionName = actionName;
|
|
386
|
+
if (_this.parent.actionObj.actionName) {
|
|
387
|
+
if (_this.parent.actionBeginMethod()) {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
if (this.parent.editSettings.allowCommandColumns) {
|
|
393
|
+
this.drillThroughGrid.editSettings.mode = 'Normal';
|
|
394
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
|
|
395
|
+
Grid.Inject(CommandColumn);
|
|
396
|
+
this.drillThroughGrid.columns.push({
|
|
397
|
+
headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
|
|
398
|
+
commands: [
|
|
399
|
+
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
400
|
+
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
401
|
+
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
402
|
+
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
403
|
+
]
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
|
|
408
|
+
}
|
|
360
409
|
this.drillThroughGrid.columns.push({
|
|
361
|
-
|
|
362
|
-
commands: [
|
|
363
|
-
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
364
|
-
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
365
|
-
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
366
|
-
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
367
|
-
]
|
|
410
|
+
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
368
411
|
});
|
|
369
412
|
}
|
|
370
|
-
|
|
371
|
-
this.
|
|
413
|
+
catch (execption) {
|
|
414
|
+
this.parent.actionFailureMethod(execption);
|
|
372
415
|
}
|
|
373
|
-
this.drillThroughGrid.columns.push({
|
|
374
|
-
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
375
|
-
});
|
|
376
416
|
this.drillThroughGrid.actionComplete = function (args) {
|
|
377
417
|
if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
|
|
378
418
|
dialogModule.isUpdated = true;
|
|
379
419
|
}
|
|
420
|
+
_this.parent.actionObj.actionName = _this.parent.getActionCompleteName();
|
|
421
|
+
var actionInfo = {
|
|
422
|
+
editInfo: { type: _this.drillThroughGrid.editSettings.mode, action: args.requestType, data: _this.gridData }
|
|
423
|
+
};
|
|
424
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
425
|
+
if (_this.parent.actionObj.actionName) {
|
|
426
|
+
_this.parent.actionCompleteMethod();
|
|
427
|
+
}
|
|
380
428
|
if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
|
|
381
429
|
dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
|
|
382
430
|
!dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
|
|
@@ -106,7 +106,6 @@ var FilterDialog = /** @class */ (function () {
|
|
|
106
106
|
if (_this.allowExcelLikeFilter) {
|
|
107
107
|
_this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
|
|
108
108
|
}
|
|
109
|
-
_this.parent.control.pivotButtonModule.memberTreeView = _this.parent.filterDialog.memberTreeView;
|
|
110
109
|
_this.memberTreeView.nodeChecked =
|
|
111
110
|
_this.parent.control.pivotButtonModule.nodeStateModified.bind(_this.parent.control.pivotButtonModule);
|
|
112
111
|
_this.allMemberSelect.nodeChecked =
|
|
@@ -1122,6 +1121,15 @@ var FilterDialog = /** @class */ (function () {
|
|
|
1122
1121
|
if (this.dropMenu && !this.dropMenu.isDestroyed) {
|
|
1123
1122
|
this.dropMenu.destroy();
|
|
1124
1123
|
}
|
|
1124
|
+
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
1125
|
+
this.memberTreeView.destroy();
|
|
1126
|
+
}
|
|
1127
|
+
if (this.allMemberSelect && !this.allMemberSelect.isDestroyed) {
|
|
1128
|
+
this.allMemberSelect.destroy();
|
|
1129
|
+
}
|
|
1130
|
+
if (this.editorSearch && !this.editorSearch.isDestroyed) {
|
|
1131
|
+
this.editorSearch.destroy();
|
|
1132
|
+
}
|
|
1125
1133
|
if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
|
|
1126
1134
|
remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
|
|
1127
1135
|
}
|
|
@@ -1130,11 +1138,24 @@ var FilterDialog = /** @class */ (function () {
|
|
|
1130
1138
|
FilterDialog.prototype.removeFilterDialog = function () {
|
|
1131
1139
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
1132
1140
|
this.dialogPopUp.destroy();
|
|
1141
|
+
setTimeout(this.setFocus.bind(this));
|
|
1133
1142
|
}
|
|
1134
1143
|
if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
|
|
1135
1144
|
remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
|
|
1136
1145
|
}
|
|
1137
1146
|
};
|
|
1147
|
+
FilterDialog.prototype.setFocus = function () {
|
|
1148
|
+
if (this.parent.control.pivotButtonModule.parentElement) {
|
|
1149
|
+
var pivotButtons = [].slice.call(this.parent.control.pivotButtonModule.parentElement.querySelectorAll('.e-pivot-button'));
|
|
1150
|
+
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
1151
|
+
var item = pivotButtons_1[_i];
|
|
1152
|
+
if (item.getAttribute('data-uid') === this.parent.control.pivotButtonModule.fieldName) {
|
|
1153
|
+
item.focus();
|
|
1154
|
+
break;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1138
1159
|
return FilterDialog;
|
|
1139
1160
|
}());
|
|
1140
1161
|
export { FilterDialog };
|
|
@@ -383,6 +383,10 @@ var NumberFormatting = /** @class */ (function () {
|
|
|
383
383
|
this.parent.trigger(events.numberFormatting, eventArgs, function (observedArgs) {
|
|
384
384
|
if (!observedArgs.cancel) {
|
|
385
385
|
_this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
|
|
386
|
+
var actionInfo = {
|
|
387
|
+
numberFormattingInfo: _this.parent.dataSourceSettings.formatSettings
|
|
388
|
+
};
|
|
389
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
386
390
|
try {
|
|
387
391
|
_this.parent.updateDataSource(false);
|
|
388
392
|
_this.dialog.close();
|
|
@@ -4,6 +4,7 @@ import { Dialog } from '@syncfusion/ej2-popups';
|
|
|
4
4
|
import { MaskedTextBox, NumericTextBox } from '@syncfusion/ej2-inputs';
|
|
5
5
|
import { MultiSelect, CheckBoxSelection } from '@syncfusion/ej2-dropdowns';
|
|
6
6
|
import { PivotUtil } from '../../base/util';
|
|
7
|
+
import { PivotExportUtil } from '../../base/export-util';
|
|
7
8
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
|
8
9
|
import { DateTimePicker } from '@syncfusion/ej2-calendars';
|
|
9
10
|
import * as events from '../../common/base/constant';
|
|
@@ -599,7 +600,7 @@ var Grouping = /** @class */ (function () {
|
|
|
599
600
|
for (var j = 0, len_1 = field.customGroups.length; j < len_1; j++) {
|
|
600
601
|
if (field.customGroups[j]) {
|
|
601
602
|
var group = field.customGroups[j];
|
|
602
|
-
if (group.items &&
|
|
603
|
+
if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
|
|
603
604
|
splicedItems = this.mergeArray(splicedItems, [group.groupName]);
|
|
604
605
|
newItems = this.mergeArray(newItems, group.items);
|
|
605
606
|
field.customGroups.splice(j, 1);
|