@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
@@ -4,12 +4,10 @@
4
4
  */
5
5
 
6
6
  import Log from "sap/base/Log";
7
- import Formatting from "sap/base/i18n/Formatting";
8
7
  import ResourceBundle from "sap/base/i18n/ResourceBundle";
9
8
  import VersionInfo from "sap/ui/VersionInfo";
10
9
  import BaseObject from "sap/ui/base/Object";
11
- import Model from "sap/ui/model/Model";
12
- import ODataMetaModel, { EntitySet, EntityType, Property } from "sap/ui/model/odata/ODataMetaModel";
10
+ import ODataMetaModel, { Property } from "sap/ui/model/odata/ODataMetaModel";
13
11
  import ODataModelV2 from "sap/ui/model/odata/v2/ODataModel";
14
12
  import Config from "sap/ushell/Config";
15
13
  import Container from "sap/ushell/Container";
@@ -26,11 +24,24 @@ import {
26
24
  ISectionAndVisualization,
27
25
  IVisualization
28
26
  } from "../interface/AppsInterface";
29
- import { ICard, ICardManifest } from "../interface/CardsInterface";
27
+ import {
28
+ IAppInfo,
29
+ IAppInfoData,
30
+ IAppManifest,
31
+ ICard,
32
+ ICardDetails,
33
+ ICardManifest,
34
+ IEntitySet,
35
+ IEntityType,
36
+ IHeaderInfo,
37
+ IPageType,
38
+ IVersionInfo,
39
+ PageRecord
40
+ } from "../interface/CardsInterface";
30
41
  import { IPage } from "../interface/PageSpaceInterface";
31
42
  import { AnalyticalCardSkeleton } from "./AnalyticalCardSkeleton";
