@openui5/sap.ui.unified 1.151.0 → 1.152.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/THIRDPARTY.txt +5 -5
  2. package/package.json +2 -2
  3. package/src/sap/ui/unified/.library +1 -1
  4. package/src/sap/ui/unified/Calendar.js +180 -1
  5. package/src/sap/ui/unified/CalendarAppointment.js +1 -1
  6. package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
  7. package/src/sap/ui/unified/CalendarLegend.js +1 -1
  8. package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
  9. package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
  10. package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
  11. package/src/sap/ui/unified/CalendarRenderer.js +8 -2
  12. package/src/sap/ui/unified/CalendarRow.js +1 -1
  13. package/src/sap/ui/unified/CalendarTimeInterval.js +1 -1
  14. package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
  15. package/src/sap/ui/unified/ColorPicker.js +1 -1
  16. package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
  17. package/src/sap/ui/unified/ContentSwitcher.js +1 -1
  18. package/src/sap/ui/unified/Currency.js +1 -1
  19. package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
  20. package/src/sap/ui/unified/DateRange.js +1 -1
  21. package/src/sap/ui/unified/DateTypeRange.js +27 -6
  22. package/src/sap/ui/unified/FileUploader.js +1 -1
  23. package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
  24. package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
  25. package/src/sap/ui/unified/Menu.js +1 -1
  26. package/src/sap/ui/unified/MenuItem.js +1 -1
  27. package/src/sap/ui/unified/MenuItemBase.js +1 -1
  28. package/src/sap/ui/unified/MenuItemGroup.js +1 -1
  29. package/src/sap/ui/unified/MenuRenderer.js +1 -1
  30. package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
  31. package/src/sap/ui/unified/MonthlyRecurrenceRule.js +1 -1
  32. package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
  33. package/src/sap/ui/unified/RecurrenceRule.js +1 -1
  34. package/src/sap/ui/unified/RecurringCalendarAppointment.js +1 -1
  35. package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +1 -1
  36. package/src/sap/ui/unified/Shell.js +1 -1
  37. package/src/sap/ui/unified/ShellHeadItem.js +1 -1
  38. package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
  39. package/src/sap/ui/unified/ShellLayout.js +1 -1
  40. package/src/sap/ui/unified/ShellOverlay.js +1 -1
  41. package/src/sap/ui/unified/SplitContainer.js +1 -1
  42. package/src/sap/ui/unified/TimeRange.js +1 -1
  43. package/src/sap/ui/unified/WeeklyRecurrenceRule.js +1 -1
  44. package/src/sap/ui/unified/YearlyRecurrenceRule.js +1 -1
  45. package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
  46. package/src/sap/ui/unified/calendar/Header.js +1 -1
  47. package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
  48. package/src/sap/ui/unified/calendar/Month.js +25 -3
  49. package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
  50. package/src/sap/ui/unified/calendar/MonthRenderer.js +23 -4
  51. package/src/sap/ui/unified/calendar/MonthsRow.js +1 -1
  52. package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
  53. package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
  54. package/src/sap/ui/unified/calendar/WeeksRow.js +1 -1
  55. package/src/sap/ui/unified/calendar/YearPicker.js +1 -1
  56. package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
  57. package/src/sap/ui/unified/library.js +2 -2
package/THIRDPARTY.txt CHANGED
@@ -6,31 +6,31 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.f:
8
8
 
9
- Component: UI5 Web Components, version: 2.24.0
9
+ Component: UI5 Web Components, version: 2.24.2
10
10
  Copyright: SAP
11
11
  License: Apache-2.0
