@openui5/sap.m 1.119.0 → 1.120.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +4 -4
  3. package/src/sap/m/.library +8 -1
  4. package/src/sap/m/AccButton.js +1 -1
  5. package/src/sap/m/ActionListItem.js +1 -1
  6. package/src/sap/m/ActionSelect.js +1 -1
  7. package/src/sap/m/ActionSheet.js +1 -1
  8. package/src/sap/m/ActionTile.js +1 -1
  9. package/src/sap/m/ActionTileContent.js +1 -1
  10. package/src/sap/m/AdditionalTextButton.js +1 -1
  11. package/src/sap/m/App.js +1 -1
  12. package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
  13. package/src/sap/m/Avatar.js +10 -6
  14. package/src/sap/m/AvatarRenderer.js +10 -3
  15. package/src/sap/m/Bar.js +1 -1
  16. package/src/sap/m/Breadcrumbs.js +1 -1
  17. package/src/sap/m/BusyDialog.js +1 -1
  18. package/src/sap/m/BusyIndicator.js +1 -1
  19. package/src/sap/m/Button.js +1 -1
  20. package/src/sap/m/Carousel.js +1 -1
  21. package/src/sap/m/CarouselLayout.js +1 -1
  22. package/src/sap/m/CheckBox.js +1 -1
  23. package/src/sap/m/ColorPalette.js +1 -1
  24. package/src/sap/m/ColorPalettePopover.js +1 -1
  25. package/src/sap/m/Column.js +1 -1
  26. package/src/sap/m/ColumnHeaderPopover.js +7 -8
  27. package/src/sap/m/ColumnListItem.js +1 -1
  28. package/src/sap/m/ColumnPopoverActionItem.js +1 -1
  29. package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
  30. package/src/sap/m/ColumnPopoverItem.js +1 -1
  31. package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
  32. package/src/sap/m/ColumnPopoverSortItem.js +1 -1
  33. package/src/sap/m/ComboBox.js +1 -1
  34. package/src/sap/m/ComboBoxBase.js +20 -3
  35. package/src/sap/m/ComboBoxTextField.js +1 -1
  36. package/src/sap/m/CustomListItem.js +1 -1
  37. package/src/sap/m/CustomTile.js +1 -1
  38. package/src/sap/m/CustomTreeItem.js +1 -1
  39. package/src/sap/m/DatePicker.js +1 -1
  40. package/src/sap/m/DateRangeSelection.js +22 -12
  41. package/src/sap/m/DateTimeField.js +1 -1
  42. package/src/sap/m/DateTimeInput.js +1 -1
  43. package/src/sap/m/DateTimePicker.js +1 -1
  44. package/src/sap/m/Dialog.js +1 -1
  45. package/src/sap/m/DisplayListItem.js +1 -1
  46. package/src/sap/m/DraftIndicator.js +1 -1
  47. package/src/sap/m/DynamicDate.js +1 -1
  48. package/src/sap/m/DynamicDateOption.js +1 -1
  49. package/src/sap/m/DynamicDateRange.js +10 -2
  50. package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
  51. package/src/sap/m/ExpandableText.js +1 -1
  52. package/src/sap/m/FacetFilter.js +2 -1
  53. package/src/sap/m/FacetFilterItem.js +1 -1
  54. package/src/sap/m/FacetFilterList.js +1 -1
  55. package/src/sap/m/FeedContent.js +1 -1
  56. package/src/sap/m/FeedInput.js +5 -4
  57. package/src/sap/m/FeedInputRenderer.js +3 -3
  58. package/src/sap/m/FeedListItem.js +6 -4
  59. package/src/sap/m/FeedListItemAction.js +1 -1
  60. package/src/sap/m/Fiori20Adapter.js +2 -2
  61. package/src/sap/m/FlexBox.js +1 -1
  62. package/src/sap/m/FlexItemData.js +1 -1
  63. package/src/sap/m/FormattedText.js +1 -1
  64. package/src/sap/m/GenericTag.js +1 -1
  65. package/src/sap/m/GenericTile.js +58 -23
  66. package/src/sap/m/GenericTileRenderer.js +11 -0
  67. package/src/sap/m/GroupHeaderListItem.js +1 -1
  68. package/src/sap/m/GrowingEnablement.js +2 -3
  69. package/src/sap/m/GrowingList.js +1 -1
  70. package/src/sap/m/HBox.js +1 -1
  71. package/src/sap/m/HeaderContainer.js +6 -4
  72. package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
  73. package/src/sap/m/IconTabBar.js +1 -1
  74. package/src/sap/m/IconTabBarSelectList.js +1 -1
  75. package/src/sap/m/IconTabFilter.js +1 -1
  76. package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
  77. package/src/sap/m/IconTabHeader.js +1 -1
  78. package/src/sap/m/IconTabSeparator.js +1 -1
  79. package/src/sap/m/IllustratedMessage.js +1 -1
  80. package/src/sap/m/Illustration.js +1 -1
  81. package/src/sap/m/Image.js +1 -1
  82. package/src/sap/m/ImageContent.js +1 -1
  83. package/src/sap/m/Input.js +79 -14
  84. package/src/sap/m/InputBase.js +3 -1
  85. package/src/sap/m/InputListItem.js +1 -1
  86. package/src/sap/m/InputRenderer.js +7 -3
  87. package/src/sap/m/Label.js +1 -1
  88. package/src/sap/m/LightBox.js +1 -1
  89. package/src/sap/m/LightBoxItem.js +1 -1
  90. package/src/sap/m/Link.js +1 -1
  91. package/src/sap/m/LinkTileContent.js +143 -0
  92. package/src/sap/m/List.js +1 -1
  93. package/src/sap/m/ListBase.js +32 -14
  94. package/src/sap/m/ListItemBase.js +1 -1
  95. package/src/sap/m/MaskEnabler.js +1 -1
  96. package/src/sap/m/MaskInput.js +1 -1
  97. package/src/sap/m/MaskInputRule.js +1 -1
  98. package/src/sap/m/Menu.js +1 -1
  99. package/src/sap/m/MenuButton.js +3 -3
  100. package/src/sap/m/MenuItem.js +1 -1
  101. package/src/sap/m/MenuListItem.js +1 -1
  102. package/src/sap/m/MessageItem.js +1 -1
  103. package/src/sap/m/MessageListItem.js +1 -1
  104. package/src/sap/m/MessagePage.js +1 -1
  105. package/src/sap/m/MessagePopover.js +2 -3
  106. package/src/sap/m/MessagePopoverItem.js +1 -1
  107. package/src/sap/m/MessageStrip.js +1 -1
  108. package/src/sap/m/MessageToast.js +5 -19
  109. package/src/sap/m/MessageView.js +1 -1
  110. package/src/sap/m/MessageViewRenderer.js +2 -3
  111. package/src/sap/m/MultiComboBox.js +1 -1
  112. package/src/sap/m/MultiEditField.js +1 -1
  113. package/src/sap/m/MultiInput.js +4 -2
  114. package/src/sap/m/NavContainer.js +4 -3
  115. package/src/sap/m/NewsContent.js +1 -1
  116. package/src/sap/m/NotificationList.js +1 -1
  117. package/src/sap/m/NotificationListBase.js +1 -1
  118. package/src/sap/m/NotificationListGroup.js +1 -1
  119. package/src/sap/m/NotificationListItem.js +1 -1
  120. package/src/sap/m/NumericContent.js +9 -10
  121. package/src/sap/m/NumericContentRenderer.js +5 -4
  122. package/src/sap/m/NumericInput.js +1 -1
  123. package/src/sap/m/ObjectAttribute.js +1 -1
  124. package/src/sap/m/ObjectHeader.js +1 -1
  125. package/src/sap/m/ObjectIdentifier.js +1 -1
  126. package/src/sap/m/ObjectListItem.js +1 -1
  127. package/src/sap/m/ObjectMarker.js +1 -1
  128. package/src/sap/m/ObjectNumber.js +1 -1
  129. package/src/sap/m/ObjectStatus.js +4 -6
  130. package/src/sap/m/ObjectStatusRenderer.js +3 -1
  131. package/src/sap/m/OverflowToolbar.js +1 -1
  132. package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
  133. package/src/sap/m/OverflowToolbarButton.js +1 -1
  134. package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
  135. package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
  136. package/src/sap/m/OverflowToolbarRenderer.js +8 -1
  137. package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
  138. package/src/sap/m/P13nAnyFilterItem.js +1 -1
  139. package/src/sap/m/P13nColumnsItem.js +2 -1
  140. package/src/sap/m/P13nColumnsPanel.js +1 -1
  141. package/src/sap/m/P13nConditionPanel.js +1 -1
  142. package/src/sap/m/P13nDialog.js +1 -1
  143. package/src/sap/m/P13nDimMeasureItem.js +2 -1
  144. package/src/sap/m/P13nDimMeasurePanel.js +2 -1
  145. package/src/sap/m/P13nFilterItem.js +1 -1
  146. package/src/sap/m/P13nFilterPanel.js +1 -1
  147. package/src/sap/m/P13nGroupItem.js +2 -1
  148. package/src/sap/m/P13nGroupPanel.js +1 -1
  149. package/src/sap/m/P13nItem.js +1 -1
  150. package/src/sap/m/P13nPanel.js +1 -1
  151. package/src/sap/m/P13nSelectionItem.js +1 -1
  152. package/src/sap/m/P13nSelectionPanel.js +1 -1
  153. package/src/sap/m/P13nSortItem.js +2 -1
  154. package/src/sap/m/P13nSortPanel.js +1 -1
  155. package/src/sap/m/PDFViewer.js +20 -8
  156. package/src/sap/m/PDFViewerRenderManager.js +18 -18
  157. package/src/sap/m/PDFViewerRenderer.js +1 -1
  158. package/src/sap/m/Page.js +1 -1
  159. package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
  160. package/src/sap/m/PagingButton.js +1 -1
  161. package/src/sap/m/Panel.js +1 -1
  162. package/src/sap/m/PlanningCalendar.js +37 -12
  163. package/src/sap/m/PlanningCalendarHeader.js +1 -1
  164. package/src/sap/m/PlanningCalendarLegend.js +1 -1
  165. package/src/sap/m/PlanningCalendarRow.js +1 -1
  166. package/src/sap/m/PlanningCalendarView.js +1 -1
  167. package/src/sap/m/Popover.js +5 -4
  168. package/src/sap/m/ProgressIndicator.js +1 -1
  169. package/src/sap/m/PullToRefresh.js +1 -1
  170. package/src/sap/m/QuickView.js +1 -1
  171. package/src/sap/m/QuickViewBase.js +1 -1
  172. package/src/sap/m/QuickViewCard.js +1 -1
  173. package/src/sap/m/QuickViewGroup.js +1 -1
  174. package/src/sap/m/QuickViewGroupElement.js +1 -1
  175. package/src/sap/m/QuickViewPage.js +1 -1
  176. package/src/sap/m/RadioButton.js +3 -3
  177. package/src/sap/m/RadioButtonGroup.js +1 -1
  178. package/src/sap/m/RangeSlider.js +1 -1
  179. package/src/sap/m/RangeSliderRenderer.js +15 -8
  180. package/src/sap/m/RatingIndicator.js +4 -3
  181. package/src/sap/m/ResponsivePopover.js +13 -7
  182. package/src/sap/m/ResponsiveScale.js +1 -1
  183. package/src/sap/m/ScrollBar.js +1 -1
  184. package/src/sap/m/ScrollContainer.js +1 -1
  185. package/src/sap/m/SearchField.js +1 -1
  186. package/src/sap/m/SegmentedButton.js +1 -1
  187. package/src/sap/m/SegmentedButtonItem.js +1 -1
  188. package/src/sap/m/Select.js +1 -1
  189. package/src/sap/m/SelectDialog.js +5 -7
  190. package/src/sap/m/SelectDialogBase.js +1 -1
  191. package/src/sap/m/SelectList.js +1 -1
  192. package/src/sap/m/SelectionDetails.js +1 -1
  193. package/src/sap/m/SelectionDetailsFacade.js +2 -2
  194. package/src/sap/m/SelectionDetailsItem.js +1 -1
  195. package/src/sap/m/SelectionDetailsItemLine.js +1 -1
  196. package/src/sap/m/Shell.js +1 -1
  197. package/src/sap/m/SimpleFixFlex.js +1 -1
  198. package/src/sap/m/SinglePlanningCalendar.js +1 -1
  199. package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
  200. package/src/sap/m/SinglePlanningCalendarGrid.js +2 -2
  201. package/src/sap/m/SinglePlanningCalendarMonthGrid.js +3 -2
  202. package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
  203. package/src/sap/m/SinglePlanningCalendarView.js +1 -1
  204. package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
  205. package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
  206. package/src/sap/m/SlideTile.js +7 -9
  207. package/src/sap/m/Slider.js +1 -1
  208. package/src/sap/m/SliderTooltip.js +1 -1
  209. package/src/sap/m/SliderTooltipBase.js +1 -1
  210. package/src/sap/m/SliderTooltipContainer.js +1 -1
  211. package/src/sap/m/SplitApp.js +1 -1
  212. package/src/sap/m/SplitButton.js +1 -1
  213. package/src/sap/m/SplitContainer.js +4 -2
  214. package/src/sap/m/StandardDynamicDateOption.js +1 -1
  215. package/src/sap/m/StandardListItem.js +1 -1
  216. package/src/sap/m/StandardTile.js +1 -1
  217. package/src/sap/m/StandardTreeItem.js +1 -1
  218. package/src/sap/m/StepInput.js +1 -1
  219. package/src/sap/m/SuggestionItem.js +1 -1
  220. package/src/sap/m/SuggestionsPopover.js +5 -5
  221. package/src/sap/m/Switch.js +1 -1
  222. package/src/sap/m/TabContainer.js +10 -4
  223. package/src/sap/m/TabContainerItem.js +1 -1
  224. package/src/sap/m/TabStrip.js +2 -2
  225. package/src/sap/m/TabStripItem.js +1 -1
  226. package/src/sap/m/Table.js +35 -4
  227. package/src/sap/m/TablePersoController.js +1 -1
  228. package/src/sap/m/TablePersoDialog.js +1 -1
  229. package/src/sap/m/TablePersoProvider.js +1 -1
  230. package/src/sap/m/TableSelectDialog.js +5 -7
  231. package/src/sap/m/Text.js +1 -1
  232. package/src/sap/m/TextArea.js +1 -1
  233. package/src/sap/m/Tile.js +1 -1
  234. package/src/sap/m/TileContainer.js +1 -1
  235. package/src/sap/m/TileContent.js +4 -4
  236. package/src/sap/m/TimePicker.js +1 -1
  237. package/src/sap/m/TimePickerClock.js +1 -1
  238. package/src/sap/m/TimePickerClocks.js +1 -1
  239. package/src/sap/m/TimePickerInputs.js +1 -1
  240. package/src/sap/m/TimePickerInternals.js +1 -1
  241. package/src/sap/m/TimePickerSlider.js +1 -1
  242. package/src/sap/m/TimePickerSliders.js +1 -1
  243. package/src/sap/m/Title.js +1 -1
  244. package/src/sap/m/TitlePropagationSupport.js +1 -1
  245. package/src/sap/m/ToggleButton.js +1 -1
  246. package/src/sap/m/Token.js +1 -1
  247. package/src/sap/m/Tokenizer.js +1 -1
  248. package/src/sap/m/Toolbar.js +1 -1
  249. package/src/sap/m/ToolbarLayoutData.js +1 -1
  250. package/src/sap/m/ToolbarRenderer.js +8 -0
  251. package/src/sap/m/ToolbarSeparator.js +1 -1
  252. package/src/sap/m/ToolbarSpacer.js +1 -1
  253. package/src/sap/m/Tree.js +17 -1
  254. package/src/sap/m/TreeItemBase.js +1 -1
  255. package/src/sap/m/UploadCollection.js +1 -1
  256. package/src/sap/m/UploadCollectionItem.js +1 -1
  257. package/src/sap/m/UploadCollectionParameter.js +1 -1
  258. package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
  259. package/src/sap/m/VBox.js +1 -1
  260. package/src/sap/m/ValueStateHeader.js +9 -4
  261. package/src/sap/m/VariantItem.js +99 -27
  262. package/src/sap/m/VariantManagement.js +196 -90
  263. package/src/sap/m/ViewSettingsCustomItem.js +1 -1
  264. package/src/sap/m/ViewSettingsCustomTab.js +1 -1
  265. package/src/sap/m/ViewSettingsDialog.js +44 -44
  266. package/src/sap/m/ViewSettingsFilterItem.js +1 -1
  267. package/src/sap/m/ViewSettingsItem.js +1 -1
  268. package/src/sap/m/VisibleItem.js +1 -1
  269. package/src/sap/m/WheelSlider.js +1 -1
  270. package/src/sap/m/WheelSliderContainer.js +1 -1
  271. package/src/sap/m/Wizard.js +6 -6
  272. package/src/sap/m/WizardProgressNavigator.js +1 -1
  273. package/src/sap/m/WizardStep.js +1 -1
  274. package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
  275. package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
  276. package/src/sap/m/changeHandler/CombineButtons.js +1 -1
  277. package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
  278. package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
  279. package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
  280. package/src/sap/m/designtime/IconTabFilter.designtime.js +1 -1
  281. package/src/sap/m/designtime/VariantManagement.designtime.js +0 -6
  282. package/src/sap/m/designtime/messagebundle_mk.properties +182 -0
  283. package/src/sap/m/designtime/messagebundle_sh.properties +3 -3
  284. package/src/sap/m/flexibility/EngineFlex.js +5 -0
  285. package/src/sap/m/inputUtils/highlightItemsWithContains.js +82 -0
  286. package/src/sap/m/library.js +76 -136
  287. package/src/sap/m/messagebundle.properties +37 -6
  288. package/src/sap/m/messagebundle_ar.properties +46 -2
  289. package/src/sap/m/messagebundle_bg.properties +49 -5
  290. package/src/sap/m/messagebundle_ca.properties +47 -3
  291. package/src/sap/m/messagebundle_cs.properties +46 -2
  292. package/src/sap/m/messagebundle_cy.properties +46 -2
  293. package/src/sap/m/messagebundle_da.properties +46 -2
  294. package/src/sap/m/messagebundle_de.properties +46 -2
  295. package/src/sap/m/messagebundle_el.properties +48 -4
  296. package/src/sap/m/messagebundle_en.properties +23 -6
  297. package/src/sap/m/messagebundle_en_GB.properties +46 -2
  298. package/src/sap/m/messagebundle_es.properties +46 -2
  299. package/src/sap/m/messagebundle_es_MX.properties +46 -2
  300. package/src/sap/m/messagebundle_et.properties +44 -0
  301. package/src/sap/m/messagebundle_fi.properties +46 -2
  302. package/src/sap/m/messagebundle_fr.properties +46 -2
  303. package/src/sap/m/messagebundle_fr_CA.properties +46 -2
  304. package/src/sap/m/messagebundle_hi.properties +48 -4
  305. package/src/sap/m/messagebundle_hr.properties +46 -2
  306. package/src/sap/m/messagebundle_hu.properties +51 -7
  307. package/src/sap/m/messagebundle_id.properties +48 -4
  308. package/src/sap/m/messagebundle_it.properties +44 -0
  309. package/src/sap/m/messagebundle_iw.properties +46 -2
  310. package/src/sap/m/messagebundle_ja.properties +44 -0
  311. package/src/sap/m/messagebundle_kk.properties +60 -16
  312. package/src/sap/m/messagebundle_ko.properties +44 -0
  313. package/src/sap/m/messagebundle_lt.properties +46 -2
  314. package/src/sap/m/messagebundle_lv.properties +57 -13
  315. package/src/sap/m/messagebundle_mk.properties +1869 -0
  316. package/src/sap/m/messagebundle_ms.properties +46 -2
  317. package/src/sap/m/messagebundle_nl.properties +44 -0
  318. package/src/sap/m/messagebundle_no.properties +47 -3
  319. package/src/sap/m/messagebundle_pl.properties +46 -2
  320. package/src/sap/m/messagebundle_pt.properties +44 -0
  321. package/src/sap/m/messagebundle_pt_PT.properties +44 -0
  322. package/src/sap/m/messagebundle_ro.properties +46 -2
  323. package/src/sap/m/messagebundle_ru.properties +48 -4
  324. package/src/sap/m/messagebundle_sh.properties +149 -105
  325. package/src/sap/m/messagebundle_sk.properties +46 -2
  326. package/src/sap/m/messagebundle_sl.properties +62 -18
  327. package/src/sap/m/messagebundle_sv.properties +50 -6
  328. package/src/sap/m/messagebundle_th.properties +44 -0
  329. package/src/sap/m/messagebundle_tr.properties +49 -5
  330. package/src/sap/m/messagebundle_uk.properties +59 -15
  331. package/src/sap/m/messagebundle_vi.properties +46 -2
  332. package/src/sap/m/messagebundle_zh_CN.properties +44 -0
  333. package/src/sap/m/messagebundle_zh_TW.properties +46 -2
  334. package/src/sap/m/p13n/AbstractContainer.js +2 -2
  335. package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
  336. package/src/sap/m/p13n/BasePanel.js +13 -3
  337. package/src/sap/m/p13n/Container.js +1 -1
  338. package/src/sap/m/p13n/Engine.js +1 -1
  339. package/src/sap/m/p13n/FlexUtil.js +0 -41
  340. package/src/sap/m/p13n/GroupController.js +1 -1
  341. package/src/sap/m/p13n/GroupPanel.js +1 -1
  342. package/src/sap/m/p13n/Popup.js +16 -1
  343. package/src/sap/m/p13n/QueryPanel.js +1 -1
  344. package/src/sap/m/p13n/SelectionController.js +457 -423
  345. package/src/sap/m/p13n/SelectionPanel.js +1 -1
  346. package/src/sap/m/p13n/SortController.js +1 -1
  347. package/src/sap/m/p13n/SortPanel.js +4 -3
  348. package/src/sap/m/p13n/handler/xConfigHandler.js +18 -5
  349. package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
  350. package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
  351. package/src/sap/m/p13n/modules/UIManager.js +1 -1
  352. package/src/sap/m/p13n/modules/xConfigAPI.js +1 -1
  353. package/src/sap/m/plugins/CellSelector.js +172 -153
  354. package/src/sap/m/plugins/ColumnResizer.js +9 -2
  355. package/src/sap/m/plugins/CopyProvider.js +21 -10
  356. package/src/sap/m/plugins/DataStateIndicator.js +1 -1
  357. package/src/sap/m/plugins/PasteProvider.js +1 -1
  358. package/src/sap/m/plugins/PluginBase.js +1 -1
  359. package/src/sap/m/routing/Target.js +3 -3
  360. package/src/sap/m/routing/Targets.js +3 -3
  361. package/src/sap/m/semantic/AddAction.js +1 -1
  362. package/src/sap/m/semantic/CancelAction.js +1 -1
  363. package/src/sap/m/semantic/DeleteAction.js +1 -1
  364. package/src/sap/m/semantic/DetailPage.js +1 -1
  365. package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
  366. package/src/sap/m/semantic/EditAction.js +1 -1
  367. package/src/sap/m/semantic/FavoriteAction.js +1 -1
  368. package/src/sap/m/semantic/FilterAction.js +1 -1
  369. package/src/sap/m/semantic/FilterSelect.js +1 -1
  370. package/src/sap/m/semantic/FlagAction.js +1 -1
  371. package/src/sap/m/semantic/ForwardAction.js +1 -1
  372. package/src/sap/m/semantic/FullscreenPage.js +1 -1
  373. package/src/sap/m/semantic/GroupAction.js +1 -1
  374. package/src/sap/m/semantic/GroupSelect.js +1 -1
  375. package/src/sap/m/semantic/MainAction.js +1 -1
  376. package/src/sap/m/semantic/MasterPage.js +1 -1
  377. package/src/sap/m/semantic/MessagesIndicator.js +1 -1
  378. package/src/sap/m/semantic/MultiSelectAction.js +1 -1
  379. package/src/sap/m/semantic/NegativeAction.js +1 -1
  380. package/src/sap/m/semantic/OpenInAction.js +1 -1
  381. package/src/sap/m/semantic/PositiveAction.js +1 -1
  382. package/src/sap/m/semantic/PrintAction.js +1 -1
  383. package/src/sap/m/semantic/SaveAction.js +1 -1
  384. package/src/sap/m/semantic/Segment.js +1 -1
  385. package/src/sap/m/semantic/SegmentedContainer.js +1 -1
  386. package/src/sap/m/semantic/SemanticButton.js +1 -1
  387. package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
  388. package/src/sap/m/semantic/SemanticControl.js +1 -1
  389. package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
  390. package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
  391. package/src/sap/m/semantic/SemanticPage.js +1 -1
  392. package/src/sap/m/semantic/SemanticSelect.js +1 -1
  393. package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
  394. package/src/sap/m/semantic/SendEmailAction.js +1 -1
  395. package/src/sap/m/semantic/SendMessageAction.js +1 -1
  396. package/src/sap/m/semantic/ShareInJamAction.js +1 -1
  397. package/src/sap/m/semantic/ShareMenu.js +1 -1
  398. package/src/sap/m/semantic/ShareMenuPage.js +1 -1
  399. package/src/sap/m/semantic/SortAction.js +1 -1
  400. package/src/sap/m/semantic/SortSelect.js +1 -1
  401. package/src/sap/m/table/ColumnWidthController.js +177 -0
  402. package/src/sap/m/table/Util.js +1 -1
  403. package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
  404. package/src/sap/m/table/columnmenu/Entry.js +1 -1
  405. package/src/sap/m/table/columnmenu/Item.js +1 -1
  406. package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
  407. package/src/sap/m/table/columnmenu/Menu.js +17 -13
  408. package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
  409. package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
  410. package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
  411. package/src/sap/m/table/columnmenu/QuickGroup.js +5 -1
  412. package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
  413. package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
  414. package/src/sap/m/table/columnmenu/QuickSortItem.js +2 -2
  415. package/src/sap/m/table/columnmenu/QuickTotal.js +5 -1
  416. package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
  417. package/src/sap/m/themes/base/Avatar.less +0 -1
  418. package/src/sap/m/themes/base/BarBase.less +1 -1
  419. package/src/sap/m/themes/base/BusyIndicator.less +0 -10
  420. package/src/sap/m/themes/base/ExpandableText.less +6 -0
  421. package/src/sap/m/themes/base/GenericTile.less +36 -0
  422. package/src/sap/m/themes/base/LinkTileContent.less +17 -0
  423. package/src/sap/m/themes/base/MenuButton.less +1 -1
  424. package/src/sap/m/themes/base/NotificationListBase.less +3 -3
  425. package/src/sap/m/themes/base/ObjectStatus.less +241 -1
  426. package/src/sap/m/themes/base/RadioButton.less +1 -1
  427. package/src/sap/m/themes/base/SearchField.less +2 -1
  428. package/src/sap/m/themes/base/SplitButton.less +0 -1
  429. package/src/sap/m/themes/base/Text.less +4 -1
  430. package/src/sap/m/themes/base/Toolbar.less +7 -14
  431. package/src/sap/m/themes/base/ValueStateHeader.less +4 -0
  432. package/src/sap/m/themes/base/library.source.less +1 -0
  433. package/src/sap/m/upload/ActionsPlaceholder.js +49 -0
  434. package/src/sap/m/upload/Column.js +58 -0
  435. package/src/sap/m/upload/FilePreviewDialog.js +22 -3
  436. package/src/sap/m/upload/FilterPanel.js +280 -0
  437. package/src/sap/m/upload/UploadSet.js +11 -6
  438. package/src/sap/m/upload/UploadSetItem.js +6 -5
  439. package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
  440. package/src/sap/m/upload/UploadSetwithTable.js +487 -93
  441. package/src/sap/m/upload/UploadSetwithTableItem.js +26 -11
  442. package/src/sap/m/upload/Uploader.js +3 -0
  443. package/src/sap/m/upload/UploaderTableItem.js +4 -1
  444. package/src/sap/m/upload/p13n/PersManager.js +251 -0
  445. package/src/sap/m/upload/p13n/flexibility/UploadSetwithTable.flexibility.js +32 -0
  446. package/src/sap/m/upload/p13n/handlers/BaseConfigHandler.js +44 -0
  447. package/src/sap/m/upload/p13n/handlers/ChangeHandler.js +98 -0
  448. package/src/sap/m/upload/p13n/handlers/ColumnConfigHandler.js +57 -0
  449. package/src/sap/m/upload/p13n/handlers/ColumnsStateChangeHandler.js +43 -0
  450. package/src/sap/m/upload/p13n/handlers/FilterConfigHandler.js +71 -0
  451. package/src/sap/m/upload/p13n/handlers/FilterStateChangeHandler.js +65 -0
  452. package/src/sap/m/upload/p13n/handlers/GroupConfigHandler.js +57 -0
  453. package/src/sap/m/upload/p13n/handlers/GroupStateChangeHandler.js +46 -0
  454. package/src/sap/m/upload/p13n/handlers/SortConfigHandler.js +57 -0
  455. package/src/sap/m/upload/p13n/handlers/SortStateChangeHandler.js +48 -0
  456. package/src/sap/m/upload/p13n/mediator/BaseMediator.js +183 -0
  457. package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +210 -0
  458. package/src/sap/m/upload/p13n/mediator/FilterMediator.js +196 -0
  459. package/src/sap/m/upload/p13n/mediator/GroupMediator.js +192 -0
  460. package/src/sap/m/upload/p13n/mediator/SortMediator.js +200 -0
  461. package/src/sap/m/upload/p13n/modules/CustomDataConfig.js +100 -0
  462. package/src/sap/m/upload/p13n/modules/PersPopupManager.js +76 -0
