@openui5/sap.m 1.103.1 → 1.106.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 (494) hide show
  1. package/.eslintrc.json +2 -3
  2. package/.reuse/dep5 +35 -15
  3. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  4. package/THIRDPARTY.txt +64 -21
  5. package/package.json +4 -4
  6. package/src/sap/m/.library +17 -1
  7. package/src/sap/m/AccButton.js +1 -1
  8. package/src/sap/m/ActionListItem.js +1 -1
  9. package/src/sap/m/ActionSelect.js +1 -1
  10. package/src/sap/m/ActionSheet.js +1 -1
  11. package/src/sap/m/App.js +2 -3
  12. package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
  13. package/src/sap/m/Avatar.js +2 -2
  14. package/src/sap/m/BadgeEnabler.js +1 -2
  15. package/src/sap/m/Bar.js +11 -10
  16. package/src/sap/m/Breadcrumbs.js +2 -2
  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 +49 -10
  20. package/src/sap/m/ButtonRenderer.js +10 -2
  21. package/src/sap/m/Carousel.js +3 -4
  22. package/src/sap/m/CarouselLayout.js +1 -1
  23. package/src/sap/m/CarouselRenderer.js +3 -3
  24. package/src/sap/m/CheckBox.js +46 -6
  25. package/src/sap/m/CheckBoxRenderer.js +1 -0
  26. package/src/sap/m/ColorPalette.js +1 -1
  27. package/src/sap/m/ColorPalettePopover.js +1 -1
  28. package/src/sap/m/Column.js +5 -5
  29. package/src/sap/m/ColumnHeaderPopover.js +5 -7
  30. package/src/sap/m/ColumnListItem.js +1 -4
  31. package/src/sap/m/ColumnListItemRenderer.js +1 -2
  32. package/src/sap/m/ColumnPopoverActionItem.js +3 -3
  33. package/src/sap/m/ColumnPopoverCustomItem.js +3 -3
  34. package/src/sap/m/ColumnPopoverItem.js +3 -3
  35. package/src/sap/m/ColumnPopoverSelectListItem.js +3 -5
  36. package/src/sap/m/ColumnPopoverSortItem.js +3 -3
  37. package/src/sap/m/ComboBox.js +6 -5
  38. package/src/sap/m/ComboBoxBase.js +3 -7
  39. package/src/sap/m/ComboBoxBaseRenderer.js +2 -2
  40. package/src/sap/m/ComboBoxTextField.js +1 -7
  41. package/src/sap/m/ComboBoxTextFieldRenderer.js +19 -4
  42. package/src/sap/m/CustomDynamicDateOption.js +1 -1
  43. package/src/sap/m/CustomListItem.js +1 -1
  44. package/src/sap/m/CustomTile.js +1 -1
  45. package/src/sap/m/CustomTreeItem.js +3 -3
  46. package/src/sap/m/CustomTreeItemRenderer.js +2 -2
  47. package/src/sap/m/DatePicker.js +16 -26
  48. package/src/sap/m/DateRangeSelection.js +45 -38
  49. package/src/sap/m/DateTimeField.js +87 -20
  50. package/src/sap/m/DateTimeInput.js +1 -1
  51. package/src/sap/m/DateTimePicker.js +58 -32
  52. package/src/sap/m/DateTimePickerRenderer.js +1 -1
  53. package/src/sap/m/Dialog.js +44 -2
  54. package/src/sap/m/DisplayListItem.js +1 -1
  55. package/src/sap/m/DraftIndicator.js +1 -1
  56. package/src/sap/m/DynamicDate.js +1 -1
  57. package/src/sap/m/DynamicDateFormat.js +2 -5
  58. package/src/sap/m/DynamicDateOption.js +43 -16
  59. package/src/sap/m/DynamicDateRange.js +49 -7
  60. package/src/sap/m/DynamicDateRangeRenderer.js +5 -2
  61. package/src/sap/m/DynamicDateUtil.js +23 -2
  62. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  63. package/src/sap/m/ExpandableText.js +1 -1
  64. package/src/sap/m/FacetFilter.js +2 -2
  65. package/src/sap/m/FacetFilterItem.js +1 -1
  66. package/src/sap/m/FacetFilterList.js +4 -4
  67. package/src/sap/m/FeedContent.js +1 -1
  68. package/src/sap/m/FeedInput.js +1 -1
  69. package/src/sap/m/FeedListItem.js +1 -1
  70. package/src/sap/m/FeedListItemAction.js +1 -1
  71. package/src/sap/m/Fiori20Adapter.js +2 -2
  72. package/src/sap/m/FlexBox.js +1 -1
  73. package/src/sap/m/FlexItemData.js +1 -1
  74. package/src/sap/m/FormattedText.js +1 -1
  75. package/src/sap/m/GenericTag.js +1 -1
  76. package/src/sap/m/GenericTile.js +116 -23
  77. package/src/sap/m/GenericTileLineModeRenderer.js +4 -4
  78. package/src/sap/m/GenericTileRenderer.js +23 -10
  79. package/src/sap/m/GroupHeaderListItem.js +1 -1
  80. package/src/sap/m/GrowingEnablement.js +60 -36
  81. package/src/sap/m/GrowingList.js +1 -1
  82. package/src/sap/m/HBox.js +1 -1
  83. package/src/sap/m/HeaderContainer.js +34 -32
  84. package/src/sap/m/HeaderContainerItemNavigator.js +3 -6
  85. package/src/sap/m/IconTabBar.js +54 -22
  86. package/src/sap/m/IconTabBarSelectList.js +1 -1
  87. package/src/sap/m/IconTabFilter.js +1 -1
  88. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  89. package/src/sap/m/IconTabHeader.js +6 -19
  90. package/src/sap/m/IconTabSeparator.js +1 -1
  91. package/src/sap/m/IllustratedMessage.js +98 -25
  92. package/src/sap/m/IllustratedMessageRenderer.js +10 -6
  93. package/src/sap/m/Illustration.js +8 -1
  94. package/src/sap/m/IllustrationPool.js +1 -0
  95. package/src/sap/m/IllustrationRenderer.js +2 -1
  96. package/src/sap/m/Image.js +73 -3
  97. package/src/sap/m/ImageContent.js +1 -1
  98. package/src/sap/m/ImageRenderer.js +66 -2
  99. package/src/sap/m/Input.js +62 -7
  100. package/src/sap/m/InputBase.js +1 -1
  101. package/src/sap/m/InputBaseRenderer.js +2 -2
  102. package/src/sap/m/InputListItem.js +1 -1
  103. package/src/sap/m/InputRenderer.js +4 -0
  104. package/src/sap/m/InstanceManager.js +6 -6
  105. package/src/sap/m/Label.js +34 -4
  106. package/src/sap/m/LabelRenderer.js +7 -2
  107. package/src/sap/m/LightBox.js +2 -2
  108. package/src/sap/m/LightBoxItem.js +1 -1
  109. package/src/sap/m/Link.js +74 -10
  110. package/src/sap/m/LinkRenderer.js +26 -12
  111. package/src/sap/m/List.js +38 -1
  112. package/src/sap/m/ListBase.js +109 -44
  113. package/src/sap/m/ListBaseRenderer.js +7 -15
  114. package/src/sap/m/ListItemBase.js +40 -11
  115. package/src/sap/m/ListItemBaseRenderer.js +17 -6
  116. package/src/sap/m/ListRenderer.js +2 -2
  117. package/src/sap/m/MaskEnabler.js +52 -2
  118. package/src/sap/m/MaskInput.js +23 -1
  119. package/src/sap/m/MaskInputRule.js +1 -1
  120. package/src/sap/m/Menu.js +1 -1
  121. package/src/sap/m/MenuButton.js +1 -1
  122. package/src/sap/m/MenuItem.js +1 -1
  123. package/src/sap/m/MenuListItem.js +1 -1
  124. package/src/sap/m/MessageBox.js +1 -1
  125. package/src/sap/m/MessageItem.js +3 -4
  126. package/src/sap/m/MessageListItem.js +10 -6
  127. package/src/sap/m/MessagePage.js +1 -1
  128. package/src/sap/m/MessagePopover.js +4 -1
  129. package/src/sap/m/MessagePopoverItem.js +1 -1
  130. package/src/sap/m/MessageStrip.js +1 -1
  131. package/src/sap/m/MessageToast.js +1 -1
  132. package/src/sap/m/MessageView.js +1 -1
  133. package/src/sap/m/MultiComboBox.js +5 -16
  134. package/src/sap/m/MultiEditField.js +1 -1
  135. package/src/sap/m/MultiInput.js +1 -15
  136. package/src/sap/m/NavContainer.js +21 -19
  137. package/src/sap/m/NewsContent.js +2 -3
  138. package/src/sap/m/NotificationList.js +1 -1
  139. package/src/sap/m/NotificationListBase.js +1 -1
  140. package/src/sap/m/NotificationListGroup.js +3 -7
  141. package/src/sap/m/NotificationListGroupRenderer.js +1 -1
  142. package/src/sap/m/NotificationListItem.js +1 -1
  143. package/src/sap/m/NumericContent.js +1 -1
  144. package/src/sap/m/NumericInput.js +1 -1
  145. package/src/sap/m/ObjectAttribute.js +1 -1
  146. package/src/sap/m/ObjectHeader.js +3 -3
  147. package/src/sap/m/ObjectIdentifier.js +8 -5
  148. package/src/sap/m/ObjectListItem.js +7 -1
  149. package/src/sap/m/ObjectMarker.js +1 -1
  150. package/src/sap/m/ObjectNumber.js +2 -3
  151. package/src/sap/m/ObjectNumberRenderer.js +10 -3
  152. package/src/sap/m/ObjectStatus.js +2 -3
  153. package/src/sap/m/ObjectStatusRenderer.js +2 -2
  154. package/src/sap/m/OverflowToolbar.js +3 -8
  155. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  156. package/src/sap/m/OverflowToolbarAssociativePopoverControls.js +3 -8
  157. package/src/sap/m/OverflowToolbarAssociativePopoverRenderer.js +2 -2
  158. package/src/sap/m/OverflowToolbarButton.js +2 -2
  159. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  160. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  161. package/src/sap/m/P13nAnyFilterItem.js +3 -3
  162. package/src/sap/m/P13nColumnsItem.js +3 -3
  163. package/src/sap/m/P13nColumnsPanel.js +3 -3
  164. package/src/sap/m/P13nConditionPanel.js +10 -3
  165. package/src/sap/m/P13nDialog.js +3 -3
  166. package/src/sap/m/P13nDimMeasureItem.js +3 -3
  167. package/src/sap/m/P13nDimMeasurePanel.js +3 -3
  168. package/src/sap/m/P13nFilterItem.js +3 -3
  169. package/src/sap/m/P13nFilterPanel.js +3 -3
  170. package/src/sap/m/P13nGroupItem.js +3 -3
  171. package/src/sap/m/P13nGroupPanel.js +3 -3
  172. package/src/sap/m/P13nItem.js +3 -3
  173. package/src/sap/m/P13nOperationsHelper.js +2 -2
  174. package/src/sap/m/P13nPanel.js +3 -3
  175. package/src/sap/m/P13nSelectionItem.js +3 -3
  176. package/src/sap/m/P13nSelectionPanel.js +3 -3
  177. package/src/sap/m/P13nSortItem.js +3 -3
  178. package/src/sap/m/P13nSortPanel.js +3 -3
  179. package/src/sap/m/PDFViewer.js +2 -2
  180. package/src/sap/m/PDFViewerRenderer.js +1 -0
  181. package/src/sap/m/Page.js +1 -3
  182. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  183. package/src/sap/m/PagingButton.js +1 -1
  184. package/src/sap/m/Panel.js +1 -1
  185. package/src/sap/m/PlanningCalendar.js +4 -16
  186. package/src/sap/m/PlanningCalendarHeader.js +1 -5
  187. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  188. package/src/sap/m/PlanningCalendarRow.js +1 -1
  189. package/src/sap/m/PlanningCalendarView.js +1 -1
  190. package/src/sap/m/Popover.js +11 -4
  191. package/src/sap/m/ProgressIndicator.js +1 -1
  192. package/src/sap/m/ProgressIndicatorRenderer.js +6 -3
  193. package/src/sap/m/PullToRefresh.js +1 -1
  194. package/src/sap/m/QuickView.js +3 -3
  195. package/src/sap/m/QuickViewBase.js +3 -3
  196. package/src/sap/m/QuickViewCard.js +3 -3
  197. package/src/sap/m/QuickViewGroup.js +1 -1
  198. package/src/sap/m/QuickViewGroupElement.js +3 -3
  199. package/src/sap/m/QuickViewPage.js +3 -3
  200. package/src/sap/m/RadioButton.js +47 -20
  201. package/src/sap/m/RadioButtonGroup.js +29 -26
  202. package/src/sap/m/RangeSlider.js +1 -3
  203. package/src/sap/m/RatingIndicator.js +8 -1
  204. package/src/sap/m/RatingIndicatorRenderer.js +13 -4
  205. package/src/sap/m/ResponsivePopover.js +3 -3
  206. package/src/sap/m/ResponsiveScale.js +1 -1
  207. package/src/sap/m/ScrollBar.js +1 -1
  208. package/src/sap/m/ScrollContainer.js +1 -1
  209. package/src/sap/m/SearchField.js +1 -1
  210. package/src/sap/m/SearchFieldRenderer.js +1 -0
  211. package/src/sap/m/SegmentedButton.js +1 -1
  212. package/src/sap/m/SegmentedButtonItem.js +1 -1
  213. package/src/sap/m/Select.js +8 -14
  214. package/src/sap/m/SelectDialog.js +2 -1
  215. package/src/sap/m/SelectDialogBase.js +1 -1
  216. package/src/sap/m/SelectList.js +1 -1
  217. package/src/sap/m/SelectListRenderer.js +2 -2
  218. package/src/sap/m/SelectionDetails.js +2 -2
  219. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  220. package/src/sap/m/SelectionDetailsItem.js +1 -1
  221. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  222. package/src/sap/m/Shell.js +1 -1
  223. package/src/sap/m/SimpleFixFlex.js +1 -1
  224. package/src/sap/m/SinglePlanningCalendar.js +7 -9
  225. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  226. package/src/sap/m/SinglePlanningCalendarGrid.js +1 -7
  227. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
  228. package/src/sap/m/SinglePlanningCalendarMonthGridRenderer.js +0 -2
  229. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  230. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  231. package/src/sap/m/SinglePlanningCalendarWeekView.js +12 -13
  232. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  233. package/src/sap/m/SlideTile.js +30 -5
  234. package/src/sap/m/Slider.js +1 -1
  235. package/src/sap/m/SliderTooltip.js +1 -3
  236. package/src/sap/m/SliderTooltipBase.js +1 -1
  237. package/src/sap/m/SliderTooltipBaseRenderer.js +2 -2
  238. package/src/sap/m/SliderTooltipContainer.js +1 -1
  239. package/src/sap/m/SliderTooltipContainerRenderer.js +2 -2
  240. package/src/sap/m/SliderTooltipRenderer.js +2 -2
  241. package/src/sap/m/SplitApp.js +1 -1
  242. package/src/sap/m/SplitButton.js +1 -3
  243. package/src/sap/m/SplitContainer.js +3 -7
  244. package/src/sap/m/StandardDynamicDateOption.js +9 -15
  245. package/src/sap/m/StandardListItem.js +1 -1
  246. package/src/sap/m/StandardListItemRenderer.js +2 -2
  247. package/src/sap/m/StandardTile.js +1 -1
  248. package/src/sap/m/StandardTreeItem.js +1 -1
  249. package/src/sap/m/StepInput.js +1 -1
  250. package/src/sap/m/SuggestionItem.js +1 -1
  251. package/src/sap/m/SuggestionsPopover.js +4 -2
  252. package/src/sap/m/Switch.js +1 -1
  253. package/src/sap/m/TabContainer.js +1 -1
  254. package/src/sap/m/TabContainerItem.js +1 -1
  255. package/src/sap/m/TabStrip.js +1 -1
  256. package/src/sap/m/TabStripItem.js +1 -1
  257. package/src/sap/m/Table.js +11 -9
  258. package/src/sap/m/TablePersoController.js +1 -1
  259. package/src/sap/m/TablePersoDialog.js +6 -15
  260. package/src/sap/m/TablePersoProvider.js +1 -1
  261. package/src/sap/m/TableRenderer.js +2 -9
  262. package/src/sap/m/TableSelectDialog.js +1 -1
  263. package/src/sap/m/Text.js +1 -1
  264. package/src/sap/m/TextArea.js +1 -1
  265. package/src/sap/m/TextAreaRenderer.js +1 -2
  266. package/src/sap/m/Tile.js +1 -1
  267. package/src/sap/m/TileContainer.js +1 -1
  268. package/src/sap/m/TileContent.js +8 -9
  269. package/src/sap/m/TileContentRenderer.js +3 -3
  270. package/src/sap/m/TimePicker.js +45 -8
  271. package/src/sap/m/TimePickerClock.js +2 -3
  272. package/src/sap/m/TimePickerClocks.js +5 -3
  273. package/src/sap/m/TimePickerClocksRenderer.js +4 -2
  274. package/src/sap/m/TimePickerInputs.js +1 -1
  275. package/src/sap/m/TimePickerInputsRenderer.js +1 -1
  276. package/src/sap/m/TimePickerInternals.js +1 -1
  277. package/src/sap/m/TimePickerSlider.js +1 -1
  278. package/src/sap/m/TimePickerSliders.js +3 -5
  279. package/src/sap/m/Title.js +1 -1
  280. package/src/sap/m/TitlePropagationSupport.js +1 -1
  281. package/src/sap/m/ToggleButton.js +2 -2
  282. package/src/sap/m/Token.js +1 -3
  283. package/src/sap/m/Tokenizer.js +1 -1
  284. package/src/sap/m/Toolbar.js +1 -1
  285. package/src/sap/m/ToolbarLayoutData.js +1 -1
  286. package/src/sap/m/ToolbarSeparator.js +1 -1
  287. package/src/sap/m/ToolbarSpacer.js +1 -1
  288. package/src/sap/m/Tree.js +8 -1
  289. package/src/sap/m/TreeItemBase.js +1 -1
  290. package/src/sap/m/TreeRenderer.js +0 -10
  291. package/src/sap/m/UploadCollection.js +2 -2
  292. package/src/sap/m/UploadCollectionItem.js +1 -1
  293. package/src/sap/m/UploadCollectionParameter.js +1 -1
  294. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  295. package/src/sap/m/VBox.js +1 -1
  296. package/src/sap/m/ValueStateHeader.js +1 -1
  297. package/src/sap/m/VariantItem.js +160 -0
  298. package/src/sap/m/VariantManagement.js +717 -571
  299. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  300. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  301. package/src/sap/m/ViewSettingsDialog.js +1 -1
  302. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  303. package/src/sap/m/ViewSettingsItem.js +1 -1
  304. package/src/sap/m/VisibleItem.js +1 -1
  305. package/src/sap/m/WheelSlider.js +1 -1
  306. package/src/sap/m/WheelSliderContainer.js +1 -1
  307. package/src/sap/m/Wizard.js +10 -3
  308. package/src/sap/m/WizardProgressNavigator.js +1 -1
  309. package/src/sap/m/WizardStep.js +3 -1
  310. package/src/sap/m/_thirdparty/purify.js +1622 -0
  311. package/src/sap/m/changeHandler/AddTableColumn.js +12 -13
  312. package/src/sap/m/changeHandler/ChangeLinkTarget.js +2 -3
  313. package/src/sap/m/changeHandler/CombineButtons.js +19 -22
  314. package/src/sap/m/changeHandler/MoveTableColumns.js +6 -6
  315. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +5 -5
  316. package/src/sap/m/changeHandler/SplitMenuButton.js +7 -6
  317. package/src/sap/m/delegate/DateNavigation.js +0 -4
  318. package/src/sap/m/designtime/Link.designtime.js +19 -11
  319. package/src/sap/m/designtime/VariantManagement.designtime.js +36 -26
  320. package/src/sap/m/flexibility/EngineFlex.js +48 -0
  321. package/src/sap/m/inputUtils/selectionRange.js +1 -2
  322. package/src/sap/m/library.js +60 -7
  323. package/src/sap/m/messagebundle.properties +57 -6
  324. package/src/sap/m/messagebundle_ar.properties +39 -9
  325. package/src/sap/m/messagebundle_bg.properties +33 -3
  326. package/src/sap/m/messagebundle_ca.properties +32 -2
  327. package/src/sap/m/messagebundle_cs.properties +32 -2
  328. package/src/sap/m/messagebundle_cy.properties +34 -4
  329. package/src/sap/m/messagebundle_da.properties +32 -2
  330. package/src/sap/m/messagebundle_de.properties +32 -2
  331. package/src/sap/m/messagebundle_el.properties +35 -5
  332. package/src/sap/m/messagebundle_en.properties +34 -4
  333. package/src/sap/m/messagebundle_en_GB.properties +34 -4
  334. package/src/sap/m/messagebundle_en_US_sappsd.properties +33 -3
  335. package/src/sap/m/messagebundle_en_US_saprigi.properties +31 -3
  336. package/src/sap/m/messagebundle_en_US_saptrc.properties +33 -3
  337. package/src/sap/m/messagebundle_es.properties +33 -3
  338. package/src/sap/m/messagebundle_es_MX.properties +32 -2
  339. package/src/sap/m/messagebundle_et.properties +32 -2
  340. package/src/sap/m/messagebundle_fi.properties +36 -6
  341. package/src/sap/m/messagebundle_fr.properties +33 -3
  342. package/src/sap/m/messagebundle_fr_CA.properties +34 -4
  343. package/src/sap/m/messagebundle_hi.properties +34 -4
  344. package/src/sap/m/messagebundle_hr.properties +36 -6
  345. package/src/sap/m/messagebundle_hu.properties +34 -4
  346. package/src/sap/m/messagebundle_id.properties +34 -4
  347. package/src/sap/m/messagebundle_it.properties +33 -3
  348. package/src/sap/m/messagebundle_iw.properties +34 -4
  349. package/src/sap/m/messagebundle_ja.properties +33 -3
  350. package/src/sap/m/messagebundle_kk.properties +32 -2
  351. package/src/sap/m/messagebundle_ko.properties +40 -10
  352. package/src/sap/m/messagebundle_lt.properties +32 -2
  353. package/src/sap/m/messagebundle_lv.properties +32 -2
  354. package/src/sap/m/messagebundle_ms.properties +33 -3
  355. package/src/sap/m/messagebundle_nl.properties +46 -16
  356. package/src/sap/m/messagebundle_no.properties +34 -4
  357. package/src/sap/m/messagebundle_pl.properties +33 -3
  358. package/src/sap/m/messagebundle_pt.properties +37 -7
  359. package/src/sap/m/messagebundle_pt_PT.properties +32 -2
  360. package/src/sap/m/messagebundle_ro.properties +33 -3
  361. package/src/sap/m/messagebundle_ru.properties +33 -3
  362. package/src/sap/m/messagebundle_sh.properties +33 -3
  363. package/src/sap/m/messagebundle_sk.properties +32 -2
  364. package/src/sap/m/messagebundle_sl.properties +33 -3
  365. package/src/sap/m/messagebundle_sv.properties +32 -2
  366. package/src/sap/m/messagebundle_th.properties +65 -35
  367. package/src/sap/m/messagebundle_tr.properties +36 -6
  368. package/src/sap/m/messagebundle_uk.properties +33 -3
  369. package/src/sap/m/messagebundle_vi.properties +33 -3
  370. package/src/sap/m/messagebundle_zh_CN.properties +33 -3
  371. package/src/sap/m/messagebundle_zh_TW.properties +32 -2
  372. package/src/sap/m/p13n/AbstractContainer.js +7 -7
  373. package/src/sap/m/p13n/AbstractContainerItem.js +4 -4
  374. package/src/sap/m/p13n/BasePanel.js +24 -13
  375. package/src/sap/m/p13n/Container.js +3 -3
  376. package/src/sap/m/p13n/Engine.js +1254 -0
  377. package/src/sap/m/p13n/FlexUtil.js +161 -0
  378. package/src/sap/m/p13n/GroupController.js +145 -0
  379. package/src/sap/m/p13n/GroupPanel.js +12 -5
  380. package/src/sap/m/p13n/MetadataHelper.js +35 -0
  381. package/src/sap/m/p13n/PersistenceProvider.js +160 -0
  382. package/src/sap/m/p13n/Popup.js +49 -12
  383. package/src/sap/m/p13n/QueryPanel.js +3 -3
  384. package/src/sap/m/p13n/SelectionController.js +548 -0
  385. package/src/sap/m/p13n/SelectionPanel.js +23 -5
  386. package/src/sap/m/p13n/SortController.js +153 -0
  387. package/src/sap/m/p13n/SortPanel.js +15 -5
  388. package/src/sap/m/p13n/enum/PersistenceMode.js +43 -0
  389. package/src/sap/m/p13n/handler/xConfigHandler.js +166 -0
  390. package/src/sap/m/p13n/modification/FlexModificationHandler.js +90 -0
  391. package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +75 -0
  392. package/src/sap/m/p13n/modification/ModificationHandler.js +143 -0
  393. package/src/sap/m/p13n/modules/AdaptationProvider.js +67 -0
  394. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +147 -0
  395. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +101 -0
  396. package/src/sap/m/p13n/modules/UIManager.js +230 -0
  397. package/src/sap/m/p13n/modules/xConfigAPI.js +288 -0
  398. package/src/sap/m/plugins/CellSelector.js +741 -0
  399. package/src/sap/m/plugins/ColumnResizer.js +15 -1
  400. package/src/sap/m/plugins/DataStateIndicator.js +2 -2
  401. package/src/sap/m/plugins/PasteProvider.js +1 -1
  402. package/src/sap/m/plugins/PluginBase.js +4 -3
  403. package/src/sap/m/rules/CheckBox.support.js +1 -1
  404. package/src/sap/m/rules/Image.support.js +1 -1
  405. package/src/sap/m/rules/Link.support.js +1 -1
  406. package/src/sap/m/rules/MessagePage.support.js +1 -1
  407. package/src/sap/m/rules/ObjectHeader.support.js +6 -6
  408. package/src/sap/m/rules/ObjectListItem.support.js +1 -1
  409. package/src/sap/m/rules/ObjectMarker.support.js +1 -1
  410. package/src/sap/m/rules/ObjectStatus.support.js +1 -1
  411. package/src/sap/m/rules/Panel.support.js +1 -1
  412. package/src/sap/m/rules/Select.support.js +1 -1
  413. package/src/sap/m/rules/Table.support.js +3 -3
  414. package/src/sap/m/semantic/AddAction.js +1 -1
  415. package/src/sap/m/semantic/CancelAction.js +1 -1
  416. package/src/sap/m/semantic/DeleteAction.js +1 -1
  417. package/src/sap/m/semantic/DetailPage.js +1 -1
  418. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  419. package/src/sap/m/semantic/EditAction.js +1 -1
  420. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  421. package/src/sap/m/semantic/FilterAction.js +1 -1
  422. package/src/sap/m/semantic/FilterSelect.js +1 -1
  423. package/src/sap/m/semantic/FlagAction.js +1 -1
  424. package/src/sap/m/semantic/ForwardAction.js +1 -1
  425. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  426. package/src/sap/m/semantic/GroupAction.js +1 -1
  427. package/src/sap/m/semantic/GroupSelect.js +1 -1
  428. package/src/sap/m/semantic/MainAction.js +1 -1
  429. package/src/sap/m/semantic/MasterPage.js +1 -1
  430. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  431. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  432. package/src/sap/m/semantic/NegativeAction.js +1 -1
  433. package/src/sap/m/semantic/OpenInAction.js +1 -1
  434. package/src/sap/m/semantic/PositiveAction.js +1 -1
  435. package/src/sap/m/semantic/PrintAction.js +1 -1
  436. package/src/sap/m/semantic/SaveAction.js +1 -1
  437. package/src/sap/m/semantic/Segment.js +1 -1
  438. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  439. package/src/sap/m/semantic/SemanticButton.js +1 -1
  440. package/src/sap/m/semantic/SemanticConfiguration.js +3 -4
  441. package/src/sap/m/semantic/SemanticControl.js +1 -1
  442. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  443. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  444. package/src/sap/m/semantic/SemanticPage.js +1 -1
  445. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  446. package/src/sap/m/semantic/SemanticToggleButton.js +1 -3
  447. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  448. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  449. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  450. package/src/sap/m/semantic/ShareMenu.js +1 -1
  451. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  452. package/src/sap/m/semantic/SortAction.js +1 -1
  453. package/src/sap/m/semantic/SortSelect.js +1 -1
  454. package/src/sap/m/table/Util.js +30 -11
  455. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  456. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  457. package/src/sap/m/table/columnmenu/Item.js +1 -1
  458. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  459. package/src/sap/m/table/columnmenu/Menu.js +50 -13
  460. package/src/sap/m/table/columnmenu/QuickAction.js +16 -8
  461. package/src/sap/m/table/columnmenu/QuickActionBase.js +18 -3
  462. package/src/sap/m/table/columnmenu/QuickActionItem.js +5 -6
  463. package/src/sap/m/table/columnmenu/QuickGroup.js +29 -5
  464. package/src/sap/m/table/columnmenu/QuickGroupItem.js +13 -1
  465. package/src/sap/m/table/columnmenu/QuickSort.js +1 -3
  466. package/src/sap/m/table/columnmenu/QuickSortItem.js +8 -7
  467. package/src/sap/m/table/columnmenu/QuickTotal.js +29 -5
  468. package/src/sap/m/table/columnmenu/QuickTotalItem.js +13 -1
  469. package/src/sap/m/themes/base/Breadcrumbs.less +6 -0
  470. package/src/sap/m/themes/base/Button.less +0 -1
  471. package/src/sap/m/themes/base/Carousel.less +8 -8
  472. package/src/sap/m/themes/base/CellSelector.less +9 -0
  473. package/src/sap/m/themes/base/CheckBox.less +1 -0
  474. package/src/sap/m/themes/base/Dialog.less +1 -0
  475. package/src/sap/m/themes/base/DisplayListItem.less +3 -3
  476. package/src/sap/m/themes/base/DynamicDateRange.less +4 -0
  477. package/src/sap/m/themes/base/FeedContent.less +13 -5
  478. package/src/sap/m/themes/base/GenericTile.less +56 -9
  479. package/src/sap/m/themes/base/IllustratedMessage.less +7 -0
  480. package/src/sap/m/themes/base/NewsContent.less +6 -0
  481. package/src/sap/m/themes/base/NumericContent.less +1 -1
  482. package/src/sap/m/themes/base/ObjectStatus.less +2 -1
  483. package/src/sap/m/themes/base/OverflowToolbarAssociativePopover.less +5 -1
  484. package/src/sap/m/themes/base/SelectList.less +0 -5
  485. package/src/sap/m/themes/base/SinglePlanningCalendarGrid.less +7 -0
  486. package/src/sap/m/themes/base/SlideTile.less +35 -4
  487. package/src/sap/m/themes/base/Table.less +11 -2
  488. package/src/sap/m/themes/base/TileContent.less +17 -0
  489. package/src/sap/m/themes/base/library.source.less +1 -0
  490. package/src/sap/m/upload/UploadSet.js +300 -23
  491. package/src/sap/m/upload/UploadSetItem.js +18 -7
  492. package/src/sap/m/upload/UploadSetRenderer.js +8 -16
  493. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  494. package/src/sap/m/upload/Uploader.js +1 -2
