@sapui5/sap.cux.home 1.135.0 → 1.136.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 (436) hide show
  1. package/package.json +1 -1
  2. package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js +23 -5
  3. package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js.map +1 -1
  4. package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +7 -0
  5. package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
  6. package/src/sap/cux/home/AdvancedSettingsPanel.js +1 -1
  7. package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
  8. package/src/sap/cux/home/AdvancedSettingsPanel.ts +24 -5
  9. package/src/sap/cux/home/AppsAdditionPanel-dbg.js +919 -0
  10. package/src/sap/cux/home/AppsAdditionPanel-dbg.js.map +1 -0
  11. package/src/sap/cux/home/AppsAdditionPanel.d.ts +293 -0
  12. package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -0
  13. package/src/sap/cux/home/AppsAdditionPanel.js +6 -0
  14. package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -0
  15. package/src/sap/cux/home/AppsAdditionPanel.ts +757 -0
  16. package/src/sap/cux/home/AppsContainer-dbg.js +42 -28
  17. package/src/sap/cux/home/AppsContainer-dbg.js.map +1 -1
  18. package/src/sap/cux/home/AppsContainer.d.ts +17 -1
  19. package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
  20. package/src/sap/cux/home/AppsContainer.js +1 -1
  21. package/src/sap/cux/home/AppsContainer.js.map +1 -1
  22. package/src/sap/cux/home/AppsContainer.ts +27 -6
  23. package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js +261 -0
  24. package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js.map +1 -0
  25. package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts +8 -0
  26. package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts.map +1 -0
  27. package/src/sap/cux/home/AppsContainerGenericPlaceholder.js +6 -0
  28. package/src/sap/cux/home/AppsContainerGenericPlaceholder.js.map +1 -0
  29. package/src/sap/cux/home/AppsContainerGenericPlaceholder.ts +251 -0
  30. package/src/sap/cux/home/BaseAppPanel-dbg.js +4 -5
  31. package/src/sap/cux/home/BaseAppPanel-dbg.js.map +1 -1
  32. package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
  33. package/src/sap/cux/home/BaseAppPanel.js +1 -1
  34. package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
  35. package/src/sap/cux/home/BaseAppPanel.ts +3 -5
  36. package/src/sap/cux/home/BaseAppPersPanel-dbg.js +2 -1
  37. package/src/sap/cux/home/BaseAppPersPanel-dbg.js.map +1 -1
  38. package/src/sap/cux/home/BaseAppPersPanel.d.ts.map +1 -1
  39. package/src/sap/cux/home/BaseAppPersPanel.js +1 -1
  40. package/src/sap/cux/home/BaseAppPersPanel.js.map +1 -1
  41. package/src/sap/cux/home/BaseAppPersPanel.ts +2 -1
  42. package/src/sap/cux/home/BaseContainer-dbg.js +24 -3
  43. package/src/sap/cux/home/BaseContainer-dbg.js.map +1 -1
  44. package/src/sap/cux/home/BaseContainer.d.ts +10 -0
  45. package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
  46. package/src/sap/cux/home/BaseContainer.js +1 -1
  47. package/src/sap/cux/home/BaseContainer.js.map +1 -1
  48. package/src/sap/cux/home/BaseContainer.ts +24 -2
  49. package/src/sap/cux/home/BaseContainerRenderer-dbg.js +18 -1
  50. package/src/sap/cux/home/BaseContainerRenderer-dbg.js.map +1 -1
  51. package/src/sap/cux/home/BaseContainerRenderer.d.ts +4 -4
  52. package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
  53. package/src/sap/cux/home/BaseContainerRenderer.js +1 -1
  54. package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
  55. package/src/sap/cux/home/BaseContainerRenderer.ts +25 -4
  56. package/src/sap/cux/home/BaseLayout-dbg.js +22 -2
  57. package/src/sap/cux/home/BaseLayout-dbg.js.map +1 -1
  58. package/src/sap/cux/home/BaseLayout.d.ts +6 -0
  59. package/src/sap/cux/home/BaseLayout.d.ts.map +1 -1
  60. package/src/sap/cux/home/BaseLayout.js +1 -1
  61. package/src/sap/cux/home/BaseLayout.js.map +1 -1
  62. package/src/sap/cux/home/BaseLayout.ts +23 -2
  63. package/src/sap/cux/home/BaseNewsItem-dbg.js +3 -3
  64. package/src/sap/cux/home/BaseNewsItem-dbg.js.map +1 -1
  65. package/src/sap/cux/home/BaseNewsItem.js +1 -1
  66. package/src/sap/cux/home/BaseNewsItem.js.map +1 -1
  67. package/src/sap/cux/home/BaseNewsItem.ts +3 -3
  68. package/src/sap/cux/home/BaseNewsPanel-dbg.js +4 -5
  69. package/src/sap/cux/home/BaseNewsPanel-dbg.js.map +1 -1
  70. package/src/sap/cux/home/BaseNewsPanel.d.ts.map +1 -1
  71. package/src/sap/cux/home/BaseNewsPanel.js +1 -1
  72. package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
  73. package/src/sap/cux/home/BaseNewsPanel.ts +5 -4
  74. package/src/sap/cux/home/BasePanel-dbg.js +1 -1
  75. package/src/sap/cux/home/BasePanel-dbg.js.map +1 -1
  76. package/src/sap/cux/home/BasePanel.js +1 -1
  77. package/src/sap/cux/home/BasePanel.js.map +1 -1
  78. package/src/sap/cux/home/BasePanel.ts +1 -1
  79. package/src/sap/cux/home/BaseSettingsDialog-dbg.js +11 -0
  80. package/src/sap/cux/home/BaseSettingsDialog-dbg.js.map +1 -1
  81. package/src/sap/cux/home/BaseSettingsDialog.d.ts.map +1 -1
  82. package/src/sap/cux/home/BaseSettingsDialog.js +1 -1
  83. package/src/sap/cux/home/BaseSettingsDialog.js.map +1 -1
  84. package/src/sap/cux/home/BaseSettingsDialog.ts +12 -0
  85. package/src/sap/cux/home/BaseSettingsPanel-dbg.js +67 -2
  86. package/src/sap/cux/home/BaseSettingsPanel-dbg.js.map +1 -1
  87. package/src/sap/cux/home/BaseSettingsPanel.d.ts +42 -0
  88. package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
  89. package/src/sap/cux/home/BaseSettingsPanel.gen.d.ts +75 -0
  90. package/src/sap/cux/home/BaseSettingsPanel.js +1 -1
  91. package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
  92. package/src/sap/cux/home/BaseSettingsPanel.ts +70 -2
  93. package/src/sap/cux/home/CardsPanel-dbg.js +548 -168
  94. package/src/sap/cux/home/CardsPanel-dbg.js.map +1 -1
  95. package/src/sap/cux/home/CardsPanel.d.ts +121 -15
  96. package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
  97. package/src/sap/cux/home/CardsPanel.gen.d.ts +78 -0
  98. package/src/sap/cux/home/CardsPanel.js +1 -1
  99. package/src/sap/cux/home/CardsPanel.js.map +1 -1
  100. package/src/sap/cux/home/CardsPanel.ts +450 -97
  101. package/src/sap/cux/home/ContentAdditionDialog-dbg.js +353 -0
  102. package/src/sap/cux/home/ContentAdditionDialog-dbg.js.map +1 -0
  103. package/src/sap/cux/home/ContentAdditionDialog.d.ts +82 -0
  104. package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -0
  105. package/src/sap/cux/home/ContentAdditionDialog.js +6 -0
  106. package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -0
  107. package/src/sap/cux/home/ContentAdditionDialog.ts +214 -0
  108. package/src/sap/cux/home/ErrorPanel-dbg.js +3 -3
  109. package/src/sap/cux/home/ErrorPanel-dbg.js.map +1 -1
  110. package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
  111. package/src/sap/cux/home/ErrorPanel.js +1 -1
  112. package/src/sap/cux/home/ErrorPanel.js.map +1 -1
  113. package/src/sap/cux/home/ErrorPanel.ts +4 -2
  114. package/src/sap/cux/home/FavAppPanel-dbg.js +352 -333
  115. package/src/sap/cux/home/FavAppPanel-dbg.js.map +1 -1
  116. package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
  117. package/src/sap/cux/home/FavAppPanel.js +1 -1
  118. package/src/sap/cux/home/FavAppPanel.js.map +1 -1
  119. package/src/sap/cux/home/FavAppPanel.ts +63 -54
  120. package/src/sap/cux/home/InsightsAdditionPanel-dbg.js +97 -0
  121. package/src/sap/cux/home/InsightsAdditionPanel-dbg.js.map +1 -0
  122. package/src/sap/cux/home/InsightsAdditionPanel.d.ts +57 -0
  123. package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -0
  124. package/src/sap/cux/home/InsightsAdditionPanel.js +6 -0
  125. package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -0
  126. package/src/sap/cux/home/InsightsAdditionPanel.ts +94 -0
  127. package/src/sap/cux/home/InsightsContainer-dbg.js +22 -2
  128. package/src/sap/cux/home/InsightsContainer-dbg.js.map +1 -1
  129. package/src/sap/cux/home/InsightsContainer.d.ts +14 -0
  130. package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
  131. package/src/sap/cux/home/InsightsContainer.js +1 -1
  132. package/src/sap/cux/home/InsightsContainer.js.map +1 -1
  133. package/src/sap/cux/home/InsightsContainer.ts +22 -1
  134. package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js +401 -0
  135. package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js.map +1 -0
  136. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts +8 -0
  137. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts.map +1 -0
  138. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js +6 -0
  139. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js.map +1 -0
  140. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.ts +391 -0
  141. package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js +10 -9
  142. package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js.map +1 -1
  143. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
  144. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +1 -1
  145. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
  146. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +9 -8
  147. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js +2 -2
  148. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js.map +1 -1
  149. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +1 -1
  150. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
  151. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +2 -2
  152. package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js +6 -6
  153. package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js.map +1 -1
  154. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js +1 -1
  155. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
  156. package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +6 -6
  157. package/src/sap/cux/home/Layout-dbg.js +58 -33
  158. package/src/sap/cux/home/Layout-dbg.js.map +1 -1
  159. package/src/sap/cux/home/Layout.d.ts +13 -0
  160. package/src/sap/cux/home/Layout.d.ts.map +1 -1
  161. package/src/sap/cux/home/Layout.js +1 -1
  162. package/src/sap/cux/home/Layout.js.map +1 -1
  163. package/src/sap/cux/home/Layout.ts +48 -20
  164. package/src/sap/cux/home/LayoutSettingsPanel-dbg.js +1 -10
  165. package/src/sap/cux/home/LayoutSettingsPanel-dbg.js.map +1 -1
  166. package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
  167. package/src/sap/cux/home/LayoutSettingsPanel.js +1 -1
  168. package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
  169. package/src/sap/cux/home/LayoutSettingsPanel.ts +2 -10
  170. package/src/sap/cux/home/NewsAndPagesContainer-dbg.js +35 -17
  171. package/src/sap/cux/home/NewsAndPagesContainer-dbg.js.map +1 -1
  172. package/src/sap/cux/home/NewsAndPagesContainer.d.ts +7 -0
  173. package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
  174. package/src/sap/cux/home/NewsAndPagesContainer.js +1 -1
  175. package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
  176. package/src/sap/cux/home/NewsAndPagesContainer.ts +40 -16
  177. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js +164 -0
  178. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js.map +1 -0
  179. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts +8 -0
  180. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts.map +1 -0
  181. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js +6 -0
  182. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js.map +1 -0
  183. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.ts +154 -0
  184. package/src/sap/cux/home/NewsGroup-dbg.js +112 -79
  185. package/src/sap/cux/home/NewsGroup-dbg.js.map +1 -1
  186. package/src/sap/cux/home/NewsGroup.d.ts +1 -0
  187. package/src/sap/cux/home/NewsGroup.d.ts.map +1 -1
  188. package/src/sap/cux/home/NewsGroup.js +1 -1
  189. package/src/sap/cux/home/NewsGroup.js.map +1 -1
  190. package/src/sap/cux/home/NewsGroup.ts +136 -100
  191. package/src/sap/cux/home/NewsPanel-dbg.js +541 -173
  192. package/src/sap/cux/home/NewsPanel-dbg.js.map +1 -1
  193. package/src/sap/cux/home/NewsPanel.d.ts +156 -16
  194. package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
  195. package/src/sap/cux/home/NewsPanel.js +1 -1
  196. package/src/sap/cux/home/NewsPanel.js.map +1 -1
  197. package/src/sap/cux/home/NewsPanel.ts +452 -82
  198. package/src/sap/cux/home/NewsSettingsPanel-dbg.js +61 -20
  199. package/src/sap/cux/home/NewsSettingsPanel-dbg.js.map +1 -1
  200. package/src/sap/cux/home/NewsSettingsPanel.d.ts +14 -0
  201. package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
  202. package/src/sap/cux/home/NewsSettingsPanel.js +1 -1
  203. package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
  204. package/src/sap/cux/home/NewsSettingsPanel.ts +75 -21
  205. package/src/sap/cux/home/NoDataContainer-dbg.js +3 -3
  206. package/src/sap/cux/home/NoDataContainer-dbg.js.map +1 -1
  207. package/src/sap/cux/home/NoDataContainer.d.ts +1 -0
  208. package/src/sap/cux/home/NoDataContainer.d.ts.map +1 -1
  209. package/src/sap/cux/home/NoDataContainer.js +1 -1
  210. package/src/sap/cux/home/NoDataContainer.js.map +1 -1
  211. package/src/sap/cux/home/NoDataContainer.ts +4 -2
  212. package/src/sap/cux/home/PagePanel-dbg.js +86 -75
  213. package/src/sap/cux/home/PagePanel-dbg.js.map +1 -1
  214. package/src/sap/cux/home/PagePanel.d.ts +25 -3
  215. package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
  216. package/src/sap/cux/home/PagePanel.js +1 -1
  217. package/src/sap/cux/home/PagePanel.js.map +1 -1
  218. package/src/sap/cux/home/PagePanel.ts +91 -76
  219. package/src/sap/cux/home/PageSettingsPanel-dbg.js +16 -15
  220. package/src/sap/cux/home/PageSettingsPanel-dbg.js.map +1 -1
  221. package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
  222. package/src/sap/cux/home/PageSettingsPanel.js +1 -1
  223. package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
  224. package/src/sap/cux/home/PageSettingsPanel.ts +15 -14
  225. package/src/sap/cux/home/RecentAppPanel-dbg.js +2 -2
  226. package/src/sap/cux/home/RecentAppPanel-dbg.js.map +1 -1
  227. package/src/sap/cux/home/RecentAppPanel.js +1 -1
  228. package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
  229. package/src/sap/cux/home/RecentAppPanel.ts +2 -2
  230. package/src/sap/cux/home/RecommendedAppPanel-dbg.js +4 -3
  231. package/src/sap/cux/home/RecommendedAppPanel-dbg.js.map +1 -1
  232. package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
  233. package/src/sap/cux/home/RecommendedAppPanel.js +1 -1
  234. package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
  235. package/src/sap/cux/home/RecommendedAppPanel.ts +4 -2
  236. package/src/sap/cux/home/SettingsDialog-dbg.js +4 -3
  237. package/src/sap/cux/home/SettingsDialog-dbg.js.map +1 -1
  238. package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
  239. package/src/sap/cux/home/SettingsDialog.js +1 -1
  240. package/src/sap/cux/home/SettingsDialog.js.map +1 -1
  241. package/src/sap/cux/home/SettingsDialog.ts +4 -2
  242. package/src/sap/cux/home/TaskPanel-dbg.js +16 -12
  243. package/src/sap/cux/home/TaskPanel-dbg.js.map +1 -1
  244. package/src/sap/cux/home/TaskPanel.d.ts +1 -2
  245. package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
  246. package/src/sap/cux/home/TaskPanel.js +1 -1
  247. package/src/sap/cux/home/TaskPanel.js.map +1 -1
  248. package/src/sap/cux/home/TaskPanel.ts +19 -12
  249. package/src/sap/cux/home/TilesPanel-dbg.js +9 -8
  250. package/src/sap/cux/home/TilesPanel-dbg.js.map +1 -1
  251. package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
  252. package/src/sap/cux/home/TilesPanel.js +1 -1
  253. package/src/sap/cux/home/TilesPanel.js.map +1 -1
  254. package/src/sap/cux/home/TilesPanel.ts +15 -8
  255. package/src/sap/cux/home/ToDoPanel-dbg.js +34 -25
  256. package/src/sap/cux/home/ToDoPanel-dbg.js.map +1 -1
  257. package/src/sap/cux/home/ToDoPanel.d.ts +0 -7
  258. package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
  259. package/src/sap/cux/home/ToDoPanel.js +1 -1
  260. package/src/sap/cux/home/ToDoPanel.js.map +1 -1
  261. package/src/sap/cux/home/ToDoPanel.ts +27 -29
  262. package/src/sap/cux/home/ToDosContainer-dbg.js +27 -18
  263. package/src/sap/cux/home/ToDosContainer-dbg.js.map +1 -1
  264. package/src/sap/cux/home/ToDosContainer.d.ts +7 -0
  265. package/src/sap/cux/home/ToDosContainer.d.ts.map +1 -1
  266. package/src/sap/cux/home/ToDosContainer.js +1 -1
  267. package/src/sap/cux/home/ToDosContainer.js.map +1 -1
  268. package/src/sap/cux/home/ToDosContainer.ts +10 -0
  269. package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js +84 -0
  270. package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js.map +1 -0
  271. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts +8 -0
  272. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts.map +1 -0
  273. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js +6 -0
  274. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js.map +1 -0
  275. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.ts +74 -0
  276. package/src/sap/cux/home/i18n/messagebundle.properties +63 -1
  277. package/src/sap/cux/home/i18n/messagebundle_ar.properties +42 -1
  278. package/src/sap/cux/home/i18n/messagebundle_bg.properties +43 -1
  279. package/src/sap/cux/home/i18n/messagebundle_ca.properties +43 -1
  280. package/src/sap/cux/home/i18n/messagebundle_cnr.properties +43 -1
  281. package/src/sap/cux/home/i18n/messagebundle_cs.properties +43 -1
  282. package/src/sap/cux/home/i18n/messagebundle_cy.properties +43 -1
  283. package/src/sap/cux/home/i18n/messagebundle_da.properties +43 -1
  284. package/src/sap/cux/home/i18n/messagebundle_de.properties +43 -1
  285. package/src/sap/cux/home/i18n/messagebundle_el.properties +44 -2
  286. package/src/sap/cux/home/i18n/messagebundle_en.properties +43 -246
  287. package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +43 -1
  288. package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +43 -1
  289. package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +31 -1
  290. package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +43 -1
  291. package/src/sap/cux/home/i18n/messagebundle_es.properties +43 -1
  292. package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +43 -1
  293. package/src/sap/cux/home/i18n/messagebundle_et.properties +43 -1
  294. package/src/sap/cux/home/i18n/messagebundle_fi.properties +43 -1
  295. package/src/sap/cux/home/i18n/messagebundle_fr.properties +43 -1
  296. package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +42 -1
  297. package/src/sap/cux/home/i18n/messagebundle_hi.properties +43 -1
  298. package/src/sap/cux/home/i18n/messagebundle_hr.properties +42 -1
  299. package/src/sap/cux/home/i18n/messagebundle_hu.properties +43 -1
  300. package/src/sap/cux/home/i18n/messagebundle_id.properties +47 -5
  301. package/src/sap/cux/home/i18n/messagebundle_it.properties +43 -1
  302. package/src/sap/cux/home/i18n/messagebundle_iw.properties +43 -1
  303. package/src/sap/cux/home/i18n/messagebundle_ja.properties +43 -1
  304. package/src/sap/cux/home/i18n/messagebundle_kk.properties +43 -1
  305. package/src/sap/cux/home/i18n/messagebundle_ko.properties +43 -1
  306. package/src/sap/cux/home/i18n/messagebundle_lt.properties +42 -1
  307. package/src/sap/cux/home/i18n/messagebundle_lv.properties +43 -1
  308. package/src/sap/cux/home/i18n/messagebundle_mk.properties +43 -1
  309. package/src/sap/cux/home/i18n/messagebundle_ms.properties +43 -1
  310. package/src/sap/cux/home/i18n/messagebundle_nl.properties +43 -1
  311. package/src/sap/cux/home/i18n/messagebundle_no.properties +44 -2
  312. package/src/sap/cux/home/i18n/messagebundle_pl.properties +44 -2
  313. package/src/sap/cux/home/i18n/messagebundle_pt.properties +43 -1
  314. package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +43 -1
  315. package/src/sap/cux/home/i18n/messagebundle_ro.properties +43 -1
  316. package/src/sap/cux/home/i18n/messagebundle_ru.properties +43 -1
  317. package/src/sap/cux/home/i18n/messagebundle_sh.properties +43 -1
  318. package/src/sap/cux/home/i18n/messagebundle_sk.properties +42 -1
  319. package/src/sap/cux/home/i18n/messagebundle_sl.properties +44 -2
  320. package/src/sap/cux/home/i18n/messagebundle_sr.properties +43 -1
  321. package/src/sap/cux/home/i18n/messagebundle_sv.properties +43 -1
  322. package/src/sap/cux/home/i18n/messagebundle_th.properties +43 -2
  323. package/src/sap/cux/home/i18n/messagebundle_tr.properties +42 -1
  324. package/src/sap/cux/home/i18n/messagebundle_uk.properties +43 -1
  325. package/src/sap/cux/home/i18n/messagebundle_vi.properties +42 -1
  326. package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +43 -1
  327. package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +42 -1
  328. package/src/sap/cux/home/interface/AppsInterface-dbg.js.map +1 -1
  329. package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -3
  330. package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
  331. package/src/sap/cux/home/interface/AppsInterface.ts +5 -3
  332. package/src/sap/cux/home/interface/CardsInterface-dbg.js +32 -0
  333. package/src/sap/cux/home/interface/CardsInterface-dbg.js.map +1 -1
  334. package/src/sap/cux/home/interface/CardsInterface.d.ts +320 -55
  335. package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
  336. package/src/sap/cux/home/interface/CardsInterface.js +5 -1
  337. package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
  338. package/src/sap/cux/home/interface/CardsInterface.ts +359 -55
  339. package/src/sap/cux/home/library-preload.js +88 -45
  340. package/src/sap/cux/home/library-preload.js.map +1 -1
  341. package/src/sap/cux/home/manifest.json +4 -4
  342. package/src/sap/cux/home/themes/base/AppsContainer.less +12 -0
  343. package/src/sap/cux/home/themes/base/BaseLayout.less +1 -0
  344. package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +69 -0
  345. package/src/sap/cux/home/themes/base/NewsAndPagesContainer.less +37 -12
  346. package/src/sap/cux/home/themes/base/PlaceHolder.less +1374 -0
  347. package/src/sap/cux/home/themes/base/ToDosContainer.less +1 -1
  348. package/src/sap/cux/home/themes/base/library-RTL.css +2 -2
  349. package/src/sap/cux/home/themes/base/library-parameters.json +1 -1
  350. package/src/sap/cux/home/themes/base/library.css +2 -2
  351. package/src/sap/cux/home/themes/base/library.source.less +2 -0
  352. package/src/sap/cux/home/themes/sap_fiori_3/library-RTL.css +2 -2
  353. package/src/sap/cux/home/themes/sap_fiori_3/library-parameters.json +1 -1
  354. package/src/sap/cux/home/themes/sap_fiori_3/library.css +2 -2
  355. package/src/sap/cux/home/themes/sap_fiori_3_dark/library-RTL.css +2 -2
  356. package/src/sap/cux/home/themes/sap_fiori_3_dark/library-parameters.json +1 -1
  357. package/src/sap/cux/home/themes/sap_fiori_3_dark/library.css +2 -2
  358. package/src/sap/cux/home/themes/sap_fiori_3_hcb/AppsContainer.less +1 -0
  359. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-RTL.css +2 -2
  360. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-parameters.json +1 -1
  361. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.css +2 -2
  362. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.source.less +2 -0
  363. package/src/sap/cux/home/themes/sap_fiori_3_hcw/AppsContainer.less +1 -0
  364. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-RTL.css +2 -2
  365. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-parameters.json +1 -1
  366. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.css +2 -2
  367. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.source.less +2 -0
  368. package/src/sap/cux/home/themes/sap_horizon/library-RTL.css +2 -2
  369. package/src/sap/cux/home/themes/sap_horizon/library-parameters.json +1 -1
  370. package/src/sap/cux/home/themes/sap_horizon/library.css +2 -2
  371. package/src/sap/cux/home/themes/sap_horizon_dark/library-RTL.css +2 -2
  372. package/src/sap/cux/home/themes/sap_horizon_dark/library-parameters.json +1 -1
  373. package/src/sap/cux/home/themes/sap_horizon_dark/library.css +2 -2
  374. package/src/sap/cux/home/themes/sap_horizon_hcb/AppsContainer.less +1 -0
  375. package/src/sap/cux/home/themes/sap_horizon_hcb/library-RTL.css +2 -2
  376. package/src/sap/cux/home/themes/sap_horizon_hcb/library-parameters.json +1 -1
  377. package/src/sap/cux/home/themes/sap_horizon_hcb/library.css +2 -2
  378. package/src/sap/cux/home/themes/sap_horizon_hcb/library.source.less +2 -0
  379. package/src/sap/cux/home/themes/sap_horizon_hcw/AppsContainer.less +1 -0
  380. package/src/sap/cux/home/themes/sap_horizon_hcw/library-RTL.css +2 -2
  381. package/src/sap/cux/home/themes/sap_horizon_hcw/library-parameters.json +1 -1
  382. package/src/sap/cux/home/themes/sap_horizon_hcw/library.css +2 -2
  383. package/src/sap/cux/home/themes/sap_horizon_hcw/library.source.less +2 -0
  384. package/src/sap/cux/home/utils/AppManager-dbg.js +405 -440
  385. package/src/sap/cux/home/utils/AppManager-dbg.js.map +1 -1
  386. package/src/sap/cux/home/utils/AppManager.d.ts +88 -124
  387. package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
  388. package/src/sap/cux/home/utils/AppManager.js +1 -1
  389. package/src/sap/cux/home/utils/AppManager.js.map +1 -1
  390. package/src/sap/cux/home/utils/AppManager.ts +351 -542
  391. package/src/sap/cux/home/utils/Constants-dbg.js +25 -1
  392. package/src/sap/cux/home/utils/Constants-dbg.js.map +1 -1
  393. package/src/sap/cux/home/utils/Constants.d.ts +17 -0
  394. package/src/sap/cux/home/utils/Constants.d.ts.map +1 -1
  395. package/src/sap/cux/home/utils/Constants.js +1 -1
  396. package/src/sap/cux/home/utils/Constants.js.map +1 -1
  397. package/src/sap/cux/home/utils/Constants.ts +20 -1
  398. package/src/sap/cux/home/utils/Device-dbg.js +49 -1
  399. package/src/sap/cux/home/utils/Device-dbg.js.map +1 -1
  400. package/src/sap/cux/home/utils/Device.d.ts +13 -0
  401. package/src/sap/cux/home/utils/Device.d.ts.map +1 -1
  402. package/src/sap/cux/home/utils/Device.js +1 -1
  403. package/src/sap/cux/home/utils/Device.js.map +1 -1
  404. package/src/sap/cux/home/utils/Device.ts +58 -1
  405. package/src/sap/cux/home/utils/InsightsUtils-dbg.js +25 -0
  406. package/src/sap/cux/home/utils/InsightsUtils-dbg.js.map +1 -1
  407. package/src/sap/cux/home/utils/InsightsUtils.d.ts +14 -0
  408. package/src/sap/cux/home/utils/InsightsUtils.d.ts.map +1 -1
  409. package/src/sap/cux/home/utils/InsightsUtils.js +1 -1
  410. package/src/sap/cux/home/utils/InsightsUtils.js.map +1 -1
  411. package/src/sap/cux/home/utils/InsightsUtils.ts +25 -0
  412. package/src/sap/cux/home/utils/PerformanceUtils-dbg.js +5 -2
  413. package/src/sap/cux/home/utils/PerformanceUtils-dbg.js.map +1 -1
  414. package/src/sap/cux/home/utils/PerformanceUtils.d.ts +1 -0
  415. package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
  416. package/src/sap/cux/home/utils/PerformanceUtils.js +1 -1
  417. package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
  418. package/src/sap/cux/home/utils/PerformanceUtils.ts +5 -1
  419. package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js +1599 -0
  420. package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js.map +1 -0
  421. package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts +534 -0
  422. package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts.map +1 -0
  423. package/src/sap/cux/home/utils/RecommendedCardUtil.js +6 -0
  424. package/src/sap/cux/home/utils/RecommendedCardUtil.js.map +1 -0
  425. package/src/sap/cux/home/utils/RecommendedCardUtil.ts +1945 -0
  426. package/src/sap/cux/home/utils/SituationUtils-dbg.js +1 -1
  427. package/src/sap/cux/home/utils/SituationUtils-dbg.js.map +1 -1
  428. package/src/sap/cux/home/utils/SituationUtils.js +1 -1
  429. package/src/sap/cux/home/utils/SituationUtils.js.map +1 -1
  430. package/src/sap/cux/home/utils/SituationUtils.ts +1 -1
  431. package/src/sap/cux/home/utils/UshellPersonalizer-dbg.js.map +1 -1
  432. package/src/sap/cux/home/utils/UshellPersonalizer.d.ts +4 -1
  433. package/src/sap/cux/home/utils/UshellPersonalizer.d.ts.map +1 -1
  434. package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
  435. package/src/sap/cux/home/utils/UshellPersonalizer.ts +2 -1
  436. package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +126 -0
