@syncfusion/ej2-pivotview 19.3.53 → 19.4.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +76 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +56 -0
- package/CHANGELOG.md +31 -25
- package/README.md +1 -1
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +2076 -1100
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2092 -1110
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +22 -22
- package/src/base/engine.d.ts +17 -1
- package/src/base/engine.js +82 -29
- package/src/base/export-util.d.ts +17 -0
- package/src/base/export-util.js +245 -0
- package/src/base/olap/engine.d.ts +7 -0
- package/src/base/olap/engine.js +138 -35
- package/src/base/util.d.ts +0 -9
- package/src/base/util.js +2 -215
- package/src/common/actions/field-list.js +1 -1
- package/src/common/actions/pivot-button.d.ts +5 -8
- package/src/common/actions/pivot-button.js +188 -171
- package/src/common/base/constant.d.ts +186 -0
- package/src/common/base/constant.js +186 -0
- package/src/common/base/css-constant.d.ts +2 -0
- package/src/common/base/css-constant.js +2 -0
- package/src/common/base/enum.d.ts +11 -0
- package/src/common/base/interface.d.ts +272 -2
- package/src/common/calculatedfield/calculated-field.js +108 -93
- package/src/common/conditionalformatting/conditional-formatting.js +8 -2
- package/src/common/grouping-bar/grouping-bar.js +1 -1
- package/src/common/popups/aggregate-menu.js +57 -35
- package/src/common/popups/drillthrough-dialog.js +187 -139
- package/src/common/popups/filter-dialog.d.ts +1 -0
- package/src/common/popups/filter-dialog.js +22 -1
- package/src/common/popups/formatting-dialog.js +4 -0
- package/src/common/popups/grouping.js +2 -1
- package/src/common/popups/toolbar.js +305 -203
- package/src/pivotchart/base/pivotchart.js +36 -15
- package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
- package/src/pivotfieldlist/base/field-list.d.ts +55 -1
- package/src/pivotfieldlist/base/field-list.js +68 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
- package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.js +9 -7
- package/src/pivotview/actions/pdf-export.js +3 -3
- package/src/pivotview/base/pivotview-model.d.ts +46 -1
- package/src/pivotview/base/pivotview.d.ts +56 -2
- package/src/pivotview/base/pivotview.js +311 -107
- package/src/pivotview/model/chartsettings-model.d.ts +2 -2
- package/src/pivotview/model/chartsettings.d.ts +2 -2
- package/src/pivotview/model/chartsettings.js +2 -2
- package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
- package/src/pivotview/model/datasourcesettings.d.ts +7 -0
- package/src/pivotview/model/datasourcesettings.js +3 -0
- package/src/pivotview/renderer/render.d.ts +2 -1
- package/src/pivotview/renderer/render.js +52 -11
- package/styles/bootstrap-dark.css +115 -104
- package/styles/bootstrap.css +115 -104
- package/styles/bootstrap4.css +114 -81
- package/styles/bootstrap5-dark.css +220 -168
- package/styles/bootstrap5.css +215 -161
- package/styles/fabric-dark.css +117 -103
- package/styles/fabric.css +115 -102
- package/styles/highcontrast-light.css +116 -102
- package/styles/highcontrast.css +118 -104
- package/styles/material-dark.css +108 -97
- package/styles/material.css +108 -97
- package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
- package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
- package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
- package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
- package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
- package/styles/pivotfieldlist/_layout.scss +199 -109
- package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_material-definition.scss +1 -4
- package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
- package/styles/pivotfieldlist/_theme.scss +185 -35
- package/styles/pivotfieldlist/bootstrap-dark.css +49 -58
- package/styles/pivotfieldlist/bootstrap.css +49 -58
- package/styles/pivotfieldlist/bootstrap4.css +44 -39
- package/styles/pivotfieldlist/bootstrap5-dark.css +115 -89
- package/styles/pivotfieldlist/bootstrap5.css +115 -89
- package/styles/pivotfieldlist/fabric-dark.css +49 -58
- package/styles/pivotfieldlist/fabric.css +49 -58
- package/styles/pivotfieldlist/highcontrast-light.css +49 -58
- package/styles/pivotfieldlist/highcontrast.css +49 -58
- package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
- package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
- package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
- package/styles/pivotfieldlist/material-dark.css +44 -53
- package/styles/pivotfieldlist/material.css +44 -53
- package/styles/pivotfieldlist/tailwind-dark.css +138 -81
- package/styles/pivotfieldlist/tailwind.css +140 -83
- package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
- package/styles/pivotview/_bootstrap-definition.scss +9 -6
- package/styles/pivotview/_bootstrap4-definition.scss +10 -7
- package/styles/pivotview/_bootstrap5-definition.scss +12 -9
- package/styles/pivotview/_fabric-dark-definition.scss +8 -5
- package/styles/pivotview/_fabric-definition.scss +7 -4
- package/styles/pivotview/_fluent-definition.scss +126 -0
- package/styles/pivotview/_highcontrast-definition.scss +8 -5
- package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
- package/styles/pivotview/_layout.scss +119 -64
- package/styles/pivotview/_material-dark-definition.scss +7 -4
- package/styles/pivotview/_material-definition.scss +8 -4
- package/styles/pivotview/_tailwind-definition.scss +8 -5
- package/styles/pivotview/_theme.scss +124 -70
- package/styles/pivotview/bootstrap-dark.css +66 -46
- package/styles/pivotview/bootstrap.css +66 -46
- package/styles/pivotview/bootstrap4.css +70 -42
- package/styles/pivotview/bootstrap5-dark.css +99 -73
- package/styles/pivotview/bootstrap5-dark.scss +0 -1
- package/styles/pivotview/bootstrap5.css +100 -72
- package/styles/pivotview/fabric-dark.css +68 -45
- package/styles/pivotview/fabric.css +66 -44
- package/styles/pivotview/highcontrast-light.css +67 -44
- package/styles/pivotview/highcontrast.css +69 -46
- package/styles/pivotview/icons/_bootstrap4.scss +1 -1
- package/styles/pivotview/icons/_bootstrap5.scss +1 -1
- package/styles/pivotview/icons/_fluent.scss +183 -0
- package/styles/pivotview/icons/_tailwind.scss +1 -1
- package/styles/pivotview/material-dark.css +64 -44
- package/styles/pivotview/material.css +64 -44
- package/styles/pivotview/tailwind-dark.css +106 -58
- package/styles/pivotview/tailwind-dark.scss +0 -1
- package/styles/pivotview/tailwind.css +107 -57
- package/styles/tailwind-dark.css +250 -145
- package/styles/tailwind.css +247 -140
|
@@ -60,41 +60,6 @@ class PivotUtil {
|
|
|
60
60
|
}
|
|
61
61
|
return clonedData;
|
|
62
62
|
}
|
|
63
|
-
static getClonedPivotValues(pivotValues) {
|
|
64
|
-
let clonedSets = [];
|
|
65
|
-
for (let i = 0; i < pivotValues.length; i++) {
|
|
66
|
-
if (pivotValues[i]) {
|
|
67
|
-
clonedSets[i] = [];
|
|
68
|
-
for (let j = 0; j < pivotValues[i].length; j++) {
|
|
69
|
-
if (pivotValues[i][j]) {
|
|
70
|
-
/* eslint-disable */
|
|
71
|
-
clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
|
|
72
|
-
/* eslint-enable */
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return clonedSets;
|
|
78
|
-
}
|
|
79
|
-
/* eslint-disable */
|
|
80
|
-
static getClonedPivotValueObj(data) {
|
|
81
|
-
/* eslint-enable */
|
|
82
|
-
let keyPos = 0;
|
|
83
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
84
|
-
let framedSet = {};
|
|
85
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
86
|
-
if (!(data === null || data === undefined)) {
|
|
87
|
-
let fields = Object.keys(data);
|
|
88
|
-
while (keyPos < fields.length) {
|
|
89
|
-
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
90
|
-
keyPos++;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
framedSet = data;
|
|
95
|
-
}
|
|
96
|
-
return framedSet;
|
|
97
|
-
}
|
|
98
63
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
99
64
|
static getDefinedObj(data) {
|
|
100
65
|
let keyPos = 0;
|
|
@@ -127,18 +92,6 @@ class PivotUtil {
|
|
|
127
92
|
return -1;
|
|
128
93
|
}
|
|
129
94
|
/* eslint-disable */
|
|
130
|
-
static isContainCommonElements(collection1, collection2) {
|
|
131
|
-
/* eslint-enable */
|
|
132
|
-
for (let i = 0, cnt = collection1.length; i < cnt; i++) {
|
|
133
|
-
for (let j = 0, lnt = collection2.length; j < lnt; j++) {
|
|
134
|
-
if (collection2[j] === collection1[i]) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
/* eslint-disable */
|
|
142
95
|
static setPivotProperties(control, properties) {
|
|
143
96
|
/* eslint-enable */
|
|
144
97
|
control.allowServerDataBinding = false;
|
|
@@ -175,6 +128,7 @@ class PivotUtil {
|
|
|
175
128
|
drilledMembers: this.cloneDrillMemberSettings(dataSourceSettings.drilledMembers),
|
|
176
129
|
valueSortSettings: this.CloneValueSortObject(dataSourceSettings.valueSortSettings),
|
|
177
130
|
valueAxis: dataSourceSettings.valueAxis,
|
|
131
|
+
grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
|
|
178
132
|
formatSettings: this.cloneFormatSettings(dataSourceSettings.formatSettings),
|
|
179
133
|
calculatedFieldSettings: this.cloneCalculatedFieldSettings(dataSourceSettings.calculatedFieldSettings),
|
|
180
134
|
fieldMapping: this.cloneFieldSettings(dataSourceSettings.fieldMapping),
|
|
@@ -221,6 +175,7 @@ class PivotUtil {
|
|
|
221
175
|
drilledMembers: dataSourceSettings.drilledMembers,
|
|
222
176
|
valueSortSettings: dataSourceSettings.valueSortSettings,
|
|
223
177
|
valueAxis: dataSourceSettings.valueAxis,
|
|
178
|
+
grandTotalsPosition: dataSourceSettings.grandTotalsPosition,
|
|
224
179
|
formatSettings: dataSourceSettings.formatSettings,
|
|
225
180
|
calculatedFieldSettings: dataSourceSettings.calculatedFieldSettings,
|
|
226
181
|
fieldMapping: dataSourceSettings.fieldMapping,
|
|
@@ -632,174 +587,6 @@ class PivotUtil {
|
|
|
632
587
|
return values;
|
|
633
588
|
}
|
|
634
589
|
/* eslint-disable */
|
|
635
|
-
static formatPdfHeaderFooter(pdf) {
|
|
636
|
-
let contents = [];
|
|
637
|
-
if (!isNullOrUndefined(pdf)) {
|
|
638
|
-
for (let i = 0; i < pdf.length; i++) {
|
|
639
|
-
let a = pdf[i];
|
|
640
|
-
let content = {
|
|
641
|
-
/* eslint-enable */
|
|
642
|
-
type: a.Type,
|
|
643
|
-
pageNumberType: a.PageNumberType,
|
|
644
|
-
style: a.Style ? {
|
|
645
|
-
penColor: a.Style.PenColor,
|
|
646
|
-
penSize: a.Style.PenSize,
|
|
647
|
-
dashStyle: a.Style.DashStyle,
|
|
648
|
-
textBrushColor: a.Style.TextBrushColor,
|
|
649
|
-
textPenColor: a.Style.TextPenColor,
|
|
650
|
-
fontSize: a.Style.FontSize,
|
|
651
|
-
hAlign: a.Style.HAlign,
|
|
652
|
-
vAlign: a.Style.VAlign
|
|
653
|
-
} : a.Style,
|
|
654
|
-
points: a.Points !== null ? {
|
|
655
|
-
x1: a.Points.X1,
|
|
656
|
-
y1: a.Points.Y1,
|
|
657
|
-
x2: a.Points.X2,
|
|
658
|
-
y2: a.Points.Y2
|
|
659
|
-
} : null,
|
|
660
|
-
format: a.Format,
|
|
661
|
-
position: a.Position !== null ? {
|
|
662
|
-
x: a.Position.X,
|
|
663
|
-
y: a.Position.Y
|
|
664
|
-
} : null,
|
|
665
|
-
size: a.Size !== null ? {
|
|
666
|
-
height: a.Size.Height,
|
|
667
|
-
width: a.Size.Width
|
|
668
|
-
} : null,
|
|
669
|
-
src: a.Src,
|
|
670
|
-
value: a.Value,
|
|
671
|
-
font: a.Font
|
|
672
|
-
};
|
|
673
|
-
contents.push(content);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
return contents;
|
|
677
|
-
}
|
|
678
|
-
/* eslint-disable */
|
|
679
|
-
static formatPdfExportProperties(pdf) {
|
|
680
|
-
let values;
|
|
681
|
-
/* eslint-enable */
|
|
682
|
-
values = this.getDefinedObj({
|
|
683
|
-
pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
|
|
684
|
-
pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
|
|
685
|
-
header: !isNullOrUndefined(pdf.Header) ? {
|
|
686
|
-
fromTop: pdf.Header.FromTop,
|
|
687
|
-
height: pdf.Header.Height,
|
|
688
|
-
contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
|
|
689
|
-
} : null,
|
|
690
|
-
columns: pdf.Columns,
|
|
691
|
-
footer: !isNullOrUndefined(pdf.Footer) ? {
|
|
692
|
-
fromTop: pdf.Footer.FromBottom,
|
|
693
|
-
height: pdf.Footer.Height,
|
|
694
|
-
contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
|
|
695
|
-
} : null,
|
|
696
|
-
includeHiddenColumn: pdf.IncludeHiddenColumn,
|
|
697
|
-
dataSource: pdf.DataSource,
|
|
698
|
-
exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
|
|
699
|
-
theme: !isNullOrUndefined(pdf.Theme) ? {
|
|
700
|
-
header: pdf.Theme.Header,
|
|
701
|
-
record: pdf.Theme.Record,
|
|
702
|
-
caption: pdf.Theme.Caption
|
|
703
|
-
} : null,
|
|
704
|
-
fileName: pdf.FileName,
|
|
705
|
-
hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
|
|
706
|
-
allowHorizontalOverflow: pdf.AllowHorizontalOverflow
|
|
707
|
-
});
|
|
708
|
-
return values;
|
|
709
|
-
}
|
|
710
|
-
/* eslint-disable */
|
|
711
|
-
static formatExcelStyle(style) {
|
|
712
|
-
let prop;
|
|
713
|
-
/* eslint-enable */
|
|
714
|
-
if (!isNullOrUndefined(style)) {
|
|
715
|
-
prop = this.getDefinedObj({
|
|
716
|
-
fontColor: style.FontColor,
|
|
717
|
-
fontName: style.FontName,
|
|
718
|
-
fontSize: style.FontSize,
|
|
719
|
-
hAlign: style.HAlign === String ? style.HAlign : null,
|
|
720
|
-
vAlign: style.VAlign === String ? style.VAlign : null,
|
|
721
|
-
bold: style.Bold,
|
|
722
|
-
indent: style.Indent,
|
|
723
|
-
italic: style.Italic,
|
|
724
|
-
underline: style.Underline,
|
|
725
|
-
backColor: style.BackColor,
|
|
726
|
-
wrapText: style.WrapText,
|
|
727
|
-
borders: style.Borders,
|
|
728
|
-
numberFormat: style.NumberFormat,
|
|
729
|
-
type: style.Type
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
return prop;
|
|
733
|
-
}
|
|
734
|
-
/* eslint-disable */
|
|
735
|
-
static formatExcelCell(cell) {
|
|
736
|
-
let cells = [];
|
|
737
|
-
if (!isNullOrUndefined(cell)) {
|
|
738
|
-
for (let i = 0; i < cell.length; i++) {
|
|
739
|
-
this.getDefinedObj({
|
|
740
|
-
index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
|
|
741
|
-
colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
|
|
742
|
-
value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
|
|
743
|
-
hyperlink: {
|
|
744
|
-
target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
|
|
745
|
-
displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
|
|
746
|
-
},
|
|
747
|
-
styles: this.formatExcelStyle(cell[i].Style),
|
|
748
|
-
rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
|
|
749
|
-
});
|
|
750
|
-
/* eslint-enable */
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
return cells;
|
|
754
|
-
}
|
|
755
|
-
/* eslint-disable */
|
|
756
|
-
static formatExcelHeaderFooter(excel) {
|
|
757
|
-
let rows = [];
|
|
758
|
-
if (!isNullOrUndefined(excel)) {
|
|
759
|
-
for (let i = 0; i < excel.Rows.length; i++) {
|
|
760
|
-
let row = excel.Rows[i];
|
|
761
|
-
let prop = this.getDefinedObj({
|
|
762
|
-
index: !isNullOrUndefined(row.Index) ? row.Index : null,
|
|
763
|
-
cells: this.formatExcelCell(row.Cells),
|
|
764
|
-
grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
|
|
765
|
-
});
|
|
766
|
-
rows.push(prop);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
return rows;
|
|
770
|
-
}
|
|
771
|
-
static formatExcelExportProperties(excel) {
|
|
772
|
-
/* eslint-enable */
|
|
773
|
-
let prop;
|
|
774
|
-
prop = this.getDefinedObj({
|
|
775
|
-
dataSource: excel.DataSource,
|
|
776
|
-
query: excel.Query,
|
|
777
|
-
multipleExport: this.getDefinedObj({
|
|
778
|
-
type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
|
|
779
|
-
blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
|
|
780
|
-
}),
|
|
781
|
-
header: this.getDefinedObj({
|
|
782
|
-
headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
|
|
783
|
-
rows: this.formatExcelHeaderFooter(excel.Header)
|
|
784
|
-
}),
|
|
785
|
-
footer: this.getDefinedObj({
|
|
786
|
-
footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
|
|
787
|
-
rows: this.formatExcelHeaderFooter(excel.Footer)
|
|
788
|
-
}),
|
|
789
|
-
columns: excel.Columns,
|
|
790
|
-
exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
|
|
791
|
-
includeHiddenColumn: excel.IncludeHiddenColumn,
|
|
792
|
-
theme: !isNullOrUndefined(excel.Theme) ? {
|
|
793
|
-
header: this.formatExcelStyle(excel.Theme.Header),
|
|
794
|
-
record: this.formatExcelStyle(excel.Theme.Record),
|
|
795
|
-
caption: this.formatExcelStyle(excel.Theme.Caption)
|
|
796
|
-
} : undefined,
|
|
797
|
-
fileName: excel.FileName,
|
|
798
|
-
hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
|
|
799
|
-
});
|
|
800
|
-
return prop;
|
|
801
|
-
}
|
|
802
|
-
/* eslint-disable */
|
|
803
590
|
static formatFieldList(fieldList) {
|
|
804
591
|
let keys = Object.keys(fieldList);
|
|
805
592
|
let fList = {};
|
|
@@ -1099,7 +886,8 @@ class PivotEngine {
|
|
|
1099
886
|
this.isLastHeaderHasMeasures = true;
|
|
1100
887
|
this.isEditing = false;
|
|
1101
888
|
let fields;
|
|
1102
|
-
this.globalize = new Internationalization();
|
|
889
|
+
this.globalize = (customProperties && customProperties.globalize) ? customProperties.globalize : new Internationalization();
|
|
890
|
+
this.currencyCode = (customProperties && customProperties.currenyCode) ? customProperties.currenyCode : undefined;
|
|
1103
891
|
this.localeObj = customProperties ? customProperties.localeObj : undefined;
|
|
1104
892
|
this.fieldsType = customProperties ? customProperties.fieldsType : {};
|
|
1105
893
|
this.clonedReport = customProperties ? (customProperties.clonedReport &&
|
|
@@ -1113,6 +901,7 @@ class PivotEngine {
|
|
|
1113
901
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
1114
902
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
1115
903
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
904
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
1116
905
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
1117
906
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
1118
907
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -1226,6 +1015,7 @@ class PivotEngine {
|
|
|
1226
1015
|
this.showRowSubTotals = isNullOrUndefined(dataSource.showRowSubTotals) ? true : dataSource.showRowSubTotals;
|
|
1227
1016
|
this.showColumnSubTotals = isNullOrUndefined(dataSource.showColumnSubTotals) ? true : dataSource.showColumnSubTotals;
|
|
1228
1017
|
this.showGrandTotals = isNullOrUndefined(dataSource.showGrandTotals) ? true : dataSource.showGrandTotals;
|
|
1018
|
+
this.grandTotalsPosition = isNullOrUndefined(dataSource.grandTotalsPosition) ? 'Bottom' : dataSource.grandTotalsPosition;
|
|
1229
1019
|
this.showRowGrandTotals = isNullOrUndefined(dataSource.showRowGrandTotals) ? true : dataSource.showRowGrandTotals;
|
|
1230
1020
|
this.showColumnGrandTotals = isNullOrUndefined(dataSource.showColumnGrandTotals) ? true : dataSource.showColumnGrandTotals;
|
|
1231
1021
|
this.allowValueFilter = dataSource.allowValueFilter;
|
|
@@ -1524,6 +1314,7 @@ class PivotEngine {
|
|
|
1524
1314
|
}
|
|
1525
1315
|
if (!PivotUtil.getFieldByName(groupKeys[gCnt], dataFields)) {
|
|
1526
1316
|
groupField = groupFields[groupKeys[gCnt]];
|
|
1317
|
+
caption = (caption.indexOf(' (') !== -1 && caption.indexOf(')') !== -1) ? caption.slice(caption.indexOf('(') + 1, caption.length - 1) : caption;
|
|
1527
1318
|
let newField = {
|
|
1528
1319
|
name: groupKeys[gCnt],
|
|
1529
1320
|
caption: (this.localeObj ? this.localeObj.getConstant(groupField) : groupField) + ' (' + caption + ')',
|
|
@@ -1551,6 +1342,8 @@ class PivotEngine {
|
|
|
1551
1342
|
}
|
|
1552
1343
|
}
|
|
1553
1344
|
gCnt = Object.keys(groupKeys).length;
|
|
1345
|
+
let field = this.getMappingField(fieldName, this.clonedReport ? this.clonedReport.fieldMapping : this.fieldMapping);
|
|
1346
|
+
let caption = field.caption ? field.caption : fieldName;
|
|
1554
1347
|
while (gCnt--) {
|
|
1555
1348
|
groupField = groupFields[groupKeys[gCnt]];
|
|
1556
1349
|
for (let i = 0, len = this.formats.length; i < len; i++) {
|
|
@@ -1569,6 +1362,33 @@ class PivotEngine {
|
|
|
1569
1362
|
};
|
|
1570
1363
|
this.formats.push(formatSettings);
|
|
1571
1364
|
}
|
|
1365
|
+
if (!isDataSource) {
|
|
1366
|
+
let mappingField = this.getMappingField(groupKeys[gCnt], this.fieldMapping);
|
|
1367
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
1368
|
+
let newField = {
|
|
1369
|
+
name: groupKeys[gCnt],
|
|
1370
|
+
caption: (this.localeObj ? this.localeObj.getConstant(groupField) : groupField) + ' (' + caption + ')'
|
|
1371
|
+
};
|
|
1372
|
+
this.fieldMapping.push(newField);
|
|
1373
|
+
}
|
|
1374
|
+
else if (groupKeys[gCnt] !== fieldName) {
|
|
1375
|
+
mappingField.caption = (this.localeObj ? this.localeObj.getConstant(groupField) : groupField) + ' (' + caption + ')';
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
if (!isDataSource) {
|
|
1380
|
+
let mappingField = this.getMappingField(fieldName, this.fieldMapping);
|
|
1381
|
+
groupField = groupFields[fieldName];
|
|
1382
|
+
if (groupKeys[gCnt] !== fieldName && isNullOrUndefined(mappingField.name)) {
|
|
1383
|
+
let newField = {
|
|
1384
|
+
name: fieldName,
|
|
1385
|
+
caption: (this.localeObj ? this.localeObj.getConstant(groupField) : groupField) + ' (' + caption + ')'
|
|
1386
|
+
};
|
|
1387
|
+
this.fieldMapping.push(newField);
|
|
1388
|
+
}
|
|
1389
|
+
else {
|
|
1390
|
+
mappingField.caption = (this.localeObj ? this.localeObj.getConstant(groupField) : groupField) + ' (' + caption + ')';
|
|
1391
|
+
}
|
|
1572
1392
|
}
|
|
1573
1393
|
}
|
|
1574
1394
|
else if (group.type === 'Number' && group.rangeInterval) {
|
|
@@ -1807,7 +1627,7 @@ class PivotEngine {
|
|
|
1807
1627
|
this.fieldList = this.savedFieldList;
|
|
1808
1628
|
while (len--) { /** while is used for better performance than for */
|
|
1809
1629
|
let key = keys[len];
|
|
1810
|
-
let field = this.getMappingField(key);
|
|
1630
|
+
let field = this.getMappingField(key, this.fieldMapping);
|
|
1811
1631
|
if (this.fieldList[key]) {
|
|
1812
1632
|
this.fieldList[key].isSelected = false;
|
|
1813
1633
|
this.fieldList[key].index = len;
|
|
@@ -1886,7 +1706,7 @@ class PivotEngine {
|
|
|
1886
1706
|
this.fieldList = {};
|
|
1887
1707
|
while (len--) { /** while is used for better performance than for */
|
|
1888
1708
|
let key = keys[len];
|
|
1889
|
-
let field = this.getMappingField(key);
|
|
1709
|
+
let field = this.getMappingField(key, this.fieldMapping);
|
|
1890
1710
|
type = (field && 'dataType' in field && field.dataType && dataTypes.indexOf(field.dataType.toLowerCase()) > -1) ?
|
|
1891
1711
|
field.dataType.toLowerCase() : PivotUtil.getType(fields[this.fieldKeys[key]]);
|
|
1892
1712
|
this.fieldList[key] = {
|
|
@@ -1930,12 +1750,12 @@ class PivotEngine {
|
|
|
1930
1750
|
}
|
|
1931
1751
|
this.updateTreeViewData(dataFields);
|
|
1932
1752
|
}
|
|
1933
|
-
getMappingField(key) {
|
|
1753
|
+
getMappingField(key, fieldMapping) {
|
|
1934
1754
|
let field = {};
|
|
1935
|
-
if (
|
|
1936
|
-
for (let index = 0, cnt =
|
|
1937
|
-
if (
|
|
1938
|
-
field =
|
|
1755
|
+
if (fieldMapping.length > 0) {
|
|
1756
|
+
for (let index = 0, cnt = fieldMapping.length; index < cnt; index++) {
|
|
1757
|
+
if (fieldMapping[index].name === key) {
|
|
1758
|
+
field = fieldMapping[index];
|
|
1939
1759
|
break;
|
|
1940
1760
|
}
|
|
1941
1761
|
}
|
|
@@ -2496,8 +2316,8 @@ class PivotEngine {
|
|
|
2496
2316
|
field.filter = filter;
|
|
2497
2317
|
field.filterType = type;
|
|
2498
2318
|
field.isExcelFilter = isLabelFilter;
|
|
2499
|
-
let members = (this.formatFields[name] &&
|
|
2500
|
-
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) ?
|
|
2319
|
+
let members = ((this.formatFields[name] &&
|
|
2320
|
+
(['date', 'dateTime', 'time'].indexOf(this.formatFields[name].type) > -1)) || (name in this.groupingFields)) ?
|
|
2501
2321
|
field.formattedMembers : field.members;
|
|
2502
2322
|
let allowFil = isInclude;
|
|
2503
2323
|
let final = {};
|
|
@@ -2544,7 +2364,7 @@ class PivotEngine {
|
|
|
2544
2364
|
}
|
|
2545
2365
|
applyValueFiltering(rowData, level, rows, columns, valueFilter, rowFilterData, type) {
|
|
2546
2366
|
this.isValueFiltered = false;
|
|
2547
|
-
let allMember = extend({}, (type === 'row' && this.rowGrandTotal ? this.rowGrandTotal : type === 'column' && this.columnGrandTotal ? this.columnGrandTotal : rows[rows.length - 1]), null, true);
|
|
2367
|
+
let 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);
|
|
2548
2368
|
this.getFilteredData(rows, columns, valueFilter, rowFilterData, level, rowData.name, allMember, type);
|
|
2549
2369
|
if (this.isValueFiltered) {
|
|
2550
2370
|
if ((type === 'row' && this.rowGrandTotal === null) || (type === 'column' && this.columnGrandTotal === null)) {
|
|
@@ -2879,14 +2699,14 @@ class PivotEngine {
|
|
|
2879
2699
|
for (let i = 0; i < rLen; i++) {
|
|
2880
2700
|
if (filterElement.name === rows[i].name && valueFields[filterElement.measure] && !isAvail) {
|
|
2881
2701
|
isAvail = true;
|
|
2882
|
-
rowFilteredData = this.applyValueFiltering(rows[i], i, rowHeaders, (this.columnGrandTotal ? this.columnGrandTotal : columnHeaders[columnHeaders.length - 1]), valueFilters, this.valueFilteredData, 'row');
|
|
2702
|
+
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');
|
|
2883
2703
|
break;
|
|
2884
2704
|
}
|
|
2885
2705
|
}
|
|
2886
2706
|
for (let j = 0; j < cLen; j++) {
|
|
2887
2707
|
if (filterElement.name === columns[j].name && valueFields[filterElement.measure] && !isAvail) {
|
|
2888
2708
|
isAvail = true;
|
|
2889
|
-
columnFilteredData = this.applyValueFiltering(columns[j], j, columnHeaders, (this.rowGrandTotal ? this.rowGrandTotal : rowHeaders[rowHeaders.length - 1]), valueFilters, this.valueFilteredData, 'column');
|
|
2709
|
+
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');
|
|
2890
2710
|
break;
|
|
2891
2711
|
}
|
|
2892
2712
|
}
|
|
@@ -3191,7 +3011,7 @@ class PivotEngine {
|
|
|
3191
3011
|
}
|
|
3192
3012
|
let engine = this;
|
|
3193
3013
|
return headers.filter((item) => {
|
|
3194
|
-
return item.members.length > 0
|
|
3014
|
+
return (item.members.length > 0 || item.type === 'grand sum') ? true : engine.matchIndexes(item.indexObject, filterObjects);
|
|
3195
3015
|
});
|
|
3196
3016
|
}
|
|
3197
3017
|
matchIndexes(index, filterObjects) {
|
|
@@ -3264,6 +3084,14 @@ class PivotEngine {
|
|
|
3264
3084
|
}
|
|
3265
3085
|
/* eslint-enable */
|
|
3266
3086
|
rawHeaders = this.getSortedHeaders(rawHeaders.concat(excessHeaders), this.fieldList[headersInfo.fields[0].name].sort).concat(grandHeader);
|
|
3087
|
+
if (headersInfo.axis === 'row') {
|
|
3088
|
+
this.cMembers = this.getIndexedHeaders(this.columns, this.data, 0, this.filterMembers, 'column', '');
|
|
3089
|
+
this.insertAllMember(this.cMembers, this.filterMembers, '', 'column');
|
|
3090
|
+
}
|
|
3091
|
+
else {
|
|
3092
|
+
this.rMembers = this.getIndexedHeaders(this.rows, this.data, 0, this.filterMembers, 'row', '');
|
|
3093
|
+
this.insertAllMember(this.rMembers, this.filterMembers, '', 'row');
|
|
3094
|
+
}
|
|
3267
3095
|
}
|
|
3268
3096
|
if (headersInfo.axis === 'row') {
|
|
3269
3097
|
this.rowCount = 0;
|
|
@@ -3408,8 +3236,8 @@ class PivotEngine {
|
|
|
3408
3236
|
}
|
|
3409
3237
|
}
|
|
3410
3238
|
if (stringValue.length > 0) {
|
|
3411
|
-
stringValue = childrens.sort === 'Ascending' ? (stringValue.sort((a, b) => (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0))) :
|
|
3412
|
-
childrens.sort === 'Descending' ? (stringValue.sort((a, b) => (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0))) : stringValue;
|
|
3239
|
+
stringValue = childrens.sort === 'Ascending' ? (stringValue.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0)))) :
|
|
3240
|
+
childrens.sort === 'Descending' ? (stringValue.sort((a, b) => (a.actualText === 'Grand Total' || b.actualText === 'Grand Total') ? 0 : ((a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0)))) : stringValue;
|
|
3413
3241
|
}
|
|
3414
3242
|
if (alphaNumbervalue.length > 0) {
|
|
3415
3243
|
alphaNumbervalue = childrens.sort === 'Ascending' ?
|
|
@@ -3422,9 +3250,9 @@ class PivotEngine {
|
|
|
3422
3250
|
}
|
|
3423
3251
|
else {
|
|
3424
3252
|
return sortOrder === 'Ascending' ?
|
|
3425
|
-
(headers.sort(function (a, b) { return (a.actualText > b.actualText) ? 1 : ((b.actualText > a.actualText) ? -1 : 0); })) :
|
|
3253
|
+
(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)); })) :
|
|
3426
3254
|
sortOrder === 'Descending' ?
|
|
3427
|
-
(headers.sort(function (a, b) { return (a.actualText < b.actualText) ? 1 : ((b.actualText < a.actualText) ? -1 : 0); })) :
|
|
3255
|
+
(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)); })) :
|
|
3428
3256
|
headers;
|
|
3429
3257
|
}
|
|
3430
3258
|
}
|
|
@@ -3444,7 +3272,8 @@ class PivotEngine {
|
|
|
3444
3272
|
this.valueSortHeaderText = undefined;
|
|
3445
3273
|
if (this.enableValueSorting && this.valueSortSettings.headerText && !this.valueSortHeaderText &&
|
|
3446
3274
|
this.valueSortSettings.headerText !== '' && this.values.length > 0) {
|
|
3447
|
-
|
|
3275
|
+
this.valueSortHeaderText = this.valueSortSettings.headerText;
|
|
3276
|
+
let textArray = this.valueSortHeaderText.split(this.valueSortSettings.headerDelimiter);
|
|
3448
3277
|
for (let field of this.values) {
|
|
3449
3278
|
let name = field.caption ? field.caption : field.name;
|
|
3450
3279
|
let valueIndex = textArray.indexOf(name);
|
|
@@ -4086,6 +3915,7 @@ class PivotEngine {
|
|
|
4086
3915
|
let summCell = headers[headers.length - 1];
|
|
4087
3916
|
if (summCell && summCell.type === 'grand sum') {
|
|
4088
3917
|
summCell.index = this.filterMembers;
|
|
3918
|
+
summCell.indexObject = {};
|
|
4089
3919
|
/* eslint-disable */
|
|
4090
3920
|
for (let ln = 0, lt = this.filterMembers.length; ln < lt; ln++) {
|
|
4091
3921
|
summCell.indexObject[this.filterMembers[ln]] = this.filterMembers[ln];
|
|
@@ -4227,7 +4057,7 @@ class PivotEngine {
|
|
|
4227
4057
|
insertAllMember(set, filter, customText, axis) {
|
|
4228
4058
|
let len = set.length;
|
|
4229
4059
|
customText = ' Total';
|
|
4230
|
-
|
|
4060
|
+
let grandTotalSet = {
|
|
4231
4061
|
hasChild: false,
|
|
4232
4062
|
index: filter,
|
|
4233
4063
|
level: 0,
|
|
@@ -4241,13 +4071,14 @@ class PivotEngine {
|
|
|
4241
4071
|
type: 'grand sum',
|
|
4242
4072
|
valueSort: {}
|
|
4243
4073
|
};
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4074
|
+
grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
|
|
4075
|
+
grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
|
|
4076
|
+
grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
|
|
4077
|
+
grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
|
|
4248
4078
|
for (let ln = 0, lt = filter.length; ln < lt; ln++) {
|
|
4249
|
-
|
|
4079
|
+
grandTotalSet.indexObject[filter[ln]] = filter[ln];
|
|
4250
4080
|
}
|
|
4081
|
+
(this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
|
|
4251
4082
|
// if (axis === 'row') {
|
|
4252
4083
|
// this.rowCount += this.rowValuesLength;
|
|
4253
4084
|
// } else {
|
|
@@ -4266,10 +4097,11 @@ class PivotEngine {
|
|
|
4266
4097
|
row.colIndex = 0;
|
|
4267
4098
|
row.rowIndex = tnum;
|
|
4268
4099
|
let isRowFieldsAvail = false;
|
|
4100
|
+
let delimiter = this.dataSourceSettings.valueSortSettings.headerDelimiter;
|
|
4269
4101
|
if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && this.dataSourceSettings.values.length > 1) {
|
|
4270
4102
|
this.rowIndex = (isNullOrUndefined(this.rowIndex) && !isLeastNode && this.dataSourceSettings.rows.length === 0) ? row.index : this.rowIndex;
|
|
4271
|
-
isRowFieldsAvail = (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total
|
|
4272
|
-
if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total
|
|
4103
|
+
isRowFieldsAvail = (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName && row.valueSort.levelName.toString().indexOf('Grand Total' + delimiter) !== 0);
|
|
4104
|
+
if (this.valueAxis && this.dataSourceSettings.rows.length === 0 && row.valueSort.levelName.toString().indexOf('Grand Total' + delimiter) === 0) {
|
|
4273
4105
|
row.index = this.rowIndex;
|
|
4274
4106
|
}
|
|
4275
4107
|
}
|
|
@@ -4294,7 +4126,7 @@ class PivotEngine {
|
|
|
4294
4126
|
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4295
4127
|
if (!isValueIndexFound) {
|
|
4296
4128
|
for (vln = 0; vln < vlt; vln++) {
|
|
4297
|
-
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().
|
|
4129
|
+
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
4298
4130
|
isValueIndexFound = true;
|
|
4299
4131
|
isValueCellUpdated = true;
|
|
4300
4132
|
break;
|
|
@@ -4329,7 +4161,7 @@ class PivotEngine {
|
|
|
4329
4161
|
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4330
4162
|
for (let vln = 0; vln < vlt; vln++) {
|
|
4331
4163
|
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
4332
|
-
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().
|
|
4164
|
+
if (columns[cln].valueSort.uniqueName && columns[cln].valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
4333
4165
|
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4334
4166
|
dln = data[tnum].length;
|
|
4335
4167
|
}
|
|
@@ -5249,6 +5081,10 @@ class PivotEngine {
|
|
|
5249
5081
|
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
5250
5082
|
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
|
|
5251
5083
|
}
|
|
5084
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
5085
|
+
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(0, 1), vcnt, -1);
|
|
5086
|
+
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(1, axis.length), vcnt, 0);
|
|
5087
|
+
}
|
|
5252
5088
|
else {
|
|
5253
5089
|
let hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
|
|
5254
5090
|
this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
|
|
@@ -5288,6 +5124,10 @@ class PivotEngine {
|
|
|
5288
5124
|
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(0, this.rMembers.length - 1), this.values.length, 0);
|
|
5289
5125
|
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
|
|
5290
5126
|
}
|
|
5127
|
+
else if (this.grandTotalsPosition === 'Top' && this.showGrandTotals && this.measureIndex === 0) {
|
|
5128
|
+
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(0, 1), this.values.length, -1);
|
|
5129
|
+
this.updateValueMembers(this.measureIndex == 0 && this.rMembers.length > 1, null, null, rowAxis, this.rMembers.slice(1, this.rMembers.length), this.values.length, 0);
|
|
5130
|
+
}
|
|
5291
5131
|
else {
|
|
5292
5132
|
let hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
|
|
5293
5133
|
this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
|
|
@@ -5891,6 +5731,12 @@ const fieldDragStart = 'fieldDragStart';
|
|
|
5891
5731
|
const chartPointClick = 'chartPointClick';
|
|
5892
5732
|
/** @hidden */
|
|
5893
5733
|
const beforeServiceInvoke = 'beforeServiceInvoke';
|
|
5734
|
+
/** @hidden */
|
|
5735
|
+
const actionBegin = 'actionBegin';
|
|
5736
|
+
/** @hidden */
|
|
5737
|
+
const actionComplete = 'actionComplete';
|
|
5738
|
+
/** @hidden */
|
|
5739
|
+
const actionFailure = 'actionFailure';
|
|
5894
5740
|
/**
|
|
5895
5741
|
* Specifies pivot internal events
|
|
5896
5742
|
*/
|
|
@@ -5920,6 +5766,186 @@ const initToolbar = 'init-toolbar';
|
|
|
5920
5766
|
const initFormatting = 'init-formatting';
|
|
5921
5767
|
/** @hidden */
|
|
5922
5768
|
const initGrouping = 'init-grouping';
|
|
5769
|
+
/**
|
|
5770
|
+
* Specifies action names of actionBegin events
|
|
5771
|
+
*/
|
|
5772
|
+
/** @hidden */
|
|
5773
|
+
const sortValue = 'Sort value';
|
|
5774
|
+
/** @hidden */
|
|
5775
|
+
const drillUp = 'Drill up';
|
|
5776
|
+
/** @hidden */
|
|
5777
|
+
const drillDown = 'Drill down';
|
|
5778
|
+
/** @hidden */
|
|
5779
|
+
const addNewReport = 'Add new report';
|
|
5780
|
+
/** @hidden */
|
|
5781
|
+
const saveCurrentReport = 'Save current report';
|
|
5782
|
+
/** @hidden */
|
|
5783
|
+
const saveAsCurrentReport = 'Save as current report';
|
|
5784
|
+
/** @hidden */
|
|
5785
|
+
const renameCurrentReport = 'Rename current report';
|
|
5786
|
+
/** @hidden */
|
|
5787
|
+
const removeCurrentReport = 'Remove current report';
|
|
5788
|
+
/** @hidden */
|
|
5789
|
+
const loadReports = 'Load report';
|
|
5790
|
+
/** @hidden */
|
|
5791
|
+
const openConditionalFormatting = 'Open conditional formatting dialog';
|
|
5792
|
+
/** @hidden */
|
|
5793
|
+
const openNumberFormatting = 'Open number formatting dialog';
|
|
5794
|
+
/** @hidden */
|
|
5795
|
+
const MdxQuery = 'MdxQuery';
|
|
5796
|
+
/** @hidden */
|
|
5797
|
+
const showFieldList = 'Open field list';
|
|
5798
|
+
/** @hidden */
|
|
5799
|
+
const tableView = 'Show table view';
|
|
5800
|
+
/** @hidden */
|
|
5801
|
+
const chartView = 'Show chart view';
|
|
5802
|
+
/** @hidden */
|
|
5803
|
+
const multipleAxis = 'Multiple Axis';
|
|
5804
|
+
/** @hidden */
|
|
5805
|
+
const showLegend = 'Show legend';
|
|
5806
|
+
/** @hidden */
|
|
5807
|
+
const pdfExport = 'PDF export';
|
|
5808
|
+
/** @hidden */
|
|
5809
|
+
const pngExport = 'PNG export';
|
|
5810
|
+
/** @hidden */
|
|
5811
|
+
const excelExport = 'Excel export';
|
|
5812
|
+
/** @hidden */
|
|
5813
|
+
const csvExport = 'CSV export';
|
|
5814
|
+
/** @hidden */
|
|
5815
|
+
const jpegExport = 'JPEG export';
|
|
5816
|
+
/** @hidden */
|
|
5817
|
+
const svgExport = 'SVG export';
|
|
5818
|
+
/** @hidden */
|
|
5819
|
+
const hideSubTotals = 'Hide sub-totals';
|
|
5820
|
+
/** @hidden */
|
|
5821
|
+
const subTotalsRow = 'Show row sub-totals';
|
|
5822
|
+
/** @hidden */
|
|
5823
|
+
const subTotalsColumn = 'Show column sub-totals';
|
|
5824
|
+
/** @hidden */
|
|
5825
|
+
const showSubTotals = 'Show sub-totals';
|
|
5826
|
+
/** @hidden */
|
|
5827
|
+
const hideGrandTotals = 'Hide grand totals';
|
|
5828
|
+
/** @hidden */
|
|
5829
|
+
const grandTotalsRow = 'Show row grand totals';
|
|
5830
|
+
/** @hidden */
|
|
5831
|
+
const grandTotalsColumn = 'Show column grand totals';
|
|
5832
|
+
/** @hidden */
|
|
5833
|
+
const showGrandTotals = 'Show grand totals';
|
|
5834
|
+
/** @hidden */
|
|
5835
|
+
const numberFormattingMenu = 'Number Formatting menu';
|
|
5836
|
+
/** @hidden */
|
|
5837
|
+
const conditionalFormattingMenu = 'Conditional Formatting menu';
|
|
5838
|
+
/** @hidden */
|
|
5839
|
+
const reportChange = 'Report change';
|
|
5840
|
+
/** @hidden */
|
|
5841
|
+
const sortFieldTree = 'Sort field tree';
|
|
5842
|
+
/** @hidden */
|
|
5843
|
+
const editCalculatedField = 'Edit calculated field';
|
|
5844
|
+
/** @hidden */
|
|
5845
|
+
const sortField = 'Sort field';
|
|
5846
|
+
/** @hidden */
|
|
5847
|
+
const filterField = 'Filter field';
|
|
5848
|
+
/** @hidden */
|
|
5849
|
+
const removeField = 'Remove field';
|
|
5850
|
+
/** @hidden */
|
|
5851
|
+
const openCalculatedField = 'Open calculated field dialog';
|
|
5852
|
+
/** @hidden */
|
|
5853
|
+
const editRecord = 'Edit record';
|
|
5854
|
+
/** @hidden */
|
|
5855
|
+
const saveEditedRecords = 'Save edited records';
|
|
5856
|
+
/** @hidden */
|
|
5857
|
+
const addNewRecord = 'Add new record';
|
|
5858
|
+
/** @hidden */
|
|
5859
|
+
const removeRecord = 'Remove record';
|
|
5860
|
+
/** @hidden */
|
|
5861
|
+
const aggregateField = 'Aggregate field';
|
|
5862
|
+
/** @hidden */
|
|
5863
|
+
const contextMenuCalculatedField = 'CalculatedField Context menu';
|
|
5864
|
+
/** @hidden */
|
|
5865
|
+
const windowResize = 'Window resize';
|
|
5866
|
+
/**
|
|
5867
|
+
* Specifies action names of actionComplete events
|
|
5868
|
+
*/
|
|
5869
|
+
/** @hidden */
|
|
5870
|
+
const calculatedFieldApplied = 'Calculated field applied';
|
|
5871
|
+
/** @hidden */
|
|
5872
|
+
const editedRecordsSaved = 'Edited records saved';
|
|
5873
|
+
/** @hidden */
|
|
5874
|
+
const newRecordAdded = 'New record added';
|
|
5875
|
+
/** @hidden */
|
|
5876
|
+
const recordRemoved = 'Record removed';
|
|
5877
|
+
/** @hidden */
|
|
5878
|
+
const closeFieldlist = 'Field list closed';
|
|
5879
|
+
/** @hidden */
|
|
5880
|
+
const fieldTreeSorted = 'Field tree sorted';
|
|
5881
|
+
/** @hidden */
|
|
5882
|
+
const reportSaved = 'Report saved';
|
|
5883
|
+
/** @hidden */
|
|
5884
|
+
const newReportAdded = 'New report added';
|
|
5885
|
+
/** @hidden */
|
|
5886
|
+
const reportReSaved = 'Report re-saved';
|
|
5887
|
+
/** @hidden */
|
|
5888
|
+
const reportRenamed = 'Report renamed';
|
|
5889
|
+
/** @hidden */
|
|
5890
|
+
const reportRemoved = 'Report removed';
|
|
5891
|
+
/** @hidden */
|
|
5892
|
+
const excelExported = 'Excel exported';
|
|
5893
|
+
/** @hidden */
|
|
5894
|
+
const csvExported = 'CSV exported';
|
|
5895
|
+
/** @hidden */
|
|
5896
|
+
const pdfExported = 'PDF exported';
|
|
5897
|
+
/** @hidden */
|
|
5898
|
+
const pngExported = 'PNG exported';
|
|
5899
|
+
/** @hidden */
|
|
5900
|
+
const jpegExported = 'JPEG exported';
|
|
5901
|
+
/** @hidden */
|
|
5902
|
+
const svgExported = 'SVG exported';
|
|
5903
|
+
/** @hidden */
|
|
5904
|
+
const conditionallyFormatted = 'Conditional formatting applied';
|
|
5905
|
+
/** @hidden */
|
|
5906
|
+
const numberFormatted = 'Number formatting applied';
|
|
5907
|
+
/** @hidden */
|
|
5908
|
+
const tableViewed = 'Table view shown';
|
|
5909
|
+
/** @hidden */
|
|
5910
|
+
const chartViewed = 'Chart view shown';
|
|
5911
|
+
/** @hidden */
|
|
5912
|
+
const subTotalsHidden = 'Sub-totals hidden';
|
|
5913
|
+
/** @hidden */
|
|
5914
|
+
const subTotalsRowShown = 'Row sub-totals shown';
|
|
5915
|
+
/** @hidden */
|
|
5916
|
+
const subTotalsColumnShown = 'Column sub-totals shown';
|
|
5917
|
+
/** @hidden */
|
|
5918
|
+
const subTotalsShown = 'Sub-totals shown';
|
|
5919
|
+
/** @hidden */
|
|
5920
|
+
const grandTotalsHidden = 'Grand totals hidden';
|
|
5921
|
+
/** @hidden */
|
|
5922
|
+
const grandTotalsRowShown = 'Row grand totals shown';
|
|
5923
|
+
/** @hidden */
|
|
5924
|
+
const grandTotalsColumnShown = 'Column grand totals shown';
|
|
5925
|
+
/** @hidden */
|
|
5926
|
+
const grandTotalsShown = 'Grand totals shown';
|
|
5927
|
+
/** @hidden */
|
|
5928
|
+
const valueSorted = 'Value sorted';
|
|
5929
|
+
/** @hidden */
|
|
5930
|
+
const calculatedFieldEdited = 'Calculated field edited';
|
|
5931
|
+
/** @hidden */
|
|
5932
|
+
const fieldSorted = 'Field sorted';
|
|
5933
|
+
/** @hidden */
|
|
5934
|
+
const fieldFiltered = 'Field filtered';
|
|
5935
|
+
/** @hidden */
|
|
5936
|
+
const fieldRemoved = 'Field removed';
|
|
5937
|
+
/** @hidden */
|
|
5938
|
+
const fieldAggregated = 'Field aggregated';
|
|
5939
|
+
/** @hidden */
|
|
5940
|
+
const recordEdited = 'Record edited';
|
|
5941
|
+
/** @hidden */
|
|
5942
|
+
const reportChanged = 'Report changed';
|
|
5943
|
+
/** @hidden */
|
|
5944
|
+
const windowResized = 'Window resized';
|
|
5945
|
+
/** @hidden */
|
|
5946
|
+
const recordUpdated = 'Records updated';
|
|
5947
|
+
/** @hidden */
|
|
5948
|
+
const drillThroughClosed = 'Drill-through closed';
|
|
5923
5949
|
|
|
5924
5950
|
/**
|
|
5925
5951
|
* CSS Constants
|
|
@@ -6593,6 +6619,8 @@ const PIVOTCHART_TYPE_DIALOG = 'e-pivotchart-type-dialog';
|
|
|
6593
6619
|
const FORMAT_FONT_COLOR_PICKER = 'e-format-font-color-picker';
|
|
6594
6620
|
/** @hidden */
|
|
6595
6621
|
const GROUP_PIVOT_ROW = 'e-group-pivot-rows';
|
|
6622
|
+
/** @hidden */
|
|
6623
|
+
const TOOLBAR_MENU = 'e-pivot-toolbar-menu';
|
|
6596
6624
|
|
|
6597
6625
|
/**
|
|
6598
6626
|
* `AggregateMenu` module to create aggregate type popup.
|
|
@@ -6621,28 +6649,39 @@ class AggregateMenu {
|
|
|
6621
6649
|
}
|
|
6622
6650
|
openContextMenu(args) {
|
|
6623
6651
|
let fieldName = args.target.parentElement.id;
|
|
6652
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
6624
6653
|
this.buttonElement = args.target.parentElement;
|
|
6625
6654
|
let isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
|
|
6626
6655
|
this.summaryTypes = [...this.getMenuItem(isStringField)];
|
|
6656
|
+
this.parent.actionObj.actionName = aggregateField;
|
|
6657
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
6658
|
+
if (this.parent.actionBeginMethod()) {
|
|
6659
|
+
return;
|
|
6660
|
+
}
|
|
6627
6661
|
let eventArgs = {
|
|
6628
6662
|
cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
|
|
6629
6663
|
};
|
|
6630
6664
|
let control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
|
|
6631
6665
|
this.parent.pivotGridModule : this.parent;
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6666
|
+
try {
|
|
6667
|
+
control.trigger(aggregateMenuOpen, eventArgs, (observedArgs) => {
|
|
6668
|
+
if (!observedArgs.cancel) {
|
|
6669
|
+
this.summaryTypes = observedArgs.aggregateTypes;
|
|
6670
|
+
this.createContextMenu(isStringField, observedArgs.displayMenuCount);
|
|
6671
|
+
this.currentMenu = args.target;
|
|
6672
|
+
let pos = this.currentMenu.getBoundingClientRect();
|
|
6673
|
+
if (this.parent.enableRtl) {
|
|
6674
|
+
this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left - 105);
|
|
6675
|
+
}
|
|
6676
|
+
else {
|
|
6677
|
+
this.menuInfo[isStringField].open(pos.top + (window.scrollY || document.documentElement.scrollTop), pos.left);
|
|
6678
|
+
}
|
|
6643
6679
|
}
|
|
6644
|
-
}
|
|
6645
|
-
}
|
|
6680
|
+
});
|
|
6681
|
+
}
|
|
6682
|
+
catch (execption) {
|
|
6683
|
+
this.parent.actionFailureMethod(execption);
|
|
6684
|
+
}
|
|
6646
6685
|
}
|
|
6647
6686
|
createContextMenu(isStringField, displayMenuCount) {
|
|
6648
6687
|
let menuItems = [];
|
|
@@ -6916,31 +6955,42 @@ class AggregateMenu {
|
|
|
6916
6955
|
selectOptionInContextMenu(menu) {
|
|
6917
6956
|
if (menu.item.text !== null) {
|
|
6918
6957
|
let buttonElement = this.currentMenu.parentElement;
|
|
6919
|
-
let
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6958
|
+
let fieldInfo = PivotUtil.getFieldInfo((buttonElement ? buttonElement.id : ''), this.parent);
|
|
6959
|
+
this.parent.actionObj.actionName = aggregateField;
|
|
6960
|
+
this.parent.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
6961
|
+
if (this.parent.actionBeginMethod()) {
|
|
6962
|
+
return;
|
|
6923
6963
|
}
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
this.parent.
|
|
6964
|
+
let type = menu.item.id.split('_').pop();
|
|
6965
|
+
try {
|
|
6966
|
+
if (type === 'MoreOption' || type === 'PercentageOfDifferenceFrom'
|
|
6967
|
+
|| type === 'PercentageOfParentTotal' || type === 'DifferenceFrom') {
|
|
6968
|
+
this.createValueSettingsDialog(buttonElement, this.parentElement, type);
|
|
6969
|
+
}
|
|
6970
|
+
else {
|
|
6971
|
+
let field = buttonElement.getAttribute('data-uid');
|
|
6972
|
+
let valuefields = this.parent.dataSourceSettings.values;
|
|
6973
|
+
let contentElement = buttonElement.querySelector('.e-content');
|
|
6974
|
+
let captionName = menu.item.text + ' ' + this.parent.localeObj.getConstant('of') + ' ' +
|
|
6975
|
+
this.parent.engineModule.fieldList[field].caption;
|
|
6976
|
+
contentElement.innerHTML = captionName;
|
|
6977
|
+
contentElement.setAttribute('title', captionName);
|
|
6978
|
+
buttonElement.setAttribute('data-type', type);
|
|
6979
|
+
for (let vCnt = 0; vCnt < this.parent.dataSourceSettings.values.length; vCnt++) {
|
|
6980
|
+
if (this.parent.dataSourceSettings.values[vCnt].name === field) {
|
|
6981
|
+
let dataSourceItem = extend({}, valuefields[vCnt].properties ?
|
|
6982
|
+
valuefields[vCnt].properties : valuefields[vCnt], null, true);
|
|
6983
|
+
dataSourceItem.type = type;
|
|
6984
|
+
this.parent.engineModule.fieldList[field].aggregateType = type;
|
|
6985
|
+
valuefields.splice(vCnt, 1, dataSourceItem);
|
|
6986
|
+
this.parent.lastAggregationInfo = dataSourceItem;
|
|
6987
|
+
}
|
|
6941
6988
|
}
|
|
6989
|
+
this.updateDataSource();
|
|
6942
6990
|
}
|
|
6943
|
-
|
|
6991
|
+
}
|
|
6992
|
+
catch (execption) {
|
|
6993
|
+
this.parent.actionFailureMethod(execption);
|
|
6944
6994
|
}
|
|
6945
6995
|
}
|
|
6946
6996
|
}
|
|
@@ -7056,13 +7106,16 @@ class Render {
|
|
|
7056
7106
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7057
7107
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7058
7108
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
7059
|
-
this.gridSettings = parent.gridSettings;
|
|
7109
|
+
this.gridSettings = this.parent.gridSettings;
|
|
7060
7110
|
this.formatList = this.getFormatList();
|
|
7061
7111
|
this.aggMenu = new AggregateMenu(this.parent);
|
|
7062
7112
|
}
|
|
7063
7113
|
/* eslint-disable-next-line */
|
|
7064
7114
|
/** @hidden */
|
|
7065
|
-
render() {
|
|
7115
|
+
render(refreshRequired) {
|
|
7116
|
+
if (refreshRequired) {
|
|
7117
|
+
this.initProperties();
|
|
7118
|
+
}
|
|
7066
7119
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7067
7120
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7068
7121
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
@@ -7126,6 +7179,30 @@ class Render {
|
|
|
7126
7179
|
}
|
|
7127
7180
|
this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
|
|
7128
7181
|
}
|
|
7182
|
+
initProperties() {
|
|
7183
|
+
this.rowStartPos = undefined;
|
|
7184
|
+
this.maxIndent = undefined;
|
|
7185
|
+
this.resColWidth = undefined;
|
|
7186
|
+
this.isOverflows = undefined;
|
|
7187
|
+
this.indentCollection = {};
|
|
7188
|
+
this.formatList = undefined;
|
|
7189
|
+
this.colPos = 0;
|
|
7190
|
+
this.colGrandPos = undefined;
|
|
7191
|
+
this.rowGrandPos = undefined;
|
|
7192
|
+
this.lastSpan = 0;
|
|
7193
|
+
this.field = undefined;
|
|
7194
|
+
this.fieldCaption = undefined;
|
|
7195
|
+
this.lvlCollection = {};
|
|
7196
|
+
this.hierarchyCollection = {};
|
|
7197
|
+
this.lvlPosCollection = {};
|
|
7198
|
+
this.hierarchyPosCollection = {};
|
|
7199
|
+
this.position = 0;
|
|
7200
|
+
this.measurePos = 0;
|
|
7201
|
+
this.maxMeasurePos = 0;
|
|
7202
|
+
this.hierarchyCount = 0;
|
|
7203
|
+
this.actualText = '';
|
|
7204
|
+
this.timeOutObj = undefined;
|
|
7205
|
+
}
|
|
7129
7206
|
refreshHeader() {
|
|
7130
7207
|
if (this.parent.enableVirtualization) {
|
|
7131
7208
|
let mHdr = this.parent.element.querySelector('.' + MOVABLEHEADER_DIV);
|
|
@@ -7326,9 +7403,9 @@ class Render {
|
|
|
7326
7403
|
this.parent.renderReactTemplates(); /* eslint-disable-line */
|
|
7327
7404
|
}
|
|
7328
7405
|
if (this.parent.isInitial) {
|
|
7406
|
+
this.parent.isInitial = false;
|
|
7329
7407
|
this.parent.refreshData();
|
|
7330
7408
|
}
|
|
7331
|
-
this.parent.isInitial = false;
|
|
7332
7409
|
this.parent.notify(contentReady, {});
|
|
7333
7410
|
}
|
|
7334
7411
|
setFocusOnLastCell() {
|
|
@@ -8132,7 +8209,7 @@ class Render {
|
|
|
8132
8209
|
if (cell.isSum) {
|
|
8133
8210
|
tCell.classList.add(SUMMARY);
|
|
8134
8211
|
}
|
|
8135
|
-
let isGrandSum = (isNullOrUndefined(cell.isGrandSum) && this.parent.
|
|
8212
|
+
let isGrandSum = (isNullOrUndefined(cell.isGrandSum) && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'column') && this.parent.dataType === 'olap' &&
|
|
8136
8213
|
((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
|
|
8137
8214
|
if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
|
|
8138
8215
|
tCell.classList.add('e-gtot');
|
|
@@ -8273,6 +8350,12 @@ class Render {
|
|
|
8273
8350
|
}
|
|
8274
8351
|
lvlPos++;
|
|
8275
8352
|
}
|
|
8353
|
+
if (this.parent.dataSourceSettings.grandTotalsPosition === 'Top' && (!isNullOrUndefined(this.parent.olapEngineModule) && this.parent.olapEngineModule.olapValueAxis === 'row') && this.parent.dataType === 'olap' &&
|
|
8354
|
+
(cell.valueSort.levelName.toString()).indexOf(this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter) === 0) {
|
|
8355
|
+
tCell.appendChild(createElement('span', {
|
|
8356
|
+
className: NEXTSPAN,
|
|
8357
|
+
}));
|
|
8358
|
+
}
|
|
8276
8359
|
if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
|
|
8277
8360
|
tCell.appendChild(createElement('span', {
|
|
8278
8361
|
className: NEXTSPAN,
|
|
@@ -8584,8 +8667,8 @@ class Render {
|
|
|
8584
8667
|
if (this.parent.currentView !== 'Chart') {
|
|
8585
8668
|
if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
|
|
8586
8669
|
let rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
|
|
8587
|
-
let gBarHeight = rowColHeight + (this.parent.element.querySelector('.' +
|
|
8588
|
-
this.parent.element.querySelector('.' +
|
|
8670
|
+
let gBarHeight = rowColHeight + (this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS) ?
|
|
8671
|
+
this.parent.element.querySelector('.' + GRID_GROUPING_BAR_CLASS).offsetHeight : 0);
|
|
8589
8672
|
let toolBarHeight = this.parent.element.querySelector('.' + GRID_TOOLBAR) ? 42 : 0;
|
|
8590
8673
|
gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
|
|
8591
8674
|
gridHeight = gridHeight < 40 ? 40 : gridHeight;
|
|
@@ -8797,7 +8880,7 @@ class Render {
|
|
|
8797
8880
|
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(this.parent.engineModule.fieldList[cellInfo.value.toString()].aggregateType)
|
|
8798
8881
|
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + cellInfo.value.toString();
|
|
8799
8882
|
}
|
|
8800
|
-
else if (values.length === 1) {
|
|
8883
|
+
else if (values.length === 1 && this.parent.dataSourceSettings.rows.length === 0) {
|
|
8801
8884
|
return this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values[values.length - 1].type)
|
|
8802
8885
|
+ ' ' + this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values[values.length - 1].caption) ? values[values.length - 1].caption : values[values.length - 1].name);
|
|
8803
8886
|
}
|
|
@@ -8819,7 +8902,9 @@ class Render {
|
|
|
8819
8902
|
}
|
|
8820
8903
|
/* eslint-disable */
|
|
8821
8904
|
excelColumnEvent(args) {
|
|
8822
|
-
(
|
|
8905
|
+
if (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column') {
|
|
8906
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
8907
|
+
}
|
|
8823
8908
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
8824
8909
|
this.parent.lastColumn = args.gridCell.column;
|
|
8825
8910
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -8828,7 +8913,9 @@ class Render {
|
|
|
8828
8913
|
this.parent.trigger(excelHeaderQueryCellInfo, args);
|
|
8829
8914
|
}
|
|
8830
8915
|
pdfColumnEvent(args) {
|
|
8831
|
-
(
|
|
8916
|
+
if (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column') {
|
|
8917
|
+
(args.cell).value = this.getValidHeader(args, 'column');
|
|
8918
|
+
}
|
|
8832
8919
|
if (args.gridCell !== undefined && args.gridCell.column.width === 'auto') {
|
|
8833
8920
|
this.parent.lastColumn = args.gridCell.column;
|
|
8834
8921
|
args.gridCell.column.width = args.gridCell.column.minWidth;
|
|
@@ -8869,7 +8956,9 @@ class Render {
|
|
|
8869
8956
|
}
|
|
8870
8957
|
}
|
|
8871
8958
|
args = this.exportContentEvent(args);
|
|
8872
|
-
|
|
8959
|
+
if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row') {
|
|
8960
|
+
args.value = args.column.field === '0.formattedText' ? this.getValidHeader(args, 'row') : args.value;
|
|
8961
|
+
}
|
|
8873
8962
|
this.parent.trigger(excelQueryCellInfo, args);
|
|
8874
8963
|
}
|
|
8875
8964
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -8893,7 +8982,9 @@ class Render {
|
|
|
8893
8982
|
}
|
|
8894
8983
|
args.style = { paragraphIndent: level * 10 };
|
|
8895
8984
|
this.lastSpan = isValueCell ? this.lastSpan : level;
|
|
8896
|
-
|
|
8985
|
+
if (this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row') {
|
|
8986
|
+
args.value = this.getValidHeader(args, 'row');
|
|
8987
|
+
}
|
|
8897
8988
|
}
|
|
8898
8989
|
this.parent.trigger(pdfQueryCellInfo, args);
|
|
8899
8990
|
}
|
|
@@ -10285,7 +10376,6 @@ class FilterDialog {
|
|
|
10285
10376
|
if (this.allowExcelLikeFilter) {
|
|
10286
10377
|
this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
|
|
10287
10378
|
}
|
|
10288
|
-
this.parent.control.pivotButtonModule.memberTreeView = this.parent.filterDialog.memberTreeView;
|
|
10289
10379
|
this.memberTreeView.nodeChecked =
|
|
10290
10380
|
this.parent.control.pivotButtonModule.nodeStateModified.bind(this.parent.control.pivotButtonModule);
|
|
10291
10381
|
this.allMemberSelect.nodeChecked =
|
|
@@ -11288,6 +11378,15 @@ class FilterDialog {
|
|
|
11288
11378
|
if (this.dropMenu && !this.dropMenu.isDestroyed) {
|
|
11289
11379
|
this.dropMenu.destroy();
|
|
11290
11380
|
}
|
|
11381
|
+
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
11382
|
+
this.memberTreeView.destroy();
|
|
11383
|
+
}
|
|
11384
|
+
if (this.allMemberSelect && !this.allMemberSelect.isDestroyed) {
|
|
11385
|
+
this.allMemberSelect.destroy();
|
|
11386
|
+
}
|
|
11387
|
+
if (this.editorSearch && !this.editorSearch.isDestroyed) {
|
|
11388
|
+
this.editorSearch.destroy();
|
|
11389
|
+
}
|
|
11291
11390
|
if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
|
|
11292
11391
|
remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
|
|
11293
11392
|
}
|
|
@@ -11296,11 +11395,23 @@ class FilterDialog {
|
|
|
11296
11395
|
removeFilterDialog() {
|
|
11297
11396
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
11298
11397
|
this.dialogPopUp.destroy();
|
|
11398
|
+
setTimeout(this.setFocus.bind(this));
|
|
11299
11399
|
}
|
|
11300
11400
|
if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
|
|
11301
11401
|
remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
|
|
11302
11402
|
}
|
|
11303
11403
|
}
|
|
11404
|
+
setFocus() {
|
|
11405
|
+
if (this.parent.control.pivotButtonModule.parentElement) {
|
|
11406
|
+
let pivotButtons = [].slice.call(this.parent.control.pivotButtonModule.parentElement.querySelectorAll('.e-pivot-button'));
|
|
11407
|
+
for (let item of pivotButtons) {
|
|
11408
|
+
if (item.getAttribute('data-uid') === this.parent.control.pivotButtonModule.fieldName) {
|
|
11409
|
+
item.focus();
|
|
11410
|
+
break;
|
|
11411
|
+
}
|
|
11412
|
+
}
|
|
11413
|
+
}
|
|
11414
|
+
}
|
|
11304
11415
|
}
|
|
11305
11416
|
|
|
11306
11417
|
/**
|
|
@@ -11932,6 +12043,9 @@ __decorate$1([
|
|
|
11932
12043
|
__decorate$1([
|
|
11933
12044
|
Property(true)
|
|
11934
12045
|
], DataSourceSettings.prototype, "showGrandTotals", void 0);
|
|
12046
|
+
__decorate$1([
|
|
12047
|
+
Property('Bottom')
|
|
12048
|
+
], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
|
|
11935
12049
|
__decorate$1([
|
|
11936
12050
|
Property(true)
|
|
11937
12051
|
], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
|
|
@@ -13150,138 +13264,155 @@ class DrillThroughDialog {
|
|
|
13150
13264
|
this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
|
|
13151
13265
|
}
|
|
13152
13266
|
let actualText = eventArgs.currentCell.actualText.toString();
|
|
13153
|
-
|
|
13154
|
-
this.parent.
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
}
|
|
13187
|
-
let count = Object.keys(this.gridIndexObjects).length;
|
|
13188
|
-
let addItems = [];
|
|
13189
|
-
let prevItems = [];
|
|
13190
|
-
let index = 0;
|
|
13191
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13192
|
-
for (let item of this.drillThroughGrid.dataSource) {
|
|
13193
|
-
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13194
|
-
for (let field of this.engine.fields) {
|
|
13195
|
-
if (isNullOrUndefined(item[field])) {
|
|
13196
|
-
delete item[field];
|
|
13197
|
-
}
|
|
13198
|
-
}
|
|
13199
|
-
delete item['__index'];
|
|
13200
|
-
addItems.push(item);
|
|
13267
|
+
try {
|
|
13268
|
+
if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
|
|
13269
|
+
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
|
|
13270
|
+
this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
|
|
13271
|
+
this.parent.actionObj.actionName = editRecord;
|
|
13272
|
+
if (this.parent.actionBeginMethod()) {
|
|
13273
|
+
return;
|
|
13274
|
+
}
|
|
13275
|
+
this.editCell(eventArgs);
|
|
13276
|
+
}
|
|
13277
|
+
else {
|
|
13278
|
+
this.removeDrillThroughDialog();
|
|
13279
|
+
let drillThroughDialog = createElement('div', {
|
|
13280
|
+
id: this.parent.element.id + '_drillthrough',
|
|
13281
|
+
className: DRILLTHROUGH_DIALOG
|
|
13282
|
+
});
|
|
13283
|
+
this.parent.element.appendChild(drillThroughDialog);
|
|
13284
|
+
this.dialogPopUp = new Dialog({
|
|
13285
|
+
animationSettings: { effect: 'Fade' },
|
|
13286
|
+
allowDragging: false,
|
|
13287
|
+
header: this.parent.localeObj.getConstant('details'),
|
|
13288
|
+
content: this.createDrillThroughGrid(eventArgs),
|
|
13289
|
+
beforeOpen: () => {
|
|
13290
|
+
this.drillThroughGrid.setProperties({
|
|
13291
|
+
dataSource: this.parent.editSettings.allowEditing ?
|
|
13292
|
+
this.dataWithPrimarykey(eventArgs) : this.gridData,
|
|
13293
|
+
height: !this.parent.editSettings.allowEditing ? 300 : 220
|
|
13294
|
+
}, false);
|
|
13295
|
+
},
|
|
13296
|
+
beforeClose: () => {
|
|
13297
|
+
if (this.parent.editSettings.allowEditing && this.isUpdated) {
|
|
13298
|
+
if (this.parent.dataSourceSettings.type === 'CSV') {
|
|
13299
|
+
this.updateData(this.drillThroughGrid.dataSource);
|
|
13201
13300
|
}
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13301
|
+
let gridIndexObjectsValue = Object.keys(this.gridIndexObjects);
|
|
13302
|
+
let previousPosition = [];
|
|
13303
|
+
for (let value of gridIndexObjectsValue) {
|
|
13304
|
+
previousPosition.push(this.gridIndexObjects[value]);
|
|
13206
13305
|
}
|
|
13207
|
-
|
|
13208
|
-
|
|
13306
|
+
let count = Object.keys(this.gridIndexObjects).length;
|
|
13307
|
+
let addItems = [];
|
|
13308
|
+
let prevItems = [];
|
|
13309
|
+
let index = 0;
|
|
13310
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13311
|
+
for (let item of this.drillThroughGrid.dataSource) {
|
|
13312
|
+
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13313
|
+
for (let field of this.engine.fields) {
|
|
13314
|
+
if (isNullOrUndefined(item[field])) {
|
|
13315
|
+
delete item[field];
|
|
13316
|
+
}
|
|
13317
|
+
}
|
|
13209
13318
|
delete item['__index'];
|
|
13319
|
+
addItems.push(item);
|
|
13210
13320
|
}
|
|
13211
|
-
if (
|
|
13212
|
-
delete this.
|
|
13321
|
+
else if (count > 0) {
|
|
13322
|
+
delete this.gridIndexObjects[item['__index'].toString()];
|
|
13323
|
+
prevItems.push(item);
|
|
13324
|
+
count--;
|
|
13213
13325
|
}
|
|
13326
|
+
if (this.parent.dataSourceSettings.mode === 'Server') {
|
|
13327
|
+
if (item['__index']) {
|
|
13328
|
+
delete item['__index'];
|
|
13329
|
+
}
|
|
13330
|
+
if (this.gridData[index]['__index']) {
|
|
13331
|
+
delete this.gridData[index]['__index'];
|
|
13332
|
+
}
|
|
13333
|
+
}
|
|
13334
|
+
index++;
|
|
13214
13335
|
}
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13336
|
+
count = 0;
|
|
13337
|
+
if (this.parent.dataSourceSettings.mode === 'Server') {
|
|
13338
|
+
let gridIndex = []; /* eslint-disable-line */
|
|
13339
|
+
let keys = Object.keys(this.gridIndexObjects);
|
|
13340
|
+
for (let len = 0; len < keys.length; len++) {
|
|
13341
|
+
delete this.parent.drillThroughValue.indexObject[this.gridIndexObjects[keys[len]]];
|
|
13342
|
+
gridIndex.push({ Key: keys[len], Value: this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
|
|
13343
|
+
}
|
|
13344
|
+
let indexObject = []; /* eslint-disable-line */
|
|
13345
|
+
keys = Object.keys(this.parent.drillThroughValue.indexObject);
|
|
13346
|
+
for (let len = 0; len < keys.length; len++) {
|
|
13347
|
+
indexObject.push({ Key: keys[len], Value: this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
|
|
13348
|
+
}
|
|
13349
|
+
this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
|
|
13229
13350
|
}
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13351
|
+
else {
|
|
13352
|
+
let items = [];
|
|
13353
|
+
let data = (this.parent.allowDataCompression && this.parent.enableVirtualization) ?
|
|
13354
|
+
this.parent.engineModule.actualData : this.parent.engineModule.data;
|
|
13355
|
+
for (let item of data) {
|
|
13356
|
+
delete item['__index'];
|
|
13357
|
+
if (this.gridIndexObjects[count.toString()] === undefined) {
|
|
13358
|
+
items.push(item);
|
|
13359
|
+
}
|
|
13360
|
+
count++;
|
|
13361
|
+
}
|
|
13362
|
+
/* eslint-enable @typescript-eslint/dot-notation */
|
|
13363
|
+
items = items.concat(addItems);
|
|
13364
|
+
let eventArgs = {
|
|
13365
|
+
currentData: this.drillThroughGrid.dataSource,
|
|
13366
|
+
previousData: this.clonedData,
|
|
13367
|
+
previousPosition: previousPosition,
|
|
13368
|
+
cancel: false
|
|
13369
|
+
};
|
|
13370
|
+
this.parent.trigger(editCompleted, eventArgs);
|
|
13371
|
+
if (!eventArgs.cancel) {
|
|
13372
|
+
this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13373
|
+
this.engine.updateGridData(this.parent.dataSourceSettings);
|
|
13374
|
+
this.parent.pivotValues = this.engine.pivotValues;
|
|
13240
13375
|
}
|
|
13241
|
-
count++;
|
|
13242
13376
|
}
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
cancel: false
|
|
13377
|
+
this.parent.actionObj.actionName = recordUpdated;
|
|
13378
|
+
let actionInfo = {
|
|
13379
|
+
editInfo: {
|
|
13380
|
+
type: this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: this.drillThroughGrid.dataSource,
|
|
13381
|
+
previousData: this.clonedData, previousPosition: previousPosition
|
|
13382
|
+
}
|
|
13250
13383
|
};
|
|
13251
|
-
this.parent.
|
|
13252
|
-
if (!eventArgs.cancel) {
|
|
13253
|
-
this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13254
|
-
this.engine.updateGridData(this.parent.dataSourceSettings);
|
|
13255
|
-
this.parent.pivotValues = this.engine.pivotValues;
|
|
13256
|
-
}
|
|
13384
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13257
13385
|
}
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
close: this.removeDrillThroughDialog.bind(this)
|
|
13272
|
-
});
|
|
13273
|
-
this.dialogPopUp.isStringTemplate = true;
|
|
13274
|
-
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13275
|
-
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13276
|
-
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13277
|
-
if (this.parent.editSettings.allowEditing) {
|
|
13278
|
-
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13279
|
-
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13280
|
-
keyConfigs: this.drillKeyConfigs,
|
|
13281
|
-
eventName: 'keydown'
|
|
13386
|
+
this.isUpdated = false;
|
|
13387
|
+
this.gridIndexObjects = {};
|
|
13388
|
+
},
|
|
13389
|
+
isModal: true,
|
|
13390
|
+
visible: true,
|
|
13391
|
+
showCloseIcon: true,
|
|
13392
|
+
locale: this.parent.locale,
|
|
13393
|
+
enableRtl: this.parent.enableRtl,
|
|
13394
|
+
width: this.parent.isAdaptive ? '100%' : '60%',
|
|
13395
|
+
position: { X: 'center', Y: 'center' },
|
|
13396
|
+
closeOnEscape: !this.parent.editSettings.allowEditing,
|
|
13397
|
+
target: document.body,
|
|
13398
|
+
close: this.removeDrillThroughDialog.bind(this)
|
|
13282
13399
|
});
|
|
13400
|
+
this.dialogPopUp.isStringTemplate = true;
|
|
13401
|
+
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13402
|
+
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13403
|
+
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13404
|
+
if (this.parent.editSettings.allowEditing) {
|
|
13405
|
+
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13406
|
+
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13407
|
+
keyConfigs: this.drillKeyConfigs,
|
|
13408
|
+
eventName: 'keydown'
|
|
13409
|
+
});
|
|
13410
|
+
}
|
|
13283
13411
|
}
|
|
13284
13412
|
}
|
|
13413
|
+
catch (execption) {
|
|
13414
|
+
this.parent.actionFailureMethod(execption);
|
|
13415
|
+
}
|
|
13285
13416
|
}
|
|
13286
13417
|
editCell(eventArgs) {
|
|
13287
13418
|
let gridResize = this.parent.gridSettings.allowResizing;
|
|
@@ -13296,6 +13427,10 @@ class DrillThroughDialog {
|
|
|
13296
13427
|
if (eventArgs.currentCell.actualText in previousData) {
|
|
13297
13428
|
currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
|
|
13298
13429
|
}
|
|
13430
|
+
let actionInfo = {
|
|
13431
|
+
editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
|
|
13432
|
+
};
|
|
13433
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13299
13434
|
this.numericTextBox = new NumericTextBox({
|
|
13300
13435
|
value: cellValue,
|
|
13301
13436
|
enableRtl: this.parent.enableRtl,
|
|
@@ -13360,6 +13495,10 @@ class DrillThroughDialog {
|
|
|
13360
13495
|
}
|
|
13361
13496
|
removeDrillThroughDialog() {
|
|
13362
13497
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
13498
|
+
this.parent.actionObj.actionName = drillThroughClosed;
|
|
13499
|
+
if (this.parent.actionObj.actionName) {
|
|
13500
|
+
this.parent.actionCompleteMethod();
|
|
13501
|
+
}
|
|
13363
13502
|
this.dialogPopUp.destroy();
|
|
13364
13503
|
}
|
|
13365
13504
|
let dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
|
|
@@ -13449,31 +13588,53 @@ class DrillThroughDialog {
|
|
|
13449
13588
|
}
|
|
13450
13589
|
if (this.parent.editSettings.allowEditing) {
|
|
13451
13590
|
Grid.Inject(Edit, Page);
|
|
13452
|
-
|
|
13453
|
-
|
|
13454
|
-
this.drillThroughGrid.
|
|
13455
|
-
|
|
13456
|
-
|
|
13591
|
+
try {
|
|
13592
|
+
this.drillThroughGrid.editSettings = this.parent.editSettings;
|
|
13593
|
+
this.drillThroughGrid.actionBegin = (args) => {
|
|
13594
|
+
let actionName = (args.requestType == 'save') ? saveEditedRecords : (args.requestType == 'add') ? addNewRecord : (args.requestType == 'delete') ? removeRecord : '';
|
|
13595
|
+
this.parent.actionObj.actionName = actionName;
|
|
13596
|
+
if (this.parent.actionObj.actionName) {
|
|
13597
|
+
if (this.parent.actionBeginMethod()) {
|
|
13598
|
+
return;
|
|
13599
|
+
}
|
|
13600
|
+
}
|
|
13601
|
+
};
|
|
13602
|
+
if (this.parent.editSettings.allowCommandColumns) {
|
|
13603
|
+
this.drillThroughGrid.editSettings.mode = 'Normal';
|
|
13604
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
|
|
13605
|
+
Grid.Inject(CommandColumn);
|
|
13606
|
+
this.drillThroughGrid.columns.push({
|
|
13607
|
+
headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
|
|
13608
|
+
commands: [
|
|
13609
|
+
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13610
|
+
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13611
|
+
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13612
|
+
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13613
|
+
]
|
|
13614
|
+
});
|
|
13615
|
+
}
|
|
13616
|
+
else {
|
|
13617
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
|
|
13618
|
+
}
|
|
13457
13619
|
this.drillThroughGrid.columns.push({
|
|
13458
|
-
|
|
13459
|
-
commands: [
|
|
13460
|
-
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13461
|
-
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13462
|
-
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13463
|
-
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13464
|
-
]
|
|
13620
|
+
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13465
13621
|
});
|
|
13466
13622
|
}
|
|
13467
|
-
|
|
13468
|
-
this.
|
|
13623
|
+
catch (execption) {
|
|
13624
|
+
this.parent.actionFailureMethod(execption);
|
|
13469
13625
|
}
|
|
13470
|
-
this.drillThroughGrid.columns.push({
|
|
13471
|
-
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13472
|
-
});
|
|
13473
13626
|
this.drillThroughGrid.actionComplete = (args) => {
|
|
13474
13627
|
if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
|
|
13475
13628
|
dialogModule.isUpdated = true;
|
|
13476
13629
|
}
|
|
13630
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
13631
|
+
let actionInfo = {
|
|
13632
|
+
editInfo: { type: this.drillThroughGrid.editSettings.mode, action: args.requestType, data: this.gridData }
|
|
13633
|
+
};
|
|
13634
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13635
|
+
if (this.parent.actionObj.actionName) {
|
|
13636
|
+
this.parent.actionCompleteMethod();
|
|
13637
|
+
}
|
|
13477
13638
|
if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
|
|
13478
13639
|
dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
|
|
13479
13640
|
!dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
|
|
@@ -13662,7 +13823,7 @@ class DrillThrough {
|
|
|
13662
13823
|
* @hidden
|
|
13663
13824
|
*/
|
|
13664
13825
|
getModuleName() {
|
|
13665
|
-
return '
|
|
13826
|
+
return 'drillThrough';
|
|
13666
13827
|
}
|
|
13667
13828
|
addInternalEvents() {
|
|
13668
13829
|
this.parent.on(contentReady, this.wireEvents, this);
|
|
@@ -13866,7 +14027,7 @@ class PivotChart {
|
|
|
13866
14027
|
* @private
|
|
13867
14028
|
*/
|
|
13868
14029
|
getModuleName() {
|
|
13869
|
-
return '
|
|
14030
|
+
return 'pivotChart';
|
|
13870
14031
|
}
|
|
13871
14032
|
/* eslint-disable */
|
|
13872
14033
|
loadChart(parent, chartSettings) {
|
|
@@ -14057,7 +14218,9 @@ class PivotChart {
|
|
|
14057
14218
|
this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
|
|
14058
14219
|
let name = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
|
|
14059
14220
|
(firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
|
|
14060
|
-
let
|
|
14221
|
+
let values = this.engineModule.fieldList[this.currentMeasure];
|
|
14222
|
+
let text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
|
|
14223
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name;
|
|
14061
14224
|
let caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
|
|
14062
14225
|
((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
|
|
14063
14226
|
let levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
|
|
@@ -14231,7 +14394,9 @@ class PivotChart {
|
|
|
14231
14394
|
this.chartSettings.palettes = currentSeries.palettes;
|
|
14232
14395
|
}
|
|
14233
14396
|
for (let i = 0; i < this.columnGroupObject[key].length; i++) {
|
|
14234
|
-
|
|
14397
|
+
let values = this.engineModule.fieldList[this.currentMeasure];
|
|
14398
|
+
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) + ' ' +
|
|
14399
|
+
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;
|
|
14235
14400
|
}
|
|
14236
14401
|
currentSeries.dataSource = this.columnGroupObject[key];
|
|
14237
14402
|
currentSeries.xName = 'x';
|
|
@@ -14387,7 +14552,7 @@ class PivotChart {
|
|
|
14387
14552
|
enableSmartLabels: this.chartSettings.enableSmartLabels,
|
|
14388
14553
|
center: this.chartSettings.pieCenter,
|
|
14389
14554
|
enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
|
|
14390
|
-
|
|
14555
|
+
highlightMode: this.chartSettings.highlightMode,
|
|
14391
14556
|
highlightPattern: this.chartSettings.highlightPattern,
|
|
14392
14557
|
titleStyle: this.chartSettings.titleStyle,
|
|
14393
14558
|
subTitle: this.chartSettings.subTitle,
|
|
@@ -14515,7 +14680,7 @@ class PivotChart {
|
|
|
14515
14680
|
this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
|
|
14516
14681
|
if (this.accumulationType.indexOf(type) > -1) {
|
|
14517
14682
|
this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
|
|
14518
|
-
this.parent.chart.
|
|
14683
|
+
this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
|
|
14519
14684
|
this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
|
|
14520
14685
|
}
|
|
14521
14686
|
else {
|
|
@@ -14622,9 +14787,14 @@ class PivotChart {
|
|
|
14622
14787
|
currentYAxis.labelFormat = currentYAxis.labelFormat ?
|
|
14623
14788
|
currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
|
|
14624
14789
|
currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
|
|
14625
|
-
currentYAxis.
|
|
14626
|
-
|
|
14627
|
-
|
|
14790
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
14791
|
+
if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
|
|
14792
|
+
this.chartSettings.chartSeries.type === 'StackingBar100') {
|
|
14793
|
+
currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
|
|
14794
|
+
}
|
|
14795
|
+
else {
|
|
14796
|
+
currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
|
|
14797
|
+
}
|
|
14628
14798
|
if (!resFormat) {
|
|
14629
14799
|
currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
|
|
14630
14800
|
}
|
|
@@ -14670,6 +14840,7 @@ class PivotChart {
|
|
|
14670
14840
|
currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
|
|
14671
14841
|
currentYAxis.rowIndex = 0;
|
|
14672
14842
|
currentYAxis.columnIndex = 0;
|
|
14843
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
14673
14844
|
if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
|
|
14674
14845
|
currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
|
|
14675
14846
|
}
|
|
@@ -14986,6 +15157,7 @@ class PivotChart {
|
|
|
14986
15157
|
}
|
|
14987
15158
|
loaded(args) {
|
|
14988
15159
|
this.parent.isChartLoaded = true;
|
|
15160
|
+
let width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
|
|
14989
15161
|
if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
|
|
14990
15162
|
this.parent.showFieldList && this.parent.currentView === 'Chart') {
|
|
14991
15163
|
this.parent.groupingBarModule.alignIcon();
|
|
@@ -14997,13 +15169,15 @@ class PivotChart {
|
|
|
14997
15169
|
this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
|
|
14998
15170
|
}
|
|
14999
15171
|
}
|
|
15000
|
-
if (
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15172
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
15173
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
|
|
15174
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
|
|
15175
|
+
}
|
|
15176
|
+
else {
|
|
15177
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
|
|
15178
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
|
|
15179
|
+
}
|
|
15180
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
|
|
15007
15181
|
}
|
|
15008
15182
|
this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
15009
15183
|
this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
@@ -15224,6 +15398,11 @@ class PivotChart {
|
|
|
15224
15398
|
offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
|
|
15225
15399
|
}
|
|
15226
15400
|
if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
|
|
15401
|
+
let isNone = false;
|
|
15402
|
+
if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
|
|
15403
|
+
isNone = true;
|
|
15404
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
|
|
15405
|
+
}
|
|
15227
15406
|
if (this.parent.showToolbar && this.parent.showGroupingBar) {
|
|
15228
15407
|
height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
|
|
15229
15408
|
this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
|
|
@@ -15241,6 +15420,9 @@ class PivotChart {
|
|
|
15241
15420
|
else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
|
|
15242
15421
|
height = '200';
|
|
15243
15422
|
}
|
|
15423
|
+
if (isNone) {
|
|
15424
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
|
|
15425
|
+
}
|
|
15244
15426
|
}
|
|
15245
15427
|
else {
|
|
15246
15428
|
height = 'auto';
|
|
@@ -16823,7 +17005,7 @@ __decorate$3([
|
|
|
16823
17005
|
Property('')
|
|
16824
17006
|
], PivotAxis.prototype, "title", void 0);
|
|
16825
17007
|
__decorate$3([
|
|
16826
|
-
Property(
|
|
17008
|
+
Property(1)
|
|
16827
17009
|
], PivotAxis.prototype, "zoomFactor", void 0);
|
|
16828
17010
|
__decorate$3([
|
|
16829
17011
|
Complex({}, CrosshairTooltip)
|
|
@@ -16841,7 +17023,7 @@ __decorate$3([
|
|
|
16841
17023
|
Property(0)
|
|
16842
17024
|
], PivotAxis.prototype, "plotOffset", void 0);
|
|
16843
17025
|
__decorate$3([
|
|
16844
|
-
Property('
|
|
17026
|
+
Property('Shift')
|
|
16845
17027
|
], PivotAxis.prototype, "edgeLabelPlacement", void 0);
|
|
16846
17028
|
__decorate$3([
|
|
16847
17029
|
Property('BetweenTicks')
|
|
@@ -18136,6 +18318,7 @@ class OlapEngine {
|
|
|
18136
18318
|
this.updateTupCollection(customArgs.drillInfo.axis === 'row' ? rowTuples.length : columnTuples.length);
|
|
18137
18319
|
}
|
|
18138
18320
|
if (customArgs.action === 'down' ? customArgs.drillInfo.axis === 'column' : true) {
|
|
18321
|
+
this.olapValueAxis = isNullOrUndefined(this.getValueAxis(undefined, undefined)) ? 'column' : 'row';
|
|
18139
18322
|
this.frameColumnHeader(columnTuples);
|
|
18140
18323
|
if (!this.isPaging) {
|
|
18141
18324
|
this.performColumnSorting();
|
|
@@ -18190,6 +18373,7 @@ class OlapEngine {
|
|
|
18190
18373
|
frameRowHeader(tuples) {
|
|
18191
18374
|
this.headerGrouping = {};
|
|
18192
18375
|
this.lastLevel = [];
|
|
18376
|
+
let isGrandTotalAdd = true;
|
|
18193
18377
|
let position = this.pivotValues.length;
|
|
18194
18378
|
let pivotValues = [];
|
|
18195
18379
|
let valueContent = [];
|
|
@@ -18250,6 +18434,7 @@ class OlapEngine {
|
|
|
18250
18434
|
let startTupPos = tupPos;
|
|
18251
18435
|
let pagingAllowFlag = true;
|
|
18252
18436
|
let lastMesPos = 0;
|
|
18437
|
+
let isGrandTotalTop = false;
|
|
18253
18438
|
while (tupPos < tuplesLength && pagingAllowFlag) {
|
|
18254
18439
|
let members = tuples[this.customArgs.action === 'down' ?
|
|
18255
18440
|
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
@@ -18304,35 +18489,25 @@ class OlapEngine {
|
|
|
18304
18489
|
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
18305
18490
|
: drillAllow;
|
|
18306
18491
|
let withoutAllAllow = (withoutAllStartPos > -1 && allCount > 0) ? (attrDrill || allStartPos > withoutAllEndPos) : true;
|
|
18307
|
-
|
|
18492
|
+
isGrandTotalTop = this.dataSourceSettings.grandTotalsPosition === 'Top' && this.olapRowValueIndex === 0 && this.olapValueAxis === 'row'
|
|
18493
|
+
&& this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true);
|
|
18494
|
+
if (isGrandTotalTop && gTotals.length === 1) {
|
|
18495
|
+
gTotals = this.frameGrandTotalValues(tuples, gTotals, typeColl, measurePos);
|
|
18496
|
+
}
|
|
18497
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
18308
18498
|
let levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
formattedText: (typeColl[measurePos] === '3' &&
|
|
18314
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18315
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ?
|
|
18316
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18317
|
-
members[measurePos].querySelector('Caption').textContent,
|
|
18318
|
-
hasChild: false,
|
|
18319
|
-
level: -1,
|
|
18320
|
-
rowIndex: position,
|
|
18321
|
-
index: [],
|
|
18322
|
-
ordinal: tupPos,
|
|
18323
|
-
colSpan: 1,
|
|
18324
|
-
rowSpan: 1,
|
|
18325
|
-
memberType: Number(typeColl[measurePos]),
|
|
18326
|
-
isDrilled: false,
|
|
18327
|
-
parentUniqueName: members[measurePos].querySelector('PARENT_UNIQUE_NAME') ?
|
|
18328
|
-
members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined,
|
|
18329
|
-
levelUniqueName: members[measurePos].querySelector('LName').textContent,
|
|
18330
|
-
hierarchy: members[measurePos].getAttribute('Hierarchy'),
|
|
18331
|
-
valueSort: { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') }
|
|
18332
|
-
});
|
|
18499
|
+
let formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18500
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18501
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
18502
|
+
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') });
|
|
18333
18503
|
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
18334
18504
|
}
|
|
18335
18505
|
else if (!(allStartPos === 0 || (measurePos === 0 && allStartPos === 1)) && drillAllow && withoutAllAllow) {
|
|
18506
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && isGrandTotalAdd && this.dataSourceSettings.showGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true)) {
|
|
18507
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
18508
|
+
position = this.pivotValues.length;
|
|
18509
|
+
isGrandTotalAdd = false;
|
|
18510
|
+
}
|
|
18336
18511
|
prevTupInfo = this.tupRowInfo[tupPos];
|
|
18337
18512
|
let lastPos = position;
|
|
18338
18513
|
let lastMemPos = memPos;
|
|
@@ -18423,6 +18598,11 @@ class OlapEngine {
|
|
|
18423
18598
|
}
|
|
18424
18599
|
tupPos++;
|
|
18425
18600
|
}
|
|
18601
|
+
if (!(this.dataSourceSettings.grandTotalsPosition === 'Top') || (this.olapValueAxis === 'row' && this.dataSourceSettings.rows.length === 1 && this.dataSourceSettings.grandTotalsPosition === 'Top') || this.dataSourceSettings.rows.length === 0) {
|
|
18602
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
18603
|
+
}
|
|
18604
|
+
}
|
|
18605
|
+
insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position) {
|
|
18426
18606
|
if (gTotals.length > 1 && gTotals[0].memberType !== 3) {
|
|
18427
18607
|
gTotals[0].ordinal = -1;
|
|
18428
18608
|
}
|
|
@@ -18448,6 +18628,41 @@ class OlapEngine {
|
|
|
18448
18628
|
this.updateRowEngine(pivotValues, valueContent, tuples.length);
|
|
18449
18629
|
this.onDemandDrillEngine = pivotValues;
|
|
18450
18630
|
}
|
|
18631
|
+
return gTotals;
|
|
18632
|
+
}
|
|
18633
|
+
getValueAxis(valueAxis, valueIndex) {
|
|
18634
|
+
this.olapValueAxis = valueAxis;
|
|
18635
|
+
this.olapRowValueIndex = valueIndex;
|
|
18636
|
+
for (let i = 0; i < this.dataSourceSettings.rows.length; i++) {
|
|
18637
|
+
if (this.dataSourceSettings.rows[i].name === '[Measures]') {
|
|
18638
|
+
this.olapValueAxis = 'row';
|
|
18639
|
+
this.olapRowValueIndex = i;
|
|
18640
|
+
break;
|
|
18641
|
+
}
|
|
18642
|
+
}
|
|
18643
|
+
return this.olapValueAxis;
|
|
18644
|
+
}
|
|
18645
|
+
frameGrandTotalAxisSet(gTotals, actualText, formattedText, rowIndex, ordinal, memberType, parentUniqueName, levelUniqueName, hierarchy, valueSort) {
|
|
18646
|
+
gTotals.push({
|
|
18647
|
+
axis: 'row',
|
|
18648
|
+
actualText: actualText,
|
|
18649
|
+
colIndex: 0,
|
|
18650
|
+
formattedText: formattedText,
|
|
18651
|
+
hasChild: false,
|
|
18652
|
+
level: -1,
|
|
18653
|
+
rowIndex: rowIndex,
|
|
18654
|
+
index: [],
|
|
18655
|
+
ordinal: ordinal,
|
|
18656
|
+
colSpan: 1,
|
|
18657
|
+
rowSpan: 1,
|
|
18658
|
+
memberType: memberType,
|
|
18659
|
+
isDrilled: false,
|
|
18660
|
+
parentUniqueName: parentUniqueName,
|
|
18661
|
+
levelUniqueName: levelUniqueName,
|
|
18662
|
+
hierarchy: hierarchy,
|
|
18663
|
+
valueSort: valueSort
|
|
18664
|
+
});
|
|
18665
|
+
return gTotals;
|
|
18451
18666
|
}
|
|
18452
18667
|
getDepth(tupInfo, uniqueName, memberType) {
|
|
18453
18668
|
let memberPosition = tupInfo.uNameCollection.indexOf(uniqueName);
|
|
@@ -18687,6 +18902,53 @@ class OlapEngine {
|
|
|
18687
18902
|
currTupCount--;
|
|
18688
18903
|
}
|
|
18689
18904
|
}
|
|
18905
|
+
frameGrandTotalValues(tuples, gTotals, typeColl, measurePos) {
|
|
18906
|
+
let tupPos = 0;
|
|
18907
|
+
let lastAllStartPos;
|
|
18908
|
+
let lastAllCount;
|
|
18909
|
+
let availAllMember = false;
|
|
18910
|
+
let withoutAllEndPos = -1;
|
|
18911
|
+
let isGrandtoalDataAdd = false;
|
|
18912
|
+
let prevTupInfo;
|
|
18913
|
+
let isGrandTotalTop = false;
|
|
18914
|
+
while (tupPos < tuples.length && !isGrandtoalDataAdd) {
|
|
18915
|
+
let members = tuples[this.customArgs.action === 'down' ?
|
|
18916
|
+
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
18917
|
+
let allCount = this.tupRowInfo[tupPos].allCount;
|
|
18918
|
+
let allStartPos = this.tupRowInfo[tupPos].allStartPos;
|
|
18919
|
+
let measure = this.tupRowInfo[tupPos].measure;
|
|
18920
|
+
let typeColl = this.tupRowInfo[tupPos].typeCollection;
|
|
18921
|
+
let drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
|
|
18922
|
+
let startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
|
|
18923
|
+
if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
|
|
18924
|
+
gTotals.pop();
|
|
18925
|
+
}
|
|
18926
|
+
if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
|
|
18927
|
+
(!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
|
|
18928
|
+
let attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
|
|
18929
|
+
let drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
|
|
18930
|
+
drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
|
|
18931
|
+
(prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
|
|
18932
|
+
((withoutAllEndPos > prevTupInfo.measurePosition ? false :
|
|
18933
|
+
prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
|
|
18934
|
+
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
18935
|
+
: drillAllow;
|
|
18936
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
18937
|
+
let levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
18938
|
+
let formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18939
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18940
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
18941
|
+
gTotals = this.frameGrandTotalAxisSet(gTotals, this.getUniqueName(members[measurePos].querySelector('UName').textContent), formattedText, this.pivotValues.length, 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') });
|
|
18942
|
+
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
18943
|
+
}
|
|
18944
|
+
lastAllCount = allCount;
|
|
18945
|
+
lastAllStartPos = allStartPos;
|
|
18946
|
+
}
|
|
18947
|
+
isGrandtoalDataAdd = this.dataSourceSettings.values.length + 1 === gTotals.length ? true : false;
|
|
18948
|
+
tupPos++;
|
|
18949
|
+
}
|
|
18950
|
+
return gTotals;
|
|
18951
|
+
}
|
|
18690
18952
|
frameColumnHeader(tuples) {
|
|
18691
18953
|
this.headerGrouping = {};
|
|
18692
18954
|
this.lastLevel = [];
|
|
@@ -18750,8 +19012,18 @@ class OlapEngine {
|
|
|
18750
19012
|
withoutAllAvail = true;
|
|
18751
19013
|
isStartCol = (allCount > 0 && isStartCol) ? (allStartPos > withoutAllStartPos) : isStartCol;
|
|
18752
19014
|
}
|
|
18753
|
-
|
|
18754
|
-
|
|
19015
|
+
let isGrandTotalTop = false;
|
|
19016
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showColumnGrandTotals) {
|
|
19017
|
+
let count = 0;
|
|
19018
|
+
for (let i = 0; i < members.length; i++) {
|
|
19019
|
+
if ((members[i].querySelector('Caption').textContent).indexOf('All') === 0) {
|
|
19020
|
+
count++;
|
|
19021
|
+
}
|
|
19022
|
+
}
|
|
19023
|
+
isGrandTotalTop = count === (this.olapValueAxis === 'column' ? this.dataSourceSettings.columns.length - 1 : this.dataSourceSettings.columns.length);
|
|
19024
|
+
}
|
|
19025
|
+
if (isStartCol || isGrandTotalTop) {
|
|
19026
|
+
if (allCount === 0 || isGrandTotalTop) {
|
|
18755
19027
|
let levelComp = [-1, -1, -1];
|
|
18756
19028
|
if (this.tupColumnInfo[tupPos - 1] && this.tupColumnInfo[tupPos - 1].allCount === 0) {
|
|
18757
19029
|
levelComp = this.levelCompare(levelColl, this.tupColumnInfo[tupPos - 1].levelCollection);
|
|
@@ -18788,8 +19060,10 @@ class OlapEngine {
|
|
|
18788
19060
|
}
|
|
18789
19061
|
this.setParentCollection(members);
|
|
18790
19062
|
if (withoutAllAvail ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
18791
|
-
|
|
18792
|
-
|
|
19063
|
+
if (!isGrandTotalTop) {
|
|
19064
|
+
this.totalCollection[this.totalCollection.length] =
|
|
19065
|
+
({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
|
|
19066
|
+
}
|
|
18793
19067
|
lastSavedInfo.allCount = allCount;
|
|
18794
19068
|
lastSavedInfo.allStartPos = allStartPos;
|
|
18795
19069
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -18814,10 +19088,12 @@ class OlapEngine {
|
|
|
18814
19088
|
}
|
|
18815
19089
|
this.setParentCollection(members);
|
|
18816
19090
|
if ((withoutAllAvail && drillStartPos > -1) ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
19091
|
+
if (!isGrandTotalTop) {
|
|
19092
|
+
this.totalCollection[this.totalCollection.length] =
|
|
19093
|
+
({
|
|
19094
|
+
allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
|
|
19095
|
+
});
|
|
19096
|
+
}
|
|
18821
19097
|
lastSavedInfo.allCount = allCount;
|
|
18822
19098
|
lastSavedInfo.allStartPos = allStartPos;
|
|
18823
19099
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -19310,19 +19586,26 @@ class OlapEngine {
|
|
|
19310
19586
|
}
|
|
19311
19587
|
let newPos = 0;
|
|
19312
19588
|
let totPos = 0;
|
|
19589
|
+
let valuePos = 0;
|
|
19313
19590
|
gSumFlag = false;
|
|
19314
19591
|
gSumGrouping = this.sortRowHeaders(gSumGrouping);
|
|
19315
19592
|
for (let rPos = this.colDepth; rPos < rowCount; rPos++) {
|
|
19316
19593
|
/* eslint-disable @typescript-eslint/dot-notation */
|
|
19594
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) &&
|
|
19595
|
+
((this.olapValueAxis === 'column' && this.colDepth + 1 === rPos) || (this.olapValueAxis === 'row' && this.colDepth + this.dataSourceSettings.values.length + 1 === rPos))) {
|
|
19596
|
+
newPos = 0;
|
|
19597
|
+
gSumFlag = false;
|
|
19598
|
+
}
|
|
19317
19599
|
let cell = gSumFlag ? gSumGrouping : sortLvlGrouping[levels[0]]['parent'];
|
|
19318
19600
|
/* eslint-enable @typescript-eslint/dot-notation */
|
|
19319
|
-
let currPos = gSumFlag ? (newPos - totPos) : newPos;
|
|
19601
|
+
let currPos = (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) && this.colDepth === rPos) ? cell.length : gSumFlag ? (newPos - totPos) : newPos;
|
|
19320
19602
|
if (cell[currPos]) {
|
|
19321
19603
|
this.pivotValues[rPos] = [cell[currPos]];
|
|
19322
19604
|
this.pivotValues[rPos][0].rowIndex = rPos;
|
|
19323
|
-
this.valueContent[
|
|
19605
|
+
this.valueContent[valuePos][0] = this.pivotValues[rPos][0];
|
|
19324
19606
|
}
|
|
19325
19607
|
newPos++;
|
|
19608
|
+
valuePos++;
|
|
19326
19609
|
if (this.pivotValues[rPos][0].type === 'grand sum') {
|
|
19327
19610
|
gSumFlag = true;
|
|
19328
19611
|
totPos = newPos;
|
|
@@ -21564,6 +21847,8 @@ let PivotView = class PivotView extends Component {
|
|
|
21564
21847
|
this.request = new XMLHttpRequest();
|
|
21565
21848
|
/** @hidden */
|
|
21566
21849
|
this.isServerWaitingPopup = false;
|
|
21850
|
+
/** @hidden */
|
|
21851
|
+
this.actionObj = {};
|
|
21567
21852
|
this.pivotView = this;
|
|
21568
21853
|
setValue('mergePersistData', this.mergePersistPivotData, this);
|
|
21569
21854
|
}
|
|
@@ -21605,10 +21890,10 @@ let PivotView = class PivotView extends Component {
|
|
|
21605
21890
|
modules.push({ args: [this], member: 'grouping' });
|
|
21606
21891
|
}
|
|
21607
21892
|
if (this.allowDrillThrough || (this.editSettings && this.editSettings.allowEditing)) {
|
|
21608
|
-
modules.push({ args: [this], member: '
|
|
21893
|
+
modules.push({ args: [this], member: 'drillThrough' });
|
|
21609
21894
|
}
|
|
21610
21895
|
if (this.displayOption.view !== 'Table') {
|
|
21611
|
-
modules.push({ args: [this], member: '
|
|
21896
|
+
modules.push({ args: [this], member: 'pivotChart' });
|
|
21612
21897
|
}
|
|
21613
21898
|
return modules;
|
|
21614
21899
|
}
|
|
@@ -22187,7 +22472,7 @@ let PivotView = class PivotView extends Component {
|
|
|
22187
22472
|
this.setProperties({ gridSettings: { allowSelection: true, selectionSettings: { cellSelectionMode: 'Box', mode: 'Cell', type: 'Multiple' } } }, true);
|
|
22188
22473
|
}
|
|
22189
22474
|
if (this.displayOption.view !== 'Table') {
|
|
22190
|
-
this.
|
|
22475
|
+
this.pivotChartModule = new PivotChart();
|
|
22191
22476
|
}
|
|
22192
22477
|
this.currentView = this.currentView ? this.currentView : (this.displayOption.view === 'Both' ?
|
|
22193
22478
|
this.displayOption.primary : this.displayOption.view);
|
|
@@ -22452,32 +22737,37 @@ let PivotView = class PivotView extends Component {
|
|
|
22452
22737
|
}
|
|
22453
22738
|
}
|
|
22454
22739
|
initialLoad() {
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
else {
|
|
22461
|
-
createSpinner({ target: this.element }, this.createElement);
|
|
22462
|
-
}
|
|
22463
|
-
let loadArgs = {
|
|
22464
|
-
dataSourceSettings: this.dataSourceSettings,
|
|
22465
|
-
pivotview: this,
|
|
22466
|
-
fieldsType: {}
|
|
22467
|
-
};
|
|
22468
|
-
this.trigger(load, loadArgs, (observedArgs) => {
|
|
22469
|
-
this.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
22470
|
-
this.fieldsType = observedArgs.fieldsType;
|
|
22471
|
-
this.updateClass();
|
|
22472
|
-
this.notify(initSubComponent, {});
|
|
22473
|
-
if (this.dataSourceSettings.mode !== 'Server') {
|
|
22474
|
-
this.notify(initialLoad, {});
|
|
22740
|
+
try {
|
|
22741
|
+
this.cellTemplateFn = this.templateParser(this.cellTemplate);
|
|
22742
|
+
this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
|
|
22743
|
+
if (this.spinnerTemplate) {
|
|
22744
|
+
createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
|
|
22475
22745
|
}
|
|
22476
|
-
|
|
22477
|
-
this.
|
|
22746
|
+
else {
|
|
22747
|
+
createSpinner({ target: this.element }, this.createElement);
|
|
22478
22748
|
}
|
|
22479
|
-
|
|
22480
|
-
|
|
22749
|
+
let loadArgs = {
|
|
22750
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
22751
|
+
pivotview: this,
|
|
22752
|
+
fieldsType: {}
|
|
22753
|
+
};
|
|
22754
|
+
this.trigger(load, loadArgs, (observedArgs) => {
|
|
22755
|
+
this.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
22756
|
+
this.fieldsType = observedArgs.fieldsType;
|
|
22757
|
+
this.updateClass();
|
|
22758
|
+
this.notify(initSubComponent, {});
|
|
22759
|
+
if (this.dataSourceSettings.mode !== 'Server') {
|
|
22760
|
+
this.notify(initialLoad, {});
|
|
22761
|
+
}
|
|
22762
|
+
if (this.isAdaptive) {
|
|
22763
|
+
this.contextMenuModule.render();
|
|
22764
|
+
}
|
|
22765
|
+
this.notify(initToolbar, {});
|
|
22766
|
+
});
|
|
22767
|
+
}
|
|
22768
|
+
catch (execption) {
|
|
22769
|
+
this.actionFailureMethod(execption);
|
|
22770
|
+
}
|
|
22481
22771
|
}
|
|
22482
22772
|
/**
|
|
22483
22773
|
* Register the internal events.
|
|
@@ -22508,12 +22798,32 @@ let PivotView = class PivotView extends Component {
|
|
|
22508
22798
|
/* eslint-disable */
|
|
22509
22799
|
let columnRender = this.gridSettings['columnRender'];
|
|
22510
22800
|
let chartLoadEvent = this.chartSettings['load'];
|
|
22801
|
+
let chartLoadedEvent = this.chartSettings['loaded'];
|
|
22802
|
+
let chartTextRenderEvent = this.chartSettings['textRender'];
|
|
22803
|
+
let chartPointRenderEvent = this.chartSettings['pointRender'];
|
|
22804
|
+
let chartSeriesRenderEvent = this.chartSettings['seriesRender'];
|
|
22805
|
+
let chartLegendRenderEvent = this.chartSettings['legendRender'];
|
|
22806
|
+
let chartPointClickEvent = this.chartSettings['pointClick'];
|
|
22807
|
+
let chartTooltipRenderEvent = this.chartSettings['tooltipRender'];
|
|
22511
22808
|
this.gridSettings['columnRender'] = undefined;
|
|
22512
22809
|
this.chartSettings['tooltipRender'] = undefined;
|
|
22513
22810
|
this.chartSettings['load'] = undefined;
|
|
22811
|
+
this.chartSettings['loaded'] = undefined;
|
|
22812
|
+
this.chartSettings['textRender'] = undefined;
|
|
22813
|
+
this.chartSettings['pointRender'] = undefined;
|
|
22814
|
+
this.chartSettings['seriesRender'] = undefined;
|
|
22815
|
+
this.chartSettings['legendRender'] = undefined;
|
|
22816
|
+
this.chartSettings['pointClick'] = undefined;
|
|
22514
22817
|
let persistData = this.addOnPersist(keyEntity);
|
|
22515
22818
|
this.gridSettings['columnRender'] = columnRender;
|
|
22516
22819
|
this.chartSettings['load'] = chartLoadEvent;
|
|
22820
|
+
this.chartSettings['loaded'] = chartLoadedEvent;
|
|
22821
|
+
this.chartSettings['textRender'] = chartTextRenderEvent;
|
|
22822
|
+
this.chartSettings['pointRender'] = chartPointRenderEvent;
|
|
22823
|
+
this.chartSettings['seriesRender'] = chartSeriesRenderEvent;
|
|
22824
|
+
this.chartSettings['legendRender'] = chartLegendRenderEvent;
|
|
22825
|
+
this.chartSettings['pointClick'] = chartPointClickEvent;
|
|
22826
|
+
this.chartSettings['tooltipRender'] = chartTooltipRenderEvent;
|
|
22517
22827
|
/* eslint-enable */
|
|
22518
22828
|
return persistData;
|
|
22519
22829
|
}
|
|
@@ -22695,15 +23005,15 @@ let PivotView = class PivotView extends Component {
|
|
|
22695
23005
|
if (!this.grid && newProp.displayOption.view !== 'Chart') {
|
|
22696
23006
|
this.renderEmptyGrid();
|
|
22697
23007
|
if (newProp.displayOption.view === 'Table') {
|
|
22698
|
-
if (this.
|
|
22699
|
-
this.
|
|
23008
|
+
if (this.pivotChartModule) {
|
|
23009
|
+
this.pivotChartModule.destroy();
|
|
22700
23010
|
this.chart = undefined;
|
|
22701
|
-
this.
|
|
23011
|
+
this.pivotChartModule = undefined;
|
|
22702
23012
|
}
|
|
22703
23013
|
}
|
|
22704
23014
|
}
|
|
22705
|
-
else if (!this.
|
|
22706
|
-
this.
|
|
23015
|
+
else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
|
|
23016
|
+
this.pivotChartModule = new PivotChart();
|
|
22707
23017
|
}
|
|
22708
23018
|
}
|
|
22709
23019
|
else if (this.showToolbar && !isNullOrUndefined(newProp.displayOption) && newProp.displayOption.view) {
|
|
@@ -22733,12 +23043,12 @@ let PivotView = class PivotView extends Component {
|
|
|
22733
23043
|
(newProp.chartSettings.chartSeries && Object.keys(newProp.chartSettings.chartSeries).indexOf('type') !== -1))) {
|
|
22734
23044
|
this.groupingBarModule.renderLayout();
|
|
22735
23045
|
}
|
|
22736
|
-
if (isNullOrUndefined(this.
|
|
22737
|
-
this.
|
|
23046
|
+
if (isNullOrUndefined(this.pivotChartModule) && this.displayOption.view !== 'Table') {
|
|
23047
|
+
this.pivotChartModule = new PivotChart();
|
|
22738
23048
|
}
|
|
22739
23049
|
let engineModule = this.dataType === 'pivot' ? this.engineModule : this.olapEngineModule;
|
|
22740
|
-
if (!isNullOrUndefined(this.
|
|
22741
|
-
this.
|
|
23050
|
+
if (!isNullOrUndefined(this.pivotChartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
|
|
23051
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
22742
23052
|
}
|
|
22743
23053
|
if (!isNullOrUndefined(engineModule.pivotValues) && !isNullOrUndefined(engineModule.fieldList)) {
|
|
22744
23054
|
this.notify(uiUpdate, this);
|
|
@@ -22765,6 +23075,9 @@ let PivotView = class PivotView extends Component {
|
|
|
22765
23075
|
if (this.element.querySelector('.e-grouping-bar')) {
|
|
22766
23076
|
this.element.querySelector('.e-grouping-bar').remove();
|
|
22767
23077
|
}
|
|
23078
|
+
else if (this.groupingBarModule) {
|
|
23079
|
+
this.groupingBarModule.renderLayout();
|
|
23080
|
+
}
|
|
22768
23081
|
if (isNullOrUndefined(newProp.showFieldList))
|
|
22769
23082
|
this.renderPivotGrid();
|
|
22770
23083
|
break;
|
|
@@ -22858,9 +23171,9 @@ let PivotView = class PivotView extends Component {
|
|
|
22858
23171
|
*/
|
|
22859
23172
|
renderPivotGrid() {
|
|
22860
23173
|
this.clearTemplate();
|
|
22861
|
-
if (this.
|
|
22862
|
-
this.
|
|
22863
|
-
this.
|
|
23174
|
+
if (this.pivotChartModule) {
|
|
23175
|
+
this.pivotChartModule.engineModule = this.engineModule;
|
|
23176
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
22864
23177
|
if (this.enableRtl && this.chart && document.body.getAttribute('dir') !== 'rtl') {
|
|
22865
23178
|
addClass([this.chart.element], PIVOTCHART_LTR);
|
|
22866
23179
|
}
|
|
@@ -22891,7 +23204,7 @@ let PivotView = class PivotView extends Component {
|
|
|
22891
23204
|
this.applyHyperlinkSettings();
|
|
22892
23205
|
}
|
|
22893
23206
|
this.renderModule = this.renderModule ? this.renderModule : new Render(this);
|
|
22894
|
-
this.renderModule.render();
|
|
23207
|
+
this.renderModule.render(true);
|
|
22895
23208
|
}
|
|
22896
23209
|
else if (this.grid) {
|
|
22897
23210
|
remove(this.grid.element);
|
|
@@ -22907,7 +23220,9 @@ let PivotView = class PivotView extends Component {
|
|
|
22907
23220
|
if (this.toolbarModule && this.toolbarModule.toolbar) {
|
|
22908
23221
|
this.toolbarModule.toolbar.width = this.getGridWidthAsNumber() - 2;
|
|
22909
23222
|
}
|
|
22910
|
-
this.
|
|
23223
|
+
if (this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis) {
|
|
23224
|
+
this.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.getGridWidthAsNumber());
|
|
23225
|
+
}
|
|
22911
23226
|
this.chart.width = formatUnit(this.getGridWidthAsNumber());
|
|
22912
23227
|
if (this.currentView === 'Table') {
|
|
22913
23228
|
this.grid.element.style.display = '';
|
|
@@ -22927,7 +23242,13 @@ let PivotView = class PivotView extends Component {
|
|
|
22927
23242
|
}
|
|
22928
23243
|
if (this.toolbarModule) {
|
|
22929
23244
|
if (this.showFieldList && select('#' + this.element.id + '_PivotFieldList', this.element)) {
|
|
22930
|
-
|
|
23245
|
+
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1) {
|
|
23246
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
|
|
23247
|
+
}
|
|
23248
|
+
else {
|
|
23249
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.top = this.element.querySelector('.' + GRID_TOOLBAR).offsetHeight.toString() + 'px';
|
|
23250
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.position = 'relative';
|
|
23251
|
+
}
|
|
22931
23252
|
}
|
|
22932
23253
|
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1 &&
|
|
22933
23254
|
this.showToolbar && this.element.querySelector('.e-toggle-field-list')) {
|
|
@@ -23078,7 +23399,9 @@ let PivotView = class PivotView extends Component {
|
|
|
23078
23399
|
isDrillThrough: (pivot.allowDrillThrough || pivot.editSettings.allowEditing),
|
|
23079
23400
|
localeObj: pivot.localeObj,
|
|
23080
23401
|
fieldsType: pivot.fieldsType,
|
|
23081
|
-
clonedReport: pivot.clonedReport
|
|
23402
|
+
clonedReport: pivot.clonedReport,
|
|
23403
|
+
globalize: pivot.globalize,
|
|
23404
|
+
currenyCode: pivot.currencyCode
|
|
23082
23405
|
};
|
|
23083
23406
|
/* eslint-enable @typescript-eslint/indent */
|
|
23084
23407
|
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
@@ -23128,6 +23451,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23128
23451
|
this.exportType = 'Excel';
|
|
23129
23452
|
this.grid.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23130
23453
|
}
|
|
23454
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23455
|
+
let actionInfo = {
|
|
23456
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
23457
|
+
};
|
|
23458
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23459
|
+
if (this.actionObj.actionName) {
|
|
23460
|
+
this.actionCompleteMethod();
|
|
23461
|
+
}
|
|
23131
23462
|
}
|
|
23132
23463
|
/**
|
|
23133
23464
|
* Export PivotGrid data to CSV file.
|
|
@@ -23145,6 +23476,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23145
23476
|
this.exportType = 'CSV';
|
|
23146
23477
|
this.grid.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23147
23478
|
}
|
|
23479
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23480
|
+
let actionInfo = {
|
|
23481
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
23482
|
+
};
|
|
23483
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23484
|
+
if (this.actionObj.actionName) {
|
|
23485
|
+
this.actionCompleteMethod();
|
|
23486
|
+
}
|
|
23148
23487
|
}
|
|
23149
23488
|
/**
|
|
23150
23489
|
* Export Pivot widget data to PDF document.
|
|
@@ -23161,6 +23500,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23161
23500
|
else {
|
|
23162
23501
|
this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
23163
23502
|
}
|
|
23503
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23504
|
+
let actionInfo = {
|
|
23505
|
+
exportInfo: { type: 'PDF', info: pdfExportProperties }
|
|
23506
|
+
};
|
|
23507
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23508
|
+
if (this.actionObj.actionName) {
|
|
23509
|
+
this.actionCompleteMethod();
|
|
23510
|
+
}
|
|
23164
23511
|
}
|
|
23165
23512
|
/**
|
|
23166
23513
|
* Export method for the chart.
|
|
@@ -23175,6 +23522,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23175
23522
|
if (this.chart && this.chart.enableExport) {
|
|
23176
23523
|
this.chart.exportModule.export(type, fileName, orientation, null, width, height);
|
|
23177
23524
|
}
|
|
23525
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23526
|
+
let actionInfo = {
|
|
23527
|
+
exportInfo: { type: type, info: fileName }
|
|
23528
|
+
};
|
|
23529
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23530
|
+
if (this.actionObj.actionName) {
|
|
23531
|
+
this.actionCompleteMethod();
|
|
23532
|
+
}
|
|
23178
23533
|
}
|
|
23179
23534
|
/**
|
|
23180
23535
|
* Print method for the chart.
|
|
@@ -23285,6 +23640,10 @@ let PivotView = class PivotView extends Component {
|
|
|
23285
23640
|
};
|
|
23286
23641
|
this.trigger(enginePopulated, eventArgs);
|
|
23287
23642
|
pivot.engineModule.pivotValues = eventArgs.pivotValues;
|
|
23643
|
+
let actionInfo = {
|
|
23644
|
+
drillInfo: drilledItem
|
|
23645
|
+
};
|
|
23646
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23288
23647
|
pivot.renderPivotGrid();
|
|
23289
23648
|
}
|
|
23290
23649
|
else {
|
|
@@ -23632,6 +23991,12 @@ let PivotView = class PivotView extends Component {
|
|
|
23632
23991
|
this.unwireEvents();
|
|
23633
23992
|
this.wireEvents();
|
|
23634
23993
|
this.isChartLoaded = false;
|
|
23994
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23995
|
+
if (this.actionObj.actionName) {
|
|
23996
|
+
if (this.actionObj.actionName !== windowResize) {
|
|
23997
|
+
this.actionCompleteMethod();
|
|
23998
|
+
}
|
|
23999
|
+
}
|
|
23635
24000
|
}
|
|
23636
24001
|
setToolTip(args) {
|
|
23637
24002
|
let colIndex = Number(args.target.getAttribute('aria-colindex'));
|
|
@@ -23663,6 +24028,13 @@ let PivotView = class PivotView extends Component {
|
|
|
23663
24028
|
if (cell && this.engineModule.fieldList[cell.actualText]) {
|
|
23664
24029
|
let field = this.engineModule.fieldList[cell.actualText];
|
|
23665
24030
|
aggregateType = field.aggregateType;
|
|
24031
|
+
if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
|
|
24032
|
+
field.type === 'exclude')) {
|
|
24033
|
+
aggregateType = 'Count';
|
|
24034
|
+
}
|
|
24035
|
+
else {
|
|
24036
|
+
aggregateType = (aggregateType === undefined) ? 'Sum' : field.aggregateType;
|
|
24037
|
+
}
|
|
23666
24038
|
caption = field.caption;
|
|
23667
24039
|
hasField = true;
|
|
23668
24040
|
}
|
|
@@ -23882,75 +24254,104 @@ let PivotView = class PivotView extends Component {
|
|
|
23882
24254
|
ele = target.parentElement.parentElement;
|
|
23883
24255
|
}
|
|
23884
24256
|
this.CellClicked(target, e);
|
|
23885
|
-
|
|
23886
|
-
|
|
23887
|
-
|
|
23888
|
-
|
|
23889
|
-
|
|
23890
|
-
|
|
23891
|
-
|
|
23892
|
-
|
|
23893
|
-
|
|
23894
|
-
|
|
23895
|
-
|
|
23896
|
-
else {
|
|
23897
|
-
let level = this.getLevel(header);
|
|
23898
|
-
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
23899
|
-
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24257
|
+
try {
|
|
24258
|
+
if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
|
|
24259
|
+
&& this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
|
|
24260
|
+
this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
|
|
24261
|
+
ele.classList.contains('e-stot'))) {
|
|
24262
|
+
let FieldName = target.parentElement.getAttribute('fieldname');
|
|
24263
|
+
let fieldInfo = PivotUtil.getFieldInfo(FieldName, this);
|
|
24264
|
+
this.actionObj.actionName = sortValue;
|
|
24265
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
24266
|
+
if (this.actionBeginMethod()) {
|
|
24267
|
+
return;
|
|
23900
24268
|
}
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
23904
|
-
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
dataSourceSettings: {
|
|
23908
|
-
valueSortSettings: {
|
|
23909
|
-
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
23910
|
-
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
23911
|
-
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
23912
|
-
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
23913
|
-
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
23914
|
-
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24269
|
+
let colIndex = Number(ele.getAttribute('aria-colindex'));
|
|
24270
|
+
let rowIndex = Number(ele.getAttribute('index'));
|
|
24271
|
+
if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24272
|
+
let header = this.pivotValues[rowIndex][colIndex];
|
|
24273
|
+
if (this.dataSourceSettings.valueIndex === -1) {
|
|
24274
|
+
rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
|
|
23915
24275
|
}
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
if (
|
|
23923
|
-
|
|
23924
|
-
|
|
24276
|
+
else {
|
|
24277
|
+
let level = this.getLevel(header);
|
|
24278
|
+
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
24279
|
+
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24280
|
+
}
|
|
24281
|
+
}
|
|
24282
|
+
else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24283
|
+
colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
|
|
24284
|
+
rowIndex = this.engineModule.headerContent.length - 1;
|
|
24285
|
+
}
|
|
24286
|
+
this.setProperties({
|
|
24287
|
+
dataSourceSettings: {
|
|
24288
|
+
valueSortSettings: {
|
|
24289
|
+
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
24290
|
+
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
24291
|
+
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
24292
|
+
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
24293
|
+
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
24294
|
+
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24295
|
+
}
|
|
24296
|
+
}
|
|
24297
|
+
}, true);
|
|
24298
|
+
this.showWaitingPopup();
|
|
24299
|
+
let pivot = this; /* eslint-disable-line */
|
|
24300
|
+
pivot.engineModule.enableValueSorting = true;
|
|
24301
|
+
if (pivot.enableVirtualization) {
|
|
24302
|
+
if (pivot.dataSourceSettings.enableSorting) {
|
|
24303
|
+
for (let key of Object.keys(pivot.engineModule.fieldList)) {
|
|
24304
|
+
pivot.engineModule.fieldList[key].sort = 'Ascending';
|
|
24305
|
+
}
|
|
24306
|
+
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
24307
|
+
}
|
|
24308
|
+
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
24309
|
+
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
24310
|
+
}
|
|
24311
|
+
else {
|
|
24312
|
+
pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
|
|
24313
|
+
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
24314
|
+
pivot.engineModule.applyValueSorting();
|
|
24315
|
+
pivot.engineModule.updateEngine();
|
|
23925
24316
|
}
|
|
23926
|
-
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
23927
24317
|
}
|
|
23928
|
-
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
24318
|
+
else if (pivot.dataSourceSettings.mode === 'Server') {
|
|
23929
24319
|
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
23930
24320
|
}
|
|
23931
24321
|
else {
|
|
23932
|
-
pivot.engineModule.
|
|
23933
|
-
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
23934
|
-
pivot.engineModule.applyValueSorting();
|
|
23935
|
-
pivot.engineModule.updateEngine();
|
|
24322
|
+
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
23936
24323
|
}
|
|
24324
|
+
pivot.allowServerDataBinding = false;
|
|
24325
|
+
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
24326
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
24327
|
+
delete pivot.bulkChanges.pivotValues;
|
|
24328
|
+
pivot.allowServerDataBinding = true;
|
|
24329
|
+
let actionInfo = {
|
|
24330
|
+
valueSortInfo: this.engineModule.valueSortSettings
|
|
24331
|
+
};
|
|
24332
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24333
|
+
pivot.renderPivotGrid();
|
|
23937
24334
|
}
|
|
23938
|
-
|
|
23939
|
-
|
|
23940
|
-
|
|
23941
|
-
else {
|
|
23942
|
-
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
23943
|
-
}
|
|
23944
|
-
pivot.allowServerDataBinding = false;
|
|
23945
|
-
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
23946
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
23947
|
-
delete pivot.bulkChanges.pivotValues;
|
|
23948
|
-
pivot.allowServerDataBinding = true;
|
|
23949
|
-
pivot.renderPivotGrid();
|
|
24335
|
+
}
|
|
24336
|
+
catch (execption) {
|
|
24337
|
+
this.actionFailureMethod(execption);
|
|
23950
24338
|
}
|
|
23951
24339
|
}
|
|
23952
24340
|
else if (target.classList.contains(COLLAPSE) || target.classList.contains(EXPAND)) {
|
|
23953
|
-
|
|
24341
|
+
let drillFieldName = target.parentElement.getAttribute('fieldname');
|
|
24342
|
+
let fieldInfo = PivotUtil.getFieldInfo(drillFieldName, this);
|
|
24343
|
+
let actionName = target.classList.contains(COLLAPSE) ? this.actionObj.actionName = drillUp : target.classList.contains(EXPAND) ? this.actionObj.actionName = drillDown : '';
|
|
24344
|
+
this.actionObj.actionName = actionName;
|
|
24345
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
24346
|
+
if (this.actionBeginMethod()) {
|
|
24347
|
+
return;
|
|
24348
|
+
}
|
|
24349
|
+
try {
|
|
24350
|
+
this.onDrill(target);
|
|
24351
|
+
}
|
|
24352
|
+
catch (execption) {
|
|
24353
|
+
this.actionFailureMethod(execption);
|
|
24354
|
+
}
|
|
23954
24355
|
}
|
|
23955
24356
|
else {
|
|
23956
24357
|
this.CellClicked(target, e);
|
|
@@ -24048,7 +24449,8 @@ let PivotView = class PivotView extends Component {
|
|
|
24048
24449
|
let firstColWidth = this.pivotColumns[0].width;
|
|
24049
24450
|
let eventArgs = {
|
|
24050
24451
|
columns: this.pivotColumns,
|
|
24051
|
-
dataSourceSettings: this.dataSourceSettings
|
|
24452
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
24453
|
+
stackedColumns: this.getStackedColumns(gridcolumns, [])
|
|
24052
24454
|
};
|
|
24053
24455
|
this.trigger(beforeColumnsRender, eventArgs);
|
|
24054
24456
|
if (this.enableVirtualization && eventArgs.columns.length > 0 && eventArgs.columns[0].width !== gridcolumns[0].width) {
|
|
@@ -24152,8 +24554,16 @@ let PivotView = class PivotView extends Component {
|
|
|
24152
24554
|
/* eslint-disable-next-line */
|
|
24153
24555
|
/** @hidden */
|
|
24154
24556
|
onWindowResize() {
|
|
24557
|
+
this.actionObj.actionName = windowResize;
|
|
24558
|
+
if (this.actionBeginMethod()) {
|
|
24559
|
+
return;
|
|
24560
|
+
}
|
|
24155
24561
|
clearTimeout(this.timeOutObj);
|
|
24156
24562
|
this.timeOutObj = setTimeout(this.layoutRefresh.bind(this), 500);
|
|
24563
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24564
|
+
if (this.actionObj.actionName) {
|
|
24565
|
+
this.actionCompleteMethod();
|
|
24566
|
+
}
|
|
24157
24567
|
}
|
|
24158
24568
|
/**
|
|
24159
24569
|
* Refreshes the Pivot Table for blazor layoutRefresh is called for other base refresh is called.
|
|
@@ -24537,7 +24947,9 @@ let PivotView = class PivotView extends Component {
|
|
|
24537
24947
|
isDrillThrough: (this.allowDrillThrough || this.editSettings.allowEditing),
|
|
24538
24948
|
localeObj: this.localeObj,
|
|
24539
24949
|
fieldsType: this.fieldsType,
|
|
24540
|
-
clonedReport: this.clonedReport
|
|
24950
|
+
clonedReport: this.clonedReport,
|
|
24951
|
+
globalize: this.globalize,
|
|
24952
|
+
currenyCode: this.currencyCode
|
|
24541
24953
|
};
|
|
24542
24954
|
if (this.dataType === 'pivot') {
|
|
24543
24955
|
if (this.dataSourceSettings.groupSettings && this.dataSourceSettings.groupSettings.length > 0) {
|
|
@@ -24763,7 +25175,8 @@ let PivotView = class PivotView extends Component {
|
|
|
24763
25175
|
let str = 'color: ' + format[k].style.color + '!important;background-color: ' + format[k].style.backgroundColor +
|
|
24764
25176
|
'!important;font-size: ' + format[k].style.fontSize + '!important;font-family: ' + format[k].style.fontFamily +
|
|
24765
25177
|
' !important;';
|
|
24766
|
-
|
|
25178
|
+
let formatClass = '.format' + this.element.id + k;
|
|
25179
|
+
sheet.insertRule(formatClass + ', ' + formatClass + ' .e-cellvalue' + '{' + str + '}', 0);
|
|
24767
25180
|
}
|
|
24768
25181
|
}
|
|
24769
25182
|
}
|
|
@@ -24989,6 +25402,64 @@ let PivotView = class PivotView extends Component {
|
|
|
24989
25402
|
EventHandler.remove(document, this.isAdaptive ? 'touchend' : 'click', this.removeButtonFocus);
|
|
24990
25403
|
window.removeEventListener('resize', this.onWindowResize.bind(this), true);
|
|
24991
25404
|
}
|
|
25405
|
+
/** @hidden */
|
|
25406
|
+
actionBeginMethod() {
|
|
25407
|
+
let eventArgs = {
|
|
25408
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
25409
|
+
actionName: this.actionObj.actionName,
|
|
25410
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
25411
|
+
cancel: false
|
|
25412
|
+
};
|
|
25413
|
+
this.trigger(actionBegin, eventArgs);
|
|
25414
|
+
return eventArgs.cancel;
|
|
25415
|
+
}
|
|
25416
|
+
/** @hidden */
|
|
25417
|
+
actionCompleteMethod() {
|
|
25418
|
+
let eventArgs = {
|
|
25419
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
25420
|
+
actionName: this.actionObj.actionName,
|
|
25421
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
25422
|
+
actionInfo: this.actionObj.actionInfo
|
|
25423
|
+
};
|
|
25424
|
+
this.trigger(actionComplete, eventArgs);
|
|
25425
|
+
this.actionObj.actionName = '';
|
|
25426
|
+
this.actionObj.actionInfo = undefined;
|
|
25427
|
+
this.actionObj.fieldInfo = undefined;
|
|
25428
|
+
}
|
|
25429
|
+
/** @hidden */
|
|
25430
|
+
actionFailureMethod(error) {
|
|
25431
|
+
let eventArgs = {
|
|
25432
|
+
actionName: this.actionObj.actionName,
|
|
25433
|
+
errorInfo: error
|
|
25434
|
+
};
|
|
25435
|
+
this.trigger(actionFailure, eventArgs);
|
|
25436
|
+
}
|
|
25437
|
+
/** @hidden */
|
|
25438
|
+
getActionCompleteName() {
|
|
25439
|
+
let actionName = (this.actionObj.actionName == openConditionalFormatting) ? conditionallyFormatted : (this.actionObj.actionName == openNumberFormatting) ? numberFormatted
|
|
25440
|
+
: (this.actionObj.actionName == tableView) ? tableViewed : (this.actionObj.actionName == chartView) ? chartViewed : (this.actionObj.actionName == hideSubTotals) ? subTotalsHidden : (this.actionObj.actionName == subTotalsRow) ? subTotalsRowShown
|
|
25441
|
+
: (this.actionObj.actionName == subTotalsColumn) ? subTotalsColumnShown : (this.actionObj.actionName == showSubTotals) ? subTotalsShown : (this.actionObj.actionName == hideGrandTotals) ? grandTotalsHidden
|
|
25442
|
+
: (this.actionObj.actionName == grandTotalsRow) ? grandTotalsRowShown : (this.actionObj.actionName == grandTotalsColumn) ? grandTotalsColumnShown : (this.actionObj.actionName == showGrandTotals) ? grandTotalsShown
|
|
25443
|
+
: (this.actionObj.actionName == sortValue) ? valueSorted : (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
25444
|
+
: (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
|
|
25445
|
+
: this.actionObj.actionName == saveEditedRecords ? editedRecordsSaved : this.actionObj.actionName == addNewRecord ? newRecordAdded
|
|
25446
|
+
: this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
|
|
25447
|
+
: (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
|
|
25448
|
+
: this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
|
|
25449
|
+
: (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : this.actionObj.actionName;
|
|
25450
|
+
return actionName;
|
|
25451
|
+
}
|
|
25452
|
+
/* eslint-disable-next-line */
|
|
25453
|
+
/** @hidden */
|
|
25454
|
+
getStackedColumns(gridcolumns, stackedColumns) {
|
|
25455
|
+
for (let column of gridcolumns) {
|
|
25456
|
+
stackedColumns.push(column);
|
|
25457
|
+
if (column.columns && column.columns.length > 0) {
|
|
25458
|
+
this.getStackedColumns(column.columns, stackedColumns);
|
|
25459
|
+
}
|
|
25460
|
+
}
|
|
25461
|
+
return stackedColumns;
|
|
25462
|
+
}
|
|
24992
25463
|
/**
|
|
24993
25464
|
* To destroy the PivotView elements.
|
|
24994
25465
|
* @returns {void}
|
|
@@ -25052,8 +25523,8 @@ let PivotView = class PivotView extends Component {
|
|
|
25052
25523
|
if (this.commonModule) {
|
|
25053
25524
|
this.commonModule.destroy();
|
|
25054
25525
|
}
|
|
25055
|
-
if (this.
|
|
25056
|
-
this.
|
|
25526
|
+
if (this.pivotChartModule) {
|
|
25527
|
+
this.pivotChartModule.destroy();
|
|
25057
25528
|
}
|
|
25058
25529
|
if (this.pivotButtonModule && !this.pivotButtonModule.isDestroyed) {
|
|
25059
25530
|
this.pivotButtonModule.destroy();
|
|
@@ -25108,8 +25579,8 @@ let PivotView = class PivotView extends Component {
|
|
|
25108
25579
|
if (this.commonModule) {
|
|
25109
25580
|
this.commonModule = null;
|
|
25110
25581
|
}
|
|
25111
|
-
if (this.
|
|
25112
|
-
this.
|
|
25582
|
+
if (this.pivotChartModule) {
|
|
25583
|
+
this.pivotChartModule = null;
|
|
25113
25584
|
}
|
|
25114
25585
|
if (this.pivotButtonModule) {
|
|
25115
25586
|
this.pivotButtonModule = null;
|
|
@@ -25129,6 +25600,12 @@ let PivotView = class PivotView extends Component {
|
|
|
25129
25600
|
if (this.drillThroughModule) {
|
|
25130
25601
|
this.drillThroughModule = null;
|
|
25131
25602
|
}
|
|
25603
|
+
if (this.clonedDataSet) {
|
|
25604
|
+
this.clonedDataSet = null;
|
|
25605
|
+
}
|
|
25606
|
+
if (this.clonedReport) {
|
|
25607
|
+
this.clonedReport = null;
|
|
25608
|
+
}
|
|
25132
25609
|
this.element.innerHTML = '';
|
|
25133
25610
|
removeClass([this.element], ROOT);
|
|
25134
25611
|
removeClass([this.element], RTL);
|
|
@@ -25472,6 +25949,15 @@ __decorate([
|
|
|
25472
25949
|
__decorate([
|
|
25473
25950
|
Event()
|
|
25474
25951
|
], PivotView.prototype, "beforeServiceInvoke", void 0);
|
|
25952
|
+
__decorate([
|
|
25953
|
+
Event()
|
|
25954
|
+
], PivotView.prototype, "actionBegin", void 0);
|
|
25955
|
+
__decorate([
|
|
25956
|
+
Event()
|
|
25957
|
+
], PivotView.prototype, "actionComplete", void 0);
|
|
25958
|
+
__decorate([
|
|
25959
|
+
Event()
|
|
25960
|
+
], PivotView.prototype, "actionFailure", void 0);
|
|
25475
25961
|
PivotView = __decorate([
|
|
25476
25962
|
NotifyPropertyChanges
|
|
25477
25963
|
], PivotView);
|
|
@@ -25484,6 +25970,247 @@ PivotView = __decorate([
|
|
|
25484
25970
|
* Renderer Export
|
|
25485
25971
|
*/
|
|
25486
25972
|
|
|
25973
|
+
/**
|
|
25974
|
+
* This is a file to perform common utility for OLAP and Relational datasource
|
|
25975
|
+
* @hidden
|
|
25976
|
+
*/
|
|
25977
|
+
class PivotExportUtil {
|
|
25978
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
25979
|
+
static getDefinedObj(data) {
|
|
25980
|
+
let keyPos = 0;
|
|
25981
|
+
let framedSet = {};
|
|
25982
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
25983
|
+
if (!(data === null || data === undefined)) {
|
|
25984
|
+
let fields = Object.keys(data);
|
|
25985
|
+
while (keyPos < fields.length) {
|
|
25986
|
+
if (!(data[fields[keyPos]] === null || data[fields[keyPos]] === undefined)) {
|
|
25987
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
25988
|
+
}
|
|
25989
|
+
keyPos++;
|
|
25990
|
+
}
|
|
25991
|
+
}
|
|
25992
|
+
else {
|
|
25993
|
+
framedSet = data;
|
|
25994
|
+
}
|
|
25995
|
+
return framedSet;
|
|
25996
|
+
}
|
|
25997
|
+
static getClonedPivotValues(pivotValues) {
|
|
25998
|
+
let clonedSets = [];
|
|
25999
|
+
for (let i = 0; i < pivotValues.length; i++) {
|
|
26000
|
+
if (pivotValues[i]) {
|
|
26001
|
+
clonedSets[i] = [];
|
|
26002
|
+
for (let j = 0; j < pivotValues[i].length; j++) {
|
|
26003
|
+
if (pivotValues[i][j]) {
|
|
26004
|
+
/* eslint-disable */
|
|
26005
|
+
clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
|
|
26006
|
+
/* eslint-enable */
|
|
26007
|
+
}
|
|
26008
|
+
}
|
|
26009
|
+
}
|
|
26010
|
+
}
|
|
26011
|
+
return clonedSets;
|
|
26012
|
+
}
|
|
26013
|
+
/* eslint-disable */
|
|
26014
|
+
static getClonedPivotValueObj(data) {
|
|
26015
|
+
/* eslint-enable */
|
|
26016
|
+
let keyPos = 0;
|
|
26017
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
26018
|
+
let framedSet = {};
|
|
26019
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
26020
|
+
if (!(data === null || data === undefined)) {
|
|
26021
|
+
let fields = Object.keys(data);
|
|
26022
|
+
while (keyPos < fields.length) {
|
|
26023
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
26024
|
+
keyPos++;
|
|
26025
|
+
}
|
|
26026
|
+
}
|
|
26027
|
+
else {
|
|
26028
|
+
framedSet = data;
|
|
26029
|
+
}
|
|
26030
|
+
return framedSet;
|
|
26031
|
+
}
|
|
26032
|
+
/* eslint-disable */
|
|
26033
|
+
static isContainCommonElements(collection1, collection2) {
|
|
26034
|
+
/* eslint-enable */
|
|
26035
|
+
for (let i = 0, cnt = collection1.length; i < cnt; i++) {
|
|
26036
|
+
for (let j = 0, lnt = collection2.length; j < lnt; j++) {
|
|
26037
|
+
if (collection2[j] === collection1[i]) {
|
|
26038
|
+
return true;
|
|
26039
|
+
}
|
|
26040
|
+
}
|
|
26041
|
+
}
|
|
26042
|
+
return false;
|
|
26043
|
+
}
|
|
26044
|
+
/* eslint-disable */
|
|
26045
|
+
static formatPdfHeaderFooter(pdf) {
|
|
26046
|
+
let contents = [];
|
|
26047
|
+
if (!isNullOrUndefined(pdf)) {
|
|
26048
|
+
for (let i = 0; i < pdf.length; i++) {
|
|
26049
|
+
let a = pdf[i];
|
|
26050
|
+
let content = {
|
|
26051
|
+
/* eslint-enable */
|
|
26052
|
+
type: a.Type,
|
|
26053
|
+
pageNumberType: a.PageNumberType,
|
|
26054
|
+
style: a.Style ? {
|
|
26055
|
+
penColor: a.Style.PenColor,
|
|
26056
|
+
penSize: a.Style.PenSize,
|
|
26057
|
+
dashStyle: a.Style.DashStyle,
|
|
26058
|
+
textBrushColor: a.Style.TextBrushColor,
|
|
26059
|
+
textPenColor: a.Style.TextPenColor,
|
|
26060
|
+
fontSize: a.Style.FontSize,
|
|
26061
|
+
hAlign: a.Style.HAlign,
|
|
26062
|
+
vAlign: a.Style.VAlign
|
|
26063
|
+
} : a.Style,
|
|
26064
|
+
points: a.Points !== null ? {
|
|
26065
|
+
x1: a.Points.X1,
|
|
26066
|
+
y1: a.Points.Y1,
|
|
26067
|
+
x2: a.Points.X2,
|
|
26068
|
+
y2: a.Points.Y2
|
|
26069
|
+
} : null,
|
|
26070
|
+
format: a.Format,
|
|
26071
|
+
position: a.Position !== null ? {
|
|
26072
|
+
x: a.Position.X,
|
|
26073
|
+
y: a.Position.Y
|
|
26074
|
+
} : null,
|
|
26075
|
+
size: a.Size !== null ? {
|
|
26076
|
+
height: a.Size.Height,
|
|
26077
|
+
width: a.Size.Width
|
|
26078
|
+
} : null,
|
|
26079
|
+
src: a.Src,
|
|
26080
|
+
value: a.Value,
|
|
26081
|
+
font: a.Font
|
|
26082
|
+
};
|
|
26083
|
+
contents.push(content);
|
|
26084
|
+
}
|
|
26085
|
+
}
|
|
26086
|
+
return contents;
|
|
26087
|
+
}
|
|
26088
|
+
/* eslint-disable */
|
|
26089
|
+
static formatPdfExportProperties(pdf) {
|
|
26090
|
+
let values;
|
|
26091
|
+
/* eslint-enable */
|
|
26092
|
+
values = this.getDefinedObj({
|
|
26093
|
+
pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
|
|
26094
|
+
pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
|
|
26095
|
+
header: !isNullOrUndefined(pdf.Header) ? {
|
|
26096
|
+
fromTop: pdf.Header.FromTop,
|
|
26097
|
+
height: pdf.Header.Height,
|
|
26098
|
+
contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
|
|
26099
|
+
} : null,
|
|
26100
|
+
columns: pdf.Columns,
|
|
26101
|
+
footer: !isNullOrUndefined(pdf.Footer) ? {
|
|
26102
|
+
fromTop: pdf.Footer.FromBottom,
|
|
26103
|
+
height: pdf.Footer.Height,
|
|
26104
|
+
contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
|
|
26105
|
+
} : null,
|
|
26106
|
+
includeHiddenColumn: pdf.IncludeHiddenColumn,
|
|
26107
|
+
dataSource: pdf.DataSource,
|
|
26108
|
+
exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
|
|
26109
|
+
theme: !isNullOrUndefined(pdf.Theme) ? {
|
|
26110
|
+
header: pdf.Theme.Header,
|
|
26111
|
+
record: pdf.Theme.Record,
|
|
26112
|
+
caption: pdf.Theme.Caption
|
|
26113
|
+
} : null,
|
|
26114
|
+
fileName: pdf.FileName,
|
|
26115
|
+
hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
|
|
26116
|
+
allowHorizontalOverflow: pdf.AllowHorizontalOverflow
|
|
26117
|
+
});
|
|
26118
|
+
return values;
|
|
26119
|
+
}
|
|
26120
|
+
/* eslint-disable */
|
|
26121
|
+
static formatExcelStyle(style) {
|
|
26122
|
+
let prop;
|
|
26123
|
+
/* eslint-enable */
|
|
26124
|
+
if (!isNullOrUndefined(style)) {
|
|
26125
|
+
prop = this.getDefinedObj({
|
|
26126
|
+
fontColor: style.FontColor,
|
|
26127
|
+
fontName: style.FontName,
|
|
26128
|
+
fontSize: style.FontSize,
|
|
26129
|
+
hAlign: style.HAlign === String ? style.HAlign : null,
|
|
26130
|
+
vAlign: style.VAlign === String ? style.VAlign : null,
|
|
26131
|
+
bold: style.Bold,
|
|
26132
|
+
indent: style.Indent,
|
|
26133
|
+
italic: style.Italic,
|
|
26134
|
+
underline: style.Underline,
|
|
26135
|
+
backColor: style.BackColor,
|
|
26136
|
+
wrapText: style.WrapText,
|
|
26137
|
+
borders: style.Borders,
|
|
26138
|
+
numberFormat: style.NumberFormat,
|
|
26139
|
+
type: style.Type
|
|
26140
|
+
});
|
|
26141
|
+
}
|
|
26142
|
+
return prop;
|
|
26143
|
+
}
|
|
26144
|
+
/* eslint-disable */
|
|
26145
|
+
static formatExcelCell(cell) {
|
|
26146
|
+
let cells = [];
|
|
26147
|
+
if (!isNullOrUndefined(cell)) {
|
|
26148
|
+
for (let i = 0; i < cell.length; i++) {
|
|
26149
|
+
this.getDefinedObj({
|
|
26150
|
+
index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
|
|
26151
|
+
colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
|
|
26152
|
+
value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
|
|
26153
|
+
hyperlink: {
|
|
26154
|
+
target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
|
|
26155
|
+
displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
|
|
26156
|
+
},
|
|
26157
|
+
styles: this.formatExcelStyle(cell[i].Style),
|
|
26158
|
+
rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
|
|
26159
|
+
});
|
|
26160
|
+
/* eslint-enable */
|
|
26161
|
+
}
|
|
26162
|
+
}
|
|
26163
|
+
return cells;
|
|
26164
|
+
}
|
|
26165
|
+
/* eslint-disable */
|
|
26166
|
+
static formatExcelHeaderFooter(excel) {
|
|
26167
|
+
let rows = [];
|
|
26168
|
+
if (!isNullOrUndefined(excel)) {
|
|
26169
|
+
for (let i = 0; i < excel.Rows.length; i++) {
|
|
26170
|
+
let row = excel.Rows[i];
|
|
26171
|
+
let prop = this.getDefinedObj({
|
|
26172
|
+
index: !isNullOrUndefined(row.Index) ? row.Index : null,
|
|
26173
|
+
cells: this.formatExcelCell(row.Cells),
|
|
26174
|
+
grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
|
|
26175
|
+
});
|
|
26176
|
+
rows.push(prop);
|
|
26177
|
+
}
|
|
26178
|
+
}
|
|
26179
|
+
return rows;
|
|
26180
|
+
}
|
|
26181
|
+
static formatExcelExportProperties(excel) {
|
|
26182
|
+
/* eslint-enable */
|
|
26183
|
+
let prop;
|
|
26184
|
+
prop = this.getDefinedObj({
|
|
26185
|
+
dataSource: excel.DataSource,
|
|
26186
|
+
query: excel.Query,
|
|
26187
|
+
multipleExport: this.getDefinedObj({
|
|
26188
|
+
type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
|
|
26189
|
+
blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
|
|
26190
|
+
}),
|
|
26191
|
+
header: this.getDefinedObj({
|
|
26192
|
+
headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
|
|
26193
|
+
rows: this.formatExcelHeaderFooter(excel.Header)
|
|
26194
|
+
}),
|
|
26195
|
+
footer: this.getDefinedObj({
|
|
26196
|
+
footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
|
|
26197
|
+
rows: this.formatExcelHeaderFooter(excel.Footer)
|
|
26198
|
+
}),
|
|
26199
|
+
columns: excel.Columns,
|
|
26200
|
+
exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
|
|
26201
|
+
includeHiddenColumn: excel.IncludeHiddenColumn,
|
|
26202
|
+
theme: !isNullOrUndefined(excel.Theme) ? {
|
|
26203
|
+
header: this.formatExcelStyle(excel.Theme.Header),
|
|
26204
|
+
record: this.formatExcelStyle(excel.Theme.Record),
|
|
26205
|
+
caption: this.formatExcelStyle(excel.Theme.Caption)
|
|
26206
|
+
} : undefined,
|
|
26207
|
+
fileName: excel.FileName,
|
|
26208
|
+
hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
|
|
26209
|
+
});
|
|
26210
|
+
return prop;
|
|
26211
|
+
}
|
|
26212
|
+
}
|
|
26213
|
+
|
|
25487
26214
|
/**
|
|
25488
26215
|
* @hidden
|
|
25489
26216
|
* `ExcelExport` module is used to handle the Excel export action.
|
|
@@ -25551,7 +26278,7 @@ class ExcelExport$1 {
|
|
|
25551
26278
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
25552
26279
|
/** Event trigerring */
|
|
25553
26280
|
let clonedValues;
|
|
25554
|
-
let currentPivotValues =
|
|
26281
|
+
let currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
25555
26282
|
let customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
|
|
25556
26283
|
if (isHeaderSet) {
|
|
25557
26284
|
this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
|
|
@@ -25561,7 +26288,7 @@ class ExcelExport$1 {
|
|
|
25561
26288
|
this.engine.pageSettings = null;
|
|
25562
26289
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
25563
26290
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
25564
|
-
clonedValues =
|
|
26291
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
25565
26292
|
this.engine.pivotValues = currentPivotValues;
|
|
25566
26293
|
this.engine.pageSettings = pageSettings;
|
|
25567
26294
|
}
|
|
@@ -25605,15 +26332,17 @@ class ExcelExport$1 {
|
|
|
25605
26332
|
let pivotCell = pivotValues[rCnt][cCnt];
|
|
25606
26333
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25607
26334
|
let cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
|
|
25608
|
-
|
|
25609
|
-
|
|
25610
|
-
|
|
26335
|
+
let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
26336
|
+
|| (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
|
|
26337
|
+
if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
|
|
26338
|
+
cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
|
|
25611
26339
|
}
|
|
25612
26340
|
else if (pivotCell.type === 'sum') {
|
|
25613
26341
|
cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
|
|
25614
26342
|
}
|
|
25615
26343
|
else {
|
|
25616
|
-
cellValue = (this.parent.
|
|
26344
|
+
cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
|
|
26345
|
+
=== pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
25617
26346
|
}
|
|
25618
26347
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25619
26348
|
cells.push({
|
|
@@ -26125,13 +26854,13 @@ class PDFExport {
|
|
|
26125
26854
|
applyEvent() {
|
|
26126
26855
|
/** Event trigerring */
|
|
26127
26856
|
let clonedValues;
|
|
26128
|
-
let currentPivotValues =
|
|
26857
|
+
let currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26129
26858
|
if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
|
|
26130
26859
|
let pageSettings = this.engine.pageSettings;
|
|
26131
26860
|
this.engine.pageSettings = null;
|
|
26132
26861
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
26133
26862
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
26134
|
-
clonedValues =
|
|
26863
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26135
26864
|
this.engine.pivotValues = currentPivotValues;
|
|
26136
26865
|
this.engine.pageSettings = pageSettings;
|
|
26137
26866
|
}
|
|
@@ -26620,31 +27349,50 @@ class DialogRenderer {
|
|
|
26620
27349
|
return axisWrapper;
|
|
26621
27350
|
}
|
|
26622
27351
|
showCalculatedField(event) {
|
|
26623
|
-
|
|
26624
|
-
if (this.parent.
|
|
26625
|
-
this.parent.
|
|
26626
|
-
|
|
27352
|
+
try {
|
|
27353
|
+
if (!this.parent.isAdaptive) {
|
|
27354
|
+
this.parent.actionObj.actionName = openCalculatedField;
|
|
27355
|
+
if (this.parent.actionBeginMethod()) {
|
|
27356
|
+
return;
|
|
27357
|
+
}
|
|
27358
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
27359
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
27360
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
27361
|
+
}
|
|
26627
27362
|
}
|
|
27363
|
+
this.parent.notify(initCalculatedField, {});
|
|
27364
|
+
}
|
|
27365
|
+
catch (execption) {
|
|
27366
|
+
this.parent.actionFailureMethod(execption);
|
|
26628
27367
|
}
|
|
26629
|
-
this.parent.notify(initCalculatedField, {});
|
|
26630
27368
|
}
|
|
26631
27369
|
showFieldListDialog(event) {
|
|
26632
27370
|
let activeindex = this.adaptiveElement.selectedItem;
|
|
26633
27371
|
this.parent.treeViewModule.render(activeindex);
|
|
26634
27372
|
}
|
|
26635
27373
|
onShowFieldList() {
|
|
26636
|
-
|
|
26637
|
-
|
|
26638
|
-
|
|
27374
|
+
this.parent.actionObj.actionName = showFieldList;
|
|
27375
|
+
if (this.parent.actionBeginMethod()) {
|
|
27376
|
+
return;
|
|
27377
|
+
}
|
|
27378
|
+
this.parent.actionObj.actionName = '';
|
|
27379
|
+
try {
|
|
27380
|
+
if (this.parent.allowDeferLayoutUpdate) {
|
|
27381
|
+
if (this.parent.isAdaptive) {
|
|
27382
|
+
this.parent.axisFieldModule.render();
|
|
27383
|
+
}
|
|
27384
|
+
this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
|
|
27385
|
+
this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
|
|
26639
27386
|
}
|
|
26640
|
-
this.parent.
|
|
26641
|
-
this.parent.
|
|
27387
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
27388
|
+
this.parent.dialogRenderer.fieldListDialog.show();
|
|
27389
|
+
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
27390
|
+
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
27391
|
+
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
27392
|
+
}
|
|
27393
|
+
catch (execption) {
|
|
27394
|
+
this.parent.actionFailureMethod(execption);
|
|
26642
27395
|
}
|
|
26643
|
-
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
26644
|
-
this.parent.dialogRenderer.fieldListDialog.show();
|
|
26645
|
-
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
26646
|
-
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
26647
|
-
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
26648
27396
|
}
|
|
26649
27397
|
onCloseFieldList() {
|
|
26650
27398
|
if (this.parent.allowDeferLayoutUpdate) {
|
|
@@ -26672,6 +27420,10 @@ class DialogRenderer {
|
|
|
26672
27420
|
}
|
|
26673
27421
|
}
|
|
26674
27422
|
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
27423
|
+
this.parent.actionObj.actionName = closeFieldlist;
|
|
27424
|
+
if (this.parent.actionObj.actionName) {
|
|
27425
|
+
this.parent.actionCompleteMethod();
|
|
27426
|
+
}
|
|
26675
27427
|
}
|
|
26676
27428
|
removeFieldListIcon() {
|
|
26677
27429
|
if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
|
|
@@ -27547,28 +28299,41 @@ class TreeViewRenderer {
|
|
|
27547
28299
|
updateSorting(args) {
|
|
27548
28300
|
let target = args.target;
|
|
27549
28301
|
let option = target.getAttribute('data-sort');
|
|
27550
|
-
|
|
27551
|
-
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27555
|
-
|
|
27556
|
-
|
|
27557
|
-
|
|
27558
|
-
|
|
27559
|
-
|
|
27560
|
-
|
|
27561
|
-
|
|
27562
|
-
|
|
27563
|
-
|
|
27564
|
-
|
|
27565
|
-
|
|
27566
|
-
|
|
27567
|
-
|
|
27568
|
-
|
|
27569
|
-
|
|
28302
|
+
this.parent.actionObj.actionName = sortFieldTree;
|
|
28303
|
+
if (this.parent.actionBeginMethod()) {
|
|
28304
|
+
return;
|
|
28305
|
+
}
|
|
28306
|
+
try {
|
|
28307
|
+
if (target.className.indexOf('e-selected') === -1) {
|
|
28308
|
+
switch (option) {
|
|
28309
|
+
case 'None':
|
|
28310
|
+
this.fieldListSort = 'None';
|
|
28311
|
+
addClass([target], 'e-selected');
|
|
28312
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
28313
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
28314
|
+
break;
|
|
28315
|
+
case 'Ascend':
|
|
28316
|
+
this.fieldListSort = 'Ascend';
|
|
28317
|
+
addClass([target], 'e-selected');
|
|
28318
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
28319
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
28320
|
+
break;
|
|
28321
|
+
case 'Descend':
|
|
28322
|
+
this.fieldListSort = 'Descend';
|
|
28323
|
+
addClass([target], 'e-selected');
|
|
28324
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
28325
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
28326
|
+
break;
|
|
28327
|
+
}
|
|
28328
|
+
this.refreshTreeView();
|
|
27570
28329
|
}
|
|
27571
|
-
|
|
28330
|
+
}
|
|
28331
|
+
catch (execption) {
|
|
28332
|
+
this.parent.actionFailureMethod(execption);
|
|
28333
|
+
}
|
|
28334
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
28335
|
+
if (this.parent.actionObj.actionName) {
|
|
28336
|
+
this.parent.actionCompleteMethod();
|
|
27572
28337
|
}
|
|
27573
28338
|
}
|
|
27574
28339
|
/* eslint-disable */
|
|
@@ -27930,7 +28695,7 @@ class PivotButton {
|
|
|
27930
28695
|
attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
|
|
27931
28696
|
className: ICON + ' ' + CALC_EDIT
|
|
27932
28697
|
});
|
|
27933
|
-
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
|
|
28698
|
+
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
|
|
27934
28699
|
removeClass([calcElement], ICON_DISABLE);
|
|
27935
28700
|
}
|
|
27936
28701
|
else {
|
|
@@ -27943,7 +28708,7 @@ class PivotButton {
|
|
|
27943
28708
|
className: ICON + ' ' + REMOVE_CLASS
|
|
27944
28709
|
});
|
|
27945
28710
|
if (this.parent.getModuleName() === 'pivotview') {
|
|
27946
|
-
if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
|
|
28711
|
+
if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
|
|
27947
28712
|
removeClass([removeElement], ICON_DISABLE);
|
|
27948
28713
|
}
|
|
27949
28714
|
else {
|
|
@@ -27951,7 +28716,7 @@ class PivotButton {
|
|
|
27951
28716
|
}
|
|
27952
28717
|
}
|
|
27953
28718
|
else {
|
|
27954
|
-
if (field[i].showRemoveIcon) {
|
|
28719
|
+
if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
|
|
27955
28720
|
removeClass([removeElement], ICON_DISABLE);
|
|
27956
28721
|
}
|
|
27957
28722
|
else {
|
|
@@ -27983,13 +28748,13 @@ class PivotButton {
|
|
|
27983
28748
|
}
|
|
27984
28749
|
if (axis === 'values') {
|
|
27985
28750
|
for (let element of this.parentElement.querySelectorAll('.e-group-' + axis)) {
|
|
27986
|
-
if (element.classList.contains(GROUP_CHART_VALUE) && this.parent.
|
|
28751
|
+
if (element.classList.contains(GROUP_CHART_VALUE) && this.parent.pivotChartModule) {
|
|
27987
28752
|
let valueData = field.map((item) => { return { text: item.caption ? item.caption : item.name, value: item.name }; });
|
|
27988
28753
|
let parent = this.parent;
|
|
27989
28754
|
if (this.valueFiedDropDownList && element.querySelector('.' + GROUP_CHART_VALUE_DROPDOWN_DIV)) {
|
|
27990
28755
|
this.valueFiedDropDownList.dataSource = valueData;
|
|
27991
28756
|
this.valueFiedDropDownList.value = !parent.chartSettings.enableMultipleAxis ?
|
|
27992
|
-
parent.
|
|
28757
|
+
parent.pivotChartModule.currentMeasure : valueData[0].value;
|
|
27993
28758
|
}
|
|
27994
28759
|
else {
|
|
27995
28760
|
let ddlDiv = createElement('div', { className: GROUP_CHART_VALUE_DROPDOWN_DIV });
|
|
@@ -27999,7 +28764,7 @@ class PivotButton {
|
|
|
27999
28764
|
enableRtl: this.parent.enableRtl,
|
|
28000
28765
|
locale: this.parent.locale,
|
|
28001
28766
|
value: !parent.chartSettings.enableMultipleAxis ?
|
|
28002
|
-
parent.
|
|
28767
|
+
parent.pivotChartModule.currentMeasure : valueData[0].value,
|
|
28003
28768
|
width: 200,
|
|
28004
28769
|
fields: { value: 'value', text: 'text' },
|
|
28005
28770
|
cssClass: GROUP_CHART_VALUE_DROPDOWN,
|
|
@@ -28018,14 +28783,14 @@ class PivotButton {
|
|
|
28018
28783
|
else if (axis === 'columns') {
|
|
28019
28784
|
let availColindex = undefined;
|
|
28020
28785
|
for (let element of this.parentElement.querySelectorAll('.e-group-' + axis)) {
|
|
28021
|
-
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.
|
|
28022
|
-
let currentMeasure = this.parent.
|
|
28786
|
+
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
|
|
28787
|
+
let currentMeasure = this.parent.pivotChartModule.currentMeasure;
|
|
28023
28788
|
let delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
|
|
28024
28789
|
let columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
|
|
28025
28790
|
this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
|
|
28026
28791
|
let engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
28027
28792
|
let pivotValues = engineModule.pivotValues;
|
|
28028
|
-
let totColIndex = this.parent.
|
|
28793
|
+
let totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
|
|
28029
28794
|
let rKeys = Object.keys(pivotValues);
|
|
28030
28795
|
let columnData = [];
|
|
28031
28796
|
let firstValueRow = false;
|
|
@@ -28135,7 +28900,7 @@ class PivotButton {
|
|
|
28135
28900
|
},
|
|
28136
28901
|
className: PIVOT_BUTTON_CONTENT_CLASS + ' ' +
|
|
28137
28902
|
(this.parent.getModuleName() === 'pivotview' ?
|
|
28138
|
-
this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : DRAG_DISABLE_CLASS : ''),
|
|
28903
|
+
this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS : ''),
|
|
28139
28904
|
innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
|
|
28140
28905
|
text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
|
|
28141
28906
|
text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
|
|
@@ -28201,43 +28966,54 @@ class PivotButton {
|
|
|
28201
28966
|
}
|
|
28202
28967
|
openCalculatedFieldDialog(args) {
|
|
28203
28968
|
let fieldName = args.target.parentElement.id;
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
|
|
28209
|
-
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
28210
|
-
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
28211
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28212
|
-
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
28213
|
-
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28214
|
-
}
|
|
28215
|
-
else {
|
|
28216
|
-
if (!this.parent.isAdaptive) {
|
|
28217
|
-
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28218
|
-
}
|
|
28219
|
-
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
28220
|
-
}
|
|
28969
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
28970
|
+
this.parent.actionObj.actionName = editCalculatedField;
|
|
28971
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
28972
|
+
if (this.parent.actionBeginMethod()) {
|
|
28973
|
+
return;
|
|
28221
28974
|
}
|
|
28222
|
-
|
|
28223
|
-
if (this.parent.
|
|
28224
|
-
this.parent.
|
|
28225
|
-
|
|
28226
|
-
|
|
28227
|
-
.
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
28975
|
+
try {
|
|
28976
|
+
if (this.parent.getModuleName() === 'pivotview') {
|
|
28977
|
+
if (this.parent.isAdaptive && (this.parent.showFieldList &&
|
|
28978
|
+
this.parent.pivotFieldListModule &&
|
|
28979
|
+
!this.parent.pivotFieldListModule.isDestroyed)) {
|
|
28980
|
+
this.parent.pivotFieldListModule.element
|
|
28981
|
+
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
28982
|
+
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
28983
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28984
|
+
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
28985
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28234
28986
|
}
|
|
28235
|
-
|
|
28236
|
-
|
|
28987
|
+
else {
|
|
28988
|
+
if (!this.parent.isAdaptive) {
|
|
28989
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28990
|
+
}
|
|
28991
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
28992
|
+
}
|
|
28993
|
+
}
|
|
28994
|
+
else if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
28995
|
+
if (this.parent.isAdaptive) {
|
|
28996
|
+
this.parent.dialogRenderer.adaptiveElement.select(4);
|
|
28997
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28998
|
+
this.parent.calculatedFieldModule
|
|
28999
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28237
29000
|
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28238
29001
|
}
|
|
29002
|
+
else {
|
|
29003
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
29004
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
29005
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
29006
|
+
}
|
|
29007
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29008
|
+
if (this.parent.calculatedFieldModule) {
|
|
29009
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29010
|
+
}
|
|
29011
|
+
}
|
|
28239
29012
|
}
|
|
28240
29013
|
}
|
|
29014
|
+
catch (execption) {
|
|
29015
|
+
this.parent.actionFailureMethod(execption);
|
|
29016
|
+
}
|
|
28241
29017
|
}
|
|
28242
29018
|
createDraggable(field, target) {
|
|
28243
29019
|
this.draggable = new Draggable(target, {
|
|
@@ -28261,7 +29037,7 @@ class PivotButton {
|
|
|
28261
29037
|
attrs: {
|
|
28262
29038
|
'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
|
|
28263
29039
|
},
|
|
28264
|
-
className: ICON + ' ' + DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : DRAG_DISABLE_CLASS)
|
|
29040
|
+
className: ICON + ' ' + DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS)
|
|
28265
29041
|
});
|
|
28266
29042
|
dragWrapper.appendChild(dragElement);
|
|
28267
29043
|
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
@@ -28622,38 +29398,52 @@ class PivotButton {
|
|
|
28622
29398
|
!(args.target.classList.contains(DRAG_CLASS)) &&
|
|
28623
29399
|
(buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
|
|
28624
29400
|
isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
|
|
28625
|
-
|
|
28626
|
-
|
|
28627
|
-
|
|
28628
|
-
|
|
28629
|
-
|
|
28630
|
-
|
|
28631
|
-
if ((
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
|
|
28637
|
-
|
|
29401
|
+
this.parent.actionObj.actionName = sortField;
|
|
29402
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29403
|
+
if (this.parent.actionBeginMethod()) {
|
|
29404
|
+
return;
|
|
29405
|
+
}
|
|
29406
|
+
try {
|
|
29407
|
+
if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
|
|
29408
|
+
this.parent.dataSourceSettings.enableSorting &&
|
|
29409
|
+
!(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
29410
|
+
this.parent.pivotGridModule !== undefined &&
|
|
29411
|
+
this.parent.pivotGridModule.enableVirtualization) ||
|
|
29412
|
+
(this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
|
|
29413
|
+
if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
|
|
29414
|
+
(this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
|
|
29415
|
+
this.parent.pivotGridModule.enableValueSorting))) {
|
|
29416
|
+
if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
|
|
29417
|
+
if (args.target.classList.contains('e-pivot-button')) {
|
|
29418
|
+
if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
29419
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
29420
|
+
}
|
|
28638
29421
|
}
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
29422
|
+
else {
|
|
29423
|
+
if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
29424
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
29425
|
+
}
|
|
28643
29426
|
}
|
|
28644
29427
|
}
|
|
28645
29428
|
}
|
|
29429
|
+
this.parent.pivotCommon.eventBase.updateSorting(args);
|
|
29430
|
+
if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
|
|
29431
|
+
let actionInfo = {
|
|
29432
|
+
sortInfo: this.parent.lastSortInfo
|
|
29433
|
+
};
|
|
29434
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
29435
|
+
this.updateDataSource(true);
|
|
29436
|
+
}
|
|
29437
|
+
/* eslint-disable */
|
|
29438
|
+
let thisObj = this;
|
|
29439
|
+
/* eslint-enable */
|
|
29440
|
+
if (thisObj.parent instanceof PivotFieldList) {
|
|
29441
|
+
thisObj.axisField.render();
|
|
29442
|
+
}
|
|
28646
29443
|
}
|
|
28647
|
-
|
|
28648
|
-
|
|
28649
|
-
|
|
28650
|
-
}
|
|
28651
|
-
/* eslint-disable */
|
|
28652
|
-
let thisObj = this;
|
|
28653
|
-
/* eslint-enable */
|
|
28654
|
-
if (thisObj.parent instanceof PivotFieldList) {
|
|
28655
|
-
thisObj.axisField.render();
|
|
28656
|
-
}
|
|
29444
|
+
}
|
|
29445
|
+
catch (execption) {
|
|
29446
|
+
this.parent.actionFailureMethod(execption);
|
|
28657
29447
|
}
|
|
28658
29448
|
}
|
|
28659
29449
|
}
|
|
@@ -28685,26 +29475,37 @@ class PivotButton {
|
|
|
28685
29475
|
updateFiltering(args) {
|
|
28686
29476
|
/* eslint-disable */
|
|
28687
29477
|
let pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
|
|
28688
|
-
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
28689
|
-
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
28690
|
-
}
|
|
28691
|
-
else {
|
|
28692
|
-
pivotObj.showWaitingPopup();
|
|
28693
|
-
}
|
|
28694
|
-
pivotObj.mouseEventArgs = args;
|
|
28695
|
-
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
28696
|
-
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
28697
29478
|
let fieldName = args.target.parentElement.id;
|
|
28698
|
-
|
|
28699
|
-
|
|
28700
|
-
|
|
29479
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
29480
|
+
this.parent.actionObj.actionName = filterField;
|
|
29481
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29482
|
+
if (this.parent.actionBeginMethod()) {
|
|
29483
|
+
return;
|
|
29484
|
+
}
|
|
29485
|
+
try {
|
|
29486
|
+
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
29487
|
+
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
28701
29488
|
}
|
|
28702
29489
|
else {
|
|
28703
|
-
pivotObj.
|
|
29490
|
+
pivotObj.showWaitingPopup();
|
|
29491
|
+
}
|
|
29492
|
+
pivotObj.mouseEventArgs = args;
|
|
29493
|
+
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
29494
|
+
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
29495
|
+
if (pivotObj.dataSourceSettings.mode === 'Server') {
|
|
29496
|
+
if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
|
|
29497
|
+
this.updateFilterEvents();
|
|
29498
|
+
}
|
|
29499
|
+
else {
|
|
29500
|
+
pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
|
|
29501
|
+
}
|
|
29502
|
+
}
|
|
29503
|
+
else {
|
|
29504
|
+
this.updateFilterEvents();
|
|
28704
29505
|
}
|
|
28705
29506
|
}
|
|
28706
|
-
|
|
28707
|
-
this.
|
|
29507
|
+
catch (execption) {
|
|
29508
|
+
this.parent.actionFailureMethod(execption);
|
|
28708
29509
|
}
|
|
28709
29510
|
/* eslint-enable */
|
|
28710
29511
|
}
|
|
@@ -28717,11 +29518,6 @@ class PivotButton {
|
|
|
28717
29518
|
let target = pivotObj.mouseEventArgs.target;
|
|
28718
29519
|
this.fieldName = target.parentElement.id;
|
|
28719
29520
|
if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
|
|
28720
|
-
this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
|
|
28721
|
-
this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
|
|
28722
|
-
// this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
|
|
28723
|
-
// this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
28724
|
-
// this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
|
|
28725
29521
|
this.bindDialogEvents();
|
|
28726
29522
|
}
|
|
28727
29523
|
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
@@ -28735,8 +29531,8 @@ class PivotButton {
|
|
|
28735
29531
|
if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
|
|
28736
29532
|
this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
|
|
28737
29533
|
this.updateDialogButtonEvents();
|
|
28738
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
28739
|
-
this.dialogPopUp.dataBind();
|
|
29534
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
29535
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
28740
29536
|
this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
|
|
28741
29537
|
}
|
|
28742
29538
|
else if (this.parent.dataSourceSettings.allowMemberFilter) {
|
|
@@ -28761,7 +29557,7 @@ class PivotButton {
|
|
|
28761
29557
|
click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
|
|
28762
29558
|
},
|
|
28763
29559
|
{
|
|
28764
|
-
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
|
|
29560
|
+
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
|
|
28765
29561
|
buttonModel: { cssClass: CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
|
|
28766
29562
|
}
|
|
28767
29563
|
];
|
|
@@ -28769,24 +29565,24 @@ class PivotButton {
|
|
|
28769
29565
|
tabSelect(e) {
|
|
28770
29566
|
this.index = e.selectedIndex;
|
|
28771
29567
|
this.updateDialogButtonEvents();
|
|
28772
|
-
removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
29568
|
+
removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
28773
29569
|
if (e.selectedIndex > 0) {
|
|
28774
|
-
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');
|
|
29570
|
+
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');
|
|
28775
29571
|
}
|
|
28776
29572
|
if (e.selectedIndex === 0) {
|
|
28777
29573
|
this.parent.pivotCommon.filterDialog.updateCheckedState();
|
|
28778
29574
|
}
|
|
28779
29575
|
else {
|
|
28780
|
-
this.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
28781
|
-
this.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
29576
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
29577
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
28782
29578
|
}
|
|
28783
29579
|
}
|
|
28784
29580
|
updateDialogButtonEvents() {
|
|
28785
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
28786
|
-
this.dialogPopUp.dataBind();
|
|
29581
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
29582
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
28787
29583
|
}
|
|
28788
29584
|
updateCustomFilter(args) {
|
|
28789
|
-
let dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
29585
|
+
let dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
28790
29586
|
let fieldName = dialogElement.getAttribute('data-fieldname');
|
|
28791
29587
|
let levelName = dialogElement.getAttribute('data-selectedField');
|
|
28792
29588
|
let filterType = dialogElement.getAttribute('data-type');
|
|
@@ -28856,38 +29652,18 @@ class PivotButton {
|
|
|
28856
29652
|
if (type !== 'Value') {
|
|
28857
29653
|
this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, this.parent.dataSourceSettings.filterSettings);
|
|
28858
29654
|
}
|
|
28859
|
-
this.dialogPopUp.close();
|
|
29655
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
28860
29656
|
if (!observedArgs.cancel) {
|
|
28861
29657
|
this.refreshPivotButtonState(fieldName, true);
|
|
28862
29658
|
this.updateDataSource(true);
|
|
28863
29659
|
}
|
|
28864
29660
|
});
|
|
28865
29661
|
}
|
|
28866
|
-
removeFilterDialog() {
|
|
28867
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
28868
|
-
this.dialogPopUp.destroy();
|
|
28869
|
-
setTimeout(this.setFocus.bind(this));
|
|
28870
|
-
}
|
|
28871
|
-
if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
|
|
28872
|
-
remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
|
|
28873
|
-
}
|
|
28874
|
-
}
|
|
28875
|
-
setFocus() {
|
|
28876
|
-
if (this.parentElement) {
|
|
28877
|
-
let pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
28878
|
-
for (let item of pivotButtons) {
|
|
28879
|
-
if (item.getAttribute('data-uid') === this.fieldName) {
|
|
28880
|
-
item.focus();
|
|
28881
|
-
break;
|
|
28882
|
-
}
|
|
28883
|
-
}
|
|
28884
|
-
}
|
|
28885
|
-
}
|
|
28886
29662
|
ClearFilter(e) {
|
|
28887
|
-
let dialogElement = this.dialogPopUp.element;
|
|
29663
|
+
let dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
|
|
28888
29664
|
let fieldName = dialogElement.getAttribute('data-fieldname');
|
|
28889
29665
|
let tabElement = dialogElement.querySelector('.e-selected-tab');
|
|
28890
|
-
this.dialogPopUp.close();
|
|
29666
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
28891
29667
|
if (this.parent.dataType === 'olap' && tabElement) {
|
|
28892
29668
|
let levelName = tabElement.getAttribute('data-selectedField');
|
|
28893
29669
|
this.removeDataSourceSettings(fieldName, levelName);
|
|
@@ -28903,63 +29679,73 @@ class PivotButton {
|
|
|
28903
29679
|
let target = args.target;
|
|
28904
29680
|
let fieldName = target.parentElement.id;
|
|
28905
29681
|
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
29682
|
+
this.parent.actionObj.actionName = removeField;
|
|
29683
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29684
|
+
if (this.parent.actionBeginMethod()) {
|
|
29685
|
+
return;
|
|
29686
|
+
}
|
|
28906
29687
|
let removeFieldArgs = {
|
|
28907
29688
|
cancel: false, fieldName: fieldName,
|
|
28908
29689
|
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
|
|
28909
29690
|
fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
|
|
28910
29691
|
};
|
|
28911
|
-
|
|
28912
|
-
|
|
28913
|
-
|
|
28914
|
-
|
|
28915
|
-
if (
|
|
28916
|
-
|
|
28917
|
-
|
|
28918
|
-
this.parent.
|
|
29692
|
+
try {
|
|
29693
|
+
let control = this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
29694
|
+
this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
|
|
29695
|
+
control.trigger(fieldRemove, removeFieldArgs, (observedArgs) => {
|
|
29696
|
+
if (!observedArgs.cancel) {
|
|
29697
|
+
if (target.parentElement.getAttribute('isvalue') === 'true') {
|
|
29698
|
+
this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
|
|
29699
|
+
if (this.parent.dataType === 'olap') {
|
|
29700
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
29701
|
+
}
|
|
28919
29702
|
}
|
|
28920
|
-
|
|
28921
|
-
|
|
28922
|
-
|
|
28923
|
-
|
|
28924
|
-
|
|
28925
|
-
|
|
28926
|
-
|
|
29703
|
+
else {
|
|
29704
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
|
|
29705
|
+
if (this.parent.dataType === 'pivot' && this.parent.showValuesButton && this.parent.dataSourceSettings.values.length > 1 &&
|
|
29706
|
+
fieldInfo.position < this.parent.dataSourceSettings.valueIndex && ((this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
29707
|
+
observedArgs.axis === 'rows') || (this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
|
|
29708
|
+
this.parent.setProperties({ dataSourceSettings: { valueIndex: this.parent.dataSourceSettings.valueIndex - 1 } }, true);
|
|
29709
|
+
}
|
|
29710
|
+
if (this.parent.dataType === 'olap' && this.parent.dataSourceSettings.values.length === 0) {
|
|
29711
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
29712
|
+
}
|
|
28927
29713
|
}
|
|
28928
|
-
if (this.parent.
|
|
28929
|
-
this.parent.
|
|
29714
|
+
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
29715
|
+
this.parent.axisFieldModule.render();
|
|
28930
29716
|
}
|
|
29717
|
+
this.updateDataSource();
|
|
28931
29718
|
}
|
|
28932
|
-
|
|
28933
|
-
|
|
28934
|
-
|
|
28935
|
-
|
|
28936
|
-
|
|
28937
|
-
});
|
|
29719
|
+
});
|
|
29720
|
+
}
|
|
29721
|
+
catch (execption) {
|
|
29722
|
+
this.parent.actionFailureMethod(execption);
|
|
29723
|
+
}
|
|
28938
29724
|
}
|
|
28939
29725
|
/** @hidden */
|
|
28940
29726
|
nodeStateModified(args) {
|
|
28941
29727
|
let target = closest(args.node, 'li');
|
|
28942
29728
|
let fieldName = target.getAttribute('data-fieldname');
|
|
28943
29729
|
if (target.getAttribute('data-memberId') === 'all') {
|
|
28944
|
-
this.memberTreeView.nodeChecked = null;
|
|
29730
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
|
|
28945
29731
|
if (args.action === 'check') {
|
|
28946
|
-
this.memberTreeView.checkAll();
|
|
29732
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
|
|
28947
29733
|
}
|
|
28948
29734
|
else {
|
|
28949
|
-
this.memberTreeView.uncheckAll();
|
|
29735
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
|
|
28950
29736
|
}
|
|
28951
29737
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
28952
29738
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
28953
|
-
this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
29739
|
+
this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
28954
29740
|
}
|
|
28955
29741
|
this.checkedStateAll(args.action);
|
|
28956
|
-
this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
29742
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
28957
29743
|
}
|
|
28958
29744
|
else {
|
|
28959
29745
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
28960
29746
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
28961
29747
|
// let st1: number = new Date().getTime();
|
|
28962
|
-
let checkedNodes = this.memberTreeView.getAllCheckedNodes();
|
|
29748
|
+
let checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
28963
29749
|
// let st2: number = (new Date().getTime() - st1) / 1000;
|
|
28964
29750
|
// console.log('getAllCheckedNodes:' + st2);
|
|
28965
29751
|
this.updateNodeStates(checkedNodes, fieldName, args.action);
|
|
@@ -28999,8 +29785,8 @@ class PivotButton {
|
|
|
28999
29785
|
}
|
|
29000
29786
|
if (currentMembers[member]) {
|
|
29001
29787
|
currentMembers[member].isSelected = false;
|
|
29002
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
29003
|
-
let element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
29788
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
29789
|
+
let element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
29004
29790
|
if (element && !element.querySelector('ul')) {
|
|
29005
29791
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
|
|
29006
29792
|
}
|
|
@@ -29009,8 +29795,8 @@ class PivotButton {
|
|
|
29009
29795
|
}
|
|
29010
29796
|
for (let node of checkedNodes) {
|
|
29011
29797
|
if (currentMembers[node]) {
|
|
29012
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
29013
|
-
let element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
29798
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
29799
|
+
let element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
29014
29800
|
if (element && !element.querySelector('ul')) {
|
|
29015
29801
|
currentMembers[node].isSelected = true;
|
|
29016
29802
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
|
|
@@ -29045,10 +29831,10 @@ class PivotButton {
|
|
|
29045
29831
|
!engineModule.fieldList[fieldName].isHierarchy) {
|
|
29046
29832
|
let cMembers = engineModule.fieldList[fieldName].members;
|
|
29047
29833
|
let sMembers = engineModule.fieldList[fieldName].currrentMembers;
|
|
29048
|
-
filterItem.items = this.memberTreeView.getAllCheckedNodes();
|
|
29834
|
+
filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
29049
29835
|
filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
|
|
29050
29836
|
isNodeUnChecked = (filterItem.items.length ===
|
|
29051
|
-
this.memberTreeView.fields.dataSource.length ? false : true);
|
|
29837
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
|
|
29052
29838
|
if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
|
|
29053
29839
|
let cNodeLength = Object.keys(cMembers).length;
|
|
29054
29840
|
let sNodeLength = Object.keys(sMembers).length;
|
|
@@ -29109,13 +29895,18 @@ class PivotButton {
|
|
|
29109
29895
|
}
|
|
29110
29896
|
this.parent.dataSourceSettings.filterSettings.push(filterItem);
|
|
29111
29897
|
}
|
|
29112
|
-
this.dialogPopUp.close();
|
|
29898
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
29113
29899
|
if (!observedArgs.cancel) {
|
|
29114
29900
|
this.refreshPivotButtonState(fieldName, isNodeUnChecked);
|
|
29115
29901
|
if (!isNodeUnChecked) {
|
|
29116
29902
|
this.removeDataSourceSettings(fieldName);
|
|
29903
|
+
filterItem = {};
|
|
29117
29904
|
}
|
|
29118
29905
|
this.parent.lastFilterInfo = filterItem;
|
|
29906
|
+
let actionInfo = {
|
|
29907
|
+
filterInfo: this.parent.lastFilterInfo
|
|
29908
|
+
};
|
|
29909
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
29119
29910
|
this.updateDataSource(true);
|
|
29120
29911
|
let thisObj = this;
|
|
29121
29912
|
//setTimeout(() => {
|
|
@@ -29269,14 +30060,6 @@ class PivotButton {
|
|
|
29269
30060
|
this.columnFieldDropDownList.destroy();
|
|
29270
30061
|
this.columnFieldDropDownList = null;
|
|
29271
30062
|
}
|
|
29272
|
-
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
29273
|
-
this.memberTreeView.destroy();
|
|
29274
|
-
this.memberTreeView = null;
|
|
29275
|
-
}
|
|
29276
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
29277
|
-
this.dialogPopUp.destroy();
|
|
29278
|
-
this.dialogPopUp = null;
|
|
29279
|
-
}
|
|
29280
30063
|
if (this.draggable && !this.draggable.isDestroyed) {
|
|
29281
30064
|
this.draggable.destroy();
|
|
29282
30065
|
this.draggable = null;
|
|
@@ -29416,6 +30199,8 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
29416
30199
|
this.enableValueSorting = false;
|
|
29417
30200
|
this.request = new XMLHttpRequest();
|
|
29418
30201
|
this.remoteData = [];
|
|
30202
|
+
/** @hidden */
|
|
30203
|
+
this.actionObj = {};
|
|
29419
30204
|
}
|
|
29420
30205
|
/**
|
|
29421
30206
|
* To provide the array of modules needed for control rendering
|
|
@@ -29646,7 +30431,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
29646
30431
|
enableValueSorting: enableValueSorting,
|
|
29647
30432
|
isDrillThrough: isDrillThrough,
|
|
29648
30433
|
localeObj: localeObj,
|
|
29649
|
-
clonedReport: this.clonedReport
|
|
30434
|
+
clonedReport: this.clonedReport,
|
|
30435
|
+
globalize: this.globalize,
|
|
30436
|
+
currenyCode: this.currencyCode
|
|
29650
30437
|
};
|
|
29651
30438
|
}
|
|
29652
30439
|
return customProperties;
|
|
@@ -30331,6 +31118,11 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30331
31118
|
pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
|
|
30332
31119
|
}
|
|
30333
31120
|
});
|
|
31121
|
+
let actionName = this.getActionCompleteName();
|
|
31122
|
+
this.actionObj.actionName = actionName;
|
|
31123
|
+
if (this.actionObj.actionName) {
|
|
31124
|
+
this.actionCompleteMethod();
|
|
31125
|
+
}
|
|
30334
31126
|
}
|
|
30335
31127
|
updateOlapDataSource(pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
|
|
30336
31128
|
let customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
|
|
@@ -30364,6 +31156,7 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30364
31156
|
update(control) {
|
|
30365
31157
|
if (control) {
|
|
30366
31158
|
this.clonedDataSet = control.clonedDataSet;
|
|
31159
|
+
this.clonedReport = control.clonedReport;
|
|
30367
31160
|
this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
|
|
30368
31161
|
this.engineModule = control.engineModule;
|
|
30369
31162
|
this.olapEngineModule = control.olapEngineModule;
|
|
@@ -30398,6 +31191,7 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30398
31191
|
updateView(control) {
|
|
30399
31192
|
if (control) {
|
|
30400
31193
|
control.clonedDataSet = this.clonedDataSet;
|
|
31194
|
+
control.clonedReport = this.clonedReport;
|
|
30401
31195
|
control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
|
|
30402
31196
|
control.engineModule = this.engineModule;
|
|
30403
31197
|
control.olapEngineModule = this.olapEngineModule;
|
|
@@ -30440,6 +31234,47 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30440
31234
|
}
|
|
30441
31235
|
});
|
|
30442
31236
|
}
|
|
31237
|
+
/** @hidden */
|
|
31238
|
+
actionBeginMethod() {
|
|
31239
|
+
let eventArgs = {
|
|
31240
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
31241
|
+
actionName: this.actionObj.actionName,
|
|
31242
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
31243
|
+
cancel: false
|
|
31244
|
+
};
|
|
31245
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31246
|
+
control.trigger(actionBegin, eventArgs);
|
|
31247
|
+
return eventArgs.cancel;
|
|
31248
|
+
}
|
|
31249
|
+
/** @hidden */
|
|
31250
|
+
actionCompleteMethod() {
|
|
31251
|
+
let eventArgs = {
|
|
31252
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
31253
|
+
actionName: this.actionObj.actionName,
|
|
31254
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
31255
|
+
actionInfo: this.actionObj.actionInfo
|
|
31256
|
+
};
|
|
31257
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31258
|
+
control.trigger(actionComplete, eventArgs);
|
|
31259
|
+
this.actionObj.actionName = '';
|
|
31260
|
+
this.actionObj.actionInfo = undefined;
|
|
31261
|
+
this.actionObj.fieldInfo = undefined;
|
|
31262
|
+
}
|
|
31263
|
+
/** @hidden */
|
|
31264
|
+
actionFailureMethod(error) {
|
|
31265
|
+
let eventArgs = {
|
|
31266
|
+
actionName: this.actionObj.actionName,
|
|
31267
|
+
errorInfo: error
|
|
31268
|
+
};
|
|
31269
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31270
|
+
control.trigger(actionFailure, eventArgs);
|
|
31271
|
+
}
|
|
31272
|
+
/** @hidden */
|
|
31273
|
+
getActionCompleteName() {
|
|
31274
|
+
let actionName = (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
31275
|
+
: (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == sortFieldTree ? fieldTreeSorted : this.actionObj.actionName;
|
|
31276
|
+
return actionName;
|
|
31277
|
+
}
|
|
30443
31278
|
/**
|
|
30444
31279
|
* Destroys the Field Table component.
|
|
30445
31280
|
* @function destroy
|
|
@@ -30514,6 +31349,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30514
31349
|
if (this.clonedDataSet) {
|
|
30515
31350
|
this.clonedDataSet = null;
|
|
30516
31351
|
}
|
|
31352
|
+
if (this.clonedReport) {
|
|
31353
|
+
this.clonedReport = null;
|
|
31354
|
+
}
|
|
30517
31355
|
if (this.clonedFieldList) {
|
|
30518
31356
|
this.clonedFieldList = null;
|
|
30519
31357
|
}
|
|
@@ -30562,6 +31400,9 @@ __decorate$4([
|
|
|
30562
31400
|
__decorate$4([
|
|
30563
31401
|
Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
|
|
30564
31402
|
], PivotFieldList.prototype, "aggregateTypes", void 0);
|
|
31403
|
+
__decorate$4([
|
|
31404
|
+
Property('USD')
|
|
31405
|
+
], PivotFieldList.prototype, "currencyCode", void 0);
|
|
30565
31406
|
__decorate$4([
|
|
30566
31407
|
Event()
|
|
30567
31408
|
], PivotFieldList.prototype, "load", void 0);
|
|
@@ -30610,6 +31451,15 @@ __decorate$4([
|
|
|
30610
31451
|
__decorate$4([
|
|
30611
31452
|
Event()
|
|
30612
31453
|
], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
|
|
31454
|
+
__decorate$4([
|
|
31455
|
+
Event()
|
|
31456
|
+
], PivotFieldList.prototype, "actionBegin", void 0);
|
|
31457
|
+
__decorate$4([
|
|
31458
|
+
Event()
|
|
31459
|
+
], PivotFieldList.prototype, "actionComplete", void 0);
|
|
31460
|
+
__decorate$4([
|
|
31461
|
+
Event()
|
|
31462
|
+
], PivotFieldList.prototype, "actionFailure", void 0);
|
|
30613
31463
|
PivotFieldList = __decorate$4([
|
|
30614
31464
|
NotifyPropertyChanges
|
|
30615
31465
|
], PivotFieldList);
|
|
@@ -30842,105 +31692,114 @@ class CalculatedField {
|
|
|
30842
31692
|
displayMenu(node, treeNode, target) {
|
|
30843
31693
|
let edit = target ? target.classList.contains(CALC_EDIT) : true;
|
|
30844
31694
|
let edited = target ? target.classList.contains(CALC_EDITED) : true;
|
|
30845
|
-
|
|
30846
|
-
node.querySelector('.e-list-icon.e-format')
|
|
30847
|
-
|
|
30848
|
-
|
|
30849
|
-
|
|
30850
|
-
|
|
30851
|
-
this.menuObj.
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30855
|
-
|
|
30856
|
-
|
|
30857
|
-
node.querySelector('.' + CALC_EDIT)
|
|
30858
|
-
|
|
30859
|
-
|
|
30860
|
-
|
|
30861
|
-
|
|
30862
|
-
|
|
30863
|
-
|
|
30864
|
-
|
|
30865
|
-
|
|
30866
|
-
|
|
30867
|
-
|
|
30868
|
-
|
|
30869
|
-
|
|
30870
|
-
|
|
30871
|
-
|
|
30872
|
-
|
|
30873
|
-
|
|
30874
|
-
|
|
30875
|
-
|
|
30876
|
-
|
|
30877
|
-
|
|
30878
|
-
|
|
30879
|
-
|
|
30880
|
-
|
|
30881
|
-
|
|
30882
|
-
|
|
30883
|
-
|
|
30884
|
-
|
|
31695
|
+
try {
|
|
31696
|
+
if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
|
|
31697
|
+
node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
|
|
31698
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
|
|
31699
|
+
!node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
|
|
31700
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
|
|
31701
|
+
if (this.menuObj && !this.menuObj.isDestroyed) {
|
|
31702
|
+
this.menuObj.destroy();
|
|
31703
|
+
}
|
|
31704
|
+
this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
|
|
31705
|
+
this.openContextMenu(node);
|
|
31706
|
+
}
|
|
31707
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
|
|
31708
|
+
node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
|
|
31709
|
+
(this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
|
|
31710
|
+
this.isEdit = true;
|
|
31711
|
+
let fieldName = node.getAttribute('data-field');
|
|
31712
|
+
let caption = node.getAttribute('data-caption');
|
|
31713
|
+
this.currentFieldName = fieldName;
|
|
31714
|
+
this.inputObj.value = caption;
|
|
31715
|
+
this.inputObj.dataBind();
|
|
31716
|
+
let formatString = node.getAttribute('data-formatString');
|
|
31717
|
+
let dialogElement = this.dialog.element;
|
|
31718
|
+
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
31719
|
+
if (this.parent.dataType === 'olap') {
|
|
31720
|
+
let memberType = node.getAttribute('data-membertype');
|
|
31721
|
+
let parentHierarchy = node.getAttribute('data-hierarchy');
|
|
31722
|
+
let expression = node.getAttribute('data-formula');
|
|
31723
|
+
let customString = node.getAttribute('data-customString');
|
|
31724
|
+
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
31725
|
+
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
31726
|
+
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
31727
|
+
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
31728
|
+
/* eslint-enable max-len */
|
|
31729
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
|
|
31730
|
+
select('#' + this.parentID + 'droppable', document).value = expression;
|
|
31731
|
+
memberTypeDrop.readonly = true;
|
|
31732
|
+
memberTypeDrop.value = memberType;
|
|
31733
|
+
memberTypeDrop.dataBind();
|
|
31734
|
+
if (memberType === 'Dimension') {
|
|
31735
|
+
hierarchyDrop.value = parentHierarchy;
|
|
31736
|
+
}
|
|
31737
|
+
if (formatString !== '') {
|
|
31738
|
+
formatDrop.value = formatString;
|
|
31739
|
+
formatDrop.dataBind();
|
|
31740
|
+
}
|
|
31741
|
+
customFormat.value = customString;
|
|
31742
|
+
}
|
|
31743
|
+
else {
|
|
31744
|
+
customFormat.value = formatString;
|
|
31745
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
31746
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
31747
|
+
addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
|
|
31748
|
+
removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
|
|
31749
|
+
node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
|
|
31750
|
+
select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
|
|
30885
31751
|
}
|
|
30886
|
-
|
|
30887
|
-
|
|
31752
|
+
customFormat.dataBind();
|
|
31753
|
+
}
|
|
31754
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
|
|
31755
|
+
node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
|
|
31756
|
+
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
31757
|
+
this.isEdit = false;
|
|
31758
|
+
this.inputObj.value = '';
|
|
31759
|
+
this.inputObj.dataBind();
|
|
31760
|
+
let dialogElement = this.dialog.element;
|
|
31761
|
+
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
31762
|
+
customFormat.value = '';
|
|
31763
|
+
customFormat.dataBind();
|
|
31764
|
+
if (this.parent.dataType === 'olap') {
|
|
31765
|
+
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
31766
|
+
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
31767
|
+
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
31768
|
+
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
31769
|
+
/* eslint-enable max-len */
|
|
31770
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
31771
|
+
hierarchyDrop.index = 0;
|
|
31772
|
+
hierarchyDrop.dataBind();
|
|
31773
|
+
formatDrop.index = 0;
|
|
30888
31774
|
formatDrop.dataBind();
|
|
31775
|
+
memberTypeDrop.index = 0;
|
|
31776
|
+
memberTypeDrop.readonly = false;
|
|
31777
|
+
memberTypeDrop.dataBind();
|
|
31778
|
+
}
|
|
31779
|
+
else {
|
|
31780
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
31781
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
31782
|
+
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
30889
31783
|
}
|
|
30890
|
-
|
|
31784
|
+
select('#' + this.parentID + 'droppable', document).value = '';
|
|
30891
31785
|
}
|
|
30892
|
-
else
|
|
30893
|
-
|
|
30894
|
-
|
|
30895
|
-
|
|
30896
|
-
|
|
30897
|
-
|
|
30898
|
-
|
|
30899
|
-
|
|
31786
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
31787
|
+
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
31788
|
+
this.parent.actionObj.actionName = removeField;
|
|
31789
|
+
if (this.parent.actionBeginMethod()) {
|
|
31790
|
+
return;
|
|
31791
|
+
}
|
|
31792
|
+
let dropField = select('#' + this.parentID + 'droppable', document);
|
|
31793
|
+
let field = {
|
|
31794
|
+
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
31795
|
+
caption: this.inputObj.value,
|
|
31796
|
+
formula: dropField.value
|
|
31797
|
+
};
|
|
31798
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
30900
31799
|
}
|
|
30901
|
-
customFormat.dataBind();
|
|
30902
31800
|
}
|
|
30903
|
-
|
|
30904
|
-
|
|
30905
|
-
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
30906
|
-
this.isEdit = false;
|
|
30907
|
-
this.inputObj.value = '';
|
|
30908
|
-
this.inputObj.dataBind();
|
|
30909
|
-
let dialogElement = this.dialog.element;
|
|
30910
|
-
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
30911
|
-
customFormat.value = '';
|
|
30912
|
-
customFormat.dataBind();
|
|
30913
|
-
if (this.parent.dataType === 'olap') {
|
|
30914
|
-
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
30915
|
-
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
30916
|
-
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
30917
|
-
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
30918
|
-
/* eslint-enable max-len */
|
|
30919
|
-
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
30920
|
-
hierarchyDrop.index = 0;
|
|
30921
|
-
hierarchyDrop.dataBind();
|
|
30922
|
-
formatDrop.index = 0;
|
|
30923
|
-
formatDrop.dataBind();
|
|
30924
|
-
memberTypeDrop.index = 0;
|
|
30925
|
-
memberTypeDrop.readonly = false;
|
|
30926
|
-
memberTypeDrop.dataBind();
|
|
30927
|
-
}
|
|
30928
|
-
else {
|
|
30929
|
-
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
30930
|
-
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
30931
|
-
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
30932
|
-
}
|
|
30933
|
-
select('#' + this.parentID + 'droppable', document).value = '';
|
|
30934
|
-
}
|
|
30935
|
-
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
30936
|
-
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
30937
|
-
let dropField = select('#' + this.parentID + 'droppable', document);
|
|
30938
|
-
let field = {
|
|
30939
|
-
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
30940
|
-
caption: this.inputObj.value,
|
|
30941
|
-
formula: dropField.value
|
|
30942
|
-
};
|
|
30943
|
-
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
31801
|
+
catch (execption) {
|
|
31802
|
+
this.parent.actionFailureMethod(execption);
|
|
30944
31803
|
}
|
|
30945
31804
|
}
|
|
30946
31805
|
removeCalcField(node) {
|
|
@@ -31349,6 +32208,12 @@ class CalculatedField {
|
|
|
31349
32208
|
this.parent.isRequiredUpdate = false;
|
|
31350
32209
|
}
|
|
31351
32210
|
try {
|
|
32211
|
+
let actionInfo = {
|
|
32212
|
+
calculatedFieldInfo: this.parent.lastCalcFieldInfo
|
|
32213
|
+
};
|
|
32214
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
32215
|
+
let actionName = (this.parent.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : calculatedFieldApplied;
|
|
32216
|
+
this.parent.actionObj.actionName = actionName;
|
|
31352
32217
|
this.parent.updateDataSource(false);
|
|
31353
32218
|
let pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
|
|
31354
32219
|
this.parent.pivotGridModule : this.parent;
|
|
@@ -32790,7 +33655,7 @@ class FieldList {
|
|
|
32790
33655
|
update() {
|
|
32791
33656
|
let currentWidth;
|
|
32792
33657
|
if (this.parent.currentView !== 'Table') {
|
|
32793
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
33658
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
32794
33659
|
}
|
|
32795
33660
|
else {
|
|
32796
33661
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
@@ -33259,7 +34124,7 @@ class GroupingBar {
|
|
|
33259
34124
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
33260
34125
|
}
|
|
33261
34126
|
else {
|
|
33262
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
34127
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
33263
34128
|
}
|
|
33264
34129
|
if (currentWidth) {
|
|
33265
34130
|
let actWidth = currentWidth < 400 ? 400 : currentWidth;
|
|
@@ -33529,15 +34394,17 @@ class ConditionalFormatting {
|
|
|
33529
34394
|
},
|
|
33530
34395
|
{
|
|
33531
34396
|
click: this.applyButtonClick.bind(this),
|
|
34397
|
+
isFlat: true,
|
|
33532
34398
|
buttonModel: {
|
|
33533
|
-
|
|
34399
|
+
isPrimary: true, cssClass: FORMAT_APPLY_BUTTON,
|
|
33534
34400
|
content: this.parent.localeObj.getConstant('apply')
|
|
33535
34401
|
}
|
|
33536
34402
|
},
|
|
33537
34403
|
{
|
|
33538
34404
|
click: this.cancelButtonClick.bind(this),
|
|
34405
|
+
isFlat: true,
|
|
33539
34406
|
buttonModel: {
|
|
33540
|
-
cssClass:
|
|
34407
|
+
cssClass: FORMAT_CANCEL_BUTTON,
|
|
33541
34408
|
content: this.parent.localeObj.getConstant('cancel')
|
|
33542
34409
|
}
|
|
33543
34410
|
}
|
|
@@ -33590,6 +34457,10 @@ class ConditionalFormatting {
|
|
|
33590
34457
|
applyButtonClick() {
|
|
33591
34458
|
if (this.refreshConditionValues()) {
|
|
33592
34459
|
this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
|
|
34460
|
+
let actionInfo = {
|
|
34461
|
+
conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
|
|
34462
|
+
};
|
|
34463
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
33593
34464
|
this.parent.renderPivotGrid();
|
|
33594
34465
|
this.dialog.close();
|
|
33595
34466
|
}
|
|
@@ -34286,12 +35157,22 @@ class Toolbar$2 {
|
|
|
34286
35157
|
}
|
|
34287
35158
|
/* eslint-enable */
|
|
34288
35159
|
reportChange(args) {
|
|
34289
|
-
this.
|
|
34290
|
-
if (this.parent.
|
|
34291
|
-
|
|
35160
|
+
this.parent.actionObj.actionName = reportChange;
|
|
35161
|
+
if (this.parent.actionBeginMethod()) {
|
|
35162
|
+
args.cancel = true;
|
|
35163
|
+
return;
|
|
34292
35164
|
}
|
|
34293
|
-
|
|
34294
|
-
this.
|
|
35165
|
+
try {
|
|
35166
|
+
this.dropArgs = args;
|
|
35167
|
+
if (this.parent.isModified && this.currentReport !== '') {
|
|
35168
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
35169
|
+
}
|
|
35170
|
+
else {
|
|
35171
|
+
this.reportLoad(args);
|
|
35172
|
+
}
|
|
35173
|
+
}
|
|
35174
|
+
catch (execption) {
|
|
35175
|
+
this.parent.actionFailureMethod(execption);
|
|
34295
35176
|
}
|
|
34296
35177
|
}
|
|
34297
35178
|
reportLoad(args) {
|
|
@@ -34299,6 +35180,10 @@ class Toolbar$2 {
|
|
|
34299
35180
|
let loadArgs = {
|
|
34300
35181
|
reportName: args.itemData.value
|
|
34301
35182
|
};
|
|
35183
|
+
let actionInfo = {
|
|
35184
|
+
reportName: args.itemData.value
|
|
35185
|
+
};
|
|
35186
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34302
35187
|
this.parent.trigger(loadReport, loadArgs, (observedArgs) => {
|
|
34303
35188
|
this.currentReport = observedArgs.reportName;
|
|
34304
35189
|
this.parent.isModified = false;
|
|
@@ -34311,7 +35196,15 @@ class Toolbar$2 {
|
|
|
34311
35196
|
report: this.parent.getPersistData(),
|
|
34312
35197
|
reportName: this.currentReport
|
|
34313
35198
|
};
|
|
35199
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
35200
|
+
let actionInfo = {
|
|
35201
|
+
reportName: this.currentReport
|
|
35202
|
+
};
|
|
35203
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34314
35204
|
this.parent.trigger(saveReport, saveArgs);
|
|
35205
|
+
if (this.parent.actionObj.actionName) {
|
|
35206
|
+
this.parent.actionCompleteMethod();
|
|
35207
|
+
}
|
|
34315
35208
|
this.parent.isModified = false;
|
|
34316
35209
|
}
|
|
34317
35210
|
else if (this.currentReport === '' && (args.item.id === (this.parent.element.id + 'save') || args.item.id === (this.parent.element.id + 'saveas'))) {
|
|
@@ -34375,54 +35268,67 @@ class Toolbar$2 {
|
|
|
34375
35268
|
}
|
|
34376
35269
|
}
|
|
34377
35270
|
actionClick(args) {
|
|
34378
|
-
|
|
34379
|
-
|
|
34380
|
-
|
|
34381
|
-
|
|
34382
|
-
|
|
34383
|
-
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
|
|
34387
|
-
|
|
34388
|
-
|
|
34389
|
-
|
|
34390
|
-
|
|
34391
|
-
|
|
34392
|
-
|
|
34393
|
-
|
|
34394
|
-
|
|
34395
|
-
|
|
34396
|
-
|
|
34397
|
-
|
|
34398
|
-
|
|
34399
|
-
|
|
34400
|
-
|
|
34401
|
-
|
|
34402
|
-
this.
|
|
34403
|
-
|
|
34404
|
-
|
|
34405
|
-
|
|
34406
|
-
|
|
34407
|
-
|
|
34408
|
-
|
|
34409
|
-
|
|
34410
|
-
|
|
34411
|
-
|
|
34412
|
-
|
|
34413
|
-
|
|
34414
|
-
|
|
34415
|
-
this.
|
|
34416
|
-
|
|
34417
|
-
|
|
34418
|
-
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
|
|
34423
|
-
this.parent.
|
|
34424
|
-
|
|
34425
|
-
|
|
35271
|
+
let actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
|
|
35272
|
+
: (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
|
|
35273
|
+
: (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
|
|
35274
|
+
: (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
|
|
35275
|
+
this.parent.actionObj.actionName = actionName;
|
|
35276
|
+
if (this.parent.actionBeginMethod()) {
|
|
35277
|
+
return;
|
|
35278
|
+
}
|
|
35279
|
+
try {
|
|
35280
|
+
switch (args.item.id) {
|
|
35281
|
+
case (this.parent.element.id + 'save'):
|
|
35282
|
+
case (this.parent.element.id + 'saveas'):
|
|
35283
|
+
this.saveReport(args);
|
|
35284
|
+
break;
|
|
35285
|
+
case (this.parent.element.id + 'remove'):
|
|
35286
|
+
this.action = 'Remove';
|
|
35287
|
+
if (this.currentReport && this.currentReport !== '') {
|
|
35288
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
|
|
35289
|
+
}
|
|
35290
|
+
else {
|
|
35291
|
+
this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
|
|
35292
|
+
}
|
|
35293
|
+
return;
|
|
35294
|
+
case (this.parent.element.id + 'rename'):
|
|
35295
|
+
this.renameReport(args);
|
|
35296
|
+
break;
|
|
35297
|
+
case (this.parent.element.id + 'new'):
|
|
35298
|
+
this.action = 'New';
|
|
35299
|
+
this.newArgs = args;
|
|
35300
|
+
if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
|
|
35301
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
35302
|
+
}
|
|
35303
|
+
else {
|
|
35304
|
+
this.createNewReport(args);
|
|
35305
|
+
}
|
|
35306
|
+
break;
|
|
35307
|
+
case (this.parent.element.id + 'load'):
|
|
35308
|
+
this.action = 'Load';
|
|
35309
|
+
break;
|
|
35310
|
+
case (this.parent.element.id + 'fieldlist'):
|
|
35311
|
+
if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
|
|
35312
|
+
this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
|
|
35313
|
+
}
|
|
35314
|
+
break;
|
|
35315
|
+
case (this.parent.element.id + 'formatting'):
|
|
35316
|
+
if (this.parent.conditionalFormattingModule) {
|
|
35317
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35318
|
+
}
|
|
35319
|
+
break;
|
|
35320
|
+
case (this.parent.element.id + 'mdxQuery'):
|
|
35321
|
+
this.mdxQueryDialog(args);
|
|
35322
|
+
break;
|
|
35323
|
+
case (this.parent.element.id + 'numberFormatting'):
|
|
35324
|
+
if (this.parent.numberFormattingModule) {
|
|
35325
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35326
|
+
}
|
|
35327
|
+
break;
|
|
35328
|
+
}
|
|
35329
|
+
}
|
|
35330
|
+
catch (execption) {
|
|
35331
|
+
this.parent.actionFailureMethod(execption);
|
|
34426
35332
|
}
|
|
34427
35333
|
}
|
|
34428
35334
|
renderDialog() {
|
|
@@ -34545,6 +35451,10 @@ class Toolbar$2 {
|
|
|
34545
35451
|
report: _this.parent.getPersistData(),
|
|
34546
35452
|
reportName: reportInput.value
|
|
34547
35453
|
};
|
|
35454
|
+
let actionInfo = {
|
|
35455
|
+
reportName: reportInput.value
|
|
35456
|
+
};
|
|
35457
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34548
35458
|
_this.parent.trigger(saveReport, saveArgs);
|
|
34549
35459
|
_this.parent.isModified = false;
|
|
34550
35460
|
_this.updateReportList();
|
|
@@ -34577,6 +35487,10 @@ class Toolbar$2 {
|
|
|
34577
35487
|
report: _this.parent.getPersistData(),
|
|
34578
35488
|
reportName: reportInput.value
|
|
34579
35489
|
};
|
|
35490
|
+
let actionInfo = {
|
|
35491
|
+
reportName: reportInput.value
|
|
35492
|
+
};
|
|
35493
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34580
35494
|
_this.parent.trigger(saveReport, saveArgs);
|
|
34581
35495
|
_this.parent.isModified = false;
|
|
34582
35496
|
_this.updateReportList();
|
|
@@ -34611,12 +35525,20 @@ class Toolbar$2 {
|
|
|
34611
35525
|
reportName: _this.currentReport,
|
|
34612
35526
|
rename: reportInput.value
|
|
34613
35527
|
};
|
|
35528
|
+
let actionInfo = {
|
|
35529
|
+
reportName: { oldName: _this.currentReport, newName: reportInput.value }
|
|
35530
|
+
};
|
|
35531
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34614
35532
|
_this.parent.trigger(renameReport, renameArgs);
|
|
34615
35533
|
_this.currentReport = reportInput.value;
|
|
34616
35534
|
_this.updateReportList();
|
|
34617
35535
|
_this.dialog.hide();
|
|
34618
35536
|
});
|
|
34619
35537
|
}
|
|
35538
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
35539
|
+
if (this.parent.actionObj.actionName) {
|
|
35540
|
+
this.parent.actionCompleteMethod();
|
|
35541
|
+
}
|
|
34620
35542
|
}
|
|
34621
35543
|
createNewReport(args) {
|
|
34622
35544
|
this.dialogShow(args);
|
|
@@ -34674,6 +35596,10 @@ class Toolbar$2 {
|
|
|
34674
35596
|
let removeArgs = {
|
|
34675
35597
|
reportName: this.currentReport
|
|
34676
35598
|
};
|
|
35599
|
+
let actionInfo = {
|
|
35600
|
+
reportName: this.currentReport
|
|
35601
|
+
};
|
|
35602
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34677
35603
|
this.parent.trigger(removeReport, removeArgs);
|
|
34678
35604
|
let reports = this.fetchReports();
|
|
34679
35605
|
if (reports.reportName && reports.reportName.length > 0) {
|
|
@@ -34692,6 +35618,10 @@ class Toolbar$2 {
|
|
|
34692
35618
|
this.action = '';
|
|
34693
35619
|
}
|
|
34694
35620
|
this.updateReportList();
|
|
35621
|
+
this.parent.actionObj.actionName = reportRemoved;
|
|
35622
|
+
if (this.parent.actionObj.actionName) {
|
|
35623
|
+
this.parent.actionCompleteMethod();
|
|
35624
|
+
}
|
|
34695
35625
|
}
|
|
34696
35626
|
else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
|
|
34697
35627
|
if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
|
|
@@ -34699,12 +35629,22 @@ class Toolbar$2 {
|
|
|
34699
35629
|
report: this.parent.getPersistData(),
|
|
34700
35630
|
reportName: this.currentReport
|
|
34701
35631
|
};
|
|
35632
|
+
let actionInfo = {
|
|
35633
|
+
reportName: this.currentReport
|
|
35634
|
+
};
|
|
35635
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35636
|
+
this.parent.actionObj.actionName = reportSaved;
|
|
35637
|
+
if (this.parent.actionObj.actionName) {
|
|
35638
|
+
this.parent.actionCompleteMethod();
|
|
35639
|
+
}
|
|
34702
35640
|
this.parent.trigger(saveReport, saveArgs);
|
|
34703
35641
|
this.parent.isModified = false;
|
|
34704
35642
|
if (this.action === 'New') {
|
|
35643
|
+
this.parent.actionObj.actionName = addNewReport;
|
|
34705
35644
|
this.createNewReport(this.newArgs);
|
|
34706
35645
|
}
|
|
34707
35646
|
else {
|
|
35647
|
+
this.parent.actionObj.actionName = reportChange;
|
|
34708
35648
|
this.reportLoad(this.dropArgs);
|
|
34709
35649
|
}
|
|
34710
35650
|
}
|
|
@@ -34809,6 +35749,7 @@ class Toolbar$2 {
|
|
|
34809
35749
|
this.chartMenu = new Menu({
|
|
34810
35750
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34811
35751
|
locale: this.parent.locale,
|
|
35752
|
+
cssClass: TOOLBAR_MENU,
|
|
34812
35753
|
select: this.menuItemClick.bind(this),
|
|
34813
35754
|
beforeOpen: this.whitespaceRemove.bind(this),
|
|
34814
35755
|
onClose: (args) => {
|
|
@@ -34864,6 +35805,7 @@ class Toolbar$2 {
|
|
|
34864
35805
|
this.exportMenu = new Menu({
|
|
34865
35806
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34866
35807
|
locale: this.parent.locale,
|
|
35808
|
+
cssClass: TOOLBAR_MENU,
|
|
34867
35809
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateExportMenu.bind(this),
|
|
34868
35810
|
onClose: (args) => {
|
|
34869
35811
|
this.focusToolBar();
|
|
@@ -34901,6 +35843,7 @@ class Toolbar$2 {
|
|
|
34901
35843
|
this.subTotalMenu = new Menu({
|
|
34902
35844
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34903
35845
|
locale: this.parent.locale,
|
|
35846
|
+
cssClass: TOOLBAR_MENU,
|
|
34904
35847
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateSubtotalSelection.bind(this),
|
|
34905
35848
|
onClose: (args) => {
|
|
34906
35849
|
this.focusToolBar();
|
|
@@ -34938,6 +35881,7 @@ class Toolbar$2 {
|
|
|
34938
35881
|
this.grandTotalMenu = new Menu({
|
|
34939
35882
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34940
35883
|
locale: this.parent.locale,
|
|
35884
|
+
cssClass: TOOLBAR_MENU,
|
|
34941
35885
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateGrandtotalSelection.bind(this),
|
|
34942
35886
|
onClose: (args) => {
|
|
34943
35887
|
this.focusToolBar();
|
|
@@ -34965,6 +35909,7 @@ class Toolbar$2 {
|
|
|
34965
35909
|
this.formattingMenu = new Menu({
|
|
34966
35910
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34967
35911
|
locale: this.parent.locale,
|
|
35912
|
+
cssClass: TOOLBAR_MENU,
|
|
34968
35913
|
select: this.menuItemClick.bind(this)
|
|
34969
35914
|
});
|
|
34970
35915
|
this.formattingMenu.isStringTemplate = true;
|
|
@@ -35162,181 +36107,202 @@ class Toolbar$2 {
|
|
|
35162
36107
|
menuItemClick(args) {
|
|
35163
36108
|
let exportArgs = {};
|
|
35164
36109
|
let type;
|
|
36110
|
+
let actionName = (args.item.id == "PivotViewgrid") ? tableView : (args.item.id == "PivotView_Column") ? chartView : (args.item.id == "PivotView_Bar") ? chartView : (args.item.id == "PivotView_Line") ? chartView
|
|
36111
|
+
: (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
|
|
36112
|
+
: (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
|
|
36113
|
+
: (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
|
|
36114
|
+
: (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
|
|
36115
|
+
: (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
|
|
36116
|
+
: (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
|
|
36117
|
+
: (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
|
|
36118
|
+
this.parent.actionObj.actionName = actionName;
|
|
36119
|
+
if (this.parent.actionBeginMethod()) {
|
|
36120
|
+
return;
|
|
36121
|
+
}
|
|
35165
36122
|
if (this.getAllChartItems().indexOf(args.item.id.split(this.parent.element.id + '_')[1]) > -1 ||
|
|
35166
36123
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'ChartMoreOption') ||
|
|
35167
36124
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'multipleAxes') ||
|
|
35168
36125
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'showLegend')) {
|
|
35169
36126
|
type = args.item.id.split(this.parent.element.id + '_')[1];
|
|
35170
36127
|
}
|
|
35171
|
-
|
|
35172
|
-
|
|
35173
|
-
|
|
35174
|
-
this.parent.grid.
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
this.parent.
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
|
|
35182
|
-
this.parent.
|
|
35183
|
-
|
|
36128
|
+
try {
|
|
36129
|
+
switch (args.item.id) {
|
|
36130
|
+
case (this.parent.element.id + 'grid'):
|
|
36131
|
+
if (this.parent.grid && this.parent.chart) {
|
|
36132
|
+
this.parent.grid.element.style.display = '';
|
|
36133
|
+
this.parent.chart.element.style.display = 'none';
|
|
36134
|
+
if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36135
|
+
this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
|
|
36136
|
+
}
|
|
36137
|
+
this.parent.currentView = 'Table';
|
|
36138
|
+
this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
|
|
36139
|
+
if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
|
|
36140
|
+
this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
|
|
36141
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
|
|
36142
|
+
}
|
|
36143
|
+
let actionInfo = {
|
|
36144
|
+
toolbarInfo: { displayOption: this.parent.displayOption, gridSettings: this.parent.gridSettings }
|
|
36145
|
+
};
|
|
36146
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
36147
|
+
this.parent.layoutRefresh();
|
|
35184
36148
|
}
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
|
|
36149
|
+
break;
|
|
36150
|
+
case (this.parent.element.id + 'pdf'):
|
|
36151
|
+
if (this.parent.currentView === 'Table') {
|
|
36152
|
+
exportArgs = {
|
|
36153
|
+
pdfExportProperties: { fileName: 'Export.pdf' },
|
|
36154
|
+
pdfDoc: undefined,
|
|
36155
|
+
isBlob: false,
|
|
36156
|
+
isMultipleExport: false
|
|
36157
|
+
};
|
|
36158
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36159
|
+
this.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
|
|
36160
|
+
});
|
|
36161
|
+
}
|
|
36162
|
+
else {
|
|
36163
|
+
exportArgs = {
|
|
36164
|
+
width: undefined,
|
|
36165
|
+
height: undefined,
|
|
36166
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36167
|
+
type: 'PDF',
|
|
36168
|
+
fileName: 'result',
|
|
36169
|
+
};
|
|
36170
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36171
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36172
|
+
});
|
|
36173
|
+
}
|
|
36174
|
+
break;
|
|
36175
|
+
case (this.parent.element.id + 'excel'):
|
|
36176
|
+
exportArgs = {
|
|
36177
|
+
excelExportProperties: { fileName: 'Export.xlsx' },
|
|
36178
|
+
isBlob: undefined,
|
|
36179
|
+
isMultipleExport: undefined,
|
|
36180
|
+
workbook: undefined
|
|
36181
|
+
};
|
|
36182
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36183
|
+
this.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
36184
|
+
});
|
|
36185
|
+
break;
|
|
36186
|
+
case (this.parent.element.id + 'csv'):
|
|
35190
36187
|
exportArgs = {
|
|
35191
|
-
|
|
35192
|
-
pdfDoc: undefined,
|
|
36188
|
+
excelExportProperties: { fileName: 'Export.csv' },
|
|
35193
36189
|
isBlob: false,
|
|
35194
|
-
isMultipleExport: false
|
|
36190
|
+
isMultipleExport: false,
|
|
36191
|
+
workbook: undefined
|
|
35195
36192
|
};
|
|
35196
36193
|
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35197
|
-
this.parent.
|
|
36194
|
+
this.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
35198
36195
|
});
|
|
35199
|
-
|
|
35200
|
-
|
|
36196
|
+
break;
|
|
36197
|
+
case (this.parent.element.id + 'png'):
|
|
35201
36198
|
exportArgs = {
|
|
36199
|
+
type: 'PNG',
|
|
35202
36200
|
width: undefined,
|
|
35203
36201
|
height: undefined,
|
|
36202
|
+
fileName: 'result',
|
|
35204
36203
|
orientation: PdfPageOrientation.Landscape,
|
|
35205
|
-
|
|
36204
|
+
};
|
|
36205
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36206
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36207
|
+
});
|
|
36208
|
+
break;
|
|
36209
|
+
case (this.parent.element.id + 'jpeg'):
|
|
36210
|
+
exportArgs = {
|
|
36211
|
+
type: 'JPEG',
|
|
35206
36212
|
fileName: 'result',
|
|
36213
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36214
|
+
width: undefined,
|
|
36215
|
+
height: undefined,
|
|
35207
36216
|
};
|
|
35208
36217
|
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35209
36218
|
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
35210
36219
|
});
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
|
|
35214
|
-
|
|
35215
|
-
|
|
35216
|
-
|
|
35217
|
-
|
|
35218
|
-
|
|
35219
|
-
|
|
35220
|
-
|
|
35221
|
-
|
|
35222
|
-
|
|
35223
|
-
|
|
35224
|
-
|
|
35225
|
-
|
|
35226
|
-
|
|
35227
|
-
|
|
35228
|
-
|
|
35229
|
-
|
|
35230
|
-
|
|
35231
|
-
|
|
35232
|
-
|
|
35233
|
-
|
|
35234
|
-
|
|
35235
|
-
|
|
35236
|
-
|
|
35237
|
-
|
|
35238
|
-
|
|
35239
|
-
|
|
35240
|
-
|
|
35241
|
-
|
|
35242
|
-
|
|
35243
|
-
|
|
35244
|
-
|
|
35245
|
-
|
|
35246
|
-
|
|
35247
|
-
|
|
35248
|
-
|
|
35249
|
-
|
|
35250
|
-
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
case (this.parent.element.id + 'svg'):
|
|
35260
|
-
exportArgs = {
|
|
35261
|
-
width: undefined,
|
|
35262
|
-
height: undefined,
|
|
35263
|
-
type: 'SVG',
|
|
35264
|
-
fileName: 'result',
|
|
35265
|
-
orientation: PdfPageOrientation.Landscape,
|
|
35266
|
-
};
|
|
35267
|
-
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35268
|
-
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
35269
|
-
});
|
|
35270
|
-
break;
|
|
35271
|
-
case (this.parent.element.id + 'notsubtotal'):
|
|
35272
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
35273
|
-
this.parent.refreshData();
|
|
35274
|
-
break;
|
|
35275
|
-
case (this.parent.element.id + 'subtotalrow'):
|
|
35276
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
35277
|
-
this.parent.refreshData();
|
|
35278
|
-
break;
|
|
35279
|
-
case (this.parent.element.id + 'subtotalcolumn'):
|
|
35280
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
35281
|
-
this.parent.refreshData();
|
|
35282
|
-
break;
|
|
35283
|
-
case (this.parent.element.id + 'subtotal'):
|
|
35284
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
35285
|
-
this.parent.refreshData();
|
|
35286
|
-
break;
|
|
35287
|
-
case (this.parent.element.id + 'notgrandtotal'):
|
|
35288
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
35289
|
-
this.parent.refreshData();
|
|
35290
|
-
break;
|
|
35291
|
-
case (this.parent.element.id + 'grandtotalrow'):
|
|
35292
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
35293
|
-
this.parent.refreshData();
|
|
35294
|
-
break;
|
|
35295
|
-
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
35296
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
35297
|
-
this.parent.refreshData();
|
|
35298
|
-
break;
|
|
35299
|
-
case (this.parent.element.id + 'grandtotal'):
|
|
35300
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
35301
|
-
this.parent.refreshData();
|
|
35302
|
-
break;
|
|
35303
|
-
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
35304
|
-
if (this.parent.numberFormattingModule) {
|
|
35305
|
-
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35306
|
-
}
|
|
35307
|
-
break;
|
|
35308
|
-
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
35309
|
-
if (this.parent.conditionalFormattingModule) {
|
|
35310
|
-
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35311
|
-
}
|
|
35312
|
-
break;
|
|
35313
|
-
case (this.parent.element.id + '_' + type):
|
|
35314
|
-
if (args.item && args.item.text) {
|
|
35315
|
-
if (type === 'ChartMoreOption') {
|
|
35316
|
-
this.createChartTypeDialog();
|
|
35317
|
-
}
|
|
35318
|
-
else if (type === 'multipleAxes') {
|
|
35319
|
-
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
35320
|
-
this.isMultiAxisChange = true;
|
|
35321
|
-
}
|
|
35322
|
-
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
35323
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
36220
|
+
break;
|
|
36221
|
+
case (this.parent.element.id + 'svg'):
|
|
36222
|
+
exportArgs = {
|
|
36223
|
+
width: undefined,
|
|
36224
|
+
height: undefined,
|
|
36225
|
+
type: 'SVG',
|
|
36226
|
+
fileName: 'result',
|
|
36227
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36228
|
+
};
|
|
36229
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36230
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36231
|
+
});
|
|
36232
|
+
break;
|
|
36233
|
+
case (this.parent.element.id + 'notsubtotal'):
|
|
36234
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
36235
|
+
this.parent.refreshData();
|
|
36236
|
+
break;
|
|
36237
|
+
case (this.parent.element.id + 'subtotalrow'):
|
|
36238
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
36239
|
+
this.parent.refreshData();
|
|
36240
|
+
break;
|
|
36241
|
+
case (this.parent.element.id + 'subtotalcolumn'):
|
|
36242
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
36243
|
+
this.parent.refreshData();
|
|
36244
|
+
break;
|
|
36245
|
+
case (this.parent.element.id + 'subtotal'):
|
|
36246
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
36247
|
+
this.parent.refreshData();
|
|
36248
|
+
break;
|
|
36249
|
+
case (this.parent.element.id + 'notgrandtotal'):
|
|
36250
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
36251
|
+
this.parent.refreshData();
|
|
36252
|
+
break;
|
|
36253
|
+
case (this.parent.element.id + 'grandtotalrow'):
|
|
36254
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
36255
|
+
this.parent.refreshData();
|
|
36256
|
+
break;
|
|
36257
|
+
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
36258
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
36259
|
+
this.parent.refreshData();
|
|
36260
|
+
break;
|
|
36261
|
+
case (this.parent.element.id + 'grandtotal'):
|
|
36262
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
36263
|
+
this.parent.refreshData();
|
|
36264
|
+
break;
|
|
36265
|
+
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
36266
|
+
if (this.parent.numberFormattingModule) {
|
|
36267
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35324
36268
|
}
|
|
35325
|
-
|
|
35326
|
-
|
|
36269
|
+
break;
|
|
36270
|
+
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
36271
|
+
if (this.parent.conditionalFormattingModule) {
|
|
36272
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35327
36273
|
}
|
|
35328
|
-
|
|
35329
|
-
|
|
35330
|
-
|
|
35331
|
-
|
|
36274
|
+
break;
|
|
36275
|
+
case (this.parent.element.id + '_' + type):
|
|
36276
|
+
if (args.item && args.item.text) {
|
|
36277
|
+
if (type === 'ChartMoreOption') {
|
|
36278
|
+
this.createChartTypeDialog();
|
|
36279
|
+
}
|
|
36280
|
+
else if (type === 'multipleAxes') {
|
|
36281
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36282
|
+
this.isMultiAxisChange = true;
|
|
36283
|
+
}
|
|
36284
|
+
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
36285
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35332
36286
|
}
|
|
35333
|
-
else {
|
|
35334
|
-
this.
|
|
36287
|
+
else if (this.getAllChartItems().indexOf(type) > -1) {
|
|
36288
|
+
this.updateChartType(type, false);
|
|
36289
|
+
}
|
|
36290
|
+
else if (type === 'showLegend') {
|
|
36291
|
+
this.parent.chart.legendSettings.visible = !this.showLableState;
|
|
36292
|
+
if (this.parent.chartSettings.legendSettings) {
|
|
36293
|
+
this.parent.chartSettings.legendSettings.visible = !this.showLableState;
|
|
36294
|
+
}
|
|
36295
|
+
else {
|
|
36296
|
+
this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
|
|
36297
|
+
}
|
|
36298
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35335
36299
|
}
|
|
35336
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35337
36300
|
}
|
|
35338
|
-
|
|
35339
|
-
|
|
36301
|
+
break;
|
|
36302
|
+
}
|
|
36303
|
+
}
|
|
36304
|
+
catch (execption) {
|
|
36305
|
+
this.parent.actionFailureMethod(execption);
|
|
35340
36306
|
}
|
|
35341
36307
|
/* eslint-enable max-len */
|
|
35342
36308
|
}
|
|
@@ -35427,14 +36393,20 @@ class Toolbar$2 {
|
|
|
35427
36393
|
if (this.parent.chart) {
|
|
35428
36394
|
this.parent.currentView = 'Chart';
|
|
35429
36395
|
this.parent.setProperties({ displayOption: { primary: 'Chart' } }, true);
|
|
35430
|
-
|
|
36396
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
36397
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
|
|
36398
|
+
}
|
|
35431
36399
|
this.parent.chart.setProperties({ width: formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()) }, true); /* eslint-disable-line */
|
|
35432
36400
|
if (this.parent.chartSettings.chartSeries.type === type && !isMultiAxis) {
|
|
35433
|
-
this.parent.
|
|
36401
|
+
this.parent.pivotChartModule.updateView();
|
|
35434
36402
|
}
|
|
35435
36403
|
else {
|
|
35436
36404
|
this.parent.chartSettings.chartSeries.type = type;
|
|
35437
36405
|
}
|
|
36406
|
+
let actionInfo = {
|
|
36407
|
+
toolbarInfo: { displayOption: this.parent.displayOption, chartSettings: this.parent.chartSettings }
|
|
36408
|
+
};
|
|
36409
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35438
36410
|
}
|
|
35439
36411
|
}
|
|
35440
36412
|
}
|
|
@@ -35994,6 +36966,10 @@ class NumberFormatting {
|
|
|
35994
36966
|
this.parent.trigger(numberFormatting, eventArgs, (observedArgs) => {
|
|
35995
36967
|
if (!observedArgs.cancel) {
|
|
35996
36968
|
this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
|
|
36969
|
+
let actionInfo = {
|
|
36970
|
+
numberFormattingInfo: this.parent.dataSourceSettings.formatSettings
|
|
36971
|
+
};
|
|
36972
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35997
36973
|
try {
|
|
35998
36974
|
this.parent.updateDataSource(false);
|
|
35999
36975
|
this.dialog.close();
|
|
@@ -36651,7 +37627,7 @@ class Grouping {
|
|
|
36651
37627
|
for (let j = 0, len = field.customGroups.length; j < len; j++) {
|
|
36652
37628
|
if (field.customGroups[j]) {
|
|
36653
37629
|
let group = field.customGroups[j];
|
|
36654
|
-
if (group.items &&
|
|
37630
|
+
if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
|
|
36655
37631
|
splicedItems = this.mergeArray(splicedItems, [group.groupName]);
|
|
36656
37632
|
newItems = this.mergeArray(newItems, group.items);
|
|
36657
37633
|
field.customGroups.splice(j, 1);
|
|
@@ -36901,5 +37877,5 @@ class Grouping {
|
|
|
36901
37877
|
* Export PivotGrid components
|
|
36902
37878
|
*/
|
|
36903
37879
|
|
|
36904
|
-
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 };
|
|
37880
|
+
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 };
|
|
36905
37881
|
//# sourceMappingURL=ej2-pivotview.es2015.js.map
|