@openui5/sap.ui.unified 1.119.0 → 1.120.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 +1 -1
- package/src/sap/ui/unified/CalendarAppointment.js +2 -2
- 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 +6 -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 +27 -24
- package/src/sap/ui/unified/ColorPickerHelper.js +97 -0
- 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 +12 -7
- package/src/sap/ui/unified/FileUploaderHelper.js +65 -0
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderRenderer.js +4 -3
- 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/MenuRenderer.js +1 -1
- package/src/sap/ui/unified/MenuTextFieldItem.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/calendar/CustomMonthPicker.js +4 -3
- 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/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/TimesRow.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/designtime/messagebundle_mk.properties +13 -0
- package/src/sap/ui/unified/library.js +2 -28
- package/src/sap/ui/unified/messagebundle_mk.properties +121 -0
- package/src/sap/ui/unified/messagebundle_sh.properties +6 -6
- package/src/sap/ui/unified/themes/base/Calendar.less +25 -26
- package/ui5.yaml +4 -4
package/THIRDPARTY.txt
CHANGED
|
@@ -179,7 +179,7 @@ License: Apache-2.0
|
|
|
179
179
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
180
180
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
|
|
181
181
|
|
|
182
|
-
Component: Unicode Common Locale Data Repository, version:
|
|
182
|
+
Component: Unicode Common Locale Data Repository, version: 43
|
|
183
183
|
Copyright: 1991-2014 Unicode, Inc.
|
|
184
184
|
License: Unicode-DFS-2015
|
|
185
185
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Unicode-DFS-2015.txt
|
|
@@ -334,7 +334,7 @@ License: ISC
|
|
|
334
334
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/ISC.txt
|
|
335
335
|
Contained in: src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js
|
|
336
336
|
|
|
337
|
-
Component: Time Zone Database, version:
|
|
337
|
+
Component: Time Zone Database, version: 2023c
|
|
338
338
|
Copyright: Arthur David Olson, Paul Eggert and other contributors
|
|
339
339
|
License: LicenseRef-tzdata-PublicDomain
|
|
340
340
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/LicenseRef-tzdata-PublicDomain.txt
|
|
@@ -416,7 +416,7 @@ Contained in: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplore
|
|
|
416
416
|
|
|
417
417
|
Library: sap.ui.webc.common:
|
|
418
418
|
|
|
419
|
-
Component: UI5 Web Components, version: 1.
|
|
419
|
+
Component: UI5 Web Components, version: 1.18.0
|
|
420
420
|
Copyright: SAP
|
|
421
421
|
License: Apache-2.0
|
|
422
422
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -436,13 +436,13 @@ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/
|
|
|
436
436
|
|
|
437
437
|
Library: sap.ui.webc.fiori:
|
|
438
438
|
|
|
439
|
-
Component: UI5 Web Components, version: 1.
|
|
439
|
+
Component: UI5 Web Components, version: 1.18.0
|
|
440
440
|
Copyright: SAP
|
|
441
441
|
License: Apache-2.0
|
|
442
442
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
443
443
|
Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/*.*
|
|
444
444
|
|
|
445
|
-
Component: ZXing, version: 0.
|
|
445
|
+
Component: ZXing, version: 0.17.1
|
|
446
446
|
Copyright: 2005 Sun Microsystems, Inc.; 2010-2014 University of Manchester; 2010-2015 Stian Soiland-Reyes; 2015 Peter Hull
|
|
447
447
|
License: Apache-2.0
|
|
448
448
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -451,7 +451,7 @@ Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/lib/zxing.js
|
|
|
451
451
|
|
|
452
452
|
Library: sap.ui.webc.main:
|
|
453
453
|
|
|
454
|
-
Component: UI5 Web Components, version: 1.
|
|
454
|
+
Component: UI5 Web Components, version: 1.18.0
|
|
455
455
|
Copyright: SAP
|
|
456
456
|
License: Apache-2.0
|
|
457
457
|
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.120.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.120.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 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.120.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
*
|
|
44
44
|
* Applications could inherit from this element to add own fields.
|
|
45
45
|
* @extends sap.ui.unified.DateTypeRange
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.120.0
|
|
47
47
|
*
|
|
48
48
|
* @constructor
|
|
49
49
|
* @public
|
|
@@ -270,7 +270,7 @@ sap.ui.define([
|
|
|
270
270
|
return document.getElementById(sSuffix ? this.getId() + "-" + this._sAppointmentPartSuffix + "-" + sSuffix : this.getId() + "-" + this._sAppointmentPartSuffix);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
var oAppointmentParts = document.querySelectorAll(".sapUiCalendarRowApps[id^='" + this. getId() + "']");
|
|
273
|
+
var oAppointmentParts = document.querySelectorAll(".sapUiCalendarRowApps[id^='" + this. getId() + "-']");
|
|
274
274
|
return oAppointmentParts.length > 0 ? oAppointmentParts[0] : null;
|
|
275
275
|
};
|
|
276
276
|
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @class
|
|
60
60
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
61
61
|
* @extends sap.ui.unified.Calendar
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.120.0
|
|
63
63
|
*
|
|
64
64
|
* @constructor
|
|
65
65
|
* @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.120.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.120.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -88,7 +88,7 @@ sap.ui.define([
|
|
|
88
88
|
* @class
|
|
89
89
|
* A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
|
|
90
90
|
* @extends sap.ui.core.Control
|
|
91
|
-
* @version 1.
|
|
91
|
+
* @version 1.120.0
|
|
92
92
|
*
|
|
93
93
|
* @constructor
|
|
94
94
|
* @public
|
|
@@ -1167,6 +1167,11 @@ sap.ui.define([
|
|
|
1167
1167
|
|
|
1168
1168
|
for (i = 0; i < aAppointments.length; i++) {
|
|
1169
1169
|
oAppointment = aAppointments[i];
|
|
1170
|
+
|
|
1171
|
+
if (!oAppointment || !oAppointment.getStartDate()) {
|
|
1172
|
+
continue;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1170
1175
|
var oAppointmentStartDate = CalendarUtils._createUniversalUTCDate(oAppointment.getStartDate(), undefined, true);
|
|
1171
1176
|
var oAppointmentStartDateTime = oAppointmentStartDate.getTime();
|
|
1172
1177
|
oAppointmentStartDate.setUTCSeconds(0); // ignore seconds
|
|
@@ -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.120.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -19,6 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
"sap/ui/Device",
|
|
20
20
|
"sap/ui/core/library",
|
|
21
21
|
"./ColorPickerRenderer",
|
|
22
|
+
"./ColorPickerHelper",
|
|
22
23
|
"sap/base/Log",
|
|
23
24
|
"sap/ui/thirdparty/jquery",
|
|
24
25
|
"sap/ui/core/Configuration",
|
|
@@ -37,6 +38,7 @@ sap.ui.define([
|
|
|
37
38
|
Device,
|
|
38
39
|
coreLibrary,
|
|
39
40
|
ColorPickerRenderer,
|
|
41
|
+
ColorPickerHelper,
|
|
40
42
|
Log,
|
|
41
43
|
jQuery,
|
|
42
44
|
Configuration
|
|
@@ -65,7 +67,7 @@ sap.ui.define([
|
|
|
65
67
|
* @extends sap.ui.core.Control
|
|
66
68
|
*
|
|
67
69
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
70
|
+
* @version 1.120.0
|
|
69
71
|
*
|
|
70
72
|
* @constructor
|
|
71
73
|
* @public
|
|
@@ -529,6 +531,7 @@ sap.ui.define([
|
|
|
529
531
|
* Initialization hook creating composite parts.
|
|
530
532
|
*/
|
|
531
533
|
ColorPicker.prototype.init = function() {
|
|
534
|
+
this.oColorPickerHelper = ColorPickerHelper.getHelper();
|
|
532
535
|
// set gradient prefix depending of the browser
|
|
533
536
|
if (Device.browser.firefox) {
|
|
534
537
|
sBrowserPrefix = "-moz-linear-gradient";
|
|
@@ -565,7 +568,7 @@ sap.ui.define([
|
|
|
565
568
|
this.data("sap-ui-fastnavgroup", "true", true); // Define group for F6 handling
|
|
566
569
|
|
|
567
570
|
// Get if control should be in responsive mode
|
|
568
|
-
this.bResponsive =
|
|
571
|
+
this.bResponsive = this.oColorPickerHelper.isResponsive();
|
|
569
572
|
|
|
570
573
|
// Color picker cursor size in px obtained from less parameter. Keep in mind width and height are the same.
|
|
571
574
|
var sCircleSizeCSSParameterName = this.bResponsive ? "_sap_ui_unified_ColorPicker_CircleSize" : "_sap_ui_unified_ColorPicker_commonsCircleSize";
|
|
@@ -790,7 +793,7 @@ sap.ui.define([
|
|
|
790
793
|
oHL = new HLayout({
|
|
791
794
|
content: [
|
|
792
795
|
// Label
|
|
793
|
-
|
|
796
|
+
this.oColorPickerHelper.factory.createLabel({
|
|
794
797
|
text: sLabelText,
|
|
795
798
|
tooltip: sTooltip,
|
|
796
799
|
labelFor: oInput
|
|
@@ -802,7 +805,7 @@ sap.ui.define([
|
|
|
802
805
|
|
|
803
806
|
// Manage unit label
|
|
804
807
|
if (sUnit) {
|
|
805
|
-
oHL.addContent(
|
|
808
|
+
oHL.addContent(this.oColorPickerHelper.factory.createLabel({text: sUnit, labelFor: oInput})
|
|
806
809
|
.addStyleClass(CONSTANTS.UnitLabelClass)
|
|
807
810
|
.addStyleClass(CONSTANTS.LabelClass)
|
|
808
811
|
);
|
|
@@ -912,21 +915,21 @@ sap.ui.define([
|
|
|
912
915
|
ontouchend: this._handleCPBoxTouchEndEvent.bind(this)
|
|
913
916
|
});
|
|
914
917
|
|
|
915
|
-
this.oHexField =
|
|
918
|
+
this.oHexField = this.oColorPickerHelper.factory.createInput(sId + "-hxF", {
|
|
916
919
|
value: this.Color.hex.substr(1),
|
|
917
920
|
change: this._handleHexValueChange.bind(this),
|
|
918
921
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_HEX")
|
|
919
922
|
}).addStyleClass(CONSTANTS.HEXClass);
|
|
920
923
|
|
|
921
924
|
|
|
922
|
-
this.oRedField =
|
|
925
|
+
this.oRedField = this.oColorPickerHelper.factory.createInput(sId + "-rF", {
|
|
923
926
|
value: this.Color.r,
|
|
924
927
|
change: this._handleRedValueChange.bind(this),
|
|
925
928
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_RED")
|
|
926
929
|
}).addStyleClass(CONSTANTS.LeftColumnInputClass);
|
|
927
930
|
|
|
928
931
|
|
|
929
|
-
this.oGreenField =
|
|
932
|
+
this.oGreenField = this.oColorPickerHelper.factory.createInput(sId + "-gF", {
|
|
930
933
|
value: this.Color.g,
|
|
931
934
|
change: this._handleGreenValueChange.bind(this),
|
|
932
935
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_GREEN")
|
|
@@ -934,21 +937,21 @@ sap.ui.define([
|
|
|
934
937
|
|
|
935
938
|
|
|
936
939
|
|
|
937
|
-
this.oBlueField =
|
|
940
|
+
this.oBlueField = this.oColorPickerHelper.factory.createInput(sId + "-bF", {
|
|
938
941
|
value: this.Color.b,
|
|
939
942
|
change: this._handleBlueValueChange.bind(this),
|
|
940
943
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_BLUE")
|
|
941
944
|
}).addStyleClass(CONSTANTS.LeftColumnInputClass);
|
|
942
945
|
|
|
943
946
|
|
|
944
|
-
this.oHueField =
|
|
947
|
+
this.oHueField = this.oColorPickerHelper.factory.createInput(sId + "-hF", {
|
|
945
948
|
value: this.Color.h,
|
|
946
949
|
change: this._handleHueValueChange.bind(this),
|
|
947
950
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_HUE")
|
|
948
951
|
}).addStyleClass(CONSTANTS.RightColumnInputClass);
|
|
949
952
|
|
|
950
953
|
|
|
951
|
-
this.oSatField =
|
|
954
|
+
this.oSatField = this.oColorPickerHelper.factory.createInput(sId + "-sF", {
|
|
952
955
|
value: this.Color.s,
|
|
953
956
|
change: this._handleSatValueChange.bind(this),
|
|
954
957
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_SAT") +
|
|
@@ -956,7 +959,7 @@ sap.ui.define([
|
|
|
956
959
|
}).addStyleClass(CONSTANTS.RightColumnInputClass);
|
|
957
960
|
|
|
958
961
|
|
|
959
|
-
this.oLitField =
|
|
962
|
+
this.oLitField = this.oColorPickerHelper.factory.createInput(sId + "-lF", {
|
|
960
963
|
value: this.Color.l,
|
|
961
964
|
change: this._handleLitValueChange.bind(this),
|
|
962
965
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_LIGHTNESS") +
|
|
@@ -964,21 +967,21 @@ sap.ui.define([
|
|
|
964
967
|
}).addStyleClass(CONSTANTS.RightColumnInputClass).addStyleClass(CONSTANTS.HideForHSVClass);
|
|
965
968
|
|
|
966
969
|
// this alpha field is rendered along with R, G, B fields
|
|
967
|
-
this.oAlphaField =
|
|
970
|
+
this.oAlphaField = this.oColorPickerHelper.factory.createInput(sId + "-aF", {
|
|
968
971
|
value: this.Color.a,
|
|
969
972
|
change: this._handleAlphaValueChange.bind(this),
|
|
970
973
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_ALPHA")
|
|
971
974
|
}).addStyleClass(CONSTANTS.RightColumnInputClass).addStyleClass(CONSTANTS.HideForHSVClass).addStyleClass("sapUnifiedA");
|
|
972
975
|
|
|
973
976
|
// this alpha field is rendered along with H, S, L fields
|
|
974
|
-
this.oAlphaField2 =
|
|
977
|
+
this.oAlphaField2 = this.oColorPickerHelper.factory.createInput(sId + "-aF2", {
|
|
975
978
|
value: this.Color.a,
|
|
976
979
|
change: this._handleAlphaValueChange.bind(this),
|
|
977
980
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_ALPHA")
|
|
978
981
|
}).addStyleClass(CONSTANTS.RightColumnInputClass).addStyleClass(CONSTANTS.HideForHSVClass).addStyleClass("sapUnifiedA");
|
|
979
982
|
|
|
980
983
|
|
|
981
|
-
this.oValField =
|
|
984
|
+
this.oValField = this.oColorPickerHelper.factory.createInput(sId + "-vF", {
|
|
982
985
|
value: this.Color.v,
|
|
983
986
|
change: this._handleValValueChange.bind(this),
|
|
984
987
|
ariaLabelledBy: InvisibleText.getStaticId("sap.ui.unified", "COLORPICKER_VALUE")
|
|
@@ -986,11 +989,11 @@ sap.ui.define([
|
|
|
986
989
|
|
|
987
990
|
|
|
988
991
|
//Commons RGB|HSL output
|
|
989
|
-
this.oRGBorHSLRBGroup =
|
|
992
|
+
this.oRGBorHSLRBGroup = this.oColorPickerHelper.factory.createRadioButtonGroup({
|
|
990
993
|
columns: 2,
|
|
991
994
|
buttons: [
|
|
992
|
-
|
|
993
|
-
|
|
995
|
+
this.oColorPickerHelper.factory.createRadioButtonItem({text: CONSTANTS.RGB}),
|
|
996
|
+
this.oColorPickerHelper.factory.createRadioButtonItem({text: Library.ColorPickerMode.HSL})
|
|
994
997
|
],
|
|
995
998
|
select: this._handleRGBorHSLValueChange.bind(this),
|
|
996
999
|
selectedIndex: (this.Color.formatHSL ? 1 : 0 )
|
|
@@ -999,7 +1002,7 @@ sap.ui.define([
|
|
|
999
1002
|
// Slider
|
|
1000
1003
|
this.oHueInvisibleText = new InvisibleText({text: oRb.getText("COLORPICKER_HUE_SLIDER")}).toStatic();
|
|
1001
1004
|
this.addAggregation("_invisibleTexts", this.oHueInvisibleText, true);
|
|
1002
|
-
this.oSlider =
|
|
1005
|
+
this.oSlider = this.oColorPickerHelper.factory.createSlider(sId + "-hSLD", {
|
|
1003
1006
|
max: 360,
|
|
1004
1007
|
step: 1,
|
|
1005
1008
|
tooltip: oRb.getText("COLORPICKER_HUE"),
|
|
@@ -1015,7 +1018,7 @@ sap.ui.define([
|
|
|
1015
1018
|
this.oAlphaInvisibleText = new InvisibleText({text: oRb.getText("COLORPICKER_ALPHA_SLIDER")}).toStatic();
|
|
1016
1019
|
this.addAggregation("_invisibleTexts", this.oAlphaInvisibleText, true);
|
|
1017
1020
|
|
|
1018
|
-
this.oAlphaSlider =
|
|
1021
|
+
this.oAlphaSlider = this.oColorPickerHelper.factory.createSlider(sId + "-aSLD", {
|
|
1019
1022
|
max: 1,
|
|
1020
1023
|
value: 1,
|
|
1021
1024
|
step: 0.01,
|
|
@@ -2492,7 +2495,7 @@ sap.ui.define([
|
|
|
2492
2495
|
// RGB|HSL output selector
|
|
2493
2496
|
new HLayout({
|
|
2494
2497
|
content: [
|
|
2495
|
-
|
|
2498
|
+
this.oColorPickerHelper.factory.createLabel({ text: "Output:", labelFor: this.oRGBorHSLRBGroup}),
|
|
2496
2499
|
this.oRGBorHSLRBGroup
|
|
2497
2500
|
],
|
|
2498
2501
|
layoutData: this.rbg
|
|
@@ -2515,11 +2518,11 @@ sap.ui.define([
|
|
|
2515
2518
|
ColorPicker.prototype._createUnifiedColorPicker = function(sId) {
|
|
2516
2519
|
var that = this;
|
|
2517
2520
|
|
|
2518
|
-
this.oRbRGB =
|
|
2521
|
+
this.oRbRGB = this.oColorPickerHelper.factory.createRadioButtonItem({tooltip: oRb.getText("COLORPICKER_SELECT_RGB_TOOLTIP")});
|
|
2519
2522
|
this.oRbRGB.addStyleClass("sapUiCPRB");
|
|
2520
|
-
this.oRbHSLV =
|
|
2523
|
+
this.oRbHSLV = this.oColorPickerHelper.factory.createRadioButtonItem({tooltip: oRb.getText("COLORPICKER_SELECT_HSL_TOOLTIP")});
|
|
2521
2524
|
this.oRbHSLV.addStyleClass("sapUiCPRB");
|
|
2522
|
-
this.oButton =
|
|
2525
|
+
this.oButton = this.oColorPickerHelper.factory.createButton(sId + "-toggleMode", {
|
|
2523
2526
|
type: Device.system.phone ? "Default" : "Transparent",
|
|
2524
2527
|
tooltip: oRb.getText("COLORPICKER_TOGGLE_BTN_TOOLTIP"),
|
|
2525
2528
|
icon: "sap-icon://source-code",
|
|
@@ -2530,7 +2533,7 @@ sap.ui.define([
|
|
|
2530
2533
|
this.setAggregation("_oButton", this.oButton, true);
|
|
2531
2534
|
|
|
2532
2535
|
// RGB|HSL output
|
|
2533
|
-
this.oRGBorHSLRBUnifiedGroup =
|
|
2536
|
+
this.oRGBorHSLRBUnifiedGroup = this.oColorPickerHelper.factory.createRadioButtonGroup({
|
|
2534
2537
|
select: this._handleRGBorHSLValueChange.bind(this),
|
|
2535
2538
|
selectedIndex: (this.Color.formatHSL ? 1 : 0)
|
|
2536
2539
|
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides helper sap.ui.unified.ColorPickerHelper.
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
'sap/ui/core/Lib'
|
|
10
|
+
], function(
|
|
11
|
+
Library
|
|
12
|
+
) {
|
|
13
|
+
"use strict";
|
|
14
|
+
var ColorPickerHelper;
|
|
15
|
+
|
|
16
|
+
var oMLibraryLoad = {
|
|
17
|
+
isResponsive: function () {
|
|
18
|
+
return true;
|
|
19
|
+
},
|
|
20
|
+
factory: {
|
|
21
|
+
createLabel: function (mConfig) {
|
|
22
|
+
return new sap.m.Label(mConfig);
|
|
23
|
+
},
|
|
24
|
+
createInput: function (sId, mConfig) {
|
|
25
|
+
return new sap.m.InputBase(sId, mConfig);
|
|
26
|
+
},
|
|
27
|
+
createSlider: function (sId, mConfig) {
|
|
28
|
+
return new sap.m.Slider(sId, mConfig);
|
|
29
|
+
},
|
|
30
|
+
createRadioButtonGroup: function (mConfig) {
|
|
31
|
+
return new sap.m.RadioButtonGroup(mConfig);
|
|
32
|
+
},
|
|
33
|
+
createRadioButtonItem: function (mConfig) {
|
|
34
|
+
return new sap.m.RadioButton(mConfig);
|
|
35
|
+
},
|
|
36
|
+
createButton: function (sId, mConfig) {
|
|
37
|
+
return new sap.m.Button(sId, mConfig);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var oCommonsLibraryLoad = {
|
|
43
|
+
isResponsive: function () {
|
|
44
|
+
return false;
|
|
45
|
+
},
|
|
46
|
+
factory: {
|
|
47
|
+
createLabel: function (mConfig) {
|
|
48
|
+
return new sap.ui.commons.Label(mConfig);
|
|
49
|
+
},
|
|
50
|
+
createInput: function (sId, mConfig) {
|
|
51
|
+
return new sap.ui.commons.TextField(sId, mConfig);
|
|
52
|
+
},
|
|
53
|
+
createSlider: function (sId, mConfig) {
|
|
54
|
+
if (mConfig && mConfig.step) {
|
|
55
|
+
mConfig.smallStepWidth = mConfig.step;
|
|
56
|
+
delete mConfig.step;
|
|
57
|
+
}
|
|
58
|
+
return new sap.ui.commons.Slider(sId, mConfig);
|
|
59
|
+
},
|
|
60
|
+
createRadioButtonGroup: function (mConfig) {
|
|
61
|
+
if (mConfig && mConfig.buttons) {
|
|
62
|
+
mConfig.items = mConfig.buttons;
|
|
63
|
+
delete mConfig.buttons;
|
|
64
|
+
}
|
|
65
|
+
return new sap.ui.commons.RadioButtonGroup(mConfig);
|
|
66
|
+
},
|
|
67
|
+
createRadioButtonItem: function (mConfig) {
|
|
68
|
+
return new sap.ui.core.Item(mConfig);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var oErrorLibraryLoad = {
|
|
74
|
+
isResponsive: function () { return false; },
|
|
75
|
+
factory: {
|
|
76
|
+
createLabel: function () { throw new Error("no Label control available"); },
|
|
77
|
+
createInput: function () { throw new Error("no Input control available"); },
|
|
78
|
+
createSlider: function () { throw new Error("no Slider control available"); },
|
|
79
|
+
createRadioButtonGroup: function () { throw new Error("no RadioButtonGroup control available"); },
|
|
80
|
+
createRadioButtonItem: function () { throw new Error("no RadioButtonItem control available"); }
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
ColorPickerHelper = {
|
|
85
|
+
getHelper: function () {
|
|
86
|
+
if (Library.isLoaded("sap.m")) {
|
|
87
|
+
return oMLibraryLoad;
|
|
88
|
+
} else if (Library.isLoaded("sap.ui.unified")) {
|
|
89
|
+
return oCommonsLibraryLoad;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return oErrorLibraryLoad;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return ColorPickerHelper;
|
|
97
|
+
});
|
|
@@ -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.120.0
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
'sap/ui/core/LabelEnablement',
|
|
14
14
|
'sap/ui/core/InvisibleText',
|
|
15
15
|
'sap/ui/core/library',
|
|
16
|
+
'sap/ui/core/StaticArea',
|
|
16
17
|
'sap/ui/Device',
|
|
17
18
|
'./FileUploaderRenderer',
|
|
18
19
|
'sap/ui/dom/containsOrEquals',
|
|
@@ -21,6 +22,7 @@ sap.ui.define([
|
|
|
21
22
|
'sap/base/security/encodeXML',
|
|
22
23
|
"sap/ui/thirdparty/jquery",
|
|
23
24
|
"sap/ui/core/Configuration",
|
|
25
|
+
"./FileUploaderHelper",
|
|
24
26
|
// jQuery Plugin "addAriaDescribedBy"
|
|
25
27
|
'sap/ui/dom/jquery/Aria'
|
|
26
28
|
], function(
|
|
@@ -29,6 +31,7 @@ sap.ui.define([
|
|
|
29
31
|
LabelEnablement,
|
|
30
32
|
InvisibleText,
|
|
31
33
|
coreLibrary,
|
|
34
|
+
StaticArea,
|
|
32
35
|
Device,
|
|
33
36
|
FileUploaderRenderer,
|
|
34
37
|
containsOrEquals,
|
|
@@ -36,7 +39,8 @@ sap.ui.define([
|
|
|
36
39
|
Log,
|
|
37
40
|
encodeXML,
|
|
38
41
|
jQuery,
|
|
39
|
-
Configuration
|
|
42
|
+
Configuration,
|
|
43
|
+
FileUploaderHelper
|
|
40
44
|
) {
|
|
41
45
|
|
|
42
46
|
|
|
@@ -65,7 +69,7 @@ sap.ui.define([
|
|
|
65
69
|
* @implements sap.ui.core.IFormContent, sap.ui.unified.IProcessableBlobs
|
|
66
70
|
*
|
|
67
71
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
72
|
+
* @version 1.120.0
|
|
69
73
|
*
|
|
70
74
|
* @constructor
|
|
71
75
|
* @public
|
|
@@ -600,15 +604,16 @@ sap.ui.define([
|
|
|
600
604
|
*/
|
|
601
605
|
FileUploader.prototype.init = function(){
|
|
602
606
|
var that = this;
|
|
607
|
+
this.oFileUploaderHelper = FileUploaderHelper.getHelper();
|
|
603
608
|
// load the respective UI-Elements from the FileUploaderHelper
|
|
604
|
-
this.oFilePath =
|
|
609
|
+
this.oFilePath = this.oFileUploaderHelper.createTextField(this.getId() + "-fu_input").addEventDelegate({
|
|
605
610
|
onAfterRendering: function () {
|
|
606
611
|
if (that.getWidth()) {
|
|
607
612
|
that._resizeDomElements();
|
|
608
613
|
}
|
|
609
614
|
}
|
|
610
615
|
});
|
|
611
|
-
this.oBrowse =
|
|
616
|
+
this.oBrowse = this.oFileUploaderHelper.createButton(this.getId() + "-fu_button");
|
|
612
617
|
this.oFilePath.setParent(this);
|
|
613
618
|
this.oBrowse.setParent(this);
|
|
614
619
|
|
|
@@ -869,7 +874,7 @@ sap.ui.define([
|
|
|
869
874
|
// remove the IFRAME
|
|
870
875
|
if (this.oIFrameRef) {
|
|
871
876
|
jQuery(this.oIFrameRef).off();
|
|
872
|
-
|
|
877
|
+
StaticArea.getDomRef().removeChild(this.oIFrameRef);
|
|
873
878
|
this.oIFrameRef = null;
|
|
874
879
|
}
|
|
875
880
|
|
|
@@ -898,7 +903,7 @@ sap.ui.define([
|
|
|
898
903
|
*/
|
|
899
904
|
FileUploader.prototype.onBeforeRendering = function() {
|
|
900
905
|
// store the file uploader outside in the static area
|
|
901
|
-
var oStaticArea =
|
|
906
|
+
var oStaticArea = StaticArea.getDomRef();
|
|
902
907
|
jQuery(this.oFileUpload).appendTo(oStaticArea);
|
|
903
908
|
|
|
904
909
|
if (!this.getName()) {
|
|
@@ -1942,7 +1947,7 @@ sap.ui.define([
|
|
|
1942
1947
|
oIFrameRef.style.display = "none";
|
|
1943
1948
|
/*eslint-enable no-script-url */
|
|
1944
1949
|
oIFrameRef.id = this.getId() + "-frame";
|
|
1945
|
-
|
|
1950
|
+
StaticArea.getDomRef().appendChild(oIFrameRef);
|
|
1946
1951
|
oIFrameRef.contentWindow.name = this.getId() + "-frame";
|
|
1947
1952
|
|
|
1948
1953
|
// sink the load event of the upload iframe
|