@openui5/sap.m 1.113.0 → 1.115.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.
Files changed (440) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/THIRDPARTY.txt +1 -7
  3. package/package.json +4 -4
  4. package/src/sap/m/.library +1 -1
  5. package/src/sap/m/AccButton.js +1 -1
  6. package/src/sap/m/ActionListItem.js +1 -1
  7. package/src/sap/m/ActionSelect.js +1 -1
  8. package/src/sap/m/ActionSheet.js +1 -1
  9. package/src/sap/m/ActionTile.js +1 -1
  10. package/src/sap/m/ActionTileContent.js +1 -1
  11. package/src/sap/m/AdditionalTextButton.js +1 -1
  12. package/src/sap/m/App.js +1 -1
  13. package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
  14. package/src/sap/m/Avatar.js +83 -13
  15. package/src/sap/m/AvatarRenderer.js +4 -2
  16. package/src/sap/m/Bar.js +1 -1
  17. package/src/sap/m/Breadcrumbs.js +1 -1
  18. package/src/sap/m/BusyDialog.js +5 -3
  19. package/src/sap/m/BusyIndicator.js +1 -1
  20. package/src/sap/m/Button.js +19 -3
  21. package/src/sap/m/ButtonRenderer.js +9 -1
  22. package/src/sap/m/Carousel.js +396 -218
  23. package/src/sap/m/CarouselLayout.js +1 -1
  24. package/src/sap/m/CarouselRenderer.js +14 -9
  25. package/src/sap/m/CheckBox.js +1 -1
  26. package/src/sap/m/ColorPalette.js +1 -1
  27. package/src/sap/m/ColorPalettePopover.js +1 -1
  28. package/src/sap/m/Column.js +1 -1
  29. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  30. package/src/sap/m/ColumnListItem.js +1 -1
  31. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  32. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  33. package/src/sap/m/ColumnPopoverItem.js +1 -1
  34. package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
  35. package/src/sap/m/ColumnPopoverSortItem.js +1 -1
  36. package/src/sap/m/ComboBox.js +14 -3
  37. package/src/sap/m/ComboBoxBase.js +1 -1
  38. package/src/sap/m/ComboBoxTextField.js +1 -1
  39. package/src/sap/m/CustomListItem.js +1 -1
  40. package/src/sap/m/CustomTile.js +1 -1
  41. package/src/sap/m/CustomTreeItem.js +1 -1
  42. package/src/sap/m/DatePicker.js +48 -18
  43. package/src/sap/m/DateRangeSelection.js +61 -29
  44. package/src/sap/m/DateTimeField.js +7 -7
  45. package/src/sap/m/DateTimeInput.js +6 -4
  46. package/src/sap/m/DateTimePicker.js +42 -11
  47. package/src/sap/m/Dialog.js +2 -2
  48. package/src/sap/m/DisplayListItem.js +1 -1
  49. package/src/sap/m/DraftIndicator.js +1 -1
  50. package/src/sap/m/DynamicDate.js +5 -6
  51. package/src/sap/m/DynamicDateFormat.js +10 -7
  52. package/src/sap/m/DynamicDateOption.js +12 -6
  53. package/src/sap/m/DynamicDateRange.js +268 -45
  54. package/src/sap/m/DynamicDateUtil.js +5 -5
  55. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -2
  56. package/src/sap/m/ExpandableText.js +1 -1
  57. package/src/sap/m/FacetFilter.js +7 -5
  58. package/src/sap/m/FacetFilterItem.js +1 -1
  59. package/src/sap/m/FacetFilterList.js +1 -1
  60. package/src/sap/m/FeedContent.js +1 -1
  61. package/src/sap/m/FeedInput.js +1 -1
  62. package/src/sap/m/FeedListItem.js +4 -4
  63. package/src/sap/m/FeedListItemAction.js +1 -1
  64. package/src/sap/m/Fiori20Adapter.js +2 -2
  65. package/src/sap/m/FlexBox.js +1 -1
  66. package/src/sap/m/FlexItemData.js +1 -1
  67. package/src/sap/m/FormattedText.js +4 -4
  68. package/src/sap/m/GenericTag.js +1 -1
  69. package/src/sap/m/GenericTile.js +23 -25
  70. package/src/sap/m/GroupHeaderListItem.js +1 -1
  71. package/src/sap/m/GrowingEnablement.js +2 -4
  72. package/src/sap/m/GrowingList.js +1 -1
  73. package/src/sap/m/HBox.js +1 -1
  74. package/src/sap/m/HeaderContainer.js +12 -7
  75. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  76. package/src/sap/m/IconTabBar.js +1 -1
  77. package/src/sap/m/IconTabBarSelectList.js +1 -1
  78. package/src/sap/m/IconTabFilter.js +5 -6
  79. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  80. package/src/sap/m/IconTabHeader.js +1 -1
  81. package/src/sap/m/IconTabSeparator.js +5 -8
  82. package/src/sap/m/IllustratedMessage.js +30 -2
  83. package/src/sap/m/Illustration.js +1 -1
  84. package/src/sap/m/IllustrationRenderer.js +0 -2
  85. package/src/sap/m/Image.js +6 -2
  86. package/src/sap/m/ImageContent.js +1 -1
  87. package/src/sap/m/ImageCustomData.js +45 -0
  88. package/src/sap/m/ImageHelper.js +110 -0
  89. package/src/sap/m/Input.js +1 -1
  90. package/src/sap/m/InputBase.js +1 -1
  91. package/src/sap/m/InputListItem.js +1 -1
  92. package/src/sap/m/Label.js +1 -1
  93. package/src/sap/m/LightBox.js +1 -1
  94. package/src/sap/m/LightBoxItem.js +1 -1
  95. package/src/sap/m/Link.js +7 -16
  96. package/src/sap/m/List.js +1 -1
  97. package/src/sap/m/ListBase.js +6 -2
  98. package/src/sap/m/ListItemBase.js +10 -3
  99. package/src/sap/m/MaskEnabler.js +2 -1
  100. package/src/sap/m/MaskInput.js +1 -1
  101. package/src/sap/m/MaskInputRule.js +1 -1
  102. package/src/sap/m/Menu.js +1 -1
  103. package/src/sap/m/MenuButton.js +1 -1
  104. package/src/sap/m/MenuItem.js +1 -1
  105. package/src/sap/m/MenuListItem.js +1 -1
  106. package/src/sap/m/MessageItem.js +1 -1
  107. package/src/sap/m/MessageListItem.js +4 -5
  108. package/src/sap/m/MessagePage.js +1 -1
  109. package/src/sap/m/MessagePopover.js +1 -1
  110. package/src/sap/m/MessagePopoverItem.js +1 -1
  111. package/src/sap/m/MessageStrip.js +1 -1
  112. package/src/sap/m/MessageToast.js +78 -10
  113. package/src/sap/m/MessageView.js +10 -5
  114. package/src/sap/m/MultiComboBox.js +24 -5
  115. package/src/sap/m/MultiEditField.js +1 -1
  116. package/src/sap/m/MultiInput.js +12 -16
  117. package/src/sap/m/NavContainer.js +1 -1
  118. package/src/sap/m/NewsContent.js +1 -1
  119. package/src/sap/m/NotificationList.js +1 -1
  120. package/src/sap/m/NotificationListBase.js +1 -1
  121. package/src/sap/m/NotificationListGroup.js +1 -1
  122. package/src/sap/m/NotificationListItem.js +1 -1
  123. package/src/sap/m/NumericContent.js +1 -1
  124. package/src/sap/m/NumericInput.js +1 -1
  125. package/src/sap/m/ObjectAttribute.js +6 -6
  126. package/src/sap/m/ObjectHeader.js +5 -5
  127. package/src/sap/m/ObjectIdentifier.js +1 -1
  128. package/src/sap/m/ObjectListItem.js +5 -6
  129. package/src/sap/m/ObjectMarker.js +1 -1
  130. package/src/sap/m/ObjectNumber.js +1 -1
  131. package/src/sap/m/ObjectStatus.js +4 -7
  132. package/src/sap/m/OverflowToolbar.js +1 -1
  133. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  134. package/src/sap/m/OverflowToolbarButton.js +1 -1
  135. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  136. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  137. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  138. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  139. package/src/sap/m/P13nColumnsItem.js +1 -1
  140. package/src/sap/m/P13nColumnsPanel.js +1 -1
  141. package/src/sap/m/P13nConditionPanel.js +1 -1
  142. package/src/sap/m/P13nDialog.js +1 -1
  143. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  144. package/src/sap/m/P13nDimMeasurePanel.js +1 -1
  145. package/src/sap/m/P13nFilterItem.js +1 -1
  146. package/src/sap/m/P13nFilterPanel.js +1 -1
  147. package/src/sap/m/P13nGroupItem.js +1 -1
  148. package/src/sap/m/P13nGroupPanel.js +1 -1
  149. package/src/sap/m/P13nItem.js +1 -1
  150. package/src/sap/m/P13nPanel.js +1 -1
  151. package/src/sap/m/P13nSelectionItem.js +1 -1
  152. package/src/sap/m/P13nSelectionPanel.js +1 -1
  153. package/src/sap/m/P13nSortItem.js +1 -1
  154. package/src/sap/m/P13nSortPanel.js +1 -1
  155. package/src/sap/m/PDFViewer.js +1 -1
  156. package/src/sap/m/Page.js +2 -2
  157. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  158. package/src/sap/m/PagingButton.js +1 -1
  159. package/src/sap/m/Panel.js +1 -1
  160. package/src/sap/m/PlanningCalendar.js +43 -18
  161. package/src/sap/m/PlanningCalendarHeader.js +3 -3
  162. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  163. package/src/sap/m/PlanningCalendarRow.js +15 -15
  164. package/src/sap/m/PlanningCalendarView.js +1 -1
  165. package/src/sap/m/Popover.js +3 -3
  166. package/src/sap/m/ProgressIndicator.js +1 -1
  167. package/src/sap/m/PullToRefresh.js +22 -12
  168. package/src/sap/m/QuickView.js +1 -1
  169. package/src/sap/m/QuickViewBase.js +1 -1
  170. package/src/sap/m/QuickViewCard.js +1 -1
  171. package/src/sap/m/QuickViewGroup.js +1 -1
  172. package/src/sap/m/QuickViewGroupElement.js +1 -1
  173. package/src/sap/m/QuickViewPage.js +1 -1
  174. package/src/sap/m/RadioButton.js +1 -1
  175. package/src/sap/m/RadioButtonGroup.js +2 -1
  176. package/src/sap/m/RangeSlider.js +1 -1
  177. package/src/sap/m/RatingIndicator.js +1 -1
  178. package/src/sap/m/RatingIndicatorRenderer.js +3 -1
  179. package/src/sap/m/ResponsivePopover.js +1 -1
  180. package/src/sap/m/ResponsiveScale.js +1 -1
  181. package/src/sap/m/ScrollBar.js +1 -1
  182. package/src/sap/m/ScrollContainer.js +1 -1
  183. package/src/sap/m/SearchField.js +34 -9
  184. package/src/sap/m/SearchFieldRenderer.js +6 -1
  185. package/src/sap/m/SegmentedButton.js +1 -1
  186. package/src/sap/m/SegmentedButtonItem.js +1 -1
  187. package/src/sap/m/Select.js +1 -1
  188. package/src/sap/m/SelectDialog.js +1 -1
  189. package/src/sap/m/SelectDialogBase.js +1 -1
  190. package/src/sap/m/SelectList.js +1 -1
  191. package/src/sap/m/SelectionDetails.js +1 -1
  192. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  193. package/src/sap/m/SelectionDetailsItem.js +2 -2
  194. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  195. package/src/sap/m/Shell.js +4 -3
  196. package/src/sap/m/SimpleFixFlex.js +1 -1
  197. package/src/sap/m/SinglePlanningCalendar.js +44 -15
  198. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  199. package/src/sap/m/SinglePlanningCalendarGrid.js +13 -13
  200. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +9 -9
  201. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  202. package/src/sap/m/SinglePlanningCalendarView.js +2 -2
  203. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  204. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  205. package/src/sap/m/SlideTile.js +1 -1
  206. package/src/sap/m/Slider.js +4 -4
  207. package/src/sap/m/SliderTooltip.js +1 -1
  208. package/src/sap/m/SliderTooltipBase.js +1 -1
  209. package/src/sap/m/SliderTooltipContainer.js +1 -1
  210. package/src/sap/m/SplitApp.js +1 -1
  211. package/src/sap/m/SplitButton.js +1 -1
  212. package/src/sap/m/SplitContainer.js +1 -1
  213. package/src/sap/m/StandardDynamicDateOption.js +2 -3
  214. package/src/sap/m/StandardListItem.js +1 -1
  215. package/src/sap/m/StandardTile.js +4 -9
  216. package/src/sap/m/StandardTreeItem.js +1 -1
  217. package/src/sap/m/StepInput.js +1 -1
  218. package/src/sap/m/SuggestionItem.js +1 -1
  219. package/src/sap/m/SuggestionsPopover.js +1 -1
  220. package/src/sap/m/Switch.js +1 -1
  221. package/src/sap/m/TabContainer.js +1 -1
  222. package/src/sap/m/TabContainerItem.js +3 -6
  223. package/src/sap/m/TabStrip.js +1 -1
  224. package/src/sap/m/TabStripItem.js +3 -6
  225. package/src/sap/m/Table.js +50 -35
  226. package/src/sap/m/TablePersoController.js +4 -2
  227. package/src/sap/m/TablePersoDialog.js +4 -2
  228. package/src/sap/m/TablePersoProvider.js +1 -1
  229. package/src/sap/m/TableSelectDialog.js +1 -1
  230. package/src/sap/m/Text.js +1 -1
  231. package/src/sap/m/TextArea.js +1 -1
  232. package/src/sap/m/Tile.js +1 -1
  233. package/src/sap/m/TileContainer.js +1 -1
  234. package/src/sap/m/TileContent.js +8 -8
  235. package/src/sap/m/TileContentRenderer.js +1 -6
  236. package/src/sap/m/TimePicker.js +38 -8
  237. package/src/sap/m/TimePickerClock.js +1 -1
  238. package/src/sap/m/TimePickerClocks.js +4 -4
  239. package/src/sap/m/TimePickerClocksRenderer.js +7 -9
  240. package/src/sap/m/TimePickerInputs.js +10 -8
  241. package/src/sap/m/TimePickerInputsRenderer.js +7 -6
  242. package/src/sap/m/TimePickerInternals.js +15 -2
  243. package/src/sap/m/TimePickerSlider.js +1 -1
  244. package/src/sap/m/TimePickerSliders.js +7 -5
  245. package/src/sap/m/Title.js +1 -1
  246. package/src/sap/m/TitlePropagationSupport.js +1 -1
  247. package/src/sap/m/ToggleButton.js +1 -1
  248. package/src/sap/m/Token.js +1 -1
  249. package/src/sap/m/Tokenizer.js +1 -1
  250. package/src/sap/m/Toolbar.js +1 -1
  251. package/src/sap/m/ToolbarLayoutData.js +1 -1
  252. package/src/sap/m/ToolbarSeparator.js +1 -1
  253. package/src/sap/m/ToolbarSpacer.js +1 -1
  254. package/src/sap/m/Tree.js +7 -1
  255. package/src/sap/m/TreeItemBase.js +1 -1
  256. package/src/sap/m/UploadCollection.js +1 -1
  257. package/src/sap/m/UploadCollectionItem.js +1 -1
  258. package/src/sap/m/UploadCollectionParameter.js +1 -1
  259. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  260. package/src/sap/m/VBox.js +10 -1
  261. package/src/sap/m/ValueStateHeader.js +1 -1
  262. package/src/sap/m/VariantManagement.js +77 -78
  263. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  264. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  265. package/src/sap/m/ViewSettingsDialog.js +1 -1
  266. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  267. package/src/sap/m/ViewSettingsItem.js +1 -1
  268. package/src/sap/m/VisibleItem.js +1 -1
  269. package/src/sap/m/WheelSlider.js +1 -1
  270. package/src/sap/m/WheelSliderContainer.js +1 -1
  271. package/src/sap/m/Wizard.js +21 -2
  272. package/src/sap/m/WizardProgressNavigator.js +1 -1
  273. package/src/sap/m/WizardStep.js +18 -4
  274. package/src/sap/m/WizardStepRenderer.js +4 -2
  275. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  276. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  277. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  278. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  279. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  280. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  281. package/src/sap/m/delegate/DateNavigation.js +1 -1
  282. package/src/sap/m/designtime/PersistenceProvider.designtime.js +21 -0
  283. package/src/sap/m/designtime/Table.designtime.js +12 -7
  284. package/src/sap/m/flexibility/Table.flexibility.js +5 -4
  285. package/src/sap/m/imageUtils/getCacheBustedUrl.js +56 -0
  286. package/src/sap/m/library.js +49 -90
  287. package/src/sap/m/messagebundle.properties +17 -0
  288. package/src/sap/m/messagebundle_ar.properties +43 -32
  289. package/src/sap/m/messagebundle_bg.properties +23 -12
  290. package/src/sap/m/messagebundle_ca.properties +11 -0
  291. package/src/sap/m/messagebundle_cs.properties +12 -1
  292. package/src/sap/m/messagebundle_cy.properties +11 -0
  293. package/src/sap/m/messagebundle_da.properties +18 -7
  294. package/src/sap/m/messagebundle_de.properties +13 -2
  295. package/src/sap/m/messagebundle_el.properties +11 -0
  296. package/src/sap/m/messagebundle_en.properties +12 -1
  297. package/src/sap/m/messagebundle_en_GB.properties +12 -1
  298. package/src/sap/m/messagebundle_en_US_sappsd.properties +12 -1
  299. package/src/sap/m/messagebundle_en_US_saprigi.properties +12 -1
  300. package/src/sap/m/messagebundle_en_US_saptrc.properties +12 -1
  301. package/src/sap/m/messagebundle_es.properties +11 -0
  302. package/src/sap/m/messagebundle_es_MX.properties +11 -0
  303. package/src/sap/m/messagebundle_et.properties +11 -0
  304. package/src/sap/m/messagebundle_fi.properties +18 -7
  305. package/src/sap/m/messagebundle_fr.properties +12 -1
  306. package/src/sap/m/messagebundle_fr_CA.properties +11 -0
  307. package/src/sap/m/messagebundle_hi.properties +11 -0
  308. package/src/sap/m/messagebundle_hr.properties +15 -4
  309. package/src/sap/m/messagebundle_hu.properties +12 -1
  310. package/src/sap/m/messagebundle_id.properties +11 -0
  311. package/src/sap/m/messagebundle_it.properties +40 -29
  312. package/src/sap/m/messagebundle_iw.properties +11 -0
  313. package/src/sap/m/messagebundle_ja.properties +18 -7
  314. package/src/sap/m/messagebundle_kk.properties +37 -26
  315. package/src/sap/m/messagebundle_ko.properties +12 -1
  316. package/src/sap/m/messagebundle_lt.properties +11 -0
  317. package/src/sap/m/messagebundle_lv.properties +11 -0
  318. package/src/sap/m/messagebundle_ms.properties +12 -1
  319. package/src/sap/m/messagebundle_nl.properties +16 -5
  320. package/src/sap/m/messagebundle_no.properties +11 -0
  321. package/src/sap/m/messagebundle_pl.properties +13 -2
  322. package/src/sap/m/messagebundle_pt.properties +13 -2
  323. package/src/sap/m/messagebundle_pt_PT.properties +11 -0
  324. package/src/sap/m/messagebundle_ro.properties +14 -3
  325. package/src/sap/m/messagebundle_ru.properties +11 -0
  326. package/src/sap/m/messagebundle_sh.properties +14 -3
  327. package/src/sap/m/messagebundle_sk.properties +16 -5
  328. package/src/sap/m/messagebundle_sl.properties +25 -14
  329. package/src/sap/m/messagebundle_sv.properties +11 -0
  330. package/src/sap/m/messagebundle_th.properties +11 -0
  331. package/src/sap/m/messagebundle_tr.properties +11 -0
  332. package/src/sap/m/messagebundle_uk.properties +19 -8
  333. package/src/sap/m/messagebundle_vi.properties +11 -0
  334. package/src/sap/m/messagebundle_zh_CN.properties +13 -2
  335. package/src/sap/m/messagebundle_zh_TW.properties +12 -1
  336. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  337. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  338. package/src/sap/m/p13n/BasePanel.js +1 -1
  339. package/src/sap/m/p13n/Container.js +1 -1
  340. package/src/sap/m/p13n/Engine.js +22 -5
  341. package/src/sap/m/p13n/GroupController.js +1 -1
  342. package/src/sap/m/p13n/GroupPanel.js +1 -1
  343. package/src/sap/m/p13n/PersistenceProvider.js +1 -1
  344. package/src/sap/m/p13n/Popup.js +13 -3
  345. package/src/sap/m/p13n/QueryPanel.js +1 -1
  346. package/src/sap/m/p13n/SelectionController.js +14 -13
  347. package/src/sap/m/p13n/SelectionPanel.js +1 -1
  348. package/src/sap/m/p13n/SortController.js +1 -1
  349. package/src/sap/m/p13n/SortPanel.js +1 -1
  350. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
  351. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  352. package/src/sap/m/p13n/modules/UIManager.js +19 -9
  353. package/src/sap/m/plugins/CellSelector.js +1 -1
  354. package/src/sap/m/plugins/ColumnResizer.js +10 -2
  355. package/src/sap/m/plugins/CopyProvider.js +133 -6
  356. package/src/sap/m/plugins/DataStateIndicator.js +14 -2
  357. package/src/sap/m/plugins/PasteProvider.js +1 -1
  358. package/src/sap/m/plugins/PluginBase.js +1 -1
  359. package/src/sap/m/rules/Input.support.js +37 -23
  360. package/src/sap/m/semantic/AddAction.js +1 -1
  361. package/src/sap/m/semantic/CancelAction.js +1 -1
  362. package/src/sap/m/semantic/DeleteAction.js +1 -1
  363. package/src/sap/m/semantic/DetailPage.js +1 -1
  364. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  365. package/src/sap/m/semantic/EditAction.js +1 -1
  366. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  367. package/src/sap/m/semantic/FilterAction.js +1 -1
  368. package/src/sap/m/semantic/FilterSelect.js +1 -1
  369. package/src/sap/m/semantic/FlagAction.js +1 -1
  370. package/src/sap/m/semantic/ForwardAction.js +1 -1
  371. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  372. package/src/sap/m/semantic/GroupAction.js +1 -1
  373. package/src/sap/m/semantic/GroupSelect.js +1 -1
  374. package/src/sap/m/semantic/MainAction.js +1 -1
  375. package/src/sap/m/semantic/MasterPage.js +1 -1
  376. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  377. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  378. package/src/sap/m/semantic/NegativeAction.js +1 -1
  379. package/src/sap/m/semantic/OpenInAction.js +1 -1
  380. package/src/sap/m/semantic/PositiveAction.js +1 -1
  381. package/src/sap/m/semantic/PrintAction.js +1 -1
  382. package/src/sap/m/semantic/SaveAction.js +1 -1
  383. package/src/sap/m/semantic/Segment.js +1 -1
  384. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  385. package/src/sap/m/semantic/SemanticButton.js +1 -1
  386. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  387. package/src/sap/m/semantic/SemanticControl.js +1 -1
  388. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  389. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  390. package/src/sap/m/semantic/SemanticPage.js +1 -1
  391. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  392. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  393. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  394. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  395. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  396. package/src/sap/m/semantic/ShareMenu.js +1 -1
  397. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  398. package/src/sap/m/semantic/SortAction.js +1 -1
  399. package/src/sap/m/semantic/SortSelect.js +1 -1
  400. package/src/sap/m/table/Util.js +57 -3
  401. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  402. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  403. package/src/sap/m/table/columnmenu/Item.js +1 -1
  404. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  405. package/src/sap/m/table/columnmenu/Menu.js +14 -21
  406. package/src/sap/m/table/columnmenu/MenuRenderer.js +0 -6
  407. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  408. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  409. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  410. package/src/sap/m/table/columnmenu/QuickGroup.js +1 -1
  411. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  412. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  413. package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
  414. package/src/sap/m/table/columnmenu/QuickTotal.js +1 -1
  415. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  416. package/src/sap/m/themes/base/Button.less +4 -4
  417. package/src/sap/m/themes/base/Carousel.less +24 -31
  418. package/src/sap/m/themes/base/FeedInput.less +1 -0
  419. package/src/sap/m/themes/base/GenericTile.less +5 -23
  420. package/src/sap/m/themes/base/IllustratedMessage.less +2 -1
  421. package/src/sap/m/themes/base/InputBase.less +28 -17
  422. package/src/sap/m/themes/base/Label.less +38 -22
  423. package/src/sap/m/themes/base/Link.less +19 -16
  424. package/src/sap/m/themes/base/ListBase.less +1 -1
  425. package/src/sap/m/themes/base/MessageToast.less +7 -0
  426. package/src/sap/m/themes/base/MessageView.less +1 -1
  427. package/src/sap/m/themes/base/ObjectHeader.less +20 -0
  428. package/src/sap/m/themes/base/Popover.less +1 -2
  429. package/src/sap/m/themes/base/SearchField.less +5 -0
  430. package/src/sap/m/themes/base/SelectionDetailsItem.less +1 -1
  431. package/src/sap/m/themes/base/TabContainer.less +1 -0
  432. package/src/sap/m/themes/base/Table.less +1 -21
  433. package/src/sap/m/themes/base/TimePickerClocks.less +2 -1
  434. package/src/sap/m/themes/base/TimePickerInputs.less +2 -1
  435. package/src/sap/m/themes/base/Wizard.less +1 -1
  436. package/src/sap/m/themes/sap_hcb/Link.less +0 -10
  437. package/src/sap/m/upload/UploadSet.js +27 -20
  438. package/src/sap/m/upload/UploadSetItem.js +27 -25
  439. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  440. package/src/sap/m/CustomDynamicDateOption.js +0 -110
