@openui5/sap.ui.unified 1.144.0 → 1.145.1

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 (117) hide show
  1. package/REUSE.toml +40 -16
  2. package/THIRDPARTY.txt +22 -1
  3. package/package.json +2 -2
  4. package/src/sap/ui/unified/.library +1 -1
  5. package/src/sap/ui/unified/Calendar.js +67 -18
  6. package/src/sap/ui/unified/CalendarAppointment.js +1 -1
  7. package/src/sap/ui/unified/CalendarDateInterval.js +68 -13
  8. package/src/sap/ui/unified/CalendarDateIntervalRenderer.js +13 -0
  9. package/src/sap/ui/unified/CalendarLegend.js +1 -1
  10. package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
  11. package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
  12. package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
  13. package/src/sap/ui/unified/CalendarRow.js +6 -1
  14. package/src/sap/ui/unified/CalendarRowRenderer.js +2 -1
  15. package/src/sap/ui/unified/CalendarTimeInterval.js +60 -6
  16. package/src/sap/ui/unified/CalendarTimeIntervalRenderer.js +1 -1
  17. package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
  18. package/src/sap/ui/unified/ColorPicker.js +1 -1
  19. package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
  20. package/src/sap/ui/unified/ContentSwitcher.js +1 -1
  21. package/src/sap/ui/unified/Currency.js +1 -1
  22. package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
  23. package/src/sap/ui/unified/DateRange.js +1 -1
  24. package/src/sap/ui/unified/DateTypeRange.js +1 -1
  25. package/src/sap/ui/unified/FileUploader.js +23 -29
  26. package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
  27. package/src/sap/ui/unified/FileUploaderRenderer.js +0 -9
  28. package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
  29. package/src/sap/ui/unified/Menu.js +1 -1
  30. package/src/sap/ui/unified/MenuItem.js +1 -1
  31. package/src/sap/ui/unified/MenuItemBase.js +1 -1
  32. package/src/sap/ui/unified/MenuItemGroup.js +1 -1
  33. package/src/sap/ui/unified/MenuRenderer.js +1 -1
  34. package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
  35. package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
  36. package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +1 -1
  37. package/src/sap/ui/unified/Shell.js +1 -1
  38. package/src/sap/ui/unified/ShellHeadItem.js +1 -1
  39. package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
  40. package/src/sap/ui/unified/ShellLayout.js +1 -1
  41. package/src/sap/ui/unified/ShellOverlay.js +1 -1
  42. package/src/sap/ui/unified/SplitContainer.js +1 -1
  43. package/src/sap/ui/unified/TimeRange.js +1 -1
  44. package/src/sap/ui/unified/calendar/CalendarUtils.js +17 -0
  45. package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
  46. package/src/sap/ui/unified/calendar/DatesRowRenderer.js +0 -38
  47. package/src/sap/ui/unified/calendar/Header.js +1 -1
  48. package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
  49. package/src/sap/ui/unified/calendar/Month.js +1 -1
  50. package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
  51. package/src/sap/ui/unified/calendar/MonthRenderer.js +11 -2
  52. package/src/sap/ui/unified/calendar/MonthsRow.js +9 -2
  53. package/src/sap/ui/unified/calendar/MonthsRowRenderer.js +4 -1
  54. package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
  55. package/src/sap/ui/unified/calendar/RecurrenceUtils.js +4 -1
  56. package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
  57. package/src/sap/ui/unified/calendar/WeeksRow.js +219 -0
  58. package/src/sap/ui/unified/calendar/WeeksRowRenderer.js +114 -0
  59. package/src/sap/ui/unified/calendar/YearPicker.js +1 -1
  60. package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
  61. package/src/sap/ui/unified/library.js +2 -2
  62. package/src/sap/ui/unified/messagebundle.properties +3 -0
  63. package/src/sap/ui/unified/messagebundle_ar.properties +46 -6
  64. package/src/sap/ui/unified/messagebundle_bg.properties +46 -6
  65. package/src/sap/ui/unified/messagebundle_ca.properties +47 -5
  66. package/src/sap/ui/unified/messagebundle_cnr.properties +46 -6
  67. package/src/sap/ui/unified/messagebundle_cs.properties +47 -5
  68. package/src/sap/ui/unified/messagebundle_cy.properties +46 -6
  69. package/src/sap/ui/unified/messagebundle_da.properties +48 -6
  70. package/src/sap/ui/unified/messagebundle_de.properties +49 -9
  71. package/src/sap/ui/unified/messagebundle_el.properties +46 -6
  72. package/src/sap/ui/unified/messagebundle_en.properties +46 -6
  73. package/src/sap/ui/unified/messagebundle_en_GB.properties +46 -6
  74. package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +48 -6
  75. package/src/sap/ui/unified/messagebundle_es.properties +46 -6
  76. package/src/sap/ui/unified/messagebundle_es_MX.properties +54 -13
  77. package/src/sap/ui/unified/messagebundle_et.properties +46 -6
  78. package/src/sap/ui/unified/messagebundle_fi.properties +47 -5
  79. package/src/sap/ui/unified/messagebundle_fr.properties +46 -6
  80. package/src/sap/ui/unified/messagebundle_fr_CA.properties +46 -6
  81. package/src/sap/ui/unified/messagebundle_hi.properties +46 -6
  82. package/src/sap/ui/unified/messagebundle_hr.properties +47 -5
  83. package/src/sap/ui/unified/messagebundle_hu.properties +46 -6
  84. package/src/sap/ui/unified/messagebundle_id.properties +46 -6
  85. package/src/sap/ui/unified/messagebundle_it.properties +46 -6
  86. package/src/sap/ui/unified/messagebundle_iw.properties +47 -5
  87. package/src/sap/ui/unified/messagebundle_ja.properties +46 -6
  88. package/src/sap/ui/unified/messagebundle_kk.properties +46 -6
  89. package/src/sap/ui/unified/messagebundle_ko.properties +46 -6
  90. package/src/sap/ui/unified/messagebundle_lt.properties +50 -10
  91. package/src/sap/ui/unified/messagebundle_lv.properties +46 -6
  92. package/src/sap/ui/unified/messagebundle_mk.properties +46 -6
  93. package/src/sap/ui/unified/messagebundle_ms.properties +46 -6
  94. package/src/sap/ui/unified/messagebundle_nl.properties +47 -5
  95. package/src/sap/ui/unified/messagebundle_no.properties +46 -6
  96. package/src/sap/ui/unified/messagebundle_pl.properties +46 -6
  97. package/src/sap/ui/unified/messagebundle_pt.properties +46 -6
  98. package/src/sap/ui/unified/messagebundle_pt_PT.properties +46 -6
  99. package/src/sap/ui/unified/messagebundle_ro.properties +46 -6
  100. package/src/sap/ui/unified/messagebundle_ru.properties +47 -5
  101. package/src/sap/ui/unified/messagebundle_sh.properties +46 -6
  102. package/src/sap/ui/unified/messagebundle_sk.properties +47 -5
  103. package/src/sap/ui/unified/messagebundle_sl.properties +46 -6
  104. package/src/sap/ui/unified/messagebundle_sr.properties +46 -6
  105. package/src/sap/ui/unified/messagebundle_sv.properties +47 -5
  106. package/src/sap/ui/unified/messagebundle_th.properties +46 -6
  107. package/src/sap/ui/unified/messagebundle_tr.properties +47 -5
  108. package/src/sap/ui/unified/messagebundle_uk.properties +46 -6
  109. package/src/sap/ui/unified/messagebundle_vi.properties +49 -7
  110. package/src/sap/ui/unified/messagebundle_zh_CN.properties +46 -6
  111. package/src/sap/ui/unified/messagebundle_zh_TW.properties +46 -6
  112. package/src/sap/ui/unified/themes/base/Calendar.less +148 -38
  113. package/src/sap/ui/unified/themes/base/CalendarDateInterval.less +13 -1
  114. package/src/sap/ui/unified/themes/base/CalendarTimeInterval.less +17 -0
  115. package/src/sap/ui/unified/themes/base/FileUploader.less +25 -1
  116. package/src/sap/ui/unified/themes/base/IndexPicker.less +13 -8
  117. package/src/sap/ui/unified/themes/sap_hcb/base_Calendar.less +2 -1