@@ -10,7 +10,14 @@ declare module "sap/cux/home/NewsPanel" {
10
10
  value: ICustomNewsFeed[];
11
11
  }
12
12
  interface ICustomNewsFeed {
13
- [key: string]: string | boolean | INewsLink | number | INewsLink[] | INewsParam;
13
+ title: string;
14
+ subTitle?: string;
15
+ description?: string;
16
+ footer_text?: Record<string, string>;
17
+ mandatory_text?: string;
18
+ _group_to_image?: Record<string, string>;
19
+ _group_to_article?: ICustomNewsFeed[];
20
+ [key: string]: unknown;
14
21
  }
15
22
  interface INewsItem {
16
23
  changeId: string;
@@ -26,6 +33,11 @@ declare module "sap/cux/home/NewsPanel" {
26
33
  _aInbounds: IAvailableApp[];
27
34
  };
28
35
  }
36
+ interface ODataResponse {
37
+ "@odata.context": string;
38
+ "@odata.metadataEtag": string;
39
+ value: ICustomNewsFeed[];
40
+ }
29
41
  interface IAvailableApp {
30
42
  semanticObject?: string;
31
43
  action?: string;
@@ -53,6 +65,10 @@ declare module "sap/cux/home/NewsPanel" {
53
65
  };
54
66
  required: boolean;
55
67
  }
