@openui5/sap.m 1.121.1 → 1.122.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 (440) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +4 -4
  3. package/src/sap/m/.library +1 -1
  4. package/src/sap/m/AccButton.js +1 -1
  5. package/src/sap/m/ActionListItem.js +1 -1
  6. package/src/sap/m/ActionSelect.js +1 -1
  7. package/src/sap/m/ActionSheet.js +1 -1
  8. package/src/sap/m/ActionTile.js +4 -3
  9. package/src/sap/m/ActionTileContent.js +8 -4
  10. package/src/sap/m/AdditionalTextButton.js +1 -1
  11. package/src/sap/m/App.js +1 -1
  12. package/src/sap/m/AssociativeOverflowToolbar.js +2 -2
  13. package/src/sap/m/Avatar.js +2 -2
  14. package/src/sap/m/Bar.js +1 -1
  15. package/src/sap/m/Breadcrumbs.js +1 -1
  16. package/src/sap/m/BusyDialog.js +3 -3
  17. package/src/sap/m/BusyIndicator.js +1 -1
  18. package/src/sap/m/Button.js +1 -1
  19. package/src/sap/m/Carousel.js +9 -1
  20. package/src/sap/m/CarouselLayout.js +1 -1
  21. package/src/sap/m/CheckBox.js +1 -1
  22. package/src/sap/m/ColorPalette.js +88 -16
  23. package/src/sap/m/ColorPalettePopover.js +11 -3
  24. package/src/sap/m/ColorPaletteRenderer.js +22 -5
  25. package/src/sap/m/Column.js +1 -1
  26. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  27. package/src/sap/m/ColumnListItem.js +1 -1
  28. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  29. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  30. package/src/sap/m/ColumnPopoverItem.js +1 -1
  31. package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
  32. package/src/sap/m/ColumnPopoverSortItem.js +1 -1
  33. package/src/sap/m/ComboBox.js +1 -1
  34. package/src/sap/m/ComboBoxBase.js +1 -1
  35. package/src/sap/m/ComboBoxTextField.js +1 -1
  36. package/src/sap/m/ContentConfig.js +4 -3
  37. package/src/sap/m/CustomListItem.js +1 -1
  38. package/src/sap/m/CustomTile.js +1 -1
  39. package/src/sap/m/CustomTreeItem.js +1 -1
  40. package/src/sap/m/DatePicker.js +1 -1
  41. package/src/sap/m/DateRangeSelection.js +2 -2
  42. package/src/sap/m/DateTimeField.js +1 -1
  43. package/src/sap/m/DateTimeInput.js +1 -1
  44. package/src/sap/m/DateTimePicker.js +1 -1
  45. package/src/sap/m/Dialog.js +1 -1
  46. package/src/sap/m/DisplayListItem.js +1 -1
  47. package/src/sap/m/DraftIndicator.js +1 -1
  48. package/src/sap/m/DynamicDate.js +1 -1
  49. package/src/sap/m/DynamicDateOption.js +1 -1
  50. package/src/sap/m/DynamicDateRange.js +15 -3
  51. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  52. package/src/sap/m/ExpandableText.js +1 -1
  53. package/src/sap/m/FacetFilter.js +1 -1
  54. package/src/sap/m/FacetFilterItem.js +1 -1
  55. package/src/sap/m/FacetFilterList.js +1 -1
  56. package/src/sap/m/FeedContent.js +1 -1
  57. package/src/sap/m/FeedInput.js +1 -1
  58. package/src/sap/m/FeedListItem.js +21 -4
  59. package/src/sap/m/FeedListItemAction.js +1 -1
  60. package/src/sap/m/Fiori20Adapter.js +2 -2
  61. package/src/sap/m/FlexBox.js +1 -1
  62. package/src/sap/m/FlexItemData.js +1 -1
  63. package/src/sap/m/FormattedText.js +1 -1
  64. package/src/sap/m/GenericTag.js +1 -1
  65. package/src/sap/m/GenericTile.js +6 -5
  66. package/src/sap/m/GroupHeaderListItem.js +1 -1
  67. package/src/sap/m/GrowingList.js +1 -1
  68. package/src/sap/m/HBox.js +1 -1
  69. package/src/sap/m/HeaderContainer.js +1 -3
  70. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  71. package/src/sap/m/IconTabBar.js +1 -1
  72. package/src/sap/m/IconTabBarSelectList.js +1 -1
  73. package/src/sap/m/IconTabFilter.js +27 -33
  74. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  75. package/src/sap/m/IconTabHeader.js +8 -1
  76. package/src/sap/m/IconTabSeparator.js +1 -1
  77. package/src/sap/m/IllustratedMessage.js +1 -1
  78. package/src/sap/m/IllustratedMessageType.js +1 -1
  79. package/src/sap/m/Illustration.js +1 -1
  80. package/src/sap/m/Image.js +1 -1
  81. package/src/sap/m/ImageContent.js +1 -1
  82. package/src/sap/m/Input.js +5 -3
  83. package/src/sap/m/InputBase.js +1 -1
  84. package/src/sap/m/InputListItem.js +1 -1
  85. package/src/sap/m/Label.js +1 -1
  86. package/src/sap/m/LightBox.js +1 -1
  87. package/src/sap/m/LightBoxItem.js +1 -1
  88. package/src/sap/m/Link.js +1 -1
  89. package/src/sap/m/LinkTileContent.js +1 -1
  90. package/src/sap/m/List.js +1 -1
  91. package/src/sap/m/ListBase.js +1 -1
  92. package/src/sap/m/ListItemBase.js +1 -1
  93. package/src/sap/m/MaskEnabler.js +1 -1
  94. package/src/sap/m/MaskInput.js +1 -1
  95. package/src/sap/m/MaskInputRule.js +1 -1
  96. package/src/sap/m/Menu.js +1 -1
  97. package/src/sap/m/MenuButton.js +1 -2
  98. package/src/sap/m/MenuItem.js +1 -1
  99. package/src/sap/m/MenuListItem.js +1 -1
  100. package/src/sap/m/MessageItem.js +1 -1
  101. package/src/sap/m/MessageListItem.js +1 -1
  102. package/src/sap/m/MessagePage.js +1 -1
  103. package/src/sap/m/MessagePopover.js +1 -1
  104. package/src/sap/m/MessagePopoverItem.js +1 -1
  105. package/src/sap/m/MessageStrip.js +1 -1
  106. package/src/sap/m/MessageToast.js +1 -1
  107. package/src/sap/m/MessageView.js +2 -2
  108. package/src/sap/m/MultiComboBox.js +1 -1
  109. package/src/sap/m/MultiEditField.js +1 -1
  110. package/src/sap/m/MultiInput.js +16 -5
  111. package/src/sap/m/NavContainer.js +1 -3
  112. package/src/sap/m/NewsContent.js +1 -1
  113. package/src/sap/m/NotificationList.js +1 -1
  114. package/src/sap/m/NotificationListBase.js +1 -1
  115. package/src/sap/m/NotificationListGroup.js +5 -10
  116. package/src/sap/m/NotificationListItem.js +1 -1
  117. package/src/sap/m/NumericContent.js +1 -1
  118. package/src/sap/m/NumericInput.js +1 -1
  119. package/src/sap/m/ObjectAttribute.js +1 -1
  120. package/src/sap/m/ObjectHeader.js +1 -1
  121. package/src/sap/m/ObjectIdentifier.js +1 -1
  122. package/src/sap/m/ObjectListItem.js +1 -1
  123. package/src/sap/m/ObjectMarker.js +1 -1
  124. package/src/sap/m/ObjectNumber.js +1 -1
  125. package/src/sap/m/ObjectStatus.js +1 -1
  126. package/src/sap/m/OverflowToolbar.js +1 -1
  127. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  128. package/src/sap/m/OverflowToolbarButton.js +1 -1
  129. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  130. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  131. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  132. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  133. package/src/sap/m/P13nColumnsItem.js +1 -1
  134. package/src/sap/m/P13nColumnsPanel.js +1 -1
  135. package/src/sap/m/P13nConditionPanel.js +1 -1
  136. package/src/sap/m/P13nDialog.js +1 -1
  137. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  138. package/src/sap/m/P13nDimMeasurePanel.js +1 -1
  139. package/src/sap/m/P13nFilterItem.js +1 -1
  140. package/src/sap/m/P13nFilterPanel.js +1 -1
  141. package/src/sap/m/P13nGroupItem.js +1 -1
  142. package/src/sap/m/P13nGroupPanel.js +1 -1
  143. package/src/sap/m/P13nItem.js +1 -1
  144. package/src/sap/m/P13nPanel.js +1 -1
  145. package/src/sap/m/P13nSelectionItem.js +1 -1
  146. package/src/sap/m/P13nSelectionPanel.js +1 -1
  147. package/src/sap/m/P13nSortItem.js +1 -1
  148. package/src/sap/m/P13nSortPanel.js +1 -1
  149. package/src/sap/m/PDFViewer.js +1 -1
  150. package/src/sap/m/Page.js +1 -1
  151. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  152. package/src/sap/m/PagingButton.js +1 -1
  153. package/src/sap/m/Panel.js +1 -1
  154. package/src/sap/m/PlanningCalendar.js +165 -73
  155. package/src/sap/m/PlanningCalendarHeader.js +9 -2
  156. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  157. package/src/sap/m/PlanningCalendarRow.js +1 -1
  158. package/src/sap/m/PlanningCalendarView.js +1 -1
  159. package/src/sap/m/Popover.js +1 -1
  160. package/src/sap/m/ProgressIndicator.js +1 -1
  161. package/src/sap/m/PullToRefresh.js +1 -1
  162. package/src/sap/m/QuickView.js +1 -1
  163. package/src/sap/m/QuickViewBase.js +1 -1
  164. package/src/sap/m/QuickViewCard.js +1 -1
  165. package/src/sap/m/QuickViewGroup.js +1 -1
  166. package/src/sap/m/QuickViewGroupElement.js +1 -1
  167. package/src/sap/m/QuickViewPage.js +1 -1
  168. package/src/sap/m/RadioButton.js +1 -1
  169. package/src/sap/m/RadioButtonGroup.js +2 -3
  170. package/src/sap/m/RangeSlider.js +1 -1
  171. package/src/sap/m/RatingIndicator.js +1 -1
  172. package/src/sap/m/ResponsivePopover.js +1 -1
  173. package/src/sap/m/ResponsiveScale.js +1 -1
  174. package/src/sap/m/ScrollBar.js +1 -1
  175. package/src/sap/m/ScrollContainer.js +1 -1
  176. package/src/sap/m/SearchField.js +1 -1
  177. package/src/sap/m/SegmentedButton.js +1 -1
  178. package/src/sap/m/SegmentedButtonItem.js +1 -1
  179. package/src/sap/m/Select.js +1 -1
  180. package/src/sap/m/SelectDialog.js +1 -4
  181. package/src/sap/m/SelectDialogBase.js +1 -1
  182. package/src/sap/m/SelectList.js +1 -1
  183. package/src/sap/m/SelectionDetails.js +1 -1
  184. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  185. package/src/sap/m/SelectionDetailsItem.js +1 -1
  186. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  187. package/src/sap/m/Shell.js +1 -1
  188. package/src/sap/m/SimpleFixFlex.js +1 -1
  189. package/src/sap/m/SinglePlanningCalendar.js +1 -1
  190. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  191. package/src/sap/m/SinglePlanningCalendarGrid.js +15 -26
  192. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +18 -3
  193. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  194. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  195. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  196. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  197. package/src/sap/m/SlideTile.js +1 -1
  198. package/src/sap/m/Slider.js +1 -1
  199. package/src/sap/m/SliderTooltip.js +1 -1
  200. package/src/sap/m/SliderTooltipBase.js +1 -1
  201. package/src/sap/m/SliderTooltipContainer.js +1 -1
  202. package/src/sap/m/SplitApp.js +1 -1
  203. package/src/sap/m/SplitButton.js +1 -1
  204. package/src/sap/m/SplitContainer.js +1 -1
  205. package/src/sap/m/StandardDynamicDateOption.js +1 -1
  206. package/src/sap/m/StandardListItem.js +1 -1
  207. package/src/sap/m/StandardTile.js +1 -1
  208. package/src/sap/m/StandardTreeItem.js +1 -1
  209. package/src/sap/m/StepInput.js +1 -1
  210. package/src/sap/m/SuggestionItem.js +1 -1
  211. package/src/sap/m/SuggestionsPopover.js +1 -1
  212. package/src/sap/m/Switch.js +1 -1
  213. package/src/sap/m/TabContainer.js +1 -1
  214. package/src/sap/m/TabContainerItem.js +1 -1
  215. package/src/sap/m/TabStrip.js +13 -6
  216. package/src/sap/m/TabStripItem.js +1 -1
  217. package/src/sap/m/Table.js +2 -3
  218. package/src/sap/m/TablePersoController.js +1 -1
  219. package/src/sap/m/TablePersoDialog.js +1 -1
  220. package/src/sap/m/TablePersoProvider.js +1 -1
  221. package/src/sap/m/TableSelectDialog.js +1 -4
  222. package/src/sap/m/Text.js +1 -1
  223. package/src/sap/m/TextArea.js +5 -6
  224. package/src/sap/m/Tile.js +1 -1
  225. package/src/sap/m/TileAttribute.js +4 -3
  226. package/src/sap/m/TileContainer.js +1 -1
  227. package/src/sap/m/TileContent.js +1 -1
  228. package/src/sap/m/TimePicker.js +1 -1
  229. package/src/sap/m/TimePickerClock.js +1 -1
  230. package/src/sap/m/TimePickerClocks.js +1 -1
  231. package/src/sap/m/TimePickerInputs.js +1 -1
  232. package/src/sap/m/TimePickerInternals.js +1 -1
  233. package/src/sap/m/TimePickerSlider.js +1 -1
  234. package/src/sap/m/TimePickerSliders.js +1 -1
  235. package/src/sap/m/Title.js +1 -1
  236. package/src/sap/m/TitlePropagationSupport.js +1 -1
  237. package/src/sap/m/ToggleButton.js +1 -1
  238. package/src/sap/m/Token.js +1 -1
  239. package/src/sap/m/Tokenizer.js +16 -3
  240. package/src/sap/m/Toolbar.js +3 -3
  241. package/src/sap/m/ToolbarLayoutData.js +1 -1
  242. package/src/sap/m/ToolbarSeparator.js +1 -1
  243. package/src/sap/m/ToolbarSpacer.js +1 -1
  244. package/src/sap/m/Tree.js +1 -1
  245. package/src/sap/m/TreeItemBase.js +1 -1
  246. package/src/sap/m/UploadCollection.js +1 -1
  247. package/src/sap/m/UploadCollectionItem.js +1 -1
  248. package/src/sap/m/UploadCollectionParameter.js +1 -1
  249. package/src/sap/m/UploadCollectionRenderer.js +1 -1
  250. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  251. package/src/sap/m/VBox.js +1 -1
  252. package/src/sap/m/ValueStateHeader.js +2 -1
  253. package/src/sap/m/VariantItem.js +5 -1
  254. package/src/sap/m/VariantManagement.js +98 -53
  255. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  256. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  257. package/src/sap/m/ViewSettingsDialog.js +1 -1
  258. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  259. package/src/sap/m/ViewSettingsItem.js +1 -1
  260. package/src/sap/m/VisibleItem.js +1 -1
  261. package/src/sap/m/WheelSlider.js +1 -1
  262. package/src/sap/m/WheelSliderContainer.js +1 -1
  263. package/src/sap/m/Wizard.js +1 -1
  264. package/src/sap/m/WizardProgressNavigator.js +1 -1
  265. package/src/sap/m/WizardStep.js +1 -1
  266. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  267. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  268. package/src/sap/m/changeHandler/CombineButtons.js +2 -6
  269. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  270. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  271. package/src/sap/m/changeHandler/SplitMenuButton.js +2 -6
  272. package/src/sap/m/designtime/messagebundle_mk.properties +1 -1
  273. package/src/sap/m/library.js +32 -6
  274. package/src/sap/m/messagebundle.properties +12 -3
  275. package/src/sap/m/messagebundle_ar.properties +20 -5
  276. package/src/sap/m/messagebundle_bg.properties +20 -5
  277. package/src/sap/m/messagebundle_ca.properties +21 -6
  278. package/src/sap/m/messagebundle_cnr.properties +20 -5
  279. package/src/sap/m/messagebundle_cs.properties +21 -6
  280. package/src/sap/m/messagebundle_cy.properties +21 -6
  281. package/src/sap/m/messagebundle_da.properties +25 -10
  282. package/src/sap/m/messagebundle_de.properties +24 -9
  283. package/src/sap/m/messagebundle_el.properties +38 -23
  284. package/src/sap/m/messagebundle_en.properties +15 -1136
  285. package/src/sap/m/messagebundle_en_GB.properties +21 -6
  286. package/src/sap/m/messagebundle_en_US_saprigi.properties +6 -3
  287. package/src/sap/m/messagebundle_es.properties +20 -5
  288. package/src/sap/m/messagebundle_es_MX.properties +22 -7
  289. package/src/sap/m/messagebundle_et.properties +20 -5
  290. package/src/sap/m/messagebundle_fi.properties +21 -6
  291. package/src/sap/m/messagebundle_fr.properties +21 -6
  292. package/src/sap/m/messagebundle_fr_CA.properties +23 -8
  293. package/src/sap/m/messagebundle_hi.properties +21 -6
  294. package/src/sap/m/messagebundle_hr.properties +22 -7
  295. package/src/sap/m/messagebundle_hu.properties +26 -11
  296. package/src/sap/m/messagebundle_id.properties +21 -6
  297. package/src/sap/m/messagebundle_it.properties +20 -5
  298. package/src/sap/m/messagebundle_iw.properties +21 -6
  299. package/src/sap/m/messagebundle_ja.properties +20 -5
  300. package/src/sap/m/messagebundle_kk.properties +21 -6
  301. package/src/sap/m/messagebundle_ko.properties +20 -5
  302. package/src/sap/m/messagebundle_lt.properties +21 -6
  303. package/src/sap/m/messagebundle_lv.properties +20 -5
  304. package/src/sap/m/messagebundle_mk.properties +30 -15
  305. package/src/sap/m/messagebundle_ms.properties +21 -6
  306. package/src/sap/m/messagebundle_nl.properties +20 -5
  307. package/src/sap/m/messagebundle_no.properties +20 -5
  308. package/src/sap/m/messagebundle_pl.properties +22 -7
  309. package/src/sap/m/messagebundle_pt.properties +20 -5
  310. package/src/sap/m/messagebundle_pt_PT.properties +20 -5
  311. package/src/sap/m/messagebundle_ro.properties +21 -6
  312. package/src/sap/m/messagebundle_ru.properties +20 -5
  313. package/src/sap/m/messagebundle_sh.properties +20 -5
  314. package/src/sap/m/messagebundle_sk.properties +22 -7
  315. package/src/sap/m/messagebundle_sl.properties +22 -7
  316. package/src/sap/m/messagebundle_sr.properties +20 -5
  317. package/src/sap/m/messagebundle_sv.properties +21 -6
  318. package/src/sap/m/messagebundle_th.properties +20 -5
  319. package/src/sap/m/messagebundle_tr.properties +20 -5
  320. package/src/sap/m/messagebundle_uk.properties +21 -6
  321. package/src/sap/m/messagebundle_vi.properties +21 -6
  322. package/src/sap/m/messagebundle_zh_CN.properties +20 -5
  323. package/src/sap/m/messagebundle_zh_TW.properties +21 -6
  324. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  325. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  326. package/src/sap/m/p13n/BasePanel.js +1 -1
  327. package/src/sap/m/p13n/Container.js +1 -1
  328. package/src/sap/m/p13n/Engine.js +11 -3
  329. package/src/sap/m/p13n/FilterController.js +1 -1
  330. package/src/sap/m/p13n/FilterPanel.js +1 -1
  331. package/src/sap/m/p13n/GroupController.js +1 -1
  332. package/src/sap/m/p13n/GroupPanel.js +1 -1
  333. package/src/sap/m/p13n/Popup.js +1 -1
  334. package/src/sap/m/p13n/QueryPanel.js +7 -4
  335. package/src/sap/m/p13n/SelectionController.js +1 -1
  336. package/src/sap/m/p13n/SelectionPanel.js +1 -1
  337. package/src/sap/m/p13n/SortController.js +1 -1
  338. package/src/sap/m/p13n/SortPanel.js +1 -1
  339. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
  340. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  341. package/src/sap/m/p13n/modules/UIManager.js +1 -1
  342. package/src/sap/m/plugins/CellSelector.js +615 -183
  343. package/src/sap/m/plugins/ColumnResizer.js +1 -1
  344. package/src/sap/m/plugins/ContextMenuSetting.js +1 -1
  345. package/src/sap/m/plugins/CopyProvider.js +1 -1
  346. package/src/sap/m/plugins/DataStateIndicator.js +1 -1
  347. package/src/sap/m/plugins/PasteProvider.js +1 -1
  348. package/src/sap/m/plugins/PluginBase.js +1 -1
  349. package/src/sap/m/semantic/AddAction.js +1 -1
  350. package/src/sap/m/semantic/CancelAction.js +1 -1
  351. package/src/sap/m/semantic/DeleteAction.js +1 -1
  352. package/src/sap/m/semantic/DetailPage.js +1 -1
  353. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  354. package/src/sap/m/semantic/EditAction.js +1 -1
  355. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  356. package/src/sap/m/semantic/FilterAction.js +1 -1
  357. package/src/sap/m/semantic/FilterSelect.js +1 -1
  358. package/src/sap/m/semantic/FlagAction.js +1 -1
  359. package/src/sap/m/semantic/ForwardAction.js +1 -1
  360. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  361. package/src/sap/m/semantic/GroupAction.js +1 -1
  362. package/src/sap/m/semantic/GroupSelect.js +1 -1
  363. package/src/sap/m/semantic/MainAction.js +1 -1
  364. package/src/sap/m/semantic/MasterPage.js +1 -1
  365. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  366. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  367. package/src/sap/m/semantic/NegativeAction.js +1 -1
  368. package/src/sap/m/semantic/OpenInAction.js +1 -1
  369. package/src/sap/m/semantic/PositiveAction.js +1 -1
  370. package/src/sap/m/semantic/PrintAction.js +1 -1
  371. package/src/sap/m/semantic/SaveAction.js +1 -1
  372. package/src/sap/m/semantic/Segment.js +1 -1
  373. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  374. package/src/sap/m/semantic/SemanticButton.js +1 -1
  375. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  376. package/src/sap/m/semantic/SemanticControl.js +1 -1
  377. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  378. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  379. package/src/sap/m/semantic/SemanticPage.js +1 -1
  380. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  381. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  382. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  383. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  384. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  385. package/src/sap/m/semantic/ShareMenu.js +1 -1
  386. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  387. package/src/sap/m/semantic/SortAction.js +1 -1
  388. package/src/sap/m/semantic/SortSelect.js +1 -1
  389. package/src/sap/m/table/ColumnWidthController.js +1 -1
  390. package/src/sap/m/table/Util.js +15 -2
  391. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  392. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  393. package/src/sap/m/table/columnmenu/Item.js +1 -1
  394. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  395. package/src/sap/m/table/columnmenu/Menu.js +1 -1
  396. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  397. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  398. package/src/sap/m/table/columnmenu/QuickActionItem.js +24 -1
  399. package/src/sap/m/table/columnmenu/QuickGroup.js +3 -3
  400. package/src/sap/m/table/columnmenu/QuickGroupItem.js +2 -7
  401. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  402. package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
  403. package/src/sap/m/table/columnmenu/QuickTotal.js +1 -1
  404. package/src/sap/m/table/columnmenu/QuickTotalItem.js +2 -7
  405. package/src/sap/m/themes/base/CellSelector.less +9 -5
  406. package/src/sap/m/themes/base/ColorPalette.less +28 -15
  407. package/src/sap/m/themes/base/DateTimePicker.less +0 -1
  408. package/src/sap/m/themes/base/Dialog.less +1 -0
  409. package/src/sap/m/themes/base/FeedInput.less +0 -4
  410. package/src/sap/m/themes/base/GenericTile.less +7 -1
  411. package/src/sap/m/themes/base/IconTabBar.less +41 -74
  412. package/src/sap/m/themes/base/IllustratedMessage.less +29 -21
  413. package/src/sap/m/themes/base/MenuButton.less +2 -2
  414. package/src/sap/m/themes/base/MultiComboBox.less +4 -2
  415. package/src/sap/m/themes/base/ObjectMarker.less +6 -0
  416. package/src/sap/m/themes/base/Panel.less +1 -0
  417. package/src/sap/m/themes/base/RadioButton.less +4 -0
  418. package/src/sap/m/themes/base/RadioButtonGroup.less +24 -2
  419. package/src/sap/m/themes/base/UploadCollection.less +0 -1
  420. package/src/sap/m/themes/base/UploadSet.less +5 -0
  421. package/src/sap/m/themes/base/VariantManagement.less +5 -0
  422. package/src/sap/m/themes/base/ViewSettingsDialog.less +2 -1
  423. package/src/sap/m/themes/base/illustrations/{sapIllus-Dot-SimpleCheckmark.svg → sapIllus-Dot-SimpleCheckMark.svg} +1 -1
  424. package/src/sap/m/upload/ActionsPlaceholder.js +1 -1
  425. package/src/sap/m/upload/Column.js +1 -1
  426. package/src/sap/m/upload/FilePreviewDialog.js +4 -3
  427. package/src/sap/m/upload/UploadSet.js +1 -1
  428. package/src/sap/m/upload/UploadSetItem.js +5 -3
  429. package/src/sap/m/upload/UploadSetRenderer.js +1 -1
  430. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  431. package/src/sap/m/upload/UploadSetwithTable.js +1 -1
  432. package/src/sap/m/upload/UploadSetwithTableItem.js +1 -1
  433. package/src/sap/m/upload/UploaderTableItem.js +1 -1
  434. package/src/sap/m/upload/p13n/PersManager.js +1 -1
  435. package/src/sap/m/upload/p13n/mediator/BaseMediator.js +1 -1
  436. package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +1 -1
  437. package/src/sap/m/upload/p13n/mediator/FilterMediator.js +1 -1
  438. package/src/sap/m/upload/p13n/mediator/GroupMediator.js +1 -1
  439. package/src/sap/m/upload/p13n/mediator/SortMediator.js +1 -1
  440. package/src/sap/m/upload/p13n/modules/PersPopupManager.js +1 -1
