@openui5/sap.m 1.103.0 → 1.105.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 (475) hide show
  1. package/.eslintrc.json +2 -3
  2. package/.reuse/dep5 +18 -1
  3. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  4. package/THIRDPARTY.txt +36 -3
  5. package/package.json +4 -4
  6. package/src/sap/m/.library +1 -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/CheckBox.js +46 -6
  24. package/src/sap/m/CheckBoxRenderer.js +1 -0
  25. package/src/sap/m/ColorPalette.js +1 -1
  26. package/src/sap/m/ColorPalettePopover.js +1 -1
  27. package/src/sap/m/Column.js +1 -1
  28. package/src/sap/m/ColumnHeaderPopover.js +5 -7
  29. package/src/sap/m/ColumnListItem.js +1 -4
  30. package/src/sap/m/ColumnListItemRenderer.js +1 -2
  31. package/src/sap/m/ColumnPopoverActionItem.js +3 -3
  32. package/src/sap/m/ColumnPopoverCustomItem.js +3 -3
  33. package/src/sap/m/ColumnPopoverItem.js +3 -3
  34. package/src/sap/m/ColumnPopoverSelectListItem.js +3 -5
  35. package/src/sap/m/ColumnPopoverSortItem.js +3 -3
  36. package/src/sap/m/ComboBox.js +6 -5
  37. package/src/sap/m/ComboBoxBase.js +1 -5
  38. package/src/sap/m/ComboBoxBaseRenderer.js +2 -2
  39. package/src/sap/m/ComboBoxTextField.js +1 -7
  40. package/src/sap/m/ComboBoxTextFieldRenderer.js +19 -4
  41. package/src/sap/m/CustomDynamicDateOption.js +1 -1
  42. package/src/sap/m/CustomListItem.js +1 -1
  43. package/src/sap/m/CustomTile.js +1 -1
  44. package/src/sap/m/CustomTreeItem.js +3 -3
  45. package/src/sap/m/CustomTreeItemRenderer.js +2 -2
  46. package/src/sap/m/DatePicker.js +14 -24
  47. package/src/sap/m/DateRangeSelection.js +45 -38
  48. package/src/sap/m/DateTimeField.js +87 -20
  49. package/src/sap/m/DateTimeInput.js +1 -1
  50. package/src/sap/m/DateTimePicker.js +52 -28
  51. package/src/sap/m/Dialog.js +38 -1
  52. package/src/sap/m/DisplayListItem.js +1 -1
  53. package/src/sap/m/DraftIndicator.js +1 -1
  54. package/src/sap/m/DynamicDate.js +1 -1
  55. package/src/sap/m/DynamicDateFormat.js +2 -5
  56. package/src/sap/m/DynamicDateOption.js +43 -16
  57. package/src/sap/m/DynamicDateRange.js +49 -7
  58. package/src/sap/m/DynamicDateRangeRenderer.js +5 -2
  59. package/src/sap/m/DynamicDateUtil.js +23 -2
  60. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  61. package/src/sap/m/ExpandableText.js +1 -1
  62. package/src/sap/m/FacetFilter.js +2 -2
  63. package/src/sap/m/FacetFilterItem.js +1 -1
  64. package/src/sap/m/FacetFilterList.js +4 -4
  65. package/src/sap/m/FeedContent.js +1 -1
  66. package/src/sap/m/FeedInput.js +1 -1
  67. package/src/sap/m/FeedListItem.js +1 -1
  68. package/src/sap/m/FeedListItemAction.js +1 -1
  69. package/src/sap/m/Fiori20Adapter.js +2 -2
  70. package/src/sap/m/FlexBox.js +1 -1
  71. package/src/sap/m/FlexItemData.js +1 -1
  72. package/src/sap/m/FormattedText.js +1 -1
  73. package/src/sap/m/GenericTag.js +1 -1
  74. package/src/sap/m/GenericTile.js +67 -16
  75. package/src/sap/m/GenericTileLineModeRenderer.js +4 -4
  76. package/src/sap/m/GenericTileRenderer.js +16 -4
  77. package/src/sap/m/GroupHeaderListItem.js +1 -1
  78. package/src/sap/m/GrowingEnablement.js +37 -11
  79. package/src/sap/m/GrowingList.js +1 -1
  80. package/src/sap/m/HBox.js +1 -1
  81. package/src/sap/m/HeaderContainer.js +3 -3
  82. package/src/sap/m/HeaderContainerItemNavigator.js +3 -6
  83. package/src/sap/m/IconTabBar.js +54 -22
  84. package/src/sap/m/IconTabBarSelectList.js +1 -1
  85. package/src/sap/m/IconTabFilter.js +1 -1
  86. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  87. package/src/sap/m/IconTabHeader.js +5 -1
  88. package/src/sap/m/IconTabSeparator.js +1 -1
  89. package/src/sap/m/IllustratedMessage.js +64 -25
  90. package/src/sap/m/IllustratedMessageRenderer.js +10 -6
  91. package/src/sap/m/Illustration.js +1 -1
  92. package/src/sap/m/IllustrationPool.js +1 -0
  93. package/src/sap/m/IllustrationRenderer.js +1 -1
  94. package/src/sap/m/Image.js +2 -2
  95. package/src/sap/m/ImageContent.js +1 -1
  96. package/src/sap/m/Input.js +51 -7
  97. package/src/sap/m/InputBase.js +1 -1
  98. package/src/sap/m/InputBaseRenderer.js +2 -2
  99. package/src/sap/m/InputListItem.js +1 -1
  100. package/src/sap/m/InputRenderer.js +4 -0
  101. package/src/sap/m/Label.js +34 -4
  102. package/src/sap/m/LabelRenderer.js +7 -2
  103. package/src/sap/m/LightBox.js +1 -1
  104. package/src/sap/m/LightBoxItem.js +1 -1
  105. package/src/sap/m/Link.js +95 -10
  106. package/src/sap/m/LinkRenderer.js +26 -12
  107. package/src/sap/m/List.js +38 -1
  108. package/src/sap/m/ListBase.js +104 -40
  109. package/src/sap/m/ListBaseRenderer.js +7 -15
  110. package/src/sap/m/ListItemBase.js +40 -11
  111. package/src/sap/m/ListItemBaseRenderer.js +17 -6
  112. package/src/sap/m/ListRenderer.js +2 -2
  113. package/src/sap/m/MaskEnabler.js +52 -2
  114. package/src/sap/m/MaskInput.js +23 -1
  115. package/src/sap/m/MaskInputRule.js +1 -1
  116. package/src/sap/m/Menu.js +1 -1
  117. package/src/sap/m/MenuButton.js +1 -1
  118. package/src/sap/m/MenuItem.js +1 -1
  119. package/src/sap/m/MenuListItem.js +1 -1
  120. package/src/sap/m/MessageBox.js +1 -1
  121. package/src/sap/m/MessageItem.js +3 -4
  122. package/src/sap/m/MessageListItem.js +8 -4
  123. package/src/sap/m/MessagePage.js +1 -1
  124. package/src/sap/m/MessagePopover.js +4 -1
  125. package/src/sap/m/MessagePopoverItem.js +1 -1
  126. package/src/sap/m/MessageStrip.js +1 -1
  127. package/src/sap/m/MessageToast.js +1 -1
  128. package/src/sap/m/MessageView.js +1 -1
  129. package/src/sap/m/MultiComboBox.js +5 -16
  130. package/src/sap/m/MultiEditField.js +1 -1
  131. package/src/sap/m/MultiInput.js +1 -15
  132. package/src/sap/m/NavContainer.js +21 -19
  133. package/src/sap/m/NewsContent.js +2 -3
  134. package/src/sap/m/NotificationList.js +1 -1
  135. package/src/sap/m/NotificationListBase.js +1 -1
  136. package/src/sap/m/NotificationListGroup.js +3 -7
  137. package/src/sap/m/NotificationListGroupRenderer.js +1 -1
  138. package/src/sap/m/NotificationListItem.js +1 -1
  139. package/src/sap/m/NumericContent.js +1 -1
  140. package/src/sap/m/NumericInput.js +1 -1
  141. package/src/sap/m/ObjectAttribute.js +1 -1
  142. package/src/sap/m/ObjectHeader.js +3 -3
  143. package/src/sap/m/ObjectIdentifier.js +3 -3
  144. package/src/sap/m/ObjectListItem.js +7 -1
  145. package/src/sap/m/ObjectMarker.js +1 -1
  146. package/src/sap/m/ObjectNumber.js +2 -3
  147. package/src/sap/m/ObjectNumberRenderer.js +10 -3
  148. package/src/sap/m/ObjectStatus.js +2 -3
  149. package/src/sap/m/ObjectStatusRenderer.js +2 -2
  150. package/src/sap/m/OverflowToolbar.js +3 -8
  151. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  152. package/src/sap/m/OverflowToolbarAssociativePopoverControls.js +3 -3
  153. package/src/sap/m/OverflowToolbarAssociativePopoverRenderer.js +2 -2
  154. package/src/sap/m/OverflowToolbarButton.js +1 -1
  155. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  156. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  157. package/src/sap/m/P13nAnyFilterItem.js +3 -3
  158. package/src/sap/m/P13nColumnsItem.js +3 -3
  159. package/src/sap/m/P13nColumnsPanel.js +3 -3
  160. package/src/sap/m/P13nConditionPanel.js +10 -3
  161. package/src/sap/m/P13nDialog.js +3 -3
  162. package/src/sap/m/P13nDimMeasureItem.js +3 -3
  163. package/src/sap/m/P13nDimMeasurePanel.js +3 -3
  164. package/src/sap/m/P13nFilterItem.js +3 -3
  165. package/src/sap/m/P13nFilterPanel.js +3 -3
  166. package/src/sap/m/P13nGroupItem.js +3 -3
  167. package/src/sap/m/P13nGroupPanel.js +3 -3
  168. package/src/sap/m/P13nItem.js +3 -3
  169. package/src/sap/m/P13nOperationsHelper.js +2 -2
  170. package/src/sap/m/P13nPanel.js +3 -3
  171. package/src/sap/m/P13nSelectionItem.js +3 -3
  172. package/src/sap/m/P13nSelectionPanel.js +3 -3
  173. package/src/sap/m/P13nSortItem.js +3 -3
  174. package/src/sap/m/P13nSortPanel.js +3 -3
  175. package/src/sap/m/PDFViewer.js +2 -2
  176. package/src/sap/m/PDFViewerRenderer.js +1 -0
  177. package/src/sap/m/Page.js +1 -3
  178. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  179. package/src/sap/m/PagingButton.js +1 -1
  180. package/src/sap/m/Panel.js +1 -1
  181. package/src/sap/m/PlanningCalendar.js +4 -16
  182. package/src/sap/m/PlanningCalendarHeader.js +1 -5
  183. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  184. package/src/sap/m/PlanningCalendarRow.js +1 -1
  185. package/src/sap/m/PlanningCalendarView.js +1 -1
  186. package/src/sap/m/Popover.js +11 -4
  187. package/src/sap/m/ProgressIndicator.js +1 -1
  188. package/src/sap/m/ProgressIndicatorRenderer.js +6 -3
  189. package/src/sap/m/PullToRefresh.js +1 -1
  190. package/src/sap/m/QuickView.js +3 -3
  191. package/src/sap/m/QuickViewBase.js +3 -3
  192. package/src/sap/m/QuickViewCard.js +3 -3
  193. package/src/sap/m/QuickViewGroup.js +1 -1
  194. package/src/sap/m/QuickViewGroupElement.js +3 -3
  195. package/src/sap/m/QuickViewPage.js +3 -3
  196. package/src/sap/m/RadioButton.js +47 -20
  197. package/src/sap/m/RadioButtonGroup.js +29 -19
  198. package/src/sap/m/RangeSlider.js +1 -3
  199. package/src/sap/m/RatingIndicator.js +8 -1
  200. package/src/sap/m/RatingIndicatorRenderer.js +13 -4
  201. package/src/sap/m/ResponsivePopover.js +3 -3
  202. package/src/sap/m/ResponsiveScale.js +1 -1
  203. package/src/sap/m/ScrollBar.js +1 -1
  204. package/src/sap/m/ScrollContainer.js +1 -1
  205. package/src/sap/m/SearchField.js +1 -1
  206. package/src/sap/m/SegmentedButton.js +1 -1
  207. package/src/sap/m/SegmentedButtonItem.js +1 -1
  208. package/src/sap/m/Select.js +7 -13
  209. package/src/sap/m/SelectDialog.js +2 -1
  210. package/src/sap/m/SelectDialogBase.js +1 -1
  211. package/src/sap/m/SelectList.js +1 -1
  212. package/src/sap/m/SelectListRenderer.js +2 -2
  213. package/src/sap/m/SelectionDetails.js +2 -2
  214. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  215. package/src/sap/m/SelectionDetailsItem.js +1 -1
  216. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  217. package/src/sap/m/Shell.js +1 -1
  218. package/src/sap/m/SimpleFixFlex.js +1 -1
  219. package/src/sap/m/SinglePlanningCalendar.js +5 -7
  220. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  221. package/src/sap/m/SinglePlanningCalendarGrid.js +1 -7
  222. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
  223. package/src/sap/m/SinglePlanningCalendarMonthGridRenderer.js +0 -2
  224. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  225. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  226. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  227. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  228. package/src/sap/m/SlideTile.js +30 -5
  229. package/src/sap/m/Slider.js +1 -1
  230. package/src/sap/m/SliderTooltip.js +1 -3
  231. package/src/sap/m/SliderTooltipBase.js +1 -1
  232. package/src/sap/m/SliderTooltipBaseRenderer.js +2 -2
  233. package/src/sap/m/SliderTooltipContainer.js +1 -1
  234. package/src/sap/m/SliderTooltipContainerRenderer.js +2 -2
  235. package/src/sap/m/SliderTooltipRenderer.js +2 -2
  236. package/src/sap/m/SplitApp.js +1 -1
  237. package/src/sap/m/SplitButton.js +1 -3
  238. package/src/sap/m/SplitContainer.js +1 -5
  239. package/src/sap/m/StandardDynamicDateOption.js +9 -15
  240. package/src/sap/m/StandardListItem.js +1 -1
  241. package/src/sap/m/StandardListItemRenderer.js +2 -2
  242. package/src/sap/m/StandardTile.js +1 -1
  243. package/src/sap/m/StandardTreeItem.js +1 -1
  244. package/src/sap/m/StepInput.js +1 -1
  245. package/src/sap/m/SuggestionItem.js +1 -1
  246. package/src/sap/m/SuggestionsPopover.js +4 -2
  247. package/src/sap/m/Switch.js +1 -1
  248. package/src/sap/m/TabContainer.js +1 -1
  249. package/src/sap/m/TabContainerItem.js +1 -1
  250. package/src/sap/m/TabStrip.js +1 -1
  251. package/src/sap/m/TabStripItem.js +1 -1
  252. package/src/sap/m/Table.js +11 -9
  253. package/src/sap/m/TablePersoController.js +1 -1
  254. package/src/sap/m/TablePersoDialog.js +6 -15
  255. package/src/sap/m/TablePersoProvider.js +1 -1
  256. package/src/sap/m/TableRenderer.js +2 -9
  257. package/src/sap/m/TableSelectDialog.js +1 -1
  258. package/src/sap/m/Text.js +1 -1
  259. package/src/sap/m/TextArea.js +1 -1
  260. package/src/sap/m/TextAreaRenderer.js +1 -2
  261. package/src/sap/m/Tile.js +1 -1
  262. package/src/sap/m/TileContainer.js +1 -1
  263. package/src/sap/m/TileContent.js +8 -9
  264. package/src/sap/m/TileContentRenderer.js +3 -3
  265. package/src/sap/m/TimePicker.js +43 -6
  266. package/src/sap/m/TimePickerClock.js +2 -3
  267. package/src/sap/m/TimePickerClocks.js +5 -3
  268. package/src/sap/m/TimePickerClocksRenderer.js +1 -1
  269. package/src/sap/m/TimePickerInputs.js +1 -1
  270. package/src/sap/m/TimePickerInputsRenderer.js +1 -1
  271. package/src/sap/m/TimePickerInternals.js +1 -1
  272. package/src/sap/m/TimePickerSlider.js +1 -1
  273. package/src/sap/m/TimePickerSliders.js +3 -5
  274. package/src/sap/m/Title.js +1 -1
  275. package/src/sap/m/TitlePropagationSupport.js +1 -1
  276. package/src/sap/m/ToggleButton.js +2 -2
  277. package/src/sap/m/Token.js +1 -3
  278. package/src/sap/m/Tokenizer.js +1 -1
  279. package/src/sap/m/Toolbar.js +1 -1
  280. package/src/sap/m/ToolbarLayoutData.js +1 -1
  281. package/src/sap/m/ToolbarSeparator.js +1 -1
  282. package/src/sap/m/ToolbarSpacer.js +1 -1
  283. package/src/sap/m/Tree.js +8 -1
  284. package/src/sap/m/TreeItemBase.js +1 -1
  285. package/src/sap/m/TreeRenderer.js +0 -10
  286. package/src/sap/m/UploadCollection.js +2 -2
  287. package/src/sap/m/UploadCollectionItem.js +1 -1
  288. package/src/sap/m/UploadCollectionParameter.js +1 -1
  289. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  290. package/src/sap/m/VBox.js +1 -1
  291. package/src/sap/m/ValueStateHeader.js +1 -1
  292. package/src/sap/m/VariantItem.js +160 -0
  293. package/src/sap/m/VariantManagement.js +665 -570
  294. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  295. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  296. package/src/sap/m/ViewSettingsDialog.js +1 -1
  297. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  298. package/src/sap/m/ViewSettingsItem.js +1 -1
  299. package/src/sap/m/VisibleItem.js +1 -1
  300. package/src/sap/m/WheelSlider.js +1 -1
  301. package/src/sap/m/WheelSliderContainer.js +1 -1
  302. package/src/sap/m/Wizard.js +1 -3
  303. package/src/sap/m/WizardProgressNavigator.js +1 -1
  304. package/src/sap/m/WizardStep.js +1 -1
  305. package/src/sap/m/changeHandler/AddTableColumn.js +12 -13
  306. package/src/sap/m/changeHandler/ChangeLinkTarget.js +2 -3
  307. package/src/sap/m/changeHandler/CombineButtons.js +19 -22
  308. package/src/sap/m/changeHandler/MoveTableColumns.js +6 -6
  309. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +5 -5
  310. package/src/sap/m/changeHandler/SplitMenuButton.js +7 -6
  311. package/src/sap/m/delegate/DateNavigation.js +0 -4
  312. package/src/sap/m/designtime/Link.designtime.js +19 -11
  313. package/src/sap/m/designtime/VariantManagement.designtime.js +36 -26
  314. package/src/sap/m/flexibility/EngineFlex.js +48 -0
  315. package/src/sap/m/inputUtils/selectionRange.js +1 -2
  316. package/src/sap/m/library.js +30 -6
  317. package/src/sap/m/messagebundle.properties +30 -3
  318. package/src/sap/m/messagebundle_ar.properties +26 -8
  319. package/src/sap/m/messagebundle_bg.properties +20 -2
  320. package/src/sap/m/messagebundle_ca.properties +19 -1
  321. package/src/sap/m/messagebundle_cs.properties +20 -2
  322. package/src/sap/m/messagebundle_cy.properties +21 -3
  323. package/src/sap/m/messagebundle_da.properties +19 -1
  324. package/src/sap/m/messagebundle_de.properties +19 -1
  325. package/src/sap/m/messagebundle_el.properties +22 -4
  326. package/src/sap/m/messagebundle_en.properties +21 -3
  327. package/src/sap/m/messagebundle_en_GB.properties +21 -3
  328. package/src/sap/m/messagebundle_en_US_sappsd.properties +20 -2
  329. package/src/sap/m/messagebundle_en_US_saprigi.properties +18 -2
  330. package/src/sap/m/messagebundle_en_US_saptrc.properties +20 -2
  331. package/src/sap/m/messagebundle_es.properties +20 -2
  332. package/src/sap/m/messagebundle_es_MX.properties +19 -1
  333. package/src/sap/m/messagebundle_et.properties +19 -1
  334. package/src/sap/m/messagebundle_fi.properties +23 -5
  335. package/src/sap/m/messagebundle_fr.properties +20 -2
  336. package/src/sap/m/messagebundle_fr_CA.properties +21 -3
  337. package/src/sap/m/messagebundle_hi.properties +21 -3
  338. package/src/sap/m/messagebundle_hr.properties +23 -5
  339. package/src/sap/m/messagebundle_hu.properties +21 -3
  340. package/src/sap/m/messagebundle_id.properties +21 -3
  341. package/src/sap/m/messagebundle_it.properties +20 -2
  342. package/src/sap/m/messagebundle_iw.properties +21 -3
  343. package/src/sap/m/messagebundle_ja.properties +20 -2
  344. package/src/sap/m/messagebundle_kk.properties +19 -1
  345. package/src/sap/m/messagebundle_ko.properties +27 -9
  346. package/src/sap/m/messagebundle_lt.properties +19 -1
  347. package/src/sap/m/messagebundle_lv.properties +19 -1
  348. package/src/sap/m/messagebundle_ms.properties +20 -2
  349. package/src/sap/m/messagebundle_nl.properties +33 -15
  350. package/src/sap/m/messagebundle_no.properties +21 -3
  351. package/src/sap/m/messagebundle_pl.properties +20 -2
  352. package/src/sap/m/messagebundle_pt.properties +24 -6
  353. package/src/sap/m/messagebundle_pt_PT.properties +19 -1
  354. package/src/sap/m/messagebundle_ro.properties +20 -2
  355. package/src/sap/m/messagebundle_ru.properties +20 -2
  356. package/src/sap/m/messagebundle_sh.properties +20 -2
  357. package/src/sap/m/messagebundle_sk.properties +19 -1
  358. package/src/sap/m/messagebundle_sl.properties +20 -2
  359. package/src/sap/m/messagebundle_sv.properties +19 -1
  360. package/src/sap/m/messagebundle_th.properties +52 -34
  361. package/src/sap/m/messagebundle_tr.properties +23 -5
  362. package/src/sap/m/messagebundle_uk.properties +20 -2
  363. package/src/sap/m/messagebundle_vi.properties +20 -2
  364. package/src/sap/m/messagebundle_zh_CN.properties +20 -2
  365. package/src/sap/m/messagebundle_zh_TW.properties +19 -1
  366. package/src/sap/m/p13n/AbstractContainer.js +7 -7
  367. package/src/sap/m/p13n/AbstractContainerItem.js +4 -4
  368. package/src/sap/m/p13n/BasePanel.js +8 -7
  369. package/src/sap/m/p13n/Container.js +3 -3
  370. package/src/sap/m/p13n/Engine.js +1254 -0
  371. package/src/sap/m/p13n/FlexUtil.js +161 -0
  372. package/src/sap/m/p13n/GroupController.js +145 -0
  373. package/src/sap/m/p13n/GroupPanel.js +12 -5
  374. package/src/sap/m/p13n/MetadataHelper.js +35 -0
  375. package/src/sap/m/p13n/PersistenceProvider.js +160 -0
  376. package/src/sap/m/p13n/Popup.js +49 -12
  377. package/src/sap/m/p13n/QueryPanel.js +3 -3
  378. package/src/sap/m/p13n/SelectionController.js +548 -0
  379. package/src/sap/m/p13n/SelectionPanel.js +15 -3
  380. package/src/sap/m/p13n/SortController.js +153 -0
  381. package/src/sap/m/p13n/SortPanel.js +13 -3
  382. package/src/sap/m/p13n/enum/PersistenceMode.js +43 -0
  383. package/src/sap/m/p13n/handler/xConfigHandler.js +166 -0
  384. package/src/sap/m/p13n/modification/FlexModificationHandler.js +90 -0
  385. package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +75 -0
  386. package/src/sap/m/p13n/modification/ModificationHandler.js +143 -0
  387. package/src/sap/m/p13n/modules/AdaptationProvider.js +67 -0
  388. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +147 -0
  389. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +101 -0
  390. package/src/sap/m/p13n/modules/UIManager.js +230 -0
  391. package/src/sap/m/p13n/modules/xConfigAPI.js +288 -0
  392. package/src/sap/m/plugins/CellSelector.js +741 -0
  393. package/src/sap/m/plugins/ColumnResizer.js +15 -1
  394. package/src/sap/m/plugins/DataStateIndicator.js +2 -2
  395. package/src/sap/m/plugins/PasteProvider.js +1 -1
  396. package/src/sap/m/plugins/PluginBase.js +4 -3
  397. package/src/sap/m/semantic/AddAction.js +1 -1
  398. package/src/sap/m/semantic/CancelAction.js +1 -1
  399. package/src/sap/m/semantic/DeleteAction.js +1 -1
  400. package/src/sap/m/semantic/DetailPage.js +1 -1
  401. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  402. package/src/sap/m/semantic/EditAction.js +1 -1
  403. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  404. package/src/sap/m/semantic/FilterAction.js +1 -1
  405. package/src/sap/m/semantic/FilterSelect.js +1 -1
  406. package/src/sap/m/semantic/FlagAction.js +1 -1
  407. package/src/sap/m/semantic/ForwardAction.js +1 -1
  408. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  409. package/src/sap/m/semantic/GroupAction.js +1 -1
  410. package/src/sap/m/semantic/GroupSelect.js +1 -1
  411. package/src/sap/m/semantic/MainAction.js +1 -1
  412. package/src/sap/m/semantic/MasterPage.js +1 -1
  413. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  414. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  415. package/src/sap/m/semantic/NegativeAction.js +1 -1
  416. package/src/sap/m/semantic/OpenInAction.js +1 -1
  417. package/src/sap/m/semantic/PositiveAction.js +1 -1
  418. package/src/sap/m/semantic/PrintAction.js +1 -1
  419. package/src/sap/m/semantic/SaveAction.js +1 -1
  420. package/src/sap/m/semantic/Segment.js +1 -1
  421. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  422. package/src/sap/m/semantic/SemanticButton.js +1 -1
  423. package/src/sap/m/semantic/SemanticConfiguration.js +3 -4
  424. package/src/sap/m/semantic/SemanticControl.js +1 -1
  425. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  426. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  427. package/src/sap/m/semantic/SemanticPage.js +1 -1
  428. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  429. package/src/sap/m/semantic/SemanticToggleButton.js +1 -3
  430. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  431. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  432. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  433. package/src/sap/m/semantic/ShareMenu.js +1 -1
  434. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  435. package/src/sap/m/semantic/SortAction.js +1 -1
  436. package/src/sap/m/semantic/SortSelect.js +1 -1
  437. package/src/sap/m/table/Util.js +14 -7
  438. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  439. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  440. package/src/sap/m/table/columnmenu/Item.js +1 -1
  441. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  442. package/src/sap/m/table/columnmenu/Menu.js +8 -2
  443. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  444. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  445. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  446. package/src/sap/m/table/columnmenu/QuickGroup.js +21 -3
  447. package/src/sap/m/table/columnmenu/QuickGroupItem.js +13 -1
  448. package/src/sap/m/table/columnmenu/QuickSort.js +1 -3
  449. package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -3
  450. package/src/sap/m/table/columnmenu/QuickTotal.js +21 -3
  451. package/src/sap/m/table/columnmenu/QuickTotalItem.js +13 -1
  452. package/src/sap/m/themes/base/Breadcrumbs.less +6 -0
  453. package/src/sap/m/themes/base/Button.less +0 -1
  454. package/src/sap/m/themes/base/CellSelector.less +9 -0
  455. package/src/sap/m/themes/base/CheckBox.less +1 -0
  456. package/src/sap/m/themes/base/Dialog.less +1 -0
  457. package/src/sap/m/themes/base/DynamicDateRange.less +4 -0
  458. package/src/sap/m/themes/base/FeedContent.less +13 -5
  459. package/src/sap/m/themes/base/GenericTile.less +49 -9
  460. package/src/sap/m/themes/base/IllustratedMessage.less +7 -0
  461. package/src/sap/m/themes/base/NewsContent.less +6 -0
  462. package/src/sap/m/themes/base/NumericContent.less +1 -1
  463. package/src/sap/m/themes/base/ObjectStatus.less +2 -1
  464. package/src/sap/m/themes/base/OverflowToolbarAssociativePopover.less +5 -1
  465. package/src/sap/m/themes/base/SelectList.less +0 -5
  466. package/src/sap/m/themes/base/SinglePlanningCalendarGrid.less +7 -0
  467. package/src/sap/m/themes/base/SlideTile.less +35 -4
  468. package/src/sap/m/themes/base/Table.less +11 -2
  469. package/src/sap/m/themes/base/TileContent.less +17 -0
  470. package/src/sap/m/themes/base/library.source.less +1 -0
  471. package/src/sap/m/upload/UploadSet.js +110 -21
  472. package/src/sap/m/upload/UploadSetItem.js +18 -7
  473. package/src/sap/m/upload/UploadSetRenderer.js +8 -16
  474. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  475. package/src/sap/m/upload/Uploader.js +1 -2
