@openui5/sap.ui.core 1.92.0 → 1.93.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.eslintrc → .eslintrc.json} +0 -0
- package/.reuse/dep5 +5 -0
- package/THIRDPARTY.txt +10 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +5 -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 +7 -4
- package/src/sap/base/i18n/ResourceBundle.js +2 -2
- package/src/sap/base/util/Properties.js +4 -1
- package/src/sap/base/util/isEmptyObject.js +1 -2
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.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/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.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/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.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/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.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/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/VersionInfo.js +1 -0
- package/src/sap/ui/base/DataType.js +1 -0
- 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 +120 -18
- package/src/sap/ui/base/ManagedObjectMetadata.js +14 -5
- 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 +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +4 -1
- package/src/sap/ui/core/Component.js +143 -42
- 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/Configuration.js +2 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +18 -21
- 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 +2 -2
- 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/InvisibleMessage.js +9 -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 +124 -69
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +53 -80
- package/src/sap/ui/core/Placeholder.js +1 -0
- package/src/sap/ui/core/Popup.js +29 -5
- package/src/sap/ui/core/RenderManager.js +25 -22
- 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/ThemeCheck.js +13 -61
- 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 +5 -2
- package/src/sap/ui/core/UIComponent.js +46 -32
- 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/XMLTemplateProcessor.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 +2 -9
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +41 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +2 -0
- package/src/sap/ui/core/format/NumberFormat.js +2 -0
- 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 +3 -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/mvc/Controller.js +146 -8
- package/src/sap/ui/core/mvc/HTMLView.js +3 -1
- package/src/sap/ui/core/mvc/JSONView.js +7 -5
- package/src/sap/ui/core/mvc/JSView.js +4 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +16 -5
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +13 -9
- 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/routing/History.js +26 -16
- package/src/sap/ui/core/routing/Route.js +10 -1
- package/src/sap/ui/core/routing/Router.js +8 -5
- package/src/sap/ui/core/routing/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +26 -0
- package/src/sap/ui/core/routing/async/Route.js +6 -3
- package/src/sap/ui/core/routing/async/Target.js +29 -4
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/App.support.js +35 -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/controls/ObjectViewer.js +5 -9
- 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/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -0
- package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
- package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
- package/src/sap/ui/core/themes/base/base.less +569 -414
- package/src/sap/ui/core/themes/base/global.less +38 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -2
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
- package/src/sap/ui/core/theming/Parameters.js +221 -59
- package/src/sap/ui/core/theming/ThemeHelper.js +94 -0
- 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 +2 -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 +20 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +18 -0
- 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 +2 -2
- package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
- 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/events/jquery/EventSimulation.js +7 -6
- package/src/sap/ui/events/jquery/EventTriggerHook.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/Context.js +31 -11
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +19 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +3 -3
- package/src/sap/ui/model/SelectionModel.js +5 -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/analytics/AnalyticalBinding.js +8 -6
- package/src/sap/ui/model/base/ManagedObjectModel.js +9 -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/ODataListBinding.js +1 -0
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +3 -2
- 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/ODataUtils.js +19 -0
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +30 -27
- 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 +7 -2
- 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 +3 -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 +7 -2
- package/src/sap/ui/model/odata/type/UnitMixin.js +20 -7
- package/src/sap/ui/model/odata/v2/Context.js +165 -0
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +19 -5
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +18 -78
- package/src/sap/ui/model/odata/v2/ODataModel.js +74 -52
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +55 -41
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +16 -10
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +39 -21
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +3 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +15 -15
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -6
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +5 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +7 -6
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +17 -2
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +3 -2
- 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/performance/Measurement.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +2 -1
- package/src/sap/ui/performance/trace/Interaction.js +11 -9
- package/src/sap/ui/qunit/QUnitUtils.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/security/FrameOptions.js +2 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -0
- package/src/sap/ui/test/TestUtils.js +17 -30
- package/src/sap/ui/test/launchers/componentLauncher.js +2 -1
- package/src/sap/ui/test/opaQunit.js +6 -9
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
- package/src/sap/ui/thirdparty/IPv6.js +2 -2
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
- package/src/sap/ui/thirdparty/URI.js +14 -5
- package/src/sap/ui/thirdparty/URITemplate.js +2 -2
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +10 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +5 -2
|
@@ -122,6 +122,13 @@
|
|
|
122
122
|
@sapUiContentTextShadow: @sapContent_TextShadow;
|
|
123
123
|
@sapUiContentContrastTextShadow: @sapContent_ContrastTextShadow;
|
|
124
124
|
@sapUiContentHeaderShadow: @sapContent_HeaderShadow;
|
|
125
|
+
@sapUiContentInteractionShadow: @sapContent_Interaction_Shadow;
|
|
126
|
+
@sapUiContentSelectedShadow: @sapContent_Selected_Shadow;
|
|
127
|
+
@sapUiContentNegativeShadow: @sapContent_Negative_Shadow;
|
|
128
|
+
@sapUiContentCriticalShadow: @sapContent_Critical_Shadow;
|
|
129
|
+
@sapUiContentPositiveShadow: @sapContent_Positive_Shadow;
|
|
130
|
+
@sapUiContentInformativeShadow: @sapContent_Informative_Shadow;
|
|
131
|
+
@sapUiContentNeutralShadow: @sapContent_Neutral_Shadow;
|
|
125
132
|
@sapUiContentSearchHighlightColor: @sapContent_SearchHighlightColor;
|
|
126
133
|
@sapUiContentHelpColor: @sapContent_HelpColor;
|
|
127
134
|
@sapUiContentLabelColor: @sapContent_LabelColor;
|
|
@@ -151,9 +158,22 @@
|
|
|
151
158
|
@sapUiContentIllustrativeColor6: @sapContent_Illustrative_Color6;
|
|
152
159
|
@sapUiContentIllustrativeColor7: @sapContent_Illustrative_Color7;
|
|
153
160
|
@sapUiContentIllustrativeColor8: @sapContent_Illustrative_Color8;
|
|
161
|
+
@sapUiContentIllustrativeColor9: @sapContent_Illustrative_Color9;
|
|
162
|
+
@sapUiContentIllustrativeColor10: @sapContent_Illustrative_Color10;
|
|
163
|
+
@sapUiContentIllustrativeColor11: @sapContent_Illustrative_Color11;
|
|
164
|
+
@sapUiContentIllustrativeColor12: @sapContent_Illustrative_Color12;
|
|
165
|
+
@sapUiContentIllustrativeColor13: @sapContent_Illustrative_Color13;
|
|
166
|
+
@sapUiContentIllustrativeColor14: @sapContent_Illustrative_Color14;
|
|
167
|
+
@sapUiContentIllustrativeColor15: @sapContent_Illustrative_Color15;
|
|
168
|
+
@sapUiContentIllustrativeColor16: @sapContent_Illustrative_Color16;
|
|
169
|
+
@sapUiContentIllustrativeColor17: @sapContent_Illustrative_Color17;
|
|
170
|
+
@sapUiContentIllustrativeColor18: @sapContent_Illustrative_Color18;
|
|
171
|
+
@sapUiContentIllustrativeColor19: @sapContent_Illustrative_Color19;
|
|
172
|
+
@sapUiContentIllustrativeColor20: @sapContent_Illustrative_Color20;
|
|
154
173
|
|
|
155
174
|
@sapUiFontLightFamily: @sapFontLightFamily;
|
|
156
175
|
@sapUiFontBoldFamily: @sapFontBoldFamily;
|
|
176
|
+
@sapUiFontBlackFamily: @sapFontBlackFamily;
|
|
157
177
|
@sapUiFontHeaderFamily: @sapFontHeaderFamily;
|
|
158
178
|
@sapMFontSmallSize: @sapFontSmallSize;
|
|
159
179
|
@sapMFontLargeSize: @sapFontLargeSize;
|
|
@@ -176,6 +196,7 @@
|
|
|
176
196
|
@sapUiShellBackgroundImageRepeat: @sapShell_BackgroundImageRepeat;
|
|
177
197
|
@sapUiShellBorderColor: @sapShell_BorderColor;
|
|
178
198
|
@sapUiShellTextColor: @sapShell_TextColor;
|
|
199
|
+
@sapUiShellInteractiveBackground: @sapShell_InteractiveBackground;
|
|
179
200
|
@sapUiShellInteractiveTextColor: @sapShell_InteractiveTextColor;
|
|
180
201
|
@sapUiShellInteractiveBorderColor: @sapShell_InteractiveBorderColor;
|
|
181
202
|
@sapUiShellGroupTitleTextColor: @sapShell_GroupTitleTextColor;
|
|
@@ -457,6 +478,17 @@
|
|
|
457
478
|
@sapUiAccent9: @sapAccentColor9;
|
|
458
479
|
@sapUiAccent10: @sapAccentColor10;
|
|
459
480
|
|
|
481
|
+
@sapUiAccentBackgroundColor1: @sapAccentBackgroundColor1;
|
|
482
|
+
@sapUiAccentBackgroundColor2: @sapAccentBackgroundColor2;
|
|
483
|
+
@sapUiAccentBackgroundColor3: @sapAccentBackgroundColor3;
|
|
484
|
+
@sapUiAccentBackgroundColor4: @sapAccentBackgroundColor4;
|
|
485
|
+
@sapUiAccentBackgroundColor5: @sapAccentBackgroundColor5;
|
|
486
|
+
@sapUiAccentBackgroundColor6: @sapAccentBackgroundColor6;
|
|
487
|
+
@sapUiAccentBackgroundColor7: @sapAccentBackgroundColor7;
|
|
488
|
+
@sapUiAccentBackgroundColor8: @sapAccentBackgroundColor8;
|
|
489
|
+
@sapUiAccentBackgroundColor9: @sapAccentBackgroundColor9;
|
|
490
|
+
@sapUiAccentBackgroundColor10: @sapAccentBackgroundColor10;
|
|
491
|
+
|
|
460
492
|
|
|
461
493
|
// =====================================
|
|
462
494
|
// Indication Colors
|
|
@@ -641,6 +673,8 @@
|
|
|
641
673
|
|
|
642
674
|
@sapMPlatformDependent: false;
|
|
643
675
|
|
|
676
|
+
@sapUiColumnHeaderFontSize: @sapMFontMediumSize;
|
|
677
|
+
@sapUiColumnHeaderFontWeight: normal;
|
|
644
678
|
|
|
645
679
|
|
|
646
680
|
// =====================================
|
|
@@ -1169,6 +1203,10 @@
|
|
|
1169
1203
|
@sapUiFontMonospaceFamily: Lucida Console; // the default monospacefont
|
|
1170
1204
|
|
|
1171
1205
|
|
|
1206
|
+
// SAP-icons font url - to be removed when integrating fonts from theming base content
|
|
1207
|
+
@sapUiIconFontUrl: url('./fonts/SAP-icons.woff2');
|
|
1208
|
+
|
|
1209
|
+
|
|
1172
1210
|
// SOME important control-specific parameters...
|
|
1173
1211
|
|
|
1174
1212
|
//
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
@import "CommandShortcutHints.less";
|
|
15
15
|
@import "DragAndDrop.less";
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
@import (less) "SAP-icons.css";
|
|
17
|
+
@import "SAP-icons.less";
|
|
19
18
|
@import "Icon.less";
|
|
20
19
|
|
|
21
20
|
@import "LocalBusyIndicator.less";
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
@sapUiFontFamily: Arial,Helvetica,sans-serif;
|
|
65
65
|
@sapUiFontLightFamily: Arial,Helvetica,sans-serif;
|
|
66
66
|
@sapUiFontBoldFamily: Arial,Helvetica,sans-serif;
|
|
67
|
+
@sapUiFontBlackFamily: Arial,Helvetica,sans-serif;
|
|
67
68
|
@sapUiFontHeaderFamily: Arial,Helvetica,sans-serif;
|
|
68
69
|
@sapUiFontSize: medium; // 16px;
|
|
69
70
|
@sapMFontSmallSize: 12px;
|
|
@@ -135,6 +136,13 @@
|
|
|
135
136
|
@sapUiContentTextShadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
|
|
136
137
|
@sapUiContentContrastTextShadow: none;
|
|
137
138
|
@sapUiContentHeaderShadow: inset 0 -0.125rem #FFFFFF;
|
|
139
|
+
@sapUiContentInteractionShadow: none;
|
|
140
|
+
@sapUiContentSelectedShadow: none;
|
|
141
|
+
@sapUiContentNegativeShadow: none;
|
|
142
|
+
@sapUiContentCriticalShadow: none;
|
|
143
|
+
@sapUiContentPositiveShadow: none;
|
|
144
|
+
@sapUiContentInformativeShadow: none;
|
|
145
|
+
@sapUiContentNeutralShadow: none;
|
|
138
146
|
@sapUiContentSearchHighlightColor: #7A5100;
|
|
139
147
|
@sapUiContentHelpColor: #03B803;
|
|
140
148
|
@sapUiContentLabelColor: #FFFFFF;
|
|
@@ -164,6 +172,18 @@
|
|
|
164
172
|
@sapUiContentIllustrativeColor6: #C6CACE;
|
|
165
173
|
@sapUiContentIllustrativeColor7: #E7E9EA;
|
|
166
174
|
@sapUiContentIllustrativeColor8: #FFFFFF;
|
|
175
|
+
@sapUiContentIllustrativeColor9: #64EDD2;
|
|
176
|
+
@sapUiContentIllustrativeColor10: #E7E9EA;
|
|
177
|
+
@sapUiContentIllustrativeColor11: #F31DED;
|
|
178
|
+
@sapUiContentIllustrativeColor12: #5DC122;
|
|
179
|
+
@sapUiContentIllustrativeColor13: #4bA1F6;
|
|
180
|
+
@sapUiContentIllustrativeColor14: #298FF4;
|
|
181
|
+
@sapUiContentIllustrativeColor15: #E6A400;
|
|
182
|
+
@sapUiContentIllustrativeColor16: #085AAA;
|
|
183
|
+
@sapUiContentIllustrativeColor17: #00A5A8;
|
|
184
|
+
@sapUiContentIllustrativeColor18: #D9DDDE;
|
|
185
|
+
@sapUiContentIllustrativeColor19: #CCD0D2;
|
|
186
|
+
@sapUiContentIllustrativeColor20: #BEC4C6;
|
|
167
187
|
|
|
168
188
|
@sapUiShellBackground: #000000;
|
|
169
189
|
@sapUiShellBackgroundImage: #000000;
|
|
@@ -173,6 +193,7 @@
|
|
|
173
193
|
@sapUiShellBackgroundGradient: #000000;
|
|
174
194
|
@sapUiShellBorderColor: #FFFFFF;
|
|
175
195
|
@sapUiShellTextColor: #FFFFFF;
|
|
196
|
+
@sapUiShellInteractiveBackground: #000000;
|
|
176
197
|
@sapUiShellInteractiveTextColor: #FFFFFF;
|
|
177
198
|
@sapUiShellInteractiveBorderColor: #FFFFFF;
|
|
178
199
|
@sapUiShellGroupTitleTextColor: #FFFFFF;
|
|
@@ -572,6 +593,8 @@
|
|
|
572
593
|
|
|
573
594
|
@sapMPlatformDependent: false;
|
|
574
595
|
|
|
596
|
+
@sapUiColumnHeaderFontSize: @sapMFontMediumSize;
|
|
597
|
+
@sapUiColumnHeaderFontWeight: normal;
|
|
575
598
|
|
|
576
599
|
|
|
577
600
|
// =====================================
|
|
@@ -1094,6 +1117,17 @@
|
|
|
1094
1117
|
@sapUiAccent9: #B995E0;
|
|
1095
1118
|
@sapUiAccent10: #B0BCC5;
|
|
1096
1119
|
|
|
1120
|
+
@sapUiAccentBackgroundColor1: #FFF3B8;
|
|
1121
|
+
@sapUiAccentBackgroundColor2: #FFD0E7;
|
|
1122
|
+
@sapUiAccentBackgroundColor3: #FFF0FA;
|
|
1123
|
+
@sapUiAccentBackgroundColor4: #FFDCF3;
|
|
1124
|
+
@sapUiAccentBackgroundColor5: #DED3FF;
|
|
1125
|
+
@sapUiAccentBackgroundColor6: #D1EFFF;
|
|
1126
|
+
@sapUiAccentBackgroundColor7: #C2FCEE;
|
|
1127
|
+
@sapUiAccentBackgroundColor8: #EBF5CB;
|
|
1128
|
+
@sapUiAccentBackgroundColor9: #DAFDF5;
|
|
1129
|
+
@sapUiAccentBackgroundColor10: #EAECEE;
|
|
1130
|
+
|
|
1097
1131
|
@sapUiLegendWorkingBackground: #2E2E2E;
|
|
1098
1132
|
@sapUiLegendNonWorkingBackground: #4D4D4D;
|
|
1099
1133
|
@sapUiLegendCurrentDateTime: #E269C9;
|
|
@@ -17,9 +17,11 @@ sap.ui.define([
|
|
|
17
17
|
'sap/base/Log',
|
|
18
18
|
'sap/base/util/extend',
|
|
19
19
|
'sap/ui/core/ThemeCheck',
|
|
20
|
-
'sap/
|
|
20
|
+
'sap/base/util/LoaderExtensions',
|
|
21
|
+
'sap/ui/thirdparty/jquery',
|
|
22
|
+
'./ThemeHelper'
|
|
21
23
|
],
|
|
22
|
-
function(URI, Element, UriParameters, Log, extend, ThemeCheck, jQuery) {
|
|
24
|
+
function(URI, Element, UriParameters, Log, extend, ThemeCheck, LoaderExtensions, jQuery, ThemeHelper) {
|
|
23
25
|
"use strict";
|
|
24
26
|
|
|
25
27
|
var oCfgData = window["sap-ui-config"] || {};
|
|
@@ -58,12 +60,13 @@ sap.ui.define([
|
|
|
58
60
|
|
|
59
61
|
var bUseInlineParameters = UriParameters.fromQuery(window.location.search).get("sap-ui-xx-no-inline-theming-parameters") !== "true";
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
mParameters = null;
|
|
63
|
-
}
|
|
63
|
+
var oComputedScopeStyle, oDummyScopeElement;
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Resolves relative URLs in parameter values.
|
|
67
|
+
* Only for inline-parameters.
|
|
68
|
+
*/
|
|
65
69
|
function checkAndResolveRelativeUrl(sUrl, sThemeBaseUrl) {
|
|
66
|
-
|
|
67
70
|
var aMatch = rCssUrl.exec(sUrl);
|
|
68
71
|
if (aMatch) {
|
|
69
72
|
var oUri = new URI(aMatch[1]);
|
|
@@ -78,6 +81,33 @@ sap.ui.define([
|
|
|
78
81
|
return sUrl;
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Checks the given parameter value if it contains a relative URL.
|
|
86
|
+
* If so we read a second css-variable containing a ui5:// url which needs to be resolved.
|
|
87
|
+
* @param {string} sParam parameter name
|
|
88
|
+
* @returns {string} the parameter value, if necessary a ui5://... URL is resolved
|
|
89
|
+
*/
|
|
90
|
+
function checkAndResolveUI5Url(sParamValue, sParameterName) {
|
|
91
|
+
|
|
92
|
+
var aMatch = rCssUrl.exec(sParamValue);
|
|
93
|
+
if (aMatch && aMatch[1]) {
|
|
94
|
+
// read companion-variable, can contain a ui5:// url, or an already absolute url
|
|
95
|
+
var oBodyStyle = window.getComputedStyle(document.body || document.documentElement);
|
|
96
|
+
sParamValue = oBodyStyle.getPropertyValue("--" + sParameterName + "__asResolvedUrl").trim();
|
|
97
|
+
if (sParamValue) {
|
|
98
|
+
// JSON.parse helps us get a consistent escaping situation
|
|
99
|
+
sParamValue = JSON.parse(sParamValue);
|
|
100
|
+
var sResolvedUrl = LoaderExtensions.resolveUI5Url(sParamValue);
|
|
101
|
+
// stringify again to preserve original escaping
|
|
102
|
+
sParamValue = "url(" + JSON.stringify(sResolvedUrl) + ")";
|
|
103
|
+
} else {
|
|
104
|
+
Log.error("The parameter '" + sParameterName + "' contains a url, but no matching resolved-url CSS variable could be found.");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return sParamValue;
|
|
109
|
+
}
|
|
110
|
+
|
|
81
111
|
function mergeParameterSet(mCurrent, mNew, sThemeBaseUrl) {
|
|
82
112
|
for (var sParam in mNew) {
|
|
83
113
|
if (typeof mCurrent[sParam] === "undefined") {
|
|
@@ -89,13 +119,9 @@ sap.ui.define([
|
|
|
89
119
|
|
|
90
120
|
function mergeParameters(mNewParameters, sThemeBaseUrl) {
|
|
91
121
|
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
// "param1": "value1",
|
|
95
|
-
// "param2": "value2"
|
|
96
|
-
// }
|
|
122
|
+
// normalize parameter maps
|
|
123
|
+
// scoped themes like sap_belize already provide nested objects:
|
|
97
124
|
if (typeof mNewParameters["default"] !== "object") {
|
|
98
|
-
// migrate to new format
|
|
99
125
|
mNewParameters = {
|
|
100
126
|
"default": mNewParameters,
|
|
101
127
|
"scopes": {}
|
|
@@ -119,6 +145,20 @@ sap.ui.define([
|
|
|
119
145
|
mergeParameterSet(mParameters["scopes"][sScopeName], mNewParameters["scopes"][sScopeName], sThemeBaseUrl);
|
|
120
146
|
}
|
|
121
147
|
}
|
|
148
|
+
|
|
149
|
+
var aScopeList = Object.keys(mParameters["scopes"]);
|
|
150
|
+
if (aScopeList.length) {
|
|
151
|
+
if (aScopeList.length > 1) {
|
|
152
|
+
Log.error("There are multiple theming parameter scopes available but only a single scope is supported. Only the first scope '" + aScopeList[0] + "' is used for retrieval of parameters.");
|
|
153
|
+
}
|
|
154
|
+
// Add dummy scope element
|
|
155
|
+
if (!oComputedScopeStyle) {
|
|
156
|
+
oDummyScopeElement = document.createElement("span");
|
|
157
|
+
oDummyScopeElement.classList.add(aScopeList[0]);
|
|
158
|
+
document.documentElement.appendChild(oDummyScopeElement);
|
|
159
|
+
oComputedScopeStyle = window.getComputedStyle(oDummyScopeElement);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
122
162
|
}
|
|
123
163
|
|
|
124
164
|
function forEachStyleSheet(fnCallback) {
|
|
@@ -128,6 +168,11 @@ sap.ui.define([
|
|
|
128
168
|
}
|
|
129
169
|
|
|
130
170
|
function parseParameters(sId) {
|
|
171
|
+
// only parse parameters if the given lib does not support CSS variables
|
|
172
|
+
if (libSupportsCSSVariables(sId)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
|
|
131
176
|
var oUrl = getThemeBaseUrlForId(sId);
|
|
132
177
|
|
|
133
178
|
var bThemeApplied = ThemeCheck.checkStyle(sId);
|
|
@@ -161,18 +206,50 @@ sap.ui.define([
|
|
|
161
206
|
}
|
|
162
207
|
}
|
|
163
208
|
}
|
|
164
|
-
return false; //could not parse parameters
|
|
209
|
+
return false; //could not parse parameters OR theme is not applied OR library has no parameters
|
|
165
210
|
}
|
|
166
211
|
|
|
167
|
-
|
|
212
|
+
function libSupportsCSSVariables(sId) {
|
|
213
|
+
var sLibName = sId.replace("sap-ui-theme-", "").replace(/\./g, "-");
|
|
214
|
+
var sVariablesMarker = !!(window.getComputedStyle(document.body || document.documentElement).getPropertyValue("--sapUiTheme-" + sLibName).trim());
|
|
215
|
+
// retreive scope list from metadata (if the theme supports them)
|
|
216
|
+
if (sVariablesMarker) {
|
|
217
|
+
var oMetadata = ThemeHelper.getMetadata(sId);
|
|
218
|
+
if (oMetadata && oMetadata.Scopes && oMetadata.Scopes.length > 0) {
|
|
219
|
+
var mScopes = {};
|
|
220
|
+
oMetadata.Scopes.forEach(function(sScope) {
|
|
221
|
+
mScopes[sScope] = {};
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// merge empty scopes into parameters cache
|
|
225
|
+
// will be filled one-by-one when accessing scoped variables later
|
|
226
|
+
mergeParameters({
|
|
227
|
+
"default": {},
|
|
228
|
+
scopes: mScopes
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return sVariablesMarker;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
168
236
|
* Load parameters for a library/theme combination as identified by the URL of the library.css
|
|
237
|
+
* @param {string} sId the library name for which parameters might be loaded
|
|
238
|
+
* @param {boolean} [bGetAll] whether the loadParameters call stems from a Parameters.get() call
|
|
169
239
|
*/
|
|
170
|
-
function loadParameters(sId) {
|
|
240
|
+
function loadParameters(sId, bGetAll) {
|
|
171
241
|
var oUrl = getThemeBaseUrlForId(sId);
|
|
172
242
|
|
|
173
|
-
|
|
174
|
-
|
|
243
|
+
// [Compatibility]: the legacy sync API must return a map of ALL parameter values.
|
|
244
|
+
// With CSS wariables supported, we can only get this map by requesting the library-parameters.json.
|
|
245
|
+
// The DOM API does not provide an enumeration of all variables.
|
|
246
|
+
if (libSupportsCSSVariables(sId) && !bGetAll) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
175
249
|
|
|
250
|
+
// try to parse the inline-parameters for the given library
|
|
251
|
+
// this may fail for a number of reasons, see below
|
|
252
|
+
if (!parseParameters(sId)) {
|
|
176
253
|
// derive parameter file URL from CSS file URL
|
|
177
254
|
// $1: name of library (incl. variants)
|
|
178
255
|
// $2: additional parameters, e.g. for sap-ui-merged, version/sap-ui-dist-version
|
|
@@ -292,7 +369,19 @@ sap.ui.define([
|
|
|
292
369
|
});
|
|
293
370
|
}
|
|
294
371
|
|
|
295
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Retrieves a map containing all inline-parameters.
|
|
374
|
+
* Parameters from CSS Variables are dynamically written to the mParameters data-structure on demand,
|
|
375
|
+
* everytime a parameter is read from a CSS variable via DOM API.
|
|
376
|
+
*
|
|
377
|
+
* IMPORTANT: See 'bGetAll' for special SYNC path for Parameters.get() and libraries with CSS Variables
|
|
378
|
+
*
|
|
379
|
+
* @param {boolean} bAsync whether to load and parse the parameters asynchronously
|
|
380
|
+
* @param {boolean} bGetAll SYNC path only: when Parameters.get() is called,
|
|
381
|
+
* we might need to enforce the loading of a library-parameters.json for libraries using CSS Variables instead of inline-parameters
|
|
382
|
+
* @returns {object} a map of all parameters
|
|
383
|
+
*/
|
|
384
|
+
function getParameters(bAsync, bGetAll) {
|
|
296
385
|
// Inital loading
|
|
297
386
|
if (!mParameters) {
|
|
298
387
|
// Merge an empty parameter set to initialize the internal object
|
|
@@ -308,7 +397,7 @@ sap.ui.define([
|
|
|
308
397
|
aParametersToLoad.push(sId);
|
|
309
398
|
}
|
|
310
399
|
} else {
|
|
311
|
-
loadParameters(sId);
|
|
400
|
+
loadParameters(sId, bGetAll);
|
|
312
401
|
}
|
|
313
402
|
});
|
|
314
403
|
}
|
|
@@ -332,9 +421,15 @@ sap.ui.define([
|
|
|
332
421
|
aParametersToLoad = aPendingThemes;
|
|
333
422
|
}
|
|
334
423
|
|
|
335
|
-
|
|
424
|
+
/**
|
|
425
|
+
* Loads library-parameters.json files if some libraries are missing.
|
|
426
|
+
* @param {boolean} bGetAll whether we need to enforce the loading of library-parameters.json files for libraries with CSS variables
|
|
427
|
+
*/
|
|
428
|
+
function loadPendingLibraryParameters(bGetAll) {
|
|
336
429
|
// lazy loading of further library parameters
|
|
337
|
-
aParametersToLoad.forEach(
|
|
430
|
+
aParametersToLoad.forEach(function(sLibId) {
|
|
431
|
+
loadParameters(sLibId, bGetAll);
|
|
432
|
+
});
|
|
338
433
|
|
|
339
434
|
// clear queue
|
|
340
435
|
aParametersToLoad = [];
|
|
@@ -355,6 +450,27 @@ sap.ui.define([
|
|
|
355
450
|
}
|
|
356
451
|
};
|
|
357
452
|
|
|
453
|
+
function lookUpParameter(mParams, sParameterName, bUseScope) {
|
|
454
|
+
var sParam = mParams[sParameterName];
|
|
455
|
+
|
|
456
|
+
// if not found in cache it we read a CSS variable
|
|
457
|
+
if (!sParam) {
|
|
458
|
+
// In case scope is available use dummy element with given scope else use the computed style
|
|
459
|
+
// of document.body or if body is not available the scope of document.documentElement
|
|
460
|
+
var oComputedStyle = bUseScope ? oComputedScopeStyle : window.getComputedStyle(document.body || document.documentElement);
|
|
461
|
+
sParam = oComputedStyle.getPropertyValue("--" + sParameterName).trim();
|
|
462
|
+
// DOM Api returns "" for unkown variables, UI5 Api must return undefined
|
|
463
|
+
sParam = sParam != "" ? sParam : undefined;
|
|
464
|
+
if (sParam) {
|
|
465
|
+
sParam = checkAndResolveUI5Url(sParam, sParameterName);
|
|
466
|
+
// cache the url-resolved parameter value for later usage
|
|
467
|
+
mParams[sParameterName] = sParam;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return sParam;
|
|
472
|
+
}
|
|
473
|
+
|
|
358
474
|
/**
|
|
359
475
|
* Returns parameter value from given map and handles legacy parameter names
|
|
360
476
|
*
|
|
@@ -368,52 +484,60 @@ sap.ui.define([
|
|
|
368
484
|
* @private
|
|
369
485
|
*/
|
|
370
486
|
function getParam(mOptions) {
|
|
371
|
-
var bAsync = mOptions.async, oParams = getParameters(bAsync);
|
|
487
|
+
var bAsync = mOptions.async, bUseScope = false, oParams = getParameters(bAsync);
|
|
372
488
|
if (mOptions.scopeName) {
|
|
373
489
|
oParams = oParams["scopes"][mOptions.scopeName];
|
|
490
|
+
bUseScope = true;
|
|
374
491
|
} else {
|
|
375
492
|
oParams = oParams["default"];
|
|
376
493
|
}
|
|
377
494
|
|
|
378
|
-
var
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
495
|
+
var sParamValue = lookUpParameter(oParams, mOptions.parameterName, bUseScope);
|
|
496
|
+
// [Compatibility]: if a parameter contains a prefix, we cut off the ":" and try again
|
|
497
|
+
// e.g. "my.lib:paramName"
|
|
498
|
+
if (!sParamValue) {
|
|
382
499
|
var iIndex = mOptions.parameterName.indexOf(":");
|
|
383
|
-
if (iIndex
|
|
384
|
-
|
|
500
|
+
if (iIndex != -1) {
|
|
501
|
+
var sParamNameWithoutColon = mOptions.parameterName.substr(iIndex + 1);
|
|
502
|
+
sParamValue = lookUpParameter(oParams, sParamNameWithoutColon, bUseScope);
|
|
385
503
|
}
|
|
386
|
-
sParam = oParams[mOptions.parameterName];
|
|
387
504
|
}
|
|
388
505
|
|
|
389
|
-
|
|
506
|
+
// Sync: Fallback path for when parameter could not be found so far, library.css MIGHT be not loaded
|
|
507
|
+
if (mOptions.loadPendingParameters && typeof sParamValue === "undefined" && !bAsync) {
|
|
390
508
|
loadPendingLibraryParameters();
|
|
391
|
-
|
|
509
|
+
sParamValue = getParam({
|
|
392
510
|
parameterName: mOptions.parameterName,
|
|
393
511
|
scopeName: mOptions.scopeName,
|
|
394
512
|
loadPendingParameters: false // prevent recursion
|
|
395
513
|
});
|
|
396
514
|
}
|
|
397
515
|
|
|
398
|
-
return
|
|
516
|
+
return sParamValue;
|
|
399
517
|
}
|
|
400
518
|
|
|
401
|
-
function getParamForActiveScope(sParamName,
|
|
402
|
-
for
|
|
403
|
-
|
|
519
|
+
function getParamForActiveScope(sParamName, oElement, bAsync) {
|
|
520
|
+
// check for scopes and try to find the classes in Control Tree
|
|
521
|
+
var aScopeChain = Parameters.getActiveScopesFor(oElement, bAsync);
|
|
404
522
|
|
|
405
|
-
|
|
406
|
-
|
|
523
|
+
var aFilteredScopeChain = aScopeChain.flat().reduce(function (aResult, sScope) {
|
|
524
|
+
if (aResult.indexOf(sScope) === -1) {
|
|
525
|
+
aResult.push(sScope);
|
|
526
|
+
}
|
|
527
|
+
return aResult;
|
|
528
|
+
}, []);
|
|
407
529
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
scopeName: sScopeName,
|
|
411
|
-
async: bAsync
|
|
412
|
-
});
|
|
530
|
+
for (var i = 0; i < aFilteredScopeChain.length; i++) {
|
|
531
|
+
var sScopeName = aFilteredScopeChain[i];
|
|
413
532
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
533
|
+
var sParamValue = getParam({
|
|
534
|
+
parameterName: sParamName,
|
|
535
|
+
scopeName: sScopeName,
|
|
536
|
+
async: bAsync
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
if (sParamValue) {
|
|
540
|
+
return sParamValue;
|
|
417
541
|
}
|
|
418
542
|
}
|
|
419
543
|
// if no matching scope was found return the default parameter
|
|
@@ -505,15 +629,37 @@ sap.ui.define([
|
|
|
505
629
|
};
|
|
506
630
|
|
|
507
631
|
/**
|
|
632
|
+
* <p>
|
|
508
633
|
* Returns the current value for one or more theming parameters, depending on the given arguments.
|
|
634
|
+
* </p>
|
|
635
|
+
*
|
|
636
|
+
* <p>
|
|
637
|
+
* The theming parameters are immutable and cannot be changed at runtime.
|
|
638
|
+
* Multiple <code>Parameters.get()</code> API calls for the same parameter name will always result in the same parameter value.
|
|
639
|
+
* </p>
|
|
640
|
+
*
|
|
641
|
+
* <p>
|
|
642
|
+
* <b>Important, since 1.93:</b>
|
|
643
|
+
* When using the <code>Parameters.get()</code> API to retrieve theming parameters defined as CSS variables,
|
|
644
|
+
* please be aware that the API can also unknowingly retrieve arbitrary CSS variables defined in the DOM.
|
|
645
|
+
* All CSS variables defined via the <code>:root</code> pseudo-class can be retrieved this way.
|
|
646
|
+
* Please make sure to only access theming parameters defined in a UI5 theme/library.
|
|
647
|
+
* </p>
|
|
648
|
+
*
|
|
649
|
+
* <br/>
|
|
650
|
+
*
|
|
651
|
+
* <p>
|
|
652
|
+
* The following API variants are available (see also the below examples):
|
|
509
653
|
* <ul>
|
|
510
|
-
* <li>If no parameter is given a key-value map containing all parameters is returned</li>
|
|
654
|
+
* <li> <b>(deprecated since 1.92)<b> If no parameter is given a key-value map containing all parameters is returned</li>
|
|
511
655
|
* <li>If a <code>string</code> is given as first parameter the value is returned as a <code>string</code></li>
|
|
512
656
|
* <li>If an <code>array</code> is given as first parameter a key-value map containing all parameters from the <code>array</code> is returned</li>
|
|
513
657
|
* <li>If an <code>object</code> is given as first parameter the result is returned immediately in case all parameters are loaded and available or within the callback in case not all CSS files are already loaded.
|
|
514
658
|
* This is the <b>only asynchronous</b> API variant. This variant is the preferred way to retrieve theming parameters.
|
|
515
659
|
* The structure of the return value is the same as listed above depending on the type of the name property within the <code>object</code>.</li>
|
|
516
660
|
* </ul>
|
|
661
|
+
* </p>
|
|
662
|
+
*
|
|
517
663
|
* <p>The returned key-value maps are a copy so changing values in the map does not have any effect</p>
|
|
518
664
|
*
|
|
519
665
|
* <p>
|
|
@@ -546,7 +692,7 @@ sap.ui.define([
|
|
|
546
692
|
* @example <caption>Scenario 3: Default values</caption>
|
|
547
693
|
* // Scenario 1 (all parameters are available): the returned parameter map can be used to merge with a map of default values.
|
|
548
694
|
* // Scenario 2 (one or more parameters are missing): the returned undefined value does not change the default parameters
|
|
549
|
-
* // This allows you to always
|
|
695
|
+
* // This allows you to always retrieve a consistent set of parameters, either synchronously via the return-value or asynchronously via the provided callback.
|
|
550
696
|
* var mMyParams = Object.assign({
|
|
551
697
|
* sapUiParam1: "1rem",
|
|
552
698
|
* sapUiParam2: "#FF0000",
|
|
@@ -554,7 +700,7 @@ sap.ui.define([
|
|
|
554
700
|
* }, Parameters.get({
|
|
555
701
|
* name: ["sapUiParam1", "sapUiParam2", "sapUiParam3"],
|
|
556
702
|
* callback: function(mParams) {
|
|
557
|
-
* // merge the current parameters with the actual parameters in case they are
|
|
703
|
+
* // merge the current parameters with the actual parameters in case they are retrieved asynchronously
|
|
558
704
|
* Object.assign(mMyParams, mParams);
|
|
559
705
|
* }
|
|
560
706
|
* });
|
|
@@ -579,15 +725,26 @@ sap.ui.define([
|
|
|
579
725
|
|
|
580
726
|
if (!sap.ui.getCore().isInitialized()) {
|
|
581
727
|
Log.warning("Called sap.ui.core.theming.Parameters.get() before core has been initialized. " +
|
|
582
|
-
"This could lead to bad performance and sync XHR as inline parameters might not be available, yet. " +
|
|
583
728
|
"Consider using the API only when required, e.g. onBeforeRendering.");
|
|
584
729
|
}
|
|
585
730
|
|
|
586
731
|
// Parameters.get() without arguments returns
|
|
587
732
|
// copy of complete default parameter set
|
|
588
733
|
if (arguments.length === 0) {
|
|
589
|
-
|
|
590
|
-
|
|
734
|
+
Log.warning(
|
|
735
|
+
"Legacy variant usage of sap.ui.core.theming.Parameters.get API detected. Do not use the Parameters.get() API to retrieve ALL theming parameters, " +
|
|
736
|
+
"as this will lead to unwanted synchronous requests. " +
|
|
737
|
+
"Use the asynchronous API variant instead and retrieve a fixed set of parameters.",
|
|
738
|
+
"LegacyParametersGet",
|
|
739
|
+
"sap.ui.support",
|
|
740
|
+
function() { return { type: "LegacyParametersGet" }; }
|
|
741
|
+
);
|
|
742
|
+
|
|
743
|
+
// first try to load all pending parameters
|
|
744
|
+
loadPendingLibraryParameters(true);
|
|
745
|
+
// retrieve parameters
|
|
746
|
+
// optionally might also trigger a sync JSON request, if a library was loaded but not parsed yet
|
|
747
|
+
var oParams = getParameters(false, true);
|
|
591
748
|
return Object.assign({}, oParams["default"]);
|
|
592
749
|
}
|
|
593
750
|
|
|
@@ -598,6 +755,7 @@ sap.ui.define([
|
|
|
598
755
|
if (vName instanceof Object && !Array.isArray(vName)) {
|
|
599
756
|
// async variant of Parameters.get
|
|
600
757
|
if (!vName.name) {
|
|
758
|
+
Log.warning("sap.ui.core.theming.Parameters.get was called with an object argument without one or more parameter names.");
|
|
601
759
|
return undefined;
|
|
602
760
|
}
|
|
603
761
|
oElement = vName.scopeElement;
|
|
@@ -613,7 +771,8 @@ sap.ui.define([
|
|
|
613
771
|
}
|
|
614
772
|
|
|
615
773
|
Log.warning(
|
|
616
|
-
"Legacy variant usage of sap.ui.core.theming.Parameters.get API detected for parameter(s): '" + aNames.join(", ") +
|
|
774
|
+
"Legacy variant usage of sap.ui.core.theming.Parameters.get API detected for parameter(s): '" + aNames.join(", ") +
|
|
775
|
+
"'. This could lead to bad performance and sync XHR as parameters might not be available, yet. Use asynchronous variant instead.",
|
|
617
776
|
"LegacyParametersGet",
|
|
618
777
|
"sap.ui.support",
|
|
619
778
|
function() { return { type: "LegacyParametersGet" }; }
|
|
@@ -623,10 +782,7 @@ sap.ui.define([
|
|
|
623
782
|
var resolveWithParameter, vResult;
|
|
624
783
|
var lookForParameter = function (sName) {
|
|
625
784
|
if (oElement instanceof Element) {
|
|
626
|
-
|
|
627
|
-
var aScopeChain = this.getActiveScopesFor(oElement, bAsync);
|
|
628
|
-
|
|
629
|
-
return getParamForActiveScope(sName, aScopeChain, bAsync);
|
|
785
|
+
return getParamForActiveScope(sName, oElement, bAsync);
|
|
630
786
|
} else {
|
|
631
787
|
if (bAsync) {
|
|
632
788
|
parsePendingLibraryParameters();
|
|
@@ -637,7 +793,7 @@ sap.ui.define([
|
|
|
637
793
|
async: bAsync
|
|
638
794
|
});
|
|
639
795
|
}
|
|
640
|
-
}
|
|
796
|
+
};
|
|
641
797
|
|
|
642
798
|
vResult = {};
|
|
643
799
|
|
|
@@ -717,12 +873,18 @@ sap.ui.define([
|
|
|
717
873
|
* the next time they are queried via the method <code>get</code>.
|
|
718
874
|
*
|
|
719
875
|
* @public
|
|
876
|
+
* @deprecated since 1.92
|
|
720
877
|
*/
|
|
721
878
|
Parameters.reset = function() {
|
|
722
879
|
// hidden parameter {boolean} bOnlyWhenNecessary
|
|
723
880
|
var bOnlyWhenNecessary = arguments[0] === true;
|
|
724
881
|
if ( !bOnlyWhenNecessary || sap.ui.getCore().getConfiguration().getTheme() !== sTheme ) {
|
|
725
|
-
|
|
882
|
+
mParameters = null;
|
|
883
|
+
if (oDummyScopeElement) {
|
|
884
|
+
document.documentElement.removeChild(oDummyScopeElement);
|
|
885
|
+
oDummyScopeElement = oComputedScopeStyle = undefined;
|
|
886
|
+
}
|
|
887
|
+
ThemeHelper.reset();
|
|
726
888
|
}
|
|
727
889
|
};
|
|
728
890
|
|
|
@@ -754,4 +916,4 @@ sap.ui.define([
|
|
|
754
916
|
|
|
755
917
|
return Parameters;
|
|
756
918
|
|
|
757
|
-
}, /* bExport= */ true);
|
|
919
|
+
}, /* bExport= */ true);
|