@openui5/sap.ui.unified 1.126.1 → 1.128.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 +1 -1
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +1 -1
- package/src/sap/ui/unified/CalendarAppointment.js +1 -1
- package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +1 -1
- package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
- package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarRow.js +27 -23
- package/src/sap/ui/unified/CalendarRowRenderer.js +60 -6
- 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 +74 -25
- package/src/sap/ui/unified/MenuItem.js +102 -7
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuItemGroup.js +233 -0
- package/src/sap/ui/unified/MenuRenderer.js +48 -22
- package/src/sap/ui/unified/MenuTextFieldItem.js +7 -3
- package/src/sap/ui/unified/NonWorkingPeriod.js +110 -0
- package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +82 -0
- 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 +81 -0
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +1 -1
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +1 -1
- 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/RecurrenceUtils.js +146 -0
- 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/designtime/messagebundle_en_US_saptrc.properties +6 -6
- package/src/sap/ui/unified/library.js +55 -3
- package/src/sap/ui/unified/messagebundle.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ar.properties +2 -0
- package/src/sap/ui/unified/messagebundle_bg.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ca.properties +2 -0
- package/src/sap/ui/unified/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/unified/messagebundle_cs.properties +2 -0
- package/src/sap/ui/unified/messagebundle_cy.properties +2 -0
- package/src/sap/ui/unified/messagebundle_da.properties +2 -0
- package/src/sap/ui/unified/messagebundle_de.properties +3 -1
- package/src/sap/ui/unified/messagebundle_el.properties +2 -0
- package/src/sap/ui/unified/messagebundle_en.properties +2 -0
- package/src/sap/ui/unified/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/unified/messagebundle_en_US_sappsd.properties +14 -6
- package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/unified/messagebundle_en_US_saptrc.properties +68 -60
- package/src/sap/ui/unified/messagebundle_es.properties +2 -0
- package/src/sap/ui/unified/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/unified/messagebundle_et.properties +2 -0
- package/src/sap/ui/unified/messagebundle_fi.properties +2 -0
- package/src/sap/ui/unified/messagebundle_fr.properties +2 -0
- package/src/sap/ui/unified/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/unified/messagebundle_hi.properties +2 -0
- package/src/sap/ui/unified/messagebundle_hr.properties +2 -0
- package/src/sap/ui/unified/messagebundle_hu.properties +2 -0
- package/src/sap/ui/unified/messagebundle_id.properties +2 -0
- package/src/sap/ui/unified/messagebundle_it.properties +2 -0
- package/src/sap/ui/unified/messagebundle_iw.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ja.properties +2 -0
- package/src/sap/ui/unified/messagebundle_kk.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ko.properties +2 -0
- package/src/sap/ui/unified/messagebundle_lt.properties +2 -0
- package/src/sap/ui/unified/messagebundle_lv.properties +2 -0
- package/src/sap/ui/unified/messagebundle_mk.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ms.properties +2 -0
- package/src/sap/ui/unified/messagebundle_nl.properties +2 -0
- package/src/sap/ui/unified/messagebundle_no.properties +2 -0
- package/src/sap/ui/unified/messagebundle_pl.properties +2 -0
- package/src/sap/ui/unified/messagebundle_pt.properties +2 -0
- package/src/sap/ui/unified/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ro.properties +2 -0
- package/src/sap/ui/unified/messagebundle_ru.properties +2 -0
- package/src/sap/ui/unified/messagebundle_sh.properties +2 -0
- package/src/sap/ui/unified/messagebundle_sk.properties +2 -0
- package/src/sap/ui/unified/messagebundle_sl.properties +2 -0
- package/src/sap/ui/unified/messagebundle_sr.properties +2 -0
- package/src/sap/ui/unified/messagebundle_sv.properties +2 -0
- package/src/sap/ui/unified/messagebundle_th.properties +2 -0
- package/src/sap/ui/unified/messagebundle_tr.properties +2 -0
- package/src/sap/ui/unified/messagebundle_uk.properties +2 -0
- package/src/sap/ui/unified/messagebundle_vi.properties +2 -0
- package/src/sap/ui/unified/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/unified/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/unified/themes/base/Calendar.less +36 -1
- package/src/sap/ui/unified/themes/base/Menu.less +20 -7
package/THIRDPARTY.txt
CHANGED
|
@@ -468,7 +468,7 @@ License: Apache-2.0
|
|
|
468
468
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
469
469
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
470
470
|
|
|
471
|
-
Component: SAP Theming Base Content, version: 11.
|
|
471
|
+
Component: SAP Theming Base Content, version: 11.16.1
|
|
472
472
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
473
473
|
License: Apache-2.0
|
|
474
474
|
License Text: https://github.com/SAP/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.128.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/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.128.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2024 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.128.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -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.128.0
|
|
63
63
|
*
|
|
64
64
|
* @constructor
|
|
65
65
|
* @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.
|
|
68
|
+
* @version 1.128.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.128.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -23,7 +23,6 @@ sap.ui.define([
|
|
|
23
23
|
"sap/ui/dom/containsOrEquals",
|
|
24
24
|
"sap/ui/thirdparty/jquery",
|
|
25
25
|
"sap/ui/unified/CalendarAppointment",
|
|
26
|
-
'sap/ui/core/InvisibleMessage',
|
|
27
26
|
'sap/ui/core/library',
|
|
28
27
|
"sap/ui/core/date/UI5Date"
|
|
29
28
|
], function(
|
|
@@ -44,7 +43,6 @@ sap.ui.define([
|
|
|
44
43
|
containsOrEquals,
|
|
45
44
|
jQuery,
|
|
46
45
|
CalendarAppointment,
|
|
47
|
-
InvisibleMessage,
|
|
48
46
|
corelibrary,
|
|
49
47
|
UI5Date
|
|
50
48
|
) {
|
|
@@ -68,8 +66,6 @@ sap.ui.define([
|
|
|
68
66
|
// shortcut for sap.ui.unified.CalendarAppointmentRoundWidth
|
|
69
67
|
var CalendarAppointmentRoundWidth = library.CalendarAppointmentRoundWidth;
|
|
70
68
|
|
|
71
|
-
var InvisibleMessageMode = corelibrary.InvisibleMessageMode;
|
|
72
|
-
|
|
73
69
|
/*
|
|
74
70
|
* <code>UniversalDate</code> objects are used inside the <code>CalendarRow</code>, whereas UI5Date or JavaScript dates are used in the API.
|
|
75
71
|
* So conversion must be done on API functions.
|
|
@@ -88,7 +84,7 @@ sap.ui.define([
|
|
|
88
84
|
* @class
|
|
89
85
|
* A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
|
|
90
86
|
* @extends sap.ui.core.Control
|
|
91
|
-
* @version 1.
|
|
87
|
+
* @version 1.128.0
|
|
92
88
|
*
|
|
93
89
|
* @constructor
|
|
94
90
|
* @public
|
|
@@ -253,6 +249,12 @@ sap.ui.define([
|
|
|
253
249
|
*/
|
|
254
250
|
appointments : {type : "sap.ui.unified.CalendarAppointment", defaultClass: CalendarAppointment, multiple : true, singularName : "appointment"},
|
|
255
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Sets the provided period to be displayed as a non-working.
|
|
254
|
+
* @since 1.128
|
|
255
|
+
*/
|
|
256
|
+
nonWorkingPeriods: {type: "sap.ui.unified.NonWorkingPeriod", multiple: true},
|
|
257
|
+
|
|
256
258
|
/**
|
|
257
259
|
* Appointments to be displayed in the top of the intervals. The <code>intervalHeaders</code> are used to visualize
|
|
258
260
|
* public holidays and similar things.
|
|
@@ -362,9 +364,10 @@ sap.ui.define([
|
|
|
362
364
|
|
|
363
365
|
this._bRTL = Localization.getRTL();
|
|
364
366
|
this._oRb = Library.getResourceBundleFor("sap.ui.unified");
|
|
367
|
+
var pattern = this._oRb.getText("APPOINTMENT_DATE_TIME_DESCRIPTION", [_getLocaleData.call(this).getDatePattern("long"), _getLocaleData.call(this).getTimePattern("medium")]);
|
|
365
368
|
|
|
366
369
|
this._oFormatAria = DateFormat.getDateTimeInstance({
|
|
367
|
-
pattern: "EEEE
|
|
370
|
+
pattern: "EEEE " + pattern
|
|
368
371
|
});
|
|
369
372
|
|
|
370
373
|
this._aVisibleAppointments = [];
|
|
@@ -414,8 +417,6 @@ sap.ui.define([
|
|
|
414
417
|
this._updateSelectedAppointmentsArray(oApp);
|
|
415
418
|
}.bind(this));
|
|
416
419
|
}
|
|
417
|
-
|
|
418
|
-
this._oInvisibleMessage = InvisibleMessage.getInstance();
|
|
419
420
|
};
|
|
420
421
|
|
|
421
422
|
CalendarRow.prototype.onAfterRendering = function(){
|
|
@@ -619,7 +620,7 @@ sap.ui.define([
|
|
|
619
620
|
CalendarRow.prototype.onsapselect = function(oEvent){
|
|
620
621
|
// focused appointment must be selected
|
|
621
622
|
var aVisibleAppointments = this._getVisibleAppointments(),
|
|
622
|
-
oAppointment
|
|
623
|
+
oAppointment;
|
|
623
624
|
|
|
624
625
|
|
|
625
626
|
for (var i = 0; i < aVisibleAppointments.length; i++) {
|
|
@@ -631,9 +632,6 @@ sap.ui.define([
|
|
|
631
632
|
}
|
|
632
633
|
}
|
|
633
634
|
|
|
634
|
-
sBundleKey = oAppointment.getSelected() ? "APPOINTMENT_SELECTED" : "APPOINTMENT_UNSELECTED";
|
|
635
|
-
this._oInvisibleMessage.announce(this._oRb.getText(sBundleKey), InvisibleMessageMode.Polite);
|
|
636
|
-
|
|
637
635
|
//To prevent bubbling into PlanningCalendar.
|
|
638
636
|
//For appointments, this will prevent tap event on ColumnListItem, which in turn fires rowSelectionChange.
|
|
639
637
|
oEvent.stopPropagation();
|
|
@@ -1686,11 +1684,12 @@ sap.ui.define([
|
|
|
1686
1684
|
|
|
1687
1685
|
var i = 0;
|
|
1688
1686
|
var oApp;
|
|
1689
|
-
var
|
|
1690
|
-
var
|
|
1691
|
-
var
|
|
1687
|
+
var sAriaDescribedBy;
|
|
1688
|
+
var sAriaDescribedByNotSelected;
|
|
1689
|
+
var sCurrentAriaDescribedBy;
|
|
1690
|
+
var sCurrentAriaDescribedBySelected;
|
|
1691
|
+
var sCurrentAriaDescribedByNotSelected;
|
|
1692
1692
|
var sSelectedTextId = InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT_SELECTED");
|
|
1693
|
-
var sUnselectedTextId = InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT_UNSELECTED");
|
|
1694
1693
|
var bSelect = !oAppointment.getSelected();
|
|
1695
1694
|
|
|
1696
1695
|
if (bRemoveOldSelection) {
|
|
@@ -1709,25 +1708,30 @@ sap.ui.define([
|
|
|
1709
1708
|
this.aSelectedAppointments.splice(j);
|
|
1710
1709
|
}
|
|
1711
1710
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
oApp.$().attr("aria-
|
|
1711
|
+
sAriaDescribedBy = oApp.$().attr("aria-describedby");
|
|
1712
|
+
sAriaDescribedByNotSelected = sAriaDescribedBy ? sAriaDescribedBy.replace(sSelectedTextId, "") : "";
|
|
1713
|
+
oApp.$().attr("aria-describedby", sAriaDescribedByNotSelected);
|
|
1715
1714
|
}
|
|
1716
1715
|
}
|
|
1717
1716
|
}
|
|
1718
1717
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1718
|
+
sCurrentAriaDescribedBy = oAppointment.$().attr("aria-describedby");
|
|
1719
|
+
sCurrentAriaDescribedByNotSelected = (sCurrentAriaDescribedBy ? sCurrentAriaDescribedBy.replace(sSelectedTextId, "") : "").trim();
|
|
1720
|
+
sCurrentAriaDescribedBySelected = (sCurrentAriaDescribedByNotSelected + " " + sSelectedTextId).trim();
|
|
1721
1721
|
|
|
1722
1722
|
if (oAppointment.getSelected()) {
|
|
1723
1723
|
oAppointment.setProperty("selected", false, true); // do not invalidate CalendarRow
|
|
1724
1724
|
oAppointment.$().removeClass("sapUiCalendarAppSel");
|
|
1725
|
-
|
|
1725
|
+
if (sCurrentAriaDescribedByNotSelected) {
|
|
1726
|
+
oAppointment.$().attr("aria-describedby", sCurrentAriaDescribedByNotSelected);
|
|
1727
|
+
} else {
|
|
1728
|
+
oAppointment.$().removeAttr("aria-describedby");
|
|
1729
|
+
}
|
|
1726
1730
|
_removeAllAppointmentSelections(this, bRemoveOldSelection);
|
|
1727
1731
|
} else {
|
|
1728
1732
|
oAppointment.setProperty("selected", true, true); // do not invalidate CalendarRow
|
|
1729
1733
|
oAppointment.$().addClass("sapUiCalendarAppSel");
|
|
1730
|
-
oAppointment.$().attr("aria-
|
|
1734
|
+
oAppointment.$().attr("aria-describedby", sCurrentAriaDescribedBySelected);
|
|
1731
1735
|
_removeAllAppointmentSelections(this, bRemoveOldSelection);
|
|
1732
1736
|
}
|
|
1733
1737
|
// removes or adds the selected appointments from this.aSelectedAppointments
|
|
@@ -13,7 +13,8 @@ sap.ui.define([
|
|
|
13
13
|
'sap/ui/Device',
|
|
14
14
|
'sap/ui/unified/library',
|
|
15
15
|
'sap/ui/core/InvisibleText',
|
|
16
|
-
|
|
16
|
+
'sap/ui/core/date/UI5Date',
|
|
17
|
+
'sap/ui/unified/calendar/RecurrenceUtils',
|
|
17
18
|
'sap/base/Log',
|
|
18
19
|
// side effect: required by RenderManager#icon
|
|
19
20
|
'sap/ui/core/IconPool'
|
|
@@ -28,6 +29,7 @@ sap.ui.define([
|
|
|
28
29
|
library,
|
|
29
30
|
InvisibleText,
|
|
30
31
|
UI5Date,
|
|
32
|
+
RecurrenceUtils,
|
|
31
33
|
Log
|
|
32
34
|
) {
|
|
33
35
|
"use strict";
|
|
@@ -264,6 +266,11 @@ sap.ui.define([
|
|
|
264
266
|
};
|
|
265
267
|
|
|
266
268
|
CalendarRowRenderer.renderInterval = function(oRm, oRow, iInterval, iWidth, aIntervalHeaders, aNonWorkingItems, iStartOffset, iNonWorkingMax, aNonWorkingSubItems, iSubStartOffset, iNonWorkingSubMax, bFirstOfType, bLastOfType){
|
|
269
|
+
const oStartDateInterval = oRow.getStartDate();
|
|
270
|
+
const oEndDate = UI5Date.getInstance(oRow.getStartDate());
|
|
271
|
+
oEndDate.setDate(oEndDate.getDate() + 1);
|
|
272
|
+
const oCellStartDate = UI5Date.getInstance(oStartDateInterval);
|
|
273
|
+
oCellStartDate.setHours(iInterval + iStartOffset);
|
|
267
274
|
|
|
268
275
|
var sId = oRow.getId() + "-AppsInt" + iInterval;
|
|
269
276
|
var i;
|
|
@@ -271,6 +278,17 @@ sap.ui.define([
|
|
|
271
278
|
var iMonth = oRow.getStartDate().getMonth();
|
|
272
279
|
var iDaysLength = UI5Date.getInstance(oRow.getStartDate().getFullYear(), iMonth + 1, 0).getDate();
|
|
273
280
|
|
|
281
|
+
const aFilteredNonWorkingRange = oRow.getIntervalType() !== CalendarIntervalType.Hour ?
|
|
282
|
+
[] :
|
|
283
|
+
oRow.getNonWorkingPeriods().filter((oPeriod) => {
|
|
284
|
+
const hasOccurrenceOnDate = RecurrenceUtils.hasOccurrenceOnDate.bind(oPeriod);
|
|
285
|
+
return hasOccurrenceOnDate(oStartDateInterval);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
const aFilteredItemsForCurrentHours = aFilteredNonWorkingRange.filter((oPeriod) => {
|
|
289
|
+
return oPeriod.hasNonWorkingAtHour(oCellStartDate);
|
|
290
|
+
});
|
|
291
|
+
|
|
274
292
|
oRm.openStart("div", sId);
|
|
275
293
|
oRm.class("sapUiCalendarRowAppsInt");
|
|
276
294
|
oRm.style("width", iWidth + "%");
|
|
@@ -298,6 +316,16 @@ sap.ui.define([
|
|
|
298
316
|
this.writeCustomAttributes(oRm, oRow);
|
|
299
317
|
oRm.openEnd(); // div element
|
|
300
318
|
|
|
319
|
+
if (aFilteredItemsForCurrentHours.length) {
|
|
320
|
+
RecurrenceUtils.getWorkingAndNonWorkingSegments(oCellStartDate, aFilteredItemsForCurrentHours).forEach((oHourParts) => {
|
|
321
|
+
if (oHourParts.type === "working") {
|
|
322
|
+
this.renderWorkingParts(oRm, oHourParts.duration);
|
|
323
|
+
} else {
|
|
324
|
+
this.renderNonWorkingParts(oRm, oHourParts.duration);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
301
329
|
if (bShowIntervalHeaders) {
|
|
302
330
|
oRm.openStart("div");
|
|
303
331
|
oRm.class("sapUiCalendarRowAppsIntHead");
|
|
@@ -508,9 +536,14 @@ sap.ui.define([
|
|
|
508
536
|
var sIcon = oAppointment.getIcon();
|
|
509
537
|
var sId = oAppointment.getId();
|
|
510
538
|
var bReducedHeight = oRow._getAppointmentReducedHeight(oAppointmentInfo);
|
|
539
|
+
var bAppointmentSelected = oAppointment.getSelected();
|
|
511
540
|
var mAccProps = {
|
|
512
541
|
role: "listitem",
|
|
513
|
-
labelledby: {
|
|
542
|
+
labelledby: {
|
|
543
|
+
value: `${InvisibleText.getStaticId("sap.m", "ACC_CTR_TYPE_LISTITEM")} ${InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT")} ${sId.concat("-Descr")}`,
|
|
544
|
+
append: true
|
|
545
|
+
},
|
|
546
|
+
describedby: {value: bAppointmentSelected ? InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT_SELECTED") : "", append: true},
|
|
514
547
|
selected: null
|
|
515
548
|
};
|
|
516
549
|
var iRowCount = oRow._getAppointmentRowCount(oAppointmentInfo, bReducedHeight);
|
|
@@ -532,11 +565,9 @@ sap.ui.define([
|
|
|
532
565
|
oRm.openStart("div", oAppointment);
|
|
533
566
|
oRm.class("sapUiCalendarApp");
|
|
534
567
|
oRm.class("sapUiCalendarAppHeight" + iRowCount);
|
|
535
|
-
|
|
568
|
+
|
|
569
|
+
if (bAppointmentSelected) {
|
|
536
570
|
oRm.class("sapUiCalendarAppSel");
|
|
537
|
-
mAccProps["labelledby"].value = InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT_SELECTED") + " " + mAccProps["labelledby"].value;
|
|
538
|
-
} else {
|
|
539
|
-
mAccProps["labelledby"].value = InvisibleText.getStaticId("sap.ui.unified", "APPOINTMENT_UNSELECTED") + " " + mAccProps["labelledby"].value;
|
|
540
571
|
}
|
|
541
572
|
|
|
542
573
|
if (oAppointment.getTentative()) {
|
|
@@ -878,6 +909,29 @@ sap.ui.define([
|
|
|
878
909
|
return aResult;
|
|
879
910
|
};
|
|
880
911
|
|
|
912
|
+
CalendarRowRenderer.renderWorkingParts = function (oRm, iDuration){
|
|
913
|
+
const iWidth = iDuration / 60 * 100;
|
|
914
|
+
|
|
915
|
+
oRm.openStart("div");
|
|
916
|
+
oRm.style("width", `${iWidth}%`);
|
|
917
|
+
oRm.style("height", "inherit" );
|
|
918
|
+
oRm.style("display","inline-block");
|
|
919
|
+
oRm.openEnd();
|
|
920
|
+
oRm.close("div");
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
CalendarRowRenderer.renderNonWorkingParts = function (oRm, iDuration){
|
|
924
|
+
const iWidth = iDuration / 60 * 100;
|
|
925
|
+
|
|
926
|
+
oRm.openStart("div");
|
|
927
|
+
oRm.style("width", `${iWidth}%`);
|
|
928
|
+
oRm.class("sapUiCalendarRowAppsNoWork");
|
|
929
|
+
oRm.style("height", "inherit" );
|
|
930
|
+
oRm.style("display","inline-block");
|
|
931
|
+
oRm.openEnd();
|
|
932
|
+
oRm.close("div");
|
|
933
|
+
};
|
|
934
|
+
|
|
881
935
|
/**
|
|
882
936
|
* Retrieves text for given CalendarDayType based on given type and legend items.
|
|
883
937
|
* @param {sap.ui.unified.CalendarDayType} sType the type to obtain information about
|
|
@@ -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.128.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.128.0
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|