@@ -0,0 +1,548 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 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
+ 'sap/base/util/array/diff',
9
+ 'sap/ui/base/Object',
10
+ 'sap/base/util/merge',
11
+ 'sap/base/util/deepEqual',
12
+ 'sap/m/p13n/SelectionPanel',
13
+ 'sap/m/p13n/modules/xConfigAPI'
14
+ ], function (diff, BaseObject, merge, deepEqual, SelectionPanel, xConfigAPI) {
15
+ "use strict";
16
+
17
+ /**
18
+ * Constructor for a new <code>SelectionController</code>.
19
+ *
20
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
21
+ * @param {object} [mSettings] Initial settings for the new control
22
+ * @param {sap.ui.core.Control} mSettings.control The control instance to be personalized by this controller
23
+ * @param {string} mSettings.targetAggregation The name of the personalized aggregation
24
+ *
25
+ * @class
26
+ * The <code>SelectionController</code> serves as base class to create control specific personalization implementations.
27
+ *
28
+ * @extends sap.ui.base.Object
29
+ *
30
+ * @author SAP SE
31
+ * @version 1.106.0
32
+ *
33
+ * @public
34
+ * @experimental Since 1.104. Please note that the API of this control is not yet finalized!
35
+ * @alias sap.m.p13n.SelectionController
36
+ */
37
+ var SelectionController = BaseObject.extend("sap.m.p13n.SelectionController",{
38
+ constructor: function(mSettings) {
39
+ BaseObject.call(this);
40
+
41
+ this._oAdaptationControl = mSettings.control;
42
+
43
+ if (!this._oAdaptationControl) {
44
+ throw new Error("Always provide atleast a 'control' configuration when creating a new p13n controller!");
45
+ }
46
+
47
+ this._sTargetAggregation = mSettings.targetAggregation;
48
+ this._fSelector = mSettings.selector;
49
+
50
+ this._oP13nData = null;
51
+ this._bLiveMode = false;
52
+ this._bResetEnabled = false;
53
+ this._bReorderingEnabled = mSettings.hasOwnProperty("enableReorder") ? mSettings.enableReorder : true;
54
+
55
+ }
56
+ });
57
+
58
+ /**
59
+ * The control that is being personalized via this controller.
60
+ *
61
+ * @returns {sap.ui.mdc.Control} The control which is being adapted.
62
+ */
63
+ SelectionController.prototype.getAdaptationControl = function(){
64
+ return this._oAdaptationControl;
65
+ };
66
+
67
+ SelectionController.prototype.getTargetAggregation = function(){
68
+ return this._sTargetAggregation;
69
+ };
70
+
71
+
72
+ /**
73
+ * Defines the available ChangeTypes (should be in sync with 'getDelta').
74
+ *
75
+ * @returns {object} A map of legal change types.
76
+ */
77
+ SelectionController.prototype.getChangeOperations = function() {
78
+ return {
79
+ add: "addItem",
80
+ remove: "removeItem",
81
+ move: "moveItem"
82
+ };
83
+ };
84
+
85
+ /**
86
+ * Defines which control(s) are considered for the reset.
87
+ *
88
+ * @returns {sap.ui.core.Control|sap.ui.core.Control[]}
89
+ */
90
+ SelectionController.prototype.getSelectorForReset = function() {
91
+ return this._oAdaptationControl;
92
+ };
93
+
94
+ SelectionController.prototype.sanityCheck = function(oState) {
95
+ return oState;
96
+ };
97
+
98
+ /**
99
+ * The actual UI used for personalization.
100
+ *
101
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The property helper instance
102
+ * @returns {sap.ui.core.Control|string|Promise} The control which is going to be used in the p13n container.
103
+ */
104
+ SelectionController.prototype.initAdaptationUI = function(oPropertyHelper){
105
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
106
+ this._oPanel = this.createUI(oAdaptationData);
107
+ return Promise.resolve(this._oPanel);
108
+ };
109
+
110
+ SelectionController.prototype.createUI = function(oAdaptationData) {
111
+ var oSelectionPanel = new SelectionPanel({
112
+ showHeader: true,
113
+ enableCount: true
114
+ });
115
+ oSelectionPanel.setEnableReorder(this._bReorderingEnabled);
116
+ return oSelectionPanel.setP13nData(oAdaptationData.items);
117
+ };
118
+
119
+ SelectionController.prototype.getCurrentState = function(){
120
+ var aState = [], aAggregationItems = this.getAdaptationControl().getAggregation(this.getTargetAggregation()) || [];
121
+ aAggregationItems.forEach(function(oItem, iIndex) {
122
+ var bRelevant = this._fSelector ? this._fSelector({key: oItem.getId()}) : oItem.getVisible();
123
+ if (bRelevant) {
124
+ aState.push({
125
+ key: oItem.getId()
126
+ });
127
+ }
128
+ }.bind(this));
129
+
130
+ var oXConfig = xConfigAPI.readConfig(this.getAdaptationControl()) || {};
131
+ var oItemXConfig = oXConfig.hasOwnProperty("aggregations") ? oXConfig.aggregations[this._sTargetAggregation] : {};
132
+
133
+ for (var sKey in oItemXConfig) {
134
+ var aStateKeys = aState.map(function(o){return o.key;});
135
+ var iCurrentIndex = aStateKeys.indexOf(sKey);
136
+ var iNewIndex = oItemXConfig[sKey].position;
137
+ var bVisible = oItemXConfig[sKey].visible !== false;
138
+ var bReordered = iNewIndex !== undefined;
139
+
140
+ if (bVisible && iCurrentIndex === -1) {
141
+ aState.push({
142
+ key: sKey
143
+ });
144
+ }
145
+
146
+ if (bVisible && bReordered && aState.length > 0) {
147
+ var oItem = aState.splice(iCurrentIndex, 1)[0];
148
+ aState.splice(iNewIndex, 0, oItem);
149
+ iCurrentIndex = iNewIndex;
150
+ }
151
+ if (oItemXConfig[sKey].visible === false && iCurrentIndex > -1) {
152
+ aState.splice(iCurrentIndex, 1);
153
+ }
154
+
155
+
156
+ }
157
+ return aState;
158
+ };
159
+
160
+ SelectionController.prototype.getStateKey = function(){
161
+ return "items";
162
+ };
163
+
164
+ SelectionController.prototype.getDelta = function(mPropertyBag) {
165
+ var sPresenceAttribute = this._getPresenceAttribute(mPropertyBag.externalAppliance);
166
+ var aNewStatePrepared;
167
+
168
+ var fnFilterUnselected = function (oItem) {
169
+ return oItem.hasOwnProperty(sPresenceAttribute) && oItem[sPresenceAttribute] === false ? false : true;
170
+ };
171
+ aNewStatePrepared = mPropertyBag.applyAbsolute
172
+ ? mPropertyBag.changedState.filter(fnFilterUnselected) :
173
+ this._getFilledArray(mPropertyBag.existingState, mPropertyBag.changedState, sPresenceAttribute).filter(fnFilterUnselected);
174
+
175
+ mPropertyBag.changedState = aNewStatePrepared;
176
+
177
+ //Example: Dialog Ok --> don't trigger unnecessary flex change processing
178
+ if (deepEqual(mPropertyBag.existingState, aNewStatePrepared)){
179
+ return [];
180
+ } else {
181
+ return this.getArrayDeltaChanges(mPropertyBag);
182
+ }
183
+
184
+ };
185
+
186
+ /**
187
+ * Generates a set of changes based on the given arrays for a specified control
188
+ *
189
+ * @param {object} mDeltaInfo Map containing the necessary information to calculate the diff as change objects
190
+ * @param {array} mDeltaInfo.existingState An array describing the control state before a adaptation
191
+ * @param {array} mDeltaInfo.changedState An array describing the control state after a certain adaptation
192
+ * @param {object} mDeltaInfo.control Control instance which is being used to generate the changes
193
+ * @param {object} mDeltaInfo.changeOperations Map containing the changeOperations for the given Control instance
194
+ * @param {string} mDeltaInfo.changeOperations.add Name of the control specific 'add' changehandler
195
+ * @param {string} mDeltaInfo.changeOperations.remove Name of the control specific 'remove' changehandler
196
+ * @param {string} [mDeltaInfo.changeOperations.move] Name of the control specific 'move' changehandler
197
+ * @param {string} [mDeltaInfo.generator] Name of the change generator (E.g. the namespace of the UI creating the change object)
198
+ *
199
+ * @returns {array} Array containing the delta based created changes
200
+ */
201
+ SelectionController.prototype.getArrayDeltaChanges = function (mDeltaInfo) {
202
+
203
+ var aExistingArray = mDeltaInfo.existingState;
204
+ var aChangedArray = mDeltaInfo.changedState;
205
+ var oControl = mDeltaInfo.control;
206
+ var sInsertOperation = mDeltaInfo.changeOperations.add;
207
+ var sRemoveOperation = mDeltaInfo.changeOperations.remove;
208
+ var sMoveOperation = mDeltaInfo.changeOperations.move;
209
+ var sGenerator = mDeltaInfo.generator;
210
+
211
+ var aDeltaAttributes = mDeltaInfo.deltaAttributes || [];
212
+
213
+ var fnSymbol = function(o) {
214
+ var sDiff = "";
215
+ aDeltaAttributes.forEach(function(sAttribute){
216
+ sDiff = sDiff + o[sAttribute];
217
+ });
218
+ return sDiff;
219
+ };
220
+
221
+ var aResults = diff(aExistingArray, aChangedArray, fnSymbol);
222
+ // Function to match field with exising field in the given array
223
+ var fMatch = function (oField, aArray) {
224
+ return aArray.filter(function (oExistingField) {
225
+ return oExistingField && (oExistingField.key === oField.key);
226
+ })[0];
227
+ };
228
+
229
+ var aChanges = [];
230
+ var aProcessedArray = aExistingArray.slice(0);
231
+
232
+ aResults.forEach(function (oResult) {
233
+ // Begin --> hack for handling result returned by diff
234
+ if (oResult.type === "delete" && aProcessedArray[oResult.index] === undefined) {
235
+ aProcessedArray.splice(oResult.index, 1);
236
+ return;
237
+ }
238
+
239
+ var oProp, oExistingProp, iLength;
240
+ if (oResult.type === "insert") {
241
+ oExistingProp = fMatch(aChangedArray[oResult.index], aProcessedArray);
242
+ if (oExistingProp) {
243
+ oExistingProp.index = aProcessedArray.indexOf(oExistingProp);
244
+ aProcessedArray.splice(oExistingProp.index, 1, undefined);
245
+ aChanges = aChanges.concat(this._createAddRemoveChange(oControl, sRemoveOperation, this._getChangeContent(oExistingProp, aDeltaAttributes), sGenerator));
246
+ }
247
+ }
248
+ // End hack
249
+ oProp = oResult.type === "delete" ? aProcessedArray[oResult.index] : aChangedArray[oResult.index];
250
+ oProp.index = oResult.index;
251
+ if (oResult.type === "delete") {
252
+ aProcessedArray.splice(oProp.index, 1);
253
+ } else {
254
+ aProcessedArray.splice(oProp.index, 0, oProp);
255
+ }
256
+ // Move operation shows up as insert followed by delete OR delete followed by insert
257
+ if (sMoveOperation) {
258
+ iLength = aChanges.length;
259
+ // Get the last added change
260
+ if (iLength) {
261
+ oExistingProp = aChanges[iLength - 1];
262
+ oExistingProp = oExistingProp ? oExistingProp.changeSpecificData.content : undefined;
263
+ }
264
+ // Matching property exists with a different index --> then this is a move operation
265
+ if (oExistingProp && oExistingProp.key === oProp.key && oResult.index != oExistingProp.index) {
266
+ // remove the last insert/delete operation
267
+ aChanges.pop();
268
+ aChanges = aChanges.concat(this._createMoveChange(oExistingProp.id, oExistingProp.key, oResult.index, sMoveOperation, oControl, sMoveOperation !== "moveSort", sGenerator));
269
+ return;
270
+ }
271
+ }
272
+
273
+ aChanges = aChanges.concat(this._createAddRemoveChange(oControl, oResult.type === "delete" ? sRemoveOperation : sInsertOperation, this._getChangeContent(oProp, aDeltaAttributes), sGenerator));
274
+
275
+ }.bind(this));
276
+ return aChanges;
277
+ };
278
+
279
+ /**
280
+ * Method which reduces a propertyinfo map to changecontent relevant attributes.
281
+ * <b>Note:</b> This method determines the attributes stored in the changeContent.
282
+ *
283
+ * @param {object} oProperty Object containing all values prior to change creation
284
+ * @param {array} aDeltaAttributes Array containing all attributes that are necessary for the delta calculation
285
+ *
286
+ * @returns {object} Object containing reduced content
287
+ */
288
+ SelectionController.prototype._getChangeContent = function (oProperty, aDeltaAttributes) {
289
+
290
+ var oChangeContent = {};
291
+
292
+ // Index
293
+ if (oProperty.index >= 0) {
294
+ oChangeContent.index = oProperty.index;
295
+ }
296
+
297
+ aDeltaAttributes.forEach(function(sAttribute) {
298
+ if (oProperty.hasOwnProperty(sAttribute)){
299
+ oChangeContent[sAttribute] = oProperty[sAttribute];
300
+ }
301
+ });
302
+
303
+ return oChangeContent;
304
+ };
305
+
306
+ SelectionController.prototype._createAddRemoveChange = function(oControl, sOperation, oContent){
307
+ var oAddRemoveChange = {
308
+ selectorElement: oControl,
309
+ changeSpecificData: {
310
+ changeType: sOperation,
311
+ content: {
312
+ key: oContent.key,
313
+ targetAggregation: this.getTargetAggregation(),
314
+ index: oContent.index,
315
+ value: sOperation === this.getChangeOperations()["add"]
316
+ }
317
+ }
318
+ };
319
+ return oAddRemoveChange;
320
+ };
321
+
322
+ SelectionController.prototype._createMoveChange = function(sId, sPropertykey, iNewIndex, sMoveOperation, oControl, bPersistId){
323
+ var oMoveChange = {
324
+ selectorElement: oControl,
325
+ changeSpecificData: {
326
+ changeType: sMoveOperation,
327
+ content: {
328
+ key: sPropertykey,
329
+ targetAggregation: this.getTargetAggregation(),
330
+ index: iNewIndex
331
+ }
332
+ }
333
+ };
334
+ return oMoveChange;
335
+ };
336
+ SelectionController.prototype._getPresenceAttribute = function(bexternalAppliance){
337
+ return "visible";
338
+ };
339
+
340
+ /**
341
+ * Allows calculations prior to applying a set of changes.
342
+ * This can be used to mix additional changes to auto-created changes.
343
+ *
344
+ * @returns {Promise} A Promise that should resolve with an array of additional changes.
345
+ */
346
+ SelectionController.prototype.getBeforeApply = function(){
347
+ return Promise.resolve();
348
+ };
349
+
350
+ /**
351
+ * Initialized the inner model for the Personalization.
352
+ *
353
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The propertyhelper that should be utilized for property determination.
354
+ * @returns {object} The personalization model data
355
+ */
356
+ SelectionController.prototype.mixInfoAndState = function(oPropertyHelper) {
357
+
358
+ var aItemState = this.getCurrentState();
359
+ var mItemState = this.arrayToMap(aItemState);
360
+
361
+ var oP13nData = this.prepareAdaptationData(oPropertyHelper, function(mItem, oProperty){
362
+ var oExisting = mItemState[oProperty.key];
363
+ mItem.visible = this._fSelector ? this._fSelector(oProperty) : (!!oExisting);
364
+ mItem.position = oExisting ? oExisting.position : -1;
365
+ return !(oProperty.visible === false);
366
+ }.bind(this));
367
+
368
+ this.sortP13nData({
369
+ visible: "visible",
370
+ position: "position"
371
+ }, oP13nData.items);
372
+
373
+ oP13nData.items.forEach(function(oItem){delete oItem.position;});
374
+ return oP13nData;
375
+ };
376
+
377
+ /**
378
+ * @returns {object} The personalization data.
379
+ *
380
+ */
381
+ SelectionController.prototype.getP13nData = function() {
382
+ return this._oPanel ? this._oPanel.getP13nData() : this._oAdaptationModel.getProperty("/items");
383
+ };
384
+
385
+ SelectionController.prototype.model2State = false;
386
+
387
+ /**
388
+ * Can be used to trigger update after UI interactions such as "Ok" and "Reset"
389
+ *
390
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The property helper instance
391
+ */
392
+ SelectionController.prototype.update = function(oPropertyHelper) {
393
+ if (this._oPanel) {
394
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
395
+ this._oPanel.setP13nData(oAdaptationData.items);
396
+ } else if (this._oAdaptationModel){
397
+ //'setData' causes unnecessary rerendering in some cases
398
+ var oP13nData = this.mixInfoAndState(oPropertyHelper);
399
+ this._oAdaptationModel.setProperty("/items", oP13nData.items);
400
+ this._oAdaptationModel.setProperty("/itemsGrouped", oP13nData.itemsGrouped);
401
+ }
402
+ };
403
+
404
+ SelectionController.prototype._getFilledArray = function(aPreviousItems, aNewItems, sRemoveProperty) {
405
+ var aNewItemsPrepared = merge([], aPreviousItems);
406
+ var aNewItemState = merge([], aNewItems);
407
+
408
+ var mExistingItems = this.arrayToMap(aPreviousItems);
409
+
410
+ aNewItemState.forEach(function (oItem) {
411
+ var oExistingItem = mExistingItems[oItem.key];
412
+ if (!oItem.hasOwnProperty(sRemoveProperty) || oItem[sRemoveProperty]) {
413
+ var iNewPosition = oItem.position;
414
+ if (oExistingItem){//move if it exists
415
+ // do not reorder it in case it exists and no position is provided
416
+ iNewPosition = iNewPosition > -1 ? iNewPosition : oExistingItem.position;
417
+ var iOldPosition = oExistingItem.position;
418
+ aNewItemsPrepared.splice(iNewPosition, 0, aNewItemsPrepared.splice(iOldPosition, 1)[0]);
419
+ } else {//add if it does not exist the item will be inserted at the end
420
+ iNewPosition = iNewPosition > -1 ? iNewPosition : aNewItemsPrepared.length;
421
+ aNewItemsPrepared.splice(iNewPosition, 0, oItem);
422
+ }
423
+ aNewItemsPrepared[iNewPosition] = oItem;//overwrite existing item with new item (for correct values such as 'descending')
424
+ } else if (oExistingItem) {//check if exists before delete
425
+ aNewItemsPrepared[oExistingItem.position][sRemoveProperty] = false;
426
+ }
427
+ });
428
+
429
+ return aNewItemsPrepared;
430
+ };
431
+
432
+ SelectionController.prototype.changesToState = function(aChanges) {
433
+
434
+ var aState = [];
435
+
436
+ aChanges.forEach(function(oChange){
437
+ var oStateDiffContent = merge({}, oChange.changeSpecificData.content);
438
+ var iIndex = oStateDiffContent.index;
439
+ delete oStateDiffContent.index;
440
+
441
+ //set the position attribute in case to an explicit move
442
+ if (oChange.changeSpecificData.changeType === this.getChangeOperations()["move"]) {
443
+ oStateDiffContent.position = iIndex;
444
+ }
445
+
446
+ //set the presence attribute to false in case of an explicit remove
447
+ if (oChange.changeSpecificData.changeType === this.getChangeOperations()["remove"]) {
448
+ oStateDiffContent[this._getPresenceAttribute()] = false;
449
+ }
450
+
451
+ aState.push(oStateDiffContent);
452
+ }.bind(this));
453
+
454
+ return aState;
455
+ };
456
+
457
+ SelectionController.prototype.prepareAdaptationData = function(oPropertyHelper, fnEnhace, bGroupData) {
458
+
459
+ var aItems = [];
460
+ var mItemsGrouped = bGroupData ? {} : null;
461
+
462
+ var bEnhance = fnEnhace instanceof Function;
463
+
464
+ oPropertyHelper.getProperties().forEach(function(oProperty) {
465
+
466
+ var mItem = {};
467
+
468
+ if (bEnhance) {
469
+ var bIsValid = fnEnhace(mItem, oProperty);
470
+ if (!bIsValid) {
471
+ return;
472
+ }
473
+ }
474
+
475
+ mItem.key = oProperty.key;
476
+ mItem.name = oProperty.key;
477
+ mItem.label = oProperty.label || oProperty.key;
478
+ mItem.tooltip = oProperty.tooltip;
479
+
480
+ if (mItemsGrouped) {
481
+ mItem.group = oProperty.group ? oProperty.group : "BASIC";
482
+ mItem.groupLabel = oProperty.groupLabel;
483
+ mItemsGrouped[mItem.group] = mItemsGrouped[mItem.group] ? mItemsGrouped[mItem.group] : [];
484
+ mItemsGrouped[mItem.group].push(mItem);
485
+ }
486
+
487
+ aItems.push(mItem);
488
+
489
+ });
490
+
491
+ var oAdaptationData = {
492
+ items: aItems
493
+ };
494
+
495
+ if (mItemsGrouped) {
496
+ oAdaptationData.itemsGrouped = this._buildGroupStructure(mItemsGrouped);
497
+ }
498
+
499
+ return oAdaptationData;
500
+
501
+ };
502
+
503
+ //TODO: generify
504
+ SelectionController.prototype.sortP13nData = function (oSorting, aItems) {
505
+
506
+ var mP13nTypeSorting = oSorting;
507
+
508
+ var sPositionAttribute = mP13nTypeSorting.position;
509
+ var sSelectedAttribute = mP13nTypeSorting.visible;
510
+
511
+ var sLocale = sap.ui.getCore().getConfiguration().getLocale().toString();
512
+
513
+ var oCollator = window.Intl.Collator(sLocale, {});
514
+
515
+ // group selected / unselected --> sort alphabetically in each group
516
+ aItems.sort(function (mField1, mField2) {
517
+ if (mField1[sSelectedAttribute] && mField2[sSelectedAttribute]) {
518
+ return (mField1[sPositionAttribute] || 0) - (mField2[sPositionAttribute] || 0);
519
+ } else if (mField1[sSelectedAttribute]) {
520
+ return -1;
521
+ } else if (mField2[sSelectedAttribute]) {
522
+ return 1;
523
+ } else if (!mField1[sSelectedAttribute] && !mField2[sSelectedAttribute]) {
524
+ return oCollator.compare(mField1.label, mField2.label);
525
+ }
526
+ });
527
+ };
528
+
529
+ SelectionController.prototype.arrayToMap = function(aArray) {
530
+ return aArray.reduce(function(mMap, oProp, iIndex){
531
+ mMap[oProp.key] = oProp;
532
+ mMap[oProp.key].position = iIndex;
533
+ return mMap;
534
+ }, {});
535
+ };
536
+
537
+ SelectionController.prototype.destroy = function() {
538
+ BaseObject.prototype.destroy.apply(this, arguments);
539
+ this._oAdaptationControl = null;
540
+ this._bLiveMode = null;
541
+ this._oPanel = null;
542
+ this._bResetEnabled = null;
543
+ this._oAdaptationModel = null;
544
+ };
545
+
546
+ return SelectionController;
547
+
548
+ });
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
3
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @extends sap.m.p13n.BasePanel
49
49
  *
