@sapui5/sap.cux.home 1.134.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 (628) hide show
  1. package/package.json +1 -1
  2. package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js +153 -115
  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 +53 -31
  9. package/src/sap/cux/home/App-dbg.js +0 -2
  10. package/src/sap/cux/home/App-dbg.js.map +1 -1
  11. package/src/sap/cux/home/App.js +1 -1
  12. package/src/sap/cux/home/App.js.map +1 -1
  13. package/src/sap/cux/home/AppsAdditionPanel-dbg.js +919 -0
  14. package/src/sap/cux/home/AppsAdditionPanel-dbg.js.map +1 -0
  15. package/src/sap/cux/home/AppsAdditionPanel.d.ts +293 -0
  16. package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -0
  17. package/src/sap/cux/home/AppsAdditionPanel.js +6 -0
  18. package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -0
  19. package/src/sap/cux/home/AppsAdditionPanel.ts +757 -0
  20. package/src/sap/cux/home/AppsContainer-dbg.js +111 -215
  21. package/src/sap/cux/home/AppsContainer-dbg.js.map +1 -1
  22. package/src/sap/cux/home/AppsContainer.d.ts +23 -1
  23. package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
  24. package/src/sap/cux/home/AppsContainer.js +1 -1
  25. package/src/sap/cux/home/AppsContainer.js.map +1 -1
  26. package/src/sap/cux/home/AppsContainer.ts +83 -33
  27. package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js +261 -0
  28. package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js.map +1 -0
  29. package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts +8 -0
  30. package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts.map +1 -0
  31. package/src/sap/cux/home/AppsContainerGenericPlaceholder.js +6 -0
  32. package/src/sap/cux/home/AppsContainerGenericPlaceholder.js.map +1 -0
  33. package/src/sap/cux/home/AppsContainerGenericPlaceholder.ts +251 -0
  34. package/src/sap/cux/home/BaseApp-dbg.js +0 -2
  35. package/src/sap/cux/home/BaseApp-dbg.js.map +1 -1
  36. package/src/sap/cux/home/BaseApp.js +1 -1
  37. package/src/sap/cux/home/BaseApp.js.map +1 -1
  38. package/src/sap/cux/home/BaseAppPanel-dbg.js +8 -12
  39. package/src/sap/cux/home/BaseAppPanel-dbg.js.map +1 -1
  40. package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
  41. package/src/sap/cux/home/BaseAppPanel.js +1 -1
  42. package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
  43. package/src/sap/cux/home/BaseAppPanel.ts +7 -10
  44. package/src/sap/cux/home/BaseAppPersPanel-dbg.js +5 -6
  45. package/src/sap/cux/home/BaseAppPersPanel-dbg.js.map +1 -1
  46. package/src/sap/cux/home/BaseAppPersPanel.d.ts.map +1 -1
  47. package/src/sap/cux/home/BaseAppPersPanel.js +1 -1
  48. package/src/sap/cux/home/BaseAppPersPanel.js.map +1 -1
  49. package/src/sap/cux/home/BaseAppPersPanel.ts +4 -3
  50. package/src/sap/cux/home/BaseContainer-dbg.js +32 -9
  51. package/src/sap/cux/home/BaseContainer-dbg.js.map +1 -1
  52. package/src/sap/cux/home/BaseContainer.d.ts +10 -0
  53. package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
  54. package/src/sap/cux/home/BaseContainer.js +1 -1
  55. package/src/sap/cux/home/BaseContainer.js.map +1 -1
  56. package/src/sap/cux/home/BaseContainer.ts +32 -6
  57. package/src/sap/cux/home/BaseContainerRenderer-dbg.js +18 -3
  58. package/src/sap/cux/home/BaseContainerRenderer-dbg.js.map +1 -1
  59. package/src/sap/cux/home/BaseContainerRenderer.d.ts +4 -4
  60. package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
  61. package/src/sap/cux/home/BaseContainerRenderer.js +1 -1
  62. package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
  63. package/src/sap/cux/home/BaseContainerRenderer.ts +25 -4
  64. package/src/sap/cux/home/BaseLayout-dbg.js +22 -4
  65. package/src/sap/cux/home/BaseLayout-dbg.js.map +1 -1
  66. package/src/sap/cux/home/BaseLayout.d.ts +6 -0
  67. package/src/sap/cux/home/BaseLayout.d.ts.map +1 -1
  68. package/src/sap/cux/home/BaseLayout.js +1 -1
  69. package/src/sap/cux/home/BaseLayout.js.map +1 -1
  70. package/src/sap/cux/home/BaseLayout.ts +23 -2
  71. package/src/sap/cux/home/BaseLayoutRenderer-dbg.js +0 -2
  72. package/src/sap/cux/home/BaseLayoutRenderer-dbg.js.map +1 -1
  73. package/src/sap/cux/home/BaseLayoutRenderer.js +1 -1
  74. package/src/sap/cux/home/BaseLayoutRenderer.js.map +1 -1
  75. package/src/sap/cux/home/BaseNewsItem-dbg.js +3 -5
  76. package/src/sap/cux/home/BaseNewsItem-dbg.js.map +1 -1
  77. package/src/sap/cux/home/BaseNewsItem.js +1 -1
  78. package/src/sap/cux/home/BaseNewsItem.js.map +1 -1
  79. package/src/sap/cux/home/BaseNewsItem.ts +3 -3
  80. package/src/sap/cux/home/BaseNewsPanel-dbg.js +4 -7
  81. package/src/sap/cux/home/BaseNewsPanel-dbg.js.map +1 -1
  82. package/src/sap/cux/home/BaseNewsPanel.d.ts.map +1 -1
  83. package/src/sap/cux/home/BaseNewsPanel.js +1 -1
  84. package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
  85. package/src/sap/cux/home/BaseNewsPanel.ts +5 -4
  86. package/src/sap/cux/home/BasePagePanel-dbg.js +0 -2
  87. package/src/sap/cux/home/BasePagePanel-dbg.js.map +1 -1
  88. package/src/sap/cux/home/BasePagePanel.js +1 -1
  89. package/src/sap/cux/home/BasePagePanel.js.map +1 -1
  90. package/src/sap/cux/home/BasePanel-dbg.js +1 -3
  91. package/src/sap/cux/home/BasePanel-dbg.js.map +1 -1
  92. package/src/sap/cux/home/BasePanel.js +1 -1
  93. package/src/sap/cux/home/BasePanel.js.map +1 -1
  94. package/src/sap/cux/home/BasePanel.ts +1 -1
  95. package/src/sap/cux/home/BaseSettingsDialog-dbg.js +11 -2
  96. package/src/sap/cux/home/BaseSettingsDialog-dbg.js.map +1 -1
  97. package/src/sap/cux/home/BaseSettingsDialog.d.ts.map +1 -1
  98. package/src/sap/cux/home/BaseSettingsDialog.js +1 -1
  99. package/src/sap/cux/home/BaseSettingsDialog.js.map +1 -1
  100. package/src/sap/cux/home/BaseSettingsDialog.ts +12 -0
  101. package/src/sap/cux/home/BaseSettingsPanel-dbg.js +67 -4
  102. package/src/sap/cux/home/BaseSettingsPanel-dbg.js.map +1 -1
  103. package/src/sap/cux/home/BaseSettingsPanel.d.ts +42 -0
  104. package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
  105. package/src/sap/cux/home/BaseSettingsPanel.gen.d.ts +75 -0
  106. package/src/sap/cux/home/BaseSettingsPanel.js +1 -1
  107. package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
  108. package/src/sap/cux/home/BaseSettingsPanel.ts +70 -2
  109. package/src/sap/cux/home/CardsPanel-dbg.js +615 -189
  110. package/src/sap/cux/home/CardsPanel-dbg.js.map +1 -1
  111. package/src/sap/cux/home/CardsPanel.d.ts +135 -15
  112. package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
  113. package/src/sap/cux/home/CardsPanel.gen.d.ts +78 -0
  114. package/src/sap/cux/home/CardsPanel.js +1 -1
  115. package/src/sap/cux/home/CardsPanel.js.map +1 -1
  116. package/src/sap/cux/home/CardsPanel.ts +516 -105
  117. package/src/sap/cux/home/ContentAdditionDialog-dbg.js +353 -0
  118. package/src/sap/cux/home/ContentAdditionDialog-dbg.js.map +1 -0
  119. package/src/sap/cux/home/ContentAdditionDialog.d.ts +82 -0
  120. package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -0
  121. package/src/sap/cux/home/ContentAdditionDialog.js +6 -0
  122. package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -0
  123. package/src/sap/cux/home/ContentAdditionDialog.ts +214 -0
  124. package/src/sap/cux/home/ErrorPanel-dbg.js +5 -7
  125. package/src/sap/cux/home/ErrorPanel-dbg.js.map +1 -1
  126. package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
  127. package/src/sap/cux/home/ErrorPanel.js +1 -1
  128. package/src/sap/cux/home/ErrorPanel.js.map +1 -1
  129. package/src/sap/cux/home/ErrorPanel.ts +6 -4
  130. package/src/sap/cux/home/FavAppPanel-dbg.js +433 -362
  131. package/src/sap/cux/home/FavAppPanel-dbg.js.map +1 -1
  132. package/src/sap/cux/home/FavAppPanel.d.ts +10 -0
  133. package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
  134. package/src/sap/cux/home/FavAppPanel.js +1 -1
  135. package/src/sap/cux/home/FavAppPanel.js.map +1 -1
  136. package/src/sap/cux/home/FavAppPanel.ts +176 -116
  137. package/src/sap/cux/home/FrequentAppPanel-dbg.js +5 -6
  138. package/src/sap/cux/home/FrequentAppPanel-dbg.js.map +1 -1
  139. package/src/sap/cux/home/FrequentAppPanel.js +1 -1
  140. package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
  141. package/src/sap/cux/home/FrequentAppPanel.ts +5 -5
  142. package/src/sap/cux/home/Group-dbg.js +0 -2
  143. package/src/sap/cux/home/Group-dbg.js.map +1 -1
  144. package/src/sap/cux/home/Group.js +1 -1
  145. package/src/sap/cux/home/Group.js.map +1 -1
  146. package/src/sap/cux/home/IToDoPanel-dbg.js +0 -2
  147. package/src/sap/cux/home/IToDoPanel-dbg.js.map +1 -1
  148. package/src/sap/cux/home/IToDoPanel.js +1 -1
  149. package/src/sap/cux/home/IToDoPanel.js.map +1 -1
  150. package/src/sap/cux/home/InsightsAdditionPanel-dbg.js +97 -0
  151. package/src/sap/cux/home/InsightsAdditionPanel-dbg.js.map +1 -0
  152. package/src/sap/cux/home/InsightsAdditionPanel.d.ts +57 -0
  153. package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -0
  154. package/src/sap/cux/home/InsightsAdditionPanel.js +6 -0
  155. package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -0
  156. package/src/sap/cux/home/InsightsAdditionPanel.ts +94 -0
  157. package/src/sap/cux/home/InsightsCardsSettingsPanel-dbg.js +0 -2
  158. package/src/sap/cux/home/InsightsCardsSettingsPanel-dbg.js.map +1 -1
  159. package/src/sap/cux/home/InsightsCardsSettingsPanel.js +1 -1
  160. package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
  161. package/src/sap/cux/home/InsightsContainer-dbg.js +22 -4
  162. package/src/sap/cux/home/InsightsContainer-dbg.js.map +1 -1
  163. package/src/sap/cux/home/InsightsContainer.d.ts +14 -0
  164. package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
  165. package/src/sap/cux/home/InsightsContainer.js +1 -1
  166. package/src/sap/cux/home/InsightsContainer.js.map +1 -1
  167. package/src/sap/cux/home/InsightsContainer.ts +22 -1
  168. package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js +401 -0
  169. package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js.map +1 -0
  170. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts +8 -0
  171. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts.map +1 -0
  172. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js +6 -0
  173. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js.map +1 -0
  174. package/src/sap/cux/home/InsightsContainerGenericPlaceholder.ts +391 -0
  175. package/src/sap/cux/home/InsightsTilesSettingsPanel-dbg.js +49 -18
  176. package/src/sap/cux/home/InsightsTilesSettingsPanel-dbg.js.map +1 -1
  177. package/src/sap/cux/home/InsightsTilesSettingsPanel.d.ts.map +1 -1
  178. package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
  179. package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
  180. package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +25 -14
  181. package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js +10 -11
  182. package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js.map +1 -1
  183. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
  184. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +1 -1
  185. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
  186. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +9 -8
  187. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js +4 -6
  188. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js.map +1 -1
  189. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +1 -1
  190. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
  191. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +4 -4
  192. package/src/sap/cux/home/KeyUserNewsSettingsPanel-dbg.js +2 -3
  193. package/src/sap/cux/home/KeyUserNewsSettingsPanel-dbg.js.map +1 -1
  194. package/src/sap/cux/home/KeyUserNewsSettingsPanel.d.ts.map +1 -1
  195. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +1 -1
  196. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
  197. package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +3 -2
  198. package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js +6 -8
  199. package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js.map +1 -1
  200. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js +1 -1
  201. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
  202. package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +6 -6
  203. package/src/sap/cux/home/KeyUserSettingsDialog-dbg.js +0 -2
  204. package/src/sap/cux/home/KeyUserSettingsDialog-dbg.js.map +1 -1
  205. package/src/sap/cux/home/KeyUserSettingsDialog.js +1 -1
  206. package/src/sap/cux/home/KeyUserSettingsDialog.js.map +1 -1
  207. package/src/sap/cux/home/Layout-dbg.js +59 -39
  208. package/src/sap/cux/home/Layout-dbg.js.map +1 -1
  209. package/src/sap/cux/home/Layout.d.ts +13 -0
  210. package/src/sap/cux/home/Layout.d.ts.map +1 -1
  211. package/src/sap/cux/home/Layout.js +1 -1
  212. package/src/sap/cux/home/Layout.js.map +1 -1
  213. package/src/sap/cux/home/Layout.ts +49 -28
  214. package/src/sap/cux/home/LayoutSettingsPanel-dbg.js +35 -42
  215. package/src/sap/cux/home/LayoutSettingsPanel-dbg.js.map +1 -1
  216. package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
  217. package/src/sap/cux/home/LayoutSettingsPanel.js +1 -1
  218. package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
  219. package/src/sap/cux/home/LayoutSettingsPanel.ts +54 -56
  220. package/src/sap/cux/home/MenuItem-dbg.js +0 -2
  221. package/src/sap/cux/home/MenuItem-dbg.js.map +1 -1
  222. package/src/sap/cux/home/MenuItem.js +1 -1
  223. package/src/sap/cux/home/MenuItem.js.map +1 -1
  224. package/src/sap/cux/home/NewsAndPagesContainer-dbg.js +36 -19
  225. package/src/sap/cux/home/NewsAndPagesContainer-dbg.js.map +1 -1
  226. package/src/sap/cux/home/NewsAndPagesContainer.d.ts +7 -0
  227. package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
  228. package/src/sap/cux/home/NewsAndPagesContainer.js +1 -1
  229. package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
  230. package/src/sap/cux/home/NewsAndPagesContainer.ts +41 -16
  231. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js +164 -0
  232. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js.map +1 -0
  233. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts +8 -0
  234. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts.map +1 -0
  235. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js +6 -0
  236. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js.map +1 -0
  237. package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.ts +154 -0
  238. package/src/sap/cux/home/NewsGroup-dbg.js +110 -79
  239. package/src/sap/cux/home/NewsGroup-dbg.js.map +1 -1
  240. package/src/sap/cux/home/NewsGroup.d.ts +1 -0
  241. package/src/sap/cux/home/NewsGroup.d.ts.map +1 -1
  242. package/src/sap/cux/home/NewsGroup.js +1 -1
  243. package/src/sap/cux/home/NewsGroup.js.map +1 -1
  244. package/src/sap/cux/home/NewsGroup.ts +136 -100
  245. package/src/sap/cux/home/NewsItem-dbg.js +0 -2
  246. package/src/sap/cux/home/NewsItem-dbg.js.map +1 -1
  247. package/src/sap/cux/home/NewsItem.js +1 -1
  248. package/src/sap/cux/home/NewsItem.js.map +1 -1
  249. package/src/sap/cux/home/NewsPanel-dbg.js +554 -177
  250. package/src/sap/cux/home/NewsPanel-dbg.js.map +1 -1
  251. package/src/sap/cux/home/NewsPanel.d.ts +157 -16
  252. package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
  253. package/src/sap/cux/home/NewsPanel.js +1 -1
  254. package/src/sap/cux/home/NewsPanel.js.map +1 -1
  255. package/src/sap/cux/home/NewsPanel.ts +463 -85
  256. package/src/sap/cux/home/NewsSettingsPanel-dbg.js +62 -23
  257. package/src/sap/cux/home/NewsSettingsPanel-dbg.js.map +1 -1
  258. package/src/sap/cux/home/NewsSettingsPanel.d.ts +14 -0
  259. package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
  260. package/src/sap/cux/home/NewsSettingsPanel.js +1 -1
  261. package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
  262. package/src/sap/cux/home/NewsSettingsPanel.ts +76 -22
  263. package/src/sap/cux/home/NoDataContainer-dbg.js +3 -5
  264. package/src/sap/cux/home/NoDataContainer-dbg.js.map +1 -1
  265. package/src/sap/cux/home/NoDataContainer.d.ts +1 -0
  266. package/src/sap/cux/home/NoDataContainer.d.ts.map +1 -1
  267. package/src/sap/cux/home/NoDataContainer.js +1 -1
  268. package/src/sap/cux/home/NoDataContainer.js.map +1 -1
  269. package/src/sap/cux/home/NoDataContainer.ts +4 -2
  270. package/src/sap/cux/home/Page-dbg.js +0 -2
  271. package/src/sap/cux/home/Page-dbg.js.map +1 -1
  272. package/src/sap/cux/home/Page.js +1 -1
  273. package/src/sap/cux/home/Page.js.map +1 -1
  274. package/src/sap/cux/home/PagePanel-dbg.js +146 -114
  275. package/src/sap/cux/home/PagePanel-dbg.js.map +1 -1
  276. package/src/sap/cux/home/PagePanel.d.ts +34 -3
  277. package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
  278. package/src/sap/cux/home/PagePanel.js +1 -1
  279. package/src/sap/cux/home/PagePanel.js.map +1 -1
  280. package/src/sap/cux/home/PagePanel.ts +109 -81
  281. package/src/sap/cux/home/PageSettingsPanel-dbg.js +16 -17
  282. package/src/sap/cux/home/PageSettingsPanel-dbg.js.map +1 -1
  283. package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
  284. package/src/sap/cux/home/PageSettingsPanel.js +1 -1
  285. package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
  286. package/src/sap/cux/home/PageSettingsPanel.ts +15 -14
  287. package/src/sap/cux/home/RecentAppPanel-dbg.js +8 -9
  288. package/src/sap/cux/home/RecentAppPanel-dbg.js.map +1 -1
  289. package/src/sap/cux/home/RecentAppPanel.js +1 -1
  290. package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
  291. package/src/sap/cux/home/RecentAppPanel.ts +8 -8
  292. package/src/sap/cux/home/RecommendedAppPanel-dbg.js +10 -11
  293. package/src/sap/cux/home/RecommendedAppPanel-dbg.js.map +1 -1
  294. package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
  295. package/src/sap/cux/home/RecommendedAppPanel.js +1 -1
  296. package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
  297. package/src/sap/cux/home/RecommendedAppPanel.ts +10 -8
  298. package/src/sap/cux/home/SettingsDialog-dbg.js +16 -9
  299. package/src/sap/cux/home/SettingsDialog-dbg.js.map +1 -1
  300. package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
  301. package/src/sap/cux/home/SettingsDialog.js +1 -1
  302. package/src/sap/cux/home/SettingsDialog.js.map +1 -1
  303. package/src/sap/cux/home/SettingsDialog.ts +17 -7
  304. package/src/sap/cux/home/SituationPanel-dbg.js +4 -8
  305. package/src/sap/cux/home/SituationPanel-dbg.js.map +1 -1
  306. package/src/sap/cux/home/SituationPanel.d.ts +2 -2
  307. package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
  308. package/src/sap/cux/home/SituationPanel.js +1 -1
  309. package/src/sap/cux/home/SituationPanel.js.map +1 -1
  310. package/src/sap/cux/home/SituationPanel.ts +8 -8
  311. package/src/sap/cux/home/TaskPanel-dbg.js +20 -18
  312. package/src/sap/cux/home/TaskPanel-dbg.js.map +1 -1
  313. package/src/sap/cux/home/TaskPanel.d.ts +1 -2
  314. package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
  315. package/src/sap/cux/home/TaskPanel.js +1 -1
  316. package/src/sap/cux/home/TaskPanel.js.map +1 -1
  317. package/src/sap/cux/home/TaskPanel.ts +28 -21
  318. package/src/sap/cux/home/TilesPanel-dbg.js +21 -16
  319. package/src/sap/cux/home/TilesPanel-dbg.js.map +1 -1
  320. package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
  321. package/src/sap/cux/home/TilesPanel.js +1 -1
  322. package/src/sap/cux/home/TilesPanel.js.map +1 -1
  323. package/src/sap/cux/home/TilesPanel.ts +24 -12
  324. package/src/sap/cux/home/ToDoPanel-dbg.js +40 -32
  325. package/src/sap/cux/home/ToDoPanel-dbg.js.map +1 -1
  326. package/src/sap/cux/home/ToDoPanel.d.ts +1 -7
  327. package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
  328. package/src/sap/cux/home/ToDoPanel.js +1 -1
  329. package/src/sap/cux/home/ToDoPanel.js.map +1 -1
  330. package/src/sap/cux/home/ToDoPanel.ts +34 -34
  331. package/src/sap/cux/home/ToDosContainer-dbg.js +27 -20
  332. package/src/sap/cux/home/ToDosContainer-dbg.js.map +1 -1
  333. package/src/sap/cux/home/ToDosContainer.d.ts +7 -0
  334. package/src/sap/cux/home/ToDosContainer.d.ts.map +1 -1
  335. package/src/sap/cux/home/ToDosContainer.js +1 -1
  336. package/src/sap/cux/home/ToDosContainer.js.map +1 -1
  337. package/src/sap/cux/home/ToDosContainer.ts +10 -0
  338. package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js +84 -0
  339. package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js.map +1 -0
  340. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts +8 -0
  341. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts.map +1 -0
  342. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js +6 -0
  343. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js.map +1 -0
  344. package/src/sap/cux/home/ToDosContainerGenericPlaceholder.ts +74 -0
  345. package/src/sap/cux/home/changeHandler/LayoutHandler-dbg.js +0 -2
  346. package/src/sap/cux/home/changeHandler/LayoutHandler-dbg.js.map +1 -1
  347. package/src/sap/cux/home/changeHandler/LayoutHandler.js +1 -1
  348. package/src/sap/cux/home/changeHandler/LayoutHandler.js.map +1 -1
  349. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange-dbg.js +0 -2
  350. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange-dbg.js.map +1 -1
  351. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
  352. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
  353. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl-dbg.js +0 -2
  354. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl-dbg.js.map +1 -1
  355. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
  356. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
  357. package/src/sap/cux/home/changeHandler/SpacePageColorHandler-dbg.js +0 -2
  358. package/src/sap/cux/home/changeHandler/SpacePageColorHandler-dbg.js.map +1 -1
  359. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
  360. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
  361. package/src/sap/cux/home/changeHandler/SpacePageIconHandler-dbg.js +0 -2
  362. package/src/sap/cux/home/changeHandler/SpacePageIconHandler-dbg.js.map +1 -1
  363. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +1 -1
  364. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
  365. package/src/sap/cux/home/designtime/Layout-dbg.designtime.js +0 -2
  366. package/src/sap/cux/home/designtime/Layout-dbg.designtime.js.map +1 -1
  367. package/src/sap/cux/home/designtime/Layout.designtime.js +1 -1
  368. package/src/sap/cux/home/designtime/Layout.designtime.js.map +1 -1
  369. package/src/sap/cux/home/designtime/library-preload.designtime.js +1 -5
  370. package/src/sap/cux/home/designtime/library-preload.designtime.js.map +1 -1
  371. package/src/sap/cux/home/flexibility/BaseContainer.flexibility-dbg.js +0 -2
  372. package/src/sap/cux/home/flexibility/BaseContainer.flexibility-dbg.js.map +1 -1
  373. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +1 -1
  374. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
  375. package/src/sap/cux/home/flexibility/Layout.flexibility-dbg.js +0 -2
  376. package/src/sap/cux/home/flexibility/Layout.flexibility-dbg.js.map +1 -1
  377. package/src/sap/cux/home/flexibility/Layout.flexibility.js +1 -1
  378. package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
  379. package/src/sap/cux/home/i18n/messagebundle.properties +77 -3
  380. package/src/sap/cux/home/i18n/messagebundle_ar.properties +54 -0
  381. package/src/sap/cux/home/i18n/messagebundle_bg.properties +56 -1
  382. package/src/sap/cux/home/i18n/messagebundle_ca.properties +57 -2
  383. package/src/sap/cux/home/i18n/messagebundle_cnr.properties +61 -6
  384. package/src/sap/cux/home/i18n/messagebundle_cs.properties +56 -1
  385. package/src/sap/cux/home/i18n/messagebundle_cy.properties +57 -2
  386. package/src/sap/cux/home/i18n/messagebundle_da.properties +57 -2
  387. package/src/sap/cux/home/i18n/messagebundle_de.properties +56 -1
  388. package/src/sap/cux/home/i18n/messagebundle_el.properties +58 -3
  389. package/src/sap/cux/home/i18n/messagebundle_en.properties +54 -245
  390. package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +58 -3
  391. package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +54 -4
  392. package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +42 -4
  393. package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +58 -3
  394. package/src/sap/cux/home/i18n/messagebundle_es.properties +56 -1
  395. package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +56 -1
  396. package/src/sap/cux/home/i18n/messagebundle_et.properties +55 -0
  397. package/src/sap/cux/home/i18n/messagebundle_fi.properties +57 -2
  398. package/src/sap/cux/home/i18n/messagebundle_fr.properties +63 -8
  399. package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +59 -5
  400. package/src/sap/cux/home/i18n/messagebundle_hi.properties +58 -3
  401. package/src/sap/cux/home/i18n/messagebundle_hr.properties +64 -10
  402. package/src/sap/cux/home/i18n/messagebundle_hu.properties +57 -2
  403. package/src/sap/cux/home/i18n/messagebundle_id.properties +61 -6
  404. package/src/sap/cux/home/i18n/messagebundle_it.properties +56 -1
  405. package/src/sap/cux/home/i18n/messagebundle_iw.properties +57 -2
  406. package/src/sap/cux/home/i18n/messagebundle_ja.properties +55 -0
  407. package/src/sap/cux/home/i18n/messagebundle_kk.properties +58 -3
  408. package/src/sap/cux/home/i18n/messagebundle_ko.properties +57 -2
  409. package/src/sap/cux/home/i18n/messagebundle_lt.properties +54 -0
  410. package/src/sap/cux/home/i18n/messagebundle_lv.properties +57 -2
  411. package/src/sap/cux/home/i18n/messagebundle_mk.properties +56 -1
  412. package/src/sap/cux/home/i18n/messagebundle_ms.properties +57 -2
  413. package/src/sap/cux/home/i18n/messagebundle_nl.properties +56 -1
  414. package/src/sap/cux/home/i18n/messagebundle_no.properties +57 -2
  415. package/src/sap/cux/home/i18n/messagebundle_pl.properties +57 -2
  416. package/src/sap/cux/home/i18n/messagebundle_pt.properties +57 -2
  417. package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +57 -2
  418. package/src/sap/cux/home/i18n/messagebundle_ro.properties +57 -2
  419. package/src/sap/cux/home/i18n/messagebundle_ru.properties +58 -3
  420. package/src/sap/cux/home/i18n/messagebundle_sh.properties +61 -6
  421. package/src/sap/cux/home/i18n/messagebundle_sk.properties +56 -2
  422. package/src/sap/cux/home/i18n/messagebundle_sl.properties +65 -10
  423. package/src/sap/cux/home/i18n/messagebundle_sr.properties +61 -6
  424. package/src/sap/cux/home/i18n/messagebundle_sv.properties +56 -1
  425. package/src/sap/cux/home/i18n/messagebundle_th.properties +55 -1
  426. package/src/sap/cux/home/i18n/messagebundle_tr.properties +55 -1
  427. package/src/sap/cux/home/i18n/messagebundle_uk.properties +55 -0
  428. package/src/sap/cux/home/i18n/messagebundle_vi.properties +56 -2
  429. package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +56 -1
  430. package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +55 -1
  431. package/src/sap/cux/home/interface/AppsInterface-dbg.js +1 -1
  432. package/src/sap/cux/home/interface/AppsInterface-dbg.js.map +1 -1
  433. package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -3
  434. package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
  435. package/src/sap/cux/home/interface/AppsInterface.js +1 -1
  436. package/src/sap/cux/home/interface/AppsInterface.ts +5 -3
  437. package/src/sap/cux/home/interface/CardsInterface-dbg.js +33 -1
  438. package/src/sap/cux/home/interface/CardsInterface-dbg.js.map +1 -1
  439. package/src/sap/cux/home/interface/CardsInterface.d.ts +320 -55
  440. package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
  441. package/src/sap/cux/home/interface/CardsInterface.js +5 -1
  442. package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
  443. package/src/sap/cux/home/interface/CardsInterface.ts +359 -55
  444. package/src/sap/cux/home/interface/KeyUserInterface-dbg.js +1 -1
  445. package/src/sap/cux/home/interface/KeyUserInterface.js +1 -1
  446. package/src/sap/cux/home/interface/LayoutInterface-dbg.js +1 -1
  447. package/src/sap/cux/home/interface/LayoutInterface.js +1 -1
  448. package/src/sap/cux/home/interface/PageSpaceInterface-dbg.js +1 -1
  449. package/src/sap/cux/home/interface/PageSpaceInterface.js +1 -1
  450. package/src/sap/cux/home/library-dbg.js +0 -2
  451. package/src/sap/cux/home/library-dbg.js.map +1 -1
  452. package/src/sap/cux/home/library-preload.js +144 -256
  453. package/src/sap/cux/home/library-preload.js.map +1 -1
  454. package/src/sap/cux/home/library.js +1 -1
  455. package/src/sap/cux/home/library.js.map +1 -1
  456. package/src/sap/cux/home/manifest.json +4 -4
  457. package/src/sap/cux/home/themes/base/AppsContainer.less +12 -0
  458. package/src/sap/cux/home/themes/base/BaseLayout.less +1 -0
  459. package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +69 -0
  460. package/src/sap/cux/home/themes/base/NewsAndPagesContainer.less +36 -3
  461. package/src/sap/cux/home/themes/base/PlaceHolder.less +1374 -0
  462. package/src/sap/cux/home/themes/base/ToDosContainer.less +1 -1
  463. package/src/sap/cux/home/themes/base/library-RTL.css +2 -2
  464. package/src/sap/cux/home/themes/base/library-parameters.json +1 -1
  465. package/src/sap/cux/home/themes/base/library.css +2 -2
  466. package/src/sap/cux/home/themes/base/library.source.less +2 -0
  467. package/src/sap/cux/home/themes/sap_fiori_3/library-RTL.css +2 -2
  468. package/src/sap/cux/home/themes/sap_fiori_3/library-parameters.json +1 -1
  469. package/src/sap/cux/home/themes/sap_fiori_3/library.css +2 -2
  470. package/src/sap/cux/home/themes/sap_fiori_3_dark/library-RTL.css +2 -2
  471. package/src/sap/cux/home/themes/sap_fiori_3_dark/library-parameters.json +1 -1
  472. package/src/sap/cux/home/themes/sap_fiori_3_dark/library.css +2 -2
  473. package/src/sap/cux/home/themes/sap_fiori_3_hcb/AppsContainer.less +1 -0
  474. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-RTL.css +2 -2
  475. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-parameters.json +1 -1
  476. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.css +2 -2
  477. package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.source.less +2 -0
  478. package/src/sap/cux/home/themes/sap_fiori_3_hcw/AppsContainer.less +1 -0
  479. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-RTL.css +2 -2
  480. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-parameters.json +1 -1
  481. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.css +2 -2
  482. package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.source.less +2 -0
  483. package/src/sap/cux/home/themes/sap_horizon/library-RTL.css +2 -2
  484. package/src/sap/cux/home/themes/sap_horizon/library-parameters.json +1 -1
  485. package/src/sap/cux/home/themes/sap_horizon/library.css +2 -2
  486. package/src/sap/cux/home/themes/sap_horizon_dark/library-RTL.css +2 -2
  487. package/src/sap/cux/home/themes/sap_horizon_dark/library-parameters.json +1 -1
  488. package/src/sap/cux/home/themes/sap_horizon_dark/library.css +2 -2
  489. package/src/sap/cux/home/themes/sap_horizon_hcb/AppsContainer.less +1 -0
  490. package/src/sap/cux/home/themes/sap_horizon_hcb/library-RTL.css +2 -2
  491. package/src/sap/cux/home/themes/sap_horizon_hcb/library-parameters.json +1 -1
  492. package/src/sap/cux/home/themes/sap_horizon_hcb/library.css +2 -2
  493. package/src/sap/cux/home/themes/sap_horizon_hcb/library.source.less +2 -0
  494. package/src/sap/cux/home/themes/sap_horizon_hcw/AppsContainer.less +1 -0
  495. package/src/sap/cux/home/themes/sap_horizon_hcw/library-RTL.css +2 -2
  496. package/src/sap/cux/home/themes/sap_horizon_hcw/library-parameters.json +1 -1
  497. package/src/sap/cux/home/themes/sap_horizon_hcw/library.css +2 -2
  498. package/src/sap/cux/home/themes/sap_horizon_hcw/library.source.less +2 -0
  499. package/src/sap/cux/home/utils/Accessibility-dbg.js +0 -2
  500. package/src/sap/cux/home/utils/Accessibility-dbg.js.map +1 -1
  501. package/src/sap/cux/home/utils/Accessibility.js +1 -1
  502. package/src/sap/cux/home/utils/Accessibility.js.map +1 -1
  503. package/src/sap/cux/home/utils/AnalyticalCardSkeleton-dbg.js +61 -0
  504. package/src/sap/cux/home/utils/AnalyticalCardSkeleton-dbg.js.map +1 -0
  505. package/src/sap/cux/home/utils/AnalyticalCardSkeleton.d.ts +54 -0
  506. package/src/sap/cux/home/utils/AnalyticalCardSkeleton.d.ts.map +1 -0
  507. package/src/sap/cux/home/utils/AnalyticalCardSkeleton.js +6 -0
  508. package/src/sap/cux/home/utils/AnalyticalCardSkeleton.js.map +1 -0
  509. package/src/sap/cux/home/utils/AnalyticalCardSkeleton.ts +53 -0
  510. package/src/sap/cux/home/utils/AppManager-dbg.js +459 -492
  511. package/src/sap/cux/home/utils/AppManager-dbg.js.map +1 -1
  512. package/src/sap/cux/home/utils/AppManager.d.ts +89 -118
  513. package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
  514. package/src/sap/cux/home/utils/AppManager.js +1 -1
  515. package/src/sap/cux/home/utils/AppManager.js.map +1 -1
  516. package/src/sap/cux/home/utils/AppManager.ts +365 -554
  517. package/src/sap/cux/home/utils/BatchHelper-dbg.js +105 -30
  518. package/src/sap/cux/home/utils/BatchHelper-dbg.js.map +1 -1
  519. package/src/sap/cux/home/utils/BatchHelper.d.ts +33 -3
  520. package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
  521. package/src/sap/cux/home/utils/BatchHelper.js +1 -1
  522. package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
  523. package/src/sap/cux/home/utils/BatchHelper.ts +95 -15
  524. package/src/sap/cux/home/utils/CardSkeleton-dbg.js +0 -2
  525. package/src/sap/cux/home/utils/CardSkeleton-dbg.js.map +1 -1
  526. package/src/sap/cux/home/utils/CardSkeleton.js +1 -1
  527. package/src/sap/cux/home/utils/CardSkeleton.js.map +1 -1
  528. package/src/sap/cux/home/utils/ColorUtils-dbg.js +0 -2
  529. package/src/sap/cux/home/utils/ColorUtils-dbg.js.map +1 -1
  530. package/src/sap/cux/home/utils/ColorUtils.js +1 -1
  531. package/src/sap/cux/home/utils/ColorUtils.js.map +1 -1
  532. package/src/sap/cux/home/utils/Constants-dbg.js +25 -4
  533. package/src/sap/cux/home/utils/Constants-dbg.js.map +1 -1
  534. package/src/sap/cux/home/utils/Constants.d.ts +17 -1
  535. package/src/sap/cux/home/utils/Constants.d.ts.map +1 -1
  536. package/src/sap/cux/home/utils/Constants.js +1 -1
  537. package/src/sap/cux/home/utils/Constants.js.map +1 -1
  538. package/src/sap/cux/home/utils/Constants.ts +20 -2
  539. package/src/sap/cux/home/utils/DataFormatUtils-dbg.js +132 -126
  540. package/src/sap/cux/home/utils/DataFormatUtils-dbg.js.map +1 -1
  541. package/src/sap/cux/home/utils/DataFormatUtils.d.ts +23 -37
  542. package/src/sap/cux/home/utils/DataFormatUtils.d.ts.map +1 -1
  543. package/src/sap/cux/home/utils/DataFormatUtils.js +1 -1
  544. package/src/sap/cux/home/utils/DataFormatUtils.js.map +1 -1
  545. package/src/sap/cux/home/utils/DataFormatUtils.ts +118 -125
  546. package/src/sap/cux/home/utils/DecisionDialog-dbg.js +3 -8
  547. package/src/sap/cux/home/utils/DecisionDialog-dbg.js.map +1 -1
  548. package/src/sap/cux/home/utils/DecisionDialog.js +1 -1
  549. package/src/sap/cux/home/utils/DecisionDialog.js.map +1 -1
  550. package/src/sap/cux/home/utils/DecisionDialog.ts +2 -2
  551. package/src/sap/cux/home/utils/Device-dbg.js +49 -3
  552. package/src/sap/cux/home/utils/Device-dbg.js.map +1 -1
  553. package/src/sap/cux/home/utils/Device.d.ts +13 -0
  554. package/src/sap/cux/home/utils/Device.d.ts.map +1 -1
  555. package/src/sap/cux/home/utils/Device.js +1 -1
  556. package/src/sap/cux/home/utils/Device.js.map +1 -1
  557. package/src/sap/cux/home/utils/Device.ts +58 -1
  558. package/src/sap/cux/home/utils/DragDropUtils-dbg.js +0 -2
  559. package/src/sap/cux/home/utils/DragDropUtils-dbg.js.map +1 -1
  560. package/src/sap/cux/home/utils/DragDropUtils.js +1 -1
  561. package/src/sap/cux/home/utils/DragDropUtils.js.map +1 -1
  562. package/src/sap/cux/home/utils/FESRUtil-dbg.js +0 -2
  563. package/src/sap/cux/home/utils/FESRUtil-dbg.js.map +1 -1
  564. package/src/sap/cux/home/utils/FESRUtil.js +1 -1
  565. package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
  566. package/src/sap/cux/home/utils/HttpHelper-dbg.js +0 -2
  567. package/src/sap/cux/home/utils/HttpHelper-dbg.js.map +1 -1
  568. package/src/sap/cux/home/utils/HttpHelper.js +1 -1
  569. package/src/sap/cux/home/utils/HttpHelper.js.map +1 -1
  570. package/src/sap/cux/home/utils/IconList-dbg.js +0 -2
  571. package/src/sap/cux/home/utils/IconList-dbg.js.map +1 -1
  572. package/src/sap/cux/home/utils/IconList.js +1 -1
  573. package/src/sap/cux/home/utils/IconList.js.map +1 -1
  574. package/src/sap/cux/home/utils/InsightsUtils-dbg.js +28 -5
  575. package/src/sap/cux/home/utils/InsightsUtils-dbg.js.map +1 -1
  576. package/src/sap/cux/home/utils/InsightsUtils.d.ts +14 -0
  577. package/src/sap/cux/home/utils/InsightsUtils.d.ts.map +1 -1
  578. package/src/sap/cux/home/utils/InsightsUtils.js +1 -1
  579. package/src/sap/cux/home/utils/InsightsUtils.js.map +1 -1
  580. package/src/sap/cux/home/utils/InsightsUtils.ts +28 -3
  581. package/src/sap/cux/home/utils/KeyUserPersonalization-dbg.js +0 -2
  582. package/src/sap/cux/home/utils/KeyUserPersonalization-dbg.js.map +1 -1
  583. package/src/sap/cux/home/utils/KeyUserPersonalization.js +1 -1
  584. package/src/sap/cux/home/utils/KeyUserPersonalization.js.map +1 -1
  585. package/src/sap/cux/home/utils/PageManager-dbg.js +30 -6
  586. package/src/sap/cux/home/utils/PageManager-dbg.js.map +1 -1
  587. package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
  588. package/src/sap/cux/home/utils/PageManager.js +1 -1
  589. package/src/sap/cux/home/utils/PageManager.js.map +1 -1
  590. package/src/sap/cux/home/utils/PageManager.ts +30 -5
  591. package/src/sap/cux/home/utils/PagesIconsConstants-dbg.js +0 -2
  592. package/src/sap/cux/home/utils/PagesIconsConstants-dbg.js.map +1 -1
  593. package/src/sap/cux/home/utils/PagesIconsConstants.js +1 -1
  594. package/src/sap/cux/home/utils/PagesIconsConstants.js.map +1 -1
  595. package/src/sap/cux/home/utils/PerformanceUtils-dbg.js +5 -4
  596. package/src/sap/cux/home/utils/PerformanceUtils-dbg.js.map +1 -1
  597. package/src/sap/cux/home/utils/PerformanceUtils.d.ts +1 -0
  598. package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
  599. package/src/sap/cux/home/utils/PerformanceUtils.js +1 -1
  600. package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
  601. package/src/sap/cux/home/utils/PerformanceUtils.ts +5 -1
  602. package/src/sap/cux/home/utils/PersonalisationUtils-dbg.js +0 -2
  603. package/src/sap/cux/home/utils/PersonalisationUtils-dbg.js.map +1 -1
  604. package/src/sap/cux/home/utils/PersonalisationUtils.js +1 -1
  605. package/src/sap/cux/home/utils/PersonalisationUtils.js.map +1 -1
  606. package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js +1599 -0
  607. package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js.map +1 -0
  608. package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts +534 -0
  609. package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts.map +1 -0
  610. package/src/sap/cux/home/utils/RecommendedCardUtil.js +6 -0
  611. package/src/sap/cux/home/utils/RecommendedCardUtil.js.map +1 -0
  612. package/src/sap/cux/home/utils/RecommendedCardUtil.ts +1945 -0
  613. package/src/sap/cux/home/utils/SituationUtils-dbg.js +0 -2
  614. package/src/sap/cux/home/utils/SituationUtils-dbg.js.map +1 -1
  615. package/src/sap/cux/home/utils/SituationUtils.js +1 -1
  616. package/src/sap/cux/home/utils/SituationUtils.js.map +1 -1
  617. package/src/sap/cux/home/utils/TaskUtils-dbg.js +0 -2
  618. package/src/sap/cux/home/utils/TaskUtils-dbg.js.map +1 -1
  619. package/src/sap/cux/home/utils/TaskUtils.js +1 -1
  620. package/src/sap/cux/home/utils/TaskUtils.js.map +1 -1
  621. package/src/sap/cux/home/utils/UshellPersonalizer-dbg.js +0 -2
  622. package/src/sap/cux/home/utils/UshellPersonalizer-dbg.js.map +1 -1
  623. package/src/sap/cux/home/utils/UshellPersonalizer.d.ts +4 -1
  624. package/src/sap/cux/home/utils/UshellPersonalizer.d.ts.map +1 -1
  625. package/src/sap/cux/home/utils/UshellPersonalizer.js +1 -1
  626. package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
  627. package/src/sap/cux/home/utils/UshellPersonalizer.ts +2 -1
  628. package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +126 -0
