@openui5/sap.m 1.136.2 → 1.138.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 (469) hide show
  1. package/REUSE.toml +0 -28
  2. package/THIRDPARTY.txt +0 -24
  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 +3 -2
  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 +3 -3
  15. package/src/sap/m/Bar.js +1 -1
  16. package/src/sap/m/BarInPageEnabler.js +5 -6
  17. package/src/sap/m/Breadcrumbs.js +1 -1
  18. package/src/sap/m/BusyDialog.js +1 -1
  19. package/src/sap/m/BusyIndicator.js +1 -1
  20. package/src/sap/m/Button.js +2 -2
  21. package/src/sap/m/Carousel.js +1 -1
  22. package/src/sap/m/CarouselLayout.js +1 -1
  23. package/src/sap/m/CheckBox.js +1 -1
  24. package/src/sap/m/ColorPalette.js +1 -1
  25. package/src/sap/m/ColorPalettePopover.js +1 -1
  26. package/src/sap/m/ColorPaletteRenderer.js +2 -1
  27. package/src/sap/m/Column.js +1 -1
  28. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  29. package/src/sap/m/ColumnListItem.js +6 -7
  30. package/src/sap/m/ColumnListItemRenderer.js +10 -0
  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 +1 -1
  37. package/src/sap/m/ComboBoxBase.js +1 -1
  38. package/src/sap/m/ComboBoxBaseRenderer.js +1 -9
  39. package/src/sap/m/ComboBoxTextField.js +1 -1
  40. package/src/sap/m/ContentConfig.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 +1 -21
  45. package/src/sap/m/DateRangeSelection.js +4 -3
  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 +1 -1
  49. package/src/sap/m/Dialog.js +5 -1
  50. package/src/sap/m/DialogRenderer.js +14 -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 +1 -1
  56. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  57. package/src/sap/m/ExpandableText.js +1 -1
  58. package/src/sap/m/FacetFilter.js +1 -1
  59. package/src/sap/m/FacetFilterItem.js +1 -1
  60. package/src/sap/m/FacetFilterList.js +1 -1
  61. package/src/sap/m/FeedContent.js +1 -1
  62. package/src/sap/m/FeedInput.js +1 -1
  63. package/src/sap/m/FeedListItem.js +11 -9
  64. package/src/sap/m/FeedListItemAction.js +5 -19
  65. package/src/sap/m/Fiori20Adapter.js +2 -2
  66. package/src/sap/m/FlexBox.js +1 -1
  67. package/src/sap/m/FlexItemData.js +1 -1
  68. package/src/sap/m/FormattedText.js +1 -1
  69. package/src/sap/m/GenericTag.js +1 -1
  70. package/src/sap/m/GenericTile.js +27 -10
  71. package/src/sap/m/GroupHeaderListItem.js +6 -2
  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 +1 -1
  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 +9 -1
  79. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  80. package/src/sap/m/IconTabHeader.js +58 -54
  81. package/src/sap/m/IconTabSeparator.js +1 -1
  82. package/src/sap/m/IllustratedMessage.js +48 -10
  83. package/src/sap/m/Illustration.js +9 -2
  84. package/src/sap/m/IllustrationRenderer.js +14 -7
  85. package/src/sap/m/Image.js +1 -1
  86. package/src/sap/m/ImageContent.js +1 -1
  87. package/src/sap/m/Input.js +1 -1
  88. package/src/sap/m/InputBase.js +1 -1
  89. package/src/sap/m/InputListItem.js +1 -1
  90. package/src/sap/m/InputRenderer.js +1 -14
  91. package/src/sap/m/Label.js +1 -1
  92. package/src/sap/m/LightBox.js +1 -1
  93. package/src/sap/m/LightBoxItem.js +1 -1
  94. package/src/sap/m/Link.js +1 -26
  95. package/src/sap/m/LinkRenderer.js +4 -3
  96. package/src/sap/m/LinkTileContent.js +1 -1
  97. package/src/sap/m/List.js +2 -2
  98. package/src/sap/m/ListBase.js +43 -2
  99. package/src/sap/m/ListBaseRenderer.js +3 -1
  100. package/src/sap/m/ListItemAction.js +189 -0
  101. package/src/sap/m/ListItemActionBase.js +52 -0
  102. package/src/sap/m/ListItemBase.js +88 -17
  103. package/src/sap/m/ListItemBaseRenderer.js +34 -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 +385 -882
  108. package/src/sap/m/MenuButton.js +17 -78
  109. package/src/sap/m/MenuItem.js +459 -300
  110. package/src/sap/m/MenuItemGroup.js +9 -353
  111. package/src/sap/m/MenuItemRenderer.js +220 -0
  112. package/src/sap/m/MenuListItem.js +1 -1
  113. package/src/sap/m/MenuWrapper.js +686 -0
  114. package/src/sap/m/MenuWrapperRenderer.js +123 -0
  115. package/src/sap/m/MessageBox.js +2 -2
  116. package/src/sap/m/MessageItem.js +1 -1
  117. package/src/sap/m/MessageListItem.js +1 -1
  118. package/src/sap/m/MessagePage.js +1 -1
  119. package/src/sap/m/MessagePopover.js +1 -1
  120. package/src/sap/m/MessagePopoverItem.js +1 -1
  121. package/src/sap/m/MessageStrip.js +3 -2
  122. package/src/sap/m/MessageToast.js +8 -6
  123. package/src/sap/m/MessageView.js +1 -1
  124. package/src/sap/m/MultiComboBox.js +1 -1
  125. package/src/sap/m/MultiComboBoxRenderer.js +1 -9
  126. package/src/sap/m/MultiEditField.js +1 -1
  127. package/src/sap/m/MultiInput.js +3 -1
  128. package/src/sap/m/NavContainer.js +1 -1
  129. package/src/sap/m/NewsContent.js +1 -1
  130. package/src/sap/m/NotificationList.js +1 -1
  131. package/src/sap/m/NotificationListBase.js +9 -4
  132. package/src/sap/m/NotificationListGroup.js +1 -1
  133. package/src/sap/m/NotificationListItem.js +12 -1
  134. package/src/sap/m/NumericContent.js +1 -1
  135. package/src/sap/m/NumericInput.js +3 -3
  136. package/src/sap/m/ObjectAttribute.js +1 -1
  137. package/src/sap/m/ObjectHeader.js +1 -1
  138. package/src/sap/m/ObjectIdentifier.js +1 -1
  139. package/src/sap/m/ObjectListItem.js +1 -1
  140. package/src/sap/m/ObjectMarker.js +5 -2
  141. package/src/sap/m/ObjectNumber.js +1 -1
  142. package/src/sap/m/ObjectStatus.js +1 -1
  143. package/src/sap/m/OverflowToolbar.js +1 -1
  144. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  145. package/src/sap/m/OverflowToolbarButton.js +1 -1
  146. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  147. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  148. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  149. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  150. package/src/sap/m/P13nColumnsItem.js +1 -1
  151. package/src/sap/m/P13nColumnsPanel.js +1 -1
  152. package/src/sap/m/P13nConditionPanel.js +1 -1
  153. package/src/sap/m/P13nDialog.js +1 -1
  154. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  155. package/src/sap/m/P13nDimMeasurePanel.js +1 -1
  156. package/src/sap/m/P13nFilterItem.js +1 -1
  157. package/src/sap/m/P13nFilterPanel.js +1 -1
  158. package/src/sap/m/P13nGroupItem.js +1 -1
  159. package/src/sap/m/P13nGroupPanel.js +1 -1
  160. package/src/sap/m/P13nItem.js +1 -1
  161. package/src/sap/m/P13nPanel.js +1 -1
  162. package/src/sap/m/P13nSelectionItem.js +1 -1
  163. package/src/sap/m/P13nSelectionPanel.js +1 -1
  164. package/src/sap/m/P13nSortItem.js +1 -1
  165. package/src/sap/m/P13nSortPanel.js +1 -1
  166. package/src/sap/m/PDFViewer.js +1 -1
  167. package/src/sap/m/Page.js +6 -33
  168. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  169. package/src/sap/m/PageRenderer.js +3 -1
  170. package/src/sap/m/PagingButton.js +1 -1
  171. package/src/sap/m/Panel.js +1 -1
  172. package/src/sap/m/PlanningCalendar.js +12 -8
  173. package/src/sap/m/PlanningCalendarHeader.js +1 -1
  174. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  175. package/src/sap/m/PlanningCalendarRow.js +1 -1
  176. package/src/sap/m/PlanningCalendarView.js +1 -1
  177. package/src/sap/m/Popover.js +8 -1
  178. package/src/sap/m/PopoverRenderer.js +1 -1
  179. package/src/sap/m/ProgressIndicator.js +2 -4
  180. package/src/sap/m/PullToRefresh.js +1 -1
  181. package/src/sap/m/QuickView.js +1 -1
  182. package/src/sap/m/QuickViewBase.js +1 -1
  183. package/src/sap/m/QuickViewCard.js +1 -1
  184. package/src/sap/m/QuickViewGroup.js +1 -1
  185. package/src/sap/m/QuickViewGroupElement.js +1 -1
  186. package/src/sap/m/QuickViewPage.js +1 -1
  187. package/src/sap/m/RadioButton.js +1 -1
  188. package/src/sap/m/RadioButtonGroup.js +1 -1
  189. package/src/sap/m/RangeSlider.js +1 -1
  190. package/src/sap/m/RatingIndicator.js +1 -1
  191. package/src/sap/m/ResponsivePopover.js +1 -1
  192. package/src/sap/m/ResponsiveScale.js +1 -1
  193. package/src/sap/m/ScrollBar.js +1 -1
  194. package/src/sap/m/ScrollContainer.js +1 -1
  195. package/src/sap/m/SearchField.js +1 -1
  196. package/src/sap/m/SegmentedButton.js +1 -1
  197. package/src/sap/m/SegmentedButtonItem.js +1 -1
  198. package/src/sap/m/Select.js +1 -1
  199. package/src/sap/m/SelectDialog.js +1 -1
  200. package/src/sap/m/SelectDialogBase.js +1 -1
  201. package/src/sap/m/SelectList.js +1 -1
  202. package/src/sap/m/SelectionDetails.js +1 -1
  203. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  204. package/src/sap/m/SelectionDetailsItem.js +1 -1
  205. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  206. package/src/sap/m/Shell.js +1 -1
  207. package/src/sap/m/SimpleFixFlex.js +1 -1
  208. package/src/sap/m/SinglePlanningCalendar.js +14 -3
  209. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  210. package/src/sap/m/SinglePlanningCalendarGrid.js +19 -1
  211. package/src/sap/m/SinglePlanningCalendarGridRenderer.js +17 -16
  212. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
  213. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  214. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  215. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  216. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  217. package/src/sap/m/SlideTile.js +1 -1
  218. package/src/sap/m/Slider.js +1 -1
  219. package/src/sap/m/SliderTooltip.js +1 -1
  220. package/src/sap/m/SliderTooltipBase.js +1 -1
  221. package/src/sap/m/SliderTooltipContainer.js +1 -1
  222. package/src/sap/m/SplitApp.js +6 -2
  223. package/src/sap/m/SplitButton.js +1 -1
  224. package/src/sap/m/SplitContainer.js +1 -1
  225. package/src/sap/m/StandardDynamicDateOption.js +1 -1
  226. package/src/sap/m/StandardListItem.js +1 -1
  227. package/src/sap/m/StandardTile.js +1 -1
  228. package/src/sap/m/StandardTreeItem.js +1 -1
  229. package/src/sap/m/StepInput.js +6 -1
  230. package/src/sap/m/Suggest.js +3 -1
  231. package/src/sap/m/SuggestionItem.js +1 -1
  232. package/src/sap/m/SuggestionsPopover.js +1 -1
  233. package/src/sap/m/Switch.js +19 -3
  234. package/src/sap/m/TabContainer.js +1 -1
  235. package/src/sap/m/TabContainerItem.js +1 -1
  236. package/src/sap/m/TabStrip.js +9 -3
  237. package/src/sap/m/TabStripItem.js +1 -1
  238. package/src/sap/m/Table.js +21 -27
  239. package/src/sap/m/TablePersoController.js +1 -1
  240. package/src/sap/m/TablePersoDialog.js +1 -1
  241. package/src/sap/m/TablePersoProvider.js +1 -1
  242. package/src/sap/m/TableRenderer.js +11 -3
  243. package/src/sap/m/TableSelectDialog.js +1 -1
  244. package/src/sap/m/Text.js +1 -1
  245. package/src/sap/m/TextArea.js +1 -1
  246. package/src/sap/m/Tile.js +1 -1
  247. package/src/sap/m/TileContainer.js +1 -1
  248. package/src/sap/m/TileContent.js +1 -1
  249. package/src/sap/m/TileInfo.js +1 -1
  250. package/src/sap/m/TileRenderer.js +2 -2
  251. package/src/sap/m/TimePicker.js +1 -1
  252. package/src/sap/m/TimePickerClock.js +1 -1
  253. package/src/sap/m/TimePickerClocks.js +1 -1
  254. package/src/sap/m/TimePickerInputs.js +1 -1
  255. package/src/sap/m/TimePickerInternals.js +1 -1
  256. package/src/sap/m/TimePickerSlider.js +1 -1
  257. package/src/sap/m/TimePickerSliders.js +1 -1
  258. package/src/sap/m/Title.js +1 -1
  259. package/src/sap/m/TitlePropagationSupport.js +1 -1
  260. package/src/sap/m/ToggleButton.js +1 -1
  261. package/src/sap/m/Token.js +1 -1
  262. package/src/sap/m/Tokenizer.js +36 -1
  263. package/src/sap/m/TokenizerRenderer.js +2 -2
  264. package/src/sap/m/Toolbar.js +1 -1
  265. package/src/sap/m/ToolbarLayoutData.js +1 -1
  266. package/src/sap/m/ToolbarSeparator.js +1 -1
  267. package/src/sap/m/ToolbarSpacer.js +1 -1
  268. package/src/sap/m/Tree.js +1 -1
  269. package/src/sap/m/TreeItemBase.js +1 -1
  270. package/src/sap/m/UploadCollection.js +1 -1
  271. package/src/sap/m/UploadCollectionItem.js +1 -1
  272. package/src/sap/m/UploadCollectionParameter.js +1 -1
  273. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  274. package/src/sap/m/VBox.js +1 -1
  275. package/src/sap/m/ValueStateHeader.js +1 -1
  276. package/src/sap/m/VariantManagement.js +1 -1
  277. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  278. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  279. package/src/sap/m/ViewSettingsDialog.js +17 -3
  280. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  281. package/src/sap/m/ViewSettingsItem.js +1 -1
  282. package/src/sap/m/VisibleItem.js +1 -1
  283. package/src/sap/m/WheelSlider.js +1 -1
  284. package/src/sap/m/WheelSliderContainer.js +1 -1
  285. package/src/sap/m/Wizard.js +17 -1
  286. package/src/sap/m/WizardProgressNavigator.js +1 -1
  287. package/src/sap/m/WizardStep.js +9 -6
  288. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  289. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  290. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  291. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  292. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +5 -5
  293. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  294. package/src/sap/m/designtime/ListItemBase.designtime.js +5 -0
  295. package/src/sap/m/i18n/interaction_ar.xml +10 -10
  296. package/src/sap/m/i18n/interaction_cs.xml +3 -3
  297. package/src/sap/m/i18n/interaction_iw.xml +8 -8
  298. package/src/sap/m/i18n/interaction_kk.xml +3 -3
  299. package/src/sap/m/i18n/interaction_th.xml +1 -1
  300. package/src/sap/m/library.js +84 -8
  301. package/src/sap/m/messagebundle.properties +47 -14
  302. package/src/sap/m/messagebundle_ar.properties +32 -10
  303. package/src/sap/m/messagebundle_bg.properties +31 -9
  304. package/src/sap/m/messagebundle_ca.properties +31 -9
  305. package/src/sap/m/messagebundle_cnr.properties +32 -10
  306. package/src/sap/m/messagebundle_cs.properties +32 -10
  307. package/src/sap/m/messagebundle_cy.properties +31 -9
  308. package/src/sap/m/messagebundle_da.properties +31 -9
  309. package/src/sap/m/messagebundle_de.properties +32 -10
  310. package/src/sap/m/messagebundle_el.properties +32 -10
  311. package/src/sap/m/messagebundle_en.properties +32 -10
  312. package/src/sap/m/messagebundle_en_GB.properties +32 -10
  313. package/src/sap/m/messagebundle_en_US_saprigi.properties +32 -10
  314. package/src/sap/m/messagebundle_es.properties +33 -11
  315. package/src/sap/m/messagebundle_es_MX.properties +33 -11
  316. package/src/sap/m/messagebundle_et.properties +31 -9
  317. package/src/sap/m/messagebundle_fi.properties +32 -10
  318. package/src/sap/m/messagebundle_fr.properties +31 -9
  319. package/src/sap/m/messagebundle_fr_CA.properties +31 -9
  320. package/src/sap/m/messagebundle_hi.properties +32 -10
  321. package/src/sap/m/messagebundle_hr.properties +32 -10
  322. package/src/sap/m/messagebundle_hu.properties +30 -8
  323. package/src/sap/m/messagebundle_id.properties +32 -10
  324. package/src/sap/m/messagebundle_it.properties +30 -8
  325. package/src/sap/m/messagebundle_iw.properties +31 -9
  326. package/src/sap/m/messagebundle_ja.properties +32 -10
  327. package/src/sap/m/messagebundle_kk.properties +33 -11
  328. package/src/sap/m/messagebundle_ko.properties +33 -11
  329. package/src/sap/m/messagebundle_lt.properties +32 -10
  330. package/src/sap/m/messagebundle_lv.properties +32 -10
  331. package/src/sap/m/messagebundle_mk.properties +31 -9
  332. package/src/sap/m/messagebundle_ms.properties +32 -10
  333. package/src/sap/m/messagebundle_nl.properties +31 -9
  334. package/src/sap/m/messagebundle_no.properties +32 -10
  335. package/src/sap/m/messagebundle_pl.properties +32 -10
  336. package/src/sap/m/messagebundle_pt.properties +31 -9
  337. package/src/sap/m/messagebundle_pt_PT.properties +31 -9
  338. package/src/sap/m/messagebundle_ro.properties +31 -9
  339. package/src/sap/m/messagebundle_ru.properties +32 -10
  340. package/src/sap/m/messagebundle_sh.properties +32 -10
  341. package/src/sap/m/messagebundle_sk.properties +32 -10
  342. package/src/sap/m/messagebundle_sl.properties +32 -10
  343. package/src/sap/m/messagebundle_sr.properties +32 -10
  344. package/src/sap/m/messagebundle_sv.properties +31 -9
  345. package/src/sap/m/messagebundle_th.properties +31 -9
  346. package/src/sap/m/messagebundle_tr.properties +31 -9
  347. package/src/sap/m/messagebundle_uk.properties +31 -9
  348. package/src/sap/m/messagebundle_vi.properties +32 -10
  349. package/src/sap/m/messagebundle_zh_CN.properties +31 -9
  350. package/src/sap/m/messagebundle_zh_TW.properties +32 -10
  351. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  352. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  353. package/src/sap/m/p13n/BasePanel.js +1 -1
  354. package/src/sap/m/p13n/Container.js +1 -1
  355. package/src/sap/m/p13n/Engine.js +1 -1
  356. package/src/sap/m/p13n/FilterController.js +1 -1
  357. package/src/sap/m/p13n/FilterPanel.js +1 -1
  358. package/src/sap/m/p13n/GroupController.js +1 -1
  359. package/src/sap/m/p13n/GroupPanel.js +1 -1
  360. package/src/sap/m/p13n/MessageStrip.js +1 -1
  361. package/src/sap/m/p13n/Popup.js +3 -1
  362. package/src/sap/m/p13n/QueryPanel.js +10 -6
  363. package/src/sap/m/p13n/SelectionController.js +1 -1
  364. package/src/sap/m/p13n/SelectionPanel.js +32 -41
  365. package/src/sap/m/p13n/SortController.js +1 -1
  366. package/src/sap/m/p13n/SortPanel.js +1 -1
  367. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +3 -4
  368. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  369. package/src/sap/m/p13n/modules/UIManager.js +1 -1
  370. package/src/sap/m/p13n/modules/xConfigAPI.js +2 -5
  371. package/src/sap/m/plugins/CellSelector.js +4 -3
  372. package/src/sap/m/plugins/ColumnAIAction.js +1 -1
  373. package/src/sap/m/plugins/ColumnResizer.js +28 -4
  374. package/src/sap/m/plugins/ContextMenuSetting.js +1 -1
  375. package/src/sap/m/plugins/CopyProvider.js +1 -1
  376. package/src/sap/m/plugins/DataStateIndicator.js +1 -1
  377. package/src/sap/m/plugins/PasteProvider.js +1 -1
  378. package/src/sap/m/plugins/PluginBase.js +1 -1
  379. package/src/sap/m/plugins/UploadSetwithTable.js +3 -1
  380. package/src/sap/m/routing/Target.js +52 -8
  381. package/src/sap/m/routing/Targets.js +58 -11
  382. package/src/sap/m/semantic/AddAction.js +1 -1
  383. package/src/sap/m/semantic/CancelAction.js +1 -1
  384. package/src/sap/m/semantic/DeleteAction.js +1 -1
  385. package/src/sap/m/semantic/DetailPage.js +1 -1
  386. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  387. package/src/sap/m/semantic/EditAction.js +1 -1
  388. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  389. package/src/sap/m/semantic/FilterAction.js +1 -1
  390. package/src/sap/m/semantic/FilterSelect.js +1 -1
  391. package/src/sap/m/semantic/FlagAction.js +1 -1
  392. package/src/sap/m/semantic/ForwardAction.js +1 -1
  393. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  394. package/src/sap/m/semantic/GroupAction.js +1 -1
  395. package/src/sap/m/semantic/GroupSelect.js +1 -1
  396. package/src/sap/m/semantic/MainAction.js +1 -1
  397. package/src/sap/m/semantic/MasterPage.js +1 -1
  398. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  399. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  400. package/src/sap/m/semantic/NegativeAction.js +1 -1
  401. package/src/sap/m/semantic/OpenInAction.js +1 -1
  402. package/src/sap/m/semantic/PositiveAction.js +1 -1
  403. package/src/sap/m/semantic/PrintAction.js +1 -1
  404. package/src/sap/m/semantic/SaveAction.js +1 -1
  405. package/src/sap/m/semantic/Segment.js +1 -1
  406. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  407. package/src/sap/m/semantic/SemanticButton.js +1 -1
  408. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  409. package/src/sap/m/semantic/SemanticControl.js +1 -1
  410. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  411. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  412. package/src/sap/m/semantic/SemanticPage.js +1 -1
  413. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  414. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  415. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  416. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  417. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  418. package/src/sap/m/semantic/ShareMenu.js +1 -1
  419. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  420. package/src/sap/m/semantic/SortAction.js +1 -1
  421. package/src/sap/m/semantic/SortSelect.js +1 -1
  422. package/src/sap/m/table/ColumnWidthController.js +1 -1
  423. package/src/sap/m/table/Util.js +1 -1
  424. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  425. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  426. package/src/sap/m/table/columnmenu/Item.js +1 -1
  427. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  428. package/src/sap/m/table/columnmenu/Menu.js +1 -1
  429. package/src/sap/m/table/columnmenu/MenuBase.js +1 -1
  430. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  431. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  432. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  433. package/src/sap/m/table/columnmenu/QuickGroup.js +1 -1
  434. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  435. package/src/sap/m/table/columnmenu/QuickResize.js +142 -0
  436. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  437. package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
  438. package/src/sap/m/table/columnmenu/QuickTotal.js +1 -1
  439. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  440. package/src/sap/m/themes/base/Button.less +36 -13
  441. package/src/sap/m/themes/base/ColumnListItem.less +11 -0
  442. package/src/sap/m/themes/base/DynamicDateRange.less +6 -2
  443. package/src/sap/m/themes/base/IconTabBar.less +1 -0
  444. package/src/sap/m/themes/base/Link.less +1 -0
  445. package/src/sap/m/themes/base/ListBase.less +1 -0
  446. package/src/sap/m/themes/base/ListItemBase.less +22 -10
  447. package/src/sap/m/themes/base/Menu.less +329 -12
  448. package/src/sap/m/themes/base/Page.less +5 -4
  449. package/src/sap/m/themes/base/Panel.less +7 -2
  450. package/src/sap/m/themes/base/PlanningCalendar.less +37 -0
  451. package/src/sap/m/themes/base/RatingIndicator.less +7 -2
  452. package/src/sap/m/themes/base/Table.less +42 -11
  453. package/src/sap/m/themes/base/Wizard.less +14 -43
  454. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-BeforeSearch.svg +2 -2
  455. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NoEntries.svg +2 -2
  456. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SignOut.svg +10 -17
  457. package/src/sap/m/upload/ActionsPlaceholder.js +1 -1
  458. package/src/sap/m/upload/Column.js +1 -1
  459. package/src/sap/m/upload/FilePreviewDialog.js +1 -1
  460. package/src/sap/m/upload/UploadItem.js +1 -1
  461. package/src/sap/m/upload/UploadItemConfiguration.js +1 -1
  462. package/src/sap/m/upload/UploadSet.js +1 -1
  463. package/src/sap/m/upload/UploadSetItem.js +1 -1
  464. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  465. package/src/sap/m/upload/Uploader.js +2 -2
  466. package/src/sap/m/upload/UploaderHttpRequestMethod.js +2 -2
  467. package/src/sap/m/upload/UploaderTableItem.js +3 -3
  468. package/src/sap/m/routing/async/Target.js +0 -60
  469. package/src/sap/m/routing/async/Targets.js +0 -60