@@ -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.144.0
35
+ * @version 1.145.1
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  * If used inside the calendar the properties and aggregation are directly taken from the parent
79
79
  * (To not duplicate and sync DateRanges and so on...)
80
80
  * @extends sap.ui.core.Control
81
- * @version 1.144.0
81
+ * @version 1.145.1
82
82
  *
83
83
  * @constructor
84
84
  * @public
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * renders a MonthPicker with ItemNavigation
58
58
  * This is used inside the calendar. Not for stand alone usage
59
59
  * @extends sap.ui.core.Control
60
- * @version 1.144.0
60
+ * @version 1.145.1
61
61
  *
62
62
  * @constructor
63
63
  * @public
@@ -295,6 +295,7 @@ sap.ui.define([
295
295
  oRm.openEnd();
296
296
 
297
297
  if (bWeekNum) {
298
+ this.renderWeekNumbers = true;
298
299
  this._renderWeekNumber(oRm, aDays[i], oHelper, oMonth);
299
300
  }
300
301
  }
@@ -422,11 +423,13 @@ sap.ui.define([
422
423
  CalendarUtils._checkCalendarDate(oDay);
423
424
  var oSecondaryDay = new CalendarDate(oDay, oHelper.sSecondaryCalendarType),
424
425
  bSelectable = oMonth._getAriaRole() === "gridcell" && oMonth._getSelectableAccessibilitySemantics(),
426
+ sDayDescription = bSelectable ? oMonth._getDayDescription() : "",
427
+ sDayNameId = (!bDayName && iNumber >= 0) ? oHelper.sId + "-WH" + iNumber : "",
425
428
  mAccProps = {
426
429
  role: oMonth._getAriaRole(),
427
430
  selected: bSelectable ? false : null,
428
431
  label: "",
429
- describedby: bSelectable ? oMonth._getDayDescription() : null
432
+ describedby: `${sDayDescription} ${sDayNameId}`.trim() || ""
430
433
  },
431
434
  bBeforeFirstYear = oDay._bBeforeFirstYear,
432
435
  sAriaType = "",
@@ -505,12 +508,18 @@ sap.ui.define([
505
508
  }
506
509
 
507
510
  if (this.renderWeekNumbers && oMonth.getShowWeekNumbers() && oMonth._oDate) {
511
+ // This path is for controls that render week numbers inline (e.g., Month, OneMonthDatesRow)
508
512
  // TODO: We could replace the following lines with a sap.ui.unified.calendar.CalendarUtils.calculateWeekNumber usage
509
513
  // once the same method starts to respect the sap/base/i18n/date/CalendarWeekNumbering types.
510
514
  const oWeekConfig = CalendarDateUtils.getWeekConfigurationValues(oMonth.getCalendarWeekNumbering(), new Locale(oMonth._getLocale()));
511
515
  oWeekConfig.firstDayOfWeek = oMonth._getFirstDayOfWeek();
512
- const oFirstDateOfWeek = CalendarDate.fromUTCDate(CalendarUtils.getFirstDateOfWeek(oDay.toLocalJSDate(), oWeekConfig), oMonth.getPrimaryCalendarType());
516
+ const oFirstDateOfWeek = CalendarDate.fromLocalJSDate(CalendarUtils.getFirstDateOfWeek(oDay.toLocalJSDate(), oWeekConfig), oMonth.getPrimaryCalendarType());
513
517
  mAccProps["describedby"] = mAccProps["describedby"] + " " + oMonth.getId() + "-week-" + oMonth._calculateWeekNumber(oFirstDateOfWeek) + "-text";
518
+ } else if (oMonth.getShowWeekNumbers() && oMonth._oDate) {
519
+ // This path is for controls that render week numbers separately (e.g., CalendarDateInterval with WeeksRow)
520
+ const sParentId = oMonth.getParent() ? oMonth.getParent().getId() : oMonth.getId();
521
+ const iWeekNumber = oMonth._calculateWeekNumber(oDay);
522
+ mAccProps["describedby"] = mAccProps["describedby"] + " " + sParentId + "-WeeksRow" + "-week-" + iWeekNumber + "-text";
514
523
  }
515
524
 
516
525
  if (bNonWorking) {
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * The MontsRow works with UI5Date or JavaScript Date objects, but only the month and the year are used to display and interact.
69
69
  * As representation for a month, the 1st of the month will always be returned in the API.
70
70
  * @extends sap.ui.core.Control
71
- * @version 1.144.0
71
+ * @version 1.145.1
72
72
  *
73
73
  * @constructor
74
74
  * @public
@@ -138,7 +138,14 @@ sap.ui.define([
138
138
  * @private
139
139
  * @since 1.139.0
140
140
  */
141
- selectableAccessibilitySemantics : {type : "boolean", group : "Behavior", defaultValue : true, visibility: "hidden"}
141
+ selectableAccessibilitySemantics : {type : "boolean", group : "Behavior", defaultValue : true, visibility: "hidden"},
142
+
143
+ /**
144
+ * Determines if the week numbers are displayed.
145
+ *
146
+ * @since 1.145.0
147
+ */
148
+ showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : false}
142
149
  },
143
150
  aggregations : {
144
151
 
@@ -37,6 +37,10 @@ sap.ui.define(["sap/ui/core/Element", 'sap/ui/unified/calendar/CalendarUtils', '
37
37
  oRm.class("sapUiCalMonthsRow");
38
38
  oRm.class("sapUiCalRow");
39
39
 
40
+ if (oMonthsRow.getShowWeekNumbers()) {
41
+ oRm.class("sapUiCalRowWithWeekNumbers");
42
+ }
43
+
40
44
  if (sTooltip) {
41
45
  oRm.attr("title", sTooltip);
42
46
  }
@@ -167,7 +171,6 @@ sap.ui.define(["sap/ui/core/Element", 'sap/ui/unified/calendar/CalendarUtils', '
167
171
  this.renderMonth(oRm, oMonthsRow, oMonthDate, oHelper, sWidth);
168
172
  oMonthDate.setMonth(oMonthDate.getMonth() + 1);
169
173
  }
170
-
171
174
  };
172
175
 
173
176
  /**
@@ -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.144.0
37
+ * @version 1.145.1
38
38
  *
39
39
  * @constructor
40
40
  * @private
@@ -44,12 +44,15 @@ sap.ui.define([
44
44
 
45
45
  const oStartDate = UI5Date.getInstance(this.getStartDate());
46
46
  const oCurrentDate = UI5Date.getInstance(oDate);
47
+ const oStartDateUTC = Date.UTC(oStartDate.getFullYear(), oStartDate.getMonth(), oStartDate.getDate());
48
+ const oCurrentDateUTC = Date.UTC(oCurrentDate.getFullYear(), oCurrentDate.getMonth(), oCurrentDate.getDate());
47
49
  oStartDate.setHours(0,0,0,0);
48
50
  oCurrentDate.setHours(0,0,0,0);
49
51
 
50
52
  const iDayInMilliseconds = 24 * 60 * 60 * 1000;
51
53
  const isDateInRange = oCurrentDate >= oStartDate && oCurrentDate <= this.getRecurrenceEndDate();
52
- const isWithCorrectPattern = Math.floor((oCurrentDate.getTime() - oStartDate.getTime()) / iDayInMilliseconds) % this.getRecurrencePattern() === 0;
54
+
55
+ const isWithCorrectPattern = Math.floor((oCurrentDateUTC - oStartDateUTC) / iDayInMilliseconds) % this.getRecurrencePattern() === 0;
53
56
 
54
57
  return isDateInRange && isWithCorrectPattern;
55
58
  };
@@ -69,7 +69,7 @@ sap.ui.define([
69
69
  *
70
70
  * The TimesRow works with UI5Date or JavaScript Date objects.
71
71
  * @extends sap.ui.core.Control
72
- * @version 1.144.0
72
+ * @version 1.145.1
73
73
  *
74
74
  * @constructor
75
75
  * @public
@@ -0,0 +1,219 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/base/i18n/date/CalendarType",
9
+ "sap/ui/unified/library",
10
+ "sap/ui/core/Control",
11
+ "./WeeksRowRenderer",
12
+ "sap/ui/core/date/UI5Date",
13
+ "sap/ui/unified/calendar/CalendarUtils",
14
+ "sap/ui/unified/calendar/CalendarDate",
15
+ "sap/ui/core/Locale",
16
+ "sap/base/i18n/Formatting"
17
+ ], function (
18
+ CalendarType,
19
+ unifiedLibrary,
20
+ Control,
21
+ WeeksRowRenderer,
22
+ UI5Date,
23
+ CalendarUtils,
24
+ CalendarDate,
25
+ Locale,
26
+ Formatting
27
+ ) {
28
+ "use strict";
29
+ const CalendarIntervalType = unifiedLibrary.CalendarIntervalType;
30
+
31
+ /**
32
+ * Constructor for a new sap.ui.unified.calendar.WeeksRow.
33
+ *
34
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is provided.
35
+ * @param {object} [mSettings] Initial settings for the new control.
36
+ *
37
+ * @class
38
+ * Renders a row of weeks, each consisting of days, for use in calendar-based controls such as the PlanningCalendar.
39
+ * The WeeksRow control is not intended for standalone usage, but as an internal part of higher-level calendar components.
40
+ *
41
+ * The WeeksRow works with UI5Date or JavaScript Date objects for its API, but internally uses CalendarDate objects for calculations.
42
+ *
43
+ * @extends sap.ui.core.Control
44
+ * @version 1.145.1
45
+ *
46
+ * @constructor
47
+ * @private
48
+ * @since 1.145.0
49
+ * @alias sap.ui.unified.calendar.WeeksRow
50
+ */
51
+ const WeeksRow = Control.extend("sap.ui.unified.calendar.WeeksRow", /** @lends sap.ui.unified.calendar.WeeksRow.prototype */ {
52
+ metadata : {
53
+ library : "sap.ui.unified",
54
+ properties : {
55
+
56
+ /**
57
+ * Determines the start date of the row, as a UI5Date or JavaScript Date object. The current date is used as default.
58
+ */
59
+ startDate : { type : "object", group : "Data" },
60
+
61
+ /**
62
+ * If set, the calendar type is used for display.
63
+ * If not set, the calendar type of the global configuration is used.
64
+ */
65
+ primaryCalendarType : { type : "sap.base.i18n.date.CalendarType", group : "Appearance", defaultValue : CalendarType.Gregorian },
66
+
67
+ /**
68
+ * number weeks displayed
69
+ */
70
+ interval : { type : "int", group : "Appearance" },
71
+
72
+ /**
73
+ * Defines the key of the <code>PlanningCalendarView</code> used for the output.
74
+ *
75
+ * <b>Note:</b> The default value is set <code>Hour</code>. If you are using your own views, the keys of these
76
+ * views should be used instead.
77
+ */
78
+ viewKey : {type : "string", group : "Appearance", defaultValue : CalendarIntervalType.Hour},
79
+
80
+ /**
81
+ * Determines if the week numbers are displayed.
82
+ */
83
+ showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : false},
84
+
85
+ /**
86
+ * If set, the calendar week numbering is used for display.
87
+ * If not set, the calendar week numbering of the global configuration is used.
88
+ */
89
+ calendarWeekNumbering : { type : "sap.base.i18n.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
90
+ }
91
+ },
92
+ renderer: WeeksRowRenderer
93
+ });
94
+
95
+ /**
96
+ * Sets the ARIA role for the row container.
97
+ * @param {string} sRole The ARIA role to be assigned.
98
+ * @returns {sap.ui.unified.calendar.WeeksRow} The current instance for method chaining.
99
+ * @private
100
+ */
101
+ WeeksRow.prototype._setAriaRole = function(sRole){
102
+ this._ariaRole = sRole;
103
+
104
+ return this;
105
+ };
106
+
107
+ /**
108
+ * Retrieves the locale used by this control.
109
+ * If the parent control specifies a locale it will be used; otherwise the
110
+ * control falls back to the runtime language tag.
111
+ *
112
+ * @returns {string} The locale identifier.
113
+ * @private
114
+ */
115
+ WeeksRow.prototype._getLocale = function(){
116
+ const oParent = this.getParent();
117
+
118
+ if (oParent && oParent.getLocale) {
119
+ return oParent.getLocale();
120
+ } else if (!this._sLocale) {
121
+ this._sLocale = new Locale(Formatting.getLanguageTag()).toString();
122
+ }
123
+
124
+ return this._sLocale;
125
+
126
+ };
127
+
128
+ /**
129
+ * Returns the weekday index of the start date (0 = Sunday, 6 = Saturday).
130
+ * @returns {int} The index of the weekday corresponding to the start date.
131
+ * @private
132
+ */
133
+ WeeksRow.prototype._getFirstWeekDay = function(){
134
+ return this.getStartDate().getDay();
135
+ };
136
+
137
+ /**
138
+ * Calculates and returns the week numbers for the currently displayed
139
+ * interval. The result is an array of objects, where each object contains
140
+ * a `number` (the week number) and `len` (how many days of that week are
141
+ * displayed in the interval).
142
+ *
143
+ * @returns {Array<{len: int, number: int}>} Week numbers and lengths.
144
+ * @private
145
+ */
146
+ WeeksRow.prototype._getWeekNumbers = function() {
147
+ const iDays = this.getInterval(),
148
+ sLocale = this._getLocale(),
149
+ oCalType = this.getPrimaryCalendarType(),
150
+ oStartDate = CalendarDate.fromLocalJSDate(this.getStartDate(), oCalType),
151
+ oDate = new CalendarDate(oStartDate, oCalType),
152
+ oEndDate = new CalendarDate(oStartDate, oCalType).setDate(oDate.getDate() + iDays),
153
+ aDisplayedDates = [],
154
+ sCalendarWeekNumbering = this.getCalendarWeekNumbering() || "Default";
155
+
156
+ while (oDate.isBefore(oEndDate)) {
157
+ aDisplayedDates.push(new CalendarDate(oDate, oCalType));
158
+ oDate.setDate(oDate.getDate() + 1);
159
+ }
160
+
161
+ const weekNumbers = aDisplayedDates.reduce(function (aWeekNumbers, oDay) {
162
+ const iWeekNumber = CalendarUtils.calculateWeekNumber(oDay, oCalType, sLocale, sCalendarWeekNumbering, this._getFirstWeekDay());
163
+
164
+ if (!aWeekNumbers.length || aWeekNumbers[aWeekNumbers.length - 1].number !== iWeekNumber) {
165
+ aWeekNumbers.push({
166
+ len: 0,
167
+ number: iWeekNumber
168
+ });
169
+ }
170
+
171
+ aWeekNumbers[aWeekNumbers.length - 1].len++;
172
+
173
+ return aWeekNumbers;
174
+ }.bind(this), []);
175
+
176
+ return weekNumbers;
177
+ };
178
+
179
+ /**
180
+ * Helper that returns the first and last week numbers for each month
181
+ * in the current interval. The returned object maps the month index
182
+ * (0..n-1) to an object with `first` and `last` week numbers.
183
+ *
184
+ * @returns {Object<number, {first: number, last: number}>} Mapping of month index to week numbers.
185
+ * @private
186
+ */
187
+ WeeksRow.prototype._getMonthsFirstAndLastWeekNumbers = function() {
188
+ const oStartDate = this.getStartDate();
189
+ const iInterval = this.getInterval();
190
+ const iCurrentYear = oStartDate.getFullYear();
191
+ let iCurrentDateMonth = oStartDate.getMonth();
192
+ const oWeeks = {};
193
+ const sPrimaryCalendarType = this.getPrimaryCalendarType();
194
+ const sCalendarWeekNumbering = this.getCalendarWeekNumbering() || "Default";
195
+
196
+ for (let i = 0; i < iInterval; i++) {
197
+ const oFirstDateOfMonth = UI5Date.getInstance(iCurrentYear, iCurrentDateMonth, 1);
198
+ const oLastDateOfMonth = CalendarUtils.getLastDateOfMonth(oFirstDateOfMonth);
199
+ const oFirstDateOfStartWeek = CalendarUtils.getFirstDateOfWeek(oFirstDateOfMonth);
200
+ const oFirstDateOfEndWeek = CalendarUtils.getFirstDateOfWeek(oLastDateOfMonth);
201
+
202
+ // Calculate week numbers for the first and last week of the month
203
+ const iFirstWeekNumber = iCurrentDateMonth === 0 ? 1 : CalendarUtils.calculateWeekNumber(new CalendarDate(CalendarDate.fromLocalJSDate(oFirstDateOfMonth), sPrimaryCalendarType), sPrimaryCalendarType, this._getLocale(), sCalendarWeekNumbering, oFirstDateOfStartWeek.getDay());
204
+ const iLastWeekNumber = CalendarUtils.calculateWeekNumber(new CalendarDate(CalendarDate.fromLocalJSDate(oLastDateOfMonth.oDate), sPrimaryCalendarType), sPrimaryCalendarType, this._getLocale(), sCalendarWeekNumbering, oFirstDateOfEndWeek.getDay());
205
+
206
+ oWeeks[i] = {
207
+ first: iFirstWeekNumber,
208
+ last: iLastWeekNumber
209
+ };
210
+
211
+ iCurrentDateMonth++;
212
+ }
213
+
214
+ return oWeeks;
215
+ };
216
+
217
+ return WeeksRow;
218
+
219
+ });
@@ -0,0 +1,114 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/unified/library",
9
+ "sap/ui/core/Lib",
10
+ "sap/base/i18n/date/CalendarType"
11
+ ],
12
+ function(
13
+ library,
14
+ coreLibrary,
15
+ CalendarType
16
+ ) {
17
+ "use strict";
18
+
19
+ const CalendarIntervalType = library.CalendarIntervalType;
20
+
21
+ /**
22
+ * WeeksRow renderer.
23
+ * @namespace
24
+ */
25
+ const WeeksRowRenderer = {
26
+ apiVersion: 2
27
+ };
28
+
29
+ WeeksRowRenderer.render = function (oRm, oWeeksRow) {
30
+ const bShowWeekNumbers = oWeeksRow.getShowWeekNumbers();
31
+ const sPrimaryCalendarType = oWeeksRow.getPrimaryCalendarType();
32
+ const sViewKey = oWeeksRow.getViewKey();
33
+ if (!bShowWeekNumbers || sPrimaryCalendarType !== CalendarType.Gregorian) {
34
+ return;
35
+ }
36
+
37
+ oRm.openStart("div", oWeeksRow);
38
+ oRm.class("sapUiCalWeeksRow");
39
+ oRm.class(`sapMPlanWeeksRow${sViewKey.split(" ").join("")}View`);
40
+ oRm.openEnd();
41
+ oRm.openStart("div");
42
+ oRm.class("sapMPlanWeeksLabelRow");
43
+ oRm.openEnd();
44
+ if (sViewKey === CalendarIntervalType.Month) {
45
+ const oResourceBundle = coreLibrary.getResourceBundleFor("sap.ui.unified");
46
+ oRm.openStart("div");
47
+ oRm.class("sapUiCalRowWeekLabel");
48
+ oRm.openEnd();
49
+ oRm.text(oResourceBundle.getText("CALENDAR_WEEK_NUMBERS"));
50
+ oRm.close("div");
51
+ }
52
+ oRm.close("div");
53
+ oRm.openStart("div");
54
+ oRm.class("sapMPlanWeeksDataRow");
55
+ oRm.openEnd();
56
+ if (sViewKey === CalendarIntervalType.Day || sViewKey === CalendarIntervalType.Week ||
57
+ sViewKey === CalendarIntervalType.OneMonth || sViewKey === CalendarIntervalType.OneWeek ||
58
+ sViewKey === "OneMonth") {
59
+ this.renderDaysWeeks(oRm, oWeeksRow);
60
+ } else if (sViewKey === CalendarIntervalType.Month) {
61
+ this.renderMonthsWeeks(oRm, oWeeksRow);
62
+ }
63
+ oRm.close("div");
64
+ oRm.close("div");
65
+ };
66
+
67
+ WeeksRowRenderer.renderMonthsWeeks = function(oRm, oWeeksRow) {
68
+ const iInterval = oWeeksRow.getInterval();
69
+ const aWeeks = oWeeksRow._getMonthsFirstAndLastWeekNumbers();
70
+ const sWidth = ( 100 / iInterval ) + "%";
71
+
72
+ oRm.openStart("div");
73
+ oRm.class("sapUiCalRowWeekNumbers");
74
+ oRm.openEnd();
75
+ for (var i = 0; i < iInterval; i++) {
76
+ const oWeekInfo = aWeeks[i];
77
+ oRm.openStart("div", i + "-week");
78
+ oRm.class("sapUiCalRowWeekNumber");
79
+ if (sWidth) {
80
+ oRm.style("width", sWidth);
81
+ }
82
+ oRm.openEnd();
83
+ oRm.text(`${oWeekInfo.first} - ${oWeekInfo.last}`);
84
+ oRm.close("div");
85
+ }
86
+
87
+ oRm.close("div");
88
+ };
89
+
90
+ WeeksRowRenderer.renderDaysWeeks = function(oRm, oWeeksRow) {
91
+ const iDays = oWeeksRow.getInterval();
92
+ const iDaysWidth = 100 / iDays;
93
+ const aWeekNumbers = oWeeksRow._getWeekNumbers();
94
+ const oResourceBundle = coreLibrary.getResourceBundleFor("sap.ui.unified");
95
+
96
+ oRm.openStart("div");
97
+ oRm.class("sapUiCalRowWeekNumbers");
98
+ oRm.openEnd();
99
+
100
+ aWeekNumbers.forEach(function(oWeek) {
101
+ oRm.openStart("div", oWeeksRow.getId() + "-week-" + oWeek.number + "-text");
102
+ oRm.class('sapUiCalRowWeekNumber');
103
+ oRm.style("width", oWeek.len * iDaysWidth + "%");
104
+ oRm.attr("data-sap-ui-week", oWeek.number);
105
+ oRm.openEnd();
106
+ oRm.text(oResourceBundle.getText('CALENDAR_DATES_ROW_WEEK_NUMBER', [oWeek.number]));
107
+ oRm.close("div");
108
+ });
109
+
110
+ oRm.close("div");
111
+ };
112
+
113
+ return WeeksRowRenderer;
114
+ });
@@ -61,7 +61,7 @@ sap.ui.define([
61
61
  * As in all date-time controls, all pubic JS Date objects that are given (e.g. <code>setDate()</code>) or read
62
62
  * (e.g. <code>getFirstRenderedDate</code>) with values which are considered as date objects in browser(local) timezone.
63
63
  * @extends sap.ui.core.Control
64
- * @version 1.144.0
64
+ * @version 1.145.1
65
65
  *
66
66
  * @constructor
67
67
  * @public
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends sap.ui.unified.calendar.YearPicker
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.144.0
48
+ * @version 1.145.1
49
49
  *
50
50
  * @constructor
51
51
  * @private
@@ -32,14 +32,14 @@ sap.ui.define([
32
32
  * @namespace
33
33
  * @alias sap.ui.unified
34
34
  * @author SAP SE
35
- * @version 1.144.0
35
+ * @version 1.145.1
36
36
  * @since 1.28
37
37
  * @public
38
38
  */
39
39
  var thisLib = Library.init({
40
40
  name : "sap.ui.unified",
41
41
  apiVersion: 2,
42
- version: "1.144.0",
42
+ version: "1.145.1",
43
43
  dependencies : ["sap.ui.core"],
44
44
  designtime: "sap/ui/unified/designtime/library.designtime",
45
45
  types: [
@@ -94,6 +94,9 @@ CALENDAR_BTN_TODAY=Today
94
94
  #XFLD: Text for a week in week numbers row
95
95
  CALENDAR_DATES_ROW_WEEK_NUMBER=Week {0}
96
96
 
97
+ #XACT: Text for calendar weeks label
98
+ CALENDAR_WEEK_NUMBERS=Calendar Weeks
99
+
97
100
  #XACT: Aria description of the Month picker
98
101
  MONTH_PICKER=Month Picker
99
102
 
@@ -39,8 +39,24 @@ CALENDAR_CANCEL=\u0625\u0644\u063A\u0627\u0621
39
39
 
40
40
  CALENDAR_BTN_PREV=\u0627\u0644\u0633\u0627\u0628\u0642
41
41
 
42
+ CALENDAR_BTN_PREV_MONTH_TITLE=\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642
43
+
44
+ CALENDAR_BTN_PREV_YEAR_TITLE=\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629
45
+
46
+ CALENDAR_BTN_PREV_YEAR_RANGE_TITLE=\u0646\u0637\u0627\u0642 \u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629
47
+
48
+ CALENDAR_BTN_PREV_MONTH_SHORTCUT=\u0635\u0641\u062D\u0629 \u0625\u0644\u0649 \u0623\u0639\u0644\u0649
49
+
42
50
  CALENDAR_BTN_NEXT=\u0627\u0644\u062A\u0627\u0644\u064A
43
51
 
52
+ CALENDAR_BTN_NEXT_MONTH_TITLE=\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A
53
+
54
+ CALENDAR_BTN_NEXT_YEAR_TITLE=\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629
55
+
56
+ CALENDAR_BTN_NEXT_YEAR_RANGE_TITLE=\u0646\u0637\u0627\u0642 \u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629
57
+
58
+ CALENDAR_BTN_NEXT_MONTH_SHORTCUT=\u0635\u0641\u062D\u0629 \u0625\u0644\u0649 \u0623\u0633\u0641\u0644
59
+
44
60
  CALENDAR_BTN_TODAY=\u0627\u0644\u064A\u0648\u0645
45
61
 
46
62
  CALENDAR_DATES_ROW_WEEK_NUMBER=\u0627\u0644\u0623\u0633\u0628\u0648\u0639 {0}
@@ -75,21 +91,43 @@ CALENDAR_HEADER_YEAR_BUTTON_SHORTCUT=Shift + F4
75
91
 
76
92
  CALENDAR_HEADER_YEAR_RANGE_BUTTON_SHORTCUT=Shift + F4
77
93
 
94
+ CALENDAR_RANGE_SELECTION_START_DATE={0}\u060C \u0623\u0648\u0644 \u062A\u0627\u0631\u064A\u062E \u0644\u0644\u0646\u0637\u0627\u0642
95
+
96
+ CALENDAR_RANGE_SELECTION_END_DATE={0} \u0622\u062E\u0631 \u062A\u0627\u0631\u064A\u062E \u0644\u0644\u0646\u0637\u0627\u0642
97
+
98
+ CALENDAR_RANGE_SELECTION_PART_OF_RANGE={0}\u060C \u062C\u0632\u0621 \u0645\u0646 \u0627\u0644\u0646\u0637\u0627\u0642
99
+
78
100
  APPOINTMENT=\u0627\u0644\u0645\u0648\u0639\u062F
79
101
 
80
102
  APPOINTMENT_TENTATIVE=\u0645\u0628\u062F\u0626\u064A
81
103
 
82
104
  APPOINTMENT_DATE_TIME_DESCRIPTION={0}'' \u0641\u064A ''{1}
83
105
 
84
- FILEUPLOAD_BROWSE=\u0627\u0633\u062A\u0639\u0631\u0627\u0636...
106
+ FILEUPLOADER_BUTTON_TEXT=\u0627\u0633\u062A\u0639\u0631\u0627\u0636...
107
+
108
+ FILEUPLOADER_ACC_TEXT=\u062A\u0646\u0634\u064A\u0637 \u0644\u062A\u062D\u062F\u064A\u062F \u0645\u0644\u0641
109
+
110
+ FILEUPLOADER_REQUIRED=\u0645\u0637\u0644\u0648\u0628
111
+
112
+ FILEUPLOADER_ROLE_DESCRIPTION=\u0628\u0631\u0646\u0627\u0645\u062C \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0644\u0641
113
+
114
+ FILEUPLOADER_DEFAULT_PLACEHOLDER=\u0627\u0633\u062A\u0639\u0631\u0627\u0636 \u0645\u0644\u0641 \u0623\u0648 \u0625\u0633\u0642\u0627\u0637\u0647
85
115
 
86
- FILEUPLOAD_ACC=\u062A\u0646\u0634\u064A\u0637 \u0644\u062A\u062D\u062F\u064A\u062F \u0645\u0644\u0641
116
+ FILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER=\u0627\u0633\u062A\u0639\u0631\u0627\u0636 \u0645\u0644\u0641\u0627\u062A \u0645\u062A\u0639\u062F\u062F\u0629 \u0623\u0648 \u0625\u0633\u0642\u0627\u0637\u0647\u0627
87
117
 
88
- FILEUPLOAD_FILENAME=\u0627\u0633\u0645 \u0627\u0644\u0645\u0644\u0641
118
+ FILEUPLOADER_VALUE_HELP_TOOLTIP=\u0627\u0633\u062A\u0639\u0631\u0627\u0636 \u0643\u0644 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0648\u0627\u0633\u062A\u0628\u062F\u0627\u0644\u0647\u0627
89
119
 
90
- FILEUPLOAD_REQUIRED=\u0645\u0637\u0644\u0648\u0628
120
+ FILEUPLOADER_CLEAR_ICON_TOOLTIP=\u0625\u0632\u0627\u0644\u0629 \u0643\u0644 \u0627\u0644\u0645\u0644\u0641\u0627\u062A
91
121
 
92
- FILEUPLOAD_NO_FILE_CHOSEN=\u0644\u0645 \u064A\u062A\u0645 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0644\u0641
122
+ FILEUPLOADER_NO_FILE_CHOSEN=\u0644\u0645 \u064A\u062A\u0645 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0644\u0641
123
+
124
+ FILEUPLOADER_VALUE_STATE_ERROR=\u062D\u0627\u0644\u0629 \u0627\u0644\u0642\u064A\u0645\u0629 \u2019\u062E\u0637\u0623\u2018
125
+
126
+ FILEUPLOADER_VALUE_STATE_WARNING=\u062D\u0627\u0644\u0629 \u0627\u0644\u0642\u064A\u0645\u0629 \u2019\u062A\u062D\u0630\u064A\u0631\u2018
127
+
128
+ FILEUPLOADER_VALUE_STATE_SUCCESS=\u062D\u0627\u0644\u0629 \u0627\u0644\u0642\u064A\u0645\u0629 \u2019\u0646\u0627\u062C\u062D\u2018
129
+
130
+ FILEUPLOADER_VALUE_STATE_INFORMATION=\u062D\u0627\u0644\u0629 \u0627\u0644\u0642\u064A\u0645\u0629 \u2019\u0645\u0639\u0644\u0648\u0645\u0627\u062A\u2018
93
131
 
94
132
  LEGEND_SELECTED=\u0645\u062D\u062F\u062F
95
133
 
@@ -148,4 +186,6 @@ COLOR_PICKER_SUBMIT=\u0645\u0648\u0627\u0641\u0642
148
186
 
149
187
  COLOR_PICKER_TITLE=\u0645\u0646\u062A\u0642\u064A \u0627\u0644\u0623\u0644\u0648\u0627\u0646
150
188
 
151
- COLORPICKER_PERCENTAGE=\u0627\u0644\u0646\u0633\u0628\u0629 \u0627\u0644\u0645\u0626\u0648\u064A\u0629
189
+ COLORPICKER_PERCENTAGE=%
190
+
191
+ COLORPICKER_COLOR_MODE_CHANGED=\u062A\u0645 \u062A\u063A\u064A\u064A\u0631 \u0646\u0645\u0637 \u0627\u0644\u0644\u0648\u0646 \u0625\u0644\u0649 {0}. \u0627\u0644\u0642\u064A\u0645 \u0627\u0644\u062D\u0627\u0644\u064A\u0629\: {1}.