@openui5/sap.ui.unified 1.150.0 → 1.152.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 +6 -6
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +190 -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/CalendarRenderer.js +8 -2
- package/src/sap/ui/unified/CalendarRow.js +1 -1
- 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 +46 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- package/src/sap/ui/unified/ColorPickerRenderer.js +49 -15
- 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 +27 -6
- 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 +2 -2
- 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 +4 -2
- package/src/sap/ui/unified/MenuTextFieldItem.js +7 -3
- package/src/sap/ui/unified/MonthlyRecurrenceRule.js +1 -1
- package/src/sap/ui/unified/NonWorkingPeriod.js +1 -1
- package/src/sap/ui/unified/RecurrenceRule.js +1 -1
- package/src/sap/ui/unified/RecurringCalendarAppointment.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 +2 -30
- package/src/sap/ui/unified/ShellHeadUserItem.js +3 -31
- package/src/sap/ui/unified/ShellHeader.js +29 -13
- 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 +1 -1
- package/src/sap/ui/unified/YearlyRecurrenceRule.js +1 -1
- 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/HeaderRenderer.js +1 -0
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +83 -3
- package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
- package/src/sap/ui/unified/calendar/MonthRenderer.js +46 -14
- 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/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 +2 -2
- package/src/sap/ui/unified/themes/base/Calendar.less +39 -6
- package/src/sap/ui/unified/themes/base/ColorPicker.less +125 -3
- package/src/sap/ui/unified/themes/base/FileUploader.less +5 -0
- package/src/sap/ui/unified/themes/base/ShellHeader.less +2 -7
- package/src/sap/ui/unified/themes/sap_hcb/Calendar.less +2 -1
package/THIRDPARTY.txt
CHANGED
|
@@ -6,31 +6,31 @@ The full text of all referenced licenses is appended at the end of this file.
|
|
|
6
6
|
|
|
7
7
|
Library: sap.f:
|
|
8
8
|
|
|
9
|
-
Component: UI5 Web Components, version: 2.
|
|
9
|
+
Component: UI5 Web Components, version: 2.24.2
|
|
10
10
|
Copyright: SAP
|
|
11
11
|
License: Apache-2.0
|
|
12
12
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
13
13
|
Contained in: src/sap.f/src/sap/f/thirdparty/**
|
|
14
14
|
|
|
15
|
-
Component: UI5 Web Components Fiori, version: 2.
|
|
15
|
+
Component: UI5 Web Components Fiori, version: 2.24.2
|
|
16
16
|
Copyright: SAP
|
|
17
17
|
License: Apache-2.0
|
|
18
18
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
19
19
|
Contained in: src/sap.f/src/sap/f/thirdparty/**
|
|
20
20
|
|
|
21
|
-
Component: UI5 Web Components Icons, version: 2.
|
|
21
|
+
Component: UI5 Web Components Icons, version: 2.24.2
|
|
22
22
|
Copyright: SAP
|
|
23
23
|
License: Apache-2.0
|
|
24
24
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
25
25
|
Contained in: src/sap.f/src/sap/f/thirdparty/**
|
|
26
26
|
|
|
27
|
-
Component: UI5 Web Components Icons Business Suite, version: 2.
|
|
27
|
+
Component: UI5 Web Components Icons Business Suite, version: 2.24.2
|
|
28
28
|
Copyright: SAP
|
|
29
29
|
License: Apache-2.0
|
|
30
30
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
31
31
|
Contained in: src/sap.f/src/sap/f/thirdparty/**
|
|
32
32
|
|
|
33
|
-
Component: UI5 Web Components Icons TNT, version: 2.
|
|
33
|
+
Component: UI5 Web Components Icons TNT, version: 2.24.2
|
|
34
34
|
Copyright: SAP
|
|
35
35
|
License: Apache-2.0
|
|
36
36
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -267,7 +267,7 @@ License: MIT
|
|
|
267
267
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
|
|
268
268
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/punycode.js
|
|
269
269
|
|
|
270
|
-
Component: handlebars, version: 4.7.
|
|
270
|
+
Component: handlebars, version: 4.7.9
|
|
271
271
|
Copyright: 2011-2019 by Yehuda Katz
|
|
272
272
|
License: MIT
|
|
273
273
|
License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.unified",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.152.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/UI5/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.152.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2026 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.152.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -80,7 +80,7 @@ sap.ui.define([
|
|
|
80
80
|
* Basic Calendar.
|
|
81
81
|
* This calendar is used for DatePickers
|
|
82
82
|
* @extends sap.ui.core.Control
|
|
83
|
-
* @version 1.
|
|
83
|
+
* @version 1.152.0
|
|
84
84
|
*
|
|
85
85
|
* @constructor
|
|
86
86
|
* @public
|
|
@@ -201,6 +201,15 @@ sap.ui.define([
|
|
|
201
201
|
*/
|
|
202
202
|
showWeekNumbers : {type : "boolean", group : "Appearance", defaultValue : true},
|
|
203
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Determines whether the header of the week numbers column is displayed.
|
|
206
|
+
* The column header text is translated according to the active language.
|
|
207
|
+
*
|
|
208
|
+
* <b>Note:</b> Takes effect only when <code>showWeekNumbers</code> is set to <code>true</code>.
|
|
209
|
+
* @since 1.151
|
|
210
|
+
*/
|
|
211
|
+
showWeekNumbersHeader : {type : "boolean", group : "Appearance", defaultValue : false},
|
|
212
|
+
|
|
204
213
|
/**
|
|
205
214
|
* Determines whether there is a shortcut navigation to Today. When used in Month, Year or
|
|
206
215
|
* Year-range picker view, the calendar navigates to Day picker view.
|
|
@@ -216,6 +225,9 @@ sap.ui.define([
|
|
|
216
225
|
*/
|
|
217
226
|
_currentPicker : {type : "string", group : "Appearance", visibility: "hidden"},
|
|
218
227
|
|
|
228
|
+
/** Whether the high-zoom (≤320px) picker is active. @private */
|
|
229
|
+
_highZoomActive : {type : "boolean", defaultValue : false, visibility: "hidden"},
|
|
230
|
+
|
|
219
231
|
/**
|
|
220
232
|
* If set, the calendar week numbering is used for display.
|
|
221
233
|
* If not set, the calendar week numbering of the global configuration is used.
|
|
@@ -427,6 +439,11 @@ sap.ui.define([
|
|
|
427
439
|
//when used in a DatePicker, in mobile there is no cancel button
|
|
428
440
|
this._bSkipCancelButtonRendering = false;
|
|
429
441
|
this._bActionTriggeredFromSecondHeader = false;
|
|
442
|
+
|
|
443
|
+
// High-zoom (≤320px) support — only for standalone Calendar (not embedded in DatePicker)
|
|
444
|
+
this._oHZPicker = null;
|
|
445
|
+
this._bHZListenersRegistered = false;
|
|
446
|
+
this._fnHZResizeHandler = this._onHZResize.bind(this);
|
|
430
447
|
};
|
|
431
448
|
|
|
432
449
|
Calendar.prototype.exit = function(){
|
|
@@ -451,6 +468,19 @@ sap.ui.define([
|
|
|
451
468
|
}
|
|
452
469
|
|
|
453
470
|
this._oSelectedMonth = null;
|
|
471
|
+
|
|
472
|
+
// Cleanup high-zoom
|
|
473
|
+
if (this._bHZListenersRegistered) {
|
|
474
|
+
if (window.visualViewport) {
|
|
475
|
+
window.visualViewport.removeEventListener("resize", this._fnHZResizeHandler);
|
|
476
|
+
}
|
|
477
|
+
window.removeEventListener("resize", this._fnHZResizeHandler);
|
|
478
|
+
}
|
|
479
|
+
this._fnHZResizeHandler = null;
|
|
480
|
+
if (this._oHZPicker) {
|
|
481
|
+
this._oHZPicker.destroy();
|
|
482
|
+
this._oHZPicker = null;
|
|
483
|
+
}
|
|
454
484
|
};
|
|
455
485
|
|
|
456
486
|
Calendar.prototype._initializeHeader = function() {
|
|
@@ -620,6 +650,7 @@ sap.ui.define([
|
|
|
620
650
|
}
|
|
621
651
|
aMonths[i].displayDate(oDisplayDate.toLocalJSDate());
|
|
622
652
|
aMonths[i].setShowWeekNumbers(this.getShowWeekNumbers());
|
|
653
|
+
aMonths[i].setShowWeekNumbersHeader(this.getShowWeekNumbersHeader());
|
|
623
654
|
}
|
|
624
655
|
|
|
625
656
|
if (this._getMonthPicker()) {
|
|
@@ -639,6 +670,25 @@ sap.ui.define([
|
|
|
639
670
|
|
|
640
671
|
Calendar.prototype.onAfterRendering = function(oEvent){
|
|
641
672
|
|
|
673
|
+
// Check zoom state after first render (resize handler skips before DOM exists)
|
|
674
|
+
if (!this._oSpecialDatesControlOrigin) {
|
|
675
|
+
// Register listeners lazily so embedded Calendars (inside DatePicker) never get them
|
|
676
|
+
if (!this._bHZListenersRegistered) {
|
|
677
|
+
if (window.visualViewport) {
|
|
678
|
+
window.visualViewport.addEventListener("resize", this._fnHZResizeHandler);
|
|
679
|
+
}
|
|
680
|
+
window.addEventListener("resize", this._fnHZResizeHandler);
|
|
681
|
+
this._bHZListenersRegistered = true;
|
|
682
|
+
}
|
|
683
|
+
const bHighZoom = this._isHighZoom();
|
|
684
|
+
if (bHighZoom !== this.getProperty("_highZoomActive")) {
|
|
685
|
+
this.setProperty("_highZoomActive", bHighZoom);
|
|
686
|
+
if (bHighZoom) {
|
|
687
|
+
this._initHZPicker();
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
642
692
|
// check if day names and month names are too big -> use smaller ones
|
|
643
693
|
if (!this._getSucessorsPickerPopup()) {
|
|
644
694
|
_checkNamesLength.call(this);
|
|
@@ -1188,6 +1238,18 @@ sap.ui.define([
|
|
|
1188
1238
|
return this.setProperty("intervalSelection", bEnabled);
|
|
1189
1239
|
};
|
|
1190
1240
|
|
|
1241
|
+
// Override to invalidate the high-zoom picker when interval selection changes
|
|
1242
|
+
// so the correct picker type (DatePicker vs DateRangeSelection) is used on next zoom-in.
|
|
1243
|
+
const _origSetIntervalSelection = Calendar.prototype.setIntervalSelection;
|
|
1244
|
+
Calendar.prototype.setIntervalSelection = function(bEnabled) {
|
|
1245
|
+
if (this._oHZPicker) {
|
|
1246
|
+
this.removeDependent(this._oHZPicker);
|
|
1247
|
+
this._oHZPicker.destroy();
|
|
1248
|
+
this._oHZPicker = null;
|
|
1249
|
+
}
|
|
1250
|
+
return _origSetIntervalSelection.call(this, bEnabled);
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1191
1253
|
/**
|
|
1192
1254
|
* Setter for the property <code>singleSelection</code>. If set to <code>true</code> only a single date or single interval, when <code>intervalSelection</code> is set to <code>true</code>, can be selected.
|
|
1193
1255
|
*
|
|
@@ -3144,6 +3206,133 @@ sap.ui.define([
|
|
|
3144
3206
|
this._updateHeadersYearPrimaryText(this._getYearString());
|
|
3145
3207
|
}
|
|
3146
3208
|
|
|
3209
|
+
// ============================================================
|
|
3210
|
+
// High-zoom (≤320px) support for standalone Calendar
|
|
3211
|
+
// At ≤320px a DatePicker (or DateRangeSelection for intervalSelection)
|
|
3212
|
+
// is shown instead of the calendar grid. DatePicker automatically
|
|
3213
|
+
// activates its own DateHighZoomInputs layout at that viewport width.
|
|
3214
|
+
// ============================================================
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* Returns true when the viewport is ≤ 320 px.
|
|
3218
|
+
* @returns {boolean}
|
|
3219
|
+
* @private
|
|
3220
|
+
*/
|
|
3221
|
+
Calendar.prototype._isHighZoom = function() {
|
|
3222
|
+
const iWidth = (window.visualViewport && window.visualViewport.width) || window.innerWidth;
|
|
3223
|
+
return iWidth <= 320;
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
/**
|
|
3227
|
+
* Called on viewport resize. Activates or deactivates high-zoom mode
|
|
3228
|
+
* only for standalone Calendar (not when embedded in DatePicker).
|
|
3229
|
+
* @private
|
|
3230
|
+
*/
|
|
3231
|
+
Calendar.prototype._onHZResize = function() {
|
|
3232
|
+
// Skip when Calendar is embedded in a picker — the picker manages zoom
|
|
3233
|
+
if (this._oSpecialDatesControlOrigin) { return; }
|
|
3234
|
+
// Skip until first render — visualViewport fires during initial layout
|
|
3235
|
+
if (!this.getDomRef()) { return; }
|
|
3236
|
+
|
|
3237
|
+
const bHighZoom = this._isHighZoom();
|
|
3238
|
+
if (bHighZoom === this.getProperty("_highZoomActive")) { return; }
|
|
3239
|
+
|
|
3240
|
+
if (bHighZoom) {
|
|
3241
|
+
this.setProperty("_highZoomActive", true);
|
|
3242
|
+
this._initHZPicker();
|
|
3243
|
+
} else {
|
|
3244
|
+
// Destroy the picker so Calendar re-renders cleanly as its own DOM root.
|
|
3245
|
+
if (this._oHZPicker) {
|
|
3246
|
+
this.removeDependent(this._oHZPicker);
|
|
3247
|
+
this._oHZPicker.destroy();
|
|
3248
|
+
this._oHZPicker = null;
|
|
3249
|
+
}
|
|
3250
|
+
this.setProperty("_highZoomActive", false);
|
|
3251
|
+
}
|
|
3252
|
+
};
|
|
3253
|
+
|
|
3254
|
+
/**
|
|
3255
|
+
* Lazily loads DatePicker (or DateRangeSelection) via runtime require
|
|
3256
|
+
* and shows it in place of the calendar grid at high zoom.
|
|
3257
|
+
* sap.ui.unified → sap.m is not a build-time dependency so we use
|
|
3258
|
+
* sap.ui.require (same pattern as FileUploader.js in this library).
|
|
3259
|
+
* @private
|
|
3260
|
+
*/
|
|
3261
|
+
Calendar.prototype._initHZPicker = function() {
|
|
3262
|
+
const sModule = this.getIntervalSelection()
|
|
3263
|
+
? "sap/m/DateRangeSelection"
|
|
3264
|
+
: "sap/m/DatePicker";
|
|
3265
|
+
|
|
3266
|
+
const FnClass = sap.ui.require(sModule);
|
|
3267
|
+
if (FnClass) {
|
|
3268
|
+
this._createHZPicker(FnClass);
|
|
3269
|
+
} else {
|
|
3270
|
+
sap.ui.require([sModule], function(Cls) {
|
|
3271
|
+
if (!this.bIsDestroyed) {
|
|
3272
|
+
this._createHZPicker(Cls);
|
|
3273
|
+
}
|
|
3274
|
+
}.bind(this));
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Creates and configures the high-zoom picker (DatePicker or DateRangeSelection).
|
|
3280
|
+
* @param {function} FnClass - DatePicker or DateRangeSelection constructor
|
|
3281
|
+
* @private
|
|
3282
|
+
*/
|
|
3283
|
+
Calendar.prototype._createHZPicker = function(FnClass) {
|
|
3284
|
+
if (!this._oHZPicker) {
|
|
3285
|
+
const bRange = this.getIntervalSelection();
|
|
3286
|
+
const sSecondary = this.getSecondaryCalendarType();
|
|
3287
|
+
const sPrimary = this.getProperty("primaryCalendarType");
|
|
3288
|
+
|
|
3289
|
+
const oPicker = new FnClass(this.getId() + "-hzPicker", {
|
|
3290
|
+
displayFormat: "dd.MM.yyyy",
|
|
3291
|
+
displayFormatType: sPrimary || undefined,
|
|
3292
|
+
minDate: this._oMinDate.toLocalJSDate(),
|
|
3293
|
+
maxDate: this._oMaxDate.toLocalJSDate(),
|
|
3294
|
+
change: function(oEvent) {
|
|
3295
|
+
// Propagate the selected date(s) back to the Calendar aggregation
|
|
3296
|
+
const oDateValue = oPicker.getDateValue();
|
|
3297
|
+
if (!oDateValue) { return; }
|
|
3298
|
+
|
|
3299
|
+
// DateRange is guaranteed loaded (transitive dep via Month/MonthPicker/YearPicker)
|
|
3300
|
+
const DateRange = sap.ui.require("sap/ui/unified/DateRange");
|
|
3301
|
+
|
|
3302
|
+
if (DateRange) {
|
|
3303
|
+
const oRange = new DateRange({ startDate: oDateValue });
|
|
3304
|
+
if (bRange && oPicker.getSecondDateValue()) {
|
|
3305
|
+
oRange.setEndDate(oPicker.getSecondDateValue());
|
|
3306
|
+
}
|
|
3307
|
+
this.removeAllSelectedDates();
|
|
3308
|
+
this.addSelectedDate(oRange);
|
|
3309
|
+
this.fireSelect();
|
|
3310
|
+
}
|
|
3311
|
+
}.bind(this)
|
|
3312
|
+
});
|
|
3313
|
+
|
|
3314
|
+
// Pre-fill from current Calendar selection
|
|
3315
|
+
const aSelected = this.getSelectedDates();
|
|
3316
|
+
if (aSelected.length > 0 && aSelected[0].getStartDate()) {
|
|
3317
|
+
oPicker.setDateValue(aSelected[0].getStartDate());
|
|
3318
|
+
if (bRange && aSelected[0].getEndDate()) {
|
|
3319
|
+
oPicker.setSecondDateValue(aSelected[0].getEndDate());
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
this._oHZPicker = oPicker;
|
|
3324
|
+
// Use the setter so _bSecondaryCalendarTypeSet is flagged correctly —
|
|
3325
|
+
// passing secondaryCalendarType in the constructor bypasses the setter.
|
|
3326
|
+
if (sSecondary) {
|
|
3327
|
+
oPicker.setSecondaryCalendarType(sSecondary);
|
|
3328
|
+
}
|
|
3329
|
+
this.addDependent(oPicker);
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
this._oHZPicker.setVisible(true);
|
|
3333
|
+
this.invalidate();
|
|
3334
|
+
};
|
|
3335
|
+
|
|
3147
3336
|
return Calendar;
|
|
3148
3337
|
|
|
3149
3338
|
});
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
* @class
|
|
65
65
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
66
66
|
* @extends sap.ui.unified.Calendar
|
|
67
|
-
* @version 1.
|
|
67
|
+
* @version 1.152.0
|
|
68
68
|
*
|
|
69
69
|
* @constructor
|
|
70
70
|
* @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.152.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.152.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -67,10 +67,16 @@ sap.ui.define(["sap/ui/core/Lib"],
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
if (this.addAttributes) {
|
|
70
|
-
// additional stuff by inherited controls
|
|
71
70
|
this.addAttributes(oRm, oCal);
|
|
72
71
|
}
|
|
73
|
-
oRm.openEnd();
|
|
72
|
+
oRm.openEnd();
|
|
73
|
+
|
|
74
|
+
// In high-zoom standalone mode render only the DatePicker/DateRangeSelection proxy
|
|
75
|
+
if (oCal.getProperty("_highZoomActive") && oCal._oHZPicker) {
|
|
76
|
+
oRm.renderControl(oCal._oHZPicker);
|
|
77
|
+
oRm.close("div");
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
74
80
|
|
|
75
81
|
var oHeader = oCal.getAggregation("header");
|
|
76
82
|
oRm.renderControl(oHeader);
|
|
@@ -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.152.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
* @extends sap.ui.core.Control
|
|
73
73
|
*
|
|
74
74
|
* @author SAP SE
|
|
75
|
-
* @version 1.
|
|
75
|
+
* @version 1.152.0
|
|
76
76
|
*
|
|
77
77
|
* @constructor
|
|
78
78
|
* @public
|
|
@@ -1212,10 +1212,12 @@ sap.ui.define([
|
|
|
1212
1212
|
};
|
|
1213
1213
|
|
|
1214
1214
|
ColorPicker.prototype.exit = function() {
|
|
1215
|
+
this._stopZoomWatch();
|
|
1215
1216
|
this._cleanup();
|
|
1216
1217
|
};
|
|
1217
1218
|
|
|
1218
1219
|
ColorPicker.prototype.onBeforeRendering = function() {
|
|
1220
|
+
this._stopZoomWatch();
|
|
1219
1221
|
this._cleanup();
|
|
1220
1222
|
// Create the layout controls
|
|
1221
1223
|
this._createLayout();
|
|
@@ -2438,6 +2440,9 @@ sap.ui.define([
|
|
|
2438
2440
|
// toggle fields - HEX field will be visible initially on mobile
|
|
2439
2441
|
this._toggleFields();
|
|
2440
2442
|
}
|
|
2443
|
+
|
|
2444
|
+
this._bLastHighZoom = this._isHighZoom();
|
|
2445
|
+
this._startZoomWatch();
|
|
2441
2446
|
};
|
|
2442
2447
|
|
|
2443
2448
|
/**
|
|
@@ -2652,6 +2657,46 @@ sap.ui.define([
|
|
|
2652
2657
|
}
|
|
2653
2658
|
};
|
|
2654
2659
|
|
|
2660
|
+
ColorPicker.prototype._getViewportWidth = function() {
|
|
2661
|
+
return (window.visualViewport && window.visualViewport.width) || window.innerWidth;
|
|
2662
|
+
};
|
|
2663
|
+
|
|
2664
|
+
ColorPicker.prototype._isHighZoom = function() {
|
|
2665
|
+
return this._getViewportWidth() <= 320;
|
|
2666
|
+
};
|
|
2667
|
+
|
|
2668
|
+
ColorPicker.prototype._startZoomWatch = function() {
|
|
2669
|
+
this._fnWindowResizeListener = function() {
|
|
2670
|
+
if (!this.getDomRef()) { return; }
|
|
2671
|
+
var bHighZoom = this._isHighZoom();
|
|
2672
|
+
if (bHighZoom !== this._bLastHighZoom) {
|
|
2673
|
+
this._bLastHighZoom = bHighZoom;
|
|
2674
|
+
this.invalidate();
|
|
2675
|
+
}
|
|
2676
|
+
}.bind(this);
|
|
2677
|
+
if (window.visualViewport) {
|
|
2678
|
+
window.visualViewport.addEventListener("resize", this._fnWindowResizeListener);
|
|
2679
|
+
}
|
|
2680
|
+
window.addEventListener("resize", this._fnWindowResizeListener);
|
|
2681
|
+
};
|
|
2682
|
+
|
|
2683
|
+
ColorPicker.prototype._stopZoomWatch = function() {
|
|
2684
|
+
if (this._fnWindowResizeListener) {
|
|
2685
|
+
window.removeEventListener("resize", this._fnWindowResizeListener);
|
|
2686
|
+
if (window.visualViewport) {
|
|
2687
|
+
window.visualViewport.removeEventListener("resize", this._fnWindowResizeListener);
|
|
2688
|
+
}
|
|
2689
|
+
this._fnWindowResizeListener = null;
|
|
2690
|
+
}
|
|
2691
|
+
};
|
|
2692
|
+
|
|
2693
|
+
ColorPicker.prototype._getEffectiveDisplayMode = function() {
|
|
2694
|
+
if (this._isHighZoom()) {
|
|
2695
|
+
return ColorPickerDisplayMode.Simplified;
|
|
2696
|
+
}
|
|
2697
|
+
return this.getDisplayMode();
|
|
2698
|
+
};
|
|
2699
|
+
|
|
2655
2700
|
return ColorPicker;
|
|
2656
2701
|
|
|
2657
2702
|
});
|
|
@@ -28,8 +28,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
28
28
|
* @param {sap.ui.unified.ColorPicker} oControl an object representation of the control that should be rendered
|
|
29
29
|
*/
|
|
30
30
|
ColorPickerRenderer.render = function(oRm, oControl){
|
|
31
|
-
var sDisplayMode = oControl.
|
|
32
|
-
bResponsive = oControl.bResponsive
|
|
31
|
+
var sDisplayMode = oControl._getEffectiveDisplayMode(),
|
|
32
|
+
bResponsive = oControl.bResponsive,
|
|
33
|
+
bHighZoom = oControl._isHighZoom();
|
|
33
34
|
|
|
34
35
|
oRm.openStart("div", oControl);
|
|
35
36
|
|
|
@@ -49,6 +50,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
49
50
|
if (Device.system.phone) {
|
|
50
51
|
oRm.class("sapUiCPPhone");
|
|
51
52
|
}
|
|
53
|
+
if (bHighZoom) {
|
|
54
|
+
oRm.class("sapUiCPHighZoom");
|
|
55
|
+
}
|
|
52
56
|
oRm.openEnd();
|
|
53
57
|
|
|
54
58
|
if (!bResponsive) {
|
|
@@ -85,8 +89,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
85
89
|
};
|
|
86
90
|
|
|
87
91
|
ColorPickerRenderer.renderDefaultColorPicker = function(oRm, oControl) {
|
|
92
|
+
var bHighZoom = oControl._isHighZoom();
|
|
88
93
|
oRm.renderControl(oControl.getAggregation("_oCPBox"));
|
|
89
|
-
if (Device.system.phone) { //mobile
|
|
94
|
+
if (Device.system.phone && !bHighZoom) { //mobile
|
|
90
95
|
oRm.openStart("div");
|
|
91
96
|
oRm.class("sapUiCPPhoneContent");
|
|
92
97
|
oRm.openEnd();
|
|
@@ -97,6 +102,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
97
102
|
oRm.close("div");
|
|
98
103
|
this.renderMobileSwatches(oRm, oControl);
|
|
99
104
|
oRm.close("div");
|
|
105
|
+
} else if (bHighZoom) { //mobile 200% zoom
|
|
106
|
+
this.renderSliders(oRm, oControl);
|
|
107
|
+
this.renderDesktopSwatchesAndHexFields(oRm, oControl);
|
|
100
108
|
} else { //desktop or tablet
|
|
101
109
|
this.renderSliders(oRm, oControl);
|
|
102
110
|
this.renderDesktopSwatchesAndHexFields(oRm, oControl);
|
|
@@ -105,7 +113,7 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
105
113
|
oRm.openStart("div");
|
|
106
114
|
oRm.class("sapUiCPDefaultWrapper");
|
|
107
115
|
oRm.openEnd();
|
|
108
|
-
if (Device.system.phone) {
|
|
116
|
+
if (Device.system.phone && !bHighZoom) {
|
|
109
117
|
oRm.renderControl(oControl.getAggregation("_oHexField"));
|
|
110
118
|
oRm.openStart("div");
|
|
111
119
|
oRm.class("sapUiCPHexText");
|
|
@@ -210,8 +218,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
210
218
|
};
|
|
211
219
|
|
|
212
220
|
ColorPickerRenderer.renderSimplifiedColorPicker = function(oRm, oControl) {
|
|
221
|
+
var bHighZoom = oControl._isHighZoom();
|
|
213
222
|
oRm.renderControl(oControl.getAggregation("_oCPBox"));
|
|
214
|
-
if (Device.system.phone) {
|
|
223
|
+
if (Device.system.phone && !bHighZoom) {
|
|
215
224
|
oRm.openStart("div");
|
|
216
225
|
oRm.class("sapUiCPPhoneContent");
|
|
217
226
|
oRm.openEnd();
|
|
@@ -232,6 +241,9 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
232
241
|
oRm.close("div");
|
|
233
242
|
oRm.close("div");
|
|
234
243
|
oRm.close("div");
|
|
244
|
+
} else if (bHighZoom) { //mobile 200% zoom
|
|
245
|
+
oRm.renderControl(oControl.getAggregation("_oSlider"));
|
|
246
|
+
this.renderDesktopSwatchesAndHexFields(oRm, oControl);
|
|
235
247
|
} else {
|
|
236
248
|
oRm.renderControl(oControl.getAggregation("_oSlider"));
|
|
237
249
|
this.renderDesktopSwatchesAndHexFields(oRm, oControl);
|
|
@@ -245,6 +257,14 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
245
257
|
* @param {sap.ui.unified.ColorPicker} oControl an object representation of the control that should be rendered
|
|
246
258
|
*/
|
|
247
259
|
ColorPickerRenderer.renderDesktopSwatchesAndHexFields = function(oRm, oControl) {
|
|
260
|
+
var bHighZoom = oControl._isHighZoom();
|
|
261
|
+
|
|
262
|
+
if (bHighZoom) {
|
|
263
|
+
oRm.openStart("div");
|
|
264
|
+
oRm.class("sapUiCPHexRow");
|
|
265
|
+
oRm.openEnd();
|
|
266
|
+
}
|
|
267
|
+
|
|
248
268
|
oRm.openStart("div");
|
|
249
269
|
oRm.class("sapUiCPComparisonWrapper");
|
|
250
270
|
oRm.openEnd();
|
|
@@ -259,17 +279,31 @@ sap.ui.define(['./ColorPickerDisplayMode', "sap/ui/Device", "sap/ui/core/Lib"],
|
|
|
259
279
|
oRm.openEnd();
|
|
260
280
|
oRm.close("div");
|
|
261
281
|
oRm.close("div");
|
|
262
|
-
oRm.openStart("div");
|
|
263
|
-
oRm.class("sapUiCPHexWrapper");
|
|
264
|
-
oRm.openEnd();
|
|
265
|
-
oRm.openStart("span");
|
|
266
|
-
oRm.class("sapUiCPHexText");
|
|
267
|
-
oRm.openEnd();
|
|
268
|
-
oRm.text("Hex");
|
|
269
|
-
oRm.close("span");
|
|
270
|
-
oRm.close("div");
|
|
271
|
-
oRm.renderControl(oControl.getAggregation("_oHexField"));
|
|
272
282
|
|
|
283
|
+
if (bHighZoom) {
|
|
284
|
+
oRm.openStart("div");
|
|
285
|
+
oRm.class("sapUiCPHexWrapper");
|
|
286
|
+
oRm.openEnd();
|
|
287
|
+
oRm.renderControl(oControl.getAggregation("_oHexField"));
|
|
288
|
+
oRm.openStart("span");
|
|
289
|
+
oRm.class("sapUiCPHexText");
|
|
290
|
+
oRm.openEnd();
|
|
291
|
+
oRm.text("Hex");
|
|
292
|
+
oRm.close("span");
|
|
293
|
+
oRm.close("div");
|
|
294
|
+
oRm.close("div"); // close sapUiCPHexRow
|
|
295
|
+
} else {
|
|
296
|
+
oRm.openStart("div");
|
|
297
|
+
oRm.class("sapUiCPHexWrapper");
|
|
298
|
+
oRm.openEnd();
|
|
299
|
+
oRm.openStart("span");
|
|
300
|
+
oRm.class("sapUiCPHexText");
|
|
301
|
+
oRm.openEnd();
|
|
302
|
+
oRm.text("Hex");
|
|
303
|
+
oRm.close("span");
|
|
304
|
+
oRm.close("div");
|
|
305
|
+
oRm.renderControl(oControl.getAggregation("_oHexField"));
|
|
306
|
+
}
|
|
273
307
|
};
|
|
274
308
|
|
|
275
309
|
/**
|