@openui5/sap.ui.unified 1.139.0 → 1.141.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.
- package/THIRDPARTY.txt +2 -2
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +144 -10
- package/src/sap/ui/unified/CalendarAppointment.js +12 -1
- package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +1 -1
- package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
- package/src/sap/ui/unified/CalendarLegendRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarRow.js +1 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +1 -1
- package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
- package/src/sap/ui/unified/ColorPicker.js +1 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- package/src/sap/ui/unified/ContentSwitcher.js +1 -1
- package/src/sap/ui/unified/Currency.js +1 -1
- package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
- package/src/sap/ui/unified/DateRange.js +1 -1
- package/src/sap/ui/unified/DateTypeRange.js +1 -1
- package/src/sap/ui/unified/FileUploader.js +1 -1
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
- package/src/sap/ui/unified/Menu.js +1 -1
- package/src/sap/ui/unified/MenuItem.js +1 -1
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuItemGroup.js +1 -1
- package/src/sap/ui/unified/MenuRenderer.js +1 -1
- package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
- package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/Shell.js +1 -1
- package/src/sap/ui/unified/ShellHeadItem.js +1 -1
- package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
- package/src/sap/ui/unified/ShellLayout.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +1 -1
- package/src/sap/ui/unified/TimeRange.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +74 -2
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +60 -0
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +2 -10
- package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
- package/src/sap/ui/unified/calendar/MonthsRow.js +1 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
- package/src/sap/ui/unified/calendar/YearPicker.js +1 -1
- package/src/sap/ui/unified/calendar/YearRangePicker.js +1 -1
- package/src/sap/ui/unified/library.js +2 -2
- package/src/sap/ui/unified/messagebundle.properties +27 -0
- package/src/sap/ui/unified/messagebundle_ar.properties +18 -0
- package/src/sap/ui/unified/messagebundle_bg.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ca.properties +18 -0
- package/src/sap/ui/unified/messagebundle_cnr.properties +18 -0
- package/src/sap/ui/unified/messagebundle_cs.properties +18 -0
- package/src/sap/ui/unified/messagebundle_cy.properties +18 -0
- package/src/sap/ui/unified/messagebundle_da.properties +18 -0
- package/src/sap/ui/unified/messagebundle_de.properties +18 -0
- package/src/sap/ui/unified/messagebundle_el.properties +18 -0
- package/src/sap/ui/unified/messagebundle_en.properties +18 -0
- package/src/sap/ui/unified/messagebundle_en_GB.properties +18 -0
- package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +18 -0
- package/src/sap/ui/unified/messagebundle_es.properties +18 -0
- package/src/sap/ui/unified/messagebundle_es_MX.properties +18 -0
- package/src/sap/ui/unified/messagebundle_et.properties +18 -0
- package/src/sap/ui/unified/messagebundle_fi.properties +18 -0
- package/src/sap/ui/unified/messagebundle_fr.properties +19 -1
- package/src/sap/ui/unified/messagebundle_fr_CA.properties +18 -0
- package/src/sap/ui/unified/messagebundle_hi.properties +18 -0
- package/src/sap/ui/unified/messagebundle_hr.properties +18 -0
- package/src/sap/ui/unified/messagebundle_hu.properties +18 -0
- package/src/sap/ui/unified/messagebundle_id.properties +22 -4
- package/src/sap/ui/unified/messagebundle_it.properties +18 -0
- package/src/sap/ui/unified/messagebundle_iw.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ja.properties +18 -0
- package/src/sap/ui/unified/messagebundle_kk.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ko.properties +18 -0
- package/src/sap/ui/unified/messagebundle_lt.properties +18 -0
- package/src/sap/ui/unified/messagebundle_lv.properties +18 -0
- package/src/sap/ui/unified/messagebundle_mk.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ms.properties +18 -0
- package/src/sap/ui/unified/messagebundle_nl.properties +18 -0
- package/src/sap/ui/unified/messagebundle_no.properties +19 -1
- package/src/sap/ui/unified/messagebundle_pl.properties +18 -0
- package/src/sap/ui/unified/messagebundle_pt.properties +18 -0
- package/src/sap/ui/unified/messagebundle_pt_PT.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ro.properties +18 -0
- package/src/sap/ui/unified/messagebundle_ru.properties +18 -0
- package/src/sap/ui/unified/messagebundle_sh.properties +18 -0
- package/src/sap/ui/unified/messagebundle_sk.properties +18 -0
- package/src/sap/ui/unified/messagebundle_sl.properties +18 -0
- package/src/sap/ui/unified/messagebundle_sr.properties +18 -0
- package/src/sap/ui/unified/messagebundle_sv.properties +18 -0
- package/src/sap/ui/unified/messagebundle_th.properties +18 -0
- package/src/sap/ui/unified/messagebundle_tr.properties +18 -0
- package/src/sap/ui/unified/messagebundle_uk.properties +18 -0
- package/src/sap/ui/unified/messagebundle_vi.properties +18 -0
- package/src/sap/ui/unified/messagebundle_zh_CN.properties +18 -0
- package/src/sap/ui/unified/messagebundle_zh_TW.properties +18 -0
- package/src/sap/ui/unified/themes/base/ContentSwitcher.less +4 -0
- package/src/sap/ui/unified/themes/base/ShellHeader.less +4 -0
- package/src/sap/ui/unified/themes/base/ShellLayout.less +4 -0
- package/src/sap/ui/unified/themes/base/ShellOverlay.less +4 -0
- package/src/sap/ui/unified/themes/base/SplitContainer.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/ShellHeader.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/ShellLayout.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/ShellOverlay.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/base_ContentSwitcher.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/base_ShellHeader.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/base_ShellLayout.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/base_ShellOverlay.less +4 -0
- package/src/sap/ui/unified/themes/sap_hcb/base_SplitContainer.less +4 -0
package/THIRDPARTY.txt
CHANGED
|
@@ -379,7 +379,7 @@ License: MIT
|
|
|
379
379
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
|
|
380
380
|
Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/adaptive-expressions.js
|
|
381
381
|
|
|
382
|
-
Component: Markdown-it, version:
|
|
382
|
+
Component: Markdown-it, version: 14.1.0
|
|
383
383
|
Copyright: 2014 Vitaly Puzrin, Alex Kocharin
|
|
384
384
|
License: MIT
|
|
385
385
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
|
|
@@ -444,7 +444,7 @@ License: Apache-2.0
|
|
|
444
444
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
445
445
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
446
446
|
|
|
447
|
-
Component: SAP Theming Base Content, version: 11.
|
|
447
|
+
Component: SAP Theming Base Content, version: 11.32.2-20250827135846+79bb30d311678435d61b21db26ecbe07d6b05079
|
|
448
448
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
449
449
|
License: Apache-2.0
|
|
450
450
|
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.
|
|
3
|
+
"version": "1.141.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.
|
|
17
|
+
"@openui5/sap.ui.core": "1.141.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.141.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -11,6 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
'sap/ui/core/Control',
|
|
12
12
|
"sap/ui/core/Element",
|
|
13
13
|
'sap/ui/core/LocaleData',
|
|
14
|
+
'sap/ui/core/Lib',
|
|
14
15
|
'sap/ui/unified/calendar/CalendarUtils',
|
|
15
16
|
'sap/ui/unified/DateTypeRange',
|
|
16
17
|
'./calendar/Header',
|
|
@@ -39,6 +40,7 @@ sap.ui.define([
|
|
|
39
40
|
Control,
|
|
40
41
|
Element,
|
|
41
42
|
LocaleData,
|
|
43
|
+
Library,
|
|
42
44
|
CalendarUtils,
|
|
43
45
|
DateTypeRange,
|
|
44
46
|
Header,
|
|
@@ -78,7 +80,7 @@ sap.ui.define([
|
|
|
78
80
|
* Basic Calendar.
|
|
79
81
|
* This calendar is used for DatePickers
|
|
80
82
|
* @extends sap.ui.core.Control
|
|
81
|
-
* @version 1.
|
|
83
|
+
* @version 1.141.0
|
|
82
84
|
*
|
|
83
85
|
* @constructor
|
|
84
86
|
* @public
|
|
@@ -389,6 +391,9 @@ sap.ui.define([
|
|
|
389
391
|
|
|
390
392
|
this._iColumns = 1; // default columns for the calendar
|
|
391
393
|
|
|
394
|
+
// Cache the resource bundle for reuse throughout the control's lifecycle
|
|
395
|
+
this._oResourceBundle = Library.getResourceBundleFor("sap.ui.unified");
|
|
396
|
+
|
|
392
397
|
// Render the monthPicker first to get the length of the current month name. The _currentPicker property will
|
|
393
398
|
// be aligned to month in the first onAfterRendering.
|
|
394
399
|
this.setProperty("_currentPicker", CURRENT_PICKERS.MONTH_PICKER);
|
|
@@ -459,6 +464,10 @@ sap.ui.define([
|
|
|
459
464
|
oHeader.attachEvent("pressButton3", this._handleButton1, this);
|
|
460
465
|
oHeader.attachEvent("pressButton4", this._handleButton2, this);
|
|
461
466
|
|
|
467
|
+
// Set keyboard shortcuts for Calendar-specific usage
|
|
468
|
+
oHeader.setProperty("_keyShortcutButton1", this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON_SHORTCUT"));
|
|
469
|
+
oHeader.setProperty("_keyShortcutButton2", this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON_SHORTCUT"));
|
|
470
|
+
|
|
462
471
|
this._afterHeaderRenderAdjustCSS = this._createOnAfterRenderingDelegate(oHeader);
|
|
463
472
|
|
|
464
473
|
oHeader.addDelegate(this._afterHeaderRenderAdjustCSS);
|
|
@@ -2181,12 +2190,36 @@ sap.ui.define([
|
|
|
2181
2190
|
sAriaLabel += ", " + sSecondaryMonthInfo;
|
|
2182
2191
|
}
|
|
2183
2192
|
|
|
2193
|
+
// Use sAriaLabel instead of sText for sMonthLabel to include secondary calendar info when present
|
|
2194
|
+
var sMonthLabel = this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sAriaLabel]);
|
|
2195
|
+
var sMonthShortcut = this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON_SHORTCUT");
|
|
2196
|
+
var sMonthTooltip = `${this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sAriaLabel])} (${sMonthShortcut})`;
|
|
2197
|
+
|
|
2184
2198
|
oHeader.setTextButton1(sText);
|
|
2185
|
-
oHeader.setAriaLabelButton1(
|
|
2199
|
+
oHeader.setAriaLabelButton1(sMonthLabel);
|
|
2200
|
+
oHeader.setProperty("_tooltipButton1", sMonthTooltip);
|
|
2201
|
+
oHeader.setProperty("_descriptionButton1", sMonthLabel);
|
|
2186
2202
|
oHeader._setTextButton3(sLastMonthName);
|
|
2187
|
-
|
|
2203
|
+
// Set properties for second month button (button3) when multiple months are displayed
|
|
2204
|
+
if (aMonths.length > 1) {
|
|
2205
|
+
var sLastMonthLabel = this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sLastMonthName]);
|
|
2206
|
+
var sLastMonthTooltip = `${this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sLastMonthName])} (${sMonthShortcut})`;
|
|
2207
|
+
oHeader._setAriaLabelButton3(sLastMonthLabel);
|
|
2208
|
+
oHeader.setProperty("_tooltipButton3", sLastMonthTooltip);
|
|
2209
|
+
oHeader.setProperty("_keyShortcutButton3", sMonthShortcut);
|
|
2210
|
+
oHeader.setProperty("_descriptionButton3", sLastMonthLabel);
|
|
2211
|
+
}
|
|
2188
2212
|
oSecondMonthHeader.setTextButton1(sLastMonthName);
|
|
2189
|
-
|
|
2213
|
+
|
|
2214
|
+
// Set accessibility properties for second month header's month button (button1) when multiple months are displayed
|
|
2215
|
+
if (aMonths.length > 1) {
|
|
2216
|
+
var sSecondMonthLabel = this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sLastMonthName]);
|
|
2217
|
+
var sSecondMonthTooltip = `${this._oResourceBundle.getText("CALENDAR_HEADER_MONTH_BUTTON", [sLastMonthName])} (${sMonthShortcut})`;
|
|
2218
|
+
oSecondMonthHeader.setAriaLabelButton1(sSecondMonthLabel);
|
|
2219
|
+
oSecondMonthHeader.setProperty("_tooltipButton1", sSecondMonthTooltip);
|
|
2220
|
+
oSecondMonthHeader.setProperty("_keyShortcutButton1", sMonthShortcut);
|
|
2221
|
+
oSecondMonthHeader.setProperty("_descriptionButton1", sSecondMonthLabel);
|
|
2222
|
+
}
|
|
2190
2223
|
var oFirstDate = new CalendarDate(oDate, sPrimaryCalendarType);
|
|
2191
2224
|
oFirstDate.setDate(1); // always use the first of the month to have stable year in Japanese calendar
|
|
2192
2225
|
sYear = this._oYearFormat.format(oFirstDate.toUTCJSDate(), true);
|
|
@@ -2580,7 +2613,21 @@ sap.ui.define([
|
|
|
2580
2613
|
oSecondMonthHeader = this.getAggregation("secondMonthHeader"),
|
|
2581
2614
|
sFirstHeaderText = sFirstHeaderYear,
|
|
2582
2615
|
sSecondHeaderText = sSecondHeaderYear || sFirstHeaderYear,
|
|
2583
|
-
sPrimaryCalendarType = this._getPrimaryCalendarType()
|
|
2616
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
2617
|
+
sFirstYear, sSecondYear;
|
|
2618
|
+
|
|
2619
|
+
// Extract all required labels and tooltips at the top for better readability and reusability
|
|
2620
|
+
var sYearShortcut = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON_SHORTCUT");
|
|
2621
|
+
var sYearRangeShortcut = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_RANGE_BUTTON_SHORTCUT");
|
|
2622
|
+
|
|
2623
|
+
// Regular year button labels and tooltips
|
|
2624
|
+
var sFirstYearLabel = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON", [sFirstHeaderText]);
|
|
2625
|
+
var sFirstYearTooltip = `${sFirstYearLabel} (${sYearShortcut})`;
|
|
2626
|
+
var sSecondYearLabel = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON", [sSecondHeaderText]);
|
|
2627
|
+
var sSecondYearTooltip = `${sSecondYearLabel} (${sYearShortcut})`;
|
|
2628
|
+
|
|
2629
|
+
// Year range labels and tooltips (will be updated if in year picker mode)
|
|
2630
|
+
var sYearRangeLabel, sYearRangeTooltip;
|
|
2584
2631
|
|
|
2585
2632
|
if (this._iMode === 2 && oYearPicker) {
|
|
2586
2633
|
|
|
@@ -2588,9 +2635,7 @@ sap.ui.define([
|
|
|
2588
2635
|
oFirstDate = new CalendarDate(oDate, sPrimaryCalendarType),
|
|
2589
2636
|
oMinYear = CalendarUtils._minDate(this._getPrimaryCalendarType()).getYear(),
|
|
2590
2637
|
oMaxYear = CalendarUtils._maxDate(this._getPrimaryCalendarType()).getYear(),
|
|
2591
|
-
oSecondDate
|
|
2592
|
-
sFirstYear,
|
|
2593
|
-
sSecondYear;
|
|
2638
|
+
oSecondDate;
|
|
2594
2639
|
|
|
2595
2640
|
oFirstDate.setDate(1); // always use the first of the month to have stable year in Japanese calendar
|
|
2596
2641
|
oFirstDate.setYear(oFirstDate.getYear() - Math.floor(oYearPicker.getYears() / 2));
|
|
@@ -2612,21 +2657,110 @@ sap.ui.define([
|
|
|
2612
2657
|
} else {
|
|
2613
2658
|
sFirstHeaderText = sFirstYear + " - " + sSecondYear;
|
|
2614
2659
|
}
|
|
2660
|
+
|
|
2661
|
+
// Update year range labels for year picker mode
|
|
2662
|
+
sYearRangeLabel = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_RANGE_BUTTON", [sFirstYear, sSecondYear]);
|
|
2663
|
+
sYearRangeTooltip = `${sYearRangeLabel} (${sYearRangeShortcut})`;
|
|
2664
|
+
|
|
2665
|
+
// Set properties for button4 when in year picker mode (always set accessibility properties when button4 is used)
|
|
2666
|
+
oHeader.setProperty("_tooltipButton4", sYearRangeTooltip);
|
|
2667
|
+
oHeader.setProperty("_keyShortcutButton4", sYearRangeShortcut);
|
|
2668
|
+
oHeader.setProperty("_descriptionButton4", sYearRangeLabel);
|
|
2669
|
+
} else {
|
|
2670
|
+
// Set properties for button4 when not in year picker mode (always set accessibility properties when button4 is used)
|
|
2671
|
+
oHeader.setProperty("_tooltipButton4", sSecondYearTooltip);
|
|
2672
|
+
oHeader.setProperty("_keyShortcutButton4", sYearShortcut);
|
|
2673
|
+
oHeader.setProperty("_descriptionButton4", sSecondYearLabel);
|
|
2615
2674
|
}
|
|
2616
2675
|
|
|
2617
2676
|
oHeader._setTextButton4(sSecondHeaderText);
|
|
2618
|
-
oHeader._setAriaLabelButton4(sSecondHeaderText);
|
|
2619
2677
|
oSecondMonthHeader.setTextButton2(sSecondHeaderText);
|
|
2678
|
+
|
|
2679
|
+
// Set accessibility properties for second month header's year button (button2)
|
|
2680
|
+
// Always set these properties when second month header exists
|
|
2681
|
+
var sSecondHeaderYearLabel, sSecondHeaderYearTooltip;
|
|
2682
|
+
|
|
2683
|
+
if (this._iMode === 2 && oYearPicker) {
|
|
2684
|
+
sSecondHeaderYearLabel = sYearRangeLabel;
|
|
2685
|
+
sSecondHeaderYearTooltip = sYearRangeTooltip;
|
|
2686
|
+
} else {
|
|
2687
|
+
sSecondHeaderYearLabel = sSecondYearLabel;
|
|
2688
|
+
sSecondHeaderYearTooltip = sSecondYearTooltip;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
// Set aria-label for button4 with proper formatting
|
|
2692
|
+
oHeader._setAriaLabelButton4(sSecondHeaderYearLabel);
|
|
2693
|
+
oSecondMonthHeader.setAriaLabelButton2(sSecondHeaderYearLabel);
|
|
2694
|
+
oSecondMonthHeader.setProperty("_tooltipButton2", sSecondHeaderYearTooltip);
|
|
2695
|
+
oSecondMonthHeader.setProperty("_keyShortcutButton2", this._iMode === 2 && oYearPicker ? sYearRangeShortcut : sYearShortcut);
|
|
2696
|
+
oSecondMonthHeader.setProperty("_descriptionButton2", sSecondHeaderYearLabel);
|
|
2697
|
+
|
|
2620
2698
|
oHeader.setTextButton2(sFirstHeaderText);
|
|
2699
|
+
oHeader.setAriaLabelButton2(this._iMode === 2 && oYearPicker ? sYearRangeLabel : sFirstYearLabel);
|
|
2700
|
+
oHeader.setProperty("_tooltipButton2", this._iMode === 2 && oYearPicker ? sYearRangeTooltip : sFirstYearTooltip);
|
|
2701
|
+
oHeader.setProperty("_descriptionButton2", this._iMode === 2 && oYearPicker ? sYearRangeLabel : sFirstYearLabel);
|
|
2702
|
+
|
|
2703
|
+
// In single header with two months scenario, button2 should represent the second month's year
|
|
2704
|
+
if (this._isTwoMonthsInTwoColumns() && sSecondHeaderText !== sFirstHeaderText) {
|
|
2705
|
+
// Button2 shows second month year, so update its accessibility properties
|
|
2706
|
+
var sButton2Label = this._iMode === 2 && oYearPicker ? sYearRangeLabel : sSecondYearLabel;
|
|
2707
|
+
var sButton2Tooltip = this._iMode === 2 && oYearPicker ? sYearRangeTooltip : sSecondYearTooltip;
|
|
2708
|
+
var sButton2Shortcut = this._iMode === 2 && oYearPicker ? sYearRangeShortcut : sYearShortcut;
|
|
2709
|
+
|
|
2710
|
+
oHeader.setAriaLabelButton2(sButton2Label);
|
|
2711
|
+
oHeader.setProperty("_tooltipButton2", sButton2Tooltip);
|
|
2712
|
+
oHeader.setProperty("_keyShortcutButton2", sButton2Shortcut);
|
|
2713
|
+
oHeader.setProperty("_descriptionButton2", sButton2Label);
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
// Set properties for button4 when multiple headers are displayed
|
|
2717
|
+
if (sSecondHeaderText !== sFirstHeaderText) {
|
|
2718
|
+
var sButton4Label, sButton4Tooltip, sButton4Shortcut;
|
|
2719
|
+
if (this._iMode === 2 && oYearPicker) {
|
|
2720
|
+
// In year picker mode, extract years from the range string for button4
|
|
2721
|
+
var aYears = sSecondHeaderText.split(" - ");
|
|
2722
|
+
if (aYears.length === 2) {
|
|
2723
|
+
sButton4Label = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_RANGE_BUTTON", aYears);
|
|
2724
|
+
sButton4Tooltip = `${sButton4Label} (${sYearRangeShortcut})`;
|
|
2725
|
+
sButton4Shortcut = sYearRangeShortcut;
|
|
2726
|
+
} else {
|
|
2727
|
+
// Fallback if string format is unexpected
|
|
2728
|
+
sButton4Label = sSecondYearLabel;
|
|
2729
|
+
sButton4Tooltip = sSecondYearTooltip;
|
|
2730
|
+
sButton4Shortcut = sYearShortcut;
|
|
2731
|
+
}
|
|
2732
|
+
} else {
|
|
2733
|
+
// In other modes, use regular year button properties
|
|
2734
|
+
sButton4Label = sSecondYearLabel;
|
|
2735
|
+
sButton4Tooltip = sSecondYearTooltip;
|
|
2736
|
+
sButton4Shortcut = sYearShortcut;
|
|
2737
|
+
}
|
|
2738
|
+
oHeader.setProperty("_tooltipButton4", sButton4Tooltip);
|
|
2739
|
+
oHeader.setProperty("_keyShortcutButton4", sButton4Shortcut);
|
|
2740
|
+
oHeader.setProperty("_descriptionButton4", sButton4Label);
|
|
2741
|
+
}
|
|
2621
2742
|
};
|
|
2622
2743
|
|
|
2623
2744
|
Calendar.prototype._updateHeadersYearAdditionalText = function (sYear) {
|
|
2624
2745
|
var oHeader = this.getAggregation("header"),
|
|
2625
|
-
oSecondMonthHeader = this.getAggregation("secondMonthHeader")
|
|
2746
|
+
oSecondMonthHeader = this.getAggregation("secondMonthHeader"),
|
|
2747
|
+
sYearShortcut, sYearLabel, sYearTooltip;
|
|
2626
2748
|
|
|
2749
|
+
// Set additional text for buttons
|
|
2627
2750
|
oHeader.setAdditionalTextButton2(sYear);
|
|
2628
2751
|
oHeader._setAdditionalTextButton4(sYear);
|
|
2629
2752
|
oSecondMonthHeader.setAdditionalTextButton2(sYear);
|
|
2753
|
+
|
|
2754
|
+
// Set accessibility properties for button4 (same as in _updateHeadersYearPrimaryText)
|
|
2755
|
+
if (sYear) {
|
|
2756
|
+
sYearShortcut = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON_SHORTCUT");
|
|
2757
|
+
sYearLabel = this._oResourceBundle.getText("CALENDAR_HEADER_YEAR_BUTTON", [sYear]);
|
|
2758
|
+
sYearTooltip = `${sYearLabel} (${sYearShortcut})`;
|
|
2759
|
+
|
|
2760
|
+
oHeader.setProperty("_tooltipButton4", sYearTooltip);
|
|
2761
|
+
oHeader.setProperty("_keyShortcutButton4", sYearShortcut);
|
|
2762
|
+
oHeader.setProperty("_descriptionButton4", sYearLabel);
|
|
2763
|
+
}
|
|
2630
2764
|
};
|
|
2631
2765
|
|
|
2632
2766
|
Calendar.prototype._adjustYearRangeDisplay = function() {
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
*
|
|
44
44
|
* Applications could inherit from this element to add own fields.
|
|
45
45
|
* @extends sap.ui.unified.DateTypeRange
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.141.0
|
|
47
47
|
*
|
|
48
48
|
* @constructor
|
|
49
49
|
* @public
|
|
@@ -115,9 +115,20 @@ sap.ui.define([
|
|
|
115
115
|
* and may lead to unpredictable results.</li>
|
|
116
116
|
* </ul>
|
|
117
117
|
*
|
|
118
|
+
* <b>Note:</b> When using the <code>customContent</code> aggregation, it is the application developer's responsibility
|
|
119
|
+
* to add appropriate labels to the <code>ariaLabelledBy</code> association to provide accessible information about this
|
|
120
|
+
* appointment as the standard properties (<code>title</code>, <code>text</code>, <code>description</code>, and <code>icon</code>)
|
|
121
|
+
* are ignored, which means screen readers will have no information about the appointment unless proper ARIA labeling is implemented.
|
|
122
|
+
*
|
|
118
123
|
* @since 1.93.0
|
|
119
124
|
*/
|
|
120
125
|
customContent: { type: "sap.ui.core.Control", multiple: true }
|
|
126
|
+
},
|
|
127
|
+
associations : {
|
|
128
|
+
/**
|
|
129
|
+
* Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledBy).
|
|
130
|
+
*/
|
|
131
|
+
ariaLabelledBy: {type : "sap.ui.core.Control", multiple : true, singularName : "ariaLabelledBy"}
|
|
121
132
|
}
|
|
122
133
|
}});
|
|
123
134
|
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @class
|
|
60
60
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
61
61
|
* @extends sap.ui.unified.Calendar
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.141.0
|
|
63
63
|
*
|
|
64
64
|
* @constructor
|
|
65
65
|
* @public
|
|
@@ -59,7 +59,7 @@ sap.ui.define(['sap/ui/core/InvisibleText', "sap/ui/core/Lib", "sap/ui/unified/l
|
|
|
59
59
|
|
|
60
60
|
if (aStandardItems) {
|
|
61
61
|
// rendering standard days and colors
|
|
62
|
-
iIdLength = oLeg.getId().length + 1; //+1, because of the
|
|
62
|
+
iIdLength = oLeg.getId().length + 1; //+1, because of the hyphen in "CalLeg1-Today"?
|
|
63
63
|
for (i = 0; i < aStandardItems.length; ++i) {
|
|
64
64
|
var sClass = "sapUiUnifiedLegend" + aStandardItems[i].getId().slice(iIdLength);
|
|
65
65
|
this.renderLegendItem(oRm, sClass, aStandardItems[i], ["sapUiUnifiedLegendSquareColor"], iIndex++, iCount);
|
|
@@ -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.
|
|
68
|
+
* @version 1.141.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.
|
|
60
|
+
* @version 1.141.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -39,7 +39,7 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarUtils', 'sap/ui/unified/calendar
|
|
|
39
39
|
* its start date to the first date of the same week as the date the user chose.
|
|
40
40
|
*
|
|
41
41
|
* @extends sap.ui.unified.CalendarDateInterval
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.141.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -25,7 +25,7 @@ sap.ui.define(['./DateRange', './library'],
|
|
|
25
25
|
* @class
|
|
26
26
|
* Date range with calendar day type information. Used to visualize special days in the Calendar.
|
|
27
27
|
* @extends sap.ui.unified.DateRange
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.141.0
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|