@openui5/sap.ui.unified 1.71.48 → 1.71.52

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.
Files changed (50) hide show
  1. package/package.json +2 -2
  2. package/src/sap/ui/unified/.library +1 -1
  3. package/src/sap/ui/unified/Calendar.js +43 -22
  4. package/src/sap/ui/unified/CalendarAppointment.js +1 -1
  5. package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
  6. package/src/sap/ui/unified/CalendarLegend.js +1 -1
  7. package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
  8. package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
  9. package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
  10. package/src/sap/ui/unified/CalendarRow.js +1 -1
  11. package/src/sap/ui/unified/CalendarTimeInterval.js +1 -1
  12. package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
  13. package/src/sap/ui/unified/ColorPicker.js +1 -1
  14. package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
  15. package/src/sap/ui/unified/ContentSwitcher.js +1 -1
  16. package/src/sap/ui/unified/Currency.js +1 -1
  17. package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
  18. package/src/sap/ui/unified/DateRange.js +1 -1
  19. package/src/sap/ui/unified/DateTypeRange.js +1 -1
  20. package/src/sap/ui/unified/FileUploader.js +1 -1
  21. package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
  22. package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
  23. package/src/sap/ui/unified/Menu.js +1 -1
  24. package/src/sap/ui/unified/MenuItem.js +1 -1
  25. package/src/sap/ui/unified/MenuItemBase.js +1 -1
  26. package/src/sap/ui/unified/MenuRenderer.js +1 -1
  27. package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
  28. package/src/sap/ui/unified/Shell.js +1 -1
  29. package/src/sap/ui/unified/ShellHeadItem.js +1 -1
  30. package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
  31. package/src/sap/ui/unified/ShellLayout.js +1 -1
  32. package/src/sap/ui/unified/ShellOverlay.js +1 -1
  33. package/src/sap/ui/unified/SplitContainer.js +1 -1
  34. package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
  35. package/src/sap/ui/unified/calendar/Header.js +1 -1
  36. package/src/sap/ui/unified/calendar/Month.js +68 -8
  37. package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
  38. package/src/sap/ui/unified/calendar/MonthPickerRenderer.js +6 -3
  39. package/src/sap/ui/unified/calendar/MonthRenderer.js +11 -2
  40. package/src/sap/ui/unified/calendar/MonthsRow.js +1 -1
  41. package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
  42. package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
  43. package/src/sap/ui/unified/calendar/YearPicker.js +1 -1
  44. package/src/sap/ui/unified/calendar/YearPickerRenderer.js +6 -3
  45. package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
  46. package/src/sap/ui/unified/library.js +2 -2
  47. package/src/sap/ui/unified/messagebundle.properties +3 -0
  48. package/src/sap/ui/unified/messagebundle_bg.properties +6 -6
  49. package/src/sap/ui/unified/messagebundle_es.properties +3 -3
  50. package/src/sap/ui/unified/messagebundle_hr.properties +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.unified",
3
- "version": "1.71.48",
3
+ "version": "1.71.52",
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.71.48"
17
+ "@openui5/sap.ui.core": "1.71.52"
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.71.48</version>
9
+ <version>1.71.52</version>
10
10
 
11
11
  <documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
12
12
 
