@openui5/sap.m 1.119.1 → 1.120.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 (462) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +4 -4
  3. package/src/sap/m/.library +8 -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 +1 -1
  9. package/src/sap/m/ActionTileContent.js +1 -1
  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 +1 -1
  13. package/src/sap/m/Avatar.js +10 -6
  14. package/src/sap/m/AvatarRenderer.js +10 -3
  15. package/src/sap/m/Bar.js +1 -1
  16. package/src/sap/m/Breadcrumbs.js +1 -1
  17. package/src/sap/m/BusyDialog.js +1 -1
  18. package/src/sap/m/BusyIndicator.js +1 -1
  19. package/src/sap/m/Button.js +1 -1
  20. package/src/sap/m/Carousel.js +1 -1
  21. package/src/sap/m/CarouselLayout.js +1 -1
  22. package/src/sap/m/CheckBox.js +1 -1
  23. package/src/sap/m/ColorPalette.js +1 -1
  24. package/src/sap/m/ColorPalettePopover.js +1 -1
  25. package/src/sap/m/Column.js +1 -1
  26. package/src/sap/m/ColumnHeaderPopover.js +7 -8
  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 +20 -3
  35. package/src/sap/m/ComboBoxTextField.js +1 -1
  36. package/src/sap/m/CustomListItem.js +1 -1
  37. package/src/sap/m/CustomTile.js +1 -1
  38. package/src/sap/m/CustomTreeItem.js +1 -1
  39. package/src/sap/m/DatePicker.js +1 -1
  40. package/src/sap/m/DateRangeSelection.js +22 -12
  41. package/src/sap/m/DateTimeField.js +1 -1
  42. package/src/sap/m/DateTimeInput.js +1 -1
  43. package/src/sap/m/DateTimePicker.js +1 -1
  44. package/src/sap/m/Dialog.js +1 -1
  45. package/src/sap/m/DisplayListItem.js +1 -1
  46. package/src/sap/m/DraftIndicator.js +1 -1
  47. package/src/sap/m/DynamicDate.js +1 -1
  48. package/src/sap/m/DynamicDateOption.js +1 -1
  49. package/src/sap/m/DynamicDateRange.js +10 -2
  50. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  51. package/src/sap/m/ExpandableText.js +1 -1
  52. package/src/sap/m/FacetFilter.js +2 -1
  53. package/src/sap/m/FacetFilterItem.js +1 -1
  54. package/src/sap/m/FacetFilterList.js +1 -1
  55. package/src/sap/m/FeedContent.js +1 -1
  56. package/src/sap/m/FeedInput.js +5 -4
  57. package/src/sap/m/FeedInputRenderer.js +3 -3
  58. package/src/sap/m/FeedListItem.js +6 -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 +58 -23
  66. package/src/sap/m/GenericTileRenderer.js +11 -0
  67. package/src/sap/m/GroupHeaderListItem.js +1 -1
  68. package/src/sap/m/GrowingEnablement.js +2 -3
  69. package/src/sap/m/GrowingList.js +1 -1
  70. package/src/sap/m/HBox.js +1 -1
  71. package/src/sap/m/HeaderContainer.js +6 -4
  72. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  73. package/src/sap/m/IconTabBar.js +1 -1
  74. package/src/sap/m/IconTabBarSelectList.js +1 -1
  75. package/src/sap/m/IconTabFilter.js +1 -1
  76. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  77. package/src/sap/m/IconTabHeader.js +1 -1
  78. package/src/sap/m/IconTabSeparator.js +1 -1
  79. package/src/sap/m/IllustratedMessage.js +1 -1
  80. package/src/sap/m/Illustration.js +1 -1
  81. package/src/sap/m/Image.js +1 -1
  82. package/src/sap/m/ImageContent.js +1 -1
  83. package/src/sap/m/Input.js +79 -14
  84. package/src/sap/m/InputBase.js +3 -1
  85. package/src/sap/m/InputListItem.js +1 -1
  86. package/src/sap/m/InputRenderer.js +7 -3
  87. package/src/sap/m/Label.js +1 -1
  88. package/src/sap/m/LightBox.js +1 -1
  89. package/src/sap/m/LightBoxItem.js +1 -1
  90. package/src/sap/m/Link.js +1 -1
  91. package/src/sap/m/LinkTileContent.js +143 -0
  92. package/src/sap/m/List.js +1 -1
  93. package/src/sap/m/ListBase.js +32 -14
  94. package/src/sap/m/ListItemBase.js +1 -1
  95. package/src/sap/m/MaskEnabler.js +1 -1
  96. package/src/sap/m/MaskInput.js +1 -1
  97. package/src/sap/m/MaskInputRule.js +1 -1
  98. package/src/sap/m/Menu.js +1 -1
  99. package/src/sap/m/MenuButton.js +3 -3
  100. package/src/sap/m/MenuItem.js +1 -1
  101. package/src/sap/m/MenuListItem.js +1 -1
  102. package/src/sap/m/MessageItem.js +1 -1
  103. package/src/sap/m/MessageListItem.js +1 -1
  104. package/src/sap/m/MessagePage.js +1 -1
  105. package/src/sap/m/MessagePopover.js +2 -3
  106. package/src/sap/m/MessagePopoverItem.js +1 -1
  107. package/src/sap/m/MessageStrip.js +1 -1
  108. package/src/sap/m/MessageToast.js +5 -19
  109. package/src/sap/m/MessageView.js +1 -1
  110. package/src/sap/m/MessageViewRenderer.js +2 -3
  111. package/src/sap/m/MultiComboBox.js +1 -1
  112. package/src/sap/m/MultiEditField.js +1 -1
  113. package/src/sap/m/MultiInput.js +4 -2
  114. package/src/sap/m/NavContainer.js +4 -3
  115. package/src/sap/m/NewsContent.js +1 -1
  116. package/src/sap/m/NotificationList.js +1 -1
  117. package/src/sap/m/NotificationListBase.js +1 -1
  118. package/src/sap/m/NotificationListGroup.js +1 -1
  119. package/src/sap/m/NotificationListItem.js +1 -1
  120. package/src/sap/m/NumericContent.js +9 -10
  121. package/src/sap/m/NumericContentRenderer.js +5 -4
  122. package/src/sap/m/NumericInput.js +1 -1
  123. package/src/sap/m/ObjectAttribute.js +1 -1
  124. package/src/sap/m/ObjectHeader.js +1 -1
  125. package/src/sap/m/ObjectIdentifier.js +1 -1
  126. package/src/sap/m/ObjectListItem.js +1 -1
  127. package/src/sap/m/ObjectMarker.js +1 -1
  128. package/src/sap/m/ObjectNumber.js +1 -1
  129. package/src/sap/m/ObjectStatus.js +4 -6
  130. package/src/sap/m/ObjectStatusRenderer.js +3 -1
  131. package/src/sap/m/OverflowToolbar.js +1 -1
  132. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  133. package/src/sap/m/OverflowToolbarButton.js +1 -1
  134. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  135. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  136. package/src/sap/m/OverflowToolbarRenderer.js +8 -1
  137. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  138. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  139. package/src/sap/m/P13nColumnsItem.js +2 -1
  140. package/src/sap/m/P13nColumnsPanel.js +1 -1
  141. package/src/sap/m/P13nConditionPanel.js +1 -1
  142. package/src/sap/m/P13nDialog.js +1 -1
  143. package/src/sap/m/P13nDimMeasureItem.js +2 -1
  144. package/src/sap/m/P13nDimMeasurePanel.js +2 -1
  145. package/src/sap/m/P13nFilterItem.js +1 -1
  146. package/src/sap/m/P13nFilterPanel.js +1 -1
  147. package/src/sap/m/P13nGroupItem.js +2 -1
  148. package/src/sap/m/P13nGroupPanel.js +1 -1
  149. package/src/sap/m/P13nItem.js +1 -1
  150. package/src/sap/m/P13nPanel.js +1 -1
  151. package/src/sap/m/P13nSelectionItem.js +1 -1
  152. package/src/sap/m/P13nSelectionPanel.js +1 -1
  153. package/src/sap/m/P13nSortItem.js +2 -1
  154. package/src/sap/m/P13nSortPanel.js +1 -1
  155. package/src/sap/m/PDFViewer.js +20 -8
  156. package/src/sap/m/PDFViewerRenderManager.js +18 -18
  157. package/src/sap/m/PDFViewerRenderer.js +1 -1
  158. package/src/sap/m/Page.js +1 -1
  159. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  160. package/src/sap/m/PagingButton.js +1 -1
  161. package/src/sap/m/Panel.js +1 -1
  162. package/src/sap/m/PlanningCalendar.js +37 -12
  163. package/src/sap/m/PlanningCalendarHeader.js +1 -1
  164. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  165. package/src/sap/m/PlanningCalendarRow.js +1 -1
  166. package/src/sap/m/PlanningCalendarView.js +1 -1
  167. package/src/sap/m/Popover.js +5 -4
  168. package/src/sap/m/ProgressIndicator.js +1 -1
  169. package/src/sap/m/PullToRefresh.js +1 -1
  170. package/src/sap/m/QuickView.js +1 -1
  171. package/src/sap/m/QuickViewBase.js +1 -1
  172. package/src/sap/m/QuickViewCard.js +1 -1
  173. package/src/sap/m/QuickViewGroup.js +1 -1
  174. package/src/sap/m/QuickViewGroupElement.js +1 -1
  175. package/src/sap/m/QuickViewPage.js +1 -1
  176. package/src/sap/m/RadioButton.js +3 -3
  177. package/src/sap/m/RadioButtonGroup.js +1 -1
  178. package/src/sap/m/RangeSlider.js +1 -1
  179. package/src/sap/m/RangeSliderRenderer.js +15 -8
  180. package/src/sap/m/RatingIndicator.js +4 -3
  181. package/src/sap/m/ResponsivePopover.js +13 -7
  182. package/src/sap/m/ResponsiveScale.js +1 -1
  183. package/src/sap/m/ScrollBar.js +1 -1
  184. package/src/sap/m/ScrollContainer.js +1 -1
  185. package/src/sap/m/SearchField.js +1 -1
  186. package/src/sap/m/SegmentedButton.js +1 -1
  187. package/src/sap/m/SegmentedButtonItem.js +1 -1
  188. package/src/sap/m/Select.js +1 -1
  189. package/src/sap/m/SelectDialog.js +5 -7
  190. package/src/sap/m/SelectDialogBase.js +1 -1
  191. package/src/sap/m/SelectList.js +1 -1
  192. package/src/sap/m/SelectionDetails.js +1 -1
  193. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  194. package/src/sap/m/SelectionDetailsItem.js +1 -1
  195. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  196. package/src/sap/m/Shell.js +1 -1
  197. package/src/sap/m/SimpleFixFlex.js +1 -1
  198. package/src/sap/m/SinglePlanningCalendar.js +1 -1
  199. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  200. package/src/sap/m/SinglePlanningCalendarGrid.js +2 -2
  201. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +3 -2
  202. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  203. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  204. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  205. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  206. package/src/sap/m/SlideTile.js +7 -9
  207. package/src/sap/m/Slider.js +1 -1
  208. package/src/sap/m/SliderTooltip.js +1 -1
  209. package/src/sap/m/SliderTooltipBase.js +1 -1
  210. package/src/sap/m/SliderTooltipContainer.js +1 -1
  211. package/src/sap/m/SplitApp.js +1 -1
  212. package/src/sap/m/SplitButton.js +1 -1
  213. package/src/sap/m/SplitContainer.js +4 -2
  214. package/src/sap/m/StandardDynamicDateOption.js +1 -1
  215. package/src/sap/m/StandardListItem.js +1 -1
  216. package/src/sap/m/StandardTile.js +1 -1
  217. package/src/sap/m/StandardTreeItem.js +1 -1
  218. package/src/sap/m/StepInput.js +1 -1
  219. package/src/sap/m/SuggestionItem.js +1 -1
  220. package/src/sap/m/SuggestionsPopover.js +5 -5
  221. package/src/sap/m/Switch.js +1 -1
  222. package/src/sap/m/TabContainer.js +10 -4
  223. package/src/sap/m/TabContainerItem.js +1 -1
  224. package/src/sap/m/TabStrip.js +2 -2
  225. package/src/sap/m/TabStripItem.js +1 -1
  226. package/src/sap/m/Table.js +35 -4
  227. package/src/sap/m/TablePersoController.js +1 -1
  228. package/src/sap/m/TablePersoDialog.js +1 -1
  229. package/src/sap/m/TablePersoProvider.js +1 -1
  230. package/src/sap/m/TableSelectDialog.js +5 -7
  231. package/src/sap/m/Text.js +1 -1
  232. package/src/sap/m/TextArea.js +1 -1
  233. package/src/sap/m/Tile.js +1 -1
  234. package/src/sap/m/TileContainer.js +1 -1
  235. package/src/sap/m/TileContent.js +4 -4
  236. package/src/sap/m/TimePicker.js +1 -1
  237. package/src/sap/m/TimePickerClock.js +1 -1
  238. package/src/sap/m/TimePickerClocks.js +1 -1
  239. package/src/sap/m/TimePickerInputs.js +1 -1
  240. package/src/sap/m/TimePickerInternals.js +1 -1
  241. package/src/sap/m/TimePickerSlider.js +1 -1
  242. package/src/sap/m/TimePickerSliders.js +1 -1
  243. package/src/sap/m/Title.js +1 -1
  244. package/src/sap/m/TitlePropagationSupport.js +1 -1
  245. package/src/sap/m/ToggleButton.js +1 -1
  246. package/src/sap/m/Token.js +1 -1
  247. package/src/sap/m/Tokenizer.js +1 -1
  248. package/src/sap/m/Toolbar.js +1 -1
  249. package/src/sap/m/ToolbarLayoutData.js +1 -1
  250. package/src/sap/m/ToolbarRenderer.js +8 -0
  251. package/src/sap/m/ToolbarSeparator.js +1 -1
  252. package/src/sap/m/ToolbarSpacer.js +1 -1
  253. package/src/sap/m/Tree.js +17 -1
  254. package/src/sap/m/TreeItemBase.js +1 -1
  255. package/src/sap/m/UploadCollection.js +1 -1
  256. package/src/sap/m/UploadCollectionItem.js +1 -1
  257. package/src/sap/m/UploadCollectionParameter.js +1 -1
  258. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  259. package/src/sap/m/VBox.js +1 -1
  260. package/src/sap/m/ValueStateHeader.js +9 -4
  261. package/src/sap/m/VariantItem.js +99 -27
  262. package/src/sap/m/VariantManagement.js +196 -90
  263. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  264. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  265. package/src/sap/m/ViewSettingsDialog.js +44 -44
  266. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  267. package/src/sap/m/ViewSettingsItem.js +1 -1
  268. package/src/sap/m/VisibleItem.js +1 -1
  269. package/src/sap/m/WheelSlider.js +1 -1
  270. package/src/sap/m/WheelSliderContainer.js +1 -1
  271. package/src/sap/m/Wizard.js +6 -6
  272. package/src/sap/m/WizardProgressNavigator.js +1 -1
  273. package/src/sap/m/WizardStep.js +1 -1
  274. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  275. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  276. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  277. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  278. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  279. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  280. package/src/sap/m/designtime/IconTabFilter.designtime.js +1 -1
  281. package/src/sap/m/designtime/VariantManagement.designtime.js +0 -6
  282. package/src/sap/m/designtime/messagebundle_mk.properties +182 -0
  283. package/src/sap/m/designtime/messagebundle_sh.properties +3 -3
  284. package/src/sap/m/flexibility/EngineFlex.js +5 -0
  285. package/src/sap/m/inputUtils/highlightItemsWithContains.js +82 -0
  286. package/src/sap/m/library.js +76 -136
  287. package/src/sap/m/messagebundle.properties +37 -6
  288. package/src/sap/m/messagebundle_ar.properties +46 -2
  289. package/src/sap/m/messagebundle_bg.properties +49 -5
  290. package/src/sap/m/messagebundle_ca.properties +47 -3
  291. package/src/sap/m/messagebundle_cs.properties +46 -2
  292. package/src/sap/m/messagebundle_cy.properties +46 -2
  293. package/src/sap/m/messagebundle_da.properties +46 -2
  294. package/src/sap/m/messagebundle_de.properties +46 -2
  295. package/src/sap/m/messagebundle_el.properties +48 -4
  296. package/src/sap/m/messagebundle_en.properties +23 -6
  297. package/src/sap/m/messagebundle_en_GB.properties +46 -2
  298. package/src/sap/m/messagebundle_es.properties +46 -2
  299. package/src/sap/m/messagebundle_es_MX.properties +46 -2
  300. package/src/sap/m/messagebundle_et.properties +44 -0
  301. package/src/sap/m/messagebundle_fi.properties +46 -2
  302. package/src/sap/m/messagebundle_fr.properties +46 -2
  303. package/src/sap/m/messagebundle_fr_CA.properties +46 -2
  304. package/src/sap/m/messagebundle_hi.properties +48 -4
  305. package/src/sap/m/messagebundle_hr.properties +46 -2
  306. package/src/sap/m/messagebundle_hu.properties +51 -7
  307. package/src/sap/m/messagebundle_id.properties +48 -4
  308. package/src/sap/m/messagebundle_it.properties +44 -0
  309. package/src/sap/m/messagebundle_iw.properties +46 -2
  310. package/src/sap/m/messagebundle_ja.properties +44 -0
  311. package/src/sap/m/messagebundle_kk.properties +60 -16
  312. package/src/sap/m/messagebundle_ko.properties +44 -0
  313. package/src/sap/m/messagebundle_lt.properties +46 -2
  314. package/src/sap/m/messagebundle_lv.properties +57 -13
  315. package/src/sap/m/messagebundle_mk.properties +1869 -0
  316. package/src/sap/m/messagebundle_ms.properties +46 -2
  317. package/src/sap/m/messagebundle_nl.properties +44 -0
  318. package/src/sap/m/messagebundle_no.properties +47 -3
  319. package/src/sap/m/messagebundle_pl.properties +46 -2
  320. package/src/sap/m/messagebundle_pt.properties +44 -0
  321. package/src/sap/m/messagebundle_pt_PT.properties +44 -0
  322. package/src/sap/m/messagebundle_ro.properties +46 -2
  323. package/src/sap/m/messagebundle_ru.properties +48 -4
  324. package/src/sap/m/messagebundle_sh.properties +149 -105
  325. package/src/sap/m/messagebundle_sk.properties +46 -2
  326. package/src/sap/m/messagebundle_sl.properties +62 -18
  327. package/src/sap/m/messagebundle_sv.properties +50 -6
  328. package/src/sap/m/messagebundle_th.properties +44 -0
  329. package/src/sap/m/messagebundle_tr.properties +49 -5
  330. package/src/sap/m/messagebundle_uk.properties +59 -15
  331. package/src/sap/m/messagebundle_vi.properties +46 -2
  332. package/src/sap/m/messagebundle_zh_CN.properties +44 -0
  333. package/src/sap/m/messagebundle_zh_TW.properties +46 -2
  334. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  335. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  336. package/src/sap/m/p13n/BasePanel.js +13 -3
  337. package/src/sap/m/p13n/Container.js +1 -1
  338. package/src/sap/m/p13n/Engine.js +1 -1
  339. package/src/sap/m/p13n/FlexUtil.js +0 -41
  340. package/src/sap/m/p13n/GroupController.js +1 -1
  341. package/src/sap/m/p13n/GroupPanel.js +1 -1
  342. package/src/sap/m/p13n/Popup.js +16 -1
  343. package/src/sap/m/p13n/QueryPanel.js +1 -1
  344. package/src/sap/m/p13n/SelectionController.js +457 -423
  345. package/src/sap/m/p13n/SelectionPanel.js +1 -1
  346. package/src/sap/m/p13n/SortController.js +1 -1
  347. package/src/sap/m/p13n/SortPanel.js +4 -3
  348. package/src/sap/m/p13n/handler/xConfigHandler.js +18 -5
  349. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
  350. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  351. package/src/sap/m/p13n/modules/UIManager.js +1 -1
  352. package/src/sap/m/p13n/modules/xConfigAPI.js +1 -1
  353. package/src/sap/m/plugins/CellSelector.js +172 -153
  354. package/src/sap/m/plugins/ColumnResizer.js +9 -2
  355. package/src/sap/m/plugins/CopyProvider.js +21 -10
  356. package/src/sap/m/plugins/DataStateIndicator.js +1 -1
  357. package/src/sap/m/plugins/PasteProvider.js +1 -1
  358. package/src/sap/m/plugins/PluginBase.js +1 -1
  359. package/src/sap/m/routing/Target.js +3 -3
  360. package/src/sap/m/routing/Targets.js +3 -3
  361. package/src/sap/m/semantic/AddAction.js +1 -1
  362. package/src/sap/m/semantic/CancelAction.js +1 -1
  363. package/src/sap/m/semantic/DeleteAction.js +1 -1
  364. package/src/sap/m/semantic/DetailPage.js +1 -1
  365. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  366. package/src/sap/m/semantic/EditAction.js +1 -1
  367. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  368. package/src/sap/m/semantic/FilterAction.js +1 -1
  369. package/src/sap/m/semantic/FilterSelect.js +1 -1
  370. package/src/sap/m/semantic/FlagAction.js +1 -1
  371. package/src/sap/m/semantic/ForwardAction.js +1 -1
  372. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  373. package/src/sap/m/semantic/GroupAction.js +1 -1
  374. package/src/sap/m/semantic/GroupSelect.js +1 -1
  375. package/src/sap/m/semantic/MainAction.js +1 -1
  376. package/src/sap/m/semantic/MasterPage.js +1 -1
  377. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  378. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  379. package/src/sap/m/semantic/NegativeAction.js +1 -1
  380. package/src/sap/m/semantic/OpenInAction.js +1 -1
  381. package/src/sap/m/semantic/PositiveAction.js +1 -1
  382. package/src/sap/m/semantic/PrintAction.js +1 -1
  383. package/src/sap/m/semantic/SaveAction.js +1 -1
  384. package/src/sap/m/semantic/Segment.js +1 -1
  385. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  386. package/src/sap/m/semantic/SemanticButton.js +1 -1
  387. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  388. package/src/sap/m/semantic/SemanticControl.js +1 -1
  389. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  390. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  391. package/src/sap/m/semantic/SemanticPage.js +1 -1
  392. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  393. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  394. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  395. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  396. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  397. package/src/sap/m/semantic/ShareMenu.js +1 -1
  398. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  399. package/src/sap/m/semantic/SortAction.js +1 -1
  400. package/src/sap/m/semantic/SortSelect.js +1 -1
  401. package/src/sap/m/table/ColumnWidthController.js +177 -0
  402. package/src/sap/m/table/Util.js +1 -1
  403. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  404. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  405. package/src/sap/m/table/columnmenu/Item.js +1 -1
  406. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  407. package/src/sap/m/table/columnmenu/Menu.js +17 -13
  408. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  409. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  410. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  411. package/src/sap/m/table/columnmenu/QuickGroup.js +5 -1
  412. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  413. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  414. package/src/sap/m/table/columnmenu/QuickSortItem.js +2 -2
  415. package/src/sap/m/table/columnmenu/QuickTotal.js +5 -1
  416. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  417. package/src/sap/m/themes/base/Avatar.less +0 -1
  418. package/src/sap/m/themes/base/BarBase.less +1 -1
  419. package/src/sap/m/themes/base/BusyIndicator.less +0 -10
  420. package/src/sap/m/themes/base/ExpandableText.less +6 -0
  421. package/src/sap/m/themes/base/GenericTile.less +36 -0
  422. package/src/sap/m/themes/base/LinkTileContent.less +17 -0
  423. package/src/sap/m/themes/base/MenuButton.less +1 -1
  424. package/src/sap/m/themes/base/NotificationListBase.less +3 -3
  425. package/src/sap/m/themes/base/ObjectStatus.less +241 -1
  426. package/src/sap/m/themes/base/RadioButton.less +1 -1
  427. package/src/sap/m/themes/base/SearchField.less +2 -1
  428. package/src/sap/m/themes/base/SplitButton.less +0 -1
  429. package/src/sap/m/themes/base/Text.less +4 -1
  430. package/src/sap/m/themes/base/Toolbar.less +7 -14
  431. package/src/sap/m/themes/base/ValueStateHeader.less +4 -0
  432. package/src/sap/m/themes/base/library.source.less +1 -0
  433. package/src/sap/m/upload/ActionsPlaceholder.js +49 -0
  434. package/src/sap/m/upload/Column.js +58 -0
  435. package/src/sap/m/upload/FilePreviewDialog.js +22 -3
  436. package/src/sap/m/upload/FilterPanel.js +280 -0
  437. package/src/sap/m/upload/UploadSet.js +11 -6
  438. package/src/sap/m/upload/UploadSetItem.js +6 -5
  439. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  440. package/src/sap/m/upload/UploadSetwithTable.js +487 -93
  441. package/src/sap/m/upload/UploadSetwithTableItem.js +26 -11
  442. package/src/sap/m/upload/Uploader.js +3 -0
  443. package/src/sap/m/upload/UploaderTableItem.js +4 -1
  444. package/src/sap/m/upload/p13n/PersManager.js +251 -0
  445. package/src/sap/m/upload/p13n/flexibility/UploadSetwithTable.flexibility.js +32 -0
  446. package/src/sap/m/upload/p13n/handlers/BaseConfigHandler.js +44 -0
  447. package/src/sap/m/upload/p13n/handlers/ChangeHandler.js +98 -0
  448. package/src/sap/m/upload/p13n/handlers/ColumnConfigHandler.js +57 -0
  449. package/src/sap/m/upload/p13n/handlers/ColumnsStateChangeHandler.js +43 -0
  450. package/src/sap/m/upload/p13n/handlers/FilterConfigHandler.js +71 -0
  451. package/src/sap/m/upload/p13n/handlers/FilterStateChangeHandler.js +65 -0
  452. package/src/sap/m/upload/p13n/handlers/GroupConfigHandler.js +57 -0
  453. package/src/sap/m/upload/p13n/handlers/GroupStateChangeHandler.js +46 -0
  454. package/src/sap/m/upload/p13n/handlers/SortConfigHandler.js +57 -0
  455. package/src/sap/m/upload/p13n/handlers/SortStateChangeHandler.js +48 -0
  456. package/src/sap/m/upload/p13n/mediator/BaseMediator.js +183 -0
  457. package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +210 -0
  458. package/src/sap/m/upload/p13n/mediator/FilterMediator.js +196 -0
  459. package/src/sap/m/upload/p13n/mediator/GroupMediator.js +192 -0
  460. package/src/sap/m/upload/p13n/mediator/SortMediator.js +200 -0
  461. package/src/sap/m/upload/p13n/modules/CustomDataConfig.js +100 -0
  462. package/src/sap/m/upload/p13n/modules/PersPopupManager.js +76 -0