@@ -0,0 +1,686 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ // Provides control sap.m.MenuWrapper
8
+ sap.ui.define([
9
+ 'sap/ui/core/library',
10
+ 'sap/ui/core/Control',
11
+ 'sap/m/MenuWrapperRenderer',
12
+ 'sap/ui/dom/containsOrEquals',
13
+ 'sap/ui/events/KeyCodes',
14
+ 'sap/ui/Device',
15
+ 'sap/base/i18n/Localization',
16
+ 'sap/ui/events/PseudoEvents'
17
+ ], function(
18
+ coreLibrary,
19
+ Control,
20
+ MenuWraperRenderer,
21
+ containsOrEquals,
22
+ KeyCodes,
23
+ Device,
24
+ Localization,
25
+ PseudoEvents
26
+ ) {
27
+ "use strict";
28
+
29
+ // shortcut for sap.ui.core.ItemSelectionMode
30
+ const ItemSelectionMode = coreLibrary.ItemSelectionMode;
31
+
32
+ const DELAY_SUBMENU_TIMER = 300;
33
+
34
+ /**
35
+ * Constructor for a new MenuWrapper.
36
+ *
37
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
38
+ * @param {object} [mSettings] Initial settings for the new control
39
+ *
40
+ * @class
41
+ * The <code>sap.m.MenuWrapper</code> control represents a single-level menu with menu items.
42
+ *
43
+ * @extends sap.ui.core.Control
44
+ *
45
+ * @author SAP SE
46
+ * @version 1.138.0
47
+ *
48
+ * @constructor
49
+ * @private
50
+ * @since 1.136.0
51
+ * @alias sap.m.MenuWrapper
52
+ */
53
+ const MenuWrapper = Control.extend("sap.m.MenuWrapper", /** @lends sap.m.MenuWrapper.prototype */ {
54
+ metadata : {
55
+ library : "sap.m",
56
+ properties: {
57
+
58
+ /**
59
+ * Specifies the title to be displayed when the menu is viewed on mobile devices within this wrapper.
60
+ * <b>Note:</b> This property is only used when the menu is opened on mobile devices.
61
+ */
62
+ title: { type: "string", defaultValue: "" },
63
+
64
+ /**
65
+ * Defines whether the menu in this wrapper is a sub-menu or not.
66
+ */
67
+ isSubmenu: { type: "boolean", defaultValue: false }
68
+
69
+ },
70
+ aggregations: {
71
+
72
+ /**
73
+ * Defines the items contained within this control.
74
+ */
75
+ items: { type: "sap.m.IMenuItem", multiple: true, singularName: "item", bindable: "bindable" }
76
+
77
+ },
78
+ events: {
79
+ /**
80
+ * Fired when a <code>MenuItem</code> is selected.
81
+ */
82
+ itemSelected: {
83
+ enableEventBubbling: true,
84
+ parameters: {
85
+ /**
86
+ * The <code>MenuItem</code> which was selected.
87
+ */
88
+ item : {type : "sap.m.IMenuItem" }
89
+ }
90
+ },
91
+ /**
92
+ * Fired when the menu popover must be closed.
93
+ *
94
+ * @since 1.136.0
95
+ */
96
+ closePopover: {
97
+ enableEventBubbling: true,
98
+ parameters: {
99
+ /**
100
+ * Whether to bubble the event to the root <code>Menu</code>.
101
+ */
102
+ bubbleToRoot : {type : "boolean" },
103
+ /**
104
+ * The menu item that triggered the submenu close (if any).
105
+ */
106
+ origin: {type: "sap.m.IMenuItem"}
107
+ }
108
+ },
109
+
110
+ /**
111
+ * Fired when the submenu must be closed.
112
+ * Because of possible top menu beforeClose prevention, the submenu close should be done by the top menu.
113
+ * That's why this event is fired to propagate the item to the top menu.
114
+ *
115
+ * @since 1.136.0
116
+ */
117
+ closeItemSubmenu: {
118
+ enableEventBubbling: true,
119
+ parameters: {
120
+ /**
121
+ * Item to be propagated to the top menu.
122
+ */
123
+ item: {type: "sap.m.IMenuItem"}
124
+ }
125
+ }
126
+ },
127
+ renderer: MenuWraperRenderer
128
+ }
129
+ });
130
+
131
+ MenuWrapper.prototype.init = function() {
132
+ this._aStyleClasses = [];
133
+ };
134
+
135
+ MenuWrapper.prototype.onBeforeRendering = function() {
136
+ const aGroups = this.getItems().filter(function(oItem) {
137
+ return oItem.isA("sap.m.MenuItemGroup");
138
+ });
139
+
140
+ // associate menu items with their respective group and ensure single selection for menu items in groups configured with single selection mode
141
+ aGroups.forEach(function(oGroup) {
142
+ const aItems = oGroup.getItems();
143
+ aItems.forEach(function(oItem) {
144
+ oItem.setAssociation("_group", oGroup);
145
+ oItem._itemSelectionMode = oGroup.getItemSelectionMode();
146
+ });
147
+ if (oGroup.getItemSelectionMode() === ItemSelectionMode.SingleSelect) {
148
+ oGroup._ensureSingleSelection();
149
+ }
150
+ });
151
+ };
152
+
153
+ MenuWrapper.prototype.onmouseover = function(oEvent) {
154
+ const oItem = this.getItemByDomRef(oEvent.target);
155
+
156
+ if (!oItem) {
157
+ return;
158
+ }
159
+
160
+ if (oItem !== this.oHoveredItem) {
161
+ this._setHoveredItem(oItem);
162
+ }
163
+ this._handleSubmenusAppearance(oItem, false/*, true*/);
164
+ };
165
+
166
+ MenuWrapper.prototype.onclick = function(oEvent) {
167
+ const oItem = this.getItemByDomRef(oEvent.target);
168
+ if (!oItem) {
169
+ return;
170
+ }
171
+
172
+ if (oEvent.target.closest(CSS.escape(`#${oItem.getId()}-endContent`))) {
173
+ this.fireClosePopover({ bubbleToRoot: true });
174
+ return;
175
+ }
176
+
177
+ this._selectItem(oItem, true);
178
+ oEvent.preventDefault();
179
+ oEvent.stopPropagation();
180
+ };
181
+
182
+ MenuWrapper.prototype.onsapselect = function(oEvent) {
183
+ this._sapSelectOnKeyDown = true;
184
+ oEvent.preventDefault();
185
+ oEvent.stopPropagation();
186
+ };
187
+
188
+ MenuWrapper.prototype.onkeydown = function(oEvent) {
189
+
190
+ const iIdx = this.oHoveredItem ? this._getVisibleItems().indexOf(this.oHoveredItem) : -1,
191
+ bRtl = Localization.getRTL(),
192
+ iLeftArrow = bRtl ? KeyCodes.ARROW_RIGHT : KeyCodes.ARROW_LEFT,
193
+ iRightArrow = bRtl ? KeyCodes.ARROW_LEFT : KeyCodes.ARROW_RIGHT;
194
+ let bPreventDefault = true;
195
+
196
+ if (iIdx === -1) {
197
+ return;
198
+ }
199
+
200
+ if (oEvent.keyCode === KeyCodes.ARROW_DOWN) {
201
+ // Go to the next selectable item
202
+ this._setHoveredItem(this._getNextFocusableItem(iIdx, 1), true);
203
+ } else if (oEvent.keyCode === KeyCodes.ARROW_UP) {
204
+ // Go to the previous selectable item
205
+ this._setHoveredItem(this._getPrevFocusableItem(iIdx, 1), true);
206
+ } else if (oEvent.keyCode === iLeftArrow) {
207
+ // Close submenu (if opened) or go to the previous end content control (if any)
208
+ const aEndContent = this.oHoveredItem ? this.oHoveredItem.getEndContent() : [];
209
+ if (aEndContent.length) {
210
+ this._handleEndContentNavigation(oEvent, aEndContent);
211
+ } else if (this.getIsSubmenu()) {
212
+ this.fireClosePopover();
213
+ }
214
+ } else if (oEvent.keyCode === iRightArrow) {
215
+ // Open submenu (if any) or go to the next end content control (if any)
216
+ const aEndContent = this.oHoveredItem ? this.oHoveredItem.getEndContent() : [];
217
+ if (this.oHoveredItem && this.oHoveredItem._hasSubmenu()) {
218
+ this._handleSubmenusAppearance(this.oHoveredItem, true);
219
+ } else if (aEndContent.length) {
220
+ this._handleEndContentNavigation(oEvent, aEndContent);
221
+ }
222
+ } else if (oEvent.keyCode === KeyCodes.ESCAPE) {
223
+ this.fireClosePopover();
224
+ } else if (oEvent.keyCode === KeyCodes.HOME) {
225
+ // Go to the first selectable item
226
+ this._setHoveredItem(this._getNextFocusableItem(-1, 1), true);
227
+ } else if (oEvent.keyCode === KeyCodes.END) {
228
+ // Go to the last selectable item
229
+ this._setHoveredItem(this._getPrevFocusableItem(this._getItems().length, 1), true);
230
+ } else if (oEvent.keyCode === KeyCodes.PAGE_UP) {
231
+ // Go to the previous page of items
232
+ this._setHoveredItem(this._getPrevFocusableItem(iIdx, this._getPageSize()), true);
233
+ } else if (oEvent.keyCode === KeyCodes.PAGE_DOWN) {
234
+ // Go to the next page of items
235
+ this._setHoveredItem(this._getNextFocusableItem(iIdx, this._getPageSize()), true);
236
+ } else if (oEvent.keyCode === KeyCodes.TAB) {
237
+ // Close the popover and focus the next/previous element
238
+ if (this.getIsSubmenu()){
239
+ oEvent.preventDefault();
240
+ }
241
+ this.fireClosePopover();
242
+ } else if (oEvent.keyCode === KeyCodes.F6 && this.oFocusedEndContentItem) {
243
+ this.oHoveredItem.focus();
244
+ this.oFocusedEndContentItem = null;
245
+ } else {
246
+ // Do not prevent default for keys that are not handled by the menu
247
+ bPreventDefault = false;
248
+ }
249
+
250
+ if (bPreventDefault && !oEvent.metaKey && !oEvent.altKey) {
251
+ oEvent.preventDefault();
252
+ oEvent.stopPropagation();
253
+ }
254
+ };
255
+
256
+ MenuWrapper.prototype.onkeyup = function(oEvent) {
257
+ // Similar to sapselect, but executed on keyup:
258
+ // Using keydown causes side effects such as:
259
+ // If the selection results in closing the menu and the focus returns to the initiating element (e.g., a button),
260
+ // the keyup event may trigger on the caller. In Firefox, this can fire a click event on the button — undesirable behavior.
261
+ // The attribute _sapSelectOnKeyDown helps prevent issues in the reverse scenario. For example, when the spacebar is pressed
262
+ // on a Button, opening the menu may cause the space keyup event to select the first item immediately.
263
+ // Device checks are in place due to new functionality in iOS 13, which introduces desktop view functionality for tablets.
264
+ if (!this._sapSelectOnKeyDown) {
265
+ return;
266
+ } else {
267
+ this._sapSelectOnKeyDown = false;
268
+ }
269
+ if (!PseudoEvents.events.sapselect.fnCheck(oEvent) && oEvent.keyCode !== KeyCodes.ENTER) {
270
+ return;
271
+ }
272
+
273
+ this._selectItem(this.oHoveredItem, false, true);
274
+
275
+ oEvent.preventDefault();
276
+ oEvent.stopPropagation();
277
+ };
278
+
279
+ MenuWrapper.prototype.onsapbackspacemodifiers = MenuWrapper.prototype.onsapbackspace;
280
+
281
+ MenuWrapper.prototype.onfocusin = function(oEvent) {
282
+ const oTarget = this.getItemByDomRef(oEvent.target);
283
+
284
+ if (oTarget) {
285
+ this.oHoveredItem = oTarget;
286
+ }
287
+ };
288
+
289
+ /**
290
+ * Returns the menu item that corresponds to the given DOM reference.
291
+ *
292
+ * @param {HTMLElement} oDomRef The DOM reference
293
+ * @returns {sap.m.IMenuItem | null} The menu item that corresponds to the given DOM reference
294
+ */
295
+ MenuWrapper.prototype.getItemByDomRef = function(oDomRef) {
296
+ const oItems = this._getItems();
297
+
298
+ for (let i = 0; i < oItems.length; i++) {
299
+ const oItem = oItems[i],
300
+ oItemRef = oItem.getDomRef();
301
+ if (containsOrEquals(oItemRef, oDomRef)) {
302
+ return oItem;
303
+ }
304
+ }
305
+ return null;
306
+ };
307
+
308
+ /**
309
+ * Adds, removes, toggles, or sets class name(s) in the internal _aStyleClasses array.
310
+ * <b>Note: </b> Later these classes should be applied when menu item open its submenu popover.
311
+ * @param {string} sClassNames - Class name(s) as a string (space-separated for multiple)
312
+ * @param {"addStyleClass"|"removeStyleClass"|"toggleStyleClass"|"setStyleClass"} sMethod - Operation mode: add, remove, toggle, or set a class name(s)
313
+ * @private
314
+ */
315
+ MenuWrapper.prototype._processStyleClasses = function(sClassNames, sMethod) {
316
+ if (sMethod === "setStyleClass") {
317
+ this._aStyleClasses = [];
318
+ sMethod = "addStyleClass";
319
+ }
320
+
321
+ if (sClassNames === "") {
322
+ return;
323
+ }
324
+
325
+ const aClassNames = sClassNames.split(/\s+/).filter(Boolean);
326
+ const sCurrentStyleClasses = this._aStyleClasses.join(" ");
327
+
328
+ aClassNames.forEach((sClass) => {
329
+ const iIdx = this._aStyleClasses.indexOf(sClass);
330
+ const bAddOperation = (sMethod === "addStyleClass" || sMethod === "toggleStyleClass") && iIdx === -1;
331
+ const bRemoveOperation = (sMethod === "removeStyleClass" || sMethod === "toggleStyleClass") && iIdx !== -1;
332
+ if (bAddOperation) {
333
+ this._aStyleClasses.push(sClass);
334
+ } else if (bRemoveOperation) {
335
+ this._aStyleClasses.splice(iIdx, 1);
336
+ }
337
+ });
338
+
339
+ if (this.oOpenedSubmenuParent) {
340
+ const sNewStyleClasses = this._aStyleClasses.join(" ");
341
+ const oPopover = this.oOpenedSubmenuParent._getPopover();
342
+ this.oOpenedSubmenuParent._getMenuWrapper()._processStyleClasses(sCurrentStyleClasses, "removeStyleClass");
343
+ this.oOpenedSubmenuParent._getMenuWrapper()._processStyleClasses(this._aStyleClasses.join(" "), "addStyleClass");
344
+ if (oPopover) {
345
+ oPopover.removeStyleClass(sCurrentStyleClasses);
346
+ oPopover.addStyleClass(sNewStyleClasses);
347
+ }
348
+ }
349
+ };
350
+
351
+ /**
352
+ * Menu item selection handler.
353
+ *
354
+ * @param {sap.m.IMenuItem} oItem The selected menu item
355
+ * @param {boolean} bWithClick Whether the selection is done with click or not
356
+ * @param {boolean} bSkipDelay Whether the submenu opening delay should be skipped or not
357
+ * @private
358
+ */
359
+ MenuWrapper.prototype._selectItem = function(oItem, bWithClick, bSkipDelay) {
360
+ if (this.oFocusedEndContentItem) { // selected end content item
361
+ this.fireClosePopover({ bubbleToRoot: true });
362
+ return;
363
+ }
364
+
365
+ if (!oItem || !oItem.getEnabled()) { // item is disabled
366
+ return;
367
+ }
368
+
369
+ if (oItem._hasSubmenu()) { // item has submenu
370
+ this._handleSubmenusAppearance(oItem, !bWithClick/*, !bSkipDelay*/);
371
+ } else if (oItem.isInteractive && oItem.isInteractive()) { // item is allowed to be pressed
372
+
373
+ if (oItem._getItemSelectionMode && oItem._getItemSelectionMode() !== ItemSelectionMode.None) {
374
+ oItem.setSelected(!oItem.getSelected());
375
+ }
376
+
377
+ this.fireItemSelected({item: oItem});
378
+ oItem.firePress({item: oItem});
379
+ this.fireClosePopover({ bubbleToRoot: true, origin: oItem });
380
+ }
381
+ };
382
+
383
+ MenuWrapper.prototype._handleEndContentNavigation = function(oEvent, aEndContent) {
384
+ const iIdx = this.oFocusedEndContentItem ? aEndContent.indexOf(this.oFocusedEndContentItem) : -1,
385
+ bRtl = Localization.getRTL(),
386
+ iRightArrow = bRtl ? KeyCodes.ARROW_LEFT : KeyCodes.ARROW_RIGHT;
387
+ let iNewIdx;
388
+
389
+ if (oEvent.keyCode === iRightArrow) {
390
+ iNewIdx = iIdx + 1 >= aEndContent.length ? aEndContent.length - 1 : iIdx + 1;
391
+ } else {
392
+ iNewIdx = iIdx - 1 < 0 ? 0 : iIdx - 1;
393
+ }
394
+
395
+ const oFocusableItem = aEndContent[iNewIdx];
396
+
397
+ if (!oFocusableItem) {
398
+ this.oFocusedEndContentItem = null;
399
+ return;
400
+ }
401
+
402
+ if (oFocusableItem && oFocusableItem !== this.oFocusedEndContentItem && oFocusableItem.isFocusable()) {
403
+ this.oFocusedEndContentItem = oFocusableItem;
404
+ oFocusableItem.focus();
405
+ }
406
+ };
407
+
408
+ /**
409
+ * Closes any opened submenu (if any) and afterwards opens submenu for the given item (if any).
410
+ *
411
+ * @param {sap.m.IMenuItem} oItem the item which submenu should be opened
412
+ * @param {boolean} bWithKeyboard Whether the submenu is opened via keyboard
413
+ * @param {boolean } bDelayed whether the submenu is opened with delay or not
414
+ * @private
415
+ */
416
+ MenuWrapper.prototype._handleSubmenusAppearance = function(oItem, bWithKeyboard, bDelayed) {
417
+ if (this.oOpenedSubmenuParent && this.oOpenedSubmenuParent._hasSubmenu() && !this.oOpenedSubmenuParent._getPopover().isOpen()) {
418
+ this.oOpenedSubmenuParent.removeStyleClass("sapMMenuItemSubMenuOpen");
419
+ this.oOpenedSubmenuParent = null;
420
+ }
421
+
422
+ if (!bWithKeyboard && !Device.system.phone && oItem === this.oOpenedSubmenuParent) {
423
+ return;
424
+ }
425
+
426
+ const bHasSubmenu = oItem._hasSubmenu();
427
+ this._closeOpenedSubmenu(/*!bWithKeyboard && bHasSubmenu*/);
428
+
429
+ this._discardOpenSubmenuDelayed();
430
+ if (!bHasSubmenu || !oItem.getEnabled()) {
431
+ return;
432
+ }
433
+
434
+ if (bDelayed) {
435
+ this._openSubmenuDelayed(oItem, bWithKeyboard);
436
+ } else {
437
+ this._openSubmenu(oItem, bWithKeyboard);
438
+ }
439
+ };
440
+
441
+ /**
442
+ * Returns list of items stored in <code>items</code> aggregation. If any items are part of a group,
443
+ * it returns the individual items within the group instead of the group item itself.
444
+ *
445
+ * @returns {sap.m.MenuItem} List of all menu items
446
+ * @private
447
+ */
448
+ MenuWrapper.prototype._getItems = function() {
449
+ const aItems = [];
450
+
451
+ const findItems = (aItemItems) => {
452
+ aItemItems.forEach((oItem) => {
453
+ if (!this._isMenuItemGroup(oItem)) {
454
+ aItems.push(oItem);
455
+ } else {
456
+ findItems(oItem.getItems());
457
+ }
458
+ });
459
+ };
460
+
461
+ findItems(this.getItems());
462
+
463
+ return aItems;
464
+ };
465
+
466
+ /**
467
+ * Returns the list of visible menu items.
468
+ *
469
+ * @returns {sap.m.MenuItem} List of visible menu items
470
+ * @private
471
+ */
472
+ MenuWrapper.prototype._getVisibleItems = function() {
473
+ return this._getItems().filter((oItem) => oItem.getVisible());
474
+ };
475
+
476
+ /**
477
+ * Returns the previous focusable menu item in this menu (if any).
478
+ *
479
+ * @param {number} iIdx The index of currently selectable menu item.
480
+ * @param {number} iStep The step to decrease index with
481
+ * @returns {sap.m.IMenuItem} the previous selectable menu item
482
+ * @private
483
+ */
484
+ MenuWrapper.prototype._getPrevFocusableItem = function(iIdx, iStep) {
485
+ const aItems = this._getVisibleItems();
486
+ let iPrevIdx = iIdx,
487
+ iCurrentIdx = iIdx;
488
+
489
+ if (!aItems.length) {
490
+ return undefined;
491
+ }
492
+
493
+ while (iCurrentIdx > 0 && iStep > 0) {
494
+ iCurrentIdx--;
495
+ if (aItems[iCurrentIdx].isFocusable && aItems[iCurrentIdx].isFocusable()) {
496
+ iStep--;
497
+ iPrevIdx = iCurrentIdx;
498
+ }
499
+ }
500
+
501
+ return iPrevIdx !== iIdx ? aItems[iPrevIdx] : undefined;
502
+ };
503
+
504
+ /**
505
+ * Returns the next focusable menu item in this menu (if any).
506
+ *
507
+ * @param {number} iIdx The index of currently selectable menu item
508
+ * @param {number} iStep The increment value used to increase the index
509
+ * @returns {sap.m.IMenuItem} The next selectable menu item located at the resulting index after applying the increment value
510
+ * @private
511
+ */
512
+ MenuWrapper.prototype._getNextFocusableItem = function(iIdx, iStep) {
513
+ const aItems = this._getVisibleItems();
514
+ let iNextIdx = iIdx,
515
+ iCurrentIdx = iIdx;
516
+
517
+ if (!aItems.length) {
518
+ return undefined;
519
+ }
520
+
521
+ while (iCurrentIdx < aItems.length - 1 && iStep > 0) {
522
+ iCurrentIdx++;
523
+ if (aItems[iCurrentIdx].isFocusable && aItems[iCurrentIdx].isFocusable()) {
524
+ iStep--;
525
+ iNextIdx = iCurrentIdx;
526
+ }
527
+ }
528
+
529
+ return iNextIdx !== iIdx ? aItems[iNextIdx] : undefined;
530
+ };
531
+
532
+ /**
533
+ * Sets the hovered menu item.
534
+ *
535
+ * @param {sap.m.IMenuItem} oItem the menu item to be set as hovered
536
+ * @param {boolean} bCloseOpenedSubmenu whether the opened submenu should be closed or not
537
+ * @private
538
+ */
539
+ MenuWrapper.prototype._setHoveredItem = function(oItem, bCloseOpenedSubmenu) {
540
+ if (!oItem || oItem === this.oHoveredItem) {
541
+ return;
542
+ }
543
+
544
+ if (oItem) {
545
+ bCloseOpenedSubmenu && this._closeOpenedSubmenu();
546
+ this.oHoveredItem = oItem;
547
+ oItem.focus();
548
+ this.oFocusedEndContentItem = null;
549
+ }
550
+ };
551
+
552
+ /**
553
+ * Checks if an item is a MenuItemGroup or not.
554
+ *
555
+ * @param {sap.m.IMenuItem} oItem The item to be checked
556
+ * @returns {boolean} Whether the item is a MenuItemGroup or not
557
+ * @private
558
+ */
559
+ MenuWrapper.prototype._isMenuItemGroup = function(oItem) {
560
+ return !!oItem.getItemSelectionMode;
561
+ };
562
+
563
+ /**
564
+ * Returns the page size for the menu.
565
+ *
566
+ * @returns {number} The page size for the menu
567
+ * @private
568
+ */
569
+ MenuWrapper.prototype._getPageSize = function() {
570
+ return 5;
571
+ };
572
+
573
+ /**
574
+ * Closes already opened submenu (if any).
575
+ *
576
+ * @param {boolean} bDelayed Whether the submenu is closed with delay or not
577
+ * @private
578
+ */
579
+ MenuWrapper.prototype._closeOpenedSubmenu = function(bDelayed) {
580
+ if (this.oOpenedSubmenuParent) {
581
+ const oSubmenuPopover = this.oOpenedSubmenuParent._getPopover(),
582
+ oMenuWrapper = this.getItems().includes(this.oOpenedSubmenuParent) ? this.oOpenedSubmenuParent._getMenuWrapper() : null;
583
+
584
+ if (oSubmenuPopover && oSubmenuPopover._oControl) {
585
+ oSubmenuPopover._oControl._oPreviousFocus = undefined;
586
+ }
587
+
588
+ this.oOpenedSubmenuParent = null;
589
+ if (!oMenuWrapper) {
590
+ return;
591
+ }
592
+
593
+ if (bDelayed) {
594
+ setTimeout(() => {
595
+ oMenuWrapper.fireClosePopover();
596
+ }, DELAY_SUBMENU_TIMER);
597
+ } else {
598
+ oMenuWrapper.fireClosePopover();
599
+ }
600
+ }
601
+ };
602
+
603
+ /**
604
+ * Opens the submenu of the given item (if any).
605
+ *
606
+ * @param {Object} oItem The item opener
607
+ * @param {boolean} bWithKeyboard Whether the submenu is opened via keyboard
608
+ *
609
+ * @private
610
+ */
611
+ MenuWrapper.prototype._openSubmenu = function(oItem, bWithKeyboard) {
612
+ if (!oItem) {
613
+ return;
614
+ }
615
+
616
+ const oPopover = oItem._getPopover();
617
+
618
+ oItem._getMenuWrapper()._processStyleClasses(this._aStyleClasses.join(" "), "setStyleClass");
619
+
620
+ oPopover.setInitialFocus(bWithKeyboard ? null : oItem);
621
+ oItem._openSubmenu();
622
+ oItem._setExtraContent(this.getDomRef());
623
+ this.oOpenedSubmenuParent = oItem;
624
+ oItem.oParentWrapper = this;
625
+ };
626
+
627
+ /**
628
+ * Opens the submenu of the given item with a delay.
629
+ *
630
+ * @param {sap.m.IMenuItem} oItem The item that have submenu
631
+ * @param {boolean} bWithKeyboard Whether the submenu is opened via keyboard
632
+ */
633
+ MenuWrapper.prototype._openSubmenuDelayed = function(oItem, bWithKeyboard) {
634
+ this._delayedSubmenuTimer = setTimeout(() => this._openSubmenu(oItem, bWithKeyboard) , DELAY_SUBMENU_TIMER);
635
+ };
636
+
637
+ /**
638
+ * Discards the delayed submenu opening.
639
+ *
640
+ * @private
641
+ */
642
+ MenuWrapper.prototype._discardOpenSubmenuDelayed = function() {
643
+ if (this._delayedSubmenuTimer) {
644
+ clearTimeout(this._delayedSubmenuTimer);
645
+ this._delayedSubmenuTimer = null;
646
+ }
647
+ };
648
+
649
+ /**
650
+ * Returns the number of items with icon in the menu.
651
+ *
652
+ * @returns {number} The number of items with icon
653
+ * @private
654
+ */
655
+ MenuWrapper.prototype._getItemsWithIconCount = function() {
656
+ return this._getVisibleItems().filter((oItem) => oItem.getIcon && oItem.getIcon()).length;
657
+ };
658
+
659
+ MenuWrapper.prototype._getAccessibilityEnabled = function() {
660
+ };
661
+
662
+ /**
663
+ * Configures the accessibility information necessary for rendering the menu items.
664
+ *
665
+ * @private
666
+ */
667
+ MenuWrapper.prototype._prepareItemsAccessibilityInfo = function() {
668
+ const aItems = this._getVisibleItems(),
669
+ iFocusableItemsCount = aItems.filter((oItem) => oItem.isCountable && oItem.isCountable()).length;
670
+ let iIndex = 1;
671
+
672
+ aItems.forEach((oItem) => {
673
+ const oAccInfo = {
674
+ bAccessible: true
675
+ };
676
+ if (oItem.isCountable && oItem.isCountable()) {
677
+ oAccInfo["posinset"] = iIndex;
678
+ oAccInfo["setsize"] = iFocusableItemsCount;
679
+ iIndex++;
680
+ }
681
+ oItem._oAccInfo = oAccInfo;
682
+ });
683
+ };
684
+
685
+ return MenuWrapper;
686
+ });