@openui5/sap.ui.unified 1.108.2 → 1.108.4
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 +2 -2
- package/src/sap/ui/unified/.library +2 -2
- package/src/sap/ui/unified/Calendar.js +12 -3
- package/src/sap/ui/unified/CalendarAppointment.js +7 -8
- package/src/sap/ui/unified/CalendarDateInterval.js +2 -2
- package/src/sap/ui/unified/CalendarDateIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +138 -6
- package/src/sap/ui/unified/CalendarLegendItem.js +2 -2
- package/src/sap/ui/unified/CalendarLegendRenderer.js +13 -5
- package/src/sap/ui/unified/CalendarMonthInterval.js +2 -2
- package/src/sap/ui/unified/CalendarMonthIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +2 -2
- package/src/sap/ui/unified/CalendarOneMonthIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarRow.js +2 -2
- package/src/sap/ui/unified/CalendarRowRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +2 -2
- package/src/sap/ui/unified/CalendarTimeIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarWeekInterval.js +2 -2
- package/src/sap/ui/unified/ColorPicker.js +2 -2
- package/src/sap/ui/unified/ColorPickerDisplayMode.js +1 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +2 -2
- package/src/sap/ui/unified/ColorPickerRenderer.js +1 -1
- package/src/sap/ui/unified/ContentSwitcher.js +2 -2
- package/src/sap/ui/unified/ContentSwitcherRenderer.js +1 -1
- package/src/sap/ui/unified/Currency.js +2 -2
- package/src/sap/ui/unified/CurrencyRenderer.js +2 -2
- package/src/sap/ui/unified/DateRange.js +2 -2
- package/src/sap/ui/unified/DateTypeRange.js +2 -2
- package/src/sap/ui/unified/FileUploader.js +2 -2
- package/src/sap/ui/unified/FileUploaderHttpRequestMethod.js +1 -1
- package/src/sap/ui/unified/FileUploaderParameter.js +2 -2
- package/src/sap/ui/unified/FileUploaderRenderer.js +1 -1
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +2 -2
- package/src/sap/ui/unified/Menu.js +2 -2
- package/src/sap/ui/unified/MenuItem.js +2 -2
- package/src/sap/ui/unified/MenuItemBase.js +2 -2
- package/src/sap/ui/unified/MenuRenderer.js +2 -2
- package/src/sap/ui/unified/MenuTextFieldItem.js +5 -5
- package/src/sap/ui/unified/Shell.js +2 -2
- package/src/sap/ui/unified/ShellHeadItem.js +2 -2
- package/src/sap/ui/unified/ShellHeadUserItem.js +2 -2
- package/src/sap/ui/unified/ShellHeader.js +1 -1
- package/src/sap/ui/unified/ShellLayout.js +2 -2
- package/src/sap/ui/unified/ShellLayoutRenderer.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +2 -2
- package/src/sap/ui/unified/ShellOverlayRenderer.js +1 -1
- package/src/sap/ui/unified/ShellRenderer.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +2 -2
- package/src/sap/ui/unified/SplitContainerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/CalendarDate.js +1 -1
- package/src/sap/ui/unified/calendar/CalendarUtils.js +1 -1
- package/src/sap/ui/unified/calendar/CustomMonthPicker.js +1 -1
- package/src/sap/ui/unified/calendar/CustomYearPicker.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRow.js +2 -2
- package/src/sap/ui/unified/calendar/DatesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +2 -2
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/IndexPicker.js +2 -2
- package/src/sap/ui/unified/calendar/IndexPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +19 -7
- package/src/sap/ui/unified/calendar/MonthPicker.js +2 -2
- package/src/sap/ui/unified/calendar/MonthPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/MonthRenderer.js +10 -6
- package/src/sap/ui/unified/calendar/MonthsRow.js +2 -2
- package/src/sap/ui/unified/calendar/MonthsRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +2 -2
- package/src/sap/ui/unified/calendar/OneMonthDatesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +2 -2
- package/src/sap/ui/unified/calendar/TimesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/YearPicker.js +2 -2
- package/src/sap/ui/unified/calendar/YearPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/YearRangePicker.js +2 -2
- package/src/sap/ui/unified/calendar/YearRangePickerRenderer.js +1 -1
- package/src/sap/ui/unified/designtime/Calendar.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/CalendarDateInterval.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/CalendarLegend.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/Currency.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/FileUploader.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/library.designtime.js +1 -1
- package/src/sap/ui/unified/library.js +3 -3
- package/src/sap/ui/unified/library.support.js +1 -1
- package/src/sap/ui/unified/messagebundle.properties +4 -0
- package/src/sap/ui/unified/rules/FileUploader.support.js +1 -1
- package/src/sap/ui/unified/themes/base/CalendarLegend.less +19 -0
- package/src/sap/ui/unified/themes/base/Menu.less +8 -0
- package/src/sap/ui/unified/themes/base/library.source.less +1 -1
- package/src/sap/ui/unified/themes/sap_hcb/library.source.less +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.unified",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.4",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.unified",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.108.
|
|
17
|
+
"@openui5/sap.ui.core": "1.108.4"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<name>sap.ui.unified</name>
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>OpenUI5
|
|
7
|
-
* (c) Copyright 2009-
|
|
7
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.108.
|
|
9
|
+
<version>1.108.4</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
//Provides control sap.ui.unified.Calendar.
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
* Basic Calendar.
|
|
75
75
|
* This calendar is used for DatePickers
|
|
76
76
|
* @extends sap.ui.core.Control
|
|
77
|
-
* @version 1.108.
|
|
77
|
+
* @version 1.108.4
|
|
78
78
|
*
|
|
79
79
|
* @constructor
|
|
80
80
|
* @public
|
|
@@ -561,6 +561,7 @@ sap.ui.define([
|
|
|
561
561
|
|
|
562
562
|
this._updateHeadersButtons();
|
|
563
563
|
|
|
564
|
+
this._updateLegendParent();
|
|
564
565
|
};
|
|
565
566
|
|
|
566
567
|
Calendar.prototype.onAfterRendering = function(oEvent){
|
|
@@ -795,6 +796,7 @@ sap.ui.define([
|
|
|
795
796
|
|
|
796
797
|
return this;
|
|
797
798
|
};
|
|
799
|
+
|
|
798
800
|
Calendar.prototype.setMonths = function(iMonths){
|
|
799
801
|
|
|
800
802
|
this._bDateRangeChanged = undefined; // to force rerendering
|
|
@@ -817,7 +819,7 @@ sap.ui.define([
|
|
|
817
819
|
oMonth._bNotInTabChain = true;
|
|
818
820
|
oMonth.setCalendarWeekNumbering(this.getCalendarWeekNumbering());
|
|
819
821
|
oMonth.setSecondaryCalendarType(this._getSecondaryCalendarType());
|
|
820
|
-
this.addAggregation("month",oMonth);
|
|
822
|
+
this.addAggregation("month", oMonth);
|
|
821
823
|
}
|
|
822
824
|
} else if (aMonths.length > iMonths){
|
|
823
825
|
for (i = aMonths.length; i > iMonths; i--) {
|
|
@@ -1289,6 +1291,13 @@ sap.ui.define([
|
|
|
1289
1291
|
this._toggleTwoMonthsInTwoColumnsCSS();
|
|
1290
1292
|
};
|
|
1291
1293
|
|
|
1294
|
+
Calendar.prototype._updateLegendParent = function(){
|
|
1295
|
+
var sLegend = this.getLegend(),
|
|
1296
|
+
oLegend = oCore.byId(sLegend);
|
|
1297
|
+
|
|
1298
|
+
oLegend && oLegend._setParent(this);
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1292
1301
|
/**
|
|
1293
1302
|
* @param {sap.ui.unified.calendar.CalendarDate} oDate A date to be used for the header buttons
|
|
1294
1303
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
21
21
|
*
|
|
22
22
|
* Applications could inherit from this element to add own fields.
|
|
23
23
|
* @extends sap.ui.unified.DateTypeRange
|
|
24
|
-
* @version 1.108.
|
|
24
|
+
* @version 1.108.4
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -279,14 +279,13 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
279
279
|
* @private
|
|
280
280
|
*/
|
|
281
281
|
CalendarAppointment.prototype._convertToTimezone = function(oDate) {
|
|
282
|
-
var
|
|
283
|
-
var
|
|
282
|
+
var sConfigTimezone = Core.getConfiguration().getTimezone();
|
|
283
|
+
var sLocalTimezone = TimezoneUtil.getLocalTimezone();
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
oNewDate = TimezoneUtil.convertToTimezone(oNewDate, sTimezone);
|
|
285
|
+
var iConfigOffsetMillis = TimezoneUtil.calculateOffset(oDate, sConfigTimezone) * 1000;
|
|
286
|
+
var iLocalOffsetMillis = TimezoneUtil.calculateOffset(oDate, sLocalTimezone) * 1000;
|
|
288
287
|
|
|
289
|
-
return
|
|
288
|
+
return new Date(oDate.getTime() - iConfigOffsetMillis + iLocalOffsetMillis);
|
|
290
289
|
};
|
|
291
290
|
|
|
292
291
|
return CalendarAppointment;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
* @class
|
|
57
57
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
58
58
|
* @extends sap.ui.unified.Calendar
|
|
59
|
-
* @version 1.108.
|
|
59
|
+
* @version 1.108.4
|
|
60
60
|
*
|
|
61
61
|
* @constructor
|
|
62
62
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -11,11 +11,17 @@ sap.ui.define([
|
|
|
11
11
|
'./CalendarLegendRenderer',
|
|
12
12
|
"sap/base/Log",
|
|
13
13
|
"sap/ui/thirdparty/jquery",
|
|
14
|
-
"sap/ui/unified/CalendarLegendItem"
|
|
14
|
+
"sap/ui/unified/CalendarLegendItem",
|
|
15
|
+
"sap/ui/core/Core",
|
|
16
|
+
"sap/ui/Device",
|
|
17
|
+
"sap/ui/core/delegate/ItemNavigation"
|
|
15
18
|
],
|
|
16
|
-
function(Control, library, CalendarLegendRenderer, Log, jQuery, CalendarLegendItem) {
|
|
19
|
+
function(Control, library, CalendarLegendRenderer, Log, jQuery, CalendarLegendItem, Core, Device, ItemNavigation) {
|
|
17
20
|
"use strict";
|
|
18
21
|
|
|
22
|
+
// Resource Bundle
|
|
23
|
+
var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.unified");
|
|
24
|
+
|
|
19
25
|
// shortcut for sap.ui.unified.CalendarDayType
|
|
20
26
|
var CalendarDayType = library.CalendarDayType;
|
|
21
27
|
|
|
@@ -30,10 +36,27 @@ sap.ui.define([
|
|
|
30
36
|
*
|
|
31
37
|
* @class
|
|
32
38
|
* A legend for the Calendar Control. Displays special dates colors with their corresponding description. The aggregation specialDates can be set herefor.
|
|
39
|
+
*
|
|
40
|
+
* <h3>Calendar Legend Navigation</h3>
|
|
41
|
+
*
|
|
42
|
+
* If the Calendar Legend is associated with a <code>sap.ui.unified.Calendar</code> control, the users can navigate through the Calendar Legend items.
|
|
43
|
+
* Only special dates related to the navigated legend's item type are displayed in the calendar grid.
|
|
44
|
+
* <b>Note: </b> Standard calendar legend items (Today, Selected, Working Day and Non-Working Day) are also navigatable, but focusing them does
|
|
45
|
+
* not affect the special dates display (all calendar special dates are displayed).
|
|
46
|
+
*
|
|
47
|
+
* <h3>Keyboard shortcuts (when the legend is navigatable)</h3>
|
|
48
|
+
*
|
|
49
|
+
* <ul>
|
|
50
|
+
* <li>[Arrow Up], [Arrow Left] - Move to the previous calendar legend item</li>
|
|
51
|
+
* <li>[Arrow Down], [Arrow Right] - Move to the next calendar legend item</li>
|
|
52
|
+
* <li>[Home], [Page Up] - Move to the first calendar legend item</li>
|
|
53
|
+
* <li>[End], [Page Down] - Move to the last calendar legend item</li>
|
|
54
|
+
* </ul>
|
|
55
|
+
*
|
|
33
56
|
* @extends sap.ui.core.Control
|
|
34
57
|
*
|
|
35
58
|
* @author SAP SE
|
|
36
|
-
* @version 1.108.
|
|
59
|
+
* @version 1.108.4
|
|
37
60
|
*
|
|
38
61
|
* @constructor
|
|
39
62
|
* @public
|
|
@@ -84,10 +107,18 @@ sap.ui.define([
|
|
|
84
107
|
|
|
85
108
|
//don't render standardItems unless it's a PC legend
|
|
86
109
|
this._bShouldRenderStandardItems = true;
|
|
110
|
+
|
|
111
|
+
this._oItemNavigation = null;
|
|
87
112
|
},
|
|
88
113
|
renderer: CalendarLegendRenderer
|
|
89
114
|
});
|
|
90
115
|
|
|
116
|
+
CalendarLegend.prototype.onAfterRendering = function () {
|
|
117
|
+
if (!Device.system.phone && this._oParentControl) {
|
|
118
|
+
this._initItemNavigation();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
91
122
|
CalendarLegend.prototype.setStandardItems = function (aValues) {
|
|
92
123
|
var i;
|
|
93
124
|
|
|
@@ -110,6 +141,108 @@ sap.ui.define([
|
|
|
110
141
|
return this;
|
|
111
142
|
};
|
|
112
143
|
|
|
144
|
+
CalendarLegend.prototype._initItemNavigation = function() {
|
|
145
|
+
var aStandardItems = this.getAggregation("_standardItems") || [],
|
|
146
|
+
aLegendItems = this.getItems() || [],
|
|
147
|
+
aItems,
|
|
148
|
+
aItemsDomRef = [],
|
|
149
|
+
oItemDomRef,
|
|
150
|
+
oRootDomRef;
|
|
151
|
+
|
|
152
|
+
aItems = aStandardItems.concat(aLegendItems);
|
|
153
|
+
|
|
154
|
+
if (!aItems.length) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
oRootDomRef = aItems[0].getDomRef().parentElement;
|
|
159
|
+
|
|
160
|
+
// find a collection of all legend items
|
|
161
|
+
aItems.forEach(function(oItem, iIndex) {
|
|
162
|
+
oItemDomRef = oItem.getFocusDomRef();
|
|
163
|
+
oItemDomRef.setAttribute("tabindex", "-1");
|
|
164
|
+
aItemsDomRef.push(oItemDomRef);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
if (!this._oItemNavigation) {
|
|
168
|
+
this._oItemNavigation = new ItemNavigation()
|
|
169
|
+
.setCycling(false)
|
|
170
|
+
.attachEvent(ItemNavigation.Events.AfterFocus, this._onItemNavigationAfterFocus, this)
|
|
171
|
+
.attachEvent(ItemNavigation.Events.FocusLeave, this._onItemNavigationFocusLeave, this)
|
|
172
|
+
.setDisabledModifiers({
|
|
173
|
+
sapnext : ["alt", "meta", "ctrl"],
|
|
174
|
+
sapprevious : ["alt", "meta", "ctrl"],
|
|
175
|
+
saphome: ["alt", "meta", "ctrl"],
|
|
176
|
+
sapend: ["meta", "ctrl"]
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
this.addDelegate(this._oItemNavigation);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// reinitialize the ItemNavigation after rendering
|
|
183
|
+
this._oItemNavigation.setRootDomRef(oRootDomRef)
|
|
184
|
+
.setItemDomRefs(aItemsDomRef)
|
|
185
|
+
.setPageSize(aItems.length) // set the page size equal to the items number so when we press pageUp/pageDown to focus first/last tab
|
|
186
|
+
.setFocusedIndex(0);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
CalendarLegend.prototype._onItemNavigationAfterFocus = function(oEvent) {
|
|
190
|
+
var oSource = oEvent.getSource(),
|
|
191
|
+
oLegendItemDomRef = oSource.getItemDomRefs()[oSource.getFocusedIndex()],
|
|
192
|
+
sType = Core.byId(oLegendItemDomRef.id).getType(),
|
|
193
|
+
oParent = this._getParent();
|
|
194
|
+
|
|
195
|
+
this._setSpecialDateTypeFilter(sType);
|
|
196
|
+
oParent && oParent.invalidate();
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
CalendarLegend.prototype._onItemNavigationFocusLeave = function(oEvent) {
|
|
200
|
+
var oParent = this._getParent();
|
|
201
|
+
|
|
202
|
+
this._setSpecialDateTypeFilter();
|
|
203
|
+
oParent && oParent.invalidate();
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Sets a special date type that should be filtered. Only dates with this type should be displayed as special.
|
|
208
|
+
* @param {string} sType special date type that should be displayed only
|
|
209
|
+
*/
|
|
210
|
+
CalendarLegend.prototype._setSpecialDateTypeFilter = function(sType) {
|
|
211
|
+
this._sSpecialDateTypeFilter = sType || "";
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Returns a special date type that should be filtered.
|
|
216
|
+
* @returns {string} special date type that should be displayed only.
|
|
217
|
+
*/
|
|
218
|
+
CalendarLegend.prototype._getSpecialDateTypeFilter = function() {
|
|
219
|
+
return this._sSpecialDateTypeFilter || "";
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Sets parent control of the Calendar Legend.
|
|
224
|
+
* @param {sap.ui.core.Control} oControl parent control
|
|
225
|
+
*/
|
|
226
|
+
CalendarLegend.prototype._setParent = function(oControl) {
|
|
227
|
+
this._oParentControl = oControl;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Returns parent control of the Calendar Legend.
|
|
232
|
+
* @returns {sap.ui.core.Control} parent control
|
|
233
|
+
*/
|
|
234
|
+
CalendarLegend.prototype._getParent = function() {
|
|
235
|
+
return this._oParentControl;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Returns aria-label text of the Calendar Legend.
|
|
240
|
+
* @returns {string} aria-label text
|
|
241
|
+
*/
|
|
242
|
+
CalendarLegend.prototype._getLegendAriaLabel = function () {
|
|
243
|
+
return oResourceBundle.getText("LEGEND_ARIA_LABEL");
|
|
244
|
+
};
|
|
245
|
+
|
|
113
246
|
/**
|
|
114
247
|
* Populates the standard items.
|
|
115
248
|
* @param {string[]|sap.ui.unified.StandardCalendarLegendItem[]} aStandardItems array of items specified by their key
|
|
@@ -119,7 +252,6 @@ sap.ui.define([
|
|
|
119
252
|
*/
|
|
120
253
|
CalendarLegend.prototype._addStandardItems = function(aStandardItems, replace) {
|
|
121
254
|
var i,
|
|
122
|
-
rb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.unified"),
|
|
123
255
|
sId = this.getId();
|
|
124
256
|
|
|
125
257
|
if (replace) {
|
|
@@ -128,7 +260,7 @@ sap.ui.define([
|
|
|
128
260
|
|
|
129
261
|
for (i = 0; i < aStandardItems.length; i++) {
|
|
130
262
|
var oItem = new CalendarLegendItem(sId + "-" + aStandardItems[i], {
|
|
131
|
-
text:
|
|
263
|
+
text: oResourceBundle.getText(CalendarLegend._Standard_Items_TextKeys[aStandardItems[i]])
|
|
132
264
|
});
|
|
133
265
|
this.addAggregation("_standardItems", oItem);
|
|
134
266
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
|
|
|
21
21
|
* @class
|
|
22
22
|
* Item to be displayed in a CalendarLegend.
|
|
23
23
|
* @extends sap.ui.core.Element
|
|
24
|
-
* @version 1.108.
|
|
24
|
+
* @version 1.108.4
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,12 +27,16 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
|
|
|
27
27
|
var aStandardItems = oLeg.getAggregation("_standardItems"),
|
|
28
28
|
aCustomItems = oLeg.getItems(),
|
|
29
29
|
iCustomItemsLength = this.defineItemsLength(oLeg, aCustomItems.length),
|
|
30
|
+
iCount = (aStandardItems ? aStandardItems.length : 0) + (aCustomItems ? aCustomItems.length : 0),
|
|
30
31
|
i,
|
|
31
32
|
iIdLength,
|
|
32
|
-
sColumnWidth
|
|
33
|
+
sColumnWidth,
|
|
34
|
+
iIndex = 1;
|
|
33
35
|
|
|
34
36
|
oRm.openStart("div", oLeg);
|
|
35
37
|
oRm.class("sapUiUnifiedLegend");
|
|
38
|
+
oRm.attr("aria-label", oLeg._getLegendAriaLabel());
|
|
39
|
+
oRm.attr("role", "list");
|
|
36
40
|
oRm.openEnd();
|
|
37
41
|
|
|
38
42
|
this.renderItemsHeader(oRm, oLeg);
|
|
@@ -51,14 +55,14 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
|
|
|
51
55
|
iIdLength = oLeg.getId().length + 1; //+1, because of the dash in "CalLeg1-Today"?
|
|
52
56
|
for (i = 0; i < aStandardItems.length; ++i) {
|
|
53
57
|
var sClass = "sapUiUnifiedLegend" + aStandardItems[i].getId().slice(iIdLength);
|
|
54
|
-
this.renderLegendItem(oRm, sClass, aStandardItems[i], ["sapUiUnifiedLegendSquareColor"]);
|
|
58
|
+
this.renderLegendItem(oRm, sClass, aStandardItems[i], ["sapUiUnifiedLegendSquareColor"], iIndex++, iCount);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
if (aCustomItems) {
|
|
59
63
|
// rendering special day and colors
|
|
60
64
|
for (i = 0; i < iCustomItemsLength; i++) {
|
|
61
|
-
this.renderLegendItem(oRm, "sapUiCalLegDayType" + oLeg._getItemType(aCustomItems[i], aCustomItems).slice(4), aCustomItems[i], ["sapUiUnifiedLegendSquareColor"]);
|
|
65
|
+
this.renderLegendItem(oRm, "sapUiCalLegDayType" + oLeg._getItemType(aCustomItems[i], aCustomItems).slice(4), aCustomItems[i], ["sapUiUnifiedLegendSquareColor"], iIndex++, iCount);
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
this.renderAdditionalItems(oRm, oLeg); //like more sections with items
|
|
@@ -78,7 +82,7 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
|
|
|
78
82
|
* @param {sap.ui.unified.CalenderLegendItem} oItem item element
|
|
79
83
|
* @param {string[]} aColorClasses Css classes to be added to the color bullet item in front of the legend item
|
|
80
84
|
*/
|
|
81
|
-
CalendarLegendRenderer.renderLegendItem = function(oRm, sClass, oItem, aColorClasses) {
|
|
85
|
+
CalendarLegendRenderer.renderLegendItem = function(oRm, sClass, oItem, aColorClasses, iIndex, iCount) {
|
|
82
86
|
|
|
83
87
|
var sText = oItem.getText();
|
|
84
88
|
var sTooltip = oItem.getTooltip_AsString();
|
|
@@ -90,6 +94,10 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
|
|
|
90
94
|
oRm.attr('title', sTooltip);
|
|
91
95
|
}
|
|
92
96
|
|
|
97
|
+
oRm.attr("role", "listitem");
|
|
98
|
+
oRm.attr("aria-posinset", iIndex);
|
|
99
|
+
oRm.attr("aria-setsize", iCount);
|
|
100
|
+
|
|
93
101
|
oRm.class("sapUiUnifiedLegendItem");
|
|
94
102
|
oRm.class(sClass);
|
|
95
103
|
oRm.openEnd();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
* <b>Note:</b> JavaScript Date objects are used to set and return the months, mark them as selected or as a special type.
|
|
66
66
|
* But the date part of the Date object is not used. If a Date object is returned the date will be set to the 1st of the corresponding month.
|
|
67
67
|
* @extends sap.ui.core.Control
|
|
68
|
-
* @version 1.108.
|
|
68
|
+
* @version 1.108.4
|
|
69
69
|
*
|
|
70
70
|
* @constructor
|
|
71
71
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* Navigation via year picker switches to the corresponding year and the same month as before the navigation.
|
|
58
58
|
*
|
|
59
59
|
* @extends sap.ui.unified.CalendarDateInterval
|
|
60
|
-
* @version 1.108.
|
|
60
|
+
* @version 1.108.4
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
* @class
|
|
87
87
|
* A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
|
|
88
88
|
* @extends sap.ui.core.Control
|
|
89
|
-
* @version 1.108.
|
|
89
|
+
* @version 1.108.4
|
|
90
90
|
*
|
|
91
91
|
* @constructor
|
|
92
92
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
* @class
|
|
67
67
|
* Calendar with granularity of time items displayed in one line.
|
|
68
68
|
* @extends sap.ui.core.Control
|
|
69
|
-
* @version 1.108.
|
|
69
|
+
* @version 1.108.4
|
|
70
70
|
*
|
|
71
71
|
* @constructor
|
|
72
72
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarUtils', 'sap/ui/unified/calendar
|
|
|
39
39
|
* its start date to the first date of the same week as the date the user chose.
|
|
40
40
|
*
|
|
41
41
|
* @extends sap.ui.unified.CalendarDateInterval
|
|
42
|
-
* @version 1.108.
|
|
42
|
+
* @version 1.108.4
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
* @extends sap.ui.core.Control
|
|
66
66
|
*
|
|
67
67
|
* @author SAP SE
|
|
68
|
-
* @version 1.108.
|
|
68
|
+
* @version 1.108.4
|
|
69
69
|
*
|
|
70
70
|
* @constructor
|
|
71
71
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* A thin wrapper over {@link sap.ui.unified.ColorPicker} allowing the latter to be used in a popover.
|
|
48
48
|
*
|
|
49
49
|
* @extends sap.ui.core.Control
|
|
50
|
-
* @version 1.108.
|
|
50
|
+
* @version 1.108.4
|
|
51
51
|
*
|
|
52
52
|
* @constructor
|
|
53
53
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @extends sap.ui.core.Control
|
|
32
32
|
*
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.108.
|
|
34
|
+
* @version 1.108.4
|
|
35
35
|
*
|
|
36
36
|
* @constructor
|
|
37
37
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* @extends sap.ui.core.Control
|
|
59
59
|
*
|
|
60
60
|
* @author SAP SE
|
|
61
|
-
* @version 1.108.
|
|
61
|
+
* @version 1.108.4
|
|
62
62
|
*
|
|
63
63
|
* @constructor
|
|
64
64
|
* @public
|