@openui5/sap.m 1.107.1 → 1.108.1

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 (462) hide show
  1. package/.dtsgenrc +22 -0
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +4 -4
  4. package/src/sap/m/.library +2 -2
  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 +17 -1
  10. package/src/sap/m/ActionTileContent.js +7 -5
  11. package/src/sap/m/AdditionalTextButton.js +42 -0
  12. package/src/sap/m/AdditionalTextButtonRenderer.js +60 -0
  13. package/src/sap/m/App.js +1 -1
  14. package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
  15. package/src/sap/m/Avatar.js +49 -7
  16. package/src/sap/m/AvatarRenderer.js +10 -2
  17. package/src/sap/m/Bar.js +2 -2
  18. package/src/sap/m/Breadcrumbs.js +1 -1
  19. package/src/sap/m/BusyDialog.js +1 -1
  20. package/src/sap/m/BusyIndicator.js +1 -1
  21. package/src/sap/m/Button.js +1 -1
  22. package/src/sap/m/ButtonRenderer.js +26 -23
  23. package/src/sap/m/Carousel.js +348 -286
  24. package/src/sap/m/CarouselLayout.js +1 -1
  25. package/src/sap/m/CarouselRenderer.js +52 -20
  26. package/src/sap/m/CheckBox.js +1 -1
  27. package/src/sap/m/ColorPalette.js +1 -1
  28. package/src/sap/m/ColorPalettePopover.js +1 -1
  29. package/src/sap/m/Column.js +36 -8
  30. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  31. package/src/sap/m/ColumnListItem.js +1 -1
  32. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  33. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  34. package/src/sap/m/ColumnPopoverItem.js +1 -1
  35. package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
  36. package/src/sap/m/ColumnPopoverSortItem.js +1 -1
  37. package/src/sap/m/ComboBox.js +1 -1
  38. package/src/sap/m/ComboBoxBase.js +1 -1
  39. package/src/sap/m/ComboBoxTextField.js +1 -1
  40. package/src/sap/m/CustomDynamicDateOption.js +1 -1
  41. package/src/sap/m/CustomListItem.js +1 -1
  42. package/src/sap/m/CustomTile.js +1 -1
  43. package/src/sap/m/CustomTreeItem.js +1 -1
  44. package/src/sap/m/DatePicker.js +15 -6
  45. package/src/sap/m/DateRangeSelection.js +2 -2
  46. package/src/sap/m/DateTimeField.js +1 -1
  47. package/src/sap/m/DateTimeInput.js +1 -1
  48. package/src/sap/m/DateTimePicker.js +12 -8
  49. package/src/sap/m/Dialog.js +29 -2
  50. package/src/sap/m/DialogRenderer.js +20 -6
  51. package/src/sap/m/DisplayListItem.js +1 -1
  52. package/src/sap/m/DraftIndicator.js +1 -1
  53. package/src/sap/m/DynamicDate.js +1 -1
  54. package/src/sap/m/DynamicDateOption.js +1 -1
  55. package/src/sap/m/DynamicDateRange.js +3 -2
  56. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  57. package/src/sap/m/ExpandableText.js +42 -2
  58. package/src/sap/m/ExpandableTextRenderer.js +4 -1
  59. package/src/sap/m/FacetFilter.js +1 -1
  60. package/src/sap/m/FacetFilterItem.js +1 -1
  61. package/src/sap/m/FacetFilterList.js +1 -1
  62. package/src/sap/m/FeedContent.js +1 -1
  63. package/src/sap/m/FeedInput.js +1 -1
  64. package/src/sap/m/FeedListItem.js +1 -1
  65. package/src/sap/m/FeedListItemAction.js +1 -1
  66. package/src/sap/m/Fiori20Adapter.js +2 -2
  67. package/src/sap/m/FlexBox.js +1 -1
  68. package/src/sap/m/FlexItemData.js +1 -1
  69. package/src/sap/m/FormattedText.js +1 -1
  70. package/src/sap/m/GenericTag.js +1 -1
  71. package/src/sap/m/GenericTile.js +115 -18
  72. package/src/sap/m/GenericTileLineModeRenderer.js +4 -4
  73. package/src/sap/m/GenericTileRenderer.js +21 -14
  74. package/src/sap/m/GroupHeaderListItem.js +1 -1
  75. package/src/sap/m/GrowingList.js +1 -1
  76. package/src/sap/m/HBox.js +1 -1
  77. package/src/sap/m/HeaderContainer.js +1 -1
  78. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  79. package/src/sap/m/IconTabBar.js +1 -1
  80. package/src/sap/m/IconTabBarSelectList.js +1 -1
  81. package/src/sap/m/IconTabFilter.js +1 -1
  82. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  83. package/src/sap/m/IconTabHeader.js +1 -1
  84. package/src/sap/m/IconTabSeparator.js +1 -1
  85. package/src/sap/m/IllustratedMessage.js +68 -10
  86. package/src/sap/m/IllustratedMessageRenderer.js +6 -0
  87. package/src/sap/m/IllustratedMessageSize.js +8 -1
  88. package/src/sap/m/Illustration.js +1 -1
  89. package/src/sap/m/IllustrationPool.js +2 -0
  90. package/src/sap/m/Image.js +1 -1
  91. package/src/sap/m/ImageContent.js +1 -1
  92. package/src/sap/m/Input.js +3 -2
  93. package/src/sap/m/InputBase.js +4 -3
  94. package/src/sap/m/InputListItem.js +1 -1
  95. package/src/sap/m/Label.js +11 -5
  96. package/src/sap/m/LabelRenderer.js +5 -3
  97. package/src/sap/m/LightBox.js +1 -1
  98. package/src/sap/m/LightBoxItem.js +1 -1
  99. package/src/sap/m/Link.js +1 -1
  100. package/src/sap/m/List.js +1 -1
  101. package/src/sap/m/ListBase.js +1 -1
  102. package/src/sap/m/ListBaseRenderer.js +1 -1
  103. package/src/sap/m/ListItemBase.js +3 -3
  104. package/src/sap/m/MaskEnabler.js +1 -1
  105. package/src/sap/m/MaskInput.js +1 -1
  106. package/src/sap/m/MaskInputRule.js +1 -1
  107. package/src/sap/m/Menu.js +1 -1
  108. package/src/sap/m/MenuButton.js +1 -1
  109. package/src/sap/m/MenuItem.js +1 -1
  110. package/src/sap/m/MenuListItem.js +1 -1
  111. package/src/sap/m/MessageItem.js +1 -1
  112. package/src/sap/m/MessageListItem.js +1 -1
  113. package/src/sap/m/MessagePage.js +1 -1
  114. package/src/sap/m/MessagePopover.js +1 -1
  115. package/src/sap/m/MessagePopoverItem.js +1 -1
  116. package/src/sap/m/MessageStrip.js +1 -1
  117. package/src/sap/m/MessageToast.js +1 -1
  118. package/src/sap/m/MessageView.js +1 -1
  119. package/src/sap/m/MultiComboBox.js +1 -1
  120. package/src/sap/m/MultiEditField.js +1 -1
  121. package/src/sap/m/MultiInput.js +14 -2
  122. package/src/sap/m/NavContainer.js +1 -1
  123. package/src/sap/m/NewsContent.js +1 -1
  124. package/src/sap/m/NotificationList.js +1 -1
  125. package/src/sap/m/NotificationListBase.js +1 -1
  126. package/src/sap/m/NotificationListGroup.js +1 -1
  127. package/src/sap/m/NotificationListItem.js +3 -2
  128. package/src/sap/m/NumericContent.js +1 -1
  129. package/src/sap/m/NumericInput.js +1 -1
  130. package/src/sap/m/ObjectAttribute.js +1 -1
  131. package/src/sap/m/ObjectHeader.js +1 -1
  132. package/src/sap/m/ObjectIdentifier.js +1 -1
  133. package/src/sap/m/ObjectListItem.js +1 -1
  134. package/src/sap/m/ObjectListItemRenderer.js +1 -1
  135. package/src/sap/m/ObjectMarker.js +1 -1
  136. package/src/sap/m/ObjectNumber.js +1 -1
  137. package/src/sap/m/ObjectStatus.js +1 -1
  138. package/src/sap/m/OverflowToolbar.js +1 -1
  139. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  140. package/src/sap/m/OverflowToolbarButton.js +1 -1
  141. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  142. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  143. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  144. package/src/sap/m/P13nColumnsItem.js +1 -1
  145. package/src/sap/m/P13nColumnsPanel.js +1 -1
  146. package/src/sap/m/P13nConditionPanel.js +1 -1
  147. package/src/sap/m/P13nDialog.js +1 -1
  148. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  149. package/src/sap/m/P13nDimMeasurePanel.js +1 -1
  150. package/src/sap/m/P13nFilterItem.js +1 -1
  151. package/src/sap/m/P13nFilterPanel.js +1 -1
  152. package/src/sap/m/P13nGroupItem.js +1 -1
  153. package/src/sap/m/P13nGroupPanel.js +1 -1
  154. package/src/sap/m/P13nItem.js +1 -1
  155. package/src/sap/m/P13nPanel.js +1 -1
  156. package/src/sap/m/P13nSelectionItem.js +1 -1
  157. package/src/sap/m/P13nSelectionPanel.js +1 -1
  158. package/src/sap/m/P13nSortItem.js +1 -1
  159. package/src/sap/m/P13nSortPanel.js +1 -1
  160. package/src/sap/m/PDFViewer.js +1 -1
  161. package/src/sap/m/Page.js +1 -1
  162. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  163. package/src/sap/m/PagingButton.js +1 -1
  164. package/src/sap/m/Panel.js +1 -1
  165. package/src/sap/m/PlanningCalendar.js +88 -28
  166. package/src/sap/m/PlanningCalendarHeader.js +27 -5
  167. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  168. package/src/sap/m/PlanningCalendarRow.js +1 -1
  169. package/src/sap/m/PlanningCalendarView.js +1 -1
  170. package/src/sap/m/Popover.js +1 -1
  171. package/src/sap/m/ProgressIndicator.js +1 -1
  172. package/src/sap/m/PullToRefresh.js +1 -1
  173. package/src/sap/m/QuickView.js +1 -1
  174. package/src/sap/m/QuickViewBase.js +1 -1
  175. package/src/sap/m/QuickViewCard.js +1 -1
  176. package/src/sap/m/QuickViewGroup.js +1 -1
  177. package/src/sap/m/QuickViewGroupElement.js +1 -1
  178. package/src/sap/m/QuickViewPage.js +1 -1
  179. package/src/sap/m/RadioButton.js +1 -1
  180. package/src/sap/m/RadioButtonGroup.js +80 -17
  181. package/src/sap/m/RangeSlider.js +1 -1
  182. package/src/sap/m/RatingIndicator.js +1 -1
  183. package/src/sap/m/ResponsivePopover.js +1 -1
  184. package/src/sap/m/ResponsiveScale.js +1 -1
  185. package/src/sap/m/ScrollBar.js +1 -1
  186. package/src/sap/m/ScrollContainer.js +1 -1
  187. package/src/sap/m/SearchField.js +1 -1
  188. package/src/sap/m/SegmentedButton.js +1 -1
  189. package/src/sap/m/SegmentedButtonItem.js +1 -1
  190. package/src/sap/m/Select.js +1 -1
  191. package/src/sap/m/SelectDialog.js +1 -1
  192. package/src/sap/m/SelectDialogBase.js +1 -1
  193. package/src/sap/m/SelectList.js +1 -1
  194. package/src/sap/m/SelectionDetails.js +1 -1
  195. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  196. package/src/sap/m/SelectionDetailsItem.js +1 -1
  197. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  198. package/src/sap/m/Shell.js +1 -1
  199. package/src/sap/m/SimpleFixFlex.js +1 -1
  200. package/src/sap/m/SinglePlanningCalendar.js +1 -1
  201. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  202. package/src/sap/m/SinglePlanningCalendarGrid.js +3 -1
  203. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
  204. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  205. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  206. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  207. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  208. package/src/sap/m/SlideTile.js +84 -15
  209. package/src/sap/m/SlideTileRenderer.js +5 -1
  210. package/src/sap/m/Slider.js +1 -1
  211. package/src/sap/m/SliderTooltip.js +1 -1
  212. package/src/sap/m/SliderTooltipBase.js +1 -1
  213. package/src/sap/m/SliderTooltipContainer.js +1 -1
  214. package/src/sap/m/SplitApp.js +1 -1
  215. package/src/sap/m/SplitButton.js +1 -1
  216. package/src/sap/m/SplitContainer.js +1 -1
  217. package/src/sap/m/StandardDynamicDateOption.js +1 -1
  218. package/src/sap/m/StandardListItem.js +1 -1
  219. package/src/sap/m/StandardTile.js +1 -1
  220. package/src/sap/m/StandardTreeItem.js +1 -1
  221. package/src/sap/m/StepInput.js +3 -9
  222. package/src/sap/m/SuggestionItem.js +1 -1
  223. package/src/sap/m/SuggestionsPopover.js +1 -1
  224. package/src/sap/m/Switch.js +1 -1
  225. package/src/sap/m/TabContainer.js +1 -1
  226. package/src/sap/m/TabContainerItem.js +1 -1
  227. package/src/sap/m/TabStrip.js +1 -1
  228. package/src/sap/m/TabStripItem.js +1 -1
  229. package/src/sap/m/Table.js +60 -11
  230. package/src/sap/m/TablePersoController.js +1 -1
  231. package/src/sap/m/TablePersoDialog.js +1 -1
  232. package/src/sap/m/TablePersoProvider.js +1 -1
  233. package/src/sap/m/TableRenderer.js +7 -4
  234. package/src/sap/m/TableSelectDialog.js +1 -1
  235. package/src/sap/m/Text.js +1 -1
  236. package/src/sap/m/TextArea.js +1 -1
  237. package/src/sap/m/Tile.js +1 -1
  238. package/src/sap/m/TileContainer.js +1 -1
  239. package/src/sap/m/TileContent.js +2 -2
  240. package/src/sap/m/TimePicker.js +15 -42
  241. package/src/sap/m/TimePickerClock.js +1 -1
  242. package/src/sap/m/TimePickerClocks.js +1 -1
  243. package/src/sap/m/TimePickerInputs.js +1 -1
  244. package/src/sap/m/TimePickerInternals.js +1 -1
  245. package/src/sap/m/TimePickerSlider.js +1 -1
  246. package/src/sap/m/TimePickerSliders.js +1 -1
  247. package/src/sap/m/Title.js +1 -1
  248. package/src/sap/m/TitlePropagationSupport.js +1 -1
  249. package/src/sap/m/ToDoCardRenderer.js +9 -0
  250. package/src/sap/m/ToggleButton.js +1 -1
  251. package/src/sap/m/Token.js +1 -1
  252. package/src/sap/m/Tokenizer.js +1 -1
  253. package/src/sap/m/Toolbar.js +1 -1
  254. package/src/sap/m/ToolbarLayoutData.js +1 -1
  255. package/src/sap/m/ToolbarSeparator.js +1 -1
  256. package/src/sap/m/ToolbarSpacer.js +1 -1
  257. package/src/sap/m/Tree.js +23 -77
  258. package/src/sap/m/TreeItemBase.js +22 -11
  259. package/src/sap/m/UploadCollection.js +1 -1
  260. package/src/sap/m/UploadCollectionItem.js +1 -1
  261. package/src/sap/m/UploadCollectionParameter.js +1 -1
  262. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  263. package/src/sap/m/VBox.js +1 -1
  264. package/src/sap/m/ValueStateHeader.js +1 -1
  265. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  266. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  267. package/src/sap/m/ViewSettingsDialog.js +11 -7
  268. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  269. package/src/sap/m/ViewSettingsItem.js +1 -1
  270. package/src/sap/m/VisibleItem.js +1 -1
  271. package/src/sap/m/WheelSlider.js +1 -1
  272. package/src/sap/m/WheelSliderContainer.js +1 -1
  273. package/src/sap/m/Wizard.js +1 -1
  274. package/src/sap/m/WizardProgressNavigator.js +1 -1
  275. package/src/sap/m/WizardStep.js +1 -1
  276. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  277. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  278. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  279. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  280. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  281. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  282. package/src/sap/m/delegate/DateNavigation.js +32 -33
  283. package/src/sap/m/library.js +3 -2
  284. package/src/sap/m/messagebundle.properties +61 -13
  285. package/src/sap/m/messagebundle_ar.properties +40 -8
  286. package/src/sap/m/messagebundle_bg.properties +40 -8
  287. package/src/sap/m/messagebundle_ca.properties +40 -8
  288. package/src/sap/m/messagebundle_cs.properties +39 -7
  289. package/src/sap/m/messagebundle_cy.properties +40 -8
  290. package/src/sap/m/messagebundle_da.properties +39 -7
  291. package/src/sap/m/messagebundle_de.properties +41 -9
  292. package/src/sap/m/messagebundle_el.properties +40 -8
  293. package/src/sap/m/messagebundle_en.properties +40 -8
  294. package/src/sap/m/messagebundle_en_GB.properties +40 -8
  295. package/src/sap/m/messagebundle_en_US_sappsd.properties +41 -9
  296. package/src/sap/m/messagebundle_en_US_saprigi.properties +40 -9
  297. package/src/sap/m/messagebundle_en_US_saptrc.properties +41 -9
  298. package/src/sap/m/messagebundle_es.properties +40 -8
  299. package/src/sap/m/messagebundle_es_MX.properties +47 -15
  300. package/src/sap/m/messagebundle_et.properties +39 -7
  301. package/src/sap/m/messagebundle_fi.properties +39 -7
  302. package/src/sap/m/messagebundle_fr.properties +40 -8
  303. package/src/sap/m/messagebundle_fr_CA.properties +41 -9
  304. package/src/sap/m/messagebundle_hi.properties +40 -8
  305. package/src/sap/m/messagebundle_hr.properties +39 -7
  306. package/src/sap/m/messagebundle_hu.properties +39 -7
  307. package/src/sap/m/messagebundle_id.properties +39 -7
  308. package/src/sap/m/messagebundle_it.properties +41 -9
  309. package/src/sap/m/messagebundle_iw.properties +39 -7
  310. package/src/sap/m/messagebundle_ja.properties +39 -7
  311. package/src/sap/m/messagebundle_kk.properties +40 -8
  312. package/src/sap/m/messagebundle_ko.properties +40 -8
  313. package/src/sap/m/messagebundle_lt.properties +39 -7
  314. package/src/sap/m/messagebundle_lv.properties +39 -7
  315. package/src/sap/m/messagebundle_ms.properties +39 -7
  316. package/src/sap/m/messagebundle_nl.properties +40 -8
  317. package/src/sap/m/messagebundle_no.properties +40 -8
  318. package/src/sap/m/messagebundle_pl.properties +39 -7
  319. package/src/sap/m/messagebundle_pt.properties +40 -8
  320. package/src/sap/m/messagebundle_pt_PT.properties +40 -8
  321. package/src/sap/m/messagebundle_ro.properties +40 -8
  322. package/src/sap/m/messagebundle_ru.properties +40 -8
  323. package/src/sap/m/messagebundle_sh.properties +40 -8
  324. package/src/sap/m/messagebundle_sk.properties +39 -7
  325. package/src/sap/m/messagebundle_sl.properties +40 -8
  326. package/src/sap/m/messagebundle_sv.properties +39 -7
  327. package/src/sap/m/messagebundle_th.properties +39 -7
  328. package/src/sap/m/messagebundle_tr.properties +40 -8
  329. package/src/sap/m/messagebundle_uk.properties +40 -8
  330. package/src/sap/m/messagebundle_vi.properties +39 -7
  331. package/src/sap/m/messagebundle_zh_CN.properties +39 -7
  332. package/src/sap/m/messagebundle_zh_TW.properties +39 -7
  333. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  334. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  335. package/src/sap/m/p13n/BasePanel.js +1 -1
  336. package/src/sap/m/p13n/Container.js +1 -1
  337. package/src/sap/m/p13n/Engine.js +1 -1
  338. package/src/sap/m/p13n/GroupController.js +1 -1
  339. package/src/sap/m/p13n/GroupPanel.js +1 -1
  340. package/src/sap/m/p13n/Popup.js +1 -1
  341. package/src/sap/m/p13n/QueryPanel.js +2 -2
  342. package/src/sap/m/p13n/SelectionController.js +1 -1
  343. package/src/sap/m/p13n/SelectionPanel.js +1 -1
  344. package/src/sap/m/p13n/SortController.js +1 -1
  345. package/src/sap/m/p13n/SortPanel.js +1 -1
  346. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
  347. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  348. package/src/sap/m/p13n/modules/UIManager.js +1 -1
  349. package/src/sap/m/plugins/CellSelector.js +1 -1
  350. package/src/sap/m/plugins/ColumnResizer.js +1 -1
  351. package/src/sap/m/plugins/DataStateIndicator.js +1 -1
  352. package/src/sap/m/plugins/PasteProvider.js +1 -1
  353. package/src/sap/m/plugins/PluginBase.js +1 -1
  354. package/src/sap/m/semantic/AddAction.js +1 -1
  355. package/src/sap/m/semantic/CancelAction.js +1 -1
  356. package/src/sap/m/semantic/DeleteAction.js +1 -1
  357. package/src/sap/m/semantic/DetailPage.js +1 -1
  358. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  359. package/src/sap/m/semantic/EditAction.js +1 -1
  360. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  361. package/src/sap/m/semantic/FilterAction.js +1 -1
  362. package/src/sap/m/semantic/FilterSelect.js +1 -1
  363. package/src/sap/m/semantic/FlagAction.js +1 -1
  364. package/src/sap/m/semantic/ForwardAction.js +1 -1
  365. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  366. package/src/sap/m/semantic/GroupAction.js +1 -1
  367. package/src/sap/m/semantic/GroupSelect.js +1 -1
  368. package/src/sap/m/semantic/MainAction.js +1 -1
  369. package/src/sap/m/semantic/MasterPage.js +1 -1
  370. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  371. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  372. package/src/sap/m/semantic/NegativeAction.js +1 -1
  373. package/src/sap/m/semantic/OpenInAction.js +1 -1
  374. package/src/sap/m/semantic/PositiveAction.js +1 -1
  375. package/src/sap/m/semantic/PrintAction.js +1 -1
  376. package/src/sap/m/semantic/SaveAction.js +1 -1
  377. package/src/sap/m/semantic/Segment.js +1 -1
  378. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  379. package/src/sap/m/semantic/SemanticButton.js +1 -1
  380. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  381. package/src/sap/m/semantic/SemanticControl.js +1 -1
  382. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  383. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  384. package/src/sap/m/semantic/SemanticPage.js +2 -2
  385. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  386. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  387. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  388. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  389. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  390. package/src/sap/m/semantic/ShareMenu.js +1 -1
  391. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  392. package/src/sap/m/semantic/SortAction.js +1 -1
  393. package/src/sap/m/semantic/SortSelect.js +1 -1
  394. package/src/sap/m/table/Util.js +1 -1
  395. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  396. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  397. package/src/sap/m/table/columnmenu/Item.js +1 -1
  398. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  399. package/src/sap/m/table/columnmenu/Menu.js +27 -8
  400. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  401. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  402. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  403. package/src/sap/m/table/columnmenu/QuickGroup.js +1 -1
  404. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  405. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  406. package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
  407. package/src/sap/m/table/columnmenu/QuickTotal.js +1 -1
  408. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  409. package/src/sap/m/themes/base/ActionTile.less +67 -10
  410. package/src/sap/m/themes/base/AdditionalTextButton.less +38 -0
  411. package/src/sap/m/themes/base/Avatar.less +4 -0
  412. package/src/sap/m/themes/base/Carousel.less +64 -33
  413. package/src/sap/m/themes/base/ColumnMenu.less +4 -4
  414. package/src/sap/m/themes/base/Dialog.less +1 -1
  415. package/src/sap/m/themes/base/GenericTile.less +149 -32
  416. package/src/sap/m/themes/base/IllustratedMessage.less +43 -1
  417. package/src/sap/m/themes/base/Label.less +5 -0
  418. package/src/sap/m/themes/base/MessageBox.less +5 -5
  419. package/src/sap/m/themes/base/Table.less +7 -3
  420. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-AddColumn.svg +26 -0
  421. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-AddPeople.svg +8 -0
  422. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-BalloonSky.svg +6 -0
  423. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-Connection.svg +9 -0
  424. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-EmptyCalendar.svg +36 -0
  425. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-EmptyList.svg +6 -0
  426. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-EmptyPlanningCalendar.svg +36 -0
  427. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-ErrorScreen.svg +8 -0
  428. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-FilterTable.svg +7 -0
  429. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-GroupTable.svg +35 -0
  430. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoFilterResults.svg +7 -0
  431. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoMail_v1.svg +9 -0
  432. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoSavedItems_v1.svg +12 -0
  433. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoSearchResults.svg +10 -0
  434. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoTasks_v1.svg +12 -0
  435. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-PageNotFound.svg +6 -0
  436. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-ReloadScreen.svg +8 -0
  437. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SearchEarth.svg +6 -0
  438. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SearchFolder.svg +10 -0
  439. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleBalloon.svg +6 -0
  440. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleBell.svg +7 -0
  441. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleCalendar.svg +36 -0
  442. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleCheckmark.svg +4 -0
  443. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleConnection.svg +9 -0
  444. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleEmptyDoc.svg +7 -0
  445. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleEmptyList.svg +6 -0
  446. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleError.svg +8 -0
  447. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleMagnifier.svg +6 -0
  448. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleMail.svg +9 -0
  449. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleNoSavedItems.svg +12 -0
  450. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleNotFoundMagnifier.svg +10 -0
  451. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleReload.svg +8 -0
  452. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SimpleTask.svg +12 -0
  453. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SleepingBell.svg +7 -0
  454. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SortColumn.svg +28 -0
  455. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SuccessHighFive.svg +6 -0
  456. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SuccessScreen.svg +4 -0
  457. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-Tent.svg +7 -0
  458. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-UnableToLoadImage.svg +8 -0
  459. package/src/sap/m/themes/base/library.source.less +2 -1
  460. package/src/sap/m/upload/UploadSet.js +15 -4
  461. package/src/sap/m/upload/UploadSetItem.js +5 -3
  462. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
