@openui5/sap.ui.unified 1.105.2 → 1.105.3
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 +1 -1
- package/src/sap/ui/unified/Calendar.js +37 -7
- 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/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 +1 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuRenderer.js +1 -1
- package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
- package/src/sap/ui/unified/Shell.js +1 -1
- package/src/sap/ui/unified/ShellHeadItem.js +1 -1
- package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
- 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/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +1 -1
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +44 -13
- package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
- 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/YearPicker.js +1 -1
- package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
- package/src/sap/ui/unified/library.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.unified",
|
|
3
|
-
"version": "1.105.
|
|
3
|
+
"version": "1.105.3",
|
|
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.105.
|
|
17
|
+
"@openui5/sap.ui.core": "1.105.3"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.105.
|
|
9
|
+
<version>1.105.3</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -27,7 +27,9 @@ sap.ui.define([
|
|
|
27
27
|
"./CalendarRenderer",
|
|
28
28
|
"sap/ui/dom/containsOrEquals",
|
|
29
29
|
"sap/base/util/deepEqual",
|
|
30
|
-
"sap/base/Log"
|
|
30
|
+
"sap/base/Log",
|
|
31
|
+
"sap/ui/core/Configuration",
|
|
32
|
+
"sap/ui/core/date/CalendarWeekNumbering"
|
|
31
33
|
], function(
|
|
32
34
|
CalendarType,
|
|
33
35
|
Control,
|
|
@@ -51,7 +53,9 @@ sap.ui.define([
|
|
|
51
53
|
CalendarRenderer,
|
|
52
54
|
containsOrEquals,
|
|
53
55
|
deepEqual,
|
|
54
|
-
Log
|
|
56
|
+
Log,
|
|
57
|
+
Configuration,
|
|
58
|
+
CalendarWeekNumbering
|
|
55
59
|
) {
|
|
56
60
|
"use strict";
|
|
57
61
|
|
|
@@ -70,7 +74,7 @@ sap.ui.define([
|
|
|
70
74
|
* Basic Calendar.
|
|
71
75
|
* This calendar is used for DatePickers
|
|
72
76
|
* @extends sap.ui.core.Control
|
|
73
|
-
* @version 1.105.
|
|
77
|
+
* @version 1.105.3
|
|
74
78
|
*
|
|
75
79
|
* @constructor
|
|
76
80
|
* @public
|
|
@@ -106,8 +110,9 @@ sap.ui.define([
|
|
|
106
110
|
months : {type : "int", group : "Appearance", defaultValue : 1},
|
|
107
111
|
|
|
108
112
|
/**
|
|
109
|
-
* If set, the
|
|
110
|
-
* If
|
|
113
|
+
* If the property is set, this day marks the start of the displayed week. Valid values are 0 to 6.
|
|
114
|
+
* If no valid property is set, the current locale's default is applied.
|
|
115
|
+
* Note: This property should not be used with the calendarWeekNumbering property.
|
|
111
116
|
* @since 1.28.9
|
|
112
117
|
*/
|
|
113
118
|
firstDayOfWeek : {type : "int", group : "Appearance", defaultValue : -1},
|
|
@@ -195,7 +200,15 @@ sap.ui.define([
|
|
|
195
200
|
*
|
|
196
201
|
* @since 1.84.0
|
|
197
202
|
*/
|
|
198
|
-
_currentPicker : {type : "string", group : "Appearance", visibility: "hidden"}
|
|
203
|
+
_currentPicker : {type : "string", group : "Appearance", visibility: "hidden"},
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* If set, the calendar week numbering is used for display.
|
|
207
|
+
* If not set, the calendar week numbering of the global configuration is used.
|
|
208
|
+
* Note: This property should not be used with firstDayOfWeek property.
|
|
209
|
+
* @since 1.108.0
|
|
210
|
+
*/
|
|
211
|
+
calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
|
|
199
212
|
|
|
200
213
|
},
|
|
201
214
|
aggregations : {
|
|
@@ -473,7 +486,7 @@ sap.ui.define([
|
|
|
473
486
|
};
|
|
474
487
|
|
|
475
488
|
Calendar.prototype._createMonth = function(sId){
|
|
476
|
-
var oMonth = new Month(sId, {width: "100%"});
|
|
489
|
+
var oMonth = new Month(sId, {width: "100%", calendarWeekNumbering: this.getCalendarWeekNumbering()});
|
|
477
490
|
oMonth._bCalendar = true;
|
|
478
491
|
oMonth.attachEvent("datehovered", this._handleDateHovered, this);
|
|
479
492
|
oMonth.attachEvent("weekNumberSelect", this._handleWeekNumberSelect, this);
|
|
@@ -515,6 +528,10 @@ sap.ui.define([
|
|
|
515
528
|
oMonthDate = aMonths[0].getDate(),
|
|
516
529
|
oFocusedDate = this._getFocusedDate();
|
|
517
530
|
|
|
531
|
+
if (this.getFirstDayOfWeek() !== -1 && this.getCalendarWeekNumbering() !== "Default") {
|
|
532
|
+
Log.warning("Both properties firstDayOfWeek and calendarWeekNumbering should not be used at the same time!");
|
|
533
|
+
}
|
|
534
|
+
|
|
518
535
|
if (aMonths.length > 1 && oMonthDate) {
|
|
519
536
|
// for more than one month - re-render same months (if already rendered once)
|
|
520
537
|
oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this.getPrimaryCalendarType());
|
|
@@ -771,6 +788,17 @@ sap.ui.define([
|
|
|
771
788
|
|
|
772
789
|
};
|
|
773
790
|
|
|
791
|
+
Calendar.prototype.setCalendarWeekNumbering = function(sCalendarWeekNumbering) {
|
|
792
|
+
var aMonths = this.getAggregation("month");
|
|
793
|
+
|
|
794
|
+
this.setProperty("calendarWeekNumbering", sCalendarWeekNumbering);
|
|
795
|
+
|
|
796
|
+
for (var i = 0; i < aMonths.length; i++) {
|
|
797
|
+
aMonths[i].setProperty("calendarWeekNumbering", sCalendarWeekNumbering);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
return this;
|
|
801
|
+
};
|
|
774
802
|
Calendar.prototype.setMonths = function(iMonths){
|
|
775
803
|
|
|
776
804
|
this._bDateRangeChanged = undefined; // to force rerendering
|
|
@@ -790,6 +818,8 @@ sap.ui.define([
|
|
|
790
818
|
oMonth.attachEvent("_bindMousemove", _handleBindMousemove, this);
|
|
791
819
|
oMonth.attachEvent("_unbindMousemove", _handleUnbindMousemove, this);
|
|
792
820
|
oMonth._bNoThemeChange = true;
|
|
821
|
+
oMonth._bNotInTabChain = true;
|
|
822
|
+
oMonth.setCalendarWeekNumbering(this.getCalendarWeekNumbering());
|
|
793
823
|
oMonth.setSecondaryCalendarType(this._getSecondaryCalendarType());
|
|
794
824
|
this.addAggregation("month",oMonth);
|
|
795
825
|
}
|
|
@@ -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.105.
|
|
24
|
+
* @version 1.105.3
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -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.105.
|
|
59
|
+
* @version 1.105.3
|
|
60
60
|
*
|
|
61
61
|
* @constructor
|
|
62
62
|
* @public
|
|
@@ -63,7 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
* <b>Note:</b> JavaScript Date objects are used to set and return the months, mark them as selected or as a special type.
|
|
64
64
|
* 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.
|
|
65
65
|
* @extends sap.ui.core.Control
|
|
66
|
-
* @version 1.105.
|
|
66
|
+
* @version 1.105.3
|
|
67
67
|
*
|
|
68
68
|
* @constructor
|
|
69
69
|
* @public
|
|
@@ -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.105.
|
|
60
|
+
* @version 1.105.3
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -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.105.
|
|
42
|
+
* @version 1.105.3
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -25,7 +25,7 @@ sap.ui.define(['./DateRange', './library'],
|
|
|
25
25
|
* @class
|
|
26
26
|
* Date range with calendar day type information. Used to visualize special days in the Calendar.
|
|
27
27
|
* @extends sap.ui.unified.DateRange
|
|
28
|
-
* @version 1.105.
|
|
28
|
+
* @version 1.105.3
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* If used inside the calendar the properties and aggregation are directly taken from the parent
|
|
33
33
|
* (To not duplicate and sync DateRanges and so on...)
|
|
34
34
|
* @extends sap.ui.unified.calendar.Month
|
|
35
|
-
* @version 1.105.
|
|
35
|
+
* @version 1.105.3
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @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.105.
|
|
35
|
+
* @version 1.105.3
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -22,7 +22,11 @@ sap.ui.define([
|
|
|
22
22
|
"sap/ui/dom/containsOrEquals",
|
|
23
23
|
"sap/ui/events/KeyCodes",
|
|
24
24
|
"sap/ui/thirdparty/jquery",
|
|
25
|
-
'sap/ui/core/InvisibleMessage'
|
|
25
|
+
'sap/ui/core/InvisibleMessage',
|
|
26
|
+
"sap/ui/core/Configuration",
|
|
27
|
+
"sap/ui/core/date/CalendarWeekNumbering",
|
|
28
|
+
"sap/ui/core/date/CalendarUtils",
|
|
29
|
+
"sap/base/Log"
|
|
26
30
|
], function(
|
|
27
31
|
Control,
|
|
28
32
|
Device,
|
|
@@ -40,7 +44,11 @@ sap.ui.define([
|
|
|
40
44
|
containsOrEquals,
|
|
41
45
|
KeyCodes,
|
|
42
46
|
jQuery,
|
|
43
|
-
InvisibleMessage
|
|
47
|
+
InvisibleMessage,
|
|
48
|
+
Configuration,
|
|
49
|
+
CalendarWeekNumbering,
|
|
50
|
+
CalendarDateUtils,
|
|
51
|
+
Log
|
|
44
52
|
) {
|
|
45
53
|
"use strict";
|
|
46
54
|
|
|
@@ -69,7 +77,7 @@ sap.ui.define([
|
|
|
69
77
|
* If used inside the calendar the properties and aggregation are directly taken from the parent
|
|
70
78
|
* (To not duplicate and sync DateRanges and so on...)
|
|
71
79
|
* @extends sap.ui.core.Control
|
|
72
|
-
* @version 1.105.
|
|
80
|
+
* @version 1.105.3
|
|
73
81
|
*
|
|
74
82
|
* @constructor
|
|
75
83
|
* @public
|
|
@@ -103,8 +111,9 @@ sap.ui.define([
|
|
|
103
111
|
showHeader : {type : "boolean", group : "Appearance", defaultValue : false},
|
|
104
112
|
|
|
105
113
|
/**
|
|
106
|
-
* If set, the
|
|
107
|
-
* If
|
|
114
|
+
* If the property is set, this day marks the start of the displayed week. Valid values are 0 to 6.
|
|
115
|
+
* If no valid property is set, the current locale's default is applied.
|
|
116
|
+
* Note: This property should not be used with the calendarWeekNumbering property.
|
|
108
117
|
* @since 1.28.9
|
|
109
118
|
*/
|
|
110
119
|
firstDayOfWeek : {type : "int", group : "Appearance", defaultValue : -1},
|
|
@@ -153,7 +162,15 @@ sap.ui.define([
|
|
|
153
162
|
*
|
|
154
163
|
* @since 1.90
|
|
155
164
|
*/
|
|
156
|
-
_focusedDate : {type : "object", group : "Data", visibility: "hidden", defaultValue: null}
|
|
165
|
+
_focusedDate : {type : "object", group : "Data", visibility: "hidden", defaultValue: null},
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* If set, the calendar week numbering is used for display.
|
|
169
|
+
* If not set, the calendar week numbering of the global configuration is used.
|
|
170
|
+
* Note: This property should not be used with firstDayOfWeek property.
|
|
171
|
+
* @since 1.108.0
|
|
172
|
+
*/
|
|
173
|
+
calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
|
|
157
174
|
|
|
158
175
|
},
|
|
159
176
|
aggregations : {
|
|
@@ -303,6 +320,12 @@ sap.ui.define([
|
|
|
303
320
|
return this.getDomRef() && this._oItemNavigation.getItemDomRefs()[this._oItemNavigation.getFocusedIndex()];
|
|
304
321
|
};
|
|
305
322
|
|
|
323
|
+
Month.prototype.onBeforeRendering = function() {
|
|
324
|
+
if (this.getFirstDayOfWeek() !== -1 && this.getCalendarWeekNumbering() !== "Default") {
|
|
325
|
+
Log.warning("Both properties firstDayOfWeek and calendarWeekNumbering should not be used at the same time!");
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
|
|
306
329
|
Month.prototype.onAfterRendering = function(){
|
|
307
330
|
this.bSpaceButtonPressed = false;
|
|
308
331
|
_initItemNavigation.call(this);
|
|
@@ -754,8 +777,14 @@ sap.ui.define([
|
|
|
754
777
|
}
|
|
755
778
|
|
|
756
779
|
if (iFirstDayOfWeek < 0 || iFirstDayOfWeek > 6) {
|
|
757
|
-
var
|
|
758
|
-
|
|
780
|
+
var oWeekConfigurationValues = CalendarDateUtils.getWeekConfigurationValues(this.getCalendarWeekNumbering(), new Locale(this._getLocale()));
|
|
781
|
+
|
|
782
|
+
if (oWeekConfigurationValues) {
|
|
783
|
+
iFirstDayOfWeek = oWeekConfigurationValues.firstDayOfWeek;
|
|
784
|
+
} else {
|
|
785
|
+
var oLocaleData = this._getLocaleData();
|
|
786
|
+
iFirstDayOfWeek = oLocaleData.getFirstDayOfWeek();
|
|
787
|
+
}
|
|
759
788
|
}
|
|
760
789
|
|
|
761
790
|
return iFirstDayOfWeek;
|
|
@@ -1576,17 +1605,19 @@ sap.ui.define([
|
|
|
1576
1605
|
* @private
|
|
1577
1606
|
*/
|
|
1578
1607
|
Month.prototype._calculateWeekNumber = function (oDate) {
|
|
1579
|
-
var oEndDate = this._getLastWeekDate(oDate);
|
|
1580
1608
|
var oLocale = new Locale(this._getLocale());
|
|
1609
|
+
var oEndDate = this._getLastWeekDate(oDate);
|
|
1581
1610
|
var oLocaleData = this._getLocaleData();
|
|
1582
|
-
var oDateFormat
|
|
1611
|
+
var oDateFormat;
|
|
1583
1612
|
var iWeekNumber;
|
|
1584
1613
|
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
// US calendar weeks overlap Jan 1st is always week 1 while Dec 31st is always last week number
|
|
1614
|
+
oDateFormat = DateFormat.getInstance({pattern: "w", calendarType: this.getPrimaryCalendarType(), calendarWeekNumbering: this.getCalendarWeekNumbering()}, oLocale);
|
|
1615
|
+
|
|
1588
1616
|
var bIsRegionUS = oLocaleData.firstDayStartsFirstWeek();
|
|
1589
1617
|
|
|
1618
|
+
// Because the date we use to calculate the week number may be in one year and in the same time
|
|
1619
|
+
// includes days in a new month into a new year, we explicitly changed the week number
|
|
1620
|
+
// US calendar weeks overlap, Jan 1st is always week 1, while Dec 31st is always last week.
|
|
1590
1621
|
if (oEndDate.getMonth() === 0 && this._oDate.getMonth() === 0 && bIsRegionUS) {
|
|
1591
1622
|
iWeekNumber = oDateFormat.format(oEndDate.toUTCJSDate(), true);
|
|
1592
1623
|
} else {
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
* The MontsRow works with JavaScript Date objects, but only the month and the year are used to display and interact.
|
|
62
62
|
* As representation for a month, the 1st of the month will always be returned in the API.
|
|
63
63
|
* @extends sap.ui.core.Control
|
|
64
|
-
* @version 1.105.
|
|
64
|
+
* @version 1.105.3
|
|
65
65
|
*
|
|
66
66
|
* @constructor
|
|
67
67
|
* @public
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* As in all date-time controls, all pubic JS Date objects that are given (e.g. <code>setDate()</code>) or read
|
|
59
59
|
* (e.g. <code>getFirstRenderedDate</code>) with values which are considered as date objects in browser(local) timezone.
|
|
60
60
|
* @extends sap.ui.core.Control
|
|
61
|
-
* @version 1.105.
|
|
61
|
+
* @version 1.105.3
|
|
62
62
|
*
|
|
63
63
|
* @constructor
|
|
64
64
|
* @public
|
|
@@ -28,13 +28,13 @@ sap.ui.define([
|
|
|
28
28
|
* @namespace
|
|
29
29
|
* @alias sap.ui.unified
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.105.
|
|
31
|
+
* @version 1.105.3
|
|
32
32
|
* @since 1.28
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
var thisLib = sap.ui.getCore().initLibrary({
|
|
36
36
|
name : "sap.ui.unified",
|
|
37
|
-
version: "1.105.
|
|
37
|
+
version: "1.105.3",
|
|
38
38
|
dependencies : ["sap.ui.core"],
|
|
39
39
|
designtime: "sap/ui/unified/designtime/library.designtime",
|
|
40
40
|
types: [
|