12
12
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
13
13
  Contained in: src/sap.f/src/sap/f/thirdparty/**
14
14
 
15
- Component: UI5 Web Components Fiori, version: 2.24.0
15
+ Component: UI5 Web Components Fiori, version: 2.24.2
16
16
  Copyright: SAP
17
17
  License: Apache-2.0
18
18
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
19
19
  Contained in: src/sap.f/src/sap/f/thirdparty/**
20
20
 
21
- Component: UI5 Web Components Icons, version: 2.24.0
21
+ Component: UI5 Web Components Icons, version: 2.24.2
22
22
  Copyright: SAP
23
23
  License: Apache-2.0
24
24
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
25
25
  Contained in: src/sap.f/src/sap/f/thirdparty/**
26
26
 
27
- Component: UI5 Web Components Icons Business Suite, version: 2.24.0
27
+ Component: UI5 Web Components Icons Business Suite, version: 2.24.2
28
28
  Copyright: SAP
29
29
  License: Apache-2.0
30
30
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
31
31
  Contained in: src/sap.f/src/sap/f/thirdparty/**
32
32
 
33
- Component: UI5 Web Components Icons TNT, version: 2.24.0
33
+ Component: UI5 Web Components Icons TNT, version: 2.24.2
34
34
  Copyright: SAP
35
35
  License: Apache-2.0
36
36
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.unified",
3
- "version": "1.151.0",
3
+ "version": "1.152.0",
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/UI5/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.151.0"
17
+ "@openui5/sap.ui.core": "1.152.0"
18
18
  }
19
19
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2026 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.151.0</version>
9
+ <version>1.152.0</version>
10
10
 
11
11
  <documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
12
12
 
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  * Basic Calendar.
81
81
  * This calendar is used for DatePickers
82
82
  * @extends sap.ui.core.Control
83
- * @version 1.151.0
83
+ * @version 1.152.0
84
84
  *
85
85
  * @constructor
86
86
  * @public
@@ -225,6 +225,9 @@ sap.ui.define([
225
225
  */
226
226
  _currentPicker : {type : "string", group : "Appearance", visibility: "hidden"},
227
227
 
