@openui5/sap.ui.unified 1.98.0 → 1.101.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/.eslintrc.json +19 -0
- package/THIRDPARTY.txt +6 -6
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +25 -253
- package/src/sap/ui/unified/CalendarAppointment.js +46 -9
- package/src/sap/ui/unified/CalendarDateInterval.js +5 -15
- package/src/sap/ui/unified/CalendarLegend.js +4 -4
- package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
- package/src/sap/ui/unified/CalendarMonthInterval.js +2 -141
- package/src/sap/ui/unified/CalendarMonthIntervalRenderer.js +3 -12
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +2 -2
- package/src/sap/ui/unified/CalendarRenderer.js +3 -14
- package/src/sap/ui/unified/CalendarRow.js +59 -26
- package/src/sap/ui/unified/CalendarRowRenderer.js +14 -13
- package/src/sap/ui/unified/CalendarTimeInterval.js +2 -209
- package/src/sap/ui/unified/CalendarTimeIntervalRenderer.js +3 -14
- package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
- package/src/sap/ui/unified/ColorPicker.js +2 -4
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- package/src/sap/ui/unified/ColorPickerRenderer.js +3 -3
- package/src/sap/ui/unified/ContentSwitcher.js +2 -2
- package/src/sap/ui/unified/ContentSwitcherRenderer.js +1 -1
- package/src/sap/ui/unified/Currency.js +2 -2
- package/src/sap/ui/unified/CurrencyRenderer.js +2 -2
- 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 +3 -2
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderRenderer.js +2 -3
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
- package/src/sap/ui/unified/Menu.js +3 -3
- package/src/sap/ui/unified/MenuItem.js +1 -1
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuRenderer.js +2 -2
- package/src/sap/ui/unified/MenuTextFieldItem.js +3 -4
- package/src/sap/ui/unified/Shell.js +2 -2
- 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 +2 -2
- package/src/sap/ui/unified/ShellLayoutRenderer.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +1 -1
- package/src/sap/ui/unified/ShellOverlayRenderer.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +3 -3
- package/src/sap/ui/unified/SplitContainerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/CalendarDate.js +12 -3
- package/src/sap/ui/unified/calendar/CalendarUtils.js +33 -17
- package/src/sap/ui/unified/calendar/DatesRow.js +2 -2
- package/src/sap/ui/unified/calendar/Header.js +2 -2
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +2 -4
- package/src/sap/ui/unified/calendar/IndexPicker.js +5 -4
- package/src/sap/ui/unified/calendar/IndexPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +19 -17
- package/src/sap/ui/unified/calendar/MonthPicker.js +3 -3
- package/src/sap/ui/unified/calendar/MonthRenderer.js +3 -3
- package/src/sap/ui/unified/calendar/MonthsRow.js +2 -2
- package/src/sap/ui/unified/calendar/MonthsRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +3 -4
- package/src/sap/ui/unified/calendar/TimesRow.js +4 -4
- package/src/sap/ui/unified/calendar/TimesRowRenderer.js +21 -2
- package/src/sap/ui/unified/calendar/YearPicker.js +29 -21
- package/src/sap/ui/unified/calendar/YearPickerRenderer.js +20 -14
- package/src/sap/ui/unified/calendar/YearRangePicker.js +18 -21
- package/src/sap/ui/unified/calendar/YearRangePickerRenderer.js +8 -1
- package/src/sap/ui/unified/library.js +12 -15
- 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 +3 -1
- package/src/sap/ui/unified/messagebundle_ca.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 +2 -0
- 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 +2 -0
- package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +6 -0
- package/src/sap/ui/unified/messagebundle_en_US_saptrc.properties +2 -0
- 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_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_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 +7 -1
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"overrides": [
|
|
3
|
+
/*
|
|
4
|
+
* Productive code, sample and unit test code of sap.ui.unified has been cleaned up.
|
|
5
|
+
* No more references to the global jQuery allowed
|
|
6
|
+
*/
|
|
7
|
+
{
|
|
8
|
+
"files": [
|
|
9
|
+
"src/**/*.js",
|
|
10
|
+
"test/sap/ui/unified/demokit/**/*.js",
|
|
11
|
+
"test/sap/ui/unified/sample/**/*.js",
|
|
12
|
+
"test/sap/ui/unified/qunit/**/*.js"
|
|
13
|
+
],
|
|
14
|
+
"globals": {
|
|
15
|
+
"jQuery": "off"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
package/THIRDPARTY.txt
CHANGED
|
@@ -197,7 +197,7 @@ License: BSD-3-Clause
|
|
|
197
197
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
|
198
198
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
|
|
199
199
|
|
|
200
|
-
Component: URI.js, version: 1.19.
|
|
200
|
+
Component: URI.js, version: 1.19.10
|
|
201
201
|
Copyright: Rodney Rehm
|
|
202
202
|
License: MIT
|
|
203
203
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
@@ -400,7 +400,7 @@ Contained in: src/sap.ui.mdc/test/sap/ui/mdc/sample/field/filterfieldwithoperato
|
|
|
400
400
|
|
|
401
401
|
Library: sap.ui.webc.common:
|
|
402
402
|
|
|
403
|
-
Component: UI5 Web Components, version: 1.
|
|
403
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
404
404
|
Copyright: SAP
|
|
405
405
|
License: Apache-2.0
|
|
406
406
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -411,7 +411,7 @@ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.*
|
|
|
411
411
|
src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
|
|
412
412
|
src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/*.*
|
|
413
413
|
|
|
414
|
-
Component: lit-html, version:
|
|
414
|
+
Component: lit-html, version: 2.0.1
|
|
415
415
|
Copyright: Google LLC
|
|
416
416
|
License: BSD-3-Clause
|
|
417
417
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
|
@@ -420,7 +420,7 @@ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/
|
|
|
420
420
|
|
|
421
421
|
Library: sap.ui.webc.fiori:
|
|
422
422
|
|
|
423
|
-
Component: UI5 Web Components, version: 1.
|
|
423
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
424
424
|
Copyright: SAP
|
|
425
425
|
License: Apache-2.0
|
|
426
426
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -429,7 +429,7 @@ Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/*.*
|
|
|
429
429
|
|
|
430
430
|
Library: sap.ui.webc.main:
|
|
431
431
|
|
|
432
|
-
Component: UI5 Web Components, version: 1.
|
|
432
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
433
433
|
Copyright: SAP
|
|
434
434
|
License: Apache-2.0
|
|
435
435
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -450,7 +450,7 @@ License: Apache-2.0
|
|
|
450
450
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
451
451
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
452
452
|
|
|
453
|
-
Component: SAP Theming Base Content, version: 11.1.
|
|
453
|
+
Component: SAP Theming Base Content, version: 11.1.38
|
|
454
454
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
455
455
|
License: Apache-2.0
|
|
456
456
|
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.101.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.101.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2022 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.101.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
//Provides control sap.ui.unified.Calendar.
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
'sap/ui/core/CalendarType',
|
|
8
9
|
'sap/ui/core/Control',
|
|
10
|
+
'sap/ui/core/Core',
|
|
9
11
|
'sap/ui/core/LocaleData',
|
|
10
12
|
'sap/ui/unified/calendar/CalendarUtils',
|
|
11
|
-
'sap/ui/unified/DateRange',
|
|
12
13
|
'sap/ui/unified/DateTypeRange',
|
|
13
14
|
'./calendar/Header',
|
|
14
15
|
'./calendar/Month',
|
|
@@ -28,10 +29,11 @@ sap.ui.define([
|
|
|
28
29
|
"sap/base/util/deepEqual",
|
|
29
30
|
"sap/base/Log"
|
|
30
31
|
], function(
|
|
32
|
+
CalendarType,
|
|
31
33
|
Control,
|
|
34
|
+
oCore,
|
|
32
35
|
LocaleData,
|
|
33
36
|
CalendarUtils,
|
|
34
|
-
DateRange,
|
|
35
37
|
DateTypeRange,
|
|
36
38
|
Header,
|
|
37
39
|
Month,
|
|
@@ -53,8 +55,6 @@ sap.ui.define([
|
|
|
53
55
|
) {
|
|
54
56
|
"use strict";
|
|
55
57
|
|
|
56
|
-
var oCore = sap.ui.getCore(),
|
|
57
|
-
CalendarType = sap.ui.core.CalendarType;
|
|
58
58
|
/*
|
|
59
59
|
* Inside the Calendar CalendarDate objects are used. But in the API JS dates are used.
|
|
60
60
|
* So conversion must be done on API functions.
|
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
* Basic Calendar.
|
|
71
71
|
* This calendar is used for DatePickers
|
|
72
72
|
* @extends sap.ui.core.Control
|
|
73
|
-
* @version 1.
|
|
73
|
+
* @version 1.101.0
|
|
74
74
|
*
|
|
75
75
|
* @constructor
|
|
76
76
|
* @public
|
|
@@ -304,7 +304,7 @@ sap.ui.define([
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
}});
|
|
307
|
+
}, renderer: CalendarRenderer});
|
|
308
308
|
|
|
309
309
|
/*
|
|
310
310
|
* There are different modes (stored in this._iMode)
|
|
@@ -563,6 +563,13 @@ sap.ui.define([
|
|
|
563
563
|
}
|
|
564
564
|
this._bInitMonth = undefined;
|
|
565
565
|
}
|
|
566
|
+
|
|
567
|
+
var oSecondMonthHeader = this.getAggregation("secondMonthHeader");
|
|
568
|
+
if (oSecondMonthHeader.getDomRef()) {
|
|
569
|
+
// Second month header buttons are unreachable via keyboard
|
|
570
|
+
oSecondMonthHeader.getDomRef("B1").setAttribute("tabindex", "-1");
|
|
571
|
+
oSecondMonthHeader.getDomRef("B2").setAttribute("tabindex", "-1");
|
|
572
|
+
}
|
|
566
573
|
};
|
|
567
574
|
|
|
568
575
|
Calendar.prototype.removeSelectedDate = function(oSelectedDate) {
|
|
@@ -771,22 +778,6 @@ sap.ui.define([
|
|
|
771
778
|
|
|
772
779
|
};
|
|
773
780
|
|
|
774
|
-
/**
|
|
775
|
-
* sets the Popup mode
|
|
776
|
-
* e.G. Tab-chain should not leave calendar
|
|
777
|
-
* only for internal use
|
|
778
|
-
* @param {boolean} bPoupupMode <code>PopupMode</code>
|
|
779
|
-
* @returns {this} <code>this</code> to allow method chaining
|
|
780
|
-
* @private
|
|
781
|
-
*/
|
|
782
|
-
Calendar.prototype.setPopupMode = function(bPoupupMode){
|
|
783
|
-
|
|
784
|
-
this._bPoupupMode = bPoupupMode;
|
|
785
|
-
|
|
786
|
-
return this;
|
|
787
|
-
|
|
788
|
-
};
|
|
789
|
-
|
|
790
781
|
Calendar.prototype.setMonths = function(iMonths){
|
|
791
782
|
|
|
792
783
|
this._bDateRangeChanged = undefined; // to force rerendering
|
|
@@ -1197,236 +1188,6 @@ sap.ui.define([
|
|
|
1197
1188
|
|
|
1198
1189
|
Calendar.prototype.onsaphide = Calendar.prototype.onsapshow;
|
|
1199
1190
|
|
|
1200
|
-
Calendar.prototype.onsaptabnext = function(oEvent){
|
|
1201
|
-
var oHeader = this.getAggregation("header");
|
|
1202
|
-
|
|
1203
|
-
if (containsOrEquals(this.getDomRef("content"), oEvent.target)) {
|
|
1204
|
-
if (oHeader.getVisibleButton1()) {
|
|
1205
|
-
oHeader.getDomRef("B1").focus();
|
|
1206
|
-
oEvent.preventDefault();
|
|
1207
|
-
} else if (oHeader.getVisibleButton2()) {
|
|
1208
|
-
oHeader.getDomRef("B2").focus();
|
|
1209
|
-
oEvent.preventDefault();
|
|
1210
|
-
} else if (oHeader.getVisibleCurrentDateButton()) {
|
|
1211
|
-
oHeader.getDomRef("today").focus();
|
|
1212
|
-
oEvent.preventDefault();
|
|
1213
|
-
} else if (!this._bPoupupMode) {
|
|
1214
|
-
// remove Tabindex from day, month, year - to break cycle
|
|
1215
|
-
this._clearTabindex0();
|
|
1216
|
-
} else {
|
|
1217
|
-
this._clearTabindex0();
|
|
1218
|
-
oEvent.preventDefault();
|
|
1219
|
-
}
|
|
1220
|
-
} else if (oEvent.target.id === oHeader.getId() + "-B1") {
|
|
1221
|
-
oHeader.getVisibleButton2() && oHeader.getDomRef("B2").focus();
|
|
1222
|
-
oEvent.preventDefault();
|
|
1223
|
-
} else if (oEvent.target.id === oHeader.getId() + "-B2") {
|
|
1224
|
-
if (oHeader.getVisibleCurrentDateButton()) {
|
|
1225
|
-
oHeader.getDomRef("today").focus();
|
|
1226
|
-
oEvent.preventDefault();
|
|
1227
|
-
} else {
|
|
1228
|
-
this._tabNextFinalize(this._bPoupupMode, oEvent);
|
|
1229
|
-
}
|
|
1230
|
-
} else if (oEvent.target.id === oHeader.getId() + "-today") {
|
|
1231
|
-
this._tabNextFinalize(this._bPoupupMode, oEvent);
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
};
|
|
1235
|
-
|
|
1236
|
-
Calendar.prototype._tabNextFinalize = function(bPopupMode, oEvent) {
|
|
1237
|
-
if (bPopupMode) {
|
|
1238
|
-
this._moveFocusToCalContent();
|
|
1239
|
-
oEvent.preventDefault();
|
|
1240
|
-
} else {
|
|
1241
|
-
// remove Tabindex from day, month, year - to break cycle
|
|
1242
|
-
this._clearTabindex0();
|
|
1243
|
-
}
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
Calendar.prototype.onsaptabprevious = function(oEvent){
|
|
1247
|
-
var oHeader = this.getAggregation("header");
|
|
1248
|
-
if (containsOrEquals(this.getDomRef("content"), oEvent.target)) {
|
|
1249
|
-
if (this._bPoupupMode) {
|
|
1250
|
-
if (oHeader.getVisibleCurrentDateButton()) {
|
|
1251
|
-
oHeader.getDomRef("today").focus();
|
|
1252
|
-
} else if (oHeader.getVisibleButton2()) {
|
|
1253
|
-
oHeader.getDomRef("B2").focus();
|
|
1254
|
-
} else {
|
|
1255
|
-
oHeader.getVisibleButton1() && oHeader.getDomRef("B1").focus();
|
|
1256
|
-
}
|
|
1257
|
-
oEvent.preventDefault();
|
|
1258
|
-
} else {
|
|
1259
|
-
// remove Tabindex from day, month, year - to break cycle
|
|
1260
|
-
this._clearTabindex0();
|
|
1261
|
-
}
|
|
1262
|
-
} else if (oEvent.target.id === oHeader.getId() + "-B1") {
|
|
1263
|
-
this._moveFocusToCalContent();
|
|
1264
|
-
oEvent.preventDefault();
|
|
1265
|
-
} else if (oEvent.target.id === oHeader.getId() + "-B2") {
|
|
1266
|
-
if (oHeader.getVisibleButton1()) {
|
|
1267
|
-
oHeader.getDomRef("B1").focus();
|
|
1268
|
-
} else {
|
|
1269
|
-
this._moveFocusToCalContent();
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
oEvent.preventDefault();
|
|
1273
|
-
} else if (oEvent.target.id === oHeader.getId() + "-today") {
|
|
1274
|
-
if (oHeader.getVisibleButton2()) {
|
|
1275
|
-
oHeader.getDomRef("B2").focus();
|
|
1276
|
-
} else if (oHeader.getVisibleButton1()){
|
|
1277
|
-
oHeader.getDomRef("B1").focus();
|
|
1278
|
-
} else {
|
|
1279
|
-
this._moveFocusToCalContent();
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
oEvent.preventDefault();
|
|
1283
|
-
}
|
|
1284
|
-
};
|
|
1285
|
-
|
|
1286
|
-
Calendar.prototype._clearTabindex0 = function() {
|
|
1287
|
-
var aMonths = this.getAggregation("month"),
|
|
1288
|
-
oMonthPicker = this._getMonthPicker(),
|
|
1289
|
-
oYearPicker = this.getAggregation("yearPicker"),
|
|
1290
|
-
oYearRangePicker = this.getAggregation("yearRangePicker"),
|
|
1291
|
-
oMonth, i;
|
|
1292
|
-
|
|
1293
|
-
// remove Tabindex from day, month, year - to break cycle
|
|
1294
|
-
for (i = 0; i < aMonths.length; i++) {
|
|
1295
|
-
oMonth = aMonths[i];
|
|
1296
|
-
oMonth._oItemNavigation.getItemDomRefs()[oMonth._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "-1");
|
|
1297
|
-
}
|
|
1298
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1299
|
-
if (oMonthPicker.getDomRef()) {
|
|
1300
|
-
oMonthPicker._oItemNavigation.getItemDomRefs()[oMonthPicker._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "-1");
|
|
1301
|
-
}
|
|
1302
|
-
if (oYearPicker.getDomRef()) {
|
|
1303
|
-
oYearPicker._oItemNavigation.getItemDomRefs()[oYearPicker._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "-1");
|
|
1304
|
-
}
|
|
1305
|
-
if (oYearRangePicker.getDomRef()) {
|
|
1306
|
-
oYearRangePicker._oItemNavigation.getItemDomRefs()[oYearRangePicker._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "-1");
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
Calendar.prototype._moveFocusToCalContent = function() {
|
|
1312
|
-
var oYearPicker = this.getAggregation("yearPicker"),
|
|
1313
|
-
oYearRangePicker = this.getAggregation("yearRangePicker"),
|
|
1314
|
-
oMonthPicker = this._getMonthPicker(),
|
|
1315
|
-
aMonths = this.getAggregation("month"),
|
|
1316
|
-
oMonth, oMonthDate,
|
|
1317
|
-
oFocusedDate, i;
|
|
1318
|
-
|
|
1319
|
-
switch (this._iMode) {
|
|
1320
|
-
case 0: // day picker
|
|
1321
|
-
oFocusedDate = this._getFocusedDate();
|
|
1322
|
-
for (i = 0; i < aMonths.length; i++) {
|
|
1323
|
-
oMonth = aMonths[i];
|
|
1324
|
-
oMonthDate = CalendarDate.fromLocalJSDate(oMonth.getDate(), this.getPrimaryCalendarType());
|
|
1325
|
-
if (oFocusedDate.isSame(oMonthDate)) {
|
|
1326
|
-
oMonth.focus();
|
|
1327
|
-
} else {
|
|
1328
|
-
oMonth._oItemNavigation.getItemDomRefs()[oMonth._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "0");
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
break;
|
|
1332
|
-
|
|
1333
|
-
case 1: // month picker
|
|
1334
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1335
|
-
oMonthPicker.focus();
|
|
1336
|
-
}
|
|
1337
|
-
break;
|
|
1338
|
-
|
|
1339
|
-
case 2: // year picker
|
|
1340
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1341
|
-
oYearPicker.focus();
|
|
1342
|
-
}
|
|
1343
|
-
break;
|
|
1344
|
-
|
|
1345
|
-
case 3: // year range picker
|
|
1346
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1347
|
-
oYearRangePicker.focus();
|
|
1348
|
-
}
|
|
1349
|
-
break;
|
|
1350
|
-
|
|
1351
|
-
// no default
|
|
1352
|
-
}
|
|
1353
|
-
};
|
|
1354
|
-
|
|
1355
|
-
Calendar.prototype.onfocusin = function(oEvent){
|
|
1356
|
-
|
|
1357
|
-
if (oEvent.target.id == this.getId() + "-end") {
|
|
1358
|
-
// focus via tab+shift (otherwise not possible to go to this element)
|
|
1359
|
-
this._focusOnShiftTab();
|
|
1360
|
-
|
|
1361
|
-
if (!this._bPoupupMode) {
|
|
1362
|
-
// remove Tabindex from day, month, year - to break cycle
|
|
1363
|
-
this._clearTabindex0();
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
// remove tabindex of dummy element if focus is inside calendar
|
|
1368
|
-
this.$("end").attr("tabindex", "-1");
|
|
1369
|
-
|
|
1370
|
-
};
|
|
1371
|
-
|
|
1372
|
-
Calendar.prototype._focusOnShiftTab = function() {
|
|
1373
|
-
var oHeader = this.getAggregation("header"),
|
|
1374
|
-
oDomRefB2 = oHeader.getDomRef("B2"),
|
|
1375
|
-
oDomRefToday = oHeader.getDomRef("today");
|
|
1376
|
-
|
|
1377
|
-
if (oDomRefToday) {
|
|
1378
|
-
oDomRefToday.focus();
|
|
1379
|
-
} else if (oDomRefB2) {
|
|
1380
|
-
oDomRefB2.focus();
|
|
1381
|
-
} else {
|
|
1382
|
-
this.focus();
|
|
1383
|
-
}
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
Calendar.prototype.onsapfocusleave = function(oEvent){
|
|
1387
|
-
var aMonths,
|
|
1388
|
-
oMonth,
|
|
1389
|
-
oMonthPicker,
|
|
1390
|
-
oYearPicker;
|
|
1391
|
-
|
|
1392
|
-
if (!oEvent.relatedControlId || !containsOrEquals(this.getDomRef(), sap.ui.getCore().byId(oEvent.relatedControlId).getFocusDomRef())) {
|
|
1393
|
-
// put dummy element back to tab-chain
|
|
1394
|
-
this.$("end").attr("tabindex", "0");
|
|
1395
|
-
|
|
1396
|
-
if (!this._bPoupupMode) {
|
|
1397
|
-
// restore Tabindex from day, month, year
|
|
1398
|
-
aMonths = this.getAggregation("month");
|
|
1399
|
-
|
|
1400
|
-
switch (this._iMode) {
|
|
1401
|
-
case 0: // day picker
|
|
1402
|
-
for (var i = 0; i < aMonths.length; i++) {
|
|
1403
|
-
oMonth = aMonths[i];
|
|
1404
|
-
if (oMonth._oItemNavigation) {
|
|
1405
|
-
oMonth._oItemNavigation.getItemDomRefs()[oMonth._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "0");
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
break;
|
|
1409
|
-
|
|
1410
|
-
case 1: // month picker
|
|
1411
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1412
|
-
oMonthPicker = this._getMonthPicker();
|
|
1413
|
-
oMonthPicker._oItemNavigation.getItemDomRefs()[oMonthPicker._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "0");
|
|
1414
|
-
}
|
|
1415
|
-
break;
|
|
1416
|
-
|
|
1417
|
-
case 2: // year picker
|
|
1418
|
-
if (!this._getSucessorsPickerPopup()) {
|
|
1419
|
-
oYearPicker = this._getYearPicker();
|
|
1420
|
-
oYearPicker._oItemNavigation.getItemDomRefs()[oYearPicker._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "0");
|
|
1421
|
-
}
|
|
1422
|
-
break;
|
|
1423
|
-
// no default
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
};
|
|
1429
|
-
|
|
1430
1191
|
Calendar.prototype.getFocusDomRef = function(){
|
|
1431
1192
|
|
|
1432
1193
|
// set focus on the day
|
|
@@ -2326,6 +2087,11 @@ sap.ui.define([
|
|
|
2326
2087
|
|
|
2327
2088
|
oFocusedDate.setYear(oStartDate.getYear() + iRangeSize / 2);
|
|
2328
2089
|
oStartDate.setMonth(0, 1); // always use the first of the month to have stable year in Japanese calendar
|
|
2090
|
+
if (oFocusedDate.isBefore(this._oMinDate)) {
|
|
2091
|
+
oFocusedDate = new CalendarDate(this._oMinDate, this.getPrimaryCalendarType());
|
|
2092
|
+
} else if (oFocusedDate.isAfter(this._oMaxDate)){
|
|
2093
|
+
oFocusedDate = new CalendarDate(this._oMaxDate, this.getPrimaryCalendarType());
|
|
2094
|
+
}
|
|
2329
2095
|
this._setFocusedDate(oFocusedDate);
|
|
2330
2096
|
|
|
2331
2097
|
this._showYearPicker();
|
|
@@ -2531,13 +2297,19 @@ sap.ui.define([
|
|
|
2531
2297
|
|
|
2532
2298
|
var oDate = oYearPicker.getProperty("_middleDate") ? oYearPicker.getProperty("_middleDate") : oYearPicker._getDate(),
|
|
2533
2299
|
oFirstDate = new CalendarDate(oDate, sPrimaryCalendarType),
|
|
2300
|
+
oMinYear = CalendarUtils._minDate(this.getPrimaryCalendarType()).getYear(),
|
|
2301
|
+
oMaxYear = CalendarUtils._maxDate(this.getPrimaryCalendarType()).getYear(),
|
|
2534
2302
|
oSecondDate,
|
|
2535
2303
|
sFirstYear,
|
|
2536
2304
|
sSecondYear;
|
|
2537
2305
|
|
|
2538
2306
|
oFirstDate.setDate(1); // always use the first of the month to have stable year in Japanese calendar
|
|
2539
2307
|
oFirstDate.setYear(oFirstDate.getYear() - Math.floor(oYearPicker.getYears() / 2));
|
|
2540
|
-
oFirstDate
|
|
2308
|
+
if (oFirstDate.getYear() < oMinYear) {
|
|
2309
|
+
oFirstDate.setYear(oMinYear);
|
|
2310
|
+
} else if (oFirstDate.getYear() + oYearPicker.getYears() > oMaxYear) {
|
|
2311
|
+
oFirstDate.setYear(oMaxYear - oYearPicker.getYears() + 1);
|
|
2312
|
+
}
|
|
2541
2313
|
|
|
2542
2314
|
oSecondDate = new CalendarDate(oFirstDate, sPrimaryCalendarType);
|
|
2543
2315
|
oSecondDate.setYear(oSecondDate.getYear() + oYearPicker.getYears() - 1);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides control sap.ui.unified.CalendarAppointment.
|
|
8
|
-
sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/format/NumberFormat', 'sap/ui/core/
|
|
9
|
-
function(DateTypeRange, DateFormat, NumberFormat,
|
|
8
|
+
sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/format/NumberFormat', 'sap/ui/core/format/TimezoneUtil', 'sap/ui/core/Core', './calendar/CalendarUtils', './library', "sap/base/Log"],
|
|
9
|
+
function(DateTypeRange, DateFormat, NumberFormat, TimezoneUtil, Core, CalendarUtils, library, Log) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -21,7 +21,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
21
21
|
*
|
|
22
22
|
* Applications could inherit from this element to add own fields.
|
|
23
23
|
* @extends sap.ui.unified.DateTypeRange
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.101.0
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -125,8 +125,8 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
125
125
|
* @private
|
|
126
126
|
*/
|
|
127
127
|
CalendarAppointment.prototype._getDateRangeIntersectionText = function (oCurrentlyDisplayedDate) {
|
|
128
|
-
var oStartDate = this.
|
|
129
|
-
oEndDate = this.
|
|
128
|
+
var oStartDate = this._getStartDateWithTimezoneAdaptation(),
|
|
129
|
+
oEndDate = this._getEndDateWithTimezoneAdaptation() ? this._getEndDateWithTimezoneAdaptation() : new Date(864000000000000), //in case of emergency call this number
|
|
130
130
|
sFirstLineText,
|
|
131
131
|
sSecondLineText,
|
|
132
132
|
oCurrentDayStart = new Date(oCurrentlyDisplayedDate.getFullYear(), oCurrentlyDisplayedDate.getMonth(), oCurrentlyDisplayedDate.getDate(), 0, 0, 0),
|
|
@@ -185,10 +185,10 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
185
185
|
iNextDayStart = iCurrentDayStartTime + ONE_DAY;
|
|
186
186
|
|
|
187
187
|
return function(oAppInfo1, oAppInfo2) {
|
|
188
|
-
var iStartDateTime1 = oAppInfo1.appointment.
|
|
189
|
-
iStartDateTime2 = oAppInfo2.appointment.
|
|
190
|
-
iEndDateTime1 = oAppInfo1.appointment.
|
|
191
|
-
iEndDateTime2 = oAppInfo2.appointment.
|
|
188
|
+
var iStartDateTime1 = oAppInfo1.appointment._getStartDateWithTimezoneAdaptation().getTime(),
|
|
189
|
+
iStartDateTime2 = oAppInfo2.appointment._getStartDateWithTimezoneAdaptation().getTime(),
|
|
190
|
+
iEndDateTime1 = oAppInfo1.appointment._getEndDateWithTimezoneAdaptation() ? oAppInfo1.appointment._getEndDateWithTimezoneAdaptation().getTime() : 864000000000000, //this is max date in case of no max date
|
|
191
|
+
iEndDateTime2 = oAppInfo2.appointment._getEndDateWithTimezoneAdaptation() ? oAppInfo2.appointment._getEndDateWithTimezoneAdaptation().getTime() : 864000000000000,
|
|
192
192
|
bWholeDay1 = iStartDateTime1 <= iCurrentDayStartTime && iEndDateTime1 >= iNextDayStart,
|
|
193
193
|
bWholeDay2 = iStartDateTime2 <= iCurrentDayStartTime && iEndDateTime2 >= iNextDayStart,
|
|
194
194
|
iResult;
|
|
@@ -253,6 +253,43 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
253
253
|
return oAppointmentParts.length > 0 ? oAppointmentParts[0] : null;
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
+
CalendarAppointment.prototype._getEndDateWithTimezoneAdaptation = function() {
|
|
257
|
+
if (!this.getProperty("endDate")) {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
var oEndDate = this._convertToTimezone(this.getEndDate());
|
|
262
|
+
|
|
263
|
+
return oEndDate;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
CalendarAppointment.prototype._getStartDateWithTimezoneAdaptation = function() {
|
|
267
|
+
if (!this.getProperty("startDate")) {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
var oStartDate = this._convertToTimezone(this.getStartDate());
|
|
272
|
+
|
|
273
|
+
return oStartDate;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Aligns a date to the timezone from the configuration.
|
|
278
|
+
*
|
|
279
|
+
* @returns {Object} <code>oNewDate</code> aligned to the configured timezone.
|
|
280
|
+
* @private
|
|
281
|
+
*/
|
|
282
|
+
CalendarAppointment.prototype._convertToTimezone = function(oDate) {
|
|
283
|
+
var sTimezone = Core.getConfiguration().getTimezone();
|
|
284
|
+
var oNewDate = CalendarUtils._createUniversalUTCDate(oDate, undefined, true);
|
|
285
|
+
|
|
286
|
+
oNewDate = new Date(oDate.getUTCFullYear(), oDate.getUTCMonth(), oDate.getUTCDate(), oDate.getUTCHours(), oDate.getUTCMinutes(), oDate.getUTCSeconds());
|
|
287
|
+
oNewDate.setUTCFullYear(oDate.getUTCFullYear());
|
|
288
|
+
oNewDate = TimezoneUtil.convertToTimezone(oNewDate, sTimezone);
|
|
289
|
+
|
|
290
|
+
return oNewDate;
|
|
291
|
+
};
|
|
292
|
+
|
|
256
293
|
return CalendarAppointment;
|
|
257
294
|
|
|
258
295
|
});
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @class
|
|
58
58
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
59
59
|
* @extends sap.ui.unified.Calendar
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.101.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @public
|
|
@@ -96,7 +96,7 @@ sap.ui.define([
|
|
|
96
96
|
|
|
97
97
|
},
|
|
98
98
|
designtime: "sap/ui/unified/designtime/CalendarDateInterval.designtime"
|
|
99
|
-
}});
|
|
99
|
+
}, renderer: CalendarDateIntervalRenderer});
|
|
100
100
|
|
|
101
101
|
CalendarDateInterval.prototype.init = function(){
|
|
102
102
|
|
|
@@ -262,7 +262,6 @@ sap.ui.define([
|
|
|
262
262
|
|
|
263
263
|
if (!this._oCalendar) {
|
|
264
264
|
oCalendar = new Calendar(this.getId() + "--Cal");
|
|
265
|
-
oCalendar.setPopupMode(true);
|
|
266
265
|
oCalendar.attachEvent("select", this._handleCalendarPickerDateSelect, this);
|
|
267
266
|
oCalendar.attachEvent("cancel", function (oEvent) {
|
|
268
267
|
this._closeCalendarPicker(true);
|
|
@@ -388,14 +387,6 @@ sap.ui.define([
|
|
|
388
387
|
|
|
389
388
|
if (!bSkipFocus) {
|
|
390
389
|
this._renderMonth(); // to focus date
|
|
391
|
-
|
|
392
|
-
// restore tabindex
|
|
393
|
-
var aMonths = this.getAggregation("month");
|
|
394
|
-
|
|
395
|
-
for (var i = 0; i < aMonths.length; i++) {
|
|
396
|
-
var oMonth = aMonths[i];
|
|
397
|
-
oMonth._oItemNavigation.getItemDomRefs()[oMonth._oItemNavigation.getFocusedIndex()].setAttribute("tabindex", "0");
|
|
398
|
-
}
|
|
399
390
|
}
|
|
400
391
|
|
|
401
392
|
this._getCalendar()._closePickers();
|
|
@@ -687,12 +678,11 @@ sap.ui.define([
|
|
|
687
678
|
*/
|
|
688
679
|
CalendarDateInterval.prototype._focusDateExtend = function(oDate, bOtherMonth, bNoEvent) {
|
|
689
680
|
if (bOtherMonth) {
|
|
690
|
-
var
|
|
691
|
-
|
|
692
|
-
iDay = CalendarUtils._daysBetween(oOldFocusedDate, oOldStartDate),
|
|
681
|
+
var oMonth = this.getAggregation("month")[0],
|
|
682
|
+
iFocusDayIndex = oMonth._oItemNavigation ? oMonth._oItemNavigation.getFocusedIndex() : 0,
|
|
693
683
|
oNewStartDate = new CalendarDate(oDate, this.getPrimaryCalendarType());
|
|
694
684
|
|
|
695
|
-
oNewStartDate.setDate(oNewStartDate.getDate() -
|
|
685
|
+
oNewStartDate.setDate(oNewStartDate.getDate() - iFocusDayIndex);
|
|
696
686
|
|
|
697
687
|
this._setStartDate(oNewStartDate, false, true);
|
|
698
688
|
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'sap/ui/core/Control',
|
|
10
10
|
'./library',
|
|
11
|
-
'sap/ui/Device',
|
|
12
11
|
'./CalendarLegendRenderer',
|
|
13
12
|
"sap/base/Log",
|
|
14
13
|
"sap/ui/thirdparty/jquery",
|
|
15
14
|
"sap/ui/unified/CalendarLegendItem"
|
|
16
15
|
],
|
|
17
|
-
function(Control, library,
|
|
16
|
+
function(Control, library, CalendarLegendRenderer, Log, jQuery, CalendarLegendItem) {
|
|
18
17
|
"use strict";
|
|
19
18
|
|
|
20
19
|
// shortcut for sap.ui.unified.CalendarDayType
|
|
@@ -34,7 +33,7 @@ sap.ui.define([
|
|
|
34
33
|
* @extends sap.ui.core.Control
|
|
35
34
|
*
|
|
36
35
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
36
|
+
* @version 1.101.0
|
|
38
37
|
*
|
|
39
38
|
* @constructor
|
|
40
39
|
* @public
|
|
@@ -86,7 +85,8 @@ sap.ui.define([
|
|
|
86
85
|
|
|
87
86
|
//don't render standardItems unless it's a PC legend
|
|
88
87
|
this._bShouldRenderStandardItems = true;
|
|
89
|
-
}
|
|
88
|
+
},
|
|
89
|
+
renderer: CalendarLegendRenderer
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
CalendarLegend.prototype.setStandardItems = function (aValues) {
|