@openui5/sap.ui.unified 1.150.0 → 1.152.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/THIRDPARTY.txt +6 -6
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +190 -1
- package/src/sap/ui/unified/CalendarAppointment.js +1 -1
- package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +1 -1
- package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
- package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarRenderer.js +8 -2
- package/src/sap/ui/unified/CalendarRow.js +1 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +1 -1
- package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
- package/src/sap/ui/unified/ColorPicker.js +46 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- package/src/sap/ui/unified/ColorPickerRenderer.js +49 -15
- package/src/sap/ui/unified/ContentSwitcher.js +1 -1
- package/src/sap/ui/unified/Currency.js +1 -1
- package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
- package/src/sap/ui/unified/DateRange.js +1 -1
- package/src/sap/ui/unified/DateTypeRange.js +27 -6
- package/src/sap/ui/unified/FileUploader.js +1 -1
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
- package/src/sap/ui/unified/Menu.js +1 -1
- package/src/sap/ui/unified/MenuItem.js +2 -2
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuItemGroup.js +1 -1
- package/src/sap/ui/unified/MenuRenderer.js +4 -2
- package/src/sap/ui/unified/MenuTextFieldItem.js +7 -3
- package/src/sap/ui/unified/MonthlyRecurrenceRule.js +1 -1
- package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/RecurrenceRule.js +1 -1
- package/src/sap/ui/unified/RecurringCalendarAppointment.js +1 -1
- package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/Shell.js +1 -1
- package/src/sap/ui/unified/ShellHeadItem.js +2 -30
- package/src/sap/ui/unified/ShellHeadUserItem.js +3 -31
- package/src/sap/ui/unified/ShellHeader.js +29 -13
- package/src/sap/ui/unified/ShellLayout.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +1 -1
- package/src/sap/ui/unified/TimeRange.js +1 -1
- package/src/sap/ui/unified/WeeklyRecurrenceRule.js +1 -1
- package/src/sap/ui/unified/YearlyRecurrenceRule.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +1 -1
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +1 -0
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +83 -3
- package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
- package/src/sap/ui/unified/calendar/MonthRenderer.js +46 -14
- package/src/sap/ui/unified/calendar/MonthsRow.js +1 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
- package/src/sap/ui/unified/calendar/WeeksRow.js +1 -1
- package/src/sap/ui/unified/calendar/YearPicker.js +1 -1
- package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
- package/src/sap/ui/unified/library.js +2 -2
- package/src/sap/ui/unified/themes/base/Calendar.less +39 -6
- package/src/sap/ui/unified/themes/base/ColorPicker.less +125 -3
- package/src/sap/ui/unified/themes/base/FileUploader.less +5 -0
- package/src/sap/ui/unified/themes/base/ShellHeader.less +2 -7
- package/src/sap/ui/unified/themes/sap_hcb/Calendar.less +2 -1
|
@@ -5,15 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides control sap.ui.unified.DateTypeRange.
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
'./DateRange',
|
|
10
|
+
'./library',
|
|
11
|
+
'sap/ui/core/library'
|
|
12
|
+
],
|
|
13
|
+
function(
|
|
14
|
+
DateRange,
|
|
15
|
+
library,
|
|
16
|
+
coreLibrary
|
|
17
|
+
) {
|
|
10
18
|
"use strict";
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
20
|
// shortcut for sap.ui.unified.CalendarDayType
|
|
15
21
|
var CalendarDayType = library.CalendarDayType;
|
|
16
22
|
|
|
23
|
+
// shortcut for sap.ui.core.aria.HasPopup
|
|
24
|
+
var AriaHasPopup = coreLibrary.aria.HasPopup;
|
|
25
|
+
|
|
17
26
|
|
|
18
27
|
|
|
19
28
|
/**
|
|
@@ -25,7 +34,7 @@ sap.ui.define(['./DateRange', './library'],
|
|
|
25
34
|
* @class
|
|
26
35
|
* Date range with calendar day type information. Used to visualize special days in the Calendar.
|
|
27
36
|
* @extends sap.ui.unified.DateRange
|
|
28
|
-
* @version 1.
|
|
37
|
+
* @version 1.152.0
|
|
29
38
|
*
|
|
30
39
|
* @constructor
|
|
31
40
|
* @public
|
|
@@ -54,7 +63,19 @@ sap.ui.define(['./DateRange', './library'],
|
|
|
54
63
|
* If set, this color will override the default background color defined in <code>Calendar</code> <code>specialDates</code> aggregation
|
|
55
64
|
* @since 1.76.0
|
|
56
65
|
*/
|
|
57
|
-
color : {type : "sap.ui.core.CSSColor", group : "Appearance", defaultValue : null}
|
|
66
|
+
color : {type : "sap.ui.core.CSSColor", group : "Appearance", defaultValue : null},
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Defines the value of the <code>aria-haspopup</code> attribute of the day cell.
|
|
70
|
+
*
|
|
71
|
+
* <b>Note:</b> Use this property only when the cell is related to a popover/popup.
|
|
72
|
+
* The value should be equal to the main/root role of the popup.
|
|
73
|
+
*
|
|
74
|
+
* <b>Note:</b> Setting <code>type</code> to <code>sap.ui.unified.CalendarDayType.None</code>
|
|
75
|
+
* together with this property allows adding the attribute without any visual marking.
|
|
76
|
+
* @since 1.152.0
|
|
77
|
+
*/
|
|
78
|
+
ariaHasPopup : {type : "sap.ui.core.aria.HasPopup", group : "Accessibility", defaultValue : AriaHasPopup.None}
|
|
58
79
|
}
|
|
59
80
|
}});
|
|
60
81
|
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @implements sap.ui.unified.IMenuItem
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.152.0
|
|
43
43
|
* @since 1.21.0
|
|
44
44
|
*
|
|
45
45
|
* @constructor
|
|
@@ -170,7 +170,7 @@ sap.ui.define([
|
|
|
170
170
|
posinset: oInfo.iItemNo,
|
|
171
171
|
setsize: oInfo.iTotalItems,
|
|
172
172
|
selected: null,
|
|
173
|
-
checked:
|
|
173
|
+
checked: oItem._getItemSelectionMode() !== ItemSelectionMode.None ? bIsSelected : undefined,
|
|
174
174
|
labelledby: { value: this.getId() + "-txt", append: true },
|
|
175
175
|
keyshortcuts : !oSubMenu && sShortcutText ? sShortcutText : null,
|
|
176
176
|
haspopup: oSubMenu && coreLibrary.aria.HasPopup.Menu.toLowerCase(),
|
|
@@ -15,7 +15,7 @@ sap.ui.define(["sap/ui/core/ControlBehavior"],
|
|
|
15
15
|
* Menu renderer.
|
|
16
16
|
* @author SAP - TD Core UI&AM UI Infra
|
|
17
17
|
*
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.152.0
|
|
19
19
|
* @namespace
|
|
20
20
|
*/
|
|
21
21
|
var MenuRenderer = {
|
|
@@ -165,7 +165,9 @@ sap.ui.define(["sap/ui/core/ControlBehavior"],
|
|
|
165
165
|
oRm.openEnd();
|
|
166
166
|
oRm.close("div");
|
|
167
167
|
|
|
168
|
-
oRm.voidStart("hr")
|
|
168
|
+
oRm.voidStart("hr");
|
|
169
|
+
oRm.attr("aria-hidden", "true");
|
|
170
|
+
oRm.voidEnd();
|
|
169
171
|
|
|
170
172
|
oRm.openStart("div");
|
|
171
173
|
oRm.class("sapUiMnuDivR");
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* @implements sap.ui.unified.IMenuItem
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.152.0
|
|
57
57
|
* @since 1.21.0
|
|
58
58
|
*
|
|
59
59
|
* @constructor
|
|
@@ -235,7 +235,7 @@ sap.ui.define([
|
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
|
|
238
|
-
MenuTextFieldItem.prototype.
|
|
238
|
+
MenuTextFieldItem.prototype.onkeyup = function(oEvent){
|
|
239
239
|
oEvent.stopPropagation(); //Avoid bubbling key events to the Menu -> Events are only selectively forwarded
|
|
240
240
|
};
|
|
241
241
|
|
|
@@ -249,9 +249,13 @@ sap.ui.define([
|
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
MenuTextFieldItem.prototype.
|
|
252
|
+
MenuTextFieldItem.prototype.onkeydown = function(oEvent){
|
|
253
253
|
//like sapenter but on keyup -> see Menu.prototype.onkeyup
|
|
254
254
|
if (!PseudoEvents.events.sapenter.fnCheck(oEvent) && oEvent.key !== "Enter") {
|
|
255
|
+
if (oEvent.key === "Home" || oEvent.key === "End") {
|
|
256
|
+
oEvent.stopPropagation();
|
|
257
|
+
}
|
|
258
|
+
|
|
255
259
|
return;
|
|
256
260
|
}
|
|
257
261
|
var sValue = this.$("tf").val();
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
// Provides control sap.ui.unified.ShellHeadItem.
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'sap/ui/core/Element',
|
|
10
|
-
'sap/ui/core/IconPool',
|
|
11
10
|
'./library',
|
|
12
|
-
"sap/base/security/encodeXML",
|
|
13
11
|
"sap/ui/thirdparty/jquery"
|
|
14
12
|
],
|
|
15
|
-
function(Element,
|
|
13
|
+
function(Element, library, jQuery) {
|
|
16
14
|
"use strict";
|
|
17
15
|
|
|
18
16
|
|
|
@@ -28,7 +26,7 @@ sap.ui.define([
|
|
|
28
26
|
* @extends sap.ui.core.Element
|
|
29
27
|
*
|
|
30
28
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
29
|
+
* @version 1.152.0
|
|
32
30
|
*
|
|
33
31
|
* @constructor
|
|
34
32
|
* @public
|
|
@@ -174,32 +172,6 @@ sap.ui.define([
|
|
|
174
172
|
};
|
|
175
173
|
|
|
176
174
|
|
|
177
|
-
ShellHeadItem.prototype.setIcon = function(sIcon){
|
|
178
|
-
this.setProperty("icon", sIcon, true);
|
|
179
|
-
if (this.getDomRef()) {
|
|
180
|
-
this._refreshIcon();
|
|
181
|
-
}
|
|
182
|
-
return this;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
ShellHeadItem.prototype._refreshIcon = function(){
|
|
187
|
-
var $Ico = jQuery(this.$().children()[0]);
|
|
188
|
-
var sIco = this.getIcon();
|
|
189
|
-
if (IconPool.isIconURI(sIco)) {
|
|
190
|
-
var oIconInfo = IconPool.getIconInfo(sIco);
|
|
191
|
-
$Ico.html("").attr("style", "");
|
|
192
|
-
if (oIconInfo) {
|
|
193
|
-
$Ico.text(oIconInfo.content).attr("role", "presentation").attr("aria-label", oIconInfo.text || oIconInfo.name).css("font-family", "'" + oIconInfo.fontFamily + "'");
|
|
194
|
-
}
|
|
195
|
-
} else {
|
|
196
|
-
var $Image = this.$("img-inner");
|
|
197
|
-
if ($Image.length == 0 || $Image.attr("src") != sIco) {
|
|
198
|
-
$Ico.attr("style", "").attr("aria-label", null).html("<img role='presentation' id='" + this.getId() + "-img-inner' src='" + encodeXML(sIco) + "'>");
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
|
|
203
175
|
return ShellHeadItem;
|
|
204
176
|
|
|
205
177
|
});
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'sap/ui/core/Element',
|
|
10
10
|
'sap/ui/core/IconPool',
|
|
11
|
-
'./library'
|
|
12
|
-
"sap/base/security/encodeXML"
|
|
11
|
+
'./library'
|
|
13
12
|
],
|
|
14
|
-
function(Element, IconPool, library
|
|
13
|
+
function(Element, IconPool, library) {
|
|
15
14
|
"use strict";
|
|
16
15
|
|
|
17
16
|
|
|
@@ -27,7 +26,7 @@ sap.ui.define([
|
|
|
27
26
|
* @extends sap.ui.core.Element
|
|
28
27
|
*
|
|
29
28
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
29
|
+
* @version 1.152.0
|
|
31
30
|
*
|
|
32
31
|
* @constructor
|
|
33
32
|
* @public
|
|
@@ -86,33 +85,6 @@ sap.ui.define([
|
|
|
86
85
|
ShellHeadUserItem.prototype.onsapspace = ShellHeadUserItem.prototype.onclick;
|
|
87
86
|
ShellHeadUserItem.prototype.onsapenter = ShellHeadUserItem.prototype.onclick;
|
|
88
87
|
|
|
89
|
-
ShellHeadUserItem.prototype.setImage = function(sImage){
|
|
90
|
-
this.setProperty("image", sImage, true);
|
|
91
|
-
if (this.getDomRef()) {
|
|
92
|
-
this._refreshImage();
|
|
93
|
-
}
|
|
94
|
-
return this;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
ShellHeadUserItem.prototype._refreshImage = function(){
|
|
98
|
-
var $Ico = this.$("img");
|
|
99
|
-
var sImage = this.getImage();
|
|
100
|
-
if (!sImage) {
|
|
101
|
-
$Ico.html("").attr("style", "").css("display", "none");
|
|
102
|
-
} else if (IconPool.isIconURI(sImage)) {
|
|
103
|
-
var oIconInfo = IconPool.getIconInfo(sImage);
|
|
104
|
-
$Ico.html("").attr("style", "");
|
|
105
|
-
if (oIconInfo) {
|
|
106
|
-
$Ico.text(oIconInfo.content).attr("role", "presentation").attr("aria-label", oIconInfo.text || oIconInfo.name).css("font-family", "'" + oIconInfo.fontFamily + "'");
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
var $Image = this.$("img-inner");
|
|
110
|
-
if ($Image.length == 0 || $Image.attr("src") != sImage) {
|
|
111
|
-
$Ico.attr("style", "").attr("aria-label", null).html("<img role='presentation' id='" + this.getId() + "-img-inner' src='" + encodeXML(sImage) + "'>");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
88
|
ShellHeadUserItem.prototype._checkAndAdaptWidth = function(bShellSearchVisible){
|
|
117
89
|
if (!this.getDomRef()) {
|
|
118
90
|
return false;
|
|
@@ -8,13 +8,14 @@ sap.ui.define([
|
|
|
8
8
|
'./library',
|
|
9
9
|
"sap/base/i18n/Localization",
|
|
10
10
|
'sap/ui/core/Control',
|
|
11
|
+
'sap/ui/core/IconPool',
|
|
11
12
|
'sap/ui/Device',
|
|
12
13
|
"sap/ui/core/ControlBehavior",
|
|
13
14
|
"sap/ui/core/Lib",
|
|
14
15
|
'sap/ui/core/theming/Parameters',
|
|
15
16
|
"sap/ui/thirdparty/jquery"
|
|
16
17
|
],
|
|
17
|
-
function(library, Localization, Control, Device, ControlBehavior, Library, Parameters, jQuery) {
|
|
18
|
+
function(library, Localization, Control, _IconPool, Device, ControlBehavior, Library, Parameters, jQuery) {
|
|
18
19
|
"use strict";
|
|
19
20
|
|
|
20
21
|
|
|
@@ -116,7 +117,18 @@ sap.ui.define([
|
|
|
116
117
|
pressed: aItems[i].getToggleEnabled() ? aItems[i].getSelected() : null
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
|
-
rm.write("
|
|
120
|
+
rm.write(">");
|
|
121
|
+
var sIcon = aItems[i].getIcon();
|
|
122
|
+
if (sIcon) {
|
|
123
|
+
if (_IconPool.isIconURI(sIcon)) {
|
|
124
|
+
rm.writeIcon(sIcon, null, {role: "presentation"});
|
|
125
|
+
} else {
|
|
126
|
+
rm.write("<span><img role='presentation' src='");
|
|
127
|
+
rm.writeEscaped(sIcon);
|
|
128
|
+
rm.write("'></span>");
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
rm.write("<div class='sapUiUfdShellHeadItmMarker'><div></div></div></div>");
|
|
120
132
|
}
|
|
121
133
|
|
|
122
134
|
var oUser = oHeader.getUser();
|
|
@@ -141,7 +153,21 @@ sap.ui.define([
|
|
|
141
153
|
}
|
|
142
154
|
}
|
|
143
155
|
|
|
144
|
-
rm.write("
|
|
156
|
+
rm.write(">");
|
|
157
|
+
var sImage = oUser.getImage();
|
|
158
|
+
if (sImage) {
|
|
159
|
+
if (_IconPool.isIconURI(sImage)) {
|
|
160
|
+
rm.writeIcon(sImage, ["sapUiUfdShellHeadUsrItmImg"], {id: oUser.getId() + "-img", "aria-hidden": "true"});
|
|
161
|
+
} else {
|
|
162
|
+
rm.write("<span id='", oUser.getId(), "-img' aria-hidden='true' class='sapUiUfdShellHeadUsrItmImg'>");
|
|
163
|
+
rm.write("<img role='presentation' src='");
|
|
164
|
+
rm.writeEscaped(sImage);
|
|
165
|
+
rm.write("'>");
|
|
166
|
+
rm.write("</span>");
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
rm.write("<span id='", oUser.getId(), "-img' aria-hidden='true' class='sapUiUfdShellHeadUsrItmImg'></span>");
|
|
170
|
+
}
|
|
145
171
|
rm.write("<span id='" + oUser.getId() + "-name' class='sapUiUfdShellHeadUsrItmName'");
|
|
146
172
|
var sUserName = oUser.getUsername() || "";
|
|
147
173
|
rm.writeAttributeEscaped("title", sUserName);
|
|
@@ -237,22 +263,12 @@ sap.ui.define([
|
|
|
237
263
|
};
|
|
238
264
|
|
|
239
265
|
ShellHeader.prototype._refresh = function(){
|
|
240
|
-
function updateItems(aItems){
|
|
241
|
-
for (var i = 0; i < aItems.length; i++) {
|
|
242
|
-
aItems[i]._refreshIcon();
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
updateItems(this.getHeadItems());
|
|
247
|
-
updateItems(this.getHeadEndItems());
|
|
248
|
-
|
|
249
266
|
var oUser = this.getUser(),
|
|
250
267
|
isPhoneSize = jQuery("html").hasClass("sapUiMedia-Std-Phone"),
|
|
251
268
|
searchVisible = !this.$("hdr-search").hasClass("sapUiUfdShellHidden"),
|
|
252
269
|
$logo = this.$("icon");
|
|
253
270
|
|
|
254
271
|
if (oUser) {
|
|
255
|
-
oUser._refreshImage();
|
|
256
272
|
oUser._checkAndAdaptWidth(searchVisible && !!this.getSearch());
|
|
257
273
|
}
|
|
258
274
|
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* If used inside the calendar the properties and aggregation are directly taken from the parent
|
|
40
40
|
* (To not duplicate and sync DateRanges and so on...)
|
|
41
41
|
* @extends sap.ui.unified.calendar.Month
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.152.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @public
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* This control serves for picking an item from a grid with items which are relative periods in Plannig Calendar.
|
|
33
33
|
* This is used inside the sap.m.PlanningCalendar relative views. Not for stand alone usage.
|
|
34
34
|
* @extends sap.ui.core.Control
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.152.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|