228
+ /** Whether the high-zoom (≤320px) picker is active. @private */
229
+ _highZoomActive : {type : "boolean", defaultValue : false, visibility: "hidden"},
230
+
228
231
  /**
229
232
  * If set, the calendar week numbering is used for display.
230
233
  * If not set, the calendar week numbering of the global configuration is used.
@@ -436,6 +439,11 @@ sap.ui.define([
436
439
  //when used in a DatePicker, in mobile there is no cancel button
437
440
  this._bSkipCancelButtonRendering = false;
438
441
  this._bActionTriggeredFromSecondHeader = false;
442
+
443
+ // High-zoom (≤320px) support — only for standalone Calendar (not embedded in DatePicker)
444
+ this._oHZPicker = null;
445
+ this._bHZListenersRegistered = false;
446
+ this._fnHZResizeHandler = this._onHZResize.bind(this);
439
447
  };
440
448
 
441
449
  Calendar.prototype.exit = function(){
@@ -460,6 +468,19 @@ sap.ui.define([
460
468
  }
461
469
 
462
470
  this._oSelectedMonth = null;
471
+
472
+ // Cleanup high-zoom
473
+ if (this._bHZListenersRegistered) {
474
+ if (window.visualViewport) {
475
+ window.visualViewport.removeEventListener("resize", this._fnHZResizeHandler);
476
+ }
477
+ window.removeEventListener("resize", this._fnHZResizeHandler);
478
+ }
479
+ this._fnHZResizeHandler = null;
480
+ if (this._oHZPicker) {
481
+ this._oHZPicker.destroy();
482
+ this._oHZPicker = null;
483
+ }
463
484
  };
464
485
 
465
486
  Calendar.prototype._initializeHeader = function() {
@@ -649,6 +670,25 @@ sap.ui.define([
649
670
 
650
671
  Calendar.prototype.onAfterRendering = function(oEvent){
651
672
 
673
+ // Check zoom state after first render (resize handler skips before DOM exists)
674
+ if (!this._oSpecialDatesControlOrigin) {
675
+ // Register listeners lazily so embedded Calendars (inside DatePicker) never get them
676
+ if (!this._bHZListenersRegistered) {
677
+ if (window.visualViewport) {
678
+ window.visualViewport.addEventListener("resize", this._fnHZResizeHandler);
679
+ }
680
+ window.addEventListener("resize", this._fnHZResizeHandler);
681
+ this._bHZListenersRegistered = true;
682
+ }
683
+ const bHighZoom = this._isHighZoom();
684
+ if (bHighZoom !== this.getProperty("_highZoomActive")) {
685
+ this.setProperty("_highZoomActive", bHighZoom);
686
+ if (bHighZoom) {
687
+ this._initHZPicker();
688
+ }
689
+ }
690
+ }
691
+
652
692
  // check if day names and month names are too big -> use smaller ones
653
693
  if (!this._getSucessorsPickerPopup()) {
654
694
  _checkNamesLength.call(this);
@@ -1198,6 +1238,18 @@ sap.ui.define([
1198
1238
  return this.setProperty("intervalSelection", bEnabled);
1199
1239
  };
1200
1240
 
1241
+ // Override to invalidate the high-zoom picker when interval selection changes
1242
+ // so the correct picker type (DatePicker vs DateRangeSelection) is used on next zoom-in.
1243
+ const _origSetIntervalSelection = Calendar.prototype.setIntervalSelection;
1244
+ Calendar.prototype.setIntervalSelection = function(bEnabled) {
1245
+ if (this._oHZPicker) {
1246
+ this.removeDependent(this._oHZPicker);
1247
+ this._oHZPicker.destroy();
1248
+ this._oHZPicker = null;
1249
+ }
1250
+ return _origSetIntervalSelection.call(this, bEnabled);
1251
+ };
1252
+
1201
1253
  /**
1202
1254
  * Setter for the property <code>singleSelection</code>. If set to <code>true</code> only a single date or single interval, when <code>intervalSelection</code> is set to <code>true</code>, can be selected.
1203
1255
  *
@@ -3154,6 +3206,133 @@ sap.ui.define([
3154
3206
  this._updateHeadersYearPrimaryText(this._getYearString());
3155
3207
  }
3156
3208
 
3209
+ // ============================================================
3210
+ // High-zoom (≤320px) support for standalone Calendar
3211
+ // At ≤320px a DatePicker (or DateRangeSelection for intervalSelection)
3212
+ // is shown instead of the calendar grid. DatePicker automatically
3213
+ // activates its own DateHighZoomInputs layout at that viewport width.
3214
+ // ============================================================
3215
+
3216
+ /**
3217
+ * Returns true when the viewport is ≤ 320 px.
3218
+ * @returns {boolean}
3219
+ * @private
3220
+ */
3221
+ Calendar.prototype._isHighZoom = function() {
3222
+ const iWidth = (window.visualViewport && window.visualViewport.width) || window.innerWidth;
3223
+ return iWidth <= 320;
3224
+ };
3225
+
3226
+ /**
3227
+ * Called on viewport resize. Activates or deactivates high-zoom mode
3228
+ * only for standalone Calendar (not when embedded in DatePicker).
3229
+ * @private
3230
+ */
3231
+ Calendar.prototype._onHZResize = function() {
3232
+ // Skip when Calendar is embedded in a picker — the picker manages zoom
3233
+ if (this._oSpecialDatesControlOrigin) { return; }
3234
+ // Skip until first render — visualViewport fires during initial layout
3235
+ if (!this.getDomRef()) { return; }
3236
+
3237
+ const bHighZoom = this._isHighZoom();
3238
+ if (bHighZoom === this.getProperty("_highZoomActive")) { return; }
3239
+
3240
+ if (bHighZoom) {
3241
+ this.setProperty("_highZoomActive", true);
3242
+ this._initHZPicker();
3243
+ } else {
3244
+ // Destroy the picker so Calendar re-renders cleanly as its own DOM root.
3245
+ if (this._oHZPicker) {
3246
+ this.removeDependent(this._oHZPicker);
3247
+ this._oHZPicker.destroy();
3248
+ this._oHZPicker = null;
3249
+ }
3250
+ this.setProperty("_highZoomActive", false);
3251
+ }
3252
+ };
3253
+
3254
+ /**
3255
+ * Lazily loads DatePicker (or DateRangeSelection) via runtime require
3256
+ * and shows it in place of the calendar grid at high zoom.
3257
+ * sap.ui.unified → sap.m is not a build-time dependency so we use
3258
+ * sap.ui.require (same pattern as FileUploader.js in this library).
3259
+ * @private
3260
+ */
3261
+ Calendar.prototype._initHZPicker = function() {
3262
+ const sModule = this.getIntervalSelection()
3263
+ ? "sap/m/DateRangeSelection"
3264
+ : "sap/m/DatePicker";
3265
+
3266
+ const FnClass = sap.ui.require(sModule);
3267
+ if (FnClass) {
3268
+ this._createHZPicker(FnClass);
3269
+ } else {
3270
+ sap.ui.require([sModule], function(Cls) {
3271
+ if (!this.bIsDestroyed) {
3272
+ this._createHZPicker(Cls);
3273
+ }
3274
+ }.bind(this));
3275
+ }
3276
+ };
3277
+
3278
+ /**
3279
+ * Creates and configures the high-zoom picker (DatePicker or DateRangeSelection).
3280
+ * @param {function} FnClass - DatePicker or DateRangeSelection constructor
3281
+ * @private
3282
+ */
3283
+ Calendar.prototype._createHZPicker = function(FnClass) {
3284
+ if (!this._oHZPicker) {
3285
+ const bRange = this.getIntervalSelection();
3286
+ const sSecondary = this.getSecondaryCalendarType();
3287
+ const sPrimary = this.getProperty("primaryCalendarType");
3288
+
3289
+ const oPicker = new FnClass(this.getId() + "-hzPicker", {
3290
+ displayFormat: "dd.MM.yyyy",
3291
+ displayFormatType: sPrimary || undefined,
3292
+ minDate: this._oMinDate.toLocalJSDate(),
3293
+ maxDate: this._oMaxDate.toLocalJSDate(),
3294
+ change: function(oEvent) {
3295
+ // Propagate the selected date(s) back to the Calendar aggregation
3296
+ const oDateValue = oPicker.getDateValue();
3297
+ if (!oDateValue) { return; }
3298
+
3299
+ // DateRange is guaranteed loaded (transitive dep via Month/MonthPicker/YearPicker)
3300
+ const DateRange = sap.ui.require("sap/ui/unified/DateRange");
3301
+
3302
+ if (DateRange) {
3303
+ const oRange = new DateRange({ startDate: oDateValue });
3304
+ if (bRange && oPicker.getSecondDateValue()) {
3305
+ oRange.setEndDate(oPicker.getSecondDateValue());
3306
+ }
3307
+ this.removeAllSelectedDates();
3308
+ this.addSelectedDate(oRange);
3309
+ this.fireSelect();
3310
+ }
3311
+ }.bind(this)
3312
+ });
3313
+
3314
+ // Pre-fill from current Calendar selection
3315
+ const aSelected = this.getSelectedDates();
3316
+ if (aSelected.length > 0 && aSelected[0].getStartDate()) {
3317
+ oPicker.setDateValue(aSelected[0].getStartDate());
3318
+ if (bRange && aSelected[0].getEndDate()) {
3319
+ oPicker.setSecondDateValue(aSelected[0].getEndDate());
3320
+ }
3321
+ }
3322
+
3323
+ this._oHZPicker = oPicker;
3324
+ // Use the setter so _bSecondaryCalendarTypeSet is flagged correctly —
3325
+ // passing secondaryCalendarType in the constructor bypasses the setter.
3326
+ if (sSecondary) {
3327
+ oPicker.setSecondaryCalendarType(sSecondary);
3328
+ }
3329
+ this.addDependent(oPicker);
3330
+ }
3331
+
3332
+ this._oHZPicker.setVisible(true);
3333
+ this.invalidate();
3334
+ };
3335
+
3157
3336
  return Calendar;
