@openui5/sap.m 1.120.6 → 1.121.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 (549) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +4 -4
  4. package/src/sap/m/.library +18 -2
  5. package/src/sap/m/AccButton.js +1 -1
  6. package/src/sap/m/ActionListItem.js +1 -1
  7. package/src/sap/m/ActionSelect.js +11 -11
  8. package/src/sap/m/ActionSheet.js +12 -8
  9. package/src/sap/m/ActionSheetRenderer.js +4 -4
  10. package/src/sap/m/ActionTile.js +7 -1
  11. package/src/sap/m/ActionTileContent.js +86 -7
  12. package/src/sap/m/ActionTileContentRenderer.js +4 -41
  13. package/src/sap/m/AdditionalTextButton.js +1 -1
  14. package/src/sap/m/App.js +1 -1
  15. package/src/sap/m/AssociativeOverflowToolbar.js +6 -6
  16. package/src/sap/m/Avatar.js +32 -14
  17. package/src/sap/m/Bar.js +5 -5
  18. package/src/sap/m/BarRenderer.js +3 -3
  19. package/src/sap/m/Breadcrumbs.js +12 -4
  20. package/src/sap/m/BreadcrumbsRenderer.js +1 -1
  21. package/src/sap/m/BusyDialog.js +19 -33
  22. package/src/sap/m/BusyIndicator.js +1 -1
  23. package/src/sap/m/Button.js +8 -8
  24. package/src/sap/m/ButtonRenderer.js +0 -4
  25. package/src/sap/m/Carousel.js +53 -25
  26. package/src/sap/m/CarouselLayout.js +14 -3
  27. package/src/sap/m/CarouselRenderer.js +4 -4
  28. package/src/sap/m/CheckBox.js +46 -5
  29. package/src/sap/m/CheckBoxRenderer.js +10 -3
  30. package/src/sap/m/ColorPalette.js +4 -2
  31. package/src/sap/m/ColorPalettePopover.js +5 -3
  32. package/src/sap/m/ColorPaletteRenderer.js +3 -3
  33. package/src/sap/m/Column.js +3 -4
  34. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  35. package/src/sap/m/ColumnListItem.js +59 -20
  36. package/src/sap/m/ColumnListItemRenderer.js +8 -9
  37. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  38. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  39. package/src/sap/m/ColumnPopoverItem.js +1 -1
  40. package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
  41. package/src/sap/m/ColumnPopoverSortItem.js +6 -6
  42. package/src/sap/m/ComboBox.js +16 -9
  43. package/src/sap/m/ComboBoxBase.js +10 -9
  44. package/src/sap/m/ComboBoxTextField.js +6 -4
  45. package/src/sap/m/ContentConfig.js +142 -0
  46. package/src/sap/m/CustomListItem.js +1 -1
  47. package/src/sap/m/CustomTile.js +1 -1
  48. package/src/sap/m/CustomTreeItem.js +1 -1
  49. package/src/sap/m/DatePicker.js +19 -18
  50. package/src/sap/m/DatePickerRenderer.js +3 -3
  51. package/src/sap/m/DateRangeSelection.js +16 -13
  52. package/src/sap/m/DateRangeSelectionRenderer.js +3 -3
  53. package/src/sap/m/DateTimeField.js +17 -9
  54. package/src/sap/m/DateTimeInput.js +6 -4
  55. package/src/sap/m/DateTimePicker.js +39 -30
  56. package/src/sap/m/DateTimePickerRenderer.js +4 -2
  57. package/src/sap/m/Dialog.js +21 -9
  58. package/src/sap/m/DialogRenderer.js +10 -3
  59. package/src/sap/m/DisplayListItem.js +1 -1
  60. package/src/sap/m/DraftIndicator.js +5 -5
  61. package/src/sap/m/DynamicDate.js +5 -3
  62. package/src/sap/m/DynamicDateFormat.js +7 -6
  63. package/src/sap/m/DynamicDateOption.js +10 -5
  64. package/src/sap/m/DynamicDateRange.js +56 -43
  65. package/src/sap/m/DynamicDateUtil.js +3 -3
  66. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  67. package/src/sap/m/ExpandableText.js +5 -9
  68. package/src/sap/m/ExpandableTextRenderer.js +3 -3
  69. package/src/sap/m/FacetFilter.js +17 -8
  70. package/src/sap/m/FacetFilterItem.js +1 -1
  71. package/src/sap/m/FacetFilterList.js +7 -7
  72. package/src/sap/m/FacetFilterRenderer.js +4 -4
  73. package/src/sap/m/FeedContent.js +1 -1
  74. package/src/sap/m/FeedInput.js +1 -1
  75. package/src/sap/m/FeedListItem.js +4 -4
  76. package/src/sap/m/FeedListItemAction.js +1 -1
  77. package/src/sap/m/FeedListItemRenderer.js +3 -3
  78. package/src/sap/m/Fiori20Adapter.js +9 -9
  79. package/src/sap/m/FlexBox.js +2 -2
  80. package/src/sap/m/FlexItemData.js +17 -17
  81. package/src/sap/m/FormattedText.js +7 -6
  82. package/src/sap/m/GenericTag.js +1 -1
  83. package/src/sap/m/GenericTagRenderer.js +5 -5
  84. package/src/sap/m/GenericTile.js +102 -14
  85. package/src/sap/m/GenericTileLineModeRenderer.js +3 -3
  86. package/src/sap/m/GenericTileRenderer.js +3 -3
  87. package/src/sap/m/GroupHeaderListItem.js +1 -1
  88. package/src/sap/m/GroupHeaderListItemRenderer.js +3 -3
  89. package/src/sap/m/GrowingEnablement.js +7 -6
  90. package/src/sap/m/GrowingList.js +1 -1
  91. package/src/sap/m/HBox.js +1 -1
  92. package/src/sap/m/HeaderContainer.js +5 -5
  93. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  94. package/src/sap/m/IconTabBar.js +4 -4
  95. package/src/sap/m/IconTabBarDragAndDropUtil.js +5 -5
  96. package/src/sap/m/IconTabBarSelectList.js +2 -2
  97. package/src/sap/m/IconTabFilter.js +27 -15
  98. package/src/sap/m/IconTabFilterExpandButtonBadge.js +4 -4
  99. package/src/sap/m/IconTabHeader.js +61 -28
  100. package/src/sap/m/IconTabHeaderRenderer.js +5 -5
  101. package/src/sap/m/IconTabSeparator.js +7 -7
  102. package/src/sap/m/IllustratedMessage.js +8 -6
  103. package/src/sap/m/IllustratedMessageType.js +12 -0
  104. package/src/sap/m/Illustration.js +4 -4
  105. package/src/sap/m/IllustrationPool.js +3 -3
  106. package/src/sap/m/Image.js +6 -3
  107. package/src/sap/m/ImageContent.js +1 -1
  108. package/src/sap/m/Input.js +65 -36
  109. package/src/sap/m/InputBase.js +33 -8
  110. package/src/sap/m/InputBaseRenderer.js +3 -3
  111. package/src/sap/m/InputListItem.js +1 -1
  112. package/src/sap/m/InputRenderer.js +5 -6
  113. package/src/sap/m/Label.js +6 -6
  114. package/src/sap/m/LightBox.js +4 -4
  115. package/src/sap/m/LightBoxItem.js +1 -1
  116. package/src/sap/m/Link.js +30 -6
  117. package/src/sap/m/LinkRenderer.js +4 -4
  118. package/src/sap/m/LinkTileContent.js +1 -1
  119. package/src/sap/m/List.js +1 -1
  120. package/src/sap/m/ListBase.js +43 -24
  121. package/src/sap/m/ListItemBase.js +7 -6
  122. package/src/sap/m/ListItemBaseRenderer.js +3 -0
  123. package/src/sap/m/MaskEnabler.js +8 -6
  124. package/src/sap/m/MaskInput.js +1 -1
  125. package/src/sap/m/MaskInputRenderer.js +2 -2
  126. package/src/sap/m/MaskInputRule.js +1 -1
  127. package/src/sap/m/Menu.js +19 -17
  128. package/src/sap/m/MenuButton.js +8 -6
  129. package/src/sap/m/MenuItem.js +9 -9
  130. package/src/sap/m/MenuListItem.js +5 -4
  131. package/src/sap/m/MessageBox.js +5 -3
  132. package/src/sap/m/MessageItem.js +1 -1
  133. package/src/sap/m/MessageListItem.js +4 -3
  134. package/src/sap/m/MessagePage.js +4 -2
  135. package/src/sap/m/MessagePopover.js +9 -6
  136. package/src/sap/m/MessagePopoverItem.js +1 -1
  137. package/src/sap/m/MessageStrip.js +9 -7
  138. package/src/sap/m/MessageStripRenderer.js +5 -2
  139. package/src/sap/m/MessageStripUtilities.js +6 -4
  140. package/src/sap/m/MessageToast.js +8 -7
  141. package/src/sap/m/MessageView.js +29 -6
  142. package/src/sap/m/MessageViewRenderer.js +2 -2
  143. package/src/sap/m/MultiComboBox.js +36 -17
  144. package/src/sap/m/MultiComboBoxRenderer.js +4 -4
  145. package/src/sap/m/MultiEditField.js +4 -4
  146. package/src/sap/m/MultiInput.js +66 -19
  147. package/src/sap/m/MultiInputRenderer.js +3 -3
  148. package/src/sap/m/NavContainer.js +14 -9
  149. package/src/sap/m/NewsContent.js +1 -1
  150. package/src/sap/m/NotificationList.js +1 -1
  151. package/src/sap/m/NotificationListBase.js +4 -4
  152. package/src/sap/m/NotificationListGroup.js +4 -4
  153. package/src/sap/m/NotificationListItem.js +4 -4
  154. package/src/sap/m/NumericContent.js +6 -6
  155. package/src/sap/m/NumericInput.js +1 -1
  156. package/src/sap/m/NumericInputRenderer.js +6 -6
  157. package/src/sap/m/ObjectAttribute.js +7 -6
  158. package/src/sap/m/ObjectAttributeRenderer.js +3 -3
  159. package/src/sap/m/ObjectHeader.js +15 -11
  160. package/src/sap/m/ObjectHeaderRenderer.js +4 -4
  161. package/src/sap/m/ObjectIdentifier.js +37 -8
  162. package/src/sap/m/ObjectIdentifierRenderer.js +3 -3
  163. package/src/sap/m/ObjectListItem.js +4 -4
  164. package/src/sap/m/ObjectMarker.js +6 -4
  165. package/src/sap/m/ObjectNumber.js +4 -3
  166. package/src/sap/m/ObjectNumberRenderer.js +6 -6
  167. package/src/sap/m/ObjectStatus.js +28 -22
  168. package/src/sap/m/ObjectStatusRenderer.js +26 -20
  169. package/src/sap/m/OverflowToolbar.js +2 -2
  170. package/src/sap/m/OverflowToolbarAssociativePopover.js +3 -3
  171. package/src/sap/m/OverflowToolbarButton.js +1 -1
  172. package/src/sap/m/OverflowToolbarLayoutData.js +2 -2
  173. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  174. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  175. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  176. package/src/sap/m/P13nColumnsItem.js +1 -1
  177. package/src/sap/m/P13nColumnsPanel.js +33 -11
  178. package/src/sap/m/P13nConditionPanel.js +6 -4
  179. package/src/sap/m/P13nDialog.js +27 -13
  180. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  181. package/src/sap/m/P13nDimMeasurePanel.js +18 -12
  182. package/src/sap/m/P13nFilterItem.js +1 -1
  183. package/src/sap/m/P13nFilterPanel.js +71 -49
  184. package/src/sap/m/P13nGroupItem.js +1 -1
  185. package/src/sap/m/P13nGroupPanel.js +5 -4
  186. package/src/sap/m/P13nItem.js +1 -1
  187. package/src/sap/m/P13nPanel.js +1 -1
  188. package/src/sap/m/P13nSelectionItem.js +1 -1
  189. package/src/sap/m/P13nSelectionPanel.js +28 -7
  190. package/src/sap/m/P13nSortItem.js +1 -1
  191. package/src/sap/m/P13nSortPanel.js +6 -5
  192. package/src/sap/m/PDFViewer.js +3 -6
  193. package/src/sap/m/Page.js +4 -8
  194. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  195. package/src/sap/m/PagingButton.js +5 -4
  196. package/src/sap/m/Panel.js +10 -5
  197. package/src/sap/m/PlanningCalendar.js +160 -109
  198. package/src/sap/m/PlanningCalendarHeader.js +9 -7
  199. package/src/sap/m/PlanningCalendarLegend.js +5 -5
  200. package/src/sap/m/PlanningCalendarRow.js +26 -15
  201. package/src/sap/m/PlanningCalendarView.js +1 -4
  202. package/src/sap/m/Popover.js +19 -21
  203. package/src/sap/m/PopoverRenderer.js +4 -4
  204. package/src/sap/m/ProgressIndicator.js +15 -13
  205. package/src/sap/m/ProgressIndicatorRenderer.js +3 -4
  206. package/src/sap/m/PullToRefresh.js +4 -3
  207. package/src/sap/m/QuickView.js +1 -1
  208. package/src/sap/m/QuickViewBase.js +1 -1
  209. package/src/sap/m/QuickViewCard.js +1 -1
  210. package/src/sap/m/QuickViewCardRenderer.js +3 -3
  211. package/src/sap/m/QuickViewGroup.js +1 -1
  212. package/src/sap/m/QuickViewGroupElement.js +1 -1
  213. package/src/sap/m/QuickViewPage.js +29 -17
  214. package/src/sap/m/RadioButton.js +4 -4
  215. package/src/sap/m/RadioButtonGroup.js +38 -5
  216. package/src/sap/m/RadioButtonGroupRenderer.js +4 -4
  217. package/src/sap/m/RadioButtonRenderer.js +3 -3
  218. package/src/sap/m/RangeSlider.js +9 -7
  219. package/src/sap/m/RangeSliderRenderer.js +2 -2
  220. package/src/sap/m/RatingIndicator.js +7 -6
  221. package/src/sap/m/RatingIndicatorRenderer.js +4 -4
  222. package/src/sap/m/ResponsivePopover.js +1 -3
  223. package/src/sap/m/ResponsiveScale.js +1 -1
  224. package/src/sap/m/ScrollBar.js +3 -3
  225. package/src/sap/m/ScrollContainer.js +6 -6
  226. package/src/sap/m/SearchField.js +1 -1
  227. package/src/sap/m/SegmentedButton.js +7 -5
  228. package/src/sap/m/SegmentedButtonItem.js +1 -1
  229. package/src/sap/m/Select.js +30 -16
  230. package/src/sap/m/SelectDialog.js +5 -3
  231. package/src/sap/m/SelectDialogBase.js +6 -6
  232. package/src/sap/m/SelectList.js +6 -6
  233. package/src/sap/m/SelectionDetails.js +7 -3
  234. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  235. package/src/sap/m/SelectionDetailsItem.js +1 -1
  236. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  237. package/src/sap/m/Shell.js +4 -4
  238. package/src/sap/m/ShellRenderer.js +3 -2
  239. package/src/sap/m/SimpleFixFlex.js +1 -1
  240. package/src/sap/m/SinglePlanningCalendar.js +41 -9
  241. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  242. package/src/sap/m/SinglePlanningCalendarGrid.js +122 -54
  243. package/src/sap/m/SinglePlanningCalendarGridRenderer.js +22 -20
  244. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +315 -61
  245. package/src/sap/m/SinglePlanningCalendarMonthGridRenderer.js +88 -35
  246. package/src/sap/m/SinglePlanningCalendarMonthView.js +3 -4
  247. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  248. package/src/sap/m/SinglePlanningCalendarWeekView.js +5 -5
  249. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +6 -5
  250. package/src/sap/m/SlideTile.js +6 -6
  251. package/src/sap/m/SlideTileRenderer.js +1 -3
  252. package/src/sap/m/Slider.js +38 -11
  253. package/src/sap/m/SliderRenderer.js +4 -4
  254. package/src/sap/m/SliderTooltip.js +4 -4
  255. package/src/sap/m/SliderTooltipBase.js +1 -1
  256. package/src/sap/m/SliderTooltipContainer.js +10 -8
  257. package/src/sap/m/SliderTooltipRenderer.js +3 -3
  258. package/src/sap/m/SplitApp.js +2 -1
  259. package/src/sap/m/SplitButton.js +5 -3
  260. package/src/sap/m/SplitContainer.js +20 -11
  261. package/src/sap/m/StandardDynamicDateOption.js +16 -12
  262. package/src/sap/m/StandardListItem.js +4 -3
  263. package/src/sap/m/StandardListItemRenderer.js +3 -3
  264. package/src/sap/m/StandardTile.js +1 -1
  265. package/src/sap/m/StandardTreeItem.js +1 -1
  266. package/src/sap/m/StepInput.js +6 -4
  267. package/src/sap/m/Suggest.js +5 -5
  268. package/src/sap/m/SuggestionItem.js +1 -1
  269. package/src/sap/m/SuggestionsList.js +9 -7
  270. package/src/sap/m/SuggestionsListRenderer.js +2 -2
  271. package/src/sap/m/SuggestionsPopover.js +1 -1
  272. package/src/sap/m/Switch.js +13 -11
  273. package/src/sap/m/SwitchRenderer.js +3 -3
  274. package/src/sap/m/TabContainer.js +9 -6
  275. package/src/sap/m/TabContainerItem.js +5 -8
  276. package/src/sap/m/TabStrip.js +23 -12
  277. package/src/sap/m/TabStripItem.js +7 -10
  278. package/src/sap/m/TabStripRenderer.js +2 -2
  279. package/src/sap/m/Table.js +4 -5
  280. package/src/sap/m/TablePersoController.js +10 -8
  281. package/src/sap/m/TablePersoDialog.js +19 -16
  282. package/src/sap/m/TablePersoProvider.js +1 -1
  283. package/src/sap/m/TableRenderer.js +4 -4
  284. package/src/sap/m/TableSelectDialog.js +5 -3
  285. package/src/sap/m/Text.js +36 -39
  286. package/src/sap/m/TextArea.js +5 -3
  287. package/src/sap/m/TextRenderer.js +2 -7
  288. package/src/sap/m/Tile.js +1 -1
  289. package/src/sap/m/TileAttribute.js +64 -0
  290. package/src/sap/m/TileAttributeRenderer.js +70 -0
  291. package/src/sap/m/TileContainer.js +10 -8
  292. package/src/sap/m/TileContent.js +8 -4
  293. package/src/sap/m/TileRenderer.js +3 -3
  294. package/src/sap/m/TimePicker.js +24 -19
  295. package/src/sap/m/TimePickerClock.js +4 -3
  296. package/src/sap/m/TimePickerClocks.js +1 -1
  297. package/src/sap/m/TimePickerInputs.js +1 -1
  298. package/src/sap/m/TimePickerInternals.js +12 -10
  299. package/src/sap/m/TimePickerSlider.js +9 -7
  300. package/src/sap/m/TimePickerSliders.js +17 -13
  301. package/src/sap/m/TimePickerSlidersRenderer.js +3 -3
  302. package/src/sap/m/Title.js +5 -4
  303. package/src/sap/m/TitlePropagationSupport.js +4 -4
  304. package/src/sap/m/ToggleButton.js +4 -3
  305. package/src/sap/m/Token.js +6 -6
  306. package/src/sap/m/Tokenizer.js +16 -10
  307. package/src/sap/m/Toolbar.js +4 -4
  308. package/src/sap/m/ToolbarLayoutData.js +1 -1
  309. package/src/sap/m/ToolbarSeparator.js +1 -1
  310. package/src/sap/m/ToolbarSpacer.js +1 -1
  311. package/src/sap/m/Tree.js +4 -2
  312. package/src/sap/m/TreeItemBase.js +4 -3
  313. package/src/sap/m/TreeItemBaseRenderer.js +3 -3
  314. package/src/sap/m/UploadCollection.js +28 -24
  315. package/src/sap/m/UploadCollectionItem.js +1 -1
  316. package/src/sap/m/UploadCollectionParameter.js +1 -1
  317. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  318. package/src/sap/m/VBox.js +1 -1
  319. package/src/sap/m/ValueStateHeader.js +5 -5
  320. package/src/sap/m/VariantItem.js +8 -3
  321. package/src/sap/m/VariantManagement.js +112 -33
  322. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  323. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  324. package/src/sap/m/ViewSettingsDialog.js +34 -21
  325. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  326. package/src/sap/m/ViewSettingsItem.js +9 -2
  327. package/src/sap/m/VisibleItem.js +1 -1
  328. package/src/sap/m/WheelSlider.js +4 -3
  329. package/src/sap/m/WheelSliderContainer.js +1 -1
  330. package/src/sap/m/WheelSliderContainerRenderer.js +3 -3
  331. package/src/sap/m/Wizard.js +17 -15
  332. package/src/sap/m/WizardProgressNavigator.js +18 -2
  333. package/src/sap/m/WizardProgressNavigatorRenderer.js +9 -5
  334. package/src/sap/m/WizardRenderer.js +6 -4
  335. package/src/sap/m/WizardStep.js +9 -11
  336. package/src/sap/m/changeHandler/AddTableColumn.js +3 -7
  337. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  338. package/src/sap/m/changeHandler/CombineButtons.js +4 -4
  339. package/src/sap/m/changeHandler/MoveTableColumns.js +3 -2
  340. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  341. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  342. package/src/sap/m/delegate/ValueStateMessage.js +3 -3
  343. package/src/sap/m/designtime/IconTabBar.designtime.js +3 -2
  344. package/src/sap/m/designtime/Link.designtime.js +4 -4
  345. package/src/sap/m/designtime/MenuButton.designtime.js +3 -0
  346. package/src/sap/m/designtime/ObjectIdentifier.designtime.js +0 -4
  347. package/src/sap/m/designtime/messagebundle_en_US_saprigi.properties +91 -91
  348. package/src/sap/m/flexibility/EngineFlex.js +14 -8
  349. package/src/sap/m/flexibility/MenuButton.flexibility.js +1 -0
  350. package/src/sap/m/inputUtils/SuggestionsPopoverPopoverMixin.js +4 -4
  351. package/src/sap/m/library.js +181 -59
  352. package/src/sap/m/messagebundle.properties +113 -90
  353. package/src/sap/m/messagebundle_ar.properties +16 -10
  354. package/src/sap/m/messagebundle_bg.properties +19 -13
  355. package/src/sap/m/messagebundle_ca.properties +16 -10
  356. package/src/sap/m/messagebundle_cnr.properties +21 -15
  357. package/src/sap/m/messagebundle_cs.properties +16 -10
  358. package/src/sap/m/messagebundle_cy.properties +19 -13
  359. package/src/sap/m/messagebundle_da.properties +14 -8
  360. package/src/sap/m/messagebundle_de.properties +12 -6
  361. package/src/sap/m/messagebundle_el.properties +27 -21
  362. package/src/sap/m/messagebundle_en.properties +1164 -22
  363. package/src/sap/m/messagebundle_en_GB.properties +23 -17
  364. package/src/sap/m/messagebundle_en_US_saprigi.properties +34 -22
  365. package/src/sap/m/messagebundle_es.properties +19 -13
  366. package/src/sap/m/messagebundle_es_MX.properties +18 -12
  367. package/src/sap/m/messagebundle_et.properties +14 -8
  368. package/src/sap/m/messagebundle_fi.properties +21 -15
  369. package/src/sap/m/messagebundle_fr.properties +15 -9
  370. package/src/sap/m/messagebundle_fr_CA.properties +11 -5
  371. package/src/sap/m/messagebundle_hi.properties +24 -18
  372. package/src/sap/m/messagebundle_hr.properties +15 -9
  373. package/src/sap/m/messagebundle_hu.properties +20 -14
  374. package/src/sap/m/messagebundle_id.properties +15 -9
  375. package/src/sap/m/messagebundle_it.properties +17 -11
  376. package/src/sap/m/messagebundle_iw.properties +13 -7
  377. package/src/sap/m/messagebundle_ja.properties +23 -17
  378. package/src/sap/m/messagebundle_kk.properties +14 -8
  379. package/src/sap/m/messagebundle_ko.properties +18 -12
  380. package/src/sap/m/messagebundle_lt.properties +17 -11
  381. package/src/sap/m/messagebundle_lv.properties +26 -20
  382. package/src/sap/m/messagebundle_mk.properties +20 -14
  383. package/src/sap/m/messagebundle_ms.properties +13 -7
  384. package/src/sap/m/messagebundle_nl.properties +16 -10
  385. package/src/sap/m/messagebundle_no.properties +15 -9
  386. package/src/sap/m/messagebundle_pl.properties +16 -10
  387. package/src/sap/m/messagebundle_pt.properties +16 -10
  388. package/src/sap/m/messagebundle_pt_PT.properties +13 -7
  389. package/src/sap/m/messagebundle_ro.properties +13 -7
  390. package/src/sap/m/messagebundle_ru.properties +15 -9
  391. package/src/sap/m/messagebundle_sh.properties +21 -15
  392. package/src/sap/m/messagebundle_sk.properties +13 -7
  393. package/src/sap/m/messagebundle_sl.properties +14 -8
  394. package/src/sap/m/messagebundle_sr.properties +21 -15
  395. package/src/sap/m/messagebundle_sv.properties +15 -9
  396. package/src/sap/m/messagebundle_th.properties +12 -6
  397. package/src/sap/m/messagebundle_tr.properties +15 -9
  398. package/src/sap/m/messagebundle_uk.properties +15 -9
  399. package/src/sap/m/messagebundle_vi.properties +16 -10
  400. package/src/sap/m/messagebundle_zh_CN.properties +12 -6
  401. package/src/sap/m/messagebundle_zh_TW.properties +12 -6
  402. package/src/sap/m/p13n/.eslintrc.json +19 -0
  403. package/src/sap/m/p13n/AbstractContainer.js +43 -29
  404. package/src/sap/m/p13n/AbstractContainerItem.js +8 -8
  405. package/src/sap/m/p13n/BasePanel.js +123 -76
  406. package/src/sap/m/p13n/Container.js +80 -50
  407. package/src/sap/m/p13n/Engine.js +331 -294
  408. package/src/sap/m/p13n/FilterController.js +335 -0
  409. package/src/sap/m/p13n/FilterPanel.js +291 -0
  410. package/src/sap/m/p13n/FlexUtil.js +23 -21
  411. package/src/sap/m/p13n/GroupController.js +97 -85
  412. package/src/sap/m/p13n/GroupPanel.js +30 -25
  413. package/src/sap/m/p13n/MetadataHelper.js +65 -21
  414. package/src/sap/m/p13n/PersistenceProvider.js +11 -9
  415. package/src/sap/m/p13n/Popup.js +63 -45
  416. package/src/sap/m/p13n/QueryPanel.js +117 -93
  417. package/src/sap/m/p13n/SelectionController.js +302 -237
  418. package/src/sap/m/p13n/SelectionPanel.js +117 -83
  419. package/src/sap/m/p13n/SortController.js +100 -89
  420. package/src/sap/m/p13n/SortPanel.js +46 -31
  421. package/src/sap/m/p13n/enums/PersistenceMode.js +57 -0
  422. package/src/sap/m/p13n/{enum → enums}/ProcessingStrategy.js +10 -8
  423. package/src/sap/m/p13n/handler/xConfigHandler.js +175 -161
  424. package/src/sap/m/p13n/modification/FlexModificationHandler.js +151 -133
  425. package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +28 -28
  426. package/src/sap/m/p13n/modification/ModificationHandler.js +15 -15
  427. package/src/sap/m/p13n/modules/AdaptationProvider.js +7 -7
  428. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +20 -18
  429. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +7 -7
  430. package/src/sap/m/p13n/modules/UIManager.js +119 -117
  431. package/src/sap/m/p13n/modules/xConfigAPI.js +74 -68
  432. package/src/sap/m/plugins/CellSelector.js +142 -26
  433. package/src/sap/m/plugins/ColumnResizer.js +12 -17
  434. package/src/sap/m/plugins/ContextMenuSetting.js +155 -0
  435. package/src/sap/m/plugins/CopyProvider.js +170 -110
  436. package/src/sap/m/plugins/DataStateIndicator.js +9 -6
  437. package/src/sap/m/plugins/PasteProvider.js +18 -10
  438. package/src/sap/m/plugins/PluginBase.js +39 -15
  439. package/src/sap/m/semantic/AddAction.js +1 -1
  440. package/src/sap/m/semantic/CancelAction.js +1 -1
  441. package/src/sap/m/semantic/DeleteAction.js +1 -1
  442. package/src/sap/m/semantic/DetailPage.js +3 -3
  443. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  444. package/src/sap/m/semantic/EditAction.js +1 -1
  445. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  446. package/src/sap/m/semantic/FilterAction.js +1 -1
  447. package/src/sap/m/semantic/FilterSelect.js +1 -1
  448. package/src/sap/m/semantic/FlagAction.js +1 -1
  449. package/src/sap/m/semantic/ForwardAction.js +1 -1
  450. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  451. package/src/sap/m/semantic/GroupAction.js +1 -1
  452. package/src/sap/m/semantic/GroupSelect.js +1 -1
  453. package/src/sap/m/semantic/MainAction.js +1 -1
  454. package/src/sap/m/semantic/MasterPage.js +3 -3
  455. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  456. package/src/sap/m/semantic/MultiSelectAction.js +3 -3
  457. package/src/sap/m/semantic/NegativeAction.js +1 -1
  458. package/src/sap/m/semantic/OpenInAction.js +1 -1
  459. package/src/sap/m/semantic/PositiveAction.js +1 -1
  460. package/src/sap/m/semantic/PrintAction.js +1 -1
  461. package/src/sap/m/semantic/SaveAction.js +1 -1
  462. package/src/sap/m/semantic/Segment.js +1 -1
  463. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  464. package/src/sap/m/semantic/SemanticButton.js +1 -1
  465. package/src/sap/m/semantic/SemanticConfiguration.js +7 -5
  466. package/src/sap/m/semantic/SemanticControl.js +1 -1
  467. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  468. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  469. package/src/sap/m/semantic/SemanticPage.js +4 -2
  470. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  471. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  472. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  473. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  474. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  475. package/src/sap/m/semantic/ShareMenu.js +6 -12
  476. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  477. package/src/sap/m/semantic/SortAction.js +1 -1
  478. package/src/sap/m/semantic/SortSelect.js +1 -1
  479. package/src/sap/m/table/ColumnWidthController.js +2 -3
  480. package/src/sap/m/table/Util.js +67 -40
  481. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  482. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  483. package/src/sap/m/table/columnmenu/Item.js +5 -5
  484. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  485. package/src/sap/m/table/columnmenu/Menu.js +14 -21
  486. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  487. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  488. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  489. package/src/sap/m/table/columnmenu/QuickGroup.js +7 -5
  490. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  491. package/src/sap/m/table/columnmenu/QuickSort.js +6 -4
  492. package/src/sap/m/table/columnmenu/QuickSortItem.js +6 -4
  493. package/src/sap/m/table/columnmenu/QuickTotal.js +7 -5
  494. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  495. package/src/sap/m/themes/base/ActionSheet.less +10 -3
  496. package/src/sap/m/themes/base/ActionTile.less +7 -4
  497. package/src/sap/m/themes/base/Carousel.less +1 -1
  498. package/src/sap/m/themes/base/ContextMenuSetting.less +3 -0
  499. package/src/sap/m/themes/base/IconTabBar.less +2 -2
  500. package/src/sap/m/themes/base/Label.less +2 -1
  501. package/src/sap/m/themes/base/Link.less +1 -1
  502. package/src/sap/m/themes/base/ListItemBase.less +1 -1
  503. package/src/sap/m/themes/base/MenuButton.less +2 -2
  504. package/src/sap/m/themes/base/MessageView.less +6 -0
  505. package/src/sap/m/themes/base/MultiComboBox.less +7 -4
  506. package/src/sap/m/themes/base/NumericContent.less +2 -2
  507. package/src/sap/m/themes/base/ObjectListItem.less +1 -1
  508. package/src/sap/m/themes/base/ObjectNumber.less +4 -4
  509. package/src/sap/m/themes/base/ObjectStatus.less +263 -160
  510. package/src/sap/m/themes/base/Panel.less +18 -4
  511. package/src/sap/m/themes/base/Popover.less +5 -0
  512. package/src/sap/m/themes/base/SinglePlanningCalendarMonthGrid.less +21 -0
  513. package/src/sap/m/themes/base/StandardListItem.less +1 -1
  514. package/src/sap/m/themes/base/SuggestionItem.less +6 -0
  515. package/src/sap/m/themes/base/Table.less +0 -5
  516. package/src/sap/m/themes/base/TablePersoDialog.less +4 -2
  517. package/src/sap/m/themes/base/Text.less +2 -1
  518. package/src/sap/m/themes/base/UploadCollection.less +2 -2
  519. package/src/sap/m/themes/base/UploadSet.less +55 -0
  520. package/src/sap/m/themes/base/VariantManagement.less +2 -1
  521. package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-NewMail.svg +27 -0
  522. package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SignOut.svg +24 -0
  523. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NewMail.svg +9 -0
  524. package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SignOut.svg +12 -0
  525. package/src/sap/m/themes/base/illustrations/sapIllus-Scene-NewMail.svg +59 -0
  526. package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SignOut.svg +113 -0
  527. package/src/sap/m/themes/base/illustrations/sapIllus-Spot-NewMail.svg +27 -0
  528. package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SignOut.svg +23 -0
  529. package/src/sap/m/themes/base/library.source.less +2 -1
  530. package/src/sap/m/upload/ActionsPlaceholder.js +1 -1
  531. package/src/sap/m/upload/Column.js +1 -1
  532. package/src/sap/m/upload/FilePreviewDialog.js +5 -5
  533. package/src/sap/m/upload/FilterPanel.js +5 -3
  534. package/src/sap/m/upload/UploadSet.js +122 -61
  535. package/src/sap/m/upload/UploadSetItem.js +31 -7
  536. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  537. package/src/sap/m/upload/UploadSetwithTable.js +7 -6
  538. package/src/sap/m/upload/UploadSetwithTableItem.js +5 -5
  539. package/src/sap/m/upload/UploaderTableItem.js +1 -1
  540. package/src/sap/m/upload/p13n/PersManager.js +4 -2
  541. package/src/sap/m/upload/p13n/mediator/BaseMediator.js +1 -1
  542. package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +5 -4
  543. package/src/sap/m/upload/p13n/mediator/FilterMediator.js +5 -2
  544. package/src/sap/m/upload/p13n/mediator/GroupMediator.js +5 -4
  545. package/src/sap/m/upload/p13n/mediator/SortMediator.js +5 -4
  546. package/src/sap/m/upload/p13n/modules/PersPopupManager.js +3 -3
  547. package/LICENSES/BSD-2-Clause.txt +0 -22
  548. package/src/sap/m/CustomAttribute.js +0 -53
  549. package/src/sap/m/p13n/enum/PersistenceMode.js +0 -55
