@openui5/sap.ui.core 1.99.1 → 1.102.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/.eslintrc.json +27 -5
- package/THIRDPARTY.txt +5 -5
- package/package.json +1 -1
- package/src/jquery.sap.global.js +6 -3
- 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/Log.js +1 -1
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/strings/whitespaceReplacer.js +1 -1
- package/src/sap/base/util/LoaderExtensions.js +1 -10
- package/src/sap/base/util/UriParameters.js +2 -2
- package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
- 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 +2 -2
- package/src/sap/ui/base/ExpressionParser.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/ManagedObjectObserver.js +2 -0
- package/src/sap/ui/base/ManagedObjectRegistry.js +10 -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 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/CommandExecution.js +15 -12
- package/src/sap/ui/core/Component.js +50 -27
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +28 -13
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +25 -9
- package/src/sap/ui/core/Control.js +2 -3
- package/src/sap/ui/core/Core.js +121 -36
- 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/ExtensionPoint.js +6 -1
- package/src/sap/ui/core/FocusHandler.js +2 -3
- 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 +17 -3
- 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 +159 -9
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +6 -4
- package/src/sap/ui/core/Popup.js +21 -20
- 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 +21 -15
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
- 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 +3 -5
- 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/XMLTemplateProcessor.js +521 -395
- package/src/sap/ui/core/_IconRegistry.js +3 -2
- package/src/sap/ui/core/cache/CacheManager.js +28 -1
- package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
- package/src/sap/ui/core/cache/LRUPersistentCache.js +76 -4
- package/src/sap/ui/core/cldr/ar.json +469 -1
- package/src/sap/ui/core/cldr/ar_EG.json +469 -1
- package/src/sap/ui/core/cldr/ar_SA.json +469 -1
- package/src/sap/ui/core/cldr/bg.json +469 -1
- package/src/sap/ui/core/cldr/ca.json +469 -1
- package/src/sap/ui/core/cldr/cs.json +469 -1
- package/src/sap/ui/core/cldr/cy.json +469 -1
- package/src/sap/ui/core/cldr/da.json +469 -1
- package/src/sap/ui/core/cldr/de.json +469 -1
- package/src/sap/ui/core/cldr/de_AT.json +469 -1
- package/src/sap/ui/core/cldr/de_CH.json +469 -1
- package/src/sap/ui/core/cldr/el.json +469 -1
- package/src/sap/ui/core/cldr/el_CY.json +469 -1
- package/src/sap/ui/core/cldr/en.json +469 -1
- package/src/sap/ui/core/cldr/en_AU.json +470 -2
- package/src/sap/ui/core/cldr/en_GB.json +469 -1
- package/src/sap/ui/core/cldr/en_HK.json +469 -1
- package/src/sap/ui/core/cldr/en_IE.json +469 -1
- package/src/sap/ui/core/cldr/en_IN.json +469 -1
- package/src/sap/ui/core/cldr/en_NZ.json +469 -1
- package/src/sap/ui/core/cldr/en_PG.json +469 -1
- package/src/sap/ui/core/cldr/en_SG.json +469 -1
- package/src/sap/ui/core/cldr/en_ZA.json +469 -1
- package/src/sap/ui/core/cldr/es.json +469 -1
- package/src/sap/ui/core/cldr/es_AR.json +469 -1
- package/src/sap/ui/core/cldr/es_BO.json +469 -1
- package/src/sap/ui/core/cldr/es_CL.json +469 -1
- package/src/sap/ui/core/cldr/es_CO.json +469 -1
- package/src/sap/ui/core/cldr/es_MX.json +469 -1
- package/src/sap/ui/core/cldr/es_PE.json +469 -1
- package/src/sap/ui/core/cldr/es_UY.json +469 -1
- package/src/sap/ui/core/cldr/es_VE.json +469 -1
- package/src/sap/ui/core/cldr/et.json +469 -1
- package/src/sap/ui/core/cldr/fa.json +469 -1
- package/src/sap/ui/core/cldr/fi.json +469 -1
- package/src/sap/ui/core/cldr/fr.json +469 -1
- package/src/sap/ui/core/cldr/fr_BE.json +469 -1
- package/src/sap/ui/core/cldr/fr_CA.json +469 -1
- package/src/sap/ui/core/cldr/fr_CH.json +469 -1
- package/src/sap/ui/core/cldr/fr_LU.json +469 -1
- package/src/sap/ui/core/cldr/he.json +469 -1
- package/src/sap/ui/core/cldr/hi.json +469 -1
- package/src/sap/ui/core/cldr/hr.json +469 -1
- package/src/sap/ui/core/cldr/hu.json +469 -1
- package/src/sap/ui/core/cldr/id.json +469 -1
- package/src/sap/ui/core/cldr/it.json +469 -1
- package/src/sap/ui/core/cldr/it_CH.json +469 -1
- package/src/sap/ui/core/cldr/ja.json +469 -1
- package/src/sap/ui/core/cldr/kk.json +469 -1
- package/src/sap/ui/core/cldr/ko.json +469 -1
- package/src/sap/ui/core/cldr/lt.json +469 -1
- package/src/sap/ui/core/cldr/lv.json +469 -1
- package/src/sap/ui/core/cldr/ms.json +469 -1
- package/src/sap/ui/core/cldr/nb.json +469 -1
- package/src/sap/ui/core/cldr/nl.json +469 -1
- package/src/sap/ui/core/cldr/nl_BE.json +469 -1
- package/src/sap/ui/core/cldr/pl.json +469 -1
- package/src/sap/ui/core/cldr/pt.json +469 -1
- package/src/sap/ui/core/cldr/pt_PT.json +469 -1
- package/src/sap/ui/core/cldr/ro.json +469 -1
- package/src/sap/ui/core/cldr/ru.json +469 -1
- package/src/sap/ui/core/cldr/ru_UA.json +469 -1
- package/src/sap/ui/core/cldr/sk.json +469 -1
- package/src/sap/ui/core/cldr/sl.json +469 -1
- package/src/sap/ui/core/cldr/sr.json +469 -1
- package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
- package/src/sap/ui/core/cldr/sv.json +469 -1
- package/src/sap/ui/core/cldr/th.json +469 -1
- package/src/sap/ui/core/cldr/tr.json +469 -1
- package/src/sap/ui/core/cldr/uk.json +469 -1
- package/src/sap/ui/core/cldr/vi.json +469 -1
- package/src/sap/ui/core/cldr/zh_CN.json +470 -2
- package/src/sap/ui/core/cldr/zh_HK.json +470 -2
- package/src/sap/ui/core/cldr/zh_SG.json +470 -2
- package/src/sap/ui/core/cldr/zh_TW.json +469 -1
- package/src/sap/ui/core/date/Buddhist.js +3 -3
- package/src/sap/ui/core/date/Japanese.js +3 -3
- package/src/sap/ui/core/date/UniversalDate.js +10 -0
- package/src/sap/ui/core/date/UniversalDateUtils.js +49 -49
- package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
- package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
- package/src/sap/ui/core/dnd/DragAndDrop.js +27 -22
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- 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 +3 -3
- package/src/sap/ui/core/format/DateFormat.js +285 -151
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +4 -0
- package/src/sap/ui/core/format/NumberFormat.js +331 -179
- package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +219 -188
- 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.properties +0 -2
- package/src/sap/ui/core/messagebundle_ar.properties +0 -1
- package/src/sap/ui/core/messagebundle_bg.properties +0 -1
- package/src/sap/ui/core/messagebundle_ca.properties +0 -1
- package/src/sap/ui/core/messagebundle_cs.properties +0 -1
- package/src/sap/ui/core/messagebundle_cy.properties +0 -1
- package/src/sap/ui/core/messagebundle_da.properties +0 -1
- package/src/sap/ui/core/messagebundle_de.properties +0 -1
- package/src/sap/ui/core/messagebundle_el.properties +0 -1
- package/src/sap/ui/core/messagebundle_en.properties +0 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +0 -1
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +0 -1
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +0 -1
- package/src/sap/ui/core/messagebundle_es.properties +0 -1
- package/src/sap/ui/core/messagebundle_es_MX.properties +0 -1
- package/src/sap/ui/core/messagebundle_et.properties +0 -1
- package/src/sap/ui/core/messagebundle_fi.properties +0 -1
- package/src/sap/ui/core/messagebundle_fr.properties +0 -1
- package/src/sap/ui/core/messagebundle_fr_CA.properties +0 -1
- package/src/sap/ui/core/messagebundle_hi.properties +0 -1
- package/src/sap/ui/core/messagebundle_hr.properties +0 -1
- package/src/sap/ui/core/messagebundle_hu.properties +0 -1
- package/src/sap/ui/core/messagebundle_id.properties +0 -1
- package/src/sap/ui/core/messagebundle_it.properties +0 -1
- package/src/sap/ui/core/messagebundle_iw.properties +0 -1
- package/src/sap/ui/core/messagebundle_ja.properties +0 -1
- package/src/sap/ui/core/messagebundle_kk.properties +0 -1
- package/src/sap/ui/core/messagebundle_ko.properties +1 -2
- package/src/sap/ui/core/messagebundle_lt.properties +0 -1
- package/src/sap/ui/core/messagebundle_lv.properties +0 -1
- package/src/sap/ui/core/messagebundle_ms.properties +0 -1
- package/src/sap/ui/core/messagebundle_nl.properties +0 -1
- package/src/sap/ui/core/messagebundle_no.properties +0 -1
- package/src/sap/ui/core/messagebundle_pl.properties +0 -1
- package/src/sap/ui/core/messagebundle_pt.properties +0 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +0 -1
- package/src/sap/ui/core/messagebundle_ro.properties +0 -1
- package/src/sap/ui/core/messagebundle_ru.properties +0 -1
- package/src/sap/ui/core/messagebundle_sh.properties +0 -1
- package/src/sap/ui/core/messagebundle_sk.properties +0 -1
- package/src/sap/ui/core/messagebundle_sl.properties +0 -1
- package/src/sap/ui/core/messagebundle_sv.properties +0 -1
- package/src/sap/ui/core/messagebundle_th.properties +0 -1
- package/src/sap/ui/core/messagebundle_tr.properties +0 -1
- package/src/sap/ui/core/messagebundle_uk.properties +0 -1
- package/src/sap/ui/core/messagebundle_vi.properties +0 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +0 -1
- package/src/sap/ui/core/messagebundle_zh_TW.properties +0 -1
- package/src/sap/ui/core/mvc/Controller.js +1 -1
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +1 -1
- 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 +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/XMLView.js +25 -21
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +3 -3
- 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/Router.js +1 -1
- package/src/sap/ui/core/rules/App.support.js +14 -9
- package/src/sap/ui/core/rules/Config.support.js +12 -12
- package/src/sap/ui/core/rules/Misc.support.js +8 -3
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +4 -4
- package/src/sap/ui/core/rules/View.support.js +9 -9
- 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 +29 -1
- package/src/sap/ui/core/support/Support.js +4 -4
- package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
- package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
- package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
- package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
- package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +10 -13
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
- package/src/sap/ui/core/support/plugins/Trace.js +7 -7
- package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
- package/src/sap/ui/core/support/support.css +23 -23
- package/src/sap/ui/core/support/support.html +5 -7
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/themes/base/CommandShortcutHints.less +1 -1
- package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
- package/src/sap/ui/core/themes/base/base.less +1524 -54
- package/src/sap/ui/core/themes/base/global.less +171 -13
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +166 -7
- package/src/sap/ui/core/theming/Parameters.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 +4 -3
- package/src/sap/ui/core/util/PasteHelper.js +2 -2
- package/src/sap/ui/core/util/XMLPreprocessor.js +1 -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 +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 +7 -8
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/LogViewer.js +2 -2
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +127 -21
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +3 -0
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +13 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +32 -13
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +10 -7
- 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/_Helper.js +26 -0
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +29 -13
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
- package/src/sap/ui/model/base/ManagedObjectModel.js +8 -6
- package/src/sap/ui/model/json/JSONListBinding.js +0 -58
- package/src/sap/ui/model/json/JSONModel.js +15 -8
- package/src/sap/ui/model/message/MessageListBinding.js +0 -42
- 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/ODataPropertyBinding.js +3 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +5 -4
- package/src/sap/ui/model/odata/ODataUtils.js +7 -9
- package/src/sap/ui/model/odata/OperationMode.js +6 -0
- 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 +78 -68
- 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/type/UnitMixin.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +78 -5
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +280 -76
- package/src/sap/ui/model/odata/v2/ODataModel.js +342 -96
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -4
- package/src/sap/ui/model/odata/v4/Context.js +52 -25
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -32
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +35 -6
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +302 -110
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
- package/src/sap/ui/model/odata/v4/ODataModel.js +297 -30
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +25 -57
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -2
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +309 -130
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +16 -0
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +114 -41
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +270 -36
- 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/XMLListBinding.js +0 -53
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +1 -1
- package/src/sap/ui/performance/trace/FESRHelper.js +72 -0
- package/src/sap/ui/performance/trace/Interaction.js +6 -2
- package/src/sap/ui/qunit/qunit-2-css.js +4 -4
- package/src/sap/ui/qunit/qunit-css.js +4 -4
- 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/BranchTracking.js +1 -0
- package/src/sap/ui/test/Opa5.js +9 -5
- package/src/sap/ui/test/OpaBuilder.js +7 -7
- package/src/sap/ui/test/TestUtils.js +11 -0
- package/src/sap/ui/test/_UsageReport.js +1 -1
- package/src/sap/ui/test/actions/Action.js +3 -3
- package/src/sap/ui/test/actions/Press.js +1 -1
- package/src/sap/ui/test/generic/GenericTestCollection.js +176 -0
- package/src/sap/ui/test/generic/TestBase.js +151 -0
- package/src/sap/ui/test/generic/Utils.js +284 -0
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
- package/src/sap/ui/test/opaQunit.js +11 -10
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +9 -8
- package/src/sap/ui/test/selectors/_ControlSelectorValidator.js +1 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +4 -0
- package/src/sap/ui/thirdparty/jszip.js +0 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +8 -4
- package/ui5.yaml +1 -1
|
@@ -5,410 +5,398 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define(['sap/ui/base/ManagedObject', "sap/ui/events/KeyCodes", "sap/ui/thirdparty/jquery"],
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
if (rightHandlerPositionPercent != this.selectedInterval.end ) {
|
|
404
|
-
// right handler is moved
|
|
405
|
-
setTooltipText(rightHandlerPositionPercent, 'interactionRightHandle');
|
|
406
|
-
}
|
|
407
|
-
// end update slider tooltip
|
|
408
|
-
|
|
409
|
-
this.selectedInterval.start = leftHandlerPositionPercent;
|
|
410
|
-
this.selectedInterval.end = rightHandlerPositionPercent;
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
return InteractionSlider;
|
|
414
|
-
});
|
|
8
|
+
function(ManagedObject, KeyCodes, jQuery) {
|
|
9
|
+
'use strict';
|
|
10
|
+
var InteractionSlider = ManagedObject.extend("sap.ui.core.support.controls.InteractionSlider", {
|
|
11
|
+
metadata: {
|
|
12
|
+
library: "sap.ui.core"
|
|
13
|
+
},
|
|
14
|
+
constructor: function () {
|
|
15
|
+
//this.SIDE_LIST_WIDTH = 250;
|
|
16
|
+
this.SIDE_LIST_WIDTH = 0;
|
|
17
|
+
this.LEFT_HANDLE_ID = 'left';
|
|
18
|
+
this.RIGHT_HANDLE_ID = 'right';
|
|
19
|
+
this.HANDLE_BORDER_SIZE = 0;
|
|
20
|
+
this.HANDLES_WIDTH = 3;
|
|
21
|
+
|
|
22
|
+
this.selectedInterval = {
|
|
23
|
+
start: 0,
|
|
24
|
+
end: 0,
|
|
25
|
+
duration: 0
|
|
26
|
+
};
|
|
27
|
+
this.nodes = {
|
|
28
|
+
slider: null,
|
|
29
|
+
handle: null,
|
|
30
|
+
leftResizeHandle: null,
|
|
31
|
+
rightResizeHandle: null
|
|
32
|
+
};
|
|
33
|
+
this.sizes = {
|
|
34
|
+
width: 0,
|
|
35
|
+
handleWidth: 0,
|
|
36
|
+
handleMinWidth: 10
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
this.drag = {
|
|
40
|
+
handleClickOffsetX: 0,
|
|
41
|
+
handleOffsetLeft: 0,
|
|
42
|
+
isResize: false,
|
|
43
|
+
whichResizeHandle: ''
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
this.fRefs = {
|
|
47
|
+
mousedown: undefined,
|
|
48
|
+
mousemove: undefined,
|
|
49
|
+
mouseup: undefined,
|
|
50
|
+
dragstart: undefined
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
InteractionSlider.prototype.render = function(rm) {
|
|
56
|
+
rm.openStart("div", "interactionSlider").openEnd()
|
|
57
|
+
.openStart("div", "interactionSlideHandle").openEnd()
|
|
58
|
+
.openStart("span", "interactionLeftHandle").openEnd().close("span")
|
|
59
|
+
.openStart("span", "interactionRightHandle").openEnd().close("span")
|
|
60
|
+
.close("div")
|
|
61
|
+
.close("div");
|
|
62
|
+
|
|
63
|
+
rm.openStart("div", "interactionSliderBottom").openEnd()
|
|
64
|
+
.openStart("div", "interactionSlideHandleBottom").openEnd()
|
|
65
|
+
.openStart("span", "interactionLeftHandleBottom").openEnd().close("span")
|
|
66
|
+
.openStart("span", "interactionRightHandleBottom").openEnd().close("span")
|
|
67
|
+
.close("div")
|
|
68
|
+
.close("div");
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
InteractionSlider.prototype.initialize = function () {
|
|
72
|
+
this._registerEventListeners();
|
|
73
|
+
this._initSlider();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
InteractionSlider.prototype.setDuration = function(aMeasurements) {
|
|
77
|
+
if (!aMeasurements || !aMeasurements.length) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
this.selectedInterval.duration = aMeasurements[aMeasurements.length - 1].end - aMeasurements[0].start;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
InteractionSlider.prototype._registerEventListeners = function () {
|
|
85
|
+
var that = this;
|
|
86
|
+
window.addEventListener('resize', function () {
|
|
87
|
+
that._calculateSliderSize();
|
|
88
|
+
}, false);
|
|
89
|
+
|
|
90
|
+
window.addEventListener('keydown', this._onArrowMove.bind(this));
|
|
91
|
+
window.addEventListener('keyup', this._onArrowUp.bind(this));
|
|
92
|
+
jQuery("#interactionSlideHandle").on('dblclick', this._initSlider.bind(this));
|
|
93
|
+
jQuery("#interactionSlider").on('wheel', this._onMouseWheel.bind(this));
|
|
94
|
+
jQuery("#interactionSlideHandleBottom").on('dblclick', this._initSlider.bind(this));
|
|
95
|
+
jQuery("#interactionSliderBottom").on('wheel', this._onMouseWheel.bind(this));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
InteractionSlider.prototype._initSlider = function () {
|
|
99
|
+
this.nodes.slider = this.nodes.slider || document.querySelector('#interactionSlider');
|
|
100
|
+
this.nodes.sliderBottom = this.nodes.sliderBottom || document.querySelector('#interactionSliderBottom');
|
|
101
|
+
this.nodes.handle = this.nodes.handle || document.querySelector('#interactionSlideHandle');
|
|
102
|
+
this.nodes.handleBottom = this.nodes.handleBottom || document.querySelector('#interactionSlideHandleBottom');
|
|
103
|
+
this.nodes.leftResizeHandle = this.nodes.leftResizeHandle || document.querySelector('#interactionLeftHandle');
|
|
104
|
+
this.nodes.leftResizeHandleBottom = this.nodes.leftResizeHandleBottom ||
|
|
105
|
+
document.querySelector('#interactionLeftHandleBottom');
|
|
106
|
+
this.nodes.rightResizeHandle = this.nodes.rightResizeHandle || document.querySelector('#interactionRightHandle');
|
|
107
|
+
this.nodes.rightResizeHandleBottom = this.nodes.rightResizeHandleBottom || document.querySelector('#interactionRightHandleBottom');
|
|
108
|
+
|
|
109
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left = 0;
|
|
110
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width = "100%";
|
|
111
|
+
|
|
112
|
+
//set the slider width
|
|
113
|
+
this._calculateSliderSize();
|
|
114
|
+
|
|
115
|
+
if (!this.fRefs.mousedown) {
|
|
116
|
+
this.fRefs.mousedown = this._onMouseDown.bind(this);
|
|
117
|
+
this.nodes.slider.addEventListener('mousedown', this.fRefs.mousedown);
|
|
118
|
+
this.nodes.sliderBottom.addEventListener('mousedown', this.fRefs.mousedown);
|
|
119
|
+
} else {
|
|
120
|
+
this._fireSelectEvent();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
InteractionSlider.prototype._calculateSliderSize = function () {
|
|
125
|
+
if (this.nodes.handle == null || this.nodes.slider == null) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
var oldSliderWidth = this.sizes.width;
|
|
129
|
+
this.sizes.handleWidth = parseInt(this._getSlideHandleWidth());
|
|
130
|
+
this.sizes.width = this.nodes.slider.offsetWidth;
|
|
131
|
+
|
|
132
|
+
if (this.sizes.width !== this.sizes.handleWidth) {
|
|
133
|
+
this._resizeSliderHandle(oldSliderWidth);
|
|
134
|
+
}
|
|
135
|
+
this._updateUI();
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
InteractionSlider.prototype._resizeSliderHandle = function (oldSliderWidth) {
|
|
139
|
+
var sliderWidthDifference = this.sizes.width - oldSliderWidth;
|
|
140
|
+
var upperWidthBound = this.sizes.width - this.drag.handleOffsetLeft;
|
|
141
|
+
var newHandleWidth = this.sizes.handleWidth + sliderWidthDifference;
|
|
142
|
+
|
|
143
|
+
this.sizes.handleWidth = Math.max(this.sizes.handleMinWidth, Math.min(newHandleWidth, upperWidthBound));
|
|
144
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width = this.sizes.handleWidth + 'px';
|
|
145
|
+
|
|
146
|
+
if (this.sizes.width < (this.drag.handleOffsetLeft + this.sizes.handleWidth)) {
|
|
147
|
+
this.drag.handleOffsetLeft = this.sizes.width - this.sizes.handleWidth;
|
|
148
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left = this.drag.handleOffsetLeft + 'px';
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
InteractionSlider.prototype._updateUI = function () {
|
|
153
|
+
this.sizes.handleWidth = parseInt(this._getSlideHandleWidth());
|
|
154
|
+
this.drag.handleOffsetLeft = this.nodes.handle.offsetLeft;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
InteractionSlider.prototype._getSlideHandleWidth = function () {
|
|
158
|
+
return window.getComputedStyle(this.nodes.handle).width;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
InteractionSlider.prototype._onArrowMove = function (evt) {
|
|
162
|
+
var offsetLeft = 0;
|
|
163
|
+
var STEP = 5;
|
|
164
|
+
|
|
165
|
+
if (evt.keyCode != KeyCodes.ARROW_LEFT && evt.keyCode != KeyCodes.ARROW_RIGHT) {
|
|
166
|
+
return;
|
|
167
|
+
} else if (evt.keyCode == KeyCodes.ARROW_LEFT) {
|
|
168
|
+
offsetLeft = -STEP;
|
|
169
|
+
} else if (evt.keyCode == KeyCodes.ARROW_RIGHT) {
|
|
170
|
+
offsetLeft = STEP;
|
|
171
|
+
}
|
|
172
|
+
var maxLeftOffset = Math.min((this.drag.handleOffsetLeft + offsetLeft),
|
|
173
|
+
this.sizes.width - this.sizes.handleWidth);
|
|
174
|
+
|
|
175
|
+
this.drag.handleOffsetLeft = Math.max(maxLeftOffset, 0);
|
|
176
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left = this.drag.handleOffsetLeft + 'px';
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
InteractionSlider.prototype._onArrowUp = function (evt) {
|
|
180
|
+
if (evt.keyCode != KeyCodes.ARROW_LEFT && evt.keyCode != KeyCodes.ARROW_RIGHT) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this._fireSelectEvent();
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
InteractionSlider.prototype._onMouseDown = function (evt) {
|
|
187
|
+
var targetId = evt.target.id;
|
|
188
|
+
var marginAndHalfOfSlideHandleWidth = this.SIDE_LIST_WIDTH + (this.sizes.handleWidth / 2);
|
|
189
|
+
var leftConstraint = Math.max(evt.clientX - marginAndHalfOfSlideHandleWidth, 0);
|
|
190
|
+
var rightConstraint = this.sizes.width - this.sizes.handleWidth;
|
|
191
|
+
var constrainedPosition = Math.min(leftConstraint, rightConstraint);
|
|
192
|
+
|
|
193
|
+
if (targetId === this.nodes.slider.id || targetId === this.nodes.sliderBottom.id) {
|
|
194
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left = constrainedPosition + 'px';
|
|
195
|
+
this.drag.handleOffsetLeft = this.nodes.handle.offsetLeft;
|
|
196
|
+
this.drag.isResize = false;
|
|
197
|
+
} else if (targetId === this.nodes.handle.id || targetId === this.nodes.handleBottom.id) {
|
|
198
|
+
this.drag.handleClickOffsetX = evt.offsetX;
|
|
199
|
+
this.drag.isResize = false;
|
|
200
|
+
|
|
201
|
+
this._registerOnMouseMoveListener();
|
|
202
|
+
} else if (targetId === this.nodes.leftResizeHandle.id || targetId === this.nodes.leftResizeHandleBottom.id) {
|
|
203
|
+
this.drag.whichResizeHandle = this.LEFT_HANDLE_ID;
|
|
204
|
+
this.drag.isResize = true;
|
|
205
|
+
|
|
206
|
+
this._registerOnMouseMoveListener();
|
|
207
|
+
} else if (targetId === this.nodes.rightResizeHandle.id || targetId === this.nodes.rightResizeHandleBottom.id) {
|
|
208
|
+
this.drag.whichResizeHandle = this.RIGHT_HANDLE_ID;
|
|
209
|
+
this.drag.isResize = true;
|
|
210
|
+
|
|
211
|
+
this._registerOnMouseMoveListener();
|
|
212
|
+
} else {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
this._registerOnMouseUpListener();
|
|
217
|
+
this._registerOnDragStartListener();
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
InteractionSlider.prototype._registerOnMouseMoveListener = function () {
|
|
221
|
+
this.fRefs.mousemove = this._onMouseMove.bind(this);
|
|
222
|
+
window.addEventListener('mousemove', this.fRefs.mousemove);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
InteractionSlider.prototype._registerOnMouseUpListener = function () {
|
|
226
|
+
this.fRefs.mouseup = this._onMouseUp.bind(this);
|
|
227
|
+
window.addEventListener('mouseup', this.fRefs.mouseup);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
InteractionSlider.prototype._registerOnDragStartListener = function () {
|
|
231
|
+
this.fRefs.dragstart = this._onDragStart.bind(this);
|
|
232
|
+
window.addEventListener('dragstart', this.fRefs.dragstart);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
InteractionSlider.prototype._onMouseMove = function (evt) {
|
|
236
|
+
evt.stopImmediatePropagation();
|
|
237
|
+
|
|
238
|
+
var constraintDistance;
|
|
239
|
+
var distance = evt.clientX - this.SIDE_LIST_WIDTH;
|
|
240
|
+
if (this.drag.isResize) {
|
|
241
|
+
this._handleResize(evt);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
var rightBorder = this.sizes.width - this.sizes.handleWidth + this.drag.handleClickOffsetX;
|
|
246
|
+
constraintDistance = Math.max(Math.min(distance, rightBorder), this.drag.handleClickOffsetX);
|
|
247
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left =
|
|
248
|
+
constraintDistance - this.drag.handleClickOffsetX + 'px';
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
InteractionSlider.prototype._onMouseWheel = function (evt) {
|
|
252
|
+
evt.preventDefault();
|
|
253
|
+
this._handleMouseWheelResize(evt);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
InteractionSlider.prototype._handleResize = function (evt) {
|
|
257
|
+
evt.stopImmediatePropagation();
|
|
258
|
+
|
|
259
|
+
var minWidth;
|
|
260
|
+
var maxWidth;
|
|
261
|
+
var newWidth;
|
|
262
|
+
var resizeDistance;
|
|
263
|
+
var rightConstraint;
|
|
264
|
+
var leftRightConstraints;
|
|
265
|
+
var clientX = evt.clientX - this.SIDE_LIST_WIDTH;
|
|
266
|
+
//var LEFT_DRAG_OFFSET_VALUE = 10;
|
|
267
|
+
var DRAG_OFFSET_VALUE = 3;
|
|
268
|
+
|
|
269
|
+
if (this.drag.whichResizeHandle === this.RIGHT_HANDLE_ID) {
|
|
270
|
+
resizeDistance = clientX - this.drag.handleOffsetLeft + DRAG_OFFSET_VALUE;
|
|
271
|
+
minWidth = Math.max(resizeDistance, this.sizes.handleMinWidth);
|
|
272
|
+
maxWidth = this.sizes.width - this.drag.handleOffsetLeft;
|
|
273
|
+
|
|
274
|
+
newWidth = Math.min(minWidth, maxWidth);
|
|
275
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width = newWidth + 'px';
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (this.drag.whichResizeHandle === this.LEFT_HANDLE_ID) {
|
|
279
|
+
minWidth = this.drag.handleOffsetLeft + this.sizes.handleWidth - this.sizes.handleMinWidth;
|
|
280
|
+
clientX = Math.max(Math.min(clientX, minWidth), 0);
|
|
281
|
+
maxWidth = this.drag.handleOffsetLeft + this.sizes.handleWidth;
|
|
282
|
+
rightConstraint = Math.min(clientX, this.sizes.width);
|
|
283
|
+
leftRightConstraints = Math.max(Math.max(rightConstraint, -2 * this.sizes.handleMinWidth),
|
|
284
|
+
DRAG_OFFSET_VALUE);
|
|
285
|
+
newWidth = maxWidth - leftRightConstraints + DRAG_OFFSET_VALUE;
|
|
286
|
+
|
|
287
|
+
if (newWidth <= DRAG_OFFSET_VALUE + this.sizes.handleMinWidth) {
|
|
288
|
+
newWidth -= DRAG_OFFSET_VALUE;
|
|
289
|
+
leftRightConstraints += DRAG_OFFSET_VALUE;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left =
|
|
293
|
+
(leftRightConstraints - DRAG_OFFSET_VALUE) + 'px';
|
|
294
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width = newWidth + 'px';
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
InteractionSlider.prototype._handleMouseWheelResize = function (evt) {
|
|
299
|
+
var sizeChangeStep = 40;
|
|
300
|
+
if (evt.originalEvent.deltaY && evt.originalEvent.deltaY >= 0) {
|
|
301
|
+
this._calculateHandlerSizePositionOnMouseWheelDown(sizeChangeStep);
|
|
302
|
+
} else {
|
|
303
|
+
this._calculateHandlerSizePositionOnMouseWheelUp(sizeChangeStep);
|
|
304
|
+
}
|
|
305
|
+
this._updateUI();
|
|
306
|
+
this._fireSelectEvent();
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
InteractionSlider.prototype._calculateHandlerSizePositionOnMouseWheelDown = function (sizeChangeStep) {
|
|
310
|
+
var newLeftHandlerPosition;
|
|
311
|
+
var newWidth;
|
|
312
|
+
var rightHandlerMaxSizeLimit = this.sizes.width - this.drag.handleOffsetLeft;
|
|
313
|
+
var widthIncrease = Math.min((rightHandlerMaxSizeLimit - this.sizes.handleWidth), sizeChangeStep);
|
|
314
|
+
var rightHandlerInMaxRightPosition = (this.drag.handleOffsetLeft + this.sizes.handleWidth === this.sizes.width);
|
|
315
|
+
|
|
316
|
+
if ((widthIncrease < sizeChangeStep) && !rightHandlerInMaxRightPosition) {
|
|
317
|
+
newWidth = this.sizes.handleWidth + widthIncrease;
|
|
318
|
+
newLeftHandlerPosition = this.nodes.handle.offsetLeft;
|
|
319
|
+
} else if (rightHandlerInMaxRightPosition) {
|
|
320
|
+
var leftHandlerChangeStep = Math.min(this.sizes.width - this.sizes.handleWidth, sizeChangeStep);
|
|
321
|
+
newWidth = this.sizes.handleWidth + leftHandlerChangeStep;
|
|
322
|
+
newLeftHandlerPosition = Math.max(0, this.nodes.handle.offsetLeft - leftHandlerChangeStep);
|
|
323
|
+
} else {
|
|
324
|
+
newWidth = this.sizes.handleWidth + sizeChangeStep;
|
|
325
|
+
newLeftHandlerPosition = Math.max(0, this.nodes.handle.offsetLeft - (sizeChangeStep / 2));
|
|
326
|
+
}
|
|
327
|
+
this.nodes.handleBottom.style.left = this.nodes.handle.style.left = newLeftHandlerPosition + 'px';
|
|
328
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width = newWidth + 'px';
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
InteractionSlider.prototype._calculateHandlerSizePositionOnMouseWheelUp = function (sizeChangeStep) {
|
|
332
|
+
if (this.sizes.handleWidth - sizeChangeStep > this.sizes.handleMinWidth) {
|
|
333
|
+
this.nodes.handle.style.left = (this.nodes.handle.offsetLeft + (sizeChangeStep / 2)) + 'px';
|
|
334
|
+
this.nodes.handleBottom.style.left = (this.nodes.handleBottom.offsetLeft + (sizeChangeStep / 2)) + 'px';
|
|
335
|
+
this.nodes.handle.style.width = (this.sizes.handleWidth - sizeChangeStep) + 'px';
|
|
336
|
+
this.nodes.handleBottom.style.width = this.nodes.handle.style.width;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
InteractionSlider.prototype._onMouseUp = function (evt) {
|
|
341
|
+
evt.stopImmediatePropagation();
|
|
342
|
+
window.removeEventListener('mousemove', this.fRefs.mousemove);
|
|
343
|
+
window.removeEventListener('mouseup', this.fRefs.mouseup);
|
|
344
|
+
window.removeEventListener('dragstart', this.fRefs.dragstart);
|
|
345
|
+
this._updateUI();
|
|
346
|
+
this._fireSelectEvent();
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
InteractionSlider.prototype._onDragStart = function (evt) {
|
|
350
|
+
evt.preventDefault();
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
InteractionSlider.prototype._fireSelectEvent = function () {
|
|
354
|
+
var oldStartInterval = this.selectedInterval.start;
|
|
355
|
+
var oldEndInterval = this.selectedInterval.end;
|
|
356
|
+
this._calculateStartEndPeriod();
|
|
357
|
+
|
|
358
|
+
if (oldStartInterval === this.selectedInterval.start && oldEndInterval == this.selectedInterval.end) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
jQuery("#interactionSlider").trigger("InteractionSliderChange", [ this.selectedInterval.start, this.selectedInterval.end ]);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
InteractionSlider.prototype._calculateStartEndPeriod = function () {
|
|
367
|
+
var sliderWidth = this.nodes.slider.offsetWidth;
|
|
368
|
+
var leftHandlerPosition = this.nodes.leftResizeHandle.getBoundingClientRect().left -
|
|
369
|
+
this.nodes.slider.getBoundingClientRect().left - this.HANDLE_BORDER_SIZE;
|
|
370
|
+
var rightHandlerPosition = this.nodes.rightResizeHandle.getBoundingClientRect().left -
|
|
371
|
+
this.nodes.slider.getBoundingClientRect().left + this.HANDLE_BORDER_SIZE + this.HANDLES_WIDTH;
|
|
372
|
+
var leftHandlerPositionPercent = leftHandlerPosition / sliderWidth;
|
|
373
|
+
var rightHandlerPositionPercent = rightHandlerPosition / sliderWidth,
|
|
374
|
+
that = this,
|
|
375
|
+
setTooltipText = function(handlerPosition, handlerId) {
|
|
376
|
+
var getTooltipText = function (handlerPosition) {
|
|
377
|
+
return "" + Math.round( handlerPosition * that.selectedInterval.duration / 10 ) / 100 + "s";
|
|
378
|
+
};
|
|
379
|
+
var sTooltip = getTooltipText(handlerPosition);
|
|
380
|
+
|
|
381
|
+
jQuery("#" + handlerId).attr('title', sTooltip);
|
|
382
|
+
jQuery("#" + handlerId + "Bottom").attr('title', sTooltip);
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
// update slider title before update the positions
|
|
386
|
+
if (leftHandlerPositionPercent != this.selectedInterval.start ) {
|
|
387
|
+
// left handler is moved
|
|
388
|
+
setTooltipText(leftHandlerPositionPercent, 'interactionLeftHandle');
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (rightHandlerPositionPercent != this.selectedInterval.end ) {
|
|
392
|
+
// right handler is moved
|
|
393
|
+
setTooltipText(rightHandlerPositionPercent, 'interactionRightHandle');
|
|
394
|
+
}
|
|
395
|
+
// end update slider tooltip
|
|
396
|
+
|
|
397
|
+
this.selectedInterval.start = leftHandlerPositionPercent;
|
|
398
|
+
this.selectedInterval.end = rightHandlerPositionPercent;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
return InteractionSlider;
|
|
402
|
+
});
|