50
50
  * @author SAP SE
51
- * @version 1.103.1
51
+ * @version 1.106.0
52
52
  *
53
53
  * @public
54
54
  * @experimental Since 1.96.
@@ -59,6 +59,15 @@ sap.ui.define([
59
59
  metadata: {
60
60
  library: "sap.m",
61
61
  properties: {
62
+ /**
63
+ * A short text describing the panel.
64
+ * <b>Note:</b> This text will only be displayed if the panel is being used in a <code>sap.m.p13n.Popup</code>.
65
+ */
66
+ title: {
67
+ type: "string",
68
+ defaultValue: sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("p13n.DEFAULT_TITLE_SELECTION")
69
+ },
70
+ /**
62
71
  /**
63
72
  * Shows an additional header with a search field and the Show Selected button.
64
73
  */
@@ -111,7 +120,7 @@ sap.ui.define([
111
120
  this._bShowFactory = false;
112
121
  this.addStyleClass("SelectionPanelHover");
113
122
  this._displayColumns();
114
- this.setEnableReorder(true);
123
+ this._updateMovement(this.getEnableReorder());
115
124
  };
116
125
 
117
126
  SelectionPanel.prototype.setItemFactory = function(fnItemFactory) {
@@ -284,6 +293,7 @@ sap.ui.define([
284
293
  * Sets the personalization state of the panel instance.
285
294
  * @public
286
295
  * @param {sap.m.p13n.Item[]} aP13nData An array containing the personalization state that is represented by the <code>SelectionPanel</code>.
296
+ * @returns {this} The <code>SelectionPanel</code> instance
287
297
  */
288
298
  SelectionPanel.prototype.setP13nData = function(aP13nData) {
289
299
  if (this.getEnableCount()) {
@@ -298,6 +308,8 @@ sap.ui.define([
298
308
  //remove the reorder buttons from their current location and hence reset the hover logic
299
309
  this._removeMoveButtons();
300
310
  this._oSelectedItem = null;
311
+
312
+ return this;
301
313
  };
302
314
 
303
315
  SelectionPanel.prototype._updateCount = function() {
@@ -329,11 +341,17 @@ sap.ui.define([
329
341
  return this._bShowFactory;
330
342
  };
331
343
 
344
+ SelectionPanel.prototype._updateMovement = function(bEnableReorder) {
345
+ BasePanel.prototype._updateMovement.apply(this, arguments);
346
+ this._displayColumns();
347
+ };
348
+
332
349
  SelectionPanel.prototype._displayColumns = function() {
333
350
  var aColumns = [
334
351
  this.getFieldColumn()
335
352
  ];
336
- if (!this._bShowFactory) {
353
+ var bShowActiveColumn = this.getEnableReorder() || this.getActiveColumn();
354
+ if (!this._bShowFactory && bShowActiveColumn) {
337
355
  aColumns.push(new Column({
338
356
  width: "30%",
339
357
  hAlign: "Center",