@@ -10,7 +10,6 @@ sap.ui.define([
10
10
  "sap/m/ToolbarSpacer",
11
11
  "sap/m/upload/UploadSetwithTableRenderer",
12
12
  "sap/ui/unified/FileUploader",
13
- "sap/m/upload/UploadSetToolbarPlaceholder",
14
13
  "sap/m/upload/UploaderHttpRequestMethod",
15
14
  "sap/m/OverflowToolbar",
16
15
  "sap/m/upload/UploadSetwithTableItem",
@@ -23,7 +22,6 @@ sap.ui.define([
23
22
  "sap/m/upload/UploaderTableItem",
24
23
  "sap/ui/core/dnd/DragDropInfo",
25
24
  "sap/ui/core/dnd/DropInfo",
26
- "sap/ui/core/dnd/DragInfo",
27
25
  "sap/m/upload/FilePreviewDialog",
28
26
  "sap/ui/base/Event",
29
27
  "sap/m/Dialog",
@@ -31,25 +29,41 @@ sap.ui.define([
31
29
  "sap/m/Input",
32
30
  "sap/m/MessageBox",
33
31
  "sap/m/Button",
34
- "sap/ui/base/Event",
35
- "sap/ui/core/Core"
36
- ], function (Table, ToolbarSpacer, UploadSetwithTableRenderer, FileUploader,
37
- UploadSetToolbarPlaceholder, UploaderHttpRequestMethod, OverFlowToolbar, UploadSetwithTableItem, deepEqual, Log, Library, IllustratedMessageType,
38
- IllustratedMessage, IllustratedMessageSize, Uploader, DragDropInfo, DropInfo, DragInfo, FilePreviewDialog, Event, Dialog, Label, Input, MessageBox, Button, EventBase, Core) {
39
- "use strict";
32
+ "sap/ui/core/Core",
33
+ "sap/ui/fl/variants/VariantManagement",
34
+ "sap/m/upload/p13n/PersManager",
35
+ "sap/m/upload/p13n/mediator/ColumnsMediator",
36
+ "sap/m/upload/p13n/mediator/SortMediator",
37
+ "sap/m/upload/p13n/mediator/GroupMediator",
38
+ "sap/m/upload/p13n/mediator/FilterMediator",
39
+ "sap/ui/core/mvc/XMLView",
40
+ "sap/ui/core/Element",
41
+ "sap/m/MenuButton",
42
+ "sap/m/MenuItem",
43
+ "sap/m/Menu"
44
+ ], function (Table, ToolbarSpacer, UploadSetwithTableRenderer, FileUploader, UploaderHttpRequestMethod, OverFlowToolbar, UploadSetwithTableItem, deepEqual, Log, Library, IllustratedMessageType,
45
+ IllustratedMessage, IllustratedMessageSize, Uploader, DragDropInfo, DropInfo, FilePreviewDialog, EventBase, Dialog, Label, Input, MessageBox, Button, Core, VariantManagement, PersManager,
46
+ ColumnsMediator, SortMediator, GroupMediator, FilterMediator, View, Element, MenuButton, MenuItem, Menu) {
47
+ "use strict";
40
48
 
41
49
  /**
42
50
  * Constructor for a new UploadSetwithTable.
43
51
  *
44
- * @param {string} [sId] id for the new control, generated automatically if no id is given.
52
+ * @param {string} [sId] Id for the new control, it is generated automatically if no id is provided.
45
53
  * @param {object} [mSettings] Initial settings for the new control.
46
- * @class This control allows you to upload one or more files from your device, such as desktop, tablet or phone, and attach them to your application in a tabular manner.
54
+ * @class This control allows you to upload one or more files from your device, such as desktop, tablet or phone, and attach them to your application in a responsive tabular manner.<br>
55
+ * This control builds on the {@link sap.m.upload.UploadSet UploadSet} control. Provides flexibility to tailor the design of the table including columns, cells and the content to suit specific requirements.
56
+ *
57
+ * To render the <code> sap.m.upload.UploadSetwithTable </code>control properly, the order of the columns aggregation should match the order of the cells aggregation (sap.m.upload.UploadSetwithTableItem).
58
+ *
59
+ * <b>Note:</b> Control recommends to use <code> sap.m.upload.Column </code> with the columns aggregation. <code>sap.m.upload.Column</code> control is built on <code> sap.m.Column </code> ({@link sap.m.Column Column}) control and provides ability to define personalization specific properties for column and is essential to setup personalization for the <code>sap.m.upload.UploadSetwithTable</code> control.
47
60
  * @extends sap.m.Table
48
61
  * @author SAP SE
49
62
  * @constructor
50
- * @private
51
- * @experimental
52
- * @internal
63
+ * @public
64
+ * @experimental since 1.120
65
+ * @since 1.120
66
+ * @version 1.120.0
53
67
  * @alias sap.m.upload.UploadSetwithTable
54
68
  */
55
69
  var UploadSetwithTable = Table.extend("sap.m.upload.UploadSetwithTable", {
@@ -118,6 +132,7 @@ sap.ui.define([
118
132
  * @description Item info object sent as paramter to {@link sap.m.upload.UploadSetwithTable.itemValidationHandler itemValidationHandler callback}
119
133
  * @property {sap.m.upload.UploadSetwithTableItem} oItem Current item queued for upload.
120
134
  * @property {number} iTotalItemsForUpload Total count of items queued for upload.
135
+ * @property {sap.m.upload.UploadSetwithTable} oSource Source on which the callback was invoked.
121
136
  * @public
122
137
  **/
123
138
 
@@ -135,16 +150,28 @@ sap.ui.define([
135
150
  /**
136
151
  * Determines which illustration type is displayed when the control holds no data.
137
152
  */
138
- noDataIllustrationType: {type: "sap.m.IllustratedMessageType", group: "Appearance", defaultValue: IllustratedMessageType.UploadCollection}
139
- },
140
- aggregations: {
153
+ noDataIllustrationType: {type: "sap.m.IllustratedMessageType", group: "Appearance", defaultValue: IllustratedMessageType.UploadCollection},
141
154
  /**
142
- * The header area can be used as a toolbar to add extra controls for user interactions. Note: When set, this overwrites the headerText property.
155
+ * If set to true, the variant management gets enabled.
143
156
  */
144
- headerToolbar : {
145
- type: "sap.m.OverflowToolbar",
146
- multiple: false
147
- },
157
+ enableVariantManagement: {type: "boolean", defaultValue: false},
158
+ /**
159
+ * Enables CloudFile picker feature to upload files from cloud.
160
+ * @experimental Since 1.120
161
+ */
162
+ cloudFilePickerEnabled: { type: "boolean", group: "Behavior", defaultValue: false },
163
+ /**
164
+ * Url of the FileShare OData V4 service supplied for CloudFile picker control.
165
+ * @experimental Since 1.120.
166
+ */
167
+ cloudFilePickerServiceUrl: { type: "sap.ui.core.URI", group: "Data", defaultValue: "" },
168
+ /**
169
+ * The text of the CloudFile picker button. The default text is "Upload from cloud" (translated to the respective language).
170
+ * @experimental Since 1.120.
171
+ */
172
+ cloudFilePickerButtonText: { type: 'string', defaultValue: "" }
173
+ },
174
+ aggregations: {
148
175
  /**
149
176
  * Defines the uploader to be used. If not specified, the default implementation is used.
150
177
  */
@@ -152,11 +179,7 @@ sap.ui.define([
152
179
  /**
153
180
  * Header fields to be included in the header section of an XHR request.
154
181
  */
155
- headerFields: {type: "sap.ui.core.Item", multiple: true, singularName: "headerField"},
156
- /**
157
- * Additional buttons can be added to the footer of file preview dialog
158
- */
159
- additionalFooterButtons: {type: "sap.m.Button", multiple: true}
182
+ headerFields: {type: "sap.ui.core.Item", multiple: true, singularName: "headerField"}
160
183
  },
161
184
  associations: {
162
185
  /**
@@ -165,7 +188,6 @@ sap.ui.define([
165
188
  */
166
189
  previewDialog: {type: "sap.m.upload.FilePreviewDialog", multiple: false}
167
190
  },
168
- defaultAggregation : "items",
169
191
  events: {
170
192
  /**
171
193
  * The event is triggered when the file name is changed.
@@ -368,26 +390,40 @@ sap.ui.define([
368
390
  });
369
391
 
370
392
  var UploadState = Library.UploadState;
393
+ var UploadSetwithTableActionPlaceHolder = Library.UploadSetwithTableActionPlaceHolder;
371
394
 
372
395
  /* ================== */
373
396
  /* Lifecycle handling */
374
397
  /* ================== */
375
398
 
376
399
  UploadSetwithTable.prototype.init = function () {
377
- Table.prototype.init.call(this);
400
+ Table.prototype.init.call(this);
378
401
  this._setDragDropConfig();
379
- this._filesTobeUploaded = [];
402
+ this._filesTobeUploaded = [];
380
403
  this._filePreviewDialogControl = null;
381
404
  this._oRb = Core.getLibraryResourceBundle("sap.m");
382
- };
405
+ this._bPersoRegistered = false;
406
+ this._setIllustratedMessage();
407
+ };
383
408
 
384
409
  UploadSetwithTable.prototype.onBeforeRendering = function() {
385
410
  Table.prototype.onBeforeRendering.call(this);
386
- this._setIllustratedMessage();
387
411
  };
388
412
 
389
413
  UploadSetwithTable.prototype.onAfterRendering = function() {
390
414
  Table.prototype.onAfterRendering.call(this);
415
+ if (!this._bPersoRegistered){
416
+ PersManager.getInstance().register(this, { mediators: {
417
+ columns: new ColumnsMediator({control: this, targetAggregation: "columns", p13nMetadataTarget: "columns"}),
418
+ sort: new SortMediator({control: this, targetAggregation: "sortConditions", p13nMetadataTarget: "sort"}),
419
+ group: new GroupMediator({control: this, targetAggregation: "groupConditions", p13nMetadataTarget: "group"}),
420
+ filter: new FilterMediator({control: this, targetAggregation: "filterConditions", p13nMetadataTarget: "filter"})
421
+ }});
422
+ this._bPersoRegistered = true;
423
+ }
424
+ if (this.getCloudFilePickerEnabled()) {
425
+ this._oFileUploader.addStyleClass("sapMUSTFileUploaderVisibility");
426
+ }
391
427
  };
392
428
 
393
429
  UploadSetwithTable.prototype.exit = function () {
@@ -404,35 +440,157 @@ sap.ui.define([
404
440
  this._illustratedMessage.destroy();
405
441
  this._illustratedMessage = null;
406
442
  }
443
+ this._bPersoRegistered = false;
444
+ PersManager.getInstance().deregister(this);
407
445
  };
408
446
 
409
- /* ===================== */
410
- /* Overriden API methods */
411
- /* ===================== */
447
+ /* ====================== */
448
+ /* Overridden API methods */
449
+ /* ====================== */
412
450
 
413
451
  UploadSetwithTable.prototype.getHeaderToolbar = function () {
414
452
  if (!this._oToolbar) {
415
453
  this._oToolbar = this.getAggregation("headerToolbar");
454
+
455
+ var oUploaderButton = this.getCloudFilePickerEnabled() && !this.getUploadButtonInvisible() ? this._getCloudFilePickerMenu() : this.getDefaultFileUploader();
456
+ var oCloudFilPickerButton = this.getCloudFilePickerEnabled() && this.getUploadButtonInvisible() ? this._getCloudFilePickerButton() : null;
457
+ var oPersonalizationSettingsButton = this.getEnableVariantManagement() ? this._getPersonalizationControl() : null;
458
+
416
459
  if (!this._oToolbar) {
460
+ const aToolbarContent = [new ToolbarSpacer(), oUploaderButton, oCloudFilPickerButton , oPersonalizationSettingsButton];
461
+ if (this.getEnableVariantManagement()) {
462
+ aToolbarContent.unshift(this._getVariantManagementControl());
463
+ }
417
464
  this._oToolbar = new OverFlowToolbar(this.getId() + "-toolbar", {
418
- content: [new ToolbarSpacer(), this.getDefaultFileUploader()]
465
+ content: aToolbarContent
419
466
  });
420
- this._iFileUploaderPH = 2;
421
467
  this.addDependent(this._oToolbar);
422
468
  } else {
423
- this._iFileUploaderPH = this._getFileUploaderPlaceHolderPosition(this._oToolbar);
424
- if (this._oToolbar && this._iFileUploaderPH > -1) {
425
- this._setFileUploaderInToolbar(this.getDefaultFileUploader());
469
+ const iFileUploaderPH = this._getPlaceholderPosition(this._oToolbar, UploadSetwithTableActionPlaceHolder.UploadButtonPlaceholder);
470
+ if (this._oToolbar && iFileUploaderPH > -1) {
471
+ this._setControlInToolbar(iFileUploaderPH, oUploaderButton);
472
+ } else if (this._oToolbar) {
473
+ // fallback position to add file uploader control if UploadSetwithTableActionPlaceHolder.UploadButtonPlaceholder instance not found
474
+ this._oToolbar.addContent(oUploaderButton);
475
+ }
476
+
477
+ const iCloudFilePickerPH = this._getPlaceholderPosition(this._oToolbar, UploadSetwithTableActionPlaceHolder.CloudFilePickerButtonPlaceholder);
478
+ if (this._oToolbar && iCloudFilePickerPH > -1) {
479
+ this._setControlInToolbar(iCloudFilePickerPH, oCloudFilPickerButton);
480
+ } else if (this._oToolbar) {
481
+ // fallback position to add cloud file picker control if UploadSetwithTableActionPlaceHolder.CloudFilePickerButtonPlaceholder instance not found
482
+ this._oToolbar.addContent(oCloudFilPickerButton);
483
+ }
484
+
485
+ const iPersonalizationPH = this._getPlaceholderPosition(this._oToolbar, UploadSetwithTableActionPlaceHolder.PersonalizationSettingsPlaceholder);
486
+ if (this._oToolbar && iPersonalizationPH > -1) {
487
+ this._setControlInToolbar(iPersonalizationPH, this._getPersonalizationControl());
426
488
  } else if (this._oToolbar) {
427
- // fallback position to add file uploader control if UploadSetToolbarPlaceHolder instance not found
428
- this._oToolbar.addContent(this.getDefaultFileUploader());
489
+ // fallback position to add file uploader control if UploadSetwithTableActionPlaceHolder.PersonalizationSettingsPlaceholder instance not found
490
+ // add personalization settings button only if variant management is enabled and placeholder not provided by default.
491
+ if (this.getEnableVariantManagement()) {
492
+ this._oToolbar.addContent(this._getPersonalizationControl());
493
+ }
429
494
  }
495
+
496
+ if (this.getEnableVariantManagement()) {
497
+ const iVmPH = this._getPlaceholderPosition(this._oToolbar, UploadSetwithTableActionPlaceHolder.VariantManagementPlaceholder);
498
+ if (iVmPH > -1) {
499
+ this._setControlInToolbar(iVmPH, this._getVariantManagementControl());
500
+ } else {
501
+ this._oToolbar.insertContent(this._getVariantManagementControl(), 0);
502
+ }
503
+ }
504
+ }
505
+ // Rendering the upload button on the toolbar which is required to maintain the FUEL instance in case we hide it and reuse it for cloudfilepicker menu.
506
+ if (this.getCloudFilePickerEnabled()) {
507
+ this._oToolbar.addContent(this.getDefaultFileUploader());
430
508
  }
431
509
  }
432
-
433
510
  return this._oToolbar;
434
511
  };
435
512
 
513
+ /**
514
+ * Returns the button that is used to open p13n dialog.
515
+ * @private
516
+ * @returns {sap.m.Button} button.
517
+ */
518
+ UploadSetwithTable.prototype._getPersonalizationControl = function () {
519
+ return new Button({
520
+ icon: "sap-icon://action-settings",
521
+ press: function () {
522
+ PersManager.getInstance().show(this, ["columns", "sort", "group", "filter"]);
523
+ }.bind(this)
524
+ });
525
+ };
526
+
527
+ /**
528
+ * Returns variant management control.
529
+ * @private
530
+ * @returns {sap.ui.fl.variants.VariantManagement} control.
531
+ */
532
+ UploadSetwithTable.prototype._getVariantManagementControl = function () {
533
+ if (!this._oVariantManagement) {
534
+ this._oVariantManagement = new VariantManagement({
535
+ "id": this.getId() + "-variantManagement",
536
+ "for": [
537
+ this//container
538
+ ]
539
+ });
540
+ }
541
+ return this._oVariantManagement;
542
+ };
543
+
544
+ UploadSetwithTable.prototype.getView = function () {
545
+ return this.getControlOfType(this, View);
546
+ };
547
+
548
+ UploadSetwithTable.prototype.getControlOfType = function (oControl, oType) {
549
+ if (oControl instanceof oType) {
550
+ return oControl;
551
+ }
552
+ if (oControl && typeof oControl["getParent" === "function"]) {
553
+ return this.getControlOfType(oControl.getParent(), oType);
554
+ }
555
+ return undefined;
556
+ };
557
+
558
+ /**
559
+ * Collects and return p13n metadata from UploadSetwithTable column for p13n dialog panels.
560
+ * @private
561
+ * @returns {object} object with data for p13n panels.
562
+ */
563
+ UploadSetwithTable.prototype._getP13nMetadata = function () {
564
+ if (!this._p13nMetadata) {
565
+ const oView = this.getView(),
566
+ aInitMetadata = this.getColumns().map(function(entry) {
567
+ return {
568
+ key: oView ? oView.getLocalId(entry.getId()) : entry.getId(),
569
+ label: entry.getColumnPersonalizationText(),
570
+ path: entry.getPath(),
571
+ visible: entry.getVisible(),
572
+ sortable: entry.getSortable(),
573
+ groupable: entry.getGroupable(),
574
+ filterable: entry.getFilterable()
575
+ };
576
+ });
577
+ this._p13nMetadata = {columns: [], sort: [], group: [], filter: []};
578
+ aInitMetadata.forEach((entry) => {
579
+ this._p13nMetadata.columns.push({key: entry.key, label: entry.label});
580
+ if (entry.sortable && entry.path) {
581
+ this._p13nMetadata.sort.push({key: entry.key, label: entry.label, path: entry.path});
582
+ }
583
+ if (entry.groupable && entry.path) {
584
+ this._p13nMetadata.group.push({key: entry.key, label: entry.label, path: entry.path});
585
+ }
586
+ if (entry.filterable && entry.path) {
587
+ this._p13nMetadata.filter.push({key: entry.key, label: entry.label, path: entry.path});
588
+ }
589
+ });
590
+ }
591
+ return this._p13nMetadata;
592
+ };
593
+
436
594
  UploadSetwithTable.prototype.setFileTypes = function (aNewTypes) {
437
595
  var aTypes = aNewTypes || null;
438
596
  if (typeof aTypes === "string") {
@@ -481,6 +639,8 @@ sap.ui.define([
481
639
 
482
640
  UploadSetwithTable.prototype.setUploadButtonInvisible = function (bUploadButtonInvisible) {
483
641
  if (bUploadButtonInvisible !== this.getUploadButtonInvisible()) {
642
+ var bVisible = !bUploadButtonInvisible;
643
+ this.getDefaultFileUploader().setVisible(bVisible);
484
644
  this.setProperty("uploadButtonInvisible", bUploadButtonInvisible, true);
485
645
  }
486
646
  return this;
@@ -502,14 +662,6 @@ sap.ui.define([
502
662
  return this;
503
663
  };
504
664
 
505
- UploadSetwithTable.prototype.setMultiple = function (bMultiple) {
506
- if (this.getMultiple() !== bMultiple) {
507
- this.setProperty("multiple", bMultiple);
508
- this.getDefaultFileUploader().setMultiple(bMultiple);
509
- }
510
- return this;
511
- };
512
-
513
665
  UploadSetwithTable.prototype.setDirectory = function (bDirectory) {
514
666
  if (this.getDirectory() !== bDirectory) {
515
667
  this.setProperty("directory", bDirectory);
@@ -521,6 +673,36 @@ sap.ui.define([
521
673
  return this;
522
674
  };
523
675
 
676
+ UploadSetwithTable.prototype.setNoDataIllustrationType = function (setIllustrationType) {
677
+ if (this.getNoDataIllustrationType() !== setIllustrationType) {
678
+ this.setProperty("noDataIllustrationType", setIllustrationType);
679
+ if (this._illustratedMessage) {
680
+ this._illustratedMessage.setIllustrationType(this.getNoDataIllustrationType());
681
+ }
682
+ }
683
+ return this;
684
+ };
685
+
686
+ UploadSetwithTable.prototype.setNoDataText = function(sNoDataTxt) {
687
+ if (this.getNoData() !== sNoDataTxt) {
688
+ this.setProperty("noDataText", sNoDataTxt);
689
+ if (this._illustratedMessage) {
690
+ this._illustratedMessage.setTitle(this.getNoDataText());
691
+ }
692
+ }
693
+ return this;
694
+ };
695
+
696
+ UploadSetwithTable.prototype.setNoDataDescription = function(sNoDataDescription) {
697
+ if (this.getNoDataDescription() !== sNoDataDescription) {
698
+ this.setProperty("noDataDescription", sNoDataDescription);
699
+ if (this._illustratedMessage) {
700
+ this._illustratedMessage.setDescription(this.getNoDataDescription());
701
+ }
702
+ }
703
+ return this;
704
+ };
705
+
524
706
  /* ============== */
525
707
  /* Public methods */
526
708
  /* ============== */
@@ -556,7 +738,7 @@ sap.ui.define([
556
738
  typeMissmatch: [this._fireFileTypeMismatch, this],
557
739
  fileSizeExceed: [this._fireFileSizeExceed, this],
558
740
  filenameLengthExceed: [this._fireFilenameLengthExceed, this],
559
- visible: true,
741
+ visible: !this.getUploadButtonInvisible(),
560
742
  directory: this.getDirectory()
561
743
  });
562
744
  }
@@ -575,28 +757,6 @@ sap.ui.define([
575
757
  return UploadSetwithTableItem._getIconByMimeType(mediaType, fileName);
576
758
  };
577
759
 
578
- /**
579
- * Downloads the item. Only possible when the item has a valid URL specified in the <code>url</code> property of the item.
580
- * @param {UploadSetwithTableItem[]} aItemsToDownload The list items the selection state is to be set for
581
- * @param {boolean} bAskForLocation If the location is to be determined as to where the file is to be downloaded.
582
- * @public
583
- */
584
- UploadSetwithTable.prototype.downloadItems = function (aItemsToDownload, bAskForLocation) {
585
- if (aItemsToDownload && aItemsToDownload.length) {
586
- aItemsToDownload.forEach(function(oItem){
587
- // Check if items are instances of "sap.m.UploadSetwithTableItem"
588
- var isUploadSetwithTableItemInstance = oItem && oItem instanceof UploadSetwithTableItem ? true : false;
589
- var oParent = oItem && oItem.getParent ? oItem.getParent() : null;
590
- // Download files individually
591
- if (isUploadSetwithTableItemInstance && oParent === this) {
592
- this._getActiveUploader().download(oItem, [], bAskForLocation);
593
- } else {
594
- Log.warning("Download cannot proceed without a parent association.");
595
- }
596
- }.bind(this));
597
- }
598
- };
599
-
600
760
  /**
601
761
  * Attaches all necessary handlers to the given uploader instance, so that the progress and status of the upload can be
602
762
  * displayed and monitored.
@@ -625,7 +785,7 @@ sap.ui.define([
625
785
  * API recommended for file size formatting purpose.
626
786
  * @param {int} iFileSize fileSize to determine units
627
787
  * @public
628
- * @returns {sFileSizeWithUnit} file size in KB/MB/GB default unit is KB
788
+ * @returns {string} sFileSizeWithUnit file size in KB/MB/GB default unit is KB
629
789
  */
630
790
  UploadSetwithTable.getFileSizeWithUnits = function(iFileSize) {
631
791
  var iKilobyte = 1024;
@@ -691,7 +851,7 @@ sap.ui.define([
691
851
 
692
852
  /**
693
853
  * API to rename the document of an item.
694
- * @param {sap.m.upload.UploadSetwithTableItem} oItem, target item.
854
+ * @param {sap.m.upload.UploadSetwithTableItem} oItem target item.
695
855
  * @public
696
856
  */
697
857
  UploadSetwithTable.prototype.renameItem = function (oItem) {
@@ -705,15 +865,15 @@ sap.ui.define([
705
865
  /* Private methods */
706
866
  /* ============== */
707
867
 
708
- UploadSetwithTable.prototype._setFileUploaderInToolbar = function(fileUploader) {
709
- this._oToolbar.getContent()[this._iFileUploaderPH].setVisible(false);
710
- this._oToolbar.insertContent(fileUploader, this._iFileUploaderPH);
868
+ UploadSetwithTable.prototype._setControlInToolbar = function(iIndex, control) {
869
+ this._oToolbar.getContent()[iIndex].setVisible(false);
870
+ this._oToolbar.insertContent(control, iIndex);
711
871
  };
712
872
 
713
- UploadSetwithTable.prototype._getFileUploaderPlaceHolderPosition = function(toolbar) {
714
- for (var i = 0; i < toolbar.getContent().length; i++) {
715
- if (toolbar.getContent()[i] instanceof UploadSetToolbarPlaceholder) {
716
- return i;
873
+ UploadSetwithTable.prototype._getPlaceholderPosition = function(toolbar, placeholderType) {
874
+ for (var i = 0; i < toolbar.getContent().length; i++) {
875
+ if (toolbar.getContent()[i].isA("sap.m.upload.ActionsPlaceholder") && toolbar.getContent()[i].getPlaceholderFor() === placeholderType) {
876
+ return i;
717
877
  }
718
878
  }
719
879
  return -1;
@@ -733,9 +893,9 @@ sap.ui.define([
733
893
  }
734
894
  this._processSelectedFileObjects(oFiles);
735
895
  }
736
- };
896
+ };
737
897
 
738
- UploadSetwithTable.prototype._processSelectedFileObjects = function (oFiles) {
898
+ UploadSetwithTable.prototype._processSelectedFileObjects = function (oFiles) {
739
899
  var aFiles = [];
740
900
 
741
901
  // Need to explicitly copy the file list, FileUploader deliberately resets its form completely
@@ -748,6 +908,7 @@ sap.ui.define([
748
908
  var oItem = new UploadSetwithTableItem({
749
909
  uploadState: UploadState.Ready
750
910
  });
911
+ oItem.setParent(this); // setting the parent as UploadSetwithTable for file validations
751
912
  oItem._setFileObject(oFile);
752
913
  oItem.setFileName(oFile.name);
753
914
 
@@ -756,7 +917,8 @@ sap.ui.define([
756
917
 
757
918
  const oItemInfo = {
758
919
  oItem: oItem,
759
- iTotalItemsForUpload: aFiles.length
920
+ iTotalItemsForUpload: aFiles.length,
921
+ oSource: this
760
922
  };
761
923
 
762
924
  var oPromise = this.getItemValidationHandler()(oItemInfo);
@@ -805,10 +967,17 @@ sap.ui.define([
805
967
  var bMediaRestricted = (!!aMediaTypes && (aMediaTypes.length > 0) && !!sMediaType && aMediaTypes.indexOf(sMediaType) === -1);
806
968
  var bFileRestricted = (!!aFileTypes && (aFileTypes.length > 0) && !!sFileType && aFileTypes.indexOf(sFileType) === -1);
807
969
 
808
- var oMismatchItem = {
809
- fileType: sFileType,
810
- mimeType: sMediaType
811
- };
970
+ var parts = [new Blob([])];
971
+
972
+ var oFileMetaData = {
973
+ type: oItem.getParameter('fileType'),
974
+ webkitRelativePath: '',
975
+ name: oItem.getParameter('fileName')
976
+ };
977
+ var oFileObject = new File(parts, oItem.getParameter('fileName'), oFileMetaData);
978
+ var oMismatchItem = new UploadSetwithTableItem();
979
+ oMismatchItem._setFileObject(oFileObject);
980
+ oMismatchItem.setFileName(oFileObject.name);
812
981
 
813
982
  if (bMediaRestricted){
814
983
  this.fireMediaTypeMismatch({item: oMismatchItem});
@@ -818,11 +987,15 @@ sap.ui.define([
818
987
  };
819
988
 
820
989
  UploadSetwithTable.prototype._fireFilenameLengthExceed = function (oItem) {
821
- this.fireFileNameLengthExceeded({item: oItem});
990
+ var oTargetItem = new UploadSetwithTableItem();
991
+ oTargetItem.setFileName(oItem.getParameter('fileName'));
992
+ this.fireFileNameLengthExceeded({item: oTargetItem});
822
993
  };
823
994
 
824
995
  UploadSetwithTable.prototype._fireFileSizeExceed = function (oItem) {
825
- this.fireFileSizeExceeded({item: oItem});
996
+ var oTargetItem = new UploadSetwithTableItem();
997
+ oTargetItem.setFileName(oItem.getParameter('fileName'));
998
+ this.fireFileSizeExceeded({item: oTargetItem});
826
999
  };
827
1000
 
828
1001
  UploadSetwithTable.prototype._onUploadStarted = function (oEvent) {
@@ -1049,8 +1222,8 @@ sap.ui.define([
1049
1222
  const oAssociatedPreviewDialog = new FilePreviewDialog();
1050
1223
  this.setPreviewDialog(oAssociatedPreviewDialog);
1051
1224
  }
1052
- this._filePreviewDialogControl = Core.byId(this.getPreviewDialog());
1053
- // var aitems = this.getAdditionalFooterButtons();
1225
+ this._filePreviewDialogControl = Element.getElementById(this.getPreviewDialog());
1226
+
1054
1227
  if (this._filePreviewDialogControl) {
1055
1228
  this._filePreviewDialogControl._previewItem = oItem;
1056
1229
  this._filePreviewDialogControl._items = this.getItems();
@@ -1207,5 +1380,226 @@ sap.ui.define([
1207
1380
  }
1208
1381
  };
1209
1382
 
1383
+ /**
1384
+ * Returns CloudFile picker menu button
1385
+ * @return {sap.m.MenuButton} CloudPicker & LocalFileUpload Menu button
1386
+ * @private
1387
+ */
1388
+ UploadSetwithTable.prototype._getCloudFilePickerMenu = function () {
1389
+ this._oMenuButton = new MenuButton({
1390
+ text: this._oRb.getText("UPLOAD_SET_DEFAULT_LFP_BUTTON_TEXT"),
1391
+ buttonMode: sap.m.MenuButtonMode.Split,
1392
+ menu: this._getMenuButtonItems(),
1393
+ defaultAction: this.fileSelectionHandler.bind(this)
1394
+ });
1395
+ return this._oMenuButton;
1396
+ };
1397
+
1398
+ /**
1399
+ * Returns Cloud File picker button
1400
+ * @return {sap.m.Button} Cloudfile Picker button
1401
+ * @private
1402
+ */
1403
+ UploadSetwithTable.prototype._getCloudFilePickerButton = function () {
1404
+ this._oCloudFilePickerButton = new Button({
1405
+ text: this.getCloudFilePickerButtonText() ? this.getCloudFilePickerButtonText() : this._oRb.getText("UPLOAD_SET_DEFAULT_CFP_BUTTON_TEXT"),
1406
+ press: this._invokeCloudFilePicker.bind(this)
1407
+ });
1408
+ return this._oCloudFilePickerButton;
1409
+ };
1410
+
1411
+ UploadSetwithTable.prototype._itemSelectedCallback = function (oEvent) {
1412
+ var oItem = oEvent.getParameter("item");
1413
+ // eslint-disable-next-line default-case
1414
+ switch (oItem.getText()) {
1415
+ case this.getCloudFilePickerButtonText() ? this.getCloudFilePickerButtonText() : this._oRb.getText("UPLOAD_SET_DEFAULT_CFP_BUTTON_TEXT"):
1416
+ this._oMenuButton
1417
+ .detachEvent("defaultAction", this.fileSelectionHandler.bind(this))
1418
+ .attachEvent("defaultAction", this._invokeCloudFilePicker.bind(this));
1419
+
1420
+ this._invokeCloudFilePicker();
1421
+ this._oMenuButton.setText(oItem.getText());
1422
+ break;
1423
+ case this._oRb.getText("UPLOAD_SET_DEFAULT_LFP_BUTTON_TEXT"):
1424
+ this._oMenuButton
1425
+ .detachEvent("defaultAction", this._invokeCloudFilePicker.bind(this))
1426
+ .attachEvent("defaultAction", this.fileSelectionHandler.bind(this));
1427
+
1428
+ this.fileSelectionHandler();
1429
+ this._oMenuButton.setText(oItem.getText());
1430
+ break;
1431
+ }
1432
+ };
1433
+
1434
+ UploadSetwithTable.prototype._getMenuButtonItems = function () {
1435
+ return new Menu({
1436
+ items: [
1437
+ new MenuItem({ text: this._oRb.getText("UPLOAD_SET_DEFAULT_LFP_BUTTON_TEXT") }),
1438
+ new MenuItem({ text: this.getCloudFilePickerButtonText() ? this.getCloudFilePickerButtonText() : this._oRb.getText("UPLOAD_SET_DEFAULT_CFP_BUTTON_TEXT") })
1439
+ ],
1440
+ itemSelected: this._itemSelectedCallback.bind(this)
1441
+ });
1442
+ };
1443
+
1444
+ /**
1445
+ * Creates and invokes CloudFilePicker control instance
1446
+ * @private
1447
+ * @returns {Object} cloudFile picker instance
1448
+ */
1449
+ UploadSetwithTable.prototype._invokeCloudFilePicker = function () {
1450
+ var oCloudFilePickerInstance = null;
1451
+ if (this._cloudFilePickerControl) {
1452
+ oCloudFilePickerInstance = this._getCloudFilePickerInstance();
1453
+ oCloudFilePickerInstance.open();
1454
+ } else {
1455
+ // Dynamically load and cache CloudFilePicker control for first time
1456
+ this._loadCloudFilePickerDependency()
1457
+ .then( (cloudFilePicker) => {
1458
+ this._cloudFilePickerControl = cloudFilePicker;
1459
+ oCloudFilePickerInstance = this._getCloudFilePickerInstance();
1460
+ oCloudFilePickerInstance.open();
1461
+ })
1462
+ .catch((error) => {
1463
+ Log.error(error);
1464
+ });
1465
+ }
1466
+ return oCloudFilePickerInstance;
1467
+ };
1468
+
1469
+ /**
1470
+ * Event handler for CloudFile picker selector
1471
+ * @param {Object} oEvent CloudFile picker file selection DOM change event
1472
+ * @private
1473
+ */
1474
+ UploadSetwithTable.prototype._onCloudPickerFileChange = function (oEvent) {
1475
+
1476
+ var mParameters = oEvent.getParameters();
1477
+ var aFiles = [];
1478
+ if (mParameters && mParameters.selectedFiles) {
1479
+ mParameters.selectedFiles.forEach( (file) => {
1480
+ aFiles.push(this._createFileFromCloudPickerFile(file));
1481
+ });
1482
+ }
1483
+
1484
+ // invoking this method to handle file uploads
1485
+ this._processNewCloudPickerFileObjects(aFiles);
1486
+ };
1487
+
1488
+ /**
1489
+ * Creates file object that is to be uploaded from the CloudFilePicker file object
1490
+ * @param {sap.suite.ui.commons.CloudFileInfo} oCloudFile CloudFilepicker file object
1491
+ * @returns {Object} file metadata with file object and fileshare properties
1492
+ * @private
1493
+ */
1494
+ UploadSetwithTable.prototype._createFileFromCloudPickerFile = function (oCloudFile) {
1495
+ var parts = [new Blob([])];
1496
+ var oFileMetaData = {
1497
+ type: oCloudFile.getFileShareItemContentType(),
1498
+ size: oCloudFile.getFileShareItemContentSize(),
1499
+ webkitRelativePath: '',
1500
+ name: oCloudFile.getFileShareItemName()
1501
+ };
1502
+ var oFile = new File(parts, oCloudFile.getFileShareItemName(), oFileMetaData);
1503
+ return {
1504
+ file: oFile,
1505
+ fileShareProperties: oCloudFile.mProperties
1506
+ };
1507
+ };
1508
+
1509
+ /**
1510
+ * Processing and uploading of file objects selected from the CloudFilePicker
1511
+ * @param {Array} oFiles File metadata list containing file to be uploaded and fileshare properties used for mapping
1512
+ * @private
1513
+ */
1514
+ UploadSetwithTable.prototype._processNewCloudPickerFileObjects = function (oFiles) {
1515
+
1516
+ oFiles.forEach( (oFileMetaData) => {
1517
+ var oFile = oFileMetaData.file;
1518
+ // set the fileshareProperties for the new file created.
1519
+ const oFileShareProperties = oFileMetaData.fileShareProperties;
1520
+
1521
+ var oItem = new UploadSetwithTableItem({
1522
+ uploadState: UploadState.Ready
1523
+ });
1524
+ oItem._setFileObject(oFile);
1525
+ oItem.setFileName(oFile.name);
1526
+
1527
+ // Set the file share properties if its cloud picker selected file. So that the info is avilable on the item getCloudFileInfo API.
1528
+ if (oFile && oFileShareProperties) {
1529
+ oItem._setCloudFileInfo(oFileShareProperties);
1530
+ }
1531
+
1532
+
1533
+ if (this.getItemValidationHandler() && typeof this.getItemValidationHandler() === "function" ) {
1534
+
1535
+ const oItemInfo = {
1536
+ oItem: oItem,
1537
+ iTotalItemsForUpload: oFiles.length,
1538
+ oSource: this
1539
+ };
1540
+
1541
+ var oPromise = this.getItemValidationHandler()(oItemInfo);
1542
+ if (oPromise && oPromise instanceof Promise) {
1543
+ oPromise
1544
+ .then((item) => {
1545
+ if (item instanceof UploadSetwithTableItem) {
1546
+ this._initateItemUpload(item);
1547
+ }
1548
+ })
1549
+ .catch((item) => {
1550
+ // Reset variable to avoid update if upload rejected.
1551
+ if (item && this._oItemToUpdate && item instanceof UploadSetwithTableItem && item.getId() === this._oItemToUpdate.getId()) {
1552
+ this._oItemToUpdate = null;
1553
+ }
1554
+ });
1555
+ } else {
1556
+ oItem.destroy();
1557
+ // if promise is not returned to the ItemValidation hook log error and destroy the item
1558
+ Log.error("Invalid usage, missing Promise: ItemValidationHandler callback expects Promise to be returned.");
1559
+ }
1560
+ } else {
1561
+ /* if no validation handler is provided control continues with normal upload else waits for the application to manually
1562
+ trigger the upload by resolving the promise */
1563
+ this._initateItemUpload(oItem);
1564
+ }
1565
+ });
1566
+ };
1567
+
1568
+ /**
1569
+ * Dynamically require CloudFilePicker Control
1570
+ * @returns {Promise} Promise that resolves on sucessful load of CloudFilePicker control
1571
+ * @private
1572
+ */
1573
+ UploadSetwithTable.prototype._loadCloudFilePickerDependency = function () {
1574
+ return new Promise( (resolve, reject) => {
1575
+ Core.loadLibrary("sap.suite.ui.commons", { async: true })
1576
+ .then(function (data) {
1577
+ sap.ui.require(["sap/suite/ui/commons/CloudFilePicker"], function (cloudFilePicker) {
1578
+ resolve(cloudFilePicker);
1579
+ }, function (error) {
1580
+ reject(error);
1581
+ });
1582
+ })
1583
+ .catch(function () {
1584
+ reject("CloudFilePicker Control not available.");
1585
+ });
1586
+ });
1587
+ };
1588
+
1589
+ /**
1590
+ * Creates CloudFilePicker Instance
1591
+ * @returns {sap.suite.ui.commons.CloudFilePicker} CloudFilePicker instance
1592
+ * @private
1593
+ */
1594
+ UploadSetwithTable.prototype._getCloudFilePickerInstance = function () {
1595
+ return new this._cloudFilePickerControl({
1596
+ serviceUrl: this.getCloudFilePickerServiceUrl(),
1597
+ confirmButtonText: this._oRb.getText("SELECT_PICKER_TITLE_TEXT"),
1598
+ title: this._oRb.getText("SELECT_PICKER_TITLE_TEXT"),
1599
+ fileNameMandatory: true,
1600
+ select: this._onCloudPickerFileChange.bind(this)
1601
+ });
1602
+ };
1603
+
1210
1604
  return UploadSetwithTable;
1211
1605
  });