@@ -1,23 +1,22 @@
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
  */
6
6
 
7
7
  // Provides control sap.m.VariantManagement.
8
8
  sap.ui.define([
9
- "sap/ui/model/Context",
10
- "sap/ui/model/PropertyBinding",
11
9
  "sap/ui/model/json/JSONModel",
10
+ "sap/ui/model/base/ManagedObjectModel",
12
11
  "sap/ui/model/Filter",
13
12
  "sap/ui/model/FilterOperator",
14
13
  "sap/ui/Device",
15
14
  "sap/ui/core/InvisibleText",
16
15
  "sap/ui/core/Control",
17
16
  "sap/ui/core/Icon",
17
+ "sap/ui/core/Item",
18
18
  "sap/ui/layout/HorizontalLayout",
19
19
  "sap/ui/layout/Grid",
20
- 'sap/base/Log',
21
20
  "sap/m/SearchField",
22
21
  "sap/m/RadioButton",
23
22
  "sap/m/ColumnListItem",
@@ -43,21 +42,21 @@ sap.ui.define([
43
42
  "sap/m/VBox",
44
43
  'sap/m/HBox',
45
44
  "sap/ui/events/KeyCodes",
45
+ 'sap/base/Log',
46
46
  "sap/ui/core/library",
47
47
  "sap/m/library"
48
48
  ], function(
49
- Context,
50
- PropertyBinding,
51
49
  JSONModel,
50
+ ManagedObjectModel,
52
51
  Filter,
53
52
  FilterOperator,
54
53
  Device,
55
54
  InvisibleText,
56
55
  Control,
57
56
  Icon,
57
+ Item,
58
58
  HorizontalLayout,
59
59
  Grid,
60
- Log,
61
60
  SearchField,
62
61
  RadioButton,
63
62
  ColumnListItem,
@@ -83,6 +82,7 @@ sap.ui.define([
83
82
  VBox,
84
83
  HBox,
85
84
  KeyCodes,
85
+ Log,
86
86
  coreLibrary,
87
87
  mobileLibrary
88
88
  ) {
@@ -94,6 +94,9 @@ sap.ui.define([
94
94
  // shortcut for sap.m.ButtonType
95
95
  var ButtonType = mobileLibrary.ButtonType;
96
96
 
97
+ // shortcut for sap.m.FlexAlignItems
98
+ var FlexAlignItems = mobileLibrary.FlexAlignItems;
99
+
97
100
  // shortcut for sap.m.PlacementType
98
101
  var PlacementType = mobileLibrary.PlacementType;
99
102
 
@@ -103,12 +106,17 @@ sap.ui.define([
103
106
  // shortcut for sap.m.ScreenSize
104
107
  var ScreenSize = mobileLibrary.ScreenSize;
105
108
 
109
+ var ListKeyboardMode = mobileLibrary.ListKeyboardMode;
110
+
106
111
  // shortcut for sap.ui.core.ValueState
107
112
  var ValueState = coreLibrary.ValueState;
108
113
 
109
114
  // shortcut for sap.ui.core.TextAlign
110
115
  var TextAlign = coreLibrary.TextAlign;
111
116
 
117
+ // shortcut for sap.ui.core.TitleLevel
118
+ var TitleLevel = coreLibrary.TitleLevel;
119
+
112
120
  /**
113
121
  * Constructor for a new <code>VariantManagement</code>.
114
122
  * @param {string} [sId] - ID for the new control, generated automatically if no ID is given
@@ -132,42 +140,121 @@ sap.ui.define([
132
140
  designtime: "sap/m/designtime/VariantManagement.designtime",
133
141
  properties: {
134
142
  /**
135
- * Indicates that <i>Set as Default</i> is visible in the <i>Save View</i> and the <i>Manage Views</i> dialogs.
143
+ * Indicates that default of variants is supported
136
144
  */
137
- showSetAsDefault: {
145
+ supportDefault: {
138
146
  type: "boolean",
139
147
  group: "Misc",
140
148
  defaultValue: true
141
149
  },
142
150
 
143
151
  /**
144
- * Indicates that the control is in error state. If set to <code>true</code>, an error message will be displayed whenever the variant is
145
- * opened.
152
+ * Indicates that favorite handling is supported
146
153
  */
147
- inErrorState: {
154
+ supportFavorites: {
155
+ type: "boolean",
156
+ group: "Misc",
157
+ defaultValue: true
158
+ },
159
+
160
+ /**
161
+ * Indicates that apply automatically functionality is supported
162
+ */
163
+ supportApplyAutomatically: {
164
+ type: "boolean",
165
+ group: "Misc",
166
+ defaultValue: true
167
+ },
168
+
169
+ /**
170
+ * Indicates that public functionality is supported
171
+ */
172
+ supportPublic: {
173
+ type: "boolean",
174
+ group: "Misc",
175
+ defaultValue: true
176
+ },
177
+
178
+ /**
179
+ * Indicates that contexts functionality is supported
180
+ */
181
+ supportContexts: {
148
182
  type: "boolean",
149
183
  group: "Misc",
150
184
  defaultValue: false
151
185
  },
152
186
 
187
+ /**
188
+ * Identifies the currently selected item
189
+ */
190
+ selectedKey: {
191
+ type: "string",
192
+ group: "Misc",
193
+ defaultValue: ""
194
+ },
195
+
196
+ /**
197
+ * Identifies the defaulted item
198
+ */
199
+ defaultKey: {
200
+ type: "string",
201
+ group: "Misc",
202
+ defaultValue: ""
203
+ },
204
+
205
+ /**
206
+ * Controls the visibility of the 'SaveAs' button
207
+ */
208
+ showSaveAs: {
209
+ type: "boolean",
210
+ group: "Misc",
211
+ defaultValue: true
212
+ },
213
+
214
+ /**
215
+ * If set to <code>false</code> neither 'Save As' nor 'Save' buttons on the 'My Views' dialog are visible.
216
+ */
217
+ creationAllowed: {
218
+ type: "boolean",
219
+ group: "Misc",
220
+ defaultValue: true
221
+ },
222
+
153
223
  /**
154
224
  * Indicates that the control is in edit state. If set to <code>false</code>, the footer of the <i>Views</i> list will be hidden.
155
225
  */
156
- editable: {
226
+ showFooter: {
157
227
  type: "boolean",
158
228
  group: "Misc",
159
229
  defaultValue: true
160
230
  },
161
231
 
162
232
  /**
163
- * Determines the name of the model containing the variants.
164
- * <p>
165
- * Note: This property has be set only once, at a very early point in time and may not be changed afterwards.
233
+ * Indicates the visible and selected item.
234
+ */
235
+ modified: {
236
+ type: "boolean",
237
+ group: "Misc",
238
+ defaultValue: false
239
+ },
240
+
241
+ /**
242
+ * Indicates the title in the 'My Views' popover.
166
243
  */
167
- modelName: {
244
+ popoverTitle: {
168
245
  type: "string",
169
246
  group: "Misc",
170
- defaultValue: null
247
+ defaultValue: ""
248
+ },
249
+
250
+ /**
251
+ * Indicates that the control is in error state. If set to <code>true</code>, an error message will be displayed whenever the variant is
252
+ * opened.
253
+ */
254
+ inErrorState: {
255
+ type: "boolean",
256
+ group: "Misc",
257
+ defaultValue: false
171
258
  },
172
259
 
173
260
  /**
@@ -182,13 +269,33 @@ sap.ui.define([
182
269
 
183
270
  /**
184
271
  * Defines the Apply Automatically text for the standard variant in the Manage Views dialog if the application controls this behavior.
185
- *
186
- * <br><b>Note:</b> the usage of this property is restricted to <code>sap.fe</code> components only.
187
272
  */
188
273
  displayTextForExecuteOnSelectionForStandardVariant: {
189
274
  type: "string",
190
275
  group: "Misc",
191
276
  defaultValue: ""
277
+ },
278
+
279
+ /**
280
+ * Semantic level of the header.
281
+ * For more information, see {@link sap.m.Title#setLevel}.
282
+ */
283
+ level: {
284
+ type: "sap.ui.core.TitleLevel",
285
+ group: "Appearance",
286
+ defaultValue: TitleLevel.Auto
287
+ }
288
+ },
289
+ defaultAggregation: "items",
290
+ aggregations: {
291
+
292
+ /**
293
+ * Items displayed by the <code>VariantManagement</code> control.
294
+ */
295
+ items: {
296
+ type: "sap.m.VariantItem",
297
+ multiple: true,
298
+ singularName: "item"
192
299
  }
193
300
  },
194
301
  events: {
@@ -233,6 +340,13 @@ sap.ui.define([
233
340
  type: "boolean"
234
341
  },
235
342
 
343
+ /**
344
+ * Indicates the check box state for 'Public'.
345
+ */
346
+ 'public': {
347
+ type: "boolean"
348
+ },
349
+
236
350
  /**
237
351
  * Indicates the check box state for 'Create Tile'.
238
352
  * <br>Note:</br>This event parameter is used only internally.
@@ -248,6 +362,11 @@ sap.ui.define([
248
362
  */
249
363
  cancel: {},
250
364
 
365
+ /**
366
+ * This event is fired when users presses the cancel button inside <i>Manage Views</i> dialog.
367
+ */
368
+ manageCancel: {},
369
+
251
370
  /**
252
371
  * This event is fired when users apply changes to variants in the <i>Manage Views</i> dialog.
253
372
  */
@@ -275,6 +394,13 @@ sap.ui.define([
275
394
  type: "object[]"
276
395
  },
277
396
 
397
+ /**
398
+ * List of variant keys and the associated favorite indicator
399
+ */
400
+ fav: {
401
+ type: "object[]"
402
+ },
403
+
278
404
  /**
279
405
  * The default variant key
280
406
  */
@@ -330,11 +456,34 @@ sap.ui.define([
330
456
 
331
457
  this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.m");
332
458
 
459
+
460
+ this._oManagedObjectModel = new ManagedObjectModel(this);
461
+ this.setModel(this._oManagedObjectModel, "$mVariants");
462
+ };
463
+
464
+ VariantManagement.prototype.applySettings = function(mSettings, oScope) {
465
+ Control.prototype.applySettings.apply(this, arguments);
466
+
333
467
  this._createInnerModel();
468
+ this._initializeControl();
469
+ };
334
470
 
335
- this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
471
+ VariantManagement.prototype.setShowFooter = function(bValue) {
472
+ this.setProperty("showFooter", bValue);
473
+ return this;
474
+ };
475
+
476
+ VariantManagement.prototype.setDefaultKey = function(sValue) {
477
+ this.setProperty("defaultKey", sValue);
478
+ return this;
479
+ };
480
+
481
+ VariantManagement.prototype.setPopoverTitle = function(sValue) {
482
+ this.setProperty("popoverTitle", sValue);
483
+ return this;
336
484
  };
337
485
 
486
+
338
487
  VariantManagement.prototype._initializeControl = function() {
339
488
  if (this.oVariantInvisibleText) {
340
489
  return;
@@ -344,8 +493,8 @@ sap.ui.define([
344
493
 
345
494
  this.oVariantText = new Title(this.getId() + "-text", {
346
495
  text: {
347
- path: '/currentVariant',
348
- model: this._sModelName,
496
+ path: '/selectedKey',
497
+ model: "$mVariants",
349
498
  formatter: function(sKey) {
350
499
  var sText = "";
351
500
  if (sKey) {
@@ -355,6 +504,10 @@ sap.ui.define([
355
504
 
356
505
  return sText;
357
506
  }.bind(this)
507
+ },
508
+ level: {
509
+ path: '/level',
510
+ model: "$mVariants"
358
511
  }
359
512
  });
360
513
 
@@ -371,9 +524,9 @@ sap.ui.define([
371
524
  text: "*",
372
525
  visible: {
373
526
  path: "/modified",
374
- model: this._sModelName,
527
+ model: "$mVariants",
375
528
  formatter: function(bValue) {
376
- var sKey = this.getCurrentVariantKey();
529
+ var sKey = this.getSelectedKey();
377
530
 
378
531
  if (sKey) {
379
532
  this._setInvisibleText(this.getSelectedVariantText(sKey), bValue);
@@ -412,55 +565,7 @@ sap.ui.define([
412
565
  this.addDependent(this.oVariantLayout);
413
566
  };
414
567
 
415
- VariantManagement.prototype.applySettings = function(mSettings, oScope) {
416
- Control.prototype.applySettings.apply(this, arguments);
417
- };
418
-
419
- VariantManagement.prototype.setModelName = function(sName) {
420
- this.setProperty("modelName", sName);
421
568
 
422
- this._sModelName = sName;
423
-
424
- this._initializeControl();
425
-
426
- return this;
427
- };
428
-
429
- /**
430
- * Registration of a callback function. The provided callback function is executed to check if apply automatically on standard variant should be considered.
431
- * @private
432
- * @ui5-restricted sap.fe
433
- * @since 1.103
434
- * @param {function} fCallBack Called when standard variant must be applied. It determines if apply automatically on standard variant should be considered.
435
- * As a convenience the current variant will be passed to the callback. This variant instance may not be changed in any ways. It is only intended to provide certain variant information.
436
- * @returns {this} Reference to this in order to allow method chaining.
437
- */
438
- VariantManagement.prototype.registerApplyAutomaticallyOnStandardVariant = function(fCallBack) {
439
- this._fRegisteredApplyAutomaticallyOnStandardVariant = fCallBack;
440
-
441
- return this;
442
- };
443
-
444
- /**
445
- * Retrieves the apply automatically state for a variant.
446
- * @private
447
- * @ui5-restricted sap.mdc
448
- * @param {object} oVariant the inner variant object
449
- * @returns {boolean} apply automatically state
450
- */
451
- VariantManagement.prototype.getApplyAutomaticallyOnVariant = function(oVariant) {
452
- var bExecuteOnSelection = oVariant.executeOnSelect;
453
-
454
- if (this._fRegisteredApplyAutomaticallyOnStandardVariant && this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (oVariant.key === this.getStandardVariantKey())) {
455
- try {
456
- bExecuteOnSelection = this._fRegisteredApplyAutomaticallyOnStandardVariant(oVariant);
457
- } catch (ex) {
458
- Log.error("callback for determination of apply automatically on standard variant failed");
459
- }
460
- }
461
-
462
- return bExecuteOnSelection;
463
- };
464
569
 
465
570
  /**
466
571
  * Required by the {@link sap.m.IOverflowToolbarContent} interface.
@@ -500,68 +605,13 @@ sap.ui.define([
500
605
 
501
606
  VariantManagement.prototype._createInnerModel = function() {
502
607
  var oModel = new JSONModel({
503
- showExecuteOnSelection: false,
504
- showSetAsDefault: true,
505
- showSaveAs: true,
506
- showPublic: false,
507
- showContexts: false,
508
- editable: true,
509
608
  showManualVariantKey: false,
510
- showCreateTile: false,
511
- popoverTitle: this._oRb.getText("VARIANT_MANAGEMENT_VARIANTS")
609
+ showCreateTile: false
512
610
  });
513
611
  this.setModel(oModel, VariantManagement.INNER_MODEL_NAME);
514
-
515
- this._bindProperties();
516
-
517
- this._updateInnerModelWithSettingsInfo();
518
- };
519
-
520
- VariantManagement.prototype._bindProperties = function() {
521
- this.bindProperty("showSetAsDefault", {
522
- path: "/showSetAsDefault",
523
- model: VariantManagement.INNER_MODEL_NAME
524
- });
525
- this.bindProperty("editable", {
526
- path: "/editable",
527
- model: VariantManagement.INNER_MODEL_NAME
528
- });
529
- };
530
-
531
- VariantManagement.prototype._setShowSaveAs = function(bValue) {
532
- this._setInnerModelProperty("/showSaveAs", bValue);
533
- };
534
-
535
- VariantManagement.prototype._setShowFooter = function(bValue) {
536
- this._setInnerModelProperty("/editable", bValue);
537
- };
538
-
539
- VariantManagement.prototype._setPopoverTitle = function(sText) {
540
- this._setInnerModelProperty("/popoverTitle", sText);
541
- };
542
-
543
- VariantManagement.prototype._getShowPublic = function() {
544
- return this._getInnerModelProperty("/showPublic");
545
- };
546
- VariantManagement.prototype._setShowPublic = function(bValue) {
547
- this._setInnerModelProperty("/showPublic", bValue);
548
612
  };
549
613
 
550
614
 
551
- VariantManagement.prototype._getShowContexts = function() {
552
- return this._getInnerModelProperty("/showContexts");
553
- };
554
- VariantManagement.prototype._setShowContexts = function(bValue) {
555
- this._setInnerModelProperty("/showContexts", bValue);
556
- };
557
-
558
- VariantManagement.prototype._getShowExecuteOnSelection = function() {
559
- return this._getInnerModelProperty("/showExecuteOnSelection");
560
- };
561
- VariantManagement.prototype._setShowExecuteOnSelection = function(bValue) {
562
- this._setInnerModelProperty("/showExecuteOnSelection", bValue);
563
- };
564
-
565
615
  VariantManagement.prototype._getShowCreateTile = function() {
566
616
  return this._getInnerModelProperty("/showCreateTile");
567
617
  };
@@ -576,7 +626,6 @@ sap.ui.define([
576
626
  this._setInnerModelProperty("/showManualVariantKey", bValue);
577
627
  };
578
628
 
579
-
580
629
  VariantManagement.prototype._setInnerModelProperty = function(sPropertyPath, vValue) {
581
630
  var oInnerModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
582
631
  if (oInnerModel) {
@@ -594,153 +643,21 @@ sap.ui.define([
594
643
  };
595
644
 
596
645
 
597
- /**
598
- * Gets the previous default variant key
599
- * @public
600
- * @abstract
601
- * @returns {string} Key of the previous dfault variant
602
- */
603
- VariantManagement.prototype.getOriginalDefaultVariantKey = function() {
604
- };
605
-
606
- /**
607
- * Sets the default variant key
608
- * @public
609
- * @abstract
610
- * @param {string} sKey - the variant key should be set as default
611
- */
612
- VariantManagement.prototype.setDefaultVariantKey = function(sKey) {
613
- };
614
-
615
- /**
616
- * Gets the default variant key
617
- * @public
618
- * @abstract
619
- * @returns {string} Key of the default variant
620
- */
621
- VariantManagement.prototype.getDefaultVariantKey = function() {
622
- };
623
-
624
- /**
625
- * Sets the currently selected variant key.
626
- * @public
627
- * @abstract
628
- * @param {string} sKey - the new current variant key
629
- */
630
- VariantManagement.prototype.setCurrentVariantKey = function(sKey) {
631
- };
632
-
633
- /**
634
- * Gets the currently selected variant key.
635
- * @public
636
- * @abstract
637
- * @returns {string} Key of the currently selected variant. In case the model is not yet set <code>null</code> will be returned.
638
- */
639
- VariantManagement.prototype.getCurrentVariantKey = function() {
640
- };
641
-
642
-
643
- /**
644
- * Retrieves all variants.
645
- * @public
646
- * @returns {array} All variants. In case the model is not yet set, an empty array will be returned.
647
- */
648
- VariantManagement.prototype.getVariants = function() {
649
- return this._getItems();
650
- };
651
-
652
- /**
653
- * Sets the modified flag
654
- * @public
655
- * @abstract
656
- * @param {boolean} bFlag - represents the variant modify state
657
- */
658
- VariantManagement.prototype.setModified = function(bFlag) {
659
- };
660
-
661
- /**
662
- * Determines if the current variant is modified.
663
- * @public
664
- * @abstract
665
- * @returns {boolean} If the current variant is modified <code>true</code>, otherwise <code>false</code>
666
- */
667
- VariantManagement.prototype.getModified = function() {
668
- };
669
-
670
- /**
671
- * Gets the information, if favorites should be shown.
672
- * @public
673
- * @abstract
674
- * @returns {boolean} The information if favorites should be shown
675
- */
676
- VariantManagement.prototype.getShowFavorites = function() {
677
- };
678
-
679
646
  /**
680
647
  * Gets all the variants
681
648
  * @private
682
- * @abstract
683
649
  * @returns {array} Of variants
684
650
  */
685
651
  VariantManagement.prototype._getItems = function() {
652
+ return this.getItems();
686
653
  };
687
654
 
688
- /**
689
- * Gets all the binding path
690
- * @private
691
- * @abstract
692
- * @returns {array} Of variants
693
- */
694
- VariantManagement.prototype._getBindingPath = function() {
695
- return "";
696
- };
697
-
698
- /**
699
- * Propagate information about public and save as
700
- * @private
701
- * @abstract
702
- */
703
- VariantManagement.prototype._updateInnerModelWithSettingsInfo = function() {
704
- };
705
-
706
- /**
707
- * Check if the item is delete enabled.
708
- * @private
709
- * @abstract
710
- * @param {object} oItem - represents the variant
711
- * @returns {boolean} indicator if the item is delete enabled
712
- */
713
- VariantManagement.prototype.isItemDeleteEnabled = function(oItem) {
714
- return true;
715
- };
716
-
717
- /**
718
- * Check if the item is delete enabled.
719
- * @private
720
- * @abstract
721
- * @param {object} oItem - represents the variant
722
- * @returns {boolean} indicator if the item is delete enabled
723
- */
724
- VariantManagement.prototype.isItemDeleteVisible = function(oItem) {
725
- return oItem.remove;
726
- };
727
-
728
- /**
729
- * Check if the item is delete enabled.
730
- * @private
731
- * @abstract
732
- * @param {object} oItem - represents the variant
733
- * @returns {boolean} indicator if the item is delete enabled
734
- */
735
- VariantManagement.prototype.isItemRenameAllowed = function(oItem) {
736
- return oItem.rename;
737
- };
738
655
 
739
656
  VariantManagement.prototype.getSelectedVariantText = function(sKey) {
740
657
  var oItem = this._getItemByKey(sKey);
741
658
 
742
659
  if (oItem) {
743
- return oItem.title;
660
+ return oItem.getTitle();
744
661
  }
745
662
 
746
663
  return "";
@@ -749,7 +666,7 @@ sap.ui.define([
749
666
  VariantManagement.prototype.getStandardVariantKey = function() {
750
667
  var aItems = this._getItems();
751
668
  if (aItems && aItems[0]) {
752
- return aItems[0].key;
669
+ return aItems[0].getKey();
753
670
  }
754
671
 
755
672
  return null;
@@ -761,20 +678,46 @@ sap.ui.define([
761
678
  };
762
679
 
763
680
  VariantManagement.prototype._addDeletedItem = function(oItem) {
764
- this._aDeletedItems.push(oItem);
681
+ var sKey = oItem.getKey();
682
+ if (this._aDeletedItems.indexOf(sKey) < 0) {
683
+ this._aDeletedItems.push(sKey);
684
+ }
765
685
  };
766
686
 
767
687
  VariantManagement.prototype._getDeletedItems = function() {
768
688
  return this._aDeletedItems;
769
689
  };
770
690
 
691
+ VariantManagement.prototype._clearRenamedItems = function() {
692
+ this._aRenamedItems = [];
693
+ };
694
+
695
+ VariantManagement.prototype._addRenamedItem = function(oItem) {
696
+ var sKey = oItem.getKey();
697
+ if (this._aRenamedItems.indexOf(sKey) < 0) {
698
+ this._aRenamedItems.push(sKey);
699
+ }
700
+ };
701
+
702
+ VariantManagement.prototype._removeRenamedItem = function(oItem) {
703
+ var sKey = oItem.getKey();
704
+ var nIdx = this._aRenamedItems.indexOf(sKey);
705
+ if ( nIdx >= 0) {
706
+ this._aRenamedItems.splice(nIdx, 1);
707
+ }
708
+ };
709
+
710
+ VariantManagement.prototype._getRenamedItems = function() {
711
+ return this._aRenamedItems;
712
+ };
713
+
771
714
 
772
715
  VariantManagement.prototype._getItemByKey = function(sKey) {
773
716
  var oItem = null;
774
717
  var aItems = this._getItems();
775
718
  if (aItems) {
776
719
  aItems.some(function(oEntry) {
777
- if (oEntry.key === sKey) {
720
+ if (oEntry.getKey() === sKey) {
778
721
  oItem = oEntry;
779
722
  }
780
723
 
@@ -785,38 +728,6 @@ sap.ui.define([
785
728
  return oItem;
786
729
  };
787
730
 
788
- VariantManagement.prototype._rebindControl = function() {
789
- this.oVariantText.unbindProperty("text");
790
- this.oVariantText.bindProperty("text", {
791
- path: 'currentVariant',
792
- model: this._sModelName,
793
- formatter: function(sKey) {
794
- var sText = "";
795
- if (sKey) {
796
- sText = this.getSelectedVariantText(sKey);
797
- this._setInvisibleText(sText, this.getModified());
798
- }
799
-
800
- return sText;
801
- }.bind(this)
802
- });
803
-
804
- this.oVariantModifiedText.unbindProperty("visible");
805
- this.oVariantModifiedText.bindProperty("visible", {
806
- path: "modified",
807
- model: this._sModelName,
808
- formatter: function(bValue) {
809
- var sKey = this.getCurrentVariantKey();
810
-
811
- if (sKey) {
812
- this._setInvisibleText(this.getSelectedVariantText(sKey), bValue);
813
- }
814
-
815
- return ((bValue === null) || (bValue === undefined)) ? false : bValue;
816
- }.bind(this)
817
- });
818
- };
819
-
820
731
 
821
732
  VariantManagement.prototype._obtainControl = function(oEvent) {
822
733
  if (oEvent && oEvent.target && oEvent.target.id) {
@@ -879,17 +790,17 @@ sap.ui.define([
879
790
  if (!this.oErrorVariantPopOver) {
880
791
  oVBox = new VBox({
881
792
  fitContainer: true,
882
- alignItems: sap.m.FlexAlignItems.Center,
793
+ alignItems: FlexAlignItems.Center,
883
794
  items: [
884
795
  new Icon({
885
796
  size: "4rem",
886
797
  color: "lightgray",
887
798
  src: "sap-icon://message-error"
888
799
  }), new Title({
889
- titleStyle: sap.ui.core.TitleLevel.H2,
800
+ titleStyle: TitleLevel.H2,
890
801
  text: this._oRb.getText("VARIANT_MANAGEMENT_ERROR_TEXT1")
891
802
  }), new Text({
892
- textAlign: sap.ui.core.TextAlign.Center,
803
+ textAlign: TextAlign.Center,
893
804
  text: this._oRb.getText("VARIANT_MANAGEMENT_ERROR_TEXT2")
894
805
  })
895
806
  ]
@@ -900,7 +811,7 @@ sap.ui.define([
900
811
  this.oErrorVariantPopOver = new ResponsivePopover(this.getId() + "-errorpopover", {
901
812
  title: {
902
813
  path: "/popoverTitle",
903
- model: VariantManagement.INNER_MODEL_NAME
814
+ model: "$mVariants"
904
815
  },
905
816
  contentWidth: "400px",
906
817
  placement: PlacementType.VerticalPreferredBottom,
@@ -964,11 +875,22 @@ sap.ui.define([
964
875
  this._handleVariantSave();
965
876
  }.bind(this),
966
877
  visible: {
967
- path: "modified",
968
- model: this._sModelName,
969
- formatter: function(bValue) {
970
- return bValue;
878
+ parts: [{
879
+ path: '$mVariants>/creationAllowed'
880
+ },{
881
+ path: '$mVariants>/modified'
882
+ },{
883
+ path: '$mVariants>/selectedKey'
971
884
  }
885
+ ],
886
+ formatter: function(bCreationAllowed, bModified, sSelectedKey) {
887
+ var bItemChangeable = false;
888
+ var oItem = this._getItemByKey(sSelectedKey);
889
+ if (oItem) {
890
+ bItemChangeable = oItem.getChangeable();
891
+ }
892
+ return bCreationAllowed && bModified && bItemChangeable;
893
+ }.bind(this)
972
894
  },
973
895
  type: ButtonType.Emphasized,
974
896
  layoutData: new OverflowToolbarLayoutData({
@@ -985,15 +907,22 @@ sap.ui.define([
985
907
  priority: OverflowToolbarPriority.Low
986
908
  }),
987
909
  visible: {
988
- path: "/showSaveAs",
989
- model: VariantManagement.INNER_MODEL_NAME
910
+ parts: [{
911
+ path: '$mVariants>/creationAllowed'
912
+ },{
913
+ path: '$mVariants>/showSaveAs'
914
+ }],
915
+ formatter: function(bCreationAllowed, bShowSaveAs) {
916
+ return bCreationAllowed && bShowSaveAs;
917
+ }
990
918
  }
919
+
991
920
  });
992
921
 
993
922
  this.oVariantList = new SelectList(this.getId() + "-list", {
994
923
  selectedKey: {
995
- path: this._checkForFinalBindingPath("currentVariant"),
996
- model: this._sModelName
924
+ path: "/selectedKey",
925
+ model: "$mVariants"
997
926
  },
998
927
  itemPress: function(oEvent) {
999
928
  var sSelectionKey = null;
@@ -1005,7 +934,7 @@ sap.ui.define([
1005
934
  }
1006
935
  if (sSelectionKey) {
1007
936
  // this.setModified(false);
1008
- this.setCurrentVariantKey(sSelectionKey);
937
+ this.setSelectedKey(sSelectionKey);
1009
938
 
1010
939
  this.fireSelect({
1011
940
  key: sSelectionKey
@@ -1016,14 +945,16 @@ sap.ui.define([
1016
945
  });
1017
946
  this.oVariantList.setNoDataText(this._oRb.getText("VARIANT_MANAGEMENT_NODATA"));
1018
947
 
1019
- var oItemTemplate = new sap.ui.core.Item({
1020
- key: '{' + this._sModelName + ">key}",
1021
- text: '{' + this._sModelName + ">title}"
948
+
949
+ var oItemTemplate = new Item({
950
+ key: "{$mVariants>key}",
951
+ text: "{$mVariants>title}"
1022
952
  });
1023
953
 
954
+
1024
955
  this.oVariantList.bindAggregation("items", {
1025
- path: this._checkForFinalBindingPath("variants"),
1026
- model: this._sModelName,
956
+ path: "/items",
957
+ model: "$mVariants",
1027
958
  template: oItemTemplate
1028
959
  });
1029
960
 
@@ -1048,21 +979,17 @@ sap.ui.define([
1048
979
  }),
1049
980
  showNavButton: false,
1050
981
  showHeader: false
1051
- // showFooter: {
1052
- // path: "/editable",
1053
- // model: VariantManagement.INNER_MODEL_NAME
1054
- // }
1055
982
  });
1056
983
 
1057
984
  this.oVariantSelectionPage.bindProperty("showFooter", {
1058
- path: "/editable",
1059
- model: VariantManagement.INNER_MODEL_NAME
985
+ path: "/showFooter",
986
+ model: "$mVariants"
1060
987
  });
1061
988
 
1062
989
  this.oVariantPopOver = new ResponsivePopover(this.getId() + "-popover", {
1063
990
  title: {
1064
991
  path: "/popoverTitle",
1065
- model: VariantManagement.INNER_MODEL_NAME
992
+ model: "$mVariants"
1066
993
  },
1067
994
  titleAlignment: "Auto",
1068
995
  contentWidth: "400px",
@@ -1094,29 +1021,22 @@ sap.ui.define([
1094
1021
  // this.oVariantList.getBinding("items").filter(this._getFilters());
1095
1022
  };
1096
1023
 
1097
- /**
1098
- * Hide or show <i>Save</i> button and emphasize "most positive action" - either <i>Save</i> button if it is visible, or <i>Save As</i> button if <i>Save</i> is hidden.
1099
- * @param {boolean} bShow - Indicator if <i>Save</i> button should be visible
1100
- * @private
1101
- */
1102
- VariantManagement.prototype.showSaveButton = function(bShow) {
1103
- if (bShow === false) {
1104
- this.oVariantSaveAsBtn.setType(ButtonType.Emphasized);
1105
- this.oVariantSaveBtn.setVisible(false);
1106
- } else {
1024
+
1025
+ VariantManagement.prototype._determineEmphasizedFooterButton = function() {
1026
+ if (this.oVariantSaveBtn.getVisible()) {
1027
+ this.oVariantSaveBtn.setType(ButtonType.Emphasized);
1107
1028
  this.oVariantSaveAsBtn.setType(ButtonType.Default);
1108
- this.oVariantSaveBtn.setVisible(true);
1029
+ } else {
1030
+ this.oVariantSaveAsBtn.setType(ButtonType.Emphasized);
1109
1031
  }
1110
1032
  };
1111
1033
 
1112
-
1113
- VariantManagement.prototype._checkForFinalBindingPath = function(sPath) {
1114
- return this._getBindingPath() ? sPath : ('/' + sPath);
1034
+ VariantManagement.prototype.setModified = function(bValue) {
1035
+ this.setProperty("modified", bValue);
1036
+ return this;
1115
1037
  };
1116
1038
 
1117
1039
  VariantManagement.prototype._openVariantList = function() {
1118
- var oItem;
1119
-
1120
1040
  if (this.getInErrorState()) {
1121
1041
  this._openInErrorState();
1122
1042
  return;
@@ -1126,11 +1046,6 @@ sap.ui.define([
1126
1046
  return;
1127
1047
  }
1128
1048
 
1129
- // proceed only if context is available
1130
- // if (!this.oContext) {
1131
- // return;
1132
- // }
1133
-
1134
1049
  this._createVariantList();
1135
1050
  this._oSearchField.setValue("");
1136
1051
 
@@ -1138,13 +1053,11 @@ sap.ui.define([
1138
1053
 
1139
1054
  this.oVariantSelectionPage.setShowSubHeader(this.oVariantList.getItems().length > 9);
1140
1055
 
1141
- this.showSaveButton(false);
1056
+ this._determineEmphasizedFooterButton();
1142
1057
 
1143
- if (this.getModified()) {
1144
- oItem = this._getItemByKey(this.getCurrentVariantKey());
1145
- if (oItem && oItem.change) {
1146
- this.showSaveButton(true);
1147
- }
1058
+ var oSelectedItem = this.oVariantList.getSelectedItem();
1059
+ if (oSelectedItem) {
1060
+ this.oVariantPopOver.setInitialFocus(oSelectedItem.getId());
1148
1061
  }
1149
1062
 
1150
1063
  var oControlRef = this._oCtrlRef ? this._oCtrlRef : this.oVariantLayout;
@@ -1192,8 +1105,8 @@ sap.ui.define([
1192
1105
  this.oDefault = new CheckBox(this.getId() + "-default", {
1193
1106
  text: this._oRb.getText("VARIANT_MANAGEMENT_SETASDEFAULT"),
1194
1107
  visible: {
1195
- path: "/showSetAsDefault",
1196
- model: VariantManagement.INNER_MODEL_NAME
1108
+ path: "/supportDefault",
1109
+ model: "$mVariants"
1197
1110
  },
1198
1111
  width: "100%"
1199
1112
  });
@@ -1201,8 +1114,8 @@ sap.ui.define([
1201
1114
  this.oPublic = new CheckBox(this.getId() + "-public", {
1202
1115
  text: this._oRb.getText("VARIANT_MANAGEMENT_SETASPUBLIC"),
1203
1116
  visible: {
1204
- path: "/showPublic",
1205
- model: VariantManagement.INNER_MODEL_NAME
1117
+ path: "/supportPublic",
1118
+ model: "$mVariants"
1206
1119
  },
1207
1120
  width: "100%"
1208
1121
  });
@@ -1210,8 +1123,8 @@ sap.ui.define([
1210
1123
  this.oExecuteOnSelect = new CheckBox(this.getId() + "-execute", {
1211
1124
  text: this._oRb.getText("VARIANT_MANAGEMENT_EXECUTEONSELECT"),
1212
1125
  visible: {
1213
- path: "/showExecuteOnSelection",
1214
- model: VariantManagement.INNER_MODEL_NAME
1126
+ path: "/supportApplyAutomatically",
1127
+ model: "$mVariants"
1215
1128
  },
1216
1129
  width: "100%"
1217
1130
  });
@@ -1283,7 +1196,7 @@ sap.ui.define([
1283
1196
  this._bSaveOngoing = false;
1284
1197
 
1285
1198
  if (this._sStyleClass) {
1286
- this._setShowPublic(this._bShowPublic);
1199
+ this.setSupportPublic(this._bShowPublic);
1287
1200
  this.oSaveAsDialog.removeStyleClass(this._sStyleClass);
1288
1201
 
1289
1202
  if (this._oRolesComponentContainer) {
@@ -1293,6 +1206,7 @@ sap.ui.define([
1293
1206
  this._sStyleClass = undefined;
1294
1207
  this._oRolesComponentContainer = null;
1295
1208
  }
1209
+
1296
1210
  }.bind(this),
1297
1211
  beginButton: this.oSaveSave,
1298
1212
  endButton: new Button(this.getId() + "-variantcancel", {
@@ -1411,10 +1325,10 @@ sap.ui.define([
1411
1325
  VariantManagement.prototype._openRolesDialog = function(oItem, oTextControl) {
1412
1326
  this._createRolesDialog();
1413
1327
 
1414
- this._oCurrentContextsKey = oItem.key;
1328
+ this._oCurrentContextsKey = oItem.getKey();
1415
1329
  this._oTextControl = oTextControl;
1416
1330
 
1417
- this._setSelectedContexts(oItem.contexts);
1331
+ this._setSelectedContexts(oItem.getContexts());
1418
1332
 
1419
1333
  this._oRolesDialog.open();
1420
1334
  };
@@ -1428,7 +1342,7 @@ sap.ui.define([
1428
1342
 
1429
1343
  var oItem = this._getItemByKey(sKey);
1430
1344
  if (oItem) {
1431
- oItem.contexts = mContexts;
1345
+ oItem.setContexts(mContexts);
1432
1346
  this._determineRolesSpecificText(mContexts, oTextControl);
1433
1347
  }
1434
1348
  } else {
@@ -1464,20 +1378,23 @@ sap.ui.define([
1464
1378
 
1465
1379
  /**
1466
1380
  * Opens the <i>Save As</i> dialog.
1467
- * @param {string} sRtaStyleClassName - style-class to be used
1381
+ * @param {string} sStyleClassName - style-class to be used
1468
1382
  * @param {object} oRolesComponentContainer - component for roles handling
1469
1383
  */
1470
- VariantManagement.prototype.openSaveAsDialogForKeyUser = function (sRtaStyleClassName, oRolesComponentContainer) {
1384
+ VariantManagement.prototype.openSaveAsDialog = function (sStyleClassName, oRolesComponentContainer) {
1471
1385
  this._openSaveAsDialog(true);
1472
- this.oSaveAsDialog.addStyleClass(sRtaStyleClassName);
1473
- this._sStyleClass = sRtaStyleClassName; // indicates that dialog is running in key user scenario
1386
+ this.oSaveAsDialog.addStyleClass(sStyleClassName);
1387
+ this._sStyleClass = sStyleClassName; // indicates that dialog is running in key user scenario
1474
1388
 
1475
- this._bShowPublic = this._getShowPublic();
1476
- this._setShowPublic(false);
1389
+ this._bShowPublic = this.getSupportPublic();
1390
+ this.setSupportPublic(false);
1477
1391
 
1478
1392
  if (oRolesComponentContainer) {
1479
1393
  Promise.all([oRolesComponentContainer]).then(function(vArgs) {
1480
1394
  this._oRolesComponentContainer = vArgs[0];
1395
+
1396
+ this.setSupportContexts(!!this._oRolesComponentContainer );
1397
+
1481
1398
  this._checkAndAddRolesContainerToSaveAsDialog();
1482
1399
 
1483
1400
  this.oSaveAsDialog.open();
@@ -1487,10 +1404,13 @@ sap.ui.define([
1487
1404
  }
1488
1405
  };
1489
1406
 
1407
+
1490
1408
  VariantManagement.prototype._openSaveAsDialog = function(bDoNotOpen) {
1491
1409
  this._createSaveAsDialog();
1492
1410
 
1493
- this.oInputName.setValue(this.getSelectedVariantText(this.getCurrentVariantKey()));
1411
+ this.setSupportContexts(false);
1412
+
1413
+ this.oInputName.setValue(this.getSelectedVariantText(this.getSelectedKey()));
1494
1414
  this.oInputName.setEnabled(true);
1495
1415
  this.oInputName.setValueState(ValueState.None);
1496
1416
  this.oInputName.setValueStateText(null);
@@ -1520,7 +1440,7 @@ sap.ui.define([
1520
1440
  }
1521
1441
  };
1522
1442
 
1523
- VariantManagement.prototype._handleVariantSaveAs = function(sNewVariantName, bKeyUser) {
1443
+ VariantManagement.prototype._handleVariantSaveAs = function(sNewVariantName) {
1524
1444
  var sKey = null;
1525
1445
  var sName = sNewVariantName.trim();
1526
1446
  var sManualKey = this.oInputManualKey.getValue().trim();
@@ -1544,14 +1464,8 @@ sap.ui.define([
1544
1464
  this.oSaveAsDialog.close();
1545
1465
  }
1546
1466
 
1547
- // if (this.oDefault.getSelected()) {
1548
- // this.setDefaultVariantKey(sKey);
1549
- // }
1550
-
1551
- this.setModified(false);
1552
-
1553
- if (bKeyUser) {
1554
- return true;
1467
+ if (this.oDefault.getSelected()) {
1468
+ this.setDefaultKey(this.oDefault.getSelected());
1555
1469
  }
1556
1470
 
1557
1471
  var oObj = {
@@ -1560,11 +1474,11 @@ sap.ui.define([
1560
1474
  overwrite: false,
1561
1475
  def: this.oDefault.getSelected(),
1562
1476
  execute: this.oExecuteOnSelect.getSelected(),
1563
- "public": this._sStyleClass ? undefined : this.oPublic.getSelected(),
1564
- contexts: this._sStyleClass ? this._getContextInfoChanges() : undefined
1477
+ "public": this.getSupportPublic() ? this.oPublic.getSelected() : undefined,
1478
+ contexts: this._getContextInfoChanges()
1565
1479
  };
1566
1480
 
1567
- if (!this._sStyleClass && this._getShowCreateTile() && this.oCreateTile) {
1481
+ if (this._getShowCreateTile() && this.oCreateTile) {
1568
1482
  oObj.tile = this.oCreateTile.getSelected();
1569
1483
  }
1570
1484
 
@@ -1580,18 +1494,18 @@ sap.ui.define([
1580
1494
  return this._getSelectedContexts();
1581
1495
  }
1582
1496
  } catch (ex) {
1583
- return null;
1497
+ return undefined;
1584
1498
  }
1585
1499
  }
1586
1500
 
1587
- return null;
1501
+ return undefined;
1588
1502
  };
1589
1503
 
1590
1504
  VariantManagement.prototype._handleVariantSave = function() {
1591
- var oItem = this._getItemByKey(this.getCurrentVariantKey());
1505
+ var oItem = this._getItemByKey(this.getSelectedKey());
1592
1506
 
1593
1507
  var bDefault = false;
1594
- if (this.getDefaultVariantKey() === oItem.key) {
1508
+ if (this.getDefaultKey() === oItem.getKey()) {
1595
1509
  bDefault = true;
1596
1510
  }
1597
1511
 
@@ -1600,40 +1514,47 @@ sap.ui.define([
1600
1514
  }
1601
1515
 
1602
1516
  this.fireSave({
1603
- name: oItem.title,
1517
+ name: oItem.getTitle(),
1604
1518
  overwrite: true,
1605
- key: oItem.key,
1519
+ key: oItem.getKey(),
1606
1520
  def: bDefault
1607
1521
  });
1608
-
1609
- this.setModified(false);
1610
1522
  };
1611
1523
 
1612
1524
  // Manage Views dialog
1613
1525
 
1526
+ VariantManagement.prototype.destroyManageDialog = function() {
1527
+ if (this.oManagementDialog) {
1528
+ this.oManagementDialog.destroy();
1529
+ this.oManagementDialog = undefined;
1530
+ }
1531
+ };
1532
+
1614
1533
  /**
1615
1534
  * Opens the <i>Manage Views</i> dialog.
1616
1535
  * @param {boolean} bCreateAlways - Indicates that if this is set to <code>true</code>, the former dialog will be destroyed before a new one is created
1617
- * @param {string} sClass - style-class to be used
1536
+ * @param {string} sStyleClass - style-class to be used
1618
1537
  * @param {object} oRolesComponentContainer - component for roles handling
1619
1538
  */
1620
- VariantManagement.prototype.openManagementDialog = function(bCreateAlways, sClass, oRolesComponentContainer) {
1539
+ VariantManagement.prototype.openManagementDialog = function(bCreateAlways, sStyleClass, oRolesComponentContainer) {
1621
1540
  if (bCreateAlways && this.oManagementDialog) {
1622
1541
  this.oManagementDialog.destroy();
1623
1542
  this.oManagementDialog = undefined;
1624
1543
  }
1625
1544
 
1626
- if (sClass) {
1627
- this._sStyleClass = sClass;
1628
- this._bShowPublic = this._getShowPublic();
1629
- this._setShowPublic(false);
1545
+ if (sStyleClass) {
1546
+ this._sStyleClass = sStyleClass;
1547
+ this._bShowPublic = this.getSupportPublic();
1548
+ this.setSupportPublic(false);
1549
+
1550
+ this.setSupportContexts(false);
1630
1551
  }
1631
1552
 
1632
1553
  if (oRolesComponentContainer) {
1633
1554
  Promise.all([oRolesComponentContainer]).then(function(vArgs) {
1634
1555
  this._oRolesComponentContainer = vArgs[0];
1635
1556
 
1636
- this._setShowContexts(!!this._oRolesComponentContainer);
1557
+ this.setSupportContexts(!!this._oRolesComponentContainer);
1637
1558
  this._openManagementDialog();
1638
1559
 
1639
1560
  if (this._sStyleClass) {
@@ -1641,7 +1562,6 @@ sap.ui.define([
1641
1562
  }
1642
1563
  }.bind(this));
1643
1564
  } else {
1644
- this._setShowContexts(false);
1645
1565
  this._openManagementDialog();
1646
1566
 
1647
1567
  if (this._sStyleClass) {
@@ -1660,7 +1580,17 @@ sap.ui.define([
1660
1580
  return;
1661
1581
  }
1662
1582
 
1663
- var sValue = parameters.newValue ? parameters.newValue : "";
1583
+ var sValue;
1584
+ if (parameters.query) {
1585
+ sValue = parameters.query;
1586
+ } else {
1587
+ sValue = parameters.newValue ? parameters.newValue : "";
1588
+ }
1589
+
1590
+ this._triggerSearchInManageDialogByValue(sValue, oManagementTable);
1591
+ };
1592
+
1593
+ VariantManagement.prototype._triggerSearchInManageDialogByValue = function(sValue, oManagementTable) {
1664
1594
 
1665
1595
  var aFilters = [
1666
1596
  this._getVisibleFilter(), new Filter({
@@ -1690,16 +1620,18 @@ sap.ui.define([
1690
1620
 
1691
1621
  VariantManagement.prototype._createManagementDialog = function() {
1692
1622
  if (!this.oManagementDialog || this.oManagementDialog.bIsDestroyed) {
1623
+
1693
1624
  this.oManagementTable = new Table(this.getId() + "-managementTable", {
1694
1625
  contextualWidth: "Auto",
1695
1626
  fixedLayout: false,
1696
1627
  growing: true,
1628
+ keyboardMode: ListKeyboardMode.Edit,
1697
1629
  columns: [
1698
1630
  new Column({
1699
1631
  width: "3rem",
1700
1632
  visible: {
1701
- path: this._checkForFinalBindingPath("showFavorites"),
1702
- model: this._sModelName
1633
+ path: "/supportFavorites",
1634
+ model: "$mVariants"
1703
1635
  }
1704
1636
  }), new Column({
1705
1637
  header: new Text({
@@ -1712,8 +1644,8 @@ sap.ui.define([
1712
1644
  wrappingType: "Hyphenated"
1713
1645
  }),
1714
1646
  visible: {
1715
- path: "/showPublic",
1716
- model: VariantManagement.INNER_MODEL_NAME
1647
+ path: "/supportPublic",
1648
+ model: "$mVariants"
1717
1649
  },
1718
1650
  demandPopin: true,
1719
1651
  popinDisplay: PopinDisplay.Inline,
@@ -1728,8 +1660,8 @@ sap.ui.define([
1728
1660
  popinDisplay: PopinDisplay.Block,
1729
1661
  minScreenWidth: ScreenSize.Tablet,
1730
1662
  visible: {
1731
- path: "/showSetAsDefault",
1732
- model: VariantManagement.INNER_MODEL_NAME
1663
+ path: "/supportDefault",
1664
+ model: "$mVariants"
1733
1665
  }
1734
1666
  }), new Column({
1735
1667
  header: new Text({
@@ -1741,8 +1673,8 @@ sap.ui.define([
1741
1673
  popinDisplay: PopinDisplay.Block,
1742
1674
  minScreenWidth: ScreenSize.Tablet,
1743
1675
  visible: {
1744
- path: "/showExecuteOnSelection",
1745
- model: VariantManagement.INNER_MODEL_NAME
1676
+ path: "/supportApplyAutomatically",
1677
+ model: "$mVariants"
1746
1678
  }
1747
1679
  }), new Column({
1748
1680
  header: new Text({
@@ -1754,8 +1686,8 @@ sap.ui.define([
1754
1686
  popinDisplay: PopinDisplay.Inline,
1755
1687
  minScreenWidth: ScreenSize.Tablet,
1756
1688
  visible: {
1757
- path: "/showContexts",
1758
- model: VariantManagement.INNER_MODEL_NAME
1689
+ path: "/supportContexts",
1690
+ model: "$mVariants"
1759
1691
  }
1760
1692
  }), new Column({
1761
1693
  header: new Text({
@@ -1778,6 +1710,7 @@ sap.ui.define([
1778
1710
  type: ButtonType.Emphasized,
1779
1711
  press: function() {
1780
1712
  this._handleManageSavePressed();
1713
+ //this.oManagementDialog.close();
1781
1714
  }.bind(this)
1782
1715
  });
1783
1716
 
@@ -1785,8 +1718,10 @@ sap.ui.define([
1785
1718
  text: this._oRb.getText("VARIANT_MANAGEMENT_CANCEL"),
1786
1719
  press: function() {
1787
1720
  this._resumeManagementTableBinding();
1788
- this.oManagementDialog.close();
1789
1721
  this._handleManageCancelPressed();
1722
+ if (this.oManagementDialog) { // can be deleted during manageCancel event
1723
+ this.oManagementDialog.close();
1724
+ }
1790
1725
  }.bind(this)
1791
1726
  });
1792
1727
 
@@ -1799,7 +1734,7 @@ sap.ui.define([
1799
1734
  endButton: this.oManagementCancel,
1800
1735
  afterClose: function() {
1801
1736
  if (this._sStyleClass) {
1802
- this._setShowPublic(this._bShowPublic);
1737
+ this.setSupportPublic(this._bShowPublic, true);
1803
1738
  this.oManagementDialog.removeStyleClass(this._sStyleClass);
1804
1739
  this._sStyleClass = undefined;
1805
1740
  this._oRolesComponentContainer = null;
@@ -1821,6 +1756,10 @@ sap.ui.define([
1821
1756
  this._triggerSearchInManageDialog(oEvent, this.oManagementTable);
1822
1757
  }.bind(this));
1823
1758
 
1759
+ this._oSearchFieldOnMgmtDialog.attachSearch(function(oEvent) {
1760
+ this._triggerSearchInManageDialog(oEvent, this.oManagementTable);
1761
+ }.bind(this));
1762
+
1824
1763
  var oSubHeader = new Bar(this.getId() + "-mgmHeaderSearch", {
1825
1764
  contentMiddle: [
1826
1765
  this._oSearchFieldOnMgmtDialog
@@ -1828,14 +1767,16 @@ sap.ui.define([
1828
1767
  });
1829
1768
  this.oManagementDialog.setSubHeader(oSubHeader);
1830
1769
 
1770
+ this.oManagementDialog.setInitialFocus(this._oSearchFieldOnMgmtDialog);
1771
+
1831
1772
  if (this.oVariantLayout.$().closest(".sapUiSizeCompact").length > 0) {
1832
1773
  this.oManagementDialog.addStyleClass("sapUiSizeCompact");
1833
1774
  }
1834
1775
  this.addDependent(this.oManagementDialog);
1835
1776
 
1836
1777
  this.oManagementTable.bindAggregation("items", {
1837
- path: this._checkForFinalBindingPath("variants"),
1838
- model: this._sModelName,
1778
+ path: "/items",
1779
+ model: "$mVariants",
1839
1780
  factory: this._templateFactoryManagementDialog.bind(this),
1840
1781
  filters: this._getVisibleFilter()
1841
1782
  });
@@ -1855,33 +1796,41 @@ sap.ui.define([
1855
1796
  VariantManagement.prototype._templateFactoryManagementDialog = function(sId, oContext) {
1856
1797
  var sTooltip = null;
1857
1798
  var oDeleteButton;
1858
- var sBindingPath;
1859
1799
  var oNameControl;
1860
1800
  var oExecuteOnSelectCtrl;
1861
1801
  var oRolesCell;
1862
1802
  var oItem = oContext.getObject();
1863
1803
  if (!oItem) {
1804
+ Log.error("couldn't obtain the item for '" + oContext.getPath() + "'");
1805
+ return undefined;
1806
+ }
1807
+
1808
+ var nPos = this._determineIndex(oContext.getPath());
1809
+ if (nPos < 0) {
1810
+ Log.error("couldn't obtain item position for '" + oContext.getPath() + "'");
1864
1811
  return undefined;
1865
1812
  }
1866
1813
 
1814
+ var sIdPrefix = this.getId() + "-manage";
1815
+
1816
+ var sModelName = "$mVariants";
1817
+
1867
1818
  var fLiveChange = function(oEvent) {
1868
- this._checkVariantNameConstraints(oEvent.oSource, oEvent.oSource.getBindingContext(this._sModelName).getObject().key);
1819
+ var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
1820
+ this._handleManageTitleChange(oEvent.oSource, oItem);
1869
1821
  }.bind(this);
1870
1822
 
1871
1823
  var fChange = function(oEvent) {
1872
- this._handleManageTitleChanged(oEvent.oSource.getBindingContext(this._sModelName).getObject());
1824
+ var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
1825
+ this._handleManageTitleChange(oEvent.oSource, oItem);
1873
1826
  }.bind(this);
1874
1827
 
1875
1828
  var fSelectRB = function(oEvent) {
1876
- this._handleManageDefaultVariantChange(oEvent.oSource, oEvent.oSource.getBindingContext(this._sModelName).getObject(), oEvent.getParameters().selected);
1877
- }.bind(this);
1878
-
1879
- var fSelectCB = function(oEvent) {
1880
- this._handleManageExecuteOnSelectionChanged(oEvent.oSource.getBindingContext(this._sModelName).getObject());
1829
+ this._handleManageDefaultVariantChange(oEvent.oSource, oEvent.oSource.getBindingContext(sModelName).getObject(), oEvent.getParameters().selected);
1881
1830
  }.bind(this);
1882
1831
 
1883
1832
  var fPress = function(oEvent) {
1884
- this._handleManageDeletePressed(oEvent.oSource.getBindingContext(this._sModelName).getObject());
1833
+ this._handleManageDeletePressed(oEvent.oSource.getBindingContext(sModelName).getObject());
1885
1834
  var oListItem = oEvent.oSource.getParent();
1886
1835
  if (oListItem) {
1887
1836
  oListItem.setVisible(false);
@@ -1891,141 +1840,132 @@ sap.ui.define([
1891
1840
  }.bind(this);
1892
1841
 
1893
1842
  var fSelectFav = function(oEvent) {
1894
- this._handleManageFavoriteChanged(oEvent.oSource, oEvent.oSource.getBindingContext(this._sModelName).getObject());
1843
+ this._handleManageFavoriteChanged(oEvent.oSource, oEvent.oSource.getBindingContext(sModelName).getObject());
1895
1844
  }.bind(this);
1896
1845
 
1897
1846
  var fRolesPressed = function(oEvent) {
1898
- var oItem = oEvent.oSource.getBindingContext(this._sModelName).getObject();
1847
+ var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
1899
1848
  this._openRolesDialog(oItem, oEvent.oSource.getParent().getItems()[0]);
1900
1849
  }.bind(this);
1901
1850
 
1902
- var bRenameEnabled = this.isItemRenameAllowed(oItem);
1903
- if (bRenameEnabled) {
1904
- oNameControl = new Input({
1851
+ if (oItem.getRename()) {
1852
+ oNameControl = new Input(sIdPrefix + "-input-" + nPos, {
1905
1853
  liveChange: fLiveChange,
1906
1854
  change: fChange,
1907
- value: '{' + this._sModelName + ">title}"
1855
+ value: '{' + sModelName + ">title}"
1908
1856
  });
1857
+
1858
+ if (oItem.getTitle() !== oItem.getOriginalTitle()) {
1859
+ this._verifyVariantNameConstraints(oNameControl, oItem.getKey(), oItem.getTitle());
1860
+ }
1861
+
1862
+
1909
1863
  } else {
1910
- oNameControl = new ObjectIdentifier({
1911
- title: '{' + this._sModelName + ">title}"
1864
+ oNameControl = new ObjectIdentifier(sIdPrefix + "-text-" + nPos, {
1865
+ title: '{' + sModelName + ">title}"
1912
1866
  });
1913
1867
  if (sTooltip) {
1914
1868
  oNameControl.setTooltip(sTooltip);
1915
1869
  }
1916
1870
  }
1917
1871
 
1918
- var bDeleteEnabled = this.isItemDeleteEnabled(oItem);
1919
- var bDeleteVisible = this.isItemDeleteVisible(oItem);
1920
-
1921
- oDeleteButton = new Button({
1872
+ oDeleteButton = new Button(sIdPrefix + "-del-" + nPos, {
1922
1873
  icon: "sap-icon://decline",
1923
- enabled: bDeleteEnabled,
1874
+ enabled: true,
1924
1875
  type: ButtonType.Transparent,
1925
1876
  press: fPress,
1926
1877
  tooltip: this._oRb.getText("VARIANT_MANAGEMENT_DELETE"),
1927
- visible: bDeleteVisible
1878
+ visible: oItem.getRemove()
1928
1879
  });
1929
1880
 
1930
-
1931
-
1932
- this._assignColumnInfoForDeleteButton(oDeleteButton);
1933
-
1934
- sBindingPath = this._getBindingPath();
1935
-
1936
- var oFavoriteIcon = new Icon({
1881
+ var oFavoriteIcon = new Icon(sIdPrefix + "-fav-" + nPos, {
1937
1882
  src: {
1938
1883
  path: "favorite",
1939
- model: this._sModelName,
1884
+ model: sModelName,
1940
1885
  formatter: function(bFlagged) {
1941
1886
  return bFlagged ? "sap-icon://favorite" : "sap-icon://unfavorite";
1942
1887
  }
1943
1888
  },
1944
1889
  tooltip: {
1945
1890
  path: 'favorite',
1946
- model: this._sModelName,
1891
+ model: sModelName,
1947
1892
  formatter: function(bFlagged) {
1948
1893
  return this._oRb.getText(bFlagged ? "VARIANT_MANAGEMENT_FAV_DEL_TOOLTIP" : "VARIANT_MANAGEMENT_FAV_ADD_TOOLTIP");
1949
1894
  }.bind(this)
1950
1895
  },
1951
- press: fSelectFav
1896
+ press: fSelectFav,
1897
+ decorative: false
1952
1898
  });
1953
1899
 
1954
- if ((this.getStandardVariantKey() === oItem.key) || (this.getDefaultVariantKey() === oItem.key)) {
1900
+ if ((this.getStandardVariantKey() === oItem.getKey()) || (this.getDefaultKey() === oItem.getKey())) {
1955
1901
  oFavoriteIcon.addStyleClass("sapMVarMngmtFavNonInteractiveColor");
1956
1902
  } else {
1957
1903
  oFavoriteIcon.addStyleClass("sapMVarMngmtFavColor");
1958
1904
  }
1959
1905
 
1960
- if (this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (this.getStandardVariantKey() === oItem.key)) {
1961
- oExecuteOnSelectCtrl = new CheckBox(this.getId() + "-manage-exe-0",{
1906
+ if (this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (this.getStandardVariantKey() === oItem.getKey())) {
1907
+ oExecuteOnSelectCtrl = new CheckBox(sIdPrefix + "-exe-" + nPos, {
1962
1908
  wrapping: true,
1963
- text: this.getDisplayTextForExecuteOnSelectionForStandardVariant(),
1964
- select: fSelectCB,
1965
- selected: '{' + this._sModelName + ">executeOnSelect}"
1966
- });
1967
- } else if (this.getStandardVariantKey() === oItem.key) {
1968
- oExecuteOnSelectCtrl = new CheckBox(this.getId() + "-manage-exe-0",{
1969
- text: "",
1970
- select: fSelectCB,
1971
- selected: '{' + this._sModelName + ">executeOnSelect}"
1909
+ text: '{' + sModelName + ">/displayTextForExecuteOnSelectionForStandardVariant}",
1910
+ selected: '{' + sModelName + ">executeOnSelect}"
1972
1911
  });
1973
1912
  } else {
1974
- oExecuteOnSelectCtrl = new CheckBox({
1913
+ oExecuteOnSelectCtrl = new CheckBox(sIdPrefix + "-exe-" + nPos, {
1975
1914
  text: "",
1976
- select: fSelectCB,
1977
- selected: '{' + this._sModelName + ">executeOnSelect}"
1915
+ selected: '{' + sModelName + ">executeOnSelect}"
1978
1916
  });
1979
1917
  }
1980
1918
 
1981
1919
  // roles
1982
- if (this._sStyleClass && (oItem.key !== this.getStandardVariantKey())) {
1920
+ if (this._sStyleClass && (oItem.getKey() !== this.getStandardVariantKey())) {
1983
1921
  var oText = new Text({ wrapping: false });
1984
- this._determineRolesSpecificText(oItem.contexts, oText);
1922
+ this._determineRolesSpecificText(oItem.getContexts(), oText);
1985
1923
  var oIcon = new Icon({
1986
1924
  src: "sap-icon://edit",
1987
1925
  press: fRolesPressed
1988
1926
  });
1989
1927
  oIcon.addStyleClass("sapMVarMngmtRolesEdit");
1990
1928
  oIcon.setTooltip(this._oRb.getText("VARIANT_MANAGEMENT_VISIBILITY_ICON_TT"));
1991
- oRolesCell = new HBox({
1929
+ oRolesCell = new HBox(sIdPrefix + "-role-" + nPos, {
1992
1930
  items: [oText, oIcon]
1993
1931
  });
1994
1932
  } else {
1995
1933
  oRolesCell = new Text();
1996
1934
  }
1997
1935
 
1936
+
1998
1937
  return new ColumnListItem({
1999
1938
  cells: [
2000
- oFavoriteIcon, oNameControl, new Text({
1939
+ oFavoriteIcon, oNameControl, new Text(sIdPrefix + "-type-" + nPos, {
2001
1940
  text: {
2002
1941
  path: "sharing",
2003
- model: this._sModelName,
1942
+ model: sModelName,
2004
1943
  formatter: function(sValue) {
2005
1944
  return this._oRb.getText(sValue === "private" ? "VARIANT_MANAGEMENT_PRIVATE" : "VARIANT_MANAGEMENT_PUBLIC");
2006
1945
  }.bind(this)
2007
1946
  },
2008
1947
  textAlign: "Center"
2009
- }), new RadioButton({
1948
+ }), new RadioButton(sIdPrefix + "-def-" + nPos, {
2010
1949
  groupName: this.getId(),
2011
1950
  select: fSelectRB,
2012
1951
  selected: {
2013
- path: sBindingPath + "/defaultVariant",
2014
- model: this._sModelName,
1952
+ path: "/defaultKey",
1953
+ model: sModelName,
2015
1954
  formatter: function(sKey) {
2016
- return oItem.key === sKey;
1955
+ return oItem.getKey() === sKey;
2017
1956
  }
2018
1957
  }
2019
- }), oExecuteOnSelectCtrl, oRolesCell, new Text({
2020
- text: '{' + this._sModelName + ">author}",
1958
+ }), oExecuteOnSelectCtrl, oRolesCell, new Text(sIdPrefix + "-author-" + nPos, {
1959
+ text: '{' + sModelName + ">author}",
2021
1960
  textAlign: "Begin"
2022
1961
  }), oDeleteButton, new Text({
2023
- text: '{' + this._sModelName + ">key}"
1962
+ text: '{' + sModelName + ">key}"
2024
1963
  })
2025
1964
  ]
2026
1965
  });
2027
1966
  };
2028
1967
 
1968
+
2029
1969
  VariantManagement.prototype._openManagementDialog = function() {
2030
1970
  this._createManagementDialog();
2031
1971
 
@@ -2036,39 +1976,25 @@ sap.ui.define([
2036
1976
  this._suspendManagementTableBinding();
2037
1977
 
2038
1978
  this._clearDeletedItems();
2039
- // this.oManagementSave.setEnabled(false);
1979
+ this._clearRenamedItems();
1980
+ this._sDefaultKey = this.getDefaultKey();
1981
+ this._sOriginalDefaultKey = this._sDefaultKey;
1982
+
1983
+
2040
1984
  this._oSearchFieldOnMgmtDialog.setValue("");
2041
1985
 
2042
- // Ideally, this should be done only once in <code>_createtManagementDialog</code>. However, the binding does not recognize a change if filtering is involved.
1986
+ // Ideally, this should be done only once in <code>_createManagementDialog</code>. However, the binding does not recognize a change if filtering is involved.
2043
1987
  // After a deletion on the UI, the item is filtered out <code>.visible=false</code>. The real deletion will occur only when <i>OK</i> is pressed.
2044
1988
  // Since the filtered items and the result after the real deletion are identical, no change is detected. Based on this, the context on the table is
2045
1989
  // not invalidated....
2046
1990
  // WA: Always do the binding while opening the dialog.
2047
1991
  if (this._bDeleteOccured) {
2048
1992
  this._bDeleteOccured = false;
2049
- this.oManagementTable.bindAggregation("items", {
2050
- path: "variants",
2051
- model: this._sModelName,
2052
- factory: this._templateFactoryManagementDialog.bind(this),
2053
- filters: this._getVisibleFilter()
2054
- });
2055
- }
2056
-
2057
- this.oManagementDialog.open();
2058
- };
2059
1993
 
2060
- VariantManagement.prototype._assignColumnInfoForDeleteButton = function(oDeleteButton) {
2061
- if (!this._oInvisibleDeleteColumnName) {
2062
- this._oInvisibleDeleteColumnName = new InvisibleText({
2063
- text: this._oRb.getText("VARIANT_MANAGEMENT_ACTION_COLUMN")
2064
- });
2065
-
2066
- this.oManagementDialog.addContent(this._oInvisibleDeleteColumnName);
1994
+ this.oManagementTable.getBinding("items").filter(this._getVisibleFilter());
2067
1995
  }
2068
1996
 
2069
- if (this._oInvisibleDeleteColumnName) {
2070
- oDeleteButton.addAriaLabelledBy(this._oInvisibleDeleteColumnName);
2071
- }
1997
+ this.oManagementDialog.open();
2072
1998
  };
2073
1999
 
2074
2000
  VariantManagement.prototype._toggleIconActivityState = function(oIcon, oItem, bToInActive) {
@@ -2076,7 +2002,7 @@ sap.ui.define([
2076
2002
  return;
2077
2003
  }
2078
2004
 
2079
- if (oItem.key === this.getStandardVariantKey()) {
2005
+ if (oItem.getKey() === this.getStandardVariantKey()) {
2080
2006
  return;
2081
2007
  }
2082
2008
 
@@ -2089,19 +2015,36 @@ sap.ui.define([
2089
2015
  }
2090
2016
  };
2091
2017
 
2018
+
2019
+ VariantManagement.prototype._handleManageTitleChange = function(oInput, oItem) {
2020
+ this._checkVariantNameConstraints(oInput, oItem.getKey());
2021
+
2022
+ this._addRenamedItem(oItem);
2023
+ };
2024
+
2092
2025
  VariantManagement.prototype._handleManageDefaultVariantChange = function(oRadioButton, oItem, bSelected) {
2093
- var sKey = oItem.key;
2026
+ var sKey = oItem.getKey();
2094
2027
 
2095
2028
  if (oRadioButton) {
2096
2029
  var oIcon = oRadioButton.getParent().getCells()[VariantManagement.COLUMN_FAV_IDX];
2097
2030
 
2098
2031
  if (bSelected) {
2099
- if (this.getShowFavorites() && !oItem.favorite) {
2100
- oItem.favorite = true;
2101
- this._setFavoriteIcon(oIcon, true);
2032
+ if (this.getSupportFavorites() && !oItem.getFavorite()) {
2033
+ oItem.setFavorite(true);
2034
+
2035
+ var oRow = this._getRowForKey(oItem.getKey());
2036
+ if (oRow) {
2037
+ var aCells = oRow.getCells();
2038
+ if (aCells) {
2039
+ oIcon = aCells[VariantManagement.COLUMN_FAV_IDX];
2040
+ this._setFavoriteIcon(oIcon, true);
2041
+
2042
+ aCells[VariantManagement.COLUMN_FAV_IDX + 3].focus(); // focus on default
2043
+ }
2044
+ }
2102
2045
  }
2103
2046
 
2104
- this.setDefaultVariantKey(sKey);
2047
+ this.setDefaultKey(sKey);
2105
2048
  }
2106
2049
 
2107
2050
  this._toggleIconActivityState(oIcon, oItem, bSelected);
@@ -2109,51 +2052,74 @@ sap.ui.define([
2109
2052
  };
2110
2053
 
2111
2054
  VariantManagement.prototype._handleManageCancelPressed = function() {
2112
- var sDefaultVariantKey;
2113
- var oModel;
2114
- this._getDeletedItems().forEach(function(oItem) {
2115
- oItem.visible = true;
2116
- });
2117
2055
 
2118
- this._getItems().forEach(function(oItem) {
2119
- oItem.title = oItem.originalTitle;
2120
- oItem.favorite = oItem.originalFavorite;
2121
- oItem.executeOnSelect = oItem.originalExecuteOnSelect;
2122
- oItem.contexts = oItem.originalContexts;
2056
+ if (this._getDeletedItems().length > 0) {
2057
+ this._bDeleteOccured = true;
2058
+
2059
+ this._getDeletedItems().forEach(function(sKey) {
2060
+ var oItem = this._getItemByKey(sKey);
2061
+ if (oItem) {
2062
+ oItem.setVisible(true);
2063
+ }
2064
+ }.bind(this));
2065
+ }
2066
+
2067
+ this.getItems().forEach(function(oItem) {
2068
+ if (oItem.getVisible()) {
2069
+ oItem.setTitle(oItem.getOriginalTitle());
2070
+ oItem.setFavorite(oItem.getOriginalFavorite());
2071
+ oItem.setExecuteOnSelect(oItem.getOriginalExecuteOnSelect());
2072
+ oItem.setContexts(oItem.getOriginalContexts());
2073
+ }
2123
2074
  });
2124
2075
 
2125
- sDefaultVariantKey = this.getOriginalDefaultVariantKey();
2126
- if (sDefaultVariantKey !== this.getDefaultVariantKey()) {
2127
- this.setDefaultVariantKey(sDefaultVariantKey);
2076
+ if (this._sOriginalDefaultKey !== this.getDefaultKey()) {
2077
+ this.setDefaultKey(this._sOriginalDefaultKey);
2128
2078
  }
2129
2079
 
2130
- oModel = this.getModel(this._sModelName);
2131
- if (oModel) {
2132
- oModel.checkUpdate();
2080
+ this._clearRenamedItems();
2081
+ this._clearDeletedItems();
2082
+
2083
+ if (this._oManagedObjectModel) {
2084
+ this._oManagedObjectModel.checkUpdate();
2133
2085
  }
2086
+
2087
+ this.fireManageCancel();
2088
+
2089
+ //fireManageCancel may have deleted the ManageViews dialog
2090
+ // if (this.oManagementDialog) {
2091
+ // this.oManagementTable.getBinding("items").filter(this._getVisibleFilter());
2092
+ // }
2134
2093
  };
2135
2094
 
2136
2095
  VariantManagement.prototype._handleManageFavoriteChanged = function(oIcon, oItem) {
2137
2096
  // if (!this._anyInErrorState(this.oManagementTable)) {
2138
2097
  // this.oManagementSave.setEnabled(true);
2139
2098
  // }
2140
- if (this.getStandardVariantKey() === oItem.key) {
2099
+ if (this.getStandardVariantKey() === oItem.getKey()) {
2141
2100
  return;
2142
2101
  }
2143
2102
 
2144
- if ((this.getDefaultVariantKey() === oItem.key) && oItem.favorite) {
2103
+ if ((this.getDefaultKey() === oItem.getKey()) && oItem.getFavorite()) {
2145
2104
  return;
2146
2105
  }
2147
2106
 
2148
- oItem.favorite = !oItem.favorite;
2149
- this._setFavoriteIcon(oIcon, oItem.favorite);
2107
+ oItem.setFavorite(!oItem.getFavorite());
2108
+ var oRow = this._getRowForKey(oItem.getKey());
2109
+ if (oRow) {
2110
+ oRow.getCells()[VariantManagement.COLUMN_FAV_IDX].focus();
2111
+ }
2150
2112
  };
2151
2113
 
2114
+
2115
+
2152
2116
  VariantManagement.prototype._getRowForKey = function(sKey) {
2153
2117
  var oRowForKey = null;
2154
2118
  if (this.oManagementTable) {
2155
2119
  this.oManagementTable.getItems().some(function(oRow) {
2156
- if (sKey === oRow.getCells()[0].getBindingContext(this._sModelName).getObject().key) {
2120
+ var oColumnItem = oRow.getCells()[0].getParent();
2121
+ var oItem = this.getModel("$mVariants").getObject(oColumnItem.getBindingContextPath());
2122
+ if (sKey === oItem.getKey()) {
2157
2123
  oRowForKey = oRow;
2158
2124
  }
2159
2125
 
@@ -2164,50 +2130,104 @@ sap.ui.define([
2164
2130
  return oRowForKey;
2165
2131
  };
2166
2132
 
2133
+ VariantManagement.prototype._determineIndex = function(sPath) {
2134
+ var nIdx = -1;
2135
+ var nPos = sPath.indexOf('/', 1);
2136
+ if (nPos > 0) {
2137
+ nIdx = parseInt(sPath.substring(nPos + 1));
2138
+ }
2139
+
2140
+ return nIdx;
2141
+ };
2142
+
2167
2143
  VariantManagement.prototype._handleManageDeletePressed = function(oItem) {
2168
- var oModel;
2169
- var sKey = oItem.key;
2144
+ var sKey = oItem.getKey();
2170
2145
 
2171
2146
  // do not allow the deletion of the standard
2172
2147
  if (this.getStandardVariantKey() === sKey) {
2173
2148
  return;
2174
2149
  }
2175
2150
 
2176
- oItem.visible = false;
2151
+ oItem.setVisible(false);
2177
2152
  this._addDeletedItem(oItem);
2178
2153
 
2179
- if ((sKey === this.getDefaultVariantKey())) {
2180
- this.setDefaultVariantKey(this.getStandardVariantKey());
2181
- if (this.getShowFavorites()) {
2154
+ if (sKey === this.getDefaultKey()) {
2155
+ this.setDefaultKey(this.getStandardVariantKey());
2156
+ if (this.getSupportFavorites()) {
2182
2157
  var oNewDefaultItem = this._getItemByKey(this.getStandardVariantKey());
2183
- if (oNewDefaultItem && !oNewDefaultItem.favorite) {
2158
+ if (oNewDefaultItem && !oNewDefaultItem.getFavorite()) {
2184
2159
  var oRow = this._getRowForKey(this.getStandardVariantKey());
2185
2160
  if (oRow) {
2186
- oNewDefaultItem.favorite = true;
2161
+ oNewDefaultItem.setFavorite(true);
2187
2162
  this._setFavoriteIcon(oRow.getCells()[VariantManagement.COLUMN_FAV_IDX], true);
2188
2163
  }
2189
2164
  }
2190
2165
  }
2191
2166
  }
2192
2167
 
2193
- oModel = this.getModel(this._sModelName);
2194
- if (oModel) {
2195
- oModel.checkUpdate();
2196
- }
2168
+ // var oModel = this.oManagementTable.getModel("$mVariants");
2169
+ // if (oModel) {
2170
+ // oModel.checkUpdate();
2171
+ // }
2172
+
2173
+ this.oManagementTable.getBinding("items").filter(this._getVisibleFilter());
2197
2174
 
2198
2175
  this.oManagementCancel.focus();
2199
2176
  };
2200
2177
 
2201
- VariantManagement.prototype._handleManageExecuteOnSelectionChanged = function() {
2202
- // if (!this._anyInErrorState(this.oManagementTable)) {
2203
- // this.oManagementSave.setEnabled(true);
2204
- // }
2178
+ VariantManagement.prototype._collectManageData = function() {
2179
+
2180
+ var oVariantInfo = {};
2181
+
2182
+ var sDefault = this.getDefaultKey();
2183
+ if (sDefault !== this._sOriginalDefaultKey){
2184
+ oVariantInfo.def = sDefault;
2185
+ }
2186
+
2187
+ this.getItems().forEach(function(oItem) {
2188
+
2189
+ if (!oItem.getVisible()) {
2190
+ if (!oVariantInfo.deleted) {
2191
+ oVariantInfo.deleted = [];
2192
+ }
2193
+ oVariantInfo.deleted.push(oItem.getKey());
2194
+ }
2195
+
2196
+ if (oItem.getVisible() && (oItem.getFavorite() !== oItem.getOriginalFavorite())) {
2197
+ if (!oVariantInfo.fav) {
2198
+ oVariantInfo.fav = [];
2199
+ }
2200
+ oVariantInfo.fav.push({ key: oItem.getKey(), visible: oItem.getFavorite()});
2201
+ }
2202
+
2203
+ if (oItem.getVisible() && (oItem.getTitle() !== oItem.getOriginalTitle())) {
2204
+ if (!oVariantInfo.renamed) {
2205
+ oVariantInfo.renamed = [];
2206
+ }
2207
+ oVariantInfo.renamed.push({ key: oItem.getKey(), name: oItem.getTitle()});
2208
+ }
2209
+
2210
+ if (oItem.getVisible() && (oItem.getExecuteOnSelect() !== oItem.getOriginalExecuteOnSelect())) {
2211
+ if (!oVariantInfo.exe) {
2212
+ oVariantInfo.exe = [];
2213
+ }
2214
+ oVariantInfo.exe.push({ key: oItem.getKey(), exe: oItem.getExecuteOnSelect()});
2215
+ }
2216
+
2217
+ if (oItem.getVisible() && this._hasContextsChanged(oItem)) {
2218
+ if (!oVariantInfo.contexts) {
2219
+ oVariantInfo.contexts = [];
2220
+ }
2221
+ oVariantInfo.contexts.push({ key: oItem.getKey(), contexts: oItem.getContexts()});
2222
+ }
2223
+
2224
+ }.bind(this));
2225
+
2226
+ return oVariantInfo;
2205
2227
  };
2206
2228
 
2207
- VariantManagement.prototype._handleManageTitleChanged = function() {
2208
- // if (!this._anyInErrorState(this.oManagementTable)) {
2209
- // this.oManagementSave.setEnabled(true);
2210
- // }
2229
+ VariantManagement.prototype._hasContextsChanged = function(oItem) {
2230
+ return (JSON.stringify(oItem.getContexts()) !== JSON.stringify(oItem.getOriginalContexts()));
2211
2231
  };
2212
2232
 
2213
2233
  VariantManagement.prototype._handleManageSavePressed = function() {
@@ -2215,12 +2235,14 @@ sap.ui.define([
2215
2235
  return;
2216
2236
  }
2217
2237
 
2218
- this._getDeletedItems().some(function(oItem) {
2219
- if (oItem.key === this.getCurrentVariantKey()) {
2238
+ this.oManagementDialog.close();
2239
+
2240
+ this._getDeletedItems().some(function(sItemKey) {
2241
+ if (sItemKey === this.getSelectedKey()) {
2220
2242
  var sKey = this.getStandardVariantKey();
2221
2243
 
2222
2244
  this.setModified(false);
2223
- this.setCurrentVariantKey(sKey);
2245
+ this.setSelectedKey(sKey);
2224
2246
 
2225
2247
  this.fireSelect({
2226
2248
  key: sKey
@@ -2231,12 +2253,19 @@ sap.ui.define([
2231
2253
  return false;
2232
2254
  }.bind(this));
2233
2255
 
2234
- this.fireManage({
2256
+ if (this._getRenamedItems().indexOf(this.getSelectedKey()) >= 0) {
2257
+ var oBinding = this.oVariantText.getBinding("text");
2258
+ if (oBinding) {
2259
+ oBinding.checkUpdate(true);
2260
+ }
2261
+ }
2235
2262
 
2236
- });
2263
+ this.fireManage(this._collectManageData());
2237
2264
 
2238
- this._resumeManagementTableBinding();
2239
- this.oManagementDialog.close();
2265
+ // the manage views dialog may be deleted.
2266
+ if (this.oManagementDialog) {
2267
+ this._resumeManagementTableBinding();
2268
+ }
2240
2269
  };
2241
2270
 
2242
2271
  VariantManagement.prototype._resumeManagementTableBinding = function() {
@@ -2257,14 +2286,28 @@ sap.ui.define([
2257
2286
  }
2258
2287
  };
2259
2288
 
2260
- VariantManagement.prototype._anyInErrorState = function(oManagementTable) {
2261
- var aItems;
2289
+ VariantManagement.prototype._focusOnFirstInputInErrorState = function(oManagementTable) {
2290
+ if (oManagementTable) {
2291
+ oManagementTable.getItems().some(function(oItem) {
2292
+ var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
2293
+ if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
2294
+ oInput.getDomRef().scrollIntoView();
2295
+ oInput.focus();
2296
+ return true;
2297
+ }
2298
+
2299
+ return false;
2300
+ });
2301
+ }
2302
+ };
2303
+
2304
+
2305
+ VariantManagement.prototype._anyInErrorStateManageTable = function(oManagementTable) {
2262
2306
  var oInput;
2263
2307
  var bInError = false;
2264
2308
 
2265
2309
  if (oManagementTable) {
2266
- aItems = oManagementTable.getItems();
2267
- aItems.some(function(oItem) {
2310
+ oManagementTable.getItems().some(function(oItem) {
2268
2311
  oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
2269
2312
  if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
2270
2313
  bInError = true;
@@ -2276,6 +2319,42 @@ sap.ui.define([
2276
2319
  return bInError;
2277
2320
  };
2278
2321
 
2322
+ VariantManagement.prototype._anyInErrorState = function(oManagementTable) {
2323
+ if (this._anyInErrorStateManageTable(oManagementTable)) {
2324
+ return true;
2325
+ }
2326
+
2327
+ var aRenamedKeys = this._getRenamedItems();
2328
+
2329
+ for (var i = aRenamedKeys.length - 1; i >= 0; i--) {
2330
+ var oItem = this._getItemByKey(aRenamedKeys[i]);
2331
+ if (oItem) {
2332
+ if (oItem.getTitle() === oItem.getOriginalTitle()) {
2333
+ this._removeRenamedItem(oItem);
2334
+ }
2335
+ }
2336
+ }
2337
+
2338
+ var bError = false;
2339
+ this._getRenamedItems().some(function(sKey, nIdx) {
2340
+ var oItem = this._getItemByKey(sKey);
2341
+ if (oItem) {
2342
+ bError = this._checkIsDuplicateInModel(oItem.getTitle(), sKey);
2343
+ }
2344
+ return bError;
2345
+
2346
+ }.bind(this));
2347
+
2348
+ if (bError) {
2349
+ this._oSearchFieldOnMgmtDialog.setValue("");
2350
+ this._triggerSearchInManageDialogByValue("", oManagementTable);
2351
+
2352
+ this._focusOnFirstInputInErrorState(oManagementTable);
2353
+ }
2354
+
2355
+ return bError;
2356
+ };
2357
+
2279
2358
  // UTILS
2280
2359
 
2281
2360
  VariantManagement.prototype._getFilters = function(oFilter) {
@@ -2287,7 +2366,7 @@ sap.ui.define([
2287
2366
 
2288
2367
  aFilters.push(this._getVisibleFilter());
2289
2368
 
2290
- if (this.getShowFavorites()) {
2369
+ if (this.getSupportFavorites()) {
2291
2370
  aFilters.push(this._getFilterFavorites());
2292
2371
  }
2293
2372
 
@@ -2311,12 +2390,12 @@ sap.ui.define([
2311
2390
  };
2312
2391
 
2313
2392
 
2314
- VariantManagement.prototype._verifyVariantNameConstraints = function(oInputField, sKey) {
2393
+ VariantManagement.prototype._verifyVariantNameConstraints = function(oInputField, sKey, sTitle) {
2315
2394
  if (!oInputField) {
2316
2395
  return;
2317
2396
  }
2318
2397
 
2319
- var sValue = oInputField.getValue();
2398
+ var sValue = sTitle || oInputField.getValue();
2320
2399
  sValue = sValue.trim();
2321
2400
 
2322
2401
  if (!this._checkIsDuplicate(sValue, sKey)) {
@@ -2339,7 +2418,13 @@ sap.ui.define([
2339
2418
  }
2340
2419
  } else {
2341
2420
  oInputField.setValueState(ValueState.Error);
2342
- oInputField.setValueStateText(this._oRb.getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE"));
2421
+
2422
+ if (this._oSearchFieldOnMgmtDialog && this._oSearchFieldOnMgmtDialog.getValue()) {
2423
+ oInputField.setValueStateText(this._oRb.getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE_SAVE"));
2424
+ } else {
2425
+ oInputField.setValueStateText(this._oRb.getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE"));
2426
+ }
2427
+
2343
2428
  }
2344
2429
  };
2345
2430
 
@@ -2358,11 +2443,11 @@ sap.ui.define([
2358
2443
  if (this.oManagementTable) {
2359
2444
  aItems = this.oManagementTable.getItems();
2360
2445
  aItems.some(function(oItem) {
2361
- var oObject = oItem.getBindingContext(this._sModelName).getObject();
2362
- if (oObject && oObject.visible) {
2446
+ var oObject = oItem.getBindingContext("$mVariants").getObject();
2447
+ if (oObject && oObject.getVisible()) {
2363
2448
  var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
2364
2449
  if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
2365
- this._verifyVariantNameConstraints(oInput, oObject.key);
2450
+ this._verifyVariantNameConstraints(oInput, oObject.getKey());
2366
2451
  if (oInput.getValueState() === ValueState.Error) {
2367
2452
  bInError = true;
2368
2453
  }
@@ -2378,7 +2463,10 @@ sap.ui.define([
2378
2463
 
2379
2464
  VariantManagement.prototype._checkIsDuplicate = function(sValue, sKey) {
2380
2465
  if (this.oManagementDialog && this.oManagementDialog.isOpen()) {
2381
- return this._checkIsDuplicateInManageTable(sValue, sKey);
2466
+ var bResult = this._checkIsDuplicateInManageTable(sValue, sKey);
2467
+ if (this._oSearchFieldOnMgmtDialog && this._oSearchFieldOnMgmtDialog.getValue() && bResult) {
2468
+ return bResult;
2469
+ }
2382
2470
  }
2383
2471
 
2384
2472
  return this._checkIsDuplicateInModel(sValue, sKey);
@@ -2389,8 +2477,8 @@ sap.ui.define([
2389
2477
  var aItems = this._getItems();
2390
2478
  var sLowerCaseValue = sValue.toLowerCase();
2391
2479
  aItems.some(function(oItem) {
2392
- if (oItem.title.toLowerCase() === sLowerCaseValue) {
2393
- if (sKey && (sKey === oItem.key)) {
2480
+ if (oItem.getTitle().toLowerCase() === sLowerCaseValue) {
2481
+ if (sKey && (sKey === oItem.getKey())) {
2394
2482
  return false;
2395
2483
  }
2396
2484
  bDublicate = true;
@@ -2411,11 +2499,11 @@ sap.ui.define([
2411
2499
  aItems = this.oManagementTable.getItems();
2412
2500
  aItems.some(function(oItem) {
2413
2501
  var sTitleLowerCase;
2414
- var oObject = oItem.getBindingContext(this._sModelName).getObject();
2415
- if (oObject && oObject.visible) {
2502
+ var oObject = oItem.getBindingContext("$mVariants").getObject();
2503
+ if (oObject && oObject.getVisible()) {
2416
2504
  var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
2417
2505
 
2418
- if (oInput && (oObject.key !== sKey)) {
2506
+ if (oInput && (oObject.getKey() !== sKey)) {
2419
2507
  if (oInput.isA("sap.m.Input")) {
2420
2508
  sTitleLowerCase = oInput.getValue().toLowerCase();
2421
2509
  } else {
@@ -2427,7 +2515,7 @@ sap.ui.define([
2427
2515
  }
2428
2516
  }
2429
2517
  return bInError;
2430
- }.bind(this));
2518
+ });
2431
2519
  }
2432
2520
 
2433
2521
  return bInError;
@@ -2437,7 +2525,11 @@ sap.ui.define([
2437
2525
  VariantManagement.prototype.exit = function() {
2438
2526
  var oModel;
2439
2527
 
2440
- if (this.oVariantInvisibleText) {
2528
+ Control.prototype.exit.apply(this, arguments);
2529
+ this._clearDeletedItems();
2530
+ this._clearRenamedItems();
2531
+
2532
+ if (this.oVariantInvisibleText && !this.oVariantInvisibleText._bIsBeingDestroyed) {
2441
2533
  this.oVariantInvisibleText.destroy(true);
2442
2534
  this.oVariantInvisibleText = undefined;
2443
2535
  }
@@ -2471,18 +2563,21 @@ sap.ui.define([
2471
2563
  this.oVariantPopoverTrigger = undefined;
2472
2564
  this._oSearchField = undefined;
2473
2565
  this._oSearchFieldOnMgmtDialog = undefined;
2566
+ this._sDefaultKey = undefined;
2474
2567
 
2475
2568
  oModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
2476
2569
  if (oModel) {
2477
2570
  oModel.destroy();
2478
2571
  }
2572
+ if (this._oManagedObjectModel) {
2573
+ this._oManagedObjectModel.destroy();
2574
+ this._oManagedObjectModel = undefined;
2575
+ }
2479
2576
 
2480
2577
  this._oRolesComponentContainer = null;
2481
- this._sStyleClass = null;
2482
2578
 
2483
- this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
2484
2579
 
2485
- if (this._oRolesDialog) {
2580
+ if (this._oRolesDialog && !this._oRolesDialog._bIsBeingDestroyed) {
2486
2581
  this._oRolesDialog.destroy();
2487
2582
  this._oRolesDialog = null;
2488
2583
  }