@syncfusion/ej2-pivotview 19.3.57 → 19.4.42
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 +40 -27
- 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 +2052 -1101
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2068 -1111
- 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 +78 -27
- 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 +10 -11
- package/src/pivotview/actions/pdf-export.js +13 -6
- 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 +288 -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 +145 -118
- package/styles/bootstrap.css +145 -118
- package/styles/bootstrap4.css +144 -95
- package/styles/bootstrap5-dark.css +250 -182
- package/styles/bootstrap5.css +245 -175
- package/styles/fabric-dark.css +147 -117
- package/styles/fabric.css +145 -116
- package/styles/highcontrast-light.css +146 -116
- package/styles/highcontrast.css +148 -118
- package/styles/material-dark.css +138 -111
- package/styles/material.css +138 -111
- 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 +213 -47
- package/styles/pivotfieldlist/bootstrap-dark.css +79 -72
- package/styles/pivotfieldlist/bootstrap.css +79 -72
- package/styles/pivotfieldlist/bootstrap4.css +74 -53
- package/styles/pivotfieldlist/bootstrap5-dark.css +145 -103
- package/styles/pivotfieldlist/bootstrap5.css +145 -103
- package/styles/pivotfieldlist/fabric-dark.css +79 -72
- package/styles/pivotfieldlist/fabric.css +79 -72
- package/styles/pivotfieldlist/highcontrast-light.css +79 -72
- package/styles/pivotfieldlist/highcontrast.css +79 -72
- 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 +74 -67
- package/styles/pivotfieldlist/material.css +74 -67
- package/styles/pivotfieldlist/tailwind-dark.css +168 -95
- package/styles/pivotfieldlist/tailwind.css +170 -97
- 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 +280 -159
- package/styles/tailwind.css +277 -154
|
@@ -63,41 +63,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
|
|
|
63
63
|
}
|
|
64
64
|
return clonedData;
|
|
65
65
|
};
|
|
66
|
-
PivotUtil.getClonedPivotValues = function (pivotValues) {
|
|
67
|
-
var clonedSets = [];
|
|
68
|
-
for (var i = 0; i < pivotValues.length; i++) {
|
|
69
|
-
if (pivotValues[i]) {
|
|
70
|
-
clonedSets[i] = [];
|
|
71
|
-
for (var j = 0; j < pivotValues[i].length; j++) {
|
|
72
|
-
if (pivotValues[i][j]) {
|
|
73
|
-
/* eslint-disable */
|
|
74
|
-
clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
|
|
75
|
-
/* eslint-enable */
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return clonedSets;
|
|
81
|
-
};
|
|
82
|
-
/* eslint-disable */
|
|
83
|
-
PivotUtil.getClonedPivotValueObj = function (data) {
|
|
84
|
-
/* eslint-enable */
|
|
85
|
-
var keyPos = 0;
|
|
86
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
87
|
-
var framedSet = {};
|
|
88
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
89
|
-
if (!(data === null || data === undefined)) {
|
|
90
|
-
var fields = Object.keys(data);
|
|
91
|
-
while (keyPos < fields.length) {
|
|
92
|
-
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
93
|
-
keyPos++;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
framedSet = data;
|
|
98
|
-
}
|
|
99
|
-
return framedSet;
|
|
100
|
-
};
|
|
101
66
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
102
67
|
PivotUtil.getDefinedObj = function (data) {
|
|
103
68
|
var keyPos = 0;
|
|
@@ -130,18 +95,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
|
|
|
130
95
|
return -1;
|
|
131
96
|
};
|
|
132
97
|
/* eslint-disable */
|
|
133
|
-
PivotUtil.isContainCommonElements = function (collection1, collection2) {
|
|
134
|
-
/* eslint-enable */
|
|
135
|
-
for (var i = 0, cnt = collection1.length; i < cnt; i++) {
|
|
136
|
-
for (var j = 0, lnt = collection2.length; j < lnt; j++) {
|
|
137
|
-
if (collection2[j] === collection1[i]) {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return false;
|
|
143
|
-
};
|
|
144
|
-
/* eslint-disable */
|
|
145
98
|
PivotUtil.setPivotProperties = function (control, properties) {
|
|
146
99
|
/* eslint-enable */
|
|
147
100
|
control.allowServerDataBinding = false;
|
|
@@ -178,6 +131,7 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
|
|
|
178
131
|
drilledMembers: this.cloneDrillMemberSettings(dataSourceSettings.drilledMembers),
|
|
179
132
|
valueSortSettings: this.CloneValueSortObject(dataSourceSettings.valueSortSettings),
|
|
180
133
|
valueAxis: dataSourceSettings.valueAxis,
|
|
134
|
+
grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
|
|
181
135
|
formatSettings: this.cloneFormatSettings(dataSourceSettings.formatSettings),
|
|
182
136
|
calculatedFieldSettings: this.cloneCalculatedFieldSettings(dataSourceSettings.calculatedFieldSettings),
|
|
183
137
|
fieldMapping: this.cloneFieldSettings(dataSourceSettings.fieldMapping),
|
|
@@ -224,6 +178,7 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
|
|
|
224
178
|
drilledMembers: dataSourceSettings.drilledMembers,
|
|
225
179
|
valueSortSettings: dataSourceSettings.valueSortSettings,
|
|
226
180
|
valueAxis: dataSourceSettings.valueAxis,
|
|
181
|
+
grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
|
|
227
182
|
formatSettings: dataSourceSettings.formatSettings,
|
|
228
183
|
calculatedFieldSettings: dataSourceSettings.calculatedFieldSettings,
|
|
229
184
|
fieldMapping: dataSourceSettings.fieldMapping,
|
|
@@ -645,174 +600,6 @@ var PivotUtil = /** @__PURE__ @class */ (function () {
|
|
|
645
600
|
return values;
|
|
646
601
|
};
|
|
647
602
|
/* eslint-disable */
|
|
648
|
-
PivotUtil.formatPdfHeaderFooter = function (pdf) {
|
|
649
|
-
var contents = [];
|
|
650
|
-
if (!isNullOrUndefined(pdf)) {
|
|
651
|
-
for (var i = 0; i < pdf.length; i++) {
|
|
652
|
-
var a = pdf[i];
|
|
653
|
-
var content = {
|
|
654
|
-
/* eslint-enable */
|
|
655
|
-
type: a.Type,
|
|
656
|
-
pageNumberType: a.PageNumberType,
|
|
657
|
-
style: a.Style ? {
|
|
658
|
-
penColor: a.Style.PenColor,
|
|
659
|
-
penSize: a.Style.PenSize,
|
|
660
|
-
dashStyle: a.Style.DashStyle,
|
|
661
|
-
textBrushColor: a.Style.TextBrushColor,
|
|
662
|
-
textPenColor: a.Style.TextPenColor,
|
|
663
|
-
fontSize: a.Style.FontSize,
|
|
664
|
-
hAlign: a.Style.HAlign,
|
|
665
|
-
vAlign: a.Style.VAlign
|
|
666
|
-
} : a.Style,
|
|
667
|
-
points: a.Points !== null ? {
|
|
668
|
-
x1: a.Points.X1,
|
|
669
|
-
y1: a.Points.Y1,
|
|
670
|
-
x2: a.Points.X2,
|
|
671
|
-
y2: a.Points.Y2
|
|
672
|
-
} : null,
|
|
673
|
-
format: a.Format,
|
|
674
|
-
position: a.Position !== null ? {
|
|
675
|
-
x: a.Position.X,
|
|
676
|
-
y: a.Position.Y
|
|
677
|
-
} : null,
|
|
678
|
-
size: a.Size !== null ? {
|
|
679
|
-
height: a.Size.Height,
|
|
680
|
-
width: a.Size.Width
|
|
681
|
-
} : null,
|
|
682
|
-
src: a.Src,
|
|
683
|
-
value: a.Value,
|
|
684
|
-
font: a.Font
|
|
685
|
-
};
|
|
686
|
-
contents.push(content);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
return contents;
|
|
690
|
-
};
|
|
691
|
-
/* eslint-disable */
|
|
692
|
-
PivotUtil.formatPdfExportProperties = function (pdf) {
|
|
693
|
-
var values;
|
|
694
|
-
/* eslint-enable */
|
|
695
|
-
values = this.getDefinedObj({
|
|
696
|
-
pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
|
|
697
|
-
pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
|
|
698
|
-
header: !isNullOrUndefined(pdf.Header) ? {
|
|
699
|
-
fromTop: pdf.Header.FromTop,
|
|
700
|
-
height: pdf.Header.Height,
|
|
701
|
-
contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
|
|
702
|
-
} : null,
|
|
703
|
-
columns: pdf.Columns,
|
|
704
|
-
footer: !isNullOrUndefined(pdf.Footer) ? {
|
|
705
|
-
fromTop: pdf.Footer.FromBottom,
|
|
706
|
-
height: pdf.Footer.Height,
|
|
707
|
-
contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
|
|
708
|
-
} : null,
|
|
709
|
-
includeHiddenColumn: pdf.IncludeHiddenColumn,
|
|
710
|
-
dataSource: pdf.DataSource,
|
|
711
|
-
exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
|
|
712
|
-
theme: !isNullOrUndefined(pdf.Theme) ? {
|
|
713
|
-
header: pdf.Theme.Header,
|
|
714
|
-
record: pdf.Theme.Record,
|
|
715
|
-
caption: pdf.Theme.Caption
|
|
716
|
-
} : null,
|
|
717
|
-
fileName: pdf.FileName,
|
|
718
|
-
hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
|
|
719
|
-
allowHorizontalOverflow: pdf.AllowHorizontalOverflow
|
|
720
|
-
});
|
|
721
|
-
return values;
|
|
722
|
-
};
|
|
723
|
-
/* eslint-disable */
|
|
724
|
-
PivotUtil.formatExcelStyle = function (style) {
|
|
725
|
-
var prop;
|
|
726
|
-
/* eslint-enable */
|
|
727
|
-
if (!isNullOrUndefined(style)) {
|
|
728
|
-
prop = this.getDefinedObj({
|
|
729
|
-
fontColor: style.FontColor,
|
|
730
|
-
fontName: style.FontName,
|
|
731
|
-
fontSize: style.FontSize,
|
|
732
|
-
hAlign: style.HAlign === String ? style.HAlign : null,
|
|
733
|
-
vAlign: style.VAlign === String ? style.VAlign : null,
|
|
734
|
-
bold: style.Bold,
|
|
735
|
-
indent: style.Indent,
|
|
736
|
-
italic: style.Italic,
|
|
737
|
-
underline: style.Underline,
|
|
738
|
-
backColor: style.BackColor,
|
|
739
|
-
wrapText: style.WrapText,
|
|
740
|
-
borders: style.Borders,
|
|
741
|
-
numberFormat: style.NumberFormat,
|
|
742
|
-
type: style.Type
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
return prop;
|
|
746
|
-
};
|
|
747
|
-
/* eslint-disable */
|
|
748
|
-
PivotUtil.formatExcelCell = function (cell) {
|
|
749
|
-
var cells = [];
|
|
750
|
-
if (!isNullOrUndefined(cell)) {
|
|
751
|
-
for (var i = 0; i < cell.length; i++) {
|
|
752
|
-
this.getDefinedObj({
|
|
753
|
-
index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
|
|
754
|
-
colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
|
|
755
|
-
value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
|
|
756
|
-
hyperlink: {
|
|
757
|
-
target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
|
|
758
|
-
displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
|
|
759
|
-
},
|
|
760
|
-
styles: this.formatExcelStyle(cell[i].Style),
|
|
761
|
-
rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
|
|
762
|
-
});
|
|
763
|
-
/* eslint-enable */
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
return cells;
|
|
767
|
-
};
|
|
768
|
-
/* eslint-disable */
|
|
769
|
-
PivotUtil.formatExcelHeaderFooter = function (excel) {
|
|
770
|
-
var rows = [];
|
|
771
|
-
if (!isNullOrUndefined(excel)) {
|
|
772
|
-
for (var i = 0; i < excel.Rows.length; i++) {
|
|
773
|
-
var row = excel.Rows[i];
|
|
774
|
-
var prop = this.getDefinedObj({
|
|
775
|
-
index: !isNullOrUndefined(row.Index) ? row.Index : null,
|
|
776
|
-
cells: this.formatExcelCell(row.Cells),
|
|
777
|
-
grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
|
|
778
|
-
});
|
|
779
|
-
rows.push(prop);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
return rows;
|
|
783
|
-
};
|
|
784
|
-
PivotUtil.formatExcelExportProperties = function (excel) {
|
|
785
|
-
/* eslint-enable */
|
|
786
|
-
var prop;
|
|
787
|
-
prop = this.getDefinedObj({
|
|
788
|
-
dataSource: excel.DataSource,
|
|
789
|
-
query: excel.Query,
|
|
790
|
-
multipleExport: this.getDefinedObj({
|
|
791
|
-
type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
|
|
792
|
-
blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
|
|
793
|
-
}),
|
|
794
|
-
header: this.getDefinedObj({
|
|
795
|
-
headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
|
|
796
|
-
rows: this.formatExcelHeaderFooter(excel.Header)
|
|
797
|
-
}),
|
|
798
|
-
footer: this.getDefinedObj({
|
|
799
|
-
footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
|
|
800
|
-
rows: this.formatExcelHeaderFooter(excel.Footer)
|
|
801
|
-
}),
|
|
802
|
-
columns: excel.Columns,
|
|
803
|
-
exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
|
|
804
|
-
includeHiddenColumn: excel.IncludeHiddenColumn,
|
|
805
|
-
theme: !isNullOrUndefined(excel.Theme) ? {
|
|
806
|
-
header: this.formatExcelStyle(excel.Theme.Header),
|
|
807
|
-
record: this.formatExcelStyle(excel.Theme.Record),
|
|
808
|
-
caption: this.formatExcelStyle(excel.Theme.Caption)
|
|
809
|
-
} : undefined,
|
|
810
|
-
fileName: excel.FileName,
|
|
811
|
-
hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
|
|
812
|
-
});
|
|
813
|
-
return prop;
|
|
814
|
-
};
|
|
815
|
-
/* eslint-disable */
|
|
816
603
|
PivotUtil.formatFieldList = function (fieldList) {
|
|
817
604
|
var keys = Object.keys(fieldList);
|
|
818
605
|
var fList = {};
|
|
@@ -1124,7 +911,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1124
911
|
this.isLastHeaderHasMeasures = true;
|
|
1125
912
|
this.isEditing = false;
|
|
1126
913
|
var fields;
|
|
1127
|
-
this.globalize = new Internationalization();
|
|
914
|
+
this.globalize = (customProperties && customProperties.globalize) ? customProperties.globalize : new Internationalization();
|
|
915
|
+
this.currencyCode = (customProperties && customProperties.currenyCode) ? customProperties.currenyCode : undefined;
|
|
1128
916
|
this.localeObj = customProperties ? customProperties.localeObj : undefined;
|
|
1129
917
|
this.fieldsType = customProperties ? customProperties.fieldsType : {};
|
|
1130
918
|
this.clonedReport = customProperties ? (customProperties.clonedReport &&
|
|
@@ -1138,6 +926,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1138
926
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
1139
927
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
1140
928
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
929
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
1141
930
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
1142
931
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
1143
932
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -1251,6 +1040,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1251
1040
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
1252
1041
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
1253
1042
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
1043
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
1254
1044
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
1255
1045
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
1256
1046
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -1553,6 +1343,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1553
1343
|
}
|
|
1554
1344
|
if (!PivotUtil.getFieldByName(groupKeys[gCnt], dataFields)) {
|
|
1555
1345
|
groupField = groupFields[groupKeys[gCnt]];
|
|
1346
|
+
caption_1 = (caption_1.indexOf(' (') !== -1 && caption_1.indexOf(')') !== -1) ? caption_1.slice(caption_1.indexOf('(') + 1, caption_1.length - 1) : caption_1;
|
|
1556
1347
|
var newField = {
|
|
1557
1348
|
name: groupKeys[gCnt],
|
|
1558
1349
|
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_1 + ')',
|
|
@@ -1580,6 +1371,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1580
1371
|
}
|
|
1581
1372
|
}
|
|
1582
1373
|
gCnt = Object.keys(groupKeys).length;
|
|
1374
|
+
var field = this_1.getMappingField(fieldName, this_1.clonedReport ? this_1.clonedReport.fieldMapping : this_1.fieldMapping);
|
|
1375
|
+
var caption_2 = field.caption ? field.caption : fieldName;
|
|
1583
1376
|
while (gCnt--) {
|
|
1584
1377
|
groupField = groupFields[groupKeys[gCnt]];
|
|
1585
1378
|
for (var i = 0, len_3 = this_1.formats.length; i < len_3; i++) {
|
|
@@ -1598,6 +1391,33 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1598
1391
|
};
|
|
1599
1392
|
this_1.formats.push(formatSettings);
|
|
1600
1393
|
}
|
|
1394
|
+
if (!isDataSource) {
|
|
1395
|
+
var mappingField = this_1.getMappingField(groupKeys[gCnt], this_1.fieldMapping);
|
|
1396
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
1397
|
+
var newField = {
|
|
1398
|
+
name: groupKeys[gCnt],
|
|
1399
|
+
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
|
|
1400
|
+
};
|
|
1401
|
+
this_1.fieldMapping.push(newField);
|
|
1402
|
+
}
|
|
1403
|
+
else if (groupKeys[gCnt] !== fieldName) {
|
|
1404
|
+
mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
if (!isDataSource) {
|
|
1409
|
+
var mappingField = this_1.getMappingField(fieldName, this_1.fieldMapping);
|
|
1410
|
+
groupField = groupFields[fieldName];
|
|
1411
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
1412
|
+
var newField = {
|
|
1413
|
+
name: fieldName,
|
|
1414
|
+
caption: (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')'
|
|
1415
|
+
};
|
|
1416
|
+
this_1.fieldMapping.push(newField);
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
mappingField.caption = (this_1.localeObj ? this_1.localeObj.getConstant(groupField) : groupField) + ' (' + caption_2 + ')';
|
|
1420
|
+
}
|
|
1601
1421
|
}
|
|
1602
1422
|
}
|
|
1603
1423
|
else if (group.type === 'Number' && group.rangeInterval) {
|
|
@@ -1846,7 +1666,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1846
1666
|
this.fieldList = this.savedFieldList;
|
|
1847
1667
|
while (len--) { /** while is used for better performance than for */
|
|
1848
1668
|
var key = keys[len];
|
|
1849
|
-
var field = this.getMappingField(key);
|
|
1669
|
+
var field = this.getMappingField(key, this.fieldMapping);
|
|
1850
1670
|
if (this.fieldList[key]) {
|
|
1851
1671
|
this.fieldList[key].isSelected = false;
|
|
1852
1672
|
this.fieldList[key].index = len;
|
|
@@ -1925,7 +1745,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1925
1745
|
this.fieldList = {};
|
|
1926
1746
|
while (len--) { /** while is used for better performance than for */
|
|
1927
1747
|
var key = keys[len];
|
|
1928
|
-
var field = this.getMappingField(key);
|
|
1748
|
+
var field = this.getMappingField(key, this.fieldMapping);
|
|
1929
1749
|
type = (field && 'dataType' in field && field.dataType && dataTypes.indexOf(field.dataType.toLowerCase()) > -1) ?
|
|
1930
1750
|
field.dataType.toLowerCase() : PivotUtil.getType(fields[this.fieldKeys[key]]);
|
|
1931
1751
|
this.fieldList[key] = {
|
|
@@ -1969,12 +1789,12 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1969
1789
|
}
|
|
1970
1790
|
this.updateTreeViewData(dataFields);
|
|
1971
1791
|
};
|
|
1972
|
-
PivotEngine.prototype.getMappingField = function (key) {
|
|
1792
|
+
PivotEngine.prototype.getMappingField = function (key, fieldMapping) {
|
|
1973
1793
|
var field = {};
|
|
1974
|
-
if (
|
|
1975
|
-
for (var index = 0, cnt =
|
|
1976
|
-
if (
|
|
1977
|
-
field =
|
|
1794
|
+
if (fieldMapping.length > 0) {
|
|
1795
|
+
for (var index = 0, cnt = fieldMapping.length; index < cnt; index++) {
|
|
1796
|
+
if (fieldMapping[index].name === key) {
|
|
1797
|
+
field = fieldMapping[index];
|
|
1978
1798
|
break;
|
|
1979
1799
|
}
|
|
1980
1800
|
}
|
|
@@ -2548,8 +2368,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
2548
2368
|
field.filter = filter;
|
|
2549
2369
|
field.filterType = type;
|
|
2550
2370
|
field.isExcelFilter = isLabelFilter;
|
|
2551
|
-
var members = (this.formatFields[name] &&
|
|
2552
|
-
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) ?
|
|
2371
|
+
var members = ((this.formatFields[name] &&
|
|
2372
|
+
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) || (name in this.groupingFields)) ?
|
|
2553
2373
|
field.formattedMembers : field.members;
|
|
2554
2374
|
var allowFil = isInclude;
|
|
2555
2375
|
var final = {};
|
|
@@ -2596,7 +2416,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
2596
2416
|
};
|
|
2597
2417
|
PivotEngine.prototype.applyValueFiltering = function (rowData, level, rows, columns, valueFilter, rowFilterData, type) {
|
|
2598
2418
|
this.isValueFiltered = false;
|
|
2599
|
-
var allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : rows[rows.length - 1]), null, true);
|
|
2419
|
+
var allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : (!(this.grandTotalsPosition === 'Top') ? rows[rows.length - 1] : rows[0])), null, true);
|
|
2600
2420
|
this.getFilteredData(rows, columns, valueFilter, rowFilterData, level, rowData.name, allMember, type);
|
|
2601
2421
|
if (this.isValueFiltered) {
|
|
2602
2422
|
if ((type === 'row' && this.rowGrandTotal === null) || (type === 'column' && this.columnGrandTotal === null)) {
|
|
@@ -2942,14 +2762,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
2942
2762
|
for (var i = 0; i < rLen; i++) {
|
|
2943
2763
|
if (filterElement.name === rows[i].name && valueFields[filterElement.measure] && !isAvail) {
|
|
2944
2764
|
isAvail = true;
|
|
2945
|
-
rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
|
|
2765
|
+
rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : (this.grandTotalsPosition === 'Top' && this.showGrandTotals) ? columnHeaders[0] : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
|
|
2946
2766
|
break;
|
|
2947
2767
|
}
|
|
2948
2768
|
}
|
|
2949
2769
|
for (var j = 0; j < cLen; j++) {
|
|
2950
2770
|
if (filterElement.name === columns[j].name && valueFields[filterElement.measure] && !isAvail) {
|
|
2951
2771
|
isAvail = true;
|
|
2952
|
-
columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
|
|
2772
|
+
columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : (this.grandTotalsPosition === 'Top' && this.showGrandTotals) ? rowHeaders[0] : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
|
|
2953
2773
|
break;
|
|
2954
2774
|
}
|
|
2955
2775
|
}
|
|
@@ -3260,7 +3080,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
3260
3080
|
}
|
|
3261
3081
|
var engine = this;
|
|
3262
3082
|
return headers.filter(function (item) {
|
|
3263
|
-
return item.members.length > 0
|
|
3083
|
+
return (item.members.length > 0 || item.type === 'grand sum') ? true : engine.matchIndexes(item.indexObject, filterObjects);
|
|
3264
3084
|
});
|
|
3265
3085
|
};
|
|
3266
3086
|
PivotEngine.prototype.matchIndexes = function (index, filterObjects) {
|
|
@@ -3340,6 +3160,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
3340
3160
|
}
|
|
3341
3161
|
/* eslint-enable */
|
|
3342
3162
|
rawHeaders = this.getSortedHeaders(rawHeaders.concat(excessHeaders), this.fieldList[headersInfo.fields[0].name].sort).concat(grandHeader);
|
|
3163
|
+
if (headersInfo.axis === 'row') {
|
|
3164
|
+
this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, this.filterMembers, 'column', '');
|
|
3165
|
+
this.insertAllMember(this.cMembers, this.filterMembers, '', 'column');
|
|
3166
|
+
}
|
|
3167
|
+
else {
|
|
3168
|
+
this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, this.filterMembers, 'row', '');
|
|
3169
|
+
this.insertAllMember(this.rMembers, this.filterMembers, '', 'row');
|
|
3170
|
+
}
|
|
3343
3171
|
}
|
|
3344
3172
|
if (headersInfo.axis === 'row') {
|
|
3345
3173
|
this.rowCount = 0;
|
|
@@ -3485,8 +3313,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
3485
3313
|
}
|
|
3486
3314
|
}
|
|
3487
3315
|
if (stringValue.length > 0) {
|
|
3488
|
-
stringValue = childrens.sort === 'Ascending' ? (stringValue.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
|
|
3489
|
-
childrens.sort === 'Descending' ? (stringValue.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) : stringValue;
|
|
3316
|
+
stringValue = childrens.sort === 'Ascending' ? (stringValue.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0)); })) :
|
|
3317
|
+
childrens.sort === 'Descending' ? (stringValue.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0)); })) : stringValue;
|
|
3490
3318
|
}
|
|
3491
3319
|
if (alphaNumbervalue.length > 0) {
|
|
3492
3320
|
alphaNumbervalue = childrens.sort === 'Ascending' ?
|
|
@@ -3499,9 +3327,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
3499
3327
|
}
|
|
3500
3328
|
else {
|
|
3501
3329
|
return sortOrder === 'Ascending' ?
|
|
3502
|
-
(headers.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
|
|
3330
|
+
(headers.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0)); })) :
|
|
3503
3331
|
sortOrder === 'Descending' ?
|
|
3504
|
-
(headers.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) :
|
|
3332
|
+
(headers.sort(function (a, b) { return (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0)); })) :
|
|
3505
3333
|
headers;
|
|
3506
3334
|
}
|
|
3507
3335
|
}
|
|
@@ -3521,7 +3349,8 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
3521
3349
|
this.valueSortHeaderText = undefined;
|
|
3522
3350
|
if (this.enableValueSorting && this.valueSortSettings.headerText && !this.valueSortHeaderText &&
|
|
3523
3351
|
this.valueSortSettings.headerText !== '' && this.values.length > 0) {
|
|
3524
|
-
|
|
3352
|
+
this.valueSortHeaderText = this.valueSortSettings.headerText;
|
|
3353
|
+
var textArray = this.valueSortHeaderText.split(this.valueSortSettings.headerDelimiter);
|
|
3525
3354
|
for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
|
|
3526
3355
|
var field = _a[_i];
|
|
3527
3356
|
var name_1 = field.caption ? field.caption : field.name;
|
|
@@ -4311,7 +4140,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4311
4140
|
PivotEngine.prototype.insertAllMember = function (set, filter, customText, axis) {
|
|
4312
4141
|
var len = set.length;
|
|
4313
4142
|
customText = ' Total';
|
|
4314
|
-
|
|
4143
|
+
var grandTotalSet = {
|
|
4315
4144
|
hasChild: false,
|
|
4316
4145
|
index: filter,
|
|
4317
4146
|
level: 0,
|
|
@@ -4325,13 +4154,14 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4325
4154
|
type: 'grand sum',
|
|
4326
4155
|
valueSort: {}
|
|
4327
4156
|
};
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4157
|
+
grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
|
|
4158
|
+
grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
|
|
4159
|
+
grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
|
|
4160
|
+
grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
|
|
4332
4161
|
for (var ln = 0, lt = filter.length; ln < lt; ln++) {
|
|
4333
|
-
|
|
4162
|
+
grandTotalSet.indexObject[filter[ln]] = filter[ln];
|
|
4334
4163
|
}
|
|
4164
|
+
(this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
|
|
4335
4165
|
// if (axis === 'row') {
|
|
4336
4166
|
// this.rowCount += this.rowValuesLength;
|
|
4337
4167
|
// } else {
|
|
@@ -4379,7 +4209,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4379
4209
|
for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4380
4210
|
if (!isValueIndexFound) {
|
|
4381
4211
|
for (vln = 0; vln < vlt; vln++) {
|
|
4382
|
-
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().
|
|
4212
|
+
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
4383
4213
|
isValueIndexFound = true;
|
|
4384
4214
|
isValueCellUpdated = true;
|
|
4385
4215
|
break;
|
|
@@ -4414,7 +4244,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4414
4244
|
for (var cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4415
4245
|
for (var vln = 0; vln < vlt; vln++) {
|
|
4416
4246
|
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
4417
|
-
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().
|
|
4247
|
+
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
4418
4248
|
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4419
4249
|
dln = data[tnum].length;
|
|
4420
4250
|
}
|
|
@@ -5371,6 +5201,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
5371
5201
|
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
5372
5202
|
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
|
|
5373
5203
|
}
|
|
5204
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
5205
|
+
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(0, 1), vcnt, -1);
|
|
5206
|
+
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(1, axis.length), vcnt, 0);
|
|
5207
|
+
}
|
|
5374
5208
|
else {
|
|
5375
5209
|
var hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
|
|
5376
5210
|
this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
|
|
@@ -5411,6 +5245,10 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
5411
5245
|
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
|
|
5412
5246
|
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
|
|
5413
5247
|
}
|
|
5248
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
5249
|
+
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(0, 1), this.values.length, -1);
|
|
5250
|
+
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(1, this.rMembers.length), this.values.length, 0);
|
|
5251
|
+
}
|
|
5414
5252
|
else {
|
|
5415
5253
|
var hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
|
|
5416
5254
|
this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
|
|
@@ -6016,6 +5854,12 @@ var fieldDragStart = 'fieldDragStart';
|
|
|
6016
5854
|
var chartPointClick = 'chartPointClick';
|
|
6017
5855
|
/** @hidden */
|
|
6018
5856
|
var beforeServiceInvoke = 'beforeServiceInvoke';
|
|
5857
|
+
/** @hidden */
|
|
5858
|
+
var actionBegin = 'actionBegin';
|
|
5859
|
+
/** @hidden */
|
|
5860
|
+
var actionComplete = 'actionComplete';
|
|
5861
|
+
/** @hidden */
|
|
5862
|
+
var actionFailure = 'actionFailure';
|
|
6019
5863
|
/**
|
|
6020
5864
|
* Specifies pivot internal events
|
|
6021
5865
|
*/
|
|
@@ -6045,6 +5889,186 @@ var initToolbar = 'init-toolbar';
|
|
|
6045
5889
|
var initFormatting = 'init-formatting';
|
|
6046
5890
|
/** @hidden */
|
|
6047
5891
|
var initGrouping = 'init-grouping';
|
|
5892
|
+
/**
|
|
5893
|
+
* Specifies action names of actionBegin events
|
|
5894
|
+
*/
|
|
5895
|
+
/** @hidden */
|
|
5896
|
+
var sortValue = 'Sort value';
|
|
5897
|
+
/** @hidden */
|
|
5898
|
+
var drillUp = 'Drill up';
|
|
5899
|
+
/** @hidden */
|
|
5900
|
+
var drillDown = 'Drill down';
|
|
5901
|
+
/** @hidden */
|
|
5902
|
+
var addNewReport = 'Add new report';
|
|
5903
|
+
/** @hidden */
|
|
5904
|
+
var saveCurrentReport = 'Save current report';
|
|
5905
|
+
/** @hidden */
|
|
5906
|
+
var saveAsCurrentReport = 'Save as current report';
|
|
5907
|
+
/** @hidden */
|
|
5908
|
+
var renameCurrentReport = 'Rename current report';
|
|
5909
|
+
/** @hidden */
|
|
5910
|
+
var removeCurrentReport = 'Remove current report';
|
|
5911
|
+
/** @hidden */
|
|
5912
|
+
var loadReports = 'Load report';
|
|
5913
|
+
/** @hidden */
|
|
5914
|
+
var openConditionalFormatting = 'Open conditional formatting dialog';
|
|
5915
|
+
/** @hidden */
|
|
5916
|
+
var openNumberFormatting = 'Open number formatting dialog';
|
|
5917
|
+
/** @hidden */
|
|
5918
|
+
var MdxQuery = 'MdxQuery';
|
|
5919
|
+
/** @hidden */
|
|
5920
|
+
var showFieldList = 'Open field list';
|
|
5921
|
+
/** @hidden */
|
|
5922
|
+
var tableView = 'Show table view';
|
|
5923
|
+
/** @hidden */
|
|
5924
|
+
var chartView = 'Show chart view';
|
|
5925
|
+
/** @hidden */
|
|
5926
|
+
var multipleAxis = 'Multiple Axis';
|
|
5927
|
+
/** @hidden */
|
|
5928
|
+
var showLegend = 'Show legend';
|
|
5929
|
+
/** @hidden */
|
|
5930
|
+
var pdfExport = 'PDF export';
|
|
5931
|
+
/** @hidden */
|
|
5932
|
+
var pngExport = 'PNG export';
|
|
5933
|
+
/** @hidden */
|
|
5934
|
+
var excelExport = 'Excel export';
|
|
5935
|
+
/** @hidden */
|
|
5936
|
+
var csvExport = 'CSV export';
|
|
5937
|
+
/** @hidden */
|
|
5938
|
+
var jpegExport = 'JPEG export';
|
|
5939
|
+
/** @hidden */
|
|
5940
|
+
var svgExport = 'SVG export';
|
|
5941
|
+
/** @hidden */
|
|
5942
|
+
var hideSubTotals = 'Hide sub-totals';
|
|
5943
|
+
/** @hidden */
|
|
5944
|
+
var subTotalsRow = 'Show row sub-totals';
|
|
5945
|
+
/** @hidden */
|
|
5946
|
+
var subTotalsColumn = 'Show column sub-totals';
|
|
5947
|
+
/** @hidden */
|
|
5948
|
+
var showSubTotals = 'Show sub-totals';
|
|
5949
|
+
/** @hidden */
|
|
5950
|
+
var hideGrandTotals = 'Hide grand totals';
|
|
5951
|
+
/** @hidden */
|
|
5952
|
+
var grandTotalsRow = 'Show row grand totals';
|
|
5953
|
+
/** @hidden */
|
|
5954
|
+
var grandTotalsColumn = 'Show column grand totals';
|
|
5955
|
+
/** @hidden */
|
|
5956
|
+
var showGrandTotals = 'Show grand totals';
|
|
5957
|
+
/** @hidden */
|
|
5958
|
+
var numberFormattingMenu = 'Number Formatting menu';
|
|
5959
|
+
/** @hidden */
|
|
5960
|
+
var conditionalFormattingMenu = 'Conditional Formatting menu';
|
|
5961
|
+
/** @hidden */
|
|
5962
|
+
var reportChange = 'Report change';
|
|
5963
|
+
/** @hidden */
|
|
5964
|
+
var sortFieldTree = 'Sort field tree';
|
|
5965
|
+
/** @hidden */
|
|
5966
|
+
var editCalculatedField = 'Edit calculated field';
|
|
5967
|
+
/** @hidden */
|
|
5968
|
+
var sortField = 'Sort field';
|
|
5969
|
+
/** @hidden */
|
|
5970
|
+
var filterField = 'Filter field';
|
|
5971
|
+
/** @hidden */
|
|
5972
|
+
var removeField = 'Remove field';
|
|
5973
|
+
/** @hidden */
|
|
5974
|
+
var openCalculatedField = 'Open calculated field dialog';
|
|
5975
|
+
/** @hidden */
|
|
5976
|
+
var editRecord = 'Edit record';
|
|
5977
|
+
/** @hidden */
|
|
5978
|
+
var saveEditedRecords = 'Save edited records';
|
|
5979
|
+
/** @hidden */
|
|
5980
|
+
var addNewRecord = 'Add new record';
|
|
5981
|
+
/** @hidden */
|
|
5982
|
+
var removeRecord = 'Remove record';
|
|
5983
|
+
/** @hidden */
|
|
5984
|
+
var aggregateField = 'Aggregate field';
|
|
5985
|
+
/** @hidden */
|
|
5986
|
+
var contextMenuCalculatedField = 'CalculatedField Context menu';
|
|
5987
|
+
/** @hidden */
|
|
5988
|
+
var windowResize = 'Window resize';
|
|
5989
|
+
/**
|
|
5990
|
+
* Specifies action names of actionComplete events
|
|
5991
|
+
*/
|
|
5992
|
+
/** @hidden */
|
|
5993
|
+
var calculatedFieldApplied = 'Calculated field applied';
|
|
5994
|
+
/** @hidden */
|
|
5995
|
+
var editedRecordsSaved = 'Edited records saved';
|
|
5996
|
+
/** @hidden */
|
|
5997
|
+
var newRecordAdded = 'New record added';
|
|
5998
|
+
/** @hidden */
|
|
5999
|
+
var recordRemoved = 'Record removed';
|
|
6000
|
+
/** @hidden */
|
|
6001
|
+
var closeFieldlist = 'Field list closed';
|
|
6002
|
+
/** @hidden */
|
|
6003
|
+
var fieldTreeSorted = 'Field tree sorted';
|
|
6004
|
+
/** @hidden */
|
|
6005
|
+
var reportSaved = 'Report saved';
|
|
6006
|
+
/** @hidden */
|
|
6007
|
+
var newReportAdded = 'New report added';
|
|
6008
|
+
/** @hidden */
|
|
6009
|
+
var reportReSaved = 'Report re-saved';
|
|
6010
|
+
/** @hidden */
|
|
6011
|
+
var reportRenamed = 'Report renamed';
|
|
6012
|
+
/** @hidden */
|
|
6013
|
+
var reportRemoved = 'Report removed';
|
|
6014
|
+
/** @hidden */
|
|
6015
|
+
var excelExported = 'Excel exported';
|
|
6016
|
+
/** @hidden */
|
|
6017
|
+
var csvExported = 'CSV exported';
|
|
6018
|
+
/** @hidden */
|
|
6019
|
+
var pdfExported = 'PDF exported';
|
|
6020
|
+
/** @hidden */
|
|
6021
|
+
var pngExported = 'PNG exported';
|
|
6022
|
+
/** @hidden */
|
|
6023
|
+
var jpegExported = 'JPEG exported';
|
|
6024
|
+
/** @hidden */
|
|
6025
|
+
var svgExported = 'SVG exported';
|
|
6026
|
+
/** @hidden */
|
|
6027
|
+
var conditionallyFormatted = 'Conditional formatting applied';
|
|
6028
|
+
/** @hidden */
|
|
6029
|
+
var numberFormatted = 'Number formatting applied';
|
|
6030
|
+
/** @hidden */
|
|
6031
|
+
var tableViewed = 'Table view shown';
|
|
6032
|
+
/** @hidden */
|
|
6033
|
+
var chartViewed = 'Chart view shown';
|
|
6034
|
+
/** @hidden */
|
|
6035
|
+
var subTotalsHidden = 'Sub-totals hidden';
|
|
6036
|
+
/** @hidden */
|
|
6037
|
+
var subTotalsRowShown = 'Row sub-totals shown';
|
|
6038
|
+
/** @hidden */
|
|
6039
|
+
var subTotalsColumnShown = 'Column sub-totals shown';
|
|
6040
|
+
/** @hidden */
|
|
6041
|
+
var subTotalsShown = 'Sub-totals shown';
|
|
6042
|
+
/** @hidden */
|
|
6043
|
+
var grandTotalsHidden = 'Grand totals hidden';
|
|
6044
|
+
/** @hidden */
|
|
6045
|
+
var grandTotalsRowShown = 'Row grand totals shown';
|
|
6046
|
+
/** @hidden */
|
|
6047
|
+
var grandTotalsColumnShown = 'Column grand totals shown';
|
|
6048
|
+
/** @hidden */
|
|
6049
|
+
var grandTotalsShown = 'Grand totals shown';
|
|
6050
|
+
/** @hidden */
|
|
6051
|
+
var valueSorted = 'Value sorted';
|
|
6052
|
+
/** @hidden */
|
|
6053
|
+
var calculatedFieldEdited = 'Calculated field edited';
|
|
6054
|
+
/** @hidden */
|
|
6055
|
+
var fieldSorted = 'Field sorted';
|
|
6056
|
+
/** @hidden */
|
|
6057
|
+
var fieldFiltered = 'Field filtered';
|
|
6058
|
+
/** @hidden */
|
|
6059
|
+
var fieldRemoved = 'Field removed';
|
|
6060
|
+
/** @hidden */
|
|
6061
|
+
var fieldAggregated = 'Field aggregated';
|
|
6062
|
+
/** @hidden */
|
|
6063
|
+
var recordEdited = 'Record edited';
|
|
6064
|
+
/** @hidden */
|
|
6065
|
+
var reportChanged = 'Report changed';
|
|
6066
|
+
/** @hidden */
|
|
6067
|
+
var windowResized = 'Window resized';
|
|
6068
|
+
/** @hidden */
|
|
6069
|
+
var recordUpdated = 'Records updated';
|
|
6070
|
+
/** @hidden */
|
|
6071
|
+
var drillThroughClosed = 'Drill-through closed';
|
|
6048
6072
|
|
|
6049
6073
|
/**
|
|
6050
6074
|
* CSS Constants
|
|
@@ -6718,6 +6742,8 @@ var PIVOTCHART_TYPE_DIALOG = 'e-pivotchart-type-dialog';
|
|
|
6718
6742
|
var FORMAT_FONT_COLOR_PICKER = 'e-format-font-color-picker';
|
|
6719
6743
|
/** @hidden */
|
|
6720
6744
|
var GROUP_PIVOT_ROW = 'e-group-pivot-rows';
|
|
6745
|
+
/** @hidden */
|
|
6746
|
+
var TOOLBAR_MENU = 'e-pivot-toolbar-menu';
|
|
6721
6747
|
|
|
6722
6748
|
/**
|
|
6723
6749
|
* `AggregateMenu` module to create aggregate type popup.
|
|
@@ -6747,28 +6773,39 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
|
|
|
6747
6773
|
AggregateMenu.prototype.openContextMenu = function (args) {
|
|
6748
6774
|
var _this = this;
|
|
6749
6775
|
var fieldName = args.target.parentElement.id;
|
|
6776
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
6750
6777
|
this.buttonElement = args.target.parentElement;
|
|
6751
6778
|
var isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
|
|
6752
6779
|
this.summaryTypes = this.getMenuItem(isStringField).slice();
|
|
6780
|
+
this.parent.actionObj.actionName = aggregateField;
|
|
6781
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
6782
|
+
if (this.parent.actionBeginMethod()) {
|
|
6783
|
+
return;
|
|
6784
|
+
}
|
|
6753
6785
|
var eventArgs = {
|
|
6754
6786
|
cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
|
|
6755
6787
|
};
|
|
6756
6788
|
var control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
|
|
6757
6789
|
this.parent.pivotGridModule : this.parent;
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6790
|
+
try {
|
|
6791
|
+
control.trigger(aggregateMenuOpen, eventArgs, function (observedArgs) {
|
|
6792
|
+
if (!observedArgs.cancel) {
|
|
6793
|
+
_this.summaryTypes = observedArgs.aggregateTypes;
|
|
6794
|
+
_this.createContextMenu(isStringField, observedArgs.displayMenuCount);
|
|
6795
|
+
_this.currentMenu = args.target;
|
|
6796
|
+
var pos = _this.currentMenu.getBoundingClientRect();
|
|
6797
|
+
if (_this.parent.enableRtl) {
|
|
6798
|
+
_this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
|
|
6799
|
+
}
|
|
6800
|
+
else {
|
|
6801
|
+
_this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
|
|
6802
|
+
}
|
|
6769
6803
|
}
|
|
6770
|
-
}
|
|
6771
|
-
}
|
|
6804
|
+
});
|
|
6805
|
+
}
|
|
6806
|
+
catch (execption) {
|
|
6807
|
+
this.parent.actionFailureMethod(execption);
|
|
6808
|
+
}
|
|
6772
6809
|
};
|
|
6773
6810
|
AggregateMenu.prototype.createContextMenu = function (isStringField, displayMenuCount) {
|
|
6774
6811
|
var _this = this;
|
|
@@ -7045,31 +7082,42 @@ var AggregateMenu = /** @__PURE__ @class */ (function () {
|
|
|
7045
7082
|
AggregateMenu.prototype.selectOptionInContextMenu = function (menu) {
|
|
7046
7083
|
if (menu.item.text !== null) {
|
|
7047
7084
|
var buttonElement = this.currentMenu.parentElement;
|
|
7048
|
-
var
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7085
|
+
var fieldInfo = PivotUtil.getFieldInfo((buttonElement ? buttonElement.id : ''), this.parent);
|
|
7086
|
+
this.parent.actionObj.actionName = aggregateField;
|
|
7087
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
7088
|
+
if (this.parent.actionBeginMethod()) {
|
|
7089
|
+
return;
|
|
7052
7090
|
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
this.parent.
|
|
7091
|
+
var type = menu.item.id.split('_').pop();
|
|
7092
|
+
try {
|
|
7093
|
+
if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
|
|
7094
|
+
|| type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
|
|
7095
|
+
this.createValueSettingsDialog(buttonElement, this.parentElement, type);
|
|
7096
|
+
}
|
|
7097
|
+
else {
|
|
7098
|
+
var field = buttonElement.getAttribute('data-uid');
|
|
7099
|
+
var valuefields = this.parent.dataSourceSettings.values;
|
|
7100
|
+
var contentElement = buttonElement.querySelector('.e-content');
|
|
7101
|
+
var captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
|
|
7102
|
+
this.parent.engineModule.fieldList[field].caption;
|
|
7103
|
+
contentElement.innerHTML = captionName;
|
|
7104
|
+
contentElement.setAttribute('title', captionName);
|
|
7105
|
+
buttonElement.setAttribute('data-type', type);
|
|
7106
|
+
for (var vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
|
|
7107
|
+
if (this.parent.dataSourceSettings.values[vCnt].name === field) {
|
|
7108
|
+
var dataSourceItem = extend({}, valuefields[vCnt].properties ?
|
|
7109
|
+
valuefields[vCnt].properties : valuefields[vCnt], null, true);
|
|
7110
|
+
dataSourceItem.type = type;
|
|
7111
|
+
this.parent.engineModule.fieldList[field].aggregateType = type;
|
|
7112
|
+
valuefields.splice(vCnt, 1, dataSourceItem);
|
|
7113
|
+
this.parent.lastAggregationInfo = dataSourceItem;
|
|
7114
|
+
}
|
|
7070
7115
|
}
|
|
7116
|
+
this.updateDataSource();
|
|
7071
7117
|
}
|
|
7072
|
-
|
|
7118
|
+
}
|
|
7119
|
+
catch (execption) {
|
|
7120
|
+
this.parent.actionFailureMethod(execption);
|
|
7073
7121
|
}
|
|
7074
7122
|
}
|
|
7075
7123
|
};
|
|
@@ -7186,13 +7234,16 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
7186
7234
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7187
7235
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7188
7236
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
7189
|
-
this.gridSettings = parent.gridSettings;
|
|
7237
|
+
this.gridSettings = this.parent.gridSettings;
|
|
7190
7238
|
this.formatList = this.getFormatList();
|
|
7191
7239
|
this.aggMenu = new AggregateMenu(this.parent);
|
|
7192
7240
|
}
|
|
7193
7241
|
/* eslint-disable-next-line */
|
|
7194
7242
|
/** @hidden */
|
|
7195
|
-
Render.prototype.render = function () {
|
|
7243
|
+
Render.prototype.render = function (refreshRequired) {
|
|
7244
|
+
if (refreshRequired) {
|
|
7245
|
+
this.initProperties();
|
|
7246
|
+
}
|
|
7196
7247
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7197
7248
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7198
7249
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
@@ -7256,6 +7307,30 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
7256
7307
|
}
|
|
7257
7308
|
this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
|
|
7258
7309
|
};
|
|
7310
|
+
Render.prototype.initProperties = function () {
|
|
7311
|
+
this.rowStartPos = undefined;
|
|
7312
|
+
this.maxIndent = undefined;
|
|
7313
|
+
this.resColWidth = undefined;
|
|
7314
|
+
this.isOverflows = undefined;
|
|
7315
|
+
this.indentCollection = {};
|
|
7316
|
+
this.formatList = undefined;
|
|
7317
|
+
this.colPos = 0;
|
|
7318
|
+
this.colGrandPos = undefined;
|
|
7319
|
+
this.rowGrandPos = undefined;
|
|
7320
|
+
this.lastSpan = 0;
|
|
7321
|
+
this.field = undefined;
|
|
7322
|
+
this.fieldCaption = undefined;
|
|
7323
|
+
this.lvlCollection = {};
|
|
7324
|
+
this.hierarchyCollection = {};
|
|
7325
|
+
this.lvlPosCollection = {};
|
|
7326
|
+
this.hierarchyPosCollection = {};
|
|
7327
|
+
this.position = 0;
|
|
7328
|
+
this.measurePos = 0;
|
|
7329
|
+
this.maxMeasurePos = 0;
|
|
7330
|
+
this.hierarchyCount = 0;
|
|
7331
|
+
this.actualText = '';
|
|
7332
|
+
this.timeOutObj = undefined;
|
|
7333
|
+
};
|
|
7259
7334
|
Render.prototype.refreshHeader = function () {
|
|
7260
7335
|
if (this.parent.enableVirtualization) {
|
|
7261
7336
|
var mHdr = this.parent.element.querySelector('.' + MOVABLEHEADER_DIV);
|
|
@@ -7457,9 +7532,9 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
7457
7532
|
this.parent.renderReactTemplates(); /* eslint-disable-line */
|
|
7458
7533
|
}
|
|
7459
7534
|
if (this.parent.isInitial) {
|
|
7535
|
+
this.parent.isInitial = false;
|
|
7460
7536
|
this.parent.refreshData();
|
|
7461
7537
|
}
|
|
7462
|
-
this.parent.isInitial = false;
|
|
7463
7538
|
this.parent.notify(contentReady, {});
|
|
7464
7539
|
};
|
|
7465
7540
|
Render.prototype.setFocusOnLastCell = function () {
|
|
@@ -8275,7 +8350,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
8275
8350
|
if (cell.isSum) {
|
|
8276
8351
|
tCell.classList.add(SUMMARY);
|
|
8277
8352
|
}
|
|
8278
|
-
var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && this.parent.
|
|
8353
|
+
var isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
|
|
8279
8354
|
((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
|
|
8280
8355
|
if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
|
|
8281
8356
|
tCell.classList.add('e-gtot');
|
|
@@ -8416,6 +8491,12 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
8416
8491
|
}
|
|
8417
8492
|
lvlPos++;
|
|
8418
8493
|
}
|
|
8494
|
+
if (this.parent.dataSourceSettings.grandTotalsPosition === 'Top' && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'row') && this.parent.dataType === 'olap' &&
|
|
8495
|
+
(cell.valueSort.levelName.toString()).indexOf(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) === 0) {
|
|
8496
|
+
tCell.appendChild(createElement('span', {
|
|
8497
|
+
className: NEXTSPAN,
|
|
8498
|
+
}));
|
|
8499
|
+
}
|
|
8419
8500
|
if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
|
|
8420
8501
|
tCell.appendChild(createElement('span', {
|
|
8421
8502
|
className: NEXTSPAN,
|
|
@@ -8728,8 +8809,8 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
8728
8809
|
if (this.parent.currentView !== 'Chart') {
|
|
8729
8810
|
if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
|
|
8730
8811
|
var rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
|
|
8731
|
-
var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' +
|
|
8732
|
-
this.parent.element.querySelector('.' +
|
|
8812
|
+
var gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS) ?
|
|
8813
|
+
this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS).offsetHeight : 0);
|
|
8733
8814
|
var toolBarHeight = this.parent.element.querySelector('.' + GRID_TOOLBAR) ? 42 : 0;
|
|
8734
8815
|
gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
|
|
8735
8816
|
gridHeight = gridHeight < 40 ? 40 : gridHeight;
|
|
@@ -10464,7 +10545,6 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
|
|
|
10464
10545
|
if (_this.allowExcelLikeFilter) {
|
|
10465
10546
|
_this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
|
|
10466
10547
|
}
|
|
10467
|
-
_this.parent.control.pivotButtonModule.memberTreeView = _this.parent.filterDialog.memberTreeView;
|
|
10468
10548
|
_this.memberTreeView.nodeChecked =
|
|
10469
10549
|
_this.parent.control.pivotButtonModule.nodeStateModified.bind(_this.parent.control.pivotButtonModule);
|
|
10470
10550
|
_this.allMemberSelect.nodeChecked =
|
|
@@ -11480,6 +11560,15 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
|
|
|
11480
11560
|
if (this.dropMenu && !this.dropMenu.isDestroyed) {
|
|
11481
11561
|
this.dropMenu.destroy();
|
|
11482
11562
|
}
|
|
11563
|
+
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
11564
|
+
this.memberTreeView.destroy();
|
|
11565
|
+
}
|
|
11566
|
+
if (this.allMemberSelect && !this.allMemberSelect.isDestroyed) {
|
|
11567
|
+
this.allMemberSelect.destroy();
|
|
11568
|
+
}
|
|
11569
|
+
if (this.editorSearch && !this.editorSearch.isDestroyed) {
|
|
11570
|
+
this.editorSearch.destroy();
|
|
11571
|
+
}
|
|
11483
11572
|
if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
|
|
11484
11573
|
remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
|
|
11485
11574
|
}
|
|
@@ -11488,11 +11577,24 @@ var FilterDialog = /** @__PURE__ @class */ (function () {
|
|
|
11488
11577
|
FilterDialog.prototype.removeFilterDialog = function () {
|
|
11489
11578
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
11490
11579
|
this.dialogPopUp.destroy();
|
|
11580
|
+
setTimeout(this.setFocus.bind(this));
|
|
11491
11581
|
}
|
|
11492
11582
|
if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
|
|
11493
11583
|
remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
|
|
11494
11584
|
}
|
|
11495
11585
|
};
|
|
11586
|
+
FilterDialog.prototype.setFocus = function () {
|
|
11587
|
+
if (this.parent.control.pivotButtonModule.parentElement) {
|
|
11588
|
+
var pivotButtons = [].slice.call(this.parent.control.pivotButtonModule.parentElement.querySelectorAll('.e-pivot-button'));
|
|
11589
|
+
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
11590
|
+
var item = pivotButtons_1[_i];
|
|
11591
|
+
if (item.getAttribute('data-uid') === this.parent.control.pivotButtonModule.fieldName) {
|
|
11592
|
+
item.focus();
|
|
11593
|
+
break;
|
|
11594
|
+
}
|
|
11595
|
+
}
|
|
11596
|
+
}
|
|
11597
|
+
};
|
|
11496
11598
|
return FilterDialog;
|
|
11497
11599
|
}());
|
|
11498
11600
|
|
|
@@ -12209,6 +12311,9 @@ var DataSourceSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
12209
12311
|
__decorate$1([
|
|
12210
12312
|
Property(true)
|
|
12211
12313
|
], DataSourceSettings.prototype, "showGrandTotals", void 0);
|
|
12314
|
+
__decorate$1([
|
|
12315
|
+
Property('Bottom')
|
|
12316
|
+
], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
|
|
12212
12317
|
__decorate$1([
|
|
12213
12318
|
Property(true)
|
|
12214
12319
|
], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
|
|
@@ -13025,6 +13130,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13025
13130
|
this.previousValues = { top: 0, left: 0 };
|
|
13026
13131
|
this.frozenPreviousValues = { top: 0, left: 0 };
|
|
13027
13132
|
this.eventType = '';
|
|
13133
|
+
this.isFireFox = Browser.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
13028
13134
|
this.parent = parent;
|
|
13029
13135
|
this.engineModule = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule;
|
|
13030
13136
|
this.addInternalEvents();
|
|
@@ -13048,6 +13154,9 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13048
13154
|
var mScrollBar = mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
|
|
13049
13155
|
EventHandler.clearEvents(mCont);
|
|
13050
13156
|
EventHandler.clearEvents(fCont);
|
|
13157
|
+
if (this.isFireFox) {
|
|
13158
|
+
EventHandler.clearEvents(mHdr);
|
|
13159
|
+
}
|
|
13051
13160
|
if (this.engineModule) {
|
|
13052
13161
|
var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
|
|
13053
13162
|
EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
|
|
@@ -13109,7 +13218,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13109
13218
|
}
|
|
13110
13219
|
var target = e.target;
|
|
13111
13220
|
var left = target.scrollLeft;
|
|
13112
|
-
if (_this.previousValues.left === left) {
|
|
13221
|
+
if (_this.previousValues.left === left || (_this.isFireFox && target.classList.contains(MOVABLEHEADER_DIV))) {
|
|
13113
13222
|
return;
|
|
13114
13223
|
}
|
|
13115
13224
|
content.scrollLeft = left;
|
|
@@ -13466,142 +13575,159 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
|
|
|
13466
13575
|
this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
|
|
13467
13576
|
}
|
|
13468
13577
|
var actualText = eventArgs.currentCell.actualText.toString();
|
|
13469
|
-
|
|
13470
|
-
this.parent.
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
-
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
previousPosition.push(_this.gridIndexObjects[value]);
|
|
13503
|
-
}
|
|
13504
|
-
var count = Object.keys(_this.gridIndexObjects).length;
|
|
13505
|
-
var addItems = [];
|
|
13506
|
-
var prevItems = [];
|
|
13507
|
-
var index = 0;
|
|
13508
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13509
|
-
for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
|
|
13510
|
-
var item = _b[_a];
|
|
13511
|
-
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13512
|
-
for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
|
|
13513
|
-
var field = _d[_c];
|
|
13514
|
-
if (isNullOrUndefined(item[field])) {
|
|
13515
|
-
delete item[field];
|
|
13516
|
-
}
|
|
13517
|
-
}
|
|
13518
|
-
delete item['__index'];
|
|
13519
|
-
addItems.push(item);
|
|
13578
|
+
try {
|
|
13579
|
+
if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
|
|
13580
|
+
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
|
|
13581
|
+
this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
|
|
13582
|
+
this.parent.actionObj.actionName = editRecord;
|
|
13583
|
+
if (this.parent.actionBeginMethod()) {
|
|
13584
|
+
return;
|
|
13585
|
+
}
|
|
13586
|
+
this.editCell(eventArgs);
|
|
13587
|
+
}
|
|
13588
|
+
else {
|
|
13589
|
+
this.removeDrillThroughDialog();
|
|
13590
|
+
var drillThroughDialog = createElement('div', {
|
|
13591
|
+
id: this.parent.element.id + '_drillthrough',
|
|
13592
|
+
className: DRILLTHROUGH_DIALOG
|
|
13593
|
+
});
|
|
13594
|
+
this.parent.element.appendChild(drillThroughDialog);
|
|
13595
|
+
this.dialogPopUp = new Dialog({
|
|
13596
|
+
animationSettings: { effect: 'Fade' },
|
|
13597
|
+
allowDragging: false,
|
|
13598
|
+
header: this.parent.localeObj.getConstant('details'),
|
|
13599
|
+
content: this.createDrillThroughGrid(eventArgs),
|
|
13600
|
+
beforeOpen: function () {
|
|
13601
|
+
_this.drillThroughGrid.setProperties({
|
|
13602
|
+
dataSource: _this.parent.editSettings.allowEditing ?
|
|
13603
|
+
_this.dataWithPrimarykey(eventArgs) : _this.gridData,
|
|
13604
|
+
height: !_this.parent.editSettings.allowEditing ? 300 : 220
|
|
13605
|
+
}, false);
|
|
13606
|
+
},
|
|
13607
|
+
beforeClose: function () {
|
|
13608
|
+
if (_this.parent.editSettings.allowEditing && _this.isUpdated) {
|
|
13609
|
+
if (_this.parent.dataSourceSettings.type === 'CSV') {
|
|
13610
|
+
_this.updateData(_this.drillThroughGrid.dataSource);
|
|
13520
13611
|
}
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13612
|
+
var gridIndexObjectsValue = Object.keys(_this.gridIndexObjects);
|
|
13613
|
+
var previousPosition = [];
|
|
13614
|
+
for (var _i = 0, gridIndexObjectsValue_1 = gridIndexObjectsValue; _i < gridIndexObjectsValue_1.length; _i++) {
|
|
13615
|
+
var value = gridIndexObjectsValue_1[_i];
|
|
13616
|
+
previousPosition.push(_this.gridIndexObjects[value]);
|
|
13525
13617
|
}
|
|
13526
|
-
|
|
13527
|
-
|
|
13618
|
+
var count = Object.keys(_this.gridIndexObjects).length;
|
|
13619
|
+
var addItems = [];
|
|
13620
|
+
var prevItems = [];
|
|
13621
|
+
var index = 0;
|
|
13622
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13623
|
+
for (var _a = 0, _b = _this.drillThroughGrid.dataSource; _a < _b.length; _a++) {
|
|
13624
|
+
var item = _b[_a];
|
|
13625
|
+
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13626
|
+
for (var _c = 0, _d = _this.engine.fields; _c < _d.length; _c++) {
|
|
13627
|
+
var field = _d[_c];
|
|
13628
|
+
if (isNullOrUndefined(item[field])) {
|
|
13629
|
+
delete item[field];
|
|
13630
|
+
}
|
|
13631
|
+
}
|
|
13528
13632
|
delete item['__index'];
|
|
13633
|
+
addItems.push(item);
|
|
13529
13634
|
}
|
|
13530
|
-
if (
|
|
13531
|
-
delete _this.
|
|
13635
|
+
else if (count > 0) {
|
|
13636
|
+
delete _this.gridIndexObjects[item['__index'].toString()];
|
|
13637
|
+
prevItems.push(item);
|
|
13638
|
+
count--;
|
|
13532
13639
|
}
|
|
13640
|
+
if (_this.parent.dataSourceSettings.mode === 'Server') {
|
|
13641
|
+
if (item['__index']) {
|
|
13642
|
+
delete item['__index'];
|
|
13643
|
+
}
|
|
13644
|
+
if (_this.gridData[index]['__index']) {
|
|
13645
|
+
delete _this.gridData[index]['__index'];
|
|
13646
|
+
}
|
|
13647
|
+
}
|
|
13648
|
+
index++;
|
|
13533
13649
|
}
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13650
|
+
count = 0;
|
|
13651
|
+
if (_this.parent.dataSourceSettings.mode === 'Server') {
|
|
13652
|
+
var gridIndex = []; /* eslint-disable-line */
|
|
13653
|
+
var keys = Object.keys(_this.gridIndexObjects);
|
|
13654
|
+
for (var len = 0; len < keys.length; len++) {
|
|
13655
|
+
delete _this.parent.drillThroughValue.indexObject[_this.gridIndexObjects[keys[len]]];
|
|
13656
|
+
gridIndex.push({ Key: keys[len], Value: _this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
|
|
13657
|
+
}
|
|
13658
|
+
var indexObject = []; /* eslint-disable-line */
|
|
13659
|
+
keys = Object.keys(_this.parent.drillThroughValue.indexObject);
|
|
13660
|
+
for (var len = 0; len < keys.length; len++) {
|
|
13661
|
+
indexObject.push({ Key: keys[len], Value: _this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
|
|
13662
|
+
}
|
|
13663
|
+
_this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
|
|
13548
13664
|
}
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13665
|
+
else {
|
|
13666
|
+
var items = [];
|
|
13667
|
+
var data = (_this.parent.allowDataCompression && _this.parent.enableVirtualization) ?
|
|
13668
|
+
_this.parent.engineModule.actualData : _this.parent.engineModule.data;
|
|
13669
|
+
for (var _e = 0, _f = data; _e < _f.length; _e++) {
|
|
13670
|
+
var item = _f[_e];
|
|
13671
|
+
delete item['__index'];
|
|
13672
|
+
if (_this.gridIndexObjects[count.toString()] === undefined) {
|
|
13673
|
+
items.push(item);
|
|
13674
|
+
}
|
|
13675
|
+
count++;
|
|
13676
|
+
}
|
|
13677
|
+
/* eslint-enable @typescript-eslint/dot-notation */
|
|
13678
|
+
items = items.concat(addItems);
|
|
13679
|
+
var eventArgs_1 = {
|
|
13680
|
+
currentData: _this.drillThroughGrid.dataSource,
|
|
13681
|
+
previousData: _this.clonedData,
|
|
13682
|
+
previousPosition: previousPosition,
|
|
13683
|
+
cancel: false
|
|
13684
|
+
};
|
|
13685
|
+
_this.parent.trigger(editCompleted, eventArgs_1);
|
|
13686
|
+
if (!eventArgs_1.cancel) {
|
|
13687
|
+
_this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13688
|
+
_this.engine.updateGridData(_this.parent.dataSourceSettings);
|
|
13689
|
+
_this.parent.pivotValues = _this.engine.pivotValues;
|
|
13560
13690
|
}
|
|
13561
|
-
count++;
|
|
13562
13691
|
}
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
cancel: false
|
|
13692
|
+
_this.parent.actionObj.actionName = recordUpdated;
|
|
13693
|
+
var actionInfo = {
|
|
13694
|
+
editInfo: {
|
|
13695
|
+
type: _this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: _this.drillThroughGrid.dataSource,
|
|
13696
|
+
previousData: _this.clonedData, previousPosition: previousPosition
|
|
13697
|
+
}
|
|
13570
13698
|
};
|
|
13571
|
-
_this.parent.
|
|
13572
|
-
if (!eventArgs_1.cancel) {
|
|
13573
|
-
_this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13574
|
-
_this.engine.updateGridData(_this.parent.dataSourceSettings);
|
|
13575
|
-
_this.parent.pivotValues = _this.engine.pivotValues;
|
|
13576
|
-
}
|
|
13699
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
13577
13700
|
}
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
close: this.removeDrillThroughDialog.bind(this)
|
|
13592
|
-
});
|
|
13593
|
-
this.dialogPopUp.isStringTemplate = true;
|
|
13594
|
-
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13595
|
-
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13596
|
-
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13597
|
-
if (this.parent.editSettings.allowEditing) {
|
|
13598
|
-
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13599
|
-
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13600
|
-
keyConfigs: this.drillKeyConfigs,
|
|
13601
|
-
eventName: 'keydown'
|
|
13701
|
+
_this.isUpdated = false;
|
|
13702
|
+
_this.gridIndexObjects = {};
|
|
13703
|
+
},
|
|
13704
|
+
isModal: true,
|
|
13705
|
+
visible: true,
|
|
13706
|
+
showCloseIcon: true,
|
|
13707
|
+
locale: this.parent.locale,
|
|
13708
|
+
enableRtl: this.parent.enableRtl,
|
|
13709
|
+
width: this.parent.isAdaptive ? '100%' : '60%',
|
|
13710
|
+
position: { X: 'center', Y: 'center' },
|
|
13711
|
+
closeOnEscape: !this.parent.editSettings.allowEditing,
|
|
13712
|
+
target: document.body,
|
|
13713
|
+
close: this.removeDrillThroughDialog.bind(this)
|
|
13602
13714
|
});
|
|
13715
|
+
this.dialogPopUp.isStringTemplate = true;
|
|
13716
|
+
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13717
|
+
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13718
|
+
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13719
|
+
if (this.parent.editSettings.allowEditing) {
|
|
13720
|
+
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13721
|
+
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13722
|
+
keyConfigs: this.drillKeyConfigs,
|
|
13723
|
+
eventName: 'keydown'
|
|
13724
|
+
});
|
|
13725
|
+
}
|
|
13603
13726
|
}
|
|
13604
13727
|
}
|
|
13728
|
+
catch (execption) {
|
|
13729
|
+
this.parent.actionFailureMethod(execption);
|
|
13730
|
+
}
|
|
13605
13731
|
};
|
|
13606
13732
|
DrillThroughDialog.prototype.editCell = function (eventArgs) {
|
|
13607
13733
|
var _this = this;
|
|
@@ -13617,6 +13743,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
|
|
|
13617
13743
|
if (eventArgs.currentCell.actualText in previousData) {
|
|
13618
13744
|
currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
|
|
13619
13745
|
}
|
|
13746
|
+
var actionInfo = {
|
|
13747
|
+
editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
|
|
13748
|
+
};
|
|
13749
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13620
13750
|
this.numericTextBox = new NumericTextBox({
|
|
13621
13751
|
value: cellValue,
|
|
13622
13752
|
enableRtl: this.parent.enableRtl,
|
|
@@ -13681,6 +13811,10 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
|
|
|
13681
13811
|
};
|
|
13682
13812
|
DrillThroughDialog.prototype.removeDrillThroughDialog = function () {
|
|
13683
13813
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
13814
|
+
this.parent.actionObj.actionName = drillThroughClosed;
|
|
13815
|
+
if (this.parent.actionObj.actionName) {
|
|
13816
|
+
this.parent.actionCompleteMethod();
|
|
13817
|
+
}
|
|
13684
13818
|
this.dialogPopUp.destroy();
|
|
13685
13819
|
}
|
|
13686
13820
|
var dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
|
|
@@ -13693,6 +13827,7 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
|
|
|
13693
13827
|
};
|
|
13694
13828
|
/* eslint-disable */
|
|
13695
13829
|
DrillThroughDialog.prototype.createDrillThroughGrid = function (eventArgs) {
|
|
13830
|
+
var _this = this;
|
|
13696
13831
|
var drillThroughBody = createElement('div', { id: this.parent.element.id + '_drillthroughbody', className: DRILLTHROUGH_BODY_CLASS });
|
|
13697
13832
|
var drillThroughBodyHeader = createElement('div', {
|
|
13698
13833
|
id: this.parent.element.id +
|
|
@@ -13770,31 +13905,53 @@ var DrillThroughDialog = /** @__PURE__ @class */ (function () {
|
|
|
13770
13905
|
}
|
|
13771
13906
|
if (this.parent.editSettings.allowEditing) {
|
|
13772
13907
|
Grid.Inject(Edit, Page);
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
this.drillThroughGrid.
|
|
13776
|
-
|
|
13777
|
-
|
|
13908
|
+
try {
|
|
13909
|
+
this.drillThroughGrid.editSettings = this.parent.editSettings;
|
|
13910
|
+
this.drillThroughGrid.actionBegin = function (args) {
|
|
13911
|
+
var actionName = (args.requestType == 'save') ? saveEditedRecords : (args.requestType == 'add') ? addNewRecord : (args.requestType == 'delete') ? removeRecord : '';
|
|
13912
|
+
_this.parent.actionObj.actionName = actionName;
|
|
13913
|
+
if (_this.parent.actionObj.actionName) {
|
|
13914
|
+
if (_this.parent.actionBeginMethod()) {
|
|
13915
|
+
return;
|
|
13916
|
+
}
|
|
13917
|
+
}
|
|
13918
|
+
};
|
|
13919
|
+
if (this.parent.editSettings.allowCommandColumns) {
|
|
13920
|
+
this.drillThroughGrid.editSettings.mode = 'Normal';
|
|
13921
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
|
|
13922
|
+
Grid.Inject(CommandColumn);
|
|
13923
|
+
this.drillThroughGrid.columns.push({
|
|
13924
|
+
headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
|
|
13925
|
+
commands: [
|
|
13926
|
+
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13927
|
+
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13928
|
+
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13929
|
+
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13930
|
+
]
|
|
13931
|
+
});
|
|
13932
|
+
}
|
|
13933
|
+
else {
|
|
13934
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
|
|
13935
|
+
}
|
|
13778
13936
|
this.drillThroughGrid.columns.push({
|
|
13779
|
-
|
|
13780
|
-
commands: [
|
|
13781
|
-
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13782
|
-
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13783
|
-
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13784
|
-
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13785
|
-
]
|
|
13937
|
+
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13786
13938
|
});
|
|
13787
13939
|
}
|
|
13788
|
-
|
|
13789
|
-
this.
|
|
13940
|
+
catch (execption) {
|
|
13941
|
+
this.parent.actionFailureMethod(execption);
|
|
13790
13942
|
}
|
|
13791
|
-
this.drillThroughGrid.columns.push({
|
|
13792
|
-
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13793
|
-
});
|
|
13794
13943
|
this.drillThroughGrid.actionComplete = function (args) {
|
|
13795
13944
|
if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
|
|
13796
13945
|
dialogModule.isUpdated = true;
|
|
13797
13946
|
}
|
|
13947
|
+
_this.parent.actionObj.actionName = _this.parent.getActionCompleteName();
|
|
13948
|
+
var actionInfo = {
|
|
13949
|
+
editInfo: { type: _this.drillThroughGrid.editSettings.mode, action: args.requestType, data: _this.gridData }
|
|
13950
|
+
};
|
|
13951
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
13952
|
+
if (_this.parent.actionObj.actionName) {
|
|
13953
|
+
_this.parent.actionCompleteMethod();
|
|
13954
|
+
}
|
|
13798
13955
|
if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
|
|
13799
13956
|
dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
|
|
13800
13957
|
!dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
|
|
@@ -13988,7 +14145,7 @@ var DrillThrough = /** @__PURE__ @class */ (function () {
|
|
|
13988
14145
|
* @hidden
|
|
13989
14146
|
*/
|
|
13990
14147
|
DrillThrough.prototype.getModuleName = function () {
|
|
13991
|
-
return '
|
|
14148
|
+
return 'drillThrough';
|
|
13992
14149
|
};
|
|
13993
14150
|
DrillThrough.prototype.addInternalEvents = function () {
|
|
13994
14151
|
this.parent.on(contentReady, this.wireEvents, this);
|
|
@@ -14196,7 +14353,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14196
14353
|
* @private
|
|
14197
14354
|
*/
|
|
14198
14355
|
PivotChart.prototype.getModuleName = function () {
|
|
14199
|
-
return '
|
|
14356
|
+
return 'pivotChart';
|
|
14200
14357
|
};
|
|
14201
14358
|
/* eslint-disable */
|
|
14202
14359
|
PivotChart.prototype.loadChart = function (parent, chartSettings) {
|
|
@@ -14391,7 +14548,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14391
14548
|
this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
|
|
14392
14549
|
var name_1 = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
|
|
14393
14550
|
(firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
|
|
14394
|
-
var
|
|
14551
|
+
var values = this.engineModule.fieldList[this.currentMeasure];
|
|
14552
|
+
var text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
|
|
14553
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name_1;
|
|
14395
14554
|
var caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
|
|
14396
14555
|
((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
|
|
14397
14556
|
var levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
|
|
@@ -14567,7 +14726,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14567
14726
|
this.chartSettings.palettes = currentSeries.palettes;
|
|
14568
14727
|
}
|
|
14569
14728
|
for (var i = 0; i < this.columnGroupObject[key].length; i++) {
|
|
14570
|
-
|
|
14729
|
+
var values = this.engineModule.fieldList[this.currentMeasure];
|
|
14730
|
+
this.columnGroupObject[key][i].x = (this.parent.dataSourceSettings.rows.length === 0 && !this.chartSettings.showMultiLevelLabels) ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
|
|
14731
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : this.columnGroupObject[key][i].x === '' ? this.parent.localeObj.getConstant('blank') : this.columnGroupObject[key][i].x;
|
|
14571
14732
|
}
|
|
14572
14733
|
currentSeries.dataSource = this.columnGroupObject[key];
|
|
14573
14734
|
currentSeries.xName = 'x';
|
|
@@ -14723,7 +14884,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14723
14884
|
enableSmartLabels: this.chartSettings.enableSmartLabels,
|
|
14724
14885
|
center: this.chartSettings.pieCenter,
|
|
14725
14886
|
enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
|
|
14726
|
-
|
|
14887
|
+
highlightMode: this.chartSettings.highlightMode,
|
|
14727
14888
|
highlightPattern: this.chartSettings.highlightPattern,
|
|
14728
14889
|
titleStyle: this.chartSettings.titleStyle,
|
|
14729
14890
|
subTitle: this.chartSettings.subTitle,
|
|
@@ -14851,7 +15012,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14851
15012
|
this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
|
|
14852
15013
|
if (this.accumulationType.indexOf(type) > -1) {
|
|
14853
15014
|
this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
|
|
14854
|
-
this.parent.chart.
|
|
15015
|
+
this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
|
|
14855
15016
|
this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
|
|
14856
15017
|
}
|
|
14857
15018
|
else {
|
|
@@ -14960,9 +15121,14 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
14960
15121
|
currentYAxis.labelFormat = currentYAxis.labelFormat ?
|
|
14961
15122
|
currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
|
|
14962
15123
|
currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
|
|
14963
|
-
currentYAxis.
|
|
14964
|
-
|
|
14965
|
-
|
|
15124
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
15125
|
+
if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
|
|
15126
|
+
this.chartSettings.chartSeries.type === 'StackingBar100') {
|
|
15127
|
+
currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
|
|
15128
|
+
}
|
|
15129
|
+
else {
|
|
15130
|
+
currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
|
|
15131
|
+
}
|
|
14966
15132
|
if (!resFormat) {
|
|
14967
15133
|
currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
|
|
14968
15134
|
}
|
|
@@ -15009,6 +15175,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15009
15175
|
currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
|
|
15010
15176
|
currentYAxis.rowIndex = 0;
|
|
15011
15177
|
currentYAxis.columnIndex = 0;
|
|
15178
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
15012
15179
|
if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
|
|
15013
15180
|
currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
|
|
15014
15181
|
}
|
|
@@ -15331,6 +15498,7 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15331
15498
|
};
|
|
15332
15499
|
PivotChart.prototype.loaded = function (args) {
|
|
15333
15500
|
this.parent.isChartLoaded = true;
|
|
15501
|
+
var width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
|
|
15334
15502
|
if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
|
|
15335
15503
|
this.parent.showFieldList && this.parent.currentView === 'Chart') {
|
|
15336
15504
|
this.parent.groupingBarModule.alignIcon();
|
|
@@ -15342,13 +15510,15 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15342
15510
|
this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
|
|
15343
15511
|
}
|
|
15344
15512
|
}
|
|
15345
|
-
if (
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15513
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
15514
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
|
|
15515
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
|
|
15516
|
+
}
|
|
15517
|
+
else {
|
|
15518
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
|
|
15519
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
|
|
15520
|
+
}
|
|
15521
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
|
|
15352
15522
|
}
|
|
15353
15523
|
this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
15354
15524
|
this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
@@ -15569,6 +15739,11 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15569
15739
|
offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
|
|
15570
15740
|
}
|
|
15571
15741
|
if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
|
|
15742
|
+
var isNone = false;
|
|
15743
|
+
if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
|
|
15744
|
+
isNone = true;
|
|
15745
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
|
|
15746
|
+
}
|
|
15572
15747
|
if (this.parent.showToolbar && this.parent.showGroupingBar) {
|
|
15573
15748
|
height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
|
|
15574
15749
|
this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
|
|
@@ -15586,6 +15761,9 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15586
15761
|
else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
|
|
15587
15762
|
height = '200';
|
|
15588
15763
|
}
|
|
15764
|
+
if (isNone) {
|
|
15765
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
|
|
15766
|
+
}
|
|
15589
15767
|
}
|
|
15590
15768
|
else {
|
|
15591
15769
|
height = 'auto';
|
|
@@ -17391,7 +17569,7 @@ var PivotAxis = /** @__PURE__ @class */ (function (_super) {
|
|
|
17391
17569
|
Property('')
|
|
17392
17570
|
], PivotAxis.prototype, "title", void 0);
|
|
17393
17571
|
__decorate$3([
|
|
17394
|
-
Property(
|
|
17572
|
+
Property(1)
|
|
17395
17573
|
], PivotAxis.prototype, "zoomFactor", void 0);
|
|
17396
17574
|
__decorate$3([
|
|
17397
17575
|
Complex({}, CrosshairTooltip)
|
|
@@ -17409,7 +17587,7 @@ var PivotAxis = /** @__PURE__ @class */ (function (_super) {
|
|
|
17409
17587
|
Property(0)
|
|
17410
17588
|
], PivotAxis.prototype, "plotOffset", void 0);
|
|
17411
17589
|
__decorate$3([
|
|
17412
|
-
Property('
|
|
17590
|
+
Property('Shift')
|
|
17413
17591
|
], PivotAxis.prototype, "edgeLabelPlacement", void 0);
|
|
17414
17592
|
__decorate$3([
|
|
17415
17593
|
Property('BetweenTicks')
|
|
@@ -18744,6 +18922,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
18744
18922
|
this.updateTupCollection(customArgs.drillInfo.axis === 'row' ? rowTuples.length : columnTuples.length);
|
|
18745
18923
|
}
|
|
18746
18924
|
if (customArgs.action === 'down' ? customArgs.drillInfo.axis === 'column' : true) {
|
|
18925
|
+
this.olapValueAxis = isNullOrUndefined(this.getValueAxis(undefined, undefined)) ? 'column' : 'row';
|
|
18747
18926
|
this.frameColumnHeader(columnTuples);
|
|
18748
18927
|
if (!this.isPaging) {
|
|
18749
18928
|
this.performColumnSorting();
|
|
@@ -18798,6 +18977,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
18798
18977
|
OlapEngine.prototype.frameRowHeader = function (tuples) {
|
|
18799
18978
|
this.headerGrouping = {};
|
|
18800
18979
|
this.lastLevel = [];
|
|
18980
|
+
var isGrandTotalAdd = true;
|
|
18801
18981
|
var position = this.pivotValues.length;
|
|
18802
18982
|
var pivotValues = [];
|
|
18803
18983
|
var valueContent = [];
|
|
@@ -18858,6 +19038,7 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
18858
19038
|
var startTupPos = tupPos;
|
|
18859
19039
|
var pagingAllowFlag = true;
|
|
18860
19040
|
var lastMesPos = 0;
|
|
19041
|
+
var isGrandTotalTop = false;
|
|
18861
19042
|
while (tupPos < tuplesLength && pagingAllowFlag) {
|
|
18862
19043
|
var members = tuples[this.customArgs.action === 'down' ?
|
|
18863
19044
|
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
@@ -18912,35 +19093,25 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
18912
19093
|
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
18913
19094
|
: drillAllow;
|
|
18914
19095
|
var withoutAllAllow = (withoutAllStartPos > -1 && allCount > 0) ? (attrDrill || allStartPos > withoutAllEndPos) : true;
|
|
18915
|
-
|
|
19096
|
+
isGrandTotalTop = this.dataSourceSettings.grandTotalsPosition === 'Top' && this.olapRowValueIndex === 0 && this.olapValueAxis === 'row'
|
|
19097
|
+
&& this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true);
|
|
19098
|
+
if (isGrandTotalTop && gTotals.length === 1) {
|
|
19099
|
+
gTotals = this.frameGrandTotalValues(tuples, gTotals, typeColl, measurePos);
|
|
19100
|
+
}
|
|
19101
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
18916
19102
|
var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
formattedText: (typeColl[measurePos] === '3' &&
|
|
18922
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18923
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ?
|
|
18924
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18925
|
-
members[measurePos].querySelector('Caption').textContent,
|
|
18926
|
-
hasChild: false,
|
|
18927
|
-
level: -1,
|
|
18928
|
-
rowIndex: position,
|
|
18929
|
-
index: [],
|
|
18930
|
-
ordinal: tupPos,
|
|
18931
|
-
colSpan: 1,
|
|
18932
|
-
rowSpan: 1,
|
|
18933
|
-
memberType: Number(typeColl[measurePos]),
|
|
18934
|
-
isDrilled: false,
|
|
18935
|
-
parentUniqueName: members[measurePos].querySelector('PARENT_UNIQUE_NAME') ?
|
|
18936
|
-
members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined,
|
|
18937
|
-
levelUniqueName: members[measurePos].querySelector('LName').textContent,
|
|
18938
|
-
hierarchy: members[measurePos].getAttribute('Hierarchy'),
|
|
18939
|
-
valueSort: { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') }
|
|
18940
|
-
});
|
|
19103
|
+
var formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
19104
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
19105
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
19106
|
+
gTotals = this.frameGrandTotalAxisSet(gTotals, this.getUniqueName(members[measurePos].querySelector('UName').textContent), formattedText, position, tupPos, Number(typeColl[measurePos]), members[measurePos].querySelector('PARENT_UNIQUE_NAME') ? members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined, members[measurePos].querySelector('LName').textContent, members[measurePos].getAttribute('Hierarchy'), { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') });
|
|
18941
19107
|
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
18942
19108
|
}
|
|
18943
19109
|
else if (!(allStartPos === 0 || (measurePos === 0 && allStartPos === 1)) && drillAllow && withoutAllAllow) {
|
|
19110
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && isGrandTotalAdd && this.dataSourceSettings.showGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true)) {
|
|
19111
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
19112
|
+
position = this.pivotValues.length;
|
|
19113
|
+
isGrandTotalAdd = false;
|
|
19114
|
+
}
|
|
18944
19115
|
prevTupInfo = this.tupRowInfo[tupPos];
|
|
18945
19116
|
var lastPos = position;
|
|
18946
19117
|
var lastMemPos = memPos;
|
|
@@ -19031,6 +19202,11 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19031
19202
|
}
|
|
19032
19203
|
tupPos++;
|
|
19033
19204
|
}
|
|
19205
|
+
if (!(this.dataSourceSettings.grandTotalsPosition === 'Top') || (this.olapValueAxis === 'row' && this.dataSourceSettings.rows.length === 1 && this.dataSourceSettings.grandTotalsPosition === 'Top') || this.dataSourceSettings.rows.length === 0) {
|
|
19206
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
19207
|
+
}
|
|
19208
|
+
};
|
|
19209
|
+
OlapEngine.prototype.insertRowGrandTotal = function (gTotals, valueContent, pivotValues, tuples, position) {
|
|
19034
19210
|
if (gTotals.length > 1 && gTotals[0].memberType !== 3) {
|
|
19035
19211
|
gTotals[0].ordinal = -1;
|
|
19036
19212
|
}
|
|
@@ -19056,6 +19232,41 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19056
19232
|
this.updateRowEngine(pivotValues, valueContent, tuples.length);
|
|
19057
19233
|
this.onDemandDrillEngine = pivotValues;
|
|
19058
19234
|
}
|
|
19235
|
+
return gTotals;
|
|
19236
|
+
};
|
|
19237
|
+
OlapEngine.prototype.getValueAxis = function (valueAxis, valueIndex) {
|
|
19238
|
+
this.olapValueAxis = valueAxis;
|
|
19239
|
+
this.olapRowValueIndex = valueIndex;
|
|
19240
|
+
for (var i = 0; i < this.dataSourceSettings.rows.length; i++) {
|
|
19241
|
+
if (this.dataSourceSettings.rows[i].name === '[Measures]') {
|
|
19242
|
+
this.olapValueAxis = 'row';
|
|
19243
|
+
this.olapRowValueIndex = i;
|
|
19244
|
+
break;
|
|
19245
|
+
}
|
|
19246
|
+
}
|
|
19247
|
+
return this.olapValueAxis;
|
|
19248
|
+
};
|
|
19249
|
+
OlapEngine.prototype.frameGrandTotalAxisSet = function (gTotals, actualText, formattedText, rowIndex, ordinal, memberType, parentUniqueName, levelUniqueName, hierarchy, valueSort) {
|
|
19250
|
+
gTotals.push({
|
|
19251
|
+
axis: 'row',
|
|
19252
|
+
actualText: actualText,
|
|
19253
|
+
colIndex: 0,
|
|
19254
|
+
formattedText: formattedText,
|
|
19255
|
+
hasChild: false,
|
|
19256
|
+
level: -1,
|
|
19257
|
+
rowIndex: rowIndex,
|
|
19258
|
+
index: [],
|
|
19259
|
+
ordinal: ordinal,
|
|
19260
|
+
colSpan: 1,
|
|
19261
|
+
rowSpan: 1,
|
|
19262
|
+
memberType: memberType,
|
|
19263
|
+
isDrilled: false,
|
|
19264
|
+
parentUniqueName: parentUniqueName,
|
|
19265
|
+
levelUniqueName: levelUniqueName,
|
|
19266
|
+
hierarchy: hierarchy,
|
|
19267
|
+
valueSort: valueSort
|
|
19268
|
+
});
|
|
19269
|
+
return gTotals;
|
|
19059
19270
|
};
|
|
19060
19271
|
OlapEngine.prototype.getDepth = function (tupInfo, uniqueName, memberType) {
|
|
19061
19272
|
var memberPosition = tupInfo.uNameCollection.indexOf(uniqueName);
|
|
@@ -19296,6 +19507,53 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19296
19507
|
currTupCount--;
|
|
19297
19508
|
}
|
|
19298
19509
|
};
|
|
19510
|
+
OlapEngine.prototype.frameGrandTotalValues = function (tuples, gTotals, typeColl, measurePos) {
|
|
19511
|
+
var tupPos = 0;
|
|
19512
|
+
var lastAllStartPos;
|
|
19513
|
+
var lastAllCount;
|
|
19514
|
+
var availAllMember = false;
|
|
19515
|
+
var withoutAllEndPos = -1;
|
|
19516
|
+
var isGrandtoalDataAdd = false;
|
|
19517
|
+
var prevTupInfo;
|
|
19518
|
+
var isGrandTotalTop = false;
|
|
19519
|
+
while (tupPos < tuples.length && !isGrandtoalDataAdd) {
|
|
19520
|
+
var members = tuples[this.customArgs.action === 'down' ?
|
|
19521
|
+
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
19522
|
+
var allCount = this.tupRowInfo[tupPos].allCount;
|
|
19523
|
+
var allStartPos = this.tupRowInfo[tupPos].allStartPos;
|
|
19524
|
+
var measure = this.tupRowInfo[tupPos].measure;
|
|
19525
|
+
var typeColl_1 = this.tupRowInfo[tupPos].typeCollection;
|
|
19526
|
+
var drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
|
|
19527
|
+
var startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
|
|
19528
|
+
if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
|
|
19529
|
+
gTotals.pop();
|
|
19530
|
+
}
|
|
19531
|
+
if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
|
|
19532
|
+
(!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
|
|
19533
|
+
var attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
|
|
19534
|
+
var drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
|
|
19535
|
+
drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
|
|
19536
|
+
(prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
|
|
19537
|
+
((withoutAllEndPos > prevTupInfo.measurePosition ? false :
|
|
19538
|
+
prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
|
|
19539
|
+
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
19540
|
+
: drillAllow;
|
|
19541
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
19542
|
+
var levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
19543
|
+
var formattedText = (typeColl_1[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
19544
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
19545
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
19546
|
+
gTotals = this.frameGrandTotalAxisSet(gTotals, this.getUniqueName(members[measurePos].querySelector('UName').textContent), formattedText, this.pivotValues.length, tupPos, Number(typeColl_1[measurePos]), members[measurePos].querySelector('PARENT_UNIQUE_NAME') ? members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined, members[measurePos].querySelector('LName').textContent, members[measurePos].getAttribute('Hierarchy'), { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') });
|
|
19547
|
+
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
19548
|
+
}
|
|
19549
|
+
lastAllCount = allCount;
|
|
19550
|
+
lastAllStartPos = allStartPos;
|
|
19551
|
+
}
|
|
19552
|
+
isGrandtoalDataAdd = this.dataSourceSettings.values.length + 1 === gTotals.length ? true : false;
|
|
19553
|
+
tupPos++;
|
|
19554
|
+
}
|
|
19555
|
+
return gTotals;
|
|
19556
|
+
};
|
|
19299
19557
|
OlapEngine.prototype.frameColumnHeader = function (tuples) {
|
|
19300
19558
|
var _this = this;
|
|
19301
19559
|
this.headerGrouping = {};
|
|
@@ -19360,8 +19618,18 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19360
19618
|
withoutAllAvail = true;
|
|
19361
19619
|
isStartCol = (allCount > 0 && isStartCol) ? (allStartPos > withoutAllStartPos) : isStartCol;
|
|
19362
19620
|
}
|
|
19363
|
-
|
|
19364
|
-
|
|
19621
|
+
var isGrandTotalTop = false;
|
|
19622
|
+
if (this_1.dataSourceSettings.grandTotalsPosition === 'Top' && this_1.dataSourceSettings.showGrandTotals && this_1.dataSourceSettings.showColumnGrandTotals) {
|
|
19623
|
+
var count = 0;
|
|
19624
|
+
for (var i = 0; i < members.length; i++) {
|
|
19625
|
+
if ((members[i].querySelector('Caption').textContent).indexOf('All') === 0) {
|
|
19626
|
+
count++;
|
|
19627
|
+
}
|
|
19628
|
+
}
|
|
19629
|
+
isGrandTotalTop = count === (this_1.olapValueAxis === 'column' ? this_1.dataSourceSettings.columns.length - 1 : this_1.dataSourceSettings.columns.length);
|
|
19630
|
+
}
|
|
19631
|
+
if (isStartCol || isGrandTotalTop) {
|
|
19632
|
+
if (allCount === 0 || isGrandTotalTop) {
|
|
19365
19633
|
var levelComp = [-1, -1, -1];
|
|
19366
19634
|
if (this_1.tupColumnInfo[tupPos - 1] && this_1.tupColumnInfo[tupPos - 1].allCount === 0) {
|
|
19367
19635
|
levelComp = this_1.levelCompare(levelColl, this_1.tupColumnInfo[tupPos - 1].levelCollection);
|
|
@@ -19398,8 +19666,10 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19398
19666
|
}
|
|
19399
19667
|
this_1.setParentCollection(members);
|
|
19400
19668
|
if (withoutAllAvail ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
19401
|
-
|
|
19402
|
-
|
|
19669
|
+
if (!isGrandTotalTop) {
|
|
19670
|
+
this_1.totalCollection[this_1.totalCollection.length] =
|
|
19671
|
+
({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
|
|
19672
|
+
}
|
|
19403
19673
|
lastSavedInfo.allCount = allCount;
|
|
19404
19674
|
lastSavedInfo.allStartPos = allStartPos;
|
|
19405
19675
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -19424,10 +19694,12 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19424
19694
|
}
|
|
19425
19695
|
this_1.setParentCollection(members);
|
|
19426
19696
|
if ((withoutAllAvail && drillStartPos > -1) ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19697
|
+
if (!isGrandTotalTop) {
|
|
19698
|
+
this_1.totalCollection[this_1.totalCollection.length] =
|
|
19699
|
+
({
|
|
19700
|
+
allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
|
|
19701
|
+
});
|
|
19702
|
+
}
|
|
19431
19703
|
lastSavedInfo.allCount = allCount;
|
|
19432
19704
|
lastSavedInfo.allStartPos = allStartPos;
|
|
19433
19705
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -19931,19 +20203,26 @@ var OlapEngine = /** @__PURE__ @class */ (function () {
|
|
|
19931
20203
|
}
|
|
19932
20204
|
var newPos = 0;
|
|
19933
20205
|
var totPos = 0;
|
|
20206
|
+
var valuePos = 0;
|
|
19934
20207
|
gSumFlag = false;
|
|
19935
20208
|
gSumGrouping = this.sortRowHeaders(gSumGrouping);
|
|
19936
20209
|
for (var rPos = this.colDepth; rPos < rowCount; rPos++) {
|
|
19937
20210
|
/* eslint-disable @typescript-eslint/dot-notation */
|
|
20211
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) &&
|
|
20212
|
+
((this.olapValueAxis === 'column' && this.colDepth + 1 === rPos) || (this.olapValueAxis === 'row' && this.colDepth + this.dataSourceSettings.values.length + 1 === rPos))) {
|
|
20213
|
+
newPos = 0;
|
|
20214
|
+
gSumFlag = false;
|
|
20215
|
+
}
|
|
19938
20216
|
var cell = gSumFlag ? gSumGrouping : sortLvlGrouping[levels[0]]['parent'];
|
|
19939
20217
|
/* eslint-enable @typescript-eslint/dot-notation */
|
|
19940
|
-
var currPos = gSumFlag ? (newPos - totPos) : newPos;
|
|
20218
|
+
var currPos = (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) && this.colDepth === rPos) ? cell.length : gSumFlag ? (newPos - totPos) : newPos;
|
|
19941
20219
|
if (cell[currPos]) {
|
|
19942
20220
|
this.pivotValues[rPos] = [cell[currPos]];
|
|
19943
20221
|
this.pivotValues[rPos][0].rowIndex = rPos;
|
|
19944
|
-
this.valueContent[
|
|
20222
|
+
this.valueContent[valuePos][0] = this.pivotValues[rPos][0];
|
|
19945
20223
|
}
|
|
19946
20224
|
newPos++;
|
|
20225
|
+
valuePos++;
|
|
19947
20226
|
if (this.pivotValues[rPos][0].type === 'grand sum') {
|
|
19948
20227
|
gSumFlag = true;
|
|
19949
20228
|
totPos = newPos;
|
|
@@ -22260,6 +22539,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22260
22539
|
_this_1.request = new XMLHttpRequest();
|
|
22261
22540
|
/** @hidden */
|
|
22262
22541
|
_this_1.isServerWaitingPopup = false;
|
|
22542
|
+
/** @hidden */
|
|
22543
|
+
_this_1.actionObj = {};
|
|
22263
22544
|
_this_1.pivotView = _this_1;
|
|
22264
22545
|
setValue('mergePersistData', _this_1.mergePersistPivotData, _this_1);
|
|
22265
22546
|
return _this_1;
|
|
@@ -22302,10 +22583,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22302
22583
|
modules.push({ args: [this], member: 'grouping' });
|
|
22303
22584
|
}
|
|
22304
22585
|
if (this.allowDrillThrough || (this.editSettings && this.editSettings.allowEditing)) {
|
|
22305
|
-
modules.push({ args: [this], member: '
|
|
22586
|
+
modules.push({ args: [this], member: 'drillThrough' });
|
|
22306
22587
|
}
|
|
22307
22588
|
if (this.displayOption.view !== 'Table') {
|
|
22308
|
-
modules.push({ args: [this], member: '
|
|
22589
|
+
modules.push({ args: [this], member: 'pivotChart' });
|
|
22309
22590
|
}
|
|
22310
22591
|
return modules;
|
|
22311
22592
|
};
|
|
@@ -22885,7 +23166,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22885
23166
|
this.setProperties({ gridSettings: { allowSelection: true, selectionSettings: { cellSelectionMode: 'Box', mode: 'Cell', type: 'Multiple' } } }, true);
|
|
22886
23167
|
}
|
|
22887
23168
|
if (this.displayOption.view !== 'Table') {
|
|
22888
|
-
this.
|
|
23169
|
+
this.pivotChartModule = new PivotChart();
|
|
22889
23170
|
}
|
|
22890
23171
|
this.currentView = this.currentView ? this.currentView : (this.displayOption.view === 'Both' ?
|
|
22891
23172
|
this.displayOption.primary : this.displayOption.view);
|
|
@@ -23152,32 +23433,37 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23152
23433
|
};
|
|
23153
23434
|
PivotView.prototype.initialLoad = function () {
|
|
23154
23435
|
var _this_1 = this;
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
|
|
23436
|
+
try {
|
|
23437
|
+
this.cellTemplateFn = this.templateParser(this.cellTemplate);
|
|
23438
|
+
this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
|
|
23439
|
+
if (this.spinnerTemplate) {
|
|
23440
|
+
createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
|
|
23441
|
+
}
|
|
23442
|
+
else {
|
|
23443
|
+
createSpinner({ target: this.element }, this.createElement);
|
|
23444
|
+
}
|
|
23445
|
+
var loadArgs = {
|
|
23446
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
23447
|
+
pivotview: this,
|
|
23448
|
+
fieldsType: {}
|
|
23449
|
+
};
|
|
23450
|
+
this.trigger(load, loadArgs, function (observedArgs) {
|
|
23451
|
+
_this_1.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
23452
|
+
_this_1.fieldsType = observedArgs.fieldsType;
|
|
23453
|
+
_this_1.updateClass();
|
|
23454
|
+
_this_1.notify(initSubComponent, {});
|
|
23455
|
+
if (_this_1.dataSourceSettings.mode !== 'Server') {
|
|
23456
|
+
_this_1.notify(initialLoad, {});
|
|
23457
|
+
}
|
|
23458
|
+
if (_this_1.isAdaptive) {
|
|
23459
|
+
_this_1.contextMenuModule.render();
|
|
23460
|
+
}
|
|
23461
|
+
_this_1.notify(initToolbar, {});
|
|
23462
|
+
});
|
|
23159
23463
|
}
|
|
23160
|
-
|
|
23161
|
-
|
|
23464
|
+
catch (execption) {
|
|
23465
|
+
this.actionFailureMethod(execption);
|
|
23162
23466
|
}
|
|
23163
|
-
var loadArgs = {
|
|
23164
|
-
dataSourceSettings: this.dataSourceSettings,
|
|
23165
|
-
pivotview: this,
|
|
23166
|
-
fieldsType: {}
|
|
23167
|
-
};
|
|
23168
|
-
this.trigger(load, loadArgs, function (observedArgs) {
|
|
23169
|
-
_this_1.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
23170
|
-
_this_1.fieldsType = observedArgs.fieldsType;
|
|
23171
|
-
_this_1.updateClass();
|
|
23172
|
-
_this_1.notify(initSubComponent, {});
|
|
23173
|
-
if (_this_1.dataSourceSettings.mode !== 'Server') {
|
|
23174
|
-
_this_1.notify(initialLoad, {});
|
|
23175
|
-
}
|
|
23176
|
-
if (_this_1.isAdaptive) {
|
|
23177
|
-
_this_1.contextMenuModule.render();
|
|
23178
|
-
}
|
|
23179
|
-
_this_1.notify(initToolbar, {});
|
|
23180
|
-
});
|
|
23181
23467
|
};
|
|
23182
23468
|
/**
|
|
23183
23469
|
* Register the internal events.
|
|
@@ -23416,15 +23702,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23416
23702
|
if (!this.grid && newProp.displayOption.view !== 'Chart') {
|
|
23417
23703
|
this.renderEmptyGrid();
|
|
23418
23704
|
if (newProp.displayOption.view === 'Table') {
|
|
23419
|
-
if (this.
|
|
23420
|
-
this.
|
|
23705
|
+
if (this.pivotChartModule) {
|
|
23706
|
+
this.pivotChartModule.destroy();
|
|
23421
23707
|
this.chart = undefined;
|
|
23422
|
-
this.
|
|
23708
|
+
this.pivotChartModule = undefined;
|
|
23423
23709
|
}
|
|
23424
23710
|
}
|
|
23425
23711
|
}
|
|
23426
|
-
else if (!this.
|
|
23427
|
-
this.
|
|
23712
|
+
else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
|
|
23713
|
+
this.pivotChartModule = new PivotChart();
|
|
23428
23714
|
}
|
|
23429
23715
|
}
|
|
23430
23716
|
else if (this.showToolbar && !isNullOrUndefined(newProp.displayOption) && newProp.displayOption.view) {
|
|
@@ -23454,12 +23740,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23454
23740
|
(newProp.chartSettings.chartSeries && Object.keys(newProp.chartSettings.chartSeries).indexOf('type') !== -1))) {
|
|
23455
23741
|
this.groupingBarModule.renderLayout();
|
|
23456
23742
|
}
|
|
23457
|
-
if (isNullOrUndefined(this.
|
|
23458
|
-
this.
|
|
23743
|
+
if (isNullOrUndefined(this.pivotChartModule) && this.displayOption.view !== 'Table') {
|
|
23744
|
+
this.pivotChartModule = new PivotChart();
|
|
23459
23745
|
}
|
|
23460
23746
|
var engineModule = this.dataType === 'pivot' ? this.engineModule : this.olapEngineModule;
|
|
23461
|
-
if (!isNullOrUndefined(this.
|
|
23462
|
-
this.
|
|
23747
|
+
if (!isNullOrUndefined(this.pivotChartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
|
|
23748
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
23463
23749
|
}
|
|
23464
23750
|
if (!isNullOrUndefined(engineModule.pivotValues) && !isNullOrUndefined(engineModule.fieldList)) {
|
|
23465
23751
|
this.notify(uiUpdate, this);
|
|
@@ -23582,9 +23868,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23582
23868
|
*/
|
|
23583
23869
|
PivotView.prototype.renderPivotGrid = function () {
|
|
23584
23870
|
this.clearTemplate();
|
|
23585
|
-
if (this.
|
|
23586
|
-
this.
|
|
23587
|
-
this.
|
|
23871
|
+
if (this.pivotChartModule) {
|
|
23872
|
+
this.pivotChartModule.engineModule = this.engineModule;
|
|
23873
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
23588
23874
|
if (this.enableRtl && this.chart && document.body.getAttribute('dir') !== 'rtl') {
|
|
23589
23875
|
addClass([this.chart.element], PIVOTCHART_LTR);
|
|
23590
23876
|
}
|
|
@@ -23615,7 +23901,7 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23615
23901
|
this.applyHyperlinkSettings();
|
|
23616
23902
|
}
|
|
23617
23903
|
this.renderModule = this.renderModule ? this.renderModule : new Render(this);
|
|
23618
|
-
this.renderModule.render();
|
|
23904
|
+
this.renderModule.render(true);
|
|
23619
23905
|
}
|
|
23620
23906
|
else if (this.grid) {
|
|
23621
23907
|
remove(this.grid.element);
|
|
@@ -23631,7 +23917,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23631
23917
|
if (this.toolbarModule && this.toolbarModule.toolbar) {
|
|
23632
23918
|
this.toolbarModule.toolbar.width = this.getGridWidthAsNumber() - 2;
|
|
23633
23919
|
}
|
|
23634
|
-
this.
|
|
23920
|
+
if (this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis) {
|
|
23921
|
+
this.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.getGridWidthAsNumber());
|
|
23922
|
+
}
|
|
23635
23923
|
this.chart.width = formatUnit(this.getGridWidthAsNumber());
|
|
23636
23924
|
if (this.currentView === 'Table') {
|
|
23637
23925
|
this.grid.element.style.display = '';
|
|
@@ -23651,7 +23939,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23651
23939
|
}
|
|
23652
23940
|
if (this.toolbarModule) {
|
|
23653
23941
|
if (this.showFieldList && select('#' + this.element.id + '_PivotFieldList', this.element)) {
|
|
23654
|
-
|
|
23942
|
+
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1) {
|
|
23943
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
|
|
23944
|
+
}
|
|
23945
|
+
else {
|
|
23946
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.top = this.element.querySelector('.' + GRID_TOOLBAR).offsetHeight.toString() + 'px';
|
|
23947
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.position = 'relative';
|
|
23948
|
+
}
|
|
23655
23949
|
}
|
|
23656
23950
|
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1 &&
|
|
23657
23951
|
this.showToolbar && this.element.querySelector('.e-toggle-field-list')) {
|
|
@@ -23803,7 +24097,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23803
24097
|
isDrillThrough: (pivot.allowDrillThrough || pivot.editSettings.allowEditing),
|
|
23804
24098
|
localeObj: pivot.localeObj,
|
|
23805
24099
|
fieldsType: pivot.fieldsType,
|
|
23806
|
-
clonedReport: pivot.clonedReport
|
|
24100
|
+
clonedReport: pivot.clonedReport,
|
|
24101
|
+
globalize: pivot.globalize,
|
|
24102
|
+
currenyCode: pivot.currencyCode
|
|
23807
24103
|
};
|
|
23808
24104
|
/* eslint-enable @typescript-eslint/indent */
|
|
23809
24105
|
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
@@ -23853,6 +24149,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23853
24149
|
this.exportType = 'Excel';
|
|
23854
24150
|
this.grid.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23855
24151
|
}
|
|
24152
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24153
|
+
var actionInfo = {
|
|
24154
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
24155
|
+
};
|
|
24156
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24157
|
+
if (this.actionObj.actionName) {
|
|
24158
|
+
this.actionCompleteMethod();
|
|
24159
|
+
}
|
|
23856
24160
|
};
|
|
23857
24161
|
/**
|
|
23858
24162
|
* Export PivotGrid data to CSV file.
|
|
@@ -23870,6 +24174,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23870
24174
|
this.exportType = 'CSV';
|
|
23871
24175
|
this.grid.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23872
24176
|
}
|
|
24177
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24178
|
+
var actionInfo = {
|
|
24179
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
24180
|
+
};
|
|
24181
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24182
|
+
if (this.actionObj.actionName) {
|
|
24183
|
+
this.actionCompleteMethod();
|
|
24184
|
+
}
|
|
23873
24185
|
};
|
|
23874
24186
|
/**
|
|
23875
24187
|
* Export Pivot widget data to PDF document.
|
|
@@ -23886,6 +24198,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23886
24198
|
else {
|
|
23887
24199
|
this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
23888
24200
|
}
|
|
24201
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24202
|
+
var actionInfo = {
|
|
24203
|
+
exportInfo: { type: 'PDF', info: pdfExportProperties }
|
|
24204
|
+
};
|
|
24205
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24206
|
+
if (this.actionObj.actionName) {
|
|
24207
|
+
this.actionCompleteMethod();
|
|
24208
|
+
}
|
|
23889
24209
|
};
|
|
23890
24210
|
/**
|
|
23891
24211
|
* Export method for the chart.
|
|
@@ -23900,6 +24220,14 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23900
24220
|
if (this.chart && this.chart.enableExport) {
|
|
23901
24221
|
this.chart.exportModule.export(type, fileName, orientation, null, width, height);
|
|
23902
24222
|
}
|
|
24223
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24224
|
+
var actionInfo = {
|
|
24225
|
+
exportInfo: { type: type, info: fileName }
|
|
24226
|
+
};
|
|
24227
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24228
|
+
if (this.actionObj.actionName) {
|
|
24229
|
+
this.actionCompleteMethod();
|
|
24230
|
+
}
|
|
23903
24231
|
};
|
|
23904
24232
|
/**
|
|
23905
24233
|
* Print method for the chart.
|
|
@@ -24011,6 +24339,10 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24011
24339
|
};
|
|
24012
24340
|
_this_1.trigger(enginePopulated, eventArgs);
|
|
24013
24341
|
pivot_1.engineModule.pivotValues = eventArgs.pivotValues;
|
|
24342
|
+
var actionInfo = {
|
|
24343
|
+
drillInfo: drilledItem_1
|
|
24344
|
+
};
|
|
24345
|
+
_this_1.actionObj.actionInfo = actionInfo;
|
|
24014
24346
|
pivot_1.renderPivotGrid();
|
|
24015
24347
|
}
|
|
24016
24348
|
else {
|
|
@@ -24363,6 +24695,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24363
24695
|
this.unwireEvents();
|
|
24364
24696
|
this.wireEvents();
|
|
24365
24697
|
this.isChartLoaded = false;
|
|
24698
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24699
|
+
if (this.actionObj.actionName) {
|
|
24700
|
+
if (this.actionObj.actionName !== windowResize) {
|
|
24701
|
+
this.actionCompleteMethod();
|
|
24702
|
+
}
|
|
24703
|
+
}
|
|
24366
24704
|
};
|
|
24367
24705
|
PivotView.prototype.setToolTip = function (args) {
|
|
24368
24706
|
var colIndex = Number(args.target.getAttribute('aria-colindex'));
|
|
@@ -24394,6 +24732,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24394
24732
|
if (cell && this.engineModule.fieldList[cell.actualText]) {
|
|
24395
24733
|
var field = this.engineModule.fieldList[cell.actualText];
|
|
24396
24734
|
aggregateType = field.aggregateType;
|
|
24735
|
+
if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
|
|
24736
|
+
field.type === 'exclude')) {
|
|
24737
|
+
aggregateType = 'Count';
|
|
24738
|
+
}
|
|
24739
|
+
else {
|
|
24740
|
+
aggregateType = (aggregateType === undefined) ? 'Sum' : field.aggregateType;
|
|
24741
|
+
}
|
|
24397
24742
|
caption = field.caption;
|
|
24398
24743
|
hasField = true;
|
|
24399
24744
|
}
|
|
@@ -24613,76 +24958,105 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24613
24958
|
ele = target.parentElement.parentElement;
|
|
24614
24959
|
}
|
|
24615
24960
|
this.CellClicked(target, e);
|
|
24616
|
-
|
|
24617
|
-
|
|
24618
|
-
|
|
24619
|
-
|
|
24620
|
-
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24624
|
-
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
else {
|
|
24628
|
-
var level = this.getLevel(header);
|
|
24629
|
-
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
24630
|
-
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24961
|
+
try {
|
|
24962
|
+
if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
|
|
24963
|
+
&& this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
|
|
24964
|
+
this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
|
|
24965
|
+
ele.classList.contains('e-stot'))) {
|
|
24966
|
+
var FieldName = target.parentElement.getAttribute('fieldname');
|
|
24967
|
+
var fieldInfo = PivotUtil.getFieldInfo(FieldName, this);
|
|
24968
|
+
this.actionObj.actionName = sortValue;
|
|
24969
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
24970
|
+
if (this.actionBeginMethod()) {
|
|
24971
|
+
return;
|
|
24631
24972
|
}
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
|
|
24635
|
-
|
|
24636
|
-
|
|
24637
|
-
|
|
24638
|
-
dataSourceSettings: {
|
|
24639
|
-
valueSortSettings: {
|
|
24640
|
-
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
24641
|
-
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
24642
|
-
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
24643
|
-
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
24644
|
-
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
24645
|
-
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24973
|
+
var colIndex = Number(ele.getAttribute('aria-colindex'));
|
|
24974
|
+
var rowIndex = Number(ele.getAttribute('index'));
|
|
24975
|
+
if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24976
|
+
var header = this.pivotValues[rowIndex][colIndex];
|
|
24977
|
+
if (this.dataSourceSettings.valueIndex === -1) {
|
|
24978
|
+
rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
|
|
24646
24979
|
}
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
if (
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24980
|
+
else {
|
|
24981
|
+
var level = this.getLevel(header);
|
|
24982
|
+
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
24983
|
+
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24984
|
+
}
|
|
24985
|
+
}
|
|
24986
|
+
else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24987
|
+
colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
|
|
24988
|
+
rowIndex = this.engineModule.headerContent.length - 1;
|
|
24989
|
+
}
|
|
24990
|
+
this.setProperties({
|
|
24991
|
+
dataSourceSettings: {
|
|
24992
|
+
valueSortSettings: {
|
|
24993
|
+
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
24994
|
+
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
24995
|
+
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
24996
|
+
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
24997
|
+
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
24998
|
+
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24999
|
+
}
|
|
25000
|
+
}
|
|
25001
|
+
}, true);
|
|
25002
|
+
this.showWaitingPopup();
|
|
25003
|
+
var pivot = this; /* eslint-disable-line */
|
|
25004
|
+
pivot.engineModule.enableValueSorting = true;
|
|
25005
|
+
if (pivot.enableVirtualization) {
|
|
25006
|
+
if (pivot.dataSourceSettings.enableSorting) {
|
|
25007
|
+
for (var _i = 0, _a = Object.keys(pivot.engineModule.fieldList); _i < _a.length; _i++) {
|
|
25008
|
+
var key = _a[_i];
|
|
25009
|
+
pivot.engineModule.fieldList[key].sort = 'Ascending';
|
|
25010
|
+
}
|
|
25011
|
+
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
25012
|
+
}
|
|
25013
|
+
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
25014
|
+
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
25015
|
+
}
|
|
25016
|
+
else {
|
|
25017
|
+
pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
|
|
25018
|
+
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
25019
|
+
pivot.engineModule.applyValueSorting();
|
|
25020
|
+
pivot.engineModule.updateEngine();
|
|
24657
25021
|
}
|
|
24658
|
-
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
24659
25022
|
}
|
|
24660
|
-
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
25023
|
+
else if (pivot.dataSourceSettings.mode === 'Server') {
|
|
24661
25024
|
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
24662
25025
|
}
|
|
24663
25026
|
else {
|
|
24664
|
-
pivot.engineModule.
|
|
24665
|
-
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
24666
|
-
pivot.engineModule.applyValueSorting();
|
|
24667
|
-
pivot.engineModule.updateEngine();
|
|
25027
|
+
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
24668
25028
|
}
|
|
25029
|
+
pivot.allowServerDataBinding = false;
|
|
25030
|
+
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
25031
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25032
|
+
delete pivot.bulkChanges.pivotValues;
|
|
25033
|
+
pivot.allowServerDataBinding = true;
|
|
25034
|
+
var actionInfo = {
|
|
25035
|
+
valueSortInfo: this.engineModule.valueSortSettings
|
|
25036
|
+
};
|
|
25037
|
+
this.actionObj.actionInfo = actionInfo;
|
|
25038
|
+
pivot.renderPivotGrid();
|
|
24669
25039
|
}
|
|
24670
|
-
|
|
24671
|
-
|
|
24672
|
-
|
|
24673
|
-
else {
|
|
24674
|
-
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
24675
|
-
}
|
|
24676
|
-
pivot.allowServerDataBinding = false;
|
|
24677
|
-
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
24678
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
24679
|
-
delete pivot.bulkChanges.pivotValues;
|
|
24680
|
-
pivot.allowServerDataBinding = true;
|
|
24681
|
-
pivot.renderPivotGrid();
|
|
25040
|
+
}
|
|
25041
|
+
catch (execption) {
|
|
25042
|
+
this.actionFailureMethod(execption);
|
|
24682
25043
|
}
|
|
24683
25044
|
}
|
|
24684
25045
|
else if (target.classList.contains(COLLAPSE) || target.classList.contains(EXPAND)) {
|
|
24685
|
-
|
|
25046
|
+
var drillFieldName = target.parentElement.getAttribute('fieldname');
|
|
25047
|
+
var fieldInfo = PivotUtil.getFieldInfo(drillFieldName, this);
|
|
25048
|
+
var actionName = target.classList.contains(COLLAPSE) ? this.actionObj.actionName = drillUp : target.classList.contains(EXPAND) ? this.actionObj.actionName = drillDown : '';
|
|
25049
|
+
this.actionObj.actionName = actionName;
|
|
25050
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
25051
|
+
if (this.actionBeginMethod()) {
|
|
25052
|
+
return;
|
|
25053
|
+
}
|
|
25054
|
+
try {
|
|
25055
|
+
this.onDrill(target);
|
|
25056
|
+
}
|
|
25057
|
+
catch (execption) {
|
|
25058
|
+
this.actionFailureMethod(execption);
|
|
25059
|
+
}
|
|
24686
25060
|
}
|
|
24687
25061
|
else {
|
|
24688
25062
|
this.CellClicked(target, e);
|
|
@@ -24784,7 +25158,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24784
25158
|
var firstColWidth = this.pivotColumns[0].width;
|
|
24785
25159
|
var eventArgs = {
|
|
24786
25160
|
columns: this.pivotColumns,
|
|
24787
|
-
dataSourceSettings: this.dataSourceSettings
|
|
25161
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
25162
|
+
stackedColumns: this.getStackedColumns(gridcolumns, [])
|
|
24788
25163
|
};
|
|
24789
25164
|
this.trigger(beforeColumnsRender, eventArgs);
|
|
24790
25165
|
if (this.enableVirtualization && eventArgs.columns.length > 0 && eventArgs.columns[0].width !== gridcolumns[0].width) {
|
|
@@ -24889,8 +25264,16 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24889
25264
|
/* eslint-disable-next-line */
|
|
24890
25265
|
/** @hidden */
|
|
24891
25266
|
PivotView.prototype.onWindowResize = function () {
|
|
25267
|
+
this.actionObj.actionName = windowResize;
|
|
25268
|
+
if (this.actionBeginMethod()) {
|
|
25269
|
+
return;
|
|
25270
|
+
}
|
|
24892
25271
|
clearTimeout(this.timeOutObj);
|
|
24893
25272
|
this.timeOutObj = setTimeout(this.layoutRefresh.bind(this), 500);
|
|
25273
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
25274
|
+
if (this.actionObj.actionName) {
|
|
25275
|
+
this.actionCompleteMethod();
|
|
25276
|
+
}
|
|
24894
25277
|
};
|
|
24895
25278
|
/**
|
|
24896
25279
|
* Refreshes the Pivot Table for blazor layoutRefresh is called for other base refresh is called.
|
|
@@ -25285,7 +25668,9 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25285
25668
|
isDrillThrough: (_this_1.allowDrillThrough || _this_1.editSettings.allowEditing),
|
|
25286
25669
|
localeObj: _this_1.localeObj,
|
|
25287
25670
|
fieldsType: _this_1.fieldsType,
|
|
25288
|
-
clonedReport: _this_1.clonedReport
|
|
25671
|
+
clonedReport: _this_1.clonedReport,
|
|
25672
|
+
globalize: _this_1.globalize,
|
|
25673
|
+
currenyCode: _this_1.currencyCode
|
|
25289
25674
|
};
|
|
25290
25675
|
if (_this_1.dataType === 'pivot') {
|
|
25291
25676
|
if (_this_1.dataSourceSettings.groupSettings && _this_1.dataSourceSettings.groupSettings.length > 0) {
|
|
@@ -25511,7 +25896,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25511
25896
|
var str = 'color: ' + format[k].style.color + '!important;background-color: ' + format[k].style.backgroundColor +
|
|
25512
25897
|
'!important;font-size: ' + format[k].style.fontSize + '!important;font-family: ' + format[k].style.fontFamily +
|
|
25513
25898
|
' !important;';
|
|
25514
|
-
|
|
25899
|
+
var formatClass = '.format' + this.element.id + k;
|
|
25900
|
+
sheet.insertRule(formatClass + ', ' + formatClass + ' .e-cellvalue' + '{' + str + '}', 0);
|
|
25515
25901
|
}
|
|
25516
25902
|
}
|
|
25517
25903
|
};
|
|
@@ -25738,6 +26124,65 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25738
26124
|
EventHandler.remove(document, this.isAdaptive ? 'touchend' : 'click', this.removeButtonFocus);
|
|
25739
26125
|
window.removeEventListener('resize', this.onWindowResize.bind(this), true);
|
|
25740
26126
|
};
|
|
26127
|
+
/** @hidden */
|
|
26128
|
+
PivotView.prototype.actionBeginMethod = function () {
|
|
26129
|
+
var eventArgs = {
|
|
26130
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
26131
|
+
actionName: this.actionObj.actionName,
|
|
26132
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
26133
|
+
cancel: false
|
|
26134
|
+
};
|
|
26135
|
+
this.trigger(actionBegin, eventArgs);
|
|
26136
|
+
return eventArgs.cancel;
|
|
26137
|
+
};
|
|
26138
|
+
/** @hidden */
|
|
26139
|
+
PivotView.prototype.actionCompleteMethod = function () {
|
|
26140
|
+
var eventArgs = {
|
|
26141
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
26142
|
+
actionName: this.actionObj.actionName,
|
|
26143
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
26144
|
+
actionInfo: this.actionObj.actionInfo
|
|
26145
|
+
};
|
|
26146
|
+
this.trigger(actionComplete, eventArgs);
|
|
26147
|
+
this.actionObj.actionName = '';
|
|
26148
|
+
this.actionObj.actionInfo = undefined;
|
|
26149
|
+
this.actionObj.fieldInfo = undefined;
|
|
26150
|
+
};
|
|
26151
|
+
/** @hidden */
|
|
26152
|
+
PivotView.prototype.actionFailureMethod = function (error) {
|
|
26153
|
+
var eventArgs = {
|
|
26154
|
+
actionName: this.actionObj.actionName,
|
|
26155
|
+
errorInfo: error
|
|
26156
|
+
};
|
|
26157
|
+
this.trigger(actionFailure, eventArgs);
|
|
26158
|
+
};
|
|
26159
|
+
/** @hidden */
|
|
26160
|
+
PivotView.prototype.getActionCompleteName = function () {
|
|
26161
|
+
var actionName = (this.actionObj.actionName == openConditionalFormatting) ? conditionallyFormatted : (this.actionObj.actionName == openNumberFormatting) ? numberFormatted
|
|
26162
|
+
: (this.actionObj.actionName == tableView) ? tableViewed : (this.actionObj.actionName == chartView) ? chartViewed : (this.actionObj.actionName == hideSubTotals) ? subTotalsHidden : (this.actionObj.actionName == subTotalsRow) ? subTotalsRowShown
|
|
26163
|
+
: (this.actionObj.actionName == subTotalsColumn) ? subTotalsColumnShown : (this.actionObj.actionName == showSubTotals) ? subTotalsShown : (this.actionObj.actionName == hideGrandTotals) ? grandTotalsHidden
|
|
26164
|
+
: (this.actionObj.actionName == grandTotalsRow) ? grandTotalsRowShown : (this.actionObj.actionName == grandTotalsColumn) ? grandTotalsColumnShown : (this.actionObj.actionName == showGrandTotals) ? grandTotalsShown
|
|
26165
|
+
: (this.actionObj.actionName == sortValue) ? valueSorted : (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
26166
|
+
: (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == editRecord ? recordEdited : this.actionObj.actionName == reportChange ? reportChanged
|
|
26167
|
+
: this.actionObj.actionName == saveEditedRecords ? editedRecordsSaved : this.actionObj.actionName == addNewRecord ? newRecordAdded
|
|
26168
|
+
: this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
|
|
26169
|
+
: (this.actionObj.actionName == svgExport) ? svgExported : (this.actionObj.actionName == pdfExport) ? pdfExported : (this.actionObj.actionName == csvExport) ? csvExported : (this.actionObj.actionName == excelExport) ? excelExported : this.actionObj.actionName == windowResize ? windowResized
|
|
26170
|
+
: this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
|
|
26171
|
+
: (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : this.actionObj.actionName;
|
|
26172
|
+
return actionName;
|
|
26173
|
+
};
|
|
26174
|
+
/* eslint-disable-next-line */
|
|
26175
|
+
/** @hidden */
|
|
26176
|
+
PivotView.prototype.getStackedColumns = function (gridcolumns, stackedColumns) {
|
|
26177
|
+
for (var _i = 0, gridcolumns_4 = gridcolumns; _i < gridcolumns_4.length; _i++) {
|
|
26178
|
+
var column = gridcolumns_4[_i];
|
|
26179
|
+
stackedColumns.push(column);
|
|
26180
|
+
if (column.columns && column.columns.length > 0) {
|
|
26181
|
+
this.getStackedColumns(column.columns, stackedColumns);
|
|
26182
|
+
}
|
|
26183
|
+
}
|
|
26184
|
+
return stackedColumns;
|
|
26185
|
+
};
|
|
25741
26186
|
/**
|
|
25742
26187
|
* To destroy the PivotView elements.
|
|
25743
26188
|
* @returns {void}
|
|
@@ -25801,8 +26246,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25801
26246
|
if (this.commonModule) {
|
|
25802
26247
|
this.commonModule.destroy();
|
|
25803
26248
|
}
|
|
25804
|
-
if (this.
|
|
25805
|
-
this.
|
|
26249
|
+
if (this.pivotChartModule) {
|
|
26250
|
+
this.pivotChartModule.destroy();
|
|
25806
26251
|
}
|
|
25807
26252
|
if (this.pivotButtonModule && !this.pivotButtonModule.isDestroyed) {
|
|
25808
26253
|
this.pivotButtonModule.destroy();
|
|
@@ -25857,8 +26302,8 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25857
26302
|
if (this.commonModule) {
|
|
25858
26303
|
this.commonModule = null;
|
|
25859
26304
|
}
|
|
25860
|
-
if (this.
|
|
25861
|
-
this.
|
|
26305
|
+
if (this.pivotChartModule) {
|
|
26306
|
+
this.pivotChartModule = null;
|
|
25862
26307
|
}
|
|
25863
26308
|
if (this.pivotButtonModule) {
|
|
25864
26309
|
this.pivotButtonModule = null;
|
|
@@ -25878,6 +26323,12 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25878
26323
|
if (this.drillThroughModule) {
|
|
25879
26324
|
this.drillThroughModule = null;
|
|
25880
26325
|
}
|
|
26326
|
+
if (this.clonedDataSet) {
|
|
26327
|
+
this.clonedDataSet = null;
|
|
26328
|
+
}
|
|
26329
|
+
if (this.clonedReport) {
|
|
26330
|
+
this.clonedReport = null;
|
|
26331
|
+
}
|
|
25881
26332
|
this.element.innerHTML = '';
|
|
25882
26333
|
removeClass([this.element], ROOT);
|
|
25883
26334
|
removeClass([this.element], RTL);
|
|
@@ -26220,6 +26671,15 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
26220
26671
|
__decorate([
|
|
26221
26672
|
Event()
|
|
26222
26673
|
], PivotView.prototype, "beforeServiceInvoke", void 0);
|
|
26674
|
+
__decorate([
|
|
26675
|
+
Event()
|
|
26676
|
+
], PivotView.prototype, "actionBegin", void 0);
|
|
26677
|
+
__decorate([
|
|
26678
|
+
Event()
|
|
26679
|
+
], PivotView.prototype, "actionComplete", void 0);
|
|
26680
|
+
__decorate([
|
|
26681
|
+
Event()
|
|
26682
|
+
], PivotView.prototype, "actionFailure", void 0);
|
|
26223
26683
|
PivotView = __decorate([
|
|
26224
26684
|
NotifyPropertyChanges
|
|
26225
26685
|
], PivotView);
|
|
@@ -26234,6 +26694,250 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
|
|
|
26234
26694
|
* Renderer Export
|
|
26235
26695
|
*/
|
|
26236
26696
|
|
|
26697
|
+
/**
|
|
26698
|
+
* This is a file to perform common utility for OLAP and Relational datasource
|
|
26699
|
+
* @hidden
|
|
26700
|
+
*/
|
|
26701
|
+
var PivotExportUtil = /** @__PURE__ @class */ (function () {
|
|
26702
|
+
function PivotExportUtil() {
|
|
26703
|
+
}
|
|
26704
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
26705
|
+
PivotExportUtil.getDefinedObj = function (data) {
|
|
26706
|
+
var keyPos = 0;
|
|
26707
|
+
var framedSet = {};
|
|
26708
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
26709
|
+
if (!(data === null || data === undefined)) {
|
|
26710
|
+
var fields = Object.keys(data);
|
|
26711
|
+
while (keyPos < fields.length) {
|
|
26712
|
+
if (!(data[fields[keyPos]] === null || data[fields[keyPos]] === undefined)) {
|
|
26713
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
26714
|
+
}
|
|
26715
|
+
keyPos++;
|
|
26716
|
+
}
|
|
26717
|
+
}
|
|
26718
|
+
else {
|
|
26719
|
+
framedSet = data;
|
|
26720
|
+
}
|
|
26721
|
+
return framedSet;
|
|
26722
|
+
};
|
|
26723
|
+
PivotExportUtil.getClonedPivotValues = function (pivotValues) {
|
|
26724
|
+
var clonedSets = [];
|
|
26725
|
+
for (var i = 0; i < pivotValues.length; i++) {
|
|
26726
|
+
if (pivotValues[i]) {
|
|
26727
|
+
clonedSets[i] = [];
|
|
26728
|
+
for (var j = 0; j < pivotValues[i].length; j++) {
|
|
26729
|
+
if (pivotValues[i][j]) {
|
|
26730
|
+
/* eslint-disable */
|
|
26731
|
+
clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
|
|
26732
|
+
/* eslint-enable */
|
|
26733
|
+
}
|
|
26734
|
+
}
|
|
26735
|
+
}
|
|
26736
|
+
}
|
|
26737
|
+
return clonedSets;
|
|
26738
|
+
};
|
|
26739
|
+
/* eslint-disable */
|
|
26740
|
+
PivotExportUtil.getClonedPivotValueObj = function (data) {
|
|
26741
|
+
/* eslint-enable */
|
|
26742
|
+
var keyPos = 0;
|
|
26743
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
26744
|
+
var framedSet = {};
|
|
26745
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
26746
|
+
if (!(data === null || data === undefined)) {
|
|
26747
|
+
var fields = Object.keys(data);
|
|
26748
|
+
while (keyPos < fields.length) {
|
|
26749
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
26750
|
+
keyPos++;
|
|
26751
|
+
}
|
|
26752
|
+
}
|
|
26753
|
+
else {
|
|
26754
|
+
framedSet = data;
|
|
26755
|
+
}
|
|
26756
|
+
return framedSet;
|
|
26757
|
+
};
|
|
26758
|
+
/* eslint-disable */
|
|
26759
|
+
PivotExportUtil.isContainCommonElements = function (collection1, collection2) {
|
|
26760
|
+
/* eslint-enable */
|
|
26761
|
+
for (var i = 0, cnt = collection1.length; i < cnt; i++) {
|
|
26762
|
+
for (var j = 0, lnt = collection2.length; j < lnt; j++) {
|
|
26763
|
+
if (collection2[j] === collection1[i]) {
|
|
26764
|
+
return true;
|
|
26765
|
+
}
|
|
26766
|
+
}
|
|
26767
|
+
}
|
|
26768
|
+
return false;
|
|
26769
|
+
};
|
|
26770
|
+
/* eslint-disable */
|
|
26771
|
+
PivotExportUtil.formatPdfHeaderFooter = function (pdf) {
|
|
26772
|
+
var contents = [];
|
|
26773
|
+
if (!isNullOrUndefined(pdf)) {
|
|
26774
|
+
for (var i = 0; i < pdf.length; i++) {
|
|
26775
|
+
var a = pdf[i];
|
|
26776
|
+
var content = {
|
|
26777
|
+
/* eslint-enable */
|
|
26778
|
+
type: a.Type,
|
|
26779
|
+
pageNumberType: a.PageNumberType,
|
|
26780
|
+
style: a.Style ? {
|
|
26781
|
+
penColor: a.Style.PenColor,
|
|
26782
|
+
penSize: a.Style.PenSize,
|
|
26783
|
+
dashStyle: a.Style.DashStyle,
|
|
26784
|
+
textBrushColor: a.Style.TextBrushColor,
|
|
26785
|
+
textPenColor: a.Style.TextPenColor,
|
|
26786
|
+
fontSize: a.Style.FontSize,
|
|
26787
|
+
hAlign: a.Style.HAlign,
|
|
26788
|
+
vAlign: a.Style.VAlign
|
|
26789
|
+
} : a.Style,
|
|
26790
|
+
points: a.Points !== null ? {
|
|
26791
|
+
x1: a.Points.X1,
|
|
26792
|
+
y1: a.Points.Y1,
|
|
26793
|
+
x2: a.Points.X2,
|
|
26794
|
+
y2: a.Points.Y2
|
|
26795
|
+
} : null,
|
|
26796
|
+
format: a.Format,
|
|
26797
|
+
position: a.Position !== null ? {
|
|
26798
|
+
x: a.Position.X,
|
|
26799
|
+
y: a.Position.Y
|
|
26800
|
+
} : null,
|
|
26801
|
+
size: a.Size !== null ? {
|
|
26802
|
+
height: a.Size.Height,
|
|
26803
|
+
width: a.Size.Width
|
|
26804
|
+
} : null,
|
|
26805
|
+
src: a.Src,
|
|
26806
|
+
value: a.Value,
|
|
26807
|
+
font: a.Font
|
|
26808
|
+
};
|
|
26809
|
+
contents.push(content);
|
|
26810
|
+
}
|
|
26811
|
+
}
|
|
26812
|
+
return contents;
|
|
26813
|
+
};
|
|
26814
|
+
/* eslint-disable */
|
|
26815
|
+
PivotExportUtil.formatPdfExportProperties = function (pdf) {
|
|
26816
|
+
var values;
|
|
26817
|
+
/* eslint-enable */
|
|
26818
|
+
values = this.getDefinedObj({
|
|
26819
|
+
pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
|
|
26820
|
+
pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
|
|
26821
|
+
header: !isNullOrUndefined(pdf.Header) ? {
|
|
26822
|
+
fromTop: pdf.Header.FromTop,
|
|
26823
|
+
height: pdf.Header.Height,
|
|
26824
|
+
contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
|
|
26825
|
+
} : null,
|
|
26826
|
+
columns: pdf.Columns,
|
|
26827
|
+
footer: !isNullOrUndefined(pdf.Footer) ? {
|
|
26828
|
+
fromTop: pdf.Footer.FromBottom,
|
|
26829
|
+
height: pdf.Footer.Height,
|
|
26830
|
+
contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
|
|
26831
|
+
} : null,
|
|
26832
|
+
includeHiddenColumn: pdf.IncludeHiddenColumn,
|
|
26833
|
+
dataSource: pdf.DataSource,
|
|
26834
|
+
exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
|
|
26835
|
+
theme: !isNullOrUndefined(pdf.Theme) ? {
|
|
26836
|
+
header: pdf.Theme.Header,
|
|
26837
|
+
record: pdf.Theme.Record,
|
|
26838
|
+
caption: pdf.Theme.Caption
|
|
26839
|
+
} : null,
|
|
26840
|
+
fileName: pdf.FileName,
|
|
26841
|
+
hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
|
|
26842
|
+
allowHorizontalOverflow: pdf.AllowHorizontalOverflow
|
|
26843
|
+
});
|
|
26844
|
+
return values;
|
|
26845
|
+
};
|
|
26846
|
+
/* eslint-disable */
|
|
26847
|
+
PivotExportUtil.formatExcelStyle = function (style) {
|
|
26848
|
+
var prop;
|
|
26849
|
+
/* eslint-enable */
|
|
26850
|
+
if (!isNullOrUndefined(style)) {
|
|
26851
|
+
prop = this.getDefinedObj({
|
|
26852
|
+
fontColor: style.FontColor,
|
|
26853
|
+
fontName: style.FontName,
|
|
26854
|
+
fontSize: style.FontSize,
|
|
26855
|
+
hAlign: style.HAlign === String ? style.HAlign : null,
|
|
26856
|
+
vAlign: style.VAlign === String ? style.VAlign : null,
|
|
26857
|
+
bold: style.Bold,
|
|
26858
|
+
indent: style.Indent,
|
|
26859
|
+
italic: style.Italic,
|
|
26860
|
+
underline: style.Underline,
|
|
26861
|
+
backColor: style.BackColor,
|
|
26862
|
+
wrapText: style.WrapText,
|
|
26863
|
+
borders: style.Borders,
|
|
26864
|
+
numberFormat: style.NumberFormat,
|
|
26865
|
+
type: style.Type
|
|
26866
|
+
});
|
|
26867
|
+
}
|
|
26868
|
+
return prop;
|
|
26869
|
+
};
|
|
26870
|
+
/* eslint-disable */
|
|
26871
|
+
PivotExportUtil.formatExcelCell = function (cell) {
|
|
26872
|
+
var cells = [];
|
|
26873
|
+
if (!isNullOrUndefined(cell)) {
|
|
26874
|
+
for (var i = 0; i < cell.length; i++) {
|
|
26875
|
+
this.getDefinedObj({
|
|
26876
|
+
index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
|
|
26877
|
+
colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
|
|
26878
|
+
value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
|
|
26879
|
+
hyperlink: {
|
|
26880
|
+
target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
|
|
26881
|
+
displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
|
|
26882
|
+
},
|
|
26883
|
+
styles: this.formatExcelStyle(cell[i].Style),
|
|
26884
|
+
rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
|
|
26885
|
+
});
|
|
26886
|
+
/* eslint-enable */
|
|
26887
|
+
}
|
|
26888
|
+
}
|
|
26889
|
+
return cells;
|
|
26890
|
+
};
|
|
26891
|
+
/* eslint-disable */
|
|
26892
|
+
PivotExportUtil.formatExcelHeaderFooter = function (excel) {
|
|
26893
|
+
var rows = [];
|
|
26894
|
+
if (!isNullOrUndefined(excel)) {
|
|
26895
|
+
for (var i = 0; i < excel.Rows.length; i++) {
|
|
26896
|
+
var row = excel.Rows[i];
|
|
26897
|
+
var prop = this.getDefinedObj({
|
|
26898
|
+
index: !isNullOrUndefined(row.Index) ? row.Index : null,
|
|
26899
|
+
cells: this.formatExcelCell(row.Cells),
|
|
26900
|
+
grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
|
|
26901
|
+
});
|
|
26902
|
+
rows.push(prop);
|
|
26903
|
+
}
|
|
26904
|
+
}
|
|
26905
|
+
return rows;
|
|
26906
|
+
};
|
|
26907
|
+
PivotExportUtil.formatExcelExportProperties = function (excel) {
|
|
26908
|
+
/* eslint-enable */
|
|
26909
|
+
var prop;
|
|
26910
|
+
prop = this.getDefinedObj({
|
|
26911
|
+
dataSource: excel.DataSource,
|
|
26912
|
+
query: excel.Query,
|
|
26913
|
+
multipleExport: this.getDefinedObj({
|
|
26914
|
+
type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
|
|
26915
|
+
blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
|
|
26916
|
+
}),
|
|
26917
|
+
header: this.getDefinedObj({
|
|
26918
|
+
headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
|
|
26919
|
+
rows: this.formatExcelHeaderFooter(excel.Header)
|
|
26920
|
+
}),
|
|
26921
|
+
footer: this.getDefinedObj({
|
|
26922
|
+
footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
|
|
26923
|
+
rows: this.formatExcelHeaderFooter(excel.Footer)
|
|
26924
|
+
}),
|
|
26925
|
+
columns: excel.Columns,
|
|
26926
|
+
exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
|
|
26927
|
+
includeHiddenColumn: excel.IncludeHiddenColumn,
|
|
26928
|
+
theme: !isNullOrUndefined(excel.Theme) ? {
|
|
26929
|
+
header: this.formatExcelStyle(excel.Theme.Header),
|
|
26930
|
+
record: this.formatExcelStyle(excel.Theme.Record),
|
|
26931
|
+
caption: this.formatExcelStyle(excel.Theme.Caption)
|
|
26932
|
+
} : undefined,
|
|
26933
|
+
fileName: excel.FileName,
|
|
26934
|
+
hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
|
|
26935
|
+
});
|
|
26936
|
+
return prop;
|
|
26937
|
+
};
|
|
26938
|
+
return PivotExportUtil;
|
|
26939
|
+
}());
|
|
26940
|
+
|
|
26237
26941
|
/**
|
|
26238
26942
|
* @hidden
|
|
26239
26943
|
* `ExcelExport` module is used to handle the Excel export action.
|
|
@@ -26301,17 +27005,14 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
26301
27005
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
26302
27006
|
/** Event trigerring */
|
|
26303
27007
|
var clonedValues;
|
|
26304
|
-
var currentPivotValues =
|
|
27008
|
+
var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26305
27009
|
var customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
|
|
26306
|
-
if (isHeaderSet) {
|
|
26307
|
-
this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
|
|
26308
|
-
}
|
|
26309
27010
|
if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
|
|
26310
27011
|
var pageSettings = this.engine.pageSettings;
|
|
26311
27012
|
this.engine.pageSettings = null;
|
|
26312
27013
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
26313
27014
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
26314
|
-
clonedValues =
|
|
27015
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26315
27016
|
this.engine.pivotValues = currentPivotValues;
|
|
26316
27017
|
this.engine.pageSettings = pageSettings;
|
|
26317
27018
|
}
|
|
@@ -26319,7 +27020,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
26319
27020
|
clonedValues = currentPivotValues;
|
|
26320
27021
|
}
|
|
26321
27022
|
var args = {
|
|
26322
|
-
fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues]
|
|
27023
|
+
fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues], excelExportProperties: exportProperties
|
|
26323
27024
|
};
|
|
26324
27025
|
var fileName;
|
|
26325
27026
|
var header;
|
|
@@ -26355,15 +27056,17 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
26355
27056
|
var pivotCell = pivotValues[rCnt][cCnt];
|
|
26356
27057
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
26357
27058
|
var cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
|
|
26358
|
-
|
|
26359
|
-
|
|
26360
|
-
|
|
27059
|
+
var isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
27060
|
+
|| (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
|
|
27061
|
+
if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
|
|
27062
|
+
cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
|
|
26361
27063
|
}
|
|
26362
27064
|
else if (pivotCell.type === 'sum') {
|
|
26363
27065
|
cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
|
|
26364
27066
|
}
|
|
26365
27067
|
else {
|
|
26366
|
-
cellValue = (this.parent.
|
|
27068
|
+
cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
|
|
27069
|
+
=== pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
26367
27070
|
}
|
|
26368
27071
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
26369
27072
|
cells.push({
|
|
@@ -26490,14 +27193,21 @@ var PDFExport = /** @__PURE__ @class */ (function () {
|
|
|
26490
27193
|
var footer = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer) && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].value)) ?
|
|
26491
27194
|
pdfExportProperties.footer.contents[0].value : eventParams.args.footer;
|
|
26492
27195
|
var font = new PdfStandardFont(PdfFontFamily.TimesRoman, 15, PdfFontStyle.Regular);
|
|
26493
|
-
var
|
|
27196
|
+
var headerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.header)
|
|
27197
|
+
&& !isNullOrUndefined(pdfExportProperties.header.contents) && !isNullOrUndefined(pdfExportProperties.header.contents[0].style));
|
|
27198
|
+
var footerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer)
|
|
27199
|
+
&& !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].style));
|
|
27200
|
+
var headerColor = (headerCondition) ? this.hexDecToRgb(pdfExportProperties.header.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
|
|
27201
|
+
var brushHeader = (headerCondition) ? new PdfSolidBrush(new PdfColor(headerColor.r, headerColor.g, headerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
|
|
27202
|
+
var footerColor = (footerCondition) ? this.hexDecToRgb(pdfExportProperties.footer.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
|
|
27203
|
+
var brushFooter = (footerCondition) ? new PdfSolidBrush(new PdfColor(footerColor.r, footerColor.g, footerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
|
|
26494
27204
|
var pen = new PdfPen(new PdfColor(0, 0, 0), .5);
|
|
26495
27205
|
/** Header and Footer to be set */
|
|
26496
27206
|
var headerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
|
|
26497
|
-
headerTemplate.graphics.drawString(header, font, pen,
|
|
27207
|
+
headerTemplate.graphics.drawString(header, font, pen, brushHeader, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
|
|
26498
27208
|
eventParams.document.template.top = headerTemplate;
|
|
26499
27209
|
var footerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
|
|
26500
|
-
footerTemplate.graphics.drawString(footer, font, pen,
|
|
27210
|
+
footerTemplate.graphics.drawString(footer, font, pen, brushFooter, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
|
|
26501
27211
|
eventParams.document.template.bottom = footerTemplate;
|
|
26502
27212
|
return page;
|
|
26503
27213
|
};
|
|
@@ -26877,13 +27587,13 @@ var PDFExport = /** @__PURE__ @class */ (function () {
|
|
|
26877
27587
|
var _this = this;
|
|
26878
27588
|
/** Event trigerring */
|
|
26879
27589
|
var clonedValues;
|
|
26880
|
-
var currentPivotValues =
|
|
27590
|
+
var currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26881
27591
|
if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
|
|
26882
27592
|
var pageSettings = this.engine.pageSettings;
|
|
26883
27593
|
this.engine.pageSettings = null;
|
|
26884
27594
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
26885
27595
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
26886
|
-
clonedValues =
|
|
27596
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26887
27597
|
this.engine.pivotValues = currentPivotValues;
|
|
26888
27598
|
this.engine.pageSettings = pageSettings;
|
|
26889
27599
|
}
|
|
@@ -27375,31 +28085,50 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
|
|
|
27375
28085
|
return axisWrapper;
|
|
27376
28086
|
};
|
|
27377
28087
|
DialogRenderer.prototype.showCalculatedField = function (event) {
|
|
27378
|
-
|
|
27379
|
-
if (this.parent.
|
|
27380
|
-
this.parent.
|
|
27381
|
-
|
|
28088
|
+
try {
|
|
28089
|
+
if (!this.parent.isAdaptive) {
|
|
28090
|
+
this.parent.actionObj.actionName = openCalculatedField;
|
|
28091
|
+
if (this.parent.actionBeginMethod()) {
|
|
28092
|
+
return;
|
|
28093
|
+
}
|
|
28094
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
28095
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
28096
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
28097
|
+
}
|
|
27382
28098
|
}
|
|
28099
|
+
this.parent.notify(initCalculatedField, {});
|
|
28100
|
+
}
|
|
28101
|
+
catch (execption) {
|
|
28102
|
+
this.parent.actionFailureMethod(execption);
|
|
27383
28103
|
}
|
|
27384
|
-
this.parent.notify(initCalculatedField, {});
|
|
27385
28104
|
};
|
|
27386
28105
|
DialogRenderer.prototype.showFieldListDialog = function (event) {
|
|
27387
28106
|
var activeindex = this.adaptiveElement.selectedItem;
|
|
27388
28107
|
this.parent.treeViewModule.render(activeindex);
|
|
27389
28108
|
};
|
|
27390
28109
|
DialogRenderer.prototype.onShowFieldList = function () {
|
|
27391
|
-
|
|
27392
|
-
|
|
27393
|
-
|
|
28110
|
+
this.parent.actionObj.actionName = showFieldList;
|
|
28111
|
+
if (this.parent.actionBeginMethod()) {
|
|
28112
|
+
return;
|
|
28113
|
+
}
|
|
28114
|
+
this.parent.actionObj.actionName = '';
|
|
28115
|
+
try {
|
|
28116
|
+
if (this.parent.allowDeferLayoutUpdate) {
|
|
28117
|
+
if (this.parent.isAdaptive) {
|
|
28118
|
+
this.parent.axisFieldModule.render();
|
|
28119
|
+
}
|
|
28120
|
+
this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
|
|
28121
|
+
this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
|
|
27394
28122
|
}
|
|
27395
|
-
this.parent.
|
|
27396
|
-
this.parent.
|
|
28123
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
28124
|
+
this.parent.dialogRenderer.fieldListDialog.show();
|
|
28125
|
+
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
28126
|
+
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
28127
|
+
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
28128
|
+
}
|
|
28129
|
+
catch (execption) {
|
|
28130
|
+
this.parent.actionFailureMethod(execption);
|
|
27397
28131
|
}
|
|
27398
|
-
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
27399
|
-
this.parent.dialogRenderer.fieldListDialog.show();
|
|
27400
|
-
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
27401
|
-
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
27402
|
-
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
27403
28132
|
};
|
|
27404
28133
|
DialogRenderer.prototype.onCloseFieldList = function () {
|
|
27405
28134
|
if (this.parent.allowDeferLayoutUpdate) {
|
|
@@ -27427,6 +28156,10 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
|
|
|
27427
28156
|
}
|
|
27428
28157
|
}
|
|
27429
28158
|
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
28159
|
+
this.parent.actionObj.actionName = closeFieldlist;
|
|
28160
|
+
if (this.parent.actionObj.actionName) {
|
|
28161
|
+
this.parent.actionCompleteMethod();
|
|
28162
|
+
}
|
|
27430
28163
|
};
|
|
27431
28164
|
DialogRenderer.prototype.removeFieldListIcon = function () {
|
|
27432
28165
|
if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
|
|
@@ -28316,28 +29049,41 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
|
|
|
28316
29049
|
TreeViewRenderer.prototype.updateSorting = function (args) {
|
|
28317
29050
|
var target = args.target;
|
|
28318
29051
|
var option = target.getAttribute('data-sort');
|
|
28319
|
-
|
|
28320
|
-
|
|
28321
|
-
|
|
28322
|
-
|
|
28323
|
-
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
|
|
28327
|
-
|
|
28328
|
-
|
|
28329
|
-
|
|
28330
|
-
|
|
28331
|
-
|
|
28332
|
-
|
|
28333
|
-
|
|
28334
|
-
|
|
28335
|
-
|
|
28336
|
-
|
|
28337
|
-
|
|
28338
|
-
|
|
29052
|
+
this.parent.actionObj.actionName = sortFieldTree;
|
|
29053
|
+
if (this.parent.actionBeginMethod()) {
|
|
29054
|
+
return;
|
|
29055
|
+
}
|
|
29056
|
+
try {
|
|
29057
|
+
if (target.className.indexOf('e-selected') === -1) {
|
|
29058
|
+
switch (option) {
|
|
29059
|
+
case 'None':
|
|
29060
|
+
this.fieldListSort = 'None';
|
|
29061
|
+
addClass([target], 'e-selected');
|
|
29062
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
29063
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
29064
|
+
break;
|
|
29065
|
+
case 'Ascend':
|
|
29066
|
+
this.fieldListSort = 'Ascend';
|
|
29067
|
+
addClass([target], 'e-selected');
|
|
29068
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
29069
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
29070
|
+
break;
|
|
29071
|
+
case 'Descend':
|
|
29072
|
+
this.fieldListSort = 'Descend';
|
|
29073
|
+
addClass([target], 'e-selected');
|
|
29074
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
29075
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
29076
|
+
break;
|
|
29077
|
+
}
|
|
29078
|
+
this.refreshTreeView();
|
|
28339
29079
|
}
|
|
28340
|
-
|
|
29080
|
+
}
|
|
29081
|
+
catch (execption) {
|
|
29082
|
+
this.parent.actionFailureMethod(execption);
|
|
29083
|
+
}
|
|
29084
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
29085
|
+
if (this.parent.actionObj.actionName) {
|
|
29086
|
+
this.parent.actionCompleteMethod();
|
|
28341
29087
|
}
|
|
28342
29088
|
};
|
|
28343
29089
|
/* eslint-disable */
|
|
@@ -28705,7 +29451,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28705
29451
|
attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
|
|
28706
29452
|
className: ICON + ' ' + CALC_EDIT
|
|
28707
29453
|
});
|
|
28708
|
-
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
|
|
29454
|
+
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
|
|
28709
29455
|
removeClass([calcElement], ICON_DISABLE);
|
|
28710
29456
|
}
|
|
28711
29457
|
else {
|
|
@@ -28718,7 +29464,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28718
29464
|
className: ICON + ' ' + REMOVE_CLASS
|
|
28719
29465
|
});
|
|
28720
29466
|
if (this.parent.getModuleName() === 'pivotview') {
|
|
28721
|
-
if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
|
|
29467
|
+
if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
|
|
28722
29468
|
removeClass([removeElement], ICON_DISABLE);
|
|
28723
29469
|
}
|
|
28724
29470
|
else {
|
|
@@ -28726,7 +29472,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28726
29472
|
}
|
|
28727
29473
|
}
|
|
28728
29474
|
else {
|
|
28729
|
-
if (field[i].showRemoveIcon) {
|
|
29475
|
+
if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
|
|
28730
29476
|
removeClass([removeElement], ICON_DISABLE);
|
|
28731
29477
|
}
|
|
28732
29478
|
else {
|
|
@@ -28758,13 +29504,13 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28758
29504
|
}
|
|
28759
29505
|
if (axis === 'values') {
|
|
28760
29506
|
var _loop_1 = function (element) {
|
|
28761
|
-
if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.
|
|
29507
|
+
if (element.classList.contains(GROUP_CHART_VALUE) && this_1.parent.pivotChartModule) {
|
|
28762
29508
|
var valueData = field.map(function (item) { return { text: item.caption ? item.caption : item.name, value: item.name }; });
|
|
28763
29509
|
var parent_1 = this_1.parent;
|
|
28764
29510
|
if (this_1.valueFiedDropDownList && element.querySelector('.' + GROUP_CHART_VALUE_DROPDOWN_DIV)) {
|
|
28765
29511
|
this_1.valueFiedDropDownList.dataSource = valueData;
|
|
28766
29512
|
this_1.valueFiedDropDownList.value = !parent_1.chartSettings.enableMultipleAxis ?
|
|
28767
|
-
parent_1.
|
|
29513
|
+
parent_1.pivotChartModule.currentMeasure : valueData[0].value;
|
|
28768
29514
|
}
|
|
28769
29515
|
else {
|
|
28770
29516
|
var ddlDiv = createElement('div', { className: GROUP_CHART_VALUE_DROPDOWN_DIV });
|
|
@@ -28774,7 +29520,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28774
29520
|
enableRtl: this_1.parent.enableRtl,
|
|
28775
29521
|
locale: this_1.parent.locale,
|
|
28776
29522
|
value: !parent_1.chartSettings.enableMultipleAxis ?
|
|
28777
|
-
parent_1.
|
|
29523
|
+
parent_1.pivotChartModule.currentMeasure : valueData[0].value,
|
|
28778
29524
|
width: 200,
|
|
28779
29525
|
fields: { value: 'value', text: 'text' },
|
|
28780
29526
|
cssClass: GROUP_CHART_VALUE_DROPDOWN,
|
|
@@ -28799,14 +29545,14 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28799
29545
|
var availColindex = undefined;
|
|
28800
29546
|
for (var _g = 0, _h = this.parentElement.querySelectorAll('.e-group-' + axis); _g < _h.length; _g++) {
|
|
28801
29547
|
var element = _h[_g];
|
|
28802
|
-
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.
|
|
28803
|
-
var currentMeasure = this.parent.
|
|
29548
|
+
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
|
|
29549
|
+
var currentMeasure = this.parent.pivotChartModule.currentMeasure;
|
|
28804
29550
|
var delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
|
|
28805
29551
|
var columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
|
|
28806
29552
|
this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
|
|
28807
29553
|
var engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
28808
29554
|
var pivotValues = engineModule.pivotValues;
|
|
28809
|
-
var totColIndex = this.parent.
|
|
29555
|
+
var totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
|
|
28810
29556
|
var rKeys = Object.keys(pivotValues);
|
|
28811
29557
|
var columnData = [];
|
|
28812
29558
|
var firstValueRow = false;
|
|
@@ -28918,7 +29664,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28918
29664
|
},
|
|
28919
29665
|
className: PIVOT_BUTTON_CONTENT_CLASS + ' ' +
|
|
28920
29666
|
(this.parent.getModuleName() === 'pivotview' ?
|
|
28921
|
-
this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : DRAG_DISABLE_CLASS : ''),
|
|
29667
|
+
this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS : ''),
|
|
28922
29668
|
innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
|
|
28923
29669
|
text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
|
|
28924
29670
|
text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
|
|
@@ -28984,43 +29730,54 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
28984
29730
|
};
|
|
28985
29731
|
PivotButton.prototype.openCalculatedFieldDialog = function (args) {
|
|
28986
29732
|
var fieldName = args.target.parentElement.id;
|
|
28987
|
-
|
|
28988
|
-
|
|
28989
|
-
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
28993
|
-
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
28994
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28995
|
-
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
28996
|
-
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28997
|
-
}
|
|
28998
|
-
else {
|
|
28999
|
-
if (!this.parent.isAdaptive) {
|
|
29000
|
-
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29001
|
-
}
|
|
29002
|
-
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29003
|
-
}
|
|
29733
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
29734
|
+
this.parent.actionObj.actionName = editCalculatedField;
|
|
29735
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29736
|
+
if (this.parent.actionBeginMethod()) {
|
|
29737
|
+
return;
|
|
29004
29738
|
}
|
|
29005
|
-
|
|
29006
|
-
if (this.parent.
|
|
29007
|
-
this.parent.
|
|
29008
|
-
|
|
29009
|
-
|
|
29010
|
-
.
|
|
29011
|
-
|
|
29012
|
-
|
|
29013
|
-
|
|
29014
|
-
|
|
29015
|
-
|
|
29016
|
-
|
|
29739
|
+
try {
|
|
29740
|
+
if (this.parent.getModuleName() === 'pivotview') {
|
|
29741
|
+
if (this.parent.isAdaptive && (this.parent.showFieldList &&
|
|
29742
|
+
this.parent.pivotFieldListModule &&
|
|
29743
|
+
!this.parent.pivotFieldListModule.isDestroyed)) {
|
|
29744
|
+
this.parent.pivotFieldListModule.element
|
|
29745
|
+
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
29746
|
+
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
29747
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
29748
|
+
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
29749
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
29750
|
+
}
|
|
29751
|
+
else {
|
|
29752
|
+
if (!this.parent.isAdaptive) {
|
|
29753
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29754
|
+
}
|
|
29755
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29017
29756
|
}
|
|
29018
|
-
|
|
29019
|
-
|
|
29757
|
+
}
|
|
29758
|
+
else if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
29759
|
+
if (this.parent.isAdaptive) {
|
|
29760
|
+
this.parent.dialogRenderer.adaptiveElement.select(4);
|
|
29761
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
29762
|
+
this.parent.calculatedFieldModule
|
|
29763
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
29020
29764
|
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29021
29765
|
}
|
|
29766
|
+
else {
|
|
29767
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
29768
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
29769
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
29770
|
+
}
|
|
29771
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29772
|
+
if (this.parent.calculatedFieldModule) {
|
|
29773
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29774
|
+
}
|
|
29775
|
+
}
|
|
29022
29776
|
}
|
|
29023
29777
|
}
|
|
29778
|
+
catch (execption) {
|
|
29779
|
+
this.parent.actionFailureMethod(execption);
|
|
29780
|
+
}
|
|
29024
29781
|
};
|
|
29025
29782
|
PivotButton.prototype.createDraggable = function (field, target) {
|
|
29026
29783
|
this.draggable = new Draggable(target, {
|
|
@@ -29044,7 +29801,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29044
29801
|
attrs: {
|
|
29045
29802
|
'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
|
|
29046
29803
|
},
|
|
29047
|
-
className: ICON + ' ' + DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : DRAG_DISABLE_CLASS)
|
|
29804
|
+
className: ICON + ' ' + DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS)
|
|
29048
29805
|
});
|
|
29049
29806
|
dragWrapper.appendChild(dragElement);
|
|
29050
29807
|
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
@@ -29410,38 +30167,52 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29410
30167
|
!(args.target.classList.contains(DRAG_CLASS)) &&
|
|
29411
30168
|
(buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
|
|
29412
30169
|
isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
|
|
29413
|
-
|
|
29414
|
-
|
|
29415
|
-
|
|
29416
|
-
|
|
29417
|
-
|
|
29418
|
-
|
|
29419
|
-
if ((
|
|
29420
|
-
|
|
29421
|
-
|
|
29422
|
-
|
|
29423
|
-
|
|
29424
|
-
|
|
29425
|
-
|
|
30170
|
+
this.parent.actionObj.actionName = sortField;
|
|
30171
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
30172
|
+
if (this.parent.actionBeginMethod()) {
|
|
30173
|
+
return;
|
|
30174
|
+
}
|
|
30175
|
+
try {
|
|
30176
|
+
if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
|
|
30177
|
+
this.parent.dataSourceSettings.enableSorting &&
|
|
30178
|
+
!(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
30179
|
+
this.parent.pivotGridModule !== undefined &&
|
|
30180
|
+
this.parent.pivotGridModule.enableVirtualization) ||
|
|
30181
|
+
(this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
|
|
30182
|
+
if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
|
|
30183
|
+
(this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
|
|
30184
|
+
this.parent.pivotGridModule.enableValueSorting))) {
|
|
30185
|
+
if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
|
|
30186
|
+
if (args.target.classList.contains('e-pivot-button')) {
|
|
30187
|
+
if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
30188
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
30189
|
+
}
|
|
29426
30190
|
}
|
|
29427
|
-
|
|
29428
|
-
|
|
29429
|
-
|
|
29430
|
-
|
|
30191
|
+
else {
|
|
30192
|
+
if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
30193
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
30194
|
+
}
|
|
29431
30195
|
}
|
|
29432
30196
|
}
|
|
29433
30197
|
}
|
|
30198
|
+
this.parent.pivotCommon.eventBase.updateSorting(args);
|
|
30199
|
+
if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
|
|
30200
|
+
var actionInfo = {
|
|
30201
|
+
sortInfo: this.parent.lastSortInfo
|
|
30202
|
+
};
|
|
30203
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
30204
|
+
this.updateDataSource(true);
|
|
30205
|
+
}
|
|
30206
|
+
/* eslint-disable */
|
|
30207
|
+
var thisObj = this;
|
|
30208
|
+
/* eslint-enable */
|
|
30209
|
+
if (thisObj.parent instanceof PivotFieldList) {
|
|
30210
|
+
thisObj.axisField.render();
|
|
30211
|
+
}
|
|
29434
30212
|
}
|
|
29435
|
-
|
|
29436
|
-
|
|
29437
|
-
|
|
29438
|
-
}
|
|
29439
|
-
/* eslint-disable */
|
|
29440
|
-
var thisObj = this;
|
|
29441
|
-
/* eslint-enable */
|
|
29442
|
-
if (thisObj.parent instanceof PivotFieldList) {
|
|
29443
|
-
thisObj.axisField.render();
|
|
29444
|
-
}
|
|
30213
|
+
}
|
|
30214
|
+
catch (execption) {
|
|
30215
|
+
this.parent.actionFailureMethod(execption);
|
|
29445
30216
|
}
|
|
29446
30217
|
}
|
|
29447
30218
|
};
|
|
@@ -29473,26 +30244,37 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29473
30244
|
PivotButton.prototype.updateFiltering = function (args) {
|
|
29474
30245
|
/* eslint-disable */
|
|
29475
30246
|
var pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
|
|
29476
|
-
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
29477
|
-
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
29478
|
-
}
|
|
29479
|
-
else {
|
|
29480
|
-
pivotObj.showWaitingPopup();
|
|
29481
|
-
}
|
|
29482
|
-
pivotObj.mouseEventArgs = args;
|
|
29483
|
-
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
29484
|
-
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
29485
30247
|
var fieldName = args.target.parentElement.id;
|
|
29486
|
-
|
|
29487
|
-
|
|
29488
|
-
|
|
30248
|
+
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
30249
|
+
this.parent.actionObj.actionName = filterField;
|
|
30250
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
30251
|
+
if (this.parent.actionBeginMethod()) {
|
|
30252
|
+
return;
|
|
30253
|
+
}
|
|
30254
|
+
try {
|
|
30255
|
+
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
30256
|
+
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
29489
30257
|
}
|
|
29490
30258
|
else {
|
|
29491
|
-
pivotObj.
|
|
30259
|
+
pivotObj.showWaitingPopup();
|
|
30260
|
+
}
|
|
30261
|
+
pivotObj.mouseEventArgs = args;
|
|
30262
|
+
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
30263
|
+
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
30264
|
+
if (pivotObj.dataSourceSettings.mode === 'Server') {
|
|
30265
|
+
if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
|
|
30266
|
+
this.updateFilterEvents();
|
|
30267
|
+
}
|
|
30268
|
+
else {
|
|
30269
|
+
pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
|
|
30270
|
+
}
|
|
30271
|
+
}
|
|
30272
|
+
else {
|
|
30273
|
+
this.updateFilterEvents();
|
|
29492
30274
|
}
|
|
29493
30275
|
}
|
|
29494
|
-
|
|
29495
|
-
this.
|
|
30276
|
+
catch (execption) {
|
|
30277
|
+
this.parent.actionFailureMethod(execption);
|
|
29496
30278
|
}
|
|
29497
30279
|
/* eslint-enable */
|
|
29498
30280
|
};
|
|
@@ -29505,11 +30287,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29505
30287
|
var target = pivotObj.mouseEventArgs.target;
|
|
29506
30288
|
this.fieldName = target.parentElement.id;
|
|
29507
30289
|
if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
|
|
29508
|
-
this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
|
|
29509
|
-
this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
|
|
29510
|
-
// this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
|
|
29511
|
-
// this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
29512
|
-
// this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
|
|
29513
30290
|
this.bindDialogEvents();
|
|
29514
30291
|
}
|
|
29515
30292
|
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
@@ -29523,8 +30300,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29523
30300
|
if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
|
|
29524
30301
|
this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
|
|
29525
30302
|
this.updateDialogButtonEvents();
|
|
29526
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
29527
|
-
this.dialogPopUp.dataBind();
|
|
30303
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
30304
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
29528
30305
|
this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
|
|
29529
30306
|
}
|
|
29530
30307
|
else if (this.parent.dataSourceSettings.allowMemberFilter) {
|
|
@@ -29549,7 +30326,7 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29549
30326
|
click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
|
|
29550
30327
|
},
|
|
29551
30328
|
{
|
|
29552
|
-
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
|
|
30329
|
+
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
|
|
29553
30330
|
buttonModel: { cssClass: CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
|
|
29554
30331
|
}
|
|
29555
30332
|
];
|
|
@@ -29557,25 +30334,25 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29557
30334
|
PivotButton.prototype.tabSelect = function (e) {
|
|
29558
30335
|
this.index = e.selectedIndex;
|
|
29559
30336
|
this.updateDialogButtonEvents();
|
|
29560
|
-
removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
30337
|
+
removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
29561
30338
|
if (e.selectedIndex > 0) {
|
|
29562
|
-
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');
|
|
30339
|
+
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');
|
|
29563
30340
|
}
|
|
29564
30341
|
if (e.selectedIndex === 0) {
|
|
29565
30342
|
this.parent.pivotCommon.filterDialog.updateCheckedState();
|
|
29566
30343
|
}
|
|
29567
30344
|
else {
|
|
29568
|
-
this.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
29569
|
-
this.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
30345
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
30346
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
29570
30347
|
}
|
|
29571
30348
|
};
|
|
29572
30349
|
PivotButton.prototype.updateDialogButtonEvents = function () {
|
|
29573
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
29574
|
-
this.dialogPopUp.dataBind();
|
|
30350
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
30351
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
29575
30352
|
};
|
|
29576
30353
|
PivotButton.prototype.updateCustomFilter = function (args) {
|
|
29577
30354
|
var _this = this;
|
|
29578
|
-
var dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
30355
|
+
var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
29579
30356
|
var fieldName = dialogElement.getAttribute('data-fieldname');
|
|
29580
30357
|
var levelName = dialogElement.getAttribute('data-selectedField');
|
|
29581
30358
|
var filterType = dialogElement.getAttribute('data-type');
|
|
@@ -29646,39 +30423,18 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29646
30423
|
if (type !== 'Value') {
|
|
29647
30424
|
_this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, _this.parent.dataSourceSettings.filterSettings);
|
|
29648
30425
|
}
|
|
29649
|
-
_this.dialogPopUp.close();
|
|
30426
|
+
_this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
29650
30427
|
if (!observedArgs.cancel) {
|
|
29651
30428
|
_this.refreshPivotButtonState(fieldName, true);
|
|
29652
30429
|
_this.updateDataSource(true);
|
|
29653
30430
|
}
|
|
29654
30431
|
});
|
|
29655
30432
|
};
|
|
29656
|
-
PivotButton.prototype.removeFilterDialog = function () {
|
|
29657
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
29658
|
-
this.dialogPopUp.destroy();
|
|
29659
|
-
setTimeout(this.setFocus.bind(this));
|
|
29660
|
-
}
|
|
29661
|
-
if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
|
|
29662
|
-
remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
|
|
29663
|
-
}
|
|
29664
|
-
};
|
|
29665
|
-
PivotButton.prototype.setFocus = function () {
|
|
29666
|
-
if (this.parentElement) {
|
|
29667
|
-
var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
29668
|
-
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
29669
|
-
var item = pivotButtons_1[_i];
|
|
29670
|
-
if (item.getAttribute('data-uid') === this.fieldName) {
|
|
29671
|
-
item.focus();
|
|
29672
|
-
break;
|
|
29673
|
-
}
|
|
29674
|
-
}
|
|
29675
|
-
}
|
|
29676
|
-
};
|
|
29677
30433
|
PivotButton.prototype.ClearFilter = function (e) {
|
|
29678
|
-
var dialogElement = this.dialogPopUp.element;
|
|
30434
|
+
var dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
|
|
29679
30435
|
var fieldName = dialogElement.getAttribute('data-fieldname');
|
|
29680
30436
|
var tabElement = dialogElement.querySelector('.e-selected-tab');
|
|
29681
|
-
this.dialogPopUp.close();
|
|
30437
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
29682
30438
|
if (this.parent.dataType === 'olap' && tabElement) {
|
|
29683
30439
|
var levelName = tabElement.getAttribute('data-selectedField');
|
|
29684
30440
|
this.removeDataSourceSettings(fieldName, levelName);
|
|
@@ -29695,63 +30451,73 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29695
30451
|
var target = args.target;
|
|
29696
30452
|
var fieldName = target.parentElement.id;
|
|
29697
30453
|
var fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
30454
|
+
this.parent.actionObj.actionName = removeField;
|
|
30455
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
30456
|
+
if (this.parent.actionBeginMethod()) {
|
|
30457
|
+
return;
|
|
30458
|
+
}
|
|
29698
30459
|
var removeFieldArgs = {
|
|
29699
30460
|
cancel: false, fieldName: fieldName,
|
|
29700
30461
|
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
|
|
29701
30462
|
fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
|
|
29702
30463
|
};
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
if (
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
_this.parent.
|
|
30464
|
+
try {
|
|
30465
|
+
var control = this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
30466
|
+
this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
|
|
30467
|
+
control.trigger(fieldRemove, removeFieldArgs, function (observedArgs) {
|
|
30468
|
+
if (!observedArgs.cancel) {
|
|
30469
|
+
if (target.parentElement.getAttribute('isvalue') === 'true') {
|
|
30470
|
+
_this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
|
|
30471
|
+
if (_this.parent.dataType === 'olap') {
|
|
30472
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
30473
|
+
}
|
|
29711
30474
|
}
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
30475
|
+
else {
|
|
30476
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
|
|
30477
|
+
if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 &&
|
|
30478
|
+
fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && ((_this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
30479
|
+
observedArgs.axis === 'rows') || (_this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
|
|
30480
|
+
_this.parent.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true);
|
|
30481
|
+
}
|
|
30482
|
+
if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) {
|
|
30483
|
+
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
30484
|
+
}
|
|
29719
30485
|
}
|
|
29720
|
-
if (_this.parent.
|
|
29721
|
-
_this.parent.
|
|
30486
|
+
if (_this.parent.getModuleName() === 'pivotfieldlist') {
|
|
30487
|
+
_this.parent.axisFieldModule.render();
|
|
29722
30488
|
}
|
|
30489
|
+
_this.updateDataSource();
|
|
29723
30490
|
}
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
|
|
29727
|
-
|
|
29728
|
-
|
|
29729
|
-
});
|
|
30491
|
+
});
|
|
30492
|
+
}
|
|
30493
|
+
catch (execption) {
|
|
30494
|
+
this.parent.actionFailureMethod(execption);
|
|
30495
|
+
}
|
|
29730
30496
|
};
|
|
29731
30497
|
/** @hidden */
|
|
29732
30498
|
PivotButton.prototype.nodeStateModified = function (args) {
|
|
29733
30499
|
var target = closest(args.node, 'li');
|
|
29734
30500
|
var fieldName = target.getAttribute('data-fieldname');
|
|
29735
30501
|
if (target.getAttribute('data-memberId') === 'all') {
|
|
29736
|
-
this.memberTreeView.nodeChecked = null;
|
|
30502
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
|
|
29737
30503
|
if (args.action === 'check') {
|
|
29738
|
-
this.memberTreeView.checkAll();
|
|
30504
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
|
|
29739
30505
|
}
|
|
29740
30506
|
else {
|
|
29741
|
-
this.memberTreeView.uncheckAll();
|
|
30507
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
|
|
29742
30508
|
}
|
|
29743
30509
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
29744
30510
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
29745
|
-
this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
30511
|
+
this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
29746
30512
|
}
|
|
29747
30513
|
this.checkedStateAll(args.action);
|
|
29748
|
-
this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
30514
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
29749
30515
|
}
|
|
29750
30516
|
else {
|
|
29751
30517
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
29752
30518
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
29753
30519
|
// let st1: number = new Date().getTime();
|
|
29754
|
-
var checkedNodes = this.memberTreeView.getAllCheckedNodes();
|
|
30520
|
+
var checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
29755
30521
|
// let st2: number = (new Date().getTime() - st1) / 1000;
|
|
29756
30522
|
// console.log('getAllCheckedNodes:' + st2);
|
|
29757
30523
|
this.updateNodeStates(checkedNodes, fieldName, args.action);
|
|
@@ -29794,8 +30560,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29794
30560
|
}
|
|
29795
30561
|
if (currentMembers[member]) {
|
|
29796
30562
|
currentMembers[member].isSelected = false;
|
|
29797
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
29798
|
-
var element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
30563
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
30564
|
+
var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
29799
30565
|
if (element && !element.querySelector('ul')) {
|
|
29800
30566
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
|
|
29801
30567
|
}
|
|
@@ -29805,8 +30571,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29805
30571
|
for (var _a = 0, checkedNodes_1 = checkedNodes; _a < checkedNodes_1.length; _a++) {
|
|
29806
30572
|
var node = checkedNodes_1[_a];
|
|
29807
30573
|
if (currentMembers[node]) {
|
|
29808
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
29809
|
-
var element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
30574
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
30575
|
+
var element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
29810
30576
|
if (element && !element.querySelector('ul')) {
|
|
29811
30577
|
currentMembers[node].isSelected = true;
|
|
29812
30578
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
|
|
@@ -29844,10 +30610,10 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29844
30610
|
!engineModule.fieldList[fieldName].isHierarchy) {
|
|
29845
30611
|
var cMembers = engineModule.fieldList[fieldName].members;
|
|
29846
30612
|
var sMembers = engineModule.fieldList[fieldName].currrentMembers;
|
|
29847
|
-
filterItem.items = this.memberTreeView.getAllCheckedNodes();
|
|
30613
|
+
filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
29848
30614
|
filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
|
|
29849
30615
|
isNodeUnChecked = (filterItem.items.length ===
|
|
29850
|
-
this.memberTreeView.fields.dataSource.length ? false : true);
|
|
30616
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
|
|
29851
30617
|
if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
|
|
29852
30618
|
var cNodeLength = Object.keys(cMembers).length;
|
|
29853
30619
|
var sNodeLength = Object.keys(sMembers).length;
|
|
@@ -29910,13 +30676,18 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29910
30676
|
}
|
|
29911
30677
|
_this.parent.dataSourceSettings.filterSettings.push(filterItem);
|
|
29912
30678
|
}
|
|
29913
|
-
_this.dialogPopUp.close();
|
|
30679
|
+
_this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
29914
30680
|
if (!observedArgs.cancel) {
|
|
29915
30681
|
_this.refreshPivotButtonState(fieldName, isNodeUnChecked);
|
|
29916
30682
|
if (!isNodeUnChecked) {
|
|
29917
30683
|
_this.removeDataSourceSettings(fieldName);
|
|
30684
|
+
filterItem = {};
|
|
29918
30685
|
}
|
|
29919
30686
|
_this.parent.lastFilterInfo = filterItem;
|
|
30687
|
+
var actionInfo = {
|
|
30688
|
+
filterInfo: _this.parent.lastFilterInfo
|
|
30689
|
+
};
|
|
30690
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
29920
30691
|
_this.updateDataSource(true);
|
|
29921
30692
|
var thisObj = _this;
|
|
29922
30693
|
//setTimeout(() => {
|
|
@@ -29926,8 +30697,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29926
30697
|
//});
|
|
29927
30698
|
}
|
|
29928
30699
|
var pivotButtons = [].slice.call(_this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
29929
|
-
for (var _i = 0,
|
|
29930
|
-
var item =
|
|
30700
|
+
for (var _i = 0, pivotButtons_1 = pivotButtons; _i < pivotButtons_1.length; _i++) {
|
|
30701
|
+
var item = pivotButtons_1[_i];
|
|
29931
30702
|
if (item.getAttribute('data-uid') === fieldName) {
|
|
29932
30703
|
item.focus();
|
|
29933
30704
|
break;
|
|
@@ -29938,8 +30709,8 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
29938
30709
|
PivotButton.prototype.refreshPivotButtonState = function (fieldName, isFiltered) {
|
|
29939
30710
|
var pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
29940
30711
|
var selectedButton;
|
|
29941
|
-
for (var _i = 0,
|
|
29942
|
-
var item =
|
|
30712
|
+
for (var _i = 0, pivotButtons_2 = pivotButtons; _i < pivotButtons_2.length; _i++) {
|
|
30713
|
+
var item = pivotButtons_2[_i];
|
|
29943
30714
|
if (item.getAttribute('data-uid') === fieldName) {
|
|
29944
30715
|
selectedButton = item.querySelector('.' + FILTER_COMMON_CLASS);
|
|
29945
30716
|
break;
|
|
@@ -30072,14 +30843,6 @@ var PivotButton = /** @__PURE__ @class */ (function () {
|
|
|
30072
30843
|
this.columnFieldDropDownList.destroy();
|
|
30073
30844
|
this.columnFieldDropDownList = null;
|
|
30074
30845
|
}
|
|
30075
|
-
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
30076
|
-
this.memberTreeView.destroy();
|
|
30077
|
-
this.memberTreeView = null;
|
|
30078
|
-
}
|
|
30079
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
30080
|
-
this.dialogPopUp.destroy();
|
|
30081
|
-
this.dialogPopUp = null;
|
|
30082
|
-
}
|
|
30083
30846
|
if (this.draggable && !this.draggable.isDestroyed) {
|
|
30084
30847
|
this.draggable.destroy();
|
|
30085
30848
|
this.draggable = null;
|
|
@@ -30236,6 +30999,8 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
30236
30999
|
_this.enableValueSorting = false;
|
|
30237
31000
|
_this.request = new XMLHttpRequest();
|
|
30238
31001
|
_this.remoteData = [];
|
|
31002
|
+
/** @hidden */
|
|
31003
|
+
_this.actionObj = {};
|
|
30239
31004
|
return _this;
|
|
30240
31005
|
}
|
|
30241
31006
|
/**
|
|
@@ -30467,7 +31232,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
30467
31232
|
enableValueSorting: enableValueSorting,
|
|
30468
31233
|
isDrillThrough: isDrillThrough,
|
|
30469
31234
|
localeObj: localeObj,
|
|
30470
|
-
clonedReport: this.clonedReport
|
|
31235
|
+
clonedReport: this.clonedReport,
|
|
31236
|
+
globalize: this.globalize,
|
|
31237
|
+
currenyCode: this.currencyCode
|
|
30471
31238
|
};
|
|
30472
31239
|
}
|
|
30473
31240
|
return customProperties;
|
|
@@ -31158,6 +31925,11 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31158
31925
|
pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
|
|
31159
31926
|
}
|
|
31160
31927
|
});
|
|
31928
|
+
var actionName = this.getActionCompleteName();
|
|
31929
|
+
this.actionObj.actionName = actionName;
|
|
31930
|
+
if (this.actionObj.actionName) {
|
|
31931
|
+
this.actionCompleteMethod();
|
|
31932
|
+
}
|
|
31161
31933
|
};
|
|
31162
31934
|
PivotFieldList.prototype.updateOlapDataSource = function (pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
|
|
31163
31935
|
var customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
|
|
@@ -31191,6 +31963,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31191
31963
|
PivotFieldList.prototype.update = function (control) {
|
|
31192
31964
|
if (control) {
|
|
31193
31965
|
this.clonedDataSet = control.clonedDataSet;
|
|
31966
|
+
this.clonedReport = control.clonedReport;
|
|
31194
31967
|
this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
|
|
31195
31968
|
this.engineModule = control.engineModule;
|
|
31196
31969
|
this.olapEngineModule = control.olapEngineModule;
|
|
@@ -31225,6 +31998,7 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31225
31998
|
PivotFieldList.prototype.updateView = function (control) {
|
|
31226
31999
|
if (control) {
|
|
31227
32000
|
control.clonedDataSet = this.clonedDataSet;
|
|
32001
|
+
control.clonedReport = this.clonedReport;
|
|
31228
32002
|
control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
|
|
31229
32003
|
control.engineModule = this.engineModule;
|
|
31230
32004
|
control.olapEngineModule = this.olapEngineModule;
|
|
@@ -31268,6 +32042,47 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31268
32042
|
}
|
|
31269
32043
|
});
|
|
31270
32044
|
};
|
|
32045
|
+
/** @hidden */
|
|
32046
|
+
PivotFieldList.prototype.actionBeginMethod = function () {
|
|
32047
|
+
var eventArgs = {
|
|
32048
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
32049
|
+
actionName: this.actionObj.actionName,
|
|
32050
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
32051
|
+
cancel: false
|
|
32052
|
+
};
|
|
32053
|
+
var control = this.isPopupView ? this.pivotGridModule : this;
|
|
32054
|
+
control.trigger(actionBegin, eventArgs);
|
|
32055
|
+
return eventArgs.cancel;
|
|
32056
|
+
};
|
|
32057
|
+
/** @hidden */
|
|
32058
|
+
PivotFieldList.prototype.actionCompleteMethod = function () {
|
|
32059
|
+
var eventArgs = {
|
|
32060
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
32061
|
+
actionName: this.actionObj.actionName,
|
|
32062
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
32063
|
+
actionInfo: this.actionObj.actionInfo
|
|
32064
|
+
};
|
|
32065
|
+
var control = this.isPopupView ? this.pivotGridModule : this;
|
|
32066
|
+
control.trigger(actionComplete, eventArgs);
|
|
32067
|
+
this.actionObj.actionName = '';
|
|
32068
|
+
this.actionObj.actionInfo = undefined;
|
|
32069
|
+
this.actionObj.fieldInfo = undefined;
|
|
32070
|
+
};
|
|
32071
|
+
/** @hidden */
|
|
32072
|
+
PivotFieldList.prototype.actionFailureMethod = function (error) {
|
|
32073
|
+
var eventArgs = {
|
|
32074
|
+
actionName: this.actionObj.actionName,
|
|
32075
|
+
errorInfo: error
|
|
32076
|
+
};
|
|
32077
|
+
var control = this.isPopupView ? this.pivotGridModule : this;
|
|
32078
|
+
control.trigger(actionFailure, eventArgs);
|
|
32079
|
+
};
|
|
32080
|
+
/** @hidden */
|
|
32081
|
+
PivotFieldList.prototype.getActionCompleteName = function () {
|
|
32082
|
+
var actionName = (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
32083
|
+
: (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == sortFieldTree ? fieldTreeSorted : this.actionObj.actionName;
|
|
32084
|
+
return actionName;
|
|
32085
|
+
};
|
|
31271
32086
|
/**
|
|
31272
32087
|
* Destroys the Field Table component.
|
|
31273
32088
|
* @function destroy
|
|
@@ -31342,6 +32157,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31342
32157
|
if (this.clonedDataSet) {
|
|
31343
32158
|
this.clonedDataSet = null;
|
|
31344
32159
|
}
|
|
32160
|
+
if (this.clonedReport) {
|
|
32161
|
+
this.clonedReport = null;
|
|
32162
|
+
}
|
|
31345
32163
|
if (this.clonedFieldList) {
|
|
31346
32164
|
this.clonedFieldList = null;
|
|
31347
32165
|
}
|
|
@@ -31389,6 +32207,9 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31389
32207
|
__decorate$4([
|
|
31390
32208
|
Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
|
|
31391
32209
|
], PivotFieldList.prototype, "aggregateTypes", void 0);
|
|
32210
|
+
__decorate$4([
|
|
32211
|
+
Property('USD')
|
|
32212
|
+
], PivotFieldList.prototype, "currencyCode", void 0);
|
|
31392
32213
|
__decorate$4([
|
|
31393
32214
|
Event()
|
|
31394
32215
|
], PivotFieldList.prototype, "load", void 0);
|
|
@@ -31437,6 +32258,15 @@ var PivotFieldList = /** @__PURE__ @class */ (function (_super) {
|
|
|
31437
32258
|
__decorate$4([
|
|
31438
32259
|
Event()
|
|
31439
32260
|
], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
|
|
32261
|
+
__decorate$4([
|
|
32262
|
+
Event()
|
|
32263
|
+
], PivotFieldList.prototype, "actionBegin", void 0);
|
|
32264
|
+
__decorate$4([
|
|
32265
|
+
Event()
|
|
32266
|
+
], PivotFieldList.prototype, "actionComplete", void 0);
|
|
32267
|
+
__decorate$4([
|
|
32268
|
+
Event()
|
|
32269
|
+
], PivotFieldList.prototype, "actionFailure", void 0);
|
|
31440
32270
|
PivotFieldList = __decorate$4([
|
|
31441
32271
|
NotifyPropertyChanges
|
|
31442
32272
|
], PivotFieldList);
|
|
@@ -31671,105 +32501,114 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
|
|
|
31671
32501
|
CalculatedField.prototype.displayMenu = function (node, treeNode, target) {
|
|
31672
32502
|
var edit = target ? target.classList.contains(CALC_EDIT) : true;
|
|
31673
32503
|
var edited = target ? target.classList.contains(CALC_EDITED) : true;
|
|
31674
|
-
|
|
31675
|
-
node.querySelector('.e-list-icon.e-format')
|
|
31676
|
-
|
|
31677
|
-
|
|
31678
|
-
|
|
31679
|
-
|
|
31680
|
-
this.menuObj.
|
|
31681
|
-
|
|
31682
|
-
|
|
31683
|
-
|
|
31684
|
-
|
|
31685
|
-
|
|
31686
|
-
node.querySelector('.' + CALC_EDIT)
|
|
31687
|
-
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31691
|
-
|
|
31692
|
-
|
|
31693
|
-
|
|
31694
|
-
|
|
31695
|
-
|
|
31696
|
-
|
|
31697
|
-
|
|
31698
|
-
|
|
31699
|
-
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
|
|
31703
|
-
|
|
31704
|
-
|
|
31705
|
-
|
|
31706
|
-
|
|
31707
|
-
|
|
31708
|
-
|
|
31709
|
-
|
|
31710
|
-
|
|
31711
|
-
|
|
31712
|
-
|
|
31713
|
-
|
|
32504
|
+
try {
|
|
32505
|
+
if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
|
|
32506
|
+
node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
|
|
32507
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
|
|
32508
|
+
!node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
|
|
32509
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
|
|
32510
|
+
if (this.menuObj && !this.menuObj.isDestroyed) {
|
|
32511
|
+
this.menuObj.destroy();
|
|
32512
|
+
}
|
|
32513
|
+
this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
|
|
32514
|
+
this.openContextMenu(node);
|
|
32515
|
+
}
|
|
32516
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
|
|
32517
|
+
node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
|
|
32518
|
+
(this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
|
|
32519
|
+
this.isEdit = true;
|
|
32520
|
+
var fieldName = node.getAttribute('data-field');
|
|
32521
|
+
var caption = node.getAttribute('data-caption');
|
|
32522
|
+
this.currentFieldName = fieldName;
|
|
32523
|
+
this.inputObj.value = caption;
|
|
32524
|
+
this.inputObj.dataBind();
|
|
32525
|
+
var formatString = node.getAttribute('data-formatString');
|
|
32526
|
+
var dialogElement = this.dialog.element;
|
|
32527
|
+
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
32528
|
+
if (this.parent.dataType === 'olap') {
|
|
32529
|
+
var memberType = node.getAttribute('data-membertype');
|
|
32530
|
+
var parentHierarchy = node.getAttribute('data-hierarchy');
|
|
32531
|
+
var expression = node.getAttribute('data-formula');
|
|
32532
|
+
var customString = node.getAttribute('data-customString');
|
|
32533
|
+
var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
32534
|
+
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
32535
|
+
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
32536
|
+
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
32537
|
+
/* eslint-enable max-len */
|
|
32538
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
|
|
32539
|
+
select('#' + this.parentID + 'droppable', document).value = expression;
|
|
32540
|
+
memberTypeDrop.readonly = true;
|
|
32541
|
+
memberTypeDrop.value = memberType;
|
|
32542
|
+
memberTypeDrop.dataBind();
|
|
32543
|
+
if (memberType === 'Dimension') {
|
|
32544
|
+
hierarchyDrop.value = parentHierarchy;
|
|
32545
|
+
}
|
|
32546
|
+
if (formatString !== '') {
|
|
32547
|
+
formatDrop.value = formatString;
|
|
32548
|
+
formatDrop.dataBind();
|
|
32549
|
+
}
|
|
32550
|
+
customFormat.value = customString;
|
|
32551
|
+
}
|
|
32552
|
+
else {
|
|
32553
|
+
customFormat.value = formatString;
|
|
32554
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
32555
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
32556
|
+
addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
|
|
32557
|
+
removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
|
|
32558
|
+
node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
|
|
32559
|
+
select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
|
|
31714
32560
|
}
|
|
31715
|
-
|
|
31716
|
-
|
|
32561
|
+
customFormat.dataBind();
|
|
32562
|
+
}
|
|
32563
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
|
|
32564
|
+
node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
|
|
32565
|
+
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
32566
|
+
this.isEdit = false;
|
|
32567
|
+
this.inputObj.value = '';
|
|
32568
|
+
this.inputObj.dataBind();
|
|
32569
|
+
var dialogElement = this.dialog.element;
|
|
32570
|
+
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
32571
|
+
customFormat.value = '';
|
|
32572
|
+
customFormat.dataBind();
|
|
32573
|
+
if (this.parent.dataType === 'olap') {
|
|
32574
|
+
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
32575
|
+
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
32576
|
+
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
32577
|
+
var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
32578
|
+
/* eslint-enable max-len */
|
|
32579
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
32580
|
+
hierarchyDrop.index = 0;
|
|
32581
|
+
hierarchyDrop.dataBind();
|
|
32582
|
+
formatDrop.index = 0;
|
|
31717
32583
|
formatDrop.dataBind();
|
|
32584
|
+
memberTypeDrop.index = 0;
|
|
32585
|
+
memberTypeDrop.readonly = false;
|
|
32586
|
+
memberTypeDrop.dataBind();
|
|
32587
|
+
}
|
|
32588
|
+
else {
|
|
32589
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
32590
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
32591
|
+
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
31718
32592
|
}
|
|
31719
|
-
|
|
32593
|
+
select('#' + this.parentID + 'droppable', document).value = '';
|
|
31720
32594
|
}
|
|
31721
|
-
else
|
|
31722
|
-
|
|
31723
|
-
|
|
31724
|
-
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
32595
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
32596
|
+
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
32597
|
+
this.parent.actionObj.actionName = removeField;
|
|
32598
|
+
if (this.parent.actionBeginMethod()) {
|
|
32599
|
+
return;
|
|
32600
|
+
}
|
|
32601
|
+
var dropField = select('#' + this.parentID + 'droppable', document);
|
|
32602
|
+
var field = {
|
|
32603
|
+
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
32604
|
+
caption: this.inputObj.value,
|
|
32605
|
+
formula: dropField.value
|
|
32606
|
+
};
|
|
32607
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
31729
32608
|
}
|
|
31730
|
-
customFormat.dataBind();
|
|
31731
32609
|
}
|
|
31732
|
-
|
|
31733
|
-
|
|
31734
|
-
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
31735
|
-
this.isEdit = false;
|
|
31736
|
-
this.inputObj.value = '';
|
|
31737
|
-
this.inputObj.dataBind();
|
|
31738
|
-
var dialogElement = this.dialog.element;
|
|
31739
|
-
var customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
31740
|
-
customFormat.value = '';
|
|
31741
|
-
customFormat.dataBind();
|
|
31742
|
-
if (this.parent.dataType === 'olap') {
|
|
31743
|
-
var hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
31744
|
-
var formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
31745
|
-
var memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
31746
|
-
var fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
31747
|
-
/* eslint-enable max-len */
|
|
31748
|
-
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
31749
|
-
hierarchyDrop.index = 0;
|
|
31750
|
-
hierarchyDrop.dataBind();
|
|
31751
|
-
formatDrop.index = 0;
|
|
31752
|
-
formatDrop.dataBind();
|
|
31753
|
-
memberTypeDrop.index = 0;
|
|
31754
|
-
memberTypeDrop.readonly = false;
|
|
31755
|
-
memberTypeDrop.dataBind();
|
|
31756
|
-
}
|
|
31757
|
-
else {
|
|
31758
|
-
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
31759
|
-
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
31760
|
-
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
31761
|
-
}
|
|
31762
|
-
select('#' + this.parentID + 'droppable', document).value = '';
|
|
31763
|
-
}
|
|
31764
|
-
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
31765
|
-
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
31766
|
-
var dropField = select('#' + this.parentID + 'droppable', document);
|
|
31767
|
-
var field = {
|
|
31768
|
-
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
31769
|
-
caption: this.inputObj.value,
|
|
31770
|
-
formula: dropField.value
|
|
31771
|
-
};
|
|
31772
|
-
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
32610
|
+
catch (execption) {
|
|
32611
|
+
this.parent.actionFailureMethod(execption);
|
|
31773
32612
|
}
|
|
31774
32613
|
};
|
|
31775
32614
|
CalculatedField.prototype.removeCalcField = function (node) {
|
|
@@ -32186,6 +33025,12 @@ var CalculatedField = /** @__PURE__ @class */ (function () {
|
|
|
32186
33025
|
this.parent.isRequiredUpdate = false;
|
|
32187
33026
|
}
|
|
32188
33027
|
try {
|
|
33028
|
+
var actionInfo = {
|
|
33029
|
+
calculatedFieldInfo: this.parent.lastCalcFieldInfo
|
|
33030
|
+
};
|
|
33031
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
33032
|
+
var actionName = (this.parent.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : calculatedFieldApplied;
|
|
33033
|
+
this.parent.actionObj.actionName = actionName;
|
|
32189
33034
|
this.parent.updateDataSource(false);
|
|
32190
33035
|
var pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
|
|
32191
33036
|
this.parent.pivotGridModule : this.parent;
|
|
@@ -33641,7 +34486,7 @@ var FieldList = /** @__PURE__ @class */ (function () {
|
|
|
33641
34486
|
FieldList.prototype.update = function () {
|
|
33642
34487
|
var currentWidth;
|
|
33643
34488
|
if (this.parent.currentView !== 'Table') {
|
|
33644
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
34489
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
33645
34490
|
}
|
|
33646
34491
|
else {
|
|
33647
34492
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
@@ -34121,7 +34966,7 @@ var GroupingBar = /** @__PURE__ @class */ (function () {
|
|
|
34121
34966
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
34122
34967
|
}
|
|
34123
34968
|
else {
|
|
34124
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
34969
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
34125
34970
|
}
|
|
34126
34971
|
if (currentWidth) {
|
|
34127
34972
|
var actWidth = currentWidth < 400 ? 400 : currentWidth;
|
|
@@ -34393,15 +35238,17 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
|
|
|
34393
35238
|
},
|
|
34394
35239
|
{
|
|
34395
35240
|
click: this.applyButtonClick.bind(this),
|
|
35241
|
+
isFlat: true,
|
|
34396
35242
|
buttonModel: {
|
|
34397
|
-
|
|
35243
|
+
isPrimary: true, cssClass: FORMAT_APPLY_BUTTON,
|
|
34398
35244
|
content: this.parent.localeObj.getConstant('apply')
|
|
34399
35245
|
}
|
|
34400
35246
|
},
|
|
34401
35247
|
{
|
|
34402
35248
|
click: this.cancelButtonClick.bind(this),
|
|
35249
|
+
isFlat: true,
|
|
34403
35250
|
buttonModel: {
|
|
34404
|
-
cssClass:
|
|
35251
|
+
cssClass: FORMAT_CANCEL_BUTTON,
|
|
34405
35252
|
content: this.parent.localeObj.getConstant('cancel')
|
|
34406
35253
|
}
|
|
34407
35254
|
}
|
|
@@ -34455,6 +35302,10 @@ var ConditionalFormatting = /** @__PURE__ @class */ (function () {
|
|
|
34455
35302
|
ConditionalFormatting.prototype.applyButtonClick = function () {
|
|
34456
35303
|
if (this.refreshConditionValues()) {
|
|
34457
35304
|
this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
|
|
35305
|
+
var actionInfo = {
|
|
35306
|
+
conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
|
|
35307
|
+
};
|
|
35308
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34458
35309
|
this.parent.renderPivotGrid();
|
|
34459
35310
|
this.dialog.close();
|
|
34460
35311
|
}
|
|
@@ -35153,12 +36004,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35153
36004
|
};
|
|
35154
36005
|
/* eslint-enable */
|
|
35155
36006
|
Toolbar$$1.prototype.reportChange = function (args) {
|
|
35156
|
-
this.
|
|
35157
|
-
if (this.parent.
|
|
35158
|
-
|
|
36007
|
+
this.parent.actionObj.actionName = reportChange;
|
|
36008
|
+
if (this.parent.actionBeginMethod()) {
|
|
36009
|
+
args.cancel = true;
|
|
36010
|
+
return;
|
|
35159
36011
|
}
|
|
35160
|
-
|
|
35161
|
-
this.
|
|
36012
|
+
try {
|
|
36013
|
+
this.dropArgs = args;
|
|
36014
|
+
if (this.parent.isModified && this.currentReport !== '') {
|
|
36015
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
36016
|
+
}
|
|
36017
|
+
else {
|
|
36018
|
+
this.reportLoad(args);
|
|
36019
|
+
}
|
|
36020
|
+
}
|
|
36021
|
+
catch (execption) {
|
|
36022
|
+
this.parent.actionFailureMethod(execption);
|
|
35162
36023
|
}
|
|
35163
36024
|
};
|
|
35164
36025
|
Toolbar$$1.prototype.reportLoad = function (args) {
|
|
@@ -35167,6 +36028,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35167
36028
|
var loadArgs = {
|
|
35168
36029
|
reportName: args.itemData.value
|
|
35169
36030
|
};
|
|
36031
|
+
var actionInfo = {
|
|
36032
|
+
reportName: args.itemData.value
|
|
36033
|
+
};
|
|
36034
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35170
36035
|
this.parent.trigger(loadReport, loadArgs, function (observedArgs) {
|
|
35171
36036
|
_this_1.currentReport = observedArgs.reportName;
|
|
35172
36037
|
_this_1.parent.isModified = false;
|
|
@@ -35179,7 +36044,15 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35179
36044
|
report: this.parent.getPersistData(),
|
|
35180
36045
|
reportName: this.currentReport
|
|
35181
36046
|
};
|
|
36047
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
36048
|
+
var actionInfo = {
|
|
36049
|
+
reportName: this.currentReport
|
|
36050
|
+
};
|
|
36051
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35182
36052
|
this.parent.trigger(saveReport, saveArgs);
|
|
36053
|
+
if (this.parent.actionObj.actionName) {
|
|
36054
|
+
this.parent.actionCompleteMethod();
|
|
36055
|
+
}
|
|
35183
36056
|
this.parent.isModified = false;
|
|
35184
36057
|
}
|
|
35185
36058
|
else if (this.currentReport === '' && (args.item.id === (this.parent.element.id + 'save') || args.item.id === (this.parent.element.id + 'saveas'))) {
|
|
@@ -35243,54 +36116,67 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35243
36116
|
}
|
|
35244
36117
|
};
|
|
35245
36118
|
Toolbar$$1.prototype.actionClick = function (args) {
|
|
35246
|
-
|
|
35247
|
-
|
|
35248
|
-
|
|
35249
|
-
|
|
35250
|
-
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
|
|
35260
|
-
|
|
35261
|
-
|
|
35262
|
-
|
|
35263
|
-
|
|
35264
|
-
|
|
35265
|
-
|
|
35266
|
-
|
|
35267
|
-
|
|
35268
|
-
|
|
35269
|
-
|
|
35270
|
-
this.
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
|
|
35274
|
-
|
|
35275
|
-
|
|
35276
|
-
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
|
|
35280
|
-
|
|
35281
|
-
|
|
35282
|
-
|
|
35283
|
-
this.
|
|
35284
|
-
|
|
35285
|
-
|
|
35286
|
-
|
|
35287
|
-
|
|
35288
|
-
|
|
35289
|
-
|
|
35290
|
-
|
|
35291
|
-
this.parent.
|
|
35292
|
-
|
|
35293
|
-
|
|
36119
|
+
var actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
|
|
36120
|
+
: (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
|
|
36121
|
+
: (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
|
|
36122
|
+
: (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
|
|
36123
|
+
this.parent.actionObj.actionName = actionName;
|
|
36124
|
+
if (this.parent.actionBeginMethod()) {
|
|
36125
|
+
return;
|
|
36126
|
+
}
|
|
36127
|
+
try {
|
|
36128
|
+
switch (args.item.id) {
|
|
36129
|
+
case (this.parent.element.id + 'save'):
|
|
36130
|
+
case (this.parent.element.id + 'saveas'):
|
|
36131
|
+
this.saveReport(args);
|
|
36132
|
+
break;
|
|
36133
|
+
case (this.parent.element.id + 'remove'):
|
|
36134
|
+
this.action = 'Remove';
|
|
36135
|
+
if (this.currentReport && this.currentReport !== '') {
|
|
36136
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
|
|
36137
|
+
}
|
|
36138
|
+
else {
|
|
36139
|
+
this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
|
|
36140
|
+
}
|
|
36141
|
+
return;
|
|
36142
|
+
case (this.parent.element.id + 'rename'):
|
|
36143
|
+
this.renameReport(args);
|
|
36144
|
+
break;
|
|
36145
|
+
case (this.parent.element.id + 'new'):
|
|
36146
|
+
this.action = 'New';
|
|
36147
|
+
this.newArgs = args;
|
|
36148
|
+
if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
|
|
36149
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
36150
|
+
}
|
|
36151
|
+
else {
|
|
36152
|
+
this.createNewReport(args);
|
|
36153
|
+
}
|
|
36154
|
+
break;
|
|
36155
|
+
case (this.parent.element.id + 'load'):
|
|
36156
|
+
this.action = 'Load';
|
|
36157
|
+
break;
|
|
36158
|
+
case (this.parent.element.id + 'fieldlist'):
|
|
36159
|
+
if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
|
|
36160
|
+
this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
|
|
36161
|
+
}
|
|
36162
|
+
break;
|
|
36163
|
+
case (this.parent.element.id + 'formatting'):
|
|
36164
|
+
if (this.parent.conditionalFormattingModule) {
|
|
36165
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
36166
|
+
}
|
|
36167
|
+
break;
|
|
36168
|
+
case (this.parent.element.id + 'mdxQuery'):
|
|
36169
|
+
this.mdxQueryDialog(args);
|
|
36170
|
+
break;
|
|
36171
|
+
case (this.parent.element.id + 'numberFormatting'):
|
|
36172
|
+
if (this.parent.numberFormattingModule) {
|
|
36173
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
36174
|
+
}
|
|
36175
|
+
break;
|
|
36176
|
+
}
|
|
36177
|
+
}
|
|
36178
|
+
catch (execption) {
|
|
36179
|
+
this.parent.actionFailureMethod(execption);
|
|
35294
36180
|
}
|
|
35295
36181
|
};
|
|
35296
36182
|
Toolbar$$1.prototype.renderDialog = function () {
|
|
@@ -35382,6 +36268,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35382
36268
|
return;
|
|
35383
36269
|
};
|
|
35384
36270
|
Toolbar$$1.prototype.okBtnClick = function () {
|
|
36271
|
+
var _this_1 = this;
|
|
35385
36272
|
var reportInput = this.dialog.element.querySelector('.' + GRID_REPORT_INPUT);
|
|
35386
36273
|
if (reportInput && reportInput.value === '') {
|
|
35387
36274
|
reportInput.focus();
|
|
@@ -35413,6 +36300,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35413
36300
|
report: _this_2.parent.getPersistData(),
|
|
35414
36301
|
reportName: reportInput.value
|
|
35415
36302
|
};
|
|
36303
|
+
var actionInfo = {
|
|
36304
|
+
reportName: reportInput.value
|
|
36305
|
+
};
|
|
36306
|
+
_this_1.parent.actionObj.actionInfo = actionInfo;
|
|
35416
36307
|
_this_2.parent.trigger(saveReport, saveArgs);
|
|
35417
36308
|
_this_2.parent.isModified = false;
|
|
35418
36309
|
_this_2.updateReportList();
|
|
@@ -35445,6 +36336,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35445
36336
|
report: _this_3.parent.getPersistData(),
|
|
35446
36337
|
reportName: reportInput.value
|
|
35447
36338
|
};
|
|
36339
|
+
var actionInfo = {
|
|
36340
|
+
reportName: reportInput.value
|
|
36341
|
+
};
|
|
36342
|
+
_this_1.parent.actionObj.actionInfo = actionInfo;
|
|
35448
36343
|
_this_3.parent.trigger(saveReport, saveArgs);
|
|
35449
36344
|
_this_3.parent.isModified = false;
|
|
35450
36345
|
_this_3.updateReportList();
|
|
@@ -35479,12 +36374,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35479
36374
|
reportName: _this_4.currentReport,
|
|
35480
36375
|
rename: reportInput.value
|
|
35481
36376
|
};
|
|
36377
|
+
var actionInfo = {
|
|
36378
|
+
reportName: { oldName: _this_4.currentReport, newName: reportInput.value }
|
|
36379
|
+
};
|
|
36380
|
+
_this_1.parent.actionObj.actionInfo = actionInfo;
|
|
35482
36381
|
_this_4.parent.trigger(renameReport, renameArgs);
|
|
35483
36382
|
_this_4.currentReport = reportInput.value;
|
|
35484
36383
|
_this_4.updateReportList();
|
|
35485
36384
|
_this_4.dialog.hide();
|
|
35486
36385
|
});
|
|
35487
36386
|
}
|
|
36387
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
36388
|
+
if (this.parent.actionObj.actionName) {
|
|
36389
|
+
this.parent.actionCompleteMethod();
|
|
36390
|
+
}
|
|
35488
36391
|
};
|
|
35489
36392
|
Toolbar$$1.prototype.createNewReport = function (args) {
|
|
35490
36393
|
this.dialogShow(args);
|
|
@@ -35543,6 +36446,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35543
36446
|
var removeArgs = {
|
|
35544
36447
|
reportName: this.currentReport
|
|
35545
36448
|
};
|
|
36449
|
+
var actionInfo = {
|
|
36450
|
+
reportName: this.currentReport
|
|
36451
|
+
};
|
|
36452
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35546
36453
|
this.parent.trigger(removeReport, removeArgs);
|
|
35547
36454
|
var reports = this.fetchReports();
|
|
35548
36455
|
if (reports.reportName && reports.reportName.length > 0) {
|
|
@@ -35561,6 +36468,10 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35561
36468
|
this.action = '';
|
|
35562
36469
|
}
|
|
35563
36470
|
this.updateReportList();
|
|
36471
|
+
this.parent.actionObj.actionName = reportRemoved;
|
|
36472
|
+
if (this.parent.actionObj.actionName) {
|
|
36473
|
+
this.parent.actionCompleteMethod();
|
|
36474
|
+
}
|
|
35564
36475
|
}
|
|
35565
36476
|
else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
|
|
35566
36477
|
if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
|
|
@@ -35568,12 +36479,22 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35568
36479
|
report: this.parent.getPersistData(),
|
|
35569
36480
|
reportName: this.currentReport
|
|
35570
36481
|
};
|
|
36482
|
+
var actionInfo = {
|
|
36483
|
+
reportName: this.currentReport
|
|
36484
|
+
};
|
|
36485
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
36486
|
+
this.parent.actionObj.actionName = reportSaved;
|
|
36487
|
+
if (this.parent.actionObj.actionName) {
|
|
36488
|
+
this.parent.actionCompleteMethod();
|
|
36489
|
+
}
|
|
35571
36490
|
this.parent.trigger(saveReport, saveArgs);
|
|
35572
36491
|
this.parent.isModified = false;
|
|
35573
36492
|
if (this.action === 'New') {
|
|
36493
|
+
this.parent.actionObj.actionName = addNewReport;
|
|
35574
36494
|
this.createNewReport(this.newArgs);
|
|
35575
36495
|
}
|
|
35576
36496
|
else {
|
|
36497
|
+
this.parent.actionObj.actionName = reportChange;
|
|
35577
36498
|
this.reportLoad(this.dropArgs);
|
|
35578
36499
|
}
|
|
35579
36500
|
}
|
|
@@ -35679,6 +36600,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35679
36600
|
this.chartMenu = new Menu({
|
|
35680
36601
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35681
36602
|
locale: this.parent.locale,
|
|
36603
|
+
cssClass: TOOLBAR_MENU,
|
|
35682
36604
|
select: this.menuItemClick.bind(this),
|
|
35683
36605
|
beforeOpen: this.whitespaceRemove.bind(this),
|
|
35684
36606
|
onClose: function (args) {
|
|
@@ -35735,6 +36657,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35735
36657
|
this.exportMenu = new Menu({
|
|
35736
36658
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35737
36659
|
locale: this.parent.locale,
|
|
36660
|
+
cssClass: TOOLBAR_MENU,
|
|
35738
36661
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateExportMenu.bind(this),
|
|
35739
36662
|
onClose: function (args) {
|
|
35740
36663
|
_this_1.focusToolBar();
|
|
@@ -35772,6 +36695,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35772
36695
|
this.subTotalMenu = new Menu({
|
|
35773
36696
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35774
36697
|
locale: this.parent.locale,
|
|
36698
|
+
cssClass: TOOLBAR_MENU,
|
|
35775
36699
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateSubtotalSelection.bind(this),
|
|
35776
36700
|
onClose: function (args) {
|
|
35777
36701
|
_this_1.focusToolBar();
|
|
@@ -35809,6 +36733,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35809
36733
|
this.grandTotalMenu = new Menu({
|
|
35810
36734
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35811
36735
|
locale: this.parent.locale,
|
|
36736
|
+
cssClass: TOOLBAR_MENU,
|
|
35812
36737
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateGrandtotalSelection.bind(this),
|
|
35813
36738
|
onClose: function (args) {
|
|
35814
36739
|
_this_1.focusToolBar();
|
|
@@ -35836,6 +36761,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
35836
36761
|
this.formattingMenu = new Menu({
|
|
35837
36762
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35838
36763
|
locale: this.parent.locale,
|
|
36764
|
+
cssClass: TOOLBAR_MENU,
|
|
35839
36765
|
select: this.menuItemClick.bind(this)
|
|
35840
36766
|
});
|
|
35841
36767
|
this.formattingMenu.isStringTemplate = true;
|
|
@@ -36035,181 +36961,202 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
36035
36961
|
var _this_1 = this;
|
|
36036
36962
|
var exportArgs = {};
|
|
36037
36963
|
var type;
|
|
36964
|
+
var actionName = (args.item.id == "PivotViewgrid") ? tableView : (args.item.id == "PivotView_Column") ? chartView : (args.item.id == "PivotView_Bar") ? chartView : (args.item.id == "PivotView_Line") ? chartView
|
|
36965
|
+
: (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
|
|
36966
|
+
: (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
|
|
36967
|
+
: (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
|
|
36968
|
+
: (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
|
|
36969
|
+
: (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
|
|
36970
|
+
: (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
|
|
36971
|
+
: (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
|
|
36972
|
+
this.parent.actionObj.actionName = actionName;
|
|
36973
|
+
if (this.parent.actionBeginMethod()) {
|
|
36974
|
+
return;
|
|
36975
|
+
}
|
|
36038
36976
|
if (this.getAllChartItems().indexOf(args.item.id.split(this.parent.element.id + '_')[1]) > -1 ||
|
|
36039
36977
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'ChartMoreOption') ||
|
|
36040
36978
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'multipleAxes') ||
|
|
36041
36979
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'showLegend')) {
|
|
36042
36980
|
type = args.item.id.split(this.parent.element.id + '_')[1];
|
|
36043
36981
|
}
|
|
36044
|
-
|
|
36045
|
-
|
|
36046
|
-
|
|
36047
|
-
this.parent.grid.
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
this.parent.
|
|
36051
|
-
|
|
36052
|
-
|
|
36053
|
-
|
|
36054
|
-
|
|
36055
|
-
this.parent.
|
|
36056
|
-
|
|
36982
|
+
try {
|
|
36983
|
+
switch (args.item.id) {
|
|
36984
|
+
case (this.parent.element.id + 'grid'):
|
|
36985
|
+
if (this.parent.grid && this.parent.chart) {
|
|
36986
|
+
this.parent.grid.element.style.display = '';
|
|
36987
|
+
this.parent.chart.element.style.display = 'none';
|
|
36988
|
+
if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36989
|
+
this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
|
|
36990
|
+
}
|
|
36991
|
+
this.parent.currentView = 'Table';
|
|
36992
|
+
this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
|
|
36993
|
+
if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
|
|
36994
|
+
this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
|
|
36995
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
|
|
36996
|
+
}
|
|
36997
|
+
var actionInfo = {
|
|
36998
|
+
toolbarInfo: { displayOption: this.parent.displayOption, gridSettings: this.parent.gridSettings }
|
|
36999
|
+
};
|
|
37000
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
37001
|
+
this.parent.layoutRefresh();
|
|
36057
37002
|
}
|
|
36058
|
-
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
|
|
37003
|
+
break;
|
|
37004
|
+
case (this.parent.element.id + 'pdf'):
|
|
37005
|
+
if (this.parent.currentView === 'Table') {
|
|
37006
|
+
exportArgs = {
|
|
37007
|
+
pdfExportProperties: { fileName: 'Export.pdf' },
|
|
37008
|
+
pdfDoc: undefined,
|
|
37009
|
+
isBlob: false,
|
|
37010
|
+
isMultipleExport: false
|
|
37011
|
+
};
|
|
37012
|
+
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
37013
|
+
_this_1.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
|
|
37014
|
+
});
|
|
37015
|
+
}
|
|
37016
|
+
else {
|
|
37017
|
+
exportArgs = {
|
|
37018
|
+
width: undefined,
|
|
37019
|
+
height: undefined,
|
|
37020
|
+
orientation: PdfPageOrientation.Landscape,
|
|
37021
|
+
type: 'PDF',
|
|
37022
|
+
fileName: 'result',
|
|
37023
|
+
};
|
|
37024
|
+
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
37025
|
+
_this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
37026
|
+
});
|
|
37027
|
+
}
|
|
37028
|
+
break;
|
|
37029
|
+
case (this.parent.element.id + 'excel'):
|
|
36063
37030
|
exportArgs = {
|
|
36064
|
-
|
|
36065
|
-
|
|
37031
|
+
excelExportProperties: { fileName: 'Export.xlsx' },
|
|
37032
|
+
isBlob: undefined,
|
|
37033
|
+
isMultipleExport: undefined,
|
|
37034
|
+
workbook: undefined
|
|
37035
|
+
};
|
|
37036
|
+
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
37037
|
+
_this_1.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
37038
|
+
});
|
|
37039
|
+
break;
|
|
37040
|
+
case (this.parent.element.id + 'csv'):
|
|
37041
|
+
exportArgs = {
|
|
37042
|
+
excelExportProperties: { fileName: 'Export.csv' },
|
|
36066
37043
|
isBlob: false,
|
|
36067
|
-
isMultipleExport: false
|
|
37044
|
+
isMultipleExport: false,
|
|
37045
|
+
workbook: undefined
|
|
36068
37046
|
};
|
|
36069
37047
|
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
36070
|
-
_this_1.parent.
|
|
37048
|
+
_this_1.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
36071
37049
|
});
|
|
36072
|
-
|
|
36073
|
-
|
|
37050
|
+
break;
|
|
37051
|
+
case (this.parent.element.id + 'png'):
|
|
36074
37052
|
exportArgs = {
|
|
37053
|
+
type: 'PNG',
|
|
36075
37054
|
width: undefined,
|
|
36076
37055
|
height: undefined,
|
|
37056
|
+
fileName: 'result',
|
|
36077
37057
|
orientation: PdfPageOrientation.Landscape,
|
|
36078
|
-
|
|
37058
|
+
};
|
|
37059
|
+
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
37060
|
+
_this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
37061
|
+
});
|
|
37062
|
+
break;
|
|
37063
|
+
case (this.parent.element.id + 'jpeg'):
|
|
37064
|
+
exportArgs = {
|
|
37065
|
+
type: 'JPEG',
|
|
36079
37066
|
fileName: 'result',
|
|
37067
|
+
orientation: PdfPageOrientation.Landscape,
|
|
37068
|
+
width: undefined,
|
|
37069
|
+
height: undefined,
|
|
36080
37070
|
};
|
|
36081
37071
|
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
36082
37072
|
_this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36083
37073
|
});
|
|
36084
|
-
|
|
36085
|
-
|
|
36086
|
-
|
|
36087
|
-
|
|
36088
|
-
|
|
36089
|
-
|
|
36090
|
-
|
|
36091
|
-
|
|
36092
|
-
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36098
|
-
|
|
36099
|
-
|
|
36100
|
-
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
|
|
36104
|
-
|
|
36105
|
-
|
|
36106
|
-
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
|
|
36122
|
-
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
|
|
36132
|
-
case (this.parent.element.id + 'svg'):
|
|
36133
|
-
exportArgs = {
|
|
36134
|
-
width: undefined,
|
|
36135
|
-
height: undefined,
|
|
36136
|
-
type: 'SVG',
|
|
36137
|
-
fileName: 'result',
|
|
36138
|
-
orientation: PdfPageOrientation.Landscape,
|
|
36139
|
-
};
|
|
36140
|
-
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
36141
|
-
_this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36142
|
-
});
|
|
36143
|
-
break;
|
|
36144
|
-
case (this.parent.element.id + 'notsubtotal'):
|
|
36145
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
36146
|
-
this.parent.refreshData();
|
|
36147
|
-
break;
|
|
36148
|
-
case (this.parent.element.id + 'subtotalrow'):
|
|
36149
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
36150
|
-
this.parent.refreshData();
|
|
36151
|
-
break;
|
|
36152
|
-
case (this.parent.element.id + 'subtotalcolumn'):
|
|
36153
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
36154
|
-
this.parent.refreshData();
|
|
36155
|
-
break;
|
|
36156
|
-
case (this.parent.element.id + 'subtotal'):
|
|
36157
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
36158
|
-
this.parent.refreshData();
|
|
36159
|
-
break;
|
|
36160
|
-
case (this.parent.element.id + 'notgrandtotal'):
|
|
36161
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
36162
|
-
this.parent.refreshData();
|
|
36163
|
-
break;
|
|
36164
|
-
case (this.parent.element.id + 'grandtotalrow'):
|
|
36165
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
36166
|
-
this.parent.refreshData();
|
|
36167
|
-
break;
|
|
36168
|
-
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
36169
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
36170
|
-
this.parent.refreshData();
|
|
36171
|
-
break;
|
|
36172
|
-
case (this.parent.element.id + 'grandtotal'):
|
|
36173
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
36174
|
-
this.parent.refreshData();
|
|
36175
|
-
break;
|
|
36176
|
-
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
36177
|
-
if (this.parent.numberFormattingModule) {
|
|
36178
|
-
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
36179
|
-
}
|
|
36180
|
-
break;
|
|
36181
|
-
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
36182
|
-
if (this.parent.conditionalFormattingModule) {
|
|
36183
|
-
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
36184
|
-
}
|
|
36185
|
-
break;
|
|
36186
|
-
case (this.parent.element.id + '_' + type):
|
|
36187
|
-
if (args.item && args.item.text) {
|
|
36188
|
-
if (type === 'ChartMoreOption') {
|
|
36189
|
-
this.createChartTypeDialog();
|
|
36190
|
-
}
|
|
36191
|
-
else if (type === 'multipleAxes') {
|
|
36192
|
-
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36193
|
-
this.isMultiAxisChange = true;
|
|
36194
|
-
}
|
|
36195
|
-
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
36196
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
37074
|
+
break;
|
|
37075
|
+
case (this.parent.element.id + 'svg'):
|
|
37076
|
+
exportArgs = {
|
|
37077
|
+
width: undefined,
|
|
37078
|
+
height: undefined,
|
|
37079
|
+
type: 'SVG',
|
|
37080
|
+
fileName: 'result',
|
|
37081
|
+
orientation: PdfPageOrientation.Landscape,
|
|
37082
|
+
};
|
|
37083
|
+
this.parent.trigger(beforeExport, exportArgs, function (observedArgs) {
|
|
37084
|
+
_this_1.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
37085
|
+
});
|
|
37086
|
+
break;
|
|
37087
|
+
case (this.parent.element.id + 'notsubtotal'):
|
|
37088
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
37089
|
+
this.parent.refreshData();
|
|
37090
|
+
break;
|
|
37091
|
+
case (this.parent.element.id + 'subtotalrow'):
|
|
37092
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
37093
|
+
this.parent.refreshData();
|
|
37094
|
+
break;
|
|
37095
|
+
case (this.parent.element.id + 'subtotalcolumn'):
|
|
37096
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
37097
|
+
this.parent.refreshData();
|
|
37098
|
+
break;
|
|
37099
|
+
case (this.parent.element.id + 'subtotal'):
|
|
37100
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
37101
|
+
this.parent.refreshData();
|
|
37102
|
+
break;
|
|
37103
|
+
case (this.parent.element.id + 'notgrandtotal'):
|
|
37104
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
37105
|
+
this.parent.refreshData();
|
|
37106
|
+
break;
|
|
37107
|
+
case (this.parent.element.id + 'grandtotalrow'):
|
|
37108
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
37109
|
+
this.parent.refreshData();
|
|
37110
|
+
break;
|
|
37111
|
+
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
37112
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
37113
|
+
this.parent.refreshData();
|
|
37114
|
+
break;
|
|
37115
|
+
case (this.parent.element.id + 'grandtotal'):
|
|
37116
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
37117
|
+
this.parent.refreshData();
|
|
37118
|
+
break;
|
|
37119
|
+
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
37120
|
+
if (this.parent.numberFormattingModule) {
|
|
37121
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
36197
37122
|
}
|
|
36198
|
-
|
|
36199
|
-
|
|
37123
|
+
break;
|
|
37124
|
+
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
37125
|
+
if (this.parent.conditionalFormattingModule) {
|
|
37126
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
36200
37127
|
}
|
|
36201
|
-
|
|
36202
|
-
|
|
36203
|
-
|
|
36204
|
-
|
|
37128
|
+
break;
|
|
37129
|
+
case (this.parent.element.id + '_' + type):
|
|
37130
|
+
if (args.item && args.item.text) {
|
|
37131
|
+
if (type === 'ChartMoreOption') {
|
|
37132
|
+
this.createChartTypeDialog();
|
|
37133
|
+
}
|
|
37134
|
+
else if (type === 'multipleAxes') {
|
|
37135
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
37136
|
+
this.isMultiAxisChange = true;
|
|
37137
|
+
}
|
|
37138
|
+
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
37139
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
36205
37140
|
}
|
|
36206
|
-
else {
|
|
36207
|
-
this.
|
|
37141
|
+
else if (this.getAllChartItems().indexOf(type) > -1) {
|
|
37142
|
+
this.updateChartType(type, false);
|
|
37143
|
+
}
|
|
37144
|
+
else if (type === 'showLegend') {
|
|
37145
|
+
this.parent.chart.legendSettings.visible = !this.showLableState;
|
|
37146
|
+
if (this.parent.chartSettings.legendSettings) {
|
|
37147
|
+
this.parent.chartSettings.legendSettings.visible = !this.showLableState;
|
|
37148
|
+
}
|
|
37149
|
+
else {
|
|
37150
|
+
this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
|
|
37151
|
+
}
|
|
37152
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
36208
37153
|
}
|
|
36209
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
36210
37154
|
}
|
|
36211
|
-
|
|
36212
|
-
|
|
37155
|
+
break;
|
|
37156
|
+
}
|
|
37157
|
+
}
|
|
37158
|
+
catch (execption) {
|
|
37159
|
+
this.parent.actionFailureMethod(execption);
|
|
36213
37160
|
}
|
|
36214
37161
|
/* eslint-enable max-len */
|
|
36215
37162
|
};
|
|
@@ -36301,14 +37248,20 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
36301
37248
|
if (this.parent.chart) {
|
|
36302
37249
|
this.parent.currentView = 'Chart';
|
|
36303
37250
|
this.parent.setProperties({ displayOption: { primary: 'Chart' } }, true);
|
|
36304
|
-
|
|
37251
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
37252
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
|
|
37253
|
+
}
|
|
36305
37254
|
this.parent.chart.setProperties({ width: formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()) }, true); /* eslint-disable-line */
|
|
36306
37255
|
if (this.parent.chartSettings.chartSeries.type === type && !isMultiAxis) {
|
|
36307
|
-
this.parent.
|
|
37256
|
+
this.parent.pivotChartModule.updateView();
|
|
36308
37257
|
}
|
|
36309
37258
|
else {
|
|
36310
37259
|
this.parent.chartSettings.chartSeries.type = type;
|
|
36311
37260
|
}
|
|
37261
|
+
var actionInfo = {
|
|
37262
|
+
toolbarInfo: { displayOption: this.parent.displayOption, chartSettings: this.parent.chartSettings }
|
|
37263
|
+
};
|
|
37264
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
36312
37265
|
}
|
|
36313
37266
|
}
|
|
36314
37267
|
};
|
|
@@ -36872,6 +37825,10 @@ var NumberFormatting = /** @__PURE__ @class */ (function () {
|
|
|
36872
37825
|
this.parent.trigger(numberFormatting, eventArgs, function (observedArgs) {
|
|
36873
37826
|
if (!observedArgs.cancel) {
|
|
36874
37827
|
_this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
|
|
37828
|
+
var actionInfo = {
|
|
37829
|
+
numberFormattingInfo: _this.parent.dataSourceSettings.formatSettings
|
|
37830
|
+
};
|
|
37831
|
+
_this.parent.actionObj.actionInfo = actionInfo;
|
|
36875
37832
|
try {
|
|
36876
37833
|
_this.parent.updateDataSource(false);
|
|
36877
37834
|
_this.dialog.close();
|
|
@@ -37536,7 +38493,7 @@ var Grouping = /** @__PURE__ @class */ (function () {
|
|
|
37536
38493
|
for (var j = 0, len_1 = field.customGroups.length; j < len_1; j++) {
|
|
37537
38494
|
if (field.customGroups[j]) {
|
|
37538
38495
|
var group = field.customGroups[j];
|
|
37539
|
-
if (group.items &&
|
|
38496
|
+
if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
|
|
37540
38497
|
splicedItems = this.mergeArray(splicedItems, [group.groupName]);
|
|
37541
38498
|
newItems = this.mergeArray(newItems, group.items);
|
|
37542
38499
|
field.customGroups.splice(j, 1);
|
|
@@ -37794,5 +38751,5 @@ var Grouping = /** @__PURE__ @class */ (function () {
|
|
|
37794
38751
|
* Export PivotGrid components
|
|
37795
38752
|
*/
|
|
37796
38753
|
|
|
37797
|
-
export { GroupingBarSettings, CellEditSettings, ConditionalSettings, HyperlinkSettings, DisplayOption, PivotView, Render, ExcelExport$1 as ExcelExport, PDFExport, KeyboardInteraction, VirtualScroll$1 as VirtualScroll, DrillThrough, PivotChart, PivotFieldList, TreeViewRenderer, AxisFieldRenderer, AxisTableRenderer, DialogRenderer, EventBase, NodeStateModified, DataSourceUpdate, FieldList, CommonKeyboardInteraction, Common, GroupingBar, CalculatedField, ConditionalFormatting, PivotCommon, load, enginePopulating, enginePopulated, onFieldDropped, fieldDrop, beforePivotTableRender, afterPivotTableRender, beforeExport, excelHeaderQueryCellInfo, pdfHeaderQueryCellInfo, excelQueryCellInfo, pdfQueryCellInfo, onPdfCellRender, dataBound, queryCellInfo, headerCellInfo, hyperlinkCellClick, resizing, resizeStop, cellClick, drillThrough, beforeColumnsRender, selected, cellSelecting, drill, cellSelected, cellDeselected, rowSelected, rowDeselected, beginDrillThrough, editCompleted, multiLevelLabelClick, saveReport, fetchReport, loadReport, renameReport, removeReport, newReport, toolbarRender, toolbarClick, chartTooltipRender, chartLoaded, chartLoad, chartResized, chartAxisLabelRender, chartSeriesCreated, aggregateCellInfo, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, initialLoad, uiUpdate, scroll, contentReady, dataReady, initSubComponent, treeViewUpdate, pivotButtonUpdate, initCalculatedField, click, initToolbar, initFormatting, initGrouping, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
|
|
38754
|
+
export { GroupingBarSettings, CellEditSettings, ConditionalSettings, HyperlinkSettings, DisplayOption, PivotView, Render, ExcelExport$1 as ExcelExport, PDFExport, KeyboardInteraction, VirtualScroll$1 as VirtualScroll, DrillThrough, PivotChart, PivotFieldList, TreeViewRenderer, AxisFieldRenderer, AxisTableRenderer, DialogRenderer, EventBase, NodeStateModified, DataSourceUpdate, FieldList, CommonKeyboardInteraction, Common, GroupingBar, CalculatedField, ConditionalFormatting, PivotCommon, load, enginePopulating, enginePopulated, onFieldDropped, fieldDrop, beforePivotTableRender, afterPivotTableRender, beforeExport, excelHeaderQueryCellInfo, pdfHeaderQueryCellInfo, excelQueryCellInfo, pdfQueryCellInfo, onPdfCellRender, dataBound, queryCellInfo, headerCellInfo, hyperlinkCellClick, resizing, resizeStop, cellClick, drillThrough, beforeColumnsRender, selected, cellSelecting, drill, cellSelected, cellDeselected, rowSelected, rowDeselected, beginDrillThrough, editCompleted, multiLevelLabelClick, saveReport, fetchReport, loadReport, renameReport, removeReport, newReport, toolbarRender, toolbarClick, chartTooltipRender, chartLoaded, chartLoad, chartResized, chartAxisLabelRender, chartSeriesCreated, aggregateCellInfo, contextMenuClick, contextMenuOpen, fieldListRefreshed, conditionalFormatting, beforePdfExport, beforeExcelExport, memberFiltering, calculatedFieldCreate, memberEditorOpen, fieldRemove, numberFormatting, aggregateMenuOpen, fieldDragStart, chartPointClick, beforeServiceInvoke, actionBegin, actionComplete, actionFailure, initialLoad, uiUpdate, scroll, contentReady, dataReady, initSubComponent, treeViewUpdate, pivotButtonUpdate, initCalculatedField, click, initToolbar, initFormatting, initGrouping, sortValue, drillUp, drillDown, addNewReport, saveCurrentReport, saveAsCurrentReport, renameCurrentReport, removeCurrentReport, loadReports, openConditionalFormatting, openNumberFormatting, MdxQuery, showFieldList, tableView, chartView, multipleAxis, showLegend, pdfExport, pngExport, excelExport, csvExport, jpegExport, svgExport, hideSubTotals, subTotalsRow, subTotalsColumn, showSubTotals, hideGrandTotals, grandTotalsRow, grandTotalsColumn, showGrandTotals, numberFormattingMenu, conditionalFormattingMenu, reportChange, sortFieldTree, editCalculatedField, sortField, filterField, removeField, openCalculatedField, editRecord, saveEditedRecords, addNewRecord, removeRecord, aggregateField, contextMenuCalculatedField, windowResize, calculatedFieldApplied, editedRecordsSaved, newRecordAdded, recordRemoved, closeFieldlist, fieldTreeSorted, reportSaved, newReportAdded, reportReSaved, reportRenamed, reportRemoved, excelExported, csvExported, pdfExported, pngExported, jpegExported, svgExported, conditionallyFormatted, numberFormatted, tableViewed, chartViewed, subTotalsHidden, subTotalsRowShown, subTotalsColumnShown, subTotalsShown, grandTotalsHidden, grandTotalsRowShown, grandTotalsColumnShown, grandTotalsShown, valueSorted, calculatedFieldEdited, fieldSorted, fieldFiltered, fieldRemoved, fieldAggregated, recordEdited, reportChanged, windowResized, recordUpdated, drillThroughClosed, Theme, ErrorDialog, FilterDialog, PivotContextMenu, AggregateMenu, Toolbar$2 as Toolbar, NumberFormatting, Grouping, PivotEngine, PivotUtil, OlapEngine, MDXQuery };
|
|
37798
38755
|
//# sourceMappingURL=ej2-pivotview.es5.js.map
|