@@ -10,6 +10,7 @@ sap.ui.define([
10
10
  "sap/ui/core/Core",
11
11
  "sap/ui/core/Control",
12
12
  "sap/ui/core/Element",
13
+ "sap/ui/core/Configuration",
13
14
  "sap/ui/Device",
14
15
  "sap/ui/core/ResizeHandler",
15
16
  "sap/ui/core/library",
@@ -18,8 +19,9 @@ sap.ui.define([
18
19
  "./CarouselRenderer",
19
20
  "sap/ui/events/KeyCodes",
20
21
  "sap/base/Log",
22
+ "sap/base/util/isPlainObject",
23
+ "sap/m/ImageHelper",
21
24
  "sap/ui/thirdparty/jquery",
22
- "sap/ui/thirdparty/mobify-carousel",
23
25
  "sap/ui/core/IconPool",
24
26
  "./CarouselLayout",
25
27
  "sap/ui/dom/jquery/Selectors" // provides jQuery custom selector ":sapTabbable"
@@ -28,6 +30,7 @@ sap.ui.define([
28
30
  Core,
29
31
  Control,
30
32
  Element,
33
+ Configuration,
31
34
  Device,
32
35
  ResizeHandler,
33
36
  coreLibrary,
@@ -36,17 +39,16 @@ sap.ui.define([
36
39
  CarouselRenderer,
37
40
  KeyCodes,
38
41
  Log,
42
+ isPlainObject,
43
+ ImageHelper,
39
44
  jQuery
40
- /*, mobifycarousel, IconPool (indirect dependency, kept for compatibility with tests, to be fixed in ImageHelper) */
45
+ /*, IconPool (indirect dependency, kept for compatibility with tests, to be fixed in ImageHelper) */
41
46
  ) {
42
47
  "use strict";
43
48
 
44
49
  //shortcut for sap.ui.core.BusyIndicatorSize
45
50
  var BusyIndicatorSize = coreLibrary.BusyIndicatorSize;
46
51
 
47
- // shortcut for sap.m.ImageHelper
48
- var ImageHelper = library.ImageHelper;
49
-
50
52
  // shortcut for sap.m.CarouselArrowsPlacement
51
53
  var CarouselArrowsPlacement = library.CarouselArrowsPlacement;
52
54
 
@@ -56,6 +58,27 @@ sap.ui.define([
56
58
  //shortcut for sap.m.BackgroundDesign
57
59
  var BackgroundDesign = library.BackgroundDesign;
58
60
 
61
+ //shortcut for sap.m.BorderDesign
62
+ var BorderDesign = library.BorderDesign;
63
+
64
+ var iDragRadius = 10;
65
+ var iMoveRadius = 20;
66
+ var bRtl = Core.getConfiguration().getRTL();
67
+
68
+ function getCursorPosition(e) {
69
+ e = e.originalEvent || e;
70
+ var oTouches = e.touches && e.touches[0];
71
+
72
+ return {
73
+ x: oTouches ? oTouches.clientX : e.clientX,
74
+ y: oTouches ? oTouches.clientY : e.clientY
75
+ };
76
+ }
77
+
78
+ function translateX(element, delta) {
79
+ element.style["transform"] = 'translate3d(' + delta + 'px, 0, 0)';
80
+ }
81
+
59
82
  /**
60
83
  * Constructor for a new Carousel.
61
84
  *
@@ -103,7 +126,7 @@ sap.ui.define([
103
126
  * @extends sap.ui.core.Control
104
127
  *
105
128
  * @author SAP SE
106
- * @version 1.113.0
129
+ * @version 1.115.0
107
130
  *
108
131
  * @constructor
109
132
  * @public
@@ -161,7 +184,21 @@ sap.ui.define([
161
184
  * @public
162
185
  * @since 1.110
163
186
  */
164
- backgroundDesign : {type : "sap.m.BackgroundDesign", group : "Appearance", defaultValue : BackgroundDesign.Translucent}
187
+ backgroundDesign : {type : "sap.m.BackgroundDesign", group : "Appearance", defaultValue : BackgroundDesign.Translucent},
188
+
189
+ /**
190
+ * Defines the carousel page indicator background design. Default is <code>sap.m.BackgroundDesign.Solid</code>.
191
+ * @public
192
+ * @since 1.115
193
+ */
194
+ pageIndicatorBackgroundDesign : {type : "sap.m.BackgroundDesign", group : "Appearance", defaultValue : BackgroundDesign.Solid},
195
+
196
+ /**
197
+ * Defines the carousel page indicator border design. Default is <code>sap.m.BorderDesign.Solid</code>.
198
+ * @public
199
+ * @since 1.115
200
+ */
201
+ pageIndicatorBorderDesign : {type : "sap.m.BorderDesign", group : "Appearance", defaultValue : BorderDesign.Solid}
165
202
  },
166
203
  defaultAggregation : "pages",
167
204
  aggregations : {
@@ -288,22 +325,9 @@ sap.ui.define([
288
325
  * @private
289
326
  */
290
327
  Carousel.prototype.init = function() {
291
- //Initialize '_fnAdjustAfterResize' to be used by window
292
- //'resize' event
293
- this._fnAdjustAfterResize = function() {
294
- var $carouselInner = this.$().find(Carousel._INNER_SELECTOR);
295
- this._oMobifyCarousel.resize($carouselInner);
296
-
297
- if (this.getPages().length > 1) {
298
- this._setWidthOfPages(this._getNumberOfItemsToShow());
299
- }
300
- }.bind(this);
301
-
302
328
  this._aAllActivePages = [];
303
329
  this._aAllActivePagesIndexes = [];
304
-
305
- this._onBeforePageChangedRef = this._onBeforePageChanged.bind(this);
306
- this._onAfterPageChangedRef = this._onAfterPageChanged.bind(this);
330
+ this._bShouldFireEvent = true;
307
331
 
308
332
  this.data("sap-ui-fastnavgroup", "true", true); // Define group for F6 handling
309
333
 
@@ -316,11 +340,6 @@ sap.ui.define([
316
340
  * @private
317
341
  */
318
342
  Carousel.prototype.exit = function() {
319
- if (this._oMobifyCarousel) {
320
- this._oMobifyCarousel.destroy();
321
- delete this._oMobifyCarousel;
322
- }
323
-
324
343
  if (this._oArrowLeft) {
325
344
  this._oArrowLeft.destroy();
326
345
  delete this._oArrowLeft;
@@ -336,10 +355,13 @@ sap.ui.define([
336
355
  }
337
356
  this.$().off('afterSlide');
338
357
 
339
- this._fnAdjustAfterResize = null;
340
- this._$InnerDiv = null;
341
358
  this._aAllActivePages = null;
342
359
  this._aAllActivePagesIndexes = null;
360
+
361
+ if (this._bThemeChangedAttached) {
362
+ Core.detachThemeChanged(this._handleThemeChanged, this);
363
+ this._bThemeChangedAttached = false;
364
+ }
343
365
  };
344
366
 
345
367
  Carousel.prototype.onBeforeRendering = function() {
@@ -359,13 +381,32 @@ sap.ui.define([
359
381
  this._sResizeListenerId = null;
360
382
  }
361
383
 
362
- // remove event delegates before rendering
363
- this.$().off('beforeSlide', this._onBeforePageChangedRef);
364
- this.$().off('afterSlide', this._onAfterPageChangedRef);
365
-
366
384
  return this;
367
385
  };
368
386
 
387
+ Carousel.prototype._resize = function() {
388
+ var $inner = this.$().find('> .sapMCrslInner');
389
+
390
+ if (this._iResizeTimeoutId) {
391
+ clearTimeout(this._iResizeTimeoutId);
392
+ delete this._iResizeTimeoutId;
393
+ }
394
+
395
+ $inner.addClass("sapMCrslNoTransition");
396
+ $inner.addClass("sapMCrslHideNonActive");
397
+
398
+ if (this.getPages().length > 1) {
399
+ this._setWidthOfPages(this._getNumberOfItemsToShow());
400
+ }
401
+
402
+ this._updateTransformValue();
403
+
404
+ this._iResizeTimeoutId = setTimeout(function () {
405
+ $inner.removeClass("sapMCrslNoTransition");
406
+ $inner.removeClass("sapMCrslHideNonActive");
407
+ });
408
+ };
409
+
369
410
  /**
370
411
  * Returns the number of items displayed in <code>Carousel</code>, depending on the <code>CarouselLayout</code> aggregation settings and pages count.
371
412
  *
@@ -397,88 +438,28 @@ sap.ui.define([
397
438
  * @private
398
439
  */
399
440
  Carousel.prototype.onAfterRendering = function() {
400
- if (this._oMobifyCarousel) {
401
- // Clean up existing mobify carousel listeners
402
- this._oMobifyCarousel.unbind();
403
-
404
- setTimeout(function () {
405
- if (this._oMobifyCarousel) {
406
- this._oMobifyCarousel.onTransitionComplete();
407
- }
408
- }.bind(this), 0);
441
+ var iActivePageIndex = this._getActivePageIndex();
442
+ var $innerDiv = this.$().find(Carousel._INNER_SELECTOR)[0];
443
+ var iPagesLength = this.getPages().length;
444
+ if (!iPagesLength) {
445
+ return;
409
446
  }
410
447
 
411
- //Create and initialize new carousel
412
- //Undefined is passed as an action, as we do not want to pass any action to be executed
413
- //and want to bypass the check whether the typeof of the action is "object" (as null returns true).
414
- var iNumberOfItemsToShow = this._getNumberOfItemsToShow();
415
- this.$().carousel(undefined, { numberOfItemsToShow: iNumberOfItemsToShow });
416
- this._oMobifyCarousel = this.getDomRef()._carousel;
417
- this._oMobifyCarousel.setLoop(this.getLoop());
418
- this._oMobifyCarousel.setRTL(Core.getConfiguration().getRTL());
448
+ this._iCurrSlideIndex = Math.min(iActivePageIndex, iPagesLength - this._getNumberOfItemsToShow());
419
449
 
420
- if (iNumberOfItemsToShow > 1) {
421
- this._setWidthOfPages(iNumberOfItemsToShow);
450
+ if (this.getPages().length &&
451
+ this.getPages()[this._getPageIndex(this.getActivePage())].getId() !== this.getActivePage()) {
452
+ this.setAssociation("activePage", this.getPages()[iActivePageIndex].getId(), true);
422
453
  }
423
454
 
424
- //Go to active page: this may be necessary after adding or
425
- //removing pages
426
- var sActivePage = this.getActivePage();
427
- if (sActivePage) {
428
- var iIndex = this._getPageIndex(sActivePage);
429
- if (isNaN(iIndex) || iIndex == 0) {
430
- if (this.getPages().length > 0) {
431
- //First page is always shown as default
432
- //Do not fire page changed event, though
433
- this.setAssociation("activePage", this.getPages()[0].getId(), true);
434
- this._adjustHUDVisibility();
435
- }
436
- } else {
437
- if (Core.isThemeApplied()) {
438
- this._moveToPage(iIndex, iIndex + 1, false);
439
- } else {
440
- Core.attachThemeChanged(this._handleThemeLoad, this);
441
- }
442
-
443
- // BCP: 1580078315
444
- if (this.getParent() && this.getParent().isA("sap.zen.commons.layout.PositionContainer")) {
445
- if (this._isCarouselUsedWithCommonsLayout === undefined) {
446
- setTimeout(this["invalidate"].bind(this), 0);
447
- this._isCarouselUsedWithCommonsLayout = true;
448
- }
449
- }
450
- }
455
+ if (Core.isThemeApplied()) {
456
+ this._initialize();
457
+ } else if (!this._bThemeChangedAttached) {
458
+ this._bThemeChangedAttached = true;
459
+ Core.attachThemeChanged(this._handleThemeChanged, this);
451
460
  }
452
461
 
453
- this.$().on('beforeSlide', this._onBeforePageChangedRef);
454
-
455
- //attach delegate for firing 'PageChanged' events to mobify carousel's
456
- //'afterSlide'
457
- this.$().on('afterSlide', this._onAfterPageChangedRef);
458
-
459
- this._$InnerDiv = this.$().find(Carousel._INNER_SELECTOR)[0];
460
-
461
- this._sResizeListenerId = ResizeHandler.register(this._$InnerDiv, this._fnAdjustAfterResize);
462
-
463
- // Fixes displaying correct page after carousel become visible in an IconTabBar
464
- // BCP: 1680019792
465
- var oParent = this.getParent();
466
- while (oParent) {
467
- if (oParent.isA("sap.m.IconTabBar")) {
468
- var that = this;
469
-
470
- /*eslint-disable no-loop-func */
471
- oParent.attachExpand(function (oEvt) {
472
- var bExpand = oEvt.getParameter('expand');
473
- if (bExpand && iIndex > 0) {
474
- that._moveToPage(iIndex, iIndex + 1, false);
475
- }
476
- });
477
- break;
478
- }
479
-
480
- oParent = oParent.getParent();
481
- }
462
+ this._sResizeListenerId = ResizeHandler.register($innerDiv, this._resize.bind(this));
482
463
  };
483
464
 
484
465
  Carousel.prototype.getFocusDomRef = function () {
@@ -486,21 +467,25 @@ sap.ui.define([
486
467
  };
487
468
 
488
469
  /**
489
- * Calls logic for updating active pages and fires 'beforePageChanged' event with the new active pages.
470
+ * Fired when the theme is changed.
490
471
  *
491
- * @param {object} oEvent event object
492
- * @param {int} iPreviousSlide mobify carousel index of the previous active slide (1-based)
493
- * @param {int} iNextSlide mobify carousel index of the next active slide (1-based)
494
472
  * @private
495
473
  */
496
- Carousel.prototype._onBeforePageChanged = function (oEvent, iPreviousSlide, iNextSlide) {
497
- //the event might bubble up from another carousel inside of this one.
498
- //in this case we ignore the event
499
- if (oEvent.target !== this.getDomRef()) {
500
- return;
501
- }
474
+ Carousel.prototype._handleThemeChanged = function () {
475
+ this._initialize();
476
+ Core.detachThemeChanged(this._handleThemeChanged, this);
477
+ this._bThemeChangedAttached = false;
478
+ };
502
479
 
503
- var sNewActivePageId = this.getPages()[iNextSlide - 1].getId();
480
+ /**
481
+ * Calls logic for updating active pages and fires 'beforePageChanged' event with the new active pages.
482
+ *
483
+ * @param {int} iPreviousSlide carousel index of the previous active slide
484
+ * @param {int} iNextSlide carousel index of the next active slide
485
+ * @private
486
+ */
487
+ Carousel.prototype._onBeforePageChanged = function (iPreviousSlide, iNextSlide) {
488
+ var sNewActivePageId = this.getPages()[iNextSlide].getId();
504
489
  this._updateActivePages(sNewActivePageId);
505
490
 
506
491
  this.fireBeforePageChanged({
@@ -509,20 +494,13 @@ sap.ui.define([
509
494
  };
510
495
 
511
496
  /**
512
- * @param {object} oEvent event object
513
- * @param {int} iPreviousSlide mobify carousel index of the previous active slide (1-based)
514
- * @param {int} iNextSlide mobify carousel index of the next active slide (1-based)
497
+ * @param {int} iPreviousSlide carousel index of the previous active slide
498
+ * @param {int} iNextSlide carousel index of the next active slide
515
499
  * @private
516
500
  */
517
- Carousel.prototype._onAfterPageChanged = function (oEvent, iPreviousSlide, iNextSlide) {
501
+ Carousel.prototype._onAfterPageChanged = function (iPreviousSlide, iNextSlide) {
518
502
  var bHasPages = this.getPages().length > 0;
519
503
 
520
- //the event might bubble up from another carousel inside of this one.
521
- //in this case we ignore the event
522
- if (oEvent.target !== this.getDomRef()) {
523
- return;
524
- }
525
-
526
504
  if (!bHasPages) {
527
505
  return;
528
506
  }
@@ -546,16 +524,15 @@ sap.ui.define([
546
524
 
547
525
  // loop happened
548
526
  if (!this._isPageDisplayed(iNewActivePageIndex)) {
549
- iNewActivePageIndex = iNextSlide - 1;
527
+ iNewActivePageIndex = iNextSlide;
550
528
  }
551
529
  }
552
530
  } else {
553
- iNewActivePageIndex = iNextSlide - 1;
531
+ iNewActivePageIndex = iNextSlide;
554
532
  }
555
533
 
556
534
  this._changeActivePage(iNewActivePageIndex);
557
535
 
558
- delete this._iNewActivePageIndex;
559
536
  delete this._bPageIndicatorArrowPress;
560
537
  delete this._bSwipe;
561
538
  };
@@ -600,40 +577,73 @@ sap.ui.define([
600
577
  };
601
578
 
602
579
  /**
603
- * Fired when the theme is loaded
580
+ * Moves carousel to specific slide and changes the active page after the move has been completed.
581
+ * Each carousel slide can hold multiple carousel pages.
604
582
  *
583
+ * @param {int} iNewIndex index of the new active slide
605
584
  * @private
606
585
  */
607
- Carousel.prototype._handleThemeLoad = function() {
586
+ Carousel.prototype._moveToPage = function(iNewIndex) {
587
+ if (!this._bIsInitialized || this.getPages().length === 0) {
588
+ return;
589
+ }
608
590
 
609
- var sActivePage = this.getActivePage();
591
+ var $element = this.$(),
592
+ $inner = $element.find('> .sapMCrslInner'),
593
+ $items = $inner.children(),
594
+ iIndex = this._iCurrSlideIndex,
595
+ iLength = $items.length,
596
+ iNumberOfItemsToShow = this._getNumberOfItemsToShow(),
597
+ bLoop = this.getLoop();
610
598
 
611
- if (sActivePage) {
612
- var iIndex = this._getPageIndex(sActivePage);
613
- if (iIndex > 0) {
614
- this._moveToPage(iIndex, iIndex + 1, false);
599
+ // prevent loop when carousel shows more pages than 1
600
+ if (bLoop && iNumberOfItemsToShow !== 1 &&
601
+ (iNewIndex < 0 || iNewIndex > iLength - 1)) { // new index out of range - will cause loop
602
+ return;
603
+ }
604
+
605
+ // Bound Values between [1, length];
606
+ if (iNewIndex < 0) {
607
+ //if looping move to last index
608
+ if (bLoop) {
609
+ iNewIndex = iLength - 1;
610
+ } else {
611
+ iNewIndex = 0;
612
+ }
613
+ } else if (iNewIndex > iLength - 1) {
614
+ // if looping move to first index
615
+ if (bLoop) {
616
+ iNewIndex = 0;
617
+ } else {
618
+ iNewIndex = iLength - 1;
615
619
  }
616
620
  }
617
621
 
618
- Core.detachThemeChanged(this._handleThemeLoad, this);
619
- };
622
+ if (iNewIndex + iNumberOfItemsToShow > iLength - 1) {
623
+ iNewIndex = iLength - iNumberOfItemsToShow;
624
+ }
620
625
 
621
- /**
622
- * Moves mobify carousel to specific page and changes the active page after the move has been completed.
623
- * Each mobify carousel page can hold multiple carousel pages.
624
- *
625
- * @param {int} iIndex index of the new active page in 'pages' aggregation.
626
- * @param {int} iMobifyIndex index of mobify carousel page to display (1-based).
627
- * @param {boolean} bTransition Whether to perform smooth move, using transition, or to (almost) immediately change page
628
- * @private
629
- */
630
- Carousel.prototype._moveToPage = function(iIndex, iMobifyIndex, bTransition) {
631
- if (!bTransition) {
632
- this._oMobifyCarousel.changeAnimation("sapMCrslNoTransition");
626
+ // Bail out early if no move is necessary.
627
+ var bTriggerEvents = true;
628
+ if (iNewIndex === iIndex) {
629
+ //only trigger events if index changes
630
+ bTriggerEvents = false;
631
+ }
632
+
633
+ // Trigger beforeSlide event
634
+ if (bTriggerEvents) {
635
+ this._onBeforePageChanged(iIndex, iNewIndex);
633
636
  }
634
637
 
635
- this._iNewActivePageIndex = iIndex;
636
- this._oMobifyCarousel.move(iMobifyIndex);
638
+ this._iOffsetDrag = 0;
639
+ this._iCurrSlideIndex = iNewIndex;
640
+
641
+ this._updateTransformValue();
642
+ this._initActivePages();
643
+
644
+ if (bTriggerEvents) {
645
+ this._onAfterPageChanged(iIndex, iNewIndex);
646
+ }
637
647
  };
638
648
 
639
649
  /**
@@ -660,7 +670,7 @@ sap.ui.define([
660
670
  jQuery(document.activeElement).trigger("blur");
661
671
  }
662
672
 
663
- if (this._oMobifyCarousel && this._oMobifyCarousel.getShouldFireEvent()) {
673
+ if (this._bShouldFireEvent) {
664
674
  Log.debug("sap.m.Carousel: firing pageChanged event: old page: " + sOldActivePageId + ", new page: " + sNewActivePageId);
665
675
  this.firePageChanged({
666
676
  oldActivePageId: sOldActivePageId,
@@ -691,13 +701,13 @@ sap.ui.define([
691
701
 
692
702
  Carousel.prototype._updatePageIndicator = function () {
693
703
  // change the number in the page indicator
694
- this.$("slide-number").text(this._getPageIndicatorText(this._oMobifyCarousel._index));
704
+ this.$("slide-number").text(this._getPageIndicatorText(this._iCurrSlideIndex + 1));
695
705
  };
696
706
 
697
707
  /**
698
708
  * Returns page indicator text.
699
709
  *
700
- * @param {int} iNewPageIndex mobify carousel index of the active slide (1-based)
710
+ * @param {int} iNewPageIndex carousel slide index
701
711
  * @returns {string} page indicator text
702
712
  * @private
703
713
  */
@@ -744,16 +754,8 @@ sap.ui.define([
744
754
  return this;
745
755
  }
746
756
  var iPageNr = this._getPageIndex(sPageId);
747
-
748
- if (!isNaN(iPageNr)) {
749
- if (this._oMobifyCarousel) {
750
- this._sOldActivePageId = this.getActivePage();
751
- this._oMobifyCarousel.setShouldFireEvent(true);
752
- this._moveToPage(iPageNr, iPageNr + 1, true);
753
- }
754
- // if oMobifyCarousel is not present yet, move takes place
755
- // 'onAfterRendering', when oMobifyCarousel is created
756
- }
757
+ this._sOldActivePageId = this.getActivePage();
758
+ this._moveToPage(iPageNr);
757
759
  }
758
760
 
759
761
  this.setAssociation("activePage", sPageId, true);
@@ -804,12 +806,7 @@ sap.ui.define([
804
806
  * @public
805
807
  */
806
808
  Carousel.prototype.previous = function () {
807
- if (this._oMobifyCarousel) {
808
- this._oMobifyCarousel.setShouldFireEvent(true);
809
- this._oMobifyCarousel.prev();
810
- } else {
811
- Log.warning("Unable to execute sap.m.Carousel.previous: carousel must be rendered first.");
812
- }
809
+ this._moveToPage(this._iCurrSlideIndex - 1);
813
810
  return this;
814
811
  };
815
812
 
@@ -820,12 +817,7 @@ sap.ui.define([
820
817
  * @public
821
818
  */
822
819
  Carousel.prototype.next = function () {
823
- if (this._oMobifyCarousel) {
824
- this._oMobifyCarousel.setShouldFireEvent(true);
825
- this._oMobifyCarousel.next();
826
- } else {
827
- Log.warning("Unable to execute sap.m.Carousel.next: carousel must be rendered first.");
828
- }
820
+ this._moveToPage(this._iCurrSlideIndex + 1);
829
821
  return this;
830
822
  };
831
823
 
@@ -839,7 +831,7 @@ sap.ui.define([
839
831
  var i, result = 0;
840
832
 
841
833
  for (i = 0; i < this.getPages().length; i++) {
842
- if (this.getPages()[i].getId() == sPageId) {
834
+ if (this.getPages()[i].getId() === sPageId) {
843
835
  result = i;
844
836
  break;
845
837
  }
@@ -847,17 +839,28 @@ sap.ui.define([
847
839
  return result;
848
840
  };
849
841
 
842
+ Carousel.prototype._getActivePageIndex = function () {
843
+ var iActivePageIndex = 0,
844
+ sActivePage = this.getActivePage();
845
+
846
+ if (sActivePage) {
847
+ iActivePageIndex = this._getPageIndex(sActivePage);
848
+ }
849
+
850
+ return iActivePageIndex;
851
+ };
852
+
850
853
  Carousel.prototype.onswipe = function() {
851
854
  this._bSwipe = true;
852
855
  };
853
856
 
854
857
  /**
855
- * Delegates 'touchstart' event to mobify carousel
858
+ * Handles 'touchstart' event
856
859
  *
857
860
  * @param oEvent
858
861
  */
859
862
  Carousel.prototype.ontouchstart = function(oEvent) {
860
- if (!this.getPages().length) {
863
+ if (!this.getPages().length || !this._bIsInitialized) {
861
864
  return;
862
865
  }
863
866
 
@@ -868,44 +871,116 @@ sap.ui.define([
868
871
  return;
869
872
  }
870
873
 
871
- if (this._oMobifyCarousel) {
872
- if (oEvent.target.draggable) {
873
- // Some elements like images are draggable by default.
874
- // When swiped they begin dragging as ghost images (eg. dragstart event).
875
- // This dragging behavior is not desired when inside a Carousel, so we disable it.
876
- // Note that preventDefault() prevents next events to happen (in particular focusin), so disable the dragging via property
877
- oEvent.target.draggable = false;
878
- }
874
+ if (oEvent.target.draggable) {
875
+ // Some elements like images are draggable by default.
876
+ // When swiped they begin dragging as ghost images (eg. dragstart event).
877
+ // This dragging behavior is not desired when inside a Carousel, so we disable it.
878
+ // Note that preventDefault() prevents next events to happen (in particular focusin), so disable the dragging via property
879
+ oEvent.target.draggable = false;
880
+ }
881
+
882
+ if (oEvent.isMarked("delayedMouseEvent")) {
883
+ return;
884
+ }
879
885
 
880
- this._oMobifyCarousel.touchstart(oEvent);
886
+ //add event handler flags
887
+ var oElement = Element.closestTo(oEvent.target);
888
+ if (oElement &&
889
+ (oElement.isA("sap.m.Slider") ||
890
+ oElement.isA("sap.m.Switch") ||
891
+ oElement.isA("sap.m.IconTabBar"))) {
892
+ //Make sure that swipe is executed for all controls except those that
893
+ //themselves require horizontal swiping
894
+ this._bDragCanceled = true;
895
+ return;
881
896
  }
897
+
898
+ this._bDragging = true;
899
+ this._bDragCanceled = false;
900
+
901
+ this._mCurrentXY = getCursorPosition(oEvent);
902
+ this._iDx = 0;
903
+ this._iDy = 0;
904
+ this._bDragThresholdMet = false;
905
+
906
+ // Disable smooth transitions
907
+ this.$().addClass("sapMCrslDragging");
908
+
909
+ this._bLockLeft = this._iCurrSlideIndex === 1;
910
+ this._bLockRight = this._iCurrSlideIndex === this.getPages().length - 1;
882
911
  };
883
912
 
884
913
  /**
885
- * Delegates 'touchmove' event to mobify carousel
914
+ * Handles 'touchmove' event
886
915
  *
887
916
  * @param oEvent
888
917
  */
889
918
  Carousel.prototype.ontouchmove = function(oEvent) {
890
- if (this._oMobifyCarousel && !this._isPageIndicatorArrow(oEvent.target)) {
891
- this._oMobifyCarousel.touchmove(oEvent);
919
+ if (this._isPageIndicatorArrow(oEvent.target)) {
920
+ return;
921
+ }
922
+
923
+ if (!this._bDragging || this._bDragCanceled || oEvent.isMarked("delayedMouseEvent")) {
924
+ return;
925
+ }
926
+ // mark the event for components that need to know if the event was handled by the carousel
927
+ oEvent.setMarked();
928
+
929
+ var iDragLimit = this.$().width();
930
+
931
+ var mNewXY = getCursorPosition(oEvent);
932
+ this._iDx = this._mCurrentXY.x - mNewXY.x;
933
+ this._iDy = this._mCurrentXY.y - mNewXY.y;
934
+
935
+ if (this._bDragThresholdMet || Math.abs(this._iDx) > Math.abs(this._iDy) && (Math.abs(this._iDx) > iDragRadius)) {
936
+ this._bDragThresholdMet = true;
937
+
938
+ // prevent default action when mouse drag is used
939
+ if (isPlainObject(oEvent.touches[0])) {
940
+ oEvent.preventDefault();
941
+ }
942
+
943
+ if (this._bLockLeft && (this._iDx < 0)) {
944
+ this._iDx = this._iDx * (-iDragLimit) / (this._iDx - iDragLimit);
945
+ } else if (this._bLockRight && (this._iDx > 0)) {
946
+ this._iDx = this._iDx * (iDragLimit) / (this._iDx + iDragLimit);
947
+ }
948
+ this._iOffsetDrag = -this._iDx;
949
+ this._updateTransformValue();
950
+ } else if ((Math.abs(this._iDy) > Math.abs(this._iDx)) && (Math.abs(this._iDy) > iDragRadius)) {
951
+ this._bDragCanceled = true;
892
952
  }
893
953
  };
894
954
 
895
955
  /**
896
- * Delegates 'touchend' event to mobify carousel
956
+ * Handles 'touchend' event
897
957
  *
898
958
  * @param oEvent
899
959
  */
900
960
  Carousel.prototype.ontouchend = function(oEvent) {
901
- if (this._oMobifyCarousel) {
902
- if (this._oMobifyCarousel.hasActiveTransition()) {
903
- this._oMobifyCarousel.onTransitionComplete();
904
- }
961
+ if (this._isPageIndicatorArrow(oEvent.target)) {
962
+ return;
963
+ }
964
+
965
+ if (!this._bDragging || oEvent.isMarked("delayedMouseEvent")) {
966
+ return;
967
+ }
968
+
969
+ this._bDragging = false;
905
970
 
906
- if (!this._isPageIndicatorArrow(oEvent.target)) {
907
- this._oMobifyCarousel.touchend(oEvent);
971
+ this.$().removeClass("sapMCrslDragging");
972
+
973
+ if (!this._bDragCanceled && Math.abs(this._iDx) > iMoveRadius) {
974
+ // Move to the next slide if necessary
975
+ if (this._iDx > 0) {
976
+ bRtl ? this.previous() : this.next();
977
+ } else {
978
+ bRtl ? this.next() : this.previous();
908
979
  }
980
+ } else {
981
+ // Reset back to regular position
982
+ this._iOffsetDrag = 0;
983
+ this._updateTransformValue();
909
984
  }
910
985
  };
911
986
 
@@ -1023,7 +1098,6 @@ sap.ui.define([
1023
1098
  if (!this._isPageDisplayed(this._getPageIndex(sPageId))) {
1024
1099
  this.getFocusDomRef().focus({ preventScroll: true });
1025
1100
  } else if (sPageId !== this.getActivePage()) {
1026
- this._oMobifyCarousel.setShouldFireEvent(true);
1027
1101
  this._changeActivePage(this._getPageIndex(sPageId));
1028
1102
  }
1029
1103
  }
@@ -1110,7 +1184,7 @@ sap.ui.define([
1110
1184
  * @private
1111
1185
  */
1112
1186
  Carousel.prototype.onsaphome = function(oEvent) {
1113
- this._fnSkipToIndex(oEvent, -this._getPageIndex(this.getActivePage()), true);
1187
+ this._fnSkipToIndex(oEvent, -this._getActivePageIndex(), true);
1114
1188
  };
1115
1189
 
1116
1190
  /**
@@ -1120,7 +1194,7 @@ sap.ui.define([
1120
1194
  * @private
1121
1195
  */
1122
1196
  Carousel.prototype.onsapend = function(oEvent) {
1123
- this._fnSkipToIndex(oEvent, this.getPages().length - this._getPageIndex(this.getActivePage()) - 1, true);
1197
+ this._fnSkipToIndex(oEvent, this.getPages().length - this._getActivePageIndex() - 1, true);
1124
1198
  };
1125
1199
 
1126
1200
  /**
@@ -1241,14 +1315,20 @@ sap.ui.define([
1241
1315
  Carousel.prototype._updateActivePages = function(sNewActivePageId) {
1242
1316
  var iNewPageIndex = this._getPageIndex(sNewActivePageId),
1243
1317
  iNumberOfItemsToShown = this._getNumberOfItemsToShow(),
1244
- iLastPageIndex = iNewPageIndex + iNumberOfItemsToShown,
1245
- aAllPages = this.getPages();
1318
+ aAllPages = this.getPages(),
1319
+ iLastPageIndex;
1320
+
1321
+ if (!aAllPages.length) {
1322
+ return;
1323
+ }
1246
1324
 
1247
1325
  // When CarouselLayout is used, the index of the activePage should not exceed allPages count minus the number of visible pages
1248
- if (iLastPageIndex > aAllPages.length) {
1249
- iLastPageIndex = aAllPages.length - iNumberOfItemsToShown;
1326
+ if (iNewPageIndex > aAllPages.length - iNumberOfItemsToShown) {
1327
+ iNewPageIndex = aAllPages.length - iNumberOfItemsToShown;
1250
1328
  }
1251
1329
 
1330
+ iLastPageIndex = iNewPageIndex + iNumberOfItemsToShown;
1331
+
1252
1332
  this._aAllActivePages = [];
1253
1333
  this._aAllActivePagesIndexes = [];
1254
1334
 
@@ -1273,21 +1353,22 @@ sap.ui.define([
1273
1353
 
1274
1354
  oEvent.preventDefault();
1275
1355
 
1276
- if (this._oMobifyCarousel.hasActiveTransition()) {
1277
- this._oMobifyCarousel.onTransitionComplete();
1278
- }
1279
-
1280
- this._oMobifyCarousel.setShouldFireEvent(true);
1281
-
1282
1356
  // Calculate the index of the next active page
1283
1357
  var iNewActivePageIndex = this._makeInRange(this._getPageIndex(this.getActivePage()) + iOffset, bPreventLoop);
1358
+ var sOldActivePageId = this.getActivePage();
1359
+ var iNewSlideIndex = this._iCurrSlideIndex + iOffset;
1360
+ if (bPreventLoop) {
1361
+ iNewSlideIndex = Math.max(0, Math.min(iNewSlideIndex, this.getPages().length - this._getNumberOfItemsToShow()));
1362
+ }
1284
1363
 
1285
1364
  if (this._isPageDisplayed(iNewActivePageIndex)) {
1286
1365
  this._changeActivePage(iNewActivePageIndex);
1287
- } else if (iOffset > 0) { // forward
1288
- this._moveToPage(iNewActivePageIndex, iNewActivePageIndex + 1 - this._getNumberOfItemsToShow() + 1, true);
1289
- } else { // backward
1290
- this._moveToPage(iNewActivePageIndex, iNewActivePageIndex + 1, true);
1366
+ } else {
1367
+ this._bShouldFireEvent = false;
1368
+ this._moveToPage(iNewSlideIndex);
1369
+ this._bShouldFireEvent = true;
1370
+ this._sOldActivePageId = sOldActivePageId;
1371
+ this._changeActivePage(iNewActivePageIndex);
1291
1372
  }
1292
1373
  };
1293
1374
 
@@ -1400,5 +1481,102 @@ sap.ui.define([
1400
1481
  return Control.prototype.setBusyIndicatorSize.call(this, sSize);
1401
1482
  };
1402
1483
 
1484
+ Carousel.prototype.onclick = function (oEvent) {
1485
+ var oTarget = oEvent.target;
1486
+
1487
+ switch (oTarget.id) {
1488
+ case this.getId() + "-arrow-next":
1489
+ this.next();
1490
+ break;
1491
+ case this.getId() + "-arrow-previous":
1492
+ this.previous();
1493
+ break;
1494
+ }
1495
+ };
1496
+
1497
+ Carousel.prototype._initialize = function () {
1498
+ var $inner = this.$().find('> .sapMCrslInner'),
1499
+ iNumberOfItemsToShow = this._getNumberOfItemsToShow();
1500
+
1501
+ this._bIsInitialized = false;
1502
+
1503
+ if (this._iTimeoutId) {
1504
+ clearTimeout(this._iTimeoutId);
1505
+ delete this._iTimeoutId;
1506
+ }
1507
+
1508
+ $inner.addClass("sapMCrslNoTransition");
1509
+
1510
+ this._iOffsetDrag = 0;
1511
+
1512
+ this._initActivePages();
1513
+
1514
+ this._bIsInitialized = true;
1515
+
1516
+ if (iNumberOfItemsToShow > 1) {
1517
+ this._setWidthOfPages(iNumberOfItemsToShow);
1518
+ }
1519
+
1520
+ this._adjustHUDVisibility();
1521
+ this._updateItemsAttributes();
1522
+ this._updatePageIndicator();
1523
+
1524
+ this._updateTransformValue();
1525
+
1526
+ this._iTimeoutId = setTimeout(function () {
1527
+ $inner.removeClass("sapMCrslNoTransition");
1528
+ }, 50);
1529
+ };
1530
+
1531
+ Carousel.prototype._updateTransformValue = function () {
1532
+ if (this.getPages().length === 0) {
1533
+ return;
1534
+ }
1535
+
1536
+ var $element = this.$(),
1537
+ $inner = $element.find('> .sapMCrslInner'),
1538
+ $items = $inner.children(),
1539
+ $start = $items.eq(0),
1540
+ $current = $items.eq(this._iCurrSlideIndex),
1541
+ currentOffset,
1542
+ startOffset,
1543
+ iOffset,
1544
+ x;
1545
+
1546
+ if (!$inner.length) {
1547
+ return;
1548
+ }
1549
+
1550
+ currentOffset = $current.prop('offsetLeft') + $current.prop('clientWidth');
1551
+ startOffset = $start.prop('offsetLeft') + $start.prop('clientWidth');
1552
+
1553
+ iOffset = startOffset - currentOffset;
1554
+ x = Math.round(iOffset + this._iOffsetDrag);
1555
+
1556
+ translateX($inner[0], x);
1557
+ };
1558
+
1559
+ Carousel.prototype._initActivePages = function () {
1560
+ var sActiveClass = "sapMCrslActive",
1561
+ $element = this.$(),
1562
+ $inner = $element.find('> .sapMCrslInner'),
1563
+ $items = $inner.children(),
1564
+ sId = this.getDomRef().id,
1565
+ sPageIndicatorId = sId.replace(/(:|\.)/g,'\\$1') + '-pageIndicator',
1566
+ iIndex = this._iCurrSlideIndex,
1567
+ i;
1568
+
1569
+ for (i = 0; i < $items.length; i++) {
1570
+ if (i < iIndex || i > iIndex + this._getNumberOfItemsToShow() - 1) {
1571
+ $items.eq(i).removeClass(sActiveClass);
1572
+ } else {
1573
+ $items.eq(i).addClass(sActiveClass);
1574
+ }
1575
+ }
1576
+
1577
+ $element.find('span[data-slide]').removeClass(sActiveClass);
1578
+ $element.find('#' + sPageIndicatorId + ' > [data-slide=\'' + (iIndex + 1) + '\']').addClass(sActiveClass);
1579
+ };
1580
+
1403
1581
  return Carousel;
1404
1582
  });