@sapui5/sap.cux.home 1.142.0 → 1.142.1

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 (294) hide show
  1. package/package.json +1 -1
  2. package/src/sap/cux/home/.library +4 -1
  3. package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +3 -2
  4. package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
  5. package/src/sap/cux/home/AdvancedSettingsPanel.js +6 -5
  6. package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
  7. package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -5
  8. package/src/sap/cux/home/AppsAdditionPanel.d.ts +47 -34
  9. package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
  10. package/src/sap/cux/home/AppsAdditionPanel.js +333 -237
  11. package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
  12. package/src/sap/cux/home/AppsAdditionPanel.ts +344 -230
  13. package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
  14. package/src/sap/cux/home/AppsContainer.js +3 -2
  15. package/src/sap/cux/home/AppsContainer.js.map +1 -1
  16. package/src/sap/cux/home/AppsContainer.ts +3 -2
  17. package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
  18. package/src/sap/cux/home/BaseAppPanel.js +6 -1
  19. package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
  20. package/src/sap/cux/home/BaseAppPanel.ts +6 -1
  21. package/src/sap/cux/home/BaseContainer.d.ts +1 -1
  22. package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
  23. package/src/sap/cux/home/BaseContainer.js +10 -2
  24. package/src/sap/cux/home/BaseContainer.js.map +1 -1
  25. package/src/sap/cux/home/BaseContainer.ts +7 -3
  26. package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
  27. package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
  28. package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
  29. package/src/sap/cux/home/BaseContainerRenderer.ts +6 -0
  30. package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
  31. package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
  32. package/src/sap/cux/home/CardsContainer.d.ts +108 -0
  33. package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
  34. package/src/sap/cux/home/CardsContainer.js +207 -0
  35. package/src/sap/cux/home/CardsContainer.js.map +1 -0
  36. package/src/sap/cux/home/CardsContainer.ts +202 -0
  37. package/src/sap/cux/home/CardsPanel.d.ts +43 -62
  38. package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
  39. package/src/sap/cux/home/CardsPanel.js +345 -285
  40. package/src/sap/cux/home/CardsPanel.js.map +1 -1
  41. package/src/sap/cux/home/CardsPanel.ts +211 -200
  42. package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
  43. package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
  44. package/src/sap/cux/home/ContentAdditionDialog.js +12 -6
  45. package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
  46. package/src/sap/cux/home/ContentAdditionDialog.ts +13 -5
  47. package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
  48. package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
  49. package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
  50. package/src/sap/cux/home/ErrorPanel.js +11 -16
  51. package/src/sap/cux/home/ErrorPanel.js.map +1 -1
  52. package/src/sap/cux/home/ErrorPanel.ts +7 -19
  53. package/src/sap/cux/home/FavAppPanel.d.ts +1 -2
  54. package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
  55. package/src/sap/cux/home/FavAppPanel.js +296 -301
  56. package/src/sap/cux/home/FavAppPanel.js.map +1 -1
  57. package/src/sap/cux/home/FavAppPanel.ts +14 -10
  58. package/src/sap/cux/home/InsightsAdditionPanel.d.ts +11 -4
  59. package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
  60. package/src/sap/cux/home/InsightsAdditionPanel.js +20 -8
  61. package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
  62. package/src/sap/cux/home/InsightsAdditionPanel.ts +20 -7
  63. package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts +8 -0
  64. package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts.map +1 -1
  65. package/src/sap/cux/home/InsightsCardsSettingsPanel.js +15 -0
  66. package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
  67. package/src/sap/cux/home/InsightsCardsSettingsPanel.ts +11 -0
  68. package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
  69. package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
  70. package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +1 -1
  71. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
  72. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
  73. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
  74. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
  75. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +287 -57
  76. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
  77. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
  78. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
  79. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
  80. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
  81. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
  82. package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
  83. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
  84. package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
  85. package/src/sap/cux/home/Layout.d.ts +3 -1
  86. package/src/sap/cux/home/Layout.d.ts.map +1 -1
  87. package/src/sap/cux/home/Layout.js +49 -8
  88. package/src/sap/cux/home/Layout.js.map +1 -1
  89. package/src/sap/cux/home/Layout.ts +59 -8
  90. package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
  91. package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
  92. package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
  93. package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
  94. package/src/sap/cux/home/LayoutSettingsPanel.ts +379 -63
  95. package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -14
  96. package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
  97. package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
  98. package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
  99. package/src/sap/cux/home/NewsContainer.js.map +1 -0
  100. package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +29 -118
  101. package/src/sap/cux/home/NewsGroup.js.map +1 -1
  102. package/src/sap/cux/home/NewsGroup.ts +1 -1
  103. package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
  104. package/src/sap/cux/home/NewsPanel.js +12 -14
  105. package/src/sap/cux/home/NewsPanel.js.map +1 -1
  106. package/src/sap/cux/home/NewsPanel.ts +13 -16
  107. package/src/sap/cux/home/NewsSettingsPanel.js +4 -4
  108. package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
  109. package/src/sap/cux/home/NewsSettingsPanel.ts +5 -5
  110. package/src/sap/cux/home/PagePanel.d.ts +1 -1
  111. package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
  112. package/src/sap/cux/home/PagePanel.js +18 -10
  113. package/src/sap/cux/home/PagePanel.js.map +1 -1
  114. package/src/sap/cux/home/PagePanel.ts +25 -15
  115. package/src/sap/cux/home/PagesContainer.d.ts +72 -0
  116. package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
  117. package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
  118. package/src/sap/cux/home/PagesContainer.js +333 -0
  119. package/src/sap/cux/home/PagesContainer.js.map +1 -0
  120. package/src/sap/cux/home/PagesContainer.ts +179 -0
  121. package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
  122. package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
  123. package/src/sap/cux/home/SpaceInsightsPanel.js +66 -132
  124. package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
  125. package/src/sap/cux/home/SpaceInsightsPanel.ts +69 -151
  126. package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
  127. package/src/sap/cux/home/TaskPanel.js +16 -1
  128. package/src/sap/cux/home/TaskPanel.js.map +1 -1
  129. package/src/sap/cux/home/TaskPanel.ts +15 -1
  130. package/src/sap/cux/home/TilesContainer.d.ts +111 -0
  131. package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
  132. package/src/sap/cux/home/TilesContainer.js +218 -0
  133. package/src/sap/cux/home/TilesContainer.js.map +1 -0
  134. package/src/sap/cux/home/TilesContainer.ts +216 -0
  135. package/src/sap/cux/home/TilesPanel.d.ts +22 -52
  136. package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
  137. package/src/sap/cux/home/TilesPanel.js +184 -165
  138. package/src/sap/cux/home/TilesPanel.js.map +1 -1
  139. package/src/sap/cux/home/TilesPanel.ts +160 -154
  140. package/src/sap/cux/home/ToDoPanel.d.ts +1 -0
  141. package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
  142. package/src/sap/cux/home/ToDoPanel.js +38 -63
  143. package/src/sap/cux/home/ToDoPanel.js.map +1 -1
  144. package/src/sap/cux/home/ToDoPanel.ts +32 -31
  145. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts +2 -2
  146. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
  147. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
  148. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
  149. package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +4 -4
  150. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts +2 -2
  151. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
  152. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
  153. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
  154. package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +4 -4
  155. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts +2 -2
  156. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts.map +1 -1
  157. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
  158. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
  159. package/src/sap/cux/home/changeHandler/SpacePageColorHandler.ts +3 -3
  160. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts +2 -2
  161. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
  162. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +4 -4
  163. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
  164. package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +5 -5
  165. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
  166. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +30 -3
  167. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
  168. package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +23 -1
  169. package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +29 -19
  170. package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
  171. package/src/sap/cux/home/flexibility/Layout.flexibility.js +78 -2
  172. package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
  173. package/src/sap/cux/home/flexibility/Layout.flexibility.ts +81 -1
  174. package/src/sap/cux/home/i18n/messagebundle.properties +26 -12
  175. package/src/sap/cux/home/i18n/messagebundle_ar.properties +18 -2
  176. package/src/sap/cux/home/i18n/messagebundle_bg.properties +18 -2
  177. package/src/sap/cux/home/i18n/messagebundle_ca.properties +18 -2
  178. package/src/sap/cux/home/i18n/messagebundle_cnr.properties +18 -2
  179. package/src/sap/cux/home/i18n/messagebundle_cs.properties +18 -2
  180. package/src/sap/cux/home/i18n/messagebundle_cy.properties +18 -2
  181. package/src/sap/cux/home/i18n/messagebundle_da.properties +18 -2
  182. package/src/sap/cux/home/i18n/messagebundle_de.properties +18 -2
  183. package/src/sap/cux/home/i18n/messagebundle_el.properties +18 -2
  184. package/src/sap/cux/home/i18n/messagebundle_en.properties +19 -3
  185. package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +18 -2
  186. package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +21 -5
  187. package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +21 -5
  188. package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +18 -2
  189. package/src/sap/cux/home/i18n/messagebundle_es.properties +19 -2
  190. package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +18 -2
  191. package/src/sap/cux/home/i18n/messagebundle_et.properties +18 -2
  192. package/src/sap/cux/home/i18n/messagebundle_fi.properties +18 -2
  193. package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -2
  194. package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +18 -2
  195. package/src/sap/cux/home/i18n/messagebundle_hi.properties +18 -2
  196. package/src/sap/cux/home/i18n/messagebundle_hr.properties +18 -2
  197. package/src/sap/cux/home/i18n/messagebundle_hu.properties +18 -2
  198. package/src/sap/cux/home/i18n/messagebundle_id.properties +18 -2
  199. package/src/sap/cux/home/i18n/messagebundle_it.properties +23 -7
  200. package/src/sap/cux/home/i18n/messagebundle_iw.properties +18 -2
  201. package/src/sap/cux/home/i18n/messagebundle_ja.properties +18 -2
  202. package/src/sap/cux/home/i18n/messagebundle_kk.properties +18 -2
  203. package/src/sap/cux/home/i18n/messagebundle_ko.properties +18 -2
  204. package/src/sap/cux/home/i18n/messagebundle_lt.properties +18 -2
  205. package/src/sap/cux/home/i18n/messagebundle_lv.properties +18 -2
  206. package/src/sap/cux/home/i18n/messagebundle_mk.properties +18 -2
  207. package/src/sap/cux/home/i18n/messagebundle_ms.properties +18 -2
  208. package/src/sap/cux/home/i18n/messagebundle_nl.properties +18 -2
  209. package/src/sap/cux/home/i18n/messagebundle_no.properties +18 -2
  210. package/src/sap/cux/home/i18n/messagebundle_pl.properties +18 -2
  211. package/src/sap/cux/home/i18n/messagebundle_pt.properties +18 -2
  212. package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +18 -2
  213. package/src/sap/cux/home/i18n/messagebundle_ro.properties +18 -2
  214. package/src/sap/cux/home/i18n/messagebundle_ru.properties +18 -2
  215. package/src/sap/cux/home/i18n/messagebundle_sh.properties +18 -2
  216. package/src/sap/cux/home/i18n/messagebundle_sk.properties +18 -2
  217. package/src/sap/cux/home/i18n/messagebundle_sl.properties +18 -2
  218. package/src/sap/cux/home/i18n/messagebundle_sr.properties +18 -2
  219. package/src/sap/cux/home/i18n/messagebundle_sv.properties +18 -2
  220. package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -2
  221. package/src/sap/cux/home/i18n/messagebundle_tr.properties +18 -2
  222. package/src/sap/cux/home/i18n/messagebundle_uk.properties +20 -4
  223. package/src/sap/cux/home/i18n/messagebundle_vi.properties +18 -2
  224. package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +18 -2
  225. package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +18 -2
  226. package/src/sap/cux/home/interface/CardsInterface.d.ts +6 -0
  227. package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
  228. package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
  229. package/src/sap/cux/home/interface/CardsInterface.ts +6 -1
  230. package/src/sap/cux/home/interface/KeyUserInterface.d.ts +27 -4
  231. package/src/sap/cux/home/interface/KeyUserInterface.d.ts.map +1 -1
  232. package/src/sap/cux/home/interface/KeyUserInterface.js.map +1 -1
  233. package/src/sap/cux/home/interface/KeyUserInterface.ts +23 -4
  234. package/src/sap/cux/home/interface/LayoutInterface.d.ts +7 -0
  235. package/src/sap/cux/home/interface/LayoutInterface.d.ts.map +1 -1
  236. package/src/sap/cux/home/interface/LayoutInterface.js.map +1 -1
  237. package/src/sap/cux/home/interface/LayoutInterface.ts +7 -0
  238. package/src/sap/cux/home/library.d.ts.map +1 -1
  239. package/src/sap/cux/home/library.js +7 -4
  240. package/src/sap/cux/home/library.js.map +1 -1
  241. package/src/sap/cux/home/library.ts +10 -5
  242. package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
  243. package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
  244. package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +0 -45
  245. package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +10 -18
  246. package/src/sap/cux/home/themes/base/PlaceHolder.less +1 -1
  247. package/src/sap/cux/home/themes/base/SettingsDialog.less +4 -0
  248. package/src/sap/cux/home/themes/base/TilesContainer.less +65 -0
  249. package/src/sap/cux/home/themes/base/library.source.less +2 -1
  250. package/src/sap/cux/home/utils/BatchHelper.d.ts +1 -0
  251. package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
  252. package/src/sap/cux/home/utils/BatchHelper.js +7 -2
  253. package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
  254. package/src/sap/cux/home/utils/BatchHelper.ts +8 -1
  255. package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
  256. package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
  257. package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
  258. package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
  259. package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
  260. package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +150 -151
  261. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
  262. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
  263. package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
  264. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
  265. package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
  266. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
  267. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
  268. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
  269. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
  270. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
  271. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
  272. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
  273. package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
  274. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
  275. package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
  276. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
  277. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
  278. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
  279. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
  280. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
  281. package/ui5.yaml +1 -0
  282. package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
  283. package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
  284. package/src/sap/cux/home/InsightsContainer.js +0 -459
  285. package/src/sap/cux/home/InsightsContainer.js.map +0 -1
  286. package/src/sap/cux/home/InsightsContainer.ts +0 -489
  287. package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
  288. package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
  289. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
  290. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
  291. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
  292. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
  293. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
  294. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +0 -1