@@ -4,7 +4,6 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- /*global HTMLImageElement*/
8
7
  // Provides control sap.m.Carousel.
9
8
  sap.ui.define([
10
9
  "./library",
@@ -18,11 +17,11 @@ sap.ui.define([
18
17
  "./CarouselRenderer",
19
18
  "sap/ui/events/KeyCodes",
20
19
  "sap/base/Log",
21
- "sap/ui/events/F6Navigation",
22
20
  "sap/ui/thirdparty/jquery",
23
21
  "sap/ui/thirdparty/mobify-carousel",
24
22
  "sap/ui/core/IconPool",
25
- "./CarouselLayout"
23
+ "./CarouselLayout",
24
+ "sap/ui/dom/jquery/Selectors" // provides jQuery custom selector ":sapTabbable"
26
25
  ], function (
27
26
  library,
28
27
  Core,
@@ -35,7 +34,6 @@ sap.ui.define([
35
34
  CarouselRenderer,
36
35
  KeyCodes,
37
36
  Log,
38
- F6Navigation,
39
37
  jQuery
40
38
  /*, mobifycarousel, IconPool (indirect dependency, kept for compatibility with tests, to be fixed in ImageHelper) */
41
39
  ) {
@@ -100,7 +98,7 @@ sap.ui.define([
100
98
  * @extends sap.ui.core.Control
101
99
  *
102
100
  * @author SAP SE
103
- * @version 1.107.1
101
+ * @version 1.108.1
104
102
  *
105
103
  * @constructor
106
104
  * @public
@@ -217,7 +215,7 @@ sap.ui.define([
217
215
  /**
218
216
  * This event is fired after a carousel swipe has been completed.
219
217
  * It is triggered both by physical swipe events and through API carousel manipulations such as calling
220
- * 'next', 'previous' or 'setActivePageId' functions.
218
+ * 'next', 'previous' or 'setActivePage' functions.
221
219
  */
222
220
  pageChanged : {
223
221
  parameters : {
@@ -243,7 +241,7 @@ sap.ui.define([
243
241
  /**
244
242
  * This event is fired before a carousel swipe has been completed.
245
243
  * It is triggered both by physical swipe events and through API carousel manipulations such as calling
246
- * 'next', 'previous' or 'setActivePageId' functions.
244
+ * 'next', 'previous' or 'setActivePage' functions.
247
245
  */
248
246
  beforePageChanged : {
249
247
  parameters : {
@@ -269,11 +267,9 @@ sap.ui.define([
269
267
  Carousel._ITEM_SELECTOR = ".sapMCrslItem";
270
268
  Carousel._LEFTMOST_CLASS = "sapMCrslLeftmost";
271
269
  Carousel._RIGHTMOST_CLASS = "sapMCrslRightmost";
272
- Carousel._LATERAL_CLASSES = "sapMCrslLeftmost sapMCrslRightmost";
273
270
  Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING = 10; // The number 10 is by keyboard specification
274
271
  Carousel._BULLETS_TO_NUMBERS_THRESHOLD = 9; //The number 9 is by visual specification. Less than 9 pages - bullets for page indicator. 9 or more pages - numeric page indicator.
275
- Carousel._PREVIOUS_CLASS_ARROW = "sapMCrslPrev";
276
- Carousel._NEXT_CLASS_ARROW = "sapMCrslNext";
272
+
277
273
  /**
278
274
  * Initialize member variables which are needed later on.
279
275
  *
@@ -291,7 +287,6 @@ sap.ui.define([
291
287
  }
292
288
  }.bind(this);
293
289
 
294
- this._aOrderOfFocusedElements = [];
295
290
  this._aAllActivePages = [];
296
291
  this._aAllActivePagesIndexes = [];
297
292
 
@@ -331,65 +326,20 @@ sap.ui.define([
331
326
 
332
327
  this._fnAdjustAfterResize = null;
333
328
  this._$InnerDiv = null;
334
- this._aOrderOfFocusedElements = null;
335
329
  this._aAllActivePages = null;
336
330
  this._aAllActivePagesIndexes = null;
337
331
  };
338
332
 
339
- /**
340
- * Delegates 'touchstart' event to mobify carousel
341
- *
342
- * @param oEvent
343
- */
344
- Carousel.prototype.ontouchstart = function(oEvent) {
345
- if (this._oMobifyCarousel) {
346
- if (oEvent.target instanceof HTMLImageElement) {
347
- // When swiped, image elements begin dragging as ghost images (eg. dragstart event).
348
- // This dragging behaviour is not desired when inside a Carousel, so we prevent it.
349
- oEvent.preventDefault();
350
- }
351
- this._oMobifyCarousel.touchstart(oEvent);
352
- }
353
- };
354
-
355
- /**
356
- * Delegates 'touchmove' event to mobify carousel
357
- *
358
- * @param oEvent
359
- */
360
- Carousel.prototype.ontouchmove = function(oEvent) {
361
- if (this._oMobifyCarousel) {
362
- this._oMobifyCarousel.touchmove(oEvent);
363
- }
364
- };
365
-
366
- /**
367
- * Delegates 'touchend' event to mobify carousel
368
- *
369
- * @param oEvent
370
- */
371
- Carousel.prototype.ontouchend = function(oEvent) {
372
- if (this._oMobifyCarousel) {
373
-
374
- if (this._oMobifyCarousel.hasActiveTransition()) {
375
- this._oMobifyCarousel.onTransitionComplete();
376
- }
377
- this._oMobifyCarousel.touchend(oEvent);
333
+ Carousel.prototype.onBeforeRendering = function() {
334
+ if (!this.getActivePage() && this.getPages().length > 0) {
335
+ //if no active page is specified, set first page.
336
+ this.setAssociation("activePage", this.getPages()[0].getId(), true);
378
337
  }
379
- };
380
338
 
381
- /**
382
- * Cleans up bindings
383
- *
384
- * @private
385
- */
386
- Carousel.prototype.onBeforeRendering = function() {
387
- //make sure, active page has an initial value
388
339
  var sActivePage = this.getActivePage();
389
340
 
390
- if (!sActivePage && this.getPages().length > 0) {
391
- //if no active page is specified, set first page.
392
- this.setAssociation("activePage", this.getPages()[0].getId(), true);
341
+ if (sActivePage) {
342
+ this._updateActivePages(sActivePage);
393
343
  }
394
344
 
395
345
  if (this._sResizeListenerId) {
@@ -463,19 +413,17 @@ sap.ui.define([
463
413
  //removing pages
464
414
  var sActivePage = this.getActivePage();
465
415
  if (sActivePage) {
466
- this._updateActivePages(sActivePage);
467
- var iIndex = this._getPageNumber(sActivePage);
416
+ var iIndex = this._getPageIndex(sActivePage);
468
417
  if (isNaN(iIndex) || iIndex == 0) {
469
418
  if (this.getPages().length > 0) {
470
419
  //First page is always shown as default
471
420
  //Do not fire page changed event, though
472
421
  this.setAssociation("activePage", this.getPages()[0].getId(), true);
473
- this._adjustHUDVisibility(1);
422
+ this._adjustHUDVisibility();
474
423
  }
475
424
  } else {
476
425
  if (Core.isThemeApplied()) {
477
- // mobify carousel is 1-based
478
- this._moveToPage(iIndex + 1);
426
+ this._moveToPage(iIndex, iIndex + 1, false);
479
427
  } else {
480
428
  Core.attachThemeChanged(this._handleThemeLoad, this);
481
429
  }
@@ -511,8 +459,7 @@ sap.ui.define([
511
459
  oParent.attachExpand(function (oEvt) {
512
460
  var bExpand = oEvt.getParameter('expand');
513
461
  if (bExpand && iIndex > 0) {
514
- // mobify carousel is 1-based
515
- that._moveToPage(iIndex + 1);
462
+ that._moveToPage(iIndex, iIndex + 1, false);
516
463
  }
517
464
  });
518
465
  break;
@@ -522,12 +469,16 @@ sap.ui.define([
522
469
  }
523
470
  };
524
471
 
472
+ Carousel.prototype.getFocusDomRef = function () {
473
+ return this.getDomRef(this.getActivePage() + "-slide") || this.getDomRef("noData");
474
+ };
475
+
525
476
  /**
526
477
  * Calls logic for updating active pages and fires 'beforePageChanged' event with the new active pages.
527
478
  *
528
479
  * @param {object} oEvent event object
529
- * @param {int} iPreviousSlide index of the previous active page
530
- * @param {int} iNextSlide index of the next active page
480
+ * @param {int} iPreviousSlide mobify carousel index of the previous active slide (1-based)
481
+ * @param {int} iNextSlide mobify carousel index of the next active slide (1-based)
531
482
  * @private
532
483
  */
533
484
  Carousel.prototype._onBeforePageChanged = function (oEvent, iPreviousSlide, iNextSlide) {
@@ -546,11 +497,9 @@ sap.ui.define([
546
497
  };
547
498
 
548
499
  /**
549
- * Sets the width of the visible pages, rendered in the <code>Carousel</code> control.
550
- *
551
500
  * @param {object} oEvent event object
552
- * @param {int} iPreviousSlide index of the previous active page
553
- * @param {int} iNextSlide index of the next active page
501
+ * @param {int} iPreviousSlide mobify carousel index of the previous active slide (1-based)
502
+ * @param {int} iNextSlide mobify carousel index of the next active slide (1-based)
554
503
  * @private
555
504
  */
556
505
  Carousel.prototype._onAfterPageChanged = function (oEvent, iPreviousSlide, iNextSlide) {
@@ -562,9 +511,41 @@ sap.ui.define([
562
511
  return;
563
512
  }
564
513
 
565
- if (bHasPages && iNextSlide > 0) {
566
- this._changePage(iPreviousSlide, iNextSlide);
514
+ if (!bHasPages) {
515
+ return;
516
+ }
517
+
518
+ var iNewActivePageIndex;
519
+
520
+ if (this._iNewActivePageIndex !== undefined) {
521
+ iNewActivePageIndex = this._iNewActivePageIndex;
522
+ } else if (this._bPageIndicatorArrowPress || this._bSwipe) {
523
+ var bForward = iPreviousSlide < iNextSlide;
524
+ var iOldActivePageIndex = this._getPageIndex(this.getActivePage());
525
+
526
+ if (this._isPageDisplayed(iOldActivePageIndex)) {
527
+ iNewActivePageIndex = iOldActivePageIndex;
528
+ } else {
529
+ if (bForward) {
530
+ iNewActivePageIndex = iOldActivePageIndex + 1;
531
+ } else {
532
+ iNewActivePageIndex = iOldActivePageIndex - 1;
533
+ }
534
+
535
+ // loop happened
536
+ if (!this._isPageDisplayed(iNewActivePageIndex)) {
537
+ iNewActivePageIndex = iNextSlide - 1;
538
+ }
539
+ }
540
+ } else {
541
+ iNewActivePageIndex = iNextSlide - 1;
567
542
  }
543
+
544
+ this._changeActivePage(iNewActivePageIndex);
545
+
546
+ delete this._iNewActivePageIndex;
547
+ delete this._bPageIndicatorArrowPress;
548
+ delete this._bSwipe;
568
549
  };
569
550
 
570
551
  /**
@@ -616,10 +597,9 @@ sap.ui.define([
616
597
  var sActivePage = this.getActivePage();
617
598
 
618
599
  if (sActivePage) {
619
- var iIndex = this._getPageNumber(sActivePage);
600
+ var iIndex = this._getPageIndex(sActivePage);
620
601
  if (iIndex > 0) {
621
- // mobify carousel is 1-based
622
- this._moveToPage(iIndex + 1);
602
+ this._moveToPage(iIndex, iIndex + 1, false);
623
603
  }
624
604
  }
625
605
 
@@ -627,41 +607,41 @@ sap.ui.define([
627
607
  };
628
608
 
629
609
  /**
630
- * Moves carousel and mobify carousel to specific page
610
+ * Moves mobify carousel to specific page and changes the active page after the move has been completed.
611
+ * Each mobify carousel page can hold multiple carousel pages.
631
612
  *
613
+ * @param {int} iIndex index of the new active page in 'pages' aggregation.
614
+ * @param {int} iMobifyIndex index of mobify carousel page to display (1-based).
615
+ * @param {boolean} bTransition Whether to perform smooth move, using transition, or to (almost) immediately change page
632
616
  * @private
633
617
  */
634
- Carousel.prototype._moveToPage = function(iIndex) {
635
- this._oMobifyCarousel.changeAnimation('sapMCrslNoTransition');
636
- this._oMobifyCarousel.move(iIndex);
637
- this._changePage(undefined, iIndex);
618
+ Carousel.prototype._moveToPage = function(iIndex, iMobifyIndex, bTransition) {
619
+ if (!bTransition) {
620
+ this._oMobifyCarousel.changeAnimation("sapMCrslNoTransition");
621
+ }
622
+
623
+ this._iNewActivePageIndex = iIndex;
624
+ this._oMobifyCarousel.move(iMobifyIndex);
638
625
  };
639
626
 
640
627
  /**
641
628
  * Private method which adjusts the Hud visibility and fires a page change
642
629
  * event when the active page changes
643
630
  *
644
- * @param {int} [iOldPageIndex] Optional index of the old page. If not specified, the current active page index will be taken.
645
631
  * @param {int} iNewPageIndex index of new page in 'pages' aggregation.
646
632
  * @private
647
633
  */
648
- Carousel.prototype._changePage = function(iOldPageIndex, iNewPageIndex) {
649
- this._adjustHUDVisibility(iNewPageIndex);
634
+ Carousel.prototype._changeActivePage = function(iNewPageIndex) {
650
635
  var sOldActivePageId = this.getActivePage();
651
636
 
652
- // If setActivePage is called through API, getActivePage will return the wrong page.
653
- // In this case iOldPageIndex must be passed.
654
- if (iOldPageIndex) {
655
- sOldActivePageId = this.getPages()[iOldPageIndex - 1].getId();
637
+ if (this._sOldActivePageId) {
638
+ sOldActivePageId = this._sOldActivePageId;
639
+ delete this._sOldActivePageId;
656
640
  }
657
641
 
658
- var sNewActivePageId = this.getPages()[iNewPageIndex - 1].getId();
642
+ var sNewActivePageId = this.getPages()[iNewPageIndex].getId();
659
643
 
660
644
  this.setAssociation("activePage", sNewActivePageId, true);
661
- var sTextBetweenNumbers = this._getPageIndicatorText(iNewPageIndex);
662
-
663
- Log.debug("sap.m.Carousel: firing pageChanged event: old page: " + sOldActivePageId
664
- + ", new page: " + sNewActivePageId);
665
645
 
666
646
  // close the soft keyboard
667
647
  if (!Device.system.desktop) {
@@ -669,6 +649,7 @@ sap.ui.define([
669
649
  }
670
650
 
671
651
  if (this._oMobifyCarousel && this._oMobifyCarousel.getShouldFireEvent()) {
652
+ Log.debug("sap.m.Carousel: firing pageChanged event: old page: " + sOldActivePageId + ", new page: " + sNewActivePageId);
672
653
  this.firePageChanged({
673
654
  oldActivePageId: sOldActivePageId,
674
655
  newActivePageId: sNewActivePageId,
@@ -676,17 +657,35 @@ sap.ui.define([
676
657
  });
677
658
  }
678
659
 
679
- this._oMobifyCarousel.$items.each(function (iIndex, oPage) {
680
- oPage.className.indexOf('sapMCrslActive') <= -1 ? oPage.setAttribute('aria-selected', false) : oPage.setAttribute('aria-selected', true);
681
- });
660
+ this._adjustHUDVisibility();
661
+ this._updateItemsAttributes();
662
+ this._updatePageIndicator();
663
+
664
+ // focus the new page if the focus was in the carousel and is not on some of the page children
665
+ if (this.getDomRef().contains(document.activeElement) && !this.getFocusDomRef().contains(document.activeElement) || this._bPageIndicatorArrowPress) {
666
+ this.getFocusDomRef().focus({ preventScroll: true });
667
+ }
668
+ };
669
+
670
+ Carousel.prototype._updateItemsAttributes = function () {
671
+ this.$().find(Carousel._ITEM_SELECTOR).each(function (iIndex, oPage) {
672
+ var bIsActivePage = oPage === this.getFocusDomRef();
673
+
674
+ oPage.setAttribute("aria-selected", bIsActivePage);
675
+ oPage.setAttribute("aria-hidden", !this._isPageDisplayed(iIndex));
676
+ oPage.setAttribute("tabindex", bIsActivePage ? 0 : -1);
677
+ }.bind(this));
678
+ };
679
+
680
+ Carousel.prototype._updatePageIndicator = function () {
682
681
  // change the number in the page indicator
683
- this.$('slide-number').text(sTextBetweenNumbers);
682
+ this.$("slide-number").text(this._getPageIndicatorText(this._oMobifyCarousel._index));
684
683
  };
685
684
 
686
685
  /**
687
686
  * Returns page indicator text.
688
687
  *
689
- * @param {int} iNewPageIndex index of new page in 'pages' aggregation.
688
+ * @param {int} iNewPageIndex mobify carousel index of the active slide (1-based)
690
689
  * @returns {string} page indicator text
691
690
  * @private
692
691
  */
@@ -697,54 +696,28 @@ sap.ui.define([
697
696
  /**
698
697
  * Sets HUD control's visibility after page has changed
699
698
  *
700
- * @param {int} iNextSlide index of the next active page
701
699
  * @private
702
- *
703
700
  */
704
- Carousel.prototype._adjustHUDVisibility = function(iNextSlide) {
705
- var iNumberOfItemsSShown = this._getNumberOfItemsToShow();
706
-
707
- if (Device.system.desktop && !this.getLoop() && this.getPages().length > 1) {
708
- //update HUD arrow visibility for left- and
709
- //rightmost pages
701
+ Carousel.prototype._adjustHUDVisibility = function() {
702
+ if (Device.system.desktop && !this._loops() && this.getPages().length > 1) {
703
+ //update HUD arrow visibility for left- and rightmost pages
710
704
  var $HUDContainer = this.$('hud');
705
+ var iFirstDisplayedPageIndex = this._aAllActivePagesIndexes[0];
706
+ var iLastDisplayedPageIndex = this._aAllActivePagesIndexes[this._aAllActivePagesIndexes.length - 1];
711
707
 
712
708
  //clear marker classes first
713
- $HUDContainer.removeClass(Carousel._LATERAL_CLASSES);
709
+ $HUDContainer.removeClass(Carousel._LEFTMOST_CLASS).removeClass(Carousel._RIGHTMOST_CLASS);
714
710
 
715
- if (iNextSlide === 1) {
711
+ if (iFirstDisplayedPageIndex === 0) {
716
712
  $HUDContainer.addClass(Carousel._LEFTMOST_CLASS);
717
- this._focusCarouselContainer($HUDContainer, Carousel._PREVIOUS_CLASS_ARROW);
718
713
  }
719
714
 
720
- if ((iNextSlide + iNumberOfItemsSShown - 1) === this.getPages().length) {
715
+ if (iLastDisplayedPageIndex === this.getPages().length - 1) {
721
716
  $HUDContainer.addClass(Carousel._RIGHTMOST_CLASS);
722
- this._focusCarouselContainer($HUDContainer, Carousel._NEXT_CLASS_ARROW);
723
717
  }
724
718
  }
725
719
  };
726
720
 
727
- /*
728
- * Focus Carousel container.
729
- * Focus is moved to carousel container if clicked arrow is first or last from carousel
730
- * @param {object} $HUDContainer Arrow container inside Carousel
731
- * @param {string} sArrowClassName Arrow class name
732
- * @private
733
- *
734
- */
735
- Carousel.prototype._focusCarouselContainer = function($HUDContainer, sArrowClassName) {
736
- if ($HUDContainer.find('.' + sArrowClassName)[0] === document.activeElement) {
737
- this.focus();
738
- }
739
- };
740
-
741
- /*
742
- * API method to set carousel's active page during runtime.
743
- *
744
- * @param vPage Id of the page or page which shall become active
745
- * @override
746
- *
747
- */
748
721
  Carousel.prototype.setActivePage = function (vPage) {
749
722
  var sPageId = null;
750
723
  if (typeof (vPage) == 'string') {
@@ -758,18 +731,24 @@ sap.ui.define([
758
731
  //page has not changed, nothing to do, return
759
732
  return this;
760
733
  }
761
- var iPageNr = this._getPageNumber(sPageId);
734
+ var iPageNr = this._getPageIndex(sPageId);
762
735
 
763
736
  if (!isNaN(iPageNr)) {
764
737
  if (this._oMobifyCarousel) {
765
- //mobify carousel's move function is '1' based
738
+ this._sOldActivePageId = this.getActivePage();
766
739
  this._oMobifyCarousel.setShouldFireEvent(true);
767
- this._oMobifyCarousel.move(iPageNr + 1);
740
+
741
+ if (this._isPageDisplayed(iPageNr)) {
742
+ this._changeActivePage(iPageNr);
743
+ } else {
744
+ this._moveToPage(iPageNr, iPageNr + 1, true);
745
+ }
768
746
  }
769
747
  // if oMobifyCarousel is not present yet, move takes place
770
748
  // 'onAfterRendering', when oMobifyCarousel is created
771
749
  }
772
750
  }
751
+
773
752
  this.setAssociation("activePage", sPageId, true);
774
753
 
775
754
  return this;
@@ -779,7 +758,7 @@ sap.ui.define([
779
758
  * Returns the icon of the requested direction (left/right).
780
759
  * @private
781
760
  * @param {string} sDirection Left or Right
782
- * @returns icon of the requested arrow
761
+ * @returns {sap.ui.core.Control} icon of the requested arrow
783
762
  */
784
763
  Carousel.prototype._getNavigationArrow = function (sDirection) {
785
764
  if (!this["_oArrow" + sDirection]) {
@@ -812,9 +791,9 @@ sap.ui.define([
812
791
  };
813
792
 
814
793
  /**
815
- * Call this method to display the previous page (corresponds to a swipe left). Returns 'this' for method chaining.
794
+ * Call this method to display the previous page (corresponds to a swipe left).
816
795
  *
817
- * @type this
796
+ * @returns {this} Reference to <code>this</code> in order to allow method chaining
818
797
  * @public
819
798
  */
820
799
  Carousel.prototype.previous = function () {
@@ -828,9 +807,9 @@ sap.ui.define([
828
807
  };
829
808
 
830
809
  /**
831
- * Call this method to display the next page (corresponds to a swipe right). Returns 'this' for method chaining.
810
+ * Call this method to display the next page (corresponds to a swipe right).
832
811
  *
833
- * @type this
812
+ * @returns {this} Reference to <code>this</code> in order to allow method chaining
834
813
  * @public
835
814
  */
836
815
  Carousel.prototype.next = function () {
@@ -849,7 +828,7 @@ sap.ui.define([
849
828
  * @return the position of a given page in the carousel's page list or 'undefined' if it does not exist in the list.
850
829
  * @private
851
830
  */
852
- Carousel.prototype._getPageNumber = function(sPageId) {
831
+ Carousel.prototype._getPageIndex = function(sPageId) {
853
832
  var i, result;
854
833
 
855
834
  for (i = 0; i < this.getPages().length; i++) {
@@ -861,6 +840,68 @@ sap.ui.define([
861
840
  return result;
862
841
  };
863
842
 
843
+ Carousel.prototype.onswipe = function() {
844
+ this._bSwipe = true;
845
+ };
846
+
847
+ /**
848
+ * Delegates 'touchstart' event to mobify carousel
849
+ *
850
+ * @param oEvent
851
+ */
852
+ Carousel.prototype.ontouchstart = function(oEvent) {
853
+ if (!this.getPages().length) {
854
+ return;
855
+ }
856
+
857
+ if (this._isPageIndicatorArrow(oEvent.target)) {
858
+ // prevent upcoming focusin event on the arrow and focusout on the active page
859
+ oEvent.preventDefault();
860
+ this._bPageIndicatorArrowPress = true;
861
+ return;
862
+ }
863
+
864
+ if (this._oMobifyCarousel) {
865
+ if (oEvent.target.draggable) {
866
+ // Some elements like images are draggable by default.
867
+ // When swiped they begin dragging as ghost images (eg. dragstart event).
868
+ // This dragging behavior is not desired when inside a Carousel, so we disable it.
869
+ // Note that preventDefault() prevents next events to happen (in particular focusin), so disable the dragging via property
870
+ oEvent.target.draggable = false;
871
+ }
872
+
873
+ this._oMobifyCarousel.touchstart(oEvent);
874
+ }
875
+ };
876
+
877
+ /**
878
+ * Delegates 'touchmove' event to mobify carousel
879
+ *
880
+ * @param oEvent
881
+ */
882
+ Carousel.prototype.ontouchmove = function(oEvent) {
883
+ if (this._oMobifyCarousel && !this._isPageIndicatorArrow(oEvent.target)) {
884
+ this._oMobifyCarousel.touchmove(oEvent);
885
+ }
886
+ };
887
+
888
+ /**
889
+ * Delegates 'touchend' event to mobify carousel
890
+ *
891
+ * @param oEvent
892
+ */
893
+ Carousel.prototype.ontouchend = function(oEvent) {
894
+ if (this._oMobifyCarousel) {
895
+ if (this._oMobifyCarousel.hasActiveTransition()) {
896
+ this._oMobifyCarousel.onTransitionComplete();
897
+ }
898
+
899
+ if (!this._isPageIndicatorArrow(oEvent.target)) {
900
+ this._oMobifyCarousel.touchend(oEvent);
901
+ }
902
+ }
903
+ };
904
+
864
905
  //================================================================================
865
906
  // Keyboard handling
866
907
  //================================================================================
@@ -874,7 +915,10 @@ sap.ui.define([
874
915
  */
875
916
  Carousel.prototype.onsaptabprevious = function(oEvent) {
876
917
  this._bDirection = false;
877
- this._fnOnTabPress(oEvent);
918
+
919
+ if (this._isSlide(oEvent.target) || oEvent.target === this.getDomRef("noData")) {
920
+ this._forwardTab(false);
921
+ }
878
922
  };
879
923
 
880
924
  /**
@@ -886,7 +930,37 @@ sap.ui.define([
886
930
  */
887
931
  Carousel.prototype.onsaptabnext = function(oEvent) {
888
932
  this._bDirection = true;
889
- this._fnOnTabPress(oEvent);
933
+
934
+ var $activePageTabbables = this._getActivePageTabbables();
935
+
936
+ if (!$activePageTabbables.length || oEvent.target === $activePageTabbables.get(-1)) {
937
+ this._forwardTab(true);
938
+ }
939
+ };
940
+
941
+ Carousel.prototype._forwardTab = function (bForward) {
942
+ this.getDomRef(bForward ? "after" : "before").focus();
943
+ };
944
+
945
+ Carousel.prototype._getActivePageTabbables = function () {
946
+ return this.$(this.getActivePage() + "-slide").find(":sapTabbable");
947
+ };
948
+
949
+ /**
950
+ * Focus the last interactive element inside the active page, or the page itself
951
+ * @param {jQuery.Event} oEvent the event
952
+ */
953
+ Carousel.prototype._focusPrevious = function(oEvent) {
954
+ var oActivePageDomRef = this.getFocusDomRef();
955
+
956
+ if (!oActivePageDomRef) {
957
+ return;
958
+ }
959
+
960
+ var $activePage = jQuery(oActivePageDomRef);
961
+ var $activePageTabbables = this._getActivePageTabbables();
962
+
963
+ $activePage.add($activePageTabbables).eq(-1).trigger("focus");
890
964
  };
891
965
 
892
966
  /**
@@ -895,30 +969,55 @@ sap.ui.define([
895
969
  * @param {Object} oEvent - The event object
896
970
  */
897
971
  Carousel.prototype.onfocusin = function(oEvent) {
972
+ if (oEvent.target === this.getDomRef("before") && !this.getDomRef().contains(oEvent.relatedTarget)) {
973
+ this.getFocusDomRef().focus();
974
+ return;
975
+ }
976
+
977
+ if (oEvent.target === this.getDomRef("after") && !this.getDomRef().contains(oEvent.relatedTarget)) {
978
+ this._focusPrevious(oEvent);
979
+ return;
980
+ }
981
+
982
+ if (this._isSlide(oEvent.target)) {
983
+ this.addStyleClass("sapMCrslShowArrows");
984
+ }
985
+
986
+ this._handlePageElemFocus(oEvent.target);
987
+
898
988
  // Save focus reference
899
989
  this.saveLastFocusReference(oEvent);
900
990
  // Reset the reference for future use
901
991
  this._bDirection = undefined;
902
992
  };
903
993
 
904
- /**
905
- * Handler for F6
906
- *
907
- * @param {Object} oEvent - The event object
908
- */
909
- Carousel.prototype.onsapskipforward = function(oEvent) {
910
- oEvent.preventDefault();
911
- this._handleGroupNavigation(oEvent, false);
994
+ Carousel.prototype.onfocusout = function(oEvent) {
995
+ if (this._isSlide(oEvent.target)) {
996
+ this.removeStyleClass("sapMCrslShowArrows");
997
+ }
912
998
  };
913
999
 
914
1000
  /**
915
- * Handler for Shift + F6
916
- *
917
- * @param {Object} oEvent - The event object
1001
+ * When any element is focused with mouse set its containing page as active page
1002
+ * @param {HTMLElement} oFocusedElement The focused element
918
1003
  */
919
- Carousel.prototype.onsapskipback = function(oEvent) {
920
- oEvent.preventDefault();
921
- this._handleGroupNavigation(oEvent, true);
1004
+ Carousel.prototype._handlePageElemFocus = function(oFocusedElement) {
1005
+ var oPage;
1006
+
1007
+ if (this._isSlide(oFocusedElement)) {
1008
+ oPage = jQuery(oFocusedElement).find(".sapMCrsPage").control(0);
1009
+ } else {
1010
+ oPage = this._getClosestPage(oFocusedElement);
1011
+ }
1012
+
1013
+ if (oPage) {
1014
+ var sPageId = oPage.getId();
1015
+
1016
+ if (sPageId !== this.getActivePage()) {
1017
+ this._oMobifyCarousel.setShouldFireEvent(true);
1018
+ this._changeActivePage(this._getPageIndex(sPageId));
1019
+ }
1020
+ }
922
1021
  };
923
1022
 
924
1023
  /**
@@ -933,8 +1032,7 @@ sap.ui.define([
933
1032
  return;
934
1033
  }
935
1034
 
936
- // Exit the function if the event is not from the Carousel
937
- if (oEvent.target != this.getDomRef()) {
1035
+ if (!this._isSlide(oEvent.target)) {
938
1036
  return;
939
1037
  }
940
1038
 
@@ -944,34 +1042,17 @@ sap.ui.define([
944
1042
  // TODO KeyCodes.MINUS is not returning 189
945
1043
  case 189:
946
1044
  case KeyCodes.NUMPAD_MINUS:
947
- this._fnSkipToIndex(oEvent, -1);
1045
+ this._fnSkipToIndex(oEvent, -1, false);
948
1046
  break;
949
1047
 
950
1048
  // Plus keys
951
1049
  case KeyCodes.PLUS:
952
1050
  case KeyCodes.NUMPAD_PLUS:
953
- this._fnSkipToIndex(oEvent, 1);
1051
+ this._fnSkipToIndex(oEvent, 1, false);
954
1052
  break;
955
1053
  }
956
1054
  };
957
1055
 
958
- /**
959
- * Set carousel back to the first position it had.
960
- *
961
- * @param {Object} oEvent - key event
962
- * @private
963
- */
964
- Carousel.prototype.onsapescape = function(oEvent) {
965
- var lastActivePageNumber;
966
-
967
- if (oEvent.target === this.$()[0] && this._lastActivePageNumber) {
968
- lastActivePageNumber = this._lastActivePageNumber + 1;
969
-
970
- this._oMobifyCarousel.move(lastActivePageNumber);
971
- this._changePage(undefined, lastActivePageNumber);
972
- }
973
- };
974
-
975
1056
  /**
976
1057
  * Move focus to the next item. If focus is on the last item, do nothing.
977
1058
  *
@@ -979,17 +1060,17 @@ sap.ui.define([
979
1060
  * @private
980
1061
  */
981
1062
  Carousel.prototype.onsapright = function(oEvent) {
982
- this._fnSkipToIndex(oEvent, 1);
1063
+ this._fnSkipToIndex(oEvent, 1, false);
983
1064
  };
984
1065
 
985
1066
  /**
986
- * Move focus to the previous item. If focus is on the first item, do nothing.
1067
+ * Move focus to the next item. If focus is on the last item, do nothing.
987
1068
  *
988
1069
  * @param {Object} oEvent - key event
989
1070
  * @private
990
1071
  */
991
1072
  Carousel.prototype.onsapup = function(oEvent) {
992
- this._fnSkipToIndex(oEvent, -1);
1073
+ this._fnSkipToIndex(oEvent, 1, false);
993
1074
  };
994
1075
 
995
1076
  /**
@@ -999,7 +1080,7 @@ sap.ui.define([
999
1080
  * @private
1000
1081
  */
1001
1082
  Carousel.prototype.onsapleft = function(oEvent) {
1002
- this._fnSkipToIndex(oEvent, -1);
1083
+ this._fnSkipToIndex(oEvent, -1, false);
1003
1084
  };
1004
1085
 
1005
1086
  /**
@@ -1010,7 +1091,7 @@ sap.ui.define([
1010
1091
  * @private
1011
1092
  */
1012
1093
  Carousel.prototype.onsapdown = function(oEvent) {
1013
- this._fnSkipToIndex(oEvent, 1);
1094
+ this._fnSkipToIndex(oEvent, -1, false);
1014
1095
  };
1015
1096
 
1016
1097
  /**
@@ -1020,7 +1101,7 @@ sap.ui.define([
1020
1101
  * @private
1021
1102
  */
1022
1103
  Carousel.prototype.onsaphome = function(oEvent) {
1023
- this._fnSkipToIndex(oEvent, 0);
1104
+ this._fnSkipToIndex(oEvent, -this._getPageIndex(this.getActivePage()), true);
1024
1105
  };
1025
1106
 
1026
1107
  /**
@@ -1030,7 +1111,7 @@ sap.ui.define([
1030
1111
  * @private
1031
1112
  */
1032
1113
  Carousel.prototype.onsapend = function(oEvent) {
1033
- this._fnSkipToIndex(oEvent, this.getPages().length);
1114
+ this._fnSkipToIndex(oEvent, this.getPages().length - this._getPageIndex(this.getActivePage()) - 1, true);
1034
1115
  };
1035
1116
 
1036
1117
  /**
@@ -1042,7 +1123,7 @@ sap.ui.define([
1042
1123
  */
1043
1124
  Carousel.prototype.onsaprightmodifiers = function(oEvent) {
1044
1125
  if (oEvent.ctrlKey) {
1045
- this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1126
+ this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1046
1127
  }
1047
1128
  };
1048
1129
 
@@ -1055,7 +1136,7 @@ sap.ui.define([
1055
1136
  */
1056
1137
  Carousel.prototype.onsapupmodifiers = function(oEvent) {
1057
1138
  if (oEvent.ctrlKey) {
1058
- this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1139
+ this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1059
1140
  }
1060
1141
  };
1061
1142
 
@@ -1067,7 +1148,7 @@ sap.ui.define([
1067
1148
  * @private
1068
1149
  */
1069
1150
  Carousel.prototype.onsappageup = function(oEvent) {
1070
- this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1151
+ this._fnSkipToIndex(oEvent, Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1071
1152
  };
1072
1153
 
1073
1154
  /**
@@ -1079,7 +1160,7 @@ sap.ui.define([
1079
1160
  */
1080
1161
  Carousel.prototype.onsapleftmodifiers = function(oEvent) {
1081
1162
  if (oEvent.ctrlKey) {
1082
- this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1163
+ this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1083
1164
  }
1084
1165
  };
1085
1166
 
@@ -1092,7 +1173,7 @@ sap.ui.define([
1092
1173
  */
1093
1174
  Carousel.prototype.onsapdownmodifiers = function(oEvent) {
1094
1175
  if (oEvent.ctrlKey) {
1095
- this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1176
+ this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1096
1177
  }
1097
1178
  };
1098
1179
 
@@ -1104,42 +1185,7 @@ sap.ui.define([
1104
1185
  * @private
1105
1186
  */
1106
1187
  Carousel.prototype.onsappagedown = function(oEvent) {
1107
- this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING);
1108
- };
1109
-
1110
- /**
1111
- * Called on tab or shift+tab key press
1112
- *
1113
- * @param {Object} oEvent - key event
1114
- * @private
1115
- */
1116
- Carousel.prototype._fnOnTabPress = function(oEvent) {
1117
- // Check if the focus is received form the Carousel
1118
- if (oEvent.target === this.$()[0]) {
1119
- // Save reference for [ESC]
1120
- this._lastActivePageNumber = this._getPageNumber(this.getActivePage());
1121
- }
1122
- };
1123
-
1124
- /**
1125
- * Handler for F6 and Shift + F6 group navigation
1126
- *
1127
- * @param {Object} oEvent - The event object
1128
- * @param {boolean} bShiftKey serving as a reference if shift is used
1129
- * @private
1130
- */
1131
- Carousel.prototype._handleGroupNavigation = function(oEvent, bShiftKey) {
1132
- var oEventF6 = jQuery.Event("keydown");
1133
-
1134
- // Prevent the event and focus Carousel control
1135
- oEvent.preventDefault();
1136
- this.$().trigger("focus");
1137
-
1138
- oEventF6.target = oEvent.target;
1139
- oEventF6.key = 'F6';
1140
- oEventF6.shiftKey = bShiftKey;
1141
-
1142
- F6Navigation.handleF6GroupNavigation(oEventF6);
1188
+ this._fnSkipToIndex(oEvent, -Carousel._MODIFIERNUMBERFORKEYBOARDHANDLING, true);
1143
1189
  };
1144
1190
 
1145
1191
  /**
@@ -1149,7 +1195,7 @@ sap.ui.define([
1149
1195
  * @private
1150
1196
  */
1151
1197
  Carousel.prototype.saveLastFocusReference = function(oEvent) {
1152
- var oFocusedPage = jQuery(oEvent.target).closest(".sapMCrsPage").control(0),
1198
+ var oClosestPage = this._getClosestPage(oEvent.target),
1153
1199
  sFocusedPageId;
1154
1200
 
1155
1201
  // Don't save focus references triggered from the mouse
@@ -1161,10 +1207,9 @@ sap.ui.define([
1161
1207
  this._lastFocusablePageElement = {};
1162
1208
  }
1163
1209
 
1164
- if (oFocusedPage) {
1165
- sFocusedPageId = oFocusedPage.getId();
1210
+ if (oClosestPage) {
1211
+ sFocusedPageId = oClosestPage.getId();
1166
1212
  this._lastFocusablePageElement[sFocusedPageId] = oEvent.target;
1167
- this._updateFocusedPagesOrder(sFocusedPageId);
1168
1213
  }
1169
1214
  };
1170
1215
 
@@ -1175,23 +1220,7 @@ sap.ui.define([
1175
1220
  */
1176
1221
  Carousel.prototype._getActivePageLastFocusedElement = function() {
1177
1222
  if (this._lastFocusablePageElement) {
1178
- return this._lastFocusablePageElement[this._getLastFocusedActivePage()];
1179
- }
1180
- };
1181
-
1182
- /**
1183
- * Updates focused pages order.
1184
- * @param {number} sFocusedPageId - Currently focused page ID
1185
- * @private
1186
- */
1187
- Carousel.prototype._updateFocusedPagesOrder = function(sFocusedPageId) {
1188
- var iIndex = this._aOrderOfFocusedElements.indexOf(sFocusedPageId);
1189
-
1190
- if (iIndex > -1) {
1191
- // Moves the currently focused page at the first place, if it has already been focused before now
1192
- this._aOrderOfFocusedElements.splice(0, 0, this._aOrderOfFocusedElements.splice(iIndex, 1)[0]);
1193
- } else {
1194
- this._aOrderOfFocusedElements.unshift(sFocusedPageId);
1223
+ return this._lastFocusablePageElement[this.getActivePage()];
1195
1224
  }
1196
1225
  };
1197
1226
 
@@ -1201,7 +1230,7 @@ sap.ui.define([
1201
1230
  * @private
1202
1231
  */
1203
1232
  Carousel.prototype._updateActivePages = function(sNewActivePageId) {
1204
- var iNewPageIndex = this._getPageNumber(sNewActivePageId),
1233
+ var iNewPageIndex = this._getPageIndex(sNewActivePageId),
1205
1234
  iNumberOfItemsToShown = this._getNumberOfItemsToShow(),
1206
1235
  iLastPageIndex = iNewPageIndex + iNumberOfItemsToShown,
1207
1236
  aAllPages = this.getPages();
@@ -1221,35 +1250,15 @@ sap.ui.define([
1221
1250
  };
1222
1251
 
1223
1252
  /**
1224
- * Returns the last focused active page ID.
1225
- * @returns {string} Last focused active page ID
1226
- * @private
1227
- */
1228
- Carousel.prototype._getLastFocusedActivePage = function() {
1229
- for (var i = 0; i < this._aOrderOfFocusedElements.length; i++) {
1230
- var oPageId = this._aOrderOfFocusedElements[i];
1231
-
1232
- if (this._aAllActivePages.indexOf(oPageId) > -1) {
1233
- return oPageId;
1234
- }
1235
- }
1236
-
1237
- return this.getActivePage();
1238
- };
1239
-
1240
- /**
1241
- * Change Carousel Active Page from given page index.
1253
+ * Change active page via keyboard
1242
1254
  *
1243
1255
  * @param {Object} oEvent - The event object
1244
- * @param {number} nIndex - The index of the page that need to be shown.
1245
- * If the index is 0 the next shown page will be the first in the Carousel
1256
+ * @param {int} iOffset - The index offset from the currently active page.
1257
+ * @param {int} bPreventLoop Whether to prevent potential loop
1246
1258
  * @private
1247
1259
  */
1248
- Carousel.prototype._fnSkipToIndex = function(oEvent, nIndex) {
1249
- var nNewIndex = nIndex;
1250
-
1251
- // Exit the function if the event is not from the Carousel
1252
- if (oEvent.target !== this.getDomRef()) {
1260
+ Carousel.prototype._fnSkipToIndex = function(oEvent, iOffset, bPreventLoop) {
1261
+ if (!this._isSlide(oEvent.target)) {
1253
1262
  return;
1254
1263
  }
1255
1264
 
@@ -1261,12 +1270,20 @@ sap.ui.define([
1261
1270
 
1262
1271
  this._oMobifyCarousel.setShouldFireEvent(true);
1263
1272
 
1264
- // Calculate the index of the next page that will be shown
1265
- if (nIndex !== 0) {
1266
- nNewIndex = this._getPageNumber(this.getActivePage()) + 1 + nIndex;
1273
+ // Calculate the index of the next active page
1274
+ var iNewActivePageIndex = this._makeInRange(this._getPageIndex(this.getActivePage()) + iOffset, bPreventLoop);
1275
+
1276
+ if (this._isPageDisplayed(iNewActivePageIndex)) {
1277
+ this._changeActivePage(iNewActivePageIndex);
1278
+ } else if (iOffset > 0) { // forward
1279
+ this._moveToPage(iNewActivePageIndex, iNewActivePageIndex + 1 - this._getNumberOfItemsToShow() + 1, true);
1280
+ } else { // backward
1281
+ this._moveToPage(iNewActivePageIndex, iNewActivePageIndex + 1, true);
1267
1282
  }
1283
+ };
1268
1284
 
1269
- this._oMobifyCarousel.move(nNewIndex);
1285
+ Carousel.prototype._isPageDisplayed = function (iIndex) {
1286
+ return this._aAllActivePagesIndexes.includes(iIndex);
1270
1287
  };
1271
1288
 
1272
1289
  /**
@@ -1277,14 +1294,59 @@ sap.ui.define([
1277
1294
  Carousel.prototype._handleF7Key = function (oEvent) {
1278
1295
  var oActivePageLastFocusedElement = this._getActivePageLastFocusedElement();
1279
1296
 
1280
- // If focus is on an interactive element inside a page, move focus to the Carousel.
1281
- // As long as the focus remains on the Carousel, a consecutive press on [F7]
1282
- // moves the focus back to the interactive element which had the focus before.
1283
- if (oEvent.target === this.$()[0] && oActivePageLastFocusedElement) {
1297
+ if (this._isSlide(oEvent.target) && oActivePageLastFocusedElement) {
1284
1298
  oActivePageLastFocusedElement.focus();
1285
1299
  } else {
1286
- this.$().trigger("focus");
1300
+ this.getFocusDomRef().focus();
1301
+ }
1302
+ };
1303
+
1304
+ Carousel.prototype._isSlide = function (oElement) {
1305
+ return oElement.id.endsWith("slide") && oElement.parentElement === this.getDomRef().querySelector(Carousel._INNER_SELECTOR);
1306
+ };
1307
+
1308
+ Carousel.prototype._isPageIndicatorArrow = function (oElement) {
1309
+ return oElement.classList.contains("sapMCrslArrow");
1310
+ };
1311
+
1312
+ Carousel.prototype._loops = function () {
1313
+ return this.getLoop() && this._getNumberOfItemsToShow() === 1;
1314
+ };
1315
+
1316
+ /**
1317
+ * @param {int} iIndex Page index
1318
+ * @param {boolean} bPreventLoop Whether to prevent loop if index is out of range
1319
+ * @returns {int} index in range of pages aggregation
1320
+ */
1321
+ Carousel.prototype._makeInRange = function (iIndex, bPreventLoop) {
1322
+ var iPagesLength = this.getPages().length;
1323
+ var iIndexInRange = iIndex;
1324
+ var bLoops = this._loops();
1325
+
1326
+ if (iIndex >= iPagesLength) {
1327
+ if (bLoops && !bPreventLoop) {
1328
+ iIndexInRange = 0;
1329
+ } else {
1330
+ iIndexInRange = iPagesLength - 1;
1331
+ }
1332
+ } else if (iIndex < 0) {
1333
+ if (bLoops && !bPreventLoop) {
1334
+ iIndexInRange = iPagesLength - 1;
1335
+ } else {
1336
+ iIndexInRange = 0;
1337
+ }
1287
1338
  }
1339
+
1340
+ return iIndexInRange;
1341
+ };
1342
+
1343
+ /**
1344
+ * Searches for the parent page of the given child element
1345
+ * @param {HTMLElement} oElement The child element
1346
+ * @returns {sap.ui.core.Control} The page
1347
+ */
1348
+ Carousel.prototype._getClosestPage = function (oElement) {
1349
+ return jQuery(oElement).closest(".sapMCrsPage").control(0);
1288
1350
  };
1289
1351
 
1290
1352
  //================================================================================