@syncfusion/ej2-pivotview 19.4.52 → 19.4.55
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 +25 -0
- 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 +82 -13
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +98 -28
- 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 +14 -14
- package/src/base/util.d.ts +2 -0
- package/src/base/util.js +59 -15
- package/src/common/actions/dataSource-update.js +1 -1
- package/src/common/popups/toolbar.js +1 -1
- package/src/pivotchart/base/pivotchart.d.ts +1 -1
- package/src/pivotchart/base/pivotchart.js +0 -7
- package/src/pivotfieldlist/base/field-list.d.ts +3 -1
- package/src/pivotfieldlist/base/field-list.js +12 -0
- package/src/pivotfieldlist/renderer/dialog-renderer.d.ts +2 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +17 -2
- package/src/pivotfieldlist/renderer/tree-renderer.js +1 -1
- package/src/pivotview/base/pivotview.js +7 -0
- package/src/pivotview/renderer/render.js +1 -1
- package/styles/bootstrap5-dark.css +1 -0
- package/styles/bootstrap5.css +1 -0
- package/styles/pivotview/_theme.scss +3 -0
- package/styles/pivotview/bootstrap5-dark.css +1 -0
- package/styles/pivotview/bootstrap5.css +1 -0
|
@@ -230,6 +230,49 @@ class PivotUtil {
|
|
|
230
230
|
return collection;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
+
static cloneOlapFieldSettings(collection) {
|
|
234
|
+
if (collection) {
|
|
235
|
+
let clonedCollection = [];
|
|
236
|
+
for (let set of collection) {
|
|
237
|
+
clonedCollection.push(this.getDefinedObj({
|
|
238
|
+
caption: set.caption,
|
|
239
|
+
hasChildren: set.hasChildren,
|
|
240
|
+
id: set.id,
|
|
241
|
+
isSelected: set.isSelected,
|
|
242
|
+
name: set.name,
|
|
243
|
+
spriteCssClass: set.spriteCssClass,
|
|
244
|
+
tag: set.tag,
|
|
245
|
+
type: set.type,
|
|
246
|
+
pid: set.pid,
|
|
247
|
+
expanded: set.expanded,
|
|
248
|
+
defaultHierarchy: set.defaultHierarchy,
|
|
249
|
+
hasAllMember: set.hasAllMember,
|
|
250
|
+
allMember: set.allMember,
|
|
251
|
+
isChecked: set.isChecked,
|
|
252
|
+
filterMembers: set.filterMembers,
|
|
253
|
+
childMembers: set.childMembers,
|
|
254
|
+
searchMembers: set.searchMembers,
|
|
255
|
+
htmlAttributes: set.htmlAttributes,
|
|
256
|
+
currrentMembers: set.currrentMembers,
|
|
257
|
+
isHierarchy: set.isHierarchy,
|
|
258
|
+
isNamedSets: set.isNamedSets,
|
|
259
|
+
formatString: set.formatString,
|
|
260
|
+
actualFilter: set.actualFilter,
|
|
261
|
+
levels: set.levels,
|
|
262
|
+
levelCount: set.levelCount,
|
|
263
|
+
memberType: set.memberType,
|
|
264
|
+
fieldType: set.fieldType,
|
|
265
|
+
parentHierarchy: set.parentHierarchy
|
|
266
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
267
|
+
}));
|
|
268
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
269
|
+
}
|
|
270
|
+
return clonedCollection;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
return collection;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
233
276
|
static cloneFilterSettings(collection) {
|
|
234
277
|
if (collection) {
|
|
235
278
|
let clonedCollection = [];
|
|
@@ -8666,7 +8709,7 @@ class Render {
|
|
|
8666
8709
|
if (isNaN(parHeight)) {
|
|
8667
8710
|
parHeight = parHeight > this.parent.minHeight ? parHeight : this.parent.minHeight;
|
|
8668
8711
|
}
|
|
8669
|
-
if (this.parent.currentView !== 'Chart') {
|
|
8712
|
+
if ((this.parent.showToolbar && this.parent.currentView !== 'Chart') || (!this.parent.showToolbar && this.parent.displayOption.view !== 'Chart')) {
|
|
8670
8713
|
if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
|
|
8671
8714
|
let rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
|
|
8672
8715
|
let gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS) ?
|
|
@@ -10101,7 +10144,7 @@ class DataSourceUpdate {
|
|
|
10101
10144
|
break;
|
|
10102
10145
|
case 'values':
|
|
10103
10146
|
droppedPosition !== -1 ? this.parent.dataSourceSettings.values.splice(droppedPosition, 0, dataSourceItem) : this.parent.dataSourceSettings.values.push(dataSourceItem);
|
|
10104
|
-
if (this.parent.dataType === 'olap' && !this.parent.engineModule.isMeasureAvail) {
|
|
10147
|
+
if (this.parent.dataType === 'olap' && !this.parent.engineModule.isMeasureAvail && !(this.parent.dataSourceSettings.values.length > 1)) {
|
|
10105
10148
|
let measureField = {
|
|
10106
10149
|
name: '[Measures]', caption: 'Measures', showRemoveIcon: true, allowDragAndDrop: true
|
|
10107
10150
|
};
|
|
@@ -15190,13 +15233,6 @@ class PivotChart {
|
|
|
15190
15233
|
}
|
|
15191
15234
|
this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
|
|
15192
15235
|
}
|
|
15193
|
-
this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
15194
|
-
this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
15195
|
-
this.parent.dataSourceSettings.values.length > 0 ? Number(this.parent.chart.height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
|
|
15196
|
-
isNaN(Number(this.getChartHeight())) ? this.getChartHeight().toString() : (Number(this.getChartHeight()) - 5).toString() :
|
|
15197
|
-
(!isNaN(Number(this.getChartHeight())) || this.parent.dataSourceSettings.values.length > 1) ?
|
|
15198
|
-
((this.parent.dataSourceSettings.values.length * 235) + 100).toString() :
|
|
15199
|
-
this.getChartHeight().toString() : this.getChartHeight().toString();
|
|
15200
15236
|
this.updateView();
|
|
15201
15237
|
this.parent.notify(contentReady, {});
|
|
15202
15238
|
this.parent.trigger(chartLoaded, args);
|
|
@@ -24641,6 +24677,13 @@ let PivotView = class PivotView extends Component {
|
|
|
24641
24677
|
if (this.chart && ((this.showToolbar && this.currentView === 'Chart') || !this.showToolbar)) {
|
|
24642
24678
|
this.chart.width = (this.showToolbar && this.grid) ? this.getGridWidthAsNumber().toString() :
|
|
24643
24679
|
(this.displayOption.view === 'Both' && this.grid) ? this.getGridWidthAsNumber().toString() : this.getWidthAsNumber().toString();
|
|
24680
|
+
this.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.chartSettings.chartSeries.type) < 0 &&
|
|
24681
|
+
this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis &&
|
|
24682
|
+
this.dataSourceSettings.values.length > 0 ? Number(this.chart.height) > (this.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
|
|
24683
|
+
isNaN(Number(this.pivotChartModule.getChartHeight())) ? this.pivotChartModule.getChartHeight().toString() : (Number(this.pivotChartModule.getChartHeight()) - 5).toString() :
|
|
24684
|
+
(!isNaN(Number(this.pivotChartModule.getChartHeight())) || this.dataSourceSettings.values.length > 1) ?
|
|
24685
|
+
((this.dataSourceSettings.values.length * 235) + 100).toString() :
|
|
24686
|
+
this.pivotChartModule.getChartHeight().toString() : this.pivotChartModule.getChartHeight().toString();
|
|
24644
24687
|
if (this.displayOption.view === 'Chart' && this.showGroupingBar && this.groupingBarModule &&
|
|
24645
24688
|
this.element.querySelector('.' + CHART_GROUPING_BAR_CLASS)) {
|
|
24646
24689
|
this.groupingBarModule.refreshUI();
|
|
@@ -27139,6 +27182,9 @@ class DialogRenderer {
|
|
|
27139
27182
|
onCheckChange(args) {
|
|
27140
27183
|
if (args.checked) {
|
|
27141
27184
|
this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
|
|
27185
|
+
if (this.parent.dataType === 'olap') {
|
|
27186
|
+
this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
|
|
27187
|
+
}
|
|
27142
27188
|
this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
|
|
27143
27189
|
}
|
|
27144
27190
|
this.parent.allowDeferLayoutUpdate = !this.parent.allowDeferLayoutUpdate;
|
|
@@ -27168,6 +27214,9 @@ class DialogRenderer {
|
|
|
27168
27214
|
let parent = this.parent;
|
|
27169
27215
|
parent.axisFieldModule.render();
|
|
27170
27216
|
parent.clonedDataSource = extend({}, parent.dataSourceSettings, null, true);
|
|
27217
|
+
if (this.parent.dataType === 'olap') {
|
|
27218
|
+
this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
|
|
27219
|
+
}
|
|
27171
27220
|
parent.clonedFieldList = extend({}, parent.pivotFieldList, null, true);
|
|
27172
27221
|
}
|
|
27173
27222
|
cancelButtonClick() {
|
|
@@ -27469,6 +27518,7 @@ class DialogRenderer {
|
|
|
27469
27518
|
let activeindex = this.adaptiveElement.selectedItem;
|
|
27470
27519
|
this.parent.treeViewModule.render(activeindex);
|
|
27471
27520
|
}
|
|
27521
|
+
/** @hidden */
|
|
27472
27522
|
onShowFieldList() {
|
|
27473
27523
|
this.parent.actionObj.actionName = showFieldList;
|
|
27474
27524
|
if (this.parent.actionBeginMethod()) {
|
|
@@ -27481,6 +27531,9 @@ class DialogRenderer {
|
|
|
27481
27531
|
this.parent.axisFieldModule.render();
|
|
27482
27532
|
}
|
|
27483
27533
|
this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
|
|
27534
|
+
if (this.parent.dataType === 'olap') {
|
|
27535
|
+
this.parent.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.parent.olapEngineModule.fieldListData);
|
|
27536
|
+
}
|
|
27484
27537
|
this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
|
|
27485
27538
|
}
|
|
27486
27539
|
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
@@ -27506,9 +27559,13 @@ class DialogRenderer {
|
|
|
27506
27559
|
}, true);
|
|
27507
27560
|
}
|
|
27508
27561
|
if (Object.keys(this.parent.clonedFieldList).length > 0) {
|
|
27509
|
-
this.parent.dataType === 'olap'
|
|
27510
|
-
|
|
27562
|
+
if (this.parent.dataType === 'olap' && this.parent.clonedFieldListData && Object.keys(this.parent.clonedFieldListData).length > 0) {
|
|
27563
|
+
this.parent.olapEngineModule.fieldListData = this.parent.clonedFieldListData;
|
|
27564
|
+
this.parent.olapEngineModule.fieldList = extend({}, this.parent.clonedFieldList, null, true);
|
|
27565
|
+
}
|
|
27566
|
+
else {
|
|
27511
27567
|
this.parent.engineModule.fieldList = extend({}, this.parent.clonedFieldList, null, true);
|
|
27568
|
+
}
|
|
27512
27569
|
}
|
|
27513
27570
|
if (this.parent.isPopupView && this.parent.pivotGridModule) {
|
|
27514
27571
|
this.parent.pivotGridModule.notify(uiUpdate, this);
|
|
@@ -28142,7 +28199,7 @@ class TreeViewRenderer {
|
|
|
28142
28199
|
this.parent.dataSourceSettings.values.splice(dropPosition, 0, newField) :
|
|
28143
28200
|
this.parent.dataSourceSettings.values.push(newField);
|
|
28144
28201
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
28145
|
-
!(this.parent.olapEngineModule).isMeasureAvail) {
|
|
28202
|
+
!(this.parent.olapEngineModule).isMeasureAvail && !(this.parent.dataSourceSettings.values.length > 1)) {
|
|
28146
28203
|
let measureField = {
|
|
28147
28204
|
name: '[Measures]', caption: 'Measures', baseField: undefined, baseItem: undefined
|
|
28148
28205
|
};
|
|
@@ -31020,6 +31077,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
31020
31077
|
this.pivotCommon.control = this;
|
|
31021
31078
|
if (this.allowDeferLayoutUpdate) {
|
|
31022
31079
|
this.clonedDataSource = extend({}, this.dataSourceSettings, null, true);
|
|
31080
|
+
if (this.dataType === 'olap') {
|
|
31081
|
+
this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.olapEngineModule.fieldListData);
|
|
31082
|
+
}
|
|
31023
31083
|
this.clonedFieldList = extend({}, this.pivotFieldList, null, true);
|
|
31024
31084
|
}
|
|
31025
31085
|
}
|
|
@@ -31199,6 +31259,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
31199
31259
|
if (pivot.isRequiredUpdate) {
|
|
31200
31260
|
if (pivot.allowDeferLayoutUpdate) {
|
|
31201
31261
|
pivot.clonedDataSource = extend({}, pivot.dataSourceSettings, null, true);
|
|
31262
|
+
if (this.dataType === 'olap') {
|
|
31263
|
+
this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.olapEngineModule.fieldListData);
|
|
31264
|
+
}
|
|
31202
31265
|
pivot.clonedFieldList = extend({}, pivot.pivotFieldList, null, true);
|
|
31203
31266
|
}
|
|
31204
31267
|
pivot.updateView(pivot.pivotGridModule);
|
|
@@ -31284,6 +31347,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
31284
31347
|
this.axisFieldModule.render();
|
|
31285
31348
|
if (!this.isPopupView && this.allowDeferLayoutUpdate) {
|
|
31286
31349
|
this.clonedDataSource = extend({}, this.dataSourceSettings, null, true);
|
|
31350
|
+
if (this.dataType === 'olap') {
|
|
31351
|
+
this.clonedFieldListData = PivotUtil.cloneOlapFieldSettings(this.olapEngineModule.fieldListData);
|
|
31352
|
+
}
|
|
31287
31353
|
this.clonedFieldList = extend({}, this.pivotFieldList, null, true);
|
|
31288
31354
|
}
|
|
31289
31355
|
}
|
|
@@ -31461,6 +31527,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
31461
31527
|
if (this.clonedFieldList) {
|
|
31462
31528
|
this.clonedFieldList = null;
|
|
31463
31529
|
}
|
|
31530
|
+
if (this.clonedFieldListData) {
|
|
31531
|
+
this.clonedFieldListData = null;
|
|
31532
|
+
}
|
|
31464
31533
|
if (this.localeObj) {
|
|
31465
31534
|
this.localeObj = null;
|
|
31466
31535
|
}
|
|
@@ -35415,7 +35484,7 @@ class Toolbar$2 {
|
|
|
35415
35484
|
break;
|
|
35416
35485
|
case (this.parent.element.id + 'fieldlist'):
|
|
35417
35486
|
if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
|
|
35418
|
-
this.parent.pivotFieldListModule.dialogRenderer.
|
|
35487
|
+
this.parent.pivotFieldListModule.dialogRenderer.onShowFieldList();
|
|
35419
35488
|
}
|
|
35420
35489
|
break;
|
|
35421
35490
|
case (this.parent.element.id + 'formatting'):
|