@syncfusion/ej2-pivotview 20.2.39 → 20.2.43
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 +14 -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 +274 -237
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +278 -241
- 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/common/base/constant.d.ts +2 -0
- package/src/common/base/constant.js +2 -0
- package/src/common/base/css-constant.d.ts +2 -4
- package/src/common/base/css-constant.js +3 -5
- package/src/common/base/interface.d.ts +11 -0
- package/src/common/calculatedfield/calculated-field.d.ts +3 -1
- package/src/common/calculatedfield/calculated-field.js +163 -168
- package/src/common/conditionalformatting/conditional-formatting.js +4 -3
- package/src/common/popups/grouping.js +2 -2
- package/src/common/popups/toolbar.js +6 -6
- package/src/pivotchart/base/pivotchart.js +16 -12
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.d.ts +1 -1
- package/src/pivotview/actions/excel-export.js +13 -4
- package/src/pivotview/actions/keyboard.js +6 -6
- package/src/pivotview/actions/pdf-export.d.ts +1 -1
- package/src/pivotview/actions/pdf-export.js +13 -2
- package/src/pivotview/base/pivotview-model.d.ts +7 -2
- package/src/pivotview/base/pivotview.d.ts +6 -2
- package/src/pivotview/base/pivotview.js +25 -18
- package/src/pivotview/renderer/render.js +24 -14
- package/styles/bootstrap-dark.css +22 -20
- package/styles/bootstrap.css +22 -20
- package/styles/bootstrap4.css +22 -20
- package/styles/bootstrap5-dark.css +22 -20
- package/styles/bootstrap5.css +22 -20
- package/styles/fabric-dark.css +22 -20
- package/styles/fabric.css +22 -20
- package/styles/fluent-dark.css +22 -20
- package/styles/fluent.css +22 -20
- package/styles/highcontrast-light.css +22 -20
- package/styles/highcontrast.css +22 -20
- package/styles/material-dark.css +22 -20
- package/styles/material.css +22 -20
- package/styles/pivotfieldlist/_layout.scss +13 -9
- package/styles/pivotfieldlist/_theme.scss +1 -2
- package/styles/pivotfieldlist/bootstrap-dark.css +22 -20
- package/styles/pivotfieldlist/bootstrap.css +22 -20
- package/styles/pivotfieldlist/bootstrap4.css +22 -20
- package/styles/pivotfieldlist/bootstrap5-dark.css +22 -20
- package/styles/pivotfieldlist/bootstrap5.css +22 -20
- package/styles/pivotfieldlist/fabric-dark.css +22 -20
- package/styles/pivotfieldlist/fabric.css +22 -20
- package/styles/pivotfieldlist/fluent-dark.css +22 -20
- package/styles/pivotfieldlist/fluent.css +22 -20
- package/styles/pivotfieldlist/highcontrast-light.css +22 -20
- package/styles/pivotfieldlist/highcontrast.css +22 -20
- package/styles/pivotfieldlist/material-dark.css +22 -20
- package/styles/pivotfieldlist/material.css +22 -20
- package/styles/pivotfieldlist/tailwind-dark.css +22 -20
- package/styles/pivotfieldlist/tailwind.css +22 -20
- package/styles/tailwind-dark.css +22 -20
- package/styles/tailwind.css +22 -20
|
@@ -38,6 +38,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
38
38
|
this.isFormula = false;
|
|
39
39
|
/** @hidden */
|
|
40
40
|
this.isRequireUpdate = false;
|
|
41
|
+
this.formatTypes = ['Standard', 'Currency', 'Percent', 'Custom', 'None'];
|
|
41
42
|
this.parent = parent;
|
|
42
43
|
this.existingReport = null;
|
|
43
44
|
this.parent.calculatedFieldModule = this;
|
|
@@ -143,7 +144,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
143
144
|
this.fieldText = node.getAttribute('data-caption');
|
|
144
145
|
this.formulaText = node.getAttribute('data-formula');
|
|
145
146
|
this.formatType = node.getAttribute('data-formatString');
|
|
146
|
-
this.formatText = this.formatType === 'Custom' ? node.getAttribute('data-
|
|
147
|
+
this.formatText = this.formatType === 'Custom' ? node.getAttribute('data-customformatstring') : null;
|
|
147
148
|
this.fieldType = node.getAttribute('data-membertype');
|
|
148
149
|
this.parentHierarchy = this.fieldType === 'Dimension' ? node.getAttribute('data-hierarchy') : null;
|
|
149
150
|
addClass([node.querySelector('.e-list-edit-icon')], cls.CALC_EDITED);
|
|
@@ -173,11 +174,19 @@ var CalculatedField = /** @class */ (function () {
|
|
|
173
174
|
closest(e.originalEvent.target, '.e-acrdn-header-icon')) {
|
|
174
175
|
var node = closest(e.originalEvent.target, '.e-acrdn-header').querySelector('.' + cls.CALCCHECK);
|
|
175
176
|
var fieldName = node.getAttribute('data-field');
|
|
177
|
+
var captionName = node.getAttribute('data-caption');
|
|
176
178
|
var formatObj = PivotUtil.getFieldByName(fieldName, this.parent.dataSourceSettings.formatSettings);
|
|
177
179
|
var optionElement = closest(e.originalEvent.target, '.e-acrdn-header-icon');
|
|
180
|
+
if (formatObj) {
|
|
181
|
+
var pivotFormat = this.getFormat(formatObj.format);
|
|
182
|
+
var formatString = (pivotFormat ? this.formatTypes.indexOf(pivotFormat) > -1 ?
|
|
183
|
+
formatObj.format : 'Custom' : 'None');
|
|
184
|
+
this.formatType = formatString;
|
|
185
|
+
}
|
|
178
186
|
if (optionElement.querySelector('.' + cls.CALC_EDIT) && e.originalEvent.target.classList.contains(cls.CALC_EDIT)) {
|
|
179
187
|
this.isEdit = true;
|
|
180
|
-
this.currentFieldName =
|
|
188
|
+
this.currentFieldName = fieldName;
|
|
189
|
+
this.fieldText = captionName ? captionName : fieldName;
|
|
181
190
|
this.formulaText = this.parent.engineModule.fieldList[fieldName].formula;
|
|
182
191
|
this.formatText = formatObj ? formatObj.format : '';
|
|
183
192
|
addClass([optionElement.querySelector('.e-list-icon')], cls.CALC_EDITED);
|
|
@@ -246,16 +255,16 @@ var CalculatedField = /** @class */ (function () {
|
|
|
246
255
|
this.inputObj.dataBind();
|
|
247
256
|
var formatString = node.getAttribute('data-formatString');
|
|
248
257
|
var dialogElement = this.dialog.element;
|
|
258
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
249
259
|
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
260
|
+
var customFormatString = node.getAttribute('data-customformatstring');
|
|
250
261
|
if (this.parent.dataType === 'olap') {
|
|
251
262
|
var memberType = node.getAttribute('data-membertype');
|
|
252
263
|
var parentHierarchy = node.getAttribute('data-hierarchy');
|
|
253
264
|
var expression = node.getAttribute('data-formula');
|
|
254
|
-
var customString = node.getAttribute('data-customString');
|
|
255
265
|
var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
256
266
|
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
257
267
|
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
258
|
-
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
259
268
|
/* eslint-enable max-len */
|
|
260
269
|
fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
|
|
261
270
|
select('#' + this.parentID + 'droppable', document).value = expression;
|
|
@@ -265,14 +274,8 @@ var CalculatedField = /** @class */ (function () {
|
|
|
265
274
|
if (memberType === 'Dimension') {
|
|
266
275
|
hierarchyDrop.value = parentHierarchy;
|
|
267
276
|
}
|
|
268
|
-
if (formatString !== '') {
|
|
269
|
-
formatDrop.value = formatString;
|
|
270
|
-
formatDrop.dataBind();
|
|
271
|
-
}
|
|
272
|
-
customFormat.value = customString;
|
|
273
277
|
}
|
|
274
278
|
else {
|
|
275
|
-
customFormat.value = formatString;
|
|
276
279
|
addClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDIT);
|
|
277
280
|
removeClass(this.treeObj.element.querySelectorAll('.' + cls.CALC_EDITED), cls.CALC_EDITED);
|
|
278
281
|
addClass([node.querySelector('.e-list-icon')], cls.CALC_EDITED);
|
|
@@ -280,6 +283,11 @@ var CalculatedField = /** @class */ (function () {
|
|
|
280
283
|
node.querySelector('.' + cls.CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
|
|
281
284
|
select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
|
|
282
285
|
}
|
|
286
|
+
if (formatString !== '') {
|
|
287
|
+
ddlFormatTypes.value = formatString;
|
|
288
|
+
ddlFormatTypes.dataBind();
|
|
289
|
+
}
|
|
290
|
+
customFormat.value = customFormatString;
|
|
283
291
|
customFormat.dataBind();
|
|
284
292
|
}
|
|
285
293
|
else if (node.tagName === 'LI' && (node.querySelector('.' + cls.CALC_EDITED) &&
|
|
@@ -294,15 +302,15 @@ var CalculatedField = /** @class */ (function () {
|
|
|
294
302
|
customFormat.dataBind();
|
|
295
303
|
if (this.parent.dataType === 'olap') {
|
|
296
304
|
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
297
|
-
var
|
|
305
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
298
306
|
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
299
307
|
var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
300
308
|
/* eslint-enable max-len */
|
|
301
309
|
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
302
310
|
hierarchyDrop.index = 0;
|
|
303
311
|
hierarchyDrop.dataBind();
|
|
304
|
-
|
|
305
|
-
|
|
312
|
+
ddlFormatTypes.index = 0;
|
|
313
|
+
ddlFormatTypes.dataBind();
|
|
306
314
|
memberTypeDrop.index = 0;
|
|
307
315
|
memberTypeDrop.readonly = false;
|
|
308
316
|
memberTypeDrop.dataBind();
|
|
@@ -695,18 +703,15 @@ var CalculatedField = /** @class */ (function () {
|
|
|
695
703
|
caption: this.inputObj.value,
|
|
696
704
|
formula: dropField.value
|
|
697
705
|
};
|
|
706
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
707
|
+
field.formatString = (ddlFormatTypes.value === 'Custom' ? customFormat.value : (ddlFormatTypes.value === 'None' ? null : ddlFormatTypes.value));
|
|
698
708
|
if (this.parent.dataType === 'olap') {
|
|
699
|
-
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
700
709
|
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
701
710
|
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
702
|
-
field.formatString = (formatDrop.value === 'Custom' ? customFormat.value : (formatDrop.value === 'None' ? null : formatDrop.value));
|
|
703
711
|
if (memberTypeDrop.value === 'Dimension') {
|
|
704
712
|
field.hierarchyUniqueName = hierarchyDrop.value;
|
|
705
713
|
}
|
|
706
714
|
}
|
|
707
|
-
else {
|
|
708
|
-
field.formatString = customFormat.value;
|
|
709
|
-
}
|
|
710
715
|
return field;
|
|
711
716
|
};
|
|
712
717
|
/* eslint-enable max-len */
|
|
@@ -787,21 +792,21 @@ var CalculatedField = /** @class */ (function () {
|
|
|
787
792
|
select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement).value = '';
|
|
788
793
|
select('#' + this.parentID + 'Custom_Format_Element', this.parent.dialogRenderer.parentElement).value = '';
|
|
789
794
|
if (this.parent.dataType === 'olap') {
|
|
790
|
-
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
791
|
-
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
792
795
|
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
793
796
|
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
794
|
-
formatDrop.index = 0;
|
|
795
|
-
formatDrop.dataBind();
|
|
796
797
|
memberTypeDrop.index = 0;
|
|
797
798
|
memberTypeDrop.readonly = false;
|
|
798
799
|
memberTypeDrop.dataBind();
|
|
799
800
|
hierarchyDrop.index = 0;
|
|
800
801
|
hierarchyDrop.enabled = false;
|
|
801
802
|
hierarchyDrop.dataBind();
|
|
802
|
-
customFormat.enabled = false;
|
|
803
|
-
customFormat.dataBind();
|
|
804
803
|
}
|
|
804
|
+
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
805
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
806
|
+
ddlFormatTypes.index = this.parent.dataType === 'olap' ? 0 : 4;
|
|
807
|
+
ddlFormatTypes.dataBind();
|
|
808
|
+
customFormat.enabled = false;
|
|
809
|
+
customFormat.dataBind();
|
|
805
810
|
/* eslint-enable max-len */
|
|
806
811
|
}
|
|
807
812
|
};
|
|
@@ -1094,7 +1099,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1094
1099
|
className: (this.parent.dataType === 'olap' ? cls.OLAP_CALCOUTERDIV + ' ' : '') + cls.CALCOUTERDIV
|
|
1095
1100
|
});
|
|
1096
1101
|
var olapFieldTreeDiv = createElement('div', { id: this.parentID + 'Olap_Tree_Div', className: 'e-olap-field-tree-div' });
|
|
1097
|
-
var
|
|
1102
|
+
var pivotCalcDiv = createElement('div', { id: this.parentID + 'Pivot_Calc_Div', className: 'e-pivot-calculated-div' });
|
|
1098
1103
|
if (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.
|
|
1099
1104
|
dialogRenderer.parentElement.querySelector('.' + cls.FORMULA) !== null && this.parent.isAdaptive) {
|
|
1100
1105
|
var accordDiv = createElement('div', { id: this.parentID + 'accordDiv', className: cls.CALCACCORD });
|
|
@@ -1118,7 +1123,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1118
1123
|
className: cls.PIVOT_FIELD_TITLE_CLASS, id: this.parentID + '_' + 'FieldNameTitle',
|
|
1119
1124
|
innerHTML: this.parent.localeObj.getConstant('fieldTitle')
|
|
1120
1125
|
});
|
|
1121
|
-
|
|
1126
|
+
pivotCalcDiv.appendChild(formulaTitle);
|
|
1122
1127
|
}
|
|
1123
1128
|
var inputDiv = createElement('div', { id: this.parentID + 'outerDiv', className: cls.CALCINPUTDIV });
|
|
1124
1129
|
var inputObj = createElement('input', {
|
|
@@ -1127,7 +1132,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1127
1132
|
className: cls.CALCINPUT
|
|
1128
1133
|
});
|
|
1129
1134
|
inputDiv.appendChild(inputObj);
|
|
1130
|
-
(this.parent.dataType === 'olap' && !this.parent.isAdaptive ?
|
|
1135
|
+
(this.parent.dataType === 'olap' && !this.parent.isAdaptive ? pivotCalcDiv.appendChild(inputDiv) : outerDiv.appendChild(inputDiv));
|
|
1131
1136
|
var wrapDiv = createElement('div', { id: this.parentID + 'control_container', className: cls.TREEVIEWOUTER });
|
|
1132
1137
|
if (!this.parent.isAdaptive) {
|
|
1133
1138
|
var fieldTitle = createElement('div', {
|
|
@@ -1174,7 +1179,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1174
1179
|
innerHTML: (this.parent.dataType === 'olap' ? this.parent.localeObj.getConstant('expressionField') :
|
|
1175
1180
|
this.parent.localeObj.getConstant('formula'))
|
|
1176
1181
|
});
|
|
1177
|
-
(this.parent.dataType === 'olap' ?
|
|
1182
|
+
(this.parent.dataType === 'olap' ? pivotCalcDiv.appendChild(formulaTitle) : outerDiv.appendChild(formulaTitle));
|
|
1178
1183
|
}
|
|
1179
1184
|
var dropDiv = createElement('textarea', {
|
|
1180
1185
|
id: this.parentID + 'droppable',
|
|
@@ -1185,7 +1190,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1185
1190
|
this.parent.localeObj.getConstant('dropText'))
|
|
1186
1191
|
}
|
|
1187
1192
|
});
|
|
1188
|
-
(this.parent.dataType === 'olap' && !this.parent.isAdaptive ?
|
|
1193
|
+
(this.parent.dataType === 'olap' && !this.parent.isAdaptive ? pivotCalcDiv.appendChild(dropDiv) : outerDiv.appendChild(dropDiv));
|
|
1189
1194
|
if (this.parent.isAdaptive) {
|
|
1190
1195
|
var buttonDiv = createElement('div', { id: this.parentID + 'buttonDiv', className: cls.CALCBUTTONDIV });
|
|
1191
1196
|
var okBtn = createElement('button', {
|
|
@@ -1201,63 +1206,51 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1201
1206
|
className: cls.OLAP_MEMBER_TITLE_CLASS,
|
|
1202
1207
|
innerHTML: this.parent.localeObj.getConstant('memberType')
|
|
1203
1208
|
});
|
|
1204
|
-
|
|
1209
|
+
pivotCalcDiv.appendChild(memberTypeTitle);
|
|
1205
1210
|
}
|
|
1206
1211
|
var memberTypeDrop = createElement('div', { id: this.parentID + 'Member_Type_Div', className: cls.CALC_MEMBER_TYPE_DIV });
|
|
1207
|
-
(this.parent.isAdaptive ? outerDiv.appendChild(memberTypeDrop) :
|
|
1212
|
+
(this.parent.isAdaptive ? outerDiv.appendChild(memberTypeDrop) : pivotCalcDiv.appendChild(memberTypeDrop));
|
|
1208
1213
|
if (!this.parent.isAdaptive) {
|
|
1209
1214
|
var hierarchyTitle = createElement('div', {
|
|
1210
1215
|
className: cls.OLAP_HIERARCHY_TITLE_CLASS,
|
|
1211
1216
|
innerHTML: this.parent.localeObj.getConstant('selectedHierarchy')
|
|
1212
1217
|
});
|
|
1213
|
-
|
|
1218
|
+
pivotCalcDiv.appendChild(hierarchyTitle);
|
|
1214
1219
|
}
|
|
1215
1220
|
var hierarchyDrop = createElement('div', { id: this.parentID + 'Hierarchy_List_Div', className: cls.CALC_HIERARCHY_LIST_DIV });
|
|
1216
|
-
(this.parent.isAdaptive ? outerDiv.appendChild(hierarchyDrop) :
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
olapCalcDiv.appendChild(formatTitle);
|
|
1223
|
-
}
|
|
1224
|
-
var formatDrop = createElement('div', { id: this.parentID + 'Format_Div', className: cls.CALC_FORMAT_TYPE_DIV });
|
|
1225
|
-
(this.parent.isAdaptive ? outerDiv.appendChild(formatDrop) : olapCalcDiv.appendChild(formatDrop));
|
|
1226
|
-
var customFormatDiv = createElement('div', { id: this.parentID + 'custom_Format_Div', className: cls.OLAP_CALC_CUSTOM_FORMAT_INPUTDIV });
|
|
1227
|
-
var customFormatObj = createElement('input', {
|
|
1228
|
-
id: this.parentID + 'Custom_Format_Element',
|
|
1229
|
-
attrs: { 'type': 'text' },
|
|
1230
|
-
className: cls.CALC_FORMAT_INPUT
|
|
1221
|
+
(this.parent.isAdaptive ? outerDiv.appendChild(hierarchyDrop) : pivotCalcDiv.appendChild(hierarchyDrop));
|
|
1222
|
+
}
|
|
1223
|
+
if (!this.parent.isAdaptive) {
|
|
1224
|
+
var formatTitle = createElement('div', {
|
|
1225
|
+
className: cls.PIVOT_FORMAT_TITLE_CLASS,
|
|
1226
|
+
innerHTML: this.parent.localeObj.getConstant('formatString')
|
|
1231
1227
|
});
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1228
|
+
pivotCalcDiv.appendChild(formatTitle);
|
|
1229
|
+
}
|
|
1230
|
+
var ddlFormatTypes = createElement('div', { id: this.parentID + 'Format_Div', className: cls.CALC_FORMAT_TYPE_DIV });
|
|
1231
|
+
(this.parent.isAdaptive ? outerDiv.appendChild(ddlFormatTypes) : pivotCalcDiv.appendChild(ddlFormatTypes));
|
|
1232
|
+
var customFormatDiv = createElement('div', {
|
|
1233
|
+
id: this.parentID + 'custom_Format_Div',
|
|
1234
|
+
className: cls.PIVOT_CALC_CUSTOM_FORMAT_INPUTDIV
|
|
1235
|
+
});
|
|
1236
|
+
var customFormatObj = createElement('input', {
|
|
1237
|
+
id: this.parentID + 'Custom_Format_Element',
|
|
1238
|
+
attrs: { 'type': 'text' },
|
|
1239
|
+
className: cls.CALC_FORMAT_INPUT
|
|
1240
|
+
});
|
|
1241
|
+
customFormatDiv.appendChild(customFormatObj);
|
|
1242
|
+
pivotCalcDiv.appendChild(customFormatDiv);
|
|
1243
|
+
(this.parent.isAdaptive ? outerDiv.appendChild(customFormatDiv) : pivotCalcDiv.appendChild(customFormatDiv));
|
|
1244
|
+
if (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.
|
|
1245
|
+
dialogRenderer.parentElement.querySelector('.' + cls.FORMULA) === null && this.parent.isAdaptive) {
|
|
1246
|
+
var okBtn = outerDiv.querySelector('.' + cls.CALCOKBTN);
|
|
1247
|
+
outerDiv.appendChild(okBtn);
|
|
1244
1248
|
}
|
|
1245
1249
|
else {
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
var formatTitle = createElement('div', {
|
|
1249
|
-
className: cls.OLAP_FORMAT_TITLE_CLASS,
|
|
1250
|
-
innerHTML: this.parent.localeObj.getConstant('formatString')
|
|
1251
|
-
});
|
|
1252
|
-
customFormatDiv.appendChild(formatTitle);
|
|
1250
|
+
if (this.parent.dataType === 'olap') {
|
|
1251
|
+
outerDiv.appendChild(olapFieldTreeDiv);
|
|
1253
1252
|
}
|
|
1254
|
-
|
|
1255
|
-
id: this.parentID + 'Custom_Format_Element',
|
|
1256
|
-
attrs: { 'type': 'text' },
|
|
1257
|
-
className: cls.CALC_FORMAT_INPUT
|
|
1258
|
-
});
|
|
1259
|
-
customFormatDiv.appendChild(customFormatObj);
|
|
1260
|
-
(this.parent.isAdaptive ? outerDiv.insertBefore(customFormatDiv, select('#' + this.parentID + 'buttonDiv', outerDiv)) : outerDiv.appendChild(customFormatDiv));
|
|
1253
|
+
outerDiv.appendChild(pivotCalcDiv);
|
|
1261
1254
|
}
|
|
1262
1255
|
}
|
|
1263
1256
|
return outerDiv;
|
|
@@ -1282,12 +1275,12 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1282
1275
|
this.parentHierarchy = this.fieldType === 'Dimension' ? hierarchyDrop.value : null;
|
|
1283
1276
|
}
|
|
1284
1277
|
if (dialogElement.element.querySelector('.' + cls.CALC_FORMAT_TYPE_DIV)) {
|
|
1285
|
-
var
|
|
1286
|
-
this.formatType =
|
|
1278
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement.element), DropDownList);
|
|
1279
|
+
this.formatType = ddlFormatTypes.value;
|
|
1287
1280
|
}
|
|
1288
1281
|
if (dialogElement.element.querySelector('.' + cls.CALC_FORMAT_INPUT)) {
|
|
1289
1282
|
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement.element), MaskedTextBox);
|
|
1290
|
-
this.formatText = this.parent.dataType === 'olap' ? this.formatType === 'Custom' ? customFormat.value : null
|
|
1283
|
+
this.formatText = (this.parent.dataType === 'olap' ? this.formatType : this.getFormat(this.formatType)) === 'Custom' ? customFormat.value : null;
|
|
1291
1284
|
}
|
|
1292
1285
|
}
|
|
1293
1286
|
else {
|
|
@@ -1333,9 +1326,8 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1333
1326
|
hierarchyDrop.dataBind();
|
|
1334
1327
|
}
|
|
1335
1328
|
if (dialogElement.querySelector('.' + cls.CALC_FORMAT_TYPE_DIV)) {
|
|
1336
|
-
var
|
|
1337
|
-
|
|
1338
|
-
this.formatType = formatDrop.value = (formatStringData.indexOf(calcInfo.formatString) > -1 ? calcInfo.formatString : 'Custom');
|
|
1329
|
+
var ddlFormatTypes = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
1330
|
+
this.formatType = ddlFormatTypes.value = (this.formatTypes.indexOf(calcInfo.formatString) > -1 ? calcInfo.formatString : 'Custom');
|
|
1339
1331
|
}
|
|
1340
1332
|
if (dialogElement.querySelector('.' + cls.CALC_FORMAT_INPUT)) {
|
|
1341
1333
|
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
@@ -1354,67 +1346,69 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1354
1346
|
* To create treeview.
|
|
1355
1347
|
* @returns {void}
|
|
1356
1348
|
*/
|
|
1357
|
-
CalculatedField.prototype.
|
|
1349
|
+
CalculatedField.prototype.createDropElements = function () {
|
|
1358
1350
|
var _this = this;
|
|
1359
1351
|
var dialogElement = (this.parent.isAdaptive ?
|
|
1360
1352
|
this.parent.dialogRenderer.parentElement : this.dialog.element);
|
|
1361
|
-
var mData = [];
|
|
1362
1353
|
var fData = [];
|
|
1363
1354
|
var fieldData = [];
|
|
1364
|
-
var
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
var
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
var
|
|
1377
|
-
|
|
1378
|
-
(item.spriteCssClass
|
|
1379
|
-
item.spriteCssClass.indexOf('e-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
var memberTypeObj = new DropDownList({
|
|
1384
|
-
dataSource: mData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1385
|
-
fields: { value: 'value', text: 'text' },
|
|
1386
|
-
value: this.fieldType !== null ? this.fieldType : mData[0].value,
|
|
1387
|
-
readonly: this.isEdit,
|
|
1388
|
-
cssClass: cls.MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
|
|
1389
|
-
change: function (args) {
|
|
1390
|
-
hierarchyListObj.enabled = args.value === 'Dimension' ? true : false;
|
|
1391
|
-
_this.fieldType = args.value;
|
|
1392
|
-
_this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
|
|
1393
|
-
hierarchyListObj.dataBind();
|
|
1394
|
-
}
|
|
1395
|
-
});
|
|
1396
|
-
memberTypeObj.isStringTemplate = true;
|
|
1397
|
-
memberTypeObj.appendTo(select('#' + this.parentID + 'Member_Type_Div', dialogElement));
|
|
1398
|
-
var hierarchyListObj = new DropDownList({
|
|
1399
|
-
dataSource: fieldData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1400
|
-
allowFiltering: true,
|
|
1401
|
-
enabled: memberTypeObj.value === 'Dimension' ? true : false,
|
|
1402
|
-
filterBarPlaceholder: this.parent.localeObj.getConstant('example') + ' ' + fieldData[0].text.toString(),
|
|
1403
|
-
fields: { value: 'value', text: 'text' },
|
|
1404
|
-
value: this.parentHierarchy !== null && memberTypeObj.value === 'Dimension' ?
|
|
1405
|
-
this.parentHierarchy : fieldData[0].value,
|
|
1406
|
-
cssClass: cls.MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
|
|
1407
|
-
change: function (args) {
|
|
1408
|
-
_this.parentHierarchy = args.value;
|
|
1409
|
-
_this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
|
|
1355
|
+
for (var _i = 0, _a = this.formatTypes; _i < _a.length; _i++) {
|
|
1356
|
+
var format = _a[_i];
|
|
1357
|
+
fData.push({ value: (this.parent.dataType === 'pivot' ? this.getFormat(format) : format), text: this.parent.localeObj.getConstant(format) });
|
|
1358
|
+
}
|
|
1359
|
+
if (this.parent.dataType === 'olap') {
|
|
1360
|
+
var mData = [];
|
|
1361
|
+
var memberTypeData = ['Measure', 'Dimension'];
|
|
1362
|
+
for (var _b = 0, memberTypeData_1 = memberTypeData; _b < memberTypeData_1.length; _b++) {
|
|
1363
|
+
var type = memberTypeData_1[_b];
|
|
1364
|
+
mData.push({ value: type, text: this.parent.localeObj.getConstant(type) });
|
|
1365
|
+
}
|
|
1366
|
+
var fields = PivotUtil.getClonedData(this.parent.olapEngineModule.fieldListData);
|
|
1367
|
+
for (var _c = 0, _d = fields; _c < _d.length; _c++) {
|
|
1368
|
+
var item = _d[_c];
|
|
1369
|
+
if (item.spriteCssClass &&
|
|
1370
|
+
(item.spriteCssClass.indexOf('e-attributeCDB-icon') > -1 ||
|
|
1371
|
+
item.spriteCssClass.indexOf('e-hierarchyCDB-icon') > -1)) {
|
|
1372
|
+
fieldData.push({ value: item.id, text: item.caption });
|
|
1373
|
+
}
|
|
1410
1374
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1375
|
+
var memberTypeObj = new DropDownList({
|
|
1376
|
+
dataSource: mData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1377
|
+
fields: { value: 'value', text: 'text' },
|
|
1378
|
+
value: this.fieldType !== null ? this.fieldType : mData[0].value,
|
|
1379
|
+
readonly: this.isEdit,
|
|
1380
|
+
cssClass: cls.MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
|
|
1381
|
+
change: function (args) {
|
|
1382
|
+
hierarchyListObj_1.enabled = args.value === 'Dimension' ? true : false;
|
|
1383
|
+
_this.fieldType = args.value;
|
|
1384
|
+
_this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
|
|
1385
|
+
hierarchyListObj_1.dataBind();
|
|
1386
|
+
}
|
|
1387
|
+
});
|
|
1388
|
+
memberTypeObj.isStringTemplate = true;
|
|
1389
|
+
memberTypeObj.appendTo(select('#' + this.parentID + 'Member_Type_Div', dialogElement));
|
|
1390
|
+
var hierarchyListObj_1 = new DropDownList({
|
|
1391
|
+
dataSource: fieldData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1392
|
+
allowFiltering: true,
|
|
1393
|
+
enabled: memberTypeObj.value === 'Dimension' ? true : false,
|
|
1394
|
+
filterBarPlaceholder: this.parent.localeObj.getConstant('example') + ' ' + fieldData[0].text.toString(),
|
|
1395
|
+
fields: { value: 'value', text: 'text' },
|
|
1396
|
+
value: this.parentHierarchy !== null && memberTypeObj.value === 'Dimension' ?
|
|
1397
|
+
this.parentHierarchy : fieldData[0].value,
|
|
1398
|
+
cssClass: cls.MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
|
|
1399
|
+
change: function (args) {
|
|
1400
|
+
_this.parentHierarchy = args.value;
|
|
1401
|
+
_this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1404
|
+
hierarchyListObj_1.isStringTemplate = true;
|
|
1405
|
+
hierarchyListObj_1.appendTo(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement));
|
|
1406
|
+
}
|
|
1414
1407
|
var formatStringObj = new DropDownList({
|
|
1415
1408
|
dataSource: fData, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
1416
1409
|
fields: { value: 'value', text: 'text' },
|
|
1417
|
-
value: this.formatType !== null ? this.formatType
|
|
1410
|
+
value: this.parent.isAdaptive && this.formatType !== null ? this.formatType
|
|
1411
|
+
: this.parent.dataType === 'olap' ? fData[0].value : fData[4].value,
|
|
1418
1412
|
cssClass: cls.MEMBER_OPTIONS_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), width: '100%',
|
|
1419
1413
|
change: function (args) {
|
|
1420
1414
|
customerFormatObj.enabled = args.value === 'Custom' ? true : false;
|
|
@@ -1439,6 +1433,30 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1439
1433
|
customerFormatObj.isStringTemplate = true;
|
|
1440
1434
|
customerFormatObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
|
|
1441
1435
|
};
|
|
1436
|
+
CalculatedField.prototype.getFormat = function (pivotFormat) {
|
|
1437
|
+
var format = pivotFormat;
|
|
1438
|
+
switch (format) {
|
|
1439
|
+
case 'Standard':
|
|
1440
|
+
format = 'N';
|
|
1441
|
+
break;
|
|
1442
|
+
case 'Currency':
|
|
1443
|
+
format = 'C';
|
|
1444
|
+
break;
|
|
1445
|
+
case 'Percent':
|
|
1446
|
+
format = 'P';
|
|
1447
|
+
break;
|
|
1448
|
+
case 'N':
|
|
1449
|
+
format = 'Standard';
|
|
1450
|
+
break;
|
|
1451
|
+
case 'C':
|
|
1452
|
+
format = 'Currency';
|
|
1453
|
+
break;
|
|
1454
|
+
case 'P':
|
|
1455
|
+
format = 'Percent';
|
|
1456
|
+
break;
|
|
1457
|
+
}
|
|
1458
|
+
return format;
|
|
1459
|
+
};
|
|
1442
1460
|
/**
|
|
1443
1461
|
* To create treeview.
|
|
1444
1462
|
* @returns {void}
|
|
@@ -1594,12 +1612,11 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1594
1612
|
args.node.setAttribute('data-membertype', field.fieldType);
|
|
1595
1613
|
args.node.setAttribute('data-hierarchy', field.parentHierarchy ? field.parentHierarchy : '');
|
|
1596
1614
|
args.node.setAttribute('data-formula', field.formula);
|
|
1597
|
-
var formatStringData = ['Standard', 'Currency', 'Percent', 'None'];
|
|
1598
1615
|
var formatString = void 0;
|
|
1599
|
-
formatString = (field.formatString ?
|
|
1616
|
+
formatString = (field.formatString ? this.formatTypes.indexOf(field.formatString) > -1 ?
|
|
1600
1617
|
field.formatString : 'Custom' : 'None');
|
|
1601
1618
|
args.node.setAttribute('data-formatString', formatString);
|
|
1602
|
-
args.node.setAttribute('data-
|
|
1619
|
+
args.node.setAttribute('data-customformatstring', (formatString === 'Custom' ? field.formatString : ''));
|
|
1603
1620
|
var removeElement = createElement('span', {
|
|
1604
1621
|
className: cls.GRID_REMOVE + ' e-icons e-list-icon'
|
|
1605
1622
|
});
|
|
@@ -1639,6 +1656,13 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1639
1656
|
args.node.setAttribute('data-type', args.nodeData.type);
|
|
1640
1657
|
var formatObj = PivotUtil.getFieldByName(field, this.parent.dataSourceSettings.formatSettings);
|
|
1641
1658
|
args.node.setAttribute('data-formatString', formatObj ? formatObj.format : '');
|
|
1659
|
+
if (formatObj) {
|
|
1660
|
+
var pivotFormat = this.getFormat(formatObj.format);
|
|
1661
|
+
var formatString = (pivotFormat ? this.formatTypes.indexOf(pivotFormat) > -1 ?
|
|
1662
|
+
formatObj.format : 'Custom' : 'None');
|
|
1663
|
+
args.node.setAttribute('data-customformatstring', (formatString === 'Custom' ? pivotFormat : ''));
|
|
1664
|
+
args.node.setAttribute('data-formatString', formatObj ? formatString : '');
|
|
1665
|
+
}
|
|
1642
1666
|
var dragElement = createElement('span', {
|
|
1643
1667
|
attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('dragField') },
|
|
1644
1668
|
className: cls.ICON + ' e-drag'
|
|
@@ -1717,7 +1741,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1717
1741
|
var key = keys[index];
|
|
1718
1742
|
data.push({
|
|
1719
1743
|
header: '<input id=' + this.parentID + '_' + index + ' class=' + cls.CALCCHECK + ' type="checkbox" data-field=' +
|
|
1720
|
-
key + ' data-caption=' + this.parent.engineModule.fieldList[key].caption + ' data-type=' +
|
|
1744
|
+
key + ' data-caption="' + this.parent.engineModule.fieldList[key].caption + '" data-type=' +
|
|
1721
1745
|
this.parent.engineModule.fieldList[key].type + '/>',
|
|
1722
1746
|
content: (this.parent.engineModule.fieldList[key].aggregateType === CALC ||
|
|
1723
1747
|
(this.getMenuItems(this.parent.engineModule.fieldList[key].type).length < 1)) ? '' :
|
|
@@ -1737,9 +1761,9 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1737
1761
|
var _this = this;
|
|
1738
1762
|
tabObj.items[4].content = this.renderDialogElements().outerHTML;
|
|
1739
1763
|
tabObj.dataBind();
|
|
1740
|
-
if (this.parent.
|
|
1764
|
+
if (this.parent.isAdaptive && this.parent.
|
|
1741
1765
|
dialogRenderer.parentElement.querySelector('.' + cls.FORMULA) !== null) {
|
|
1742
|
-
this.
|
|
1766
|
+
this.createDropElements();
|
|
1743
1767
|
}
|
|
1744
1768
|
var cancelBtn = new Button({ cssClass: cls.FLAT + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), isPrimary: true, locale: this.parent.locale, enableRtl: this.parent.enableRtl });
|
|
1745
1769
|
cancelBtn.isStringTemplate = true;
|
|
@@ -1763,25 +1787,6 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1763
1787
|
});
|
|
1764
1788
|
this.inputObj.isStringTemplate = true;
|
|
1765
1789
|
this.inputObj.appendTo('#' + this.parentID + 'ddlelement');
|
|
1766
|
-
if (this.parent.dataType === 'pivot') {
|
|
1767
|
-
var formatInputObj = new MaskedTextBox({
|
|
1768
|
-
locale: this.parent.locale, enableRtl: this.parent.enableRtl,
|
|
1769
|
-
placeholder: this.parent.localeObj.getConstant('numberFormatString'),
|
|
1770
|
-
change: function (args) {
|
|
1771
|
-
_this.formatText = args.value;
|
|
1772
|
-
_this.formulaText = select('#' + _this.parentID + 'droppable', document).value;
|
|
1773
|
-
},
|
|
1774
|
-
cssClass: this.parent.cssClass
|
|
1775
|
-
});
|
|
1776
|
-
formatInputObj.isStringTemplate = true;
|
|
1777
|
-
formatInputObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
|
|
1778
|
-
if (this.formatText !== null && this.parent.
|
|
1779
|
-
dialogRenderer.parentElement.querySelector('.' + cls.CALC_FORMAT_INPUT) !== null) {
|
|
1780
|
-
this.parent.
|
|
1781
|
-
dialogRenderer.parentElement.querySelector('.' + cls.CALC_FORMAT_INPUT).value = this.formatText;
|
|
1782
|
-
formatInputObj.value = this.formatText;
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
1790
|
if (this.formulaText !== null && select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement) !== null) {
|
|
1786
1791
|
var drop = select('#' + this.parentID + 'droppable', this.parent.dialogRenderer.parentElement);
|
|
1787
1792
|
drop.value = this.formulaText;
|
|
@@ -1994,18 +1999,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
1994
1999
|
});
|
|
1995
2000
|
this.inputObj.isStringTemplate = true;
|
|
1996
2001
|
this.inputObj.appendTo('#' + this.parentID + 'ddlelement');
|
|
1997
|
-
|
|
1998
|
-
var customerFormatObj = new MaskedTextBox({
|
|
1999
|
-
placeholder: this.parent.localeObj.getConstant('numberFormatString'),
|
|
2000
|
-
locale: this.parent.locale, enableRtl: this.parent.enableRtl,
|
|
2001
|
-
cssClass: this.parent.cssClass
|
|
2002
|
-
});
|
|
2003
|
-
customerFormatObj.isStringTemplate = true;
|
|
2004
|
-
customerFormatObj.appendTo('#' + this.parentID + 'Custom_Format_Element');
|
|
2005
|
-
}
|
|
2006
|
-
if (this.parent.dataType === 'olap' && !this.parent.isAdaptive) {
|
|
2007
|
-
this.createOlapDropElements();
|
|
2008
|
-
}
|
|
2002
|
+
this.createDropElements();
|
|
2009
2003
|
this.createTreeView();
|
|
2010
2004
|
this.droppable = new Droppable(select('#' + this.parentID + 'droppable'));
|
|
2011
2005
|
this.keyboardEvents = new KeyboardEvents(this.parent.calculatedFieldModule.dialog.element, {
|
|
@@ -2130,6 +2124,7 @@ var CalculatedField = /** @class */ (function () {
|
|
|
2130
2124
|
*/
|
|
2131
2125
|
CalculatedField.prototype.destroy = function () {
|
|
2132
2126
|
this.removeEventListener();
|
|
2127
|
+
this.formatTypes = null;
|
|
2133
2128
|
};
|
|
2134
2129
|
return CalculatedField;
|
|
2135
2130
|
}());
|
|
@@ -38,7 +38,8 @@ var ConditionalFormatting = /** @class */ (function () {
|
|
|
38
38
|
remove(select('#' + this.parentID + 'conditionalformatting', document));
|
|
39
39
|
}
|
|
40
40
|
this.parent.element.appendChild(createElement('div', {
|
|
41
|
-
id: this.parentID + 'conditionalformatting'
|
|
41
|
+
id: this.parentID + 'conditionalformatting',
|
|
42
|
+
className: cls.FORMAT_DIALOG
|
|
42
43
|
}));
|
|
43
44
|
var buttonModel = [
|
|
44
45
|
{
|
|
@@ -73,14 +74,14 @@ var ConditionalFormatting = /** @class */ (function () {
|
|
|
73
74
|
showCloseIcon: false, closeOnEscape: false, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
74
75
|
position: { X: 'center', Y: 'center' }, allowDragging: true, buttons: buttonModel,
|
|
75
76
|
beforeOpen: this.beforeOpen.bind(this), close: this.removeDialog.bind(this),
|
|
76
|
-
cssClass:
|
|
77
|
+
cssClass: this.parent.cssClass, header: this.parent.localeObj.getConstant('conditionalFormating'), target: document.body
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
else {
|
|
80
81
|
this.dialog = new Dialog({
|
|
81
82
|
allowDragging: true, position: { X: 'center', Y: this.parent.element.offsetTop }, buttons: buttonModel,
|
|
82
83
|
beforeOpen: this.beforeOpen.bind(this), close: this.removeDialog.bind(this),
|
|
83
|
-
cssClass:
|
|
84
|
+
cssClass: this.parent.cssClass, isModal: false, closeOnEscape: true, enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
84
85
|
showCloseIcon: true, header: this.parent.localeObj.getConstant('conditionalFormating'), target: this.parent.element
|
|
85
86
|
});
|
|
86
87
|
}
|
|
@@ -39,7 +39,7 @@ var Grouping = /** @class */ (function () {
|
|
|
39
39
|
this.parentElement = parentElement;
|
|
40
40
|
this.selectedCellsInfo = [];
|
|
41
41
|
this.isUpdate = false;
|
|
42
|
-
var colIndex = Number(target.getAttribute('
|
|
42
|
+
var colIndex = Number(target.getAttribute('data-colindex'));
|
|
43
43
|
var rowIndex = Number(target.getAttribute('index'));
|
|
44
44
|
var cell = this.parent.engineModule.pivotValues[rowIndex][colIndex];
|
|
45
45
|
var fieldName = cell.valueSort.axis.toString();
|
|
@@ -235,7 +235,7 @@ var Grouping = /** @class */ (function () {
|
|
|
235
235
|
/* eslint-enable */
|
|
236
236
|
for (var _i = 0, selectedElements_1 = selectedElements; _i < selectedElements_1.length; _i++) {
|
|
237
237
|
var element = selectedElements_1[_i];
|
|
238
|
-
var colIndex = Number(element.getAttribute('
|
|
238
|
+
var colIndex = Number(element.getAttribute('data-colindex'));
|
|
239
239
|
var rowIndex = Number(element.getAttribute('index'));
|
|
240
240
|
var cell = this.parent.engineModule.pivotValues[rowIndex][colIndex];
|
|
241
241
|
if (cell && (cell.axis === axis) && !(cell.type === 'grand sum' || cell.type === 'sum') &&
|