@openui5/sap.ui.unified 1.147.1 → 1.149.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 +3 -3
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +9 -4
- 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 +1 -1
- package/src/sap/ui/unified/CalendarRowRenderer.js +23 -18
- package/src/sap/ui/unified/CalendarTimeInterval.js +10 -13
- 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 +19 -6
- 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/MonthlyRecurrenceRule.js +58 -0
- package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/RecurrenceRule.js +112 -0
- package/src/sap/ui/unified/RecurringCalendarAppointment.js +222 -0
- package/src/sap/ui/unified/RecurringNonWorkingPeriod.js +112 -6
- 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/WeeklyRecurrenceRule.js +39 -0
- package/src/sap/ui/unified/YearlyRecurrenceRule.js +53 -0
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +14 -2
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +124 -50
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +6 -7
- 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 +653 -113
- package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
- package/src/sap/ui/unified/calendar/WeeksRow.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 +73 -2
- package/src/sap/ui/unified/messagebundle_ko.properties +2 -2
- package/src/sap/ui/unified/messagebundle_zh_CN.properties +4 -4
- package/src/sap/ui/unified/messagebundle_zh_TW.properties +6 -6
- package/src/sap/ui/unified/themes/base/Calendar.less +76 -205
- package/src/sap/ui/unified/themes/base/FileUploader.less +2 -2
- package/src/sap/ui/unified/themes/sap_hcb/Calendar.less +3 -10
- package/src/sap/ui/unified/themes/sap_hcb/base_Calendar.less +54 -112
|
@@ -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.
|
|
30
|
+
* @version 1.149.0
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|
|
@@ -201,7 +201,19 @@ sap.ui.define([
|
|
|
201
201
|
* Holds a reference to the currently shown picker. Possible values: month, monthPicker, yearPicker and yearRangePicker.
|
|
202
202
|
* @private
|
|
203
203
|
*/
|
|
204
|
-
_currentPicker : {type : "string", group : "Appearance", visibility: "hidden"}
|
|
204
|
+
_currentPicker : {type : "string", group : "Appearance", visibility: "hidden"},
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Alignment of the left content area. Possible values: "Start", "Center", "End".
|
|
208
|
+
* @private
|
|
209
|
+
*/
|
|
210
|
+
_alignLeft : {type : "string", defaultValue : "Center", visibility: "hidden"},
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Alignment of the right content area. Possible values: "Start", "Center", "End".
|
|
214
|
+
* @private
|
|
215
|
+
*/
|
|
216
|
+
_alignRight : {type : "string", defaultValue : "Center", visibility: "hidden"}
|
|
205
217
|
|
|
206
218
|
},
|
|
207
219
|
events : {
|
|
@@ -15,6 +15,49 @@ sap.ui.define([
|
|
|
15
15
|
|
|
16
16
|
var MAX_HEADER_BUTTONS = 5;
|
|
17
17
|
|
|
18
|
+
// Header button slots rendered by renderCalendarButtons (B0..B4)
|
|
19
|
+
var HEADER_BUTTONS = {
|
|
20
|
+
// Optional first text button (normally day label in consumers that use it)
|
|
21
|
+
DAY: 0,
|
|
22
|
+
// Primary month and year buttons of the currently focused month
|
|
23
|
+
PRIMARY_MONTH: 1,
|
|
24
|
+
PRIMARY_YEAR: 2,
|
|
25
|
+
// Secondary month and year buttons (used when showing multiple months)
|
|
26
|
+
SECONDARY_MONTH: 3,
|
|
27
|
+
SECONDARY_YEAR: 4
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// Render order for button groups by locale/date-order convention and month layout.
|
|
31
|
+
// CJK locales use year-month-day order; non-CJK locales use day-month-year order.
|
|
32
|
+
var HEADER_BUTTON_GROUPS = {
|
|
33
|
+
// Japanese/Chinese: year appears before month in header button sequence
|
|
34
|
+
CJK: {
|
|
35
|
+
TWO_MONTHS: {
|
|
36
|
+
// Left = primary month/year content, Right = secondary month/year content
|
|
37
|
+
LEFT: [HEADER_BUTTONS.PRIMARY_YEAR, HEADER_BUTTONS.PRIMARY_MONTH],
|
|
38
|
+
RIGHT: [HEADER_BUTTONS.SECONDARY_YEAR, HEADER_BUTTONS.SECONDARY_MONTH]
|
|
39
|
+
},
|
|
40
|
+
DEFAULT: {
|
|
41
|
+
// Single-content layout in CJK order: secondary year/month, primary year/month, optional day
|
|
42
|
+
LEFT: [HEADER_BUTTONS.SECONDARY_YEAR, HEADER_BUTTONS.SECONDARY_MONTH, HEADER_BUTTONS.PRIMARY_YEAR, HEADER_BUTTONS.PRIMARY_MONTH, HEADER_BUTTONS.DAY],
|
|
43
|
+
RIGHT: []
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
// Non-CJK locales: day-month-year order
|
|
47
|
+
DEFAULT: {
|
|
48
|
+
TWO_MONTHS: {
|
|
49
|
+
// Left = optional day + primary month/year, Right = secondary month/year
|
|
50
|
+
LEFT: [HEADER_BUTTONS.DAY, HEADER_BUTTONS.PRIMARY_MONTH, HEADER_BUTTONS.PRIMARY_YEAR],
|
|
51
|
+
RIGHT: [HEADER_BUTTONS.SECONDARY_MONTH, HEADER_BUTTONS.SECONDARY_YEAR]
|
|
52
|
+
},
|
|
53
|
+
DEFAULT: {
|
|
54
|
+
// Single-content layout in non-CJK order
|
|
55
|
+
LEFT: [HEADER_BUTTONS.DAY, HEADER_BUTTONS.PRIMARY_MONTH, HEADER_BUTTONS.PRIMARY_YEAR, HEADER_BUTTONS.SECONDARY_MONTH, HEADER_BUTTONS.SECONDARY_YEAR],
|
|
56
|
+
RIGHT: []
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
18
61
|
/**
|
|
19
62
|
* Header renderer.
|
|
20
63
|
* @namespace
|
|
@@ -92,58 +135,101 @@ sap.ui.define([
|
|
|
92
135
|
oRm.icon("sap-icon://slim-arrow-left", null, { title: null });
|
|
93
136
|
oRm.close("button");
|
|
94
137
|
|
|
138
|
+
// Determine content-button groups and order.
|
|
139
|
+
// Prev/next/today are rendered separately and are not part of these groups.
|
|
140
|
+
var bIsCJK = sLanguage.toLowerCase() === "ja" || sLanguage.toLowerCase() === "zh";
|
|
141
|
+
var bIsTwoMonths = this._isTwoMonthsCalendar(oHead);
|
|
142
|
+
var aLeftButtons, aRightButtons;
|
|
143
|
+
|
|
144
|
+
var oGroupConfig = bIsCJK ? HEADER_BUTTON_GROUPS.CJK : HEADER_BUTTON_GROUPS.DEFAULT;
|
|
145
|
+
var oLayoutGroup = bIsTwoMonths ? oGroupConfig.TWO_MONTHS : oGroupConfig.DEFAULT;
|
|
146
|
+
aLeftButtons = oLayoutGroup.LEFT;
|
|
147
|
+
aRightButtons = oLayoutGroup.RIGHT;
|
|
148
|
+
|
|
149
|
+
// Compute first/last visible button across all groups
|
|
95
150
|
var iFirst = -1;
|
|
96
151
|
var iLast = -1;
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
for (
|
|
100
|
-
if (this.getVisibleButton(oHead,
|
|
152
|
+
var j;
|
|
153
|
+
var aAllButtons = aLeftButtons.concat(aRightButtons);
|
|
154
|
+
for (j = 0; j < aAllButtons.length; j++) {
|
|
155
|
+
if (this.getVisibleButton(oHead, aAllButtons[j])) {
|
|
101
156
|
if (iFirst < 0) {
|
|
102
|
-
iFirst =
|
|
157
|
+
iFirst = aAllButtons[j];
|
|
103
158
|
}
|
|
104
|
-
iLast =
|
|
159
|
+
iLast = aAllButtons[j];
|
|
105
160
|
}
|
|
106
161
|
}
|
|
162
|
+
if (bIsTwoMonths) {
|
|
163
|
+
iFirst = HEADER_BUTTONS.PRIMARY_YEAR;
|
|
164
|
+
iLast = HEADER_BUTTONS.SECONDARY_MONTH;
|
|
165
|
+
}
|
|
107
166
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// this is why the numbers of the buttons are hard-coded
|
|
115
|
-
if (this._isTwoMonthsCalendar(oHead)) {
|
|
116
|
-
switch (i) {
|
|
117
|
-
case 0:
|
|
118
|
-
iBtn = 2;
|
|
119
|
-
break;
|
|
120
|
-
case 2:
|
|
121
|
-
iBtn = 4;
|
|
122
|
-
break;
|
|
123
|
-
case 1:
|
|
124
|
-
iBtn = 1;
|
|
125
|
-
break;
|
|
126
|
-
case 3:
|
|
127
|
-
iBtn = 3;
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
iBtn = i;
|
|
167
|
+
// Check if right content has visible buttons
|
|
168
|
+
var bHasRightContent = false;
|
|
169
|
+
for (j = 0; j < aRightButtons.length; j++) {
|
|
170
|
+
if (this.getVisibleButton(oHead, aRightButtons[j])) {
|
|
171
|
+
bHasRightContent = true;
|
|
172
|
+
break;
|
|
133
173
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Left content container
|
|
177
|
+
var sAlignLeft = oHead.getProperty("_alignLeft") || "Center";
|
|
178
|
+
oRm.openStart("div", sId + "-contentLeft");
|
|
179
|
+
oRm.class("sapUiCalHeadContent");
|
|
180
|
+
oRm.class("sapUiCalHeadAlign" + sAlignLeft);
|
|
181
|
+
oRm.openEnd();
|
|
182
|
+
|
|
183
|
+
for (j = 0; j < aLeftButtons.length; j++) {
|
|
184
|
+
this.renderCalendarButtons(oRm, oHead, sId, iFirst, iLast, aLeftButtons[j]);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Placeholder when no buttons are visible
|
|
188
|
+
var bAnyVisible = false;
|
|
189
|
+
for (j = 0; j < MAX_HEADER_BUTTONS; j++) {
|
|
190
|
+
if (this.getVisibleButton(oHead, j)) {
|
|
191
|
+
bAnyVisible = true;
|
|
192
|
+
break;
|
|
137
193
|
}
|
|
138
|
-
this.renderCalendarButtons(oRm, oHead, sId, iFirst, iLast, iBtn);
|
|
139
194
|
}
|
|
140
|
-
if (!
|
|
195
|
+
if (!bAnyVisible) {
|
|
141
196
|
oRm.openStart("div", sId + '-B' + "-Placeholder");
|
|
142
197
|
oRm.class("sapUiCalHeadBPlaceholder");
|
|
143
|
-
oRm.openEnd();
|
|
144
|
-
oRm.close("
|
|
198
|
+
oRm.openEnd();
|
|
199
|
+
oRm.close("div");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
oRm.close("div"); // contentLeft
|
|
203
|
+
|
|
204
|
+
// Right content container (only if visible buttons exist)
|
|
205
|
+
if (bHasRightContent) {
|
|
206
|
+
var sAlignRight = oHead.getProperty("_alignRight") || "Center";
|
|
207
|
+
oRm.openStart("div", sId + "-contentRight");
|
|
208
|
+
oRm.class("sapUiCalHeadContent");
|
|
209
|
+
oRm.class("sapUiCalHeadAlign" + sAlignRight);
|
|
210
|
+
oRm.openEnd();
|
|
211
|
+
|
|
212
|
+
for (j = 0; j < aRightButtons.length; j++) {
|
|
213
|
+
this.renderCalendarButtons(oRm, oHead, sId, iFirst, iLast, aRightButtons[j]);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
oRm.close("div"); // contentRight
|
|
145
217
|
}
|
|
146
218
|
|
|
219
|
+
// Today button
|
|
220
|
+
if (oHead.getVisibleCurrentDateButton()) {
|
|
221
|
+
oRm.openStart("button", sId + '-today');
|
|
222
|
+
oRm.attr("title", sLabelToday);
|
|
223
|
+
oRm.accessibilityState(null, { label: sLabelToday});
|
|
224
|
+
|
|
225
|
+
oRm.class("sapUiCalHeadB");
|
|
226
|
+
oRm.class("sapUiCalHeadToday");
|
|
227
|
+
oRm.openEnd(); // button element
|
|
228
|
+
oRm.icon("sap-icon://appointment", null, { title: null });
|
|
229
|
+
oRm.close("button");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Next button
|
|
147
233
|
oRm.openStart("button", sId + '-next');
|
|
148
234
|
oRm.attr("title", sNextBtnTitle);
|
|
149
235
|
oRm.accessibilityState(null, {
|
|
@@ -163,18 +249,6 @@ sap.ui.define([
|
|
|
163
249
|
oRm.icon("sap-icon://slim-arrow-right", null, { title: null });
|
|
164
250
|
oRm.close("button");
|
|
165
251
|
|
|
166
|
-
if (oHead.getVisibleCurrentDateButton()) {
|
|
167
|
-
oRm.openStart("button", sId + '-today');
|
|
168
|
-
oRm.attr("title", sLabelToday);
|
|
169
|
-
oRm.accessibilityState(null, { label: sLabelToday});
|
|
170
|
-
|
|
171
|
-
oRm.class("sapUiCalHeadB");
|
|
172
|
-
oRm.class("sapUiCalHeadToday");
|
|
173
|
-
oRm.openEnd(); // button element
|
|
174
|
-
oRm.icon("sap-icon://appointment", null, { title: null });
|
|
175
|
-
oRm.close("button");
|
|
176
|
-
}
|
|
177
|
-
|
|
178
252
|
oRm.close("div");
|
|
179
253
|
|
|
180
254
|
};
|
|
@@ -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.
|
|
35
|
+
* @version 1.149.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.
|
|
81
|
+
* @version 1.149.0
|
|
82
82
|
*
|
|
83
83
|
* @constructor
|
|
84
84
|
* @public
|
|
@@ -889,9 +889,6 @@ sap.ui.define([
|
|
|
889
889
|
i = 0,
|
|
890
890
|
oFocusedDate = this.getProperty("_focusedDate"),
|
|
891
891
|
bSelectionBetween = false,
|
|
892
|
-
oParent = this.getParent(),
|
|
893
|
-
iMonths = this._bCalendar && oParent.getMonths(),
|
|
894
|
-
bDifferentMonthDates,
|
|
895
892
|
oArrangedDates;
|
|
896
893
|
|
|
897
894
|
for (i = 0; i < aSelectedDates.length; i++) {
|
|
@@ -905,9 +902,7 @@ sap.ui.define([
|
|
|
905
902
|
oEndDate = oArrangedDates.endDate;
|
|
906
903
|
}
|
|
907
904
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
bSelectionBetween = this._isMarkingUnfinishedRangeAllowed() && oFocusedDate && !bDifferentMonthDates &&
|
|
905
|
+
bSelectionBetween = this._isMarkingUnfinishedRangeAllowed() && oFocusedDate && !this._selectedWithMouse &&
|
|
911
906
|
(CalendarUtils._isBetween(oDate, oStartDate, oFocusedDate, true) || CalendarUtils._isBetween(oDate, oFocusedDate, oStartDate, true));
|
|
912
907
|
|
|
913
908
|
if (oStartDate && !oEndDate && oDate.isSame(oStartDate)) {
|
|
@@ -1187,6 +1182,9 @@ sap.ui.define([
|
|
|
1187
1182
|
};
|
|
1188
1183
|
|
|
1189
1184
|
Month.prototype.onkeydown = function(oEvent){
|
|
1185
|
+
if (this.getIntervalSelection()) {
|
|
1186
|
+
this._selectedWithMouse = false;
|
|
1187
|
+
}
|
|
1190
1188
|
if (oEvent.which === KeyCodes.SPACE){
|
|
1191
1189
|
this.bSpaceButtonPressed = true;
|
|
1192
1190
|
}
|
|
@@ -2162,6 +2160,7 @@ sap.ui.define([
|
|
|
2162
2160
|
if (oEvent.type === "mousedown" && this.getIntervalSelection()) {
|
|
2163
2161
|
// as in the focus event the month can be changed, store the last target here
|
|
2164
2162
|
this._sLastTargetId = oDomRef.id;
|
|
2163
|
+
this._selectedWithMouse = true;
|
|
2165
2164
|
}
|
|
2166
2165
|
|
|
2167
2166
|
if (bFireFocus) {
|
|
@@ -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.
|
|
71
|
+
* @version 1.149.0
|
|
72
72
|
*
|
|
73
73
|
* @constructor
|
|
74
74
|
* @public
|