68
+ interface IFavNewsFeed {
69
+ items: string[];
70
+ showAllPreparationRequired?: boolean;
71
+ }
56
72
  interface INewsLink {
57
73
  [key: string]: string;
58
74
  }
@@ -62,7 +78,7 @@ declare module "sap/cux/home/NewsPanel" {
62
78
  };
63
79
  }
64
80
  type FileFormat = "xlsx" | "csv";
65
- const BASE_URL = "/sap/opu/odata4/ui2/insights_srv/srvd/ui2/", NEWS_FEED_READ_API: string, NEWS_FEED_TRANSLATION_API: string, NEWS_FEED_COUNT_URL: string, DEFAULT_FEED_COUNT = 7, fnImagePlaceholder: (sPath: string, N: number) => string[];
81
+ const BASE_URL = "/sap/opu/odata4/ui2/insights_srv/srvd/ui2/", NEWS_FEED_READ_API: string, NEWS_FEED_TRANSLATION_API: string, DEFAULT_FEED_COUNT = 7, fnImagePlaceholder: (sPath: string, N: number) => string[];
66
82
  const CUSTOM_NEWS_FEED: {
67
83
  TITLE: string;
68
84
  LINK: string;
@@ -98,8 +114,11 @@ declare module "sap/cux/home/NewsPanel" {
98
114
  private image;
99
115
  private customNewsFeedCache;
100
116
  private bNewsLoad;
101
- private aFavNewsFeed;
117
+ private favNewsFeed;
102
118
  private _eventBus;
119
+ private _defaultNews;
120
+ private mandatoryNewsFeed;
121
+ private _defaultNewsPromise;
103
122
  static readonly metadata: MetadataOptions;
104
123
  constructor(idOrSettings?: string | $BaseNewsPanelSettings);
105
124
  constructor(id?: string, settings?: $BaseNewsPanelSettings);
@@ -110,6 +129,14 @@ declare module "sap/cux/home/NewsPanel" {
110
129
  * @override
111
130
  */
112
131
  init(): void;
132
+ /**
133
+ *
134
+ * @param paramName name of parameter
135
+ * This method checks if the URL parameter is enabled.
136
+ * @returns {boolean} True if the parameter is enabled, false otherwise.
137
+ * @private
138
+ */
139
+ isURLParamEnabled(paramName: string): boolean;
113
140
  /**
114
141
  * Retrieves news data asynchronously.
115
142
  * If the news model is not initialized, it initializes the XML model and loads news feed data.
@@ -117,6 +144,15 @@ declare module "sap/cux/home/NewsPanel" {
117
144
  * @returns {Promise} A promise that resolves when the news data is retrieved.
118
145
  */
119
146
  getData(): Promise<void>;
147
+ /**
148
+ * Retrieves the current news group data based on the provided id.
149
+ *
150
+ * @param id - The group ID
151
+ * @returns The news group object that matches the extracted group ID, or `undefined`
152
+ * if no matching group is found.
153
+ * @private
154
+ */
155
+ getCurrentNewsGroup(id: string): ICustomNewsFeed;
120
156
  /**
121
157
  * Initializes an XML model for managing news data.
122
158
  * This method returns a Promise that resolves to the initialized XML model.
@@ -141,7 +177,12 @@ declare module "sap/cux/home/NewsPanel" {
141
177
  */
142
178
  handleFeedError(): void;
143
179
  setURL(url: string): Promise<void>;
144
- private _adjustLayout;
180
+ /**
181
+ * Adjust layout based on the device type
182
+ *
183
+ * @private
184
+ */
185
+ adjustLayout(): void;
145
186
  /**
146
187
  * Binds the news tile with the provided binding information.
147
188
  * @param {sap.m.SlideTile} oSlideTile - The SlideTile control to be bound.
@@ -162,39 +203,105 @@ declare module "sap/cux/home/NewsPanel" {
162
203
  private formatDate;
163
204
  /**
164
205
  * Returns the favourite news feed for the custom news
165
- * @returns {any}
206
+ * @returns {IFavNewsFeed}
207
+ * @private
166
208
  */
167
- getFavNewsFeed(): {
168
- items: string[];
169
- showAllPreparationRequired: boolean;
170
- };
209
+ getFavNewsFeed(): IFavNewsFeed;
171
210
  /**
172
211
  * Extracts the image URL from the provided HREF link or link.
173
212
  * @param {string} sHrefLink - The HREF link containing the image URL.
174
213
  * @returns {Promise} A promise that resolves to the extracted image URL.
175
214
  */
176
215
  private extractImage;
216
+ /**
217
+ * Checks if the custom file format is CSV based on the custom file name.
218
+ *
219
+ * @param {string} fileName - The custom file name.
220
+ * @returns {boolean} True if the file format is CSV, otherwise false.
221
+ */
222
+ private isCSVFileFormat;
223
+ /**
224
+ * Sets the favorite news feed for the user by retrieving personalization data.
225
+ *
226
+ * This method asynchronously fetches the user's personalization data and updates
227
+ * the `favNewsFeed` property with the favorite news feed information.
228
+ *
229
+ * @returns {Promise<void>} A promise that resolves when the favorite news feed is set.
230
+ * @private
231
+ */
232
+ private setFavNewsFeed;
177
233
  /**
178
234
  * This method retrieves the count and feeds of the custom news feed asynchronously.
179
235
  * If the count is not zero, it loads the custom news feed data and returns the feeds.
180
236
  * @param {string} sFeedId - The ID of the custom news feed to set.
181
237
  * @returns {Promise} A promise that resolves to an array of news feeds.
238
+ * @private
182
239
  */
183
240
  setCustomNewsFeed(sFeedId: string): Promise<void>;
184
241
  /**
185
- * Retrieves the count of custom news feed items identified by the provided feed ID.
186
- * @param {string} sFeedId - The ID of the custom news feed.
187
- * @returns {Promise} A Promise that resolves to the count of custom news feed items.
242
+ * Filters the provided list of news groups to include only those that are marked as mandatory.
243
+ *
244
+ * A news group is considered mandatory if:
245
+ * - Its `mandatory_text` property (at the top level) is set to "TRUE" (case-insensitive).
246
+ * - Any of its associated articles (in the `_group_to_article` array) has a `mandatory_text` property set to "TRUE" (case-insensitive).
247
+ *
248
+ * If any article within a group is marked as mandatory, the group's `mandatory_text` property
249
+ * is updated to "TRUE".
250
+ *
251
+ * @param newsGroups - An array of news groups to filter. Each group is expected to implement the `ICustomNewsFeed` interface.
252
+ * @returns An array of news groups that are marked as mandatory.
253
+ * @private
188
254
  */
189
- getCustomNewsFeedCount(sFeedId: string): Promise<number>;
255
+ private filterMandatoryNews;
256
+ /**
257
+ * Retrieves the default news feed details from the given OData response.
258
+ *
259
+ * @param newsResponse - The OData response containing the news feed data.
260
+ * @param showAllPreparationRequired - A boolean flag indicating whether to filter news items that require preparation.
261
+ * @returns An array of default news feed items.
262
+ * @private
263
+ */
264
+ private getDefaultNewsFeedDetails;
265
+ /**
266
+ * Returns the mandatory news feed details
267
+ * If the mandatory news feed is not set, it returns an empty array.
268
+ *
269
+ * @returns {ICustomNewsFeed[]} The mandatory news feed details.
270
+ * @private
271
+ */
272
+ getMandatoryDefaultNewsFeed(): string[];
273
+ /**
274
+ * Retrieves the default news response, either from cache or by fetching it.
275
+ * @returns {Promise<ODataResponse>} A promise that resolves to the default news data
276
+ * @private
277
+ */
278
+ private getDefaultNewsResponse;
279
+ /**
280
+ * Fetches the default news data from the server.
281
+ * @returns {Promise<ODataResponse>} A promise that resolves to the fetched news data
282
+ * @throws {Error} If the network request fails or returns a non-OK status
283
+ * @private
284
+ */
285
+ private fetchDefaultNews;
286
+ /**
287
+ * Retrieves a custom news feed based on the provided feed ID.
288
+ * If no feed ID is provided, it returns the default news feed.
289
+ *
290
+ * @param {string} sFeedId - The ID of the custom news feed to retrieve. If not provided, the default news feed is returned.
291
+ * @param {boolean} showAllPreparationRequired - A flag indicating whether to show all preparation required.
292
+ * @returns {Promise<ICustomNewsFeed[]>} A promise that resolves to an array of custom news feed items.
293
+ * @private
294
+ */
295
+ getCustomNewsFeed(sFeedId: string, showAllPreparationRequired: boolean): Promise<ICustomNewsFeed[]>;
190
296
  /**
191
297
  * Retrieves custom news feed items identified by the provided feed ID and settings.
192
298
  * It processes the response data and returns an array of custom news feed items.
193
299
  * @param {string} sFeedId - The ID of the custom news feed.
194
300
  * @param {boolean} showAllPreparationRequired - Indicates whether to show all preparation required.
195
301
  * @returns {Promise} A Promise that resolves to an array of custom news feed items.
302
+ * @private
196
303
  */
197
- getCustomNewsFeed(sFeedId: string, showAllPreparationRequired: boolean): Promise<ICustomNewsFeed[]>;
304
+ private getCustomFeedData;
198
305
  /**
199
306
  * Generates the URL for retrieving news feed details based on the provided news object.
200
307
  * The generated URL limits the number of results to 999.
@@ -209,7 +316,7 @@ declare module "sap/cux/home/NewsPanel" {
209
316
  * @param {string} sNewsUrl - The URL of the news feed.
210
317
  * @returns {Array} The filtered array of news feed items authorized for the user.
211
318
  */
212
- getAuthNewsFeed(sNewsUrl: string): Promise<ICustomNewsFeed[]>;
319
+ getAuthNewsFeed(sNewsUrl: string, newsTitle?: string): Promise<ICustomNewsFeed[]>;
213
320
  /**
214
321
  * If the news feed contains impacted artifacts, it checks if the current user has access to any of the impacted apps.
215
322
  * If the user has access to at least one impacted app, the news feed is included in the returned array.
@@ -236,6 +343,15 @@ declare module "sap/cux/home/NewsPanel" {
236
343
  * @returns {Array} The array of news feed items with translated and formatted field labels.
237
344
  */
238
345
  private getNewsFeedDetails;
346
+ /**
347
+ * Filters the news feed data based on the LOB title for the news detail dialog
348
+ *
349
+ * @private
350
+ * @param {ICustomNewsFeed[]} aNews complete news feed data
351
+ * @param {?string} [newsTitle] title of the line of business to be filtered on
352
+ * @returns {ICustomNewsFeed[]} filtered news feed for provided LOB title
353
+ */
354
+ private filterNewsOnTitle;
239
355
  /**
240
356
  * Retrieves translated text for news feed fields based on the specified feed ID.
241
357
  * @param {string} sFeedId - The ID of the custom news feed
@@ -257,8 +373,32 @@ declare module "sap/cux/home/NewsPanel" {
257
373
  * Randomly selects an image from the available images for the feed item.
258
374
  * @param {string} sFileName - The file name of the custom news feed item.
259
375
  * @returns {string} The URL of the image for the feed item.
376
+ * @private
377
+ */
378
+ private getCustomFeedImage;
379
+ /**
380
+ * Retrieves the default feed image for a given news feed.
381
+ *
382
+ * @param {ICustomNewsFeed} oFeed - The custom news feed object.
383
+ * @returns {string} The base64 encoded image string with the appropriate MIME type, or an empty string if no valid image is found.
384
+ * @private
385
+ */
386
+ private getDefaultFeedImage;
387
+ /**
388
+ * Converts a base64 URL string to a standard base64 string.
389
+ *
390
+ * @param {string} base64Url - The base64 URL string to convert.
391
+ * @returns {string} The converted base64 string.
392
+ * @private
393
+ */
394
+ private base64UrlToBase64;
395
+ /**
396
+ * Checks if a string is a valid base64 encoded string.
397
+ * @param input The string to validate
398
+ * @returns boolean indicating if the string is valid base64
399
+ * @private
260
400
  */
261
- getCustomFeedImage(sFileName: string): string;
401
+ private isValidBase64;
262
402
  private _getUserPersonalization;
263
403
  }
264
404
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NewsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/NewsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wBAAwB,CAAC;IAYxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAM3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;IACzE,OAAO,aAAa,MAAM,4BAA4B,CAAC;IAYvD,UAAU,YAAY;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KACf;IAED,U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;;;;WAaG;QACH,OAAO,CAAC,mBAAmB;QAkB3B;;;;;;;WAOG;QACH,OAAO,CAAC,yBAAyB;QA2BjC;;;;;;WAMG;QACI,2BAA2B;QAIlC;;;;WAIG;QACH,OAAO,CAAC,sBAAsB;QAa9B;;;;;WAKG;gBACW,gBAAgB;QAiB9B;;;;;;;;WAQG;QACU,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,0BAA0B,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAUhH;;;;;;;WAOG;gBACW,iBAAiB;QA6B/B;;;;;WAKG;QACI,qBAAqB,CAAC,KAAK,EAAE,SAAS;QAS7C;;;;;;WAMG;QACU,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;QAejE;;;;;;WAMG;QACH,OAAO,CAAC,gBAAgB;QAoBxB;;;;;WAKG;QACH,OAAO,CAAC,UAAU;QAelB;;;WAGG;gBACW,mBAAmB;QAYjC;;;;WAIG;gBACW,kBAAkB;QAsChC;;;;;;;WAOG;QACH,OAAO,CAAC,iBAAiB;QASzB;;;;WAIG;QACH,OAAO,CAAC,iBAAiB;QAezB;;;WAGG;gBACW,kBAAkB;QAkBhC;;;;WAIG;QACH,OAAO,CAAC,cAAc;QA4BtB;;;;;WAKG;QACH,OAAO,CAAC,kBAAkB;QAc1B;;;;;;WAMG;QACH,OAAO,CAAC,mBAAmB;QAwB3B;;;;;;WAMG;QACH,OAAO,CAAC,iBAAiB;QAUzB;;;;;WAKG;QACH,OAAO,CAAC,aAAa;QA6CrB,OAAO,CAAC,uBAAuB;KAK/B;CAEA"}
@@ -2,5 +2,5 @@
2
2
  * SAP UI development toolkit for HTML5 (SAPUI5)
3
3
  * * (c) Copyright 2009-2025 SAP SE. All rights reserved
4
4
  */
5
- sap.ui.define(["sap/base/Log","sap/m/GenericTile","sap/m/SlideTile","sap/ui/core/EventBus","sap/ui/core/format/DateFormat","sap/ui/model/xml/XMLModel","sap/ushell/Container","./BaseNewsPanel","./MenuItem","./NewsGroup","./NewsItem","./library","./utils/Device","./utils/FESRUtil","./utils/HttpHelper","./utils/PersonalisationUtils","./utils/UshellPersonalizer"],function(e,t,n,s,r,i,o,a,l,u,c,d,h,f,g,m,p){"use strict";function w(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}function N(e,t,n){if(!e.s){if(n instanceof v){if(n.s){if(t&1){t=n.s}n=n.v}else{n.o=N.bind(null,e,t);return}}if(n&&n.then){n.then(N.bind(null,e,t),N.bind(null,e,2));return}e.s=t;e.v=n;const s=e.o;if(s){s(e)}}}const y=w(a);const v=function(){function e(){}e.prototype.then=function(t,n){const s=new e;const r=this.s;if(r){const e=r&1?t:n;if(e){try{N(s,1,e(this.v))}catch(e){N(s,2,e)}return s}else{return this}}this.o=function(e){try{const r=e.v;if(e.s&1){N(s,1,t?t(r):r)}else if(n){N(s,1,n(r))}else{N(s,2,r)}}catch(e){N(s,2,e)}};return s};return e}();function F(e){return e instanceof v&&e.s&1}function P(e,t,n){var s;for(;;){var r=e();if(F(r)){r=r.v}if(!r){return i}if(r.then){s=0;break}var i=n();if(i&&i.then){if(F(i)){i=i.s}else{s=1;break}}if(t){var o=t();if(o&&o.then&&!F(o)){s=2;break}}}var a=new v;var l=N.bind(null,a,2);(s===0?r.then(c):s===1?i.then(u):o.then(d)).then(void 0,l);return a;function u(s){i=s;do{if(t){o=t();if(o&&o.then&&!F(o)){o.then(d).then(void 0,l);return}}r=e();if(!r||F(r)&&!r.v){N(a,1,i);return}if(r.then){r.then(c).then(void 0,l);return}i=n();if(F(i)){i=i.v}}while(!i||!i.then);i.then(u).then(void 0,l)}function c(e){if(e){i=n();if(i&&i.then){i.then(u).then(void 0,l)}else{u(i)}}else{N(a,1,i)}}function d(){if(r=e()){if(r.then){r.then(c).then(void 0,l)}else{c(r)}}else{N(a,1,i)}}}const C=w(l);function T(e,t){try{var n=e()}catch(e){return t(e)}if(n&&n.then){return n.then(void 0,t)}return n}const b=w(u);const E=w(c);const M=d["NewsType"];const A=h["DeviceType"];const I=f["addFESRId"];const S=w(g);const x=w(m);const L=w(p);const D="/sap/opu/odata4/ui2/insights_srv/srvd/ui2/",U=D+"insights_read_srv/0001/"+"NEWS_FEED",_=D+"insights_read_srv/0001/"+"NewsFeedColumnTranslation",R=U+"/$count",B=7,O=function(e,t){return Array.from({length:t},function(t,n){return e+"/"+(n+1)+".jpg"})};const V={TITLE:"LineOfBusiness",LINK:"WhatsNewDocument",VALIDITY:"ValidAsOf",PREPARATION_REQUIRED:"PreparationRequired",EXCLUDE_FIELDS:["ChangeId","LineNumber","LineOfBusiness","SolutionArea","Title","Description","Type","ValidAsOf","WhatsNewDocument","Link"],IMAGE_URL:"sap/cux/home/img/CustomNewsFeed/",FESR_STEP_NAME:"custNewsSlide-press",EMPTY_DATA_ERROR_CODE:"NODATA"},q={"Application Platform and Infrastructure":O("ApplicationPlatformandInfrastructure",3),"Asset Management":O("AssetManagement",3),"Cross Applications":O("CrossApplications",3),Finance:O("Finance",3),Manufacturing:O("Manufacturing",3),"R&D / Engineering":O("RnDandEngineering",3),Sales:O("Sales",3),"Sourcing and Procurement":O("SourcingandProcurement",3),"Supply Chain":O("SupplyChain",3),default:["default.jpg"]};const j=y.extend("sap.cux.home.NewsPanel",{metadata:{library:"sap.cux.home",properties:{url:{type:"string",group:"Misc",defaultValue:"",visibility:"public"},type:{type:"sap.cux.home.NewsType",group:"Misc",visibility:"public",defaultValue:M.RSS},customFeedKey:{type:"string",group:"Misc",defaultValue:"",visibility:"public"},customFileName:{type:"string",group:"Misc",defaultValue:""},showCustom:{type:"boolean",group:"Misc",defaultValue:false},newsAvailable:{type:"boolean",group:"Misc",defaultValue:true,visibility:"hidden"},supportedFileFormats:{type:"FileFormat[]",group:"Misc",defaultValue:["xlsx"],visibility:"hidden"}},aggregations:{newsGroup:{type:"sap.cux.home.NewsGroup",singularName:"newsGroup",multiple:true,visibility:"hidden"}}},constructor:function e(t,n){y.prototype.constructor.call(this,t,n);this.customNewsFeedCache=new Map},init:function e(){y.prototype.init.call(this);this.oNewsTile=new n(this.getId()+"--idNewsSlide",{displayTime:2e4,width:"100%",height:"17rem",tiles:[new t(this.getId()+"--placeholder",{state:"Loading",mode:"ArticleMode",frameType:"Stretch"})]}).addStyleClass("newsTileMaxWidth");I(this.oNewsTile,"newsSlidePress");this.getNewsWrapper().addContent(this.oNewsTile);this.getNewsWrapper().addStyleClass("newsWrapper");this.setProperty("title",this._i18nBundle.getText("newsTitle"));this._eventBus=s.getInstance();this.oManageMenuItem=new C(`${this.getId()}-manageNews`,{title:this._i18nBundle.getText("mngNews"),icon:"sap-icon://edit",press:this.handleEditNews.bind(this)});this.addAggregation("menuItems",this.oManageMenuItem);I(this.oManageMenuItem,"manageNews")},getData:function e(){try{const t=this;function n(){t.fireEvent("loaded");t._adjustLayout()}const s=t.getUrl();const r=function(){if(s&&!t.getProperty("showCustom")){return Promise.resolve(t.initializeXmlModel(s)).then(function(e){t.oNewsModel=e;t.oNewsTile.setModel(t.oNewsModel);t.oManageMenuItem.setVisible(false)})}else{const e=function(){if(t.getProperty("showCustom")){t.bNewsLoad=t.bNewsLoad||false;t.oManageMenuItem.setVisible(true);const e=t.getCustomFeedKey();const n=function(){if(e){return Promise.resolve(t.setCustomNewsFeed(e)).then(function(){})}else{t.handleFeedError()}}();if(n&&n.then)return n.then(function(){})}else{t.handleFeedError()}}();if(e&&e.then)return e.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n(r))}catch(i){return Promise.reject(i)}},getCustomFeedKey:function e(){return this.getProperty("customFeedKey")},getUrl:function e(){return this.getProperty("url")},initializeXmlModel:function e(t){try{const e=this;const n=e.getParent();return Promise.resolve(new Promise(s=>{const r=new i(t);r.setDefaultBindingMode("OneWay");r.attachRequestCompleted(t=>{void function(){try{if(!e.bNewsLoad){n?.panelLoadedFn("News",{loaded:true,count:B});e.bNewsLoad=true}const i=t.getSource().getData();return Promise.resolve(e.loadNewsFeed(i,0)).then(function(){e._eventBus.publish("KeyUserChanges","newsFeedLoadFailed",{showError:false,date:new Date});s(r)})}catch(e){return Promise.reject(e)}}()});r.attachRequestFailed(()=>{e.handleFeedError();if(!e.bNewsLoad){n?.panelLoadedFn("News",{loaded:false,count:0});e.bNewsLoad=true}e._eventBus.publish("KeyUserChanges","newsFeedLoadFailed",{showError:true,date:new Date});s(r)})}))}catch(e){return Promise.reject(e)}},loadNewsFeed:function e(t,n){try{const s=this;function r(){if(!!t?.querySelector("rss")&&!!t?.querySelector("item")){i={path:"/channel/item/",length:n||B}}else if(!!t?.querySelector("atom")&&!!t?.querySelector("entry")){i={path:"/entry/",length:n||B}}else if(!!t?.querySelector("customFeed")&&!!t?.querySelector("item")){i={path:"/item/",length:n||B}}else{s.handleFeedError();return}s.bindNewsTile(s.oNewsTile,i)}let i;const o=function(){if(!t?.querySelector("customFeed")){return Promise.resolve(s.extractAllImageUrls(t,n||B)).then(function(){})}}();return Promise.resolve(o&&o.then?o.then(r):r(o))}catch(a){return Promise.reject(a)}},handleFeedError:function e(){if(this.getProperty("showCustom")){this.generateErrorMessage().setVisible(true);this.oNewsTile.setVisible(false)}else{(this.getNewsWrapper()?.getParent()).setVisible(false);this.setProperty("newsAvailable",false);this.oManageMenuItem.setVisible(false)}},setURL:function e(t){try{const e=this;e.setProperty("showCustom",false);e.setProperty("newsAvailable",true);e.generateErrorMessage().setVisible(false);(e.getNewsWrapper()?.getParent()).setVisible(true);e.oNewsTile.setVisible(true);e.setProperty("url",t);return Promise.resolve(e.getData()).then(function(){})}catch(e){return Promise.reject(e)}},_adjustLayout:function e(){if(this.getDeviceType()===A.Mobile){this.oNewsTile.setHeight("11rem");this.generateErrorMessage().setWidth("100%")}else{this.oNewsTile.setHeight("17rem");(this.getNewsWrapper()?.getParent()).setWidth("100%");this.oNewsTile.addStyleClass("sapUiSmallMarginTopBottom")}},bindNewsTile:function e(t,n){if(n){t.bindAggregation("tiles",{path:n.path,length:n.length,templateShareable:false,factory:(e,t)=>{const n=t.getObject();let s;if(n.getElementsByTagName("link").length>0){s=new E("",{url:n.getElementsByTagName("link")[0].textContent,title:n.getElementsByTagName("title")[0].textContent,subTitle:n.getElementsByTagName("description")[0].textContent,imageUrl:n.getElementsByTagName("imageUrl")[0].textContent,footer:this.formatDate(n.getElementsByTagName("pubDate")[0].textContent)})}else{s=new b("",{title:n.getElementsByTagName("title")[0].textContent,subTitle:this._i18nBundle.getText("newsFeedDescription"),imageUrl:n.getElementsByTagName("imageUrl")[0].textContent,footer:n.getElementsByTagName("footer")[0].textContent})}this.addAggregation("newsItems",s,true);return s.getTile()}})}},extractAllImageUrls:function e(t,n){try{const e=this;let s=0;const r=P(function(){return s<n},function(){return s++},function(){const n=t?.getElementsByTagName("item")[s];return Promise.resolve(e.extractImage(n.getElementsByTagName("link")[0].textContent)).then(function(e){const s=t.createElement("imageUrl");s.textContent=e;n.appendChild(s)})});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},formatDate:function e(t){const n=r.getDateTimeInstance({style:"medium",relative:true,relativeStyle:"short"});return n.format(new Date(t))},getFavNewsFeed:function e(){return this.aFavNewsFeed},extractImage:function e(t){const n=()=>{const e=sap.ui.require.toUrl("sap/cux/home/utils");this.image=this.image?this.image+1:1;this.image=this.image<9?this.image:1;return`${e}/imgNews/${this.image}.jpg`};return fetch(t).then(e=>e.text()).then(e=>{const t=e.match(/<meta[^>]*property=["']og:image["'][^>]*content=["']([^"']+)["'][^>]*>/i);return Array.isArray(t)&&t[1]?t[1]:n()}).catch(n)},setCustomNewsFeed:function t(n){try{const t=this;return Promise.resolve(T(function(){t.oNewsTile.setVisible(true);t.generateErrorMessage().setVisible(false);return Promise.resolve(t._getUserPersonalization()).then(function(e){return Promise.resolve(e?.read()).then(function(e){t.aFavNewsFeed=e?.favNewsFeed;return Promise.resolve(Promise.all([t.getCustomNewsFeedCount(n),t.getCustomNewsFeed(n,t.aFavNewsFeed?t.aFavNewsFeed.showAllPreparationRequired:true)])).then(function(e){let[n,s]=e;if(s.length===0||n===0){throw new Error}if(t.aFavNewsFeed?.items?.length){s=s.filter(e=>t.aFavNewsFeed?.items.includes(e.title))}else if(t.aFavNewsFeed?.items?.length===0){t.getParent()?.panelLoadedFn("News",{loaded:true,count:0});throw new Error("Error: No news feed available")}(t.getNewsWrapper()?.getParent()).addStyleClass("sapMNewsFlex");t.loadCustomNewsFeed(s)})})})},function(n){e.error(n);t.handleFeedError()}))}catch(e){return Promise.reject(e)}},getCustomNewsFeedCount:function e(t){try{const e=this;let n=encodeURI(R+"?$filter=ChangeId"+" eq "+"'"+t+"'");if(!e.customNewsFeedCache.has(n)){e.customNewsFeedCache.set(n,S.GetJSON(n))}return Promise.resolve(e.customNewsFeedCache.get(n))}catch(e){return Promise.reject(e)}},getCustomNewsFeed:function t(n,s){try{const t=this;return Promise.resolve(T(function(){const e=t.getNewsFeedDetailsUrl({changeId:n,showAllPreparationRequired:s});if(!t.customNewsFeedCache.has(e)){t.customNewsFeedCache.set(e,t.getAuthNewsFeed(e))}return Promise.resolve(t.customNewsFeedCache.get(e)).then(function(e){const n=e;const s={};const r=[];if(n?.length>0){n.forEach(e=>{const n=e[V.TITLE];if(!s[n.value]){r.push({title:n.value,footer:e[V.VALIDITY].value,imageUrl:t.getCustomFeedImage(n.value)});s[n.value]=n.value}})}return r})},function(t){e.error(t);throw new Error(t)}))}catch(e){return Promise.reject(e)}},getNewsFeedDetailsUrl:function e(t){let n=U+"?$filter=ChangeId eq "+"'"+t.changeId+"'";n=t.title?n+" and LineOfBusiness eq "+"'"+encodeURI(t.title)+"'":n;n=t.showAllPreparationRequired?n+" and PreparationRequired eq true":n;return n+"&$top=999"},getAuthNewsFeed:function t(n){try{const t=this;return Promise.resolve(T(function(){return Promise.resolve(Promise.all([t.getAllAvailableApps(),t.getNewsFeedDetails(n)])).then(function(e){let[n,s]=e;return n.length===0?s:t.arrangeNewsFeeds(s,n)})},function(t){e.error(t)}))}catch(e){return Promise.reject(e)}},arrangeNewsFeeds:function e(t,n){const s=[];t.forEach(e=>{if(e.Category.value!=="App"||!e.ImpactedArtifacts.value){s.push(e)}else{const t=e.ImpactedArtifacts.value.split("\n");for(let r of t){const t=r;if(t&&this.isAuthFeed(n,r)){s.push(e);break}}}});return s},isAuthFeed:function e(t,n){const s="|";if(n.includes(s)){const e=n.split(s);const r=(e[e.length-1]||"").trim();if(r){const e=t.findIndex(e=>r===e?.signature?.parameters["sap-fiori-id"]?.defaultValue?.value);return e>-1}}return true},getAllAvailableApps:function t(){try{return Promise.resolve(T(function(){return Promise.resolve(o.getServiceAsync("ClientSideTargetResolution")).then(function(e){return e?._oAdapter._aInbounds||[]})},function(t){if(t instanceof Error){e.error(t.message)}return[]}))}catch(e){return Promise.reject(e)}},getNewsFeedDetails:function e(t){try{const e=this;if(!e.customNewsFeedCache.has(t)){e.customNewsFeedCache.set(t,S.GetJSON(t))}const n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2");return Promise.resolve(Promise.all([e.customNewsFeedCache.get(t),e.getTranslatedText(e.getCustomFeedKey())])).then(function(t){let[s,r]=t;const i=JSON.parse(JSON.stringify(s.value||[]));const o=JSON.parse(JSON.stringify(r.value||[]));return i.map(t=>{const s=Object.keys(t);const r=[];s.forEach(e=>{const s=o.find(t=>t?.ColumnName?.toUpperCase()===e.toUpperCase());const i=s?.TranslatedName||n(e);t[e]={label:i,value:t[e]};if(!V.EXCLUDE_FIELDS.includes(e)){r.push(t[e])}});t.Link={label:e._i18nBundle.getText("readMoreLink"),value:t[V.LINK],text:"Link"};t.expanded=i.length===1;t.expandFields=r;return t})})}catch(e){return Promise.reject(e)}},getTranslatedText:function t(n){try{const e=_+"?$filter=Changeid eq '"+n+"'";if(!this.customNewsFeedCache.has(e)){this.customNewsFeedCache.set(e,S.GetJSON(e))}return this.customNewsFeedCache.get(e)}catch(t){if(t instanceof Error){e.error(t.message)}return[]}},loadCustomNewsFeed:function e(t){const n=this.parseJsonToXml(JSON.parse(JSON.stringify(t)));const s=this.getParent();if(!this.oNewsModel){this.oNewsModel=new i(n);if(!this.bNewsLoad){s?.panelLoadedFn("News",{loaded:true,count:B});this.bNewsLoad=true}this.oNewsTile.setModel(this.oNewsModel)}else{this.oNewsModel.setData(n)}void this.loadNewsFeed(n,t.length)},parseJsonToXml:function e(t){const n=e=>e.map(e=>({item:e}));const s=e=>{let t="";let n;for(n in e){const r=e[n];if(r){if(typeof r==="object"){t+=`<${n}>${s(r)}</${n}>`}else{t+=`<${n}>${r}</${n}>`}}}return t.replace(/<\/?\d+>/g,"")};const r=JSON.parse(JSON.stringify(n(t)));let i="<?xml version='1.0' encoding='UTF-8'?>";const o="customFeed";i+=`<${o}>`;i+=s(r);i+=`</${o}>`;i=i.replaceAll("&","&amp;");const a=new DOMParser;return a.parseFromString(i,"text/xml")},getCustomFeedImage:function e(t){const n=sap.ui.require.toUrl(V.IMAGE_URL);let s=n+q.default[0];const r=q[t]||[];let i=0;if(r.length>0){const e=new window.Uint32Array(1);window.crypto.getRandomValues(e);i=e[0]%3;s=n+r[i]}return s},_getUserPersonalization:function e(){const t=x.getPersContainerId(this);const n=x.getOwnerComponent(this);return L.getInstance(t,n)}});return j});
5
+ sap.ui.define(["sap/base/Log","sap/m/GenericTile","sap/m/SlideTile","sap/ui/core/EventBus","sap/ui/core/format/DateFormat","sap/ui/model/xml/XMLModel","sap/ushell/Container","./BaseNewsPanel","./MenuItem","./NewsGroup","./NewsItem","./library","./utils/Constants","./utils/DataFormatUtils","./utils/Device","./utils/FESRUtil","./utils/HttpHelper","./utils/PersonalisationUtils","./utils/UshellPersonalizer"],function(e,t,n,s,r,i,o,a,l,u,c,f,d,h,m,g,p,w,N){"use strict";function y(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}function v(e,t,n){if(!e.s){if(n instanceof P){if(n.s){if(t&1){t=n.s}n=n.v}else{n.o=v.bind(null,e,t);return}}if(n&&n.then){n.then(v.bind(null,e,t),v.bind(null,e,2));return}e.s=t;e.v=n;const s=e.o;if(s){s(e)}}}const F=y(a);const P=function(){function e(){}e.prototype.then=function(t,n){const s=new e;const r=this.s;if(r){const e=r&1?t:n;if(e){try{v(s,1,e(this.v))}catch(e){v(s,2,e)}return s}else{return this}}this.o=function(e){try{const r=e.v;if(e.s&1){v(s,1,t?t(r):r)}else if(n){v(s,1,n(r))}else{v(s,2,r)}}catch(e){v(s,2,e)}};return s};return e}();function T(e){return e instanceof P&&e.s&1}function b(e,t,n){var s;for(;;){var r=e();if(T(r)){r=r.v}if(!r){return i}if(r.then){s=0;break}var i=n();if(i&&i.then){if(T(i)){i=i.s}else{s=1;break}}if(t){var o=t();if(o&&o.then&&!T(o)){s=2;break}}}var a=new P;var l=v.bind(null,a,2);(s===0?r.then(c):s===1?i.then(u):o.then(f)).then(void 0,l);return a;function u(s){i=s;do{if(t){o=t();if(o&&o.then&&!T(o)){o.then(f).then(void 0,l);return}}r=e();if(!r||T(r)&&!r.v){v(a,1,i);return}if(r.then){r.then(c).then(void 0,l);return}i=n();if(T(i)){i=i.v}}while(!i||!i.then);i.then(u).then(void 0,l)}function c(e){if(e){i=n();if(i&&i.then){i.then(u).then(void 0,l)}else{u(i)}}else{v(a,1,i)}}function f(){if(r=e()){if(r.then){r.then(c).then(void 0,l)}else{c(r)}}else{v(a,1,i)}}}const C=y(l);function E(e,t){try{var n=e()}catch(e){return t(e)}if(n&&n.then){return n.then(void 0,t)}return n}const _=y(u);const S=y(c);const M=f["NewsType"];const A=d["DEFAULT_NEWS_URL"];const D=h["recycleId"];const I=m["DeviceType"];const U=g["addFESRId"];const L=y(p);const x=y(w);const R=y(N);const B="/sap/opu/odata4/ui2/insights_srv/srvd/ui2/",O=B+"insights_read_srv/0001/"+"NEWS_FEED",V=B+"insights_read_srv/0001/"+"NewsFeedColumnTranslation",j=7,$=function(e,t){return Array.from({length:t},function(t,n){return e+"/"+(n+1)+".jpg"})};const q={TITLE:"LineOfBusiness",LINK:"WhatsNewDocument",VALIDITY:"ValidAsOf",PREPARATION_REQUIRED:"PreparationRequired",EXCLUDE_FIELDS:["ChangeId","LineNumber","LineOfBusiness","SolutionArea","Title","Description","Type","ValidAsOf","WhatsNewDocument","Link"],IMAGE_URL:"sap/cux/home/img/CustomNewsFeed/",FESR_STEP_NAME:"custNewsSlide-press",EMPTY_DATA_ERROR_CODE:"NODATA"},J={"Application Platform and Infrastructure":$("ApplicationPlatformandInfrastructure",3),"Asset Management":$("AssetManagement",3),"Cross Applications":$("CrossApplications",3),Finance:$("Finance",3),Manufacturing:$("Manufacturing",3),"R&D / Engineering":$("RnDandEngineering",3),Sales:$("Sales",3),"Sourcing and Procurement":$("SourcingandProcurement",3),"Supply Chain":$("SupplyChain",3),default:["default.jpg"]};const W=F.extend("sap.cux.home.NewsPanel",{metadata:{library:"sap.cux.home",properties:{url:{type:"string",group:"Misc",defaultValue:"",visibility:"public"},type:{type:"sap.cux.home.NewsType",group:"Misc",visibility:"public",defaultValue:M.RSS},customFeedKey:{type:"string",group:"Misc",defaultValue:"",visibility:"public"},customFileName:{type:"string",group:"Misc",defaultValue:""},showCustom:{type:"boolean",group:"Misc",defaultValue:false},newsAvailable:{type:"boolean",group:"Misc",defaultValue:true,visibility:"hidden"},supportedFileFormats:{type:"FileFormat[]",group:"Misc",defaultValue:["xlsx"],visibility:"hidden"}},aggregations:{newsGroup:{type:"sap.cux.home.NewsGroup",singularName:"newsGroup",multiple:true,visibility:"hidden"}}},constructor:function e(t,n){F.prototype.constructor.call(this,t,n);this._defaultNewsPromise=null;this.customNewsFeedCache=new Map},init:function e(){F.prototype.init.call(this);this.oNewsTile=new n(this.getId()+"--idNewsSlide",{displayTime:2e4,width:"100%",height:"17rem",tiles:[new t(this.getId()+"--placeholder",{state:"Loading",mode:"ArticleMode",frameType:"Stretch"})]}).addStyleClass("newsTileMaxWidth sapUiSmallMarginTop");U(this.oNewsTile,"newsSlidePress");this.getNewsWrapper().addContent(this.oNewsTile);this.getNewsWrapper().addStyleClass("newsWrapper");this.setProperty("title",this._i18nBundle.getText("newsTitle"));this._eventBus=s.getInstance();this.oManageMenuItem=new C(`${this.getId()}-manageNews`,{title:this._i18nBundle.getText("mngNews"),icon:"sap-icon://edit",press:this.handleEditNews.bind(this)});this.addAggregation("menuItems",this.oManageMenuItem);U(this.oManageMenuItem,"manageNews");let r=this.isURLParamEnabled("default-News");if(r){this.setUrl(A);this.setProperty("showCustom",false)}},isURLParamEnabled:function e(t){const n=new URLSearchParams(window.location.search);return n.get(t)?.toUpperCase()==="TRUE"},getData:function e(){try{const t=this;function n(){function e(){t.fireEvent("loaded");t.adjustLayout()}const n=function(){if(s&&s!==A&&!t.getProperty("showCustom")){return Promise.resolve(t.initializeXmlModel(s)).then(function(e){t.oNewsModel=e;t.oNewsTile.setModel(t.oNewsModel);t.oManageMenuItem.setVisible(false)})}else{const e=function(){if(s==A&&!t.getProperty("showCustom")){t.bNewsLoad=t.bNewsLoad||false;t.oManageMenuItem.setVisible(true);void t.setCustomNewsFeed("")}else{const e=function(){if(t.getProperty("showCustom")){t.bNewsLoad=t.bNewsLoad||false;t.oManageMenuItem.setVisible(true);const e=t.getCustomFeedKey();const n=function(){if(e){return Promise.resolve(t.setCustomNewsFeed(e)).then(function(){})}else{t.handleFeedError()}}();if(n&&n.then)return n.then(function(){})}else{t.handleFeedError()}}();if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();return n&&n.then?n.then(e):e(n)}let s=t.getUrl();let r=t.isURLParamEnabled("default-News");t.mandatoryNewsFeed=[];const i=function(){if(!t.favNewsFeed){return Promise.resolve(t.setFavNewsFeed(r)).then(function(){})}}();return Promise.resolve(i&&i.then?i.then(n):n(i))}catch(o){return Promise.reject(o)}},getCurrentNewsGroup:function e(t){let n=this._defaultNews.value;let s=t.split("-");let r=s?.[s.length-1];let i=n.find(e=>e.group_id===r);return i},getCustomFeedKey:function e(){return this.getProperty("customFeedKey")},getUrl:function e(){return this.getProperty("url")},initializeXmlModel:function e(t){try{const e=this;const n=e.getParent();return Promise.resolve(new Promise(s=>{const r=new i(t);r.setDefaultBindingMode("OneWay");r.attachRequestCompleted(t=>{void function(){try{if(!e.bNewsLoad){n?.panelLoadedFn("News",{loaded:true,count:j});e.bNewsLoad=true}const i=t.getSource().getData();return Promise.resolve(e.loadNewsFeed(i,0)).then(function(){e._eventBus.publish("KeyUserChanges","newsFeedLoadFailed",{showError:false,date:new Date});s(r)})}catch(e){return Promise.reject(e)}}()});r.attachRequestFailed(()=>{e.handleFeedError();if(!e.bNewsLoad){n?.panelLoadedFn("News",{loaded:false,count:0});e.bNewsLoad=true}e._eventBus.publish("KeyUserChanges","newsFeedLoadFailed",{showError:true,date:new Date});s(r)})}))}catch(e){return Promise.reject(e)}},loadNewsFeed:function e(t,n){try{const s=this;function r(){if(!!t?.querySelector("rss")&&!!t?.querySelector("item")){i={path:"/channel/item/",length:n||j}}else if(!!t?.querySelector("atom")&&!!t?.querySelector("entry")){i={path:"/entry/",length:n||j}}else if((!!t?.querySelector("customFeed")||!!t?.querySelector("defaultFeed"))&&!!t?.querySelector("item")){s.destroyAggregation("newsItems");i={path:"/item/",length:n||j}}else{s.handleFeedError();return}s.bindNewsTile(s.oNewsTile,i)}let i;const o=function(){if(!t?.querySelector("customFeed")&&!t?.querySelector("defaultFeed")){return Promise.resolve(s.extractAllImageUrls(t,n||j)).then(function(){})}}();return Promise.resolve(o&&o.then?o.then(r):r(o))}catch(a){return Promise.reject(a)}},handleFeedError:function e(){if(this.getProperty("showCustom")||this.getUrl()===A){this.generateErrorMessage().setVisible(true);this.oNewsTile.setVisible(false)}else{(this.getNewsWrapper()?.getParent()).setVisible(false);this.setProperty("newsAvailable",false);this.oManageMenuItem.setVisible(false)}},setURL:function e(t){try{const e=this;e.setProperty("showCustom",false);e.setProperty("newsAvailable",true);e.generateErrorMessage().setVisible(false);(e.getNewsWrapper()?.getParent()).setVisible(true);e.oNewsTile.setVisible(true);e.setProperty("url",t);return Promise.resolve(e.getData()).then(function(){})}catch(e){return Promise.reject(e)}},adjustLayout:function e(){if(this.getDeviceType()===I.Mobile){this.oNewsTile.setHeight("11rem");this.generateErrorMessage().setWidth("100%");this.oNewsTile.removeStyleClass("sapUiSmallMarginTop")}else{this.oNewsTile.setHeight("17rem");(this.getNewsWrapper()?.getParent()).setWidth("100%")}},bindNewsTile:function e(t,n){if(n){if(!t.getBinding("tiles")){t.bindAggregation("tiles",{path:n.path,length:n.length,templateShareable:false,factory:(e,t)=>{const n=t.getObject();let s;if(n.getElementsByTagName("link").length>0){s=new S(D(`${e}-news-item`),{url:n.getElementsByTagName("link")[0].textContent,title:n.getElementsByTagName("title")[0].textContent,subTitle:n.getElementsByTagName("description")[0].textContent,imageUrl:n.getElementsByTagName("imageUrl")[0].textContent,footer:this.formatDate(n.getElementsByTagName("pubDate")[0].textContent)})}else{let t=n.getElementsByTagName("id")?.[0]?.textContent??"";let r=t?e+"-newsgroup-"+t:e+"-newsgroup";let i=n.getElementsByTagName("subTitle")?.[0]?.textContent??"";s=new _(D(r),{title:n.getElementsByTagName("title")[0].textContent,subTitle:i||this._i18nBundle.getText("newsFeedDescription"),imageUrl:n.getElementsByTagName("imageUrl")?.[0]?.textContent,footer:n.getElementsByTagName("footer")?.[0]?.textContent})}this.addAggregation("newsItems",s,true);return s.getTile()}})}}},extractAllImageUrls:function e(t,n){try{const e=this;let s=0;const r=b(function(){return s<n},function(){return s++},function(){const n=t?.getElementsByTagName("item")[s];return Promise.resolve(e.extractImage(n.getElementsByTagName("link")[0].textContent)).then(function(e){const s=t.createElement("imageUrl");s.textContent=e;n.appendChild(s)})});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},formatDate:function e(t){const n=r.getDateTimeInstance({style:"medium",relative:true,relativeStyle:"short"});return n.format(new Date(t))},getFavNewsFeed:function e(){return this.favNewsFeed},extractImage:function e(t){const n=()=>{const e=sap.ui.require.toUrl("sap/cux/home/utils");this.image=this.image?this.image+1:1;this.image=this.image<9?this.image:1;return`${e}/imgNews/${this.image}.jpg`};return fetch(t).then(e=>e.text()).then(e=>{const t=e.match(/<meta[^>]*property=["']og:image["'][^>]*content=["']([^"']+)["'][^>]*>/i);return Array.isArray(t)&&t[1]?t[1]:n()}).catch(n)},isCSVFileFormat:function e(t){return t.split(".").pop()?.toLowerCase()==="csv"},setFavNewsFeed:function e(t){try{const e=this;return Promise.resolve(e._getUserPersonalization()).then(function(n){return Promise.resolve(n?.read()).then(function(n){e.favNewsFeed=t?n?.defaultNewsFeed:n?.favNewsFeed})})}catch(e){return Promise.reject(e)}},setCustomNewsFeed:function t(n){try{const t=this;return Promise.resolve(E(function(){t.oNewsTile.setVisible(true);t.generateErrorMessage().setVisible(false);return Promise.resolve(t.setFavNewsFeed(!n)).then(function(){function e(){if(i.length===0){throw new Error("Error: No news feed available")}if(t.favNewsFeed?.items?.length){i=i.filter(e=>t.favNewsFeed?.items.includes(e.title))}else if(t.favNewsFeed?.items?.length===0){t.getParent()?.panelLoadedFn("News",{loaded:true,count:0});throw new Error("Error: No fav news feed available")}return Promise.resolve(t.loadCustomNewsFeed(i,n?"customFeed":"defaultFeed")).then(function(){})}const s=t.getProperty("customFileName");const r=t.isCSVFileFormat(s)?false:t.favNewsFeed?.showAllPreparationRequired??true;if(t.isCSVFileFormat(s)){q.EXCLUDE_FIELDS.push("PreparationRequired")}let i;const o=function(){if(n){return Promise.resolve(t.getCustomNewsFeed(n,r)).then(function(e){i=e})}else{return Promise.resolve(t.getCustomNewsFeed("",true)).then(function(e){i=e})}}();return o&&o.then?o.then(e):e(o)})},function(n){e.error(n);t.handleFeedError()}))}catch(e){return Promise.reject(e)}},filterMandatoryNews:function e(t){return t.filter(e=>{const t=e.mandatory_text?.toUpperCase()==="TRUE";const n=e._group_to_article?.some(function(t){if(t.mandatory_text?.toUpperCase()==="TRUE"){e.mandatory_text="TRUE";return true}});return t||n})},getDefaultNewsFeedDetails:function e(t){let n=JSON.parse(JSON.stringify(t.value||[]));const s=[];const r={};this.mandatoryNewsFeed=[];if(n?.length>0){this.mandatoryNewsFeed=this.filterMandatoryNews(n).map(e=>e.title);for(const e of n){const t=e.title;let n="";if(!r[t]){n=e.subTitle||e.description||"";s.push({title:t,footer:e.footer_text,imageUrl:this.getDefaultFeedImage(e),id:e.group_id,subTitle:n||""});r[t]=t}}}return s},getMandatoryDefaultNewsFeed:function e(){return this.mandatoryNewsFeed||[]},getDefaultNewsResponse:function e(){if(this._defaultNews){return Promise.resolve(this._defaultNews)}if(!this._defaultNewsPromise){this._defaultNewsPromise=this.fetchDefaultNews()}return this._defaultNewsPromise},fetchDefaultNews:function t(){try{const t=this;return Promise.resolve(E(function(){return Promise.resolve(fetch(A)).then(function(e){if(!e.ok){throw new Error(`HTTP error! status: ${e.status}`)}return Promise.resolve(e.json()).then(function(e){t._defaultNews=e;return t._defaultNews})})},function(n){t._defaultNewsPromise=null;e.error(n);throw n}))}catch(e){return Promise.reject(e)}},getCustomNewsFeed:function e(t,n){try{const e=this;if(!t){return Promise.resolve(e.getDefaultNewsResponse()).then(function(){let t=e.getDefaultNewsFeedDetails(e._defaultNews);return t})}else{return Promise.resolve(e.getCustomFeedData(t,n))}}catch(e){return Promise.reject(e)}},getCustomFeedData:function t(n,s){try{const t=this;return Promise.resolve(E(function(){const e=t.getNewsFeedDetailsUrl({changeId:n,showAllPreparationRequired:s});if(!t.customNewsFeedCache.has(e)){t.customNewsFeedCache.set(e,t.getAuthNewsFeed(e))}return Promise.resolve(t.customNewsFeedCache.get(e)).then(function(e){const n=e;const s={};const r=[];if(n?.length>0){n.forEach(e=>{const n=e[q.TITLE];if(!s[n.value]){r.push({title:n.value,footer:e[q.VALIDITY].value,imageUrl:t.getCustomFeedImage(n.value)});s[n.value]=n.value}})}return r})},function(t){e.error(t);throw new Error(t)}))}catch(e){return Promise.reject(e)}},getNewsFeedDetailsUrl:function e(t){let n=O+"?$filter=ChangeId eq "+"'"+t.changeId+"'";const s=this.getProperty("customFileName");if(!this.isCSVFileFormat(s)&&t.showAllPreparationRequired){n=n+" and PreparationRequired eq true"}return n+"&$top=999"},getAuthNewsFeed:function t(n,s){try{const t=this;return Promise.resolve(E(function(){return Promise.resolve(Promise.all([t.getAllAvailableApps(),t.getNewsFeedDetails(n,s)])).then(function(e){let[n,s]=e;return n.length===0?s:t.arrangeNewsFeeds(s,n)})},function(t){e.error(t)}))}catch(e){return Promise.reject(e)}},arrangeNewsFeeds:function e(t,n){const s=[];t.forEach(e=>{if(e.Category.value!=="App"||!e.ImpactedArtifacts.value){s.push(e)}else{const t=e.ImpactedArtifacts.value.split("\n");for(let r of t){const t=r;if(t&&this.isAuthFeed(n,r)){s.push(e);break}}}});return s},isAuthFeed:function e(t,n){const s="|";if(n.includes(s)){const e=n.split(s);const r=(e[e.length-1]||"").trim();if(r){const e=t.findIndex(e=>r===e?.signature?.parameters["sap-fiori-id"]?.defaultValue?.value);return e>-1}}return true},getAllAvailableApps:function t(){try{return Promise.resolve(E(function(){return Promise.resolve(o.getServiceAsync("ClientSideTargetResolution")).then(function(e){return e?._oAdapter._aInbounds||[]})},function(t){if(t instanceof Error){e.error(t.message)}return[]}))}catch(e){return Promise.reject(e)}},getNewsFeedDetails:function e(t,n){try{let s=false;const r=this;function i(e){if(s)return e;const i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2");return Promise.resolve(Promise.all([L.GetJSON(t),r.getTranslatedText(r.getCustomFeedKey())])).then(function(e){let[t,s]=e;let o=JSON.parse(JSON.stringify(t.value||[]));const a=JSON.parse(JSON.stringify(s.value||[]));o=r.filterNewsOnTitle(o,n);return o.map(e=>{const t=Object.keys(e);const n=[];t.forEach(t=>{const s=a.find(e=>e?.ColumnName?.toUpperCase()===t.toUpperCase());const r=s?.TranslatedName||i(t);e[t]={label:r,value:e[t]};if(!q.EXCLUDE_FIELDS.includes(t)){n.push(e[t])}});e.Link={label:r._i18nBundle.getText("readMoreLink"),value:e[q.LINK],text:"Link"};e.expanded=o.length===1;e.expandFields=n;return e})})}const o=function(){if(r.customNewsFeedCache.has(t)){return Promise.resolve(r.customNewsFeedCache.get(t)).then(function(e){const t=r.filterNewsOnTitle(e,n);s=true;return t})}}();return Promise.resolve(o&&o.then?o.then(i):i(o))}catch(a){return Promise.reject(a)}},filterNewsOnTitle:function e(t,n){if(n){return t.filter(e=>e.LineOfBusiness.value===n)}return t},getTranslatedText:function t(n){try{const e=V+"?$filter=Changeid eq '"+n+"'";if(!this.customNewsFeedCache.has(e)){this.customNewsFeedCache.set(e,L.GetJSON(e))}return this.customNewsFeedCache.get(e)}catch(t){if(t instanceof Error){e.error(t.message)}return[]}},loadCustomNewsFeed:function e(t,n){try{const e=this;const s=e.parseJsonToXml(JSON.parse(JSON.stringify(t)),n);const r=e.getParent();if(!e.oNewsModel){e.oNewsModel=new i(s);if(!e.bNewsLoad){r?.panelLoadedFn("News",{loaded:true,count:j});e.bNewsLoad=true}e.oNewsTile.setModel(e.oNewsModel)}else{e.oNewsTile.unbindAggregation("tiles",false);e.oNewsTile.destroyAggregation("tiles");e.oNewsModel.setData(s)}return Promise.resolve(e.loadNewsFeed(s,t.length)).then(function(){})}catch(e){return Promise.reject(e)}},parseJsonToXml:function e(t,n){const s=e=>e.map(e=>({item:e}));const r=e=>{let t="";let n;for(n in e){const s=e[n];if(s){if(typeof s==="object"){t+=`<${n}>${r(s)}</${n}>`}else{t+=`<${n}>${s}</${n}>`}}}return t.replace(/<\/?\d+>/g,"")};const i=JSON.parse(JSON.stringify(s(t)));let o="<?xml version='1.0' encoding='UTF-8'?>";const a=n;o+=`<${a}>`;o+=r(i);o+=`</${a}>`;o=o.replaceAll("&","&amp;");const l=new DOMParser;return l.parseFromString(o,"text/xml")},getCustomFeedImage:function e(t){const n=sap.ui.require.toUrl(q.IMAGE_URL);let s=n+J.default[0];const r=J[t]||[];let i=0;if(r.length>0){const e=new window.Uint32Array(1);window.crypto.getRandomValues(e);i=e[0]%3;s=n+r[i]}return s},getDefaultFeedImage:function e(t){const n=t?.bg_image_id;const s=t?._group_to_image;if(!s||s.image_id!==n){return""}let r=s.mime_type;const i=s.bg_image;if(!i){return""}if(r==="application/octet-stream"){r="image/jpeg"}if(!this.isValidBase64(i)){const e=this.base64UrlToBase64(i);return`data:${r};base64,${e}`}return`data:${r};base64,${i}`},base64UrlToBase64:function e(t){let n=t?.replace(/_/g,"/").replace(/-/g,"+");while(n.length%4!==0){n+="="}return n},isValidBase64:function e(t){if(!t||t.length===0){return false}const n=/^[A-Za-z0-9+/]*={0,2}$/;if(!n.test(t)){return false}if(t.length%4!==0){return false}if(t.includes("=")){const e=t.indexOf("=");const n=t.lastIndexOf("=");if(e!==t.length-(t.length-e)){return false}if(t.length-e>2){return false}if(e!==n&&n!==e+1){return false}}return true},_getUserPersonalization:function e(){const t=x.getPersContainerId(this);const n=x.getOwnerComponent(this);return R.getInstance(t,n)}});return W});
6
6
  //# sourceMappingURL=NewsPanel.js.map