@openui5/sap.m 1.71.44 → 1.71.47

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 (304) hide show
  1. package/LICENSE.txt +1 -1
  2. package/package.json +4 -4
  3. package/src/sap/m/.library +1 -1
  4. package/src/sap/m/AccButton.js +1 -1
  5. package/src/sap/m/ActionListItem.js +1 -1
  6. package/src/sap/m/ActionSelect.js +1 -1
  7. package/src/sap/m/ActionSheet.js +1 -1
  8. package/src/sap/m/App.js +1 -1
  9. package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
  10. package/src/sap/m/Bar.js +1 -1
  11. package/src/sap/m/Breadcrumbs.js +1 -1
  12. package/src/sap/m/BusyDialog.js +1 -1
  13. package/src/sap/m/BusyIndicator.js +1 -1
  14. package/src/sap/m/Button.js +1 -1
  15. package/src/sap/m/Carousel.js +1 -1
  16. package/src/sap/m/CarouselLayout.js +1 -1
  17. package/src/sap/m/CheckBox.js +1 -1
  18. package/src/sap/m/ColorPalette.js +1 -1
  19. package/src/sap/m/ColorPalettePopover.js +1 -1
  20. package/src/sap/m/Column.js +1 -1
  21. package/src/sap/m/ColumnHeaderPopover.js +1 -1
  22. package/src/sap/m/ColumnListItem.js +1 -1
  23. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  24. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  25. package/src/sap/m/ColumnPopoverItem.js +1 -1
  26. package/src/sap/m/ColumnPopoverSortItem.js +1 -1
  27. package/src/sap/m/ComboBox.js +1 -1
  28. package/src/sap/m/ComboBoxBase.js +1 -1
  29. package/src/sap/m/ComboBoxTextField.js +1 -1
  30. package/src/sap/m/CustomListItem.js +1 -1
  31. package/src/sap/m/CustomTile.js +1 -1
  32. package/src/sap/m/CustomTreeItem.js +1 -1
  33. package/src/sap/m/DatePicker.js +1 -1
  34. package/src/sap/m/DateRangeSelection.js +2 -2
  35. package/src/sap/m/DateTimeField.js +1 -1
  36. package/src/sap/m/DateTimeInput.js +1 -1
  37. package/src/sap/m/DateTimePicker.js +1 -1
  38. package/src/sap/m/Dialog.js +161 -44
  39. package/src/sap/m/DialogRenderer.js +3 -2
  40. package/src/sap/m/DisplayListItem.js +1 -1
  41. package/src/sap/m/DraftIndicator.js +1 -1
  42. package/src/sap/m/FacetFilter.js +1 -1
  43. package/src/sap/m/FacetFilterItem.js +1 -1
  44. package/src/sap/m/FacetFilterList.js +1 -1
  45. package/src/sap/m/FeedContent.js +1 -1
  46. package/src/sap/m/FeedInput.js +1 -1
  47. package/src/sap/m/FeedListItem.js +1 -1
  48. package/src/sap/m/FeedListItemAction.js +1 -1
  49. package/src/sap/m/Fiori20Adapter.js +2 -2
  50. package/src/sap/m/FlexBox.js +1 -1
  51. package/src/sap/m/FlexItemData.js +1 -1
  52. package/src/sap/m/FormattedText.js +13 -9
  53. package/src/sap/m/GenericTag.js +1 -1
  54. package/src/sap/m/GenericTile.js +1 -1
  55. package/src/sap/m/GroupHeaderListItem.js +1 -1
  56. package/src/sap/m/GrowingList.js +1 -1
  57. package/src/sap/m/HBox.js +1 -1
  58. package/src/sap/m/HeaderContainer.js +1 -1
  59. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  60. package/src/sap/m/IconTabBar.js +1 -1
  61. package/src/sap/m/IconTabBarSelectList.js +1 -1
  62. package/src/sap/m/IconTabFilter.js +1 -1
  63. package/src/sap/m/IconTabHeader.js +1 -1
  64. package/src/sap/m/IconTabSeparator.js +1 -1
  65. package/src/sap/m/Image.js +1 -1
  66. package/src/sap/m/ImageContent.js +1 -1
  67. package/src/sap/m/Input.js +1 -1
  68. package/src/sap/m/InputBase.js +1 -1
  69. package/src/sap/m/InputListItem.js +1 -1
  70. package/src/sap/m/Label.js +1 -1
  71. package/src/sap/m/LightBox.js +1 -1
  72. package/src/sap/m/LightBoxItem.js +1 -1
  73. package/src/sap/m/Link.js +2 -2
  74. package/src/sap/m/LinkRenderer.js +1 -2
  75. package/src/sap/m/List.js +1 -1
  76. package/src/sap/m/ListBase.js +1 -1
  77. package/src/sap/m/ListItemBase.js +1 -1
  78. package/src/sap/m/MaskEnabler.js +1 -1
  79. package/src/sap/m/MaskInput.js +1 -1
  80. package/src/sap/m/MaskInputRule.js +1 -1
  81. package/src/sap/m/Menu.js +1 -1
  82. package/src/sap/m/MenuButton.js +1 -1
  83. package/src/sap/m/MenuItem.js +1 -1
  84. package/src/sap/m/MenuListItem.js +1 -1
  85. package/src/sap/m/MessageItem.js +1 -1
  86. package/src/sap/m/MessageListItem.js +1 -1
  87. package/src/sap/m/MessagePage.js +1 -1
  88. package/src/sap/m/MessagePopover.js +1 -1
  89. package/src/sap/m/MessagePopoverItem.js +1 -1
  90. package/src/sap/m/MessageStrip.js +2 -2
  91. package/src/sap/m/MessageToast.js +1 -1
  92. package/src/sap/m/MessageView.js +1 -1
  93. package/src/sap/m/MultiComboBox.js +1 -1
  94. package/src/sap/m/MultiEditField.js +1 -1
  95. package/src/sap/m/MultiInput.js +35 -2
  96. package/src/sap/m/NavContainer.js +1 -1
  97. package/src/sap/m/NewsContent.js +1 -1
  98. package/src/sap/m/NotificationListBase.js +1 -1
  99. package/src/sap/m/NotificationListGroup.js +1 -1
  100. package/src/sap/m/NotificationListItem.js +1 -1
  101. package/src/sap/m/NumericContent.js +1 -1
  102. package/src/sap/m/ObjectAttribute.js +1 -1
  103. package/src/sap/m/ObjectHeader.js +17 -7
  104. package/src/sap/m/ObjectIdentifier.js +1 -1
  105. package/src/sap/m/ObjectListItem.js +1 -1
  106. package/src/sap/m/ObjectMarker.js +1 -1
  107. package/src/sap/m/ObjectNumber.js +1 -1
  108. package/src/sap/m/ObjectStatus.js +1 -1
  109. package/src/sap/m/OverflowToolbar.js +7 -3
  110. package/src/sap/m/OverflowToolbarAssociativePopover.js +4 -2
  111. package/src/sap/m/OverflowToolbarButton.js +1 -1
  112. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  113. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  114. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  115. package/src/sap/m/P13nColumnsItem.js +1 -1
  116. package/src/sap/m/P13nColumnsPanel.js +1 -1
  117. package/src/sap/m/P13nConditionPanel.js +6 -1
  118. package/src/sap/m/P13nDialog.js +1 -1
  119. package/src/sap/m/P13nDimMeasureItem.js +1 -1
  120. package/src/sap/m/P13nDimMeasurePanel.js +1 -1
  121. package/src/sap/m/P13nFilterItem.js +1 -1
  122. package/src/sap/m/P13nFilterPanel.js +1 -1
  123. package/src/sap/m/P13nGroupItem.js +1 -1
  124. package/src/sap/m/P13nGroupPanel.js +1 -1
  125. package/src/sap/m/P13nItem.js +1 -1
  126. package/src/sap/m/P13nPanel.js +1 -1
  127. package/src/sap/m/P13nSelectionItem.js +1 -1
  128. package/src/sap/m/P13nSelectionPanel.js +1 -1
  129. package/src/sap/m/P13nSortItem.js +1 -1
  130. package/src/sap/m/P13nSortPanel.js +1 -1
  131. package/src/sap/m/PDFViewer.js +2 -1
  132. package/src/sap/m/PDFViewerRenderer.js +15 -7
  133. package/src/sap/m/Page.js +1 -1
  134. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  135. package/src/sap/m/PagingButton.js +1 -1
  136. package/src/sap/m/Panel.js +1 -1
  137. package/src/sap/m/PlanningCalendar.js +1 -1
  138. package/src/sap/m/PlanningCalendarHeader.js +1 -1
  139. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  140. package/src/sap/m/PlanningCalendarRow.js +1 -1
  141. package/src/sap/m/PlanningCalendarView.js +1 -1
  142. package/src/sap/m/Popover.js +112 -70
  143. package/src/sap/m/ProgressIndicator.js +1 -1
  144. package/src/sap/m/PullToRefresh.js +1 -1
  145. package/src/sap/m/QuickView.js +1 -1
  146. package/src/sap/m/QuickViewBase.js +1 -1
  147. package/src/sap/m/QuickViewCard.js +1 -1
  148. package/src/sap/m/QuickViewGroup.js +1 -1
  149. package/src/sap/m/QuickViewGroupElement.js +1 -1
  150. package/src/sap/m/QuickViewPage.js +1 -1
  151. package/src/sap/m/RadioButton.js +148 -212
  152. package/src/sap/m/RadioButtonGroup.js +66 -64
  153. package/src/sap/m/RadioButtonGroupRenderer.js +31 -38
  154. package/src/sap/m/RadioButtonRenderer.js +94 -108
  155. package/src/sap/m/RangeSlider.js +1 -1
  156. package/src/sap/m/RangeSliderRenderer.js +8 -8
  157. package/src/sap/m/RatingIndicator.js +1 -1
  158. package/src/sap/m/ResponsivePopover.js +1 -1
  159. package/src/sap/m/ResponsiveScale.js +1 -1
  160. package/src/sap/m/ScrollBar.js +1 -1
  161. package/src/sap/m/ScrollContainer.js +1 -1
  162. package/src/sap/m/SearchField.js +1 -1
  163. package/src/sap/m/SegmentedButton.js +1 -1
  164. package/src/sap/m/SegmentedButtonItem.js +1 -1
  165. package/src/sap/m/Select.js +20 -2
  166. package/src/sap/m/SelectDialog.js +1 -1
  167. package/src/sap/m/SelectList.js +1 -1
  168. package/src/sap/m/SelectionDetails.js +1 -1
  169. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  170. package/src/sap/m/SelectionDetailsItem.js +1 -1
  171. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  172. package/src/sap/m/Shell.js +1 -1
  173. package/src/sap/m/SimpleFixFlex.js +1 -1
  174. package/src/sap/m/SinglePlanningCalendar.js +1 -1
  175. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  176. package/src/sap/m/SinglePlanningCalendarGrid.js +1 -1
  177. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
  178. package/src/sap/m/SinglePlanningCalendarMonthView.js +3 -2
  179. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  180. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  181. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  182. package/src/sap/m/SlideTile.js +1 -1
  183. package/src/sap/m/Slider.js +1 -1
  184. package/src/sap/m/SliderRenderer.js +0 -1
  185. package/src/sap/m/SliderTooltip.js +1 -1
  186. package/src/sap/m/SliderTooltipBase.js +1 -1
  187. package/src/sap/m/SliderTooltipContainer.js +1 -1
  188. package/src/sap/m/SplitApp.js +1 -1
  189. package/src/sap/m/SplitButton.js +1 -1
  190. package/src/sap/m/SplitContainer.js +1 -1
  191. package/src/sap/m/StandardListItem.js +1 -1
  192. package/src/sap/m/StandardTile.js +1 -1
  193. package/src/sap/m/StandardTreeItem.js +1 -1
  194. package/src/sap/m/StepInput.js +1 -1
  195. package/src/sap/m/StepInputRenderer.js +0 -3
  196. package/src/sap/m/SuggestionItem.js +1 -1
  197. package/src/sap/m/SuggestionsPopover.js +3 -2
  198. package/src/sap/m/Switch.js +2 -2
  199. package/src/sap/m/SwitchRenderer.js +1 -1
  200. package/src/sap/m/TabContainer.js +1 -1
  201. package/src/sap/m/TabContainerItem.js +1 -1
  202. package/src/sap/m/TabStrip.js +1 -1
  203. package/src/sap/m/TabStripItem.js +1 -1
  204. package/src/sap/m/Table.js +1 -1
  205. package/src/sap/m/TablePersoController.js +1 -1
  206. package/src/sap/m/TablePersoDialog.js +1 -1
  207. package/src/sap/m/TablePersoProvider.js +1 -1
  208. package/src/sap/m/TableSelectDialog.js +1 -1
  209. package/src/sap/m/Text.js +1 -1
  210. package/src/sap/m/TextArea.js +1 -1
  211. package/src/sap/m/Tile.js +1 -1
  212. package/src/sap/m/TileContainer.js +1 -1
  213. package/src/sap/m/TileContent.js +1 -1
  214. package/src/sap/m/TimePicker.js +49 -19
  215. package/src/sap/m/TimePickerSlider.js +1 -1
  216. package/src/sap/m/TimePickerSliders.js +1 -1
  217. package/src/sap/m/Title.js +1 -1
  218. package/src/sap/m/TitlePropagationSupport.js +1 -1
  219. package/src/sap/m/ToggleButton.js +1 -1
  220. package/src/sap/m/Token.js +1 -1
  221. package/src/sap/m/Tokenizer.js +3 -5
  222. package/src/sap/m/Toolbar.js +1 -1
  223. package/src/sap/m/ToolbarLayoutData.js +1 -1
  224. package/src/sap/m/ToolbarSeparator.js +1 -1
  225. package/src/sap/m/ToolbarSpacer.js +1 -1
  226. package/src/sap/m/Tree.js +1 -1
  227. package/src/sap/m/TreeItemBase.js +1 -1
  228. package/src/sap/m/UploadCollection.js +2 -2
  229. package/src/sap/m/UploadCollectionItem.js +1 -1
  230. package/src/sap/m/UploadCollectionParameter.js +1 -1
  231. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  232. package/src/sap/m/VBox.js +1 -1
  233. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  234. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  235. package/src/sap/m/ViewSettingsDialog.js +1 -1
  236. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  237. package/src/sap/m/ViewSettingsItem.js +1 -1
  238. package/src/sap/m/VisibleItem.js +1 -1
  239. package/src/sap/m/Wizard.js +1 -1
  240. package/src/sap/m/WizardProgressNavigator.js +1 -1
  241. package/src/sap/m/WizardStep.js +1 -1
  242. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  243. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  244. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  245. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  246. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  247. package/src/sap/m/delegate/ValueStateMessage.js +2 -0
  248. package/src/sap/m/designtime/messagebundle_de.properties +2 -2
  249. package/src/sap/m/library.js +2 -2
  250. package/src/sap/m/messagebundle_cs.properties +2 -2
  251. package/src/sap/m/messagebundle_fr.properties +6 -6
  252. package/src/sap/m/messagebundle_hr.properties +2 -2
  253. package/src/sap/m/messagebundle_it.properties +9 -9
  254. package/src/sap/m/messagebundle_iw.properties +1 -1
  255. package/src/sap/m/messagebundle_ko.properties +7 -7
  256. package/src/sap/m/messagebundle_nl.properties +4 -4
  257. package/src/sap/m/messagebundle_pt.properties +7 -7
  258. package/src/sap/m/messagebundle_sh.properties +1 -1
  259. package/src/sap/m/messagebundle_th.properties +1 -1
  260. package/src/sap/m/messagebundle_zh_CN.properties +1 -1
  261. package/src/sap/m/semantic/AddAction.js +1 -1
  262. package/src/sap/m/semantic/CancelAction.js +1 -1
  263. package/src/sap/m/semantic/DeleteAction.js +1 -1
  264. package/src/sap/m/semantic/DetailPage.js +1 -1
  265. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  266. package/src/sap/m/semantic/EditAction.js +1 -1
  267. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  268. package/src/sap/m/semantic/FilterAction.js +1 -1
  269. package/src/sap/m/semantic/FilterSelect.js +1 -1
  270. package/src/sap/m/semantic/FlagAction.js +1 -1
  271. package/src/sap/m/semantic/ForwardAction.js +1 -1
  272. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  273. package/src/sap/m/semantic/GroupAction.js +1 -1
  274. package/src/sap/m/semantic/GroupSelect.js +1 -1
  275. package/src/sap/m/semantic/MainAction.js +1 -1
  276. package/src/sap/m/semantic/MasterPage.js +1 -1
  277. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  278. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  279. package/src/sap/m/semantic/NegativeAction.js +1 -1
  280. package/src/sap/m/semantic/OpenInAction.js +1 -1
  281. package/src/sap/m/semantic/PositiveAction.js +1 -1
  282. package/src/sap/m/semantic/PrintAction.js +1 -1
  283. package/src/sap/m/semantic/SaveAction.js +1 -1
  284. package/src/sap/m/semantic/Segment.js +1 -1
  285. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  286. package/src/sap/m/semantic/SemanticButton.js +1 -1
  287. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  288. package/src/sap/m/semantic/SemanticControl.js +1 -1
  289. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  290. package/src/sap/m/semantic/SemanticPage.js +1 -1
  291. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  292. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  293. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  294. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  295. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  296. package/src/sap/m/semantic/ShareMenu.js +1 -1
  297. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  298. package/src/sap/m/semantic/SortAction.js +1 -1
  299. package/src/sap/m/semantic/SortSelect.js +1 -1
  300. package/src/sap/m/themes/base/Dialog.less +4 -66
  301. package/src/sap/m/themes/base/Popover.less +0 -1
  302. package/src/sap/m/themes/base/RadioButton.less +2 -2
  303. package/src/sap/m/upload/UploadSet.js +32 -2
  304. package/src/sap/m/upload/UploadSetItem.js +1 -1