@@ -12,24 +12,39 @@ sap.ui.define([
12
12
  "sap/m/MessageStrip",
13
13
  "sap/ui/core/library",
14
14
  "sap/ui/core/Element",
15
+ "sap/ui/core/ElementRegistry",
15
16
  "sap/m/p13n/modules/DefaultProviderRegistry",
16
17
  "sap/m/p13n/modules/UIManager",
17
18
  "sap/m/p13n/modules/StateHandlerRegistry",
18
19
  "sap/m/p13n/modules/xConfigAPI",
19
- "sap/m/p13n/enum/ProcessingStrategy"
20
- ], function (AdaptationProvider, merge, Log, FlexModificationHandler, MessageStrip, coreLibrary, Element, DefaultProviderRegistry, UIManager, StateHandlerRegistry, xConfigAPI, ProcessingStrategy) {
20
+ "sap/m/p13n/enums/ProcessingStrategy"
21
+ ], (
22
+ AdaptationProvider,
23
+ merge,
24
+ Log,
25
+ FlexModificationHandler,
26
+ MessageStrip,
27
+ coreLibrary,
28
+ Element,
29
+ ElementRegistry,
30
+ DefaultProviderRegistry,
31
+ UIManager,
32
+ StateHandlerRegistry,
33
+ xConfigAPI,
34
+ ProcessingStrategy
35
+ ) => {
21
36
  "use strict";
22
37
 
23
- var ERROR_INSTANCING = "Engine: This class is a singleton. Please use the getInstance() method instead.";
38
+ const ERROR_INSTANCING = "Engine: This class is a singleton. Please use the getInstance() method instead.";
24
39
 
25
40
  //Shortcut to 'MessageType'
26
- var MessageType = coreLibrary.MessageType;
41
+ const MessageType = coreLibrary.MessageType;
27
42
 
28
43
  /*global WeakMap */
29
- var _mRegistry = new WeakMap();
44
+ const _mRegistry = new WeakMap();
30
45
 
31
46
  //Singleton storage
32
- var oEngine;
47
+ let oEngine;
33
48
 
34
49
  /**
35
50
  *
@@ -57,12 +72,12 @@ sap.ui.define([
57
72
  * @alias sap.m.p13n.Engine
58
73
  * @extends sap.m.p13n.modules.AdaptationProvider
59
74
  * @author SAP SE
60
- * @version 1.120.6
75
+ * @version 1.121.0
61
76
  * @public
62
77
  * @since 1.104
63
78
  */
64
- var Engine = AdaptationProvider.extend("sap.m.p13n.Engine", {
65
- constructor: function () {
79
+ const Engine = AdaptationProvider.extend("sap.m.p13n.Engine", {
80
+ constructor: function() {
66
81
  AdaptationProvider.call(this);
67
82
 
68
83
  if (oEngine) {
@@ -91,12 +106,6 @@ sap.ui.define([
91
106
  * @public
92
107
  */
93
108
 
94
- /**
95
- * @namespace
96
- * @name sap.m.p13n.MetadataHelper
97
- * @public
98
- */
99
-
100
109
  /**
101
110
  *
102
111
  * The central registration for personalization functionality.
@@ -105,7 +114,7 @@ sap.ui.define([
105
114
  * methods that always expect a control instance as parameter. Only registered control instances can be used for personalization through the <code>Engine</code>.
106
115
  * @public
107
116
  * @typedef {object} sap.m.p13n.EngineRegistrationConfig
108
- * @property {sap.m.p13n.MetadataHelper} helper The <code>{@link sap.m.p13n.modification.MetadataHelper MetadataHelper}</code> to provide metadata-specific information.
117
+ * @property {sap.m.p13n.MetadataHelper} helper The <code>{@link sap.m.p13n.MetadataHelper MetadataHelper}</code> to provide metadata-specific information. It may be used to define more granular information for the selection of items.
109
118
  * @property {Object<string,sap.m.p13n.SelectionController>} controller A map of arbitrary keys that contain a controller instance as value. The key must be unique and needs to be provided for later access when using <code>Engine</code> functionality specific for one controller type.
110
119
  */
111
120
 
@@ -135,13 +144,13 @@ sap.ui.define([
135
144
  * }
136
145
  * }
137
146
  */
138
- Engine.prototype.register = function (oControl, oConfig) {
147
+ Engine.prototype.register = function(oControl, oConfig) {
139
148
 
140
- if (!oConfig.hasOwnProperty("controller")/* || Object.keys(oConfig.controller).length < 1*/) {
149
+ if (!oConfig.hasOwnProperty("controller") /* || Object.keys(oConfig.controller).length < 1*/) {
141
150
  throw new Error("Please provide at least a configuration 'controller' containing a map of key-value pairs (key + Controller class) in order to register adaptation.");
142
151
  }
143
152
 
144
- var oRegistryEntry = this._getRegistryEntry(oControl);
153
+ let oRegistryEntry = this._getRegistryEntry(oControl);
145
154
 
146
155
  if (oRegistryEntry) {
147
156
  this.deregister(oControl);
@@ -149,11 +158,11 @@ sap.ui.define([
149
158
 
150
159
  oRegistryEntry = this._createRegistryEntry(oControl, oConfig);
151
160
 
152
- var aControllerKeys = Object.keys(oConfig.controller);
161
+ const aControllerKeys = Object.keys(oConfig.controller);
153
162
 
154
- aControllerKeys.forEach(function (sKey) {
163
+ aControllerKeys.forEach((sKey) => {
155
164
 
156
- var oSubController = oConfig.controller[sKey];
165
+ const oSubController = oConfig.controller[sKey];
157
166
 
158
167
  if (!this.getController(oControl, sKey)) {
159
168
  if (this._aRegistry.indexOf(oControl.getId()) < 0) {
@@ -163,10 +172,10 @@ sap.ui.define([
163
172
  this.addController(oSubController, sKey);
164
173
  }
165
174
 
166
- }.bind(this));
175
+ });
167
176
 
168
177
  //In case the control is marked as modified, the state change event is triggered once initially to apply the default state
169
- var oXConfig = oControl.getCustomData().find((oCustomData) => oCustomData.getKey() == "xConfig");
178
+ const oXConfig = oControl.getCustomData().find((oCustomData) => oCustomData.getKey() == "xConfig");
170
179
  if (oXConfig && JSON.parse((oXConfig.getValue()).replace(/\\/g, ''))?.modified) {
171
180
  this.fireStateChange(oControl);
172
181
  }
@@ -183,12 +192,12 @@ sap.ui.define([
183
192
  *
184
193
  * @param {sap.ui.core.Control} oControl The registered control instance
185
194
  */
186
- Engine.prototype.deregister = function (oControl) {
187
- var oRegistryEntry = this._getRegistryEntry(oControl);
195
+ Engine.prototype.deregister = function(oControl) {
196
+ const oRegistryEntry = this._getRegistryEntry(oControl);
188
197
 
189
198
  //destroy subcontroller
190
- Object.keys(oRegistryEntry.controller).forEach(function (sKey) {
191
- var oController = oRegistryEntry.controller[sKey];
199
+ Object.keys(oRegistryEntry.controller).forEach((sKey) => {
200
+ const oController = oRegistryEntry.controller[sKey];
192
201
  oController.destroy();
193
202
 
194
203
  delete oRegistryEntry.controller[sKey];
@@ -198,7 +207,7 @@ sap.ui.define([
198
207
  _mRegistry.delete(oControl);
199
208
 
200
209
  //Remove the control from the array to maintain debugging
201
- var iControlIndex = this._aRegistry.indexOf(oControl.getId());
210
+ const iControlIndex = this._aRegistry.indexOf(oControl.getId());
202
211
  this._aRegistry.splice(iControlIndex, 1);
203
212
  };
204
213
 
@@ -219,14 +228,17 @@ sap.ui.define([
219
228
  *
220
229
  * @returns {Promise<sap.m.p13n.Popup>} Promise resolving in the <code>sap.m.p13n.Popup</code> instance
221
230
  */
222
- Engine.prototype.show = function (oControl, vPanelKeys, mSettings) {
223
- return this.hasChanges(oControl)
224
- .catch((oError) => {
225
- return false;
226
- })
227
- .then(function(enableReset){
228
- return this.uimanager.show(oControl, vPanelKeys, {...mSettings, enableReset});
229
- }.bind(this));
231
+ Engine.prototype.show = function(oControl, vPanelKeys, mSettings) {
232
+ return this.hasChanges(oControl, vPanelKeys)
233
+ .catch((oError) => {
234
+ return false;
235
+ })
236
+ .then((enableReset) => {
237
+ return this.uimanager.show(oControl, vPanelKeys, {
238
+ ...mSettings,
239
+ enableReset
240
+ });
241
+ });
230
242
  };
231
243
 
232
244
  /**
@@ -238,7 +250,7 @@ sap.ui.define([
238
250
  * @param {function(sap.ui.base.Event):void} fnStateEventHandler The handler function to call when the event occurs
239
251
  * @returns {this} Returns <code>this</code> to allow method chaining
240
252
  */
241
- Engine.prototype.attachStateChange = function (fnStateEventHandler) {
253
+ Engine.prototype.attachStateChange = function(fnStateEventHandler) {
242
254
  return this.stateHandlerRegistry.attachChange(fnStateEventHandler);
243
255
  };
244
256
 
@@ -251,7 +263,7 @@ sap.ui.define([
251
263
  * @param {function(sap.ui.base.Event):void} fnStateEventHandler The handler function to detach from the event
252
264
  * @returns {this} Returns <code>this</code> to allow method chaining
253
265
  */
254
- Engine.prototype.detachStateChange = function (fnStateEventHandler) {
266
+ Engine.prototype.detachStateChange = function(fnStateEventHandler) {
255
267
  return this.stateHandlerRegistry.detachChange(fnStateEventHandler);
256
268
  };
257
269
 
@@ -259,20 +271,38 @@ sap.ui.define([
259
271
  * Check if there are changes for a given control instance
260
272
  *
261
273
  * @private
262
- * @ui5-restricted sap.m, sap.ui.mdc
263
- *
274
+ * @ui5-restricted sap.m, sap.ui.mdc
275
+ *
264
276
  * @param {sap.ui.core.Control} control The control instance
265
277
  * @param {string} key The affected controller key
266
278
  * @returns {Promise<boolean>} A Promise that resolves if the given control instance has applied changes
267
279
  */
268
280
  Engine.prototype.hasChanges = function(control, key) {
269
- const changeOperations = this.getController(control, key)?.getChangeOperations();
281
+ const oChangeOperations = this.getController(control, key)?.getChangeOperations();
270
282
  let changeTypes;
271
- if (changeOperations) {
272
- changeTypes = Object.values(changeOperations);
283
+ if (oChangeOperations) {
284
+ changeTypes = [];
285
+ Object.values(oChangeOperations).forEach((vChangeOperation) => {
286
+ if (Array.isArray(vChangeOperation)) {
287
+ changeTypes = changeTypes.concat(vChangeOperation);
288
+ } else {
289
+ changeTypes.push(vChangeOperation);
290
+ }
291
+ });
273
292
  }
274
- var oModificationSetting = this._determineModification(control);
275
- return this.getModificationHandler(control).hasChanges({selector: control, changeTypes}, oModificationSetting?.payload).then((enableReset) => {
293
+ let selectors = [];
294
+ if (this.getController(control, key)?.getSelectorsForHasChanges) {
295
+ selectors = selectors.concat(this.getController(control, key).getSelectorsForHasChanges());
296
+ } else {
297
+ selectors.push(control);
298
+ }
299
+
300
+ const oModificationSetting = this._determineModification(control);
301
+ return this.getModificationHandler(control).hasChanges({
302
+ selector: control,
303
+ selectors,
304
+ changeTypes
305
+ }, oModificationSetting?.payload).then((enableReset) => {
276
306
  return enableReset;
277
307
  });
278
308
  };
@@ -287,7 +317,7 @@ sap.ui.define([
287
317
  *
288
318
  * @returns {Promise<null>} A Promise resolving once the reset is completed
289
319
  */
290
- Engine.prototype.reset = function (oControl, aKeys) {
320
+ Engine.prototype.reset = function(oControl, aKeys) {
291
321
 
292
322
  if (aKeys === undefined) {
293
323
  aKeys = this.getRegisteredControllers(oControl);
@@ -295,36 +325,35 @@ sap.ui.define([
295
325
 
296
326
  aKeys = aKeys instanceof Array ? aKeys : [aKeys];
297
327
 
298
- var aSelectors = [];
328
+ let aSelectors = [];
299
329
 
300
- aKeys.forEach(function (sKey) {
330
+ aKeys.forEach((sKey) => {
301
331
  aSelectors = aSelectors.concat(this.getController(oControl, sKey).getSelectorForReset());
302
- }.bind(this));
332
+ });
303
333
 
304
- var oResetConfig = {
334
+ const oResetConfig = {
305
335
  selectors: aSelectors,
306
336
  selector: oControl
307
337
  };
308
338
 
309
339
  if (aKeys) {
310
- var aChangeTypes = [];
311
- aKeys.forEach(function (sKey) {
340
+ let aChangeTypes = [];
341
+ aKeys.forEach((sKey) => {
312
342
  aChangeTypes = aChangeTypes.concat(Object.values(this.getController(oControl, sKey).getChangeOperations()));
313
- }.bind(this));
314
- oResetConfig.changeTypes = [].concat.apply([], aChangeTypes);
343
+ });
344
+ oResetConfig.changeTypes = [].concat(...aChangeTypes);
315
345
  }
316
346
 
317
- var oModificationSetting = this._determineModification(oControl);
318
- return oModificationSetting.handler.reset(oResetConfig, oModificationSetting.payload).then(function () {
319
- this.stateHandlerRegistry.fireChange(oControl);
347
+ const oModificationSetting = this._determineModification(oControl);
348
+ return oModificationSetting.handler.reset(oResetConfig, oModificationSetting.payload).then(() => {
320
349
  //Re-Init housekeeping after update
321
- return this.initAdaptation(oControl, aKeys).then(function (oPropertyHelper) {
322
- aKeys.forEach(function (sKey) {
323
- var oController = this.getController(oControl, sKey);
350
+ return this.initAdaptation(oControl, aKeys).then((oPropertyHelper) => {
351
+ aKeys.forEach((sKey) => {
352
+ const oController = this.getController(oControl, sKey);
324
353
  oController.update(oPropertyHelper);
325
- }.bind(this));
326
- }.bind(this));
327
- }.bind(this));
354
+ });
355
+ });
356
+ });
328
357
  };
329
358
 
330
359
  /**
@@ -367,7 +396,7 @@ sap.ui.define([
367
396
  * },
368
397
  * {
369
398
  * key: "key2",
370
- * grouped: false //Removes selection status for key2
399
+ * grouped: false //Removes grouping status for key2
371
400
  * },{
372
401
  * key: "key3",
373
402
  * position: 2 //Reorders current grouping position in the array
@@ -379,12 +408,13 @@ sap.ui.define([
379
408
  *
380
409
  * @returns {Promise<sap.m.p13n.State>} A Promise resolving after the state has been applied
381
410
  */
382
- Engine.prototype.applyState = function (oControl, oState) {
411
+ Engine.prototype.applyState = function(oControl, oState) {
383
412
 
384
413
  //Call retrieve only to ensure that the control is initialized and enabled for modification
385
- return this.retrieveState(oControl).then(function (oCurrentState) {
386
-
387
- var aStatePromise = [], aChanges = [], mInfoState = {};
414
+ return this.retrieveState(oControl).then((oCurrentState) => {
415
+ const aStatePromise = [];
416
+ let aChanges = [];
417
+ let mInfoState = {};
388
418
 
389
419
  if (oControl.validateState instanceof Function) {
390
420
  mInfoState = oControl.validateState(this.externalizeKeys(oControl, oState));
@@ -394,10 +424,9 @@ sap.ui.define([
394
424
  Log.error(mInfoState.message);
395
425
  }
396
426
 
397
- var aKeys = Object.keys(oState);
398
- aKeys.forEach(function (sControllerKey) {
399
-
400
- var oController = this.getController(oControl, sControllerKey);
427
+ const aKeys = Object.keys(oState);
428
+ aKeys.forEach((sControllerKey) => {
429
+ const oController = this.getController(oControl, sControllerKey);
401
430
 
402
431
  if (!oController) {
403
432
  //In case no controller can be found, skip change creation & appliance
@@ -405,7 +434,7 @@ sap.ui.define([
405
434
  return;
406
435
  }
407
436
 
408
- var oStatePromise = this.createChanges({
437
+ const oStatePromise = this.createChanges({
409
438
  control: oControl,
410
439
  key: sControllerKey,
411
440
  state: oController.sanityCheck(oState[sControllerKey]),
@@ -414,24 +443,23 @@ sap.ui.define([
414
443
  });
415
444
 
416
445
  aStatePromise.push(oStatePromise);
417
- }.bind(this));
446
+ });
418
447
 
419
- return Promise.all(aStatePromise).then(function (aRawChanges) {
420
- var mChangeMap = {};
448
+ return Promise.all(aStatePromise).then((aRawChanges) => {
449
+ const mChangeMap = {};
421
450
 
422
- aRawChanges.forEach(function (aSpecificChanges, iIndex) {
451
+ aRawChanges.forEach((aSpecificChanges, iIndex) => {
423
452
 
424
453
  if (aSpecificChanges && aSpecificChanges.length > 0) {
425
454
  aChanges = aChanges.concat(aSpecificChanges);
426
- var sKey = aKeys[iIndex];
455
+ const sKey = aKeys[iIndex];
427
456
  mChangeMap[sKey] = aSpecificChanges;
428
457
  }
429
458
  });
430
459
 
431
460
  return this._processChanges(oControl, mChangeMap);
432
- }.bind(this));
433
-
434
- }.bind(this));
461
+ });
462
+ });
435
463
  };
436
464
 
437
465
  /**
@@ -447,16 +475,16 @@ sap.ui.define([
447
475
  *
448
476
  * @returns {Promise<sap.m.p13n.State>} A Promise resolving in the current control state
449
477
  */
450
- Engine.prototype.retrieveState = function (oControl) {
478
+ Engine.prototype.retrieveState = function(oControl) {
451
479
 
452
480
  //ensure that the control has been initialized
453
- return this.checkControlInitialized(oControl).then(function () {
481
+ return this.checkControlInitialized(oControl).then(() => {
454
482
 
455
483
  //ensure that all changes have been applied
456
- return Engine.getInstance().waitForChanges(oControl).then(function () {
484
+ return Engine.getInstance().waitForChanges(oControl).then(() => {
457
485
 
458
- var oRetrievedState = {};
459
- Engine.getInstance().getRegisteredControllers(oControl).forEach(function (sKey) {
486
+ const oRetrievedState = {};
487
+ Engine.getInstance().getRegisteredControllers(oControl).forEach((sKey) => {
460
488
  oRetrievedState[sKey] = Engine.getInstance().getController(oControl, sKey).getCurrentState(true);
461
489
  });
462
490
 
@@ -475,19 +503,19 @@ sap.ui.define([
475
503
  * @param {sap.ui.core.Control} vControl The registered control instance
476
504
  * @param {sap.m.p13n.modification.ModificationHandler} oModificationHandler The modification handler object
477
505
  */
478
- Engine.prototype._setModificationHandler = function (vControl, oModificationHandler) {
506
+ Engine.prototype._setModificationHandler = function(vControl, oModificationHandler) {
479
507
  if (!oModificationHandler.isA("sap.m.p13n.modification.ModificationHandler")) {
480
508
  throw new Error("Only sap.m.p13n.modification.ModificationHandler derivations are allowed for modification");
481
509
  }
482
- var oModificationSetting = this._determineModification(vControl); //check and calculate modification basics
510
+ const oModificationSetting = this._determineModification(vControl); //check and calculate modification basics
483
511
  oModificationSetting.handler = oModificationHandler;
484
512
  this._getRegistryEntry(vControl).modification = oModificationSetting;
485
513
  };
486
514
 
487
- Engine.prototype._addToQueue = function (oControl, fTask) {
488
- var oRegistryEntry = this._getRegistryEntry(oControl);
515
+ Engine.prototype._addToQueue = function(oControl, fTask) {
516
+ const oRegistryEntry = this._getRegistryEntry(oControl);
489
517
 
490
- var fCleanupPromiseQueue = function (pOriginalPromise) {
518
+ const fCleanupPromiseQueue = (pOriginalPromise) => {
491
519
  if (oRegistryEntry.pendingModification === pOriginalPromise) {
492
520
  oRegistryEntry.pendingModification = null;
493
521
  }
@@ -521,62 +549,66 @@ sap.ui.define([
521
549
  *
522
550
  * @returns {Promise} A Promise resolving in the related delta changes
523
551
  */
524
- Engine.prototype.createChanges = function (mDiffParameters) {
552
+ Engine.prototype.createChanges = function(mDiffParameters) {
525
553
 
526
- var oControl = Engine.getControlInstance(mDiffParameters.control);
527
- var sKey = mDiffParameters.key;
528
- var vNewState = mDiffParameters.state;
529
- var bSuppressCallback = !!mDiffParameters.suppressAppliance;
554
+ const oControl = Engine.getControlInstance(mDiffParameters.control);
555
+ const sKey = mDiffParameters.key;
556
+ const vNewState = mDiffParameters.state;
557
+ const bSuppressCallback = !!mDiffParameters.suppressAppliance;
530
558
 
531
559
  if (!sKey || !mDiffParameters.control || !vNewState) {
532
560
  return Promise.resolve([]);
533
561
  }
534
562
 
535
- var fDeltaHandling = function () {
536
- return this.initAdaptation(oControl, sKey).then(function () {
563
+ const fDeltaHandling = () => {
564
+ return this.initAdaptation(oControl, sKey).then(() => {
537
565
  return vNewState;
538
566
  })
539
- .then(function (aNewState) {
540
-
541
- var oController = this.getController(oControl, sKey);
542
- var mChangeOperations = oController.getChangeOperations();
543
-
544
- var oRegistryEntry = this._getRegistryEntry(oControl);
545
- var oCurrentState = oController.getCurrentState();
546
- var oPriorState = merge(oCurrentState instanceof Array ? [] : {}, oCurrentState);
567
+ .then((aNewState) => {
568
+
569
+ const oController = this.getController(oControl, sKey);
570
+ const mChangeOperations = oController.getChangeOperations();
571
+
572
+ const oRegistryEntry = this._getRegistryEntry(oControl);
573
+ const oCurrentState = oController.getCurrentState();
574
+ const oPriorState = merge(oCurrentState instanceof Array ? [] : {}, oCurrentState);
575
+
576
+ const oControllerHelper = oController.getMetadataHelper();
577
+ const oHelper = oControllerHelper ? oControllerHelper : oRegistryEntry.helper;
578
+ const oPropertyInfo = oHelper.getProperties().map((a) => {
579
+ return {
580
+ key: a.key,
581
+ name: a.name
582
+ };
583
+ });
547
584
 
548
- var mDeltaConfig = {
585
+ const mDeltaConfig = {
549
586
  existingState: mDiffParameters.stateBefore || oPriorState,
550
587
  applyAbsolute: mDiffParameters.applyAbsolute,
551
588
  changedState: aNewState,
552
589
  control: oController.getAdaptationControl(),
553
590
  changeOperations: mChangeOperations,
554
591
  deltaAttributes: ["key"],
555
- propertyInfo: oRegistryEntry.helper.getProperties().map(function (a) {
556
- return {
557
- key: a.key,
558
- name: a.name
559
- };
560
- })
592
+ propertyInfo: oPropertyInfo
561
593
  };
562
594
 
563
595
  //Only execute change calculation in case there is a difference (--> example: press 'Ok' without a difference)
564
- var aChanges = oController.getDelta(mDeltaConfig);
596
+ const aChanges = oController.getDelta(mDeltaConfig);
565
597
 
566
598
  if (!bSuppressCallback) {
567
- var mChangeMap = {};
599
+ const mChangeMap = {};
568
600
  mChangeMap[sKey] = aChanges;
569
601
  return this._processChanges(oControl, mChangeMap)
570
- .then(function () {
602
+ .then(() => {
571
603
  return aChanges;
572
604
  });
573
605
  }
574
606
 
575
607
  return aChanges || [];
576
608
 
577
- }.bind(this));
609
+ });
578
610
 
579
- }.bind(this);
611
+ };
580
612
 
581
613
  return this._addToQueue(oControl, fDeltaHandling);
582
614
  };
@@ -590,11 +622,11 @@ sap.ui.define([
590
622
  * @param {sap.ui.core.Control} oControl The related control instance
591
623
  * @returns {Promise} A Promise resolving after all pending modifications have been applied
592
624
  */
593
- Engine.prototype.waitForChanges = function (oControl) {
594
- var oModificationSetting = this._determineModification(oControl);
595
- var oRegistryEntry = this._getRegistryEntry(oControl);
625
+ Engine.prototype.waitForChanges = function(oControl) {
626
+ const oModificationSetting = this._determineModification(oControl);
627
+ const oRegistryEntry = this._getRegistryEntry(oControl);
596
628
  return oRegistryEntry && oRegistryEntry.pendingModification ? oRegistryEntry.pendingModification : Promise.resolve()
597
- .then(function () {
629
+ .then(() => {
598
630
  return oModificationSetting.handler.waitForChanges({
599
631
  element: oControl
600
632
  }, oModificationSetting.payload);
@@ -609,17 +641,17 @@ sap.ui.define([
609
641
  *
610
642
  * @returns {Promise} A Promise resolving in a Boolean that determines whether the requirements for the persistence layer are met
611
643
  */
612
- Engine.prototype.isModificationSupported = function (oControl) {
613
- var oModificationSetting = this._determineModification(oControl);
644
+ Engine.prototype.isModificationSupported = function(oControl) {
645
+ const oModificationSetting = this._determineModification(oControl);
614
646
  return oModificationSetting.handler.isModificationSupported({
615
647
  element: oControl
616
648
  }, oModificationSetting.payload);
617
649
  };
618
650
 
619
- Engine.prototype.fireStateChange = function (oControl) {
620
- return this.retrieveState(oControl).then(function (oState) {
651
+ Engine.prototype.fireStateChange = function(oControl) {
652
+ return this.retrieveState(oControl).then((oState) => {
621
653
  this.stateHandlerRegistry.fireChange(oControl, oState);
622
- }.bind(this));
654
+ });
623
655
  };
624
656
 
625
657
  /**
@@ -630,24 +662,19 @@ sap.ui.define([
630
662
  * @param {object} mChanges A map of keys and arrays, every controller will provide an array of changes
631
663
  * @returns {Promise} The change appliance <code>Promise</code>
632
664
  */
633
- Engine.prototype._processChanges = function (vControl, mChanges) {
634
- var aChanges = [];
635
- var aKeys = Object.keys(mChanges);
636
- var oDiff = {};
665
+ Engine.prototype._processChanges = function(vControl, mChanges) {
666
+ let aChanges = [];
667
+ const aKeys = Object.keys(mChanges);
668
+ const oDiff = {};
637
669
 
638
- aKeys.forEach(function (sKey) {
670
+ aKeys.forEach((sKey) => {
639
671
  oDiff[sKey] = this.getController(vControl, sKey).changesToState(mChanges[sKey]);
640
672
  aChanges = aChanges.concat(mChanges[sKey]);
641
- }.bind(this));
673
+ });
642
674
 
643
675
  if (aChanges instanceof Array && aChanges.length > 0) {
644
- var oModificationSetting = this._determineModification(vControl);
645
- return oModificationSetting.handler.processChanges(aChanges, oModificationSetting.payload)
646
- .then(function (aChanges) {
647
- var oControl = Engine.getControlInstance(vControl);
648
- this.fireStateChange(oControl);
649
- return aChanges;
650
- }.bind(this));
676
+ const oModificationSetting = this._determineModification(vControl);
677
+ return oModificationSetting.handler.processChanges(aChanges, oModificationSetting.payload);
651
678
  } else {
652
679
  return Promise.resolve([]);
653
680
  }
@@ -667,26 +694,26 @@ sap.ui.define([
667
694
  *
668
695
  * @returns {Promise} A Promise resolving in the set of changes to be created during UI adaptation at runtime
669
696
  */
670
- Engine.prototype.getRTASettingsActionHandler = function (oControl, mPropertyBag, aKeys) {
697
+ Engine.prototype.getRTASettingsActionHandler = function(oControl, mPropertyBag, aKeys) {
671
698
 
672
- var fResolveRTA;
699
+ let fResolveRTA;
673
700
 
674
701
  //var aVMs = this.hasForReference(oControl, "sap.ui.fl.variants.VariantManagement");
675
702
  // TODO: clarify if we need this error handling / what to do with the Link if we want to keep it
676
- var aPVs = this.hasForReference(oControl, "sap.m.p13n.PersistenceProvider");
703
+ const aPVs = this.hasForReference(oControl, "sap.m.p13n.PersistenceProvider");
677
704
 
678
705
  if (aPVs.length > 0 && !oControl.isA("sap.ui.mdc.link.Panel")) {
679
706
  return Promise.reject("Please do not use a PeristenceProvider in RTA.");
680
707
  }
681
708
 
682
- var oOriginalModifHandler = this.getModificationHandler(oControl);
683
- var oTemporaryRTAHandler = new FlexModificationHandler();
709
+ const oOriginalModifHandler = this.getModificationHandler(oControl);
710
+ const oTemporaryRTAHandler = new FlexModificationHandler();
684
711
 
685
- var oRTAPromise = new Promise(function (resolve, reject) {
712
+ const oRTAPromise = new Promise((resolve, reject) => {
686
713
  fResolveRTA = resolve;
687
714
  });
688
715
 
689
- oTemporaryRTAHandler.processChanges = function (aChanges) {
716
+ oTemporaryRTAHandler.processChanges = (aChanges) => {
690
717
  fResolveRTA(aChanges);
691
718
  return Promise.resolve(aChanges);
692
719
  };
@@ -695,8 +722,8 @@ sap.ui.define([
695
722
 
696
723
  this.uimanager.show(oControl, aKeys, {
697
724
  showReset: false
698
- }).then(function (oContainer) {
699
- var oCustomHeader = oContainer.getCustomHeader();
725
+ }).then((oContainer) => {
726
+ const oCustomHeader = oContainer.getCustomHeader();
700
727
  if (oCustomHeader) {
701
728
  oCustomHeader.getContentRight()[0].setVisible(false);
702
729
  }
@@ -706,10 +733,10 @@ sap.ui.define([
706
733
  }
707
734
  });
708
735
 
709
- oRTAPromise.then(function () {
736
+ oRTAPromise.then(() => {
710
737
  this._setModificationHandler(oControl, oOriginalModifHandler);
711
738
  oTemporaryRTAHandler.destroy();
712
- }.bind(this));
739
+ });
713
740
 
714
741
  return oRTAPromise;
715
742
 
@@ -731,14 +758,15 @@ sap.ui.define([
731
758
  * @param {object} [mEnhanceConfig.propertyBag] Optional property bag for the <code>ModificationHandler</code>
732
759
  * @returns {Promise} Promise resolving when the xConfig is successfully enhanced
733
760
  */
734
- Engine.prototype.enhanceXConfig = function (vControl, mEnhanceConfig) {
761
+ Engine.prototype.enhanceXConfig = function(vControl, mEnhanceConfig) {
735
762
 
736
- var oControl = Engine.getControlInstance(vControl);
737
- var oRegistryEntry = this._getRegistryEntry(vControl);
738
- mEnhanceConfig.currentState = Engine.getInstance().getController(oControl, mEnhanceConfig.changeType)?.getCurrentState();
763
+ const oControl = Engine.getControlInstance(vControl);
764
+ const oRegistryEntry = this._getRegistryEntry(vControl);
765
+ const sPersistenceIdentifier = mEnhanceConfig && mEnhanceConfig.value && mEnhanceConfig.value.controllerKey ? mEnhanceConfig.value.controllerKey : undefined;
766
+ mEnhanceConfig.currentState = Engine.getInstance().getController(oControl, mEnhanceConfig.changeType, sPersistenceIdentifier)?.getCurrentState();
739
767
 
740
768
  return xConfigAPI.enhanceConfig(oControl, mEnhanceConfig)
741
- .then(function (oConfig) {
769
+ .then((oConfig) => {
742
770
  if (oRegistryEntry) {
743
771
  //to simplify debugging
744
772
  oRegistryEntry.xConfig = oConfig;
@@ -759,9 +787,9 @@ sap.ui.define([
759
787
  * @returns {Promise<object>|object}
760
788
  * A <code>Promise</code> that resolves with the configuration. The xConfig itself if it is already available, or <code>null</code> if there is no xConfig
761
789
  */
762
- Engine.prototype.readXConfig = function (vControl, mEnhanceConfig) {
790
+ Engine.prototype.readXConfig = (vControl, mEnhanceConfig) => {
763
791
 
764
- var oControl = Engine.getControlInstance(vControl);
792
+ const oControl = Engine.getControlInstance(vControl);
765
793
  return xConfigAPI.readConfig(oControl, mEnhanceConfig) || {};
766
794
  };
767
795
 
@@ -775,14 +803,14 @@ sap.ui.define([
775
803
  * @param {object} oInternalState The internal state
776
804
  * @returns {object} The externalized state
777
805
  */
778
- Engine.prototype.externalizeKeys = function (vControl, oInternalState) {
779
- var oExternalState = {};
780
- Object.keys(oInternalState).forEach(function (sInternalKey) {
781
- var oController = this.getController(Engine.getControlInstance(vControl), sInternalKey);
806
+ Engine.prototype.externalizeKeys = function(vControl, oInternalState) {
807
+ const oExternalState = {};
808
+ Object.keys(oInternalState).forEach((sInternalKey) => {
809
+ const oController = this.getController(Engine.getControlInstance(vControl), sInternalKey);
782
810
  if (oController) {
783
811
  oExternalState[oController.getStateKey()] = oInternalState[sInternalKey];
784
812
  }
785
- }.bind(this));
813
+ });
786
814
  return oExternalState;
787
815
  };
788
816
 
@@ -796,56 +824,58 @@ sap.ui.define([
796
824
  * @param {object} oExternalState The external state
797
825
  * @returns {object} The internalized state
798
826
  */
799
- Engine.prototype.internalizeKeys = function (vControl, oExternalState) {
800
- var aControllerKeys = this.getRegisteredControllers(vControl), oInternalState = {};
801
- aControllerKeys.forEach(function (sInternalRegistryKey) {
802
- var sExternalStateKey = this.getController(vControl, sInternalRegistryKey).getStateKey();
827
+ Engine.prototype.internalizeKeys = function(vControl, oExternalState) {
828
+ const aControllerKeys = this.getRegisteredControllers(vControl),
829
+ oInternalState = {};
830
+ aControllerKeys.forEach((sInternalRegistryKey) => {
831
+ const sExternalStateKey = this.getController(vControl, sInternalRegistryKey).getStateKey();
803
832
  if (oExternalState.hasOwnProperty(sExternalStateKey)) {
804
833
  oInternalState[sInternalRegistryKey] = oExternalState[sExternalStateKey];
805
834
  }
806
- }.bind(this));
835
+ });
807
836
  return oInternalState;
808
837
  };
809
838
 
810
- Engine.prototype.diffState = function (oControl, oOld, oNew) {
839
+ Engine.prototype.diffState = function(oControl, oOld, oNew) {
811
840
 
812
- var aDiffCreation = [], oDiffState = {};
841
+ const aDiffCreation = [],
842
+ oDiffState = {};
813
843
  oOld = merge({}, oOld);
814
844
  oNew = merge({}, oNew);
815
845
 
816
- Object.keys(oNew).forEach(function (sKey) {
846
+ Object.keys(oNew).forEach((sKey) => {
817
847
  aDiffCreation.push(this.createChanges({
818
848
  control: oControl,
819
849
  stateBefore: oOld[sKey],
820
- state: oNew[sKey],
850
+ state: this.getController(oControl, sKey).sanityCheck(oNew[sKey]),
821
851
  applyAbsolute: ProcessingStrategy.FullReplace,
822
852
  key: sKey,
823
853
  suppressAppliance: true
824
854
  }));
825
- }.bind(this));
855
+ });
826
856
  return Promise.all(aDiffCreation)
827
- .then(function (aChanges) {
828
- Object.keys(oNew).forEach(function (sKey, i) {
857
+ .then((aChanges) => {
858
+ Object.keys(oNew).forEach((sKey, i) => {
829
859
 
830
860
  if (oNew[sKey]) {
831
- var aState = this.getController(oControl, sKey).changesToState(aChanges[i], oOld[sKey], oNew[sKey]);
861
+ const aState = this.getController(oControl, sKey).changesToState(aChanges[i], oOld[sKey], oNew[sKey]);
832
862
  oDiffState[sKey] = aState;
833
863
  }
834
- }.bind(this));
864
+ });
835
865
 
836
866
  return oDiffState;
837
867
 
838
- }.bind(this));
868
+ });
839
869
  };
840
870
 
841
- Engine.prototype.checkControlInitialized = function (vControl) {
842
- var oControl = Engine.getControlInstance(vControl);
843
- var pInitialize = oControl.initialized instanceof Function ? oControl.initialized() : Promise.resolve();
871
+ Engine.prototype.checkControlInitialized = (vControl) => {
872
+ const oControl = Engine.getControlInstance(vControl);
873
+ const pInitialize = oControl.initialized instanceof Function ? oControl.initialized() : Promise.resolve();
844
874
  return pInitialize || Promise.resolve();
845
875
  };
846
876
 
847
- Engine.prototype.checkPropertyHelperInitialized = function (vControl) {
848
- var oControl = Engine.getControlInstance(vControl);
877
+ Engine.prototype.checkPropertyHelperInitialized = (vControl) => {
878
+ const oControl = Engine.getControlInstance(vControl);
849
879
  return oControl.initPropertyHelper instanceof Function ? oControl.initPropertyHelper() : Promise.resolve();
850
880
  };
851
881
 
@@ -860,21 +890,21 @@ sap.ui.define([
860
890
  *
861
891
  * @returns {Promise} A Promise resolving after the adaptation housekeeping has been initialized
862
892
  */
863
- Engine.prototype.initAdaptation = function (vControl, aKeys) {
893
+ Engine.prototype.initAdaptation = function(vControl, aKeys) {
864
894
  this.verifyController(vControl, aKeys);
865
895
 
866
896
  //1) Cache property helper
867
- var oRegistryEntry = this._getRegistryEntry(vControl);
868
- var oControl = Engine.getControlInstance(vControl);
897
+ const oRegistryEntry = this._getRegistryEntry(vControl);
898
+ const oControl = Engine.getControlInstance(vControl);
869
899
 
870
900
  if (oRegistryEntry.helper) {
871
901
  return Promise.resolve(oRegistryEntry.helper);
872
902
  }
873
903
 
874
- return this.checkPropertyHelperInitialized(oControl).then(function (oPropertyHelper) {
904
+ return this.checkPropertyHelperInitialized(oControl).then((oPropertyHelper) => {
875
905
  oRegistryEntry.helper = oPropertyHelper;
876
906
  return oPropertyHelper;
877
- }, function (sHelperError) {
907
+ }, (sHelperError) => {
878
908
  throw new Error(sHelperError);
879
909
  });
880
910
 
@@ -889,8 +919,8 @@ sap.ui.define([
889
919
  * @param {string} sKey The key that defines the later access to the controller instance.
890
920
  * @param {object} oPreConfig A predefined configuration
891
921
  */
892
- Engine.prototype.addController = function (oController, sKey, oPreConfig) {
893
- var oRegistryEntry = this._getRegistryEntry(oController.getAdaptationControl(), oPreConfig);
922
+ Engine.prototype.addController = function(oController, sKey, oPreConfig) {
923
+ const oRegistryEntry = this._getRegistryEntry(oController.getAdaptationControl(), oPreConfig);
894
924
  oRegistryEntry.controller[sKey] = oController;
895
925
  };
896
926
 
@@ -900,27 +930,34 @@ sap.ui.define([
900
930
  *
901
931
  * @param {sap.ui.core.Control} vControl The registered Control instance.
902
932
  * @param {string} sKey The key/changeType for which the controller has been registered.
933
+ * @param {string} [sPersistenceIdentifier] The key defined for the controller. Should be used if <code>sKey</code> represents the changeType.
903
934
  *
904
935
  * @returns {sap.m.p13n.SelectionController} The controller instance
905
936
  */
906
- Engine.prototype.getController = function (vControl, sKey) {
907
- var oRegistryEntry = this._getRegistryEntry(vControl), oController;
937
+ Engine.prototype.getController = function(vControl, sKey, sPersistenceIdentifier) {
938
+ const oRegistryEntry = this._getRegistryEntry(vControl);
939
+ let oController;
908
940
  if (oRegistryEntry && oRegistryEntry.controller.hasOwnProperty(sKey)) {
909
941
  oController = oRegistryEntry.controller[sKey];
910
942
  }
911
943
 
912
- if (!oController) {
913
- this.getRegisteredControllers(vControl).forEach(function (sController) {
914
- var oRegisteredController = this.getController(vControl, sController);
915
- if (oRegisteredController) {
916
- Object.keys(oRegisteredController.getChangeOperations()).forEach(function (sOperationType) {
917
- if (oRegisteredController.getChangeOperations()[sOperationType] === sKey) {
944
+ if (oController) {
945
+ return oController;
946
+ }
947
+
948
+ this.getRegisteredControllers(vControl).forEach((sController) => {
949
+ const oRegisteredController = this.getController(vControl, sController);
950
+ if (oRegisteredController) {
951
+ Object.keys(oRegisteredController.getChangeOperations()).forEach((sOperationType) => {
952
+ if (oRegisteredController.getChangeOperations()[sOperationType] === sKey) {
953
+ if (!sPersistenceIdentifier || sPersistenceIdentifier === oRegisteredController.getPersistenceIdentifier()) {
918
954
  oController = oRegisteredController;
919
955
  }
920
- });
921
- }
922
- }.bind(this));
923
- }
956
+ }
957
+ });
958
+ }
959
+ });
960
+
924
961
  return oController;
925
962
  };
926
963
 
@@ -930,15 +967,15 @@ sap.ui.define([
930
967
  * @param {sap.ui.core.Control} vControl The registered Control instance.
931
968
  * @param {string|array} vKey A key as string or an array of keys
932
969
  */
933
- Engine.prototype.verifyController = function (vControl, vKey) {
934
- var aKeys = vKey instanceof Array ? vKey : [vKey];
970
+ Engine.prototype.verifyController = function(vControl, vKey) {
971
+ const aKeys = vKey instanceof Array ? vKey : [vKey];
935
972
 
936
- aKeys.forEach(function (sKey) {
973
+ aKeys.forEach((sKey) => {
937
974
  if (!this.getController(vControl, sKey)) {
938
- var oControl = Engine.getControlInstance(vControl);
975
+ const oControl = Engine.getControlInstance(vControl);
939
976
  throw new Error("No controller registered yet for " + oControl.getId() + " and key: " + sKey);
940
977
  }
941
- }.bind(this));
978
+ });
942
979
 
943
980
  };
944
981
 
@@ -951,26 +988,27 @@ sap.ui.define([
951
988
  *
952
989
  * @returns {object} The requested UI settings of the control instance and provided keys
953
990
  */
954
- Engine.prototype.getUISettings = function (vControl, vKeys) {
955
- var aKeys = Array.isArray(vKeys) ? vKeys : [vKeys];
991
+ Engine.prototype.getUISettings = function(vControl, vKeys) {
992
+ const aKeys = Array.isArray(vKeys) ? vKeys : [vKeys];
956
993
  this.verifyController(vControl, aKeys);
957
- var oPropertyHelper = this._getRegistryEntry(vControl).helper;
958
- var mUiSettings = {}, aPanelCreation = [];
994
+ const oPropertyHelper = this._getRegistryEntry(vControl).helper;
995
+ const mUiSettings = {},
996
+ aPanelCreation = [];
959
997
 
960
- aKeys.forEach(function (sKey) {
961
- var oController = this.getController(vControl, sKey);
962
- var pAdaptationUI = oController.initAdaptationUI(oPropertyHelper);
998
+ aKeys.forEach((sKey) => {
999
+ const oController = this.getController(vControl, sKey);
1000
+ const pAdaptationUI = oController.initAdaptationUI(oPropertyHelper);
963
1001
 
964
1002
  //Check faceless controller implementations and skip them
965
1003
  if (pAdaptationUI instanceof Promise) {
966
1004
  aPanelCreation.push(pAdaptationUI);
967
1005
  }
968
- }.bind(this));
1006
+ });
969
1007
 
970
1008
  return Promise.all(aPanelCreation)
971
- .then(function (aPanels) {
972
- aPanels.forEach(function (oPanel, iIndex) {
973
- var sKey = aKeys[iIndex];
1009
+ .then((aPanels) => {
1010
+ aPanels.forEach((oPanel, iIndex) => {
1011
+ const sKey = aKeys[iIndex];
974
1012
  mUiSettings[sKey] = {
975
1013
  panel: oPanel
976
1014
  };
@@ -988,8 +1026,8 @@ sap.ui.define([
988
1026
  * @param {string|sap.ui.core.Control} vControl The control ID or instance
989
1027
  * @returns {boolean} true if modification settings were already determined
990
1028
  */
991
- Engine.prototype.isRegistered = function (vControl) {
992
- var oRegistryEntry = this._getRegistryEntry(vControl);
1029
+ Engine.prototype.isRegistered = function(vControl) {
1030
+ const oRegistryEntry = this._getRegistryEntry(vControl);
993
1031
  return !!oRegistryEntry;
994
1032
  };
995
1033
 
@@ -999,10 +1037,10 @@ sap.ui.define([
999
1037
  * @private
1000
1038
  *
1001
1039
  * @param {sap.ui.core.Control} vControl The registered Control instance
1002
- * @returns {boolean} true if modification settings were already determined
1040
+ * @returns {boolean} true if modification settings were already determined
1003
1041
  */
1004
- Engine.prototype.isRegisteredForModification = function (vControl) {
1005
- var oRegistryEntry = this._getRegistryEntry(vControl);
1042
+ Engine.prototype.isRegisteredForModification = function(vControl) {
1043
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1006
1044
  return oRegistryEntry && !!oRegistryEntry.modification;
1007
1045
  };
1008
1046
 
@@ -1012,8 +1050,8 @@ sap.ui.define([
1012
1050
  * @param {string|sap.ui.core.Control} vControl The control ID or instance
1013
1051
  * @returns {array} An array of all registered controller instances
1014
1052
  */
1015
- Engine.prototype.getRegisteredControllers = function (vControl) {
1016
- var oRegistryEntry = this._getRegistryEntry(vControl);
1053
+ Engine.prototype.getRegisteredControllers = function(vControl) {
1054
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1017
1055
  return oRegistryEntry ? Object.keys(oRegistryEntry.controller) : [];
1018
1056
  };
1019
1057
  /**
@@ -1024,9 +1062,9 @@ sap.ui.define([
1024
1062
  *
1025
1063
  * @returns {object} The related registry entry
1026
1064
  */
1027
- Engine.prototype._getRegistryEntry = function (vControl) {
1065
+ Engine.prototype._getRegistryEntry = (vControl) => {
1028
1066
 
1029
- var oControl = Engine.getControlInstance(vControl);
1067
+ const oControl = Engine.getControlInstance(vControl);
1030
1068
  return _mRegistry.get(oControl);
1031
1069
 
1032
1070
  };
@@ -1040,8 +1078,8 @@ sap.ui.define([
1040
1078
  * @param {string|sap.ui.core.Control} vControl The control id or instance
1041
1079
  * @returns {object} The related ModificationHandler.
1042
1080
  */
1043
- Engine.prototype.getModificationHandler = function (vControl) {
1044
- var oModificationSetting = this._determineModification(vControl);
1081
+ Engine.prototype.getModificationHandler = function(vControl) {
1082
+ const oModificationSetting = this._determineModification(vControl);
1045
1083
 
1046
1084
  //This method might also be retrieved by non-registered Controls (such as FilterBarBase) - the default should always be Flex.
1047
1085
  return oModificationSetting.handler;
@@ -1056,9 +1094,9 @@ sap.ui.define([
1056
1094
  * @param {object} oPreConfig A predefined configuration
1057
1095
  * @returns {object} The related registry entry
1058
1096
  */
1059
- Engine.prototype._createRegistryEntry = function (vControl, oPreConfig) {
1097
+ Engine.prototype._createRegistryEntry = (vControl, oPreConfig) => {
1060
1098
 
1061
- var oControl = Engine.getControlInstance(vControl);
1099
+ const oControl = Engine.getControlInstance(vControl);
1062
1100
 
1063
1101
  if (!_mRegistry.has(oControl)) {
1064
1102
 
@@ -1083,29 +1121,30 @@ sap.ui.define([
1083
1121
  return _mRegistry.get(oControl);
1084
1122
  };
1085
1123
 
1086
- Engine.prototype.trace = function (vControl, oChange) {
1087
- var oRegistryEntry = this._getRegistryEntry(vControl);
1088
- this.getRegisteredControllers(vControl).forEach(function (sKey) {
1089
- var oController = this.getController(vControl, sKey);
1090
- var mChangeOperations = oController.getChangeOperations();
1091
- Object.keys(mChangeOperations).forEach(function (sType) {
1124
+ Engine.prototype.trace = function(vControl, oChange) {
1125
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1126
+ this.getRegisteredControllers(vControl).forEach((sKey) => {
1127
+ const oController = this.getController(vControl, sKey);
1128
+ const mChangeOperations = oController.getChangeOperations();
1129
+ Object.keys(mChangeOperations).forEach((sType) => {
1092
1130
  if (mChangeOperations[sType] === oChange.changeSpecificData.changeType) {
1093
1131
  oRegistryEntry.pendingAppliance[sKey] = [].concat(oRegistryEntry.pendingAppliance[sKey] || []).concat(oChange);
1094
1132
  }
1095
1133
  });
1096
- }.bind(this));
1134
+ });
1097
1135
  };
1098
1136
 
1099
- Engine.prototype.getTrace = function (vControl, oChange) {
1100
- var oRegistryEntry = this._getRegistryEntry(vControl), oTrace;
1137
+ Engine.prototype.getTrace = function(vControl, oChange) {
1138
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1139
+ let oTrace;
1101
1140
  if (oRegistryEntry) {
1102
1141
  oTrace = Object.keys(oRegistryEntry.pendingAppliance);
1103
1142
  }
1104
1143
  return oTrace;
1105
1144
  };
1106
1145
 
1107
- Engine.prototype.clearTrace = function (vControl, oChange) {
1108
- var oRegistryEntry = this._getRegistryEntry(vControl);
1146
+ Engine.prototype.clearTrace = function(vControl, oChange) {
1147
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1109
1148
  if (oRegistryEntry) {
1110
1149
  oRegistryEntry.pendingAppliance = {};
1111
1150
  }
@@ -1118,22 +1157,22 @@ sap.ui.define([
1118
1157
  * @param {string|sap.ui.core.Control} vControl The control id or instance
1119
1158
  * @returns {object} The related modification registry entry
1120
1159
  */
1121
- Engine.prototype._determineModification = function (vControl) {
1160
+ Engine.prototype._determineModification = function(vControl) {
1122
1161
 
1123
- var oRegistryEntry = this._getRegistryEntry(vControl);
1162
+ const oRegistryEntry = this._getRegistryEntry(vControl);
1124
1163
 
1125
1164
  //Modification setting is only calculated once per control instance
1126
1165
  if (oRegistryEntry && oRegistryEntry.modification) {
1127
1166
  return oRegistryEntry.modification;
1128
1167
  }
1129
1168
 
1130
- var aPPResults = this.hasForReference(vControl, "sap.m.p13n.PersistenceProvider").concat(this.hasForReference(vControl, "sap.ui.mdc.p13n.PersistenceProvider"));
1131
- var aVMResults = this.hasForReference(vControl, "sap.ui.fl.variants.VariantManagement");
1169
+ const aPPResults = this.hasForReference(vControl, "sap.m.p13n.PersistenceProvider").concat(this.hasForReference(vControl, "sap.ui.mdc.p13n.PersistenceProvider"));
1170
+ const aVMResults = this.hasForReference(vControl, "sap.ui.fl.variants.VariantManagement");
1132
1171
 
1133
- var aPersistenceProvider = aPPResults.length ? aPPResults : undefined;
1134
- var sHandlerMode = aPersistenceProvider ? aPersistenceProvider[0].getMode() : "Standard";
1172
+ const aPersistenceProvider = aPPResults.length ? aPPResults : undefined;
1173
+ const sHandlerMode = aPersistenceProvider ? aPersistenceProvider[0].getMode() : "Standard";
1135
1174
 
1136
- var oModificationSetting = {
1175
+ const oModificationSetting = {
1137
1176
  handler: FlexModificationHandler.getInstance(),
1138
1177
  payload: {
1139
1178
  hasVM: aVMResults && aVMResults.length > 0,
@@ -1149,14 +1188,14 @@ sap.ui.define([
1149
1188
  return oModificationSetting;
1150
1189
  };
1151
1190
 
1152
- Engine.prototype.hasForReference = function (vControl, sControlType) {
1153
- var sControlId = vControl && vControl.getId ? vControl.getId() : vControl;
1154
- var aResults = Element.registry.filter(function (oElement) {
1191
+ Engine.prototype.hasForReference = (vControl, sControlType) => {
1192
+ const sControlId = vControl && vControl.getId ? vControl.getId() : vControl;
1193
+ const aResults = ElementRegistry.filter((oElement) => {
1155
1194
  if (!oElement.isA(sControlType)) {
1156
1195
  return false;
1157
1196
  }
1158
- var aFor = oElement.getFor instanceof Function ? oElement.getFor() : [];
1159
- for (var n = 0; n < aFor.length; n++) {
1197
+ const aFor = oElement.getFor instanceof Function ? oElement.getFor() : [];
1198
+ for (let n = 0; n < aFor.length; n++) {
1160
1199
  if (aFor[n] === sControlId || oEngine.hasControlAncestorWithId(sControlId, aFor[n])) {
1161
1200
  return true;
1162
1201
  }
@@ -1175,14 +1214,14 @@ sap.ui.define([
1175
1214
  *
1176
1215
  * @returns {boolean} Returns whether an related ancestor could be found.
1177
1216
  */
1178
- Engine.prototype.hasControlAncestorWithId = function (sControlId, sAncestorControlId) {
1179
- var oControl;
1217
+ Engine.prototype.hasControlAncestorWithId = (sControlId, sAncestorControlId) => {
1218
+ let oControl;
1180
1219
 
1181
1220
  if (sControlId === sAncestorControlId) {
1182
1221
  return true;
1183
1222
  }
1184
1223
 
1185
- oControl = sap.ui.getCore().byId(sControlId);
1224
+ oControl = Element.getElementById(sControlId);
1186
1225
  while (oControl) {
1187
1226
  if (oControl.getId() === sAncestorControlId) {
1188
1227
  return true;
@@ -1208,8 +1247,8 @@ sap.ui.define([
1208
1247
  * @param {string|sap.ui.core.Control} vControl The control ID or instance
1209
1248
  * @returns {sap.ui.core.Control} The control instance
1210
1249
  */
1211
- Engine.getControlInstance = function (vControl) {
1212
- return typeof vControl == "string" ? sap.ui.getCore().byId(vControl) : vControl;
1250
+ Engine.getControlInstance = (vControl) => {
1251
+ return typeof vControl == "string" ? Element.getElementById(vControl) : vControl;
1213
1252
  };
1214
1253
 
1215
1254
  /**
@@ -1222,7 +1261,7 @@ sap.ui.define([
1222
1261
  *
1223
1262
  * @returns {boolean} The related flag is the Control has an open P13n container
1224
1263
  */
1225
- Engine.prototype.hasActiveP13n = function (vControl) {
1264
+ Engine.prototype.hasActiveP13n = function(vControl) {
1226
1265
  return !!this._getRegistryEntry(vControl).activeP13n;
1227
1266
  };
1228
1267
 
@@ -1237,7 +1276,7 @@ sap.ui.define([
1237
1276
  * @param {string} sKey The registered key to get the corresponding controller.
1238
1277
  * @param {boolean} bModified Determines whether changes have been triggered while the dialog has been opened
1239
1278
  */
1240
- Engine.prototype.setActiveP13n = function (vControl, sKey, bModified) {
1279
+ Engine.prototype.setActiveP13n = function(vControl, sKey, bModified) {
1241
1280
  this._getRegistryEntry(vControl).activeP13n = sKey ? {
1242
1281
  usedControllers: sKey,
1243
1282
  modified: bModified
@@ -1255,15 +1294,15 @@ sap.ui.define([
1255
1294
  * @param {string} sKey The registered key to get the corresponding controller.
1256
1295
  * @param {sap.ui.core.Control} oP13nUI The adaptation UI displayed in the container (e.g. BasePanel derivation).
1257
1296
  */
1258
- Engine.prototype.validateP13n = function (vControl, sKey, oP13nUI) {
1259
- var oController = this.getController(vControl, sKey);
1260
- var oControl = Engine.getControlInstance(vControl);
1297
+ Engine.prototype.validateP13n = function(vControl, sKey, oP13nUI) {
1298
+ const oController = this.getController(vControl, sKey);
1299
+ const oControl = Engine.getControlInstance(vControl);
1261
1300
 
1262
1301
 
1263
- var mControllers = this._getRegistryEntry(vControl).controller;
1264
- var oTheoreticalState = {};
1302
+ const mControllers = this._getRegistryEntry(vControl).controller;
1303
+ const oTheoreticalState = {};
1265
1304
 
1266
- Object.keys(mControllers).forEach(function (sControllerKey) {
1305
+ Object.keys(mControllers).forEach((sControllerKey) => {
1267
1306
  oTheoreticalState[sControllerKey] = mControllers[sControllerKey].getCurrentState();
1268
1307
  });
1269
1308
 
@@ -1271,14 +1310,14 @@ sap.ui.define([
1271
1310
  if (oController && oController.model2State instanceof Function) {
1272
1311
  oTheoreticalState[sKey] = oController.model2State();
1273
1312
 
1274
- var mInfoState = {
1313
+ let mInfoState = {
1275
1314
  validation: MessageType.None
1276
1315
  };
1277
1316
  if (oControl.validateState instanceof Function) {
1278
1317
  mInfoState = oControl.validateState(this.externalizeKeys(oControl, oTheoreticalState), sKey);
1279
1318
  }
1280
1319
 
1281
- var oMessageStrip;
1320
+ let oMessageStrip;
1282
1321
 
1283
1322
  if (mInfoState.validation !== MessageType.None) {
1284
1323
  oMessageStrip = new MessageStrip({
@@ -1304,28 +1343,28 @@ sap.ui.define([
1304
1343
  * @param {string[]} aKeys An array of keys
1305
1344
  * @returns {Promise} A Promise resolving after all p13n changes have been calculated and processed
1306
1345
  */
1307
- Engine.prototype.handleP13n = function (oControl, aKeys) {
1346
+ Engine.prototype.handleP13n = function(oControl, aKeys) {
1308
1347
 
1309
- var pChanges = [];
1348
+ const pChanges = [];
1310
1349
 
1311
- aKeys.forEach(function (sControllerKey) {
1350
+ aKeys.forEach((sControllerKey) => {
1312
1351
 
1313
- var oController = this.getController(oControl, sControllerKey);
1352
+ const oController = this.getController(oControl, sControllerKey);
1314
1353
 
1315
- var vP13nData = oController.getP13nData();
1354
+ const vP13nData = oController.getP13nData();
1316
1355
  if (vP13nData) {
1317
- var p = this.createChanges({
1356
+ const p = this.createChanges({
1318
1357
  control: oControl,
1319
1358
  key: sControllerKey,
1320
1359
  state: vP13nData,
1321
1360
  suppressAppliance: true,
1322
1361
  applyAbsolute: true
1323
1362
  })
1324
- .then(function (aItemChanges) {
1363
+ .then((aItemChanges) => {
1325
1364
 
1326
- return oController.getBeforeApply().then(function (aChanges) {
1365
+ return oController.getBeforeApply().then((aChanges) => {
1327
1366
 
1328
- var aComulatedChanges = aChanges ? aChanges.concat(aItemChanges) : aItemChanges;
1367
+ const aComulatedChanges = aChanges ? aChanges.concat(aItemChanges) : aItemChanges;
1329
1368
  return aComulatedChanges;
1330
1369
 
1331
1370
  });
@@ -1334,15 +1373,15 @@ sap.ui.define([
1334
1373
  pChanges.push(p);
1335
1374
  }
1336
1375
 
1337
- }.bind(this));
1376
+ });
1338
1377
 
1339
- return Promise.all(pChanges).then(function (aChangeMatrix) {
1378
+ return Promise.all(pChanges).then((aChangeMatrix) => {
1340
1379
 
1341
- var aApplyChanges = [];
1342
- var mChangeMap = {};
1343
- aChangeMatrix.forEach(function (aTypeChanges, iIndex) {
1380
+ let aApplyChanges = [];
1381
+ const mChangeMap = {};
1382
+ aChangeMatrix.forEach((aTypeChanges, iIndex) => {
1344
1383
  aApplyChanges = aApplyChanges.concat(aTypeChanges);
1345
- var sKey = aKeys[iIndex];
1384
+ const sKey = aKeys[iIndex];
1346
1385
  mChangeMap[sKey] = aTypeChanges;
1347
1386
  });
1348
1387
 
@@ -1356,12 +1395,11 @@ sap.ui.define([
1356
1395
  /**
1357
1396
  * This method is the central point of access to the Engine Singleton.
1358
1397
  *
1359
- * @private
1360
- * @ui5-restricted sap.m, sap.ui.mdc
1398
+ * @public
1361
1399
  *
1362
1400
  * @returns {sap.m.p13n.Engine} The Engine instance
1363
1401
  */
1364
- Engine.getInstance = function () {
1402
+ Engine.getInstance = () => {
1365
1403
  if (!oEngine) {
1366
1404
  oEngine = new Engine();
1367
1405
  }
@@ -1374,15 +1412,15 @@ sap.ui.define([
1374
1412
  * @private
1375
1413
  * @returns {object} The Engine registry object
1376
1414
  */
1377
- Engine.prototype._getRegistry = function () {
1378
- var oRegistry = {
1415
+ Engine.prototype._getRegistry = function() {
1416
+ const oRegistry = {
1379
1417
  stateHandlerRegistry: this.stateHandlerRegistry,
1380
1418
  defaultProviderRegistry: this.defaultProviderRegistry,
1381
1419
  controlRegistry: {}
1382
1420
  };
1383
1421
 
1384
- this._aRegistry.forEach(function (sKey) {
1385
- var oControl = sap.ui.getCore().byId(sKey);
1422
+ this._aRegistry.forEach((sKey) => {
1423
+ const oControl = Element.getElementById(sKey);
1386
1424
  oRegistry.controlRegistry[sKey] = _mRegistry.get(oControl);
1387
1425
  });
1388
1426
 
@@ -1393,7 +1431,7 @@ sap.ui.define([
1393
1431
  * @override
1394
1432
  * @inheritDoc
1395
1433
  */
1396
- Engine.prototype.destroy = function () {
1434
+ Engine.prototype.destroy = function() {
1397
1435
  AdaptationProvider.prototype.destroy.apply(this, arguments);
1398
1436
  oEngine = null;
1399
1437
  this._aRegistry = null;
@@ -1405,6 +1443,5 @@ sap.ui.define([
1405
1443
  this.uimanager.destroy();
1406
1444
  this.uimanager = null;
1407
1445
  };
1408
-
1409
1446
  return Engine;
1410
1447
  });