@openui5/sap.ui.core 1.71.45 → 1.71.46
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/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +256 -66
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +1 -1
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +52 -52
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/MessageTest.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/control/ControlModel.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
package/src/sap/ui/core/Popup.js
CHANGED
|
@@ -61,6 +61,95 @@ sap.ui.define([
|
|
|
61
61
|
// shortcut for sap.ui.core.OpenState
|
|
62
62
|
var OpenState = library.OpenState;
|
|
63
63
|
|
|
64
|
+
var vGlobalWithinArea;
|
|
65
|
+
|
|
66
|
+
var oResizeObserver;
|
|
67
|
+
var sResizeHandlerIdAttribute = "sapUiPopupResize";
|
|
68
|
+
|
|
69
|
+
if (window.ResizeObserver) {
|
|
70
|
+
oResizeObserver = new window.ResizeObserver(function(aEntries){
|
|
71
|
+
adaptSizeAndPosition(jQuery("#sap-ui-blocklayer-popup"), aEntries[0].target);
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
oResizeObserver = {
|
|
75
|
+
observe: function(oElement) {
|
|
76
|
+
var sHandlerId = oElement.dataset[sResizeHandlerIdAttribute];
|
|
77
|
+
if (!sHandlerId) {
|
|
78
|
+
sHandlerId = ResizeHandler.register(oElement, function(oEvent) {
|
|
79
|
+
adaptSizeAndPosition(jQuery("#sap-ui-blocklayer-popup"), oEvent.target);
|
|
80
|
+
});
|
|
81
|
+
oElement.dataset[sResizeHandlerIdAttribute] = sHandlerId;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
unobserve: function(oElement) {
|
|
85
|
+
var sHandlerId = oElement.dataset[sResizeHandlerIdAttribute];
|
|
86
|
+
if (sHandlerId) {
|
|
87
|
+
ResizeHandler.deregister(sHandlerId);
|
|
88
|
+
delete oElement.dataset[sResizeHandlerIdAttribute];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Convert the different types of 'within' values to a DOM element or the window object.
|
|
96
|
+
*
|
|
97
|
+
* @param {string | sap.ui.core.Element | Element | Window} [vWithin] the given within
|
|
98
|
+
* @returns {Element | Window} the DOM element or Window object that represents the given within
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
function convertWithin(vWithin) {
|
|
102
|
+
var oWithin;
|
|
103
|
+
|
|
104
|
+
if (typeof vWithin === "string") {
|
|
105
|
+
oWithin = document.querySelector(vWithin);
|
|
106
|
+
} else if (vWithin instanceof Element) {
|
|
107
|
+
oWithin = vWithin.getDomRef();
|
|
108
|
+
} else {
|
|
109
|
+
oWithin = vWithin;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return oWithin || window;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Remove the size and position CSS properties from the blocklayer DOM element
|
|
117
|
+
*
|
|
118
|
+
* @param {jQuery} $BlockRef the block layer jQuery object
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
function clearSizeAndPosition($BlockRef) {
|
|
122
|
+
var aProperties = ["left", "top", "width", "height", "position"];
|
|
123
|
+
|
|
124
|
+
if ($BlockRef[0]) {
|
|
125
|
+
aProperties.forEach(function(sProperty) {
|
|
126
|
+
$BlockRef[0].style.removeProperty(sProperty);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Change the size and position of the blocklayer to the same values as for the given 'within'.
|
|
133
|
+
*
|
|
134
|
+
* @param {jQuery} $BlockRef the jQuery object that contains the blocklayer DOM element
|
|
135
|
+
* @param {Element} oWithin the DOM element of the given within
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
function adaptSizeAndPosition($BlockRef, oWithin) {
|
|
139
|
+
var oClientRect = oWithin.getBoundingClientRect();
|
|
140
|
+
|
|
141
|
+
$BlockRef.css({
|
|
142
|
+
width: oClientRect.width,
|
|
143
|
+
height: oClientRect.height,
|
|
144
|
+
display: "block",
|
|
145
|
+
position: "absolute"
|
|
146
|
+
}).position({
|
|
147
|
+
my: "left top",
|
|
148
|
+
at: "left top",
|
|
149
|
+
of: oWithin
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
64
153
|
/**
|
|
65
154
|
* Creates an instance of <code>sap.ui.core.Popup</code> that can be used to open controls as a Popup,
|
|
66
155
|
* visually appearing in front of other controls.
|
|
@@ -635,8 +724,8 @@ sap.ui.define([
|
|
|
635
724
|
* @param {sap.ui.core.Popup.Dock} [at=sap.ui.core.Popup.Dock.CenterCenter] the "of" element's reference point for docking to
|
|
636
725
|
* @param {string | sap.ui.core.Element | Element | jQuery | jQuery.Event} [of=document] specifies the reference element to which the given content should dock to
|
|
637
726
|
* @param {string} [offset='0 0'] the offset relative to the docking point, specified as a string with space-separated pixel values (e.g. "10 0" to move the popup 10 pixels to the right). If the docking of both "my" and "at" are both RTL-sensitive ("begin" or "end"), this offset is automatically mirrored in the RTL case as well.
|
|
638
|
-
* @param {string} [collision='flip'] defines how the position of an element should be adjusted in case it overflows the window in some direction.
|
|
639
|
-
* @param {boolean} [followOf=false] defines whether the popup should follow the dock reference when the reference changes its position.
|
|
727
|
+
* @param {string} [collision='flip'] defines how the position of an element should be adjusted in case it overflows the window or the within area that is set via {@link sap.ui.core.Popup.setWithinArea} in some direction.
|
|
728
|
+
* @param {boolean | function} [followOf=false] defines whether the popup should follow the dock reference when the reference changes its position.
|
|
640
729
|
* @public
|
|
641
730
|
*/
|
|
642
731
|
Popup.prototype.open = function(iDuration, my, at, of, offset, collision, followOf) {
|
|
@@ -647,6 +736,32 @@ sap.ui.define([
|
|
|
647
736
|
return;
|
|
648
737
|
}
|
|
649
738
|
|
|
739
|
+
// iDuration is optional... if not given:
|
|
740
|
+
if (typeof (iDuration) == "string") {
|
|
741
|
+
followOf = collision;
|
|
742
|
+
collision = offset;
|
|
743
|
+
offset = of;
|
|
744
|
+
of = at;
|
|
745
|
+
at = my;
|
|
746
|
+
my = iDuration;
|
|
747
|
+
iDuration = -1;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// if no arguments are passed iDuration has to be set to -1
|
|
751
|
+
if (iDuration === undefined) {
|
|
752
|
+
iDuration = -1;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// all other parameters must be given if any subsequent parameter is given, hence no more shifting
|
|
756
|
+
// now every parameter should be in the right variable
|
|
757
|
+
|
|
758
|
+
assert(iDuration === -1 || (typeof iDuration === "number" && iDuration % 1 == 0), "iDuration must be an integer (or omitted)"); // omitted results in -1
|
|
759
|
+
assert(my === undefined || typeof my === "string", "my must be a string or empty");
|
|
760
|
+
assert(at === undefined || typeof at === "string", "at must be a string or empty");
|
|
761
|
+
assert(!of || typeof of === "object" || typeof of === "function", "of must be empty or an object");
|
|
762
|
+
assert(!offset || typeof offset === "string", "offset must be empty or a string");
|
|
763
|
+
assert(!collision || typeof collision === "string", "collision must be empty or a string");
|
|
764
|
+
|
|
650
765
|
this.eOpenState = OpenState.OPENING;
|
|
651
766
|
|
|
652
767
|
var oStatic;
|
|
@@ -685,32 +800,6 @@ sap.ui.define([
|
|
|
685
800
|
}
|
|
686
801
|
}
|
|
687
802
|
|
|
688
|
-
// iDuration is optional... if not given:
|
|
689
|
-
if (typeof (iDuration) == "string") {
|
|
690
|
-
followOf = collision;
|
|
691
|
-
collision = offset;
|
|
692
|
-
offset = of;
|
|
693
|
-
of = at;
|
|
694
|
-
at = my;
|
|
695
|
-
my = iDuration;
|
|
696
|
-
iDuration = -1;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// if no arguments are passed iDuration has to be set to -1
|
|
700
|
-
if (iDuration === undefined) {
|
|
701
|
-
iDuration = -1;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
// all other parameters must be given if any subsequent parameter is given, hence no more shifting
|
|
705
|
-
// now every parameter should be in the right variable
|
|
706
|
-
|
|
707
|
-
assert(iDuration === -1 || (typeof iDuration === "number" && iDuration % 1 == 0), "iDuration must be an integer (or omitted)"); // omitted results in -1
|
|
708
|
-
assert(my === undefined || typeof my === "string", "my must be a string or empty");
|
|
709
|
-
assert(at === undefined || typeof at === "string", "at must be a string or empty");
|
|
710
|
-
assert(!of || typeof of === "object" || typeof of === "function", "of must be empty or an object");
|
|
711
|
-
assert(!offset || typeof offset === "string", "offset must be empty or a string");
|
|
712
|
-
assert(!collision || typeof collision === "string", "collision must be empty or a string");
|
|
713
|
-
|
|
714
803
|
// save current focused element to restore the focus after closing
|
|
715
804
|
this._oPreviousFocus = Popup.getCurrentFocusInfo();
|
|
716
805
|
|
|
@@ -754,6 +843,9 @@ sap.ui.define([
|
|
|
754
843
|
this._oPosition = _oPosition;
|
|
755
844
|
} else {
|
|
756
845
|
_oPosition = this._oPosition;
|
|
846
|
+
if (vGlobalWithinArea) {
|
|
847
|
+
this._oPosition.within = vGlobalWithinArea;
|
|
848
|
+
}
|
|
757
849
|
}
|
|
758
850
|
if (!_oPosition.of) {
|
|
759
851
|
_oPosition.of = this._oPosition.of || document;
|
|
@@ -925,10 +1017,13 @@ sap.ui.define([
|
|
|
925
1017
|
this._showBlockLayer();
|
|
926
1018
|
}
|
|
927
1019
|
|
|
928
|
-
// When
|
|
929
|
-
//
|
|
930
|
-
|
|
931
|
-
|
|
1020
|
+
// When it runs on a mobile device, the focus doesn't need to be set into the popup area immediately after opening
|
|
1021
|
+
// the popup. It even causes some rendering problem in iOS safari when the focus is set here.
|
|
1022
|
+
if (!this.touchEnabled
|
|
1023
|
+
// When the open process is animated, the focus should be moved out of the previous focused element during the
|
|
1024
|
+
// opening animation. Otherwise, it's not needed to shift the focus because the focus will be set into the popup
|
|
1025
|
+
// in the same call stack in function "_opened"
|
|
1026
|
+
&& bOpenAnimated
|
|
932
1027
|
// some application or test create the static UIArea div by itself and therefore the first focusable element
|
|
933
1028
|
// is not available
|
|
934
1029
|
&& oFirstFocusableInStaticArea
|
|
@@ -947,9 +1042,13 @@ sap.ui.define([
|
|
|
947
1042
|
// popup
|
|
948
1043
|
&& this._getDomRefToFocus() !== document.activeElement) {
|
|
949
1044
|
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1045
|
+
/* actively move the focus to the static UI area to blur the previous focused element after popup is open.
|
|
1046
|
+
The focus will be moved into the popup once the popup opening animation is finished
|
|
1047
|
+
*/
|
|
1048
|
+
/* In safari, internet explorer and edge no scrolling happens when focus() is called on DOM elements with height: 0px.
|
|
1049
|
+
In firefox and chrome no scrolling has to be forced with preventScroll: true in this scenario.
|
|
1050
|
+
*/
|
|
1051
|
+
oFirstFocusableInStaticArea.focus({preventScroll: true});
|
|
953
1052
|
}
|
|
954
1053
|
|
|
955
1054
|
// add Delegate to hosted content for handling of events (e.g. onfocusin)
|
|
@@ -1481,7 +1580,7 @@ sap.ui.define([
|
|
|
1481
1580
|
* @param {sap.ui.core.Popup.Dock | {left: sap.ui.core.CSSSize, top: sap.ui.core.CSSSize}} at specifies the point of the reference element to which the given Content should be aligned
|
|
1482
1581
|
* @param {string | sap.ui.core.Element | Element | jQuery | jQuery.Event} [of=document] specifies the reference element to which the given content should be aligned as specified in the other parameters
|
|
1483
1582
|
* @param {string} [offset='0 0'] the offset relative to the docking point, specified as a string with space-separated pixel values (e.g. "0 10" to move the popup 10 pixels to the right). If the docking of both "my" and "at" are both RTL-sensitive ("begin" or "end"), this offset is automatically mirrored in the RTL case as well.
|
|
1484
|
-
* @param {string} [collision] defines how the position of an element should be adjusted in case it overflows the window in some direction. The valid values that refer to jQuery-UI's position parameters are "flip", "fit" and "none".
|
|
1583
|
+
* @param {string} [collision] defines how the position of an element should be adjusted in case it overflows the window or the within area that is set via {@link sap.ui.core.Popup.setWithinArea} in some direction. The valid values that refer to jQuery-UI's position parameters are "flip", "fit" and "none".
|
|
1485
1584
|
* @return {sap.ui.core.Popup} <code>this</code> to allow method chaining
|
|
1486
1585
|
* @public
|
|
1487
1586
|
*/
|
|
@@ -1514,14 +1613,18 @@ sap.ui.define([
|
|
|
1514
1613
|
offset = null;
|
|
1515
1614
|
}
|
|
1516
1615
|
|
|
1517
|
-
var oPosition = jQuery.extend({},this._oDefaultPosition, {
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1616
|
+
var oPosition = jQuery.extend({}, this._oDefaultPosition, {
|
|
1617
|
+
my: my || this._oDefaultPosition.my, // to use default my if empty string
|
|
1618
|
+
at: at || this._oDefaultPosition.at, // to use default at if empty string
|
|
1619
|
+
of: of,
|
|
1620
|
+
offset: offset,
|
|
1621
|
+
collision: collision
|
|
1523
1622
|
});
|
|
1524
1623
|
|
|
1624
|
+
if (vGlobalWithinArea) {
|
|
1625
|
+
oPosition.within = vGlobalWithinArea;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1525
1628
|
if ( !jQuery.ui.version) {
|
|
1526
1629
|
// only jquery-ui-position.js loaded, not jquery-ui-core.js, so no version info available
|
|
1527
1630
|
if ( Popup._bNewOffset == null ) {
|
|
@@ -1825,12 +1928,17 @@ sap.ui.define([
|
|
|
1825
1928
|
* @private
|
|
1826
1929
|
*/
|
|
1827
1930
|
Popup.prototype._resolveReference = function(oPosition) {
|
|
1828
|
-
var
|
|
1829
|
-
|
|
1830
|
-
oResult = jQuery.extend({}, oPosition, { of : oPosition.of.getDomRef()});
|
|
1831
|
-
}
|
|
1931
|
+
var oExtension,
|
|
1932
|
+
aProperties = ["of", "within"];
|
|
1832
1933
|
|
|
1833
|
-
|
|
1934
|
+
aProperties.forEach(function(sProperty) {
|
|
1935
|
+
if ( oPosition[sProperty] instanceof Element ) {
|
|
1936
|
+
oExtension = oExtension || {};
|
|
1937
|
+
oExtension[sProperty] = oPosition[sProperty].getDomRef();
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
return oExtension ? Object.assign({}, oPosition, oExtension) : oPosition;
|
|
1834
1942
|
};
|
|
1835
1943
|
|
|
1836
1944
|
/**
|
|
@@ -2567,12 +2675,33 @@ sap.ui.define([
|
|
|
2567
2675
|
}
|
|
2568
2676
|
};
|
|
2569
2677
|
|
|
2678
|
+
function connectBlockLayerAndWithin($BlockRef, oWithinDOMRef) {
|
|
2679
|
+
if (oWithinDOMRef === window) {
|
|
2680
|
+
clearSizeAndPosition($BlockRef);
|
|
2681
|
+
document.documentElement.classList.add("sapUiBLyBack");
|
|
2682
|
+
} else {
|
|
2683
|
+
adaptSizeAndPosition($BlockRef, oWithinDOMRef);
|
|
2684
|
+
oWithinDOMRef.classList.add("sapUiBLyBack");
|
|
2685
|
+
oResizeObserver.observe(oWithinDOMRef);
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
function disconnectBlockLayerAndWithin(oWithinDOMRef) {
|
|
2690
|
+
if (oWithinDOMRef === window) {
|
|
2691
|
+
document.documentElement.classList.remove("sapUiBLyBack");
|
|
2692
|
+
} else {
|
|
2693
|
+
oWithinDOMRef.classList.remove("sapUiBLyBack");
|
|
2694
|
+
oResizeObserver.unobserve(oWithinDOMRef);
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2570
2698
|
/**
|
|
2571
2699
|
* @private
|
|
2572
2700
|
*/
|
|
2573
2701
|
Popup.prototype._showBlockLayer = function() {
|
|
2574
2702
|
var $BlockRef = jQuery("#sap-ui-blocklayer-popup"),
|
|
2575
|
-
sClassName = "sapUiBLy" + (this._sModalCSSClass ? " " + this._sModalCSSClass : "")
|
|
2703
|
+
sClassName = "sapUiBLy" + (this._sModalCSSClass ? " " + this._sModalCSSClass : ""),
|
|
2704
|
+
oWithinDOMRef;
|
|
2576
2705
|
|
|
2577
2706
|
if ($BlockRef.length === 0) {
|
|
2578
2707
|
$BlockRef = jQuery('<div id="sap-ui-blocklayer-popup" tabindex="0" class="' + sClassName + '"></div>');
|
|
@@ -2581,6 +2710,16 @@ sap.ui.define([
|
|
|
2581
2710
|
$BlockRef.removeClass().addClass(sClassName);
|
|
2582
2711
|
}
|
|
2583
2712
|
|
|
2713
|
+
// unregister the resize handler for the within area of the currently top most popup
|
|
2714
|
+
var oLastPopupInfo = Popup.blStack[Popup.blStack.length - 1];
|
|
2715
|
+
if (oLastPopupInfo) {
|
|
2716
|
+
oWithinDOMRef = convertWithin(oLastPopupInfo.popup._oLastPosition.within);
|
|
2717
|
+
disconnectBlockLayerAndWithin(oWithinDOMRef);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
oWithinDOMRef = convertWithin(this._oLastPosition.within);
|
|
2721
|
+
connectBlockLayerAndWithin($BlockRef, oWithinDOMRef);
|
|
2722
|
+
|
|
2584
2723
|
// push current z-index to stack
|
|
2585
2724
|
Popup.blStack.push({
|
|
2586
2725
|
zIndex: this._iZIndex - 2,
|
|
@@ -2588,13 +2727,10 @@ sap.ui.define([
|
|
|
2588
2727
|
});
|
|
2589
2728
|
|
|
2590
2729
|
$BlockRef.css({
|
|
2591
|
-
"z-index"
|
|
2592
|
-
"visibility"
|
|
2730
|
+
"z-index": this._iZIndex - 2,
|
|
2731
|
+
"visibility": "visible"
|
|
2593
2732
|
}).show();
|
|
2594
2733
|
|
|
2595
|
-
// prevent HTML page from scrolling
|
|
2596
|
-
jQuery("html").addClass("sapUiBLyBack");
|
|
2597
|
-
|
|
2598
2734
|
if (Popup.blStack.length === 1) {
|
|
2599
2735
|
_fireBlockLayerStateChange({
|
|
2600
2736
|
visible: true,
|
|
@@ -2605,33 +2741,39 @@ sap.ui.define([
|
|
|
2605
2741
|
|
|
2606
2742
|
Popup.prototype._hideBlockLayer = function() {
|
|
2607
2743
|
// a dialog was closed so pop his z-index from the stack
|
|
2608
|
-
var
|
|
2744
|
+
var $BlockRef = jQuery("#sap-ui-blocklayer-popup"),
|
|
2745
|
+
oBlockLayerDomRef = $BlockRef[0],
|
|
2746
|
+
that = this,
|
|
2747
|
+
oLastPopupInfo, oWithinDOMRef;
|
|
2609
2748
|
|
|
2610
|
-
|
|
2611
|
-
|
|
2749
|
+
oWithinDOMRef = convertWithin(this._oLastPosition.within);
|
|
2750
|
+
disconnectBlockLayerAndWithin(oWithinDOMRef);
|
|
2751
|
+
|
|
2752
|
+
if ($BlockRef.length) {
|
|
2612
2753
|
// if there are more z-indices this means there are more dialogs stacked
|
|
2613
2754
|
// up. So redisplay the block layer (with new z-index) under the new
|
|
2614
2755
|
// current dialog which should be displayed.
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2756
|
+
if (Popup.blStack.length > 1) {
|
|
2757
|
+
Popup.blStack = Popup.blStack.filter(function(oPopupInfo) {
|
|
2758
|
+
return oPopupInfo.popup !== that;
|
|
2759
|
+
});
|
|
2760
|
+
oLastPopupInfo = Popup.blStack[Popup.blStack.length - 1];
|
|
2618
2761
|
// set the block layer z-index to the last z-index in the stack and show it
|
|
2619
|
-
oBlockLayerDomRef.style.zIndex =
|
|
2762
|
+
oBlockLayerDomRef.style.zIndex = oLastPopupInfo.zIndex;
|
|
2620
2763
|
oBlockLayerDomRef.style.visibility = "visible";
|
|
2621
2764
|
oBlockLayerDomRef.style.display = "block";
|
|
2765
|
+
|
|
2766
|
+
oWithinDOMRef = convertWithin(oLastPopupInfo.popup._oLastPosition.within);
|
|
2767
|
+
connectBlockLayerAndWithin($BlockRef, oWithinDOMRef);
|
|
2622
2768
|
} else {
|
|
2769
|
+
oLastPopupInfo = Popup.blStack.pop();
|
|
2623
2770
|
// the last dialog was closed so we can hide the block layer now
|
|
2624
2771
|
oBlockLayerDomRef.style.visibility = "hidden";
|
|
2625
2772
|
oBlockLayerDomRef.style.display = "none";
|
|
2626
2773
|
|
|
2627
|
-
window.setTimeout(function() {
|
|
2628
|
-
// Allow scrolling again in HTML page only if there is no BlockLayer left
|
|
2629
|
-
jQuery("html").removeClass("sapUiBLyBack");
|
|
2630
|
-
}, 0);
|
|
2631
|
-
|
|
2632
2774
|
_fireBlockLayerStateChange({
|
|
2633
2775
|
visible: false,
|
|
2634
|
-
zIndex:
|
|
2776
|
+
zIndex: oLastPopupInfo.zIndex
|
|
2635
2777
|
});
|
|
2636
2778
|
}
|
|
2637
2779
|
}
|
|
@@ -3099,5 +3241,53 @@ sap.ui.define([
|
|
|
3099
3241
|
}
|
|
3100
3242
|
};
|
|
3101
3243
|
|
|
3244
|
+
/**
|
|
3245
|
+
* Sets a within area that is used as the area available for positioning the popup. It mainly affects the collision
|
|
3246
|
+
* detection. The position of the popup can then be further adapted depending on the "collision" parameter that is
|
|
3247
|
+
* set with {@link sap.ui.core.Popup#open} or {@link sap.ui.core.Popup#setPosition} when the popup overflows the
|
|
3248
|
+
* within area.
|
|
3249
|
+
*
|
|
3250
|
+
* If no within area is specified, all popups use the <code>window</code> as within area.
|
|
3251
|
+
*
|
|
3252
|
+
* When an {@link sap.ui.core.Element} is set as the within area, make sure that the control is rendered when the popup
|
|
3253
|
+
* opens, otherwise the <code>window</code> is used as the within area.
|
|
3254
|
+
*
|
|
3255
|
+
* @param {string|Element|sap.ui.core.Element|Window} vValue The within area
|
|
3256
|
+
* @public
|
|
3257
|
+
* @since 1.71.49
|
|
3258
|
+
*/
|
|
3259
|
+
Popup.setWithinArea = function (vValue) {
|
|
3260
|
+
vGlobalWithinArea = vValue;
|
|
3261
|
+
};
|
|
3262
|
+
|
|
3263
|
+
/**
|
|
3264
|
+
* Returns the value that has been set by {@link sap.ui.core.Popup.setWithinArea}. When a DOM element that represents the
|
|
3265
|
+
* within area is needed, use {@link sap.ui.core.Popup.getWithinAreaDomRef} instead.
|
|
3266
|
+
*
|
|
3267
|
+
* If no within area is specified, <code>undefined</code> is returned.
|
|
3268
|
+
*
|
|
3269
|
+
* @returns {string|Element|sap.ui.core.Element|Window} The specified within area
|
|
3270
|
+
* @public
|
|
3271
|
+
* @since 1.71.49
|
|
3272
|
+
*/
|
|
3273
|
+
Popup.getWithinArea = function () {
|
|
3274
|
+
return vGlobalWithinArea;
|
|
3275
|
+
};
|
|
3276
|
+
|
|
3277
|
+
/**
|
|
3278
|
+
* Returns the actual DOM element of the value that has been set by {@link sap.ui.core.Popup.setWithinArea}. It
|
|
3279
|
+
* returns <code>window</code> by default when no within area has been set using {@link sap.ui.core.Popup.setWithinArea}.
|
|
3280
|
+
*
|
|
3281
|
+
* When an {@link sap.ui.core.Element} is set as a within area, <code>document.documentElement</code> is returned before element is
|
|
3282
|
+
* rendered.
|
|
3283
|
+
*
|
|
3284
|
+
* @returns {Element | Window} The DOM Element or the window object
|
|
3285
|
+
* @public
|
|
3286
|
+
* @since 1.71.49
|
|
3287
|
+
*/
|
|
3288
|
+
Popup.getWithinAreaDomRef = function () {
|
|
3289
|
+
return convertWithin(vGlobalWithinArea);
|
|
3290
|
+
};
|
|
3291
|
+
|
|
3102
3292
|
return Popup;
|
|
3103
3293
|
});
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* The ScrollBar control can be used for virtual scrolling of a certain area.
|
|
45
45
|
* This means: to simulate a very large scrollable area when technically the area is small and the control takes care of displaying the respective part only. E.g. a Table control can take care of only rendering the currently visible rows and use this ScrollBar control to make the user think he actually scrolls through a long list.
|
|
46
46
|
* @extends sap.ui.core.Control
|
|
47
|
-
* @version 1.71.
|
|
47
|
+
* @version 1.71.46
|
|
48
48
|
*
|
|
49
49
|
* @public
|
|
50
50
|
* @deprecated as of version 1.56
|
package/src/sap/ui/core/Title.js
CHANGED
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @class
|
|
32
32
|
* Abstract class that can be extended in order to implement any extended tooltip. For example, RichTooltip Control is based on it. It provides the opening/closing behavior and the main "text" property.
|
|
33
33
|
* @extends sap.ui.core.Control
|
|
34
|
-
* @version 1.71.
|
|
34
|
+
* @version 1.71.46
|
|
35
35
|
*
|
|
36
36
|
* @public
|
|
37
37
|
* @alias sap.ui.core.TooltipBase
|
|
@@ -175,7 +175,7 @@ sap.ui.define([
|
|
|
175
175
|
*
|
|
176
176
|
* @extends sap.ui.base.ManagedObject
|
|
177
177
|
* @author SAP SE
|
|
178
|
-
* @version 1.71.
|
|
178
|
+
* @version 1.71.46
|
|
179
179
|
* @param {sap.ui.core.Core} oCore internal API of the <core>Core</code> that manages this UIArea
|
|
180
180
|
* @param {object} [oRootNode] reference to the DOM element that should be 'hosting' the UI Area.
|
|
181
181
|
* @public
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* @extends sap.ui.core.Component
|
|
56
56
|
* @abstract
|
|
57
57
|
* @author SAP SE
|
|
58
|
-
* @version 1.71.
|
|
58
|
+
* @version 1.71.46
|
|
59
59
|
* @alias sap.ui.core.UIComponent
|
|
60
60
|
* @since 1.9.2
|
|
61
61
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
@@ -22,7 +22,7 @@ sap.ui.define(['./ComponentMetadata', './library'],
|
|
|
22
22
|
* @experimental Since 1.15.1. The Component concept is still under construction, so some implementation details can be changed in future.
|
|
23
23
|
* @class
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.71.
|
|
25
|
+
* @version 1.71.46
|
|
26
26
|
* @since 1.15.1
|
|
27
27
|
* @alias sap.ui.core.UIComponentMetadata
|
|
28
28
|
*/
|
|
@@ -20,7 +20,7 @@ sap.ui.define(['./LayoutData', './library'],
|
|
|
20
20
|
* @class
|
|
21
21
|
* Allows to add multiple LayoutData to one control in case that an easy switch of layouts (e.g. in a Form) is needed.
|
|
22
22
|
* @extends sap.ui.core.LayoutData
|
|
23
|
-
* @version 1.71.
|
|
23
|
+
* @version 1.71.46
|
|
24
24
|
*
|
|
25
25
|
* @public
|
|
26
26
|
* @since 1.9.2
|
|
@@ -149,7 +149,7 @@ sap.ui.define([
|
|
|
149
149
|
* @extends sap.ui.core.Control
|
|
150
150
|
*
|
|
151
151
|
* @author SAP SE
|
|
152
|
-
* @version 1.71.
|
|
152
|
+
* @version 1.71.46
|
|
153
153
|
* @since 1.56.0
|
|
154
154
|
* @alias sap.ui.core.XMLComposite
|
|
155
155
|
* @see {@link topic:b83a4dcb7d0e46969027345b8d32fd44 XML Composite Controls}
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @param {object} oClassInfo static info to construct the metadata from
|
|
31
31
|
*
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.71.
|
|
33
|
+
* @version 1.71.46
|
|
34
34
|
* @since 1.50.0
|
|
35
35
|
* @alias sap.ui.core.XMLCompositeMetadata
|
|
36
36
|
* @extends sap.ui.core.ElementMetadata
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
* @param {Element[]} aItemDomRefs Array of DOM references representing the items for the navigation
|
|
83
83
|
* @param {boolean} [bNotInTabChain=false] Whether the selected element should be in the tab chain or not
|
|
84
84
|
*
|
|
85
|
-
* @version 1.71.
|
|
85
|
+
* @version 1.71.46
|
|
86
86
|
* @alias sap.ui.core.delegate.ItemNavigation
|
|
87
87
|
* @public
|
|
88
88
|
*/
|