@@ -9,15 +9,35 @@ sap.ui.define([
9
9
  "sap/base/util/deepEqual",
10
10
  "sap/ui/events/KeyCodes",
11
11
  "sap/ui/core/Element",
12
- "sap/base/Log"
13
- ], function (PluginBase, Localization, deepEqual, KeyCodes, Element, Log) {
12
+ "sap/m/library"
13
+ ], function (PluginBase, Localization, deepEqual, KeyCodes, Element, library) {
14
14
  "use strict";
15
15
 
16
- var DIRECTION = {
16
+ const ListMode = library.ListMode;
17
+ const RESPONSIVETABLE_ENABLED = new URLSearchParams(window.location.search).get("sap-ui-xx-cellSelectionMTable") === "true";
18
+ const DELAY_SHORT = 250; //TBD Are 2 different delays necessary?
19
+ const DELAY_LONG = DELAY_SHORT * 2;
20
+
21
+ const DIRECTION = {
17
22
  ROW: "row",
18
23
  COL: "col"
19
24
  };
20
25
 
26
+ const CellType = {
27
+ /**
28
+ * Data cells that can be selected.
29
+ */
30
+ Cell: "Cell",
31
+ /**
32
+ * Cells that are not "normal" and could require special handling or look different.
33
+ */
34
+ Other: "Other",
35
+ /**
36
+ * Cells that can be ignored from selection, but should be respected to not interrupt selection.
37
+ */
38
+ Ignore: "Ignore"
39
+ };
40
+
21
41
  /**
22
42
  * Constructor for a new CellSelector plugin.
23
43
  *
@@ -45,7 +65,7 @@ sap.ui.define([
45
65
  * </ul>
46
66
  *
47
67
  * @extends sap.ui.core.Element
48
- * @version 1.121.1
68
+ * @version 1.122.1
49
69
  * @author SAP SE
50
70
  *
51
71
  * @public
@@ -94,6 +114,16 @@ sap.ui.define([
94
114
  * @property {sap.ui.core.Element[]} columns The column instances of the selected cells; the content is based on the owner control.
95
115
  */
96
116
 
117
+ /**
118
+ * An object representing the position of a cell.
119
+ *
120
+ * Consists of a row index and a column index describing the position of the cell in the table.
121
+ * @private
122
+ * @typedef {object} sap.m.plugins.CellSelector.CellPosition
123
+ * @property {number} rowIndex row index of the cell
124
+ * @property {number} colIndex column index of the cell
125
+ */
126
+
97
127
  /**
98
128
  * Event Delegate that containts events, that need to be executed after control events.
99
129
  */
@@ -105,10 +135,13 @@ sap.ui.define([
105
135
 
106
136
  if (isKeyCombination(oEvent, KeyCodes.A, true, true)
107
137
  || (isKeyCombination(oEvent, KeyCodes.A, false, true) && oEvent.isMarked(this.getConfig("eventClearedAll")))) {
108
- if (isCell(oEvent.target, this.getConfig("tableCell"))) {
138
+ if (isSelectableCell(oEvent.target, this.getConfig("selectableCells"))) {
109
139
  this.removeSelection();
110
140
  oEvent.preventDefault();
111
141
  }
142
+ } else if (isKeyCombination(oEvent, KeyCodes.SPACE, true, false) || isKeyCombination(oEvent, KeyCodes.SPACE, false, true)) {
143
+ // prevent scrolling by pressing space
144
+ oEvent.preventDefault();
112
145
  }
113
146
  }
114
147
  };
@@ -118,25 +151,21 @@ sap.ui.define([
118
151
  */
119
152
  const PriorityDelegate = {
120
153
  onBeforeRendering: function() {
121
- this._iRtl = Localization.getRTL() ? -1 : 1;
154
+ this._iBtt = this.getConfig("isBottomToTop", this.getControl()) ? -1 : 1;
122
155
  if (this._oResizer) {
123
156
  // remove resizer, as due to rerendering table element may be gone
124
157
  this._oResizer.remove();
125
158
  this._oResizer = null;
126
159
  }
127
- if (this._bSelecting) {
128
- this.removeSelection();
129
- }
130
160
  },
131
161
  onAfterRendering: function() {
132
162
  this._deregisterEvents();
133
163
  this._registerEvents();
134
- },
135
- onsapspace: function (oEvent) {
136
- if (!this._isSelectableCell(oEvent.target)) {
137
- return;
138
- }
139
- this._startSelection(oEvent, false);
164
+
165
+ this._bSelecting && !this._bMouseDown && this.removeSelection();
166
+ this._bSelecting && this._selectCells();
167
+
168
+ this._bRenderResizer = this.getConfig("shouldRenderResizer", this.getControl());
140
169
  },
141
170
  onsapupmodifiers: function(oEvent) {
142
171
  this._onsaparrowmodifiers(oEvent, DIRECTION.ROW, -1, 0);
@@ -144,6 +173,11 @@ sap.ui.define([
144
173
  onsapdownmodifiers: function(oEvent) {
145
174
  this._onsaparrowmodifiers(oEvent, DIRECTION.ROW, 1, 0);
146
175
  },
176
+ onsapspace: function(oEvent) {
177
+ if (isSelectableCell(oEvent.target, this.getConfig("selectableCells"))) {
178
+ oEvent.preventDefault(); // prevent event otherwise m.Table will scroll
179
+ }
180
+ },
147
181
  onsapleftmodifiers: function(oEvent) {
148
182
  this._onsaparrowmodifiers(oEvent, DIRECTION.COL, 0, -1);
149
183
  },
@@ -155,7 +189,7 @@ sap.ui.define([
155
189
  return;
156
190
  }
157
191
 
158
- if (this._bSelecting && isCell(oEvent.target, this.getConfig("tableCell"))) {
192
+ if (this._bSelecting && isSelectableCell(oEvent.target, this.getConfig("selectableCells"))) {
159
193
  this.removeSelection();
160
194
  oEvent.preventDefault();
161
195
  oEvent.stopPropagation();
@@ -166,23 +200,36 @@ sap.ui.define([
166
200
  return;
167
201
  }
168
202
 
169
- var mBounds = this._bSelecting ? this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget) : undefined;
170
- if (isKeyCombination(oEvent, KeyCodes.SPACE, true, false)) {
171
- if (this._inSelection(oEvent.target)) {
172
- var oInfo = this.getConfig("getCellInfo", this.getControl(), oEvent.target);
173
- this.getConfig("selectRows", this.getControl(), mBounds.from.rowIndex, mBounds.to.rowIndex, oInfo.rowIndex);
174
- oEvent.setMarked();
203
+ var mBounds = this._bSelecting ? this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget) : {};
204
+ if (isKeyCombination(oEvent, KeyCodes.SPACE, false, false)) {
205
+ if (!isSelectableCell(oEvent.target, this.getConfig("selectableCells"))) {
206
+ return;
207
+ }
208
+ this._oPreviousCell = null;
209
+ this._startSelection(oEvent, false);
210
+ oEvent.setMarked();
211
+ } else if (isKeyCombination(oEvent, KeyCodes.SPACE, true, false)) {
212
+ var oInfo = this.getConfig("getCellInfo", this.getControl(), oEvent.target, this._oPreviousCell);
213
+ if (!this._inSelection(oEvent.target)) {
214
+ mBounds.from = mBounds.to = {};
215
+ mBounds.from.rowIndex = mBounds.to.rowIndex = oInfo.rowIndex;
175
216
  }
176
217
 
218
+ this.getConfig("selectRows", this.getControl(), mBounds.from.rowIndex, mBounds.to.rowIndex, oInfo.rowIndex);
219
+
220
+ oEvent.setMarked();
177
221
  oEvent.preventDefault();
178
- } else if (this._bSelecting && isKeyCombination(oEvent, KeyCodes.SPACE, false, true)) {
222
+ } else if (isKeyCombination(oEvent, KeyCodes.SPACE, false, true) && this._getSelectableCell(oEvent.target)) {
179
223
  if (!this._inSelection(oEvent.target)) {
180
224
  // If focus is on cell outside of selection, select focused column
181
- var oInfo = this.getConfig("getCellInfo", this.getControl(), oEvent.target);
182
- mBounds.from.colIndex = mBounds.to.colIndex = oInfo.colIndex;
225
+ var oInfo = this.getConfig("getCellInfo", this.getControl(), oEvent.target, this._oPreviousCell);
226
+ mBounds.from = Object.assign({}, oInfo);
227
+ mBounds.to = Object.assign({}, oInfo);
183
228
  }
184
229
  mBounds.from.rowIndex = 0;
185
230
  mBounds.to.rowIndex = Infinity;
231
+
232
+ this._bSelecting = true;
186
233
  this._selectCells(mBounds.from, mBounds.to);
187
234
 
188
235
  oEvent.preventDefault();
@@ -200,24 +247,43 @@ sap.ui.define([
200
247
  var oSelectableCell = this._getSelectableCell(oEvent.target);
201
248
  if (oSelectableCell) {
202
249
  this._bMouseDown = true;
203
- this._mClickedCell = this._oPreviousCell = this.getConfig("getCellInfo", this.getControl(), oSelectableCell);
250
+ this._mClickedCell = this.getConfig("getCellInfo", this.getControl(), oSelectableCell, this._oPreviousCell);
251
+ this._oPreviousCell = this._mClickedCell;
204
252
  }
205
253
  },
206
254
  onmouseup: function(oEvent) {
255
+ clearTimeout(this._iTimer);
207
256
  this._bMouseDown = false;
208
257
  this._bBorderDown = false;
209
258
  this._mClickedCell = undefined;
210
259
  this._bScrolling = false;
211
260
  this._oPreviousCell = undefined;
261
+ this._mTempCell = undefined;
262
+ this._oHoveredCell = undefined;
212
263
  this._clearScroller();
213
264
  }
214
265
  };
215
266
 
267
+ function getRTL() {
268
+ return Localization.getRTL() ? -1 : 1;
269
+ }
270
+
271
+ CellSelector.prototype.init = function() {
272
+ this._iRtl = getRTL();
273
+ };
274
+
275
+ CellSelector.prototype.onLocalizationChanged = function() {
276
+ this._iRtl = getRTL();
277
+ this._iBtt = this.getConfig("isBottomToTop", this.getControl()) ? -1 : 1;
278
+ this.removeSelection();
279
+ };
280
+
216
281
  CellSelector.prototype.onActivate = function (oControl) {
217
282
  oControl.addDelegate(PriorityDelegate, true, this);
218
283
  oControl.addDelegate(EventDelegate, false, this);
219
284
 
220
- this._oSession = { cellRefs: [] };
285
+ this._oSession = { cellRefs: [], cellTypes: [] };
286
+ this._iBtt = this.getConfig("isBottomToTop", this.getControl()) ? -1 : 1;
221
287
  this._mTimeouts = {};
222
288
  this._fnControlUpdate = function(oEvent) {
223
289
  if (this._bScrolling) {
@@ -274,7 +340,7 @@ sap.ui.define([
274
340
  * @ui5-restricted sap.m.plugins.CopyProvider
275
341
  */
276
342
  CellSelector.prototype.isSelectable = function() {
277
- return this.isActive() ? this.getConfig("isSupported", this.getControl()) : false;
343
+ return this.isActive() ? this.getConfig("isSupported", this.getControl(), this) : false;
278
344
  };
279
345
 
280
346
  /**
@@ -300,15 +366,15 @@ sap.ui.define([
300
366
  CellSelector.prototype._registerEvents = function() {
301
367
  var oControl = this.getControl();
302
368
  if (oControl) {
303
- oControl.attachEvent(this.getConfig("scrollEvent"), this._fnControlUpdate);
369
+ this.getConfig("scrollEvent") && oControl.attachEvent(this.getConfig("scrollEvent"), this._fnControlUpdate);
304
370
  this.getConfig("attachSelectionChange", oControl, this._fnRemoveSelection);
305
371
  var oScrollArea = oControl.getDomRef(this.getConfig("scrollArea"));
306
372
  if (oScrollArea) {
307
373
  oScrollArea.addEventListener("mouseleave", this._fnOnMouseOut);
308
374
  oScrollArea.addEventListener("mouseenter", this._fnOnMouseEnter);
375
+ oScrollArea.addEventListener("mousemove", this._fnOnMouseMove);
309
376
  }
310
377
  }
311
- document.addEventListener("mousemove", this._fnOnMouseMove);
312
378
  document.addEventListener("mouseup", this._fnOnMouseUp);
313
379
  };
314
380
 
@@ -321,9 +387,9 @@ sap.ui.define([
321
387
  if (oScrollArea) {
322
388
  oScrollArea.removeEventListener("mouseleave", this._fnOnMouseOut);
323
389
  oScrollArea.removeEventListener("mouseenter", this._fnOnMouseEnter);
390
+ oScrollArea.removeEventListener("mousemove", this._fnOnMouseMove);
324
391
  }
325
392
  }
326
- document.removeEventListener("mousemove", this._fnOnMouseMove);
327
393
  document.removeEventListener("mouseup", this._fnOnMouseUp);
328
394
  };
329
395
 
@@ -347,9 +413,9 @@ sap.ui.define([
347
413
  return null;
348
414
  }
349
415
 
350
- var iMaxColumnIndex = this.getConfig("getVisibleColumns", this.getControl()).length - 1;
416
+ var iMaxColumnIndex = this.getConfig("numberOfColumns", this.getControl(), true) - 1;
351
417
  mSelectionRange.from.colIndex = Math.max(mSelectionRange.from.colIndex, 0);
352
- mSelectionRange.to.colIndex = Math.min(mSelectionRange.to.colIndex, iMaxColumnIndex);
418
+ mSelectionRange.to.colIndex = this._oSession.cellTypes.includes(CellType.Other) ? iMaxColumnIndex : Math.min(mSelectionRange.to.colIndex, iMaxColumnIndex);
353
419
  mSelectionRange.from.rowIndex = Math.max(mSelectionRange.from.rowIndex, 0);
354
420
 
355
421
  if (bIgnore) {
@@ -362,6 +428,8 @@ sap.ui.define([
362
428
  }
363
429
  });
364
430
  }
431
+ delete mSelectionRange.from.type;
432
+ delete mSelectionRange.to.type;
365
433
 
366
434
  return mSelectionRange;
367
435
  };
@@ -414,7 +482,7 @@ sap.ui.define([
414
482
  aSelection = aSelection.filter((oContext, iIndex) => !isGroupRow(this._getBinding(), oContext, iIndex + mSelectionRange.from.rowIndex));
415
483
  }
416
484
 
417
- var aSelectedColumns = this.getConfig("getVisibleColumns", this.getControl()).slice(mSelectionRange.from.colIndex, mSelectionRange.to.colIndex + 1);
485
+ var aSelectedColumns = this.getConfig("getVisibleColumns", this.getControl(), true).slice(mSelectionRange.from.colIndex, mSelectionRange.to.colIndex + 1);
418
486
  if (this.getControl().getParent().isA("sap.ui.mdc.Table")) {
419
487
  aSelectedColumns = aSelectedColumns.map(function(oSelectedColumn) {
420
488
  return Element.getElementById(oSelectedColumn.getId().replace(/\-innerColumn$/, ""));
@@ -427,8 +495,26 @@ sap.ui.define([
427
495
  };
428
496
  };
429
497
 
498
+ /**
499
+ * Remove the current selection block.
500
+ *
501
+ * @public
502
+ */
503
+ CellSelector.prototype.removeSelection = function () {
504
+ this._clearSelection();
505
+
506
+ const bSelectionChange = this._oSession?.mSource || this._oSession?.mTarget;
507
+ this._bSelecting = false;
508
+ this._mClickedCell = this._oPreviousCell = this._oHoveredCell = null;
509
+ this._oSession = { cellRefs: [], cellTypes: [] };
510
+ if (bSelectionChange) {
511
+ this._onSelectionChange();
512
+ }
513
+ };
514
+
430
515
  CellSelector.prototype._onsaparrowmodifiers = function(oEvent, sDirectionType, iRowDiff, iColDiff) {
431
- if (!this._shouldBeHandled(oEvent) || !oEvent.shiftKey || !this._isSelectableCell(oEvent.target)) {
516
+ if (!this._shouldBeHandled(oEvent) || !oEvent.shiftKey || !this._getSelectableCell(oEvent.target)) {
517
+ this._oPreviousCell = undefined;
432
518
  return;
433
519
  }
434
520
 
@@ -437,23 +523,35 @@ sap.ui.define([
437
523
  return;
438
524
  }
439
525
 
440
- var oInfo = this.getConfig("getCellInfo", this.getControl(), oSelectableCell);
526
+ var oInfo = this.getConfig("getCellInfo", this.getControl(), oSelectableCell, this._oPreviousCell);
527
+
441
528
  if (!this._inSelection(oEvent.target) || !this._oSession.mSource || !this._oSession.mTarget) {
442
529
  if (this.getConfig("isRowSelected", this.getControl(), oInfo.rowIndex)) {
443
530
  return;
444
531
  }
445
532
  // If not in selection block, start new selection block
446
533
  this._oSession.mSource = this._oSession.mTarget = oInfo;
534
+ this._oPreviousCell = null;
447
535
  }
448
536
 
537
+ if (oInfo.type == CellType.Ignore) {
538
+ if (sDirectionType == DIRECTION.COL || !this._oPreviousCell) {
539
+ // Do not modify/select if on a header/group header row and navigating in column direction (as their is technically only one)
540
+ return;
541
+ }
542
+ oInfo.colIndex = this._oPreviousCell.colIndex;
543
+ }
544
+
545
+ this._oPreviousCell = oInfo;
546
+
449
547
  var mBounds = this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget);
450
- const { from, to, focus } = this._getUpdatedBounds(iRowDiff, iColDiff * this._iRtl, oInfo);
548
+ const { from, to, focus } = this._getUpdatedBounds(iRowDiff * this._iBtt, iColDiff * this._iRtl, oInfo);
451
549
 
452
- if (focus[sDirectionType + "Index"] < 0 || focus.colIndex >= this.getConfig("getVisibleColumns", this.getControl()).length) {
550
+ if (focus[sDirectionType + "Index"] < 0 || focus.colIndex >= this.getConfig("numberOfColumns", this.getControl())) {
453
551
  return;
454
552
  }
455
553
 
456
- this.getConfig("focusCell", this.getControl(), focus, iRowDiff > 0);
554
+ this.getConfig("focusCell", this.getControl(), focus, true, iRowDiff > 0);
457
555
  if (sDirectionType == DIRECTION.ROW && (oInfo.rowIndex == mBounds.from.rowIndex || oInfo.rowIndex == mBounds.to.rowIndex)
458
556
  || sDirectionType == DIRECTION.COL && (oInfo.colIndex == mBounds.from.colIndex || oInfo.colIndex == mBounds.to.colIndex)) {
459
557
  this._bSelecting = true;
@@ -473,41 +571,81 @@ sap.ui.define([
473
571
  * @param {sap.ui.base.Event} oEvent event
474
572
  */
475
573
  CellSelector.prototype._onmousemove = function(oEvent) {
574
+ function select() {
575
+ if (this._bBorderDown && !this._bScrolling) {
576
+ var oBorder = this._oSession.border;
577
+ var mDiff = {
578
+ colIndex: isNaN(oBorder.colIndex) ? 0 : oInfo.colIndex - oBorder.colIndex,
579
+ rowIndex: isNaN(oBorder.rowIndex) ? 0 : oInfo.rowIndex - oBorder.rowIndex
580
+ };
581
+
582
+ if (mDiff.rowIndex != 0 || mDiff.colIndex != 0) {
583
+ const { from, to } = this._getUpdatedBounds(mDiff.rowIndex, mDiff.colIndex, oBorder);
584
+ this._selectCells(from, to);
585
+ }
586
+ } else {
587
+ this._startSelection(oEvent, true);
588
+ }
589
+
590
+ this.getConfig("focusCell", this.getControl(), oInfo, false);
591
+ this._oPreviousCell = oInfo;
592
+ this._oHoveredCell = oInfo;
593
+ }
594
+
476
595
  // Only update the resizer, if we are selecting and the border is not pressed. During border/edge pressing, don't update it
477
- if (this._bSelecting && !this._bMouseDown) {
478
- var mBounds = this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget);
596
+ if (this._bSelecting && !this._bMouseDown && this._bRenderResizer) {
597
+ const mBounds = this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget);
479
598
  this._updateResizers(mBounds, oEvent.clientX, oEvent.clientY);
480
599
  }
481
600
 
482
601
  var oSelectableCell = this._getSelectableCell(oEvent.target);
483
602
  if (!oSelectableCell || !this._bMouseDown) {
603
+ // if mouse is not down/target is not a cell, we should not execute selection logic
484
604
  return;
485
605
  }
486
606
 
487
- // If clicked cell (=starting cell) is equal to currently hovered cell, don't do anything
488
- var oInfo = this.getConfig("getCellInfo", this.getControl(), oSelectableCell);
489
- if (oInfo.rowIndex == this._oPreviousCell?.rowIndex && oInfo.colIndex == this._oPreviousCell?.colIndex) {
490
- // If currently hovered cell is the same as previous cell, nothing needs to be done.
607
+ clearTimeout(this._iTimer);
608
+ oEvent.stopImmediatePropagation(); // stop propagation to surpress other mechanisms such as column resizing
609
+
610
+ var oInfo = this.getConfig("getCellInfo", this.getControl(), oSelectableCell, this._oPreviousCell);
611
+ const bClickedHovered = oInfo.rowIndex == this._oPreviousCell?.rowIndex && oInfo.colIndex == this._oPreviousCell?.colIndex;
612
+ if (bClickedHovered || oInfo.type == CellType.Ignore) {
613
+ return;
614
+ }
615
+
616
+ // If previously hovered cell is the same as the currently hovered one, do not execute anything. Only do this in case the hovered one is of category Other.
617
+ if (oInfo.type == CellType.Other && this._oHoveredCell?.rowIndex == oInfo.rowIndex && this._oHoveredCell?.colIndex == oInfo.colIndex) {
491
618
  return;
492
619
  }
493
- this._oPreviousCell = oInfo;
494
620
 
495
621
  // Remove text selection during mouse cell selection
496
622
  window.getSelection().removeAllRanges();
497
623
 
498
- if (this._bBorderDown && !this._bScrolling) {
499
- var oBorder = this._oSession.border;
500
- var mDiff = {
501
- colIndex: isNaN(oBorder.colIndex) ? 0 : oInfo.colIndex - oBorder.colIndex,
502
- rowIndex: isNaN(oBorder.rowIndex) ? 0 : oInfo.rowIndex - oBorder.rowIndex
503
- };
624
+ if (!this._oSession.mSource && !this._oSession.mTarget) {
625
+ this._oSession.mSource = this._oSession.mTarget = this._mClickedCell;
626
+ }
627
+
628
+ this._oHoveredCell = null;
504
629
 
505
- if (mDiff.rowIndex != 0 || mDiff.colIndex != 0) {
506
- const { from, to } = this._getUpdatedBounds(mDiff.rowIndex, mDiff.colIndex, oBorder);
507
- this._selectCells(from, to);
508
- }
630
+ if (this._oPreviousCell && this._oPreviousCell.type != oInfo.type) {
631
+ this._iTimer = setTimeout(select.bind(this), DELAY_SHORT);
632
+ return;
633
+ }
634
+
635
+ if (this._mClickedCell
636
+ && this._mClickedCell.type == CellType.Other
637
+ && this._oPreviousCell?.type == CellType.Cell
638
+ && oInfo.type == CellType.Other) {
639
+ this._iTimer = setTimeout(select.bind(this), DELAY_LONG);
509
640
  } else {
510
- this._startSelection(oEvent, true);
641
+ if (oInfo.type == CellType.Other && this._mClickedCell.type != CellType.Other) {
642
+ const mBounds = this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget);
643
+ this._mTempCell = this._mClickedCell; // very hacky to get it to work with popin hover starting from last column
644
+ this._mClickedCell = mBounds.from;
645
+ } else {
646
+ this._mClickedCell = this._mTempCell ?? this._mClickedCell;
647
+ }
648
+ select.call(this);
511
649
  }
512
650
  };
513
651
 
@@ -547,7 +685,7 @@ sap.ui.define([
547
685
  this._clearScroller();
548
686
  if (this._bScrolling) {
549
687
  this.getConfig("scroll", this.getControl(), bForward, bVertical);
550
- this._mTimeouts.scrollTimerId = setTimeout(this._doScroll.bind(this, bForward, bVertical), 500);
688
+ this._mTimeouts.scrollTimerId = setTimeout(this._doScroll.bind(this, bForward, bVertical), DELAY_LONG);
551
689
 
552
690
  // If vertical scrolling, wait for the event, then select the next cells, not possible currently with horizontal scrolling
553
691
  if (!bVertical) {
@@ -596,23 +734,26 @@ sap.ui.define([
596
734
  * @returns {HTMLELement|null}
597
735
  */
598
736
  CellSelector.prototype._getSelectableCell = function (oDomRef) {
599
- return oDomRef?.closest(`.${this.getConfig("selectableCells")}`);
600
- };
737
+ if (!oDomRef) {
738
+ return;
739
+ }
601
740
 
602
- CellSelector.prototype._isSelectableCell = function(oDomRef) {
603
- return oDomRef?.classList.contains(this.getConfig("selectableCells"));
741
+ return oDomRef.closest(this.getConfig("selectableCells"));
604
742
  };
605
743
 
606
744
  CellSelector.prototype._inSelection = function(oTarget) {
607
- var oInfo = this.getConfig("getCellInfo", this.getControl(), oTarget);
745
+ var oInfo = this.getConfig("getCellInfo", this.getControl(), oTarget, this._oPreviousCell);
608
746
  if (!oInfo || !this._oSession.mSource || !this._oSession.mTarget) {
609
747
  return false;
610
748
  }
611
749
 
612
750
  var oBounds = this._getNormalizedBounds(this._oSession.mSource, this._oSession.mTarget);
613
751
 
614
- return !(oInfo.rowIndex < oBounds.from.rowIndex || oInfo.rowIndex > oBounds.to.rowIndex
752
+ const bInBounds = !(oInfo.rowIndex < oBounds.from.rowIndex || oInfo.rowIndex > oBounds.to.rowIndex
615
753
  || oInfo.colIndex < oBounds.from.colIndex || oInfo.colIndex > oBounds.to.colIndex);
754
+ const bOtherSelected = oInfo.type == CellType.Other && this._oSession.cellTypes.includes(CellType.Other);
755
+
756
+ return bInBounds || bOtherSelected;
616
757
  };
617
758
 
618
759
  CellSelector.prototype._startSelection = function(oEvent, bMove) {
@@ -628,13 +769,13 @@ sap.ui.define([
628
769
  if (this._inSelection(oTarget) && !bMove) {
629
770
  this.removeSelection();
630
771
  } else {
631
- var oCellInfo = this.getConfig("getCellInfo", this.getControl(), oTarget);
772
+ var oCellInfo = this.getConfig("getCellInfo", this.getControl(), oTarget, this._oPreviousCell);
632
773
  var mStart = this._mClickedCell ? this._mClickedCell : oCellInfo;
633
774
 
634
775
  this._bSelecting = true;
635
776
  this._oSession.mSource = oCellInfo;
636
777
  this._selectCells(mStart, oCellInfo);
637
- this.getConfig("focusCell", this.getControl(), oCellInfo);
778
+ this._oPreviousCell = oCellInfo;
638
779
  }
639
780
 
640
781
  oEvent.preventDefault();
@@ -653,8 +794,13 @@ sap.ui.define([
653
794
  var sAdjustRowType = mFocus.rowIndex == mBounds.from.rowIndex ? "from" : "to";
654
795
  var sAdjustColType = mFocus.colIndex == mBounds.from.colIndex ? "from" : "to";
655
796
 
656
- mBounds[sAdjustRowType].rowIndex += iRowDiff;
657
- mBounds[sAdjustColType].colIndex += iColDiff;
797
+ mBounds[sAdjustRowType].rowIndex = Math.max(mBounds[sAdjustRowType].rowIndex + iRowDiff, 0);
798
+ mBounds[sAdjustColType].colIndex = Math.max(mBounds[sAdjustColType].colIndex + iColDiff, 0);
799
+
800
+ const oAdjustedColCell = this.getConfig("getCellRef", this.getControl(), mBounds[sAdjustColType]);
801
+ if (oAdjustedColCell) {
802
+ mBounds[sAdjustColType].type = this.getConfig("getCellType", this.getControl(), oAdjustedColCell);
803
+ }
658
804
 
659
805
  if (!this._bBorderDown) {
660
806
  mFocus.rowIndex = Math.max(0, mFocus.rowIndex + iRowDiff);
@@ -679,12 +825,8 @@ sap.ui.define([
679
825
  * a) source cell to target cell or
680
826
  * b) source cell to current lower right cell.
681
827
  * The bigger bounding box of the two will be inspected.
682
- * @param {Object} mFrom source cell coordinates
683
- * @param {int} mFrom.rowIndex row index
684
- * @param {int} mFrom.colIndex column index
685
- * @param {Object} mTo target cell coordinates
686
- * @param {int} mTo.rowIndex row index
687
- * @param {int} mTo.colIndex column index
828
+ * @param {sap.m.plugins.CellSelector.CellPosition} mFrom source cell coordinates
829
+ * @param {sap.m.plugins.CellSelector.CellPosition} mTo target cell coordinates
688
830
  * @private
689
831
  */
690
832
  CellSelector.prototype._selectCells = function (mFrom, mTo) {
@@ -694,6 +836,14 @@ sap.ui.define([
694
836
 
695
837
  mFrom = mFrom ? mFrom : this._oSession.mSource;
696
838
  mTo = mTo ? mTo : this._oSession.mTarget;
839
+
840
+ this._oSession.cellTypes = [mFrom.type];
841
+
842
+ // If the cell type of the hovered cell is not in cell types add it (a Set is probably better here)
843
+ if (!this._oSession.cellTypes.includes(mTo.type)) {
844
+ this._oSession.cellTypes.push(mTo.type);
845
+ }
846
+
697
847
  var mBounds = this._getNormalizedBounds(mFrom, mTo);
698
848
 
699
849
  if (mTo.rowIndex == Infinity || mFrom.rowIndex == Infinity) {
@@ -709,13 +859,6 @@ sap.ui.define([
709
859
  }
710
860
  };
711
861
 
712
- /**
713
- * Draws the selection for the given bounds.
714
- * @param {Object} mBounds object containing the bounds information (from, to)
715
- * @param {Object} mBounds.from from position
716
- * @param {Object} mBounds.to to position
717
- * @private
718
- */
719
862
  CellSelector.prototype._drawSelection = function (mBounds) {
720
863
  if (!mBounds.from || !mBounds.to) {
721
864
  return;
@@ -724,30 +867,31 @@ sap.ui.define([
724
867
  this._clearSelection();
725
868
 
726
869
  this._oSession.cellRefs = [];
870
+
871
+ // Check if we need to draw "Other" cells
872
+ const bDrawOther = this._oSession.cellTypes.includes(CellType.Other);
727
873
  for (var iRow = mBounds.from.rowIndex; iRow <= mBounds.to.rowIndex; iRow++) {
728
- for (var iCol = mBounds.from.colIndex; iCol <= mBounds.to.colIndex; iCol++) {
729
- var oCellRef = this.getConfig("getCellRef", this.getControl(), {rowIndex: iRow, colIndex: iCol});
730
- if (oCellRef) {
731
- oCellRef.classList.toggle("sapMPluginsCellSelectorTop", iRow == mBounds.from.rowIndex);
732
- oCellRef.classList.toggle("sapMPluginsCellSelectorBottom", iRow == mBounds.to.rowIndex);
733
- oCellRef.classList.toggle("sapMPluginsCellSelectorRight", iCol == mBounds.to.colIndex);
734
- oCellRef.classList.toggle("sapMPluginsCellSelectorSelected", true);
735
- oCellRef.setAttribute("aria-selected", "true");
736
- this._oSession.cellRefs.push(oCellRef);
737
-
738
- // Grid Table has only border-right, so adding border-left would change the size of the column. Instead, for the left border, take the previous cell and set border-right.
739
- if (iCol == mBounds.from.colIndex) {
740
- const oPrevCellRef = this.getConfig("getCellRef", this.getControl(), {rowIndex: iRow, colIndex: iCol - 1});
741
- let sClass = "sapMPluginsCellSelectorLeft";
742
- if (oPrevCellRef) {
743
- oCellRef = oPrevCellRef;
744
- sClass = "sapMPluginsCellSelectorRight";
745
- this._oSession.cellRefs.push(oCellRef);
746
- }
747
- oCellRef.classList.toggle(sClass, iCol == mBounds.from.colIndex);
874
+ // Only draw cells, if the Cell type is included in the selection
875
+ if (this._oSession.cellTypes.includes(CellType.Cell)) {
876
+ for (var iCol = mBounds.from.colIndex; iCol <= mBounds.to.colIndex; iCol++) {
877
+ const mPosition = {rowIndex: iRow, colIndex: iCol};
878
+ var oCellRef = this.getConfig("getCellRef", this.getControl(), mPosition);
879
+ if (oCellRef) {
880
+ const aRefs = this.getConfig("drawCellBorder", this.getControl(), oCellRef, mPosition, mBounds);
881
+ this._oSession.cellRefs.push(...aRefs);
748
882
  }
749
883
  }
750
884
  }
885
+ // Draw other cells, like Popin
886
+ if (bDrawOther) {
887
+ const iCol = this.getConfig("numberOfColumns", this.getControl()) - 1;
888
+ const mPosition = {rowIndex: iRow, colIndex: iCol};
889
+ const oCellRef = this.getConfig("getCellRef", this.getControl(), mPosition);
890
+ if (oCellRef) {
891
+ const aRefs = this.getConfig("drawCellBorder", this.getControl(), oCellRef, mPosition, mBounds);
892
+ this._oSession.cellRefs.push(...aRefs);
893
+ }
894
+ }
751
895
  }
752
896
  };
753
897
 
@@ -827,6 +971,10 @@ sap.ui.define([
827
971
  }
828
972
  };
829
973
 
974
+ /**
975
+ * Retrieves the resizer element. If none is existent, creates an element.
976
+ * @returns {HTMLELement} resizer element
977
+ */
830
978
  CellSelector.prototype._getResizer = function() {
831
979
  if (!this._oResizer) {
832
980
  this._oResizer = document.createElement("div");
@@ -852,20 +1000,6 @@ sap.ui.define([
852
1000
  oResizer.style.top = "-10000px";
853
1001
  };
854
1002
 
855
- /**
856
- * Remove the current selection block.
857
- */
858
- CellSelector.prototype.removeSelection = function () {
859
- this._clearSelection();
860
-
861
- const bSelectionChange = this._oSession?.mSource || this._oSession?.mTarget;
862
- this._bSelecting = false;
863
- this._oSession = { cellRefs: [] };
864
- if (bSelectionChange) {
865
- this._onSelectionChange();
866
- }
867
- };
868
-
869
1003
  /**
870
1004
  * Returns an object containing normalized coordinates for the given bounding area.
871
1005
  * <code>from</code> will contain the coordinates for the upper left corner of the bounding area,
@@ -879,7 +1013,7 @@ sap.ui.define([
879
1013
  * @returns object containing coordinates for from and to
880
1014
  */
881
1015
  CellSelector.prototype._getNormalizedBounds = function(mFrom, mTo, bKeepBounds) {
882
- const iMaxColumns = this.getConfig("getVisibleColumns", this.getControl()).length;
1016
+ const iMaxColumns = this.getConfig("numberOfColumns", this.getControl());
883
1017
  const iMaxRows = this.getRangeLimit() == 0 ? this.getConfig("getRowCount", this.getControl()) : this.getRangeLimit();
884
1018
 
885
1019
  let toRowIndex = Math.max(mFrom.rowIndex, mTo.rowIndex), toColIndex = Math.max(mFrom.colIndex, mTo.colIndex);
@@ -889,22 +1023,22 @@ sap.ui.define([
889
1023
  }
890
1024
 
891
1025
  return {
892
- from: {rowIndex: Math.max(0, Math.min(mFrom.rowIndex, mTo.rowIndex)), colIndex: Math.max(0, Math.min(mFrom.colIndex, mTo.colIndex))},
893
- to: {rowIndex: toRowIndex, colIndex: toColIndex}
1026
+ from: {rowIndex: Math.max(0, Math.min(mFrom.rowIndex, mTo.rowIndex)), colIndex: Math.max(0, Math.min(mFrom.colIndex, mTo.colIndex)), type: mFrom.type},
1027
+ to: {rowIndex: toRowIndex, colIndex: toColIndex, type: mTo.type}
894
1028
  };
895
1029
  };
896
1030
 
897
1031
  CellSelector.prototype._shouldBeHandled = function(oEvent) {
898
1032
  // Handle if event is not marked and control is applicable
899
- return !oEvent.isMarked?.() && this.getConfig("isSupported", this.getControl());
1033
+ return !oEvent.isMarked?.() && this.getConfig("isSupported", this.getControl(), this);
900
1034
  };
901
1035
 
902
1036
  CellSelector.prototype._getBinding = function() {
903
1037
  return this.getConfig("getBinding", this.getControl());
904
1038
  };
905
1039
 
906
- function isCell(oTarget, sCell) {
907
- return oTarget.classList.contains(sCell);
1040
+ function isSelectableCell(oDomRef, sSelectors) {
1041
+ return oDomRef.matches(sSelectors);
908
1042
  }
909
1043
 
910
1044
  function isGroupRow(oBinding, oContext, iIndex) {
@@ -915,6 +1049,17 @@ sap.ui.define([
915
1049
  return !(oRowContext.getProperty("@ui5.node.isExpanded") === undefined);
916
1050
  }
917
1051
 
1052
+ function getRow(aRows, iRow, bIsRange, fnGetIndex) {
1053
+ if (bIsRange && aRows[0]) {
1054
+ return fnGetIndex(aRows[0]) > iRow ? aRows[0] : aRows[aRows.length - 1];
1055
+ }
1056
+ return aRows.find((oRow) => fnGetIndex(oRow) == iRow);
1057
+ }
1058
+
1059
+ function getCellDOM(aCells, iCol, sClasses) {
1060
+ return aCells[iCol]?.$().closest(sClasses)[0];
1061
+ }
1062
+
918
1063
  /**
919
1064
  * Check if the given key combination applies to the event.
920
1065
  * @param {sap.ui.base.Event} oEvent event instance
@@ -927,20 +1072,29 @@ sap.ui.define([
927
1072
  return oEvent.keyCode == sKeyCode && oEvent.shiftKey == bShift && (oEvent.ctrlKey == bCtrl || oEvent.metaKey == bCtrl);
928
1073
  }
929
1074
 
1075
+ /**
1076
+ * Checks if drag on the rows/items aggregation is activated.
1077
+ * @param {sap.ui.core.Control} oControl control to be checked
1078
+ * @param {string} sAffectedAggregation name of the aggregation which is affected by D&D
1079
+ * @returns {boolean} whether drag on rows is enabled
1080
+ */
1081
+ function hasDragEnabled(oControl, sAffectedAggregation) {
1082
+ return oControl.getDragDropConfig().some((oConfig) => oConfig.getSourceAggregation?.() == sAffectedAggregation && oConfig.getEnabled());
1083
+ }
1084
+
930
1085
  PluginBase.setConfigs({
931
1086
  "sap.ui.table.Table": {
932
- tableCell: "sapUiTableCell",
933
- selectableCells: "sapUiTableDataCell",
1087
+ selectableCells: ".sapUiTableDataCell",
934
1088
  scrollArea: "sapUiTableCtrlScr",
935
- scrollEvent: "_rowsUpdated",
1089
+ scrollEvent: "firstVisibleRowChanged",
936
1090
  eventClearedAll: "sapUiTableClearAll",
937
1091
  onActivate: function(oTable, oPlugin) {
938
1092
  oTable.attachEvent("_change", oPlugin, this._onPropertyChange);
939
1093
  oTable.attachEvent("EventHandlerChange", oPlugin, this._onEventHandlerChange);
940
1094
  },
941
1095
  onDeactivate: function(oTable, oPlugin) {
942
- oTable.detachEvent("_change", this._onPropertyChange);
943
- oTable.detachEvent("EventHandlerChange", this._onEventHandlerChange);
1096
+ oTable.detachEvent("_change", oPlugin, this._onPropertyChange);
1097
+ oTable.detachEvent("EventHandlerChange", oPlugin, this._onEventHandlerChange);
944
1098
  },
945
1099
  _onPropertyChange: function(oEvent, oPlugin) {
946
1100
  oEvent.getParameter("name") == "selectionBehavior" && oPlugin._onSelectableChange();
@@ -953,9 +1107,13 @@ sap.ui.define([
953
1107
  * @param {sap.ui.table.Table} oTable table instance
954
1108
  * @returns {boolean} compatibility with cell selection
955
1109
  */
956
- isSupported: function(oTable) {
957
- return !oTable.hasListeners("cellClick") && oTable.getSelectionBehavior() == "RowSelector"
958
- && !oTable.getDragDropConfig().some((oConfig) => oConfig.getSourceAggregation?.() == "rows" && oConfig.getEnabled());
1110
+ isSupported: function(oTable, oPlugin) {
1111
+ return !oTable.hasListeners("cellClick")
1112
+ && oTable.getSelectionBehavior() == "RowSelector"
1113
+ && !hasDragEnabled(oTable, "rows");
1114
+ },
1115
+ isBottomToTop: function(oTable) {
1116
+ return false;
959
1117
  },
960
1118
  /**
961
1119
  * Get visible columns of the table.
@@ -967,72 +1125,62 @@ sap.ui.define([
967
1125
  return oColumn.getDomRef();
968
1126
  });
969
1127
  },
1128
+ /**
1129
+ * Retrieve the number of visible columns in the table.
1130
+ * @param {sap.ui.table.Table} oTable table instance
1131
+ * @param {boolean} bIncludeSpecial include special columns, e.g. such as popins as separate columns
1132
+ * @returns {number} number of columns
1133
+ */
1134
+ numberOfColumns: function(oTable, bIncludeSpecial) {
1135
+ return this.getVisibleColumns(oTable).length;
1136
+ },
970
1137
  getRowCount: function(oTable) {
971
1138
  return oTable._getTotalRowCount();
972
1139
  },
973
1140
  /**
974
1141
  * Retrieve the cell reference for a given position
975
1142
  * @param {sap.ui.table.Table} oTable table instance
976
- * @param {Object} mPosition position
977
- * @param {int} mPosition.rowIndex row index
978
- * @param {int} mPosition.colIndex column index
979
- * @returns {HTMLElement} cell's DOM element
1143
+ * @param {sap.m.plugins.CellSelector.CellPosition} mPosition position of cell
1144
+ * @returns {HTMLElement|undefined} cell's DOM element or undefined if the row or column index are invalid
980
1145
  */
981
1146
  getCellRef: function (oTable, mPosition, bRange) {
982
- var aRows = oTable.getRows();
983
- var oRow = aRows.find(function(oRow) {
984
- return oRow.getIndex() == mPosition.rowIndex;
985
- });
986
- if (oRow) {
987
- var oColumn = this.getVisibleColumns(oTable)[mPosition.colIndex];
988
- var oCell = oColumn && oRow.getCells()[oColumn.getIndex()];
989
- if (oCell) {
990
- return oCell.$().closest(`.${this.selectableCells}`)[0];
991
- }
992
- } else if (bRange) {
993
- if (aRows[0].getIndex() > mPosition.rowIndex) {
994
- oRow = aRows[0];
995
- var oColumn = this.getVisibleColumns(oTable)[mPosition.colIndex];
996
- var oCell = oColumn && oRow.getCells()[mPosition.colIndex];
997
- if (oCell) {
998
- return oCell.$().closest(`.${this.selectableCells}`)[0];
999
- }
1000
- } else if (aRows[aRows.length - 1].getIndex() < mPosition.rowIndex) {
1001
- oRow = aRows[aRows.length - 1];
1002
- var oColumn = this.getVisibleColumns(oTable)[mPosition.colIndex];
1003
- var oCell = oColumn && oRow.getCells()[mPosition.colIndex];
1004
- if (oCell) {
1005
- return oCell.$().closest(`.${this.selectableCells}`)[0];
1006
- }
1007
- }
1147
+ const oRow = getRow(oTable.getRows(), mPosition.rowIndex, bRange, (oRow) => oRow?.getIndex());
1148
+
1149
+ if (!oRow) {
1150
+ return;
1008
1151
  }
1152
+
1153
+ const oColumn = this.getVisibleColumns(oTable)[mPosition.colIndex];
1154
+ return oColumn && getCellDOM(oRow.getCells(), mPosition.colIndex, this.selectableCells);
1009
1155
  },
1010
1156
  /**
1011
1157
  * Retrieve cell information for a given DOM element.
1012
1158
  * @param {sap.ui.table.Table} oTable table instance
1013
1159
  * @param {HTMLElement} oTarget DOM element of cell
1014
- * @returns {Object} cell information containing rowIndex and colIndex
1160
+ * @returns {object} cell information containing rowIndex, colIndex and type of the cell
1015
1161
  */
1016
1162
  getCellInfo: function (oTable, oTarget) {
1017
1163
  return {
1018
1164
  rowIndex: Element.closestTo(oTarget, true).getIndex(),
1019
- colIndex: this.getVisibleColumns(oTable).indexOf(Element.getElementById(oTarget.getAttribute("data-sap-ui-colid")))
1165
+ colIndex: this.getVisibleColumns(oTable).indexOf(Element.getElementById(oTarget.getAttribute("data-sap-ui-colid"))),
1166
+ type: this.getCellType(oTable, oTarget)
1020
1167
  };
1021
1168
  },
1022
1169
  /**
1023
- * Loads contexts according to the provided parameters without changing the binding's state.
1024
- *
1025
- * @param {sap.ui.table.Table} oTable The Table instance
1026
- * @param {int} iStartIndex The index where to start the retrieval of contexts
1027
- * @param {int} iLength The number of contexts to retrieve beginning from the start index.
1170
+ * Returns the cell type of the given target cell.
1171
+ * @param {sap.ui.table.Table} oTable table instance
1172
+ * @param {HTMLELement} oTarget cell reference
1173
+ * @returns {string} cell type
1028
1174
  */
1029
- loadContexts: function(oTable, iStartIndex, iLength) {
1030
- var oBinding = oTable.getBinding("rows");
1031
- if (!oBinding || oBinding.isA("sap.ui.model.ClientListBinding")) {
1032
- return;
1175
+ getCellType: function(oTable, oTarget) {
1176
+ const oRow = Element.closestTo(oTarget, true);
1177
+ let sType = CellType.Cell;
1178
+
1179
+ if (oRow.isGroupHeader()) {
1180
+ sType = CellType.Ignore;
1033
1181
  }
1034
1182
 
1035
- oBinding.getContexts(Math.max(0, iStartIndex), Math.max(1, iLength), 0, true);
1183
+ return sType;
1036
1184
  },
1037
1185
  /**
1038
1186
  * Retrieves the row contexts of the table according to the specified parameters.
@@ -1071,8 +1219,16 @@ sap.ui.define([
1071
1219
  iFrom = iTo = iFocus;
1072
1220
  }
1073
1221
 
1074
- if (oSelectionOwner.addSelectionInterval) {
1075
- oSelectionOwner.addSelectionInterval(iFrom, iTo);
1222
+ if (oSelectionOwner.addSelectionInterval && oSelectionOwner.removeSelectionInterval) {
1223
+ for (let i = iFrom; i <= iTo; i++) {
1224
+ const bSelected = oSelectionOwner.isIndexSelected?.(i) ?? false;
1225
+ // Toggle Selection State
1226
+ if (bSelected) {
1227
+ oSelectionOwner.removeSelectionInterval(i, i);
1228
+ } else {
1229
+ oSelectionOwner.addSelectionInterval(i, i);
1230
+ }
1231
+ }
1076
1232
  return true;
1077
1233
  }
1078
1234
 
@@ -1080,23 +1236,32 @@ sap.ui.define([
1080
1236
  var aRows = oTable.getRows().filter(function(oRow) {
1081
1237
  return oRow.getIndex() >= iFrom && oRow.getIndex() <= iTo;
1082
1238
  });
1083
- aRows.forEach(function(oRow) {
1084
- oSelectionOwner.setSelected(oRow, true);
1239
+ aRows.forEach((oRow) => {
1240
+ oSelectionOwner.setSelected(oRow, !this.isRowSelected(oTable, oRow));
1085
1241
  });
1086
1242
  return true;
1087
1243
  },
1088
- isRowSelected: function(oTable, iRow) {
1244
+ /**
1245
+ * Checks if the given row is selected.
1246
+ * @param {sap.ui.table.Table} oTable table instance
1247
+ * @param {number|sap.ui.table.Row} vRow either row index or row instance
1248
+ * @returns {boolean} selection state
1249
+ */
1250
+ isRowSelected: function(oTable, vRow) {
1089
1251
  var oSelectionOwner = this._getSelectionOwner(oTable);
1090
- var oRow = oTable.getRows().find(function(oRow) {
1091
- return oRow.getIndex() == iRow;
1092
- });
1252
+ if (typeof vRow === "number") {
1253
+ vRow = oTable.getRows().find(function(oRow) {
1254
+ return oRow.getIndex() == vRow;
1255
+ });
1256
+ }
1093
1257
 
1094
- if (oRow) {
1095
- return oSelectionOwner.isSelected ? oSelectionOwner.isSelected(oRow) : oSelectionOwner.isIndexSelected(iRow);
1258
+ let bSelectionState = oSelectionOwner.isIndexSelected?.(vRow);
1259
+ if (vRow) {
1260
+ bSelectionState = oSelectionOwner.isSelected?.(vRow);
1096
1261
  }
1097
- return false;
1262
+ return bSelectionState ?? false;
1098
1263
  },
1099
- focusCell: function(oTable, mFocus, bForward) {
1264
+ focusCell: function(oTable, mFocus, bIsKeyboard, bForward) {
1100
1265
  var oCellRef = this.getCellRef(oTable, mFocus);
1101
1266
  if (!oCellRef) {
1102
1267
  this.scroll(oTable, bForward, true);
@@ -1142,6 +1307,273 @@ sap.ui.define([
1142
1307
  },
1143
1308
  getBinding: function(oTable) {
1144
1309
  return oTable.getBinding("rows");
1310
+ },
1311
+ shouldRenderResizer: function(oTable) {
1312
+ return true;
1313
+ },
1314
+ drawCellBorder: function(oTable, oCellRef, mPosition, mBounds) {
1315
+ const aRefs = [oCellRef];
1316
+ oCellRef.classList.toggle("sapMPluginsCellSelectorTop", mPosition.rowIndex == mBounds.from.rowIndex);
1317
+ oCellRef.classList.toggle("sapMPluginsCellSelectorBottom", mPosition.rowIndex == mBounds.to.rowIndex);
1318
+ oCellRef.classList.toggle("sapMPluginsCellSelectorRight", mPosition.colIndex == mBounds.to.colIndex);
1319
+ oCellRef.classList.toggle("sapMPluginsCellSelectorSelected", true);
1320
+ oCellRef.setAttribute("aria-selected", "true");
1321
+
1322
+ // Grid Table has only border-right, so adding border-left would change the size of the column. Instead, for the left border, take the previous cell and set border-right.
1323
+ if (mPosition.colIndex == mBounds.from.colIndex) {
1324
+ const oPrevCellRef = this.getCellRef(oTable, {rowIndex: mPosition.rowIndex, colIndex: mPosition.colIndex - 1});
1325
+ let sClass = "sapMPluginsCellSelectorLeft";
1326
+ if (oPrevCellRef) {
1327
+ oCellRef = oPrevCellRef;
1328
+ sClass = "sapMPluginsCellSelectorRight";
1329
+ aRefs.push(oCellRef);
1330
+ }
1331
+ oCellRef.classList.toggle(sClass, mPosition.colIndex == mBounds.from.colIndex);
1332
+ }
1333
+ return aRefs;
1334
+ },
1335
+ loadContexts: function (oTable, iStartIndex, iLength) {
1336
+ var oBinding = oTable.getBinding("rows");
1337
+ if (!oBinding || oBinding.isA("sap.ui.model.ClientListBinding")) {
1338
+ return;
1339
+ }
1340
+ oBinding.getContexts(Math.max(0, iStartIndex), Math.max(1, iLength), 0, true);
1341
+ }
1342
+ },
1343
+ "sap.m.Table": {
1344
+ selectableCells: ".sapMLIBFocusable, .sapMListTblCell, .sapMListTblSubRowCell, .sapMListTblSubCnt",
1345
+ scrollArea: "listUl",
1346
+ onActivate: function(oTable, oPlugin) {
1347
+ oTable.attachEvent("_change", oPlugin, this._onPropertyChange);
1348
+ oTable.attachEvent("EventHandlerChange", oPlugin, this._onEventHandlerChange);
1349
+ },
1350
+ onDeactivate: function(oTable, oPlugin) {
1351
+ oTable.detachEvent("_change", oPlugin, this._onPropertyChange);
1352
+ oTable.detachEvent("EventHandlerChange", oPlugin, this._onEventHandlerChange);
1353
+ },
1354
+ _onPropertyChange: function(oEvent, oPlugin) {
1355
+ oEvent.getParameter("name") == "mode" && oPlugin._onSelectableChange();
1356
+ },
1357
+ _onEventHandlerChange: function(oEvent, oPlugin) {
1358
+ oEvent.getParameter("EventId") == "itemPress" && oPlugin._onSelectableChange();
1359
+ },
1360
+ _getVisibleItems: function(oTable) {
1361
+ return oTable.getVisibleItems();
1362
+ },
1363
+ /**
1364
+ * Checks if the table is compatible with cell selection.
1365
+ * @param {sap.m.Table} oTable table instance
1366
+ * @returns {boolean} compatibility with cell selection
1367
+ */
1368
+ isSupported: function(oTable, oPlugin) {
1369
+ return (RESPONSIVETABLE_ENABLED /*URL param*/ || oPlugin._bEnableMTable /*programmatic way*/) && oTable.getMode() != ListMode.SingleSelectMaster
1370
+ && !hasDragEnabled(oTable, "items");
1371
+ },
1372
+ isBottomToTop: function(oTable) {
1373
+ return oTable.getGrowingDirection() == "Upwards";
1374
+ },
1375
+ /**
1376
+ * Get visible columns of the table.
1377
+ * @param {sap.m.Table} oTable table instance
1378
+ * @returns {sap.m.Column[]} array of visible columns
1379
+ */
1380
+ getVisibleColumns: function (oTable, bIncludeSpecial) {
1381
+ return oTable.getColumns(true).filter(function (oColumn) {
1382
+ const bIncludePopin = bIncludeSpecial && oColumn.isPopin();
1383
+ return oColumn.getVisible() && ((oColumn.getDomRef() && !oColumn.isPopin()) || bIncludePopin);
1384
+ });
1385
+ },
1386
+ /**
1387
+ * Retrieve the number of visible columns in the table.
1388
+ * @param {sap.m.Table} oTable table instance
1389
+ * @param {boolean} bIncludeSpecial include special columns, e.g. such as popins as separate columns
1390
+ * @returns {number} number of columns
1391
+ */
1392
+ numberOfColumns: function(oTable, bIncludeSpecial) {
1393
+ var iColCount = this.getVisibleColumns(oTable, bIncludeSpecial).length;
1394
+ return bIncludeSpecial ? iColCount : iColCount + oTable.hasPopin();
1395
+ },
1396
+ /**
1397
+ * Retrieve the current row count.
1398
+ * @param {sap.m.Table} oTable table instance
1399
+ * @returns {number} row count
1400
+ */
1401
+ getRowCount: function(oTable) {
1402
+ return this._getVisibleItems(oTable).length;
1403
+ },
1404
+ /**
1405
+ * Retrieve the cell reference for a given position
1406
+ * @param {sap.m.Table} oTable table instance
1407
+ * @param {sap.m.plugins.CellSelector.CellPosition} mPosition position of cell
1408
+ * @returns {HTMLElement|undefined} cell's DOM element or undefined if the row or column index are invalid
1409
+ */
1410
+ getCellRef: function (oTable, mPosition, bRange) {
1411
+ const aRows = this._getVisibleItems(oTable);
1412
+ const oRow = getRow(oTable.getItems(), mPosition.rowIndex, bRange, (oRow) => aRows.indexOf(oRow));
1413
+
1414
+ if (!oRow) {
1415
+ return;
1416
+ }
1417
+
1418
+ if (oRow.isGroupHeader()) {
1419
+ return oRow.getDomRef();
1420
+ }
1421
+
1422
+ if (oTable.hasPopin() && mPosition.colIndex == this.numberOfColumns(oTable) - 1) {
1423
+ return oRow.$Popin()[0].querySelector(".sapMListTblSubRowCell");
1424
+ }
1425
+
1426
+ const oColumn = this.getVisibleColumns(oTable)[mPosition.colIndex];
1427
+ return oColumn && getCellDOM(oRow.getCells(), oColumn.getInitialOrder(), this.selectableCells);
1428
+ },
1429
+ /**
1430
+ * Retrieve cell information for a given DOM element.
1431
+ * @param {sap.m.Table} oTable table instance
1432
+ * @param {HTMLElement} oTarget DOM element of cell
1433
+ * @returns {object} cell information containing rowIndex, colIndex and type of the cell
1434
+ */
1435
+ getCellInfo: function (oTable, oTarget, mPrevious) {
1436
+ const aColumns = this.getVisibleColumns(oTable);
1437
+
1438
+ const oColumn = Element.getElementById(oTarget.getAttribute("data-sap-ui-column"));
1439
+ const sType = this.getCellType(oTable, oTarget);
1440
+ let iColIndex = aColumns.indexOf(oColumn);
1441
+
1442
+ if (sType == CellType.Other) {
1443
+ iColIndex = this.numberOfColumns(oTable) - 1;
1444
+ }
1445
+
1446
+ if (sType == CellType.Ignore) {
1447
+ iColIndex = mPrevious?.colIndex ?? iColIndex;
1448
+ }
1449
+
1450
+ return {
1451
+ rowIndex: this._getVisibleItems(oTable).indexOf(Element.closestTo(oTarget, true)),
1452
+ colIndex: iColIndex,
1453
+ type: sType
1454
+ };
1455
+ },
1456
+ /**
1457
+ * Returns the cell type of the given target cell.
1458
+ * @param {sap.m.Table} oTable table instance
1459
+ * @param {HTMLELement} oTarget cell reference
1460
+ * @returns {string} cell type
1461
+ */
1462
+ getCellType: function (oTable, oTarget) {
1463
+ const oColumn = Element.getElementById(oTarget.getAttribute("data-sap-ui-column"));
1464
+ const oItem = Element.closestTo(oTarget, true);
1465
+
1466
+ if (!oItem) {
1467
+ return;
1468
+ }
1469
+
1470
+ if (oItem.isGroupHeader?.()) {
1471
+ return CellType.Ignore;
1472
+ }
1473
+
1474
+ const bIsPopin = oTarget.classList.contains("sapMListTblSubRowCell") || oTarget.classList.contains("sapMListTblSubCnt") || oTarget.classList.contains("sapMListTblSubRow");
1475
+ if (!oColumn && bIsPopin) {
1476
+ return CellType.Other;
1477
+ }
1478
+ return CellType.Cell;
1479
+ },
1480
+ /**
1481
+ * Retrieves the row contexts of the table according to the specified parameters.
1482
+ * @param {sap.m.Table} oTable The table instance
1483
+ * @param {int} iFromIndex The start index
1484
+ * @param {int} iToIndex The end index
1485
+ * @param {int} iLimit The range limit
1486
+ * @returns {sap.ui.model.Context[]} A portion of the row binding contexts
1487
+ */
1488
+ getSelectedRowContexts: function(oTable, iFromIndex, iToIndex, iLimit) {
1489
+ const oItems = this._getVisibleItems(oTable);
1490
+ if (iToIndex == Infinity) {
1491
+ const iMaxIndex = oItems.length;
1492
+ iToIndex = Math.min(iToIndex, iFromIndex + iLimit - 1, iMaxIndex);
1493
+ }
1494
+
1495
+ return oItems.filter((oItem) => !oItem.isGroupHeader?.()) // ignore group headers
1496
+ .slice(iFromIndex, iToIndex + 1)
1497
+ .map((oItem) => oItem?.getBindingContext(oTable.getBindingInfo("items")?.model));
1498
+ },
1499
+ /**
1500
+ * Select rows beginning at iFrom to iTo.
1501
+ * @param {sap.m.Table} oTable The table instance
1502
+ * @param {int} iFrom starting row index
1503
+ * @param {int} iTo ending row index
1504
+ * @param {int} mFocus focused row index
1505
+ */
1506
+ selectRows: function(oTable, iFrom, iTo, iFocus) {
1507
+ var sSelectionMode = oTable.getMode();
1508
+
1509
+ if (sSelectionMode == "Delete" || sSelectionMode == "None") {
1510
+ return false;
1511
+ } else if (sSelectionMode == "Single") {
1512
+ iFrom = iTo = iFocus;
1513
+ }
1514
+
1515
+ const oItems = this._getVisibleItems(oTable);
1516
+ for (let i = iFrom; i < iTo; i++) {
1517
+ oTable.setSelectedItem(oItems[i], !this.isRowSelected(oTable, oItems[i]));
1518
+ }
1519
+ oTable.setSelectedItem(oItems[iTo], !this.isRowSelected(oTable, oItems[iTo]), true);
1520
+
1521
+ return true;
1522
+ },
1523
+ /**
1524
+ * Checks if the given row is selected
1525
+ * @param {sap.m.Table} oTable table instance
1526
+ * @param {number|sap.m.ListBase} vRow either row index or row instance
1527
+ * @returns {boolean} selection state
1528
+ */
1529
+ isRowSelected: function(oTable, vRow) {
1530
+ if (typeof vRow === "number") {
1531
+ vRow = this._getVisibleItems(oTable)[vRow];
1532
+ }
1533
+ return vRow.getSelected();
1534
+ },
1535
+ focusCell: function(oTable, mFocus, bIsKeyboard, bForward) {
1536
+ if (bIsKeyboard) {
1537
+ // do not focus, if keyboard selection
1538
+ return;
1539
+ }
1540
+
1541
+ const aRows = this._getVisibleItems(oTable);
1542
+ const oRow = getRow(oTable.getItems(), mFocus.rowIndex, false, (oRow) => aRows.indexOf(oRow));
1543
+ oRow?.focus();
1544
+ },
1545
+ scroll: function(oTable, bForward, bVertical) {
1546
+ return Promise.resolve();
1547
+ },
1548
+ attachSelectionChange: function(oTable, fnCallback) {
1549
+ oTable.attachSelectionChange(fnCallback);
1550
+ },
1551
+ detachSelectionChange: function(oTable, fnCallback) {
1552
+ oTable.detachSelectionChange(fnCallback);
1553
+ },
1554
+ getBinding: function(oTable) {
1555
+ return oTable.getBinding("items");
1556
+ },
1557
+ shouldRenderResizer: function(oTable) {
1558
+ return !oTable.hasPopin();
1559
+ },
1560
+ drawCellBorder: function(oTable, oCellRef, mPosition, mBounds) {
1561
+ const bHasPopin = oTable.hasPopin();
1562
+ const bPopinSelected = bHasPopin && mBounds.to.colIndex == this.numberOfColumns(oTable) - 1;
1563
+
1564
+ const sTop = this.isBottomToTop(oTable) ? "sapMPluginsCellSelectorBottom" : "sapMPluginsCellSelectorTop";
1565
+ const sBottom = this.isBottomToTop(oTable) ? "sapMPluginsCellSelectorTop" : "sapMPluginsCellSelectorBottom";
1566
+
1567
+ oCellRef.classList.toggle(sTop, mPosition.rowIndex == mBounds.from.rowIndex || bHasPopin);
1568
+ oCellRef.classList.toggle(sBottom, mPosition.rowIndex == mBounds.to.rowIndex || bHasPopin);
1569
+ oCellRef.classList.toggle("sapMPluginsCellSelectorRight", mPosition.colIndex == mBounds.to.colIndex || (bPopinSelected && mPosition.colIndex == mBounds.to.colIndex - 1));
1570
+ oCellRef.classList.toggle("sapMPluginsCellSelectorLeft", mPosition.colIndex == mBounds.from.colIndex || (bPopinSelected && mPosition.colIndex == mBounds.to.colIndex));
1571
+ oCellRef.classList.toggle("sapMPluginsCellSelectorSelected", true);
1572
+ oCellRef.setAttribute("aria-selected", "true");
1573
+
1574
+ return [oCellRef];
1575
+ },
1576
+ loadContexts: function (oBinding, iStartIndex, iLength) {
1145
1577
  }
1146
1578
  }
1147
1579
  }, CellSelector);