@@ -0,0 +1,65 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ /**
7
+ *
8
+ *
9
+ * State Change Handler for the filter related data based on flexibility
10
+ *
11
+ * @internal
12
+ * @private
13
+ *
14
+ */
15
+
16
+
17
+ sap.ui.define([], function () {
18
+ "use strict";
19
+
20
+ const FilterStateChangeHandler = {};
21
+
22
+ FilterStateChangeHandler.createRevertData = function (oContent) {
23
+ const oRevertData = { targetAggregation: oContent.targetAggregation };
24
+ if (oContent.deleted) {
25
+ oRevertData.inserted = oContent.deleted.map((oEntry) => {
26
+ return {
27
+ key: oEntry.key,
28
+ index: oEntry.prevIndex,
29
+ path: oEntry.prevPath,
30
+ operator: oEntry.prevOperator,
31
+ value: oEntry.prevValue
32
+ };
33
+ });
34
+ }
35
+ if (oContent.moved) {
36
+ oRevertData.moved = oContent.moved.map((oEntry) => {
37
+ return {
38
+ key: oEntry.key,
39
+ index: oEntry.prevIndex,
40
+ prevIndex: oEntry.index,
41
+ path: oEntry.prevPath,
42
+ prevPath: oEntry.path,
43
+ operator: oEntry.prevOperator,
44
+ prevOperator: oEntry.operator,
45
+ value: oEntry.prevValue,
46
+ prevValue: oEntry.value
47
+ };
48
+ });
49
+ }
50
+ if (oContent.inserted) {
51
+ oRevertData.deleted = oContent.inserted.map((oEntry) => {
52
+ return {
53
+ key: oEntry.key,
54
+ prevIndex: oEntry.index,
55
+ prevPath: oEntry.path,
56
+ prevOperator: oEntry.operator,
57
+ prevValue: oEntry.value
58
+ };
59
+ });
60
+ }
61
+ return oRevertData;
62
+ };
63
+
64
+ return FilterStateChangeHandler;
65
+ });
@@ -0,0 +1,57 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ /**
8
+ *
9
+ *
10
+ * Config handler for Grouping state
11
+ *
12
+ * @internal
13
+ * @private
14
+ *
15
+ */
16
+
17
+
18
+ sap.ui.define(["sap/m/upload/p13n/handlers/BaseConfigHandler"], function (BaseConfigHandler) {
19
+ "use strict";
20
+
21
+ const GroupConfigHandler = BaseConfigHandler.extend("sap.m.upload.p13n.handlers.GroupConfigHandler", {});
22
+
23
+ const EVENT_NAME = "uploadSetTableGroupStateChange";
24
+
25
+ GroupConfigHandler.getEventName = function () {
26
+ return EVENT_NAME;
27
+ };
28
+
29
+ GroupConfigHandler.prototype.modifyState = function (oPayload, oExistingConfig) {
30
+ const oContent = oPayload.content,
31
+ sAggregation = oContent.targetAggregation,
32
+ oConfig = oExistingConfig || {};
33
+
34
+ oConfig.properties ??= {};
35
+ oConfig.properties[sAggregation] ??= {};
36
+
37
+ if (oContent.deleted) {
38
+ oContent.deleted.forEach((oEntry) => {
39
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, prevIndex: oEntry.prevIndex, grouped: false };
40
+ });
41
+ }
42
+ if (oContent.moved) {
43
+ oContent.moved.forEach((oEntry) => {
44
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, index: oEntry.index, grouped: true };
45
+ });
46
+ }
47
+ if (oContent.inserted) {
48
+ oContent.inserted.forEach((oEntry) => {
49
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, index: oEntry.index, grouped: true };
50
+ });
51
+ }
52
+
53
+ return oConfig;
54
+ };
55
+
56
+ return GroupConfigHandler;
57
+ });
@@ -0,0 +1,46 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ /**
7
+ *
8
+ *
9
+ * State Change Handler for the grouping related data based on flexibility
10
+ *
11
+ * @internal
12
+ * @private
13
+ *
14
+ */
15
+
16
+ sap.ui.define([], function () {
17
+ "use strict";
18
+
19
+ const GroupStateChangeHandler = {};
20
+
21
+ GroupStateChangeHandler.createRevertData = function (oContent) {
22
+ const oRevertData = { targetAggregation: oContent.targetAggregation };
23
+ if (oContent.deleted) {
24
+ oRevertData.inserted = oContent.deleted.map((oEntry) => {
25
+ return { key: oEntry.key, index: oEntry.prevIndex };
26
+ });
27
+ }
28
+ if (oContent.moved) {
29
+ oRevertData.moved = oContent.moved.map((oEntry) => {
30
+ return {
31
+ key: oEntry.key,
32
+ index: oEntry.prevIndex,
33
+ prevIndex: oEntry.index
34
+ };
35
+ });
36
+ }
37
+ if (oContent.inserted) {
38
+ oRevertData.deleted = oContent.inserted.map((oEntry) => {
39
+ return { key: oEntry.key, prevIndex: oEntry.index };
40
+ });
41
+ }
42
+ return oRevertData;
43
+ };
44
+
45
+ return GroupStateChangeHandler;
46
+ });
@@ -0,0 +1,57 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ /**
8
+ *
9
+ *
10
+ * Configuration handler for sorting state based on flex layer
11
+ *
12
+ * @internal
13
+ * @private
14
+ * @experimental
15
+ */
16
+
17
+
18
+ sap.ui.define(["sap/m/upload/p13n/handlers/BaseConfigHandler"], function (BaseConfigHandler) {
19
+ "use strict";
20
+
21
+ const SortConfigHandler = BaseConfigHandler.extend("sap.m.upload.p13n.handlers.SortConfigHandler", {});
22
+
23
+ const EVENT_NAME = "uploadSetTableSortStateChange";
24
+
25
+ SortConfigHandler.getEventName = function () {
26
+ return EVENT_NAME;
27
+ };
28
+
29
+ SortConfigHandler.prototype.modifyState = function (oPayload, oExistingConfig) {
30
+ const oContent = oPayload.content,
31
+ sAggregation = oContent.targetAggregation,
32
+ oConfig = oExistingConfig || {};
33
+
34
+ oConfig.properties ??= {};
35
+ oConfig.properties[sAggregation] ??= {};
36
+
37
+ if (oContent.deleted) {
38
+ oContent.deleted.forEach((oEntry) => {
39
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, prevIndex: oEntry.prevIndex, prevDescending: oEntry.prevDescending, sorted: false };
40
+ });
41
+ }
42
+ if (oContent.moved) {
43
+ oContent.moved.forEach((oEntry) => {
44
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, index: oEntry.index, descending: oEntry.descending, sorted: true };
45
+ });
46
+ }
47
+ if (oContent.inserted) {
48
+ oContent.inserted.forEach((oEntry) => {
49
+ oConfig.properties[sAggregation][oEntry.key] = { key: oEntry.key, index: oEntry.index, descending: oEntry.descending, sorted: true };
50
+ });
51
+ }
52
+
53
+ return oConfig;
54
+ };
55
+
56
+ return SortConfigHandler;
57
+ });
@@ -0,0 +1,48 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ /**
7
+ *
8
+ *
9
+ * State Change Handler for the soritng related data based on flexibility
10
+ *
11
+ * @internal
12
+ * @private
13
+ *
14
+ */
15
+
16
+ sap.ui.define([], function () {
17
+ "use strict";
18
+
19
+ const SortStateChangeHandler = {};
20
+
21
+ SortStateChangeHandler.createRevertData = function (oContent) {
22
+ const oRevertData = { targetAggregation: oContent.targetAggregation };
23
+ if (oContent.deleted) {
24
+ oRevertData.inserted = oContent.deleted.map((oEntry) => {
25
+ return { key: oEntry.key, index: oEntry.prevIndex, descending: oEntry.prevDescending };
26
+ });
27
+ }
28
+ if (oContent.moved) {
29
+ oRevertData.moved = oContent.moved.map((oEntry) => {
30
+ return {
31
+ key: oEntry.key,
32
+ index: oEntry.prevIndex,
33
+ prevIndex: oEntry.index,
34
+ descending: oEntry.prevDescending,
35
+ prevDescending: oEntry.descending
36
+ };
37
+ });
38
+ }
39
+ if (oContent.inserted) {
40
+ oRevertData.deleted = oContent.inserted.map((oEntry) => {
41
+ return { key: oEntry.key, prevIndex: oEntry.index, prevDescending: oEntry.descending };
42
+ });
43
+ }
44
+ return oRevertData;
45
+ };
46
+
47
+ return SortStateChangeHandler;
48
+ });
@@ -0,0 +1,183 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define(["sap/ui/base/Object", "sap/ui/core/mvc/XMLView"], function (BaseObject, View) {
8
+ "use strict";
9
+ /**
10
+ * Constructor for a new <code>BaseMediator</code>.
11
+ *
12
+ *
13
+ * @param {object} [mSettings] Initial settings for the new control
14
+ * @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this mediator
15
+ * @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this mediator
16
+ * @param {string} mSettings.p13nMetadataTarget The name of the personalization metadata target that is now managed by this mediator
17
+ * @class
18
+ * The <code>BaseMediator</code> entity serves as a base class to create control-specific personalization implementations.
19
+ *
20
+ * @extends sap.ui.base.Object
21
+ *
22
+ * @author SAP SE
23
+ * @version 1.120.0
24
+ *
25
+ * @public
26
+ * @experimental since 1.120
27
+ * @since 1.120
28
+ * @alias sap.m.upload.p13n.mediator.BaseMediator
29
+ */
30
+
31
+ const BaseMediator = BaseObject.extend("sap.m.upload.p13n.mediator.BaseMediator", {
32
+ constructor: function (mSettings) {
33
+ BaseObject.call(this);
34
+ if (!mSettings?.control) {
35
+ throw Error('Please provide "control" for personalization');
36
+ }
37
+ this._oControl = mSettings.control;
38
+ if (!mSettings?.targetAggregation) {
39
+ throw Error('Please provide "targetAggregation" for personalization');
40
+ }
41
+ this._sTargetAggregation = mSettings.targetAggregation;
42
+ if (!mSettings?.p13nMetadataTarget) {
43
+ throw Error('Please provide "p13nMetadataTarget" for personalization');
44
+ }
45
+ this._sP13nMetadataTarget = mSettings.p13nMetadataTarget;
46
+ }
47
+ });
48
+
49
+ /**
50
+ *
51
+ * Returns the control instance that has been set
52
+ * @returns {sap.m.upload.UploadSetwithTable} returns the upload set table control
53
+ * @public
54
+ */
55
+ BaseMediator.prototype.getControl = function () {
56
+ return this._oControl;
57
+ };
58
+
59
+ /**
60
+ *
61
+ * Returns the target aggregation that has been set
62
+ * @returns {string} returns the target aggregation
63
+ */
64
+
65
+ BaseMediator.prototype.getTargetAggregation = function () {
66
+ return this._sTargetAggregation;
67
+ };
68
+
69
+
70
+ /**
71
+ *
72
+ * Returns the target metadata that as been set
73
+ * @returns {string} returns the p13 target metadata
74
+ */
75
+
76
+ BaseMediator.prototype.getP13nMetadataTarget = function () {
77
+ return this._sP13nMetadataTarget;
78
+ };
79
+
80
+ /**
81
+ *
82
+ * Abstract method for constructing a panel and populating it with data specific to that panel.
83
+ *
84
+ * @name sap.m.upload.p13n.mediator.BaseMediator.prototype.createPanel
85
+ * @function
86
+ * @protected
87
+ * @returns {Promise} returns a promise with the resolved p13 panel.
88
+ *
89
+ */
90
+
91
+ /**
92
+ *
93
+ * Abstract method to obtain changes by comparing the old and current states.
94
+ *
95
+ * @name sap.m.upload.p13n.mediator.BaseMediator.prototype.getChanges
96
+ * @function
97
+ * @protected
98
+ * @returns {Array} returns array of delta changes
99
+ *
100
+ */
101
+
102
+ /**
103
+ *
104
+ *
105
+ * An abstract method for applying changes to the upload set table.
106
+ * Essentially, these changes should be applied after the current data becomes available.
107
+ *
108
+ * @name sap.m.upload.p13n.mediator.BaseMediator.prototype.applyStateToTable
109
+ * @function
110
+ * @protected
111
+ *
112
+ */
113
+
114
+
115
+ /***
116
+ *
117
+ * Gets the view for the particular control
118
+ * @returns {object} returns the view object
119
+ * @public
120
+ *
121
+ */
122
+
123
+ BaseMediator.prototype.getView = function () {
124
+ return this.getControlOfType(this.getControl(), View);
125
+ };
126
+
127
+ /***
128
+ * Helper method to get control view
129
+ * @private
130
+ */
131
+
132
+ BaseMediator.prototype.getControlOfType = function (oControl, oType) {
133
+ if (oControl instanceof oType) {
134
+ return oControl;
135
+ }
136
+ if (oControl && typeof oControl["getParent" === "function"]) {
137
+ return this.getControlOfType(oControl.getParent(), oType);
138
+ }
139
+ return undefined;
140
+ };
141
+
142
+ /***
143
+ *
144
+ * Converts the array of objects with key properties to map and adds addIndex
145
+ * @param {Array} aArray expects array of objects with key property
146
+ * @param {boolean} addIndex expects a boolean in case index needs to be added
147
+ * @returns {object} returns the converted object with key as value of key property inside the object
148
+ * @internal
149
+ *
150
+ */
151
+
152
+ BaseMediator.prototype.arrayToMap = function (aArray, addIndex = false) {
153
+ return aArray.reduce(function (mMap, oProp, iIndex) {
154
+ mMap[oProp.key] = oProp;
155
+ if (addIndex) {
156
+ mMap[oProp.key].index = iIndex;
157
+ }
158
+ return mMap;
159
+ }, {});
160
+ };
161
+
162
+ /**
163
+ *
164
+ * Creates a change that can later be handeled by the flexibility layer to apply and revert the change.
165
+ * @param {string} sChangeType expects the name of change which will be later handled in change handlers.
166
+ * @param {*} oContent expects the changed content which is delta for the specific panel.
167
+ * @returns {object} returns the change object.
168
+ * @public
169
+ */
170
+
171
+ BaseMediator.prototype.createChange = function (sChangeType, oContent) {
172
+ oContent.targetAggregation = this.getTargetAggregation();
173
+ return {
174
+ selectorElement: this.getControl(),
175
+ changeSpecificData: {
176
+ changeType: sChangeType,
177
+ content: oContent
178
+ }
179
+ };
180
+ };
181
+
182
+ return BaseMediator;
183
+ });
@@ -0,0 +1,210 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define(
8
+ [
9
+ "sap/m/upload/p13n/mediator/BaseMediator",
10
+ "sap/m/p13n/SelectionPanel",
11
+ "sap/m/upload/p13n/modules/CustomDataConfig",
12
+ "sap/ui/core/Configuration",
13
+ "sap/base/util/deepEqual"
14
+ ],
15
+ function (BaseMediator, SelectionPanel, CustomDataConfig, Configuration, deepEqual) {
16
+ "use strict";
17
+
18
+ /**
19
+ * Constructor for a new <code>ColumnsMediator</code>.
20
+ *
21
+ * @param {object} [mSettings] Initial settings for the new control
22
+ * @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this mediator
23
+ * @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this mediator
24
+ * @param {string} mSettings.p13nMetadataTarget The name of the personalization metadata target that is now managed by this mediator
25
+ *
26
+ * @class
27
+ * The <code>ColumnsMediator</code> entity serves as a class which handles columns panel related logic.
28
+ *
29
+ * @extends sap.m.upload.p13n.mediator.BaseMediator
30
+ *
31
+ * @author SAP SE
32
+ * @version 1.120.0
33
+ * @private
34
+ * @experimental
35
+ * @internal
36
+ * @alias sap.m.upload.p13n.mediator.ColumnsMediator
37
+ */
38
+
39
+ const ColumnsMediator = BaseMediator.extend("sap.m.upload.p13n.mediator.ColumnsMediator", {
40
+ constructor: function (mSettings) {
41
+ BaseMediator.call(this, mSettings);
42
+ }
43
+ });
44
+
45
+ ColumnsMediator.prototype.createPanel = function () {
46
+ return Promise.resolve(this.createUi(this.getPanelData()));
47
+ };
48
+
49
+ ColumnsMediator.prototype.createUi = function (aPanelData) {
50
+ this._oPanel = new SelectionPanel({ enableCount: true, showHeader: true });
51
+ this._oPanel.setP13nData(aPanelData);
52
+ return this._oPanel;
53
+ };
54
+
55
+ ColumnsMediator.prototype.getPanelData = function () {
56
+ const mCurrentState = this.arrayToMap(this.getCurrentState(), true);
57
+ const aPanelState = [],
58
+ oMetadata = this.getControl()._getP13nMetadata();
59
+ oMetadata[this.getP13nMetadataTarget()].forEach((oMetadataItem) => {
60
+ aPanelState.push({
61
+ key: oMetadataItem.key,
62
+ label: oMetadataItem.label || oMetadataItem.key,
63
+ tooltip: oMetadataItem.tooltip,
64
+ index: mCurrentState[oMetadataItem.key] ? mCurrentState[oMetadataItem.key].index : undefined,
65
+ visible: !!mCurrentState[oMetadataItem.key]
66
+ });
67
+ });
68
+
69
+ // Sort panel config
70
+ const sLocale = Configuration.getLocale().toString(),
71
+ oCollator = window.Intl.Collator(sLocale, {});
72
+ aPanelState.sort((mItem1, mItem2) => {
73
+ if (mItem1.visible && mItem2.visible) {
74
+ return (mItem1.index || 0) - (mItem2.index || 0);
75
+ }
76
+ if (mItem1.visible) {
77
+ return -1;
78
+ }
79
+ if (mItem2.visible) {
80
+ return 1;
81
+ }
82
+ return oCollator.compare(mItem1.label, mItem2.label);
83
+ });
84
+ aPanelState.forEach((oItem) => delete oItem.index);
85
+ return aPanelState;
86
+ };
87
+
88
+ ColumnsMediator.prototype.getCurrentState = function () {
89
+ const oState = [],
90
+ aAggregateItems = this.getControl().getAggregation(this.getTargetAggregation()) || [],
91
+ oView = this.getView();
92
+ aAggregateItems.forEach((oItem, iIndex) => {
93
+ const sKey = oView ? oView.getLocalId(oItem.getId()) : oItem.getId();
94
+ oState[sKey] = { key: sKey, index: iIndex, visible: oItem.getVisible() };
95
+ });
96
+
97
+ const oCustomConfig = CustomDataConfig.read(this.getControl()) || {};
98
+ const oFlexConfig = oCustomConfig.hasOwnProperty("aggregations")
99
+ ? oCustomConfig.aggregations[this.getTargetAggregation()]
100
+ : {};
101
+
102
+
103
+ for (const sKey in oFlexConfig) {
104
+ const { index, visible = true } = oFlexConfig[sKey];
105
+ if (!oState[sKey]) {
106
+ continue;
107
+ }
108
+ if (index !== undefined) {
109
+ oState[sKey].index = index;
110
+ }
111
+ oState[sKey].visible = visible;
112
+ }
113
+ const aState = Object.values(oState)
114
+ .filter((oItem) => oItem.visible)
115
+ .sort((oItem1, oItem2) => {
116
+ return oItem1.index - oItem2.index;
117
+ });
118
+
119
+ return aState.map((oItem) => ({ key: oItem.key }));
120
+ };
121
+
122
+ ColumnsMediator.prototype._getP13nData = function () {
123
+ return this._oPanel ? this._oPanel.getP13nData() : {};
124
+ };
125
+
126
+ ColumnsMediator.prototype.getChanges = function () {
127
+ const aChanges = [],
128
+ aCurrentState = this.getCurrentState(),
129
+ aP13nData = this._getP13nData(),
130
+ aNextState = aP13nData.filter((oEntry) => !!oEntry.visible).map((oEntry) => ({ key: oEntry.key }));
131
+
132
+ if (deepEqual(aCurrentState, aNextState)) {
133
+ return aChanges;
134
+ }
135
+
136
+ // Calculate inserts, delete and move actions
137
+ const aDeleted = this._getDeletes(aCurrentState, aNextState),
138
+ aInserted = this._getInserts(aCurrentState, aNextState),
139
+ aMoved = this._getMove(aCurrentState, aNextState, aDeleted, aInserted);
140
+
141
+ aChanges.push(
142
+ this.createChange("uploadSetTableColumnsStateChange", { deleted: aDeleted, moved: aMoved, inserted: aInserted })
143
+ );
144
+ return aChanges;
145
+ };
146
+
147
+ ColumnsMediator.prototype._getDeletes = function (aCurrentState, aNextState) {
148
+ const aResult = [],
149
+ mNextState = this.arrayToMap(aNextState);
150
+
151
+ aCurrentState.forEach((oState, iIndex) => {
152
+ if (!mNextState[oState.key]) {
153
+ aResult.push({ key: oState.key, prevIndex: iIndex });
154
+ }
155
+ });
156
+ return aResult;
157
+ };
158
+
159
+ ColumnsMediator.prototype._getInserts = function (aCurrentState, aNextState) {
160
+ const aResult = [],
161
+ mCurrentState = this.arrayToMap(aCurrentState);
162
+
163
+ aNextState.forEach((oState, iIndex) => {
164
+ if (!mCurrentState[oState.key]) {
165
+ aResult.push({ key: oState.key, index: iIndex });
166
+ }
167
+ });
168
+ return aResult;
169
+ };
170
+
171
+ ColumnsMediator.prototype._getMove = function (aCurrentState, aNextState) {
172
+ const aResult = [],
173
+ mNextState = this.arrayToMap(aNextState, true);
174
+
175
+ aCurrentState.forEach((oState, iIndex) => {
176
+ if (mNextState[oState.key] && mNextState[oState.key].index !== iIndex) {
177
+ aResult.push({ key: oState.key, index: mNextState[oState.key].index, prevIndex: iIndex });
178
+ }
179
+ });
180
+ return aResult;
181
+ };
182
+
183
+ ColumnsMediator.prototype.applyStateToTable = function () {
184
+ const aState = this.getCurrentState(),
185
+ oView = this.getView();
186
+
187
+ this.getControl()
188
+ .getColumns()
189
+ .forEach((oCol) => {
190
+ oCol.setVisible(false);
191
+ });
192
+ const oColMap = this.getControl()
193
+ .getColumns()
194
+ .reduce((oInit, oCol) => {
195
+ const sKey = oView ? oView.getLocalId(oCol.getId()) : oCol.getId();
196
+ oInit[sKey] = oCol;
197
+ return oInit;
198
+ }, {});
199
+
200
+ aState.forEach((oCol, iIndex) => {
201
+ if (oColMap[oCol.key]) {
202
+ oColMap[oCol.key].setVisible(true);
203
+ oColMap[oCol.key].setOrder(iIndex);
204
+ }
205
+ });
206
+ };
207
+
208
+ return ColumnsMediator;
209
+ }
210
+ );