32
- import { CardSkeleton } from "./CardSkeleton";
33
43
  import {
44
+ COLUMN_LENGTH,
34
45
  DEFAULT_BG_COLOR,
35
46
  FALLBACK_ICON,
36
47
  FEATURE_TOGGLES,
@@ -41,8 +52,9 @@ import {
41
52
  RECOMMENDATION_SRVC_URL,
42
53
  RECOMMENDED_CARD_LIMIT
43
54
  } from "./Constants";
44
- import { createBookMarkData, getLeanURL, sortCollectionByImportance } from "./DataFormatUtils";
55
+ import { createBookMarkData, getLeanURL } from "./DataFormatUtils";
45
56
  import HttpHelper from "./HttpHelper";
57
+ import RecommendedCardUtil from "./RecommendedCardUtil";
46
58
 
47
59
  const CONSTANTS = {
48
60
  MUST_INCLUDE_RECOMMEDED_APPS: ["F0862", "F1823"] //My Inbox and Manage Timesheet apps
@@ -52,57 +64,14 @@ interface IFeatureToggles {
52
64
  TASK_ACTIONS: string;
53
65
  }
54
66
 
55
- interface IGenericApp {
56
- component?: {
57
- name?: string;
58
- settings?: {
59
- tableSettings?: {
60
- addCardtoInsightsHidden?: boolean;
61
- };
62
- };
63
- };
64
- entitySet?: IEntitySet;
65
- }
66
-
67
- export interface IEntitySet extends EntitySet {
68
- "Org.OData.Capabilities.V1.FilterRestrictions"?: {
69
- RequiredProperties?: Array<unknown>;
70
- };
71
- }
72
-
73
- interface IEntityType extends EntityType {
74
- "com.sap.vocabularies.UI.v1.LineItem": Array<ILineItemContext>;
75
- "sap:semantics": string;
76
- "com.sap.vocabularies.Common.v1.SemanticKey": Array<{
77
- PropertyPath: string;
78
- }>;
79
- "com.sap.vocabularies.UI.v1.TextArrangement": {
80
- EnumMember: string;
81
- };
82
- "com.sap.vocabularies.Common.v1.Label": {
83
- String: string;
84
- };
85
- property: Property[];
86
- }
87
-
88
- interface ILineItemContext {
89
- Value: {
90
- Path: string;
91
- };
92
- "com.sap.vocabularies.UI.v1.Importance": string;
93
- "com.sap.vocabularies.UI.v1.Hidden": {
94
- Bool: boolean;
95
- };
67
+ interface ICombinedManifestDetails {
68
+ manifest: IValidManifest;
69
+ metaModel: ODataMetaModel;
96
70
  }
97
71
 
98
- interface IManifestCardData {
99
- cardTitle?: string;
100
- subTitle: string;
72
+ interface IValidManifest {
101
73
  url: string;
102
- semanticObject: string;
103
- action: string;
104
- id?: string;
105
- columns: Array<unknown>;
74
+ manifest: IAppManifest;
106
75
  }
107
76
 
108
77
  const _parseSBParameters = (oParam: object | string | undefined): IParseSBParameters | undefined => {
@@ -228,6 +197,7 @@ const _isVisualizationAlreadyAdded = (visualization: ICustomVisualization, favor
228
197
  *
229
198
  * @alias sap.cux.home.util.AppManager
230
199
  */
200
+
231
201
  export default class AppManager extends BaseObject {
232
202
  private aRequestQueue: { pageId: string; pageLoadPromise: Promise<IPage> }[] = [];
233
203
  private _oMoveAppsPromise!: Promise<void>;
@@ -235,18 +205,20 @@ export default class AppManager extends BaseObject {
235
205
  public insightsSectionIndex!: number;
236
206
  static Instance: AppManager;
237
207
  private recommendedFioriIds!: string[];
238
- private versionInfo!: {
239
- version: string;
240
- buildTimestamp: string;
241
- };
208
+ private versionInfo!: IVersionInfo;
242
209
  private _RBManifestMap!: Record<string, ResourceBundle>;
243
210
  private _recommendedVisualizations!: ICustomVisualization[];
244
211
  private vizDataModified: boolean = false;
245
212
  private _oVizCacheData: { [key: string]: ICustomVizInstance } = {};
246
213
  private _favPageVisualizations: ICustomVisualization[] = [];
214
+ private componentData: IAppInfo = {};
215
+ private fioriAppData: IAppInfo = {};
216
+ private recommendedUtilInstance: RecommendedCardUtil;
217
+ private catalogAppData!: Promise<AppData[]> | undefined;
247
218
 
248
219
  private constructor() {
249
220
  super();
221
+ this.recommendedUtilInstance = RecommendedCardUtil.getInstance();
250
222
  }
251
223
 
252
224
  static getInstance() {
@@ -766,6 +738,17 @@ export default class AppManager extends BaseObject {
766
738
  }
767
739
  }
768
740
 
741
+ /**
742
+ * Checks if a specific URL parameter is enabled (set to "true").
743
+ *
744
+ * @param {string} param - The name of the URL parameter to check.
745
+ * @returns {boolean} `true` if the URL parameter exists and is set to "true" (case-insensitive), otherwise `false`.
746
+ */
747
+ public isURLParamEnabled(param: string): boolean {
748
+ const urlParams = new URLSearchParams(window.location.search);
749
+ return urlParams?.get(param)?.toLowerCase() === "true" || false;
750
+ }
751
+
769
752
  /**
770
753
  * Fetch Recommended Fiori IDs
771
754
  *
@@ -798,24 +781,18 @@ export default class AppManager extends BaseObject {
798
781
  * @private
799
782
  */
800
783
  public async _getCatalogApps() {
801
- try {
802
- const SearchableContent = await Container.getServiceAsync<SearchableContent>("SearchableContent");
803
- return SearchableContent.getApps({ includeAppsWithoutVisualizations: false });
804
- } catch (error) {
805
- Log.error("Error while fetching catalog apps: " + (error as Error).message);
806
- return [];
784
+ if (!this.catalogAppData) {
785
+ try {
786
+ const SearchableContent = await Container.getServiceAsync<SearchableContent>("SearchableContent");
787
+ this.catalogAppData = SearchableContent.getApps({ includeAppsWithoutVisualizations: false });
788
+ return this.catalogAppData;
789
+ } catch (error) {
790
+ this.catalogAppData = undefined;
791
+ Log.error(error instanceof Error ? "Error while fetching catalog apps:" + error.message : String(error));
792
+ return [];
793
+ }
807
794
  }
808
- }
809
-
810
- /**
811
- * Check If Page is List Report
812
- *
813
- * @param {object} page - page object
814
- * @returns {boolean} returns boolean
815
- * @private
816
- */
817
- private _isListReport(page?: IGenericApp) {
818
- return page?.component?.name === "sap.suite.ui.generic.template.ListReport";
795
+ return Promise.resolve(this.catalogAppData);
819
796
  }
820
797
 
821
798
  /**
@@ -824,8 +801,7 @@ export default class AppManager extends BaseObject {
824
801
  * @returns {boolean} returns boolean
825
802
  * @private
826
803
  */
827
- // checks whether page settings contains addCardtoInsightsHidden
828
- private isAddCardToInsightsHidden(page?: IGenericApp) {
804
+ private isAddCardToInsightsHidden(page?: IPageType) {
829
805
  return page?.component?.settings?.tableSettings?.addCardtoInsightsHidden;
830
806
  }
831
807
 
@@ -836,22 +812,29 @@ export default class AppManager extends BaseObject {
836
812
  * @private
837
813
  */
838
814
 
839
- private _checkValidManifests(manifest: ICardManifest) {
840
- const hasRequiredDataSource = manifest["sap.ui.generic.app"] && manifest["sap.app"]?.dataSources?.mainService;
815
+ private _checkValidManifests(manifest: IAppManifest): boolean {
816
+ const dataSources = manifest["sap.app"]?.dataSources;
817
+
818
+ // Ensure dataSources has the correct structure for `mainService`
819
+ const hasRequiredDataSource = manifest["sap.ui.generic.app"] && dataSources?.mainService;
820
+
841
821
  if (!hasRequiredDataSource) {
842
822
  return false;
843
823
  }
844
824
 
845
- const pages = manifest["sap.ui.generic.app"]?.pages as Array<IGenericApp> | Record<string, IGenericApp>;
825
+ const pages = manifest["sap.ui.generic.app"]?.pages;
846
826
  // if its not list report component or if listreport page settings has
847
827
  // isAddCardToInsightsHidden as true, then do not recommend the card
848
828
  if (Array.isArray(pages)) {
849
- return this._isListReport(pages[0]) && !this.isAddCardToInsightsHidden(pages[0]);
850
- } else if (Object.keys(pages).length) {
851
- return Object.keys(pages).some((key: string) => {
852
- if ((pages as Record<string, unknown>)[key]) {
853
- return this._isListReport(pages[key]) && !this.isAddCardToInsightsHidden(pages[key]);
854
- }
829
+ return this.recommendedUtilInstance._isListReport(pages[0]) && !this.isAddCardToInsightsHidden(pages[0]);
830
+ }
831
+
832
+ const pageValues = Object.values(pages as PageRecord);
833
+ if (pageValues.length > 0) {
834
+ return pageValues.some((page) => {
835
+ return (
836
+ typeof page === "object" && this.recommendedUtilInstance._isListReport(page) && !this.isAddCardToInsightsHidden(page)
837
+ );
855
838
  });
856
839
  }
857
840
  return false;
@@ -861,22 +844,19 @@ export default class AppManager extends BaseObject {
861
844
  * Get OData Model
862
845
  *
863
846
  * @param {object} manifest - manifest object
864
- * @returns {object} returns OData Model
847
+ * @returns {ODataModelV2} returns OData Model
865
848
  * @private
866
849
  */
867
- private _getOdataModel(oManifest: ICardManifest) {
850
+ private _getOdataModel(oManifest: IAppManifest): Promise<ODataModelV2> {
868
851
  return new Promise(function (resolve) {
869
852
  const datasource = oManifest?.["sap.app"]?.dataSources;
870
853
  const mainService = datasource?.mainService;
871
- const annotationUrls = mainService?.settings?.annotations
872
- .map((sname) => {
873
- if (datasource && datasource[sname]) {
874
- return datasource[sname]?.uri;
875
- }
876
- })
877
- .filter((urls) => urls !== undefined);
854
+ let annotationUrls: string[] = (mainService?.settings?.annotations || [])
855
+ .map((name: string) => datasource?.[name]?.uri || "")
856
+ .filter(Boolean);
857
+
878
858
  const oDataModel = new ODataModelV2(mainService?.uri as string, {
879
- annotationURI: annotationUrls as string[],
859
+ annotationURI: annotationUrls,
880
860
  loadAnnotationsJoined: true
881
861
  });
882
862
  oDataModel.attachMetadataLoaded(() => {
@@ -895,14 +875,14 @@ export default class AppManager extends BaseObject {
895
875
  * @returns {string} returns entity set
896
876
  * @private
897
877
  */
898
- private _getEntitySet(manifest: ICardManifest) {
878
+ private _getEntitySet(manifest: IAppManifest): string | undefined {
899
879
  const pages = manifest["sap.ui.generic.app"]?.pages;
900
880
  if (Array.isArray(pages)) {
901
881
  return pages[0].entitySet;
902
882
  } else if (pages) {
903
- for (const key in pages as Record<string, IGenericApp>) {
904
- const oApp = pages[key] as IGenericApp;
905
- if (oApp.component && oApp.component?.name === "sap.suite.ui.generic.template.ListReport") {
883
+ for (const key in pages) {
884
+ const oApp = pages[key] as IPageType;
885
+ if (this.recommendedUtilInstance._isListReport(oApp)) {
906
886
  return oApp.entitySet;
907
887
  }
908
888
  }
@@ -910,273 +890,6 @@ export default class AppManager extends BaseObject {
910
890
  return undefined;
911
891
  }
912
892
 
913
- /**
914
- * function returns true if the passed entityset / properties have mandatory properties
915
- *
916
- * @param {EntitySet} oEntitySet - Entity set
917
- * @param {Array} aProperties - Additional Properties
918
- * @returns {boolean} returns boolean
919
- * @private
920
- */
921
- private _hasMandatoryProperties(oEntitySet: IEntitySet, aProperties?: Property[]) {
922
- // if entityset has required properties in filter restrictions return true
923
- if (oEntitySet?.["Org.OData.Capabilities.V1.FilterRestrictions"]?.["RequiredProperties"]?.length) {
924
- return true;
925
- } else if (aProperties?.length) {
926
- // iterate through all properties and return true if any property is mandatory or sap:rquired-in-filter is true
927
- return aProperties.some((oProperty: Record<string, string> | Property) => {
928
- return (
929
- Object.keys(oProperty).length &&
930
- ((oProperty as Record<string, string>)["sap:parameter"] === "mandatory" ||
931
- (oProperty as Record<string, string>)["sap:required-in-filter"] === "true")
932
- );
933
- });
934
- }
935
- }
936
-
937
- /**
938
- * Get Parametersised Entity Set Params
939
- *
940
- * @param {ODataMetaModel} oMetaModel - Meta Model
941
- * @param {string} sEntitySet - Entity Set
942
- * @param {boolean} bIsParamEntitySet - Is Param Entity Set
943
- * @returns {object} returns entity set params
944
- * @private
945
- */
946
- private _getParametersisedEntitySetParams(oMetaModel: ODataMetaModel, sEntitySet: string, bInfoParams: boolean) {
947
- if (!oMetaModel) {
948
- throw new Error("OData Model needs to be passed as an argument");
949
- }
950
-
951
- const oResult: { entitySetName: string | undefined | null; parameters: Array<object | string>; navPropertyName: string | null } = {
952
- entitySetName: null,
953
- parameters: [],
954
- navPropertyName: null
955
- };
956
-
957
- const oEntitySet = oMetaModel.getODataEntitySet(sEntitySet) as IEntitySet;
958
- const oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
959
- const aNavigationProperties = oEntityType.navigationProperty;
960
-
961
- if (!aNavigationProperties) {
962
- return oResult;
963
- }
964
- // filter the parameter entityset for extracting it's key and it's entityset name
965
- aNavigationProperties.forEach(function (oNavProperty) {
966
- const oNavigationEntitySet = oMetaModel.getODataAssociationEnd(oEntityType, oNavProperty.name);
967
- const oNavigationEntityType = oNavigationEntitySet && (oMetaModel.getODataEntityType(oNavigationEntitySet.type) as IEntityType);
968
- if (oNavigationEntityType?.["sap:semantics"] !== "parameters" || !oNavigationEntityType.key) {
969
- return;
970
- }
971
- oResult.entitySetName = oMetaModel.getODataAssociationSetEnd(oEntityType, oNavProperty.name)?.entitySet as string;
972
- for (let value of oNavigationEntityType.key.propertyRef) {
973
- if (bInfoParams) {
974
- const navProp = oNavigationEntityType.property;
975
- for (let navProperty of navProp) {
976
- if (navProperty.name === value.name) {
977
- oResult.parameters.push(navProperty);
978
- oResult.entitySetName = oMetaModel.getODataAssociationSetEnd(oEntityType, oNavProperty.name)?.entitySet;
979
- }
980
- }
981
- } else {
982
- oResult.parameters.push(value.name);
983
- }
984
- }
985
- const aSubNavigationProperties = oNavigationEntityType.navigationProperty;
986
- // Parameter entityset must have association back to main entityset.
987
- const bBackAssociationPresent = aSubNavigationProperties?.some(function (oSubNavigationProperty) {
988
- const sSubNavigationEntityType = oMetaModel.getODataAssociationEnd(
989
- oNavigationEntityType as EntityType,
990
- oSubNavigationProperty.name
991
- )?.type;
992
- //if entityset.entitytype is same as subnavigation entitytype then it's a back association
993
- oResult.navPropertyName = sSubNavigationEntityType === oEntitySet.entityType ? oSubNavigationProperty.name : null;
994
- return oResult.navPropertyName;
995
- });
996
- return bBackAssociationPresent && oResult.navPropertyName && oResult.entitySetName;
997
- });
998
- return oResult;
999
- }
1000
-
1001
- /**
1002
- * Get Column Detail
1003
- *
1004
- * @param {object} oEntityType - entity type object
1005
- * @param {object} oMetaModel - meta model object
1006
- * @param {object} oColumn - column object
1007
- * @returns {object} returns column detail
1008
- * @private
1009
- */
1010
- private _getColumnDetail(oEntityType: IEntityType, oMetaModel: ODataMetaModel, oLineItemContext: ILineItemContext) {
1011
- let oProperty,
1012
- oColumnObject: Record<string, unknown> = {};
1013
- type oDataProprty = Record<
1014
- string,
1015
- { Bool?: boolean; Path?: string; "com.sap.vocabularies.UI.v1.TextArrangement"?: { EnumMember: string } }
1016
- >;
1017
- if (oLineItemContext.Value?.Path) {
1018
- oProperty = oMetaModel.getODataProperty(oEntityType, oLineItemContext.Value.Path) as oDataProprty | Property;
1019
- }
1020
- if (
1021
- !oProperty ||
1022
- (oProperty as oDataProprty)["com.sap.vocabularies.UI.v1.Hidden"]?.Bool ||
1023
- oLineItemContext["com.sap.vocabularies.UI.v1.Hidden"]?.Bool
1024
- ) {
1025
- return oColumnObject;
1026
- }
1027
- // if there is field control path binding then ignore the column
1028
- if ((oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.FieldControl"]?.Path) {
1029
- return undefined;
1030
- }
1031
- let sColumnKeyDescription = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]?.Path || "";
1032
- sColumnKeyDescription = "{" + sColumnKeyDescription + "}";
1033
- let sColumnValue = "{" + (oProperty.name as string) + "}";
1034
- let sNavigation = ""; //need to improve
1035
- const aSemKeyAnnotation = oEntityType["com.sap.vocabularies.Common.v1.SemanticKey"];
1036
- const bIsPropertySemanticKey =
1037
- !!aSemKeyAnnotation &&
1038
- aSemKeyAnnotation.some(function (oAnnotation) {
1039
- return oAnnotation.PropertyPath === (oProperty as oDataProprty).name;
1040
- });
1041
-
1042
- if ((oProperty as oDataProprty)["Org.OData.Measures.V1.ISOCurrency"]?.Path) {
1043
- sColumnValue = sColumnValue.concat(
1044
- " " + "{" + sNavigation + (oProperty as oDataProprty)["Org.OData.Measures.V1.ISOCurrency"].Path + "}"
1045
- );
1046
- }
1047
- if ((oProperty as oDataProprty)["Org.OData.Measures.V1.Unit"]?.Path) {
1048
- sColumnValue = sColumnValue.concat(
1049
- " " + "{" + sNavigation + (oProperty as oDataProprty)["Org.OData.Measures.V1.Unit"].Path + "}"
1050
- );
1051
- }
1052
-
1053
- if ((oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]?.Path) {
1054
- let sTextArragement = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"][
1055
- "com.sap.vocabularies.UI.v1.TextArrangement"
1056
- ];
1057
- if (!sTextArragement) {
1058
- sTextArragement = oEntityType["com.sap.vocabularies.UI.v1.TextArrangement"];
1059
- }
1060
-
1061
- this._setColumnTextValue(sTextArragement, oColumnObject, sColumnKeyDescription, sColumnValue);
1062
- } else {
1063
- oColumnObject["value"] = sColumnValue;
1064
- if (bIsPropertySemanticKey) {
1065
- oColumnObject.identifier = bIsPropertySemanticKey;
1066
- }
1067
- }
1068
- oColumnObject.path = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]
1069
- ? (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"].Path
1070
- : oProperty.name;
1071
- oColumnObject.importance = oLineItemContext["com.sap.vocabularies.UI.v1.Importance"];
1072
- oColumnObject.type = oProperty.type;
1073
- return oColumnObject;
1074
- }
1075
-
1076
- /**
1077
- * Sets display text format of column
1078
- *
1079
- * @private
1080
- * @param {{EnumMember: string} | undefined} sTextArragement - sTextArragement object
1081
- * @param {Record<string, unknown>} oColumnObject - Object containing column details
1082
- * @param {string} sColumnKeyDescription - Description field to include in text value
1083
- * @param {string} sColumnValue - The value to include in Text value
1084
- */
1085
- private _setColumnTextValue(
1086
- sTextArragement: { EnumMember: string } | undefined,
1087
- oColumnObject: Record<string, unknown>,
1088
- sColumnKeyDescription: string,
1089
- sColumnValue: string
1090
- ) {
1091
- const sTextArrangementType = sTextArragement?.EnumMember.split("/")[1];
1092
-
1093
- if (sTextArrangementType === "TextOnly") {
1094
- oColumnObject["value"] = "{= $" + sColumnKeyDescription + " === '' ? '' : $" + sColumnKeyDescription + "}";
1095
- } else if (sTextArrangementType === "TextLast") {
1096
- oColumnObject["value"] =
1097
- "{= $" +
1098
- sColumnValue +
1099
- " === '' ? '' : $" +
1100
- sColumnValue +
1101
- "}" +
1102
- "{= $" +
1103
- sColumnKeyDescription +
1104
- " === '' ? '' : ' (' + ($" +
1105
- sColumnKeyDescription +
1106
- ") + ')'}";
1107
- } else if (sTextArrangementType === "TextSeparate") {
1108
- oColumnObject["value"] = "{= $" + sColumnValue + " === '' ? '' : $" + sColumnValue + "}";
1109
- } else {
1110
- // Default case
1111
- oColumnObject["value"] =
1112
- "{= $" +
1113
- sColumnKeyDescription +
1114
- " === '' ? '' : $" +
1115
- sColumnKeyDescription +
1116
- "}" +
1117
- "{= $" +
1118
- sColumnValue +
1119
- " === '' ? '' : ' (' + ($" +
1120
- sColumnValue +
1121
- ") + ')'}";
1122
- }
1123
- }
1124
-
1125
- /**
1126
- * Get Manifest Card Data
1127
- *
1128
- * @param {object} manifest - manifest object
1129
- * @param {object} entityType - entity type object
1130
- * @param {object} lineItem - line item object
1131
- * @param {string} entitySet - entity set
1132
- * @param {object} parentApp - parent app object
1133
- * @param {object} metaModel - meta model object
1134
- * @returns {object} returns card data
1135
- * @private
1136
- */
1137
- private _getManifestCardData(
1138
- manifest: ICardManifest,
1139
- oEntityType: IEntityType,
1140
- lineItem: Array<ILineItemContext>,
1141
- entitySet: IEntitySet | string,
1142
- oParentApp: unknown,
1143
- oMetaModel: ODataMetaModel
1144
- ): IManifestCardData {
1145
- const mainServiceUri = manifest?.["sap.app"]?.dataSources.mainService.uri;
1146
- const serviceUrl =
1147
- mainServiceUri?.[mainServiceUri.length - 1] === "/"
1148
- ? mainServiceUri + (entitySet as string)
1149
- : mainServiceUri + "/" + (entitySet as string);
1150
-
1151
- //get the column details for each of the lineitem columns
1152
- const aColumns = lineItem
1153
- ?.map((oColumn) => {
1154
- return this._getColumnDetail(oEntityType, oMetaModel, oColumn);
1155
- })
1156
- .filter(function (oItem) {
1157
- // if no column or if path of column is complex path then filter it out
1158
- return oItem !== undefined && (oItem as { path: string }).path.split("/").length <= 1;
1159
- });
1160
- //sort the column based on their importance and then splice the first 4 columns
1161
- const aColumnSorted = sortCollectionByImportance(aColumns)
1162
- .map((column) => {
1163
- type prop = { path: string; type: string; value: string };
1164
- return { path: (column as prop).path, type: (column as prop).type, value: (column as prop).value };
1165
- })
1166
- .splice(0, 4);
1167
- return {
1168
- cardTitle: manifest?.["sap.app"]?.title,
1169
- subTitle: oEntityType["com.sap.vocabularies.Common.v1.Label"]
1170
- ? "Top 5 " + oEntityType["com.sap.vocabularies.Common.v1.Label"].String
1171
- : "",
1172
- url: serviceUrl + "?$top=5&skip=0",
1173
- semanticObject: (oParentApp as { semanticObject: string }).semanticObject,
1174
- action: (oParentApp as { action: string }).action,
1175
- id: manifest?.["sap.app"]?.id,
1176
- columns: aColumnSorted
1177
- };
1178
- }
1179
-
1180
893
  /**
1181
894
  * Load I18n
1182
895
  *
@@ -1185,9 +898,9 @@ export default class AppManager extends BaseObject {
1185
898
  * @returns {object} returns resource bundle
1186
899
  * @private
1187
900
  */
1188
- private async loadI18n(manifest: ICardManifest, manifestUrl: string) {
901
+ private async loadI18n(manifest: IAppManifest, manifestUrl: string) {
1189
902
  // construct abslute url for properties file relative to manifest url
1190
- const i18nBundleUrl = manifest?.["sap.app"]?.["i18n"]["bundleUrl"] as string;
903
+ const i18nBundleUrl = manifest?.["sap.app"]?.["i18n"]?.["bundleUrl"] as string;
1191
904
  const absoluteUrl = new URL(i18nBundleUrl, manifestUrl).href;
1192
905
  this._RBManifestMap = this._RBManifestMap || {};
1193
906
  if (!this._RBManifestMap[absoluteUrl]) {
@@ -1195,7 +908,7 @@ export default class AppManager extends BaseObject {
1195
908
  // specify url of the base .properties file
1196
909
  bundleUrl: absoluteUrl,
1197
910
  async: true,
1198
- terminologies: manifest["sap.app"]?.["i18n"]["terminologies"]
911
+ terminologies: manifest["sap.app"]?.["i18n"]?.["terminologies"]
1199
912
  });
1200
913
  this._RBManifestMap[absoluteUrl] = oResourceBundle;
1201
914
  }
@@ -1220,34 +933,6 @@ export default class AppManager extends BaseObject {
1220
933
  return sPath ? oRB.getText(sPath) : sValue;
1221
934
  }
1222
935
 
1223
- /**
1224
- * Get Attribute Value
1225
- *
1226
- * @param {object} oColumn - column object
1227
- * @returns {string} returns attribute value
1228
- * @private
1229
- */
1230
- private _getAttributeValue(oAttribute: unknown) {
1231
- type attribute = { value: string; path: string; type: string };
1232
- let oAttributeValue = !(oAttribute as attribute).value.startsWith("{")
1233
- ? "{= extension.formatters.stringFormatter(${" + (oAttribute as attribute).path + "}) }"
1234
- : (oAttribute as attribute).value;
1235
- if ((oAttribute as attribute).type === "Edm.Date" || (oAttribute as attribute).type === "Edm.DateTime") {
1236
- const oDateFormatOptions = JSON.stringify({
1237
- pattern: Formatting.getDatePattern("short")
1238
- });
1239
- oAttributeValue =
1240
- "{=${" +
1241
- (oAttribute as attribute).path +
1242
- "}?format.dateTime(${" +
1243
- (oAttribute as attribute).path +
1244
- "}, " +
1245
- oDateFormatOptions +
1246
- ") : ''}";
1247
- }
1248
- return oAttributeValue;
1249
- }
1250
-
1251
936
  /**
1252
937
  * Retrieves a copy of the analytical card manifest.
1253
938
  *
@@ -1258,53 +943,171 @@ export default class AppManager extends BaseObject {
1258
943
  public _getAnalyticalCardManifest() {
1259
944
  return JSON.parse(JSON.stringify(AnalyticalCardSkeleton)) as ICardManifest;
1260
945
  }
946
+
1261
947
  /**
1262
- * Get Manifest
948
+ * Processes the app manifest and generates a recommended card manifest if the app meets the required conditions.
1263
949
  *
1264
- * @param {object} cardInput - card input object
1265
- * @returns {object} returns manifest
950
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
951
+ * @param {IValidManifest} manifestObj - An object containing the app manifest and its URL.
952
+ * @param {AppInfoData | undefined} parentApp - The parent app information, if available.
953
+ * @param {IVersionInfo} versionInfo - The version and build timestamp of the app.
954
+ * @returns {Promise<ICardManifest | undefined>} A promise that resolves to the generated card manifest if the app is eligible,
955
+ * or `undefined` if the app does not meet the required conditions.
1266
956
  * @private
1267
957
  */
1268
- private _getListCardManifest(oInput: IManifestCardData) {
1269
- const cardSkeletonCopy = JSON.parse(JSON.stringify(CardSkeleton)) as ICardManifest;
1270
- const oApp = cardSkeletonCopy["sap.app"];
1271
- const oCard = cardSkeletonCopy["sap.card"];
1272
- if (oApp) {
1273
- oApp.id = "user." + oInput.id + "." + Date.now();
1274
- oApp.title = (oCard.header as { title: string }).title = oInput.cardTitle as string;
1275
- oApp.subTitle = (oCard.header as { subTitle: string }).subTitle = oInput.subTitle;
1276
- }
1277
- const oContent = oCard.content;
1278
- oContent.item.title = this._getAttributeValue(oInput.columns[0]);
1279
- oContent.item.description = this._getAttributeValue(oInput.columns[1]);
1280
- oContent.item.attributes[0] = {
1281
- value: this._getAttributeValue(oInput.columns[2]),
1282
- visible: "{= !!${" + (oInput.columns[2] as { path: string }).path + "} }"
1283
- };
1284
- oContent.data.request.url = oInput.url;
1285
-
1286
- oContent.item.actions = oCard.header.actions = [
1287
- {
1288
- type: "Navigation",
1289
- parameters: {
1290
- ibnTarget: {
1291
- semanticObject: oInput.semanticObject,
1292
- action: oInput.action
1293
- }
958
+ private async getProcessedManifest(
959
+ metaModel: ODataMetaModel,
960
+ manifestObj: IValidManifest,
961
+ parentApp: IAppInfoData | undefined,
962
+ versionInfo: IVersionInfo
963
+ ): Promise<ICardManifest | undefined> {
964
+ try {
965
+ const manifest = manifestObj.manifest;
966
+ const mainEntitySetName = this._getEntitySet(manifest);
967
+ if (!mainEntitySetName) {
968
+ return undefined;
969
+ }
970
+
971
+ const mainEntitySet = metaModel.getODataEntitySet(mainEntitySetName) as IEntitySet;
972
+ const lineItemDetails = this.recommendedUtilInstance.getLineItemDetails(metaModel, manifest, mainEntitySetName);
973
+
974
+ if (!lineItemDetails?.lineItem) {
975
+ return undefined;
976
+ }
977
+
978
+ const entitySetName = lineItemDetails.entitySet || mainEntitySetName;
979
+ const entitySet = (
980
+ entitySetName === mainEntitySetName ? mainEntitySet : metaModel.getODataEntitySet(entitySetName)
981
+ ) as IEntitySet;
982
+ const entityType = metaModel.getODataEntityType(entitySet.entityType) as IEntityType;
983
+ const suppressRowNavigation = lineItemDetails?.lrSettings?.["bSupressCardRowNavigation"];
984
+
985
+ // Check for mandatory properties
986
+ if (this.recommendedUtilInstance.hasMandatoryProperties(entitySet, entityType?.property)) {
987
+ return undefined;
988
+ }
989
+
990
+ // Check for parameterized entity sets
991
+ const parameterDetails = this.recommendedUtilInstance._getParametersisedEntitySetParams(metaModel, entitySetName, true);
992
+ if (parameterDetails?.entitySetName && parameterDetails?.parameters?.length) {
993
+ const paramEntitySet = metaModel.getODataEntitySet(parameterDetails.entitySetName) as IEntitySet;
994
+ if (this.recommendedUtilInstance.hasMandatoryProperties(paramEntitySet, parameterDetails.parameters as Property[])) {
995
+ return undefined;
1294
996
  }
1295
997
  }
1296
- ];
1297
-
1298
- cardSkeletonCopy["sap.insights"] = {
1299
- parentAppId: oInput.id as string,
1300
- cardType: "RT",
1301
- versions: {
1302
- ui5: this.versionInfo.version + "-" + this.versionInfo.buildTimestamp
1303
- },
1304
- visible: true
1305
- };
1306
998
 
1307
- return cardSkeletonCopy;
999
+ const cardInput = this.recommendedUtilInstance._getManifestCardData(manifest, lineItemDetails, parentApp!, metaModel);
1000
+
1001
+ // Ensure the card has at least 3 columns
1002
+ if (cardInput.columns.length < COLUMN_LENGTH) {
1003
+ return undefined;
1004
+ }
1005
+
1006
+ // Resolve card title
1007
+ const headerInfo = lineItemDetails?.headerInfo as IHeaderInfo;
1008
+ const cardTitle = headerInfo.TypeNamePlural?.String || "";
1009
+ cardInput.cardTitle = cardTitle || cardInput.cardTitle;
1010
+
1011
+ // Resolve i18n title if necessary
1012
+ if (!cardTitle && manifest["sap.app"]?.i18n) {
1013
+ const i18nBundleUrl = manifest["sap.app"].i18n.bundleUrl;
1014
+ const appTitle = manifest["sap.app"].title;
1015
+ if (i18nBundleUrl && (appTitle.startsWith("i18n>") || appTitle.startsWith("{"))) {
1016
+ const i18nResourceBundle = await this.loadI18n(manifest, manifestObj.url);
1017
+ cardInput.cardTitle = this.getI18nValueOrDefaultString(cardInput.cardTitle!, i18nResourceBundle);
1018
+ }
1019
+ }
1020
+
1021
+ return this.recommendedUtilInstance._createCardManifest(cardInput, versionInfo, manifest, suppressRowNavigation);
1022
+ } catch (oError: unknown) {
1023
+ Log.error("Error while processing manifest", oError instanceof Error ? oError.message : String(oError));
1024
+ return undefined;
1025
+ }
1026
+ }
1027
+
1028
+ /**
1029
+ * Fetches the OData meta models for a given list of valid manifests.
1030
+ * @param {IValidManifest[]} validManifests - An array of valid manifest objects
1031
+ * @returns {Promise<(ODataMetaModel | undefined)[]>} A promise that resolves to an array of OData meta models.
1032
+ * Each element corresponds to a manifest in the input array, and may be `undefined` if the meta model could not be fetched.
1033
+ * @private
1034
+ */
1035
+ private async fetchMetaModels(validManifests: IValidManifest[]): Promise<(ODataMetaModel | undefined)[]> {
1036
+ const odataPromises = validManifests.map(async (manifestObj) => {
1037
+ try {
1038
+ return (await this._getOdataModel(manifestObj.manifest))?.getMetaModel();
1039
+ } catch (oError: unknown) {
1040
+ Log.error("Error while fetching metamodel", oError instanceof Error ? oError.message : String(oError));
1041
+ return undefined;
1042
+ }
1043
+ });
1044
+
1045
+ return await Promise.all(odataPromises);
1046
+ }
1047
+
1048
+ /**
1049
+ * Combines the valid manifests with their corresponding OData meta models.
1050
+ * @param {IValidManifest[]} validManifests - An array of valid manifest objects
1051
+ * @param {ODataMetaModel[]} aMetaModel - An array of OData meta models
1052
+ * @returns {ICombinedManifestDetails[]} An array of objects containing the manifest and the corresponding meta model.
1053
+ * @private
1054
+ */
1055
+ private combineManifestsAndMetaModels(
1056
+ validManifests: IValidManifest[],
1057
+ aMetaModel: (ODataMetaModel | undefined)[]
1058
+ ): ICombinedManifestDetails[] {
1059
+ return validManifests.reduce<ICombinedManifestDetails[]>((combined, manifestObj, index) => {
1060
+ const metaModel = aMetaModel[index];
1061
+ if (metaModel) {
1062
+ combined.push({ manifest: manifestObj, metaModel });
1063
+ }
1064
+ return combined;
1065
+ }, []);
1066
+ }
1067
+
1068
+ /**
1069
+ * Process the manifest and meta model to get the card manifest
1070
+ * @param {ICombinedManifestDetails[]} combinedDetails - An array of objects containing the manifest and the corresponding meta model.
1071
+ * @param {IAppInfoData[]} aCSTR - An array of app info data
1072
+ * @returns {Promise<(ICardManifest | undefined)[]>} A promise that resolves to an array of recommended card manifests.
1073
+ * @private
1074
+ */
1075
+ private async processManifests(
1076
+ combinedDetails: ICombinedManifestDetails[],
1077
+ aCSTR: IAppInfoData[]
1078
+ ): Promise<(ICardManifest | undefined)[]> {
1079
+ return Promise.all(
1080
+ combinedDetails.map((item) => {
1081
+ const parentApp = aCSTR.find((oApp) => oApp.resolutionResult?.ui5ComponentName === item.manifest.manifest?.["sap.app"]?.id);
1082
+ return this.getProcessedManifest(item.metaModel, item.manifest, parentApp, this.versionInfo);
1083
+ })
1084
+ );
1085
+ }
1086
+
1087
+ /**
1088
+ * Processes the app list to generate a list of Fiori IDs.
1089
+ *
1090
+ * If `aList` is not provided, it uses `aAppComponentIds` and `aComponent` to generate the list of Fiori IDs.
1091
+ * It matches the `semanticObject` and `action` of each component in `aAppComponentIds` with the entries in `aComponent`.
1092
+ * If a match is found, the corresponding `fioriId` is added to the list.
1093
+ *
1094
+ * @param {string[]} [aList] - An optional array of Fiori IDs to return directly.
1095
+ * @param {ICardDetails[]} [aAppComponentIds] - An array of app component details to process.
1096
+ * @param {IAppInfo} [aComponent] - A mapping of component IDs to their corresponding data entries.
1097
+ * @returns {string[]} - A list of Fiori IDs.
1098
+ */
1099
+ private processAppList(aList?: string[], aAppComponentIds?: ICardDetails[], aComponent?: IAppInfo): string[] {
1100
+ if (!aList && aAppComponentIds && aAppComponentIds.length) {
1101
+ return aAppComponentIds.reduce((list, oComponent) => {
1102
+ const oData: IAppInfoData[] = aComponent?.[oComponent.id] || [];
1103
+ const matchingData = oData.find(
1104
+ (entry) => entry.semanticObject === oComponent.target?.semanticObject && entry.action === oComponent.target?.action
1105
+ );
1106
+
1107
+ return matchingData ? [...list, matchingData.fioriId!] : list;
1108
+ }, [] as string[]);
1109
+ }
1110
+ return aList || [];
1308
1111
  }
1309
1112
 
1310
1113
  /**
@@ -1314,108 +1117,68 @@ export default class AppManager extends BaseObject {
1314
1117
  * @returns {Promise} resolves to array of card manifest
1315
1118
  * @private
1316
1119
  */
1317
- private async _getCardMainfest(aAppIds: string[]) {
1318
- const [aInbounds, aCatalog] = await Promise.all([this._getInboundApps(), this._getCatalogApps()]);
1319
- this.versionInfo = (await VersionInfo.load()) as { version: string; buildTimestamp: string };
1320
-
1321
- let aAppUrls = aAppIds
1322
- .map((appId) => {
1323
- const oApp = aInbounds.find((oItem) => {
1324
- return oItem?.signature?.parameters?.["sap-fiori-id"]?.defaultValue?.value === appId;
1325
- });
1326
-
1327
- if (oApp) {
1328
- const oViz = aCatalog.find((oCatalog) => {
1329
- return oApp.semanticObject === oCatalog.target?.semanticObject && oApp.action === oCatalog.target?.action;
1330
- });
1331
- return (oViz && oApp?.resolutionResult?.applicationDependencies?.manifest) as string;
1332
- }
1333
- return undefined;
1334
- })
1335
- .filter((url) => {
1336
- return url !== undefined;
1337
- });
1120
+ public async _getCardManifest(aList?: string[], aAppComponentIds?: ICardDetails[]): Promise<ICardManifest[]> {
1121
+ try {
1122
+ const [aCatalog, aFioriData] = await Promise.all([this._getCatalogApps(), this.getFioriAppData()]);
1123
+ this.versionInfo = (await VersionInfo.load()) as IVersionInfo;
1338
1124
 
1339
- const aManifestPromises = aAppUrls.map(async (url) => {
1340
- const response = await fetch(String(url));
1341
- const manifest = (await response.json()) as ICardManifest;
1342
- return {
1343
- url: response.url,
1344
- manifest: manifest
1345
- };
1346
- });
1125
+ const aCSTR: IAppInfoData[] = Object.values(aFioriData).flat();
1126
+ const aComponent = this.componentData;
1127
+ // in case of replacing old recommended cards fioriIds are not available hence make use of componnetname
1128
+ // and semanticobject and action to find fioriId, and populate aList to recreate recommended card again
1129
+ const processedList = this.processAppList(aList, aAppComponentIds, aComponent);
1347
1130
 
1348
- const aManifest = await Promise.all(aManifestPromises);
1131
+ const manifests = await this.fetchManifests(processedList, aFioriData, aCatalog);
1132
+ const validManifests = manifests.filter((manifestObj) => this._checkValidManifests(manifestObj.manifest));
1349
1133
 
1350
- const validManifests = aManifest.filter((manifestObj) => {
1351
- return this._checkValidManifests(manifestObj.manifest);
1352
- });
1134
+ const aMetaModel = await this.fetchMetaModels(validManifests);
1135
+ const combinedDetails = this.combineManifestsAndMetaModels(validManifests, aMetaModel);
1353
1136
 
1354
- const odataPromises = validManifests.map((manifestObj) => {
1355
- return this._getOdataModel(manifestObj.manifest).then((model) => {
1356
- return (model as Model).getMetaModel();
1357
- });
1358
- });
1137
+ const cards = await this.processManifests(combinedDetails, aCSTR);
1138
+ return cards.filter((card) => card !== undefined);
1139
+ } catch (oError: unknown) {
1140
+ Log.error("Error while fetching card manifest", oError instanceof Error ? oError.message : String(oError));
1141
+ return [];
1142
+ }
1143
+ }
1359
1144
 
1360
- const aMetaModel = await Promise.all(odataPromises);
1361
- const cardPromises = validManifests.map(async (manifestObj, index) => {
1362
- try {
1363
- const oMetaModel = aMetaModel[index] as ODataMetaModel;
1364
- const entitySet = this._getEntitySet(manifestObj.manifest);
1365
- if (!entitySet) {
1366
- return undefined;
1367
- }
1368
- const oEntitySet = oMetaModel.getODataEntitySet(entitySet as string) as IEntitySet;
1369
- const oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
1370
- const oLineItem = oEntityType["com.sap.vocabularies.UI.v1.LineItem"];
1371
- if (!oLineItem || this._hasMandatoryProperties(oEntitySet, oEntityType.property)) {
1372
- return undefined;
1373
- }
1374
- const parameterDetails = this._getParametersisedEntitySetParams(oMetaModel, entitySet as string, true);
1375
- if (parameterDetails && parameterDetails.entitySetName && parameterDetails.parameters.length) {
1376
- const paramEntitySet = oMetaModel.getODataEntitySet(parameterDetails.entitySetName) as EntitySet;
1377
- if (this._hasMandatoryProperties(paramEntitySet, parameterDetails.parameters as Property[])) {
1378
- return undefined;
1379
- }
1380
- }
1381
- const oParentApp = aInbounds.find(function (oApp) {
1382
- return oApp.resolutionResult && oApp.resolutionResult.ui5ComponentName === manifestObj?.manifest?.["sap.app"]?.id;
1383
- });
1384
- const cardInput = this._getManifestCardData(
1385
- manifestObj.manifest,
1386
- oEntityType,
1387
- oLineItem,
1388
- entitySet as IEntitySet,
1389
- oParentApp as unknown,
1390
- oMetaModel
1391
- );
1392
- // if less than 3 columns are present in the card, then do not recommend the card
1393
- if (cardInput.columns.length < 3) {
1394
- return undefined;
1395
- }
1396
- if (typeof manifestObj?.manifest?.["sap.app"]?.i18n === "object") {
1397
- const i18nBundleUrl = manifestObj.manifest["sap.app"].i18n.bundleUrl;
1398
- //if manifest title is not resolved load the resource bundle of the parent app and get the text
1399
- if (
1400
- i18nBundleUrl &&
1401
- (manifestObj.manifest["sap.app"].title.startsWith("i18n>") || manifestObj.manifest["sap.app"].title.startsWith("{"))
1402
- ) {
1403
- const i18nResourceBundle = await this.loadI18n(manifestObj.manifest, manifestObj.url);
1404
- cardInput.cardTitle = this.getI18nValueOrDefaultString(cardInput.cardTitle as string, i18nResourceBundle);
1405
- return this._getListCardManifest(cardInput);
1145
+ /**
1146
+ * Fetch the app manifest for the given app ids
1147
+ * @param {string[]} appIdList - array of app ids
1148
+ * @param {AppInfo} fioriData - fiori data
1149
+ * @param {AppData[]} catalogData - catalog data
1150
+ * @returns {Promise} resolves to array of manifests
1151
+ * @private
1152
+ */
1153
+ private async fetchManifests(appIdList: string[], fioriData: IAppInfo, catalogData: AppData[]): Promise<IValidManifest[]> {
1154
+ try {
1155
+ const appPromises = appIdList.map(async (appId) => {
1156
+ const aApp: IAppInfoData[] = fioriData[appId] || [];
1157
+ for (const oApp of aApp) {
1158
+ const oViz = catalogData.find(
1159
+ (catalog) => oApp.semanticObject === catalog.target?.semanticObject && oApp.action === catalog.target?.action
1160
+ );
1161
+ const manifestUrl = oApp?.resolutionResult?.applicationDependencies?.manifest;
1162
+ if (oViz && manifestUrl) {
1163
+ try {
1164
+ const response = await fetch(manifestUrl);
1165
+ const manifest = (await response.json()) as IAppManifest;
1166
+ return { url: response.url, manifest };
1167
+ } catch (error: unknown) {
1168
+ Log.error("Error while fetching manifest", error instanceof Error ? error.message : String(error));
1169
+ return undefined;
1170
+ }
1406
1171
  }
1407
1172
  }
1408
- return this._getListCardManifest(cardInput);
1409
- } catch (error) {
1410
- Log.error(error as string);
1173
+ // No valid manifest found in this appId's entries
1411
1174
  return undefined;
1412
- }
1413
- });
1414
-
1415
- const cards = await Promise.all(cardPromises);
1416
- return cards.filter((card) => {
1417
- return card !== undefined;
1418
- });
1175
+ });
1176
+ const results = await Promise.all(appPromises);
1177
+ return results.filter((manifest): manifest is IValidManifest => manifest !== undefined);
1178
+ } catch (oError) {
1179
+ Log.error("Error while processing manifests", oError instanceof Error ? oError.message : String(oError));
1180
+ return [];
1181
+ }
1419
1182
  }
1420
1183
 
1421
1184
  /**
@@ -1425,8 +1188,8 @@ export default class AppManager extends BaseObject {
1425
1188
  * @returns {object[]} returns array of cards
1426
1189
  * @private
1427
1190
  */
1428
- private _removeDuplicateCards(aCards: ICard[]) {
1429
- const oCardDict: Record<string, unknown> = {};
1191
+ private _removeDuplicateCards(aCards: ICard[]): ICard[] {
1192
+ const oCardDict: Record<string, boolean> = {};
1430
1193
  const aResult: ICard[] = [];
1431
1194
  aCards.forEach((oCard) => {
1432
1195
  const sCardTitle = oCard?.descriptorContent?.["sap.card"]?.header?.title || "";
@@ -1441,19 +1204,19 @@ export default class AppManager extends BaseObject {
1441
1204
  /**
1442
1205
  * Fetch Recommended Cards
1443
1206
  *
1444
- * @returns {Promise} resolves to array of recommended cards
1207
+ * @returns {Promise<ICard[] | []> } resolves to array of recommended cards
1445
1208
  * @private
1446
1209
  */
1447
- public async getRecommenedCards() {
1210
+ public async getRecommenedCards(): Promise<ICard[] | []> {
1448
1211
  try {
1449
1212
  const aAppIds = await this._getRecommenedFioriIds();
1450
- const aManifests = await this._getCardMainfest(aAppIds);
1451
- const aRecManifests = aManifests.slice(0, RECOMMENDED_CARD_LIMIT);
1452
- const aRecommendedCards = aRecManifests.map((manifest) => {
1213
+ const aManifests = await this._getCardManifest(aAppIds);
1214
+ const aRecManifests = aManifests?.slice(0, RECOMMENDED_CARD_LIMIT);
1215
+ const aRecommendedCards = aRecManifests?.map((manifest) => {
1453
1216
  let id;
1454
- if (manifest) {
1217
+ if (manifest?.["sap.card"]) {
1455
1218
  manifest["sap.card"].rec = true;
1456
- id = manifest["sap.app"]?.id as string;
1219
+ id = manifest["sap.app"]?.id;
1457
1220
  }
1458
1221
  return {
1459
1222
  id,
@@ -1462,7 +1225,7 @@ export default class AppManager extends BaseObject {
1462
1225
  });
1463
1226
  return this._removeDuplicateCards(aRecommendedCards as ICard[]);
1464
1227
  } catch (error) {
1465
- Log.error("Error while fetching recommended cards: " + (error as Error).message);
1228
+ Log.error("Error while fetching recommended cards:", error instanceof Error ? error.message : String(error));
1466
1229
  return [];
1467
1230
  }
1468
1231
  }
@@ -1530,6 +1293,52 @@ export default class AppManager extends BaseObject {
1530
1293
  }
1531
1294
  }
1532
1295
 
1296
+ /**
1297
+ * Retrieves Fiori app data and stores it in the `fioriAppData` and `componentData` properties.
1298
+ *
1299
+ * This method fetches inbound applications using the `_getInboundApps` method and processes them to extract
1300
+ * Fiori app IDs (`sap-fiori-id`) and their associated semantic data. It also maps UI5 component names to their
1301
+ * corresponding Fiori app IDs for later use.
1302
+ *
1303
+ * @returns {Promise<IAppInfo>} A promise that resolves to an object containing Fiori app data
1304
+ * @private
1305
+ */
1306
+ private async getFioriAppData(): Promise<IAppInfo> {
1307
+ try {
1308
+ if (!Object.keys(this.componentData).length) {
1309
+ this.componentData = {};
1310
+ this.fioriAppData = {};
1311
+ const inbounds = await this._getInboundApps();
1312
+ inbounds.forEach((oItem) => {
1313
+ const fioriId = oItem?.signature?.parameters?.["sap-fiori-id"]?.defaultValue?.value;
1314
+ const componentId = oItem?.resolutionResult?.ui5ComponentName;
1315
+ if (fioriId) {
1316
+ const semanticData: IAppInfoData = {
1317
+ action: oItem.action,
1318
+ semanticObject: oItem.semanticObject,
1319
+ resolutionResult: oItem.resolutionResult
1320
+ };
1321
+ this.fioriAppData[fioriId] = this.fioriAppData[fioriId] || [];
1322
+ this.fioriAppData[fioriId].push(semanticData);
1323
+
1324
+ // store data along with fioriId in componentData, this can be used later to find the
1325
+ // fioriId for those apps when only ui5ComponentName is known
1326
+ if (componentId) {
1327
+ const combinedData: IAppInfoData = { ...semanticData, fioriId };
1328
+
1329
+ this.componentData[componentId] = this.componentData[componentId] || [];
1330
+ this.componentData[componentId].push(combinedData);
1331
+ }
1332
+ }
1333
+ });
1334
+ }
1335
+ return this.fioriAppData;
1336
+ } catch (oError) {
1337
+ Log.error(oError instanceof Error ? oError.message : String(oError));
1338
+ return {};
1339
+ }
1340
+ }
1341
+
1533
1342
  /**
1534
1343
  * Retrieves visualizations based on a list of Fiori IDs.
1535
1344
  *