@openui5/sap.ui.unified 1.144.0 → 1.146.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/REUSE.toml +40 -16
- package/THIRDPARTY.txt +28 -7
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +67 -18
- package/src/sap/ui/unified/CalendarAppointment.js +1 -1
- package/src/sap/ui/unified/CalendarDateInterval.js +68 -13
- package/src/sap/ui/unified/CalendarDateIntervalRenderer.js +13 -0
- 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 +6 -1
- package/src/sap/ui/unified/CalendarRowRenderer.js +2 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +60 -6
- package/src/sap/ui/unified/CalendarTimeIntervalRenderer.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 +26 -32
- package/src/sap/ui/unified/FileUploaderHttpRequestMethod.js +14 -0
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderRenderer.js +0 -9
- 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/CalendarUtils.js +17 -0
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRowRenderer.js +0 -38
- 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/MonthPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/MonthRenderer.js +28 -8
- package/src/sap/ui/unified/calendar/MonthsRow.js +9 -2
- package/src/sap/ui/unified/calendar/MonthsRowRenderer.js +4 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/RecurrenceUtils.js +4 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
- package/src/sap/ui/unified/calendar/WeeksRow.js +219 -0
- package/src/sap/ui/unified/calendar/WeeksRowRenderer.js +114 -0
- 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 +3 -0
- package/src/sap/ui/unified/messagebundle_ar.properties +48 -6
- package/src/sap/ui/unified/messagebundle_bg.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ca.properties +48 -6
- package/src/sap/ui/unified/messagebundle_cnr.properties +48 -6
- package/src/sap/ui/unified/messagebundle_cs.properties +48 -6
- package/src/sap/ui/unified/messagebundle_cy.properties +48 -6
- package/src/sap/ui/unified/messagebundle_da.properties +49 -7
- package/src/sap/ui/unified/messagebundle_de.properties +51 -9
- package/src/sap/ui/unified/messagebundle_el.properties +48 -6
- package/src/sap/ui/unified/messagebundle_en.properties +48 -6
- package/src/sap/ui/unified/messagebundle_en_GB.properties +48 -6
- package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +48 -6
- package/src/sap/ui/unified/messagebundle_es.properties +48 -6
- package/src/sap/ui/unified/messagebundle_es_MX.properties +55 -13
- package/src/sap/ui/unified/messagebundle_et.properties +48 -6
- package/src/sap/ui/unified/messagebundle_fi.properties +48 -6
- package/src/sap/ui/unified/messagebundle_fr.properties +48 -6
- package/src/sap/ui/unified/messagebundle_fr_CA.properties +48 -6
- package/src/sap/ui/unified/messagebundle_hi.properties +48 -6
- package/src/sap/ui/unified/messagebundle_hr.properties +48 -6
- package/src/sap/ui/unified/messagebundle_hu.properties +48 -6
- package/src/sap/ui/unified/messagebundle_id.properties +48 -6
- package/src/sap/ui/unified/messagebundle_it.properties +48 -6
- package/src/sap/ui/unified/messagebundle_iw.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ja.properties +48 -6
- package/src/sap/ui/unified/messagebundle_kk.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ko.properties +48 -6
- package/src/sap/ui/unified/messagebundle_lt.properties +52 -10
- package/src/sap/ui/unified/messagebundle_lv.properties +48 -6
- package/src/sap/ui/unified/messagebundle_mk.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ms.properties +48 -6
- package/src/sap/ui/unified/messagebundle_nl.properties +48 -6
- package/src/sap/ui/unified/messagebundle_no.properties +48 -6
- package/src/sap/ui/unified/messagebundle_pl.properties +48 -6
- package/src/sap/ui/unified/messagebundle_pt.properties +48 -6
- package/src/sap/ui/unified/messagebundle_pt_PT.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ro.properties +48 -6
- package/src/sap/ui/unified/messagebundle_ru.properties +48 -6
- package/src/sap/ui/unified/messagebundle_sh.properties +48 -6
- package/src/sap/ui/unified/messagebundle_sk.properties +48 -6
- package/src/sap/ui/unified/messagebundle_sl.properties +48 -6
- package/src/sap/ui/unified/messagebundle_sr.properties +48 -6
- package/src/sap/ui/unified/messagebundle_sv.properties +48 -6
- package/src/sap/ui/unified/messagebundle_th.properties +48 -6
- package/src/sap/ui/unified/messagebundle_tr.properties +48 -6
- package/src/sap/ui/unified/messagebundle_uk.properties +51 -9
- package/src/sap/ui/unified/messagebundle_vi.properties +50 -8
- package/src/sap/ui/unified/messagebundle_zh_CN.properties +48 -6
- package/src/sap/ui/unified/messagebundle_zh_TW.properties +48 -6
- package/src/sap/ui/unified/themes/base/Calendar.less +148 -38
- package/src/sap/ui/unified/themes/base/CalendarDateInterval.less +13 -1
- package/src/sap/ui/unified/themes/base/CalendarTimeInterval.less +17 -0
- package/src/sap/ui/unified/themes/base/FileUploader.less +25 -1
- package/src/sap/ui/unified/themes/base/IndexPicker.less +13 -8
- package/src/sap/ui/unified/themes/sap_hcb/base_Calendar.less +2 -1
|
@@ -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.146.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.146.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -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.
|
|
87
|
+
* @version 1.146.0
|
|
88
88
|
*
|
|
89
89
|
* @constructor
|
|
90
90
|
* @public
|
|
@@ -1466,6 +1466,11 @@ sap.ui.define([
|
|
|
1466
1466
|
|
|
1467
1467
|
for (i = 0; i < aAppointments.length; i++) {
|
|
1468
1468
|
oAppointment = aAppointments[i];
|
|
1469
|
+
|
|
1470
|
+
if (!oAppointment || !oAppointment.getStartDate()) {
|
|
1471
|
+
continue;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1469
1474
|
var oAppointmentStartDate = CalendarUtils._createUniversalUTCDate(oAppointment.getStartDate(), undefined, true);
|
|
1470
1475
|
oAppointmentStartDate.setUTCSeconds(0); // ignore seconds
|
|
1471
1476
|
oAppointmentStartDate.setUTCMilliseconds(0); // ignore milliseconds
|
|
@@ -266,9 +266,10 @@ sap.ui.define([
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
CalendarRowRenderer.renderInterval = function(oRm, oRow, iInterval, iWidth, aIntervalHeaders, aNonWorkingItems, iStartOffset, iNonWorkingMax, aNonWorkingSubItems, iSubStartOffset, iNonWorkingSubMax, bFirstOfType, bLastOfType){
|
|
269
|
-
const oStartDateInterval = oRow.getStartDate();
|
|
269
|
+
const oStartDateInterval = UI5Date.getInstance(oRow.getStartDate());
|
|
270
270
|
const oCellStartDate = UI5Date.getInstance(oStartDateInterval);
|
|
271
271
|
oCellStartDate.setHours(iInterval + iStartOffset, 0, 0, 0);
|
|
272
|
+
oStartDateInterval.setHours(oStartDateInterval.getHours() + iInterval);
|
|
272
273
|
|
|
273
274
|
var sId = oRow.getId() + "-AppsInt" + iInterval;
|
|
274
275
|
var i;
|
|
@@ -18,6 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
'./calendar/DatesRow',
|
|
19
19
|
'./calendar/MonthPicker',
|
|
20
20
|
'./calendar/YearPicker',
|
|
21
|
+
'./calendar/WeeksRow',
|
|
21
22
|
'sap/ui/core/date/UniversalDate',
|
|
22
23
|
'./library',
|
|
23
24
|
'sap/ui/core/format/DateFormat',
|
|
@@ -29,7 +30,8 @@ sap.ui.define([
|
|
|
29
30
|
"sap/base/Log",
|
|
30
31
|
"sap/ui/unified/DateRange",
|
|
31
32
|
"sap/ui/core/date/UI5Date",
|
|
32
|
-
"sap/ui/unified/Calendar"
|
|
33
|
+
"sap/ui/unified/Calendar",
|
|
34
|
+
"sap/ui/unified/library"
|
|
33
35
|
], function(
|
|
34
36
|
Formatting,
|
|
35
37
|
Localization,
|
|
@@ -43,6 +45,7 @@ sap.ui.define([
|
|
|
43
45
|
DatesRow,
|
|
44
46
|
MonthPicker,
|
|
45
47
|
YearPicker,
|
|
48
|
+
WeeksRow,
|
|
46
49
|
UniversalDate,
|
|
47
50
|
library,
|
|
48
51
|
DateFormat,
|
|
@@ -54,10 +57,13 @@ sap.ui.define([
|
|
|
54
57
|
Log,
|
|
55
58
|
DateRange,
|
|
56
59
|
UI5Date,
|
|
57
|
-
Calendar
|
|
60
|
+
Calendar,
|
|
61
|
+
unifiedLibrary
|
|
58
62
|
) {
|
|
59
63
|
"use strict";
|
|
60
64
|
|
|
65
|
+
const CalendarIntervalType = unifiedLibrary.CalendarIntervalType;
|
|
66
|
+
|
|
61
67
|
/*
|
|
62
68
|
* Inside the CalendarTimeInterval UniversalDate objects are used. But in the API JS dates are used.
|
|
63
69
|
* So conversion must be done on API functions.
|
|
@@ -72,7 +78,7 @@ sap.ui.define([
|
|
|
72
78
|
* @class
|
|
73
79
|
* Calendar with granularity of time items displayed in one line.
|
|
74
80
|
* @extends sap.ui.core.Control
|
|
75
|
-
* @version 1.
|
|
81
|
+
* @version 1.146.0
|
|
76
82
|
*
|
|
77
83
|
* @constructor
|
|
78
84
|
* @public
|
|
@@ -178,7 +184,8 @@ sap.ui.define([
|
|
|
178
184
|
timesRow : {type : "sap.ui.unified.calendar.TimesRow", multiple : false, visibility : "hidden"},
|
|
179
185
|
datesRow : {type : "sap.ui.unified.calendar.Month", multiple : false, visibility : "hidden"},
|
|
180
186
|
monthPicker : {type : "sap.ui.unified.calendar.MonthPicker", multiple : false, visibility : "hidden"},
|
|
181
|
-
yearPicker : {type : "sap.ui.unified.calendar.YearPicker", multiple : false, visibility : "hidden"}
|
|
187
|
+
yearPicker : {type : "sap.ui.unified.calendar.YearPicker", multiple : false, visibility : "hidden"},
|
|
188
|
+
weeksRow : {type : "sap.ui.unified.calendar.WeeksRow", multiple : false, visibility : "hidden"}
|
|
182
189
|
|
|
183
190
|
},
|
|
184
191
|
associations: {
|
|
@@ -253,6 +260,8 @@ sap.ui.define([
|
|
|
253
260
|
|
|
254
261
|
this._initializeYearPicker();
|
|
255
262
|
|
|
263
|
+
this._initializeWeeksRow();
|
|
264
|
+
|
|
256
265
|
this.setPickerPopup(false); // to initialize DatesRow
|
|
257
266
|
|
|
258
267
|
this._iItemsHead = 15; // if more than this number of items, day information are displayed on top of items
|
|
@@ -295,6 +304,13 @@ sap.ui.define([
|
|
|
295
304
|
oYearPicker._setSelectedDatesControlOrigin(this);
|
|
296
305
|
};
|
|
297
306
|
|
|
307
|
+
CalendarTimeInterval.prototype._initializeWeeksRow = function() {
|
|
308
|
+
const oWeeksRow = new WeeksRow(this.getId() + "-WeekNumbersRow", {
|
|
309
|
+
visible: false
|
|
310
|
+
});
|
|
311
|
+
this.setAggregation("weeksRow", oWeeksRow);
|
|
312
|
+
};
|
|
313
|
+
|
|
298
314
|
CalendarTimeInterval.prototype._createDatesRow = function() {
|
|
299
315
|
var oDatesRow = new DatesRow(this.getId() + "--DatesRow", {
|
|
300
316
|
days: 18,
|
|
@@ -974,6 +990,10 @@ sap.ui.define([
|
|
|
974
990
|
Control.prototype.setProperty.apply(this, arguments);
|
|
975
991
|
|
|
976
992
|
if (sPropName === "_currentPicker") {
|
|
993
|
+
const oWeeksRow = this.getAggregation("weeksRow");
|
|
994
|
+
if (oWeeksRow) {
|
|
995
|
+
oWeeksRow.setVisible(false);
|
|
996
|
+
}
|
|
977
997
|
switch (sPropValue) {
|
|
978
998
|
case "timesRow": this._iMode = 0; break;
|
|
979
999
|
case "datesRow": this._iMode = 1; break;
|
|
@@ -1014,7 +1034,13 @@ sap.ui.define([
|
|
|
1014
1034
|
} else {
|
|
1015
1035
|
oDate.setUTCDate(oDate.getUTCDate() - iDays);
|
|
1016
1036
|
}
|
|
1037
|
+
|
|
1017
1038
|
_setDateInDatesRow.call(this, oDate);
|
|
1039
|
+
const oWeeksRow = this.getAggregation("weeksRow");
|
|
1040
|
+
if (oWeeksRow) {
|
|
1041
|
+
oDate.setDate(oDate.getDate() - iDays + 1);
|
|
1042
|
+
oWeeksRow.setStartDate(CalendarUtils._createLocalDate(oDate, false));
|
|
1043
|
+
}
|
|
1018
1044
|
}
|
|
1019
1045
|
break;
|
|
1020
1046
|
|
|
@@ -1079,6 +1105,11 @@ sap.ui.define([
|
|
|
1079
1105
|
oDate.setUTCDate(oDate.getUTCDate() + iDays);
|
|
1080
1106
|
}
|
|
1081
1107
|
_setDateInDatesRow.call(this, oDate);
|
|
1108
|
+
const oWeeksRow = this.getAggregation("weeksRow");
|
|
1109
|
+
if (oWeeksRow) {
|
|
1110
|
+
oDate.setDate(oDate.getDate() - iDays + 1);
|
|
1111
|
+
oWeeksRow.setStartDate(CalendarUtils._createLocalDate(oDate, false));
|
|
1112
|
+
}
|
|
1082
1113
|
}
|
|
1083
1114
|
|
|
1084
1115
|
break;
|
|
@@ -1256,6 +1287,26 @@ sap.ui.define([
|
|
|
1256
1287
|
this._getCalendar()._closePickers();
|
|
1257
1288
|
}
|
|
1258
1289
|
|
|
1290
|
+
CalendarTimeInterval.prototype._showWeeksRow = function() {
|
|
1291
|
+
const oWeeksRow = this.getAggregation("weeksRow");
|
|
1292
|
+
if (!oWeeksRow) {
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
const oDatesRow = this.getAggregation("datesRow");
|
|
1297
|
+
if (oDatesRow) {
|
|
1298
|
+
oWeeksRow.setInterval(oDatesRow.getDays());
|
|
1299
|
+
oWeeksRow.setStartDate(oDatesRow.getStartDate());
|
|
1300
|
+
oWeeksRow.setPrimaryCalendarType(oDatesRow.getPrimaryCalendarType());
|
|
1301
|
+
oWeeksRow.setShowWeekNumbers(oDatesRow.getShowWeekNumbers());
|
|
1302
|
+
oWeeksRow.setViewKey(CalendarIntervalType.Day);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
oWeeksRow.setVisible(true);
|
|
1306
|
+
|
|
1307
|
+
return oWeeksRow;
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1259
1310
|
/**
|
|
1260
1311
|
* Shows an embedded day Picker.
|
|
1261
1312
|
* This function assumes there is a "datesRow" aggregation.
|
|
@@ -1292,7 +1343,7 @@ sap.ui.define([
|
|
|
1292
1343
|
_setDateInDatesRow.call(this, oDate);
|
|
1293
1344
|
|
|
1294
1345
|
this._iMode = 1;
|
|
1295
|
-
|
|
1346
|
+
this._showWeeksRow();
|
|
1296
1347
|
}
|
|
1297
1348
|
|
|
1298
1349
|
/**
|
|
@@ -1591,7 +1642,10 @@ sap.ui.define([
|
|
|
1591
1642
|
}
|
|
1592
1643
|
|
|
1593
1644
|
function _handleButton0(oEvent){
|
|
1594
|
-
|
|
1645
|
+
var oWeeksRow = this.getAggregation("weeksRow");
|
|
1646
|
+
if (oWeeksRow) {
|
|
1647
|
+
oWeeksRow.setVisible(false);
|
|
1648
|
+
}
|
|
1595
1649
|
if (this._iMode != 1) {
|
|
1596
1650
|
_showDayPicker.call(this);
|
|
1597
1651
|
} else {
|
|
@@ -70,7 +70,7 @@ sap.ui.define(["sap/ui/core/Lib"],
|
|
|
70
70
|
oRm.class("sapUiCalContent");
|
|
71
71
|
oRm.openEnd();
|
|
72
72
|
oRm.renderControl(oCal.getAggregation(oCal.getProperty("_currentPicker")));
|
|
73
|
-
|
|
73
|
+
oRm.renderControl(oCal.getAggregation("weeksRow"));
|
|
74
74
|
oRm.close("div");
|
|
75
75
|
|
|
76
76
|
oRm.openStart("button", sId + "-cancel");
|
|
@@ -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.146.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.146.0
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|
|
@@ -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.
|
|
82
|
+
* @version 1.146.0
|
|
83
83
|
*
|
|
84
84
|
* @constructor
|
|
85
85
|
* @public
|
|
@@ -194,7 +194,7 @@ sap.ui.define([
|
|
|
194
194
|
* @since 1.81.0
|
|
195
195
|
*
|
|
196
196
|
*/
|
|
197
|
-
httpRequestMethod : {type: "sap.ui.unified.FileUploaderHttpRequestMethod", group : "Behavior", defaultValue : HttpRequestMethod.
|
|
197
|
+
httpRequestMethod : {type: "sap.ui.unified.FileUploaderHttpRequestMethod", group : "Behavior", defaultValue : HttpRequestMethod.POST},
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Placeholder for the text field.
|
|
@@ -286,20 +286,20 @@ sap.ui.define([
|
|
|
286
286
|
|
|
287
287
|
/**
|
|
288
288
|
* Allows users to upload all files from a given directory and its corresponding subdirectories.
|
|
289
|
-
* @since 1.105.0
|
|
290
289
|
*
|
|
291
290
|
* <b>Note:</b> This feature is supported on all WebKit-based browsers as well as Microsoft Edge and Firefox after version 50.
|
|
292
291
|
* <b>Note:</b> Multiple directory selection is not supported.
|
|
292
|
+
* @since 1.105.0
|
|
293
293
|
*/
|
|
294
294
|
directory : {type : "boolean", group : "Behavior", defaultValue : false},
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
297
|
* Indicates whether the file uploader is required.
|
|
298
|
-
* @since 1.144
|
|
299
298
|
*
|
|
300
299
|
* <b>Note:</b> The control can be marked as required either by setting this property to <code>true</code>
|
|
301
300
|
* or by using the legacy approach of setting the <code>required</code> property to <code>true</code>
|
|
302
301
|
* on a <code>sap.m.Label</code> that has its <code>labelFor</code> property pointing to this control.
|
|
302
|
+
* @since 1.144
|
|
303
303
|
*/
|
|
304
304
|
required : {type : "boolean", group : "Behavior", defaultValue : false}
|
|
305
305
|
},
|
|
@@ -761,7 +761,7 @@ sap.ui.define([
|
|
|
761
761
|
if (sTooltip) {
|
|
762
762
|
this.oFileUpload.setAttribute("title", sTooltip);
|
|
763
763
|
} else {
|
|
764
|
-
this.oFileUpload.setAttribute("title", this.getValue() ? this.getValue() : this.
|
|
764
|
+
this.oFileUpload.setAttribute("title", this.getValue() ? this.getValue() : this._getEffectivePlaceholder());
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
return this;
|
|
@@ -820,7 +820,7 @@ sap.ui.define([
|
|
|
820
820
|
|
|
821
821
|
if (!oBrowseIcon) {
|
|
822
822
|
oBrowseIcon = new Icon(this.getId() + "-fu_browse_icon", {
|
|
823
|
-
src: "sap-icon://
|
|
823
|
+
src: "sap-icon://browse-folder",
|
|
824
824
|
press: this._onBrowseIconPress.bind(this),
|
|
825
825
|
noTabStop: true
|
|
826
826
|
});
|
|
@@ -1363,20 +1363,26 @@ sap.ui.define([
|
|
|
1363
1363
|
// to change the value of file uploader INPUT elements)
|
|
1364
1364
|
this.setProperty("value", sValue, bUpload);
|
|
1365
1365
|
if (this.oFileUpload && !this.getTooltip_AsString()) {
|
|
1366
|
-
this.oFileUpload.setAttribute("title", sValue ? sValue : this.
|
|
1366
|
+
this.oFileUpload.setAttribute("title", sValue ? sValue : this._getEffectivePlaceholder());
|
|
1367
1367
|
}
|
|
1368
1368
|
|
|
1369
1369
|
const oForm = this.getDomRef("fu_form");
|
|
1370
1370
|
|
|
1371
1371
|
//reseting the input fields if setValue("") is called, also for undefined and null
|
|
1372
|
-
if (this.oFileUpload &&
|
|
1372
|
+
if (this.oFileUpload && !sValue) {
|
|
1373
1373
|
// some browsers do not allow to clear the value of the fileuploader control
|
|
1374
1374
|
// therefore we utilize the form and reset the values inside this form and
|
|
1375
1375
|
// apply the additionalData again afterwards
|
|
1376
|
-
oForm
|
|
1376
|
+
if (oForm) {
|
|
1377
|
+
oForm.reset();
|
|
1378
|
+
//keep the additional data on the form
|
|
1379
|
+
jQuery(this.FUDataEl).val(this.getAdditionalData());
|
|
1380
|
+
} else {
|
|
1381
|
+
// If the form doesn't exist (e.g., FileUploader is invisible),
|
|
1382
|
+
// directly clear the files using DataTransfer
|
|
1383
|
+
this.oFileUpload.files = new DataTransfer().files;
|
|
1384
|
+
}
|
|
1377
1385
|
this._selectedFileNames = [];
|
|
1378
|
-
//keep the additional data on the form
|
|
1379
|
-
jQuery(this.FUDataEl).val(this.getAdditionalData());
|
|
1380
1386
|
}
|
|
1381
1387
|
// only fire event when triggered by user interaction
|
|
1382
1388
|
if (bFireEvent) {
|
|
@@ -2185,19 +2191,6 @@ sap.ui.define([
|
|
|
2185
2191
|
}
|
|
2186
2192
|
};
|
|
2187
2193
|
|
|
2188
|
-
/**
|
|
2189
|
-
* Helper to retrieve the I18N text for the tooltip when there is no file chosen.
|
|
2190
|
-
* @private
|
|
2191
|
-
*/
|
|
2192
|
-
FileUploader.prototype._getNoFileChosenText = function() {
|
|
2193
|
-
// as the text is the same for all FileUploaders, get it only once
|
|
2194
|
-
if (!FileUploader.prototype._sNoFileChosenText) {
|
|
2195
|
-
FileUploader.prototype._sNoFileChosenText = this.oRb.getText("FILEUPLOADER_NO_FILE_CHOSEN");
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
return FileUploader.prototype._sNoFileChosenText ? FileUploader.prototype._sNoFileChosenText : "No file chosen";
|
|
2199
|
-
};
|
|
2200
|
-
|
|
2201
2194
|
/**
|
|
2202
2195
|
* Checks whether the Tokenizer is present and has tokens.
|
|
2203
2196
|
* @private
|
|
@@ -2312,7 +2305,15 @@ sap.ui.define([
|
|
|
2312
2305
|
bEnabled = this.getEnabled(),
|
|
2313
2306
|
sAriaRoleDescription = this._getAriaRoleDescription(),
|
|
2314
2307
|
aCombinedLabels = this._getCombinedLabelIds(),
|
|
2315
|
-
aAriaDescribedBy = this._getAriaDescribedByIds()
|
|
2308
|
+
aAriaDescribedBy = this._getAriaDescribedByIds(),
|
|
2309
|
+
sTooltip = this.getTooltip_AsString(),
|
|
2310
|
+
sValue = this.getValue(),
|
|
2311
|
+
sLabel = sTooltip || sValue || this._getEffectivePlaceholder();
|
|
2312
|
+
|
|
2313
|
+
if (sLabel) {
|
|
2314
|
+
aAttributes.push(`title="${encodeXML(sLabel)}" `);
|
|
2315
|
+
aAttributes.push(`aria-label="${encodeXML(sLabel)}" `);
|
|
2316
|
+
}
|
|
2316
2317
|
|
|
2317
2318
|
// Aria-labelledby
|
|
2318
2319
|
if (aCombinedLabels.length > 0) {
|
|
@@ -2377,13 +2378,6 @@ sap.ui.define([
|
|
|
2377
2378
|
|
|
2378
2379
|
aFileUpload.push('size="1" ');
|
|
2379
2380
|
|
|
2380
|
-
if (this.getTooltip_AsString() ) {
|
|
2381
|
-
aFileUpload.push('title="' + encodeXML(this.getTooltip_AsString()) + '" ');
|
|
2382
|
-
} else {
|
|
2383
|
-
// only if there is no tooltip, then set value or default tooltip as fallback
|
|
2384
|
-
aFileUpload.push('title="' + encodeXML(this.getValue() ? this.getValue() : this._getNoFileChosenText()) + '" ');
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
2381
|
if (!this.getEnabled()) {
|
|
2388
2382
|
aFileUpload.push('disabled="disabled" ');
|
|
2389
2383
|
}
|
|
@@ -22,11 +22,25 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
|
|
|
22
22
|
* HTTP request POST method.
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
+
POST : "POST",
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* HTTP request PUT method.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
PUT : "PUT",
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* HTTP request POST method.
|
|
35
|
+
* @public
|
|
36
|
+
* @deprecated Since 1.145.0, use {@link sap.ui.unified.FileUploaderHttpRequestMethod.POST} instead
|
|
37
|
+
*/
|
|
25
38
|
Post : "POST",
|
|
26
39
|
|
|
27
40
|
/**
|
|
28
41
|
* HTTP request PUT method.
|
|
29
42
|
* @public
|
|
43
|
+
* @deprecated Since 1.145.0, use {@link sap.ui.unified.FileUploaderHttpRequestMethod.PUT} instead
|
|
30
44
|
*/
|
|
31
45
|
Put : "PUT"
|
|
32
46
|
|
|
@@ -140,15 +140,6 @@ sap.ui.define([
|
|
|
140
140
|
oRm.renderControl(oFileUploader.oBrowse);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
if (bButtonOnly && oFileUploader._selectedFileNames.length === 0) {
|
|
144
|
-
const sName = oFileUploader.getId() + "-fu-no-file-chosen";
|
|
145
|
-
oRm.openStart("div", sName);
|
|
146
|
-
oRm.class("sapUiPseudoInvisibleText");
|
|
147
|
-
oRm.openEnd();
|
|
148
|
-
oRm.text(oFileUploader._getNoFileChosenText());
|
|
149
|
-
oRm.close("div");
|
|
150
|
-
}
|
|
151
|
-
|
|
152
143
|
oRm.openStart("span", oFileUploader.getId() + "-AccDescr");
|
|
153
144
|
oRm.class("sapUiInvisibleText");
|
|
154
145
|
oRm.attr("aria-hidden", "true");
|