@syncfusion/ej2-pivotview 19.3.57 → 19.4.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +76 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +56 -0
- package/CHANGELOG.md +40 -27
- package/README.md +1 -1
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +2052 -1101
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +2068 -1111
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +22 -22
- package/src/base/engine.d.ts +17 -1
- package/src/base/engine.js +78 -27
- package/src/base/export-util.d.ts +17 -0
- package/src/base/export-util.js +245 -0
- package/src/base/olap/engine.d.ts +7 -0
- package/src/base/olap/engine.js +138 -35
- package/src/base/util.d.ts +0 -9
- package/src/base/util.js +2 -215
- package/src/common/actions/field-list.js +1 -1
- package/src/common/actions/pivot-button.d.ts +5 -8
- package/src/common/actions/pivot-button.js +188 -171
- package/src/common/base/constant.d.ts +186 -0
- package/src/common/base/constant.js +186 -0
- package/src/common/base/css-constant.d.ts +2 -0
- package/src/common/base/css-constant.js +2 -0
- package/src/common/base/enum.d.ts +11 -0
- package/src/common/base/interface.d.ts +272 -2
- package/src/common/calculatedfield/calculated-field.js +108 -93
- package/src/common/conditionalformatting/conditional-formatting.js +8 -2
- package/src/common/grouping-bar/grouping-bar.js +1 -1
- package/src/common/popups/aggregate-menu.js +57 -35
- package/src/common/popups/drillthrough-dialog.js +187 -139
- package/src/common/popups/filter-dialog.d.ts +1 -0
- package/src/common/popups/filter-dialog.js +22 -1
- package/src/common/popups/formatting-dialog.js +4 -0
- package/src/common/popups/grouping.js +2 -1
- package/src/common/popups/toolbar.js +305 -203
- package/src/pivotchart/base/pivotchart.js +36 -15
- package/src/pivotfieldlist/base/field-list-model.d.ts +49 -1
- package/src/pivotfieldlist/base/field-list.d.ts +55 -1
- package/src/pivotfieldlist/base/field-list.js +68 -1
- package/src/pivotfieldlist/renderer/dialog-renderer.js +38 -15
- package/src/pivotfieldlist/renderer/tree-renderer.js +35 -22
- package/src/pivotview/actions/drill-through.js +1 -1
- package/src/pivotview/actions/excel-export.js +10 -11
- package/src/pivotview/actions/pdf-export.js +13 -6
- package/src/pivotview/actions/virtualscroll.d.ts +1 -0
- package/src/pivotview/actions/virtualscroll.js +6 -2
- package/src/pivotview/base/pivotview-model.d.ts +46 -1
- package/src/pivotview/base/pivotview.d.ts +56 -2
- package/src/pivotview/base/pivotview.js +288 -107
- package/src/pivotview/model/chartsettings-model.d.ts +2 -2
- package/src/pivotview/model/chartsettings.d.ts +2 -2
- package/src/pivotview/model/chartsettings.js +2 -2
- package/src/pivotview/model/datasourcesettings-model.d.ts +8 -1
- package/src/pivotview/model/datasourcesettings.d.ts +7 -0
- package/src/pivotview/model/datasourcesettings.js +3 -0
- package/src/pivotview/renderer/render.d.ts +2 -1
- package/src/pivotview/renderer/render.js +39 -6
- package/styles/bootstrap-dark.css +145 -118
- package/styles/bootstrap.css +145 -118
- package/styles/bootstrap4.css +144 -95
- package/styles/bootstrap5-dark.css +250 -182
- package/styles/bootstrap5.css +245 -175
- package/styles/fabric-dark.css +147 -117
- package/styles/fabric.css +145 -116
- package/styles/highcontrast-light.css +146 -116
- package/styles/highcontrast.css +148 -118
- package/styles/material-dark.css +138 -111
- package/styles/material.css +138 -111
- package/styles/pivotfieldlist/_bootstrap-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap4-definition.scss +1 -4
- package/styles/pivotfieldlist/_bootstrap5-definition.scss +8 -11
- package/styles/pivotfieldlist/_fabric-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_fabric-definition.scss +1 -4
- package/styles/pivotfieldlist/_fluent-definition.scss +177 -0
- package/styles/pivotfieldlist/_highcontrast-definition.scss +1 -4
- package/styles/pivotfieldlist/_highcontrast-light-definition.scss +1 -4
- package/styles/pivotfieldlist/_layout.scss +199 -109
- package/styles/pivotfieldlist/_material-dark-definition.scss +1 -4
- package/styles/pivotfieldlist/_material-definition.scss +1 -4
- package/styles/pivotfieldlist/_tailwind-definition.scss +6 -9
- package/styles/pivotfieldlist/_theme.scss +213 -47
- package/styles/pivotfieldlist/bootstrap-dark.css +79 -72
- package/styles/pivotfieldlist/bootstrap.css +79 -72
- package/styles/pivotfieldlist/bootstrap4.css +74 -53
- package/styles/pivotfieldlist/bootstrap5-dark.css +145 -103
- package/styles/pivotfieldlist/bootstrap5.css +145 -103
- package/styles/pivotfieldlist/fabric-dark.css +79 -72
- package/styles/pivotfieldlist/fabric.css +79 -72
- package/styles/pivotfieldlist/highcontrast-light.css +79 -72
- package/styles/pivotfieldlist/highcontrast.css +79 -72
- package/styles/pivotfieldlist/icons/_bootstrap5.scss +2 -2
- package/styles/pivotfieldlist/icons/_fluent.scss +352 -0
- package/styles/pivotfieldlist/icons/_tailwind.scss +2 -2
- package/styles/pivotfieldlist/material-dark.css +74 -67
- package/styles/pivotfieldlist/material.css +74 -67
- package/styles/pivotfieldlist/tailwind-dark.css +168 -95
- package/styles/pivotfieldlist/tailwind.css +170 -97
- package/styles/pivotview/_bootstrap-dark-definition.scss +9 -6
- package/styles/pivotview/_bootstrap-definition.scss +9 -6
- package/styles/pivotview/_bootstrap4-definition.scss +10 -7
- package/styles/pivotview/_bootstrap5-definition.scss +12 -9
- package/styles/pivotview/_fabric-dark-definition.scss +8 -5
- package/styles/pivotview/_fabric-definition.scss +7 -4
- package/styles/pivotview/_fluent-definition.scss +126 -0
- package/styles/pivotview/_highcontrast-definition.scss +8 -5
- package/styles/pivotview/_highcontrast-light-definition.scss +7 -4
- package/styles/pivotview/_layout.scss +119 -64
- package/styles/pivotview/_material-dark-definition.scss +7 -4
- package/styles/pivotview/_material-definition.scss +8 -4
- package/styles/pivotview/_tailwind-definition.scss +8 -5
- package/styles/pivotview/_theme.scss +124 -70
- package/styles/pivotview/bootstrap-dark.css +66 -46
- package/styles/pivotview/bootstrap.css +66 -46
- package/styles/pivotview/bootstrap4.css +70 -42
- package/styles/pivotview/bootstrap5-dark.css +99 -73
- package/styles/pivotview/bootstrap5-dark.scss +0 -1
- package/styles/pivotview/bootstrap5.css +100 -72
- package/styles/pivotview/fabric-dark.css +68 -45
- package/styles/pivotview/fabric.css +66 -44
- package/styles/pivotview/highcontrast-light.css +67 -44
- package/styles/pivotview/highcontrast.css +69 -46
- package/styles/pivotview/icons/_bootstrap4.scss +1 -1
- package/styles/pivotview/icons/_bootstrap5.scss +1 -1
- package/styles/pivotview/icons/_fluent.scss +183 -0
- package/styles/pivotview/icons/_tailwind.scss +1 -1
- package/styles/pivotview/material-dark.css +64 -44
- package/styles/pivotview/material.css +64 -44
- package/styles/pivotview/tailwind-dark.css +106 -58
- package/styles/pivotview/tailwind-dark.scss +0 -1
- package/styles/pivotview/tailwind.css +107 -57
- package/styles/tailwind-dark.css +280 -159
- package/styles/tailwind.css +277 -154
|
@@ -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);
|
|
@@ -4228,7 +4057,7 @@ class PivotEngine {
|
|
|
4228
4057
|
insertAllMember(set, filter, customText, axis) {
|
|
4229
4058
|
let len = set.length;
|
|
4230
4059
|
customText = ' Total';
|
|
4231
|
-
|
|
4060
|
+
let grandTotalSet = {
|
|
4232
4061
|
hasChild: false,
|
|
4233
4062
|
index: filter,
|
|
4234
4063
|
level: 0,
|
|
@@ -4242,13 +4071,14 @@ class PivotEngine {
|
|
|
4242
4071
|
type: 'grand sum',
|
|
4243
4072
|
valueSort: {}
|
|
4244
4073
|
};
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4074
|
+
grandTotalSet.valueSort[grandTotalSet.formattedText] = 1;
|
|
4075
|
+
grandTotalSet.valueSort.levelName = grandTotalSet.formattedText;
|
|
4076
|
+
grandTotalSet.valueSort[grandTotalSet.actualText] = 1;
|
|
4077
|
+
grandTotalSet.valueSort.uniqueName = grandTotalSet.actualText;
|
|
4249
4078
|
for (let ln = 0, lt = filter.length; ln < lt; ln++) {
|
|
4250
|
-
|
|
4079
|
+
grandTotalSet.indexObject[filter[ln]] = filter[ln];
|
|
4251
4080
|
}
|
|
4081
|
+
(this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals) ? set.unshift(grandTotalSet) : set.push(grandTotalSet);
|
|
4252
4082
|
// if (axis === 'row') {
|
|
4253
4083
|
// this.rowCount += this.rowValuesLength;
|
|
4254
4084
|
// } else {
|
|
@@ -4296,7 +4126,7 @@ class PivotEngine {
|
|
|
4296
4126
|
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4297
4127
|
if (!isValueIndexFound) {
|
|
4298
4128
|
for (vln = 0; vln < vlt; vln++) {
|
|
4299
|
-
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().
|
|
4129
|
+
if (row.valueSort.uniqueName && row.valueSort.uniqueName.toString().indexOf(this.values[vln].name) > -1) {
|
|
4300
4130
|
isValueIndexFound = true;
|
|
4301
4131
|
isValueCellUpdated = true;
|
|
4302
4132
|
break;
|
|
@@ -4331,7 +4161,7 @@ class PivotEngine {
|
|
|
4331
4161
|
for (let cln = 0, dln = 1, clt = columns.length; cln < clt; ++cln) {
|
|
4332
4162
|
for (let vln = 0; vln < vlt; vln++) {
|
|
4333
4163
|
if (!this.valueAxis && !this.isLastHeaderHasMeasures) {
|
|
4334
|
-
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) {
|
|
4335
4165
|
this.updateRowData(rows, columns, tnum, data, vln, rln, cln, dln, actCnt, rTotal, cTotal);
|
|
4336
4166
|
dln = data[tnum].length;
|
|
4337
4167
|
}
|
|
@@ -5251,6 +5081,10 @@ class PivotEngine {
|
|
|
5251
5081
|
this.updateValueMembers(this.measureIndex === 0 && axis.length > 1, null, null, columnHeaders, axis.slice(0, axis.length - 1), vcnt, 0);
|
|
5252
5082
|
this.updateValueMembers(false, null, null, columnHeaders, axis.slice(axis.length - 1, axis.length), vcnt, -1);
|
|
5253
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
|
+
}
|
|
5254
5088
|
else {
|
|
5255
5089
|
let hasColumnTotal = columns.length === 0 && axis.length === 1 && axis[0].type == 'grand sum';
|
|
5256
5090
|
this.updateValueMembers(!hasColumnTotal && this.measureIndex === 0, null, null, columnHeaders, axis, vcnt, hasColumnTotal ? -1 : 0);
|
|
@@ -5290,6 +5124,10 @@ class PivotEngine {
|
|
|
5290
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);
|
|
5291
5125
|
this.updateValueMembers(false, null, null, rowAxis, this.rMembers.slice(this.rMembers.length - 1, this.rMembers.length), this.values.length, -1);
|
|
5292
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
|
+
}
|
|
5293
5131
|
else {
|
|
5294
5132
|
let hasRowTotal = rows.length === 0 && this.rMembers.length === 1 && this.rMembers[0].type == 'grand sum';
|
|
5295
5133
|
this.updateValueMembers(!hasRowTotal && this.measureIndex == 0, null, null, rowAxis, this.rMembers, this.values.length, hasRowTotal ? -1 : 0);
|
|
@@ -5893,6 +5731,12 @@ const fieldDragStart = 'fieldDragStart';
|
|
|
5893
5731
|
const chartPointClick = 'chartPointClick';
|
|
5894
5732
|
/** @hidden */
|
|
5895
5733
|
const beforeServiceInvoke = 'beforeServiceInvoke';
|
|
5734
|
+
/** @hidden */
|
|
5735
|
+
const actionBegin = 'actionBegin';
|
|
5736
|
+
/** @hidden */
|
|
5737
|
+
const actionComplete = 'actionComplete';
|
|
5738
|
+
/** @hidden */
|
|
5739
|
+
const actionFailure = 'actionFailure';
|
|
5896
5740
|
/**
|
|
5897
5741
|
* Specifies pivot internal events
|
|
5898
5742
|
*/
|
|
@@ -5922,6 +5766,186 @@ const initToolbar = 'init-toolbar';
|
|
|
5922
5766
|
const initFormatting = 'init-formatting';
|
|
5923
5767
|
/** @hidden */
|
|
5924
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';
|
|
5925
5949
|
|
|
5926
5950
|
/**
|
|
5927
5951
|
* CSS Constants
|
|
@@ -6595,6 +6619,8 @@ const PIVOTCHART_TYPE_DIALOG = 'e-pivotchart-type-dialog';
|
|
|
6595
6619
|
const FORMAT_FONT_COLOR_PICKER = 'e-format-font-color-picker';
|
|
6596
6620
|
/** @hidden */
|
|
6597
6621
|
const GROUP_PIVOT_ROW = 'e-group-pivot-rows';
|
|
6622
|
+
/** @hidden */
|
|
6623
|
+
const TOOLBAR_MENU = 'e-pivot-toolbar-menu';
|
|
6598
6624
|
|
|
6599
6625
|
/**
|
|
6600
6626
|
* `AggregateMenu` module to create aggregate type popup.
|
|
@@ -6623,28 +6649,39 @@ class AggregateMenu {
|
|
|
6623
6649
|
}
|
|
6624
6650
|
openContextMenu(args) {
|
|
6625
6651
|
let fieldName = args.target.parentElement.id;
|
|
6652
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
6626
6653
|
this.buttonElement = args.target.parentElement;
|
|
6627
6654
|
let isStringField = this.parent.engineModule.fieldList[fieldName].type !== 'number' ? 1 : 0;
|
|
6628
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
|
+
}
|
|
6629
6661
|
let eventArgs = {
|
|
6630
6662
|
cancel: false, fieldName: fieldName, aggregateTypes: this.summaryTypes, displayMenuCount: 7
|
|
6631
6663
|
};
|
|
6632
6664
|
let control = this.parent.getModuleName() === 'pivotfieldlist' && this.parent.isPopupView ?
|
|
6633
6665
|
this.parent.pivotGridModule : this.parent;
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
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
|
+
}
|
|
6645
6679
|
}
|
|
6646
|
-
}
|
|
6647
|
-
}
|
|
6680
|
+
});
|
|
6681
|
+
}
|
|
6682
|
+
catch (execption) {
|
|
6683
|
+
this.parent.actionFailureMethod(execption);
|
|
6684
|
+
}
|
|
6648
6685
|
}
|
|
6649
6686
|
createContextMenu(isStringField, displayMenuCount) {
|
|
6650
6687
|
let menuItems = [];
|
|
@@ -6918,31 +6955,42 @@ class AggregateMenu {
|
|
|
6918
6955
|
selectOptionInContextMenu(menu) {
|
|
6919
6956
|
if (menu.item.text !== null) {
|
|
6920
6957
|
let buttonElement = this.currentMenu.parentElement;
|
|
6921
|
-
let
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
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;
|
|
6925
6963
|
}
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
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
|
+
}
|
|
6943
6988
|
}
|
|
6989
|
+
this.updateDataSource();
|
|
6944
6990
|
}
|
|
6945
|
-
|
|
6991
|
+
}
|
|
6992
|
+
catch (execption) {
|
|
6993
|
+
this.parent.actionFailureMethod(execption);
|
|
6946
6994
|
}
|
|
6947
6995
|
}
|
|
6948
6996
|
}
|
|
@@ -7058,13 +7106,16 @@ class Render {
|
|
|
7058
7106
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7059
7107
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7060
7108
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
7061
|
-
this.gridSettings = parent.gridSettings;
|
|
7109
|
+
this.gridSettings = this.parent.gridSettings;
|
|
7062
7110
|
this.formatList = this.getFormatList();
|
|
7063
7111
|
this.aggMenu = new AggregateMenu(this.parent);
|
|
7064
7112
|
}
|
|
7065
7113
|
/* eslint-disable-next-line */
|
|
7066
7114
|
/** @hidden */
|
|
7067
|
-
render() {
|
|
7115
|
+
render(refreshRequired) {
|
|
7116
|
+
if (refreshRequired) {
|
|
7117
|
+
this.initProperties();
|
|
7118
|
+
}
|
|
7068
7119
|
this.resColWidth = (this.parent.showGroupingBar && this.parent.groupingBarModule) ? (this.parent.isAdaptive ? 180 : 250) :
|
|
7069
7120
|
(this.parent.isAdaptive ? 140 : 200);
|
|
7070
7121
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
@@ -7128,6 +7179,30 @@ class Render {
|
|
|
7128
7179
|
}
|
|
7129
7180
|
this.parent.grid.on(headerRefreshed, this.refreshHeader, this);
|
|
7130
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
|
+
}
|
|
7131
7206
|
refreshHeader() {
|
|
7132
7207
|
if (this.parent.enableVirtualization) {
|
|
7133
7208
|
let mHdr = this.parent.element.querySelector('.' + MOVABLEHEADER_DIV);
|
|
@@ -7328,9 +7403,9 @@ class Render {
|
|
|
7328
7403
|
this.parent.renderReactTemplates(); /* eslint-disable-line */
|
|
7329
7404
|
}
|
|
7330
7405
|
if (this.parent.isInitial) {
|
|
7406
|
+
this.parent.isInitial = false;
|
|
7331
7407
|
this.parent.refreshData();
|
|
7332
7408
|
}
|
|
7333
|
-
this.parent.isInitial = false;
|
|
7334
7409
|
this.parent.notify(contentReady, {});
|
|
7335
7410
|
}
|
|
7336
7411
|
setFocusOnLastCell() {
|
|
@@ -8134,7 +8209,7 @@ class Render {
|
|
|
8134
8209
|
if (cell.isSum) {
|
|
8135
8210
|
tCell.classList.add(SUMMARY);
|
|
8136
8211
|
}
|
|
8137
|
-
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' &&
|
|
8138
8213
|
((this.colGrandPos - this.parent.dataSourceSettings.values.length) < Number(tCell.getAttribute('aria-colindex'))));
|
|
8139
8214
|
if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
|
|
8140
8215
|
tCell.classList.add('e-gtot');
|
|
@@ -8275,6 +8350,12 @@ class Render {
|
|
|
8275
8350
|
}
|
|
8276
8351
|
lvlPos++;
|
|
8277
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
|
+
}
|
|
8278
8359
|
if (cell.memberType === 3 && cell.level === -1 && Object.keys(this.lvlCollection).length > 1) {
|
|
8279
8360
|
tCell.appendChild(createElement('span', {
|
|
8280
8361
|
className: NEXTSPAN,
|
|
@@ -8586,8 +8667,8 @@ class Render {
|
|
|
8586
8667
|
if (this.parent.currentView !== 'Chart') {
|
|
8587
8668
|
if (this.gridSettings.height === 'auto' && parHeight && this.parent.element.querySelector('.' + GRID_HEADER)) {
|
|
8588
8669
|
let rowColHeight = this.parent.element.querySelector('.' + GRID_HEADER).offsetHeight;
|
|
8589
|
-
let gBarHeight = rowColHeight + (this.parent.element.querySelector('.' +
|
|
8590
|
-
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);
|
|
8591
8672
|
let toolBarHeight = this.parent.element.querySelector('.' + GRID_TOOLBAR) ? 42 : 0;
|
|
8592
8673
|
gridHeight = parHeight - (gBarHeight + toolBarHeight) - 1;
|
|
8593
8674
|
gridHeight = gridHeight < 40 ? 40 : gridHeight;
|
|
@@ -10295,7 +10376,6 @@ class FilterDialog {
|
|
|
10295
10376
|
if (this.allowExcelLikeFilter) {
|
|
10296
10377
|
this.dialogPopUp.element.querySelector('.e-dlg-closeicon-btn').focus();
|
|
10297
10378
|
}
|
|
10298
|
-
this.parent.control.pivotButtonModule.memberTreeView = this.parent.filterDialog.memberTreeView;
|
|
10299
10379
|
this.memberTreeView.nodeChecked =
|
|
10300
10380
|
this.parent.control.pivotButtonModule.nodeStateModified.bind(this.parent.control.pivotButtonModule);
|
|
10301
10381
|
this.allMemberSelect.nodeChecked =
|
|
@@ -11298,6 +11378,15 @@ class FilterDialog {
|
|
|
11298
11378
|
if (this.dropMenu && !this.dropMenu.isDestroyed) {
|
|
11299
11379
|
this.dropMenu.destroy();
|
|
11300
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
|
+
}
|
|
11301
11390
|
if (document.getElementById(this.parent.parentID + '_LevelDiv-popup')) {
|
|
11302
11391
|
remove(document.getElementById(this.parent.parentID + '_LevelDiv-popup'));
|
|
11303
11392
|
}
|
|
@@ -11306,11 +11395,23 @@ class FilterDialog {
|
|
|
11306
11395
|
removeFilterDialog() {
|
|
11307
11396
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
11308
11397
|
this.dialogPopUp.destroy();
|
|
11398
|
+
setTimeout(this.setFocus.bind(this));
|
|
11309
11399
|
}
|
|
11310
11400
|
if (document.getElementById(this.parent.parentID + '_EditorTreeView')) {
|
|
11311
11401
|
remove(document.getElementById(this.parent.parentID + '_EditorTreeView'));
|
|
11312
11402
|
}
|
|
11313
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
|
+
}
|
|
11314
11415
|
}
|
|
11315
11416
|
|
|
11316
11417
|
/**
|
|
@@ -11942,6 +12043,9 @@ __decorate$1([
|
|
|
11942
12043
|
__decorate$1([
|
|
11943
12044
|
Property(true)
|
|
11944
12045
|
], DataSourceSettings.prototype, "showGrandTotals", void 0);
|
|
12046
|
+
__decorate$1([
|
|
12047
|
+
Property('Bottom')
|
|
12048
|
+
], DataSourceSettings.prototype, "grandTotalsPosition", void 0);
|
|
11945
12049
|
__decorate$1([
|
|
11946
12050
|
Property(true)
|
|
11947
12051
|
], DataSourceSettings.prototype, "showRowGrandTotals", void 0);
|
|
@@ -12728,6 +12832,7 @@ class VirtualScroll$1 {
|
|
|
12728
12832
|
this.previousValues = { top: 0, left: 0 };
|
|
12729
12833
|
this.frozenPreviousValues = { top: 0, left: 0 };
|
|
12730
12834
|
this.eventType = '';
|
|
12835
|
+
this.isFireFox = Browser.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
12731
12836
|
this.parent = parent;
|
|
12732
12837
|
this.engineModule = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule;
|
|
12733
12838
|
this.addInternalEvents();
|
|
@@ -12751,6 +12856,9 @@ class VirtualScroll$1 {
|
|
|
12751
12856
|
let mScrollBar = mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
|
|
12752
12857
|
EventHandler.clearEvents(mCont);
|
|
12753
12858
|
EventHandler.clearEvents(fCont);
|
|
12859
|
+
if (this.isFireFox) {
|
|
12860
|
+
EventHandler.clearEvents(mHdr);
|
|
12861
|
+
}
|
|
12754
12862
|
if (this.engineModule) {
|
|
12755
12863
|
let ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + MOVABLESCROLL_DIV);
|
|
12756
12864
|
EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont, fCont), this);
|
|
@@ -12810,7 +12918,7 @@ class VirtualScroll$1 {
|
|
|
12810
12918
|
}
|
|
12811
12919
|
let target = e.target;
|
|
12812
12920
|
let left = target.scrollLeft;
|
|
12813
|
-
if (this.previousValues.left === left) {
|
|
12921
|
+
if (this.previousValues.left === left || (this.isFireFox && target.classList.contains(MOVABLEHEADER_DIV))) {
|
|
12814
12922
|
return;
|
|
12815
12923
|
}
|
|
12816
12924
|
content.scrollLeft = left;
|
|
@@ -13160,138 +13268,155 @@ class DrillThroughDialog {
|
|
|
13160
13268
|
this.clonedData.push(this.frameHeaderWithKeys(eventArgs.rawData[i]));
|
|
13161
13269
|
}
|
|
13162
13270
|
let actualText = eventArgs.currentCell.actualText.toString();
|
|
13163
|
-
|
|
13164
|
-
this.parent.
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
}
|
|
13197
|
-
let count = Object.keys(this.gridIndexObjects).length;
|
|
13198
|
-
let addItems = [];
|
|
13199
|
-
let prevItems = [];
|
|
13200
|
-
let index = 0;
|
|
13201
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13202
|
-
for (let item of this.drillThroughGrid.dataSource) {
|
|
13203
|
-
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13204
|
-
for (let field of this.engine.fields) {
|
|
13205
|
-
if (isNullOrUndefined(item[field])) {
|
|
13206
|
-
delete item[field];
|
|
13207
|
-
}
|
|
13208
|
-
}
|
|
13209
|
-
delete item['__index'];
|
|
13210
|
-
addItems.push(item);
|
|
13271
|
+
try {
|
|
13272
|
+
if (this.parent.currentView === 'Table' && this.engine.fieldList[actualText].aggregateType !== 'Count' && this.parent.editSettings.allowInlineEditing &&
|
|
13273
|
+
this.parent.editSettings.allowEditing && eventArgs.rawData.length === 1 &&
|
|
13274
|
+
this.engine.fieldList[actualText].aggregateType !== 'DistinctCount' && typeof (eventArgs.rawData[0][actualText]) !== 'string') {
|
|
13275
|
+
this.parent.actionObj.actionName = editRecord;
|
|
13276
|
+
if (this.parent.actionBeginMethod()) {
|
|
13277
|
+
return;
|
|
13278
|
+
}
|
|
13279
|
+
this.editCell(eventArgs);
|
|
13280
|
+
}
|
|
13281
|
+
else {
|
|
13282
|
+
this.removeDrillThroughDialog();
|
|
13283
|
+
let drillThroughDialog = createElement('div', {
|
|
13284
|
+
id: this.parent.element.id + '_drillthrough',
|
|
13285
|
+
className: DRILLTHROUGH_DIALOG
|
|
13286
|
+
});
|
|
13287
|
+
this.parent.element.appendChild(drillThroughDialog);
|
|
13288
|
+
this.dialogPopUp = new Dialog({
|
|
13289
|
+
animationSettings: { effect: 'Fade' },
|
|
13290
|
+
allowDragging: false,
|
|
13291
|
+
header: this.parent.localeObj.getConstant('details'),
|
|
13292
|
+
content: this.createDrillThroughGrid(eventArgs),
|
|
13293
|
+
beforeOpen: () => {
|
|
13294
|
+
this.drillThroughGrid.setProperties({
|
|
13295
|
+
dataSource: this.parent.editSettings.allowEditing ?
|
|
13296
|
+
this.dataWithPrimarykey(eventArgs) : this.gridData,
|
|
13297
|
+
height: !this.parent.editSettings.allowEditing ? 300 : 220
|
|
13298
|
+
}, false);
|
|
13299
|
+
},
|
|
13300
|
+
beforeClose: () => {
|
|
13301
|
+
if (this.parent.editSettings.allowEditing && this.isUpdated) {
|
|
13302
|
+
if (this.parent.dataSourceSettings.type === 'CSV') {
|
|
13303
|
+
this.updateData(this.drillThroughGrid.dataSource);
|
|
13211
13304
|
}
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13305
|
+
let gridIndexObjectsValue = Object.keys(this.gridIndexObjects);
|
|
13306
|
+
let previousPosition = [];
|
|
13307
|
+
for (let value of gridIndexObjectsValue) {
|
|
13308
|
+
previousPosition.push(this.gridIndexObjects[value]);
|
|
13216
13309
|
}
|
|
13217
|
-
|
|
13218
|
-
|
|
13310
|
+
let count = Object.keys(this.gridIndexObjects).length;
|
|
13311
|
+
let addItems = [];
|
|
13312
|
+
let prevItems = [];
|
|
13313
|
+
let index = 0;
|
|
13314
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
13315
|
+
for (let item of this.drillThroughGrid.dataSource) {
|
|
13316
|
+
if (isNullOrUndefined(item['__index']) || item['__index'] === '') {
|
|
13317
|
+
for (let field of this.engine.fields) {
|
|
13318
|
+
if (isNullOrUndefined(item[field])) {
|
|
13319
|
+
delete item[field];
|
|
13320
|
+
}
|
|
13321
|
+
}
|
|
13219
13322
|
delete item['__index'];
|
|
13323
|
+
addItems.push(item);
|
|
13220
13324
|
}
|
|
13221
|
-
if (
|
|
13222
|
-
delete this.
|
|
13325
|
+
else if (count > 0) {
|
|
13326
|
+
delete this.gridIndexObjects[item['__index'].toString()];
|
|
13327
|
+
prevItems.push(item);
|
|
13328
|
+
count--;
|
|
13223
13329
|
}
|
|
13330
|
+
if (this.parent.dataSourceSettings.mode === 'Server') {
|
|
13331
|
+
if (item['__index']) {
|
|
13332
|
+
delete item['__index'];
|
|
13333
|
+
}
|
|
13334
|
+
if (this.gridData[index]['__index']) {
|
|
13335
|
+
delete this.gridData[index]['__index'];
|
|
13336
|
+
}
|
|
13337
|
+
}
|
|
13338
|
+
index++;
|
|
13224
13339
|
}
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13340
|
+
count = 0;
|
|
13341
|
+
if (this.parent.dataSourceSettings.mode === 'Server') {
|
|
13342
|
+
let gridIndex = []; /* eslint-disable-line */
|
|
13343
|
+
let keys = Object.keys(this.gridIndexObjects);
|
|
13344
|
+
for (let len = 0; len < keys.length; len++) {
|
|
13345
|
+
delete this.parent.drillThroughValue.indexObject[this.gridIndexObjects[keys[len]]];
|
|
13346
|
+
gridIndex.push({ Key: keys[len], Value: this.gridIndexObjects[keys[len]] }); /* eslint-disable-line */
|
|
13347
|
+
}
|
|
13348
|
+
let indexObject = []; /* eslint-disable-line */
|
|
13349
|
+
keys = Object.keys(this.parent.drillThroughValue.indexObject);
|
|
13350
|
+
for (let len = 0; len < keys.length; len++) {
|
|
13351
|
+
indexObject.push({ Key: keys[len], Value: this.parent.drillThroughValue.indexObject[keys[len]] }); /* eslint-disable-line */
|
|
13352
|
+
}
|
|
13353
|
+
this.parent.getEngine('updateRawData', null, null, null, null, null, null, null, { 'addedData': addItems, 'removedData': gridIndex, 'updatedData': prevItems, indexObject: indexObject });
|
|
13239
13354
|
}
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13355
|
+
else {
|
|
13356
|
+
let items = [];
|
|
13357
|
+
let data = (this.parent.allowDataCompression && this.parent.enableVirtualization) ?
|
|
13358
|
+
this.parent.engineModule.actualData : this.parent.engineModule.data;
|
|
13359
|
+
for (let item of data) {
|
|
13360
|
+
delete item['__index'];
|
|
13361
|
+
if (this.gridIndexObjects[count.toString()] === undefined) {
|
|
13362
|
+
items.push(item);
|
|
13363
|
+
}
|
|
13364
|
+
count++;
|
|
13365
|
+
}
|
|
13366
|
+
/* eslint-enable @typescript-eslint/dot-notation */
|
|
13367
|
+
items = items.concat(addItems);
|
|
13368
|
+
let eventArgs = {
|
|
13369
|
+
currentData: this.drillThroughGrid.dataSource,
|
|
13370
|
+
previousData: this.clonedData,
|
|
13371
|
+
previousPosition: previousPosition,
|
|
13372
|
+
cancel: false
|
|
13373
|
+
};
|
|
13374
|
+
this.parent.trigger(editCompleted, eventArgs);
|
|
13375
|
+
if (!eventArgs.cancel) {
|
|
13376
|
+
this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13377
|
+
this.engine.updateGridData(this.parent.dataSourceSettings);
|
|
13378
|
+
this.parent.pivotValues = this.engine.pivotValues;
|
|
13250
13379
|
}
|
|
13251
|
-
count++;
|
|
13252
13380
|
}
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
cancel: false
|
|
13381
|
+
this.parent.actionObj.actionName = recordUpdated;
|
|
13382
|
+
let actionInfo = {
|
|
13383
|
+
editInfo: {
|
|
13384
|
+
type: this.drillThroughGrid.editSettings.mode, action: 'Update', currentData: this.drillThroughGrid.dataSource,
|
|
13385
|
+
previousData: this.clonedData, previousPosition: previousPosition
|
|
13386
|
+
}
|
|
13260
13387
|
};
|
|
13261
|
-
this.parent.
|
|
13262
|
-
if (!eventArgs.cancel) {
|
|
13263
|
-
this.parent.setProperties({ dataSourceSettings: { dataSource: items } }, true);
|
|
13264
|
-
this.engine.updateGridData(this.parent.dataSourceSettings);
|
|
13265
|
-
this.parent.pivotValues = this.engine.pivotValues;
|
|
13266
|
-
}
|
|
13388
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13267
13389
|
}
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
close: this.removeDrillThroughDialog.bind(this)
|
|
13282
|
-
});
|
|
13283
|
-
this.dialogPopUp.isStringTemplate = true;
|
|
13284
|
-
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13285
|
-
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13286
|
-
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13287
|
-
if (this.parent.editSettings.allowEditing) {
|
|
13288
|
-
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13289
|
-
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13290
|
-
keyConfigs: this.drillKeyConfigs,
|
|
13291
|
-
eventName: 'keydown'
|
|
13390
|
+
this.isUpdated = false;
|
|
13391
|
+
this.gridIndexObjects = {};
|
|
13392
|
+
},
|
|
13393
|
+
isModal: true,
|
|
13394
|
+
visible: true,
|
|
13395
|
+
showCloseIcon: true,
|
|
13396
|
+
locale: this.parent.locale,
|
|
13397
|
+
enableRtl: this.parent.enableRtl,
|
|
13398
|
+
width: this.parent.isAdaptive ? '100%' : '60%',
|
|
13399
|
+
position: { X: 'center', Y: 'center' },
|
|
13400
|
+
closeOnEscape: !this.parent.editSettings.allowEditing,
|
|
13401
|
+
target: document.body,
|
|
13402
|
+
close: this.removeDrillThroughDialog.bind(this)
|
|
13292
13403
|
});
|
|
13404
|
+
this.dialogPopUp.isStringTemplate = true;
|
|
13405
|
+
this.dialogPopUp.appendTo(drillThroughDialog);
|
|
13406
|
+
// this.dialogPopUp.element.querySelector('.e-dlg-header').innerHTML = this.parent.localeObj.getConstant('details');
|
|
13407
|
+
setStyleAttribute(this.dialogPopUp.element, { 'visibility': 'visible' });
|
|
13408
|
+
if (this.parent.editSettings.allowEditing) {
|
|
13409
|
+
this.drillthroughKeyboardModule = new KeyboardEvents(this.dialogPopUp.element, {
|
|
13410
|
+
keyAction: this.drillthroughKeyActionHandler.bind(this),
|
|
13411
|
+
keyConfigs: this.drillKeyConfigs,
|
|
13412
|
+
eventName: 'keydown'
|
|
13413
|
+
});
|
|
13414
|
+
}
|
|
13293
13415
|
}
|
|
13294
13416
|
}
|
|
13417
|
+
catch (execption) {
|
|
13418
|
+
this.parent.actionFailureMethod(execption);
|
|
13419
|
+
}
|
|
13295
13420
|
}
|
|
13296
13421
|
editCell(eventArgs) {
|
|
13297
13422
|
let gridResize = this.parent.gridSettings.allowResizing;
|
|
@@ -13306,6 +13431,10 @@ class DrillThroughDialog {
|
|
|
13306
13431
|
if (eventArgs.currentCell.actualText in previousData) {
|
|
13307
13432
|
currentData[eventArgs.currentCell.actualText] = eventArgs.currentCell.actualValue;
|
|
13308
13433
|
}
|
|
13434
|
+
let actionInfo = {
|
|
13435
|
+
editInfo: { type: 'Inline editing', action: 'update', data: this.gridData }
|
|
13436
|
+
};
|
|
13437
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13309
13438
|
this.numericTextBox = new NumericTextBox({
|
|
13310
13439
|
value: cellValue,
|
|
13311
13440
|
enableRtl: this.parent.enableRtl,
|
|
@@ -13370,6 +13499,10 @@ class DrillThroughDialog {
|
|
|
13370
13499
|
}
|
|
13371
13500
|
removeDrillThroughDialog() {
|
|
13372
13501
|
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
13502
|
+
this.parent.actionObj.actionName = drillThroughClosed;
|
|
13503
|
+
if (this.parent.actionObj.actionName) {
|
|
13504
|
+
this.parent.actionCompleteMethod();
|
|
13505
|
+
}
|
|
13373
13506
|
this.dialogPopUp.destroy();
|
|
13374
13507
|
}
|
|
13375
13508
|
let dialogElement = document.getElementById(this.parent.element.id + '_drillthrough');
|
|
@@ -13459,31 +13592,53 @@ class DrillThroughDialog {
|
|
|
13459
13592
|
}
|
|
13460
13593
|
if (this.parent.editSettings.allowEditing) {
|
|
13461
13594
|
Grid.Inject(Edit, Page);
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
this.drillThroughGrid.
|
|
13465
|
-
|
|
13466
|
-
|
|
13595
|
+
try {
|
|
13596
|
+
this.drillThroughGrid.editSettings = this.parent.editSettings;
|
|
13597
|
+
this.drillThroughGrid.actionBegin = (args) => {
|
|
13598
|
+
let actionName = (args.requestType == 'save') ? saveEditedRecords : (args.requestType == 'add') ? addNewRecord : (args.requestType == 'delete') ? removeRecord : '';
|
|
13599
|
+
this.parent.actionObj.actionName = actionName;
|
|
13600
|
+
if (this.parent.actionObj.actionName) {
|
|
13601
|
+
if (this.parent.actionBeginMethod()) {
|
|
13602
|
+
return;
|
|
13603
|
+
}
|
|
13604
|
+
}
|
|
13605
|
+
};
|
|
13606
|
+
if (this.parent.editSettings.allowCommandColumns) {
|
|
13607
|
+
this.drillThroughGrid.editSettings.mode = 'Normal';
|
|
13608
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = false;
|
|
13609
|
+
Grid.Inject(CommandColumn);
|
|
13610
|
+
this.drillThroughGrid.columns.push({
|
|
13611
|
+
headerText: this.parent.localeObj.getConstant('manageRecords'), width: 160, showInColumnChooser: false,
|
|
13612
|
+
commands: [
|
|
13613
|
+
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13614
|
+
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13615
|
+
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13616
|
+
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13617
|
+
]
|
|
13618
|
+
});
|
|
13619
|
+
}
|
|
13620
|
+
else {
|
|
13621
|
+
this.drillThroughGrid.editSettings.allowEditOnDblClick = this.parent.editSettings.allowEditOnDblClick;
|
|
13622
|
+
}
|
|
13467
13623
|
this.drillThroughGrid.columns.push({
|
|
13468
|
-
|
|
13469
|
-
commands: [
|
|
13470
|
-
{ type: 'Edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
|
|
13471
|
-
{ type: 'Delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
|
|
13472
|
-
{ type: 'Save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
|
|
13473
|
-
{ type: 'Cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }
|
|
13474
|
-
]
|
|
13624
|
+
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13475
13625
|
});
|
|
13476
13626
|
}
|
|
13477
|
-
|
|
13478
|
-
this.
|
|
13627
|
+
catch (execption) {
|
|
13628
|
+
this.parent.actionFailureMethod(execption);
|
|
13479
13629
|
}
|
|
13480
|
-
this.drillThroughGrid.columns.push({
|
|
13481
|
-
field: '__index', visible: false, isPrimaryKey: true, type: 'string', showInColumnChooser: false
|
|
13482
|
-
});
|
|
13483
13630
|
this.drillThroughGrid.actionComplete = (args) => {
|
|
13484
13631
|
if (args.requestType === 'batchsave' || args.requestType === 'save' || args.requestType === 'delete') {
|
|
13485
13632
|
dialogModule.isUpdated = true;
|
|
13486
13633
|
}
|
|
13634
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
13635
|
+
let actionInfo = {
|
|
13636
|
+
editInfo: { type: this.drillThroughGrid.editSettings.mode, action: args.requestType, data: this.gridData }
|
|
13637
|
+
};
|
|
13638
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
13639
|
+
if (this.parent.actionObj.actionName) {
|
|
13640
|
+
this.parent.actionCompleteMethod();
|
|
13641
|
+
}
|
|
13487
13642
|
if ((dialogModule.drillThroughGrid.editSettings.mode === 'Normal' && args.requestType === 'save' &&
|
|
13488
13643
|
dialogModule.drillThroughGrid.element.querySelectorAll('.e-tbar-btn:hover').length > 0 &&
|
|
13489
13644
|
!dialogModule.parent.editSettings.allowCommandColumns) || args.requestType === 'batchsave') {
|
|
@@ -13672,7 +13827,7 @@ class DrillThrough {
|
|
|
13672
13827
|
* @hidden
|
|
13673
13828
|
*/
|
|
13674
13829
|
getModuleName() {
|
|
13675
|
-
return '
|
|
13830
|
+
return 'drillThrough';
|
|
13676
13831
|
}
|
|
13677
13832
|
addInternalEvents() {
|
|
13678
13833
|
this.parent.on(contentReady, this.wireEvents, this);
|
|
@@ -13876,7 +14031,7 @@ class PivotChart {
|
|
|
13876
14031
|
* @private
|
|
13877
14032
|
*/
|
|
13878
14033
|
getModuleName() {
|
|
13879
|
-
return '
|
|
14034
|
+
return 'pivotChart';
|
|
13880
14035
|
}
|
|
13881
14036
|
/* eslint-disable */
|
|
13882
14037
|
loadChart(parent, chartSettings) {
|
|
@@ -14067,7 +14222,9 @@ class PivotChart {
|
|
|
14067
14222
|
this.maxLevel = currrentLevel > this.maxLevel ? currrentLevel : this.maxLevel;
|
|
14068
14223
|
let name = this.parent.dataType === 'olap' ? firstRowCell.formattedText :
|
|
14069
14224
|
(firstRowCell.actualText ? firstRowCell.actualText.toString() : firstRowCell.formattedText.toString());
|
|
14070
|
-
let
|
|
14225
|
+
let values = this.engineModule.fieldList[this.currentMeasure];
|
|
14226
|
+
let text = this.parent.dataSourceSettings.rows.length === 0 ? this.parent.localeObj.getConstant('total') + ' ' + this.parent.localeObj.getConstant(values.aggregateType) + ' ' +
|
|
14227
|
+
this.parent.localeObj.getConstant('of') + ' ' + (!isNullOrUndefined(values.caption) ? values.caption : values.name) : firstRowCell.formattedText ? firstRowCell.formattedText.toString() : name;
|
|
14071
14228
|
let caption = (firstRowCell.hasChild && !firstRowCell.isNamedSet) ?
|
|
14072
14229
|
((firstRowCell.isDrilled ? ' - ' : ' + ') + text) : text;
|
|
14073
14230
|
let levelName = tupInfo ? tupInfo.uNameCollection : firstRowCell.valueSort.levelName.toString();
|
|
@@ -14241,7 +14398,9 @@ class PivotChart {
|
|
|
14241
14398
|
this.chartSettings.palettes = currentSeries.palettes;
|
|
14242
14399
|
}
|
|
14243
14400
|
for (let i = 0; i < this.columnGroupObject[key].length; i++) {
|
|
14244
|
-
|
|
14401
|
+
let values = this.engineModule.fieldList[this.currentMeasure];
|
|
14402
|
+
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) + ' ' +
|
|
14403
|
+
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;
|
|
14245
14404
|
}
|
|
14246
14405
|
currentSeries.dataSource = this.columnGroupObject[key];
|
|
14247
14406
|
currentSeries.xName = 'x';
|
|
@@ -14397,7 +14556,7 @@ class PivotChart {
|
|
|
14397
14556
|
enableSmartLabels: this.chartSettings.enableSmartLabels,
|
|
14398
14557
|
center: this.chartSettings.pieCenter,
|
|
14399
14558
|
enableBorderOnMouseMove: this.chartSettings.enableBorderOnMouseMove,
|
|
14400
|
-
|
|
14559
|
+
highlightMode: this.chartSettings.highlightMode,
|
|
14401
14560
|
highlightPattern: this.chartSettings.highlightPattern,
|
|
14402
14561
|
titleStyle: this.chartSettings.titleStyle,
|
|
14403
14562
|
subTitle: this.chartSettings.subTitle,
|
|
@@ -14525,7 +14684,7 @@ class PivotChart {
|
|
|
14525
14684
|
this.parent.chart.highlightPattern = this.parent.chartSettings.highlightPattern;
|
|
14526
14685
|
if (this.accumulationType.indexOf(type) > -1) {
|
|
14527
14686
|
this.parent.chart.enableBorderOnMouseMove = this.parent.chartSettings.enableBorderOnMouseMove;
|
|
14528
|
-
this.parent.chart.
|
|
14687
|
+
this.parent.chart.highlightMode = this.parent.chartSettings.highlightMode;
|
|
14529
14688
|
this.parent.chart.enableSmartLabels = this.parent.chartSettings.enableSmartLabels;
|
|
14530
14689
|
}
|
|
14531
14690
|
else {
|
|
@@ -14632,9 +14791,14 @@ class PivotChart {
|
|
|
14632
14791
|
currentYAxis.labelFormat = currentYAxis.labelFormat ?
|
|
14633
14792
|
currentYAxis.labelFormat : (percentChart ? '' : (!resFormat ? format : 'N'));
|
|
14634
14793
|
currentYAxis.title = currentYAxis.title ? currentYAxis.title : measureAggregatedName;
|
|
14635
|
-
currentYAxis.
|
|
14636
|
-
|
|
14637
|
-
|
|
14794
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
14795
|
+
if (this.chartSettings.chartSeries.type === 'Bar' || this.chartSettings.chartSeries.type === 'StackingBar' ||
|
|
14796
|
+
this.chartSettings.chartSeries.type === 'StackingBar100') {
|
|
14797
|
+
currentYAxis.plotOffsetRight = currentYAxis.plotOffsetRight ? currentYAxis.plotOffsetRight : 30;
|
|
14798
|
+
}
|
|
14799
|
+
else {
|
|
14800
|
+
currentYAxis.plotOffsetTop = currentYAxis.plotOffsetTop ? currentYAxis.plotOffsetTop : 30;
|
|
14801
|
+
}
|
|
14638
14802
|
if (!resFormat) {
|
|
14639
14803
|
currentYAxis.name = this.measuresNames[item.name] ? this.measuresNames[item.name] : item.name;
|
|
14640
14804
|
}
|
|
@@ -14680,6 +14844,7 @@ class PivotChart {
|
|
|
14680
14844
|
currentYAxis = this.persistSettings.primaryYAxis ? this.frameObjectWithKeys(this.persistSettings.primaryYAxis) : currentYAxis;
|
|
14681
14845
|
currentYAxis.rowIndex = 0;
|
|
14682
14846
|
currentYAxis.columnIndex = 0;
|
|
14847
|
+
currentYAxis.edgeLabelPlacement = this.chartSettings.primaryYAxis.edgeLabelPlacement ? this.chartSettings.primaryYAxis.edgeLabelPlacement : this.persistSettings.primaryYAxis.edgeLabelPlacement;
|
|
14683
14848
|
if (!(this.chartSettings.chartSeries.type === 'Polar' || this.chartSettings.chartSeries.type === 'Radar')) {
|
|
14684
14849
|
currentYAxis.name = this.measuresNames[this.currentMeasure] ? this.measuresNames[this.currentMeasure] : this.currentMeasure;
|
|
14685
14850
|
}
|
|
@@ -14996,6 +15161,7 @@ class PivotChart {
|
|
|
14996
15161
|
}
|
|
14997
15162
|
loaded(args) {
|
|
14998
15163
|
this.parent.isChartLoaded = true;
|
|
15164
|
+
let width = this.parent.grid ? this.parent.getGridWidthAsNumber().toString() : this.parent.getWidthAsNumber().toString();
|
|
14999
15165
|
if (this.parent.chart && this.parent.showGroupingBar && this.parent.groupingBarModule &&
|
|
15000
15166
|
this.parent.showFieldList && this.parent.currentView === 'Chart') {
|
|
15001
15167
|
this.parent.groupingBarModule.alignIcon();
|
|
@@ -15007,13 +15173,15 @@ class PivotChart {
|
|
|
15007
15173
|
this.parent.element.querySelector('#' + this.parent.element.id + multilabelAxisName).setAttribute('cursor', 'pointer');
|
|
15008
15174
|
}
|
|
15009
15175
|
}
|
|
15010
|
-
if (
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15176
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
15177
|
+
if (['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) >= 0) {
|
|
15178
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'visible';
|
|
15179
|
+
}
|
|
15180
|
+
else {
|
|
15181
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflow = 'auto';
|
|
15182
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.overflowX = 'hidden';
|
|
15183
|
+
}
|
|
15184
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
|
|
15017
15185
|
}
|
|
15018
15186
|
this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
|
|
15019
15187
|
this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
|
|
@@ -15234,6 +15402,11 @@ class PivotChart {
|
|
|
15234
15402
|
offSetHeight = this.parent.getHeightAsNumber() - offSetVal;
|
|
15235
15403
|
}
|
|
15236
15404
|
if (!isNullOrUndefined(this.parent.getHeightAsNumber())) {
|
|
15405
|
+
let isNone = false;
|
|
15406
|
+
if (this.parent.element.querySelector('.e-chart-grouping-bar') !== null && this.parent.element.querySelector('.e-chart-grouping-bar').style.display.toLowerCase() === 'none') {
|
|
15407
|
+
isNone = true;
|
|
15408
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "block";
|
|
15409
|
+
}
|
|
15237
15410
|
if (this.parent.showToolbar && this.parent.showGroupingBar) {
|
|
15238
15411
|
height = (offSetHeight - (this.parent.element.querySelector('.e-pivot-toolbar') ?
|
|
15239
15412
|
this.parent.element.querySelector('.e-pivot-toolbar').clientHeight : 42) -
|
|
@@ -15251,6 +15424,9 @@ class PivotChart {
|
|
|
15251
15424
|
else if ((this.parent.chart && parseInt(this.parent.chart.height, 10) < 200) || offSetHeight < 200) {
|
|
15252
15425
|
height = '200';
|
|
15253
15426
|
}
|
|
15427
|
+
if (isNone) {
|
|
15428
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = "none";
|
|
15429
|
+
}
|
|
15254
15430
|
}
|
|
15255
15431
|
else {
|
|
15256
15432
|
height = 'auto';
|
|
@@ -16833,7 +17009,7 @@ __decorate$3([
|
|
|
16833
17009
|
Property('')
|
|
16834
17010
|
], PivotAxis.prototype, "title", void 0);
|
|
16835
17011
|
__decorate$3([
|
|
16836
|
-
Property(
|
|
17012
|
+
Property(1)
|
|
16837
17013
|
], PivotAxis.prototype, "zoomFactor", void 0);
|
|
16838
17014
|
__decorate$3([
|
|
16839
17015
|
Complex({}, CrosshairTooltip)
|
|
@@ -16851,7 +17027,7 @@ __decorate$3([
|
|
|
16851
17027
|
Property(0)
|
|
16852
17028
|
], PivotAxis.prototype, "plotOffset", void 0);
|
|
16853
17029
|
__decorate$3([
|
|
16854
|
-
Property('
|
|
17030
|
+
Property('Shift')
|
|
16855
17031
|
], PivotAxis.prototype, "edgeLabelPlacement", void 0);
|
|
16856
17032
|
__decorate$3([
|
|
16857
17033
|
Property('BetweenTicks')
|
|
@@ -18146,6 +18322,7 @@ class OlapEngine {
|
|
|
18146
18322
|
this.updateTupCollection(customArgs.drillInfo.axis === 'row' ? rowTuples.length : columnTuples.length);
|
|
18147
18323
|
}
|
|
18148
18324
|
if (customArgs.action === 'down' ? customArgs.drillInfo.axis === 'column' : true) {
|
|
18325
|
+
this.olapValueAxis = isNullOrUndefined(this.getValueAxis(undefined, undefined)) ? 'column' : 'row';
|
|
18149
18326
|
this.frameColumnHeader(columnTuples);
|
|
18150
18327
|
if (!this.isPaging) {
|
|
18151
18328
|
this.performColumnSorting();
|
|
@@ -18200,6 +18377,7 @@ class OlapEngine {
|
|
|
18200
18377
|
frameRowHeader(tuples) {
|
|
18201
18378
|
this.headerGrouping = {};
|
|
18202
18379
|
this.lastLevel = [];
|
|
18380
|
+
let isGrandTotalAdd = true;
|
|
18203
18381
|
let position = this.pivotValues.length;
|
|
18204
18382
|
let pivotValues = [];
|
|
18205
18383
|
let valueContent = [];
|
|
@@ -18260,6 +18438,7 @@ class OlapEngine {
|
|
|
18260
18438
|
let startTupPos = tupPos;
|
|
18261
18439
|
let pagingAllowFlag = true;
|
|
18262
18440
|
let lastMesPos = 0;
|
|
18441
|
+
let isGrandTotalTop = false;
|
|
18263
18442
|
while (tupPos < tuplesLength && pagingAllowFlag) {
|
|
18264
18443
|
let members = tuples[this.customArgs.action === 'down' ?
|
|
18265
18444
|
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
@@ -18314,35 +18493,25 @@ class OlapEngine {
|
|
|
18314
18493
|
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
18315
18494
|
: drillAllow;
|
|
18316
18495
|
let withoutAllAllow = (withoutAllStartPos > -1 && allCount > 0) ? (attrDrill || allStartPos > withoutAllEndPos) : true;
|
|
18317
|
-
|
|
18496
|
+
isGrandTotalTop = this.dataSourceSettings.grandTotalsPosition === 'Top' && this.olapRowValueIndex === 0 && this.olapValueAxis === 'row'
|
|
18497
|
+
&& this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true);
|
|
18498
|
+
if (isGrandTotalTop && gTotals.length === 1) {
|
|
18499
|
+
gTotals = this.frameGrandTotalValues(tuples, gTotals, typeColl, measurePos);
|
|
18500
|
+
}
|
|
18501
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
18318
18502
|
let levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18323
|
-
formattedText: (typeColl[measurePos] === '3' &&
|
|
18324
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18325
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ?
|
|
18326
|
-
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18327
|
-
members[measurePos].querySelector('Caption').textContent,
|
|
18328
|
-
hasChild: false,
|
|
18329
|
-
level: -1,
|
|
18330
|
-
rowIndex: position,
|
|
18331
|
-
index: [],
|
|
18332
|
-
ordinal: tupPos,
|
|
18333
|
-
colSpan: 1,
|
|
18334
|
-
rowSpan: 1,
|
|
18335
|
-
memberType: Number(typeColl[measurePos]),
|
|
18336
|
-
isDrilled: false,
|
|
18337
|
-
parentUniqueName: members[measurePos].querySelector('PARENT_UNIQUE_NAME') ?
|
|
18338
|
-
members[measurePos].querySelector('PARENT_UNIQUE_NAME').textContent : undefined,
|
|
18339
|
-
levelUniqueName: members[measurePos].querySelector('LName').textContent,
|
|
18340
|
-
hierarchy: members[measurePos].getAttribute('Hierarchy'),
|
|
18341
|
-
valueSort: { levelName: levelName, axis: members[measurePos].getAttribute('Hierarchy') }
|
|
18342
|
-
});
|
|
18503
|
+
let formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18504
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18505
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
18506
|
+
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') });
|
|
18343
18507
|
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
18344
18508
|
}
|
|
18345
18509
|
else if (!(allStartPos === 0 || (measurePos === 0 && allStartPos === 1)) && drillAllow && withoutAllAllow) {
|
|
18510
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && isGrandTotalAdd && this.dataSourceSettings.showGrandTotals && (this.olapValueAxis === 'row' ? this.dataSourceSettings.rows.length > 1 : true)) {
|
|
18511
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
18512
|
+
position = this.pivotValues.length;
|
|
18513
|
+
isGrandTotalAdd = false;
|
|
18514
|
+
}
|
|
18346
18515
|
prevTupInfo = this.tupRowInfo[tupPos];
|
|
18347
18516
|
let lastPos = position;
|
|
18348
18517
|
let lastMemPos = memPos;
|
|
@@ -18433,6 +18602,11 @@ class OlapEngine {
|
|
|
18433
18602
|
}
|
|
18434
18603
|
tupPos++;
|
|
18435
18604
|
}
|
|
18605
|
+
if (!(this.dataSourceSettings.grandTotalsPosition === 'Top') || (this.olapValueAxis === 'row' && this.dataSourceSettings.rows.length === 1 && this.dataSourceSettings.grandTotalsPosition === 'Top') || this.dataSourceSettings.rows.length === 0) {
|
|
18606
|
+
this.insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position);
|
|
18607
|
+
}
|
|
18608
|
+
}
|
|
18609
|
+
insertRowGrandTotal(gTotals, valueContent, pivotValues, tuples, position) {
|
|
18436
18610
|
if (gTotals.length > 1 && gTotals[0].memberType !== 3) {
|
|
18437
18611
|
gTotals[0].ordinal = -1;
|
|
18438
18612
|
}
|
|
@@ -18458,6 +18632,41 @@ class OlapEngine {
|
|
|
18458
18632
|
this.updateRowEngine(pivotValues, valueContent, tuples.length);
|
|
18459
18633
|
this.onDemandDrillEngine = pivotValues;
|
|
18460
18634
|
}
|
|
18635
|
+
return gTotals;
|
|
18636
|
+
}
|
|
18637
|
+
getValueAxis(valueAxis, valueIndex) {
|
|
18638
|
+
this.olapValueAxis = valueAxis;
|
|
18639
|
+
this.olapRowValueIndex = valueIndex;
|
|
18640
|
+
for (let i = 0; i < this.dataSourceSettings.rows.length; i++) {
|
|
18641
|
+
if (this.dataSourceSettings.rows[i].name === '[Measures]') {
|
|
18642
|
+
this.olapValueAxis = 'row';
|
|
18643
|
+
this.olapRowValueIndex = i;
|
|
18644
|
+
break;
|
|
18645
|
+
}
|
|
18646
|
+
}
|
|
18647
|
+
return this.olapValueAxis;
|
|
18648
|
+
}
|
|
18649
|
+
frameGrandTotalAxisSet(gTotals, actualText, formattedText, rowIndex, ordinal, memberType, parentUniqueName, levelUniqueName, hierarchy, valueSort) {
|
|
18650
|
+
gTotals.push({
|
|
18651
|
+
axis: 'row',
|
|
18652
|
+
actualText: actualText,
|
|
18653
|
+
colIndex: 0,
|
|
18654
|
+
formattedText: formattedText,
|
|
18655
|
+
hasChild: false,
|
|
18656
|
+
level: -1,
|
|
18657
|
+
rowIndex: rowIndex,
|
|
18658
|
+
index: [],
|
|
18659
|
+
ordinal: ordinal,
|
|
18660
|
+
colSpan: 1,
|
|
18661
|
+
rowSpan: 1,
|
|
18662
|
+
memberType: memberType,
|
|
18663
|
+
isDrilled: false,
|
|
18664
|
+
parentUniqueName: parentUniqueName,
|
|
18665
|
+
levelUniqueName: levelUniqueName,
|
|
18666
|
+
hierarchy: hierarchy,
|
|
18667
|
+
valueSort: valueSort
|
|
18668
|
+
});
|
|
18669
|
+
return gTotals;
|
|
18461
18670
|
}
|
|
18462
18671
|
getDepth(tupInfo, uniqueName, memberType) {
|
|
18463
18672
|
let memberPosition = tupInfo.uNameCollection.indexOf(uniqueName);
|
|
@@ -18697,6 +18906,53 @@ class OlapEngine {
|
|
|
18697
18906
|
currTupCount--;
|
|
18698
18907
|
}
|
|
18699
18908
|
}
|
|
18909
|
+
frameGrandTotalValues(tuples, gTotals, typeColl, measurePos) {
|
|
18910
|
+
let tupPos = 0;
|
|
18911
|
+
let lastAllStartPos;
|
|
18912
|
+
let lastAllCount;
|
|
18913
|
+
let availAllMember = false;
|
|
18914
|
+
let withoutAllEndPos = -1;
|
|
18915
|
+
let isGrandtoalDataAdd = false;
|
|
18916
|
+
let prevTupInfo;
|
|
18917
|
+
let isGrandTotalTop = false;
|
|
18918
|
+
while (tupPos < tuples.length && !isGrandtoalDataAdd) {
|
|
18919
|
+
let members = tuples[this.customArgs.action === 'down' ?
|
|
18920
|
+
(tupPos - (this.customArgs.drillInfo.currentCell.ordinal + 1)) : tupPos].querySelectorAll('Member');
|
|
18921
|
+
let allCount = this.tupRowInfo[tupPos].allCount;
|
|
18922
|
+
let allStartPos = this.tupRowInfo[tupPos].allStartPos;
|
|
18923
|
+
let measure = this.tupRowInfo[tupPos].measure;
|
|
18924
|
+
let typeColl = this.tupRowInfo[tupPos].typeCollection;
|
|
18925
|
+
let drillStartPos = this.tupRowInfo[tupPos].drillStartPos;
|
|
18926
|
+
let startDrillUniquename = this.tupRowInfo[tupPos].startDrillUniquename;
|
|
18927
|
+
if (tupPos === 0 && (members.length > (allCount + (measure ? 1 : 0)) || (members.length === 1 && measure))) {
|
|
18928
|
+
gTotals.pop();
|
|
18929
|
+
}
|
|
18930
|
+
if ((tupPos === 0 && this.isPaging) ? gTotals.length === 0 :
|
|
18931
|
+
(!availAllMember || allCount === lastAllCount || allStartPos !== lastAllStartPos || (members.length === 1 && measure))) {
|
|
18932
|
+
let attrDrill = this.checkAttributeDrill(this.tupRowInfo[tupPos].drillInfo, 'rows');
|
|
18933
|
+
let drillAllow = drillStartPos > -1 ? (allCount > 0 ? (attrDrill || allStartPos > drillStartPos) : true) : true;
|
|
18934
|
+
drillAllow = (prevTupInfo && drillAllow && drillStartPos > -1) ?
|
|
18935
|
+
(prevTupInfo.startDrillUniquename !== startDrillUniquename ? true :
|
|
18936
|
+
((withoutAllEndPos > prevTupInfo.measurePosition ? false :
|
|
18937
|
+
prevTupInfo.measureName !== this.tupRowInfo[tupPos].measureName) &&
|
|
18938
|
+
(allStartPos === (drillStartPos + 1) || this.tupRowInfo[tupPos].measurePosition === (drillStartPos + 1))))
|
|
18939
|
+
: drillAllow;
|
|
18940
|
+
if (members.length === allCount + (measure ? 1 : 0) && measure && !isGrandTotalTop) {
|
|
18941
|
+
let levelName = 'Grand Total.' + members[measurePos].querySelector('Caption').textContent;
|
|
18942
|
+
let formattedText = (typeColl[measurePos] === '3' && this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)] &&
|
|
18943
|
+
this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption) ? this.dataFields[this.getUniqueName(members[measurePos].querySelector('UName').textContent)].caption :
|
|
18944
|
+
members[measurePos].querySelector('Caption').textContent;
|
|
18945
|
+
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') });
|
|
18946
|
+
gTotals[gTotals.length - 1].valueSort['Grand Total.' + members[measurePos].querySelector('Caption').textContent] = 1;
|
|
18947
|
+
}
|
|
18948
|
+
lastAllCount = allCount;
|
|
18949
|
+
lastAllStartPos = allStartPos;
|
|
18950
|
+
}
|
|
18951
|
+
isGrandtoalDataAdd = this.dataSourceSettings.values.length + 1 === gTotals.length ? true : false;
|
|
18952
|
+
tupPos++;
|
|
18953
|
+
}
|
|
18954
|
+
return gTotals;
|
|
18955
|
+
}
|
|
18700
18956
|
frameColumnHeader(tuples) {
|
|
18701
18957
|
this.headerGrouping = {};
|
|
18702
18958
|
this.lastLevel = [];
|
|
@@ -18760,8 +19016,18 @@ class OlapEngine {
|
|
|
18760
19016
|
withoutAllAvail = true;
|
|
18761
19017
|
isStartCol = (allCount > 0 && isStartCol) ? (allStartPos > withoutAllStartPos) : isStartCol;
|
|
18762
19018
|
}
|
|
18763
|
-
|
|
18764
|
-
|
|
19019
|
+
let isGrandTotalTop = false;
|
|
19020
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showColumnGrandTotals) {
|
|
19021
|
+
let count = 0;
|
|
19022
|
+
for (let i = 0; i < members.length; i++) {
|
|
19023
|
+
if ((members[i].querySelector('Caption').textContent).indexOf('All') === 0) {
|
|
19024
|
+
count++;
|
|
19025
|
+
}
|
|
19026
|
+
}
|
|
19027
|
+
isGrandTotalTop = count === (this.olapValueAxis === 'column' ? this.dataSourceSettings.columns.length - 1 : this.dataSourceSettings.columns.length);
|
|
19028
|
+
}
|
|
19029
|
+
if (isStartCol || isGrandTotalTop) {
|
|
19030
|
+
if (allCount === 0 || isGrandTotalTop) {
|
|
18765
19031
|
let levelComp = [-1, -1, -1];
|
|
18766
19032
|
if (this.tupColumnInfo[tupPos - 1] && this.tupColumnInfo[tupPos - 1].allCount === 0) {
|
|
18767
19033
|
levelComp = this.levelCompare(levelColl, this.tupColumnInfo[tupPos - 1].levelCollection);
|
|
@@ -18798,8 +19064,10 @@ class OlapEngine {
|
|
|
18798
19064
|
}
|
|
18799
19065
|
this.setParentCollection(members);
|
|
18800
19066
|
if (withoutAllAvail ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
18801
|
-
|
|
18802
|
-
|
|
19067
|
+
if (!isGrandTotalTop) {
|
|
19068
|
+
this.totalCollection[this.totalCollection.length] =
|
|
19069
|
+
({ allCount: allCount, ordinal: tupPos, members: members, drillInfo: drillInfo });
|
|
19070
|
+
}
|
|
18803
19071
|
lastSavedInfo.allCount = allCount;
|
|
18804
19072
|
lastSavedInfo.allStartPos = allStartPos;
|
|
18805
19073
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -18824,10 +19092,12 @@ class OlapEngine {
|
|
|
18824
19092
|
}
|
|
18825
19093
|
this.setParentCollection(members);
|
|
18826
19094
|
if ((withoutAllAvail && drillStartPos > -1) ? (withoutAllEndPos <= drillStartPos) : true) {
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
19095
|
+
if (!isGrandTotalTop) {
|
|
19096
|
+
this.totalCollection[this.totalCollection.length] =
|
|
19097
|
+
({
|
|
19098
|
+
allCount: allCount, ordinal: tupPos, members: members, allStartPos: allStartPos, drillInfo: drillInfo
|
|
19099
|
+
});
|
|
19100
|
+
}
|
|
18831
19101
|
lastSavedInfo.allCount = allCount;
|
|
18832
19102
|
lastSavedInfo.allStartPos = allStartPos;
|
|
18833
19103
|
lastSavedInfo.drillStartPos = drillStartPos;
|
|
@@ -19320,19 +19590,26 @@ class OlapEngine {
|
|
|
19320
19590
|
}
|
|
19321
19591
|
let newPos = 0;
|
|
19322
19592
|
let totPos = 0;
|
|
19593
|
+
let valuePos = 0;
|
|
19323
19594
|
gSumFlag = false;
|
|
19324
19595
|
gSumGrouping = this.sortRowHeaders(gSumGrouping);
|
|
19325
19596
|
for (let rPos = this.colDepth; rPos < rowCount; rPos++) {
|
|
19326
19597
|
/* eslint-disable @typescript-eslint/dot-notation */
|
|
19598
|
+
if (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) &&
|
|
19599
|
+
((this.olapValueAxis === 'column' && this.colDepth + 1 === rPos) || (this.olapValueAxis === 'row' && this.colDepth + this.dataSourceSettings.values.length + 1 === rPos))) {
|
|
19600
|
+
newPos = 0;
|
|
19601
|
+
gSumFlag = false;
|
|
19602
|
+
}
|
|
19327
19603
|
let cell = gSumFlag ? gSumGrouping : sortLvlGrouping[levels[0]]['parent'];
|
|
19328
19604
|
/* eslint-enable @typescript-eslint/dot-notation */
|
|
19329
|
-
let currPos = gSumFlag ? (newPos - totPos) : newPos;
|
|
19605
|
+
let currPos = (this.dataSourceSettings.grandTotalsPosition === 'Top' && (this.dataSourceSettings.showGrandTotals && this.dataSourceSettings.showRowGrandTotals) && this.colDepth === rPos) ? cell.length : gSumFlag ? (newPos - totPos) : newPos;
|
|
19330
19606
|
if (cell[currPos]) {
|
|
19331
19607
|
this.pivotValues[rPos] = [cell[currPos]];
|
|
19332
19608
|
this.pivotValues[rPos][0].rowIndex = rPos;
|
|
19333
|
-
this.valueContent[
|
|
19609
|
+
this.valueContent[valuePos][0] = this.pivotValues[rPos][0];
|
|
19334
19610
|
}
|
|
19335
19611
|
newPos++;
|
|
19612
|
+
valuePos++;
|
|
19336
19613
|
if (this.pivotValues[rPos][0].type === 'grand sum') {
|
|
19337
19614
|
gSumFlag = true;
|
|
19338
19615
|
totPos = newPos;
|
|
@@ -21574,6 +21851,8 @@ let PivotView = class PivotView extends Component {
|
|
|
21574
21851
|
this.request = new XMLHttpRequest();
|
|
21575
21852
|
/** @hidden */
|
|
21576
21853
|
this.isServerWaitingPopup = false;
|
|
21854
|
+
/** @hidden */
|
|
21855
|
+
this.actionObj = {};
|
|
21577
21856
|
this.pivotView = this;
|
|
21578
21857
|
setValue('mergePersistData', this.mergePersistPivotData, this);
|
|
21579
21858
|
}
|
|
@@ -21615,10 +21894,10 @@ let PivotView = class PivotView extends Component {
|
|
|
21615
21894
|
modules.push({ args: [this], member: 'grouping' });
|
|
21616
21895
|
}
|
|
21617
21896
|
if (this.allowDrillThrough || (this.editSettings && this.editSettings.allowEditing)) {
|
|
21618
|
-
modules.push({ args: [this], member: '
|
|
21897
|
+
modules.push({ args: [this], member: 'drillThrough' });
|
|
21619
21898
|
}
|
|
21620
21899
|
if (this.displayOption.view !== 'Table') {
|
|
21621
|
-
modules.push({ args: [this], member: '
|
|
21900
|
+
modules.push({ args: [this], member: 'pivotChart' });
|
|
21622
21901
|
}
|
|
21623
21902
|
return modules;
|
|
21624
21903
|
}
|
|
@@ -22197,7 +22476,7 @@ let PivotView = class PivotView extends Component {
|
|
|
22197
22476
|
this.setProperties({ gridSettings: { allowSelection: true, selectionSettings: { cellSelectionMode: 'Box', mode: 'Cell', type: 'Multiple' } } }, true);
|
|
22198
22477
|
}
|
|
22199
22478
|
if (this.displayOption.view !== 'Table') {
|
|
22200
|
-
this.
|
|
22479
|
+
this.pivotChartModule = new PivotChart();
|
|
22201
22480
|
}
|
|
22202
22481
|
this.currentView = this.currentView ? this.currentView : (this.displayOption.view === 'Both' ?
|
|
22203
22482
|
this.displayOption.primary : this.displayOption.view);
|
|
@@ -22462,32 +22741,37 @@ let PivotView = class PivotView extends Component {
|
|
|
22462
22741
|
}
|
|
22463
22742
|
}
|
|
22464
22743
|
initialLoad() {
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
else {
|
|
22471
|
-
createSpinner({ target: this.element }, this.createElement);
|
|
22472
|
-
}
|
|
22473
|
-
let loadArgs = {
|
|
22474
|
-
dataSourceSettings: this.dataSourceSettings,
|
|
22475
|
-
pivotview: this,
|
|
22476
|
-
fieldsType: {}
|
|
22477
|
-
};
|
|
22478
|
-
this.trigger(load, loadArgs, (observedArgs) => {
|
|
22479
|
-
this.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
22480
|
-
this.fieldsType = observedArgs.fieldsType;
|
|
22481
|
-
this.updateClass();
|
|
22482
|
-
this.notify(initSubComponent, {});
|
|
22483
|
-
if (this.dataSourceSettings.mode !== 'Server') {
|
|
22484
|
-
this.notify(initialLoad, {});
|
|
22744
|
+
try {
|
|
22745
|
+
this.cellTemplateFn = this.templateParser(this.cellTemplate);
|
|
22746
|
+
this.tooltipTemplateFn = this.templateParser(this.tooltipTemplate);
|
|
22747
|
+
if (this.spinnerTemplate) {
|
|
22748
|
+
createSpinner({ target: this.element, template: this.spinnerTemplate }, this.createElement);
|
|
22485
22749
|
}
|
|
22486
|
-
|
|
22487
|
-
this.
|
|
22750
|
+
else {
|
|
22751
|
+
createSpinner({ target: this.element }, this.createElement);
|
|
22488
22752
|
}
|
|
22489
|
-
|
|
22490
|
-
|
|
22753
|
+
let loadArgs = {
|
|
22754
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
22755
|
+
pivotview: this,
|
|
22756
|
+
fieldsType: {}
|
|
22757
|
+
};
|
|
22758
|
+
this.trigger(load, loadArgs, (observedArgs) => {
|
|
22759
|
+
this.dataSourceSettings = observedArgs.dataSourceSettings;
|
|
22760
|
+
this.fieldsType = observedArgs.fieldsType;
|
|
22761
|
+
this.updateClass();
|
|
22762
|
+
this.notify(initSubComponent, {});
|
|
22763
|
+
if (this.dataSourceSettings.mode !== 'Server') {
|
|
22764
|
+
this.notify(initialLoad, {});
|
|
22765
|
+
}
|
|
22766
|
+
if (this.isAdaptive) {
|
|
22767
|
+
this.contextMenuModule.render();
|
|
22768
|
+
}
|
|
22769
|
+
this.notify(initToolbar, {});
|
|
22770
|
+
});
|
|
22771
|
+
}
|
|
22772
|
+
catch (execption) {
|
|
22773
|
+
this.actionFailureMethod(execption);
|
|
22774
|
+
}
|
|
22491
22775
|
}
|
|
22492
22776
|
/**
|
|
22493
22777
|
* Register the internal events.
|
|
@@ -22725,15 +23009,15 @@ let PivotView = class PivotView extends Component {
|
|
|
22725
23009
|
if (!this.grid && newProp.displayOption.view !== 'Chart') {
|
|
22726
23010
|
this.renderEmptyGrid();
|
|
22727
23011
|
if (newProp.displayOption.view === 'Table') {
|
|
22728
|
-
if (this.
|
|
22729
|
-
this.
|
|
23012
|
+
if (this.pivotChartModule) {
|
|
23013
|
+
this.pivotChartModule.destroy();
|
|
22730
23014
|
this.chart = undefined;
|
|
22731
|
-
this.
|
|
23015
|
+
this.pivotChartModule = undefined;
|
|
22732
23016
|
}
|
|
22733
23017
|
}
|
|
22734
23018
|
}
|
|
22735
|
-
else if (!this.
|
|
22736
|
-
this.
|
|
23019
|
+
else if (!this.pivotChartModule && this.displayOption.view !== 'Table') {
|
|
23020
|
+
this.pivotChartModule = new PivotChart();
|
|
22737
23021
|
}
|
|
22738
23022
|
}
|
|
22739
23023
|
else if (this.showToolbar && !isNullOrUndefined(newProp.displayOption) && newProp.displayOption.view) {
|
|
@@ -22763,12 +23047,12 @@ let PivotView = class PivotView extends Component {
|
|
|
22763
23047
|
(newProp.chartSettings.chartSeries && Object.keys(newProp.chartSettings.chartSeries).indexOf('type') !== -1))) {
|
|
22764
23048
|
this.groupingBarModule.renderLayout();
|
|
22765
23049
|
}
|
|
22766
|
-
if (isNullOrUndefined(this.
|
|
22767
|
-
this.
|
|
23050
|
+
if (isNullOrUndefined(this.pivotChartModule) && this.displayOption.view !== 'Table') {
|
|
23051
|
+
this.pivotChartModule = new PivotChart();
|
|
22768
23052
|
}
|
|
22769
23053
|
let engineModule = this.dataType === 'pivot' ? this.engineModule : this.olapEngineModule;
|
|
22770
|
-
if (!isNullOrUndefined(this.
|
|
22771
|
-
this.
|
|
23054
|
+
if (!isNullOrUndefined(this.pivotChartModule) && !isNullOrUndefined(engineModule.pivotValues)) {
|
|
23055
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
22772
23056
|
}
|
|
22773
23057
|
if (!isNullOrUndefined(engineModule.pivotValues) && !isNullOrUndefined(engineModule.fieldList)) {
|
|
22774
23058
|
this.notify(uiUpdate, this);
|
|
@@ -22891,9 +23175,9 @@ let PivotView = class PivotView extends Component {
|
|
|
22891
23175
|
*/
|
|
22892
23176
|
renderPivotGrid() {
|
|
22893
23177
|
this.clearTemplate();
|
|
22894
|
-
if (this.
|
|
22895
|
-
this.
|
|
22896
|
-
this.
|
|
23178
|
+
if (this.pivotChartModule) {
|
|
23179
|
+
this.pivotChartModule.engineModule = this.engineModule;
|
|
23180
|
+
this.pivotChartModule.loadChart(this, this.chartSettings);
|
|
22897
23181
|
if (this.enableRtl && this.chart && document.body.getAttribute('dir') !== 'rtl') {
|
|
22898
23182
|
addClass([this.chart.element], PIVOTCHART_LTR);
|
|
22899
23183
|
}
|
|
@@ -22924,7 +23208,7 @@ let PivotView = class PivotView extends Component {
|
|
|
22924
23208
|
this.applyHyperlinkSettings();
|
|
22925
23209
|
}
|
|
22926
23210
|
this.renderModule = this.renderModule ? this.renderModule : new Render(this);
|
|
22927
|
-
this.renderModule.render();
|
|
23211
|
+
this.renderModule.render(true);
|
|
22928
23212
|
}
|
|
22929
23213
|
else if (this.grid) {
|
|
22930
23214
|
remove(this.grid.element);
|
|
@@ -22940,7 +23224,9 @@ let PivotView = class PivotView extends Component {
|
|
|
22940
23224
|
if (this.toolbarModule && this.toolbarModule.toolbar) {
|
|
22941
23225
|
this.toolbarModule.toolbar.width = this.getGridWidthAsNumber() - 2;
|
|
22942
23226
|
}
|
|
22943
|
-
this.
|
|
23227
|
+
if (this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis) {
|
|
23228
|
+
this.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.getGridWidthAsNumber());
|
|
23229
|
+
}
|
|
22944
23230
|
this.chart.width = formatUnit(this.getGridWidthAsNumber());
|
|
22945
23231
|
if (this.currentView === 'Table') {
|
|
22946
23232
|
this.grid.element.style.display = '';
|
|
@@ -22960,7 +23246,13 @@ let PivotView = class PivotView extends Component {
|
|
|
22960
23246
|
}
|
|
22961
23247
|
if (this.toolbarModule) {
|
|
22962
23248
|
if (this.showFieldList && select('#' + this.element.id + '_PivotFieldList', this.element)) {
|
|
22963
|
-
|
|
23249
|
+
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1) {
|
|
23250
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.display = 'none';
|
|
23251
|
+
}
|
|
23252
|
+
else {
|
|
23253
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.top = this.element.querySelector('.' + GRID_TOOLBAR).offsetHeight.toString() + 'px';
|
|
23254
|
+
select('#' + this.element.id + '_PivotFieldList', this.element).style.position = 'relative';
|
|
23255
|
+
}
|
|
22964
23256
|
}
|
|
22965
23257
|
if (this.toolbar && this.toolbar.indexOf('FieldList') !== -1 &&
|
|
22966
23258
|
this.showToolbar && this.element.querySelector('.e-toggle-field-list')) {
|
|
@@ -23111,7 +23403,9 @@ let PivotView = class PivotView extends Component {
|
|
|
23111
23403
|
isDrillThrough: (pivot.allowDrillThrough || pivot.editSettings.allowEditing),
|
|
23112
23404
|
localeObj: pivot.localeObj,
|
|
23113
23405
|
fieldsType: pivot.fieldsType,
|
|
23114
|
-
clonedReport: pivot.clonedReport
|
|
23406
|
+
clonedReport: pivot.clonedReport,
|
|
23407
|
+
globalize: pivot.globalize,
|
|
23408
|
+
currenyCode: pivot.currencyCode
|
|
23115
23409
|
};
|
|
23116
23410
|
/* eslint-enable @typescript-eslint/indent */
|
|
23117
23411
|
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
@@ -23161,6 +23455,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23161
23455
|
this.exportType = 'Excel';
|
|
23162
23456
|
this.grid.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23163
23457
|
}
|
|
23458
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23459
|
+
let actionInfo = {
|
|
23460
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
23461
|
+
};
|
|
23462
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23463
|
+
if (this.actionObj.actionName) {
|
|
23464
|
+
this.actionCompleteMethod();
|
|
23465
|
+
}
|
|
23164
23466
|
}
|
|
23165
23467
|
/**
|
|
23166
23468
|
* Export PivotGrid data to CSV file.
|
|
@@ -23178,6 +23480,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23178
23480
|
this.exportType = 'CSV';
|
|
23179
23481
|
this.grid.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);
|
|
23180
23482
|
}
|
|
23483
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23484
|
+
let actionInfo = {
|
|
23485
|
+
exportInfo: { type: this.exportType, info: excelExportProperties }
|
|
23486
|
+
};
|
|
23487
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23488
|
+
if (this.actionObj.actionName) {
|
|
23489
|
+
this.actionCompleteMethod();
|
|
23490
|
+
}
|
|
23181
23491
|
}
|
|
23182
23492
|
/**
|
|
23183
23493
|
* Export Pivot widget data to PDF document.
|
|
@@ -23194,6 +23504,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23194
23504
|
else {
|
|
23195
23505
|
this.grid.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
23196
23506
|
}
|
|
23507
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23508
|
+
let actionInfo = {
|
|
23509
|
+
exportInfo: { type: 'PDF', info: pdfExportProperties }
|
|
23510
|
+
};
|
|
23511
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23512
|
+
if (this.actionObj.actionName) {
|
|
23513
|
+
this.actionCompleteMethod();
|
|
23514
|
+
}
|
|
23197
23515
|
}
|
|
23198
23516
|
/**
|
|
23199
23517
|
* Export method for the chart.
|
|
@@ -23208,6 +23526,14 @@ let PivotView = class PivotView extends Component {
|
|
|
23208
23526
|
if (this.chart && this.chart.enableExport) {
|
|
23209
23527
|
this.chart.exportModule.export(type, fileName, orientation, null, width, height);
|
|
23210
23528
|
}
|
|
23529
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23530
|
+
let actionInfo = {
|
|
23531
|
+
exportInfo: { type: type, info: fileName }
|
|
23532
|
+
};
|
|
23533
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23534
|
+
if (this.actionObj.actionName) {
|
|
23535
|
+
this.actionCompleteMethod();
|
|
23536
|
+
}
|
|
23211
23537
|
}
|
|
23212
23538
|
/**
|
|
23213
23539
|
* Print method for the chart.
|
|
@@ -23318,6 +23644,10 @@ let PivotView = class PivotView extends Component {
|
|
|
23318
23644
|
};
|
|
23319
23645
|
this.trigger(enginePopulated, eventArgs);
|
|
23320
23646
|
pivot.engineModule.pivotValues = eventArgs.pivotValues;
|
|
23647
|
+
let actionInfo = {
|
|
23648
|
+
drillInfo: drilledItem
|
|
23649
|
+
};
|
|
23650
|
+
this.actionObj.actionInfo = actionInfo;
|
|
23321
23651
|
pivot.renderPivotGrid();
|
|
23322
23652
|
}
|
|
23323
23653
|
else {
|
|
@@ -23665,6 +23995,12 @@ let PivotView = class PivotView extends Component {
|
|
|
23665
23995
|
this.unwireEvents();
|
|
23666
23996
|
this.wireEvents();
|
|
23667
23997
|
this.isChartLoaded = false;
|
|
23998
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
23999
|
+
if (this.actionObj.actionName) {
|
|
24000
|
+
if (this.actionObj.actionName !== windowResize) {
|
|
24001
|
+
this.actionCompleteMethod();
|
|
24002
|
+
}
|
|
24003
|
+
}
|
|
23668
24004
|
}
|
|
23669
24005
|
setToolTip(args) {
|
|
23670
24006
|
let colIndex = Number(args.target.getAttribute('aria-colindex'));
|
|
@@ -23696,6 +24032,13 @@ let PivotView = class PivotView extends Component {
|
|
|
23696
24032
|
if (cell && this.engineModule.fieldList[cell.actualText]) {
|
|
23697
24033
|
let field = this.engineModule.fieldList[cell.actualText];
|
|
23698
24034
|
aggregateType = field.aggregateType;
|
|
24035
|
+
if ((aggregateType !== 'DistinctCount') && (field.type !== 'number' || field.type === 'include' ||
|
|
24036
|
+
field.type === 'exclude')) {
|
|
24037
|
+
aggregateType = 'Count';
|
|
24038
|
+
}
|
|
24039
|
+
else {
|
|
24040
|
+
aggregateType = (aggregateType === undefined) ? 'Sum' : field.aggregateType;
|
|
24041
|
+
}
|
|
23699
24042
|
caption = field.caption;
|
|
23700
24043
|
hasField = true;
|
|
23701
24044
|
}
|
|
@@ -23915,75 +24258,104 @@ let PivotView = class PivotView extends Component {
|
|
|
23915
24258
|
ele = target.parentElement.parentElement;
|
|
23916
24259
|
}
|
|
23917
24260
|
this.CellClicked(target, e);
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
else {
|
|
23930
|
-
let level = this.getLevel(header);
|
|
23931
|
-
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
23932
|
-
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24261
|
+
try {
|
|
24262
|
+
if ((ele.parentElement.parentElement.parentElement.parentElement.classList.contains('e-movableheader')
|
|
24263
|
+
&& this.dataSourceSettings.valueAxis === 'column') || (ele.parentElement.classList.contains('e-row') &&
|
|
24264
|
+
this.dataSourceSettings.valueAxis === 'row') && (ele.classList.contains('e-rowsheader') ||
|
|
24265
|
+
ele.classList.contains('e-stot'))) {
|
|
24266
|
+
let FieldName = target.parentElement.getAttribute('fieldname');
|
|
24267
|
+
let fieldInfo = PivotUtil.getFieldInfo(FieldName, this);
|
|
24268
|
+
this.actionObj.actionName = sortValue;
|
|
24269
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
24270
|
+
if (this.actionBeginMethod()) {
|
|
24271
|
+
return;
|
|
23933
24272
|
}
|
|
23934
|
-
|
|
23935
|
-
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
|
|
23939
|
-
|
|
23940
|
-
dataSourceSettings: {
|
|
23941
|
-
valueSortSettings: {
|
|
23942
|
-
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
23943
|
-
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
23944
|
-
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
23945
|
-
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
23946
|
-
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
23947
|
-
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24273
|
+
let colIndex = Number(ele.getAttribute('aria-colindex'));
|
|
24274
|
+
let rowIndex = Number(ele.getAttribute('index'));
|
|
24275
|
+
if (this.dataSourceSettings.valueAxis === 'row' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24276
|
+
let header = this.pivotValues[rowIndex][colIndex];
|
|
24277
|
+
if (this.dataSourceSettings.valueIndex === -1) {
|
|
24278
|
+
rowIndex = header.type === 'value' ? rowIndex : (rowIndex + 1);
|
|
23948
24279
|
}
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
if (
|
|
23956
|
-
|
|
23957
|
-
|
|
24280
|
+
else {
|
|
24281
|
+
let level = this.getLevel(header);
|
|
24282
|
+
rowIndex = (level <= this.engineModule.measureIndex &&
|
|
24283
|
+
header.members && header.members.length > 0) ? header.members[0].rowIndex : rowIndex;
|
|
24284
|
+
}
|
|
24285
|
+
}
|
|
24286
|
+
else if (this.dataSourceSettings.valueAxis === 'column' && (this.dataSourceSettings.values.length > 1 || this.dataSourceSettings.alwaysShowValueHeader)) {
|
|
24287
|
+
colIndex = (Number(ele.getAttribute('aria-colindex')) + Number(ele.getAttribute('aria-colspan')) - 1);
|
|
24288
|
+
rowIndex = this.engineModule.headerContent.length - 1;
|
|
24289
|
+
}
|
|
24290
|
+
this.setProperties({
|
|
24291
|
+
dataSourceSettings: {
|
|
24292
|
+
valueSortSettings: {
|
|
24293
|
+
columnIndex: (Number(ele.getAttribute('aria-colindex')) +
|
|
24294
|
+
Number(ele.getAttribute('aria-colspan')) - 1),
|
|
24295
|
+
sortOrder: this.dataSourceSettings.valueSortSettings.sortOrder === 'Descending' ? 'Ascending' : 'Descending',
|
|
24296
|
+
headerText: this.pivotValues[rowIndex][colIndex].valueSort.levelName,
|
|
24297
|
+
headerDelimiter: this.dataSourceSettings.valueSortSettings.headerDelimiter ?
|
|
24298
|
+
this.dataSourceSettings.valueSortSettings.headerDelimiter : '.'
|
|
24299
|
+
}
|
|
24300
|
+
}
|
|
24301
|
+
}, true);
|
|
24302
|
+
this.showWaitingPopup();
|
|
24303
|
+
let pivot = this; /* eslint-disable-line */
|
|
24304
|
+
pivot.engineModule.enableValueSorting = true;
|
|
24305
|
+
if (pivot.enableVirtualization) {
|
|
24306
|
+
if (pivot.dataSourceSettings.enableSorting) {
|
|
24307
|
+
for (let key of Object.keys(pivot.engineModule.fieldList)) {
|
|
24308
|
+
pivot.engineModule.fieldList[key].sort = 'Ascending';
|
|
24309
|
+
}
|
|
24310
|
+
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
24311
|
+
}
|
|
24312
|
+
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
24313
|
+
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
24314
|
+
}
|
|
24315
|
+
else {
|
|
24316
|
+
pivot.engineModule.rMembers = pivot.engineModule.headerCollection.rowHeaders;
|
|
24317
|
+
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
24318
|
+
pivot.engineModule.applyValueSorting();
|
|
24319
|
+
pivot.engineModule.updateEngine();
|
|
23958
24320
|
}
|
|
23959
|
-
pivot.setProperties({ dataSourceSettings: { sortSettings: [] } }, true);
|
|
23960
24321
|
}
|
|
23961
|
-
if (pivot.dataSourceSettings.mode === 'Server') {
|
|
24322
|
+
else if (pivot.dataSourceSettings.mode === 'Server') {
|
|
23962
24323
|
pivot.getEngine('onValueSort', null, null, null, null, null, null);
|
|
23963
24324
|
}
|
|
23964
24325
|
else {
|
|
23965
|
-
pivot.engineModule.
|
|
23966
|
-
pivot.engineModule.cMembers = pivot.engineModule.headerCollection.columnHeaders;
|
|
23967
|
-
pivot.engineModule.applyValueSorting();
|
|
23968
|
-
pivot.engineModule.updateEngine();
|
|
24326
|
+
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
23969
24327
|
}
|
|
24328
|
+
pivot.allowServerDataBinding = false;
|
|
24329
|
+
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
24330
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
24331
|
+
delete pivot.bulkChanges.pivotValues;
|
|
24332
|
+
pivot.allowServerDataBinding = true;
|
|
24333
|
+
let actionInfo = {
|
|
24334
|
+
valueSortInfo: this.engineModule.valueSortSettings
|
|
24335
|
+
};
|
|
24336
|
+
this.actionObj.actionInfo = actionInfo;
|
|
24337
|
+
pivot.renderPivotGrid();
|
|
23970
24338
|
}
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
else {
|
|
23975
|
-
pivot.engineModule.generateGridData(pivot.dataSourceSettings, true);
|
|
23976
|
-
}
|
|
23977
|
-
pivot.allowServerDataBinding = false;
|
|
23978
|
-
pivot.setProperties({ pivotValues: pivot.engineModule.pivotValues }, true);
|
|
23979
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
23980
|
-
delete pivot.bulkChanges.pivotValues;
|
|
23981
|
-
pivot.allowServerDataBinding = true;
|
|
23982
|
-
pivot.renderPivotGrid();
|
|
24339
|
+
}
|
|
24340
|
+
catch (execption) {
|
|
24341
|
+
this.actionFailureMethod(execption);
|
|
23983
24342
|
}
|
|
23984
24343
|
}
|
|
23985
24344
|
else if (target.classList.contains(COLLAPSE) || target.classList.contains(EXPAND)) {
|
|
23986
|
-
|
|
24345
|
+
let drillFieldName = target.parentElement.getAttribute('fieldname');
|
|
24346
|
+
let fieldInfo = PivotUtil.getFieldInfo(drillFieldName, this);
|
|
24347
|
+
let actionName = target.classList.contains(COLLAPSE) ? this.actionObj.actionName = drillUp : target.classList.contains(EXPAND) ? this.actionObj.actionName = drillDown : '';
|
|
24348
|
+
this.actionObj.actionName = actionName;
|
|
24349
|
+
this.actionObj.fieldInfo = fieldInfo.fieldItem;
|
|
24350
|
+
if (this.actionBeginMethod()) {
|
|
24351
|
+
return;
|
|
24352
|
+
}
|
|
24353
|
+
try {
|
|
24354
|
+
this.onDrill(target);
|
|
24355
|
+
}
|
|
24356
|
+
catch (execption) {
|
|
24357
|
+
this.actionFailureMethod(execption);
|
|
24358
|
+
}
|
|
23987
24359
|
}
|
|
23988
24360
|
else {
|
|
23989
24361
|
this.CellClicked(target, e);
|
|
@@ -24081,7 +24453,8 @@ let PivotView = class PivotView extends Component {
|
|
|
24081
24453
|
let firstColWidth = this.pivotColumns[0].width;
|
|
24082
24454
|
let eventArgs = {
|
|
24083
24455
|
columns: this.pivotColumns,
|
|
24084
|
-
dataSourceSettings: this.dataSourceSettings
|
|
24456
|
+
dataSourceSettings: this.dataSourceSettings,
|
|
24457
|
+
stackedColumns: this.getStackedColumns(gridcolumns, [])
|
|
24085
24458
|
};
|
|
24086
24459
|
this.trigger(beforeColumnsRender, eventArgs);
|
|
24087
24460
|
if (this.enableVirtualization && eventArgs.columns.length > 0 && eventArgs.columns[0].width !== gridcolumns[0].width) {
|
|
@@ -24185,8 +24558,16 @@ let PivotView = class PivotView extends Component {
|
|
|
24185
24558
|
/* eslint-disable-next-line */
|
|
24186
24559
|
/** @hidden */
|
|
24187
24560
|
onWindowResize() {
|
|
24561
|
+
this.actionObj.actionName = windowResize;
|
|
24562
|
+
if (this.actionBeginMethod()) {
|
|
24563
|
+
return;
|
|
24564
|
+
}
|
|
24188
24565
|
clearTimeout(this.timeOutObj);
|
|
24189
24566
|
this.timeOutObj = setTimeout(this.layoutRefresh.bind(this), 500);
|
|
24567
|
+
this.actionObj.actionName = this.getActionCompleteName();
|
|
24568
|
+
if (this.actionObj.actionName) {
|
|
24569
|
+
this.actionCompleteMethod();
|
|
24570
|
+
}
|
|
24190
24571
|
}
|
|
24191
24572
|
/**
|
|
24192
24573
|
* Refreshes the Pivot Table for blazor layoutRefresh is called for other base refresh is called.
|
|
@@ -24570,7 +24951,9 @@ let PivotView = class PivotView extends Component {
|
|
|
24570
24951
|
isDrillThrough: (this.allowDrillThrough || this.editSettings.allowEditing),
|
|
24571
24952
|
localeObj: this.localeObj,
|
|
24572
24953
|
fieldsType: this.fieldsType,
|
|
24573
|
-
clonedReport: this.clonedReport
|
|
24954
|
+
clonedReport: this.clonedReport,
|
|
24955
|
+
globalize: this.globalize,
|
|
24956
|
+
currenyCode: this.currencyCode
|
|
24574
24957
|
};
|
|
24575
24958
|
if (this.dataType === 'pivot') {
|
|
24576
24959
|
if (this.dataSourceSettings.groupSettings && this.dataSourceSettings.groupSettings.length > 0) {
|
|
@@ -24796,7 +25179,8 @@ let PivotView = class PivotView extends Component {
|
|
|
24796
25179
|
let str = 'color: ' + format[k].style.color + '!important;background-color: ' + format[k].style.backgroundColor +
|
|
24797
25180
|
'!important;font-size: ' + format[k].style.fontSize + '!important;font-family: ' + format[k].style.fontFamily +
|
|
24798
25181
|
' !important;';
|
|
24799
|
-
|
|
25182
|
+
let formatClass = '.format' + this.element.id + k;
|
|
25183
|
+
sheet.insertRule(formatClass + ', ' + formatClass + ' .e-cellvalue' + '{' + str + '}', 0);
|
|
24800
25184
|
}
|
|
24801
25185
|
}
|
|
24802
25186
|
}
|
|
@@ -25022,6 +25406,64 @@ let PivotView = class PivotView extends Component {
|
|
|
25022
25406
|
EventHandler.remove(document, this.isAdaptive ? 'touchend' : 'click', this.removeButtonFocus);
|
|
25023
25407
|
window.removeEventListener('resize', this.onWindowResize.bind(this), true);
|
|
25024
25408
|
}
|
|
25409
|
+
/** @hidden */
|
|
25410
|
+
actionBeginMethod() {
|
|
25411
|
+
let eventArgs = {
|
|
25412
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
25413
|
+
actionName: this.actionObj.actionName,
|
|
25414
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
25415
|
+
cancel: false
|
|
25416
|
+
};
|
|
25417
|
+
this.trigger(actionBegin, eventArgs);
|
|
25418
|
+
return eventArgs.cancel;
|
|
25419
|
+
}
|
|
25420
|
+
/** @hidden */
|
|
25421
|
+
actionCompleteMethod() {
|
|
25422
|
+
let eventArgs = {
|
|
25423
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
25424
|
+
actionName: this.actionObj.actionName,
|
|
25425
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
25426
|
+
actionInfo: this.actionObj.actionInfo
|
|
25427
|
+
};
|
|
25428
|
+
this.trigger(actionComplete, eventArgs);
|
|
25429
|
+
this.actionObj.actionName = '';
|
|
25430
|
+
this.actionObj.actionInfo = undefined;
|
|
25431
|
+
this.actionObj.fieldInfo = undefined;
|
|
25432
|
+
}
|
|
25433
|
+
/** @hidden */
|
|
25434
|
+
actionFailureMethod(error) {
|
|
25435
|
+
let eventArgs = {
|
|
25436
|
+
actionName: this.actionObj.actionName,
|
|
25437
|
+
errorInfo: error
|
|
25438
|
+
};
|
|
25439
|
+
this.trigger(actionFailure, eventArgs);
|
|
25440
|
+
}
|
|
25441
|
+
/** @hidden */
|
|
25442
|
+
getActionCompleteName() {
|
|
25443
|
+
let actionName = (this.actionObj.actionName == openConditionalFormatting) ? conditionallyFormatted : (this.actionObj.actionName == openNumberFormatting) ? numberFormatted
|
|
25444
|
+
: (this.actionObj.actionName == tableView) ? tableViewed : (this.actionObj.actionName == chartView) ? chartViewed : (this.actionObj.actionName == hideSubTotals) ? subTotalsHidden : (this.actionObj.actionName == subTotalsRow) ? subTotalsRowShown
|
|
25445
|
+
: (this.actionObj.actionName == subTotalsColumn) ? subTotalsColumnShown : (this.actionObj.actionName == showSubTotals) ? subTotalsShown : (this.actionObj.actionName == hideGrandTotals) ? grandTotalsHidden
|
|
25446
|
+
: (this.actionObj.actionName == grandTotalsRow) ? grandTotalsRowShown : (this.actionObj.actionName == grandTotalsColumn) ? grandTotalsColumnShown : (this.actionObj.actionName == showGrandTotals) ? grandTotalsShown
|
|
25447
|
+
: (this.actionObj.actionName == sortValue) ? valueSorted : (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
25448
|
+
: (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
|
|
25449
|
+
: this.actionObj.actionName == saveEditedRecords ? editedRecordsSaved : this.actionObj.actionName == addNewRecord ? newRecordAdded
|
|
25450
|
+
: this.actionObj.actionName == removeRecord ? recordRemoved : (this.actionObj.actionName == pngExport) ? pngExported : (this.actionObj.actionName == jpegExport) ? jpegExported
|
|
25451
|
+
: (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
|
|
25452
|
+
: this.actionObj.actionName == saveCurrentReport ? reportSaved : (this.actionObj.actionName == addNewReport) ? newReportAdded : (this.actionObj.actionName == saveAsCurrentReport) ? reportReSaved
|
|
25453
|
+
: (this.actionObj.actionName == renameCurrentReport) ? reportRenamed : this.actionObj.actionName;
|
|
25454
|
+
return actionName;
|
|
25455
|
+
}
|
|
25456
|
+
/* eslint-disable-next-line */
|
|
25457
|
+
/** @hidden */
|
|
25458
|
+
getStackedColumns(gridcolumns, stackedColumns) {
|
|
25459
|
+
for (let column of gridcolumns) {
|
|
25460
|
+
stackedColumns.push(column);
|
|
25461
|
+
if (column.columns && column.columns.length > 0) {
|
|
25462
|
+
this.getStackedColumns(column.columns, stackedColumns);
|
|
25463
|
+
}
|
|
25464
|
+
}
|
|
25465
|
+
return stackedColumns;
|
|
25466
|
+
}
|
|
25025
25467
|
/**
|
|
25026
25468
|
* To destroy the PivotView elements.
|
|
25027
25469
|
* @returns {void}
|
|
@@ -25085,8 +25527,8 @@ let PivotView = class PivotView extends Component {
|
|
|
25085
25527
|
if (this.commonModule) {
|
|
25086
25528
|
this.commonModule.destroy();
|
|
25087
25529
|
}
|
|
25088
|
-
if (this.
|
|
25089
|
-
this.
|
|
25530
|
+
if (this.pivotChartModule) {
|
|
25531
|
+
this.pivotChartModule.destroy();
|
|
25090
25532
|
}
|
|
25091
25533
|
if (this.pivotButtonModule && !this.pivotButtonModule.isDestroyed) {
|
|
25092
25534
|
this.pivotButtonModule.destroy();
|
|
@@ -25141,8 +25583,8 @@ let PivotView = class PivotView extends Component {
|
|
|
25141
25583
|
if (this.commonModule) {
|
|
25142
25584
|
this.commonModule = null;
|
|
25143
25585
|
}
|
|
25144
|
-
if (this.
|
|
25145
|
-
this.
|
|
25586
|
+
if (this.pivotChartModule) {
|
|
25587
|
+
this.pivotChartModule = null;
|
|
25146
25588
|
}
|
|
25147
25589
|
if (this.pivotButtonModule) {
|
|
25148
25590
|
this.pivotButtonModule = null;
|
|
@@ -25162,6 +25604,12 @@ let PivotView = class PivotView extends Component {
|
|
|
25162
25604
|
if (this.drillThroughModule) {
|
|
25163
25605
|
this.drillThroughModule = null;
|
|
25164
25606
|
}
|
|
25607
|
+
if (this.clonedDataSet) {
|
|
25608
|
+
this.clonedDataSet = null;
|
|
25609
|
+
}
|
|
25610
|
+
if (this.clonedReport) {
|
|
25611
|
+
this.clonedReport = null;
|
|
25612
|
+
}
|
|
25165
25613
|
this.element.innerHTML = '';
|
|
25166
25614
|
removeClass([this.element], ROOT);
|
|
25167
25615
|
removeClass([this.element], RTL);
|
|
@@ -25505,6 +25953,15 @@ __decorate([
|
|
|
25505
25953
|
__decorate([
|
|
25506
25954
|
Event()
|
|
25507
25955
|
], PivotView.prototype, "beforeServiceInvoke", void 0);
|
|
25956
|
+
__decorate([
|
|
25957
|
+
Event()
|
|
25958
|
+
], PivotView.prototype, "actionBegin", void 0);
|
|
25959
|
+
__decorate([
|
|
25960
|
+
Event()
|
|
25961
|
+
], PivotView.prototype, "actionComplete", void 0);
|
|
25962
|
+
__decorate([
|
|
25963
|
+
Event()
|
|
25964
|
+
], PivotView.prototype, "actionFailure", void 0);
|
|
25508
25965
|
PivotView = __decorate([
|
|
25509
25966
|
NotifyPropertyChanges
|
|
25510
25967
|
], PivotView);
|
|
@@ -25517,6 +25974,247 @@ PivotView = __decorate([
|
|
|
25517
25974
|
* Renderer Export
|
|
25518
25975
|
*/
|
|
25519
25976
|
|
|
25977
|
+
/**
|
|
25978
|
+
* This is a file to perform common utility for OLAP and Relational datasource
|
|
25979
|
+
* @hidden
|
|
25980
|
+
*/
|
|
25981
|
+
class PivotExportUtil {
|
|
25982
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
25983
|
+
static getDefinedObj(data) {
|
|
25984
|
+
let keyPos = 0;
|
|
25985
|
+
let framedSet = {};
|
|
25986
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
25987
|
+
if (!(data === null || data === undefined)) {
|
|
25988
|
+
let fields = Object.keys(data);
|
|
25989
|
+
while (keyPos < fields.length) {
|
|
25990
|
+
if (!(data[fields[keyPos]] === null || data[fields[keyPos]] === undefined)) {
|
|
25991
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
25992
|
+
}
|
|
25993
|
+
keyPos++;
|
|
25994
|
+
}
|
|
25995
|
+
}
|
|
25996
|
+
else {
|
|
25997
|
+
framedSet = data;
|
|
25998
|
+
}
|
|
25999
|
+
return framedSet;
|
|
26000
|
+
}
|
|
26001
|
+
static getClonedPivotValues(pivotValues) {
|
|
26002
|
+
let clonedSets = [];
|
|
26003
|
+
for (let i = 0; i < pivotValues.length; i++) {
|
|
26004
|
+
if (pivotValues[i]) {
|
|
26005
|
+
clonedSets[i] = [];
|
|
26006
|
+
for (let j = 0; j < pivotValues[i].length; j++) {
|
|
26007
|
+
if (pivotValues[i][j]) {
|
|
26008
|
+
/* eslint-disable */
|
|
26009
|
+
clonedSets[i][j] = this.getClonedPivotValueObj(pivotValues[i][j]);
|
|
26010
|
+
/* eslint-enable */
|
|
26011
|
+
}
|
|
26012
|
+
}
|
|
26013
|
+
}
|
|
26014
|
+
}
|
|
26015
|
+
return clonedSets;
|
|
26016
|
+
}
|
|
26017
|
+
/* eslint-disable */
|
|
26018
|
+
static getClonedPivotValueObj(data) {
|
|
26019
|
+
/* eslint-enable */
|
|
26020
|
+
let keyPos = 0;
|
|
26021
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
26022
|
+
let framedSet = {};
|
|
26023
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
26024
|
+
if (!(data === null || data === undefined)) {
|
|
26025
|
+
let fields = Object.keys(data);
|
|
26026
|
+
while (keyPos < fields.length) {
|
|
26027
|
+
framedSet[fields[keyPos]] = data[fields[keyPos]];
|
|
26028
|
+
keyPos++;
|
|
26029
|
+
}
|
|
26030
|
+
}
|
|
26031
|
+
else {
|
|
26032
|
+
framedSet = data;
|
|
26033
|
+
}
|
|
26034
|
+
return framedSet;
|
|
26035
|
+
}
|
|
26036
|
+
/* eslint-disable */
|
|
26037
|
+
static isContainCommonElements(collection1, collection2) {
|
|
26038
|
+
/* eslint-enable */
|
|
26039
|
+
for (let i = 0, cnt = collection1.length; i < cnt; i++) {
|
|
26040
|
+
for (let j = 0, lnt = collection2.length; j < lnt; j++) {
|
|
26041
|
+
if (collection2[j] === collection1[i]) {
|
|
26042
|
+
return true;
|
|
26043
|
+
}
|
|
26044
|
+
}
|
|
26045
|
+
}
|
|
26046
|
+
return false;
|
|
26047
|
+
}
|
|
26048
|
+
/* eslint-disable */
|
|
26049
|
+
static formatPdfHeaderFooter(pdf) {
|
|
26050
|
+
let contents = [];
|
|
26051
|
+
if (!isNullOrUndefined(pdf)) {
|
|
26052
|
+
for (let i = 0; i < pdf.length; i++) {
|
|
26053
|
+
let a = pdf[i];
|
|
26054
|
+
let content = {
|
|
26055
|
+
/* eslint-enable */
|
|
26056
|
+
type: a.Type,
|
|
26057
|
+
pageNumberType: a.PageNumberType,
|
|
26058
|
+
style: a.Style ? {
|
|
26059
|
+
penColor: a.Style.PenColor,
|
|
26060
|
+
penSize: a.Style.PenSize,
|
|
26061
|
+
dashStyle: a.Style.DashStyle,
|
|
26062
|
+
textBrushColor: a.Style.TextBrushColor,
|
|
26063
|
+
textPenColor: a.Style.TextPenColor,
|
|
26064
|
+
fontSize: a.Style.FontSize,
|
|
26065
|
+
hAlign: a.Style.HAlign,
|
|
26066
|
+
vAlign: a.Style.VAlign
|
|
26067
|
+
} : a.Style,
|
|
26068
|
+
points: a.Points !== null ? {
|
|
26069
|
+
x1: a.Points.X1,
|
|
26070
|
+
y1: a.Points.Y1,
|
|
26071
|
+
x2: a.Points.X2,
|
|
26072
|
+
y2: a.Points.Y2
|
|
26073
|
+
} : null,
|
|
26074
|
+
format: a.Format,
|
|
26075
|
+
position: a.Position !== null ? {
|
|
26076
|
+
x: a.Position.X,
|
|
26077
|
+
y: a.Position.Y
|
|
26078
|
+
} : null,
|
|
26079
|
+
size: a.Size !== null ? {
|
|
26080
|
+
height: a.Size.Height,
|
|
26081
|
+
width: a.Size.Width
|
|
26082
|
+
} : null,
|
|
26083
|
+
src: a.Src,
|
|
26084
|
+
value: a.Value,
|
|
26085
|
+
font: a.Font
|
|
26086
|
+
};
|
|
26087
|
+
contents.push(content);
|
|
26088
|
+
}
|
|
26089
|
+
}
|
|
26090
|
+
return contents;
|
|
26091
|
+
}
|
|
26092
|
+
/* eslint-disable */
|
|
26093
|
+
static formatPdfExportProperties(pdf) {
|
|
26094
|
+
let values;
|
|
26095
|
+
/* eslint-enable */
|
|
26096
|
+
values = this.getDefinedObj({
|
|
26097
|
+
pageOrientation: typeof pdf.PageOrientation === 'string' ? pdf.PageOrientation : null,
|
|
26098
|
+
pageSize: typeof pdf.PageSize === 'string' ? pdf.PageSize : null,
|
|
26099
|
+
header: !isNullOrUndefined(pdf.Header) ? {
|
|
26100
|
+
fromTop: pdf.Header.FromTop,
|
|
26101
|
+
height: pdf.Header.Height,
|
|
26102
|
+
contents: this.formatPdfHeaderFooter(pdf.Header.Contents)
|
|
26103
|
+
} : null,
|
|
26104
|
+
columns: pdf.Columns,
|
|
26105
|
+
footer: !isNullOrUndefined(pdf.Footer) ? {
|
|
26106
|
+
fromTop: pdf.Footer.FromBottom,
|
|
26107
|
+
height: pdf.Footer.Height,
|
|
26108
|
+
contents: this.formatPdfHeaderFooter(pdf.Footer.Contents)
|
|
26109
|
+
} : null,
|
|
26110
|
+
includeHiddenColumn: pdf.IncludeHiddenColumn,
|
|
26111
|
+
dataSource: pdf.DataSource,
|
|
26112
|
+
exportType: typeof pdf.ExportType === 'string' ? pdf.ExportType : null,
|
|
26113
|
+
theme: !isNullOrUndefined(pdf.Theme) ? {
|
|
26114
|
+
header: pdf.Theme.Header,
|
|
26115
|
+
record: pdf.Theme.Record,
|
|
26116
|
+
caption: pdf.Theme.Caption
|
|
26117
|
+
} : null,
|
|
26118
|
+
fileName: pdf.FileName,
|
|
26119
|
+
hierarchyExportMode: typeof pdf.HierarchyExportMode === 'string' ? pdf.HierarchyExportMode : null,
|
|
26120
|
+
allowHorizontalOverflow: pdf.AllowHorizontalOverflow
|
|
26121
|
+
});
|
|
26122
|
+
return values;
|
|
26123
|
+
}
|
|
26124
|
+
/* eslint-disable */
|
|
26125
|
+
static formatExcelStyle(style) {
|
|
26126
|
+
let prop;
|
|
26127
|
+
/* eslint-enable */
|
|
26128
|
+
if (!isNullOrUndefined(style)) {
|
|
26129
|
+
prop = this.getDefinedObj({
|
|
26130
|
+
fontColor: style.FontColor,
|
|
26131
|
+
fontName: style.FontName,
|
|
26132
|
+
fontSize: style.FontSize,
|
|
26133
|
+
hAlign: style.HAlign === String ? style.HAlign : null,
|
|
26134
|
+
vAlign: style.VAlign === String ? style.VAlign : null,
|
|
26135
|
+
bold: style.Bold,
|
|
26136
|
+
indent: style.Indent,
|
|
26137
|
+
italic: style.Italic,
|
|
26138
|
+
underline: style.Underline,
|
|
26139
|
+
backColor: style.BackColor,
|
|
26140
|
+
wrapText: style.WrapText,
|
|
26141
|
+
borders: style.Borders,
|
|
26142
|
+
numberFormat: style.NumberFormat,
|
|
26143
|
+
type: style.Type
|
|
26144
|
+
});
|
|
26145
|
+
}
|
|
26146
|
+
return prop;
|
|
26147
|
+
}
|
|
26148
|
+
/* eslint-disable */
|
|
26149
|
+
static formatExcelCell(cell) {
|
|
26150
|
+
let cells = [];
|
|
26151
|
+
if (!isNullOrUndefined(cell)) {
|
|
26152
|
+
for (let i = 0; i < cell.length; i++) {
|
|
26153
|
+
this.getDefinedObj({
|
|
26154
|
+
index: !isNullOrUndefined(cell[i].Index) ? cell[i].Index : null,
|
|
26155
|
+
colSpan: !isNullOrUndefined(cell[i].ColSpan) ? cell[i].ColSpan : null,
|
|
26156
|
+
value: !isNullOrUndefined(cell[i].Value) ? cell[i].Value : null,
|
|
26157
|
+
hyperlink: {
|
|
26158
|
+
target: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.Target : null,
|
|
26159
|
+
displayText: !isNullOrUndefined(cell[i].Hyperlink) ? cell[i].Hyperlink.DisplayText : null
|
|
26160
|
+
},
|
|
26161
|
+
styles: this.formatExcelStyle(cell[i].Style),
|
|
26162
|
+
rowSpan: !isNullOrUndefined(cell[i].RowSpan) ? cell[i].RowSpan : null
|
|
26163
|
+
});
|
|
26164
|
+
/* eslint-enable */
|
|
26165
|
+
}
|
|
26166
|
+
}
|
|
26167
|
+
return cells;
|
|
26168
|
+
}
|
|
26169
|
+
/* eslint-disable */
|
|
26170
|
+
static formatExcelHeaderFooter(excel) {
|
|
26171
|
+
let rows = [];
|
|
26172
|
+
if (!isNullOrUndefined(excel)) {
|
|
26173
|
+
for (let i = 0; i < excel.Rows.length; i++) {
|
|
26174
|
+
let row = excel.Rows[i];
|
|
26175
|
+
let prop = this.getDefinedObj({
|
|
26176
|
+
index: !isNullOrUndefined(row.Index) ? row.Index : null,
|
|
26177
|
+
cells: this.formatExcelCell(row.Cells),
|
|
26178
|
+
grouping: !isNullOrUndefined(row.Grouping) ? row.Grouping : null
|
|
26179
|
+
});
|
|
26180
|
+
rows.push(prop);
|
|
26181
|
+
}
|
|
26182
|
+
}
|
|
26183
|
+
return rows;
|
|
26184
|
+
}
|
|
26185
|
+
static formatExcelExportProperties(excel) {
|
|
26186
|
+
/* eslint-enable */
|
|
26187
|
+
let prop;
|
|
26188
|
+
prop = this.getDefinedObj({
|
|
26189
|
+
dataSource: excel.DataSource,
|
|
26190
|
+
query: excel.Query,
|
|
26191
|
+
multipleExport: this.getDefinedObj({
|
|
26192
|
+
type: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.Type : null,
|
|
26193
|
+
blankRows: !isNullOrUndefined(excel.MultipleExport) ? excel.MultipleExport.BlankRows : null
|
|
26194
|
+
}),
|
|
26195
|
+
header: this.getDefinedObj({
|
|
26196
|
+
headerRows: !isNullOrUndefined(excel.Header) ? excel.Header.HeaderRows : null,
|
|
26197
|
+
rows: this.formatExcelHeaderFooter(excel.Header)
|
|
26198
|
+
}),
|
|
26199
|
+
footer: this.getDefinedObj({
|
|
26200
|
+
footerRows: !isNullOrUndefined(excel.Footer) ? excel.Footer.FooterRows : null,
|
|
26201
|
+
rows: this.formatExcelHeaderFooter(excel.Footer)
|
|
26202
|
+
}),
|
|
26203
|
+
columns: excel.Columns,
|
|
26204
|
+
exportType: typeof excel.ExportType === 'string' ? excel.ExportType : undefined,
|
|
26205
|
+
includeHiddenColumn: excel.IncludeHiddenColumn,
|
|
26206
|
+
theme: !isNullOrUndefined(excel.Theme) ? {
|
|
26207
|
+
header: this.formatExcelStyle(excel.Theme.Header),
|
|
26208
|
+
record: this.formatExcelStyle(excel.Theme.Record),
|
|
26209
|
+
caption: this.formatExcelStyle(excel.Theme.Caption)
|
|
26210
|
+
} : undefined,
|
|
26211
|
+
fileName: excel.FileName,
|
|
26212
|
+
hierarchyExportMode: typeof excel.HierarchyExportMode === 'string' ? excel.HierarchyExportMode : undefined
|
|
26213
|
+
});
|
|
26214
|
+
return prop;
|
|
26215
|
+
}
|
|
26216
|
+
}
|
|
26217
|
+
|
|
25520
26218
|
/**
|
|
25521
26219
|
* @hidden
|
|
25522
26220
|
* `ExcelExport` module is used to handle the Excel export action.
|
|
@@ -25584,17 +26282,14 @@ class ExcelExport$1 {
|
|
|
25584
26282
|
this.engine = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
25585
26283
|
/** Event trigerring */
|
|
25586
26284
|
let clonedValues;
|
|
25587
|
-
let currentPivotValues =
|
|
26285
|
+
let currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
25588
26286
|
let customFileName = isFileNameSet ? exportProperties.fileName : 'default.xlsx';
|
|
25589
|
-
if (isHeaderSet) {
|
|
25590
|
-
this.addHeaderAndFooter(exportProperties.header, '', 'header', exportProperties.header.headerRows);
|
|
25591
|
-
}
|
|
25592
26287
|
if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
|
|
25593
26288
|
let pageSettings = this.engine.pageSettings;
|
|
25594
26289
|
this.engine.pageSettings = null;
|
|
25595
26290
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
25596
26291
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
25597
|
-
clonedValues =
|
|
26292
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
25598
26293
|
this.engine.pivotValues = currentPivotValues;
|
|
25599
26294
|
this.engine.pageSettings = pageSettings;
|
|
25600
26295
|
}
|
|
@@ -25602,7 +26297,7 @@ class ExcelExport$1 {
|
|
|
25602
26297
|
clonedValues = currentPivotValues;
|
|
25603
26298
|
}
|
|
25604
26299
|
let args = {
|
|
25605
|
-
fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues]
|
|
26300
|
+
fileName: customFileName, header: '', footer: '', dataCollections: [clonedValues], excelExportProperties: exportProperties
|
|
25606
26301
|
};
|
|
25607
26302
|
let fileName;
|
|
25608
26303
|
let header;
|
|
@@ -25638,15 +26333,17 @@ class ExcelExport$1 {
|
|
|
25638
26333
|
let pivotCell = pivotValues[rCnt][cCnt];
|
|
25639
26334
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25640
26335
|
let cellValue = pivotCell.axis === 'value' ? pivotCell.value : pivotCell.formattedText;
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
|
|
26336
|
+
let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
26337
|
+
|| (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
|
|
26338
|
+
if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
|
|
26339
|
+
cellValue = isgetValuesHeader ? this.parent.getValuesHeader(pivotCell, 'grandTotal') : this.parent.localeObj.getConstant('grandTotal');
|
|
25644
26340
|
}
|
|
25645
26341
|
else if (pivotCell.type === 'sum') {
|
|
25646
26342
|
cellValue = cellValue.toString().replace('Total', this.parent.localeObj.getConstant('total'));
|
|
25647
26343
|
}
|
|
25648
26344
|
else {
|
|
25649
|
-
cellValue = (this.parent.
|
|
26345
|
+
cellValue = (!isNullOrUndefined(pivotCell.valueSort) && (this.parent.localeObj.getConstant('grandTotal') + this.parent.dataSourceSettings.valueSortSettings.headerDelimiter + pivotCell.formattedText
|
|
26346
|
+
=== pivotCell.valueSort.levelName) && isgetValuesHeader) ? this.parent.getValuesHeader(pivotCell, 'value') : cellValue;
|
|
25650
26347
|
}
|
|
25651
26348
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
25652
26349
|
cells.push({
|
|
@@ -25772,14 +26469,21 @@ class PDFExport {
|
|
|
25772
26469
|
let footer = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer) && !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].value)) ?
|
|
25773
26470
|
pdfExportProperties.footer.contents[0].value : eventParams.args.footer;
|
|
25774
26471
|
let font = new PdfStandardFont(PdfFontFamily.TimesRoman, 15, PdfFontStyle.Regular);
|
|
25775
|
-
let
|
|
26472
|
+
let headerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.header)
|
|
26473
|
+
&& !isNullOrUndefined(pdfExportProperties.header.contents) && !isNullOrUndefined(pdfExportProperties.header.contents[0].style));
|
|
26474
|
+
let footerCondition = (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.footer)
|
|
26475
|
+
&& !isNullOrUndefined(pdfExportProperties.footer.contents) && !isNullOrUndefined(pdfExportProperties.footer.contents[0].style));
|
|
26476
|
+
let headerColor = (headerCondition) ? this.hexDecToRgb(pdfExportProperties.header.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
|
|
26477
|
+
let brushHeader = (headerCondition) ? new PdfSolidBrush(new PdfColor(headerColor.r, headerColor.g, headerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
|
|
26478
|
+
let footerColor = (footerCondition) ? this.hexDecToRgb(pdfExportProperties.footer.contents[0].style.textBrushColor) : (new PdfColor(0, 0, 0));
|
|
26479
|
+
let brushFooter = (footerCondition) ? new PdfSolidBrush(new PdfColor(footerColor.r, footerColor.g, footerColor.b)) : new PdfSolidBrush(new PdfColor(0, 0, 0));
|
|
25776
26480
|
let pen = new PdfPen(new PdfColor(0, 0, 0), .5);
|
|
25777
26481
|
/** Header and Footer to be set */
|
|
25778
26482
|
let headerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
|
|
25779
|
-
headerTemplate.graphics.drawString(header, font, pen,
|
|
26483
|
+
headerTemplate.graphics.drawString(header, font, pen, brushHeader, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
|
|
25780
26484
|
eventParams.document.template.top = headerTemplate;
|
|
25781
26485
|
let footerTemplate = new PdfPageTemplateElement(new RectangleF(0, 0, page.graphics.clientSize.width, 20));
|
|
25782
|
-
footerTemplate.graphics.drawString(footer, font, pen,
|
|
26486
|
+
footerTemplate.graphics.drawString(footer, font, pen, brushFooter, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
|
|
25783
26487
|
eventParams.document.template.bottom = footerTemplate;
|
|
25784
26488
|
return page;
|
|
25785
26489
|
}
|
|
@@ -26158,13 +26862,13 @@ class PDFExport {
|
|
|
26158
26862
|
applyEvent() {
|
|
26159
26863
|
/** Event trigerring */
|
|
26160
26864
|
let clonedValues;
|
|
26161
|
-
let currentPivotValues =
|
|
26865
|
+
let currentPivotValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26162
26866
|
if (this.parent.exportAllPages && this.parent.enableVirtualization && this.parent.dataType !== 'olap') {
|
|
26163
26867
|
let pageSettings = this.engine.pageSettings;
|
|
26164
26868
|
this.engine.pageSettings = null;
|
|
26165
26869
|
this.engine.generateGridData(this.parent.dataSourceSettings, true);
|
|
26166
26870
|
this.parent.applyFormatting(this.engine.pivotValues);
|
|
26167
|
-
clonedValues =
|
|
26871
|
+
clonedValues = PivotExportUtil.getClonedPivotValues(this.engine.pivotValues);
|
|
26168
26872
|
this.engine.pivotValues = currentPivotValues;
|
|
26169
26873
|
this.engine.pageSettings = pageSettings;
|
|
26170
26874
|
}
|
|
@@ -26653,31 +27357,50 @@ class DialogRenderer {
|
|
|
26653
27357
|
return axisWrapper;
|
|
26654
27358
|
}
|
|
26655
27359
|
showCalculatedField(event) {
|
|
26656
|
-
|
|
26657
|
-
if (this.parent.
|
|
26658
|
-
this.parent.
|
|
26659
|
-
|
|
27360
|
+
try {
|
|
27361
|
+
if (!this.parent.isAdaptive) {
|
|
27362
|
+
this.parent.actionObj.actionName = openCalculatedField;
|
|
27363
|
+
if (this.parent.actionBeginMethod()) {
|
|
27364
|
+
return;
|
|
27365
|
+
}
|
|
27366
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
27367
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
27368
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
27369
|
+
}
|
|
26660
27370
|
}
|
|
27371
|
+
this.parent.notify(initCalculatedField, {});
|
|
27372
|
+
}
|
|
27373
|
+
catch (execption) {
|
|
27374
|
+
this.parent.actionFailureMethod(execption);
|
|
26661
27375
|
}
|
|
26662
|
-
this.parent.notify(initCalculatedField, {});
|
|
26663
27376
|
}
|
|
26664
27377
|
showFieldListDialog(event) {
|
|
26665
27378
|
let activeindex = this.adaptiveElement.selectedItem;
|
|
26666
27379
|
this.parent.treeViewModule.render(activeindex);
|
|
26667
27380
|
}
|
|
26668
27381
|
onShowFieldList() {
|
|
26669
|
-
|
|
26670
|
-
|
|
26671
|
-
|
|
27382
|
+
this.parent.actionObj.actionName = showFieldList;
|
|
27383
|
+
if (this.parent.actionBeginMethod()) {
|
|
27384
|
+
return;
|
|
27385
|
+
}
|
|
27386
|
+
this.parent.actionObj.actionName = '';
|
|
27387
|
+
try {
|
|
27388
|
+
if (this.parent.allowDeferLayoutUpdate) {
|
|
27389
|
+
if (this.parent.isAdaptive) {
|
|
27390
|
+
this.parent.axisFieldModule.render();
|
|
27391
|
+
}
|
|
27392
|
+
this.parent.clonedDataSource = extend({}, this.parent.dataSourceSettings, null, true);
|
|
27393
|
+
this.parent.clonedFieldList = extend({}, this.parent.pivotFieldList, null, true);
|
|
26672
27394
|
}
|
|
26673
|
-
this.parent.
|
|
26674
|
-
this.parent.
|
|
27395
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
27396
|
+
this.parent.dialogRenderer.fieldListDialog.show();
|
|
27397
|
+
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
27398
|
+
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
27399
|
+
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
27400
|
+
}
|
|
27401
|
+
catch (execption) {
|
|
27402
|
+
this.parent.actionFailureMethod(execption);
|
|
26675
27403
|
}
|
|
26676
|
-
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
26677
|
-
this.parent.dialogRenderer.fieldListDialog.show();
|
|
26678
|
-
this.parent.dialogRenderer.fieldListDialog.element.style.top =
|
|
26679
|
-
parseInt(this.parent.dialogRenderer.fieldListDialog.element.style.top, 10) < 0 ?
|
|
26680
|
-
'0px' : this.parent.dialogRenderer.fieldListDialog.element.style.top;
|
|
26681
27404
|
}
|
|
26682
27405
|
onCloseFieldList() {
|
|
26683
27406
|
if (this.parent.allowDeferLayoutUpdate) {
|
|
@@ -26705,6 +27428,10 @@ class DialogRenderer {
|
|
|
26705
27428
|
}
|
|
26706
27429
|
}
|
|
26707
27430
|
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
27431
|
+
this.parent.actionObj.actionName = closeFieldlist;
|
|
27432
|
+
if (this.parent.actionObj.actionName) {
|
|
27433
|
+
this.parent.actionCompleteMethod();
|
|
27434
|
+
}
|
|
26708
27435
|
}
|
|
26709
27436
|
removeFieldListIcon() {
|
|
26710
27437
|
if (this.parent.isAdaptive && this.parent.allowCalculatedField && this.parent.calculatedFieldModule) {
|
|
@@ -27580,28 +28307,41 @@ class TreeViewRenderer {
|
|
|
27580
28307
|
updateSorting(args) {
|
|
27581
28308
|
let target = args.target;
|
|
27582
28309
|
let option = target.getAttribute('data-sort');
|
|
27583
|
-
|
|
27584
|
-
|
|
27585
|
-
|
|
27586
|
-
|
|
27587
|
-
|
|
27588
|
-
|
|
27589
|
-
|
|
27590
|
-
|
|
27591
|
-
|
|
27592
|
-
|
|
27593
|
-
|
|
27594
|
-
|
|
27595
|
-
|
|
27596
|
-
|
|
27597
|
-
|
|
27598
|
-
|
|
27599
|
-
|
|
27600
|
-
|
|
27601
|
-
|
|
27602
|
-
|
|
28310
|
+
this.parent.actionObj.actionName = sortFieldTree;
|
|
28311
|
+
if (this.parent.actionBeginMethod()) {
|
|
28312
|
+
return;
|
|
28313
|
+
}
|
|
28314
|
+
try {
|
|
28315
|
+
if (target.className.indexOf('e-selected') === -1) {
|
|
28316
|
+
switch (option) {
|
|
28317
|
+
case 'None':
|
|
28318
|
+
this.fieldListSort = 'None';
|
|
28319
|
+
addClass([target], 'e-selected');
|
|
28320
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
28321
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
28322
|
+
break;
|
|
28323
|
+
case 'Ascend':
|
|
28324
|
+
this.fieldListSort = 'Ascend';
|
|
28325
|
+
addClass([target], 'e-selected');
|
|
28326
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
28327
|
+
removeClass([this.parentElement.querySelector('.e-sort-descend')], 'e-selected');
|
|
28328
|
+
break;
|
|
28329
|
+
case 'Descend':
|
|
28330
|
+
this.fieldListSort = 'Descend';
|
|
28331
|
+
addClass([target], 'e-selected');
|
|
28332
|
+
removeClass([this.parentElement.querySelector('.e-sort-ascend')], 'e-selected');
|
|
28333
|
+
removeClass([this.parentElement.querySelector('.e-sort-none')], 'e-selected');
|
|
28334
|
+
break;
|
|
28335
|
+
}
|
|
28336
|
+
this.refreshTreeView();
|
|
27603
28337
|
}
|
|
27604
|
-
|
|
28338
|
+
}
|
|
28339
|
+
catch (execption) {
|
|
28340
|
+
this.parent.actionFailureMethod(execption);
|
|
28341
|
+
}
|
|
28342
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
28343
|
+
if (this.parent.actionObj.actionName) {
|
|
28344
|
+
this.parent.actionCompleteMethod();
|
|
27605
28345
|
}
|
|
27606
28346
|
}
|
|
27607
28347
|
/* eslint-disable */
|
|
@@ -27963,7 +28703,7 @@ class PivotButton {
|
|
|
27963
28703
|
attrs: { 'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('editCalculatedField') },
|
|
27964
28704
|
className: ICON + ' ' + CALC_EDIT
|
|
27965
28705
|
});
|
|
27966
|
-
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && field[i].showEditIcon) {
|
|
28706
|
+
if (this.parent.allowCalculatedField && this.parent.calculatedFieldModule && (field[i].showEditIcon || field[i].showEditIcon === undefined)) {
|
|
27967
28707
|
removeClass([calcElement], ICON_DISABLE);
|
|
27968
28708
|
}
|
|
27969
28709
|
else {
|
|
@@ -27976,7 +28716,7 @@ class PivotButton {
|
|
|
27976
28716
|
className: ICON + ' ' + REMOVE_CLASS
|
|
27977
28717
|
});
|
|
27978
28718
|
if (this.parent.getModuleName() === 'pivotview') {
|
|
27979
|
-
if ((this.parent.groupingBarSettings.showRemoveIcon && field[i].showRemoveIcon)) {
|
|
28719
|
+
if ((this.parent.groupingBarSettings.showRemoveIcon && (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined))) {
|
|
27980
28720
|
removeClass([removeElement], ICON_DISABLE);
|
|
27981
28721
|
}
|
|
27982
28722
|
else {
|
|
@@ -27984,7 +28724,7 @@ class PivotButton {
|
|
|
27984
28724
|
}
|
|
27985
28725
|
}
|
|
27986
28726
|
else {
|
|
27987
|
-
if (field[i].showRemoveIcon) {
|
|
28727
|
+
if (field[i].showRemoveIcon || field[i].showRemoveIcon === undefined) {
|
|
27988
28728
|
removeClass([removeElement], ICON_DISABLE);
|
|
27989
28729
|
}
|
|
27990
28730
|
else {
|
|
@@ -28016,13 +28756,13 @@ class PivotButton {
|
|
|
28016
28756
|
}
|
|
28017
28757
|
if (axis === 'values') {
|
|
28018
28758
|
for (let element of this.parentElement.querySelectorAll('.e-group-' + axis)) {
|
|
28019
|
-
if (element.classList.contains(GROUP_CHART_VALUE) && this.parent.
|
|
28759
|
+
if (element.classList.contains(GROUP_CHART_VALUE) && this.parent.pivotChartModule) {
|
|
28020
28760
|
let valueData = field.map((item) => { return { text: item.caption ? item.caption : item.name, value: item.name }; });
|
|
28021
28761
|
let parent = this.parent;
|
|
28022
28762
|
if (this.valueFiedDropDownList && element.querySelector('.' + GROUP_CHART_VALUE_DROPDOWN_DIV)) {
|
|
28023
28763
|
this.valueFiedDropDownList.dataSource = valueData;
|
|
28024
28764
|
this.valueFiedDropDownList.value = !parent.chartSettings.enableMultipleAxis ?
|
|
28025
|
-
parent.
|
|
28765
|
+
parent.pivotChartModule.currentMeasure : valueData[0].value;
|
|
28026
28766
|
}
|
|
28027
28767
|
else {
|
|
28028
28768
|
let ddlDiv = createElement('div', { className: GROUP_CHART_VALUE_DROPDOWN_DIV });
|
|
@@ -28032,7 +28772,7 @@ class PivotButton {
|
|
|
28032
28772
|
enableRtl: this.parent.enableRtl,
|
|
28033
28773
|
locale: this.parent.locale,
|
|
28034
28774
|
value: !parent.chartSettings.enableMultipleAxis ?
|
|
28035
|
-
parent.
|
|
28775
|
+
parent.pivotChartModule.currentMeasure : valueData[0].value,
|
|
28036
28776
|
width: 200,
|
|
28037
28777
|
fields: { value: 'value', text: 'text' },
|
|
28038
28778
|
cssClass: GROUP_CHART_VALUE_DROPDOWN,
|
|
@@ -28051,14 +28791,14 @@ class PivotButton {
|
|
|
28051
28791
|
else if (axis === 'columns') {
|
|
28052
28792
|
let availColindex = undefined;
|
|
28053
28793
|
for (let element of this.parentElement.querySelectorAll('.e-group-' + axis)) {
|
|
28054
|
-
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.
|
|
28055
|
-
let currentMeasure = this.parent.
|
|
28794
|
+
if (element.classList.contains(GROUP_CHART_COLUMN) && this.parent.pivotChartModule) {
|
|
28795
|
+
let currentMeasure = this.parent.pivotChartModule.currentMeasure;
|
|
28056
28796
|
let delimiter = this.parent.chartSettings.columnDelimiter ? this.parent.chartSettings.columnDelimiter : '-';
|
|
28057
28797
|
let columnHeader = (this.parent.chartSettings.columnHeader && this.parent.chartSettings.columnHeader !== '') ?
|
|
28058
28798
|
this.parent.chartSettings.columnHeader.split(delimiter).join(' - ') : '';
|
|
28059
28799
|
let engineModule = this.parent.dataType === 'olap' ? this.parent.olapEngineModule : this.parent.engineModule;
|
|
28060
28800
|
let pivotValues = engineModule.pivotValues;
|
|
28061
|
-
let totColIndex = this.parent.
|
|
28801
|
+
let totColIndex = this.parent.pivotChartModule.getColumnTotalIndex(pivotValues);
|
|
28062
28802
|
let rKeys = Object.keys(pivotValues);
|
|
28063
28803
|
let columnData = [];
|
|
28064
28804
|
let firstValueRow = false;
|
|
@@ -28168,7 +28908,7 @@ class PivotButton {
|
|
|
28168
28908
|
},
|
|
28169
28909
|
className: PIVOT_BUTTON_CONTENT_CLASS + ' ' +
|
|
28170
28910
|
(this.parent.getModuleName() === 'pivotview' ?
|
|
28171
|
-
this.parent.groupingBarSettings.allowDragAndDrop && field[i].allowDragAndDrop ? '' : DRAG_DISABLE_CLASS : ''),
|
|
28911
|
+
this.parent.groupingBarSettings.allowDragAndDrop && (field[i].allowDragAndDrop || field[i].allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS : ''),
|
|
28172
28912
|
innerHTML: axis === 'filters' ? (this.parent.dataType === 'olap' && engineModule.fieldList[field[i].name].type === 'CalculatedField') ?
|
|
28173
28913
|
text : (text + ' (' + filterMem + ')') : (this.parent.dataType === 'olap' ?
|
|
28174
28914
|
text : (!this.parent.dataSourceSettings.showAggregationOnValueField || axis !== 'values' || aggregation === 'CalculatedField' ?
|
|
@@ -28234,43 +28974,54 @@ class PivotButton {
|
|
|
28234
28974
|
}
|
|
28235
28975
|
openCalculatedFieldDialog(args) {
|
|
28236
28976
|
let fieldName = args.target.parentElement.id;
|
|
28237
|
-
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
28243
|
-
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
28244
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28245
|
-
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
28246
|
-
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28247
|
-
}
|
|
28248
|
-
else {
|
|
28249
|
-
if (!this.parent.isAdaptive) {
|
|
28250
|
-
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28251
|
-
}
|
|
28252
|
-
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
28253
|
-
}
|
|
28977
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
28978
|
+
this.parent.actionObj.actionName = editCalculatedField;
|
|
28979
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
28980
|
+
if (this.parent.actionBeginMethod()) {
|
|
28981
|
+
return;
|
|
28254
28982
|
}
|
|
28255
|
-
|
|
28256
|
-
if (this.parent.
|
|
28257
|
-
this.parent.
|
|
28258
|
-
|
|
28259
|
-
|
|
28260
|
-
.
|
|
28261
|
-
|
|
28262
|
-
|
|
28263
|
-
|
|
28264
|
-
|
|
28265
|
-
|
|
28266
|
-
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
28983
|
+
try {
|
|
28984
|
+
if (this.parent.getModuleName() === 'pivotview') {
|
|
28985
|
+
if (this.parent.isAdaptive && (this.parent.showFieldList &&
|
|
28986
|
+
this.parent.pivotFieldListModule &&
|
|
28987
|
+
!this.parent.pivotFieldListModule.isDestroyed)) {
|
|
28988
|
+
this.parent.pivotFieldListModule.element
|
|
28989
|
+
.querySelector('.' + TOGGLE_FIELD_LIST_CLASS).click();
|
|
28990
|
+
this.parent.pivotFieldListModule.dialogRenderer.adaptiveElement.select(4);
|
|
28991
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
28992
|
+
this.parent.pivotFieldListModule.calculatedFieldModule
|
|
28993
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28267
28994
|
}
|
|
28268
|
-
|
|
28269
|
-
|
|
28995
|
+
else {
|
|
28996
|
+
if (!this.parent.isAdaptive) {
|
|
28997
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28998
|
+
}
|
|
28999
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29000
|
+
}
|
|
29001
|
+
}
|
|
29002
|
+
else if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
29003
|
+
if (this.parent.isAdaptive) {
|
|
29004
|
+
this.parent.dialogRenderer.adaptiveElement.select(4);
|
|
29005
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
29006
|
+
this.parent.calculatedFieldModule
|
|
29007
|
+
.updateAdaptiveCalculatedField(true, fieldName);
|
|
28270
29008
|
this.parent.calculatedFieldModule.buttonCall = true;
|
|
28271
29009
|
}
|
|
29010
|
+
else {
|
|
29011
|
+
if (this.parent.dialogRenderer.fieldListDialog) {
|
|
29012
|
+
this.parent.dialogRenderer.fieldListDialog.hide();
|
|
29013
|
+
addClass([this.parent.element.querySelector('.' + TOGGLE_FIELD_LIST_CLASS)], ICON_HIDDEN);
|
|
29014
|
+
}
|
|
29015
|
+
this.parent.notify(initCalculatedField, { edit: true, fieldName: fieldName });
|
|
29016
|
+
if (this.parent.calculatedFieldModule) {
|
|
29017
|
+
this.parent.calculatedFieldModule.buttonCall = true;
|
|
29018
|
+
}
|
|
29019
|
+
}
|
|
28272
29020
|
}
|
|
28273
29021
|
}
|
|
29022
|
+
catch (execption) {
|
|
29023
|
+
this.parent.actionFailureMethod(execption);
|
|
29024
|
+
}
|
|
28274
29025
|
}
|
|
28275
29026
|
createDraggable(field, target) {
|
|
28276
29027
|
this.draggable = new Draggable(target, {
|
|
@@ -28294,7 +29045,7 @@ class PivotButton {
|
|
|
28294
29045
|
attrs: {
|
|
28295
29046
|
'tabindex': '-1', 'aria-disabled': 'false', 'title': this.parent.localeObj.getConstant('drag')
|
|
28296
29047
|
},
|
|
28297
|
-
className: ICON + ' ' + DRAG_CLASS + ' ' + (field.allowDragAndDrop ? '' : DRAG_DISABLE_CLASS)
|
|
29048
|
+
className: ICON + ' ' + DRAG_CLASS + ' ' + ((field.allowDragAndDrop || field.allowDragAndDrop === undefined) ? '' : DRAG_DISABLE_CLASS)
|
|
28298
29049
|
});
|
|
28299
29050
|
dragWrapper.appendChild(dragElement);
|
|
28300
29051
|
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
@@ -28655,39 +29406,53 @@ class PivotButton {
|
|
|
28655
29406
|
!(args.target.classList.contains(DRAG_CLASS)) &&
|
|
28656
29407
|
(buttonElement && fieldInfo.fieldItem && (fieldInfo.fieldItem.showSortIcon ||
|
|
28657
29408
|
isNullOrUndefined(fieldInfo.fieldItem.showSortIcon)))) {
|
|
28658
|
-
|
|
28659
|
-
|
|
28660
|
-
|
|
28661
|
-
|
|
28662
|
-
|
|
28663
|
-
|
|
28664
|
-
if ((
|
|
28665
|
-
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28670
|
-
|
|
29409
|
+
this.parent.actionObj.actionName = sortField;
|
|
29410
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29411
|
+
if (this.parent.actionBeginMethod()) {
|
|
29412
|
+
return;
|
|
29413
|
+
}
|
|
29414
|
+
try {
|
|
29415
|
+
if ((this.parent instanceof PivotFieldList || this.parent.groupingBarSettings.showSortIcon) &&
|
|
29416
|
+
this.parent.dataSourceSettings.enableSorting &&
|
|
29417
|
+
!(this.parent.dataType === 'olap' && ((this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
29418
|
+
this.parent.pivotGridModule !== undefined &&
|
|
29419
|
+
this.parent.pivotGridModule.enableVirtualization) ||
|
|
29420
|
+
(this.parent.getModuleName() === 'pivotview' && this.parent.enableVirtualization)))) {
|
|
29421
|
+
if (((this.parent.getModuleName() === 'pivotview' && this.parent.enableValueSorting) ||
|
|
29422
|
+
(this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule !== undefined &&
|
|
29423
|
+
this.parent.pivotGridModule.enableValueSorting))) {
|
|
29424
|
+
if (this.parent.enableValueSorting || this.parent.pivotGridModule.enableValueSorting) { /* eslint-disable-line */
|
|
29425
|
+
if (args.target.classList.contains('e-pivot-button')) {
|
|
29426
|
+
if (args.target.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
29427
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
29428
|
+
}
|
|
28671
29429
|
}
|
|
28672
|
-
|
|
28673
|
-
|
|
28674
|
-
|
|
28675
|
-
|
|
29430
|
+
else {
|
|
29431
|
+
if (args.target.parentElement.parentElement.getAttribute('data-tag').split(':')[0] === 'rows') {
|
|
29432
|
+
this.parent.setProperties({ dataSourceSettings: { valueSortSettings: { headerText: undefined } } }, true);
|
|
29433
|
+
}
|
|
28676
29434
|
}
|
|
28677
29435
|
}
|
|
28678
29436
|
}
|
|
28679
|
-
|
|
28680
|
-
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
thisObj
|
|
29437
|
+
this.parent.pivotCommon.eventBase.updateSorting(args);
|
|
29438
|
+
if (!this.parent.allowDeferLayoutUpdate || this.parent.getModuleName() !== 'pivotfieldlist') {
|
|
29439
|
+
let actionInfo = {
|
|
29440
|
+
sortInfo: this.parent.lastSortInfo
|
|
29441
|
+
};
|
|
29442
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
29443
|
+
this.updateDataSource(true);
|
|
29444
|
+
}
|
|
29445
|
+
/* eslint-disable */
|
|
29446
|
+
let thisObj = this;
|
|
29447
|
+
/* eslint-enable */
|
|
29448
|
+
if (thisObj.parent instanceof PivotFieldList) {
|
|
29449
|
+
thisObj.axisField.render();
|
|
29450
|
+
}
|
|
28689
29451
|
}
|
|
28690
29452
|
}
|
|
29453
|
+
catch (execption) {
|
|
29454
|
+
this.parent.actionFailureMethod(execption);
|
|
29455
|
+
}
|
|
28691
29456
|
}
|
|
28692
29457
|
}
|
|
28693
29458
|
/* eslint-disable-next-line */
|
|
@@ -28718,26 +29483,37 @@ class PivotButton {
|
|
|
28718
29483
|
updateFiltering(args) {
|
|
28719
29484
|
/* eslint-disable */
|
|
28720
29485
|
let pivotObj = this.parent.pivotGridModule ? this.parent.pivotGridModule : this.parent;
|
|
28721
|
-
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
28722
|
-
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
28723
|
-
}
|
|
28724
|
-
else {
|
|
28725
|
-
pivotObj.showWaitingPopup();
|
|
28726
|
-
}
|
|
28727
|
-
pivotObj.mouseEventArgs = args;
|
|
28728
|
-
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
28729
|
-
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
28730
29486
|
let fieldName = args.target.parentElement.id;
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
29487
|
+
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
29488
|
+
this.parent.actionObj.actionName = filterField;
|
|
29489
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29490
|
+
if (this.parent.actionBeginMethod()) {
|
|
29491
|
+
return;
|
|
29492
|
+
}
|
|
29493
|
+
try {
|
|
29494
|
+
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
29495
|
+
showSpinner(pivotObj.fieldListSpinnerElement);
|
|
29496
|
+
}
|
|
29497
|
+
else {
|
|
29498
|
+
pivotObj.showWaitingPopup();
|
|
29499
|
+
}
|
|
29500
|
+
pivotObj.mouseEventArgs = args;
|
|
29501
|
+
pivotObj.filterTargetID = this.parent.pivotCommon.moduleName !== 'pivotfieldlist' ?
|
|
29502
|
+
this.parent.element : document.getElementById(this.parent.pivotCommon.parentID + '_Wrapper');
|
|
29503
|
+
if (pivotObj.dataSourceSettings.mode === 'Server') {
|
|
29504
|
+
if (this.parent.engineModule.fieldList[fieldName].members && Object.keys(this.parent.engineModule.fieldList[fieldName].members).length > 0) {
|
|
29505
|
+
this.updateFilterEvents();
|
|
29506
|
+
}
|
|
29507
|
+
else {
|
|
29508
|
+
pivotObj.getEngine('fetchFieldMembers', null, null, null, null, null, fieldName);
|
|
29509
|
+
}
|
|
28734
29510
|
}
|
|
28735
29511
|
else {
|
|
28736
|
-
|
|
29512
|
+
this.updateFilterEvents();
|
|
28737
29513
|
}
|
|
28738
29514
|
}
|
|
28739
|
-
|
|
28740
|
-
this.
|
|
29515
|
+
catch (execption) {
|
|
29516
|
+
this.parent.actionFailureMethod(execption);
|
|
28741
29517
|
}
|
|
28742
29518
|
/* eslint-enable */
|
|
28743
29519
|
}
|
|
@@ -28750,11 +29526,6 @@ class PivotButton {
|
|
|
28750
29526
|
let target = pivotObj.mouseEventArgs.target;
|
|
28751
29527
|
this.fieldName = target.parentElement.id;
|
|
28752
29528
|
if (this.parent.pivotCommon.filterDialog.dialogPopUp) {
|
|
28753
|
-
this.dialogPopUp = this.parent.pivotCommon.filterDialog.dialogPopUp;
|
|
28754
|
-
this.parent.pivotCommon.filterDialog.dialogPopUp.close = this.removeFilterDialog.bind(this);
|
|
28755
|
-
// this.memberTreeView = this.parent.pivotCommon.filterDialog.memberTreeView;
|
|
28756
|
-
// this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
28757
|
-
// this.parent.pivotCommon.filterDialog.allMemberSelect.nodeChecked = this.nodeStateModified.bind(this);
|
|
28758
29529
|
this.bindDialogEvents();
|
|
28759
29530
|
}
|
|
28760
29531
|
if (pivotObj.getModuleName() === 'pivotfieldlist') {
|
|
@@ -28768,8 +29539,8 @@ class PivotButton {
|
|
|
28768
29539
|
if (this.parent.pivotCommon.filterDialog.allowExcelLikeFilter && this.parent.pivotCommon.filterDialog.tabObj) {
|
|
28769
29540
|
this.index = this.parent.pivotCommon.filterDialog.tabObj.selectedItem;
|
|
28770
29541
|
this.updateDialogButtonEvents();
|
|
28771
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
28772
|
-
this.dialogPopUp.dataBind();
|
|
29542
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
29543
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
28773
29544
|
this.parent.pivotCommon.filterDialog.tabObj.selected = this.tabSelect.bind(this);
|
|
28774
29545
|
}
|
|
28775
29546
|
else if (this.parent.dataSourceSettings.allowMemberFilter) {
|
|
@@ -28794,7 +29565,7 @@ class PivotButton {
|
|
|
28794
29565
|
click: (this.index === 0 ? this.updateFilterState.bind(this, this.fieldName) : this.updateCustomFilter.bind(this))
|
|
28795
29566
|
},
|
|
28796
29567
|
{
|
|
28797
|
-
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this),
|
|
29568
|
+
click: this.parent.pivotCommon.filterDialog.closeFilterDialog.bind(this.parent.pivotCommon.filterDialog),
|
|
28798
29569
|
buttonModel: { cssClass: CANCEL_BUTTON_CLASS, content: this.parent.localeObj.getConstant('cancel') }
|
|
28799
29570
|
}
|
|
28800
29571
|
];
|
|
@@ -28802,24 +29573,24 @@ class PivotButton {
|
|
|
28802
29573
|
tabSelect(e) {
|
|
28803
29574
|
this.index = e.selectedIndex;
|
|
28804
29575
|
this.updateDialogButtonEvents();
|
|
28805
|
-
removeClass([].slice.call(this.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
29576
|
+
removeClass([].slice.call(this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelectorAll('.e-selected-tab')), 'e-selected-tab');
|
|
28806
29577
|
if (e.selectedIndex > 0) {
|
|
28807
|
-
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');
|
|
29578
|
+
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');
|
|
28808
29579
|
}
|
|
28809
29580
|
if (e.selectedIndex === 0) {
|
|
28810
29581
|
this.parent.pivotCommon.filterDialog.updateCheckedState();
|
|
28811
29582
|
}
|
|
28812
29583
|
else {
|
|
28813
|
-
this.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
28814
|
-
this.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
29584
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons[0].buttonModel.disabled = false;
|
|
29585
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.' + OK_BUTTON_CLASS).removeAttribute('disabled');
|
|
28815
29586
|
}
|
|
28816
29587
|
}
|
|
28817
29588
|
updateDialogButtonEvents() {
|
|
28818
|
-
this.dialogPopUp.buttons = this.buttonModel();
|
|
28819
|
-
this.dialogPopUp.dataBind();
|
|
29589
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.buttons = this.buttonModel();
|
|
29590
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.dataBind();
|
|
28820
29591
|
}
|
|
28821
29592
|
updateCustomFilter(args) {
|
|
28822
|
-
let dialogElement = this.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
29593
|
+
let dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element.querySelector('.e-selected-tab');
|
|
28823
29594
|
let fieldName = dialogElement.getAttribute('data-fieldname');
|
|
28824
29595
|
let levelName = dialogElement.getAttribute('data-selectedField');
|
|
28825
29596
|
let filterType = dialogElement.getAttribute('data-type');
|
|
@@ -28889,38 +29660,18 @@ class PivotButton {
|
|
|
28889
29660
|
if (type !== 'Value') {
|
|
28890
29661
|
this.parent.lastFilterInfo = PivotUtil.getFilterItemByName(fieldName, this.parent.dataSourceSettings.filterSettings);
|
|
28891
29662
|
}
|
|
28892
|
-
this.dialogPopUp.close();
|
|
29663
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
28893
29664
|
if (!observedArgs.cancel) {
|
|
28894
29665
|
this.refreshPivotButtonState(fieldName, true);
|
|
28895
29666
|
this.updateDataSource(true);
|
|
28896
29667
|
}
|
|
28897
29668
|
});
|
|
28898
29669
|
}
|
|
28899
|
-
removeFilterDialog() {
|
|
28900
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
28901
|
-
this.dialogPopUp.destroy();
|
|
28902
|
-
setTimeout(this.setFocus.bind(this));
|
|
28903
|
-
}
|
|
28904
|
-
if (document.getElementById(this.parentElement.id + '_EditorTreeView')) {
|
|
28905
|
-
remove(document.getElementById(this.parentElement.id + '_EditorTreeView'));
|
|
28906
|
-
}
|
|
28907
|
-
}
|
|
28908
|
-
setFocus() {
|
|
28909
|
-
if (this.parentElement) {
|
|
28910
|
-
let pivotButtons = [].slice.call(this.parentElement.querySelectorAll('.e-pivot-button'));
|
|
28911
|
-
for (let item of pivotButtons) {
|
|
28912
|
-
if (item.getAttribute('data-uid') === this.fieldName) {
|
|
28913
|
-
item.focus();
|
|
28914
|
-
break;
|
|
28915
|
-
}
|
|
28916
|
-
}
|
|
28917
|
-
}
|
|
28918
|
-
}
|
|
28919
29670
|
ClearFilter(e) {
|
|
28920
|
-
let dialogElement = this.dialogPopUp.element;
|
|
29671
|
+
let dialogElement = this.parent.pivotCommon.filterDialog.dialogPopUp.element;
|
|
28921
29672
|
let fieldName = dialogElement.getAttribute('data-fieldname');
|
|
28922
29673
|
let tabElement = dialogElement.querySelector('.e-selected-tab');
|
|
28923
|
-
this.dialogPopUp.close();
|
|
29674
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
28924
29675
|
if (this.parent.dataType === 'olap' && tabElement) {
|
|
28925
29676
|
let levelName = tabElement.getAttribute('data-selectedField');
|
|
28926
29677
|
this.removeDataSourceSettings(fieldName, levelName);
|
|
@@ -28936,63 +29687,73 @@ class PivotButton {
|
|
|
28936
29687
|
let target = args.target;
|
|
28937
29688
|
let fieldName = target.parentElement.id;
|
|
28938
29689
|
let fieldInfo = PivotUtil.getFieldInfo(fieldName, this.parent);
|
|
29690
|
+
this.parent.actionObj.actionName = removeField;
|
|
29691
|
+
this.parent.actionObj.fieldInfo = fieldInfo;
|
|
29692
|
+
if (this.parent.actionBeginMethod()) {
|
|
29693
|
+
return;
|
|
29694
|
+
}
|
|
28939
29695
|
let removeFieldArgs = {
|
|
28940
29696
|
cancel: false, fieldName: fieldName,
|
|
28941
29697
|
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings),
|
|
28942
29698
|
fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis
|
|
28943
29699
|
};
|
|
28944
|
-
|
|
28945
|
-
|
|
28946
|
-
|
|
28947
|
-
|
|
28948
|
-
if (
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
this.parent.
|
|
29700
|
+
try {
|
|
29701
|
+
let control = this.parent.getModuleName() === 'pivotfieldlist' &&
|
|
29702
|
+
this.parent.isPopupView ? this.parent.pivotGridModule : this.parent;
|
|
29703
|
+
control.trigger(fieldRemove, removeFieldArgs, (observedArgs) => {
|
|
29704
|
+
if (!observedArgs.cancel) {
|
|
29705
|
+
if (target.parentElement.getAttribute('isvalue') === 'true') {
|
|
29706
|
+
this.parent.setProperties({ dataSourceSettings: { values: [] } }, true);
|
|
29707
|
+
if (this.parent.dataType === 'olap') {
|
|
29708
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
29709
|
+
}
|
|
28952
29710
|
}
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28956
|
-
|
|
28957
|
-
|
|
28958
|
-
|
|
28959
|
-
|
|
29711
|
+
else {
|
|
29712
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(fieldName);
|
|
29713
|
+
if (this.parent.dataType === 'pivot' && this.parent.showValuesButton && this.parent.dataSourceSettings.values.length > 1 &&
|
|
29714
|
+
fieldInfo.position < this.parent.dataSourceSettings.valueIndex && ((this.parent.dataSourceSettings.valueAxis === 'row' &&
|
|
29715
|
+
observedArgs.axis === 'rows') || (this.parent.dataSourceSettings.valueAxis === 'column' && observedArgs.axis === 'columns'))) {
|
|
29716
|
+
this.parent.setProperties({ dataSourceSettings: { valueIndex: this.parent.dataSourceSettings.valueIndex - 1 } }, true);
|
|
29717
|
+
}
|
|
29718
|
+
if (this.parent.dataType === 'olap' && this.parent.dataSourceSettings.values.length === 0) {
|
|
29719
|
+
this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]');
|
|
29720
|
+
}
|
|
28960
29721
|
}
|
|
28961
|
-
if (this.parent.
|
|
28962
|
-
this.parent.
|
|
29722
|
+
if (this.parent.getModuleName() === 'pivotfieldlist') {
|
|
29723
|
+
this.parent.axisFieldModule.render();
|
|
28963
29724
|
}
|
|
29725
|
+
this.updateDataSource();
|
|
28964
29726
|
}
|
|
28965
|
-
|
|
28966
|
-
|
|
28967
|
-
|
|
28968
|
-
|
|
28969
|
-
|
|
28970
|
-
});
|
|
29727
|
+
});
|
|
29728
|
+
}
|
|
29729
|
+
catch (execption) {
|
|
29730
|
+
this.parent.actionFailureMethod(execption);
|
|
29731
|
+
}
|
|
28971
29732
|
}
|
|
28972
29733
|
/** @hidden */
|
|
28973
29734
|
nodeStateModified(args) {
|
|
28974
29735
|
let target = closest(args.node, 'li');
|
|
28975
29736
|
let fieldName = target.getAttribute('data-fieldname');
|
|
28976
29737
|
if (target.getAttribute('data-memberId') === 'all') {
|
|
28977
|
-
this.memberTreeView.nodeChecked = null;
|
|
29738
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = null;
|
|
28978
29739
|
if (args.action === 'check') {
|
|
28979
|
-
this.memberTreeView.checkAll();
|
|
29740
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.checkAll();
|
|
28980
29741
|
}
|
|
28981
29742
|
else {
|
|
28982
|
-
this.memberTreeView.uncheckAll();
|
|
29743
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.uncheckAll();
|
|
28983
29744
|
}
|
|
28984
29745
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
28985
29746
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
28986
|
-
this.updateNodeStates(this.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
29747
|
+
this.updateNodeStates(this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes(), fieldName, args.action);
|
|
28987
29748
|
}
|
|
28988
29749
|
this.checkedStateAll(args.action);
|
|
28989
|
-
this.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
29750
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.nodeChecked = this.nodeStateModified.bind(this);
|
|
28990
29751
|
}
|
|
28991
29752
|
else {
|
|
28992
29753
|
if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
|
|
28993
29754
|
!this.parent.olapEngineModule.fieldList[fieldName].isHierarchy) {
|
|
28994
29755
|
// let st1: number = new Date().getTime();
|
|
28995
|
-
let checkedNodes = this.memberTreeView.getAllCheckedNodes();
|
|
29756
|
+
let checkedNodes = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
28996
29757
|
// let st2: number = (new Date().getTime() - st1) / 1000;
|
|
28997
29758
|
// console.log('getAllCheckedNodes:' + st2);
|
|
28998
29759
|
this.updateNodeStates(checkedNodes, fieldName, args.action);
|
|
@@ -29032,8 +29793,8 @@ class PivotButton {
|
|
|
29032
29793
|
}
|
|
29033
29794
|
if (currentMembers[member]) {
|
|
29034
29795
|
currentMembers[member].isSelected = false;
|
|
29035
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
29036
|
-
let element = this.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
29796
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]')) {
|
|
29797
|
+
let element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + member + '"]');
|
|
29037
29798
|
if (element && !element.querySelector('ul')) {
|
|
29038
29799
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, member, false);
|
|
29039
29800
|
}
|
|
@@ -29042,8 +29803,8 @@ class PivotButton {
|
|
|
29042
29803
|
}
|
|
29043
29804
|
for (let node of checkedNodes) {
|
|
29044
29805
|
if (currentMembers[node]) {
|
|
29045
|
-
if (this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
29046
|
-
let element = this.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
29806
|
+
if (this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]')) {
|
|
29807
|
+
let element = this.parent.pivotCommon.filterDialog.memberTreeView.element.querySelector('li[data-memberId="' + node + '"]');
|
|
29047
29808
|
if (element && !element.querySelector('ul')) {
|
|
29048
29809
|
currentMembers[node].isSelected = true;
|
|
29049
29810
|
this.parent.pivotCommon.eventBase.updateChildNodeStates(fieldList.filterMembers, fieldName, node, true);
|
|
@@ -29078,10 +29839,10 @@ class PivotButton {
|
|
|
29078
29839
|
!engineModule.fieldList[fieldName].isHierarchy) {
|
|
29079
29840
|
let cMembers = engineModule.fieldList[fieldName].members;
|
|
29080
29841
|
let sMembers = engineModule.fieldList[fieldName].currrentMembers;
|
|
29081
|
-
filterItem.items = this.memberTreeView.getAllCheckedNodes();
|
|
29842
|
+
filterItem.items = this.parent.pivotCommon.filterDialog.memberTreeView.getAllCheckedNodes();
|
|
29082
29843
|
filterItem.levelCount = engineModule.fieldList[fieldName].levelCount;
|
|
29083
29844
|
isNodeUnChecked = (filterItem.items.length ===
|
|
29084
|
-
this.memberTreeView.fields.dataSource.length ? false : true);
|
|
29845
|
+
this.parent.pivotCommon.filterDialog.memberTreeView.fields.dataSource.length ? false : true);
|
|
29085
29846
|
if (engineModule.fieldList[fieldName].searchMembers.length > 0 && !isNodeUnChecked) {
|
|
29086
29847
|
let cNodeLength = Object.keys(cMembers).length;
|
|
29087
29848
|
let sNodeLength = Object.keys(sMembers).length;
|
|
@@ -29142,13 +29903,18 @@ class PivotButton {
|
|
|
29142
29903
|
}
|
|
29143
29904
|
this.parent.dataSourceSettings.filterSettings.push(filterItem);
|
|
29144
29905
|
}
|
|
29145
|
-
this.dialogPopUp.close();
|
|
29906
|
+
this.parent.pivotCommon.filterDialog.dialogPopUp.close();
|
|
29146
29907
|
if (!observedArgs.cancel) {
|
|
29147
29908
|
this.refreshPivotButtonState(fieldName, isNodeUnChecked);
|
|
29148
29909
|
if (!isNodeUnChecked) {
|
|
29149
29910
|
this.removeDataSourceSettings(fieldName);
|
|
29911
|
+
filterItem = {};
|
|
29150
29912
|
}
|
|
29151
29913
|
this.parent.lastFilterInfo = filterItem;
|
|
29914
|
+
let actionInfo = {
|
|
29915
|
+
filterInfo: this.parent.lastFilterInfo
|
|
29916
|
+
};
|
|
29917
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
29152
29918
|
this.updateDataSource(true);
|
|
29153
29919
|
let thisObj = this;
|
|
29154
29920
|
//setTimeout(() => {
|
|
@@ -29302,14 +30068,6 @@ class PivotButton {
|
|
|
29302
30068
|
this.columnFieldDropDownList.destroy();
|
|
29303
30069
|
this.columnFieldDropDownList = null;
|
|
29304
30070
|
}
|
|
29305
|
-
if (this.memberTreeView && !this.memberTreeView.isDestroyed) {
|
|
29306
|
-
this.memberTreeView.destroy();
|
|
29307
|
-
this.memberTreeView = null;
|
|
29308
|
-
}
|
|
29309
|
-
if (this.dialogPopUp && !this.dialogPopUp.isDestroyed) {
|
|
29310
|
-
this.dialogPopUp.destroy();
|
|
29311
|
-
this.dialogPopUp = null;
|
|
29312
|
-
}
|
|
29313
30071
|
if (this.draggable && !this.draggable.isDestroyed) {
|
|
29314
30072
|
this.draggable.destroy();
|
|
29315
30073
|
this.draggable = null;
|
|
@@ -29449,6 +30207,8 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
29449
30207
|
this.enableValueSorting = false;
|
|
29450
30208
|
this.request = new XMLHttpRequest();
|
|
29451
30209
|
this.remoteData = [];
|
|
30210
|
+
/** @hidden */
|
|
30211
|
+
this.actionObj = {};
|
|
29452
30212
|
}
|
|
29453
30213
|
/**
|
|
29454
30214
|
* To provide the array of modules needed for control rendering
|
|
@@ -29679,7 +30439,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
29679
30439
|
enableValueSorting: enableValueSorting,
|
|
29680
30440
|
isDrillThrough: isDrillThrough,
|
|
29681
30441
|
localeObj: localeObj,
|
|
29682
|
-
clonedReport: this.clonedReport
|
|
30442
|
+
clonedReport: this.clonedReport,
|
|
30443
|
+
globalize: this.globalize,
|
|
30444
|
+
currenyCode: this.currencyCode
|
|
29683
30445
|
};
|
|
29684
30446
|
}
|
|
29685
30447
|
return customProperties;
|
|
@@ -30364,6 +31126,11 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30364
31126
|
pivot.pivotGridModule.fieldListSpinnerElement = pivot.fieldListSpinnerElement;
|
|
30365
31127
|
}
|
|
30366
31128
|
});
|
|
31129
|
+
let actionName = this.getActionCompleteName();
|
|
31130
|
+
this.actionObj.actionName = actionName;
|
|
31131
|
+
if (this.actionObj.actionName) {
|
|
31132
|
+
this.actionCompleteMethod();
|
|
31133
|
+
}
|
|
30367
31134
|
}
|
|
30368
31135
|
updateOlapDataSource(pivot, isSorted, isCalcChange, isOlapDataRefreshed) {
|
|
30369
31136
|
let customProperties = pivot.frameCustomProperties(pivot.olapEngineModule.fieldListData, pivot.olapEngineModule.fieldList);
|
|
@@ -30397,6 +31164,7 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30397
31164
|
update(control) {
|
|
30398
31165
|
if (control) {
|
|
30399
31166
|
this.clonedDataSet = control.clonedDataSet;
|
|
31167
|
+
this.clonedReport = control.clonedReport;
|
|
30400
31168
|
this.setProperties({ dataSourceSettings: control.dataSourceSettings, showValuesButton: control.showValuesButton }, true);
|
|
30401
31169
|
this.engineModule = control.engineModule;
|
|
30402
31170
|
this.olapEngineModule = control.olapEngineModule;
|
|
@@ -30431,6 +31199,7 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30431
31199
|
updateView(control) {
|
|
30432
31200
|
if (control) {
|
|
30433
31201
|
control.clonedDataSet = this.clonedDataSet;
|
|
31202
|
+
control.clonedReport = this.clonedReport;
|
|
30434
31203
|
control.setProperties({ dataSourceSettings: this.dataSourceSettings, showValuesButton: this.showValuesButton }, true);
|
|
30435
31204
|
control.engineModule = this.engineModule;
|
|
30436
31205
|
control.olapEngineModule = this.olapEngineModule;
|
|
@@ -30473,6 +31242,47 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30473
31242
|
}
|
|
30474
31243
|
});
|
|
30475
31244
|
}
|
|
31245
|
+
/** @hidden */
|
|
31246
|
+
actionBeginMethod() {
|
|
31247
|
+
let eventArgs = {
|
|
31248
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
31249
|
+
actionName: this.actionObj.actionName,
|
|
31250
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
31251
|
+
cancel: false
|
|
31252
|
+
};
|
|
31253
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31254
|
+
control.trigger(actionBegin, eventArgs);
|
|
31255
|
+
return eventArgs.cancel;
|
|
31256
|
+
}
|
|
31257
|
+
/** @hidden */
|
|
31258
|
+
actionCompleteMethod() {
|
|
31259
|
+
let eventArgs = {
|
|
31260
|
+
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.dataSourceSettings),
|
|
31261
|
+
actionName: this.actionObj.actionName,
|
|
31262
|
+
fieldInfo: this.actionObj.fieldInfo,
|
|
31263
|
+
actionInfo: this.actionObj.actionInfo
|
|
31264
|
+
};
|
|
31265
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31266
|
+
control.trigger(actionComplete, eventArgs);
|
|
31267
|
+
this.actionObj.actionName = '';
|
|
31268
|
+
this.actionObj.actionInfo = undefined;
|
|
31269
|
+
this.actionObj.fieldInfo = undefined;
|
|
31270
|
+
}
|
|
31271
|
+
/** @hidden */
|
|
31272
|
+
actionFailureMethod(error) {
|
|
31273
|
+
let eventArgs = {
|
|
31274
|
+
actionName: this.actionObj.actionName,
|
|
31275
|
+
errorInfo: error
|
|
31276
|
+
};
|
|
31277
|
+
let control = this.isPopupView ? this.pivotGridModule : this;
|
|
31278
|
+
control.trigger(actionFailure, eventArgs);
|
|
31279
|
+
}
|
|
31280
|
+
/** @hidden */
|
|
31281
|
+
getActionCompleteName() {
|
|
31282
|
+
let actionName = (this.actionObj.actionName == openCalculatedField) ? calculatedFieldApplied : (this.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : (this.actionObj.actionName == sortField) ? fieldSorted
|
|
31283
|
+
: (this.actionObj.actionName == filterField) ? fieldFiltered : (this.actionObj.actionName == removeField) ? fieldRemoved : (this.actionObj.actionName == aggregateField) ? fieldAggregated : this.actionObj.actionName == sortFieldTree ? fieldTreeSorted : this.actionObj.actionName;
|
|
31284
|
+
return actionName;
|
|
31285
|
+
}
|
|
30476
31286
|
/**
|
|
30477
31287
|
* Destroys the Field Table component.
|
|
30478
31288
|
* @function destroy
|
|
@@ -30547,6 +31357,9 @@ let PivotFieldList = class PivotFieldList extends Component {
|
|
|
30547
31357
|
if (this.clonedDataSet) {
|
|
30548
31358
|
this.clonedDataSet = null;
|
|
30549
31359
|
}
|
|
31360
|
+
if (this.clonedReport) {
|
|
31361
|
+
this.clonedReport = null;
|
|
31362
|
+
}
|
|
30550
31363
|
if (this.clonedFieldList) {
|
|
30551
31364
|
this.clonedFieldList = null;
|
|
30552
31365
|
}
|
|
@@ -30595,6 +31408,9 @@ __decorate$4([
|
|
|
30595
31408
|
__decorate$4([
|
|
30596
31409
|
Property(['Sum', 'Count', 'DistinctCount', 'Product', 'Min', 'Max', 'Avg', 'Median', 'Index', 'PopulationVar', 'SampleVar', 'PopulationStDev', 'SampleStDev', 'RunningTotals', 'PercentageOfGrandTotal', 'PercentageOfColumnTotal', 'PercentageOfRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentRowTotal', 'DifferenceFrom', 'PercentageOfDifferenceFrom', 'PercentageOfParentTotal'])
|
|
30597
31410
|
], PivotFieldList.prototype, "aggregateTypes", void 0);
|
|
31411
|
+
__decorate$4([
|
|
31412
|
+
Property('USD')
|
|
31413
|
+
], PivotFieldList.prototype, "currencyCode", void 0);
|
|
30598
31414
|
__decorate$4([
|
|
30599
31415
|
Event()
|
|
30600
31416
|
], PivotFieldList.prototype, "load", void 0);
|
|
@@ -30643,6 +31459,15 @@ __decorate$4([
|
|
|
30643
31459
|
__decorate$4([
|
|
30644
31460
|
Event()
|
|
30645
31461
|
], PivotFieldList.prototype, "beforeServiceInvoke", void 0);
|
|
31462
|
+
__decorate$4([
|
|
31463
|
+
Event()
|
|
31464
|
+
], PivotFieldList.prototype, "actionBegin", void 0);
|
|
31465
|
+
__decorate$4([
|
|
31466
|
+
Event()
|
|
31467
|
+
], PivotFieldList.prototype, "actionComplete", void 0);
|
|
31468
|
+
__decorate$4([
|
|
31469
|
+
Event()
|
|
31470
|
+
], PivotFieldList.prototype, "actionFailure", void 0);
|
|
30646
31471
|
PivotFieldList = __decorate$4([
|
|
30647
31472
|
NotifyPropertyChanges
|
|
30648
31473
|
], PivotFieldList);
|
|
@@ -30875,105 +31700,114 @@ class CalculatedField {
|
|
|
30875
31700
|
displayMenu(node, treeNode, target) {
|
|
30876
31701
|
let edit = target ? target.classList.contains(CALC_EDIT) : true;
|
|
30877
31702
|
let edited = target ? target.classList.contains(CALC_EDITED) : true;
|
|
30878
|
-
|
|
30879
|
-
node.querySelector('.e-list-icon.e-format')
|
|
30880
|
-
|
|
30881
|
-
|
|
30882
|
-
|
|
30883
|
-
|
|
30884
|
-
this.menuObj.
|
|
30885
|
-
|
|
30886
|
-
|
|
30887
|
-
|
|
30888
|
-
|
|
30889
|
-
|
|
30890
|
-
node.querySelector('.' + CALC_EDIT)
|
|
30891
|
-
|
|
30892
|
-
|
|
30893
|
-
|
|
30894
|
-
|
|
30895
|
-
|
|
30896
|
-
|
|
30897
|
-
|
|
30898
|
-
|
|
30899
|
-
|
|
30900
|
-
|
|
30901
|
-
|
|
30902
|
-
|
|
30903
|
-
|
|
30904
|
-
|
|
30905
|
-
|
|
30906
|
-
|
|
30907
|
-
|
|
30908
|
-
|
|
30909
|
-
|
|
30910
|
-
|
|
30911
|
-
|
|
30912
|
-
|
|
30913
|
-
|
|
30914
|
-
|
|
30915
|
-
|
|
30916
|
-
|
|
30917
|
-
|
|
31703
|
+
try {
|
|
31704
|
+
if (this.parent.dataType === 'pivot' && node.querySelector('.e-list-icon.e-format') &&
|
|
31705
|
+
node.querySelector('.e-list-icon.e-format').classList.contains(ICON) &&
|
|
31706
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDITED) &&
|
|
31707
|
+
!node.querySelector('.e-list-icon').classList.contains(GRID_REMOVE) &&
|
|
31708
|
+
!node.querySelector('.e-list-icon').classList.contains(CALC_EDIT) && node.tagName === 'LI') {
|
|
31709
|
+
if (this.menuObj && !this.menuObj.isDestroyed) {
|
|
31710
|
+
this.menuObj.destroy();
|
|
31711
|
+
}
|
|
31712
|
+
this.curMenu = node.querySelector('.' + LIST_TEXT_CLASS);
|
|
31713
|
+
this.openContextMenu(node);
|
|
31714
|
+
}
|
|
31715
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDIT) &&
|
|
31716
|
+
node.querySelector('.' + CALC_EDIT).classList.contains('e-list-icon') && edit ||
|
|
31717
|
+
(this.parent.dataType === 'olap' && node.getAttribute('data-type') === CALC && node.classList.contains('e-active') && ((target && !target.classList.contains(GRID_REMOVE)) || !target)))) {
|
|
31718
|
+
this.isEdit = true;
|
|
31719
|
+
let fieldName = node.getAttribute('data-field');
|
|
31720
|
+
let caption = node.getAttribute('data-caption');
|
|
31721
|
+
this.currentFieldName = fieldName;
|
|
31722
|
+
this.inputObj.value = caption;
|
|
31723
|
+
this.inputObj.dataBind();
|
|
31724
|
+
let formatString = node.getAttribute('data-formatString');
|
|
31725
|
+
let dialogElement = this.dialog.element;
|
|
31726
|
+
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
31727
|
+
if (this.parent.dataType === 'olap') {
|
|
31728
|
+
let memberType = node.getAttribute('data-membertype');
|
|
31729
|
+
let parentHierarchy = node.getAttribute('data-hierarchy');
|
|
31730
|
+
let expression = node.getAttribute('data-formula');
|
|
31731
|
+
let customString = node.getAttribute('data-customString');
|
|
31732
|
+
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
31733
|
+
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
31734
|
+
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
31735
|
+
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
31736
|
+
/* eslint-enable max-len */
|
|
31737
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('caption');
|
|
31738
|
+
select('#' + this.parentID + 'droppable', document).value = expression;
|
|
31739
|
+
memberTypeDrop.readonly = true;
|
|
31740
|
+
memberTypeDrop.value = memberType;
|
|
31741
|
+
memberTypeDrop.dataBind();
|
|
31742
|
+
if (memberType === 'Dimension') {
|
|
31743
|
+
hierarchyDrop.value = parentHierarchy;
|
|
31744
|
+
}
|
|
31745
|
+
if (formatString !== '') {
|
|
31746
|
+
formatDrop.value = formatString;
|
|
31747
|
+
formatDrop.dataBind();
|
|
31748
|
+
}
|
|
31749
|
+
customFormat.value = customString;
|
|
31750
|
+
}
|
|
31751
|
+
else {
|
|
31752
|
+
customFormat.value = formatString;
|
|
31753
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
31754
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
31755
|
+
addClass([node.querySelector('.e-list-icon')], CALC_EDITED);
|
|
31756
|
+
removeClass([node.querySelector('.e-list-icon')], CALC_EDIT);
|
|
31757
|
+
node.querySelector('.' + CALC_EDITED).setAttribute('title', this.parent.localeObj.getConstant('clearCalculatedField'));
|
|
31758
|
+
select('#' + this.parentID + 'droppable', document).value = node.getAttribute('data-uid');
|
|
30918
31759
|
}
|
|
30919
|
-
|
|
30920
|
-
|
|
31760
|
+
customFormat.dataBind();
|
|
31761
|
+
}
|
|
31762
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + CALC_EDITED) &&
|
|
31763
|
+
node.querySelector('.' + CALC_EDITED).classList.contains('e-list-icon') && edited ||
|
|
31764
|
+
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
31765
|
+
this.isEdit = false;
|
|
31766
|
+
this.inputObj.value = '';
|
|
31767
|
+
this.inputObj.dataBind();
|
|
31768
|
+
let dialogElement = this.dialog.element;
|
|
31769
|
+
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
31770
|
+
customFormat.value = '';
|
|
31771
|
+
customFormat.dataBind();
|
|
31772
|
+
if (this.parent.dataType === 'olap') {
|
|
31773
|
+
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
31774
|
+
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
31775
|
+
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
31776
|
+
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
31777
|
+
/* eslint-enable max-len */
|
|
31778
|
+
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
31779
|
+
hierarchyDrop.index = 0;
|
|
31780
|
+
hierarchyDrop.dataBind();
|
|
31781
|
+
formatDrop.index = 0;
|
|
30921
31782
|
formatDrop.dataBind();
|
|
31783
|
+
memberTypeDrop.index = 0;
|
|
31784
|
+
memberTypeDrop.readonly = false;
|
|
31785
|
+
memberTypeDrop.dataBind();
|
|
31786
|
+
}
|
|
31787
|
+
else {
|
|
31788
|
+
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
31789
|
+
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
31790
|
+
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
30922
31791
|
}
|
|
30923
|
-
|
|
31792
|
+
select('#' + this.parentID + 'droppable', document).value = '';
|
|
30924
31793
|
}
|
|
30925
|
-
else
|
|
30926
|
-
|
|
30927
|
-
|
|
30928
|
-
|
|
30929
|
-
|
|
30930
|
-
|
|
30931
|
-
|
|
30932
|
-
|
|
31794
|
+
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
31795
|
+
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
31796
|
+
this.parent.actionObj.actionName = removeField;
|
|
31797
|
+
if (this.parent.actionBeginMethod()) {
|
|
31798
|
+
return;
|
|
31799
|
+
}
|
|
31800
|
+
let dropField = select('#' + this.parentID + 'droppable', document);
|
|
31801
|
+
let field = {
|
|
31802
|
+
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
31803
|
+
caption: this.inputObj.value,
|
|
31804
|
+
formula: dropField.value
|
|
31805
|
+
};
|
|
31806
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
30933
31807
|
}
|
|
30934
|
-
customFormat.dataBind();
|
|
30935
31808
|
}
|
|
30936
|
-
|
|
30937
|
-
|
|
30938
|
-
(this.parent.dataType === 'olap' && !node.classList.contains('e-active')))) {
|
|
30939
|
-
this.isEdit = false;
|
|
30940
|
-
this.inputObj.value = '';
|
|
30941
|
-
this.inputObj.dataBind();
|
|
30942
|
-
let dialogElement = this.dialog.element;
|
|
30943
|
-
let customFormat = getInstance(select('#' + this.parentID + 'Custom_Format_Element', dialogElement), MaskedTextBox);
|
|
30944
|
-
customFormat.value = '';
|
|
30945
|
-
customFormat.dataBind();
|
|
30946
|
-
if (this.parent.dataType === 'olap') {
|
|
30947
|
-
let hierarchyDrop = getInstance(select('#' + this.parentID + 'Hierarchy_List_Div', dialogElement), DropDownList);
|
|
30948
|
-
let formatDrop = getInstance(select('#' + this.parentID + 'Format_Div', dialogElement), DropDownList);
|
|
30949
|
-
let memberTypeDrop = getInstance(select('#' + this.parentID + 'Member_Type_Div', dialogElement), DropDownList);
|
|
30950
|
-
let fieldTitle = select('#' + this.parentID + '_' + 'FieldNameTitle', dialogElement);
|
|
30951
|
-
/* eslint-enable max-len */
|
|
30952
|
-
fieldTitle.innerHTML = this.parent.localeObj.getConstant('fieldTitle');
|
|
30953
|
-
hierarchyDrop.index = 0;
|
|
30954
|
-
hierarchyDrop.dataBind();
|
|
30955
|
-
formatDrop.index = 0;
|
|
30956
|
-
formatDrop.dataBind();
|
|
30957
|
-
memberTypeDrop.index = 0;
|
|
30958
|
-
memberTypeDrop.readonly = false;
|
|
30959
|
-
memberTypeDrop.dataBind();
|
|
30960
|
-
}
|
|
30961
|
-
else {
|
|
30962
|
-
addClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDIT);
|
|
30963
|
-
removeClass(this.treeObj.element.querySelectorAll('.' + CALC_EDITED), CALC_EDITED);
|
|
30964
|
-
node.querySelector('.' + CALC_EDIT).setAttribute('title', this.parent.localeObj.getConstant('edit'));
|
|
30965
|
-
}
|
|
30966
|
-
select('#' + this.parentID + 'droppable', document).value = '';
|
|
30967
|
-
}
|
|
30968
|
-
else if (node.tagName === 'LI' && (node.querySelector('.' + GRID_REMOVE) &&
|
|
30969
|
-
node.querySelector('.' + GRID_REMOVE).classList.contains('e-list-icon')) && !edit && !edited) {
|
|
30970
|
-
let dropField = select('#' + this.parentID + 'droppable', document);
|
|
30971
|
-
let field = {
|
|
30972
|
-
name: this.isEdit ? this.currentFieldName : this.inputObj.value,
|
|
30973
|
-
caption: this.inputObj.value,
|
|
30974
|
-
formula: dropField.value
|
|
30975
|
-
};
|
|
30976
|
-
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeCalculatedField'), field, true, treeNode);
|
|
31809
|
+
catch (execption) {
|
|
31810
|
+
this.parent.actionFailureMethod(execption);
|
|
30977
31811
|
}
|
|
30978
31812
|
}
|
|
30979
31813
|
removeCalcField(node) {
|
|
@@ -31382,6 +32216,12 @@ class CalculatedField {
|
|
|
31382
32216
|
this.parent.isRequiredUpdate = false;
|
|
31383
32217
|
}
|
|
31384
32218
|
try {
|
|
32219
|
+
let actionInfo = {
|
|
32220
|
+
calculatedFieldInfo: this.parent.lastCalcFieldInfo
|
|
32221
|
+
};
|
|
32222
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
32223
|
+
let actionName = (this.parent.actionObj.actionName == editCalculatedField) ? calculatedFieldEdited : calculatedFieldApplied;
|
|
32224
|
+
this.parent.actionObj.actionName = actionName;
|
|
31385
32225
|
this.parent.updateDataSource(false);
|
|
31386
32226
|
let pivot = (this.parent.getModuleName() === 'pivotfieldlist' && this.parent.pivotGridModule) ?
|
|
31387
32227
|
this.parent.pivotGridModule : this.parent;
|
|
@@ -32823,7 +33663,7 @@ class FieldList {
|
|
|
32823
33663
|
update() {
|
|
32824
33664
|
let currentWidth;
|
|
32825
33665
|
if (this.parent.currentView !== 'Table') {
|
|
32826
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
33666
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
32827
33667
|
}
|
|
32828
33668
|
else {
|
|
32829
33669
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
@@ -33292,7 +34132,7 @@ class GroupingBar {
|
|
|
33292
34132
|
currentWidth = this.parent.grid ? this.parent.grid.element.offsetWidth : currentWidth;
|
|
33293
34133
|
}
|
|
33294
34134
|
else {
|
|
33295
|
-
currentWidth = this.parent.chart ? this.parent.
|
|
34135
|
+
currentWidth = this.parent.chart ? this.parent.pivotChartModule.getCalulatedWidth() : currentWidth;
|
|
33296
34136
|
}
|
|
33297
34137
|
if (currentWidth) {
|
|
33298
34138
|
let actWidth = currentWidth < 400 ? 400 : currentWidth;
|
|
@@ -33562,15 +34402,17 @@ class ConditionalFormatting {
|
|
|
33562
34402
|
},
|
|
33563
34403
|
{
|
|
33564
34404
|
click: this.applyButtonClick.bind(this),
|
|
34405
|
+
isFlat: true,
|
|
33565
34406
|
buttonModel: {
|
|
33566
|
-
|
|
34407
|
+
isPrimary: true, cssClass: FORMAT_APPLY_BUTTON,
|
|
33567
34408
|
content: this.parent.localeObj.getConstant('apply')
|
|
33568
34409
|
}
|
|
33569
34410
|
},
|
|
33570
34411
|
{
|
|
33571
34412
|
click: this.cancelButtonClick.bind(this),
|
|
34413
|
+
isFlat: true,
|
|
33572
34414
|
buttonModel: {
|
|
33573
|
-
cssClass:
|
|
34415
|
+
cssClass: FORMAT_CANCEL_BUTTON,
|
|
33574
34416
|
content: this.parent.localeObj.getConstant('cancel')
|
|
33575
34417
|
}
|
|
33576
34418
|
}
|
|
@@ -33623,6 +34465,10 @@ class ConditionalFormatting {
|
|
|
33623
34465
|
applyButtonClick() {
|
|
33624
34466
|
if (this.refreshConditionValues()) {
|
|
33625
34467
|
this.parent.setProperties({ dataSourceSettings: { conditionalFormatSettings: this.newFormat } }, true);
|
|
34468
|
+
let actionInfo = {
|
|
34469
|
+
conditionalFormattingInfo: this.parent.dataSourceSettings.conditionalFormatSettings
|
|
34470
|
+
};
|
|
34471
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
33626
34472
|
this.parent.renderPivotGrid();
|
|
33627
34473
|
this.dialog.close();
|
|
33628
34474
|
}
|
|
@@ -34319,12 +35165,22 @@ class Toolbar$2 {
|
|
|
34319
35165
|
}
|
|
34320
35166
|
/* eslint-enable */
|
|
34321
35167
|
reportChange(args) {
|
|
34322
|
-
this.
|
|
34323
|
-
if (this.parent.
|
|
34324
|
-
|
|
35168
|
+
this.parent.actionObj.actionName = reportChange;
|
|
35169
|
+
if (this.parent.actionBeginMethod()) {
|
|
35170
|
+
args.cancel = true;
|
|
35171
|
+
return;
|
|
34325
35172
|
}
|
|
34326
|
-
|
|
34327
|
-
this.
|
|
35173
|
+
try {
|
|
35174
|
+
this.dropArgs = args;
|
|
35175
|
+
if (this.parent.isModified && this.currentReport !== '') {
|
|
35176
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
35177
|
+
}
|
|
35178
|
+
else {
|
|
35179
|
+
this.reportLoad(args);
|
|
35180
|
+
}
|
|
35181
|
+
}
|
|
35182
|
+
catch (execption) {
|
|
35183
|
+
this.parent.actionFailureMethod(execption);
|
|
34328
35184
|
}
|
|
34329
35185
|
}
|
|
34330
35186
|
reportLoad(args) {
|
|
@@ -34332,6 +35188,10 @@ class Toolbar$2 {
|
|
|
34332
35188
|
let loadArgs = {
|
|
34333
35189
|
reportName: args.itemData.value
|
|
34334
35190
|
};
|
|
35191
|
+
let actionInfo = {
|
|
35192
|
+
reportName: args.itemData.value
|
|
35193
|
+
};
|
|
35194
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34335
35195
|
this.parent.trigger(loadReport, loadArgs, (observedArgs) => {
|
|
34336
35196
|
this.currentReport = observedArgs.reportName;
|
|
34337
35197
|
this.parent.isModified = false;
|
|
@@ -34344,7 +35204,15 @@ class Toolbar$2 {
|
|
|
34344
35204
|
report: this.parent.getPersistData(),
|
|
34345
35205
|
reportName: this.currentReport
|
|
34346
35206
|
};
|
|
35207
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
35208
|
+
let actionInfo = {
|
|
35209
|
+
reportName: this.currentReport
|
|
35210
|
+
};
|
|
35211
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34347
35212
|
this.parent.trigger(saveReport, saveArgs);
|
|
35213
|
+
if (this.parent.actionObj.actionName) {
|
|
35214
|
+
this.parent.actionCompleteMethod();
|
|
35215
|
+
}
|
|
34348
35216
|
this.parent.isModified = false;
|
|
34349
35217
|
}
|
|
34350
35218
|
else if (this.currentReport === '' && (args.item.id === (this.parent.element.id + 'save') || args.item.id === (this.parent.element.id + 'saveas'))) {
|
|
@@ -34408,54 +35276,67 @@ class Toolbar$2 {
|
|
|
34408
35276
|
}
|
|
34409
35277
|
}
|
|
34410
35278
|
actionClick(args) {
|
|
34411
|
-
|
|
34412
|
-
|
|
34413
|
-
|
|
34414
|
-
|
|
34415
|
-
|
|
34416
|
-
|
|
34417
|
-
|
|
34418
|
-
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
|
|
34423
|
-
|
|
34424
|
-
|
|
34425
|
-
|
|
34426
|
-
|
|
34427
|
-
|
|
34428
|
-
|
|
34429
|
-
|
|
34430
|
-
|
|
34431
|
-
|
|
34432
|
-
|
|
34433
|
-
|
|
34434
|
-
|
|
34435
|
-
this.
|
|
34436
|
-
|
|
34437
|
-
|
|
34438
|
-
|
|
34439
|
-
|
|
34440
|
-
|
|
34441
|
-
|
|
34442
|
-
|
|
34443
|
-
|
|
34444
|
-
|
|
34445
|
-
|
|
34446
|
-
|
|
34447
|
-
|
|
34448
|
-
this.
|
|
34449
|
-
|
|
34450
|
-
|
|
34451
|
-
|
|
34452
|
-
|
|
34453
|
-
|
|
34454
|
-
|
|
34455
|
-
|
|
34456
|
-
this.parent.
|
|
34457
|
-
|
|
34458
|
-
|
|
35279
|
+
let actionName = (args.item.id == "PivotViewnew") ? addNewReport : (args.item.id == "PivotViewsave") ? saveCurrentReport : (args.item.id == "PivotViewsaveas") ? saveAsCurrentReport
|
|
35280
|
+
: (args.item.id == "PivotViewrename") ? renameCurrentReport : (args.item.id == "PivotViewremove") ? removeCurrentReport : (args.item.id == "PivotViewload") ? loadReports
|
|
35281
|
+
: (args.item.id == "PivotViewformatting") ? openConditionalFormatting : (args.item.id == "PivotViewnumberFormatting") ? openNumberFormatting
|
|
35282
|
+
: (args.item.id == "PivotViewmdxQuery") ? MdxQuery : (args.item.id == "PivotViewfieldlist") ? showFieldList : '';
|
|
35283
|
+
this.parent.actionObj.actionName = actionName;
|
|
35284
|
+
if (this.parent.actionBeginMethod()) {
|
|
35285
|
+
return;
|
|
35286
|
+
}
|
|
35287
|
+
try {
|
|
35288
|
+
switch (args.item.id) {
|
|
35289
|
+
case (this.parent.element.id + 'save'):
|
|
35290
|
+
case (this.parent.element.id + 'saveas'):
|
|
35291
|
+
this.saveReport(args);
|
|
35292
|
+
break;
|
|
35293
|
+
case (this.parent.element.id + 'remove'):
|
|
35294
|
+
this.action = 'Remove';
|
|
35295
|
+
if (this.currentReport && this.currentReport !== '') {
|
|
35296
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('removeConfirm'));
|
|
35297
|
+
}
|
|
35298
|
+
else {
|
|
35299
|
+
this.parent.pivotCommon.errorDialog.createErrorDialog(this.parent.localeObj.getConstant('error'), this.parent.localeObj.getConstant('emptyReport'));
|
|
35300
|
+
}
|
|
35301
|
+
return;
|
|
35302
|
+
case (this.parent.element.id + 'rename'):
|
|
35303
|
+
this.renameReport(args);
|
|
35304
|
+
break;
|
|
35305
|
+
case (this.parent.element.id + 'new'):
|
|
35306
|
+
this.action = 'New';
|
|
35307
|
+
this.newArgs = args;
|
|
35308
|
+
if (this.parent.isModified && this.currentReport && this.currentReport !== '') {
|
|
35309
|
+
this.createConfirmDialog(this.parent.localeObj.getConstant('alert'), this.parent.localeObj.getConstant('newReportConfirm'));
|
|
35310
|
+
}
|
|
35311
|
+
else {
|
|
35312
|
+
this.createNewReport(args);
|
|
35313
|
+
}
|
|
35314
|
+
break;
|
|
35315
|
+
case (this.parent.element.id + 'load'):
|
|
35316
|
+
this.action = 'Load';
|
|
35317
|
+
break;
|
|
35318
|
+
case (this.parent.element.id + 'fieldlist'):
|
|
35319
|
+
if (this.parent.pivotFieldListModule && this.parent.pivotFieldListModule.dialogRenderer) {
|
|
35320
|
+
this.parent.pivotFieldListModule.dialogRenderer.fieldListDialog.show();
|
|
35321
|
+
}
|
|
35322
|
+
break;
|
|
35323
|
+
case (this.parent.element.id + 'formatting'):
|
|
35324
|
+
if (this.parent.conditionalFormattingModule) {
|
|
35325
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35326
|
+
}
|
|
35327
|
+
break;
|
|
35328
|
+
case (this.parent.element.id + 'mdxQuery'):
|
|
35329
|
+
this.mdxQueryDialog(args);
|
|
35330
|
+
break;
|
|
35331
|
+
case (this.parent.element.id + 'numberFormatting'):
|
|
35332
|
+
if (this.parent.numberFormattingModule) {
|
|
35333
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35334
|
+
}
|
|
35335
|
+
break;
|
|
35336
|
+
}
|
|
35337
|
+
}
|
|
35338
|
+
catch (execption) {
|
|
35339
|
+
this.parent.actionFailureMethod(execption);
|
|
34459
35340
|
}
|
|
34460
35341
|
}
|
|
34461
35342
|
renderDialog() {
|
|
@@ -34578,6 +35459,10 @@ class Toolbar$2 {
|
|
|
34578
35459
|
report: _this.parent.getPersistData(),
|
|
34579
35460
|
reportName: reportInput.value
|
|
34580
35461
|
};
|
|
35462
|
+
let actionInfo = {
|
|
35463
|
+
reportName: reportInput.value
|
|
35464
|
+
};
|
|
35465
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34581
35466
|
_this.parent.trigger(saveReport, saveArgs);
|
|
34582
35467
|
_this.parent.isModified = false;
|
|
34583
35468
|
_this.updateReportList();
|
|
@@ -34610,6 +35495,10 @@ class Toolbar$2 {
|
|
|
34610
35495
|
report: _this.parent.getPersistData(),
|
|
34611
35496
|
reportName: reportInput.value
|
|
34612
35497
|
};
|
|
35498
|
+
let actionInfo = {
|
|
35499
|
+
reportName: reportInput.value
|
|
35500
|
+
};
|
|
35501
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34613
35502
|
_this.parent.trigger(saveReport, saveArgs);
|
|
34614
35503
|
_this.parent.isModified = false;
|
|
34615
35504
|
_this.updateReportList();
|
|
@@ -34644,12 +35533,20 @@ class Toolbar$2 {
|
|
|
34644
35533
|
reportName: _this.currentReport,
|
|
34645
35534
|
rename: reportInput.value
|
|
34646
35535
|
};
|
|
35536
|
+
let actionInfo = {
|
|
35537
|
+
reportName: { oldName: _this.currentReport, newName: reportInput.value }
|
|
35538
|
+
};
|
|
35539
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34647
35540
|
_this.parent.trigger(renameReport, renameArgs);
|
|
34648
35541
|
_this.currentReport = reportInput.value;
|
|
34649
35542
|
_this.updateReportList();
|
|
34650
35543
|
_this.dialog.hide();
|
|
34651
35544
|
});
|
|
34652
35545
|
}
|
|
35546
|
+
this.parent.actionObj.actionName = this.parent.getActionCompleteName();
|
|
35547
|
+
if (this.parent.actionObj.actionName) {
|
|
35548
|
+
this.parent.actionCompleteMethod();
|
|
35549
|
+
}
|
|
34653
35550
|
}
|
|
34654
35551
|
createNewReport(args) {
|
|
34655
35552
|
this.dialogShow(args);
|
|
@@ -34707,6 +35604,10 @@ class Toolbar$2 {
|
|
|
34707
35604
|
let removeArgs = {
|
|
34708
35605
|
reportName: this.currentReport
|
|
34709
35606
|
};
|
|
35607
|
+
let actionInfo = {
|
|
35608
|
+
reportName: this.currentReport
|
|
35609
|
+
};
|
|
35610
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
34710
35611
|
this.parent.trigger(removeReport, removeArgs);
|
|
34711
35612
|
let reports = this.fetchReports();
|
|
34712
35613
|
if (reports.reportName && reports.reportName.length > 0) {
|
|
@@ -34725,6 +35626,10 @@ class Toolbar$2 {
|
|
|
34725
35626
|
this.action = '';
|
|
34726
35627
|
}
|
|
34727
35628
|
this.updateReportList();
|
|
35629
|
+
this.parent.actionObj.actionName = reportRemoved;
|
|
35630
|
+
if (this.parent.actionObj.actionName) {
|
|
35631
|
+
this.parent.actionCompleteMethod();
|
|
35632
|
+
}
|
|
34728
35633
|
}
|
|
34729
35634
|
else if (this.action === 'New' || (this.action !== 'Save' && this.action !== 'Rename' && this.action !== 'New')) {
|
|
34730
35635
|
if (this.currentReport && this.currentReport !== '' && this.parent.isModified) {
|
|
@@ -34732,12 +35637,22 @@ class Toolbar$2 {
|
|
|
34732
35637
|
report: this.parent.getPersistData(),
|
|
34733
35638
|
reportName: this.currentReport
|
|
34734
35639
|
};
|
|
35640
|
+
let actionInfo = {
|
|
35641
|
+
reportName: this.currentReport
|
|
35642
|
+
};
|
|
35643
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35644
|
+
this.parent.actionObj.actionName = reportSaved;
|
|
35645
|
+
if (this.parent.actionObj.actionName) {
|
|
35646
|
+
this.parent.actionCompleteMethod();
|
|
35647
|
+
}
|
|
34735
35648
|
this.parent.trigger(saveReport, saveArgs);
|
|
34736
35649
|
this.parent.isModified = false;
|
|
34737
35650
|
if (this.action === 'New') {
|
|
35651
|
+
this.parent.actionObj.actionName = addNewReport;
|
|
34738
35652
|
this.createNewReport(this.newArgs);
|
|
34739
35653
|
}
|
|
34740
35654
|
else {
|
|
35655
|
+
this.parent.actionObj.actionName = reportChange;
|
|
34741
35656
|
this.reportLoad(this.dropArgs);
|
|
34742
35657
|
}
|
|
34743
35658
|
}
|
|
@@ -34842,6 +35757,7 @@ class Toolbar$2 {
|
|
|
34842
35757
|
this.chartMenu = new Menu({
|
|
34843
35758
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34844
35759
|
locale: this.parent.locale,
|
|
35760
|
+
cssClass: TOOLBAR_MENU,
|
|
34845
35761
|
select: this.menuItemClick.bind(this),
|
|
34846
35762
|
beforeOpen: this.whitespaceRemove.bind(this),
|
|
34847
35763
|
onClose: (args) => {
|
|
@@ -34897,6 +35813,7 @@ class Toolbar$2 {
|
|
|
34897
35813
|
this.exportMenu = new Menu({
|
|
34898
35814
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34899
35815
|
locale: this.parent.locale,
|
|
35816
|
+
cssClass: TOOLBAR_MENU,
|
|
34900
35817
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateExportMenu.bind(this),
|
|
34901
35818
|
onClose: (args) => {
|
|
34902
35819
|
this.focusToolBar();
|
|
@@ -34934,6 +35851,7 @@ class Toolbar$2 {
|
|
|
34934
35851
|
this.subTotalMenu = new Menu({
|
|
34935
35852
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34936
35853
|
locale: this.parent.locale,
|
|
35854
|
+
cssClass: TOOLBAR_MENU,
|
|
34937
35855
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateSubtotalSelection.bind(this),
|
|
34938
35856
|
onClose: (args) => {
|
|
34939
35857
|
this.focusToolBar();
|
|
@@ -34971,6 +35889,7 @@ class Toolbar$2 {
|
|
|
34971
35889
|
this.grandTotalMenu = new Menu({
|
|
34972
35890
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
34973
35891
|
locale: this.parent.locale,
|
|
35892
|
+
cssClass: TOOLBAR_MENU,
|
|
34974
35893
|
select: this.menuItemClick.bind(this), beforeOpen: this.updateGrandtotalSelection.bind(this),
|
|
34975
35894
|
onClose: (args) => {
|
|
34976
35895
|
this.focusToolBar();
|
|
@@ -34998,6 +35917,7 @@ class Toolbar$2 {
|
|
|
34998
35917
|
this.formattingMenu = new Menu({
|
|
34999
35918
|
items: menu, enableRtl: this.parent.enableRtl,
|
|
35000
35919
|
locale: this.parent.locale,
|
|
35920
|
+
cssClass: TOOLBAR_MENU,
|
|
35001
35921
|
select: this.menuItemClick.bind(this)
|
|
35002
35922
|
});
|
|
35003
35923
|
this.formattingMenu.isStringTemplate = true;
|
|
@@ -35195,181 +36115,202 @@ class Toolbar$2 {
|
|
|
35195
36115
|
menuItemClick(args) {
|
|
35196
36116
|
let exportArgs = {};
|
|
35197
36117
|
let type;
|
|
36118
|
+
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
|
|
36119
|
+
: (args.item.id == "PivotView_Area") ? chartView : (args.item.id == "PivotView_Scatter") ? chartView : (args.item.id == "PivotView_Polar") ? chartView : (args.item.id == "PivotView_ChartMoreOption") ? chartView
|
|
36120
|
+
: (args.item.id == "PivotView_multipleAxes") ? multipleAxis : (args.item.id == "PivotView_showLegend") ? showLegend : (args.item.id == "PivotViewpdf") ? pdfExport : (args.item.id == "PivotViewpng") ? pngExport
|
|
36121
|
+
: (args.item.id == "PivotViewexcel") ? excelExport : (args.item.id == "PivotViewcsv") ? csvExport : (args.item.id == "PivotViewjpeg") ? jpegExport : (args.item.id == "PivotViewsvg") ? svgExport
|
|
36122
|
+
: (args.item.id == "PivotViewnotsubtotal") ? hideSubTotals : (args.item.id == "PivotViewsubtotalrow") ? subTotalsRow : (args.item.id == "PivotViewsubtotalcolumn") ? subTotalsColumn
|
|
36123
|
+
: (args.item.id == "PivotViewsubtotal") ? showSubTotals : (args.item.id == "PivotViewnotgrandtotal") ? hideGrandTotals : (args.item.id == "PivotViewgrandtotalrow") ? grandTotalsRow
|
|
36124
|
+
: (args.item.id == "PivotViewgrandtotalcolumn") ? grandTotalsColumn : (args.item.id == "PivotViewgrandtotal") ? showGrandTotals
|
|
36125
|
+
: (args.item.id == "PivotViewnumberFormattingMenu") ? numberFormattingMenu : (args.item.id == "PivotViewconditionalFormattingMenu") ? conditionalFormattingMenu : '';
|
|
36126
|
+
this.parent.actionObj.actionName = actionName;
|
|
36127
|
+
if (this.parent.actionBeginMethod()) {
|
|
36128
|
+
return;
|
|
36129
|
+
}
|
|
35198
36130
|
if (this.getAllChartItems().indexOf(args.item.id.split(this.parent.element.id + '_')[1]) > -1 ||
|
|
35199
36131
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'ChartMoreOption') ||
|
|
35200
36132
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'multipleAxes') ||
|
|
35201
36133
|
(args.item.id.split(this.parent.element.id + '_')[1] === 'showLegend')) {
|
|
35202
36134
|
type = args.item.id.split(this.parent.element.id + '_')[1];
|
|
35203
36135
|
}
|
|
35204
|
-
|
|
35205
|
-
|
|
35206
|
-
|
|
35207
|
-
this.parent.grid.
|
|
35208
|
-
|
|
35209
|
-
|
|
35210
|
-
this.parent.
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
|
|
35214
|
-
|
|
35215
|
-
this.parent.
|
|
35216
|
-
|
|
36136
|
+
try {
|
|
36137
|
+
switch (args.item.id) {
|
|
36138
|
+
case (this.parent.element.id + 'grid'):
|
|
36139
|
+
if (this.parent.grid && this.parent.chart) {
|
|
36140
|
+
this.parent.grid.element.style.display = '';
|
|
36141
|
+
this.parent.chart.element.style.display = 'none';
|
|
36142
|
+
if (this.parent.chartSettings.enableMultipleAxis && this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36143
|
+
this.parent.element.querySelector('.e-pivotchart').style.display = 'none';
|
|
36144
|
+
}
|
|
36145
|
+
this.parent.currentView = 'Table';
|
|
36146
|
+
this.parent.setProperties({ displayOption: { primary: 'Table' } }, true);
|
|
36147
|
+
if (this.parent.showGroupingBar && this.parent.groupingBarModule) {
|
|
36148
|
+
this.parent.element.querySelector('.e-pivot-grouping-bar').style.display = '';
|
|
36149
|
+
this.parent.element.querySelector('.e-chart-grouping-bar').style.display = 'none';
|
|
36150
|
+
}
|
|
36151
|
+
let actionInfo = {
|
|
36152
|
+
toolbarInfo: { displayOption: this.parent.displayOption, gridSettings: this.parent.gridSettings }
|
|
36153
|
+
};
|
|
36154
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
36155
|
+
this.parent.layoutRefresh();
|
|
35217
36156
|
}
|
|
35218
|
-
|
|
35219
|
-
|
|
35220
|
-
|
|
35221
|
-
|
|
35222
|
-
|
|
36157
|
+
break;
|
|
36158
|
+
case (this.parent.element.id + 'pdf'):
|
|
36159
|
+
if (this.parent.currentView === 'Table') {
|
|
36160
|
+
exportArgs = {
|
|
36161
|
+
pdfExportProperties: { fileName: 'Export.pdf' },
|
|
36162
|
+
pdfDoc: undefined,
|
|
36163
|
+
isBlob: false,
|
|
36164
|
+
isMultipleExport: false
|
|
36165
|
+
};
|
|
36166
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36167
|
+
this.parent.pdfExport(observedArgs.pdfExportProperties, observedArgs.isMultipleExport, observedArgs.pdfDoc, observedArgs.isBlob);
|
|
36168
|
+
});
|
|
36169
|
+
}
|
|
36170
|
+
else {
|
|
36171
|
+
exportArgs = {
|
|
36172
|
+
width: undefined,
|
|
36173
|
+
height: undefined,
|
|
36174
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36175
|
+
type: 'PDF',
|
|
36176
|
+
fileName: 'result',
|
|
36177
|
+
};
|
|
36178
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36179
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36180
|
+
});
|
|
36181
|
+
}
|
|
36182
|
+
break;
|
|
36183
|
+
case (this.parent.element.id + 'excel'):
|
|
36184
|
+
exportArgs = {
|
|
36185
|
+
excelExportProperties: { fileName: 'Export.xlsx' },
|
|
36186
|
+
isBlob: undefined,
|
|
36187
|
+
isMultipleExport: undefined,
|
|
36188
|
+
workbook: undefined
|
|
36189
|
+
};
|
|
36190
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36191
|
+
this.parent.excelExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
36192
|
+
});
|
|
36193
|
+
break;
|
|
36194
|
+
case (this.parent.element.id + 'csv'):
|
|
35223
36195
|
exportArgs = {
|
|
35224
|
-
|
|
35225
|
-
pdfDoc: undefined,
|
|
36196
|
+
excelExportProperties: { fileName: 'Export.csv' },
|
|
35226
36197
|
isBlob: false,
|
|
35227
|
-
isMultipleExport: false
|
|
36198
|
+
isMultipleExport: false,
|
|
36199
|
+
workbook: undefined
|
|
35228
36200
|
};
|
|
35229
36201
|
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35230
|
-
this.parent.
|
|
36202
|
+
this.parent.csvExport(observedArgs.excelExportProperties, observedArgs.isMultipleExport, observedArgs.workbook, observedArgs.isBlob);
|
|
35231
36203
|
});
|
|
35232
|
-
|
|
35233
|
-
|
|
36204
|
+
break;
|
|
36205
|
+
case (this.parent.element.id + 'png'):
|
|
35234
36206
|
exportArgs = {
|
|
36207
|
+
type: 'PNG',
|
|
35235
36208
|
width: undefined,
|
|
35236
36209
|
height: undefined,
|
|
36210
|
+
fileName: 'result',
|
|
35237
36211
|
orientation: PdfPageOrientation.Landscape,
|
|
35238
|
-
|
|
36212
|
+
};
|
|
36213
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36214
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36215
|
+
});
|
|
36216
|
+
break;
|
|
36217
|
+
case (this.parent.element.id + 'jpeg'):
|
|
36218
|
+
exportArgs = {
|
|
36219
|
+
type: 'JPEG',
|
|
35239
36220
|
fileName: 'result',
|
|
36221
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36222
|
+
width: undefined,
|
|
36223
|
+
height: undefined,
|
|
35240
36224
|
};
|
|
35241
36225
|
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35242
36226
|
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
35243
36227
|
});
|
|
35244
|
-
|
|
35245
|
-
|
|
35246
|
-
|
|
35247
|
-
|
|
35248
|
-
|
|
35249
|
-
|
|
35250
|
-
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
|
|
35260
|
-
|
|
35261
|
-
|
|
35262
|
-
|
|
35263
|
-
|
|
35264
|
-
|
|
35265
|
-
|
|
35266
|
-
|
|
35267
|
-
|
|
35268
|
-
|
|
35269
|
-
|
|
35270
|
-
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
|
|
35274
|
-
|
|
35275
|
-
|
|
35276
|
-
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
|
|
35280
|
-
|
|
35281
|
-
|
|
35282
|
-
|
|
35283
|
-
|
|
35284
|
-
|
|
35285
|
-
|
|
35286
|
-
|
|
35287
|
-
|
|
35288
|
-
|
|
35289
|
-
|
|
35290
|
-
|
|
35291
|
-
|
|
35292
|
-
case (this.parent.element.id + 'svg'):
|
|
35293
|
-
exportArgs = {
|
|
35294
|
-
width: undefined,
|
|
35295
|
-
height: undefined,
|
|
35296
|
-
type: 'SVG',
|
|
35297
|
-
fileName: 'result',
|
|
35298
|
-
orientation: PdfPageOrientation.Landscape,
|
|
35299
|
-
};
|
|
35300
|
-
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
35301
|
-
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
35302
|
-
});
|
|
35303
|
-
break;
|
|
35304
|
-
case (this.parent.element.id + 'notsubtotal'):
|
|
35305
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
35306
|
-
this.parent.refreshData();
|
|
35307
|
-
break;
|
|
35308
|
-
case (this.parent.element.id + 'subtotalrow'):
|
|
35309
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
35310
|
-
this.parent.refreshData();
|
|
35311
|
-
break;
|
|
35312
|
-
case (this.parent.element.id + 'subtotalcolumn'):
|
|
35313
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
35314
|
-
this.parent.refreshData();
|
|
35315
|
-
break;
|
|
35316
|
-
case (this.parent.element.id + 'subtotal'):
|
|
35317
|
-
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
35318
|
-
this.parent.refreshData();
|
|
35319
|
-
break;
|
|
35320
|
-
case (this.parent.element.id + 'notgrandtotal'):
|
|
35321
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
35322
|
-
this.parent.refreshData();
|
|
35323
|
-
break;
|
|
35324
|
-
case (this.parent.element.id + 'grandtotalrow'):
|
|
35325
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
35326
|
-
this.parent.refreshData();
|
|
35327
|
-
break;
|
|
35328
|
-
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
35329
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
35330
|
-
this.parent.refreshData();
|
|
35331
|
-
break;
|
|
35332
|
-
case (this.parent.element.id + 'grandtotal'):
|
|
35333
|
-
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
35334
|
-
this.parent.refreshData();
|
|
35335
|
-
break;
|
|
35336
|
-
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
35337
|
-
if (this.parent.numberFormattingModule) {
|
|
35338
|
-
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35339
|
-
}
|
|
35340
|
-
break;
|
|
35341
|
-
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
35342
|
-
if (this.parent.conditionalFormattingModule) {
|
|
35343
|
-
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35344
|
-
}
|
|
35345
|
-
break;
|
|
35346
|
-
case (this.parent.element.id + '_' + type):
|
|
35347
|
-
if (args.item && args.item.text) {
|
|
35348
|
-
if (type === 'ChartMoreOption') {
|
|
35349
|
-
this.createChartTypeDialog();
|
|
35350
|
-
}
|
|
35351
|
-
else if (type === 'multipleAxes') {
|
|
35352
|
-
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
35353
|
-
this.isMultiAxisChange = true;
|
|
35354
|
-
}
|
|
35355
|
-
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
35356
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
36228
|
+
break;
|
|
36229
|
+
case (this.parent.element.id + 'svg'):
|
|
36230
|
+
exportArgs = {
|
|
36231
|
+
width: undefined,
|
|
36232
|
+
height: undefined,
|
|
36233
|
+
type: 'SVG',
|
|
36234
|
+
fileName: 'result',
|
|
36235
|
+
orientation: PdfPageOrientation.Landscape,
|
|
36236
|
+
};
|
|
36237
|
+
this.parent.trigger(beforeExport, exportArgs, (observedArgs) => {
|
|
36238
|
+
this.parent.chartExport(observedArgs.type, observedArgs.fileName, observedArgs.orientation, observedArgs.width, observedArgs.height);
|
|
36239
|
+
});
|
|
36240
|
+
break;
|
|
36241
|
+
case (this.parent.element.id + 'notsubtotal'):
|
|
36242
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: false, showColumnSubTotals: false, showRowSubTotals: false } }, true);
|
|
36243
|
+
this.parent.refreshData();
|
|
36244
|
+
break;
|
|
36245
|
+
case (this.parent.element.id + 'subtotalrow'):
|
|
36246
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: false, showRowSubTotals: true } }, true);
|
|
36247
|
+
this.parent.refreshData();
|
|
36248
|
+
break;
|
|
36249
|
+
case (this.parent.element.id + 'subtotalcolumn'):
|
|
36250
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: false } }, true);
|
|
36251
|
+
this.parent.refreshData();
|
|
36252
|
+
break;
|
|
36253
|
+
case (this.parent.element.id + 'subtotal'):
|
|
36254
|
+
this.parent.setProperties({ dataSourceSettings: { showSubTotals: true, showColumnSubTotals: true, showRowSubTotals: true } }, true);
|
|
36255
|
+
this.parent.refreshData();
|
|
36256
|
+
break;
|
|
36257
|
+
case (this.parent.element.id + 'notgrandtotal'):
|
|
36258
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: false, showColumnGrandTotals: false, showRowGrandTotals: false } }, true);
|
|
36259
|
+
this.parent.refreshData();
|
|
36260
|
+
break;
|
|
36261
|
+
case (this.parent.element.id + 'grandtotalrow'):
|
|
36262
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: false, showRowGrandTotals: true } }, true);
|
|
36263
|
+
this.parent.refreshData();
|
|
36264
|
+
break;
|
|
36265
|
+
case (this.parent.element.id + 'grandtotalcolumn'):
|
|
36266
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: false } }, true);
|
|
36267
|
+
this.parent.refreshData();
|
|
36268
|
+
break;
|
|
36269
|
+
case (this.parent.element.id + 'grandtotal'):
|
|
36270
|
+
this.parent.setProperties({ dataSourceSettings: { showGrandTotals: true, showColumnGrandTotals: true, showRowGrandTotals: true } }, true);
|
|
36271
|
+
this.parent.refreshData();
|
|
36272
|
+
break;
|
|
36273
|
+
case (this.parent.element.id + 'numberFormattingMenu'):
|
|
36274
|
+
if (this.parent.numberFormattingModule) {
|
|
36275
|
+
this.parent.numberFormattingModule.showNumberFormattingDialog();
|
|
35357
36276
|
}
|
|
35358
|
-
|
|
35359
|
-
|
|
36277
|
+
break;
|
|
36278
|
+
case (this.parent.element.id + 'conditionalFormattingMenu'):
|
|
36279
|
+
if (this.parent.conditionalFormattingModule) {
|
|
36280
|
+
this.parent.conditionalFormattingModule.showConditionalFormattingDialog();
|
|
35360
36281
|
}
|
|
35361
|
-
|
|
35362
|
-
|
|
35363
|
-
|
|
35364
|
-
|
|
36282
|
+
break;
|
|
36283
|
+
case (this.parent.element.id + '_' + type):
|
|
36284
|
+
if (args.item && args.item.text) {
|
|
36285
|
+
if (type === 'ChartMoreOption') {
|
|
36286
|
+
this.createChartTypeDialog();
|
|
36287
|
+
}
|
|
36288
|
+
else if (type === 'multipleAxes') {
|
|
36289
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis) {
|
|
36290
|
+
this.isMultiAxisChange = true;
|
|
36291
|
+
}
|
|
36292
|
+
this.parent.chartSettings.enableMultipleAxis = !this.parent.chartSettings.enableMultipleAxis;
|
|
36293
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35365
36294
|
}
|
|
35366
|
-
else {
|
|
35367
|
-
this.
|
|
36295
|
+
else if (this.getAllChartItems().indexOf(type) > -1) {
|
|
36296
|
+
this.updateChartType(type, false);
|
|
36297
|
+
}
|
|
36298
|
+
else if (type === 'showLegend') {
|
|
36299
|
+
this.parent.chart.legendSettings.visible = !this.showLableState;
|
|
36300
|
+
if (this.parent.chartSettings.legendSettings) {
|
|
36301
|
+
this.parent.chartSettings.legendSettings.visible = !this.showLableState;
|
|
36302
|
+
}
|
|
36303
|
+
else {
|
|
36304
|
+
this.parent.setProperties({ chartSettings: { legendSettings: { visible: !this.showLableState } } }, true);
|
|
36305
|
+
}
|
|
36306
|
+
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35368
36307
|
}
|
|
35369
|
-
this.updateChartType(this.parent.chartSettings.chartSeries.type, true);
|
|
35370
36308
|
}
|
|
35371
|
-
|
|
35372
|
-
|
|
36309
|
+
break;
|
|
36310
|
+
}
|
|
36311
|
+
}
|
|
36312
|
+
catch (execption) {
|
|
36313
|
+
this.parent.actionFailureMethod(execption);
|
|
35373
36314
|
}
|
|
35374
36315
|
/* eslint-enable max-len */
|
|
35375
36316
|
}
|
|
@@ -35460,14 +36401,20 @@ class Toolbar$2 {
|
|
|
35460
36401
|
if (this.parent.chart) {
|
|
35461
36402
|
this.parent.currentView = 'Chart';
|
|
35462
36403
|
this.parent.setProperties({ displayOption: { primary: 'Chart' } }, true);
|
|
35463
|
-
|
|
36404
|
+
if (this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis) {
|
|
36405
|
+
this.parent.element.querySelector('.' + PIVOTCHART).style.width = formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()); /* eslint-disable-line */
|
|
36406
|
+
}
|
|
35464
36407
|
this.parent.chart.setProperties({ width: formatUnit(this.parent.grid ? this.parent.getGridWidthAsNumber() : this.parent.getWidthAsNumber()) }, true); /* eslint-disable-line */
|
|
35465
36408
|
if (this.parent.chartSettings.chartSeries.type === type && !isMultiAxis) {
|
|
35466
|
-
this.parent.
|
|
36409
|
+
this.parent.pivotChartModule.updateView();
|
|
35467
36410
|
}
|
|
35468
36411
|
else {
|
|
35469
36412
|
this.parent.chartSettings.chartSeries.type = type;
|
|
35470
36413
|
}
|
|
36414
|
+
let actionInfo = {
|
|
36415
|
+
toolbarInfo: { displayOption: this.parent.displayOption, chartSettings: this.parent.chartSettings }
|
|
36416
|
+
};
|
|
36417
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
35471
36418
|
}
|
|
35472
36419
|
}
|
|
35473
36420
|
}
|
|
@@ -36027,6 +36974,10 @@ class NumberFormatting {
|
|
|
36027
36974
|
this.parent.trigger(numberFormatting, eventArgs, (observedArgs) => {
|
|
36028
36975
|
if (!observedArgs.cancel) {
|
|
36029
36976
|
this.parent.setProperties({ dataSourceSettings: { formatSettings: observedArgs.formatSettings } }, true);
|
|
36977
|
+
let actionInfo = {
|
|
36978
|
+
numberFormattingInfo: this.parent.dataSourceSettings.formatSettings
|
|
36979
|
+
};
|
|
36980
|
+
this.parent.actionObj.actionInfo = actionInfo;
|
|
36030
36981
|
try {
|
|
36031
36982
|
this.parent.updateDataSource(false);
|
|
36032
36983
|
this.dialog.close();
|
|
@@ -36684,7 +37635,7 @@ class Grouping {
|
|
|
36684
37635
|
for (let j = 0, len = field.customGroups.length; j < len; j++) {
|
|
36685
37636
|
if (field.customGroups[j]) {
|
|
36686
37637
|
let group = field.customGroups[j];
|
|
36687
|
-
if (group.items &&
|
|
37638
|
+
if (group.items && PivotExportUtil.isContainCommonElements(group.items, selectedOptions)) {
|
|
36688
37639
|
splicedItems = this.mergeArray(splicedItems, [group.groupName]);
|
|
36689
37640
|
newItems = this.mergeArray(newItems, group.items);
|
|
36690
37641
|
field.customGroups.splice(j, 1);
|
|
@@ -36934,5 +37885,5 @@ class Grouping {
|
|
|
36934
37885
|
* Export PivotGrid components
|
|
36935
37886
|
*/
|
|
36936
37887
|
|
|
36937
|
-
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 };
|
|
37888
|
+
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 };
|
|
36938
37889
|
//# sourceMappingURL=ej2-pivotview.es2015.js.map
|