3158
3337
 
3159
3338
  });
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  *
49
49
  * Applications could inherit from this element to add own fields.
50
50
  * @extends sap.ui.unified.DateTypeRange
51
- * @version 1.151.0
51
+ * @version 1.152.0
52
52
  *
53
53
  * @constructor
54
54
  * @public
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  * @class
65
65
  * <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
66
66
  * @extends sap.ui.unified.Calendar
67
- * @version 1.151.0
67
+ * @version 1.152.0
68
68
  *
69
69
  * @constructor
70
70
  * @public
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @extends sap.ui.core.Control
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.151.0
60
+ * @version 1.152.0
61
61
  *
62
62
  * @constructor
63
63
  * @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.151.0
24
+ * @version 1.152.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * <b>Note:</b> UI5Date or 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.151.0
68
+ * @version 1.152.0
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.151.0
60
+ * @version 1.152.0
61
61
  *
62
62
  * @constructor
63
63
  * @private
@@ -67,10 +67,16 @@ sap.ui.define(["sap/ui/core/Lib"],
67
67
  }
68
68
 
69
69
  if (this.addAttributes) {
70
- // additional stuff by inherited controls
71
70
  this.addAttributes(oRm, oCal);
72
71
  }
73
- oRm.openEnd(); // div element
72
+ oRm.openEnd();
73
+
74
+ // In high-zoom standalone mode render only the DatePicker/DateRangeSelection proxy
75
+ if (oCal.getProperty("_highZoomActive") && oCal._oHZPicker) {
76
+ oRm.renderControl(oCal._oHZPicker);
77
+ oRm.close("div");
78
+ return;
79
+ }
74
80
 
