@openui5/sap.ui.unified 1.148.0 → 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 +2 -2
- 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 +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/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 +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 +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/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
|
@@ -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
|
|
@@ -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
|