@openui5/sap.ui.core 1.107.1 → 1.108.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/.dtsgenrc +63 -0
- package/THIRDPARTY.txt +1 -1
- 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/i18n/ResourceBundle.js +10 -0
- package/src/sap/base/security/URLListValidator.js +36 -3
- 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/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 +2 -2
- 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 +50 -50
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +22 -8
- package/src/sap/ui/core/Component.js +21 -4
- package/src/sap/ui/core/ComponentContainer.js +5 -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 -15
- package/src/sap/ui/core/Control.js +20 -2
- package/src/sap/ui/core/Core.js +311 -413
- package/src/sap/ui/core/CustomData.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/FocusHandler.js +12 -14
- package/src/sap/ui/core/Fragment.js +5 -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/IconPool.js +7 -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 +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 +16 -83
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +14 -4
- package/src/sap/ui/core/RenderManager.js +111 -109
- 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/ShortcutHintsMixin.js +20 -0
- 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 +4 -2
- 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/_IconRegistry.js +11 -7
- package/src/sap/ui/core/_UrlResolver.js +139 -0
- package/src/sap/ui/core/date/CalendarUtils.js +87 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +73 -0
- package/src/sap/ui/core/date/UniversalDate.js +198 -74
- 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/format/DateFormat.js +187 -57
- package/src/sap/ui/core/format/NumberFormat.js +64 -23
- package/src/sap/ui/core/format/TimezoneUtil.js +3 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +19 -10
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +5 -3
- 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_fr.properties +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +10 -2
- 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 +21 -20
- 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/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/themes/base/LocalBusyIndicator.less +3 -3
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +31 -12
- package/src/sap/ui/core/theming/ThemeHelper.js +56 -1
- package/src/sap/ui/core/theming/ThemeManager.js +817 -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 +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 +2 -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/dom/getFirstEditableInput.js +25 -6
- package/src/sap/ui/dom/includeStylesheet.js +2 -2
- package/src/sap/ui/model/ClientListBinding.js +11 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +60 -5
- 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/Filter.js +6 -6
- 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/Sorter.js +6 -4
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBinding.js +18 -0
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +28 -34
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +590 -0
- 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/DateTimeWithTimezone.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/BatchMode.js +2 -2
- package/src/sap/ui/model/odata/v2/Context.js +169 -4
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +39 -17
- package/src/sap/ui/model/odata/v2/ODataModel.js +219 -82
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +35 -22
- package/src/sap/ui/model/odata/v4/ODataBinding.js +28 -22
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +6 -6
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +111 -89
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +5 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +84 -46
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +19 -20
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +12 -5
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +130 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +56 -15
- 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/test/TestUtils.js +20 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/thirdparty/mobify-carousel.js +0 -4
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +0 -389
|
@@ -5,8 +5,23 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.core.date.UniversalDate
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
'sap/ui/base/Object',
|
|
10
|
+
'sap/ui/core/Configuration',
|
|
11
|
+
'sap/ui/core/Locale',
|
|
12
|
+
'sap/ui/core/LocaleData',
|
|
13
|
+
'./_Calendars',
|
|
14
|
+
'./CalendarUtils',
|
|
15
|
+
'./CalendarWeekNumbering'
|
|
16
|
+
], function(
|
|
17
|
+
BaseObject,
|
|
18
|
+
Configuration,
|
|
19
|
+
Locale,
|
|
20
|
+
LocaleData,
|
|
21
|
+
_Calendars,
|
|
22
|
+
CalendarUtils,
|
|
23
|
+
CalendarWeekNumbering
|
|
24
|
+
) {
|
|
10
25
|
"use strict";
|
|
11
26
|
|
|
12
27
|
|
|
@@ -157,60 +172,96 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars', '
|
|
|
157
172
|
/**
|
|
158
173
|
* Retrieves the calendar week
|
|
159
174
|
*
|
|
160
|
-
* @param {sap.ui.core.Locale} oLocale the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
161
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}}
|
|
162
|
-
*
|
|
163
|
-
*
|
|
175
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
176
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
177
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
178
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
179
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
180
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
181
|
+
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
182
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>
|
|
164
183
|
* @private
|
|
184
|
+
* @throws {TypeError} If:
|
|
185
|
+
* <ul>
|
|
186
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
187
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
188
|
+
* </ul>
|
|
165
189
|
*/
|
|
166
|
-
UniversalDate.prototype.getWeek = function(oLocale,
|
|
167
|
-
checkWeekConfig(
|
|
168
|
-
return UniversalDate.getWeekByDate(this.sCalendarType, this.getFullYear(), this.getMonth(), this.getDate(), oLocale,
|
|
190
|
+
UniversalDate.prototype.getWeek = function(oLocale, vCalendarWeekNumbering) {
|
|
191
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
192
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.getFullYear(), this.getMonth(), this.getDate(), oLocale, vCalendarWeekNumbering);
|
|
169
193
|
};
|
|
170
194
|
|
|
171
195
|
/**
|
|
172
196
|
* Sets the calendar week
|
|
173
197
|
*
|
|
174
|
-
* @param {{week:
|
|
198
|
+
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
175
199
|
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
176
|
-
* @param {sap.ui.core.Locale} oLocale the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
177
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}}
|
|
178
|
-
*
|
|
200
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
201
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
202
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
203
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
204
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
205
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
206
|
+
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
179
207
|
* @private
|
|
208
|
+
* @throws {TypeError} If:
|
|
209
|
+
* <ul>
|
|
210
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
211
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
212
|
+
* </ul>
|
|
180
213
|
*/
|
|
181
|
-
UniversalDate.prototype.setWeek = function(oWeek, oLocale,
|
|
182
|
-
checkWeekConfig(
|
|
183
|
-
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale,
|
|
214
|
+
UniversalDate.prototype.setWeek = function(oWeek, oLocale, vCalendarWeekNumbering) {
|
|
215
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
216
|
+
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale, vCalendarWeekNumbering);
|
|
184
217
|
this.setFullYear(oDate.year, oDate.month, oDate.day);
|
|
185
218
|
};
|
|
186
219
|
|
|
187
220
|
/**
|
|
188
221
|
* Retrieves the UTC calendar week
|
|
189
222
|
*
|
|
190
|
-
* @param {sap.ui.core.Locale} oLocale the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
191
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}}
|
|
192
|
-
*
|
|
193
|
-
*
|
|
223
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
224
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
225
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
226
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
227
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
228
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
229
|
+
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
230
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>
|
|
194
231
|
* @private
|
|
232
|
+
* @throws {TypeError} If:
|
|
233
|
+
* <ul>
|
|
234
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
235
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
236
|
+
* </ul>
|
|
195
237
|
*/
|
|
196
|
-
UniversalDate.prototype.getUTCWeek = function(oLocale,
|
|
197
|
-
checkWeekConfig(
|
|
198
|
-
return UniversalDate.getWeekByDate(this.sCalendarType, this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(), oLocale,
|
|
238
|
+
UniversalDate.prototype.getUTCWeek = function(oLocale, vCalendarWeekNumbering) {
|
|
239
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
240
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(), oLocale, vCalendarWeekNumbering);
|
|
199
241
|
};
|
|
200
242
|
|
|
201
243
|
/**
|
|
202
244
|
* Sets the UTC calendar week
|
|
203
245
|
*
|
|
204
|
-
* @param {{week:
|
|
246
|
+
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
205
247
|
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
206
|
-
* @param {sap.ui.core.Locale} oLocale the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
207
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}}
|
|
208
|
-
*
|
|
248
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
249
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
250
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
251
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
252
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
253
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
254
|
+
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
209
255
|
* @private
|
|
256
|
+
* @throws {TypeError} If:
|
|
257
|
+
* <ul>
|
|
258
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
259
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
260
|
+
* </ul>
|
|
210
261
|
*/
|
|
211
|
-
UniversalDate.prototype.setUTCWeek = function(oWeek, oLocale,
|
|
212
|
-
checkWeekConfig(
|
|
213
|
-
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale,
|
|
262
|
+
UniversalDate.prototype.setUTCWeek = function(oWeek, oLocale, vCalendarWeekNumbering) {
|
|
263
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
264
|
+
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale, vCalendarWeekNumbering);
|
|
214
265
|
this.setUTCFullYear(oDate.year, oDate.month, oDate.day);
|
|
215
266
|
};
|
|
216
267
|
UniversalDate.prototype.getQuarter = function() {
|
|
@@ -262,31 +313,35 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars', '
|
|
|
262
313
|
* @param {int} iDay the date, e.g. <code>3</code>
|
|
263
314
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
264
315
|
* e.g. <code>new Locale("de-DE")</code>
|
|
265
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
316
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
317
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
318
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
319
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
320
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
269
321
|
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
270
|
-
* @returns {{week:
|
|
322
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>, e.g. <code>{year: 2016, week: 8}</code>
|
|
271
323
|
* @private
|
|
324
|
+
* @throws {TypeError} If:
|
|
325
|
+
* <ul>
|
|
326
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
327
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
328
|
+
* </ul>
|
|
272
329
|
*/
|
|
273
|
-
UniversalDate.getWeekByDate = function(sCalendarType, iYear, iMonth, iDay, oLocale,
|
|
330
|
+
UniversalDate.getWeekByDate = function(sCalendarType, iYear, iMonth, iDay, oLocale, vCalendarWeekNumbering) {
|
|
331
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
274
332
|
oLocale = oLocale || Configuration.getFormatSettings().getFormatLocale();
|
|
275
|
-
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
276
333
|
var clDate = this.getClass(sCalendarType);
|
|
277
|
-
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale,
|
|
334
|
+
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering);
|
|
278
335
|
var oDate = new clDate(clDate.UTC(iYear, iMonth, iDay));
|
|
279
336
|
var iWeek, iLastYear, iNextYear, oLastFirstDay, oNextFirstDay;
|
|
280
|
-
|
|
281
|
-
// the week might be the last week of the previous year or first week of next year
|
|
282
|
-
var bSplitWeek = (!oWeekConfig || oWeekConfig.minimalDaysInFirstWeek === undefined || oWeekConfig.firstDayOfWeek === undefined) && oLocaleData.firstDayStartsFirstWeek();
|
|
337
|
+
var bSplitWeek = isSplitWeek(vCalendarWeekNumbering, oLocale);
|
|
283
338
|
if (bSplitWeek) {
|
|
284
339
|
iWeek = calculateWeeks(oFirstDay, oDate);
|
|
285
340
|
} else {
|
|
286
341
|
iLastYear = iYear - 1;
|
|
287
342
|
iNextYear = iYear + 1;
|
|
288
|
-
oLastFirstDay = getFirstDayOfFirstWeek(clDate, iLastYear, oLocale,
|
|
289
|
-
oNextFirstDay = getFirstDayOfFirstWeek(clDate, iNextYear, oLocale,
|
|
343
|
+
oLastFirstDay = getFirstDayOfFirstWeek(clDate, iLastYear, oLocale, vCalendarWeekNumbering);
|
|
344
|
+
oNextFirstDay = getFirstDayOfFirstWeek(clDate, iNextYear, oLocale, vCalendarWeekNumbering);
|
|
290
345
|
if (oDate >= oNextFirstDay) {
|
|
291
346
|
iYear = iNextYear;
|
|
292
347
|
iWeek = 0;
|
|
@@ -311,23 +366,27 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars', '
|
|
|
311
366
|
* @param {int} iWeek the calendar week index, e.g. <code>8</code>
|
|
312
367
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
313
368
|
* e.g. <code>new Locale("de-DE")</code>
|
|
314
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
369
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
370
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
371
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
372
|
+
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
373
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
318
374
|
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
319
|
-
* @returns {{month:
|
|
375
|
+
* @returns {{month: int, year: int, day: int}} the resulting date, e.g. <code>{year: 2016, month: 1, day: 29}</code>
|
|
320
376
|
* @private
|
|
377
|
+
* @throws {TypeError} If:
|
|
378
|
+
* <ul>
|
|
379
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
380
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
381
|
+
* </ul>
|
|
321
382
|
*/
|
|
322
|
-
UniversalDate.getFirstDateOfWeek = function(sCalendarType, iYear, iWeek, oLocale,
|
|
383
|
+
UniversalDate.getFirstDateOfWeek = function(sCalendarType, iYear, iWeek, oLocale, vCalendarWeekNumbering) {
|
|
384
|
+
checkWeekConfig(vCalendarWeekNumbering);
|
|
323
385
|
oLocale = oLocale || Configuration.getFormatSettings().getFormatLocale();
|
|
324
|
-
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
325
386
|
var clDate = this.getClass(sCalendarType);
|
|
326
|
-
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale,
|
|
387
|
+
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering);
|
|
327
388
|
var oDate = new clDate(oFirstDay.valueOf() + iWeek * iMillisecondsInWeek);
|
|
328
|
-
|
|
329
|
-
//1st of January instead for symmetric behaviour
|
|
330
|
-
var bSplitWeek = (!oWeekConfig || oWeekConfig.minimalDaysInFirstWeek === undefined || oWeekConfig.firstDayOfWeek === undefined) && oLocaleData.firstDayStartsFirstWeek();
|
|
389
|
+
var bSplitWeek = isSplitWeek(vCalendarWeekNumbering, oLocale);
|
|
331
390
|
if (bSplitWeek && iWeek === 0 && oFirstDay.getUTCFullYear() < iYear) {
|
|
332
391
|
return {
|
|
333
392
|
year: iYear,
|
|
@@ -342,15 +401,86 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars', '
|
|
|
342
401
|
};
|
|
343
402
|
};
|
|
344
403
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
404
|
+
/**
|
|
405
|
+
* Determines if the split week algorithm should be applied (the first day of the first calendar
|
|
406
|
+
* week of the year is January 1st).
|
|
407
|
+
*
|
|
408
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
409
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and
|
|
410
|
+
* <code>minimalDaysInFirstWeek</code>
|
|
411
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation
|
|
412
|
+
* @returns {boolean} if the split week should be applied
|
|
413
|
+
* @private
|
|
414
|
+
*/
|
|
415
|
+
function isSplitWeek(vCalendarWeekNumbering, oLocale) {
|
|
416
|
+
oLocale = oLocale || Configuration.getFormatSettings().getFormatLocale();
|
|
417
|
+
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
418
|
+
return (!isCalendarWeekConfigurationDefined(vCalendarWeekNumbering) ||
|
|
419
|
+
vCalendarWeekNumbering === CalendarWeekNumbering.Default)
|
|
420
|
+
&& oLocaleData.firstDayStartsFirstWeek();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Checks the calendar week configuration
|
|
425
|
+
*
|
|
426
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
427
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>
|
|
428
|
+
* @throws {TypeError} If:
|
|
429
|
+
* <ul>
|
|
430
|
+
* <li>vCalendarWeekNumbering is an object and the fields <code>firstDayOfWeek</code> or <code>minimalDaysInFirstWeek</code>) are missing or have a non-numeric value</li>
|
|
431
|
+
* <li>vCalendarWeekNumbering is a string and has an invalid week numbering value</li>
|
|
432
|
+
* </ul>
|
|
433
|
+
* @private
|
|
434
|
+
*/
|
|
435
|
+
function checkWeekConfig(vCalendarWeekNumbering) {
|
|
436
|
+
if (typeof vCalendarWeekNumbering === "object") {
|
|
437
|
+
if (!isCalendarWeekConfigurationDefined(vCalendarWeekNumbering)) {
|
|
438
|
+
throw new TypeError("Week config requires firstDayOfWeek and minimalDaysInFirstWeek to be set");
|
|
350
439
|
}
|
|
440
|
+
} else if (vCalendarWeekNumbering && !Object.values(CalendarWeekNumbering).includes(vCalendarWeekNumbering)) {
|
|
441
|
+
throw new TypeError("Illegal format option calendarWeekNumbering: '" + vCalendarWeekNumbering + "'");
|
|
351
442
|
}
|
|
352
443
|
}
|
|
353
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Checks if the calendar week configuration is defined
|
|
447
|
+
*
|
|
448
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
449
|
+
* the parameter which is checked
|
|
450
|
+
* @returns {boolean} if the parameter vCalendarWeekNumbering is defined and in case of an
|
|
451
|
+
* object has the required properties <code>firstDayOfWeek</code> and
|
|
452
|
+
* <code>minimalDaysInFirstWeek</code> defined with a numeric value
|
|
453
|
+
* @private
|
|
454
|
+
*/
|
|
455
|
+
function isCalendarWeekConfigurationDefined (vCalendarWeekNumbering) {
|
|
456
|
+
if (typeof vCalendarWeekNumbering === "object") {
|
|
457
|
+
return typeof vCalendarWeekNumbering.firstDayOfWeek === "number"
|
|
458
|
+
&& typeof vCalendarWeekNumbering.minimalDaysInFirstWeek === "number";
|
|
459
|
+
} else if (vCalendarWeekNumbering) {
|
|
460
|
+
return true;
|
|
461
|
+
}
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Resolves the calendar week configuration
|
|
467
|
+
*
|
|
468
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
469
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>
|
|
470
|
+
* @param {sap.ui.core.Locale} [oLocale] locale to be used
|
|
471
|
+
* @returns {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} calendar week calculation configuration
|
|
472
|
+
* @private
|
|
473
|
+
*/
|
|
474
|
+
function resolveCalendarWeekConfiguration (vCalendarWeekNumbering, oLocale) {
|
|
475
|
+
// be backward compatible
|
|
476
|
+
if (typeof vCalendarWeekNumbering === "object"
|
|
477
|
+
&& typeof vCalendarWeekNumbering.firstDayOfWeek === "number"
|
|
478
|
+
&& typeof vCalendarWeekNumbering.minimalDaysInFirstWeek === "number") {
|
|
479
|
+
return vCalendarWeekNumbering;
|
|
480
|
+
}
|
|
481
|
+
return CalendarUtils.getWeekConfigurationValues(vCalendarWeekNumbering, oLocale);
|
|
482
|
+
}
|
|
483
|
+
|
|
354
484
|
/**
|
|
355
485
|
* Returns the first day of the first week in the given year.
|
|
356
486
|
*
|
|
@@ -358,26 +488,20 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars', '
|
|
|
358
488
|
* @param {int} iYear year, e.g. <code>2016</code>
|
|
359
489
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
360
490
|
* e.g. <code>new Locale("de-DE")</code>
|
|
361
|
-
* @param {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* If provided US split week is ignored.
|
|
491
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
492
|
+
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
493
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
365
494
|
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
366
495
|
* @returns {Date} first day of the first week in the given year, e.g. <code>Mon Jan 04 2016 01:00:00 GMT+0100</code>
|
|
367
496
|
* @private
|
|
368
497
|
*/
|
|
369
|
-
function getFirstDayOfFirstWeek(clDate, iYear, oLocale,
|
|
498
|
+
function getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering) {
|
|
370
499
|
oLocale = oLocale || Configuration.getFormatSettings().getFormatLocale();
|
|
371
|
-
|
|
372
|
-
var
|
|
373
|
-
var
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
iFirstDayOfWeek = oWeekConfig.firstDayOfWeek;
|
|
377
|
-
} else {
|
|
378
|
-
iMinDays = oLocaleData.getMinimalDaysInFirstWeek();
|
|
379
|
-
iFirstDayOfWeek = oLocaleData.getFirstDayOfWeek();
|
|
380
|
-
}
|
|
500
|
+
|
|
501
|
+
var oWeekConfig = resolveCalendarWeekConfiguration(vCalendarWeekNumbering, oLocale);
|
|
502
|
+
var iMinDays = oWeekConfig.minimalDaysInFirstWeek;
|
|
503
|
+
var iFirstDayOfWeek = oWeekConfig.firstDayOfWeek;
|
|
504
|
+
|
|
381
505
|
var oFirstDay = new clDate(clDate.UTC(iYear, 0, 1));
|
|
382
506
|
var iDayCount = 7;
|
|
383
507
|
|
|
@@ -81,7 +81,7 @@ sap.ui.define([
|
|
|
81
81
|
* @param {Element[]} aItemDomRefs Array of DOM references representing the items for the navigation
|
|
82
82
|
* @param {boolean} [bNotInTabChain=false] Whether the selected element should be in the tab chain or not
|
|
83
83
|
*
|
|
84
|
-
* @version 1.
|
|
84
|
+
* @version 1.108.0
|
|
85
85
|
* @alias sap.ui.core.delegate.ItemNavigation
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
*
|
|
59
59
|
* @protected
|
|
60
60
|
* @alias sap.ui.core.delegate.ScrollEnablement
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.108.0
|
|
62
62
|
* @author SAP SE
|
|
63
63
|
*/
|
|
64
64
|
var ScrollEnablement = BaseObject.extend("sap.ui.core.delegate.ScrollEnablement", /** @lends sap.ui.core.delegate.ScrollEnablement.prototype */ {
|