@@ -27,9 +27,11 @@ import Container from "sap/ushell/Container";
27
27
  import S4MyHome from "sap/ushell/api/S4MyHome";
28
28
  import { Intent } from "sap/ushell/services/AppLifeCycle";
29
29
  import Navigation from "sap/ushell/services/Navigation";
30
+ import BaseContainer from "./BaseContainer";
30
31
  import BasePanel from "./BasePanel";
32
+ import CardsContainer from "./CardsContainer";
31
33
  import { $CardsPanelSettings } from "./CardsPanel";
32
- import InsightsContainer from "./InsightsContainer";
34
+ import ErrorPanel from "./ErrorPanel";
33
35
  import MenuItem from "./MenuItem";
34
36
  import {
35
37
  ICard,
@@ -51,41 +53,25 @@ import { recycleId } from "./utils/DataFormatUtils";
51
53
  import { calculateCardWidth, DeviceType, fetchElementProperties } from "./utils/Device";
52
54
  import { focusDraggedItem } from "./utils/DragDropUtils";
53
55
  import { addFESRId, addFESRNavigationSource, FESRNavigationSource } from "./utils/FESRUtil";
54
- import {
55
- createShowMoreActionButton,
56
- createShowMoreMenuItem,
57
- getAssociatedFullScreenMenuItem,
58
- sortMenuItems,
59
- targetsAreEqual
60
- } from "./utils/InsightsUtils";
56
+ import { getAssociatedFullScreenButton, getAssociatedFullScreenMenuItem, sortMenuItems, targetsAreEqual } from "./utils/InsightsUtils";
61
57
  import PageManager from "./utils/PageManager";
62
58
  import PersonalisationUtils from "./utils/PersonalisationUtils";
63
59
  import UShellPersonalizer, { IPersonalizationData } from "./utils/UshellPersonalizer";
64
60
 
65
61
  export enum cardsMenuItems {
66
62
  REFRESH = "cards-refresh",
67
- EDIT_CARDS = "cards-editCards",
68
- AI_INSIGHT_CARD = "cards-addAIInsightCard"
63
+ EDIT_CARDS = "cards-editCards"
69
64
  }
70
65
 
71
- export enum cardsContainerMenuItems {
72
- REFRESH = "container-cards-refresh",
73
- EDIT_CARDS = "container-cards-editCards",
74
- SHOW_MORE = "cardsContainerFullScreenMenuItem",
75
- AI_INSIGHT_CARD = "container-cards-addAIInsightCard"
66
+ export enum cardsActionButtons {
67
+ SHOW_MORE = "fullScreen"
76
68
  }
77
69
 
78
- export enum cardsContainerActionButtons {
79
- SHOW_MORE = "cardsContanerFullScreenActionButton"
70
+ export enum errorPanelMenuItems {
71
+ EDIT_CARDS = "cards-errorPanel-editCards"
80
72
  }
81
- const sortedMenuItems: (cardsMenuItems | string)[] = [
82
- cardsMenuItems.REFRESH,
83
- cardsMenuItems.EDIT_CARDS,
84
- cardsMenuItems.AI_INSIGHT_CARD,
85
- "showMore",
86
- "settings"
87
- ];
88
73
 
74
+ const sortedMenuItems: (cardsMenuItems | string)[] = [cardsMenuItems.REFRESH, cardsMenuItems.EDIT_CARDS, "showMore", "settings"];
89
75
  interface IcardActionEvent {
90
76
  getParameter(sParam: string): unknown;
91
77
  preventDefault(): void;
@@ -163,7 +149,7 @@ export default class CardsPanel extends BasePanel {
163
149
  };
164
150
  private cardHelperInstance!: ICardHelperInstance;
165
151
  private _cardsFlexWrapper!: VBox;
166
- private cardsContainer!: GridContainer;
152
+ private cardsWrapperContainer!: GridContainer;
167
153
  private cardsMobileContainer!: HeaderContainer;
168
154
  private aVisibleCardInstances: Card[] = [];
169
155
  private _oData!: Record<string, unknown>;
@@ -176,14 +162,13 @@ export default class CardsPanel extends BasePanel {
176
162
  private cardsInViewport: Card[] = [];
177
163
  private oEventBus!: EventBus;
178
164
  private _appSwitched: boolean = false;
179
- private _containerMenuItems!: MenuItem[];
180
- private _containerActionButtons!: Button[];
181
- private insightsContainer!: InsightsContainer;
182
- private _headerVisible: boolean = false;
165
+ private cardsContainer!: CardsContainer;
183
166
  private _controlMap!: Map<string, UI5Element>;
184
167
  private _cardsRendered!: Promise<void> | undefined;
185
168
  private pageManagerInstance!: PageManager;
186
169
  private hasCustomSpace!: boolean;
170
+ private _errorPanel!: ErrorPanel;
171
+ private cardHelper: Promise<ICardHelperInstance> | null = null;
187
172
 
188
173
  constructor(idOrSettings?: string | $CardsPanelSettings);
189
174
  constructor(id?: string, settings?: $CardsPanelSettings);
@@ -205,6 +190,7 @@ export default class CardsPanel extends BasePanel {
205
190
  */
206
191
  public init() {
207
192
  super.init();
193
+ this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")}`);
208
194
  this.setProperty("key", "cards");
209
195
  this.setProperty("enableFullScreen", true);
210
196
  this.cardWidth = "19rem";
@@ -233,7 +219,6 @@ export default class CardsPanel extends BasePanel {
233
219
  "importChannel",
234
220
  "cardsImport",
235
221
  async (sChannelId?: string, sEventId?: string, oData?) => {
236
- await this.initializeCardHelper();
237
222
  await this._createCards(oData as ICardManifest[]);
238
223
  this._importdone();
239
224
  },
@@ -279,7 +264,8 @@ export default class CardsPanel extends BasePanel {
279
264
  * @returns {any}
280
265
  */
281
266
  private async _createCards(aCards: ICardManifest[]) {
282
- await this.cardHelperInstance?._createCards(aCards);
267
+ const cardHelper = await this.getCardHelper();
268
+ await cardHelper?._createCards(aCards);
283
269
  return this.rerenderCards();
284
270
  }
285
271
 
@@ -334,10 +320,8 @@ export default class CardsPanel extends BasePanel {
334
320
  ) as object;
335
321
  }
336
322
  if (oCheckSemanticProperty && Object.keys(oCheckSemanticProperty).length) {
337
- oParameters = this.cardHelperInstance.processSemanticDate(
338
- oParameters,
339
- oIntegrationCardManifest
340
- ) as ICardActionParameters;
323
+ const cardHelper = await this.getCardHelper();
324
+ oParameters = cardHelper?.processSemanticDate(oParameters, oIntegrationCardManifest) as ICardActionParameters;
341
325
  }
342
326
 
343
327
  let aContentActions = this.getContentActions(oIntegrationCardManifest);
@@ -383,9 +367,7 @@ export default class CardsPanel extends BasePanel {
383
367
  icon: "sap-icon://filter",
384
368
  action: (oCard: Card) => {
385
369
  const cardId = (oCard.getManifestEntry("sap.app") as ISapApp).id;
386
- (this.getParent() as InsightsContainer)
387
- ?._getLayout()
388
- .openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS, { cardId });
370
+ (this.getParent() as CardsContainer)?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS, { cardId });
389
371
  },
390
372
  visible: async (oCard: Card) => {
391
373
  const oEntry = await this._getManifestEntryFromCard(oCard, "sap.insights");
@@ -416,7 +398,8 @@ export default class CardsPanel extends BasePanel {
416
398
  visible: async (oCard: Card) => {
417
399
  return this._getManifestEntryFromCard(oCard, "sap.insights").then(async (oEntry: ICardManifest | undefined) => {
418
400
  if (oEntry) {
419
- const parentApp = await this.cardHelperInstance.getParentAppDetails({
401
+ const cardHelper = await this.getCardHelper();
402
+ const parentApp = await cardHelper?.getParentAppDetails({
420
403
  descriptorContent: oCard.getManifestEntry("/") as ICardManifest
421
404
  });
422
405
  if (parentApp.semanticObject && parentApp.action) {
@@ -440,7 +423,8 @@ export default class CardsPanel extends BasePanel {
440
423
  });
441
424
  },
442
425
  action: async (oCard: Card) => {
443
- const parentApp = await this.cardHelperInstance.getParentAppDetails({
426
+ const cardHelper = await this.getCardHelper();
427
+ const parentApp = await cardHelper?.getParentAppDetails({
444
428
  descriptorContent: oCard.getManifestEntry("/") as ICardManifest
445
429
  });
446
430
  const sShellHash = parentApp.semanticURL || parentApp.semanticObject;
@@ -563,21 +547,22 @@ export default class CardsPanel extends BasePanel {
563
547
  }
564
548
 
565
549
  /**
566
- * Initializes the card helper and page manager if not already done.
550
+ * Retrieves the Card Helper instance.
567
551
  *
568
552
  * @private
569
- * @returns {Promise<void>}
553
+ * @returns {Promise<ICardHelperInstance>} A promise that resolves with the Card Helper instance.
570
554
  */
571
- private async initializeCardHelper(): Promise<void> {
555
+ private async getCardHelper(): Promise<ICardHelperInstance> {
572
556
  if (!this.cardHelperInstance) {
573
557
  this.pageManagerInstance = this.pageManagerInstance || getPageManagerInstance(this);
574
558
  const [cardHelperInstance, hasCustomSpace] = await Promise.all([
575
- (CardHelper as ICardHelper).getServiceAsync(),
559
+ this.getCardHelperService(),
576
560
  this.pageManagerInstance.hasCustomSpace()
577
561
  ]);
578
562
  this.cardHelperInstance = cardHelperInstance;
579
563
  this.hasCustomSpace = hasCustomSpace;
580
564
  }
565
+ return this.cardHelperInstance;
581
566
  }
582
567
  /**
583
568
  * Renders the panel.
@@ -586,9 +571,36 @@ export default class CardsPanel extends BasePanel {
586
571
  * @returns {Promise<void>} A promise that resolves when the panel is rendered.
587
572
  */
588
573
  public async renderPanel(): Promise<void> {
589
- await this.initializeCardHelper();
590
- await this.rerenderCards();
591
- this.fireEvent("loaded");
574
+ try {
575
+ await this.rerenderCards();
576
+ this.fireEvent("loaded");
577
+ } catch (error) {
578
+ Log.error(error instanceof Error ? error.message : String(error));
579
+ }
580
+ }
581
+
582
+ /**
583
+ * Sorts the menu items based on the provided order.
584
+ *
585
+ * @private
586
+ * @param {string[]} menuItems - The order of the menu items.
587
+ */
588
+ private _sortMenuItems(menuItems: string[]) {
589
+ const panelMenuItems = this.getAggregation("menuItems") as MenuItem[];
590
+ let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
591
+ this.removeAllAggregation("menuItems");
592
+ sortedMenuItems?.forEach((menuItem) => this.addAggregation("menuItems", menuItem));
593
+ }
594
+
595
+ private _setMenuItemsVisibility(menuItem: MenuItem, bVisible: boolean) {
596
+ if (
597
+ menuItem &&
598
+ (menuItem.getId().includes(cardsMenuItems.REFRESH) ||
599
+ menuItem.getId().includes(cardsMenuItems.EDIT_CARDS) ||
600
+ menuItem.getId().includes("showMore"))
601
+ ) {
602
+ menuItem.setVisible(bVisible);
603
+ }
592
604
  }
593
605
 
594
606
  /**
@@ -603,13 +615,14 @@ export default class CardsPanel extends BasePanel {
603
615
  void (async () => {
604
616
  try {
605
617
  // Enable placeholders after updating/rerendering cards
606
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
618
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
607
619
 
608
- this._getCardContainer().removeAllAggregation(sDefaultAggreName);
620
+ this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
609
621
  this._showPlaceHolders();
610
622
  // Fetch Cards from insights service
623
+ const cardHelper = await this.getCardHelper();
611
624
  const preferedCardIDs = this.hasCustomSpace ? PREFERED_CARDS : [];
612
- const userVisibleCardModel = await this.cardHelperInstance?._getUserVisibleCardModel(preferedCardIDs);
625
+ const userVisibleCardModel = await cardHelper._getUserVisibleCardModel(preferedCardIDs);
613
626
  const aCards = userVisibleCardModel.getProperty("/cards") as ICard[];
614
627
  const listBinding = userVisibleCardModel?.bindList("/cards");
615
628
  if (!listBinding.hasListeners("change")) {
@@ -618,9 +631,16 @@ export default class CardsPanel extends BasePanel {
618
631
  await (this._cardsRendered ?? Promise.resolve());
619
632
  const visibleCards = userVisibleCardModel.getProperty("/cards") as ICard[];
620
633
  if (visibleCards.length !== this.aVisibleCardInstances.length && visibleCards.length > 0) {
634
+ // Show cards in UI
621
635
  this._showCards(visibleCards);
622
636
  } else if (!visibleCards.length) {
637
+ //if there are no tiles, hide the panel and show the error panel
638
+ this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")}`);
639
+ this.getMenuItems().forEach((item) => {
640
+ this._setMenuItemsVisibility(item, false);
641
+ });
623
642
  this.fireHandleHidePanel();
643
+ this._addErrorPanel();
624
644
  }
625
645
  });
626
646
  }
@@ -630,6 +650,13 @@ export default class CardsPanel extends BasePanel {
630
650
  if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
631
651
  await this._getRecommendationCards();
632
652
  } else if (aCards.length) {
653
+ this._errorPanel?.setVisible(false);
654
+ //Update the panel title with the number of cards
655
+ this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
656
+ //if the panel has been loaded and has cards, update the visibility of header elements of the panel
657
+ this.getMenuItems().forEach((item) => {
658
+ this._setMenuItemsVisibility(item, true);
659
+ });
633
660
  if (showRecommendation === undefined) {
634
661
  await this._updateRecommendationStatus();
635
662
  }
@@ -638,11 +665,20 @@ export default class CardsPanel extends BasePanel {
638
665
  await this.checkForRecommendedCards(aCards);
639
666
  } else {
640
667
  this.fireHandleHidePanel();
668
+ this._addErrorPanel();
669
+ const layout = this._getCardsContainer()?._getLayout();
670
+ if (layout.getProperty("expanded")) {
671
+ this.cardsContainer.addContent(this);
672
+ layout?.toggleFullScreen(this);
673
+ //remove the cards panel from the cards container
674
+ this.cardsContainer.removeContent(this);
675
+ }
641
676
  }
642
677
  this._cardsRendered = undefined;
643
678
  resolve();
644
679
  } catch (error) {
645
680
  this.fireHandleHidePanel();
681
+ this._addErrorPanel(false);
646
682
  this._cardsRendered = undefined;
647
683
  if (error instanceof Error) {
648
684
  Log.error(error.message);
@@ -654,13 +690,61 @@ export default class CardsPanel extends BasePanel {
654
690
  }
655
691
  return this._cardsRendered;
656
692
  }
693
+
694
+ /**
695
+ * Adds an error panel when no cards are available.
696
+ *
697
+ * @private
698
+ */
699
+ private _addErrorPanel(showActions: boolean = true) {
700
+ const parentContainer = this._getCardsContainer() as BaseContainer;
701
+ //set the visibility of cards panel to false
702
+ this.setVisible(false);
703
+ if (!this._errorPanel) {
704
+ this._errorPanel = new ErrorPanel(`${this.getId()}-errorCardsPanel`, {
705
+ additionalData: [
706
+ new Button(`${this.getId()}-addInsightsCardsBtn`, {
707
+ text: this._i18nBundle.getText("addInsightsCardBtn"),
708
+ type: "Emphasized",
709
+ press: () => {
710
+ (this._getCardsContainer() as BaseContainer)
711
+ ?._getLayout()
712
+ .openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
713
+ }
714
+ })
715
+ ],
716
+ messageTitle: this._i18nBundle.getText("noAppsTitle"),
717
+ messageDescription: this._i18nBundle.getText("noInsightsCardsMsg")
718
+ });
719
+ this._errorPanel.getData();
720
+ //Add the menu items and action buttons to the error panel
721
+ const editCardsMenuItem = this._createEditCardsMenuItem(errorPanelMenuItems.EDIT_CARDS, "manageCards");
722
+ this._errorPanel.addAggregation("menuItems", editCardsMenuItem);
723
+ this._sortMenuItems(sortedMenuItems);
724
+ this._errorPanel.setProperty("enableSettings", true);
725
+ }
726
+ (this._errorPanel.getProperty("additionalData") as Control[]).forEach((control) => control.setVisible(showActions));
727
+ //Add the title to the error panel
728
+ this._errorPanel.setProperty("title", this._i18nBundle?.getText("insightsCards"));
729
+ this._errorPanel.setVisible(true);
730
+ parentContainer.addAggregation("content", this._errorPanel);
731
+ //set the visibility of header elements of the error panel
732
+ this._errorPanel.getMenuItems().forEach((item) => {
733
+ if ((item.getId().includes(errorPanelMenuItems.EDIT_CARDS) && showActions) || item.getId().includes("settings")) {
734
+ item.setVisible(true);
735
+ } else {
736
+ item.setVisible(false);
737
+ }
738
+ });
739
+ }
657
740
  /**
658
741
  * Sets the new visible cards in the model and updates the UI.
659
742
  * @private
660
743
  */
661
744
  private async setNewVisibleCards() {
745
+ const cardHelper = await this.getCardHelper();
662
746
  const preferedCardIDs = this.hasCustomSpace ? PREFERED_CARDS : [];
663
- const visibleCardModel = await this.cardHelperInstance._getUserVisibleCardModel(preferedCardIDs);
747
+ const visibleCardModel = await cardHelper?._getUserVisibleCardModel(preferedCardIDs);
664
748
  const aNewCards = visibleCardModel.getProperty("/cards") as ICard[];
665
749
  this._controlModel.setProperty("/userVisibleCards", aNewCards);
666
750
  this._showCards(aNewCards);
@@ -702,7 +786,8 @@ export default class CardsPanel extends BasePanel {
702
786
  const aUpdatedCards = await this.regenerateCards(uniqueManifestDetails, manifestIds);
703
787
  if (aUpdatedCards?.length) {
704
788
  // Update the model with updated cards
705
- await this.cardHelperInstance._updateCards(
789
+ const cardHelper = await this.getCardHelper();
790
+ await cardHelper?._updateCards(
706
791
  aUpdatedCards.map((oCard: ICardDetails) => oCard?.newManifest?.descriptorContent) as ICardManifest[]
707
792
  );
708
793
  } else {
@@ -931,7 +1016,8 @@ export default class CardsPanel extends BasePanel {
931
1016
  */
932
1017
  private async _handleRecommendationCards(aRecommendedCards: ICard[]) {
933
1018
  const cardManifests = aRecommendedCards.map((oCard) => oCard.descriptorContent);
934
- await this.cardHelperInstance?._createCards(cardManifests);
1019
+ const cardHelper = await this.getCardHelper();
1020
+ await cardHelper?._createCards(cardManifests);
935
1021
  await this._updateRecommendationStatus();
936
1022
  return this.setNewVisibleCards();
937
1023
  }
@@ -965,15 +1051,15 @@ export default class CardsPanel extends BasePanel {
965
1051
  rowSize: this.cardHeight,
966
1052
  gap: "1rem"
967
1053
  });
968
- this.cardsContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
1054
+ this.cardsWrapperContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
969
1055
  visible: "{= !${/isPhone}}"
970
1056
  })
971
1057
  .addStyleClass("sapUiSmallMarginTop")
972
1058
  .setLayout(this.cardsContainerSettings);
973
- this.cardsContainer.setModel(this._controlModel);
974
- this.addDragDropConfigTo(this.cardsContainer, (oEvent) => this._handleCardsDnd(oEvent));
1059
+ this.cardsWrapperContainer.setModel(this._controlModel);
1060
+ this.addDragDropConfigTo(this.cardsWrapperContainer, (oEvent) => this._handleCardsDnd(oEvent));
975
1061
 
976
- return this.cardsContainer;
1062
+ return this.cardsWrapperContainer;
977
1063
  }
978
1064
 
979
1065
  /**
@@ -1023,9 +1109,9 @@ export default class CardsPanel extends BasePanel {
1023
1109
  });
1024
1110
 
1025
1111
  // add HBox as item to GridList
1026
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1112
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1027
1113
  if (sDefaultAggreName) {
1028
- this._getCardContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
1114
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
1029
1115
  }
1030
1116
  }
1031
1117
 
@@ -1036,7 +1122,7 @@ export default class CardsPanel extends BasePanel {
1036
1122
  * @returns {number} The number of placeholder cards that should be displayed. Defaults to 1 if no valid count is determined.
1037
1123
  */
1038
1124
  private _calculatePlaceholderCardCount(): number {
1039
- const layoutDomRef = this._getInsightsContainer()?._getLayout()?.getDomRef();
1125
+ const layoutDomRef = this._getCardsContainer()?._getLayout()?.getDomRef();
1040
1126
  let count = 0;
1041
1127
  if (layoutDomRef) {
1042
1128
  const sectionDomRef = layoutDomRef.childNodes[0] as Element;
@@ -1069,14 +1155,11 @@ export default class CardsPanel extends BasePanel {
1069
1155
  * @param {ICard[]} aCards - The cards to display.
1070
1156
  */
1071
1157
  private _showCards(aCards: ICard[]) {
1072
- const panelName = this.getMetadata().getName();
1158
+ const parentContainer = this._getCardsContainer() as BaseContainer;
1159
+ parentContainer.removeContent(this._errorPanel);
1073
1160
  this.fireHandleUnhidePanel();
1074
- this._getInsightsContainer()?.updatePanelsItemCount(aCards.length, panelName);
1075
- if (this._headerVisible) {
1076
- this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
1077
- }
1078
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1079
- this._getCardContainer().removeAllAggregation(sDefaultAggreName);
1161
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1162
+ this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
1080
1163
  this.aVisibleCardInstances = [];
1081
1164
  this.cardsInViewport = [];
1082
1165
 
@@ -1124,8 +1207,8 @@ export default class CardsPanel extends BasePanel {
1124
1207
  });
1125
1208
 
1126
1209
  // add VBox as item to GridList
1127
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1128
- this._getCardContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
1210
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1211
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
1129
1212
  });
1130
1213
  }
1131
1214
 
@@ -1136,38 +1219,13 @@ export default class CardsPanel extends BasePanel {
1136
1219
  * @param {Event} event - The event object.
1137
1220
  */
1138
1221
  private _handleEditCards(event: Event) {
1139
- /* If called from Panel Header event.source() will return TilesPanel, if called from Insights Container event.source() will return InsightsContainer.
1222
+ /* If called from Panel Header event.source() will return TilesPanel, if called from cards Container event.source() will return cardsContainer.
1140
1223
  _getLayout is available at Container Level*/
1141
1224
  let parent: ManagedObject = event.getSource<CardsPanel>().getParent() || this;
1142
- if (parent instanceof CardsPanel) {
1225
+ if (parent instanceof CardsPanel || parent instanceof ErrorPanel) {
1143
1226
  parent = parent.getParent() as ManagedObject;
1144
1227
  }
1145
- (parent as InsightsContainer)?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
1146
- }
1147
-
1148
- /**
1149
- * Hides the header of the cards panel.
1150
- *
1151
- * @private
1152
- */
1153
- public handleHideHeader() {
1154
- this._headerVisible = false;
1155
- this.setProperty("title", "");
1156
- this._toggleHeaderActions(false);
1157
- }
1158
-
1159
- /**
1160
- * Adds the header to the cards panel.
1161
- *
1162
- * @private
1163
- */
1164
- public handleAddHeader() {
1165
- this._headerVisible = true;
1166
- this.setProperty(
1167
- "title",
1168
- `${this._i18nBundle?.getText("insightsCards")} (${(this._controlModel.getProperty("/userVisibleCards") as ICard[])?.length})`
1169
- );
1170
- this._toggleHeaderActions(true);
1228
+ (parent as CardsContainer)?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
1171
1229
  }
1172
1230
 
1173
1231
  /**
@@ -1197,14 +1255,15 @@ export default class CardsPanel extends BasePanel {
1197
1255
  // take the moved item from dragIndex and add to dropindex
1198
1256
  try {
1199
1257
  if (!(this._controlModel.getProperty("/userAllCards") as ICard[]).length) {
1200
- const userAllCardsModel = await this.cardHelperInstance._getUserAllCardModel();
1258
+ const cardHelper = await this.getCardHelper();
1259
+ const userAllCardsModel = await cardHelper?._getUserAllCardModel();
1201
1260
  this._controlModel.setProperty("/userAllCards", userAllCardsModel.getProperty("/cards"));
1202
1261
  await this.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex);
1203
1262
  } else {
1204
1263
  await this.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex);
1205
1264
  }
1206
1265
  setTimeout(() => {
1207
- focusDraggedItem(this._getCardContainer(), iDropItemIndex);
1266
+ focusDraggedItem(this._getCardWrapperContainer(), iDropItemIndex);
1208
1267
  }, 0);
1209
1268
  } catch (error) {
1210
1269
  if (error instanceof Error) {
@@ -1245,12 +1304,9 @@ export default class CardsPanel extends BasePanel {
1245
1304
  iUpdatedDropItemIndex++;
1246
1305
  }
1247
1306
  if (iUpdatedDragItemIndex !== iUpdatedDropItemIndex) {
1248
- const aUpdatedCards = this.cardHelperInstance.handleDndCardsRanking(
1249
- iUpdatedDragItemIndex,
1250
- iUpdatedDropItemIndex,
1251
- aUserAllCards
1252
- );
1253
- await this.cardHelperInstance._updateMultipleCards(aUpdatedCards, "PUT");
1307
+ const cardHelper = await this.getCardHelper();
1308
+ const aUpdatedCards = cardHelper?.handleDndCardsRanking(iUpdatedDragItemIndex, iUpdatedDropItemIndex, aUserAllCards);
1309
+ await cardHelper?._updateMultipleCards(aUpdatedCards, "PUT");
1254
1310
  this._sortCardsOnRank(aUserAllCards);
1255
1311
  this._controlModel.setProperty("/userAllCards", aUserAllCards);
1256
1312
  this._controlModel.setProperty(
@@ -1310,7 +1366,7 @@ export default class CardsPanel extends BasePanel {
1310
1366
  * @returns {number} - The number of visible cards.
1311
1367
  */
1312
1368
  private _calculateVisibleCardCount() {
1313
- const layout = this._getInsightsContainer()._getLayout();
1369
+ const layout = this._getCardsContainer()._getLayout();
1314
1370
  const pageDomRef = layout.getDomRef();
1315
1371
  const deviceType = this.getDeviceType();
1316
1372
  let count = 1;
@@ -1344,7 +1400,7 @@ export default class CardsPanel extends BasePanel {
1344
1400
  * @override
1345
1401
  */
1346
1402
  public _adjustLayout() {
1347
- const layout = this._getInsightsContainer()?._getLayout();
1403
+ const layout = this._getCardsContainer()?._getLayout();
1348
1404
  let cardWidth = this.cardWidth;
1349
1405
  const isMobileDevice = this.getDeviceType() === DeviceType.Mobile;
1350
1406
 
@@ -1363,8 +1419,8 @@ export default class CardsPanel extends BasePanel {
1363
1419
  if (cardCount !== this.cardsInViewport.length) {
1364
1420
  this.cardsInViewport = this.aVisibleCardInstances.slice(0, cardCount);
1365
1421
 
1366
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1367
- this._getCardContainer().removeAllAggregation(sDefaultAggreName);
1422
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1423
+ this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
1368
1424
  this.cardsInViewport.forEach((card) => {
1369
1425
  const manifest = card.getManifest() as ICardManifest;
1370
1426
  const sType = manifest["sap.card"]?.type;
@@ -1387,31 +1443,22 @@ export default class CardsPanel extends BasePanel {
1387
1443
  if (overlayHBoxWrapper) {
1388
1444
  cardWrapper.addItem(overlayHBoxWrapper);
1389
1445
  }
1390
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1391
- this._getCardContainer().addAggregation(sDefaultAggreName, cardWrapper);
1446
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1447
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, cardWrapper);
1392
1448
  });
1393
1449
 
1394
1450
  this.shareCardsInViewport();
1395
1451
  }
1396
-
1397
- // show/hide Full Screen Button if available
1452
+ // show/hide full screen button
1398
1453
  const showFullScreenButton = isElementExpanded || this.aVisibleCardInstances.length > cardCount;
1399
- if (this._headerVisible) {
1400
- this._getInsightsContainer()?.toggleFullScreenElements(this, showFullScreenButton);
1401
- } else {
1402
- const fullScreenButton = getAssociatedFullScreenMenuItem(this);
1403
- const fullScreenText = fullScreenButton?.getTitle();
1404
- this._getInsightsContainer()?.updateMenuItem(
1405
- this._controlMap.get(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`) as MenuItem,
1406
- showFullScreenButton,
1407
- fullScreenText
1408
- );
1409
- this._getInsightsContainer()?.updateActionButton(
1410
- this._controlMap.get(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`) as Button,
1411
- showFullScreenButton,
1412
- fullScreenText
1413
- );
1414
- }
1454
+ const fullScreenButton = getAssociatedFullScreenMenuItem(this);
1455
+ const fullScreenText = fullScreenButton.getTitle();
1456
+ //update the panel menu-item show more button and show more action button in panel header
1457
+ fullScreenButton?.setVisible(showFullScreenButton);
1458
+ fullScreenButton?.setTitle(fullScreenText);
1459
+ const fullScreenActionButton = getAssociatedFullScreenButton(this);
1460
+ fullScreenActionButton?.setVisible(showFullScreenButton);
1461
+ fullScreenActionButton?.setText(fullScreenText);
1415
1462
  } else {
1416
1463
  this.cardWidth = this.getDeviceType() === DeviceType.Mobile ? "19rem" : "22rem";
1417
1464
  }
@@ -1423,53 +1470,17 @@ export default class CardsPanel extends BasePanel {
1423
1470
  }
1424
1471
  }
1425
1472
 
1426
- /**
1427
- * Retrieves the menu items for the container.
1428
- *
1429
- * @private
1430
- * @returns {MenuItem[]} An array of MenuItem instances.
1431
- */
1432
- public getContainerMenuItems(): MenuItem[] {
1433
- if (!this._containerMenuItems) {
1434
- const containerRefreshMenuItem = this._createRefreshMenuItem(cardsContainerMenuItems.REFRESH, "containerCardsRefresh");
1435
- const containerEditCardsMenuItem = this._createEditCardsMenuItem(cardsContainerMenuItems.EDIT_CARDS, "containerManageCards");
1436
- const containerShowMoreMenuItem = createShowMoreMenuItem(this, cardsContainerMenuItems.SHOW_MORE, "containerCardsShowMore");
1437
- this._controlMap.set(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`, containerShowMoreMenuItem);
1438
- this._containerMenuItems = [containerRefreshMenuItem, containerEditCardsMenuItem, containerShowMoreMenuItem];
1439
- }
1440
- return this._containerMenuItems;
1441
- }
1442
-
1443
- /**
1444
- * Retrieves the action buttons for the container.
1445
- *
1446
- * @private
1447
- * @returns {Button[]} An array of Button instances.
1448
- */
1449
- public getContainerActionButtons(): Button[] {
1450
- if (!this._containerActionButtons) {
1451
- this._containerActionButtons = [];
1452
- const actionButton = createShowMoreActionButton(this, cardsContainerActionButtons.SHOW_MORE, "containerCardsShowMore");
1453
- if (actionButton) {
1454
- this._controlMap.set(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`, actionButton);
1455
- this._containerActionButtons.push(actionButton);
1456
- }
1457
- }
1458
-
1459
- return this._containerActionButtons;
1460
- }
1461
-
1462
1473
  /**
1463
1474
  * Retrieves the insights container.
1464
1475
  *
1465
1476
  * @private
1466
- * @returns {InsightsContainer} - The insights container.
1477
+ * @returns {CardsContainer} - The cards container.
1467
1478
  */
1468
- private _getInsightsContainer(): InsightsContainer {
1469
- if (!this.insightsContainer) {
1470
- this.insightsContainer = this.getParent() as InsightsContainer;
1479
+ private _getCardsContainer(): CardsContainer {
1480
+ if (!this.cardsContainer) {
1481
+ this.cardsContainer = this.getParent() as CardsContainer;
1471
1482
  }
1472
- return this.insightsContainer;
1483
+ return this.cardsContainer;
1473
1484
  }
1474
1485
 
1475
1486
  /**
@@ -1517,21 +1528,6 @@ export default class CardsPanel extends BasePanel {
1517
1528
  return menuItem;
1518
1529
  }
1519
1530
 
1520
- /**
1521
- * Toggles the visibility of the header actions.
1522
- *
1523
- * @param {boolean} bShow - Whether to show or hide the header actions.
1524
- * @private
1525
- */
1526
- private _toggleHeaderActions(bShow: boolean) {
1527
- (this.getAggregation("menuItems") as MenuItem[])?.forEach((menuItem) => {
1528
- this._getInsightsContainer()?.toggleMenuListItem(menuItem, bShow);
1529
- });
1530
- (this.getAggregation("actionButtons") as Button[])?.forEach((actionButton) =>
1531
- this._getInsightsContainer()?.toggleActionButton(actionButton, bShow)
1532
- );
1533
- }
1534
-
1535
1531
  /**
1536
1532
  * Retrieves the card container based on the device type.
1537
1533
  *
@@ -1539,24 +1535,11 @@ export default class CardsPanel extends BasePanel {
1539
1535
  * @returns {GridContainer | HeaderContainer} - The card container.
1540
1536
  *
1541
1537
  */
1542
- private _getCardContainer() {
1538
+ private _getCardWrapperContainer() {
1543
1539
  if (this.getDeviceType() === DeviceType.Mobile) {
1544
1540
  return this.cardsMobileContainer;
1545
1541
  }
1546
- return this.cardsContainer;
1547
- }
1548
-
1549
- /**
1550
- * Sorts the menu items based on the provided order.
1551
- *
1552
- * @private
1553
- * @param {string[]} menuItems - The order of the menu items.
1554
- */
1555
- private _sortMenuItems(menuItems: string[]) {
1556
- const panelMenuItems = this.getAggregation("menuItems") as MenuItem[];
1557
- let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
1558
- this.removeAllAggregation("menuItems");
1559
- sortedMenuItems?.forEach((menuItem) => this.addAggregation("menuItems", menuItem));
1542
+ return this.cardsWrapperContainer;
1560
1543
  }
1561
1544
 
1562
1545
  /**
@@ -1583,4 +1566,32 @@ export default class CardsPanel extends BasePanel {
1583
1566
  runtimeHostCreated = false;
1584
1567
  (this.getAggregation("host") as Host)?.destroy();
1585
1568
  }
1569
+
1570
+ /**
1571
+ * Initializes the CardHelper service promise.
1572
+ *
1573
+ * @private
1574
+ * @returns {Promise<ICardHelperInstance>} - card helper service.
1575
+ */
1576
+ private getCardHelperService(): Promise<ICardHelperInstance> {
1577
+ if (this.cardHelper === null) {
1578
+ this.cardHelper = (CardHelper as ICardHelper).getServiceAsync();
1579
+ }
1580
+ return this.cardHelper;
1581
+ }
1582
+
1583
+ /**
1584
+ * Checks if insights service is enabled.
1585
+ *
1586
+ * @private
1587
+ * @returns {Promise<boolean>} - true if insights service is enabled else false.
1588
+ */
1589
+ public async isInsightsEnabled(): Promise<boolean> {
1590
+ try {
1591
+ return (await this.getCardHelperService()) !== null;
1592
+ } catch (error) {
1593
+ Log.error(error instanceof Error ? error.message : String(error));
1594
+ return false;
1595
+ }
1596
+ }
1586
1597
  }