@sapui5/sap.zen.crosstab 1.107.0 → 1.108.0
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/package.json +1 -1
- package/src/sap/zen/crosstab/.library +1 -1
- package/src/sap/zen/crosstab/BaseArea.js +32 -36
- package/src/sap/zen/crosstab/CrosstabRenderer.js +102 -145
- package/src/sap/zen/crosstab/DataCell.js +61 -61
- package/src/sap/zen/crosstab/DataCellRenderer.js +24 -30
- package/src/sap/zen/crosstab/HeaderCell.js +171 -167
- package/src/sap/zen/crosstab/HeaderCellRenderer.js +115 -135
- package/src/sap/zen/crosstab/library.js +1 -1
- package/src/sap/zen/crosstab/themes/base/Chart.less +4 -0
- package/src/sap/zen/crosstab/utils/Utils.js +28 -29
|
@@ -7,11 +7,12 @@ sap.ui.define(
|
|
|
7
7
|
"jquery.sap.global",
|
|
8
8
|
"sap/ui/core/Control",
|
|
9
9
|
"sap/zen/crosstab/CellStyleHandler",
|
|
10
|
+
"sap/zen/crosstab/DataCellRenderer",
|
|
10
11
|
"sap/zen/crosstab/rendering/RenderingConstants",
|
|
11
12
|
"sap/zen/crosstab/utils/Utils",
|
|
12
13
|
"sap/zen/crosstab/library"
|
|
13
14
|
],
|
|
14
|
-
function(jQuery, Control, CellStyleHandler, RenderingConstants, Utils){
|
|
15
|
+
function(jQuery, Control, CellStyleHandler, DataCellRenderer, RenderingConstants, Utils){
|
|
15
16
|
"use strict";
|
|
16
17
|
// Provides control sap.zen.crosstab.DataCell.
|
|
17
18
|
jQuery.sap.declare("sap.zen.crosstab.DataCell");
|
|
@@ -28,42 +29,45 @@ sap.ui.define(
|
|
|
28
29
|
* @constructor
|
|
29
30
|
* @public
|
|
30
31
|
* @deprecated since 1.89.0
|
|
31
|
-
* @
|
|
32
|
+
* @alias sap.zen.crosstab.DataCell
|
|
32
33
|
*/
|
|
33
|
-
Control.extend("sap.zen.crosstab.DataCell", /** @lends sap.zen.crosstab.DataCell.prototype */ {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
var DataCell = Control.extend("sap.zen.crosstab.DataCell", /** @lends sap.zen.crosstab.DataCell.prototype */ {
|
|
35
|
+
metadata : {
|
|
36
|
+
library : "sap.zen.crosstab",
|
|
37
|
+
properties : {
|
|
38
|
+
/**
|
|
39
|
+
* the text of the data cell
|
|
40
|
+
*/
|
|
41
|
+
text : {type : "string", group : "Misc", defaultValue : null},
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
/**
|
|
44
|
+
* the area of the data cell
|
|
45
|
+
*/
|
|
46
|
+
area : {type : "object", group : "Misc", defaultValue : null},
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
/**
|
|
49
|
+
* the row of the data cell
|
|
50
|
+
*/
|
|
51
|
+
row : {type : "int", group : "Misc", defaultValue : null},
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* the column of the data cell
|
|
55
|
+
*/
|
|
56
|
+
col : {type : "int", group : "Misc", defaultValue : null},
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* the table row of the data cell
|
|
60
|
+
*/
|
|
61
|
+
tableRow : {type : "int", group : "Misc", defaultValue : null},
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
/**
|
|
64
|
+
* the table column of the data cell
|
|
65
|
+
*/
|
|
66
|
+
tableCol : {type : "int", group : "Misc", defaultValue : null}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
renderer: DataCellRenderer
|
|
70
|
+
});
|
|
67
71
|
|
|
68
72
|
|
|
69
73
|
/**
|
|
@@ -75,11 +79,7 @@ sap.ui.define(
|
|
|
75
79
|
* @public
|
|
76
80
|
*/
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
// * This file defines behavior for the control,
|
|
80
|
-
// */
|
|
81
|
-
|
|
82
|
-
sap.zen.crosstab.DataCell.prototype.init = function () {
|
|
82
|
+
DataCell.prototype.init = function () {
|
|
83
83
|
"use strict";
|
|
84
84
|
this.aStyles = [];
|
|
85
85
|
this.bLoading = false;
|
|
@@ -88,22 +88,22 @@ sap.ui.define(
|
|
|
88
88
|
this.sPassiveCellType = RenderingConstants.PASSIVE_CELL_TYPE_NORMAL;
|
|
89
89
|
this.iNumberOfLineBreaks = 0;
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
DataCell.prototype.getCellType = function() {
|
|
92
92
|
return RenderingConstants.TYPE_DATA_CELL;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
DataCell.prototype.isHeaderCell = function() {
|
|
95
95
|
return false;
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
DataCell.prototype.getCssClassNames = function (bIsIE8, bIsRtl, bIsMsIE) {
|
|
98
98
|
return CellStyleHandler.getCssClasses(this.aStyles, bIsIE8, bIsRtl, bIsMsIE);
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
DataCell.prototype.getStyleIdList = function () {
|
|
101
101
|
return this.aStyles;
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
DataCell.prototype.setStyleIdList = function (aNewStyles) {
|
|
104
104
|
this.aStyles = aNewStyles;
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
DataCell.prototype.addStyle = function (sStyle) {
|
|
107
107
|
var iStyleId = CellStyleHandler.getStyleId(
|
|
108
108
|
sStyle,
|
|
109
109
|
RenderingConstants.TYPE_DATA_CELL
|
|
@@ -112,7 +112,7 @@ sap.ui.define(
|
|
|
112
112
|
this.aStyles.push(iStyleId);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
DataCell.prototype.removeStyle = function (sStyle) {
|
|
116
116
|
var iStyleId = CellStyleHandler.getStyleId(
|
|
117
117
|
sStyle, RenderingConstants.TYPE_DATA_CELL
|
|
118
118
|
);
|
|
@@ -121,7 +121,7 @@ sap.ui.define(
|
|
|
121
121
|
this.aStyles.splice(iIndex, 1);
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
DataCell.prototype.hasStyle = function (sStyle) {
|
|
125
125
|
var iStyleId = CellStyleHandler.getStyleId(
|
|
126
126
|
sStyle, RenderingConstants.TYPE_DATA_CELL
|
|
127
127
|
);
|
|
@@ -132,54 +132,54 @@ sap.ui.define(
|
|
|
132
132
|
return true;
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
DataCell.prototype.getColSpan = function () {
|
|
136
136
|
return 1;
|
|
137
137
|
};
|
|
138
|
-
|
|
138
|
+
DataCell.prototype.getRowSpan = function () {
|
|
139
139
|
return 1;
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
DataCell.prototype.getEffectiveColSpan = function () {
|
|
142
142
|
return 1;
|
|
143
143
|
};
|
|
144
|
-
|
|
144
|
+
DataCell.prototype.getEffectiveRowSpan = function () {
|
|
145
145
|
return 1;
|
|
146
146
|
};
|
|
147
|
-
|
|
147
|
+
DataCell.prototype.isLoading = function () {
|
|
148
148
|
return this.bLoading;
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
DataCell.prototype.setLoading = function (bLoading) {
|
|
151
151
|
this.bLoading = bLoading;
|
|
152
152
|
};
|
|
153
|
-
|
|
153
|
+
DataCell.prototype.isSelectable = function () {
|
|
154
154
|
return false;
|
|
155
155
|
};
|
|
156
|
-
|
|
156
|
+
DataCell.prototype.getUnescapedText = function () {
|
|
157
157
|
return Utils.unEscapeDisplayString(this.getText());
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
DataCell.prototype.setEntryEnabled = function (bIsEntryEnabled) {
|
|
160
160
|
this.bIsEntryEnabled = bIsEntryEnabled;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
DataCell.prototype.isEntryEnabled = function () {
|
|
163
163
|
return this.bIsEntryEnabled;
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
DataCell.prototype.setUnit = function (sUnit) {
|
|
166
166
|
this.sUnit = sUnit;
|
|
167
167
|
};
|
|
168
|
-
|
|
168
|
+
DataCell.prototype.getUnit = function () {
|
|
169
169
|
return this.sUnit;
|
|
170
170
|
};
|
|
171
|
-
|
|
171
|
+
DataCell.prototype.getPassiveCellType = function () {
|
|
172
172
|
return this.sPassiveCellType;
|
|
173
173
|
};
|
|
174
|
-
|
|
174
|
+
DataCell.prototype.setPassiveCellType = function (sPCellType) {
|
|
175
175
|
this.sPassiveCellType = sPCellType;
|
|
176
176
|
};
|
|
177
|
-
|
|
177
|
+
DataCell.prototype.setNumberOfLineBreaks = function (iNumberOfLineBreaks) {
|
|
178
178
|
this.iNumberOfLineBreaks = iNumberOfLineBreaks;
|
|
179
179
|
};
|
|
180
|
-
|
|
180
|
+
DataCell.prototype.getNumberOfLineBreaks = function () {
|
|
181
181
|
return this.iNumberOfLineBreaks;
|
|
182
182
|
};
|
|
183
|
-
return
|
|
183
|
+
return DataCell;
|
|
184
184
|
}
|
|
185
185
|
);
|
|
@@ -4,27 +4,27 @@
|
|
|
4
4
|
/*global sap*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
7
|
-
"jquery.sap.global",
|
|
8
7
|
"sap/zen/crosstab/rendering/RenderingConstants",
|
|
9
8
|
"sap/zen/crosstab/IDataCell"
|
|
10
9
|
],
|
|
11
|
-
function(
|
|
10
|
+
function(RenderingConstants, IDataCell){
|
|
12
11
|
"use strict";
|
|
13
|
-
jQuery.sap.declare("sap.zen.crosstab.DataCellRenderer");
|
|
14
12
|
/**
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
13
|
+
* @namespace DataCell renderer.
|
|
14
|
+
* @alias sap.zen.crosstab.DataCell
|
|
17
15
|
*/
|
|
18
|
-
|
|
16
|
+
var DataCellRenderer = {
|
|
17
|
+
apiVersion: 2
|
|
18
|
+
};
|
|
19
19
|
/**
|
|
20
20
|
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
|
|
21
21
|
*
|
|
22
22
|
* @param {sap.ui.core.RenderManager}
|
|
23
|
-
*
|
|
24
|
-
* @param {sap.
|
|
23
|
+
* rm the RenderManager that can be used for writing to the Render-Output-Buffer
|
|
24
|
+
* @param {sap.zen.crosstab.DataCell}
|
|
25
25
|
* oControl an object representation of the control that should be rendered
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
DataCellRenderer.render = function (rm, oControl) {
|
|
28
28
|
"use strict";
|
|
29
29
|
var oArea = oControl.getArea();
|
|
30
30
|
var oCrosstab = oArea.getCrosstab();
|
|
@@ -36,34 +36,28 @@ sap.ui.define(
|
|
|
36
36
|
oAdditionalStyles = oCallbackResult.additionalStyles;
|
|
37
37
|
sRenderText = oCallbackResult.renderText;
|
|
38
38
|
}
|
|
39
|
-
// convenience variable
|
|
40
|
-
var rm = oRenderManager;
|
|
41
39
|
// write the HTML into the render manager
|
|
42
|
-
rm.
|
|
43
|
-
rm.writeControlData(oControl);
|
|
40
|
+
rm.openStart("td", oControl);
|
|
44
41
|
var sCssClasses = oControl.getCssClassNames(oCrosstab.isIE8Mode(), oCrosstab.getPropertyBag().isRtl(), oCrosstab.getUtils().isMsIE());
|
|
45
|
-
rm.
|
|
46
|
-
rm.
|
|
47
|
-
rm.
|
|
48
|
-
rm.
|
|
49
|
-
rm.
|
|
50
|
-
rm.
|
|
51
|
-
var sClasses = "sapzencrosstab-DataCellContentDiv";
|
|
42
|
+
rm.attr("class", sCssClasses);
|
|
43
|
+
rm.attr("tabindex", RenderingConstants.TABINDEX);
|
|
44
|
+
rm.openEnd(); // SPAN element
|
|
45
|
+
rm.openStart("div", oControl.getId() + "_contentDiv");
|
|
46
|
+
rm.attr("tabindex", RenderingConstants.TABINDEX);
|
|
47
|
+
rm.class("sapzencrosstab-DataCellContentDiv");
|
|
52
48
|
if (oControl.isLoading()) {
|
|
53
|
-
|
|
49
|
+
rm.class("sapzencrosstab-LoadingCellContentDiv");
|
|
54
50
|
}
|
|
55
|
-
rm.writeAttributeEscaped("class", sClasses);
|
|
56
51
|
if (oAdditionalStyles) {
|
|
57
52
|
for ( var sStyleKey in oAdditionalStyles) {
|
|
58
|
-
rm.
|
|
53
|
+
rm.sStyle(sStyleKey, oAdditionalStyles[sStyleKey]);
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
|
-
rm.
|
|
62
|
-
rm.
|
|
63
|
-
rm.
|
|
64
|
-
rm.
|
|
65
|
-
rm.write("</td>");
|
|
56
|
+
rm.openEnd();
|
|
57
|
+
rm.text(sRenderText);
|
|
58
|
+
rm.close("div");
|
|
59
|
+
rm.close("td");
|
|
66
60
|
};
|
|
67
|
-
return
|
|
68
|
-
}
|
|
61
|
+
return DataCellRenderer;
|
|
62
|
+
}, true
|
|
69
63
|
);
|