@@ -26,7 +26,8 @@ sap.ui.define([
26
26
  "sap/ui/dom/containsOrEquals",
27
27
  "sap/base/util/deepEqual",
28
28
  "sap/base/Log",
29
- "sap/ui/thirdparty/jquery"
29
+ "sap/ui/thirdparty/jquery",
30
+ "sap/ui/core/date/CalendarWeekNumbering"
30
31
  ], function(
31
32
  Control,
32
33
  LocaleData,
@@ -49,13 +50,13 @@ sap.ui.define([
49
50
  containsOrEquals,
50
51
  deepEqual,
51
52
  Log,
52
- jQuery
53
+ jQuery,
54
+ CalendarWeekNumbering
53
55
  ) {
54
56
  "use strict";
55
57
 
56
58
  // get resource translation bundle;
57
59
  var oCore = sap.ui.getCore(),
58
- oLibraryResourceBundle = oCore.getLibraryResourceBundle("sap.ui.unified"),
59
60
  CalendarType = sap.ui.core.CalendarType;
60
61
  /*
61
62
  * Inside the Calendar CalendarDate objects are used. But in the API JS dates are used.
@@ -72,7 +73,7 @@ sap.ui.define([
72
73
  * Basic Calendar.
73
74
  * This calendar is used for DatePickers
74
75
  * @extends sap.ui.core.Control
75
- * @version 1.71.48
76
+ * @version 1.71.52
76
77
  *
77
78
  * @constructor
78
79
  * @public
@@ -108,8 +109,9 @@ sap.ui.define([
108
109
  months : {type : "int", group : "Appearance", defaultValue : 1},
109
110
 
110
111
  /**
111
- * If set, the first day of the displayed week is this day. Valid values are 0 to 6.
112
- * If not a valid value is set, the default of the used locale is used.
112
+ * If the property is set, this day marks the start of the displayed week. Valid values are 0 to 6.
113
+ * If no valid property is set, the current locale's default is applied.
114
+ * Note: This property should not be used with the calendarWeekNumbering property.
113
115
  * @since 1.28.9
114
116
  */
115
117
  firstDayOfWeek : {type : "int", group : "Appearance", defaultValue : -1},
@@ -182,7 +184,17 @@ sap.ui.define([
182
184
  * regardless of what is set to this property.
183
185
  * @since 1.48
184
186
  */
185
- showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : true}
187
+ showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : true},
188
+
189
+ /**
190
+ * If set, the calendar week numbering is used for display.
191
+ * If not set, the calendar week numbering of the global configuration is used.
192
+ * Note: This property should not be used with firstDayOfWeek property.
193
+ * Note: This API has been introduced with version 1.108 and downported to this release with
194
+ * patch level 52.
195
+ * @since 1.71.52
196
+ */
197
+ calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
186
198
 
187
199
  },
188
200
  aggregations : {
@@ -420,6 +432,7 @@ sap.ui.define([
420
432
 
421
433
  Calendar.prototype._initilizeMonthPicker = function() {
422
434
  var oMonthPicker = new MonthPicker(this.getId() + "--MP");
435
+ oMonthPicker._bCalendar = true;
423
436
  oMonthPicker.attachEvent("select", this._selectMonth, this);
424
437
  oMonthPicker.attachEvent("pageChange", _handleMonthPickerPageChange, this);
425
438
  oMonthPicker._bNoThemeChange = true;
@@ -428,6 +441,7 @@ sap.ui.define([
428
441
 
429
442
  Calendar.prototype._initilizeYearPicker = function() {
430
443
  var oYearPicker = new YearPicker(this.getId() + "--YP");
444
+ oYearPicker._bCalendar = true;
431
445
  oYearPicker.attachEvent("select", this._selectYear, this);
432
446
  oYearPicker.attachEvent("pageChange", _handleYearPickerPageChange, this);
433
447
  this.setAggregation("yearPicker",oYearPicker);
@@ -441,8 +455,9 @@ sap.ui.define([
441
455
  };
442
456
 
443
457
  Calendar.prototype._createMonth = function(sId){
444
- var oMonth = new Month(sId, {width: "100%"});
458
+ var oMonth = new Month(sId, {width: "100%", calendarWeekNumbering: this.getCalendarWeekNumbering()});
445
459
 
460
+ oMonth._bCalendar = true;
446
461
  oMonth.attachEvent("datehovered", this._handleDateHovered, this);
447
462
  oMonth.attachEvent("weekNumberSelect", this._handleWeekNumberSelect, this);
448
463
 
@@ -481,6 +496,10 @@ sap.ui.define([
481
496
  oFocusedDate = this._getFocusedDate(),
482
497
  oHeader = this.getAggregation("header");
483
498
 
499
+ if (this.getFirstDayOfWeek() !== -1 && this.getCalendarWeekNumbering() !== "Default") {
500
+ Log.warning("Both properties firstDayOfWeek and calendarWeekNumbering should not be used at the same time!");
501
+ }
502
+
484
503
  if (aMonths.length > 1 && oMonthDate) {
485
504
  // for more than one month - re-render same months (if already rendered once)
486
505
  oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this.getPrimaryCalendarType());
@@ -778,6 +797,18 @@ sap.ui.define([
778
797
  this._bPopoverContainer = true;
779
798
  };
780
799
 
800
+ Calendar.prototype.setCalendarWeekNumbering = function(sCalendarWeekNumbering) {
801
+ var aMonths = this.getAggregation("month");
802
+
803
+ this.setProperty("calendarWeekNumbering", sCalendarWeekNumbering);
804
+
805
+ for (var i = 0; i < aMonths.length; i++) {
806
+ aMonths[i].setProperty("calendarWeekNumbering", sCalendarWeekNumbering);
807
+ }
808
+
809
+ return this;
810
+ };
811
+
781
812
  Calendar.prototype.setMonths = function(iMonths){
782
813
 
783
814
  this._bDateRangeChanged = undefined; // to force rerendering
@@ -797,6 +828,8 @@ sap.ui.define([
797
828
  oMonth.attachEvent("_bindMousemove", _handleBindMousemove, this);
798
829
  oMonth.attachEvent("_unbindMousemove", _handleUnbindMousemove, this);
799
830
  oMonth._bNoThemeChange = true;
831
+ oMonth._bNotInTabChain = true;
832
+ oMonth.setCalendarWeekNumbering(this.getCalendarWeekNumbering());
800
833
  oMonth.setSecondaryCalendarType(this._getSecondaryCalendarType());
801
834
  this.addAggregation("month",oMonth);
802
835
  }
@@ -2172,13 +2205,9 @@ sap.ui.define([
2172
2205
  sAriaLabel = aMonthNamesWide[aMonths[0]] || sText;
2173
2206
  }
2174
2207
 
2175
- if (!this._getSucessorsPickerPopup()) {
2208
+ if (!this._getSucessorsPickerPopup() && sSecondaryMonthInfo) {
2176
2209
  // Add info for the secondary month
2177
- if (sSecondaryMonthInfo) {
2178
2210
  sAriaLabel += ", " + sSecondaryMonthInfo;
2179
- }
2180
-
2181
- sAriaLabel += ". " + oLibraryResourceBundle.getText("CALENDAR_MONTH_PICKER_OPEN_HINT");
2182
2211
  }
2183
2212
 
2184
2213
  oHeader.setTextButton1(sText);
@@ -2511,11 +2540,6 @@ sap.ui.define([
2511
2540
  sSecondHeaderText = sSecondHeaderYear || sFirstHeaderYear,
2512
2541
  sPrimaryCalendarType = this.getPrimaryCalendarType();
2513
2542
 
2514
- if (!this._getSecondaryCalendarType()) {
2515
- // If secondary type is set, than placing the hint should be done in the end.
2516
- sFirstHeaderAriaLabel += (this._getSucessorsPickerPopup() ? "" : ". " + oLibraryResourceBundle.getText("CALENDAR_YEAR_PICKER_OPEN_HINT"));
2517
- }
2518
-
2519
2543
  if (this._iMode === 2 && oYearPicker && oYearPicker.getDomRef()) {
2520
2544
 
2521
2545
  var aYearPickerCells = oYearPicker._oItemNavigation.getItemDomRefs(),
@@ -2552,7 +2576,7 @@ sap.ui.define([
2552
2576
  if (sYear) {
2553
2577
  // Add the secondary year info, as well as the hint.
2554
2578
  // Keep in mind this method might be called from _handleNext/Previous without a year
2555
- sAriaLabel += ", " + sYear + (this._getSucessorsPickerPopup() ? "" : ". " + oLibraryResourceBundle.getText("CALENDAR_YEAR_PICKER_OPEN_HINT"));
2579
+ sAriaLabel += ", " + sYear ;
2556
2580
  oHeader.setAriaLabelButton2(sAriaLabel);
2557
2581
  }
2558
2582
 
@@ -2746,9 +2770,6 @@ sap.ui.define([
2746
2770
  this._setPrimaryHeaderMonthButtonText();
2747
2771
  this._toggleTwoMonthsInTwoColumnsCSS();
2748
2772
  }
2749
- } else if (_getMonths.call(this) > 1) {
2750
- // on rerendering focus might be set on wrong month
2751
- this._focusDate(this._getFocusedDate(), true, true);
2752
2773
  }
2753
2774
 
2754
2775
  }
@@ -21,7 +21,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', './library',
21
21
  *
22
22
  * Applications could inherit from this element to add own fields.
23
23
  * @extends sap.ui.unified.DateTypeRange
24
- * @version 1.71.48
24
+ * @version 1.71.52
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * @class
56
56
  * <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
57
57
  * @extends sap.ui.unified.Calendar
58
- * @version 1.71.48
58
+ * @version 1.71.52
59
59
  *
60
60
  * @constructor
61
61
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extends sap.ui.core.Control
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.71.48
37
+ * @version 1.71.52
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -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.71.48
24
+ * @version 1.71.52
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -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.71.48
68
+ * @version 1.71.52
69
69
  *
70
70
  * @constructor
71
71
  * @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.71.48
60
+ * @version 1.71.52
61
61
  *
62
62
  * @constructor
63
63
  * @private
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  * @class
72
72
  * A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
73
73
  * @extends sap.ui.core.Control
74
- * @version 1.71.48
74
+ * @version 1.71.52
75
75
  *
76
76
  * @constructor
77
77
  * @public
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * @class
69
69
  * Calendar with granularity of time items displayed in one line.
70
70
  * @extends sap.ui.core.Control
71
- * @version 1.71.48
71
+ * @version 1.71.52
72
72
  *
73
73
  * @constructor
74
74
  * @public
@@ -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.71.48
42
+ * @version 1.71.52
43
43
  *
44
44
  * @constructor
45
45
  * @private
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * @extends sap.ui.core.Control
66
66
  *
67
67
  * @author SAP SE
68
- * @version 1.71.48
68
+ * @version 1.71.52
69
69
  *
70
70
  * @constructor
71
71
  * @public
@@ -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.71.48
50
+ * @version 1.71.52
51
51
  *
52
52
  * @constructor
53
53
  * @public
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @extends sap.ui.core.Control
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.71.48
34
+ * @version 1.71.52
35
35
  *
36
36
  * @constructor
37
37
  * @public
@@ -54,7 +54,7 @@ sap.ui.define([
54
54
  * @extends sap.ui.core.Control
55
55
  *
56
56
  * @author SAP SE
57
- * @version 1.71.48
57
+ * @version 1.71.52
58
58
  *
59
59
  * @constructor
60
60
  * @public
@@ -14,7 +14,7 @@ sap.ui.define([],
14
14
  /**
15
15
  * Currency renderer.
16
16
  *
17
- * @version 1.71.48
17
+ * @version 1.71.52
18
18
  * @namespace
19
19
  */
20
20
  var CurrencyRenderer = {
@@ -20,7 +20,7 @@ sap.ui.define(['sap/ui/core/Element', './library', 'sap/ui/unified/calendar/Cale
20
20
  * @class
21
21
  * Date range for use in DatePicker
22
22
  * @extends sap.ui.core.Element
23
- * @version 1.71.48
23
+ * @version 1.71.52
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -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.71.48
28
+ * @version 1.71.52
29
29
  *
30
30
  * @constructor
31
31
  * @public
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @implements sap.ui.core.IFormContent, sap.ui.unified.IProcessableBlobs
60
60
  *
61
61
  * @author SAP SE
62
- * @version 1.71.48
62
+ * @version 1.71.52
63
63
  *
64
64
  * @constructor
65
65
  * @public
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.71.48
25
+ * @version 1.71.52
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -20,7 +20,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
20
20
  * @extends sap.ui.core.Element
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.71.48
23
+ * @version 1.71.52
24
24
  *
25
25
  * @constructor
26
26
  * @since 1.52
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @implements sap.ui.core.IContextMenu
60
60
  *
61
61
  * @author SAP SE
62
- * @version 1.71.48
62
+ * @version 1.71.52
63
63
  * @since 1.21.0
64
64
  *
65
65
  * @constructor
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/IconPool', './MenuItemBase', './library'],
23
23
  * @extends sap.ui.unified.MenuItemBase
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.71.48
26
+ * @version 1.71.52
27
27
  * @since 1.21.0
28
28
  *
29
29
  * @constructor
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.71.48
26
+ * @version 1.71.52
27
27
  * @since 1.21.0
28
28
  *
29
29
  * @constructor
@@ -15,7 +15,7 @@ sap.ui.define([],
15
15
  * Menu renderer.
16
16
  * @author SAP - TD Core UI&AM UI Infra
17
17
  *
18
- * @version 1.71.48
18
+ * @version 1.71.52
19
19
  * @namespace
20
20
  */
21
21
  var MenuRenderer = {
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends sap.ui.unified.MenuItemBase
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.71.48
48
+ * @version 1.71.52
49
49
  * @since 1.21.0
50
50
  *
51
51
  * @constructor
@@ -25,7 +25,7 @@ sap.ui.define(['./ShellHeader', './ShellLayout', './library', './ShellRenderer']
25
25
  * @extends sap.ui.unified.ShellLayout
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.71.48
28
+ * @version 1.71.52
29
29
  *
30
30
  * @constructor
31
31
  * @public
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.core.Element
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.71.48
31
+ * @version 1.71.52
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Element
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.71.48
30
+ * @version 1.71.52
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @extends sap.ui.core.Control
49
49
  *
50
50
  * @author SAP SE
51
- * @version 1.71.48
51
+ * @version 1.71.52
52
52
  *
53
53
  * @constructor
54
54
  * @public
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @extends sap.ui.core.Control
41
41
  *
42
42
  * @author SAP SE
43
- * @version 1.71.48
43
+ * @version 1.71.52
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.core.Control
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.71.48
36
+ * @version 1.71.52
37
37
  *
38
38
  * @constructor
39
39
  * @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.71.48
35
+ * @version 1.71.52
36
36
  *
37
37
  * @constructor
38
38
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * <b>Note:</b> This is used inside the calendar. Not for standalone usage
29
29
  * @extends sap.ui.core.Control
30
- * @version 1.71.48
30
+ * @version 1.71.52
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -20,7 +20,10 @@ sap.ui.define([
20
20
  "./MonthRenderer",
21
21
  "sap/ui/dom/containsOrEquals",
22
22
  "sap/ui/events/KeyCodes",
23
- "sap/ui/thirdparty/jquery"
23
+ "sap/ui/thirdparty/jquery",
24
+ "sap/ui/core/date/CalendarWeekNumbering",
25
+ "sap/ui/core/date/CalendarUtils",
26
+ "sap/base/Log"
24
27
  ], function(
25
28
  Control,
26
29
  Device,
@@ -36,7 +39,10 @@ sap.ui.define([
36
39
  MonthRenderer,
37
40
  containsOrEquals,
38
41
  KeyCodes,
39
- jQuery
42
+ jQuery,
43
+ CalendarWeekNumbering,
44
+ CalendarDateUtils,
45
+ Log
40
46
  ) {
41
47
  "use strict";
42
48
 
@@ -63,7 +69,7 @@ sap.ui.define([
63
69
  * If used inside the calendar the properties and aggregation are directly taken from the parent
64
70
  * (To not duplicate and sync DateRanges and so on...)
65
71
  * @extends sap.ui.core.Control
66
- * @version 1.71.48
72
+ * @version 1.71.52
67
73
  *
68
74
  * @constructor
69
75
  * @public
@@ -97,8 +103,9 @@ sap.ui.define([
97
103
  showHeader : {type : "boolean", group : "Appearance", defaultValue : false},
98
104
 
99
105
  /**
100
- * If set, the first day of the displayed week is this day. Valid values are 0 to 6.
101
- * If not a valid value is set, the default of the used locale is used.
106
+ * If the property is set, this day marks the start of the displayed week. Valid values are 0 to 6.
107
+ * If no valid property is set, the current locale's default is applied.
108
+ * Note: This property should not be used with the calendarWeekNumbering property.
102
109
  * @since 1.28.9
103
110
  */
104
111
  firstDayOfWeek : {type : "int", group : "Appearance", defaultValue : -1},
@@ -138,7 +145,17 @@ sap.ui.define([
138
145
  * regardless of what is set to this property.
139
146
  * @since 1.48
140
147
  */
141
- showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : true}
148
+ showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : true},
149
+
150
+ /**
151
+ * If set, the calendar week numbering is used for display.
152
+ * If not set, the calendar week numbering of the global configuration is used.
153
+ * Note: This property should not be used with firstDayOfWeek property.
154
+ * Note: This API has been introduced with version 1.108 and downported to this release with
155
+ * patch level 52.
156
+ * @since 1.71.52
157
+ */
158
+ calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
142
159
 
143
160
  },
144
161
  aggregations : {
@@ -280,6 +297,12 @@ sap.ui.define([
280
297
  return this._oItemNavigation.getItemDomRefs()[this._oItemNavigation.getFocusedIndex()];
281
298
  };
282
299
 
300
+ Month.prototype.onBeforeRendering = function() {
301
+ if (this.getFirstDayOfWeek() !== -1 && this.getCalendarWeekNumbering() !== "Default") {
302
+ Log.warning("Both properties firstDayOfWeek and calendarWeekNumbering should not be used at the same time!");
303
+ }
304
+ };
305
+
283
306
  Month.prototype.onAfterRendering = function(){
284
307
 
285
308
  _initItemNavigation.call(this);
@@ -729,8 +752,14 @@ sap.ui.define([
729
752
  }
730
753
 
731
754
  if (iFirstDayOfWeek < 0 || iFirstDayOfWeek > 6) {
732
- var oLocaleData = this._getLocaleData();
733
- iFirstDayOfWeek = oLocaleData.getFirstDayOfWeek();
755
+ var oWeekConfigurationValues = CalendarDateUtils.getWeekConfigurationValues(this.getCalendarWeekNumbering(), new Locale(this._getLocale()));
756
+
757
+ if (oWeekConfigurationValues) {
758
+ iFirstDayOfWeek = oWeekConfigurationValues.firstDayOfWeek;
759
+ } else {
760
+ var oLocaleData = this._getLocaleData();
761
+ iFirstDayOfWeek = oLocaleData.getFirstDayOfWeek();
762
+ }
734
763
  }
735
764
 
736
765
  return iFirstDayOfWeek;
@@ -1601,6 +1630,37 @@ sap.ui.define([
1601
1630
  return this;
1602
1631
  };
1603
1632
 
1633
+ /**
1634
+
1635
+ * Calculates week number.
1636
+ *
1637
+ * @param {sap.ui.unified.calendar.CalendarDate} oDate Start date of the week
1638
+ * @returns {int} Week number
1639
+ * @private
1640
+ */
1641
+ Month.prototype._calculateWeekNumber = function (oDate) {
1642
+ var oLocale = new Locale(this._getLocale());
1643
+ var oEndDate = this._getLastWeekDate(oDate);
1644
+ var oWeekConfigurationValues = CalendarDateUtils.getWeekConfigurationValues(this.getCalendarWeekNumbering(), oLocale);
1645
+ var oDateFormat;
1646
+ var iWeekNumber;
1647
+
1648
+ oDateFormat = DateFormat.getInstance({pattern: "w", calendarType: this.getPrimaryCalendarType(), calendarWeekNumbering: this.getCalendarWeekNumbering()}, oLocale);
1649
+
1650
+ var bIsRegionUS = oWeekConfigurationValues.firstDayOfWeek === 0;
1651
+
1652
+ // Because the date we use to calculate the week number may be in one year and in the same time
1653
+ // includes days in a new month into a new year, we explicitly changed the week number
1654
+ // US calendar weeks overlap, Jan 1st is always week 1, while Dec 31st is always last week.
1655
+ if (oEndDate.getMonth() === 0 && this._oDate.getMonth() === 0 && bIsRegionUS) {
1656
+ iWeekNumber = oDateFormat.format(oEndDate.toUTCJSDate(), true);
1657
+ } else {
1658
+ iWeekNumber = oDateFormat.format(oDate.toUTCJSDate(), true);
1659
+ }
1660
+
1661
+ return iWeekNumber;
1662
+ };
1663
+
1604
1664
  /**
1605
1665
  * Determines if week selection is allowed.
1606
1666
  * @returns {boolean} Week selection is allowed
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * renders a MonthPicker with ItemNavigation
37
37
  * This is used inside the calendar. Not for stand alone usage
38
38
  * @extends sap.ui.core.Control
39
- * @version 1.71.48
39
+ * @version 1.71.52
40
40
  *
41
41
  * @constructor
42
42
  * @public
@@ -4,8 +4,8 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define([],
8
- function() {
7
+ sap.ui.define(['sap/ui/core/InvisibleText'],
8
+ function(InvisibleText) {
9
9
  "use strict";
10
10
 
11
11
 
@@ -55,7 +55,10 @@ sap.ui.define([],
55
55
  oRm.writeAccessibilityState(oMP, {
56
56
  role: "grid",
57
57
  readonly: "true",
58
- multiselectable: "false"
58
+ multiselectable: "false",
59
+ describedby: oMP._bCalendar
60
+ ? InvisibleText.getStaticId("sap.ui.unified", "CALENDAR_YEAR_PICKER_OPEN_HINT")
61
+ : ""
59
62
  });
60
63
 
61
64
  oRm.write(">"); // div element
@@ -65,7 +65,12 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarUtils', 'sap/ui/unified/calendar
65
65
  oRm.writeAccessibilityState(oMonth, {
66
66
  role: "grid",
67
67
  multiselectable: !oMonth.getSingleSelection() || oMonth.getIntervalSelection(),
68
- labelledby: oAriaLabel
68
+ labelledby: oAriaLabel,
69
+ describedby: oMonth._bCalendar
70
+ ? InvisibleText.getStaticId("sap.ui.unified", "CALENDAR_MONTH_PICKER_OPEN_HINT")
71
+ + " "
72
+ + InvisibleText.getStaticId("sap.ui.unified", "CALENDAR_YEAR_PICKER_OPEN_HINT")
73
+ : ""
69
74
  });
70
75
 
71
76
  oRm.write(">"); // div element
@@ -217,7 +222,11 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarUtils', 'sap/ui/unified/calendar
217
222
  if (sWidth) {
218
223
  oRm.addStyle("width", sWidth);
219
224
  }
220
- oRm.writeAccessibilityState(null, {role: "columnheader", label: aWeekDaysWide[(i + iStartDay) % 7]});
225
+ oRm.writeAccessibilityState(null, {
226
+ role: "columnheader",
227
+ label: aWeekDaysWide[(i + iStartDay) % 7],
228
+ hidden: true
229
+ });
221
230
  oRm.writeClasses();
222
231
  oRm.writeStyles();
223
232
  oRm.write(">"); // div element
@@ -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.71.48
64
+ * @version 1.71.52
65
65
  *
66
66
  * @constructor
67
67
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * Other usages are not supported.
35
35
  *
36
36
  * @extends sap.ui.unified.calendar.DatesRow
37
- * @version 1.71.48
37
+ * @version 1.71.52
38
38
  *
39
39
  * @constructor
40
40
  * @private
@@ -62,7 +62,7 @@ sap.ui.define([
62
62
  *
63
63
  * The TimesRow works with JavaScript Date objects.
64
64
  * @extends sap.ui.core.Control
65
- * @version 1.71.48
65
+ * @version 1.71.52
66
66
  *
67
67
  * @constructor
68
68
  * @public
@@ -54,7 +54,7 @@ sap.ui.define([
54
54
  * As in all date-time controls, all pubic JS Date objects that are given (e.g. <code>setDate()</code>) or read
55
55
  * (e.g. <code>getFirstRenderedDate</code>) with values which are considered as date objects in browser(local) timezone.
56
56
  * @extends sap.ui.core.Control
57
- * @version 1.71.48
57
+ * @version 1.71.52
58
58
  *
59
59
  * @constructor
60
60
  * @public
@@ -4,8 +4,8 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define(['sap/ui/unified/calendar/CalendarDate', 'sap/ui/core/date/UniversalDate'],
8
- function(CalendarDate, UniversalDate) {
7
+ sap.ui.define(['sap/ui/unified/calendar/CalendarDate', 'sap/ui/core/date/UniversalDate', 'sap/ui/core/InvisibleText'],
8
+ function(CalendarDate, UniversalDate, InvisibleText) {
9
9
  "use strict";
10
10
 
11
11
  /*
@@ -48,7 +48,10 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarDate', 'sap/ui/core/date/Univers
48
48
  oRm.writeAccessibilityState(oYP, {
49
49
  role: "grid",
50
50
  readonly: "true",
51
- multiselectable: "false"
51
+ multiselectable: "false",
52
+ describedby: oYP._bCalendar
53
+ ? InvisibleText.getStaticId("sap.ui.unified", "CALENDAR_YEAR_RANGE_PICKER_OPEN_HINT")
54
+ : ""
52
55
  });
53
56
 
54
57
  oRm.write(">"); // div element
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @extends sap.ui.unified.calendar.YearPicker
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.71.48
52
+ * @version 1.71.52
53
53
  *
54
54
  * @constructor
55
55
  * @private
@@ -14,7 +14,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/base/Object', "./ColorPickerDisplayMo
14
14
  // delegate further initialization of this library to the Core
15
15
  sap.ui.getCore().initLibrary({
16
16
  name : "sap.ui.unified",
17
- version: "1.71.48",
17
+ version: "1.71.52",
18
18
  dependencies : ["sap.ui.core"],
19
19
  designtime: "sap/ui/unified/designtime/library.designtime",
20
20
  types: [
@@ -83,7 +83,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/base/Object', "./ColorPickerDisplayMo
83
83
  * @namespace
84
84
  * @alias sap.ui.unified
85
85
  * @author SAP SE
86
- * @version 1.71.48
86
+ * @version 1.71.52
87
87
  * @public
88
88
  */
89
89
  var thisLib = sap.ui.unified;
@@ -58,6 +58,9 @@ CALENDAR_MONTH_PICKER_OPEN_HINT = Press F4 to select a month
58
58
  #XACT
59
59
  CALENDAR_YEAR_PICKER_OPEN_HINT = Press Shift + F4 to select an year
60
60
 
61
+ #XACT
62
+ CALENDAR_YEAR_RANGE_PICKER_OPEN_HINT= Press Shift + F4 to select an year range
63
+
61
64
  #XACT: Aria information for appointment
62
65
  APPOINTMENT=Appointment
63
66
 
@@ -32,7 +32,7 @@ CALENDAR_END_MONTH=\u041A\u0440\u0430\u0435\u043D \u043C\u0435\u0441\u0435\u0446
32
32
  CALENDAR_CURRENT_MONTH=\u0422\u0435\u043A\u0443\u0449 \u043C\u0435\u0441\u0435\u0446
33
33
 
34
34
  #XACT: Aria information for start time
35
- CALENDAR_START_TIME=\u0412\u0440\u0435\u043C\u0435 \u043D\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430\u043D\u0435
35
+ CALENDAR_START_TIME=\u041D\u0430\u0447\u0430\u043B\u0435\u043D \u0447\u0430\u0441
36
36
 
37
37
  #XACT: Aria information for end time
38
38
  CALENDAR_END_TIME=\u041A\u0440\u0430\u0435\u043D \u0447\u0430\u0441
@@ -44,10 +44,10 @@ CALENDAR_CURRENT_TIME=\u0421\u0435\u0433\u0430
44
44
  CALENDAR_CANCEL=\u041E\u0442\u043A\u0430\u0437
45
45
 
46
46
  #XACT
47
- CALENDAR_BTN_PREV=\u041F\u0440\u0435\u0434\u0445\u043E\u0434\u0435\u043D
47
+ CALENDAR_BTN_PREV=\u041D\u0430\u0437\u0430\u0434
48
48
 
49
49
  #XACT
50
- CALENDAR_BTN_NEXT=\u0421\u043B\u0435\u0434\u0432\u0430\u0449
50
+ CALENDAR_BTN_NEXT=\u041D\u0430\u043F\u0440\u0435\u0434
51
51
 
52
52
  #XFLD: Text for a week in week numbers row
53
53
  CALENDAR_DATES_ROW_WEEK_NUMBER=\u0421\u0435\u0434\u043C\u0438\u0446\u0430 {0}
@@ -59,10 +59,10 @@ CALENDAR_MONTH_PICKER_OPEN_HINT=\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442
59
59
  CALENDAR_YEAR_PICKER_OPEN_HINT=\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Shift + F4, \u0437\u0430 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u043E\u0434\u0438\u043D\u0430
60
60
 
61
61
  #XACT: Aria information for appointment
62
- APPOINTMENT=\u0421\u0440\u0435\u0449\u0430
62
+ APPOINTMENT=\u041D\u0430\u0441\u0440\u043E\u0447\u0435\u043D \u0447\u0430\u0441
63
63
 
64
64
  #XACT: Aria information for tentative appointment
65
- APPOINTMENT_TENTATIVE=\u0421 \u0440\u0435\u0437\u0435\u0440\u0432\u0438
65
+ APPOINTMENT_TENTATIVE=\u041D\u0435\u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u043D\u043E
66
66
 
67
67
  #XBUT: File Uploader - browse button text
68
68
  FILEUPLOAD_BROWSE=\u041F\u0440\u0435\u0433\u043B\u0435\u0434...
@@ -86,7 +86,7 @@ LEGEND_NON_WORKING_DAY=\u041D\u0435\u0440\u0430\u0431\u043E\u0442\u0435\u043D \u
86
86
  LEGEND_UNNAMED_TYPE=\u0412\u0438\u0434 {0}
87
87
 
88
88
  #XACT: Aria information for selected appointment
89
- APPOINTMENT_SELECTED=\u0418\u0437\u0431\u0440\u0430\u043D
89
+ APPOINTMENT_SELECTED=\u0418\u0437\u0431\u0440\u0430\u043D\u043E
90
90
 
91
91
  #XTOL: Red color for the ColorPicker control
92
92
  COLORPICKER_RED=\u0427\u0435\u0440\u0432\u0435\u043D
@@ -59,13 +59,13 @@ CALENDAR_MONTH_PICKER_OPEN_HINT=Pulse F4 para seleccionar un mes
59
59
  CALENDAR_YEAR_PICKER_OPEN_HINT=Pulse May\u00FAs + F4 para seleccionar un a\u00F1o
60
60
 
61
61
  #XACT: Aria information for appointment
62
- APPOINTMENT=Fecha
62
+ APPOINTMENT=Cita
63
63
 
64
64
  #XACT: Aria information for tentative appointment
65
65
  APPOINTMENT_TENTATIVE=Con reservas
66
66
 
67
67
  #XBUT: File Uploader - browse button text
68
- FILEUPLOAD_BROWSE=Navegar...
68
+ FILEUPLOAD_BROWSE=Explorar...
69
69
 
70
70
  #XACT: File Uploader - ARIA text
71
71
  FILEUPLOAD_ACC=Activar para seleccionar un archivo
@@ -116,7 +116,7 @@ COLORPICKER_ALPHA=Alfa
116
116
  COLORPICKER_LIGHTNESS=Luminosidad
117
117
 
118
118
  #XTOL: Describing two boxes one containing the old color and one containing the target color that will replace the one in the old color box
119
- COLORPICKER_NEW_OLD_COLOR=El color original se sustituye con el color nuevo en la direcci\u00F3n de la flecha
119
+ COLORPICKER_NEW_OLD_COLOR=El color original se sustituye por el color nuevo en la direcci\u00F3n de la flecha
120
120
 
121
121
  #XACT: Aria information for the ColorPicker Alpha slider
122
122
  COLORPICKER_ALPHA_SLIDER=Control alfa
@@ -44,10 +44,10 @@ CALENDAR_CURRENT_TIME=Sada
44
44
  CALENDAR_CANCEL=Otka\u017Ei
45
45
 
46
46
  #XACT
47
- CALENDAR_BTN_PREV=Prethodni
47
+ CALENDAR_BTN_PREV=Prethodno
48
48
 
49
49
  #XACT
50
- CALENDAR_BTN_NEXT=Sljede\u0107i
50
+ CALENDAR_BTN_NEXT=Sljede\u0107e
51
51
 
52
52
  #XFLD: Text for a week in week numbers row
53
53
  CALENDAR_DATES_ROW_WEEK_NUMBER=Tjedan {0}