@syncfusion/ej2-pivotview 19.3.55 → 19.4.41
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 +34 -28
- 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 +2068 -1096
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2084 -1106
- 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/actions/virtualscroll.d.ts +1 -0
- package/src/pivotview/actions/virtualscroll.js +6 -2
- 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 +39 -6
- 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
|
@@ -159,7 +159,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
159
159
|
attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
|
|
160
160
|
className: cls.ICON + ' ' + cls.CALC_EDIT
|
|
161
161
|
});
|
|
162
|
-
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
|
|
162
|
+
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
|
|
163
163
|
removeClass([calcElement], cls.ICON_DISABLE);
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
@@ -172,7 +172,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
172
172
|
className: cls.ICON + ' ' + cls.REMOVE_CLASS
|
|
173
173
|
});
|
|
174
174
|
if (this.parent.getModuleName() === 'pivotview') {
|
|
175
|
-
if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
|
|
175
|
+
if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
|
|
176
176
|
removeClass([removeElement], cls.ICON_DISABLE);
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
@@ -180,7 +180,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
183
|
-
if (field[i].showRemoveIcon) {
|
|
183
|
+
if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
|
|
184
184
|
removeClass([removeElement], cls.ICON_DISABLE);
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
@@ -212,13 +212,13 @@ var PivotButton = /** @class */ (function () {
|
|
|
212
212
|
}
|
|
213
213
|
if (axis === 'values') {
|
|
214
214
|
var _loop_1 = function (element) {
|
|
215
|
-
if (element.classList.contains(cls.GROUP_CHART_VALUE) && this_1.parent.
|
|
215
|
+
if (element.classList.contains(cls.GROUP_CHART_VALUE) && this_1.parent.pivotChartModule) {
|
|
216
216
|
var valueData = field.map(function (item) { return { text: item.caption ? item.caption : item.name, value: item.name }; });
|
|
217
217
|
var parent_1 = this_1.parent;
|
|
218
218
|
if (this_1.valueFiedDropDownList && element.querySelector('.' + cls.GROUP_CHART_VALUE_DROPDOWN_DIV)) {
|
|
219
219
|
this_1.valueFiedDropDownList.dataSource = valueData;
|
|
220
220
|
this_1.valueFiedDropDownList.value = !parent_1.chartSettings.enableMultipleAxis ?
|
|
221
|
-
parent_1.
|
|
221
|
+
parent_1.pivotChartModule.currentMeasure : valueData[0].value;
|
|
222
222
|
}
|
|
223
223
|
else {
|
|
224
224
|
var ddlDiv = createElement('div', { className: cls.GROUP_CHART_VALUE_DROPDOWN_DIV });
|
|
@@ -228,7 +228,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
228
228
|
enableRtl: this_1.parent.enableRtl,
|
|
229
229
|
locale: this_1.parent.locale,
|
|
230
230
|
value: !parent_1.chartSettings.enableMultipleAxis ?
|
|
231
|
-
parent_1.
|
|
231
|
+
parent_1.pivotChartModule.currentMeasure : valueData[0].value,
|
|
232
232
|
width: 200,
|
|
233
233
|
fields: { value: 'value', text: 'text' },
|
|
234
234
|
cssClass: cls.GROUP_CHART_VALUE_DROPDOWN,
|
|
@@ -253,14 +253,14 @@ var PivotButton = /** @class */ (function () {
|
|
|
253
253
|
var availColindex = undefined;
|
|
254
254
|
for (var _g = 0, _h = this.parentElement.querySelectorAll('.e-group-' + axis); _g < _h.length; _g++) {
|
|
255
255
|
var element = _h[_g];
|
|
256
|
-
if (element.classList.contains(cls.GROUP_CHART_COLUMN) && this.parent.
|
|
257
|
-
var currentMeasure = this.parent.
|
|
256
|
+
if (element.classList.contains(cls.GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
|
|
257
|
+
var currentMeasure = this.parent.pivotChartModule.currentMeasure;
|
|
258
258
|
var delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
|
|
259
259
|
var columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
|
|
260
260
|
this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
|
|
261
261
|
var engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
262
262
|
var pivotValues = engineModule.pivotValues;
|
|
263
|
-
var totColIndex = this.parent.
|
|
263
|
+
var totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
|
|
264
264
|
var rKeys = Object.keys(pivotValues);
|
|
265
265
|
var columnData = [];
|
|
266
266
|
var firstValueRow = false;
|
|
@@ -372,7 +372,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
372
372
|
},
|
|
373
373
|
className: cls.PIVOT_BUTTON_CONTENT_CLASS + ' ' +
|
|
374
374
|
(this.parent.getModuleName() === 'pivotview' ?
|
|
375
|
-
this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : cls.DRAG_DISABLE_CLASS : ''),
|
|
375
|
+
this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : cls.DRAG_DISABLE_CLASS : ''),
|
|
376
376
|
innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
|
|
377
377
|
text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
|
|
378
378
|
text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
|
|
@@ -438,43 +438,54 @@ var PivotButton = /** @class */ (function () {
|
|
|
438
438
|
};
|
|
439
439
|
PivotButton.prototype.openCalculatedFieldDialog = function (args) {
|
|
440
440
|
var fieldName = args.target.parentElement.id;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS).click();
|
|
447
|
-
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
448
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
449
|
-
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
450
|
-
.updateAdaptiveCalculatedField(true, fieldName);
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
if (!this.parent.isAdaptive) {
|
|
454
|
-
this.parent.calculatedFieldModule.buttonCall = true;
|
|
455
|
-
}
|
|
456
|
-
this.parent.notify(events.initCalculatedField, { edit: true, fieldName: fieldName });
|
|
457
|
-
}
|
|
441
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
442
|
+
this.parent.actionObj.actionName = events.editCalculatedField;
|
|
443
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
444
|
+
if (this.parent.actionBeginMethod()) {
|
|
445
|
+
return;
|
|
458
446
|
}
|
|
459
|
-
|
|
460
|
-
if (this.parent.
|
|
461
|
-
this.parent.
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
.
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
|
|
447
|
+
try {
|
|
448
|
+
if (this.parent.getModuleName() === 'pivotview') {
|
|
449
|
+
if (this.parent.isAdaptive && (this.parent.showFieldList &&
|
|
450
|
+
this.parent.pivotFieldListModule &&
|
|
451
|
+
!this.parent.pivotFieldListModule.isDestroyed)) {
|
|
452
|
+
this.parent.pivotFieldListModule.element
|
|
453
|
+
.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS).click();
|
|
454
|
+
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
455
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
456
|
+
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
457
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
471
458
|
}
|
|
472
|
-
|
|
473
|
-
|
|
459
|
+
else {
|
|
460
|
+
if (!this.parent.isAdaptive) {
|
|
461
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
462
|
+
}
|
|
463
|
+
this.parent.notify(events.initCalculatedField, { edit: true, fieldName: fieldName });
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
else if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
467
|
+
if (this.parent.isAdaptive) {
|
|
468
|
+
this.parent.dialogRenderer.adaptiveElement.select(4);
|
|
469
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
470
|
+
this.parent.calculatedFieldModule
|
|
471
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
474
472
|
this.parent.calculatedFieldModule.buttonCall = true;
|
|
475
473
|
}
|
|
474
|
+
else {
|
|
475
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
476
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
477
|
+
addClass([this.parent.element.querySelector('.' + cls.TOGGLE_FIELD_LIST_CLASS)], cls.ICON_HIDDEN);
|
|
478
|
+
}
|
|
479
|
+
this.parent.notify(events.initCalculatedField, { edit: true, fieldName: fieldName });
|
|
480
|
+
if (this.parent.calculatedFieldModule) {
|
|
481
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
476
484
|
}
|
|
477
485
|
}
|
|
486
|
+
catch (execption) {
|
|
487
|
+
this.parent.actionFailureMethod(execption);
|
|
488
|
+
}
|
|
478
489
|
};
|
|
479
490
|
PivotButton.prototype.createDraggable = function (field, target) {
|
|
480
491
|
this.draggable = new Draggable(target, {
|
|
@@ -498,7 +509,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
498
509
|
attrs: {
|
|
499
510
|
'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
|
|
500
511
|
},
|
|
501
|
-
className: cls.ICON + ' ' + cls.DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : cls.DRAG_DISABLE_CLASS)
|
|
512
|
+
className: cls.ICON + ' ' + cls.DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : cls.DRAG_DISABLE_CLASS)
|
|
502
513
|
});
|
|
503
514
|
dragWrapper.appendChild(dragElement);
|
|
504
515
|
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
@@ -864,38 +875,52 @@ var PivotButton = /** @class */ (function () {
|
|
|
864
875
|
!(args.target.classList.contains(cls.DRAG_CLASS)) &&
|
|
865
876
|
(buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
|
|
866
877
|
isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
if ((
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
this.parent.actionObj.actionName = events.sortField;
|
|
879
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
880
|
+
if (this.parent.actionBeginMethod()) {
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
try {
|
|
884
|
+
if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
|
|
885
|
+
this.parent.dataSourceSettings.enableSorting &&
|
|
886
|
+
!(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
887
|
+
this.parent.pivotGridModule !== undefined &&
|
|
888
|
+
this.parent.pivotGridModule.enableVirtualization) ||
|
|
889
|
+
(this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
|
|
890
|
+
if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
|
|
891
|
+
(this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
|
|
892
|
+
this.parent.pivotGridModule.enableValueSorting))) {
|
|
893
|
+
if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
|
|
894
|
+
if (args.target.classList.contains('e-pivot-button')) {
|
|
895
|
+
if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
896
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
897
|
+
}
|
|
880
898
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
899
|
+
else {
|
|
900
|
+
if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
901
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
902
|
+
}
|
|
885
903
|
}
|
|
886
904
|
}
|
|
887
905
|
}
|
|
906
|
+
this.parent.pivotCommon.eventBase.updateSorting(args);
|
|
907
|
+
if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
|
|
908
|
+
var actionInfo = {
|
|
909
|
+
sortInfo: this.parent.lastSortInfo
|
|
910
|
+
};
|
|
911
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
912
|
+
this.updateDataSource(true);
|
|
913
|
+
}
|
|
914
|
+
/* eslint-disable */
|
|
915
|
+
var thisObj = this;
|
|
916
|
+
/* eslint-enable */
|
|
917
|
+
if (thisObj.parent instanceof PivotFieldList) {
|
|
918
|
+
thisObj.axisField.render();
|
|
919
|
+
}
|
|
888
920
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
/* eslint-disable */
|
|
894
|
-
var thisObj = this;
|
|
895
|
-
/* eslint-enable */
|
|
896
|
-
if (thisObj.parent instanceof PivotFieldList) {
|
|
897
|
-
thisObj.axisField.render();
|
|
898
|
-
}
|
|
921
|
+
}
|
|
922
|
+
catch (execption) {
|
|
923
|
+
this.parent.actionFailureMethod(execption);
|
|
899
924
|
}
|
|
900
925
|
}
|
|
901
926
|
};
|
|
@@ -927,26 +952,37 @@ var PivotButton = /** @class */ (function () {
|
|
|
927
952
|
PivotButton.prototype.updateFiltering = function (args) {
|
|
928
953
|
/* eslint-disable */
|
|
929
954
|
var pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
|
|
930
|
-
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
931
|
-
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
932
|
-
}
|
|
933
|
-
else {
|
|
934
|
-
pivotObj.showWaitingPopup();
|
|
935
|
-
}
|
|
936
|
-
pivotObj.mouseEventArgs = args;
|
|
937
|
-
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
938
|
-
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
939
955
|
var fieldName = args.target.parentElement.id;
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
956
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
957
|
+
this.parent.actionObj.actionName = events.filterField;
|
|
958
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
959
|
+
if (this.parent.actionBeginMethod()) {
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
try {
|
|
963
|
+
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
964
|
+
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
943
965
|
}
|
|
944
966
|
else {
|
|
945
|
-
pivotObj.
|
|
967
|
+
pivotObj.showWaitingPopup();
|
|
968
|
+
}
|
|
969
|
+
pivotObj.mouseEventArgs = args;
|
|
970
|
+
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
971
|
+
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
972
|
+
if (pivotObj.dataSourceSettings.mode === 'Server') {
|
|
973
|
+
if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
|
|
974
|
+
this.updateFilterEvents();
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
this.updateFilterEvents();
|
|
946
982
|
}
|
|
947
983
|
}
|
|
948
|
-
|
|
949
|
-
this.
|
|
984
|
+
catch (execption) {
|
|
985
|
+
this.parent.actionFailureMethod(execption);
|
|
950
986
|
}
|
|
951
987
|
/* eslint-enable */
|
|
952
988
|
};
|
|
@@ -959,11 +995,6 @@ var PivotButton = /** @class */ (function () {
|
|
|
959
995
|
var target = pivotObj.mouseEventArgs.target;
|
|
960
996
|
this.fieldName = target.parentElement.id;
|
|
961
997
|
if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
|
|
962
|
-
this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
|
|
963
|
-
this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
|
|
964
|
-
// this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
|
|
965
|
-
// this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
966
|
-
// this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
|
|
967
998
|
this.bindDialogEvents();
|
|
968
999
|
}
|
|
969
1000
|
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
@@ -977,8 +1008,8 @@ var PivotButton = /** @class */ (function () {
|
|
|
977
1008
|
if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
|
|
978
1009
|
this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
|
|
979
1010
|
this.updateDialogButtonEvents();
|
|
980
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
981
|
-
this.dialogPopUp.dataBind();
|
|
1011
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
1012
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
982
1013
|
this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
|
|
983
1014
|
}
|
|
984
1015
|
else if (this.parent.dataSourceSettings.allowMemberFilter) {
|
|
@@ -1003,7 +1034,7 @@ var PivotButton = /** @class */ (function () {
|
|
|
1003
1034
|
click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
|
|
1004
1035
|
},
|
|
1005
1036
|
{
|
|
1006
|
-
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
|
|
1037
|
+
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
|
|
1007
1038
|
buttonModel: { cssClass: cls.CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
|
|
1008
1039
|
}
|
|
1009
1040
|
];
|
|
@@ -1011,25 +1042,25 @@ var PivotButton = /** @class */ (function () {
|
|
|
1011
1042
|
PivotButton.prototype.tabSelect = function (e) {
|
|
1012
1043
|
this.index = e.selectedIndex;
|
|
1013
1044
|
this.updateDialogButtonEvents();
|
|
1014
|
-
removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
1045
|
+
removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
1015
1046
|
if (e.selectedIndex > 0) {
|
|
1016
|
-
addClass([this.dialogPopUp.element.querySelector('.e-filter-div-content' + '.' + (e.selectedIndex === 1 && this.parent.dataSourceSettings.allowLabelFilter ? 'e-label-filter' : 'e-value-filter'))], 'e-selected-tab');
|
|
1047
|
+
addClass([this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-filter-div-content' + '.' + (e.selectedIndex === 1 && this.parent.dataSourceSettings.allowLabelFilter ? 'e-label-filter' : 'e-value-filter'))], 'e-selected-tab');
|
|
1017
1048
|
}
|
|
1018
1049
|
if (e.selectedIndex === 0) {
|
|
1019
1050
|
this.parent.pivotCommon.filterDialog.updateCheckedState();
|
|
1020
1051
|
}
|
|
1021
1052
|
else {
|
|
1022
|
-
this.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
1023
|
-
this.dialogPopUp.element.querySelector('.' + cls.OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
1053
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
1054
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + cls.OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
1024
1055
|
}
|
|
1025
1056
|
};
|
|
1026
1057
|
PivotButton.prototype.updateDialogButtonEvents = function () {
|
|
1027
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
1028
|
-
this.dialogPopUp.dataBind();
|
|
1058
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
1059
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
1029
1060
|
};
|
|
1030
1061
|
PivotButton.prototype.updateCustomFilter = function (args) {
|
|
1031
1062
|
var _this = this;
|
|
1032
|
-
var dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
1063
|
+
var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
1033
1064
|
var fieldName = dialogElement.getAttribute('data-fieldname');
|
|
1034
1065
|
var levelName = dialogElement.getAttribute('data-selectedField');
|
|
1035
1066
|
var filterType = dialogElement.getAttribute('data-type');
|
|
@@ -1100,39 +1131,18 @@ var PivotButton = /** @class */ (function () {
|
|
|
1100
1131
|
if (type !== 'Value') {
|
|
1101
1132
|
_this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, _this.parent.dataSourceSettings.filterSettings);
|
|
1102
1133
|
}
|
|
1103
|
-
_this.dialogPopUp.close();
|
|
1134
|
+
_this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
1104
1135
|
if (!observedArgs.cancel) {
|
|
1105
1136
|
_this.refreshPivotButtonState(fieldName, true);
|
|
1106
1137
|
_this.updateDataSource(true);
|
|
1107
1138
|
}
|
|
1108
1139
|
});
|
|
1109
1140
|
};
|
|
1110
|
-
PivotButton.prototype.removeFilterDialog = function () {
|
|
1111
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
1112
|
-
this.dialogPopUp.destroy();
|
|
1113
|
-
setTimeout(this.setFocus.bind(this));
|
|
1114
|
-
}
|
|
1115
|
-
if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
|
|
1116
|
-
remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
PivotButton.prototype.setFocus = function () {
|
|
1120
|
-
if (this.parentElement) {
|
|
1121
|
-
var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
1122
|
-
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
1123
|
-
var item = pivotButtons_1[_i];
|
|
1124
|
-
if (item.getAttribute('data-uid') === this.fieldName) {
|
|
1125
|
-
item.focus();
|
|
1126
|
-
break;
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
};
|
|
1131
1141
|
PivotButton.prototype.ClearFilter = function (e) {
|
|
1132
|
-
var dialogElement = this.dialogPopUp.element;
|
|
1142
|
+
var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
|
|
1133
1143
|
var fieldName = dialogElement.getAttribute('data-fieldname');
|
|
1134
1144
|
var tabElement = dialogElement.querySelector('.e-selected-tab');
|
|
1135
|
-
this.dialogPopUp.close();
|
|
1145
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
1136
1146
|
if (this.parent.dataType === 'olap' && tabElement) {
|
|
1137
1147
|
var levelName = tabElement.getAttribute('data-selectedField');
|
|
1138
1148
|
this.removeDataSourceSettings(fieldName, levelName);
|
|
@@ -1149,63 +1159,73 @@ var PivotButton = /** @class */ (function () {
|
|
|
1149
1159
|
var target = args.target;
|
|
1150
1160
|
var fieldName = target.parentElement.id;
|
|
1151
1161
|
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
1162
|
+
this.parent.actionObj.actionName = events.removeField;
|
|
1163
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
1164
|
+
if (this.parent.actionBeginMethod()) {
|
|
1165
|
+
return;
|
|
1166
|
+
}
|
|
1152
1167
|
var removeFieldArgs = {
|
|
1153
1168
|
cancel: false, fieldName: fieldName,
|
|
1154
1169
|
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
|
|
1155
1170
|
fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
|
|
1156
1171
|
};
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
_this.parent.
|
|
1172
|
+
try {
|
|
1173
|
+
var control = this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
1174
|
+
this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
|
|
1175
|
+
control.trigger(events.fieldRemove, removeFieldArgs, function (observedArgs) {
|
|
1176
|
+
if (!observedArgs.cancel) {
|
|
1177
|
+
if (target.parentElement.getAttribute('isvalue') === 'true') {
|
|
1178
|
+
_this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
|
|
1179
|
+
if (_this.parent.dataType === 'olap') {
|
|
1180
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
1181
|
+
}
|
|
1165
1182
|
}
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1183
|
+
else {
|
|
1184
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
|
|
1185
|
+
if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
|
|
1186
|
+
fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
1187
|
+
observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
|
|
1188
|
+
_this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
|
|
1189
|
+
}
|
|
1190
|
+
if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
|
|
1191
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
1192
|
+
}
|
|
1173
1193
|
}
|
|
1174
|
-
if (_this.parent.
|
|
1175
|
-
_this.parent.
|
|
1194
|
+
if (_this.parent.getModuleName() === 'pivotfieldlist') {
|
|
1195
|
+
_this.parent.axisFieldModule.render();
|
|
1176
1196
|
}
|
|
1197
|
+
_this.updateDataSource();
|
|
1177
1198
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
});
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
catch (execption) {
|
|
1202
|
+
this.parent.actionFailureMethod(execption);
|
|
1203
|
+
}
|
|
1184
1204
|
};
|
|
1185
1205
|
/** @hidden */
|
|
1186
1206
|
PivotButton.prototype.nodeStateModified = function (args) {
|
|
1187
1207
|
var target = closest(args.node, 'li');
|
|
1188
1208
|
var fieldName = target.getAttribute('data-fieldname');
|
|
1189
1209
|
if (target.getAttribute('data-memberId') === 'all') {
|
|
1190
|
-
this.memberTreeView.nodeChecked = null;
|
|
1210
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
|
|
1191
1211
|
if (args.action === 'check') {
|
|
1192
|
-
this.memberTreeView.checkAll();
|
|
1212
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
|
|
1193
1213
|
}
|
|
1194
1214
|
else {
|
|
1195
|
-
this.memberTreeView.uncheckAll();
|
|
1215
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
|
|
1196
1216
|
}
|
|
1197
1217
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
1198
1218
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
1199
|
-
this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
1219
|
+
this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
1200
1220
|
}
|
|
1201
1221
|
this.checkedStateAll(args.action);
|
|
1202
|
-
this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
1222
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
1203
1223
|
}
|
|
1204
1224
|
else {
|
|
1205
1225
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
1206
1226
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
1207
1227
|
// let st1: number = new Date().getTime();
|
|
1208
|
-
var checkedNodes = this.memberTreeView.getAllCheckedNodes();
|
|
1228
|
+
var checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
1209
1229
|
// let st2: number = (new Date().getTime() - st1) / 1000;
|
|
1210
1230
|
// console.log('getAllCheckedNodes:' + st2);
|
|
1211
1231
|
this.updateNodeStates(checkedNodes, fieldName, args.action);
|
|
@@ -1248,8 +1268,8 @@ var PivotButton = /** @class */ (function () {
|
|
|
1248
1268
|
}
|
|
1249
1269
|
if (currentMembers[member]) {
|
|
1250
1270
|
currentMembers[member].isSelected = false;
|
|
1251
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
1252
|
-
var element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
1271
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
1272
|
+
var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
1253
1273
|
if (element && !element.querySelector('ul')) {
|
|
1254
1274
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
|
|
1255
1275
|
}
|
|
@@ -1259,8 +1279,8 @@ var PivotButton = /** @class */ (function () {
|
|
|
1259
1279
|
for (var _a = 0, checkedNodes_1 = checkedNodes; _a < checkedNodes_1.length; _a++) {
|
|
1260
1280
|
var node = checkedNodes_1[_a];
|
|
1261
1281
|
if (currentMembers[node]) {
|
|
1262
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
1263
|
-
var element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
1282
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
1283
|
+
var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
1264
1284
|
if (element && !element.querySelector('ul')) {
|
|
1265
1285
|
currentMembers[node].isSelected = true;
|
|
1266
1286
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
|
|
@@ -1298,10 +1318,10 @@ var PivotButton = /** @class */ (function () {
|
|
|
1298
1318
|
!engineModule.fieldList[fieldName].isHierarchy) {
|
|
1299
1319
|
var cMembers = engineModule.fieldList[fieldName].members;
|
|
1300
1320
|
var sMembers = engineModule.fieldList[fieldName].currrentMembers;
|
|
1301
|
-
filterItem.items = this.memberTreeView.getAllCheckedNodes();
|
|
1321
|
+
filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
1302
1322
|
filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
|
|
1303
1323
|
isNodeUnChecked = (filterItem.items.length ===
|
|
1304
|
-
this.memberTreeView.fields.dataSource.length ? false : true);
|
|
1324
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
|
|
1305
1325
|
if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
|
|
1306
1326
|
var cNodeLength = Object.keys(cMembers).length;
|
|
1307
1327
|
var sNodeLength = Object.keys(sMembers).length;
|
|
@@ -1364,13 +1384,18 @@ var PivotButton = /** @class */ (function () {
|
|
|
1364
1384
|
}
|
|
1365
1385
|
_this.parent.dataSourceSettings.filterSettings.push(filterItem);
|
|
1366
1386
|
}
|
|
1367
|
-
_this.dialogPopUp.close();
|
|
1387
|
+
_this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
1368
1388
|
if (!observedArgs.cancel) {
|
|
1369
1389
|
_this.refreshPivotButtonState(fieldName, isNodeUnChecked);
|
|
1370
1390
|
if (!isNodeUnChecked) {
|
|
1371
1391
|
_this.removeDataSourceSettings(fieldName);
|
|
1392
|
+
filterItem = {};
|
|
1372
1393
|
}
|
|
1373
1394
|
_this.parent.lastFilterInfo = filterItem;
|
|
1395
|
+
var actionInfo = {
|
|
1396
|
+
filterInfo: _this.parent.lastFilterInfo
|
|
1397
|
+
};
|
|
1398
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
1374
1399
|
_this.updateDataSource(true);
|
|
1375
1400
|
var thisObj = _this;
|
|
1376
1401
|
//setTimeout(() => {
|
|
@@ -1380,8 +1405,8 @@ var PivotButton = /** @class */ (function () {
|
|
|
1380
1405
|
//});
|
|
1381
1406
|
}
|
|
1382
1407
|
var pivotButtons = [].slice.call(_this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
1383
|
-
for (var _i = 0,
|
|
1384
|
-
var item =
|
|
1408
|
+
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
1409
|
+
var item = pivotButtons_1[_i];
|
|
1385
1410
|
if (item.getAttribute('data-uid') === fieldName) {
|
|
1386
1411
|
item.focus();
|
|
1387
1412
|
break;
|
|
@@ -1392,8 +1417,8 @@ var PivotButton = /** @class */ (function () {
|
|
|
1392
1417
|
PivotButton.prototype.refreshPivotButtonState = function (fieldName, isFiltered) {
|
|
1393
1418
|
var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
1394
1419
|
var selectedButton;
|
|
1395
|
-
for (var _i = 0,
|
|
1396
|
-
var item =
|
|
1420
|
+
for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
|
|
1421
|
+
var item = pivotButtons_2[_i];
|
|
1397
1422
|
if (item.getAttribute('data-uid') === fieldName) {
|
|
1398
1423
|
selectedButton = item.querySelector('.' + cls.FILTER_COMMON_CLASS);
|
|
1399
1424
|
break;
|
|
@@ -1526,14 +1551,6 @@ var PivotButton = /** @class */ (function () {
|
|
|
1526
1551
|
this.columnFieldDropDownList.destroy();
|
|
1527
1552
|
this.columnFieldDropDownList = null;
|
|
1528
1553
|
}
|
|
1529
|
-
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
1530
|
-
this.memberTreeView.destroy();
|
|
1531
|
-
this.memberTreeView = null;
|
|
1532
|
-
}
|
|
1533
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
1534
|
-
this.dialogPopUp.destroy();
|
|
1535
|
-
this.dialogPopUp = null;
|
|
1536
|
-
}
|
|
1537
1554
|
if (this.draggable && !this.draggable.isDestroyed) {
|
|
1538
1555
|
this.draggable.destroy();
|
|
1539
1556
|
this.draggable = null;
|