@@ -0,0 +1,1945 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ * * (c) Copyright 2009-2025 SAP SE. All rights reserved
4
+ */
5
+ import Formatting from "sap/base/i18n/Formatting";
6
+ import Log from "sap/base/Log";
7
+ import encodeURL from "sap/base/security/encodeURL";
8
+ import formatMessage from "sap/base/strings/formatMessage";
9
+ import deepExtend from "sap/base/util/deepExtend";
10
+ import BaseObject from "sap/ui/base/Object";
11
+ import CoreLib from "sap/ui/core/library";
12
+ import ODataMetaModel, { AssociationEnd, NavigationProperty, Property } from "sap/ui/model/odata/ODataMetaModel";
13
+ import {
14
+ IAppInfoData,
15
+ IAppManifest,
16
+ ICardActionParameters,
17
+ ICardManifest,
18
+ IColumnData,
19
+ IEntitySet,
20
+ IEntityType,
21
+ ILineItem,
22
+ ILineItemContext,
23
+ ILineItemContextValue,
24
+ ILineItemDetails,
25
+ ILrSettings,
26
+ IManifestCardData,
27
+ IPageType,
28
+ IPresentationVariant,
29
+ IRequestData,
30
+ ISapApp,
31
+ ISapCard,
32
+ ISapCardConfig,
33
+ ISapUI5App,
34
+ ITableSettings,
35
+ IUIVisualizations,
36
+ IVariantSetting,
37
+ IVersionInfo,
38
+ PageRecord,
39
+ UIAnnotations,
40
+ UIAnnotationValue
41
+ } from "../interface/CardsInterface";
42
+ import { TABLE_TYPES } from "./Constants";
43
+ import { sortCollectionByImportance } from "./DataFormatUtils";
44
+
45
+ const COLUMN_LENGTH = 3;
46
+ const ValueState = CoreLib.ValueState;
47
+
48
+ interface VariantInfo {
49
+ lineItem?: ILineItem[] | string;
50
+ presentationVariant?: IPresentationVariant;
51
+ qualifierPath?: string;
52
+ PresentationVariant?: IPresentationVariant;
53
+ Visualizations?: IUIVisualizations[];
54
+ }
55
+
56
+ interface NonChartDetail {
57
+ firstAvailableKey: string | null;
58
+ sEntitySet: string;
59
+ oVariant: IVariantSetting;
60
+ }
61
+
62
+ interface SelectExpand {
63
+ select: string[];
64
+ expand: string[];
65
+ }
66
+
67
+ type SelectExpandDetail = {
68
+ select?: string;
69
+ expand?: string;
70
+ };
71
+
72
+ type RequestAtleastFieldType = { String?: string | undefined; PropertyPath?: string | undefined };
73
+ interface ParameterisedEntity {
74
+ entitySetName?: string | null;
75
+ parameters: Array<object | string>;
76
+ navPropertyName: string | null;
77
+ }
78
+
79
+ interface ColumnObjectData extends Partial<IColumnData> {
80
+ leadingProperty?: string;
81
+ additionalProperty?: string;
82
+ navigationProperty?: string;
83
+ columnKey?: string;
84
+ [key: string]: unknown;
85
+ }
86
+
87
+ interface NavigationPropertiesMap {
88
+ [entitySetName: string]: {
89
+ [navigationPropertyName: string]: NavigationProperty;
90
+ };
91
+ }
92
+
93
+ interface ExtendedLineItemContextValue extends ILineItemContextValue {
94
+ Path: string;
95
+ Apply: {
96
+ Name: string;
97
+ Parameters: {
98
+ [key: string]: string;
99
+ }[];
100
+ };
101
+ }
102
+
103
+ enum FieldAnnotationsType {
104
+ DataField = "com.sap.vocabularies.UI.v1.DataField",
105
+ Importance = "com.sap.vocabularies.UI.v1.Importance",
106
+ DataFieldWithNavigationPath = "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath",
107
+ DataFieldWithIntentBasedNavigation = "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation",
108
+ DataFieldForIntentBasedNavigation = "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation",
109
+ Chart = "@com.sap.vocabularies.UI.v1.Chart",
110
+ FieldGroup = "@com.sap.vocabularies.UI.v1.FieldGroup",
111
+ DataPoint = "@com.sap.vocabularies.UI.v1.DataPoint",
112
+ Contact = "@com.sap.vocabularies.Communication.v1.Contact",
113
+ DataFieldForAction = "com.sap.vocabularies.UI.v1.DataFieldForAction",
114
+ DataFieldForAnnotation = "com.sap.vocabularies.UI.v1.DataFieldForAnnotation",
115
+ DataFieldWithUrl = "com.sap.vocabularies.UI.v1.DataFieldWithUrl",
116
+ CriticalityRepresentationTypeWithoutIcon = "com.sap.vocabularies.UI.v1.CriticalityRepresentationType/WithoutIcon",
117
+ FieldControlHiddenType = "com.sap.vocabularies.Common.v1.FieldControlType/Hidden"
118
+ }
119
+
120
+ export enum FieldTypes {
121
+ DataFieldWithNavigationPath = "DataFieldWithNavigationPath",
122
+ DataFieldWithIntentBasedNavigation = "DataFieldWithIntentBasedNavigation",
123
+ DataFieldForIntentBasedNavigation = "DataFieldForIntentBasedNavigation",
124
+ DataFieldForAction = "DataFieldForAction",
125
+ DataFieldForAnnotation = "DataFieldForAnnotation"
126
+ }
127
+
128
+ type Attribute = { value: string; path: string; type: string };
129
+ type SelectionProperties = Array<string | { PropertyPath?: string; String?: string }>;
130
+
131
+ export default class RecommendedCardUtil extends BaseObject {
132
+ static Instance: RecommendedCardUtil;
133
+
134
+ static getInstance() {
135
+ if (!RecommendedCardUtil.Instance) {
136
+ RecommendedCardUtil.Instance = new RecommendedCardUtil();
137
+ }
138
+ return RecommendedCardUtil.Instance;
139
+ }
140
+
141
+ /**
142
+ * @param {object} metaModel - metamodel object
143
+ * @param {object} originalManifest - manifest of original app
144
+ * @param {string} leadingEntitySet - main entitySet of the application as in manifest
145
+ * @returns {object} - returns the lineItem details for the application based on manifest, annotations and metadata
146
+ * @private
147
+ */
148
+ public getLineItemDetails(
149
+ metaModel: ODataMetaModel,
150
+ originalManifest: IAppManifest,
151
+ leadingEntitySet: string
152
+ ): ILineItemDetails | undefined {
153
+ const leadingEntitySetDetails = metaModel.getODataEntitySet(leadingEntitySet) as IEntitySet;
154
+ const variantInfo = this.getLineItemFromVariant(metaModel, leadingEntitySetDetails.entityType);
155
+ const lineItemDefault = variantInfo.lineItem;
156
+ const pages = originalManifest["sap.ui.generic.app"]?.pages;
157
+ const lrSettings = this.getSettingsForPage(pages);
158
+
159
+ //if there is no quickVariantSelectionX setting in manifest, then return default line item details
160
+ if (!lrSettings.quickVariantSelectionX) {
161
+ return this.createDefaultLineItemDetails(metaModel, variantInfo, lrSettings, leadingEntitySet, lineItemDefault);
162
+ }
163
+
164
+ // if there is a variant settings then find the first non-smart chart variant
165
+ const oVariants = lrSettings.quickVariantSelectionX.variants || {};
166
+ const { firstAvailableKey, sEntitySet, oVariant } = this.findFirstNonSmartChartVariant(metaModel, oVariants, leadingEntitySet);
167
+ if (oVariant.isSmartChart) {
168
+ return this.createDefaultLineItemDetails(metaModel, variantInfo, lrSettings, leadingEntitySet, lineItemDefault);
169
+ }
170
+ delete lrSettings.requestAtLeastFields;
171
+
172
+ const defaultTableSettings = this.getNormalizedTableSettings(metaModel, lrSettings, leadingEntitySet);
173
+ const entitySet = metaModel?.getODataEntitySet(sEntitySet) as IEntitySet;
174
+ const quickVariantInfo = this.getLineItemFromVariant(metaModel, entitySet.entityType, oVariant.annotationPath?.split("#")[1]);
175
+ const lineItem = quickVariantInfo.lineItem;
176
+ const presentationVariant = quickVariantInfo.presentationVariant;
177
+
178
+ lrSettings.requestAtLeastFields = presentationVariant?.RequestAtLeast?.length
179
+ ? presentationVariant.RequestAtLeast
180
+ : this._getRequestAtLeastFields(presentationVariant!);
181
+
182
+ oVariant.tableSettings = this.getNormalizedTableSettings(
183
+ metaModel,
184
+ { ...oVariant, tableSettings: oVariant.tableSettings || defaultTableSettings },
185
+ sEntitySet
186
+ );
187
+
188
+ this.validateResponsiveTable(lrSettings, oVariant, firstAvailableKey);
189
+
190
+ delete lrSettings.tableSettings;
191
+ lrSettings.isResponsiveTable = lrSettings.isResponsiveTable === undefined || lrSettings.isResponsiveTable;
192
+
193
+ const lineItemDetail: ILineItemDetails = {
194
+ quickVariant: oVariant,
195
+ lrSettings: lrSettings,
196
+ lineItem: lineItem,
197
+ entitySet: sEntitySet,
198
+ headerInfo: oVariant?.tableSettings?.headerInfo || ""
199
+ };
200
+ return lineItem
201
+ ? lineItemDetail
202
+ : this.createDefaultLineItemDetails(metaModel, variantInfo, lrSettings, leadingEntitySet, lineItemDefault);
203
+ }
204
+
205
+ /**
206
+ * Finds the first non-smart chart variant from the provided variants.
207
+ *
208
+ * This method iterates through the given variants to identify the first variant that is not a smart chart.
209
+ * It also determines the associated entity set and updates the variant's metadata to indicate whether it is a smart chart.
210
+ *
211
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
212
+ * @param {Record<string, IVariantSetting>} oVariants - A record of variants, where each key represents a variant and its associated metadata.
213
+ * @param {string} leadingEntitySet - The name of the leading entity set for the application.
214
+ * @returns {NonChartDetail}
215
+ }
216
+ * An object containing:
217
+ * - `firstAvailableKey`: The key of the first non-smart chart variant, or `null` if none is found.
218
+ * - `sEntitySet`: The entity set associated with the first non-smart chart variant.
219
+ * - `oVariant`: The metadata of the first non-smart chart variant.
220
+ * @private
221
+ */
222
+ private findFirstNonSmartChartVariant(
223
+ metaModel: ODataMetaModel,
224
+ oVariants: Record<string, IVariantSetting>,
225
+ leadingEntitySet: string
226
+ ): NonChartDetail {
227
+ let firstAvailableKey: string | null = null;
228
+ let sEntitySet = leadingEntitySet;
229
+ let oVariant: IVariantSetting = {};
230
+
231
+ for (const sKey in oVariants) {
232
+ if (!Object.prototype.hasOwnProperty.call(oVariants, sKey)) continue;
233
+
234
+ oVariant = oVariants[sKey];
235
+ sEntitySet = oVariant.entitySet || leadingEntitySet;
236
+ const oEntitySet = metaModel.getODataEntitySet(sEntitySet);
237
+
238
+ if (oEntitySet) {
239
+ oVariant.isSmartChart = this.checkIfSmartChart(metaModel, sEntitySet, oVariant);
240
+ if (!oVariant.isSmartChart) {
241
+ firstAvailableKey = sKey;
242
+ break;
243
+ }
244
+ } else {
245
+ oVariant.isSmartChart = true;
246
+ }
247
+ }
248
+ return { firstAvailableKey, sEntitySet, oVariant };
249
+ }
250
+
251
+ /**
252
+ * Validates the responsive table type for a given variant and updates the List Report (LR) settings.
253
+ *
254
+ * @param {ILrSettings} lrSettings - The settings object for the List Report, including table settings and configurations.
255
+ * @param {IVariantSetting} oVariant - The variant object containing table settings and metadata.
256
+ * @param {string | null} firstAvailableKey - The key of the first available variant, used for logging errors.
257
+ * @returns {void}
258
+ * @private
259
+ */
260
+ private validateResponsiveTable(lrSettings: ILrSettings, oVariant: IVariantSetting, firstAvailableKey: string | null): void {
261
+ const isResponsive = oVariant.tableSettings?.type === TABLE_TYPES.RESPONSIVE;
262
+ if (lrSettings.isResponsiveTable === undefined) {
263
+ lrSettings.isResponsiveTable = isResponsive;
264
+ } else if (lrSettings.isResponsiveTable !== isResponsive) {
265
+ Log.error(`Variant with key ${firstAvailableKey} resulted in invalid Table Type combination.`);
266
+ }
267
+ }
268
+
269
+ /**
270
+ *
271
+ * This method generates the default configuration for line item details, including table settings,
272
+ * responsive table type, and request-at-least fields based on the provided metadata, variant information,
273
+ * and settings.
274
+ *
275
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
276
+ * @param {VariantInfo} variantInfo - The variant information containing presentation variant and line item details.
277
+ * @param {ILrSettings} lrSettings - The settings object for the List Report, including table settings and other configurations.
278
+ * @param {string} leadingEntitySet - The name of the leading entity set for the application.
279
+ * @param {ILineItem[] | string | undefined} lineItemDefault - The default line item details, which can be an array of line items, a string, or undefined.
280
+ * @returns {ILineItemDetails} The default line item details object, including quick variant, settings, line item, entity set, and header info.
281
+ * @private
282
+ */
283
+ private createDefaultLineItemDetails(
284
+ metaModel: ODataMetaModel,
285
+ variantInfo: VariantInfo,
286
+ lrSettings: ILrSettings,
287
+ leadingEntitySet: string,
288
+ lineItemDefault?: ILineItem[] | string
289
+ ): ILineItemDetails {
290
+ lrSettings.tableSettings = this.getNormalizedTableSettings(metaModel, lrSettings, leadingEntitySet);
291
+ lrSettings.isResponsiveTable = lrSettings.tableSettings.type === TABLE_TYPES.RESPONSIVE;
292
+ if (variantInfo?.presentationVariant?.RequestAtLeast?.length) {
293
+ lrSettings.requestAtLeastFields = variantInfo.presentationVariant.RequestAtLeast;
294
+ }
295
+ return {
296
+ quickVariant: {},
297
+ lrSettings: lrSettings,
298
+ lineItem: lineItemDefault,
299
+ entitySet: leadingEntitySet,
300
+ headerInfo: lrSettings?.tableSettings?.headerInfo || ""
301
+ };
302
+ }
303
+
304
+ /**
305
+ * @param {object} oMetaModel - metamodel object
306
+ * @param {string} entityType - entity type of the application
307
+ * @param {string} qualifier - qualifier of the variant
308
+ * @returns {object} - returns the lineItem, presentationVariant, qualifierPath from the variant for the application based on manifest, annotations and metadata
309
+ * @private
310
+ */
311
+ private getLineItemFromVariant(oMetaModel: ODataMetaModel, entityType: string, qualifier?: string): VariantInfo {
312
+ const oSelectionPresentationVariant = this.getAnnotation<IPresentationVariant>(
313
+ oMetaModel,
314
+ entityType,
315
+ UIAnnotations.UISelectionPresentationVariant,
316
+ qualifier
317
+ );
318
+
319
+ let oPresentationVariant;
320
+ if (oSelectionPresentationVariant?.PresentationVariant) {
321
+ oPresentationVariant = this.getPresentationVariant(oMetaModel, entityType, oSelectionPresentationVariant.PresentationVariant);
322
+ } else {
323
+ oPresentationVariant = this.getAnnotation<IPresentationVariant>(
324
+ oMetaModel,
325
+ entityType,
326
+ UIAnnotations.UIPresentationVariant,
327
+ qualifier
328
+ );
329
+ }
330
+
331
+ const oDetails = oPresentationVariant ? this.getLineItem(oMetaModel, entityType, oPresentationVariant) : null;
332
+ const lineItem = oDetails?.lineItem || this.getAnnotation<ILineItem[]>(oMetaModel, entityType, UIAnnotations.UILineItem, "");
333
+
334
+ return {
335
+ presentationVariant: oPresentationVariant,
336
+ lineItem: lineItem,
337
+ qualifierPath: oDetails?.annotationPath || ""
338
+ };
339
+ }
340
+
341
+ // get the annotation , sAnnotation from the entityType, sEntityType
342
+ private getAnnotation<T extends IPresentationVariant | ILineItem[]>(
343
+ metaModel: ODataMetaModel,
344
+ entityType: string,
345
+ annotation: UIAnnotations,
346
+ qualifierName?: string
347
+ ): T | undefined {
348
+ const fullAnnotation = `${annotation}${qualifierName ? `#${qualifierName}` : ""}`;
349
+ const entityTypeData = metaModel.getODataEntityType(entityType) as IEntityType;
350
+ return entityTypeData?.[fullAnnotation] as T | undefined;
351
+ }
352
+
353
+ /**
354
+ * This method determines the presentation variant based on the provided selection presentation variant.
355
+ * If the presentation variant is defined via a `Path`, it resolves the path to retrieve the corresponding object
356
+ * from the OData meta model. If the presentation variant is defined inline (i.e., without a `Path`), it directly
357
+ * returns the inline object.
358
+ *
359
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
360
+ * @param {string} entityTypeData - The entity type for which the presentation variant is to be retrieved.
361
+ * @param {IPresentationVariant} selectionPresentationVariant -
362
+ * The selection presentation variant object, which may contain a `Path` or an inline `PresentationVariant`.
363
+ * @returns {IPresentationVariant} The resolved presentation variant object.
364
+ * @private
365
+ */
366
+ private getPresentationVariant(
367
+ metaModel: ODataMetaModel,
368
+ entityTypeData: string,
369
+ selectionPresentationVariant: IPresentationVariant
370
+ ): IPresentationVariant {
371
+ // PresentationVariant must be defined (according to vocabulary) either via "Path" or inline (i.e. Path is not defined).
372
+ // For compatibility, just ignore if not provided (leading to fallback to use LineItem without qualifier)
373
+ const presentationVariant = selectionPresentationVariant?.PresentationVariant;
374
+
375
+ if (presentationVariant?.Path) {
376
+ return this.getObject<IPresentationVariant>(metaModel, entityTypeData, presentationVariant.Path);
377
+ }
378
+ return presentationVariant!;
379
+ }
380
+
381
+ /**
382
+ * Retrieves the line item annotation details for a given entity type and presentation variant.
383
+ *
384
+ * This method searches for the `com.sap.vocabularies.UI.v1.LineItem` annotation within the visualizations
385
+ * of the provided presentation variant. If found, it returns the line item details, including the annotation path
386
+ * and qualifier.
387
+ *
388
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about the entity type.
389
+ * @param {string} entityTypeData - The entity type for which the line item annotation is to be retrieved.
390
+ * @param {IPresentationVariant} presentationVariantData - The presentation variant containing visualizations.
391
+ * @returns { IUIVisualizations | IUIVisualizations[] | null}
392
+ * - An object containing the line item details, annotation path, and qualifier if the annotation is found.
393
+ * - An array of UI annotations if applicable.
394
+ * - `null` if no valid line item annotation is found.
395
+ * @private
396
+ */
397
+ private getLineItem(
398
+ metaModel: ODataMetaModel,
399
+ entityTypeData: string,
400
+ presentationVariantData: IPresentationVariant
401
+ ): IUIVisualizations | null {
402
+ // Visualizations must be defined (according to vocabulary)
403
+ // however, this is not given at least in all demokit apps (presentationVariant consisting only of sortOrder)
404
+ let visualizationData = presentationVariantData.Visualizations?.find(function (oVis) {
405
+ return oVis.AnnotationPath?.includes(UIAnnotations.UILineItem);
406
+ });
407
+
408
+ return visualizationData
409
+ ? {
410
+ lineItem: this.getObject<ILineItem[]>(metaModel, entityTypeData, visualizationData.AnnotationPath!),
411
+ annotationPath: visualizationData.AnnotationPath!,
412
+ sQualifier: visualizationData.AnnotationPath?.split("#")[1]
413
+ }
414
+ : null;
415
+ }
416
+
417
+ /**
418
+ * Extracts relevant column paths for `$select` and `$expand` OData query options.
419
+ *
420
+ * This method processes the provided column definitions to extract paths for the `$select` and `$expand` query options.
421
+ * It ensures that paths are unique and properly formatted for OData requests.
422
+ *
423
+ * @param {Array<Record<string,unknown>>} columns - An array of column definitions.
424
+ * Each column definition may include properties like `leadingProperty`, `additionalProperty`, and `navigationProperty`.
425
+ * @returns {SelectExpand} An object containing two arrays:
426
+ * - `select`: An array of unique paths for the `$select` query option.
427
+ * - `expand`: An array of unique paths for the `$expand` query option.
428
+ * @private
429
+ */
430
+ private _getRelevantColumnPaths(columns: ColumnObjectData[]): SelectExpand {
431
+ columns = Array.isArray(columns) ? columns : [];
432
+ const selectSet = new Set<string>();
433
+ const expandSet = new Set<string>();
434
+ columns.forEach((oColumnData) => {
435
+ if (oColumnData) {
436
+ const sPath = oColumnData["leadingProperty"];
437
+ const sAdditionalPath = oColumnData["additionalProperty"];
438
+ const sExpandPath = oColumnData["navigationProperty"];
439
+ if (sPath) {
440
+ selectSet.add(sPath);
441
+ }
442
+ this.extractPathAndInsertToSet(sAdditionalPath!, selectSet);
443
+ this.extractPathAndInsertToSet(sExpandPath!, expandSet);
444
+ }
445
+ });
446
+ return {
447
+ select: Array.from(selectSet),
448
+ expand: Array.from(expandSet)
449
+ };
450
+ }
451
+
452
+ /**
453
+ * Extracts and inserts unique paths into the provided array.
454
+ *
455
+ * This method splits the given path string by commas, iterates through the resulting paths,
456
+ * and adds each unique path to the provided array. Duplicate paths are ignored.
457
+ *
458
+ * @param {string} sPath - A comma-separated string of paths to be processed.
459
+ * @param {Set<string>} - The array to which unique paths will be added.
460
+ * @private
461
+ */
462
+ private extractPathAndInsertToSet(sPath: string, pathSet: Set<string>) {
463
+ sPath?.split(",").forEach((path) => {
464
+ if (path) {
465
+ pathSet.add(path);
466
+ // currently not doing transitive dependencies
467
+ }
468
+ });
469
+ }
470
+
471
+ /**
472
+ * Expands navigation properties for the given entity set and selected properties.
473
+ *
474
+ * This method processes the provided `selects` array to identify navigation properties
475
+ * that need to be expanded. If a navigation property is found, it is added to the `expands` array.
476
+ *
477
+ * @param {string} entitySetName - The name of the entity set being processed.
478
+ * @param {string[]} selects - An array of selected property paths to be checked for navigation properties.
479
+ * @param {string[]} expands - An array to which navigation properties requiring expansion will be added.
480
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
481
+ * @private
482
+ */
483
+ private extractAndExpandNavigationProperty(entitySetName: string, selects: string[], expands: string[], metaModel: ODataMetaModel) {
484
+ const mNavigationProperties = {};
485
+
486
+ // check if any expand is necessary
487
+ for (const sPath of selects) {
488
+ let iPos = sPath.lastIndexOf("/");
489
+ let sNavigation;
490
+ if (iPos < 0) {
491
+ // sPath contains no '/' but still could be a navigationProperty
492
+ if (!this.getNavigationProperty(entitySetName, sPath, metaModel, mNavigationProperties)) {
493
+ continue; //not a navproperty hence continue to next iteration
494
+ }
495
+ sNavigation = sPath;
496
+ } else {
497
+ sNavigation = sPath.substring(0, iPos);
498
+ }
499
+ if (!expands.includes(sNavigation)) {
500
+ expands.push(sNavigation);
501
+ }
502
+ }
503
+ }
504
+
505
+ //get the navigation property details for the given property from entityset, sEntitySet
506
+ private getNavigationProperty(
507
+ entitySetName: string,
508
+ navProperty: string,
509
+ metaModel: ODataMetaModel,
510
+ mNavigationProperties: NavigationPropertiesMap
511
+ ) {
512
+ let mMyNavigationProperties = mNavigationProperties?.[entitySetName];
513
+
514
+ // If navigation properties not already fetched, then fetch them
515
+ if (!mMyNavigationProperties) {
516
+ mMyNavigationProperties = {};
517
+ mNavigationProperties[entitySetName] = mMyNavigationProperties;
518
+
519
+ const oEntitySet = metaModel.getODataEntitySet(entitySetName) as IEntitySet;
520
+ if (oEntitySet) {
521
+ const oEntityType = metaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
522
+ if (oEntityType) {
523
+ const aNavigationProperty = oEntityType.navigationProperty || [];
524
+ aNavigationProperty.forEach((oNavigationProperty) => {
525
+ const navName = oNavigationProperty.name;
526
+ mMyNavigationProperties[navName] = oNavigationProperty;
527
+ });
528
+ }
529
+ }
530
+ }
531
+
532
+ return mMyNavigationProperties?.[navProperty] || undefined;
533
+ }
534
+
535
+ // add all necessary fields to the select array
536
+ private _addNecessaryFields(aSelects: string[], oInfo: ILineItemDetails, oMetaModel: ODataMetaModel) {
537
+ let oEntitySet = oMetaModel.getODataEntitySet(oInfo.entitySet) as IEntitySet;
538
+ let oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
539
+ let aProperties: string[] = [];
540
+
541
+ if (aSelects.length > 0) {
542
+ if (oInfo.lineItem && typeof oInfo.lineItem !== "string") {
543
+ oInfo.lineItem.forEach((lineItem) => {
544
+ if (
545
+ lineItem.RecordType === FieldAnnotationsType.DataFieldWithIntentBasedNavigation ||
546
+ lineItem.RecordType === FieldAnnotationsType.DataFieldWithNavigationPath
547
+ ) {
548
+ const aDataFieldsWithNavigation = this.getDataFieldsWithNavigation(lineItem, oMetaModel, oEntityType);
549
+ if (aDataFieldsWithNavigation?.length) {
550
+ aProperties = aProperties.concat(aDataFieldsWithNavigation);
551
+ }
552
+ }
553
+ });
554
+ }
555
+ //add the fieldcontrol path of the properties
556
+ this.getFieldControlsPath(aSelects, oMetaModel, oEntityType, aProperties);
557
+ }
558
+
559
+ aProperties.forEach((property) => {
560
+ this.ensureSelectionProperty(property, aSelects);
561
+ });
562
+ }
563
+
564
+ /**
565
+ * Collects the paths for field controls based on the selected properties.
566
+ * This function iterates over the given selection of properties, aSelects, retrieves the corresponding
567
+ * property metadata from the OData model, and if a field control annotation exists for a property,
568
+ * it adds the path of this field control to the provided array of properties.
569
+ * @param {string[]} selects - An array of property names to be checked for field control paths.
570
+ * @param {object} metaModel - The OData meta model instance used to retrieve property metadata.
571
+ * @param {object} entityType - The entity type from the OData model that contains the properties.
572
+ * @param {string[]} aProperties - An array to which the field control paths will be added.
573
+ * @private
574
+ */
575
+ private getFieldControlsPath(selects: string[], metaModel: ODataMetaModel, entityType: IEntityType, aProperties: string[]) {
576
+ selects.forEach((sSelect) => {
577
+ if (sSelect) {
578
+ //needed for activating field control for DataField Annotation & when using the setting to add new columns
579
+ let oProperty = (metaModel.getODataProperty(entityType, sSelect) as UIAnnotationValue) || {};
580
+ if (UIAnnotations.CommonFieldControl in oProperty) {
581
+ let oFieldControl = oProperty[UIAnnotations.CommonFieldControl];
582
+ if (oFieldControl?.Path) {
583
+ aProperties.push(oFieldControl.Path);
584
+ }
585
+ }
586
+ }
587
+ });
588
+ }
589
+
590
+ /**
591
+ * Handling for DataFieldWithNavigationPath and DataFieldWithIntentBasedNavigation
592
+ * @param {object} lineItem - LineItem object
593
+ * @param {object} metaModel - OData metamodel
594
+ * @param {object} entityType - EntityType object
595
+ * @returns {Array} - Array of properties to be selected in case field type is DataFieldWithNavigationPath or DataFieldWithIntentBasedNavigation
596
+ * @private
597
+ */
598
+ private getDataFieldsWithNavigation(lineItem: ILineItem, metaModel: ODataMetaModel, entityType: IEntityType): string[] {
599
+ const requestFields = [];
600
+
601
+ // Handle Value.Path
602
+ const valuePath = lineItem.Value?.Path;
603
+ if (valuePath) {
604
+ const lineItemProperty = metaModel.getODataProperty(entityType, valuePath) as UIAnnotationValue;
605
+ const textAnnotation = lineItemProperty?.[UIAnnotations.CommonText]?.Path;
606
+ const sapTextAnnotation = lineItemProperty?.["sap:text"];
607
+
608
+ requestFields.push(sapTextAnnotation || textAnnotation || valuePath);
609
+ }
610
+
611
+ // Handle SemanticObject.Path
612
+ if (lineItem.SemanticObject?.Path) {
613
+ requestFields.push(lineItem.SemanticObject.Path);
614
+ }
615
+
616
+ // Handle Action.Path
617
+ if (lineItem.Action?.Path) {
618
+ requestFields.push(lineItem.Action.Path);
619
+ }
620
+
621
+ return requestFields;
622
+ }
623
+
624
+ // Section: Parameter Handling
625
+ private getParameters(
626
+ oInfo: ILineItemDetails,
627
+ metaModel: ODataMetaModel,
628
+ entitySet: string,
629
+ oSelectExpand: SelectExpand
630
+ ): SelectExpandDetail {
631
+ let aSelects = oSelectExpand.select || [];
632
+ let aExpands = oSelectExpand.expand || [];
633
+
634
+ let alwaysSelectField = oInfo?.lrSettings?.requestAtLeastFields || [];
635
+ if (alwaysSelectField.length > 0) {
636
+ aSelects = this._ensureSelectionProperties(aSelects, alwaysSelectField);
637
+ }
638
+
639
+ this._handleMandatorySelectionFields(entitySet, aSelects, metaModel);
640
+ this._addNecessaryFields(aSelects, oInfo, metaModel);
641
+ this.extractAndExpandNavigationProperty(entitySet, aSelects, aExpands, metaModel);
642
+
643
+ return {
644
+ expand: aExpands.join(",") || undefined,
645
+ select: aSelects.join(",") || undefined
646
+ };
647
+ }
648
+
649
+ /**
650
+ *
651
+ * @param {Array} aSelects , select parameters
652
+ * @param {SelectionProperties} alwaysSelectField, all the fields that are marked as requestAtLeastFields
653
+ * @returns {Array} aSelects, updated select parameters
654
+ * @private
655
+ */
656
+
657
+ private _ensureSelectionProperties(aSelects: string[], alwaysSelectField: SelectionProperties): string[] {
658
+ for (const item of alwaysSelectField) {
659
+ if (typeof item === "object" && item?.PropertyPath && !aSelects.includes(item.PropertyPath)) {
660
+ aSelects.push(item.PropertyPath);
661
+ }
662
+ }
663
+
664
+ return aSelects;
665
+ }
666
+
667
+ /**
668
+ * Handles the mandatory selection fields for the given entity set and properties.
669
+ *
670
+ * @param {object} entitySet - The entity set object.
671
+ * @param {array} aSelects - The array of properties.
672
+ * @returns {boolean} True if the entity set or properties have mandatory fields, false otherwise.
673
+ * @private
674
+ */
675
+ private _handleMandatorySelectionFields(entitySet: string, aSelects: string[], oMetaModel: ODataMetaModel) {
676
+ const oEntitySet = oMetaModel.getODataEntitySet(entitySet, false) as IEntitySet;
677
+ const oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType, false) as IEntityType;
678
+
679
+ oEntityType.key.propertyRef.forEach((field) => {
680
+ this.ensureSelectionProperty(field.name, aSelects);
681
+ });
682
+ }
683
+
684
+ // push the selection properties to the select array
685
+ private ensureSelectionProperty(sProperty: string, aSelects: string[]) {
686
+ sProperty?.split(",").forEach(function (sElement) {
687
+ if (sElement && !aSelects.includes(sElement)) {
688
+ aSelects.push(sElement);
689
+ }
690
+ });
691
+ }
692
+
693
+ /**
694
+ * Creates a card manifest for a recommended card.
695
+ *
696
+ * This method generates a new card manifest based on the provided input data, version information, and app manifest.
697
+ * It also processes the columns to set attributes or titles for the card content and handles row navigation suppression if required.
698
+ *
699
+ * @param {IManifestCardData} oInput - The input data for the card, including card title, subtitle, columns, and entity set.
700
+ * @param {IVersionInfo} oVersionInfo - The version information, including the version and build timestamp.
701
+ * @param {IAppManifest} manifest - The original app manifest.
702
+ * @param {boolean} [bSuppressRowNavigation] - Optional flag to suppress row navigation actions in the card content.
703
+ * @returns {ICardManifest} The generated card manifest object.
704
+ * @private
705
+ */
706
+ public _createCardManifest(
707
+ oInput: IManifestCardData,
708
+ oVersionInfo: IVersionInfo,
709
+ manifest: IAppManifest,
710
+ bSuppressRowNavigation?: boolean
711
+ ): ICardManifest {
712
+ let oUIManifest = manifest["sap.ui"];
713
+ let oAppManifest = manifest["sap.app"];
714
+ let attributeIndex = 0;
715
+
716
+ if (oAppManifest?.["crossNavigation"]) {
717
+ delete oAppManifest["crossNavigation"];
718
+ }
719
+ if (oAppManifest) {
720
+ Object.assign(oAppManifest, {
721
+ type: "card",
722
+ id: `user.${oInput.id}.${Date.now()}`,
723
+ title: oInput.cardTitle || "",
724
+ subTitle: oInput.subTitle
725
+ });
726
+ }
727
+
728
+ let oNewManifest: ICardManifest = {
729
+ "sap.ui": oUIManifest,
730
+ "sap.app": this.createManifestSapApp(oAppManifest!),
731
+ "sap.card": this.createManifestSapCard(manifest, oInput),
732
+ "sap.ui5": this.createSapui5()
733
+ };
734
+ const oContent = oNewManifest?.["sap.card"]?.content;
735
+
736
+ oInput.columns.slice(0, COLUMN_LENGTH).forEach((column) => {
737
+ const columnValue = this._getAttributeValue(column);
738
+ if (column.identifier && oContent?.item) {
739
+ // If column.identifier is true, set it as the title
740
+ oContent.item.title = { value: columnValue, identifier: true };
741
+ } else if (oContent?.item?.attributes) {
742
+ // Otherwise, add it to the attributes
743
+ oContent.item.attributes[attributeIndex] = {
744
+ value: columnValue,
745
+ visible: true,
746
+ ...(column.state && { state: column.state, showStateIcon: column.showStateIcon })
747
+ };
748
+ attributeIndex++;
749
+ }
750
+ });
751
+
752
+ // if bSuppressRowNavigation true, remove content actions
753
+ if (bSuppressRowNavigation && oContent?.item) {
754
+ oContent.item.actions = [];
755
+ }
756
+
757
+ return {
758
+ ...oNewManifest,
759
+ "sap.insights": {
760
+ parentAppId: oInput.id,
761
+ cardType: "RT",
762
+ versions: {
763
+ ui5: `${oVersionInfo.version}-${oVersionInfo.buildTimestamp}`
764
+ },
765
+ visible: true
766
+ }
767
+ };
768
+ }
769
+
770
+ /**
771
+ * Get Attribute Value
772
+ *
773
+ * @param {object} attributeData - column object
774
+ * @returns {string} returns attribute value
775
+ * @private
776
+ */
777
+ private _getAttributeValue(attributeData: Attribute): string {
778
+ let attributeValue = !attributeData.value.startsWith("{")
779
+ ? "{= extension.formatters.stringFormatter(${" + attributeData.path + "}) }"
780
+ : attributeData.value;
781
+ if (attributeData.type === "Edm.Date" || attributeData.type === "Edm.DateTime") {
782
+ const oDateFormatOptions = JSON.stringify({ pattern: Formatting.getDatePattern("short") });
783
+ attributeValue =
784
+ "{=${" + attributeData.path + "}?format.dateTime(${" + attributeData.path + "}, " + oDateFormatOptions + ") : ''}";
785
+ }
786
+
787
+ return attributeValue;
788
+ }
789
+
790
+ //creates sap.app object structure for the card manifest of recommended card
791
+ private createManifestSapApp(appManifest: ISapApp) {
792
+ const manifestAppData = deepExtend({}, appManifest) as ISapApp;
793
+ if (manifestAppData?.dataSources?.mainService) {
794
+ manifestAppData.dataSources["filterService"] = manifestAppData.dataSources.mainService;
795
+ if (manifestAppData.dataSources["filterService"]?.settings) {
796
+ manifestAppData.dataSources["filterService"].settings["odataVersion"] = "2.0";
797
+ }
798
+ }
799
+
800
+ return manifestAppData;
801
+ }
802
+
803
+ /**
804
+ * Creates the manifest's SAP card object, sap.card based on the input card details.
805
+ *
806
+ * @param {oIAppManifestbject} manifest - The original manifest object of the application.
807
+ * @param {IManifestCardData} oInput - The input object containing card details.
808
+ * @returns {ISapCard} The SAP card configuration object.
809
+ */
810
+ private createManifestSapCard(manifest: IAppManifest, oInput: IManifestCardData): ISapCard {
811
+ const datasource = manifest["sap.app"]?.dataSources;
812
+ const sServiceUrl = datasource?.mainService?.uri;
813
+ const entitySetName = oInput.entitySet;
814
+ const sCountPath = "__count";
815
+ const sText = {
816
+ text: "{= ${" + sCountPath + "} === '0' ? '' : ${" + sCountPath + "} }"
817
+ };
818
+
819
+ let oCardConfig: ISapCard = {
820
+ type: "List"
821
+ };
822
+
823
+ oCardConfig["configuration"] = this.createManifestSapCardConfig(sServiceUrl || "", entitySetName);
824
+ oCardConfig["data"] = this.createManifestSapCardData(sServiceUrl || "", oInput.url);
825
+
826
+ oCardConfig["header"] = {
827
+ title: oInput.cardTitle,
828
+ subTitle: "",
829
+ actions: [],
830
+ status: sText,
831
+ data: {
832
+ path: "/content/d"
833
+ }
834
+ };
835
+
836
+ oCardConfig["extension"] = "module:sap/insights/CardExtension";
837
+ oCardConfig["content"] = {
838
+ data: {
839
+ path: "/content/d/results"
840
+ },
841
+ maxItems: 5,
842
+ item: {
843
+ actions: [],
844
+ attributesLayoutType: "OneColumn",
845
+ attributes: []
846
+ }
847
+ };
848
+
849
+ this.addCardActions(oCardConfig, oInput.semanticObject, oInput.action);
850
+ return oCardConfig;
851
+ }
852
+
853
+ /**
854
+ * Sets the card actions for the given SAP card.
855
+ *
856
+ * @param {object} sapCard - The SAP card object to set the actions on.
857
+ * @param {string} semObj - The semantic object for the navigation target.
858
+ * @param {string} semanticAction - The semantic action for the navigation target.
859
+ */
860
+ private addCardActions(sapCard: ISapCard, semObj: string, semanticAction: string) {
861
+ let oHeaderParams: ICardActionParameters = {
862
+ ibnTarget: {
863
+ semanticObject: semObj,
864
+ action: semanticAction
865
+ },
866
+ sensitiveProps: [],
867
+ ibnParams: {}
868
+ };
869
+
870
+ let oHeaderParameterValue = [
871
+ {
872
+ type: "Navigation",
873
+ parameters: "{= extension.formatters.getNavigationContext(${parameters>/headerState/value})}"
874
+ }
875
+ ];
876
+
877
+ let oContentParams = JSON.parse(JSON.stringify(oHeaderParams)) as ICardActionParameters;
878
+ let oContentParameterValue = [
879
+ {
880
+ type: "Navigation",
881
+ parameters: "{= extension.formatters.getNavigationContext(${parameters>/contentState/value}, ${})}"
882
+ }
883
+ ];
884
+
885
+ if (sapCard.configuration?.parameters) {
886
+ sapCard.configuration.parameters.headerState = {
887
+ value: JSON.stringify(oHeaderParams)
888
+ };
889
+ sapCard.configuration.parameters.contentState = {
890
+ value: JSON.stringify(oContentParams)
891
+ };
892
+ }
893
+ if (sapCard.header) {
894
+ sapCard.header.actions = oHeaderParameterValue;
895
+ }
896
+ if (sapCard?.content?.item) {
897
+ sapCard.content.item.actions = oContentParameterValue;
898
+ }
899
+ }
900
+
901
+ /**
902
+ * Creates the manifest sap card configuration object.
903
+ *
904
+ * @param {string} sServiceUrl - The service URL to be used in the request.
905
+ * @param {string} entitySetName - The name of the entity set.
906
+ * @returns {object} The SAP card configuration object.
907
+ */
908
+ private createManifestSapCardConfig(sServiceUrl: string, entitySetName: string): ISapCardConfig {
909
+ const oCardConfiguration = {
910
+ parameters: {
911
+ _relevantODataFilters: {
912
+ value: []
913
+ },
914
+ _relevantODataParameters: {
915
+ value: []
916
+ },
917
+ _entitySet: {
918
+ value: entitySetName
919
+ },
920
+ _urlSuffix: {
921
+ value: "/Results"
922
+ }
923
+ },
924
+ destinations: {
925
+ service: {
926
+ name: "(default)",
927
+ defaultUrl: "/"
928
+ }
929
+ },
930
+ csrfTokens: {
931
+ token1: {
932
+ data: {
933
+ request: {
934
+ url: "{{destinations.service}}" + sServiceUrl,
935
+ method: "HEAD",
936
+ headers: {
937
+ "X-CSRF-Token": "Fetch"
938
+ }
939
+ }
940
+ }
941
+ }
942
+ }
943
+ };
944
+
945
+ return oCardConfiguration;
946
+ }
947
+
948
+ //create sap.ui5 object for the card manifest
949
+ private createSapui5(): ISapUI5App {
950
+ return {
951
+ _version: "1.1.0",
952
+ contentDensities: { compact: true, cozy: true },
953
+ dependencies: {
954
+ libs: {
955
+ "sap.insights": {
956
+ lazy: false
957
+ }
958
+ }
959
+ }
960
+ };
961
+ }
962
+
963
+ /**
964
+ * Creates the manifest data for an SAP card.
965
+ *
966
+ * @param {string} sServiceUrl - The service URL to be used in the request.
967
+ * @param {string} urlExpand - The URL to expand in the batch request.
968
+ * @returns {IRequestData} The SAP card data object containing the request configuration.
969
+ */
970
+ private createManifestSapCardData(sServiceUrl: string, urlExpand: string): IRequestData {
971
+ const oBatch = {
972
+ content: {
973
+ method: "GET",
974
+ url: urlExpand,
975
+ headers: {
976
+ Accept: "application/json"
977
+ }
978
+ }
979
+ };
980
+ const oSapCardData: IRequestData = {
981
+ request: {
982
+ url: "{{destinations.service}}" + sServiceUrl + "/$batch",
983
+ method: "POST",
984
+ headers: {
985
+ "X-CSRF-Token": "{{csrfTokens.token1}}"
986
+ },
987
+ batch: oBatch
988
+ }
989
+ };
990
+
991
+ return oSapCardData;
992
+ }
993
+
994
+ /**
995
+ * This function returns card details required for the recommended card manifest
996
+ * based on app manifest and annotations
997
+ * @param {object} manifest - The original app manifest
998
+ * @param {object} oInfo - The object containing details of lineitem, entityset, settings etc
999
+ * @param {object} oParentApp - The parent app object
1000
+ * @param {object} oMetaModel - The OData metamodel
1001
+ * @returns {object} The card data object with title, subtitle, url, semanticObject, action, id and column details
1002
+ * @private
1003
+ */
1004
+ public _getManifestCardData(
1005
+ manifest: IAppManifest,
1006
+ oInfo: ILineItemDetails,
1007
+ oParentApp: IAppInfoData,
1008
+ oMetaModel: ODataMetaModel
1009
+ ): IManifestCardData {
1010
+ const manifestApp = manifest["sap.app"];
1011
+ const dataSources = manifestApp?.dataSources;
1012
+
1013
+ const mainServiceUri = dataSources?.mainService?.uri || "";
1014
+
1015
+ const lineItem = oInfo.lineItem as ILineItem[];
1016
+ const entitySet = oInfo.entitySet;
1017
+ const oEntitySet = oMetaModel.getODataEntitySet(entitySet) as IEntitySet;
1018
+ const oEntityType = oMetaModel.getODataEntityType(oEntitySet?.entityType) as IEntityType;
1019
+ const serviceUrl = `${mainServiceUri.replace(/\/$/, "")}/${entitySet}`; // make '{mainServiceUri}/{entitySet}' format
1020
+
1021
+ //get the column details for each of the lineitem columns
1022
+ const aColumns = lineItem
1023
+ ?.map((oColumn) => this._getColumnDetail(entitySet, oMetaModel, oColumn))
1024
+ .filter((oItem) => oItem !== undefined);
1025
+
1026
+ const oSelectExpand = this._getRelevantColumnPaths(aColumns);
1027
+ //get the complete select and expand parameters for url
1028
+ const mParameters = this.getParameters(oInfo, oMetaModel, entitySet, oSelectExpand);
1029
+
1030
+ const urlSelectExpand = this.createCustomParams(mParameters);
1031
+ const finalUrl = urlSelectExpand
1032
+ ? `${serviceUrl}?$top=5&skip=0&${urlSelectExpand}&$inlinecount=allpages`
1033
+ : `${serviceUrl}?$top=5&skip=0`;
1034
+ //sort the column based on their importance and then slice the first 4 columns
1035
+ const aColumnSorted = (sortCollectionByImportance(aColumns) as IColumnData[])
1036
+ .map((column) => {
1037
+ return {
1038
+ path: column?.path,
1039
+ type: column?.type,
1040
+ value: column?.value,
1041
+ identifier: column?.identifier,
1042
+ state: column?.state,
1043
+ showStateIcon: column?.showStateIcon
1044
+ };
1045
+ })
1046
+ .slice(0, 4);
1047
+ return {
1048
+ cardTitle: manifest?.["sap.app"]?.title,
1049
+ subTitle: oEntityType[UIAnnotations.CommonLabel] ? `Top 5 ${oEntityType[UIAnnotations.CommonLabel].String}` : "",
1050
+ url: finalUrl,
1051
+ semanticObject: oParentApp?.semanticObject || "",
1052
+ action: oParentApp?.action || "",
1053
+ id: manifest?.["sap.app"]?.id,
1054
+ columns: aColumnSorted,
1055
+ entitySet: entitySet
1056
+ };
1057
+ }
1058
+
1059
+ /**
1060
+ * This function returns the column detail object for the given column's context
1061
+ * @param {string} entitySet - - The entity set name
1062
+ * @param {object} oMetaModel - OData metamodel
1063
+ * @param {object} lineItemContext - The line item column context object
1064
+ * @returns {object} The column detail containing value, path, importance and type
1065
+ * @private
1066
+ */
1067
+ private _getColumnDetail(entitySet: string, oMetaModel: ODataMetaModel, lineItemContext: ILineItem) {
1068
+ let oProperty;
1069
+ let oEntitySet = oMetaModel.getODataEntitySet(entitySet) as IEntitySet;
1070
+ let oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
1071
+
1072
+ if (lineItemContext.Value?.Path) {
1073
+ oProperty = oMetaModel.getODataProperty(oEntityType, lineItemContext.Value.Path) as UIAnnotationValue;
1074
+ let oPropertyHidden = oProperty[UIAnnotations.UIHidden];
1075
+
1076
+ // if oProperty not hidden and oLineitemContext not hidden then only consider the column else return undefined
1077
+ if (oPropertyHidden?.Bool === "true" || oPropertyHidden?.Bool === true) {
1078
+ return undefined;
1079
+ }
1080
+ //check if lineItemContext is hidden or no oProperty is found
1081
+ if (this.isPropertyHidden(lineItemContext) || !oProperty || Object.keys(oProperty).length === 0) {
1082
+ return undefined;
1083
+ }
1084
+ }
1085
+
1086
+ let oP13NDetails = this.createP13N(oEntitySet, oProperty, lineItemContext, oMetaModel);
1087
+ oP13NDetails = oP13NDetails.replace(/\\/g, ""); // Remove the double backslashes
1088
+ let columnDataObject = oP13NDetails ? (JSON.parse(oP13NDetails) as ColumnObjectData) : {};
1089
+
1090
+ if (!this.isSupportedColumn(columnDataObject, lineItemContext, oMetaModel, oEntitySet)) {
1091
+ return undefined;
1092
+ }
1093
+ if (oProperty) {
1094
+ columnDataObject = this.getColumnObjectDetails(columnDataObject, oProperty, oEntityType, lineItemContext);
1095
+ if (lineItemContext?.[FieldAnnotationsType.Importance] !== undefined) {
1096
+ const importance = lineItemContext[FieldAnnotationsType.Importance];
1097
+ columnDataObject.importance = importance;
1098
+ }
1099
+ }
1100
+
1101
+ return columnDataObject;
1102
+ }
1103
+
1104
+ /**
1105
+ * Retrieves the column object details based on the provided property and entity type.
1106
+ *
1107
+ * @param {object} columnDataObject - The column information object to be populated.
1108
+ * @param {object} propertyDetails - The property object containing metadata about the column.
1109
+ * @param {object} entityType - The entity type object containing metadata about the entity.
1110
+ * @param {object} dataField - The data field object containing the lineitem column context object
1111
+ * @returns {object} The populated column information object.
1112
+ * @private
1113
+ */
1114
+ private getColumnObjectDetails(
1115
+ columnDataObject: ColumnObjectData,
1116
+ propertyDetails: UIAnnotationValue,
1117
+ entityType: IEntityType,
1118
+ dataField: ILineItemContext
1119
+ ) {
1120
+ let sColumnKeyDescription = propertyDetails[UIAnnotations.CommonText]?.Path || "";
1121
+ sColumnKeyDescription = "{" + sColumnKeyDescription + "}";
1122
+ let sColumnValue = propertyDetails.name ? "{" + propertyDetails.name + "}" : "";
1123
+ let sNavigation = "";
1124
+ const aSemKeyAnnotation = entityType[UIAnnotations.CommonSemanticKey];
1125
+ const bIsPropertySemanticKey =
1126
+ !!aSemKeyAnnotation &&
1127
+ aSemKeyAnnotation.some(function (oAnnotation) {
1128
+ return oAnnotation.PropertyPath === propertyDetails.name;
1129
+ });
1130
+ let bIsCriticality: boolean = false;
1131
+ let criticalityAnnotation = undefined;
1132
+
1133
+ if ((dataField?.Criticality && dataField?.Value?.Path) === propertyDetails.name) {
1134
+ criticalityAnnotation = dataField;
1135
+ bIsCriticality = true;
1136
+ }
1137
+
1138
+ if (propertyDetails[UIAnnotations.MeasuresISOCurrency]?.Path) {
1139
+ sColumnValue = sColumnValue.concat(" " + "{" + sNavigation + propertyDetails[UIAnnotations.MeasuresISOCurrency]?.Path + "}");
1140
+ }
1141
+ if (propertyDetails[UIAnnotations.MeasuresUnit]?.Path) {
1142
+ sColumnValue = sColumnValue.concat(" " + "{" + sNavigation + propertyDetails[UIAnnotations.MeasuresUnit]?.Path + "}");
1143
+ }
1144
+ if (propertyDetails[UIAnnotations.CommonText]?.Path) {
1145
+ let sTextArragement = propertyDetails[UIAnnotations.CommonText]?.[UIAnnotations.UITextArrangement];
1146
+ if (!sTextArragement) {
1147
+ sTextArragement = entityType[UIAnnotations.UITextArrangement];
1148
+ }
1149
+ this._setColumnTextValue(sTextArragement, columnDataObject, sColumnKeyDescription, sColumnValue);
1150
+ } else {
1151
+ columnDataObject["value"] = sColumnValue;
1152
+ if (bIsPropertySemanticKey) {
1153
+ columnDataObject["identifier"] = bIsPropertySemanticKey;
1154
+ }
1155
+ }
1156
+ if (bIsCriticality) {
1157
+ columnDataObject["state"] = this.buildExpressionForCriticalityColor(criticalityAnnotation);
1158
+ columnDataObject["showStateIcon"] =
1159
+ criticalityAnnotation?.CriticalityRepresentation?.EnumMember !==
1160
+ FieldAnnotationsType.CriticalityRepresentationTypeWithoutIcon || true;
1161
+ }
1162
+ columnDataObject["path"] = propertyDetails[UIAnnotations.CommonText]?.Path || propertyDetails.name;
1163
+ columnDataObject["type"] = propertyDetails.type;
1164
+ return columnDataObject;
1165
+ }
1166
+
1167
+ /**
1168
+ * Build expression for the criticality annotation, kept same as the one used in LROP
1169
+ * @param {object} criticalityAnnotation - The criticality annotation object
1170
+ * @returns {string} The expression for the criticality color
1171
+ * @private
1172
+ */
1173
+ private buildExpressionForCriticalityColor(criticalityAnnotation?: ILineItemContext) {
1174
+ let sFormatCriticalityExpression: CoreLib.ValueState | string = ValueState.None;
1175
+ let sExpressionTemplate;
1176
+ let oCriticalityProperty = criticalityAnnotation?.Criticality;
1177
+ enum CriticalityType {
1178
+ Negative = "com.sap.vocabularies.UI.v1.CriticalityType/Negative",
1179
+ Critical = "com.sap.vocabularies.UI.v1.CriticalityType/Critical",
1180
+ Positive = "com.sap.vocabularies.UI.v1.CriticalityType/Positive"
1181
+ }
1182
+ if (oCriticalityProperty) {
1183
+ sExpressionTemplate =
1184
+ "'{'= ({0} === ''" +
1185
+ CriticalityType.Negative +
1186
+ "'') || ({0} === ''1'') || ({0} === 1) ? ''" +
1187
+ ValueState.Error +
1188
+ "'' : " +
1189
+ "({0} === ''" +
1190
+ CriticalityType.Critical +
1191
+ "'') || ({0} === ''2'') || ({0} === 2) ? ''" +
1192
+ ValueState.Warning +
1193
+ "'' : " +
1194
+ "({0} === ''" +
1195
+ CriticalityType.Positive +
1196
+ "'') || ({0} === ''3'') || ({0} === 3) ? ''" +
1197
+ ValueState.Success +
1198
+ "'' : " +
1199
+ "''" +
1200
+ ValueState.None +
1201
+ "'' '}'";
1202
+ if (oCriticalityProperty?.Path) {
1203
+ const sCriticalitySimplePath = "${" + oCriticalityProperty.Path + "}";
1204
+ sFormatCriticalityExpression = formatMessage(sExpressionTemplate, [sCriticalitySimplePath]);
1205
+ } else if (oCriticalityProperty?.EnumMember) {
1206
+ const sCriticality = "'" + oCriticalityProperty.EnumMember + "'";
1207
+ sFormatCriticalityExpression = formatMessage(sExpressionTemplate, [sCriticality]);
1208
+ } else {
1209
+ Log.warning("Case not supported, returning the default sap.ui.core.ValueState.None");
1210
+ }
1211
+ } else {
1212
+ // Any other cases are not valid, the default value of 'None' will be returned
1213
+ Log.warning("Case not supported, returning the default sap.ui.core.ValueState.None");
1214
+ }
1215
+
1216
+ return sFormatCriticalityExpression;
1217
+ }
1218
+
1219
+ /**
1220
+ * Sets display text format of column
1221
+ *
1222
+ * @private
1223
+ * @param {{EnumMember: string} | undefined} sTextArragement - sTextArragement object
1224
+ * @param { ColumnObjectData} columnDataObject - Object containing column details
1225
+ * @param {string} sColumnKeyDescription - Description field to include in text value
1226
+ * @param {string} sColumnValue - The value to include in Text value
1227
+ */
1228
+ private _setColumnTextValue(
1229
+ sTextArragement: { EnumMember: string } | undefined,
1230
+ columnDataObject: ColumnObjectData,
1231
+ sColumnKeyDescription: string,
1232
+ sColumnValue: string
1233
+ ) {
1234
+ enum TextArrangementType {
1235
+ TextOnly = "TextOnly",
1236
+ TextLast = "TextLast",
1237
+ TextSeparate = "TextSeparate"
1238
+ }
1239
+ const sTextArrangementType = sTextArragement?.EnumMember?.split("/")[1];
1240
+ let valueExpr;
1241
+
1242
+ switch (sTextArrangementType) {
1243
+ case TextArrangementType.TextOnly:
1244
+ valueExpr = `{= $${sColumnKeyDescription} === '' ? '' : $${sColumnKeyDescription} }`;
1245
+ break;
1246
+
1247
+ case TextArrangementType.TextLast:
1248
+ valueExpr =
1249
+ `{= $${sColumnValue} === '' ? '' : $${sColumnValue} }` +
1250
+ `{= $${sColumnKeyDescription} === '' ? '' : ' (' + ($${sColumnKeyDescription}) + ')' }`;
1251
+ break;
1252
+
1253
+ case TextArrangementType.TextSeparate:
1254
+ valueExpr = `{= $${sColumnValue} === '' ? '' : $${sColumnValue} }`;
1255
+ break;
1256
+
1257
+ default:
1258
+ valueExpr =
1259
+ `{= $${sColumnKeyDescription} === '' ? '' : $${sColumnKeyDescription} }` +
1260
+ `{= $${sColumnValue} === '' ? '' : ' (' + ($${sColumnValue}) + ')' }`;
1261
+ break;
1262
+ }
1263
+ columnDataObject["value"] = valueExpr;
1264
+ }
1265
+
1266
+ // get requestAtlLeastFields from PresentationVariant
1267
+ private _getRequestAtLeastFields(presentationVariant: IPresentationVariant): string[] | RequestAtleastFieldType[] | [] {
1268
+ return presentationVariant && Array.isArray(presentationVariant.requestAtLeastFields)
1269
+ ? presentationVariant.requestAtLeastFields
1270
+ : [];
1271
+ }
1272
+
1273
+ /**
1274
+ * Creates a query string with custom parameters for OData requests.
1275
+ *
1276
+ * This method generates a query string containing `$expand` and `$select` parameters
1277
+ * based on the provided input object. The values are URL-encoded to ensure proper formatting.
1278
+ *
1279
+ * @param {object} mParameters - An object containing the parameters for the query string.
1280
+ * @param {string | undefined} mParameters.expand - The value for the `$expand` parameter, if any.
1281
+ * @param {string | undefined} mParameters.select - The value for the `$select` parameter, if any.
1282
+ * @returns {string} A query string containing the `$expand` and `$select` parameters, joined by `&`.
1283
+ * @private
1284
+ */
1285
+ private createCustomParams(mParameters: SelectExpandDetail): string {
1286
+ const aCustomParams = [];
1287
+ if (mParameters?.expand) {
1288
+ aCustomParams.push("$expand=" + encodeURL(mParameters["expand"]));
1289
+ }
1290
+ if (mParameters?.select) {
1291
+ aCustomParams.push("$select=" + encodeURL(mParameters["select"]));
1292
+ }
1293
+ return aCustomParams.join("&");
1294
+ }
1295
+
1296
+ /**
1297
+ * Retrieves an object from the OData meta model based on the given entity type and path.
1298
+ *
1299
+ * This method resolves the provided path to an absolute path if it is relative, using the entity type as the base.
1300
+ * It then retrieves the corresponding object from the meta model. Any "@" characters in the path are removed
1301
+ * to match the meta model's structure.
1302
+ *
1303
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
1304
+ * @param {string} entityTypeName - The entity type used as the base for resolving relative paths.
1305
+ * @param {string} path - The path to the object in the meta model. Can be relative or absolute.
1306
+ * @returns {IPresentationVariant | ILineItem[]} The object retrieved from the meta model, which can be a presentation variant or an array of nested objects.
1307
+ * @private
1308
+ */
1309
+ private getObject<T extends IPresentationVariant | ILineItem[]>(metaModel: ODataMetaModel, entityTypeName: string, path: string): T {
1310
+ if (path[0] !== "/") {
1311
+ // relative path - add path of annotation target, i.e. EntityType
1312
+ path = (metaModel.getODataEntityType(entityTypeName, true) as string) + "/" + path; //*****check this */
1313
+ }
1314
+ // assumption: absolute paths in annotations are equal to corresponding paths in metaModel
1315
+ // any "@" are removed in the metaModel
1316
+ return metaModel.getObject(path.replace(/@/g, "")) as T;
1317
+ }
1318
+
1319
+ /**
1320
+ * Check If Page is List Report
1321
+ *
1322
+ * @param {object} page - page object
1323
+ * @returns {boolean} returns boolean
1324
+ * @private
1325
+ */
1326
+ public _isListReport(page?: IPageType): boolean {
1327
+ return page?.component?.name === "sap.suite.ui.generic.template.ListReport";
1328
+ }
1329
+
1330
+ /**
1331
+ * @param {IPageType[] | PageRecord} pages - pages object from manifest
1332
+ * @returns {ILrSettings} - returns the settings object for the ListReport
1333
+ */
1334
+ private getSettingsForPage(pages: IPageType[] | undefined | PageRecord): ILrSettings {
1335
+ if (!pages) {
1336
+ return {};
1337
+ }
1338
+
1339
+ let lrSettings: ILrSettings = {};
1340
+
1341
+ // Handling array and object structure in LR V2 manifest
1342
+ if (Array.isArray(pages) && this._isListReport(pages[0])) {
1343
+ const listPage = pages[0];
1344
+ if (listPage?.component) {
1345
+ const component = listPage.component;
1346
+ lrSettings = component?.settings || {};
1347
+ lrSettings.bSupressCardRowNavigation = this.shouldSuppressCardRowNavigation(listPage);
1348
+ }
1349
+ } else if (Object.keys(pages).length) {
1350
+ const sListKey = Object.keys(pages).find((key) => this._isListReport((pages as PageRecord)[key] as IPageType));
1351
+ if (sListKey) {
1352
+ const listPage = (pages as PageRecord)[sListKey] as IPageType;
1353
+
1354
+ if (listPage?.component) {
1355
+ const component = listPage.component;
1356
+ lrSettings = (component?.settings ?? {}) as ILrSettings;
1357
+ lrSettings.bSupressCardRowNavigation = this.shouldSuppressCardRowNavigation(listPage);
1358
+ }
1359
+ }
1360
+ }
1361
+
1362
+ return lrSettings;
1363
+ }
1364
+
1365
+ /**
1366
+ * Determines whether card row navigation should be suppressed for the card
1367
+ *
1368
+ * @param {IPageType} page - The ListReport page object from the manifest.
1369
+ * @returns {boolean} True if card row navigation should be suppressed
1370
+ */
1371
+ private shouldSuppressCardRowNavigation(listPage: IPageType): boolean {
1372
+ // LR only app or if external navigation from OP
1373
+ if (listPage.pages) {
1374
+ // If pages is an array, handle based on its length and navigation property
1375
+ if (Array.isArray(listPage.pages)) {
1376
+ if (listPage.pages.length === 0 || listPage.pages[0]?.navigation) {
1377
+ return true;
1378
+ }
1379
+ } else {
1380
+ // If pages is an object, check if the object keys have navigation
1381
+ const keys = Object.keys(listPage.pages);
1382
+ if (keys.length === 0 || (keys.length && (listPage.pages[keys[0]] as IPageType)?.navigation)) {
1383
+ return true;
1384
+ }
1385
+ }
1386
+ } else {
1387
+ //if no list pages return true
1388
+ return true;
1389
+ }
1390
+
1391
+ // Check for Quick variant selection X in settings
1392
+ if (listPage?.component?.settings?.quickVariantSelectionX) {
1393
+ return true;
1394
+ }
1395
+
1396
+ return false;
1397
+ }
1398
+
1399
+ /**
1400
+ * @param {object} metaModel - metamodel object
1401
+ * @param {ILrSettings} ILrSettings - settings object from the manifest
1402
+ * @param {string} entitySetName - entity set of the application
1403
+ * @returns {object} - returns the normalized table settings
1404
+ * @private
1405
+ */
1406
+ private getNormalizedTableSettings(
1407
+ metaModel: ODataMetaModel,
1408
+ lRVariantSettings: ILrSettings | IVariantSetting,
1409
+ entitySetName: string
1410
+ ): ITableSettings {
1411
+ const settings = deepExtend({}, lRVariantSettings) as ILrSettings;
1412
+
1413
+ // 1. map boolean settings gridTable and treeTable to tableType
1414
+ if (settings && !settings.tableType) {
1415
+ if (settings.gridTable) {
1416
+ settings.tableType = TABLE_TYPES.GRID;
1417
+ } else if (settings.treeTable) {
1418
+ settings.tableType = TABLE_TYPES.TREE;
1419
+ }
1420
+ }
1421
+
1422
+ // 2. map flat settings to structured ones
1423
+ settings.tableSettings = settings.tableSettings || {};
1424
+ settings.tableSettings.type = settings.tableSettings.type || settings.tableType;
1425
+
1426
+ const entitySet = metaModel.getODataEntitySet(entitySetName) as IEntitySet;
1427
+ const entityTypeData = metaModel.getODataEntityType(entitySet.entityType) as IEntityType;
1428
+
1429
+ // 3. determine type
1430
+ if (
1431
+ settings.tableSettings.type !== TABLE_TYPES.STANDARD_LIST &&
1432
+ settings.tableSettings.type !== TABLE_TYPES.OBJECT_LIST &&
1433
+ entitySetName
1434
+ ) {
1435
+ settings.tableSettings.type =
1436
+ settings.tableSettings.type ||
1437
+ (entityTypeData[UIAnnotations.SapSemantics] === "aggregate" ? TABLE_TYPES.ANALYTICAL : TABLE_TYPES.RESPONSIVE);
1438
+ if (settings.tableSettings.type === TABLE_TYPES.ANALYTICAL && !(entityTypeData[UIAnnotations.SapSemantics] === "aggregate")) {
1439
+ settings.tableSettings.type = TABLE_TYPES.GRID;
1440
+ }
1441
+ }
1442
+
1443
+ if (entityTypeData[UIAnnotations.UIHeaderInfo]) {
1444
+ settings.tableSettings.headerInfo = entityTypeData[UIAnnotations.UIHeaderInfo];
1445
+ }
1446
+
1447
+ // 4. remove deprecated settings (to avoid new code to rely on them)
1448
+ delete settings.gridTable;
1449
+ delete settings.treeTable;
1450
+ delete settings.tableType;
1451
+
1452
+ return settings.tableSettings;
1453
+ }
1454
+
1455
+ /**
1456
+ * @param {object} metaModel - metamodel object
1457
+ * @param {string} entitySetName - entity set of the application
1458
+ * @param {object} tabItem - details of the variant tab
1459
+ * @returns {boolean} - returns true if the variant is a smart chart
1460
+ */
1461
+ private checkIfSmartChart(metaModel: ODataMetaModel, entitySetName: string, tabItem: IVariantSetting): boolean {
1462
+ let entitySetData = metaModel.getODataEntitySet(entitySetName) as IEntitySet;
1463
+ let entityTypeData = metaModel.getODataEntityType(entitySetData.entityType) as IEntityType;
1464
+ let annotationName, annotationPath, variantData;
1465
+ annotationPath = tabItem.annotationPath;
1466
+ //variantData = !!annotationPath && (entityTypeData[annotationPath] as VariantInfo);
1467
+ variantData = annotationPath ? (entityTypeData[annotationPath] as VariantInfo) : undefined;
1468
+
1469
+ if (variantData?.PresentationVariant) {
1470
+ // oVariant is SelectionPresentationVariant
1471
+ if (variantData.PresentationVariant.Visualizations) {
1472
+ annotationName = variantData.PresentationVariant.Visualizations[0].AnnotationPath;
1473
+ } else if (variantData.PresentationVariant.Path) {
1474
+ let sPresentationVariantPath = variantData.PresentationVariant.Path.split("@")[1];
1475
+ let oPresentationVariantAnnotation =
1476
+ sPresentationVariantPath && (entityTypeData[sPresentationVariantPath] as IPresentationVariant);
1477
+ annotationName = oPresentationVariantAnnotation ? oPresentationVariantAnnotation?.Visualizations?.[0].AnnotationPath : "";
1478
+ }
1479
+ } else if (variantData?.Visualizations) {
1480
+ // oVariant is PresentationVariant
1481
+ annotationName = variantData.Visualizations[0].AnnotationPath;
1482
+ }
1483
+
1484
+ return !!((annotationName ?? "").indexOf(UIAnnotations.UIChart) > -1);
1485
+ }
1486
+
1487
+ /**
1488
+ * function returns true if the passed entityset / properties have mandatory properties
1489
+ *
1490
+ * @param {EntitySet} entitySetData - Entity set
1491
+ * @param {Array} propertiesSet - Additional Properties
1492
+ * @returns {boolean} returns boolean
1493
+ * @private
1494
+ */
1495
+ public hasMandatoryProperties(entitySetData?: IEntitySet, propertiesSet?: Property[]): boolean {
1496
+ // if entityset has required properties in filter restrictions return true
1497
+ if (entitySetData?.["Org.OData.Capabilities.V1.FilterRestrictions"]?.["RequiredProperties"]?.length) {
1498
+ return true;
1499
+ } else if (propertiesSet?.length) {
1500
+ // iterate through all properties and return true if any property is mandatory or sap:rquired-in-filter is true
1501
+ return propertiesSet.some((propertyDetail: Record<string, string> | Property) => {
1502
+ return (
1503
+ Object.keys(propertyDetail).length &&
1504
+ ((propertyDetail as UIAnnotationValue)["sap:parameter"] === "mandatory" ||
1505
+ (propertyDetail as UIAnnotationValue)["sap:required-in-filter"] === "true")
1506
+ );
1507
+ });
1508
+ }
1509
+
1510
+ return false;
1511
+ }
1512
+
1513
+ /**
1514
+ * Check if sEntitySet has association with parameterised entityset and if it has give parametersised entityset parameters
1515
+ * @param {object} metaModel OData MetaModel
1516
+ * @param {string} entitySetName of the EntitySet which has Parameter Entityset in association.
1517
+ * @param {boolean} infoParamsRequired If the full info of parameters is needed or only the name of params is needed.
1518
+ * @return {ParameterisedEntity} Contains name of Parameter EntitySet, keys of Parameter EntitySet and Name of Navigation property.
1519
+ * @private
1520
+ */
1521
+ public _getParametersisedEntitySetParams(
1522
+ metaModel: ODataMetaModel,
1523
+ entitySetName: string,
1524
+ infoParamsRequired: boolean
1525
+ ): ParameterisedEntity {
1526
+ if (!metaModel) {
1527
+ throw new Error("OData Model needs to be passed as an argument");
1528
+ }
1529
+ const oResult: ParameterisedEntity = { entitySetName: null, parameters: [], navPropertyName: null };
1530
+ const entitySetData = metaModel.getODataEntitySet(entitySetName) as IEntitySet;
1531
+ const entityTypeData = metaModel.getODataEntityType(entitySetData.entityType) as IEntityType;
1532
+ const aNavigationProperties = entityTypeData.navigationProperty;
1533
+
1534
+ if (!aNavigationProperties) {
1535
+ return oResult;
1536
+ }
1537
+
1538
+ // filter the parameter entityset for extracting it's key and it's entityset name
1539
+ aNavigationProperties.forEach(function (oNavProperty) {
1540
+ const oNavigationEntitySet = metaModel.getODataAssociationEnd(entityTypeData, oNavProperty.name);
1541
+ const oNavigationEntityType = oNavigationEntitySet && (metaModel.getODataEntityType(oNavigationEntitySet.type) as IEntityType);
1542
+
1543
+ if (oNavigationEntityType?.[UIAnnotations.SapSemantics] !== "parameters" || !oNavigationEntityType.key) {
1544
+ return false;
1545
+ }
1546
+
1547
+ oResult.entitySetName = metaModel.getODataAssociationSetEnd(entityTypeData, oNavProperty.name)?.entitySet;
1548
+ for (let value of oNavigationEntityType.key.propertyRef) {
1549
+ if (infoParamsRequired) {
1550
+ const navProp = oNavigationEntityType.property as Property[];
1551
+ for (let navProperty of navProp) {
1552
+ if (navProperty.name === value.name) {
1553
+ oResult.parameters.push(navProperty);
1554
+ }
1555
+ }
1556
+ } else {
1557
+ oResult.parameters.push(value.name);
1558
+ }
1559
+ }
1560
+
1561
+ const aSubNavigationProperties = oNavigationEntityType.navigationProperty;
1562
+ // Parameter entityset must have association back to main entityset.
1563
+ const bBackAssociationPresent = aSubNavigationProperties?.some(function (oSubNavigationProperty) {
1564
+ const sSubNavigationEntityType = metaModel.getODataAssociationEnd(
1565
+ oNavigationEntityType,
1566
+ oSubNavigationProperty?.name
1567
+ )?.type;
1568
+ //if entityset.entitytype is same as subnavigation entitytype then it's a back association
1569
+ oResult.navPropertyName = sSubNavigationEntityType === entitySetData.entityType ? oSubNavigationProperty?.name : null;
1570
+ return oResult.navPropertyName;
1571
+ });
1572
+
1573
+ return bBackAssociationPresent && oResult.navPropertyName && oResult.entitySetName;
1574
+ });
1575
+ return oResult;
1576
+ }
1577
+
1578
+ /**
1579
+ * This function check if a lineitem annotation column is visible or not
1580
+ * @param {object} lineItemAnnotations - The column details object
1581
+ * @returns {Boolean} The column visibility status {true/false}
1582
+ * @private
1583
+ */
1584
+ private isPropertyHidden(lineItemAnnotations: ILineItemContext): boolean {
1585
+ let oFieldControl = lineItemAnnotations[UIAnnotations.CommonFieldControl];
1586
+ let uiHidden = lineItemAnnotations[UIAnnotations.UIHidden];
1587
+
1588
+ // Check for FieldControl Hidden
1589
+ if (oFieldControl?.EnumMember === FieldAnnotationsType.FieldControlHiddenType) {
1590
+ return true;
1591
+ }
1592
+
1593
+ // Check for UI Hidden
1594
+ if (uiHidden) {
1595
+ if (Object.prototype.hasOwnProperty.call(uiHidden, "Bool")) {
1596
+ return uiHidden?.Bool === "true";
1597
+ } else if (Object.prototype.hasOwnProperty.call(uiHidden, "Path")) {
1598
+ return false;
1599
+ } else {
1600
+ return true; // <Annotation Term="UI.Hidden"/>
1601
+ }
1602
+ }
1603
+
1604
+ return false;
1605
+ }
1606
+
1607
+ /**
1608
+ * Creates a P13N string for a given entity set, property, and line item column.
1609
+ *
1610
+ * @param {Object} contextSet - The entity set object.
1611
+ * @param {Object} contextProp - The property details from metadata.
1612
+ * @param {Object} columnDataField - The line item column data field.
1613
+ * @param {Object} metaModel - The metadata model object.
1614
+ * @returns {string} The P13N string for the specified entity set and property.
1615
+ * @private
1616
+ */
1617
+ private createP13N(
1618
+ contextSet: IEntitySet,
1619
+ contextProp?: Property | UIAnnotationValue,
1620
+ columnDataField?: ILineItemContext,
1621
+ metaModel?: ODataMetaModel
1622
+ ): string {
1623
+ let p13nDetails: string = "";
1624
+ let additionalProperties: string[] = [];
1625
+ let navigationPath: string = "";
1626
+ let recordType = columnDataField?.RecordType;
1627
+ let dataFieldValue = columnDataField?.Value as ExtendedLineItemContextValue;
1628
+ let valuePath: string = dataFieldValue?.Path || "";
1629
+
1630
+ if (
1631
+ recordType === FieldAnnotationsType.DataField ||
1632
+ recordType === FieldAnnotationsType.DataFieldForAnnotation ||
1633
+ recordType === FieldAnnotationsType.DataFieldWithUrl
1634
+ ) {
1635
+ if (valuePath) {
1636
+ let columnKey = this.createP13NColumnKey(columnDataField as ILineItemContext);
1637
+ p13nDetails = '\\{"columnKey":"' + columnKey + '", "leadingProperty":"' + valuePath;
1638
+ navigationPath = this.getNavigationPrefixPath(metaModel as ODataMetaModel, contextSet, valuePath);
1639
+ } else if (dataFieldValue?.Apply?.Name === "odata.concat") {
1640
+ dataFieldValue?.Apply?.Parameters.forEach(function (parameterDetails) {
1641
+ if (parameterDetails.Type === "Path") {
1642
+ if (!p13nDetails) {
1643
+ p13nDetails = '\\{"columnKey":"' + parameterDetails?.Value + '", "leadingProperty":"' + parameterDetails?.Value;
1644
+ } else {
1645
+ additionalProperties.push(parameterDetails.Value);
1646
+ }
1647
+ }
1648
+ });
1649
+ }
1650
+ // Append type information and additional properties
1651
+ p13nDetails += this.processAdditionalProperties(
1652
+ contextProp as UIAnnotationValue,
1653
+ columnDataField as ILineItemContext,
1654
+ navigationPath,
1655
+ additionalProperties
1656
+ );
1657
+ if (recordType === FieldAnnotationsType.DataFieldWithUrl && columnDataField?.Url) {
1658
+ this.processDataFieldWithUrl(columnDataField, additionalProperties);
1659
+ }
1660
+ if (p13nDetails && additionalProperties.length) {
1661
+ p13nDetails += '", "additionalProperty":"' + additionalProperties.join();
1662
+ }
1663
+ if (p13nDetails) {
1664
+ p13nDetails += '"\\}';
1665
+ }
1666
+ }
1667
+ return p13nDetails;
1668
+ }
1669
+
1670
+ //process DataFieldUrl properties and add them to additionalProperties
1671
+ private processDataFieldWithUrl(columnDataField: ILineItemContext, additionalProperties: string[]): void {
1672
+ const oDataFieldUrl = columnDataField.Url;
1673
+ if (oDataFieldUrl?.Apply?.Parameters) {
1674
+ oDataFieldUrl.Apply.Parameters.forEach((oParameter) => {
1675
+ if (oParameter.Type === "LabeledElement" && oParameter.Value?.Path) {
1676
+ additionalProperties.push(oParameter.Value.Path);
1677
+ }
1678
+ });
1679
+ }
1680
+ if (oDataFieldUrl?.Path) {
1681
+ additionalProperties.push(oDataFieldUrl.Path);
1682
+ }
1683
+ }
1684
+
1685
+ /**
1686
+ * Creates a personalized column key based on the provided data field.
1687
+ * @param {Object} oDataField - The data field object containing metadata for generating the column key.
1688
+ * @returns {string} The generated column key based on the data field.
1689
+ */
1690
+ private createP13NColumnKey(dataFieldColumn: ILineItemContext): string {
1691
+ let columnKeyName = "",
1692
+ fioriTemplatePrefix = "template",
1693
+ seperatorNotation = "::";
1694
+ let recordType = dataFieldColumn.RecordType;
1695
+ let dataFieldValue = dataFieldColumn?.Value;
1696
+ let dataFieldSemanticObject = dataFieldColumn.SemanticObject?.String || "";
1697
+ let dataFieldActionString = dataFieldColumn.Action?.String || "";
1698
+ let dataFieldPath = dataFieldValue?.Path || "";
1699
+ let annotationPath: string | undefined = "",
1700
+ isRelevantAnnotation = null;
1701
+ let buildKey = function (parts: string[]) {
1702
+ return fioriTemplatePrefix + seperatorNotation + parts.join(seperatorNotation);
1703
+ };
1704
+
1705
+ switch (recordType) {
1706
+ case FieldAnnotationsType.DataField:
1707
+ columnKeyName = dataFieldPath;
1708
+ break;
1709
+
1710
+ case FieldAnnotationsType.DataFieldWithIntentBasedNavigation:
1711
+ columnKeyName = buildKey([
1712
+ FieldTypes.DataFieldWithIntentBasedNavigation,
1713
+ dataFieldSemanticObject,
1714
+ dataFieldActionString,
1715
+ dataFieldPath
1716
+ ]);
1717
+ break;
1718
+
1719
+ case FieldAnnotationsType.DataFieldWithNavigationPath:
1720
+ columnKeyName = buildKey([FieldTypes.DataFieldWithNavigationPath, dataFieldPath]);
1721
+ break;
1722
+
1723
+ case FieldAnnotationsType.DataFieldForIntentBasedNavigation:
1724
+ columnKeyName = buildKey([FieldTypes.DataFieldForIntentBasedNavigation, dataFieldSemanticObject, dataFieldActionString]);
1725
+ break;
1726
+
1727
+ case FieldAnnotationsType.DataFieldForAction:
1728
+ columnKeyName = buildKey([FieldTypes.DataFieldForAction, dataFieldActionString]);
1729
+ break;
1730
+
1731
+ case FieldAnnotationsType.DataFieldForAnnotation:
1732
+ annotationPath = dataFieldColumn.Target?.AnnotationPath;
1733
+
1734
+ isRelevantAnnotation =
1735
+ annotationPath &&
1736
+ (annotationPath.indexOf(FieldAnnotationsType.Contact) >= 0 ||
1737
+ annotationPath.indexOf(FieldAnnotationsType.DataPoint) >= 0 ||
1738
+ annotationPath.indexOf(FieldAnnotationsType.FieldGroup) >= 0 ||
1739
+ annotationPath.indexOf(FieldAnnotationsType.Chart) >= 0);
1740
+ if (isRelevantAnnotation) {
1741
+ columnKeyName = buildKey([FieldTypes.DataFieldForAnnotation, annotationPath as string]);
1742
+ //since DataFieldForAnnotation can contain an @ and this is not working with SmartTable.prototype._addTablePersonalisationToToolbar, it is removed
1743
+ columnKeyName = columnKeyName.replace("@", "");
1744
+ }
1745
+ break;
1746
+
1747
+ default:
1748
+ // Handle cases where the RecordType does not match any of the known types
1749
+ columnKeyName = "";
1750
+ break;
1751
+ }
1752
+
1753
+ return columnKeyName;
1754
+ }
1755
+
1756
+ /**
1757
+ * Retrieves the navigation prefix path for a given entity type and value path.
1758
+ *
1759
+ * @param {object} oMetaModel - The meta model object.
1760
+ * @param {object} oContextSet - The context set object containing the entity type.
1761
+ * @param {string} sPath - The value path for which the navigation prefix is needed.
1762
+ * @returns {string} The navigation prefix path.
1763
+ */
1764
+ private getNavigationPrefixPath(oMetaModel: ODataMetaModel, oContextSet: IEntitySet, sPath: string): string {
1765
+ let sNavigation = "";
1766
+ if (oMetaModel) {
1767
+ let oEntityType = oMetaModel.getODataEntityType(oContextSet.entityType) as IEntityType;
1768
+ if (oEntityType) {
1769
+ sNavigation = this._getNavigationPrefix(oMetaModel, oEntityType, sPath);
1770
+ if (sNavigation) {
1771
+ sNavigation += "/";
1772
+ }
1773
+ }
1774
+ }
1775
+
1776
+ return sNavigation;
1777
+ }
1778
+
1779
+ /**
1780
+ * Retrieves the navigation prefix for a given property within an entity type.
1781
+ * @param {Object} metaModel - The metadata model object.
1782
+ * @param {Object} entityTypeData - The entity type object.
1783
+ * @param {string} propertyName - The property path for which the navigation prefix is to be determined.
1784
+ * @returns {string} The navigation prefix for the specified property.
1785
+ */
1786
+ private _getNavigationPrefix(metaModel: ODataMetaModel, entityTypeData: IEntityType, propertyName: string): string {
1787
+ let expandName = "";
1788
+ let propertyParts = propertyName.split("/");
1789
+
1790
+ if (propertyParts.length > 1) {
1791
+ for (let i = 0; i < propertyParts.length - 1; i++) {
1792
+ let associationEndData = metaModel.getODataAssociationEnd(entityTypeData, propertyParts[i]);
1793
+ if (!associationEndData) {
1794
+ return expandName;
1795
+ }
1796
+ if (associationEndData) {
1797
+ entityTypeData = metaModel.getODataEntityType(associationEndData.type) as IEntityType;
1798
+ expandName += (expandName ? "/" : "") + propertyParts[i];
1799
+ }
1800
+ }
1801
+ }
1802
+
1803
+ return expandName;
1804
+ }
1805
+
1806
+ /**
1807
+ * Processes additional properties for a given context property and data field.
1808
+ *
1809
+ * This method analyzes the provided context property and data field to extract additional properties
1810
+ * such as criticality, text annotations, unit annotations, and field control paths. It also determines
1811
+ * the type of the property (e.g., date, string) and appends this information to the P13N string.
1812
+ *
1813
+ * @param {UIAnnotationValue} oContextProp - The context property object containing metadata about the property.
1814
+ * @param {ILineItemContext} oDataField - The data field object containing line item metadata.
1815
+ * @param {string} sNavigationPath - The navigation path to be prefixed to certain properties.
1816
+ * @param {string[]} aAdditionalProperties - An array to which additional property paths will be added.
1817
+ * @returns {string} A P13N string containing additional property details such as type and unit.
1818
+ * @private
1819
+ */
1820
+ private processAdditionalProperties(
1821
+ oContextProp: UIAnnotationValue,
1822
+ oDataField: ILineItemContext,
1823
+ sNavigationPath: string,
1824
+ aAdditionalProperties: string[]
1825
+ ): string {
1826
+ let additionalP13N = "";
1827
+
1828
+ // Check for DateTime type with specific display format
1829
+ if (oContextProp?.type === "Edm.DateTime" && oContextProp?.["sap:display-format"] === "Date") {
1830
+ additionalP13N += '", "type":"date';
1831
+ } else if (oContextProp?.type === "Edm.String") {
1832
+ additionalP13N += '", "type":"string';
1833
+ }
1834
+
1835
+ // Add Criticality property if available
1836
+ if (oDataField?.Criticality?.Path) {
1837
+ aAdditionalProperties.push(oDataField?.Criticality.Path);
1838
+ }
1839
+ let oContextCommonText = oContextProp?.[UIAnnotations.CommonText];
1840
+
1841
+ // Add Text annotation property if available
1842
+ if (oContextCommonText?.Path) {
1843
+ aAdditionalProperties.push(sNavigationPath + oContextCommonText?.Path);
1844
+ }
1845
+
1846
+ // Add Unit annotation property if available
1847
+ const oUnitAnnotation = oContextProp
1848
+ ? oContextProp[UIAnnotations.MeasuresISOCurrency] || oContextProp[UIAnnotations.MeasuresUnit]
1849
+ : null;
1850
+ if (oUnitAnnotation?.Path) {
1851
+ aAdditionalProperties.push(oUnitAnnotation.Path);
1852
+ additionalP13N += '", "unit":"' + oUnitAnnotation.Path;
1853
+ }
1854
+ // Add FieldControl property if available
1855
+ if (oContextProp?.[UIAnnotations.CommonFieldControl]?.Path) {
1856
+ aAdditionalProperties.push(sNavigationPath + oContextProp[UIAnnotations.CommonFieldControl].Path);
1857
+ }
1858
+
1859
+ return additionalP13N;
1860
+ }
1861
+
1862
+ /**
1863
+ * Determines whether a column is supported for card creation.
1864
+ *
1865
+ * This method checks conditions to determine if a column is eligible for inclusion in a card,
1866
+ * conditions are kept similar to RT cards restrictions in V2 LR.
1867
+ *
1868
+ * @param {Record<string, string>} columnDataObject - The column data object containing metadata about the column.
1869
+ * @param {ILineItemContext} dataFieldDetails - The data field object containing line item metadata.
1870
+ * @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
1871
+ * @param {IEntitySet} entitySetData - The entity set to which the column belongs.
1872
+ * @returns {boolean} `true` if the column is supported for card creation, otherwise `false`.
1873
+ * @private
1874
+ */
1875
+ private isSupportedColumn(
1876
+ columnDataObject: ColumnObjectData,
1877
+ dataFieldDetails: ILineItemContext,
1878
+ metaModel: ODataMetaModel,
1879
+ entitySetData: IEntitySet
1880
+ ): boolean {
1881
+ let sRecordType = dataFieldDetails.RecordType;
1882
+ if (
1883
+ sRecordType === FieldAnnotationsType.DataFieldForAnnotation ||
1884
+ sRecordType === FieldAnnotationsType.DataFieldForAction ||
1885
+ sRecordType === FieldAnnotationsType.DataFieldForIntentBasedNavigation ||
1886
+ !columnDataObject
1887
+ ) {
1888
+ return false;
1889
+ }
1890
+ let entityType = metaModel.getODataEntityType(entitySetData.entityType) as IEntityType;
1891
+ let propertyDetails = metaModel.getODataProperty(entityType, columnDataObject.leadingProperty!) as UIAnnotationValue;
1892
+ let columnKeyName = columnDataObject.columnKey;
1893
+
1894
+ if (
1895
+ this.checkMultiplicityForDataFieldAssociation(metaModel, entitySetData, dataFieldDetails) ||
1896
+ (columnKeyName &&
1897
+ (columnKeyName.indexOf(FieldTypes.DataFieldForAnnotation) > -1 ||
1898
+ columnKeyName.indexOf(FieldTypes.DataFieldForAction) > -1 ||
1899
+ columnKeyName.indexOf(FieldTypes.DataFieldForIntentBasedNavigation) > -1 ||
1900
+ propertyDetails?.[UIAnnotations.UIIsImageURL]?.Bool === "true"))
1901
+ ) {
1902
+ return false;
1903
+ }
1904
+
1905
+ return true;
1906
+ }
1907
+
1908
+ /**
1909
+ * Checks the multiplicity of a data field's association in the OData model.
1910
+ *
1911
+ * This method verifies whether the association for a given data field has a multiplicity of `*` (many).
1912
+ * It traverses the navigation path of the data field to determine the multiplicity of the associated entity.
1913
+ *
1914
+ * @param {ODataMetaModel} metaModel - The OData meta model containing entity and association metadata.
1915
+ * @param {IEntitySet} entitySetData - The entity set to which the data field belongs.
1916
+ * @param {ILineItemContext} dataFieldValue - The data field whose association multiplicity is to be checked.
1917
+ * @returns {boolean} `true` if the association has a multiplicity of `*`, otherwise `false`.
1918
+ * @private
1919
+ */
1920
+ private checkMultiplicityForDataFieldAssociation(
1921
+ metaModel: ODataMetaModel,
1922
+ entitySetData: IEntitySet,
1923
+ dataFieldValue: ILineItemContext
1924
+ ): boolean {
1925
+ if (dataFieldValue?.Value?.Path) {
1926
+ let dataFieldValuePath = dataFieldValue.Value.Path;
1927
+ let entityTypeData = metaModel && (metaModel.getODataEntityType(entitySetData.entityType) as IEntityType);
1928
+ let associationData: AssociationEnd | null | undefined;
1929
+ if (!(dataFieldValuePath.indexOf("/") > -1) || !entityTypeData) {
1930
+ return false;
1931
+ }
1932
+ while (dataFieldValuePath.indexOf("/") > -1) {
1933
+ //if complex path exists then check for multiplicity
1934
+ let navigationPropertyPath = dataFieldValuePath.split("/")[0];
1935
+ dataFieldValuePath = dataFieldValuePath.split("/").slice(1).join("/");
1936
+ entityTypeData = (metaModel.getODataEntityType((associationData as AssociationEnd)?.type) as IEntityType) || entityTypeData;
1937
+ associationData = metaModel.getODataAssociationEnd(entityTypeData, navigationPropertyPath) as AssociationEnd;
1938
+ }
1939
+ if (associationData && associationData.multiplicity === "*") {
1940
+ return true;
1941
+ }
1942
+ }
1943
+ return false;
1944
+ }
1945
+ }