75
81
  var oHeader = oCal.getAggregation("header");
76
82
  oRm.renderControl(oHeader);
@@ -84,7 +84,7 @@ sap.ui.define([
84
84
  * @class
85
85
  * A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
86
86
  * @extends sap.ui.core.Control
87
- * @version 1.151.0
87
+ * @version 1.152.0
88
88
  *
89
89
  * @constructor
90
90
  * @public
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  * @class
79
79
  * Calendar with granularity of time items displayed in one line.
80
80
  * @extends sap.ui.core.Control
81
- * @version 1.151.0
81
+ * @version 1.152.0
82
82
  *
83
83
  * @constructor
84
84
  * @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.151.0
42
+ * @version 1.152.0
43
43
  *
44
44
  * @constructor
45
45
  * @private
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  * @extends sap.ui.core.Control
73
73
  *
74
74
  * @author SAP SE
75
- * @version 1.151.0
75
+ * @version 1.152.0
76
76
  *
77
77
  * @constructor
78
78
  * @public
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * A thin wrapper over {@link sap.ui.unified.ColorPicker} allowing the latter to be used in a popover.
50
50
  *
51
51
  * @extends sap.ui.core.Control
52
- * @version 1.151.0
52
+ * @version 1.152.0
53
53
  *
54
54
  * @constructor
55
55
  * @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.151.0
34
+ * @version 1.152.0
35
35
  *
36
36
  * @constructor
37
37
  * @public
@@ -58,7 +58,7 @@ sap.ui.define([
58
58
  * @extends sap.ui.core.Control
59
59
  *
60
60
  * @author SAP SE
61
- * @version 1.151.0
61
+ * @version 1.152.0
62
62
  *
63
63
  * @constructor
64
64
  * @public
@@ -14,7 +14,7 @@ sap.ui.define(["sap/m/library", "sap/ui/core/Lib"],
14
14
  /**
15
15
  * Currency renderer.
16
16
  *
17
- * @version 1.151.0
17
+ * @version 1.152.0
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.151.0
23
+ * @version 1.152.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -5,15 +5,24 @@
5
5
  */
6
6
 
7
7
  // Provides control sap.ui.unified.DateTypeRange.
8
- sap.ui.define(['./DateRange', './library'],
9
- function(DateRange, library) {
8
+ sap.ui.define([
9
+ './DateRange',
10
+ './library',
11
+ 'sap/ui/core/library'
12
+ ],
13
+ function(
14
+ DateRange,
15
+ library,
16
+ coreLibrary
17
+ ) {
10
18
  "use strict";
11
19
 
12
-
13
-
14
20
  // shortcut for sap.ui.unified.CalendarDayType
15
21
  var CalendarDayType = library.CalendarDayType;
16
22
 
23
+ // shortcut for sap.ui.core.aria.HasPopup
24
+ var AriaHasPopup = coreLibrary.aria.HasPopup;
25
+
17
26
 
18
27
 
19
28
  /**
@@ -25,7 +34,7 @@ sap.ui.define(['./DateRange', './library'],
25
34
  * @class
26
35
  * Date range with calendar day type information. Used to visualize special days in the Calendar.
27
36
  * @extends sap.ui.unified.DateRange
28
- * @version 1.151.0
37
+ * @version 1.152.0
29
38
  *
30
39
  * @constructor
31
40
  * @public
@@ -54,7 +63,19 @@ sap.ui.define(['./DateRange', './library'],
54
63
  * If set, this color will override the default background color defined in <code>Calendar</code> <code>specialDates</code> aggregation
55
64
  * @since 1.76.0
56
65
  */
57
- color : {type : "sap.ui.core.CSSColor", group : "Appearance", defaultValue : null}
66
+ color : {type : "sap.ui.core.CSSColor", group : "Appearance", defaultValue : null},
67
+
68
+ /**
69
+ * Defines the value of the <code>aria-haspopup</code> attribute of the day cell.
70
+ *
71
+ * <b>Note:</b> Use this property only when the cell is related to a popover/popup.
72
+ * The value should be equal to the main/root role of the popup.
73
+ *
74
+ * <b>Note:</b> Setting <code>type</code> to <code>sap.ui.unified.CalendarDayType.None</code>
75
+ * together with this property allows adding the attribute without any visual marking.
76
+ * @since 1.152.0
77
+ */
78
+ ariaHasPopup : {type : "sap.ui.core.aria.HasPopup", group : "Accessibility", defaultValue : AriaHasPopup.None}
58
79
  }
59
80
  }});
60
81
 
@@ -79,7 +79,7 @@ sap.ui.define([
79
79
  * @implements sap.ui.core.IFormContent, sap.ui.unified.IProcessableBlobs
80
80
  *
81
81
  * @author SAP SE
82
- * @version 1.151.0
82
+ * @version 1.152.0
83
83
  *
84
84
  * @constructor
85
85
  * @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.151.0
25
+ * @version 1.152.0
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.151.0
23
+ * @version 1.152.0
24
24
  *
25
25
  * @constructor
26
26
  * @since 1.52
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @implements sap.ui.core.IContextMenu
71
71
  *
72
72
  * @author SAP SE
73
- * @version 1.151.0
73
+ * @version 1.152.0
74
74
  * @since 1.21.0
75
75
  *
76
76
  * @constructor
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @implements sap.ui.unified.IMenuItem
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.151.0
42
+ * @version 1.152.0
43
43
  * @since 1.21.0
44
44
  *
45
45
  * @constructor
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', './library', 'sap/ui/core/IconPool', 'sap/
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.151.0
26
+ * @version 1.152.0
27
27
  * @since 1.21.0
28
28
  *
29
29
  * @constructor
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @implements sap.ui.unified.IMenuItem
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.151.0
33
+ * @version 1.152.0
34
34
  * @since 1.127.0
35
35
  *
36
36
  * @constructor
@@ -15,7 +15,7 @@ sap.ui.define(["sap/ui/core/ControlBehavior"],
15
15
  * Menu renderer.
16
16
  * @author SAP - TD Core UI&AM UI Infra
17
17
  *
18
- * @version 1.151.0
18
+ * @version 1.152.0
19
19
  * @namespace
20
20
  */
21
21
  var MenuRenderer = {
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @implements sap.ui.unified.IMenuItem
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.151.0
56
+ * @version 1.152.0
57
57
  * @since 1.21.0
58
58
  *
59
59
  * @constructor
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * </ul>
29
29
  *
30
30
  * @extends sap.ui.unified.RecurrenceRule
31
- * @version 1.151.0
31
+ * @version 1.152.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * NonWorkingPeriod
26
26
  * @extends sap.ui.core.Element
27
- * @version 1.151.0
27
+ * @version 1.152.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * </pre>
43
43
  *
44
44
  * @extends sap.ui.core.Element
45
- * @version 1.151.0
45
+ * @version 1.152.0
46
46
  *
47
47
  * @constructor
48
48
  * @public
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  *
37
37
  * Applications could inherit from this element to add own fields.
38
38
  * @extends sap.ui.unified.CalendarAppointment
39
- * @version 1.151.0
39
+ * @version 1.152.0
40
40
  *
41
41
  * @constructor
42
42
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  *
35
35
  * Applications can inherit from this element to add own fields.
36
36
  * @extends sap.ui.unified.NonWorkingPeriod
37
- * @version 1.151.0
37
+ * @version 1.152.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -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.151.0
28
+ * @version 1.152.0
29
29
  *
30
30
  * @constructor
31
31
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Element
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.151.0
29
+ * @version 1.152.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Element
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.151.0
29
+ * @version 1.152.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  * @extends sap.ui.core.Control
57
57
  *
58
58
  * @author SAP SE
59
- * @version 1.151.0
59
+ * @version 1.152.0
60
60
  *
61
61
  * @constructor
62
62
  * @public
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @extends sap.ui.core.Control
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.151.0
49
+ * @version 1.152.0
50
50
  *
51
51
  * @constructor
52
52
  * @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.151.0
37
+ * @version 1.152.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class
24
24
  * Time range for use in <code>NonWorkingPeriod</code>
25
25
  * @extends sap.ui.core.Element
26
- * @version 1.151.0
26
+ * @version 1.152.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * with <code>recurrenceType</code> set to <code>Weekly</code> is provided.
23
23
  *
24
24
  * @extends sap.ui.unified.RecurrenceRule
25
- * @version 1.151.0
25
+ * @version 1.152.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * with <code>recurrenceType</code> set to <code>Yearly</code> is provided.
24
24
  *
25
25
  * @extends sap.ui.unified.MonthlyRecurrenceRule
26
- * @version 1.151.0
26
+ * @version 1.152.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * If used inside the calendar the properties and aggregation are directly taken from the parent
40
40
  * (To not duplicate and sync DateRanges and so on...)
41
41
  * @extends sap.ui.unified.calendar.Month
42
- * @version 1.151.0
42
+ * @version 1.152.0
43
43
  *
44
44
  * @constructor
45
45
  * @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.151.0
30
+ * @version 1.152.0
31
31
  *
32
32
  * @constructor
33
33
  * @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.151.0
35
+ * @version 1.152.0
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.151.0
81
+ * @version 1.152.0
82
82
  *
83
83
  * @constructor
84
84
  * @public
@@ -1012,10 +1012,10 @@ sap.ui.define([
1012
1012
  // collects non working day with the first occurrence of one of the types01..types20
1013
1013
  if ((oTimeStamp === oStartTimeStamp && !oEndDate) || (oTimeStamp >= oStartTimeStamp && oTimeStamp <= oEndTimeStamp)) {
1014
1014
  if (!bNonWorkingType && !oType) {
1015
- oType = {type: oRange.getType(), secondaryType: oRange.getSecondaryType(), tooltip: oRange.getTooltip_AsString(), color: oRange.getColor(), customData: oRange.getCustomData()};
1015
+ oType = Month.prototype._createDateTypeObject.call(this, oRange, true);
1016
1016
  aTypes.push(oType);
1017
1017
  } else if (bNonWorkingType && !oTypeNW) {
1018
- oTypeNW = {type: oRange.getType(), secondaryType: oRange.getSecondaryType(), tooltip: oRange.getTooltip_AsString(), customData: oRange.getCustomData()};
1018
+ oTypeNW = Month.prototype._createDateTypeObject.call(this, oRange, false);
1019
1019
  aTypes.push(oTypeNW);
1020
1020
  }
1021
1021
  if (oType && oTypeNW) {
@@ -1028,6 +1028,28 @@ sap.ui.define([
1028
1028
 
1029
1029
  };
1030
1030
 
1031
+ /*
1032
+ * Creates a date type object from a given date range.
1033
+ * @param {sap.ui.unified.DateRange} oRange the date range
1034
+ * @param {boolean} bSetColor whether to include the color property
1035
+ * @returns {object} the date type object
1036
+ * @private
1037
+ */
1038
+ Month.prototype._createDateTypeObject = function(oRange, bSetColor) {
1039
+ const oTypeObject = {
1040
+ type: oRange.getType(),
1041
+ secondaryType: oRange.getSecondaryType(),
1042
+ tooltip: oRange.getTooltip_AsString(),
1043
+ customData: oRange.getCustomData(),
1044
+ ariaHasPopup: oRange.getAriaHasPopup(),
1045
+ bAriaHasPopupExplicit: !oRange.isPropertyInitial("ariaHasPopup")
1046
+ };
1047
+ if (bSetColor) {
1048
+ oTypeObject.color = oRange.getColor();
1049
+ }
1050
+ return oTypeObject;
1051
+ };
1052
+
1031
1053
  /*
1032
1054
  * Checks if a given date is enabled
1033
1055
  * aside from the disabledDates aggregation the min. and max. dates are also checked
@@ -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.151.0
60
+ * @version 1.152.0
61
61
  *
62
62
  * @constructor
63
63
  * @public
@@ -17,7 +17,8 @@ sap.ui.define([
17
17
  'sap/ui/core/InvisibleText',
18
18
  'sap/ui/core/date/UI5Date',
19
19
  "sap/ui/core/date/CalendarUtils",
20
- "sap/ui/core/Locale"
20
+ "sap/ui/core/Locale",
21
+ "sap/ui/core/library"
21
22
  ],
22
23
  function(
23
24
  CalendarType,
@@ -32,13 +33,17 @@ sap.ui.define([
32
33
  InvisibleText,
33
34
  UI5Date,
34
35
  CalendarDateUtils,
35
- Locale
36
+ Locale,
37
+ coreLibrary
36
38
  ) {
37
39
  "use strict";
38
40
 
39
41
 
40
42
  // shortcut for sap.ui.unified.CalendarDayType
41
- var CalendarDayType = library.CalendarDayType;
43
+ const CalendarDayType = library.CalendarDayType;
44
+
45
+ // shortcut for sap.ui.core.aria.HasPopup
46
+ const AriaHasPopup = coreLibrary.aria.HasPopup;
42
47
 
43
48
 
44
49
 
@@ -456,6 +461,15 @@ sap.ui.define([
456
461
  var bEnabled = oMonth._checkDateEnabled(oDay);
457
462
  var bShouldBeMarkedAsSpecialDate = oMonth._isSpecialDateMarkerEnabled(oDay);
458
463
 
464
+ // Determine effective aria-haspopup from per-date value on matched DateTypeRange entries.
465
+ let sHasPopup = AriaHasPopup.None;
466
+ for (let i = 0; i < aDayTypes.length; i++) {
467
+ if (aDayTypes[i].bAriaHasPopupExplicit) {
468
+ sHasPopup = aDayTypes[i].ariaHasPopup;
469
+ break;
470
+ }
471
+ }
472
+
459
473
  const sFirstSpecialDateType = aDayTypes.length > 0 && aDayTypes[0].type;
460
474
  const sSecondaryDateType = aDayTypes.length > 0 && aDayTypes[0].secondaryType;
461
475
  const bIsWeekend = oHelper.aNonWorkingDays && oHelper.aNonWorkingDays instanceof Array
@@ -594,6 +608,10 @@ sap.ui.define([
594
608
  CalendarLegendRenderer.addCalendarTypeAccInfo(mAccProps, sAriaType, oLegend);
595
609
  }
596
610
 
611
+ if (sHasPopup !== AriaHasPopup.None) {
612
+ mAccProps["haspopup"] = sHasPopup.toLowerCase();
613
+ }
614
+
597
615
  if (aDayTypes[0] && aDayTypes[0].customData?.length && bShouldBeMarkedAsSpecialDate) {
598
616
  //render customData
599
617
  aDayTypes[0].customData.forEach((customData) => {
@@ -606,7 +624,8 @@ sap.ui.define([
606
624
  oRm.accessibilityState(null, mAccProps);
607
625
  oRm.openEnd(); // div element
608
626
 
609
- if (aDayTypes[0] && bShouldBeMarkedAsSpecialDate){ //if there's a special date inside current month, render it
627
+ if (aDayTypes[0] && bShouldBeMarkedAsSpecialDate
628
+ && (aDayTypes[0].type !== CalendarDayType.None || aDayTypes[0].color)) { //if there's a special date inside current month, render it
610
629
  oRm.openStart("div");
611
630
  oRm.class("sapUiCalSpecialDate");
612
631
  const sColor = aDayTypes[0].color?.toLowerCase();
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * The MontsRow works with UI5Date or JavaScript Date objects, but only the month and the year are used to display and interact.
71
71
  * As representation for a month, the 1st of the month will always be returned in the API.
72
72
  * @extends sap.ui.core.Control
73
- * @version 1.151.0
73
+ * @version 1.152.0
74
74
  *
75
75
  * @constructor
76
76
  * @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.151.0
37
+ * @version 1.152.0
38
38
  *
39
39
  * @constructor
40
40
  * @private
@@ -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.151.0
72
+ * @version 1.152.0
73
73
  *
74
74
  * @constructor
75
75
  * @public
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * The WeeksRow works with UI5Date or JavaScript Date objects for its API, but internally uses CalendarDate objects for calculations.
42
42
  *
43
43
  * @extends sap.ui.core.Control
44
- * @version 1.151.0
44
+ * @version 1.152.0
45
45
  *
46
46
  * @constructor
47
47
  * @private
@@ -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.151.0
64
+ * @version 1.152.0
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.151.0
48
+ * @version 1.152.0
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.151.0
35
+ * @version 1.152.0
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.151.0",
42
+ version: "1.152.0",
43
43
  dependencies : ["sap.ui.core"],
44
44
  designtime: "sap/ui/unified/designtime/library.designtime",
45
45
  types: [