@@ -8,10 +8,10 @@
8
8
  sap.ui.define([
9
9
  './library',
10
10
  'sap/ui/core/Control',
11
+ 'sap/ui/core/Core',
11
12
  'sap/ui/core/EnabledPropagator',
12
13
  'sap/ui/core/message/MessageMixin',
13
- './RadioButtonGroup',
14
- './Label',
14
+ 'sap/m/Label',
15
15
  'sap/ui/core/library',
16
16
  'sap/base/strings/capitalize',
17
17
  './RadioButtonRenderer'
@@ -19,9 +19,9 @@ sap.ui.define([
19
19
  function(
20
20
  library,
21
21
  Control,
22
+ Core,
22
23
  EnabledPropagator,
23
24
  MessageMixin,
24
- RadioButtonGroup,
25
25
  Label,
26
26
  coreLibrary,
27
27
  capitalize,
@@ -29,8 +29,6 @@ function(
29
29
  ) {
30
30
  "use strict";
31
31
 
32
-
33
-
34
32
  // shortcut for sap.ui.core.TextAlign
35
33
  var TextAlign = coreLibrary.TextAlign;
36
34
 
@@ -40,7 +38,12 @@ function(
40
38
  // shortcut for sap.ui.core.TextDirection
41
39
  var TextDirection = coreLibrary.TextDirection;
42
40
 
43
-
41
+ var getNextSelectionNumber = (function () {
42
+ var i = 0;
43
+ return function () {
44
+ return i++;
45
+ };
46
+ }());
44
47
 
45
48
  /**
46
49
  * Constructor for a new RadioButton.
@@ -84,7 +87,7 @@ function(
84
87
  * @implements sap.ui.core.IFormContent
85
88
  *
86
89
  * @author SAP SE
87
- * @version 1.71.44
90
+ * @version 1.71.47
88
91
  *
89
92
  * @constructor
90
93
  * @public
@@ -93,11 +96,9 @@ function(
93
96
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
94
97
  */
95
98
  var RadioButton = Control.extend("sap.m.RadioButton", /** @lends sap.m.RadioButton.prototype */ { metadata : {
96
-
97
99
  interfaces : ["sap.ui.core.IFormContent"],
98
100
  library : "sap.m",
99
101
  properties : {
100
-
101
102
  /**
102
103
  * Specifies if the radio button is disabled.
103
104
  */
@@ -178,7 +179,6 @@ function(
178
179
 
179
180
  },
180
181
  events : {
181
-
182
182
  /**
183
183
  * Event is triggered when the user makes a change on the radio button (selecting or unselecting it).
184
184
  */
@@ -193,7 +193,6 @@ function(
193
193
  }
194
194
  },
195
195
  associations : {
196
-
197
196
  /**
198
197
  * Association to controls / IDs which describe this control (see WAI-ARIA attribute aria-describedby).
199
198
  */
@@ -214,6 +213,8 @@ function(
214
213
  // and have valueState property of the RadioButton set to the message type.
215
214
  MessageMixin.call(RadioButton.prototype);
216
215
 
216
+ RadioButton.getNextSelectionNumber = getNextSelectionNumber;
217
+
217
218
  RadioButton.prototype._groupNames = {};
218
219
 
219
220
  // Keyboard navigation variants
@@ -224,13 +225,49 @@ function(
224
225
  PREV: "prev"
225
226
  };
226
227
 
228
+ RadioButton.prototype.init = function () {
229
+ this._iSelectionNumber = -1;
230
+ };
231
+
232
+ RadioButton.prototype.onBeforeRendering = function() {
233
+ var sGroupName = this.getGroupName();
234
+
235
+ this._updateGroupName(sGroupName);
236
+ this._updateLabelProperties();
237
+
238
+ // If this radio button is selected, explicitly deselect the other radio buttons in the same group
239
+ if (this.getSelected() && sGroupName !== "" && this._isLastSelectedInGroup(sGroupName)) {
240
+ this._deselectOthersInGroup(sGroupName);
241
+ }
242
+ };
243
+
244
+ /**
245
+ * Destroys all related objects to the RadioButton
246
+ * @public
247
+ */
248
+ RadioButton.prototype.exit = function() {
249
+ var sGroupName = this.getGroupName(),
250
+ aControlsInGroup = this._groupNames[sGroupName],
251
+ iGroupNameIndex = aControlsInGroup && aControlsInGroup.indexOf(this);
252
+
253
+ this._iTabIndex = null;
254
+
255
+ if (this._oLabel) {
256
+ this._oLabel.destroy();
257
+ this._oLabel = null;
258
+ }
259
+
260
+ if (iGroupNameIndex >= -1) {
261
+ aControlsInGroup.splice(iGroupNameIndex, 1);
262
+ }
263
+ };
264
+
227
265
  /**
228
266
  * Function is called when the radio button is tapped.
229
267
  * @param {jQuery.Event} oEvent The event object
230
268
  * @private
231
269
  */
232
270
  RadioButton.prototype.ontap = function(oEvent) {
233
-
234
271
  if (!this.getEnabled() || !this.getEditable()) {
235
272
  return;
236
273
  }
@@ -238,7 +275,7 @@ function(
238
275
  var oParent = this.getParent();
239
276
 
240
277
  // check if the RadioButton is part of a RadioButtonGroup which is disabled/readonly
241
- if (oParent instanceof RadioButtonGroup && (!oParent.getEnabled() || !oParent.getEditable())) {
278
+ if (oParent && oParent.isA("sap.m.RadioButtonGroup") && (!oParent.getEnabled() || !oParent.getEditable())) {
242
279
  return;
243
280
  }
244
281
 
@@ -258,22 +295,49 @@ function(
258
295
  }
259
296
  };
260
297
 
298
+ /**
299
+ * Sets RadioButton's groupName. Only one radioButton from the same group can be selected
300
+ * @param {string} sGroupName - Name of the group to which the RadioButton will belong.
301
+ * @returns {this} Reference to the control instance for chaining
302
+ * @public
303
+ */
304
+ RadioButton.prototype.setGroupName = function(sGroupName) {
305
+ this._updateGroupName(sGroupName, this.getGroupName());
306
+ this.setProperty("groupName", sGroupName);
307
+ return this;
308
+ };
309
+
310
+ /**
311
+ * Sets the state of the RadioButton to selected.
312
+ * @param {boolean} bSelected - defines if the radio button is selected
313
+ * @returns {this} Reference to the control instance for chaining
314
+ * @public
315
+ */
316
+ RadioButton.prototype.setSelected = function(bSelected) {
317
+ this.setProperty("selected", bSelected);
318
+
319
+ if (this.getSelected()) {
320
+ this._iSelectionNumber = getNextSelectionNumber();
321
+ }
322
+
323
+ return this;
324
+ };
325
+
261
326
  /**
262
327
  * Function is called when radiobutton is being touched. Only necessary for Android/Blackberry.
263
328
  * @param {jQuery.Event} oEvent The event object
264
329
  * @private
265
330
  */
266
- RadioButton.prototype.ontouchstart = function(oEvent) {
267
-
331
+ RadioButton.prototype.ontouchstart = function (oEvent) {
268
332
  //for control who need to know if they should handle events from the CheckBox control
269
- oEvent.originalEvent._sapui_handledByControl = true;
333
+ oEvent.setMarked();
270
334
  if (this.getEnabled() && this.getActiveHandling()) {
271
- this.$().toggleClass("sapMRbBTouched", true);
335
+ this.addStyleClass("sapMRbBTouched");
272
336
  }
273
337
  };
274
338
 
275
- RadioButton.prototype.ontouchend = function(oEvent) {
276
- this.$().toggleClass("sapMRbBTouched", false);
339
+ RadioButton.prototype.ontouchend = function () {
340
+ this.removeStyleClass("sapMRbBTouched");
277
341
  };
278
342
 
279
343
  RadioButton.prototype.onsapnext = function(oEvent) {
@@ -355,7 +419,7 @@ function(
355
419
  * @private
356
420
  */
357
421
  RadioButton.prototype._keyboardHandler = function(sPosition, bSelect) {
358
- if (this.getParent() instanceof RadioButtonGroup) {
422
+ if (this.getParent() && this.getParent().isA("sap.m.RadioButtonGroup")) {
359
423
  return;
360
424
  }
361
425
 
@@ -373,20 +437,20 @@ function(
373
437
  /**
374
438
  * @see sap.ui.core.Control#getAccessibilityInfo
375
439
  * @protected
376
- * @returns {Object} The <code>sap.m.RadioButton</code> accessibility information
440
+ * @returns {object} The <code>sap.m.RadioButton</code> accessibility information
377
441
  */
378
442
  RadioButton.prototype.getAccessibilityInfo = function() {
379
- var oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.m");
443
+ var oBundle = Core.getLibraryResourceBundle("sap.m");
380
444
  return {
381
445
  role: "radio",
382
446
  type: oBundle.getText("ACC_CTR_TYPE_RADIO"),
383
- description: (this.getText() || "") + (this.getSelected() ? (" " + oBundle.getText("ACC_CTR_STATE_CHECKED")) : ""),
447
+ description: (this.getText() || "") + (this.getSelected() ? (" " + oBundle.getText("ACC_CTR_STATE_CHECKED")) : (" " + oBundle.getText("ACC_CTR_STATE_NOT_CHECKED"))),
384
448
  enabled: this.getEnabled(),
385
449
  editable: this.getEditable()
386
450
  };
387
451
  };
388
452
 
389
- /*
453
+ /**
390
454
  * RadioButton without label must not be stretched in Form.
391
455
  */
392
456
  RadioButton.prototype.getFormDoNotAdjustWidth = function() {
@@ -397,7 +461,7 @@ function(
397
461
  * Determines next focusable item
398
462
  *
399
463
  * @param {enum} sNavigation any item from KH_NAVIGATION
400
- * @returns {RadioButton} Control instance for method chaining
464
+ * @returns {sap.m.RadioButton} Next focusable radio button
401
465
  * @private
402
466
  */
403
467
  RadioButton.prototype._getNextFocusItem = function(sNavigation) {
@@ -441,175 +505,11 @@ function(
441
505
  this.ontap(oEvent);
442
506
  };
443
507
 
444
- RadioButton.prototype.setEnabled = function(bEnabled) {
445
- this.setProperty("enabled", bEnabled, false);
446
-
447
- return this;
448
- };
449
-
450
-
451
-
452
508
  // #############################################################################
453
- // Overwritten methods that are also generated in RadioButton.API.js
509
+ // Overwritten & private methods
454
510
  // #############################################################################
455
511
 
456
512
  /**
457
- * Sets the state of the RadioButton to selected.
458
- * @param {boolean} bSelected - defines if the radio button is selected
459
- * @returns {sap.m.RadioButton} Reference to the control instance for chaining
460
- * @public
461
- */
462
- RadioButton.prototype.setSelected = function(bSelected) {
463
- var oControl,
464
- bSelectedOld = this.getSelected(),
465
- sGroupName = this.getGroupName(),
466
- aControlsInGroup = this._groupNames[sGroupName],
467
- iLength = aControlsInGroup && aControlsInGroup.length;
468
-
469
- this.setProperty("selected", bSelected, true); // No re-rendering
470
- this._changeGroupName(this.getGroupName());
471
-
472
- if (!!bSelected && sGroupName && sGroupName !== "") { // If this radio button is selected and groupName is set, explicitly deselect the other radio buttons of the same group
473
- for (var i = 0; i < iLength; i++) {
474
- oControl = aControlsInGroup[i];
475
-
476
- if (oControl instanceof RadioButton && oControl !== this && oControl.getSelected()) {
477
- oControl.fireSelect({ selected: false });
478
- oControl.setSelected(false);
479
- }
480
- }
481
- }
482
-
483
- if ((bSelectedOld !== !!bSelected) && this.getDomRef()) {
484
- this.$().toggleClass("sapMRbSel", bSelected);
485
-
486
- if (bSelected) {
487
- this.getDomRef().setAttribute("aria-checked", "true");
488
- this.getDomRef("RB").checked = true;
489
- this.getDomRef("RB").setAttribute("checked", "checked");
490
- } else {
491
- this.getDomRef().removeAttribute("aria-checked"); // aria-checked=false is default value and need not be set explicitly
492
- this.getDomRef("RB").checked = false;
493
- this.getDomRef("RB").removeAttribute("checked");
494
- }
495
- }
496
-
497
- return this;
498
- };
499
-
500
- /**
501
- * Sets the text for the RadioButton's label.
502
- * @param {string} sText - The text to be set
503
- * @returns {sap.m.RadioButton} Reference to the control instance for chaining
504
- * @public
505
- */
506
- RadioButton.prototype.setText = function(sText) {
507
- this.setProperty("text", sText, true);
508
-
509
- if (this._oLabel) {
510
- this._oLabel.setText(this.getText());
511
- } else {
512
- this._createLabel("text", this.getText());
513
- }
514
-
515
- this.toggleStyleClass("sapMRbHasLabel", !!sText);
516
-
517
- return this;
518
- };
519
-
520
- /**
521
- * Depeding on useEntireWidth sets the width to the RadioButton's label or the whole RadioButton
522
- * @param {boolean} bUserEntireWidth - Determines if the width will be set to the label only or to the whole RadioButton
523
- * @private
524
- */
525
- RadioButton.prototype._setWidth = function(bUserEntireWidth) {
526
- if (!bUserEntireWidth) {
527
- this._setLableWidth();
528
- } else {
529
- this._setLableWidth("auto");
530
- }
531
- };
532
-
533
- /**
534
- * Sets the width for the RadioButton's label.
535
- * @param {string} sWidth - CSS size to be set as width
536
- * @private
537
- */
538
- RadioButton.prototype._setLableWidth = function(sWidth) {
539
- sWidth = sWidth || this.getWidth();
540
-
541
- if (this._oLabel) {
542
- this._oLabel.setWidth(sWidth);
543
- } else {
544
- this._createLabel("width", sWidth);
545
- }
546
- };
547
-
548
- /**
549
- * Sets the text direction for the RadioButton's label.
550
- * @param {string} sDirection - Text direction to be set to RadioButton's label
551
- * @returns {sap.m.RadioButton} Reference to the control instance for chaining
552
- * @public
553
- */
554
- RadioButton.prototype.setTextDirection = function(sDirection) {
555
-
556
- this.setProperty("textDirection", sDirection, true);
557
- if (this._oLabel) {
558
- this._oLabel.setTextDirection(this.getTextDirection());
559
- } else {
560
- this._createLabel("textDirection", this.getTextDirection());
561
- }
562
- return this;
563
- };
564
-
565
- /**
566
- * Sets RadioButton's groupName. Only one radioButton from the same group can be selected
567
- * @param {string} sGroupName - Name of the group to which the RadioButton will belong.
568
- * @returns {sap.m.RadioButton} Reference to the control instance for chaining
569
- * @public
570
- */
571
- RadioButton.prototype.setGroupName = function(sGroupName) {
572
- this._changeGroupName(sGroupName, this.getGroupName());
573
- return this.setProperty("groupName", sGroupName, true);
574
- };
575
-
576
- RadioButton.prototype.onBeforeRendering = function() {
577
- // Set the width before rendering as both width and useEntireWidth are dependent
578
- this._setWidth(this.getUseEntireWidth());
579
- return this._changeGroupName(this.getGroupName());
580
- };
581
-
582
- /**
583
- * Destroys all related objects to the RadioButton
584
- * @public
585
- */
586
- RadioButton.prototype.exit = function() {
587
- var sGroupName = this.getGroupName(),
588
- aControlsInGroup = this._groupNames[sGroupName],
589
- iGroupNameIndex = aControlsInGroup && aControlsInGroup.indexOf(this);
590
-
591
- this._iTabIndex = null;
592
- if (this._oLabel) {
593
- this._oLabel.destroy();
594
- }
595
-
596
- if (iGroupNameIndex >= -1) {
597
- aControlsInGroup.splice(iGroupNameIndex, 1);
598
- }
599
- };
600
-
601
- /**
602
- * Creates label and sets a property to it.
603
- * @param {string} prop - Property to be set to the new label.
604
- * @param {string} value - Value of the property which will be set.
605
- * @private
606
- */
607
- RadioButton.prototype._createLabel = function(prop, value) {
608
- this._oLabel = new Label(this.getId() + "-label").addStyleClass("sapMRbBLabel").setParent(this, null, true);
609
- this._oLabel.setProperty(prop, value, false);
610
- };
611
-
612
- /*
613
513
  * Sets the tab index of the control
614
514
  *
615
515
  * @param {int} iTabIndex - Greater than or equal to -1
@@ -628,23 +528,6 @@ function(
628
528
  return this;
629
529
  };
630
530
 
631
- /*
632
- * Sets the textAlign to the internal label
633
- * @param {string} sAlign
634
- * @return {sap.m.RadioButton}
635
- * @since 1.28
636
- * @public
637
- */
638
- RadioButton.prototype.setTextAlign = function(sAlign) {
639
- this.setProperty("textAlign", sAlign, true);
640
- if (this._oLabel) {
641
- this._oLabel.setTextAlign(this.getTextAlign());
642
- } else {
643
- this._createLabel("textAlign", this.getTextAlign());
644
- }
645
- return this;
646
- };
647
-
648
531
  /**
649
532
  * Sets the private valueStateText property. Required, in order to make the MessageMixin work.
650
533
  *
@@ -653,16 +536,48 @@ function(
653
536
  * @returns {sap.m.RadioButton} Reference to the control instance for chaining.
654
537
  */
655
538
  RadioButton.prototype.setValueStateText = function(sText) {
656
- return this.setProperty("valueStateText", sText, true);
539
+ return this.setProperty("valueStateText", sText);
657
540
  };
658
541
 
659
542
  /**
660
- * Changes the groupname of a RadioButton.
543
+ * Maintains the RadioButton's internal Label's text property.
544
+ * @param {string} sText - The text to be set
545
+ * @public
546
+ */
547
+ RadioButton.prototype._updateLabelProperties = function () {
548
+ var oLabel = this._getLabel();
549
+ var sText = this.getText();
550
+ var bUseEntireWidth = this.getUseEntireWidth();
551
+
552
+ this.toggleStyleClass("sapMRbHasLabel", !!sText);
553
+
554
+ // Set the width before rendering as both width and useEntireWidth are dependent
555
+ oLabel.setText(sText)
556
+ .setWidth(!bUseEntireWidth ? this.getWidth() : "auto")
557
+ .setTextDirection(this.getTextDirection())
558
+ .setTextAlign(this.getTextAlign());
559
+ };
560
+
561
+ /**
562
+ * Returns the RadioButton's internal Label control.
563
+ * @private
564
+ */
565
+ RadioButton.prototype._getLabel = function () {
566
+ if (!this._oLabel) {
567
+ this._oLabel = new Label(this.getId() + "-label");
568
+ this._oLabel.addStyleClass("sapMRbBLabel").setParent(this, null, true);
569
+ }
570
+
571
+ return this._oLabel;
572
+ };
573
+
574
+ /**
575
+ * Update the groupname of a RadioButton.
661
576
  * @param {string} sNewGroupName - Name of the new group.
662
577
  * @param {string} sOldGroupName - Name of the old group.
663
578
  * @private
664
579
  */
665
- RadioButton.prototype._changeGroupName = function(sNewGroupName, sOldGroupName) {
580
+ RadioButton.prototype._updateGroupName = function (sNewGroupName, sOldGroupName) {
666
581
  var aNewGroup = this._groupNames[sNewGroupName],
667
582
  aOldGroup = this._groupNames[sOldGroupName];
668
583
 
@@ -679,6 +594,28 @@ function(
679
594
  }
680
595
  };
681
596
 
597
+ RadioButton.prototype._isLastSelectedInGroup = function (sGroupName) {
598
+ var aControlsInGroup = this._groupNames[sGroupName];
599
+
600
+ return aControlsInGroup.every(function (aButton) {
601
+ return aButton._iSelectionNumber <= this._iSelectionNumber;
602
+ }.bind(this));
603
+ };
604
+
605
+ RadioButton.prototype._deselectOthersInGroup = function (sGroupName) {
606
+ var aControlsInGroup = this._groupNames[sGroupName],
607
+ iLength = aControlsInGroup && aControlsInGroup.length;
608
+
609
+ for (var i = 0; i < iLength; i++) {
610
+ var oControl = aControlsInGroup[i];
611
+
612
+ if (oControl instanceof RadioButton && oControl !== this && oControl.getSelected()) {
613
+ oControl.fireSelect({ selected: false });
614
+ oControl.setSelected(false);
615
+ }
616
+ }
617
+ };
618
+
682
619
  // Private properties setter generation
683
620
  ["editableParent"].forEach(function(privatePropName) {
684
621
  RadioButton.prototype["_set" + capitalize(privatePropName)] = function (vValue) {
@@ -688,5 +625,4 @@ function(
688
625
  });
689
626
 
690
627
  return RadioButton;
691
-
692
- });
628
+ });