@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
@@ -2,7 +2,7 @@
2
2
  * SAP UI development toolkit for HTML5 (SAPUI5)
3
3
  * * (c) Copyright 2009-2025 SAP SE. All rights reserved
4
4
  */
5
- sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/fe/navigation/SelectionVariant", "sap/insights/CardHelper", "sap/insights/base/InMemoryCachingHost", "sap/m/HBox", "sap/m/HeaderContainer", "sap/m/VBox", "sap/ui/core/EventBus", "sap/ui/integration/widgets/Card", "sap/ui/model/json/JSONModel", "sap/ushell/Container", "sap/ushell/api/S4MyHome", "./BasePanel", "./MenuItem", "./utils/AppManager", "./utils/CommonUtils", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/DragDropUtils", "./utils/FESRUtil", "./utils/InsightsUtils", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (Log, GridContainer, GridContainerSettings, SelectionVariant, CardHelper, InsightsInMemoryCachingHost, HBox, HeaderContainer, VBox, EventBus, Card, JSONModel, Container, S4MyHome, __BasePanel, __MenuItem, __AppManager, ___utils_CommonUtils, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_DragDropUtils, ___utils_FESRUtil, ___utils_InsightsUtils, __PersonalisationUtils, __UShellPersonalizer) {
5
+ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/fe/navigation/SelectionVariant", "sap/insights/CardHelper", "sap/insights/base/InMemoryCachingHost", "sap/m/Button", "sap/m/HBox", "sap/m/HeaderContainer", "sap/m/VBox", "sap/ui/core/EventBus", "sap/ui/integration/widgets/Card", "sap/ui/model/json/JSONModel", "sap/ushell/Container", "sap/ushell/api/S4MyHome", "./BasePanel", "./ErrorPanel", "./MenuItem", "./utils/AppManager", "./utils/CommonUtils", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/DragDropUtils", "./utils/FESRUtil", "./utils/InsightsUtils", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (Log, GridContainer, GridContainerSettings, SelectionVariant, CardHelper, InsightsInMemoryCachingHost, Button, HBox, HeaderContainer, VBox, EventBus, Card, JSONModel, Container, S4MyHome, __BasePanel, __ErrorPanel, __MenuItem, __AppManager, ___utils_CommonUtils, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_DragDropUtils, ___utils_FESRUtil, ___utils_InsightsUtils, __PersonalisationUtils, __UShellPersonalizer) {
6
6
  "use strict";
7
7
 
8
8
  function _interopRequireDefault(obj) {
@@ -31,6 +31,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
31
31
  }
32
32
  return finalizer(false, result);
33
33
  }
34
+ const ErrorPanel = _interopRequireDefault(__ErrorPanel);
34
35
  const MenuItem = _interopRequireDefault(__MenuItem);
35
36
  const AppManager = _interopRequireDefault(__AppManager);
36
37
  const getPageManagerInstance = ___utils_CommonUtils["getPageManagerInstance"];
@@ -44,8 +45,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
44
45
  const addFESRId = ___utils_FESRUtil["addFESRId"];
45
46
  const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
46
47
  const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
47
- const createShowMoreActionButton = ___utils_InsightsUtils["createShowMoreActionButton"];
48
- const createShowMoreMenuItem = ___utils_InsightsUtils["createShowMoreMenuItem"];
48
+ const getAssociatedFullScreenButton = ___utils_InsightsUtils["getAssociatedFullScreenButton"];
49
49
  const getAssociatedFullScreenMenuItem = ___utils_InsightsUtils["getAssociatedFullScreenMenuItem"];
50
50
  const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
51
51
  const targetsAreEqual = ___utils_InsightsUtils["targetsAreEqual"];
@@ -54,21 +54,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
54
54
  var cardsMenuItems = /*#__PURE__*/function (cardsMenuItems) {
55
55
  cardsMenuItems["REFRESH"] = "cards-refresh";
56
56
  cardsMenuItems["EDIT_CARDS"] = "cards-editCards";
57
- cardsMenuItems["AI_INSIGHT_CARD"] = "cards-addAIInsightCard";
58
57
  return cardsMenuItems;
59
58
  }(cardsMenuItems || {});
60
- var cardsContainerMenuItems = /*#__PURE__*/function (cardsContainerMenuItems) {
61
- cardsContainerMenuItems["REFRESH"] = "container-cards-refresh";
62
- cardsContainerMenuItems["EDIT_CARDS"] = "container-cards-editCards";
63
- cardsContainerMenuItems["SHOW_MORE"] = "cardsContainerFullScreenMenuItem";
64
- cardsContainerMenuItems["AI_INSIGHT_CARD"] = "container-cards-addAIInsightCard";
65
- return cardsContainerMenuItems;
66
- }(cardsContainerMenuItems || {});
67
- var cardsContainerActionButtons = /*#__PURE__*/function (cardsContainerActionButtons) {
68
- cardsContainerActionButtons["SHOW_MORE"] = "cardsContanerFullScreenActionButton";
69
- return cardsContainerActionButtons;
70
- }(cardsContainerActionButtons || {});
71
- const sortedMenuItems = [cardsMenuItems.REFRESH, cardsMenuItems.EDIT_CARDS, cardsMenuItems.AI_INSIGHT_CARD, "showMore", "settings"];
59
+ var cardsActionButtons = /*#__PURE__*/function (cardsActionButtons) {
60
+ cardsActionButtons["SHOW_MORE"] = "fullScreen";
61
+ return cardsActionButtons;
62
+ }(cardsActionButtons || {});
63
+ var errorPanelMenuItems = /*#__PURE__*/function (errorPanelMenuItems) {
64
+ errorPanelMenuItems["EDIT_CARDS"] = "cards-errorPanel-editCards";
65
+ return errorPanelMenuItems;
66
+ }(errorPanelMenuItems || {});
67
+ const sortedMenuItems = [cardsMenuItems.REFRESH, cardsMenuItems.EDIT_CARDS, "showMore", "settings"];
72
68
  const Constants = {
73
69
  PLACEHOLDER_CARD_COUNT: 10,
74
70
  CARDS_GAP: 16
@@ -173,7 +169,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
173
169
  this.aVisibleCardInstances = [];
174
170
  this.cardsInViewport = [];
175
171
  this._appSwitched = false;
176
- this._headerVisible = false;
172
+ this.cardHelper = null;
177
173
  },
178
174
  /**
179
175
  * Initializes the Cards Panel.
@@ -184,6 +180,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
184
180
  init: function _init() {
185
181
  const _this = this;
186
182
  BasePanel.prototype.init.call(this);
183
+ this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")}`);
187
184
  this.setProperty("key", "cards");
188
185
  this.setProperty("enableFullScreen", true);
189
186
  this.cardWidth = "19rem";
@@ -208,10 +205,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
208
205
  // Subscribe to the event
209
206
  this.oEventBus.subscribe("importChannel", "cardsImport", function (sChannelId, sEventId, oData) {
210
207
  try {
211
- return Promise.resolve(_this.initializeCardHelper()).then(function () {
212
- return Promise.resolve(_this._createCards(oData)).then(function () {
213
- _this._importdone();
214
- });
208
+ return Promise.resolve(_this._createCards(oData)).then(function () {
209
+ _this._importdone();
215
210
  });
216
211
  } catch (e) {
217
212
  return Promise.reject(e);
@@ -268,8 +263,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
268
263
  _createCards: function _createCards(aCards) {
269
264
  try {
270
265
  const _this3 = this;
271
- return Promise.resolve(_this3.cardHelperInstance?._createCards(aCards)).then(function () {
272
- return _this3.rerenderCards();
266
+ return Promise.resolve(_this3.getCardHelper()).then(function (cardHelper) {
267
+ return Promise.resolve(cardHelper?._createCards(aCards)).then(function () {
268
+ return _this3.rerenderCards();
269
+ });
273
270
  });
274
271
  } catch (e) {
275
272
  return Promise.reject(e);
@@ -315,8 +312,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
315
312
  try {
316
313
  const sType = oEvent.getParameter("type");
317
314
  let oParameters = oEvent.getParameter("parameters") || {};
318
- const _temp3 = function () {
315
+ const _temp5 = function () {
319
316
  if (sType === "Navigation" && oParameters.ibnTarget) {
317
+ function _temp4() {
318
+ let aContentActions = _this4.getContentActions(oIntegrationCardManifest);
319
+ const oHeaderAction = aHeaderActions[0] || {},
320
+ oContentAction = aContentActions[0] || {};
321
+ const bOldCardExtension = !!(oHeaderAction?.parameters && typeof oHeaderAction.parameters === "string" && oHeaderAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1 || oContentAction?.parameters && typeof oContentAction.parameters === "string" && oContentAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1);
322
+ _this4._manageOldCardExtension(bOldCardExtension, oEvent, oParameters);
323
+ return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
324
+ return Promise.resolve(navigationService.navigate({
325
+ target: oParameters.ibnTarget,
326
+ params: oParameters.ibnParams
327
+ })).then(function () {
328
+ addFESRNavigationSource(FESRNavigationSource.Cards);
329
+ });
330
+ });
331
+ }
320
332
  oEvent.preventDefault();
321
333
  const oCard = oEvent.getParameter("card") || {},
322
334
  oIntegrationCardManifest = oCard?.getManifestEntry("sap.card") || {},
@@ -328,25 +340,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
328
340
  if (oIntegrationCardManifest?.configuration?.parameters?._semanticDateRangeSetting?.value) {
329
341
  oCheckSemanticProperty = JSON.parse(oIntegrationCardManifest.configuration.parameters._semanticDateRangeSetting.value);
330
342
  }
331
- if (oCheckSemanticProperty && Object.keys(oCheckSemanticProperty).length) {
332
- oParameters = _this4.cardHelperInstance.processSemanticDate(oParameters, oIntegrationCardManifest);
333
- }
334
- let aContentActions = _this4.getContentActions(oIntegrationCardManifest);
335
- const oHeaderAction = aHeaderActions[0] || {},
336
- oContentAction = aContentActions[0] || {};
337
- const bOldCardExtension = !!(oHeaderAction?.parameters && typeof oHeaderAction.parameters === "string" && oHeaderAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1 || oContentAction?.parameters && typeof oContentAction.parameters === "string" && oContentAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1);
338
- _this4._manageOldCardExtension(bOldCardExtension, oEvent, oParameters);
339
- return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
340
- return Promise.resolve(navigationService.navigate({
341
- target: oParameters.ibnTarget,
342
- params: oParameters.ibnParams
343
- })).then(function () {
344
- addFESRNavigationSource(FESRNavigationSource.Cards);
345
- });
346
- });
343
+ const _temp3 = function () {
344
+ if (oCheckSemanticProperty && Object.keys(oCheckSemanticProperty).length) {
345
+ return Promise.resolve(_this4.getCardHelper()).then(function (cardHelper) {
346
+ oParameters = cardHelper?.processSemanticDate(oParameters, oIntegrationCardManifest);
347
+ });
348
+ }
349
+ }();
350
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
347
351
  }
348
352
  }();
349
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
353
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
350
354
  } catch (e) {
351
355
  return Promise.reject(e);
352
356
  }
@@ -408,25 +412,27 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
408
412
  return Promise.resolve(_this7._getManifestEntryFromCard(oCard, "sap.insights").then(function (oEntry) {
409
413
  try {
410
414
  if (oEntry) {
411
- return Promise.resolve(_this7.cardHelperInstance.getParentAppDetails({
412
- descriptorContent: oCard.getManifestEntry("/")
413
- })).then(function (parentApp) {
414
- if (parentApp.semanticObject && parentApp.action) {
415
- return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
416
- const intents = [{
417
- target: {
418
- semanticObject: parentApp.semanticObject,
419
- action: parentApp.action
420
- }
421
- }];
422
- return Promise.resolve(navigationService.isNavigationSupported(intents)).then(function (_navigationService$is) {
423
- const aResponses = _navigationService$is;
424
- return aResponses[0].supported || false;
415
+ return Promise.resolve(_this7.getCardHelper()).then(function (cardHelper) {
416
+ return Promise.resolve(cardHelper?.getParentAppDetails({
417
+ descriptorContent: oCard.getManifestEntry("/")
418
+ })).then(function (parentApp) {
419
+ if (parentApp.semanticObject && parentApp.action) {
420
+ return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
421
+ const intents = [{
422
+ target: {
423
+ semanticObject: parentApp.semanticObject,
424
+ action: parentApp.action
425
+ }
426
+ }];
427
+ return Promise.resolve(navigationService.isNavigationSupported(intents)).then(function (_navigationService$is) {
428
+ const aResponses = _navigationService$is;
429
+ return aResponses[0].supported || false;
430
+ });
425
431
  });
426
- });
427
- } else {
428
- return true;
429
- }
432
+ } else {
433
+ return true;
434
+ }
435
+ });
430
436
  });
431
437
  } else {
432
438
  return Promise.resolve(false);
@@ -441,17 +447,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
441
447
  },
442
448
  action: function (oCard) {
443
449
  try {
444
- return Promise.resolve(_this8.cardHelperInstance.getParentAppDetails({
445
- descriptorContent: oCard.getManifestEntry("/")
446
- })).then(function (parentApp) {
447
- const sShellHash = parentApp.semanticURL || parentApp.semanticObject;
448
- return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
449
- return Promise.resolve(navigationService.navigate({
450
- target: {
451
- shellHash: sShellHash
452
- }
453
- })).then(function () {
454
- addFESRNavigationSource(FESRNavigationSource.Cards);
450
+ return Promise.resolve(_this8.getCardHelper()).then(function (cardHelper) {
451
+ return Promise.resolve(cardHelper?.getParentAppDetails({
452
+ descriptorContent: oCard.getManifestEntry("/")
453
+ })).then(function (parentApp) {
454
+ const sShellHash = parentApp.semanticURL || parentApp.semanticObject;
455
+ return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
456
+ return Promise.resolve(navigationService.navigate({
457
+ target: {
458
+ shellHash: sShellHash
459
+ }
460
+ })).then(function () {
461
+ addFESRNavigationSource(FESRNavigationSource.Cards);
462
+ });
455
463
  });
456
464
  });
457
465
  });
@@ -554,7 +562,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
554
562
  refreshData: function _refreshData() {
555
563
  try {
556
564
  const _this9 = this;
557
- const _temp4 = _catch(function () {
565
+ const _temp6 = _catch(function () {
558
566
  return Promise.resolve(CardHelper.getServiceAsync()).then(function (_getServiceAsync) {
559
567
  _this9.cardHelperInstance = _getServiceAsync;
560
568
  return Promise.resolve(_this9.cardHelperInstance._refreshUserCards(false)).then(function () {
@@ -564,30 +572,33 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
564
572
  }, function (error) {
565
573
  Log.error("Failed to refresh cards: ", error instanceof Error ? error.message : error);
566
574
  });
567
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
575
+ return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
568
576
  } catch (e) {
569
577
  return Promise.reject(e);
570
578
  }
571
579
  },
572
580
  /**
573
- * Initializes the card helper and page manager if not already done.
581
+ * Retrieves the Card Helper instance.
574
582
  *
575
583
  * @private
576
- * @returns {Promise<void>}
584
+ * @returns {Promise<ICardHelperInstance>} A promise that resolves with the Card Helper instance.
577
585
  */
578
- initializeCardHelper: function _initializeCardHelper() {
586
+ getCardHelper: function _getCardHelper() {
579
587
  try {
580
588
  const _this0 = this;
581
- const _temp5 = function () {
589
+ function _temp8() {
590
+ return _this0.cardHelperInstance;
591
+ }
592
+ const _temp7 = function () {
582
593
  if (!_this0.cardHelperInstance) {
583
594
  _this0.pageManagerInstance = _this0.pageManagerInstance || getPageManagerInstance(_this0);
584
- return Promise.resolve(Promise.all([CardHelper.getServiceAsync(), _this0.pageManagerInstance.hasCustomSpace()])).then(function ([cardHelperInstance, hasCustomSpace]) {
595
+ return Promise.resolve(Promise.all([_this0.getCardHelperService(), _this0.pageManagerInstance.hasCustomSpace()])).then(function ([cardHelperInstance, hasCustomSpace]) {
585
596
  _this0.cardHelperInstance = cardHelperInstance;
586
597
  _this0.hasCustomSpace = hasCustomSpace;
587
598
  });
588
599
  }
589
600
  }();
590
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
601
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
591
602
  } catch (e) {
592
603
  return Promise.reject(e);
593
604
  }
@@ -601,15 +612,35 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
601
612
  renderPanel: function _renderPanel() {
602
613
  try {
603
614
  const _this1 = this;
604
- return Promise.resolve(_this1.initializeCardHelper()).then(function () {
615
+ const _temp9 = _catch(function () {
605
616
  return Promise.resolve(_this1.rerenderCards()).then(function () {
606
617
  _this1.fireEvent("loaded");
607
618
  });
619
+ }, function (error) {
620
+ Log.error(error instanceof Error ? error.message : String(error));
608
621
  });
622
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
609
623
  } catch (e) {
610
624
  return Promise.reject(e);
611
625
  }
612
626
  },
627
+ /**
628
+ * Sorts the menu items based on the provided order.
629
+ *
630
+ * @private
631
+ * @param {string[]} menuItems - The order of the menu items.
632
+ */
633
+ _sortMenuItems: function _sortMenuItems(menuItems) {
634
+ const panelMenuItems = this.getAggregation("menuItems");
635
+ let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
636
+ this.removeAllAggregation("menuItems");
637
+ sortedMenuItems?.forEach(menuItem => this.addAggregation("menuItems", menuItem));
638
+ },
639
+ _setMenuItemsVisibility: function _setMenuItemsVisibility(menuItem, bVisible) {
640
+ if (menuItem && (menuItem.getId().includes(cardsMenuItems.REFRESH) || menuItem.getId().includes(cardsMenuItems.EDIT_CARDS) || menuItem.getId().includes("showMore"))) {
641
+ menuItem.setVisible(bVisible);
642
+ }
643
+ },
613
644
  /**
614
645
  * Rerenders the cards.
615
646
  *
@@ -623,75 +654,100 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
623
654
  _this10._cardsRendered = new Promise((resolve, reject) => {
624
655
  void function () {
625
656
  try {
626
- const _temp1 = _catch(function () {
657
+ const _temp13 = _catch(function () {
627
658
  // Enable placeholders after updating/rerendering cards
628
- const sDefaultAggreName = _this10._getCardContainer().getMetadata().getDefaultAggregationName();
629
- _this10._getCardContainer().removeAllAggregation(sDefaultAggreName);
659
+ const sDefaultAggreName = _this10._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
660
+ _this10._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
630
661
  _this10._showPlaceHolders();
631
662
  // Fetch Cards from insights service
632
- const preferedCardIDs = _this10.hasCustomSpace ? PREFERED_CARDS : [];
633
- return Promise.resolve(_this10.cardHelperInstance?._getUserVisibleCardModel(preferedCardIDs)).then(function (userVisibleCardModel) {
634
- const aCards = userVisibleCardModel.getProperty("/cards");
635
- const listBinding = userVisibleCardModel?.bindList("/cards");
636
- if (!listBinding.hasListeners("change")) {
637
- listBinding?.enableExtendedChangeDetection(true, "/cards", {});
638
- listBinding?.attachChange(function () {
639
- try {
640
- return Promise.resolve(_this10._cardsRendered ?? Promise.resolve()).then(function () {
641
- const visibleCards = userVisibleCardModel.getProperty("/cards");
642
- if (visibleCards.length !== _this10.aVisibleCardInstances.length && visibleCards.length > 0) {
643
- _this10._showCards(visibleCards);
644
- } else if (!visibleCards.length) {
645
- _this10.fireHandleHidePanel();
646
- }
647
- });
648
- } catch (e) {
649
- return Promise.reject(e);
650
- }
651
- });
652
- }
653
- _this10._controlModel.setProperty("/userVisibleCards", aCards);
654
- return Promise.resolve(_this10.getPersonalisationProperty(RECOMMENDATION_PATH)).then(function (showRecommendation) {
655
- function _temp0() {
656
- _this10._cardsRendered = undefined;
657
- resolve();
658
- }
659
- const _temp9 = function () {
660
- if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
661
- return Promise.resolve(_this10._getRecommendationCards()).then(function () {});
662
- } else {
663
- const _temp8 = function () {
664
- if (aCards.length) {
665
- function _temp7() {
666
- // from available cards, check for old recommended cards and update it if present,
667
- // else show available visible cards
668
- return Promise.resolve(_this10.checkForRecommendedCards(aCards)).then(function () {});
663
+ return Promise.resolve(_this10.getCardHelper()).then(function (cardHelper) {
664
+ const preferedCardIDs = _this10.hasCustomSpace ? PREFERED_CARDS : [];
665
+ return Promise.resolve(cardHelper._getUserVisibleCardModel(preferedCardIDs)).then(function (userVisibleCardModel) {
666
+ const aCards = userVisibleCardModel.getProperty("/cards");
667
+ const listBinding = userVisibleCardModel?.bindList("/cards");
668
+ if (!listBinding.hasListeners("change")) {
669
+ listBinding?.enableExtendedChangeDetection(true, "/cards", {});
670
+ listBinding?.attachChange(function () {
671
+ try {
672
+ return Promise.resolve(_this10._cardsRendered ?? Promise.resolve()).then(function () {
673
+ const visibleCards = userVisibleCardModel.getProperty("/cards");
674
+ if (visibleCards.length !== _this10.aVisibleCardInstances.length && visibleCards.length > 0) {
675
+ // Show cards in UI
676
+ _this10._showCards(visibleCards);
677
+ } else if (!visibleCards.length) {
678
+ //if there are no tiles, hide the panel and show the error panel
679
+ _this10.setProperty("title", `${_this10._i18nBundle?.getText("insightsCards")}`);
680
+ _this10.getMenuItems().forEach(item => {
681
+ _this10._setMenuItemsVisibility(item, false);
682
+ });
683
+ _this10.fireHandleHidePanel();
684
+ _this10._addErrorPanel();
669
685
  }
670
- const _temp6 = function () {
671
- if (showRecommendation === undefined) {
672
- return Promise.resolve(_this10._updateRecommendationStatus()).then(function () {});
673
- }
674
- }();
675
- return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
676
- } else {
677
- _this10.fireHandleHidePanel();
678
- }
679
- }();
680
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
686
+ });
687
+ } catch (e) {
688
+ return Promise.reject(e);
689
+ }
690
+ });
691
+ }
692
+ _this10._controlModel.setProperty("/userVisibleCards", aCards);
693
+ return Promise.resolve(_this10.getPersonalisationProperty(RECOMMENDATION_PATH)).then(function (showRecommendation) {
694
+ function _temp12() {
695
+ _this10._cardsRendered = undefined;
696
+ resolve();
681
697
  }
682
- }();
683
- return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
698
+ const _temp11 = function () {
699
+ if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
700
+ return Promise.resolve(_this10._getRecommendationCards()).then(function () {});
701
+ } else {
702
+ const _temp10 = function () {
703
+ if (aCards.length) {
704
+ function _temp1() {
705
+ // from available cards, check for old recommended cards and update it if present,
706
+ // else show available visible cards
707
+ return Promise.resolve(_this10.checkForRecommendedCards(aCards)).then(function () {});
708
+ }
709
+ _this10._errorPanel?.setVisible(false);
710
+ //Update the panel title with the number of cards
711
+ _this10.setProperty("title", `${_this10._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
712
+ //if the panel has been loaded and has cards, update the visibility of header elements of the panel
713
+ _this10.getMenuItems().forEach(item => {
714
+ _this10._setMenuItemsVisibility(item, true);
715
+ });
716
+ const _temp0 = function () {
717
+ if (showRecommendation === undefined) {
718
+ return Promise.resolve(_this10._updateRecommendationStatus()).then(function () {});
719
+ }
720
+ }();
721
+ return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
722
+ } else {
723
+ _this10.fireHandleHidePanel();
724
+ _this10._addErrorPanel();
725
+ const layout = _this10._getCardsContainer()?._getLayout();
726
+ if (layout.getProperty("expanded")) {
727
+ _this10.cardsContainer.addContent(_this10);
728
+ layout?.toggleFullScreen(_this10);
729
+ //remove the cards panel from the cards container
730
+ _this10.cardsContainer.removeContent(_this10);
731
+ }
732
+ }
733
+ }();
734
+ if (_temp10 && _temp10.then) return _temp10.then(function () {});
735
+ }
736
+ }();
737
+ return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
738
+ });
684
739
  });
685
740
  });
686
741
  }, function (error) {
687
742
  _this10.fireHandleHidePanel();
743
+ _this10._addErrorPanel(false);
688
744
  _this10._cardsRendered = undefined;
689
745
  if (error instanceof Error) {
690
746
  Log.error(error.message);
691
747
  reject(error);
692
748
  }
693
749
  });
694
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
750
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
695
751
  } catch (e) {
696
752
  return Promise.reject(e);
697
753
  }
@@ -703,6 +759,48 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
703
759
  return Promise.reject(e);
704
760
  }
705
761
  },
762
+ /**
763
+ * Adds an error panel when no cards are available.
764
+ *
765
+ * @private
766
+ */
767
+ _addErrorPanel: function _addErrorPanel(showActions = true) {
768
+ const parentContainer = this._getCardsContainer();
769
+ //set the visibility of cards panel to false
770
+ this.setVisible(false);
771
+ if (!this._errorPanel) {
772
+ this._errorPanel = new ErrorPanel(`${this.getId()}-errorCardsPanel`, {
773
+ additionalData: [new Button(`${this.getId()}-addInsightsCardsBtn`, {
774
+ text: this._i18nBundle.getText("addInsightsCardBtn"),
775
+ type: "Emphasized",
776
+ press: () => {
777
+ this._getCardsContainer()?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
778
+ }
779
+ })],
780
+ messageTitle: this._i18nBundle.getText("noAppsTitle"),
781
+ messageDescription: this._i18nBundle.getText("noInsightsCardsMsg")
782
+ });
783
+ this._errorPanel.getData();
784
+ //Add the menu items and action buttons to the error panel
785
+ const editCardsMenuItem = this._createEditCardsMenuItem(errorPanelMenuItems.EDIT_CARDS, "manageCards");
786
+ this._errorPanel.addAggregation("menuItems", editCardsMenuItem);
787
+ this._sortMenuItems(sortedMenuItems);
788
+ this._errorPanel.setProperty("enableSettings", true);
789
+ }
790
+ this._errorPanel.getProperty("additionalData").forEach(control => control.setVisible(showActions));
791
+ //Add the title to the error panel
792
+ this._errorPanel.setProperty("title", this._i18nBundle?.getText("insightsCards"));
793
+ this._errorPanel.setVisible(true);
794
+ parentContainer.addAggregation("content", this._errorPanel);
795
+ //set the visibility of header elements of the error panel
796
+ this._errorPanel.getMenuItems().forEach(item => {
797
+ if (item.getId().includes(errorPanelMenuItems.EDIT_CARDS) && showActions || item.getId().includes("settings")) {
798
+ item.setVisible(true);
799
+ } else {
800
+ item.setVisible(false);
801
+ }
802
+ });
803
+ },
706
804
  /**
707
805
  * Sets the new visible cards in the model and updates the UI.
708
806
  * @private
@@ -710,11 +808,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
710
808
  setNewVisibleCards: function _setNewVisibleCards() {
711
809
  try {
712
810
  const _this11 = this;
713
- const preferedCardIDs = _this11.hasCustomSpace ? PREFERED_CARDS : [];
714
- return Promise.resolve(_this11.cardHelperInstance._getUserVisibleCardModel(preferedCardIDs)).then(function (visibleCardModel) {
715
- const aNewCards = visibleCardModel.getProperty("/cards");
716
- _this11._controlModel.setProperty("/userVisibleCards", aNewCards);
717
- _this11._showCards(aNewCards);
811
+ return Promise.resolve(_this11.getCardHelper()).then(function (cardHelper) {
812
+ const preferedCardIDs = _this11.hasCustomSpace ? PREFERED_CARDS : [];
813
+ return Promise.resolve(cardHelper?._getUserVisibleCardModel(preferedCardIDs)).then(function (visibleCardModel) {
814
+ const aNewCards = visibleCardModel.getProperty("/cards");
815
+ _this11._controlModel.setProperty("/userVisibleCards", aNewCards);
816
+ _this11._showCards(aNewCards);
817
+ });
718
818
  });
719
819
  } catch (e) {
720
820
  return Promise.reject(e);
@@ -753,18 +853,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
753
853
  const uniqueManifestDetails = _this12.getUniqueManifestDetails(manifestIds);
754
854
  return Promise.resolve(_this12.regenerateCards(uniqueManifestDetails, manifestIds)).then(function (aUpdatedCards) {
755
855
  let _exit2 = false;
756
- function _temp11(_result2) {
856
+ function _temp15(_result2) {
757
857
  return _exit2 ? _result2 : Promise.resolve(_this12.setNewVisibleCards()).then(function () {});
758
858
  }
759
- const _temp10 = function () {
859
+ const _temp14 = function () {
760
860
  if (aUpdatedCards?.length) {
761
861
  // Update the model with updated cards
762
- return Promise.resolve(_this12.cardHelperInstance._updateCards(aUpdatedCards.map(oCard => oCard?.newManifest?.descriptorContent))).then(function () {});
862
+ return Promise.resolve(_this12.getCardHelper()).then(function (cardHelper) {
863
+ return Promise.resolve(cardHelper?._updateCards(aUpdatedCards.map(oCard => oCard?.newManifest?.descriptorContent))).then(function () {});
864
+ });
763
865
  } else {
764
866
  _exit2 = true;
765
867
  }
766
868
  }();
767
- return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
869
+ return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
768
870
  });
769
871
  } else {
770
872
  _this12._showCards(aCards);
@@ -959,19 +1061,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
959
1061
  _getPersonalizationData: function _getPersonalizationData() {
960
1062
  try {
961
1063
  const _this15 = this;
962
- function _temp13() {
1064
+ function _temp17() {
963
1065
  return Promise.resolve(_this15.oPersonalizer.read()).then(function (oPersData) {
964
1066
  return oPersData || {};
965
1067
  });
966
1068
  }
967
- const _temp12 = function () {
1069
+ const _temp16 = function () {
968
1070
  if (!_this15.oPersonalizer) {
969
1071
  return Promise.resolve(_this15._getPersonalization()).then(function (_this15$_getPersonali) {
970
1072
  _this15.oPersonalizer = _this15$_getPersonali;
971
1073
  });
972
1074
  }
973
1075
  }();
974
- return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12));
1076
+ return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16));
975
1077
  } catch (e) {
976
1078
  return Promise.reject(e);
977
1079
  }
@@ -1015,9 +1117,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1015
1117
  try {
1016
1118
  const _this18 = this;
1017
1119
  const cardManifests = aRecommendedCards.map(oCard => oCard.descriptorContent);
1018
- return Promise.resolve(_this18.cardHelperInstance?._createCards(cardManifests)).then(function () {
1019
- return Promise.resolve(_this18._updateRecommendationStatus()).then(function () {
1020
- return _this18.setNewVisibleCards();
1120
+ return Promise.resolve(_this18.getCardHelper()).then(function (cardHelper) {
1121
+ return Promise.resolve(cardHelper?._createCards(cardManifests)).then(function () {
1122
+ return Promise.resolve(_this18._updateRecommendationStatus()).then(function () {
1123
+ return _this18.setNewVisibleCards();
1124
+ });
1021
1125
  });
1022
1126
  });
1023
1127
  } catch (e) {
@@ -1052,12 +1156,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1052
1156
  rowSize: this.cardHeight,
1053
1157
  gap: "1rem"
1054
1158
  });
1055
- this.cardsContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
1159
+ this.cardsWrapperContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
1056
1160
  visible: "{= !${/isPhone}}"
1057
1161
  }).addStyleClass("sapUiSmallMarginTop").setLayout(this.cardsContainerSettings);
1058
- this.cardsContainer.setModel(this._controlModel);
1059
- this.addDragDropConfigTo(this.cardsContainer, oEvent => this._handleCardsDnd(oEvent));
1060
- return this.cardsContainer;
1162
+ this.cardsWrapperContainer.setModel(this._controlModel);
1163
+ this.addDragDropConfigTo(this.cardsWrapperContainer, oEvent => this._handleCardsDnd(oEvent));
1164
+ return this.cardsWrapperContainer;
1061
1165
  },
1062
1166
  /**
1063
1167
  * Creates the mobile card container.
@@ -1104,9 +1208,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1104
1208
  });
1105
1209
 
1106
1210
  // add HBox as item to GridList
1107
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1211
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1108
1212
  if (sDefaultAggreName) {
1109
- this._getCardContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
1213
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
1110
1214
  }
1111
1215
  },
1112
1216
  /**
@@ -1116,7 +1220,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1116
1220
  * @returns {number} The number of placeholder cards that should be displayed. Defaults to 1 if no valid count is determined.
1117
1221
  */
1118
1222
  _calculatePlaceholderCardCount: function _calculatePlaceholderCardCount() {
1119
- const layoutDomRef = this._getInsightsContainer()?._getLayout()?.getDomRef();
1223
+ const layoutDomRef = this._getCardsContainer()?._getLayout()?.getDomRef();
1120
1224
  let count = 0;
1121
1225
  if (layoutDomRef) {
1122
1226
  const sectionDomRef = layoutDomRef.childNodes[0];
@@ -1144,14 +1248,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1144
1248
  * @param {ICard[]} aCards - The cards to display.
1145
1249
  */
1146
1250
  _showCards: function _showCards(aCards) {
1147
- const panelName = this.getMetadata().getName();
1251
+ const parentContainer = this._getCardsContainer();
1252
+ parentContainer.removeContent(this._errorPanel);
1148
1253
  this.fireHandleUnhidePanel();
1149
- this._getInsightsContainer()?.updatePanelsItemCount(aCards.length, panelName);
1150
- if (this._headerVisible) {
1151
- this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
1152
- }
1153
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1154
- this._getCardContainer().removeAllAggregation(sDefaultAggreName);
1254
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1255
+ this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
1155
1256
  this.aVisibleCardInstances = [];
1156
1257
  this.cardsInViewport = [];
1157
1258
 
@@ -1195,8 +1296,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1195
1296
  });
1196
1297
 
1197
1298
  // add VBox as item to GridList
1198
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1199
- this._getCardContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
1299
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1300
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
1200
1301
  });
1201
1302
  },
1202
1303
  /**
@@ -1206,34 +1307,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1206
1307
  * @param {Event} event - The event object.
1207
1308
  */
1208
1309
  _handleEditCards: function _handleEditCards(event) {
1209
- /* If called from Panel Header event.source() will return TilesPanel, if called from Insights Container event.source() will return InsightsContainer.
1310
+ /* If called from Panel Header event.source() will return TilesPanel, if called from cards Container event.source() will return cardsContainer.
1210
1311
  _getLayout is available at Container Level*/
1211
1312
  let parent = event.getSource().getParent() || this;
1212
- if (parent instanceof CardsPanel) {
1313
+ if (parent instanceof CardsPanel || parent instanceof ErrorPanel) {
1213
1314
  parent = parent.getParent();
1214
1315
  }
1215
1316
  parent?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
1216
1317
  },
1217
- /**
1218
- * Hides the header of the cards panel.
1219
- *
1220
- * @private
1221
- */
1222
- handleHideHeader: function _handleHideHeader() {
1223
- this._headerVisible = false;
1224
- this.setProperty("title", "");
1225
- this._toggleHeaderActions(false);
1226
- },
1227
- /**
1228
- * Adds the header to the cards panel.
1229
- *
1230
- * @private
1231
- */
1232
- handleAddHeader: function _handleAddHeader() {
1233
- this._headerVisible = true;
1234
- this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${this._controlModel.getProperty("/userVisibleCards")?.length})`);
1235
- this._toggleHeaderActions(true);
1236
- },
1237
1318
  /**
1238
1319
  * Refreshes the cards.
1239
1320
  *
@@ -1259,24 +1340,26 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1259
1340
  iDropItemIndex = oDragItem.getParent().indexOfItem(oDropItem);
1260
1341
  _this19._cardsFlexWrapper?.setBusy(true);
1261
1342
  // take the moved item from dragIndex and add to dropindex
1262
- const _temp16 = _finallyRethrows(function () {
1343
+ const _temp20 = _finallyRethrows(function () {
1263
1344
  return _catch(function () {
1264
- function _temp15() {
1345
+ function _temp19() {
1265
1346
  setTimeout(() => {
1266
- focusDraggedItem(_this19._getCardContainer(), iDropItemIndex);
1347
+ focusDraggedItem(_this19._getCardWrapperContainer(), iDropItemIndex);
1267
1348
  }, 0);
1268
1349
  }
1269
- const _temp14 = function () {
1350
+ const _temp18 = function () {
1270
1351
  if (!_this19._controlModel.getProperty("/userAllCards").length) {
1271
- return Promise.resolve(_this19.cardHelperInstance._getUserAllCardModel()).then(function (userAllCardsModel) {
1272
- _this19._controlModel.setProperty("/userAllCards", userAllCardsModel.getProperty("/cards"));
1273
- return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
1352
+ return Promise.resolve(_this19.getCardHelper()).then(function (cardHelper) {
1353
+ return Promise.resolve(cardHelper?._getUserAllCardModel()).then(function (userAllCardsModel) {
1354
+ _this19._controlModel.setProperty("/userAllCards", userAllCardsModel.getProperty("/cards"));
1355
+ return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
1356
+ });
1274
1357
  });
1275
1358
  } else {
1276
1359
  return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
1277
1360
  }
1278
1361
  }();
1279
- return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
1362
+ return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
1280
1363
  }, function (error) {
1281
1364
  if (error instanceof Error) {
1282
1365
  Log.error(error.message);
@@ -1287,7 +1370,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1287
1370
  if (_wasThrown) throw _result3;
1288
1371
  return _result3;
1289
1372
  });
1290
- return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(function () {}) : void 0);
1373
+ return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(function () {}) : void 0);
1291
1374
  } catch (e) {
1292
1375
  return Promise.reject(e);
1293
1376
  }
@@ -1318,18 +1401,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1318
1401
  } else if (sInsertPosition === "After" && iUpdatedDragItemIndex > iUpdatedDropItemIndex) {
1319
1402
  iUpdatedDropItemIndex++;
1320
1403
  }
1321
- const _temp17 = function () {
1404
+ const _temp21 = function () {
1322
1405
  if (iUpdatedDragItemIndex !== iUpdatedDropItemIndex) {
1323
- const aUpdatedCards = _this20.cardHelperInstance.handleDndCardsRanking(iUpdatedDragItemIndex, iUpdatedDropItemIndex, aUserAllCards);
1324
- return Promise.resolve(_this20.cardHelperInstance._updateMultipleCards(aUpdatedCards, "PUT")).then(function () {
1325
- _this20._sortCardsOnRank(aUserAllCards);
1326
- _this20._controlModel.setProperty("/userAllCards", aUserAllCards);
1327
- _this20._controlModel.setProperty("/userVisibleCards", aUserAllCards.filter(oCard => oCard.visibility));
1328
- return Promise.resolve(_this20.rerenderCards()).then(function () {});
1406
+ return Promise.resolve(_this20.getCardHelper()).then(function (cardHelper) {
1407
+ const aUpdatedCards = cardHelper?.handleDndCardsRanking(iUpdatedDragItemIndex, iUpdatedDropItemIndex, aUserAllCards);
1408
+ return Promise.resolve(cardHelper?._updateMultipleCards(aUpdatedCards, "PUT")).then(function () {
1409
+ _this20._sortCardsOnRank(aUserAllCards);
1410
+ _this20._controlModel.setProperty("/userAllCards", aUserAllCards);
1411
+ _this20._controlModel.setProperty("/userVisibleCards", aUserAllCards.filter(oCard => oCard.visibility));
1412
+ return Promise.resolve(_this20.rerenderCards()).then(function () {});
1413
+ });
1329
1414
  });
1330
1415
  }
1331
1416
  }();
1332
- return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
1417
+ return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
1333
1418
  } catch (e) {
1334
1419
  return Promise.reject(e);
1335
1420
  }
@@ -1386,7 +1471,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1386
1471
  * @returns {number} - The number of visible cards.
1387
1472
  */
1388
1473
  _calculateVisibleCardCount: function _calculateVisibleCardCount() {
1389
- const layout = this._getInsightsContainer()._getLayout();
1474
+ const layout = this._getCardsContainer()._getLayout();
1390
1475
  const pageDomRef = layout.getDomRef();
1391
1476
  const deviceType = this.getDeviceType();
1392
1477
  let count = 1;
@@ -1422,7 +1507,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1422
1507
  * @override
1423
1508
  */
1424
1509
  _adjustLayout: function _adjustLayout() {
1425
- const layout = this._getInsightsContainer()?._getLayout();
1510
+ const layout = this._getCardsContainer()?._getLayout();
1426
1511
  let cardWidth = this.cardWidth;
1427
1512
  const isMobileDevice = this.getDeviceType() === DeviceType.Mobile;
1428
1513
  if (layout && this.aVisibleCardInstances?.length > 0) {
@@ -1439,8 +1524,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1439
1524
  // update cards in viewport
1440
1525
  if (cardCount !== this.cardsInViewport.length) {
1441
1526
  this.cardsInViewport = this.aVisibleCardInstances.slice(0, cardCount);
1442
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1443
- this._getCardContainer().removeAllAggregation(sDefaultAggreName);
1527
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1528
+ this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
1444
1529
  this.cardsInViewport.forEach(card => {
1445
1530
  const manifest = card.getManifest();
1446
1531
  const sType = manifest["sap.card"]?.type;
@@ -1463,22 +1548,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1463
1548
  if (overlayHBoxWrapper) {
1464
1549
  cardWrapper.addItem(overlayHBoxWrapper);
1465
1550
  }
1466
- const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
1467
- this._getCardContainer().addAggregation(sDefaultAggreName, cardWrapper);
1551
+ const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
1552
+ this._getCardWrapperContainer().addAggregation(sDefaultAggreName, cardWrapper);
1468
1553
  });
1469
1554
  this.shareCardsInViewport();
1470
1555
  }
1471
-
1472
- // show/hide Full Screen Button if available
1556
+ // show/hide full screen button
1473
1557
  const showFullScreenButton = isElementExpanded || this.aVisibleCardInstances.length > cardCount;
1474
- if (this._headerVisible) {
1475
- this._getInsightsContainer()?.toggleFullScreenElements(this, showFullScreenButton);
1476
- } else {
1477
- const fullScreenButton = getAssociatedFullScreenMenuItem(this);
1478
- const fullScreenText = fullScreenButton?.getTitle();
1479
- this._getInsightsContainer()?.updateMenuItem(this._controlMap.get(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`), showFullScreenButton, fullScreenText);
1480
- this._getInsightsContainer()?.updateActionButton(this._controlMap.get(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`), showFullScreenButton, fullScreenText);
1481
- }
1558
+ const fullScreenButton = getAssociatedFullScreenMenuItem(this);
1559
+ const fullScreenText = fullScreenButton.getTitle();
1560
+ //update the panel menu-item show more button and show more action button in panel header
1561
+ fullScreenButton?.setVisible(showFullScreenButton);
1562
+ fullScreenButton?.setTitle(fullScreenText);
1563
+ const fullScreenActionButton = getAssociatedFullScreenButton(this);
1564
+ fullScreenActionButton?.setVisible(showFullScreenButton);
1565
+ fullScreenActionButton?.setText(fullScreenText);
1482
1566
  } else {
1483
1567
  this.cardWidth = this.getDeviceType() === DeviceType.Mobile ? "19rem" : "22rem";
1484
1568
  }
@@ -1489,50 +1573,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1489
1573
  this.cardsContainerSettings?.setColumnSize(this.cardWidth);
1490
1574
  }
1491
1575
  },
1492
- /**
1493
- * Retrieves the menu items for the container.
1494
- *
1495
- * @private
1496
- * @returns {MenuItem[]} An array of MenuItem instances.
1497
- */
1498
- getContainerMenuItems: function _getContainerMenuItems() {
1499
- if (!this._containerMenuItems) {
1500
- const containerRefreshMenuItem = this._createRefreshMenuItem(cardsContainerMenuItems.REFRESH, "containerCardsRefresh");
1501
- const containerEditCardsMenuItem = this._createEditCardsMenuItem(cardsContainerMenuItems.EDIT_CARDS, "containerManageCards");
1502
- const containerShowMoreMenuItem = createShowMoreMenuItem(this, cardsContainerMenuItems.SHOW_MORE, "containerCardsShowMore");
1503
- this._controlMap.set(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`, containerShowMoreMenuItem);
1504
- this._containerMenuItems = [containerRefreshMenuItem, containerEditCardsMenuItem, containerShowMoreMenuItem];
1505
- }
1506
- return this._containerMenuItems;
1507
- },
1508
- /**
1509
- * Retrieves the action buttons for the container.
1510
- *
1511
- * @private
1512
- * @returns {Button[]} An array of Button instances.
1513
- */
1514
- getContainerActionButtons: function _getContainerActionButtons() {
1515
- if (!this._containerActionButtons) {
1516
- this._containerActionButtons = [];
1517
- const actionButton = createShowMoreActionButton(this, cardsContainerActionButtons.SHOW_MORE, "containerCardsShowMore");
1518
- if (actionButton) {
1519
- this._controlMap.set(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`, actionButton);
1520
- this._containerActionButtons.push(actionButton);
1521
- }
1522
- }
1523
- return this._containerActionButtons;
1524
- },
1525
1576
  /**
1526
1577
  * Retrieves the insights container.
1527
1578
  *
1528
1579
  * @private
1529
- * @returns {InsightsContainer} - The insights container.
1580
+ * @returns {CardsContainer} - The cards container.
1530
1581
  */
1531
- _getInsightsContainer: function _getInsightsContainer() {
1532
- if (!this.insightsContainer) {
1533
- this.insightsContainer = this.getParent();
1582
+ _getCardsContainer: function _getCardsContainer() {
1583
+ if (!this.cardsContainer) {
1584
+ this.cardsContainer = this.getParent();
1534
1585
  }
1535
- return this.insightsContainer;
1586
+ return this.cardsContainer;
1536
1587
  },
1537
1588
  /**
1538
1589
  * Creates the refresh menu item.
@@ -1576,18 +1627,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1576
1627
  }
1577
1628
  return menuItem;
1578
1629
  },
1579
- /**
1580
- * Toggles the visibility of the header actions.
1581
- *
1582
- * @param {boolean} bShow - Whether to show or hide the header actions.
1583
- * @private
1584
- */
1585
- _toggleHeaderActions: function _toggleHeaderActions(bShow) {
1586
- this.getAggregation("menuItems")?.forEach(menuItem => {
1587
- this._getInsightsContainer()?.toggleMenuListItem(menuItem, bShow);
1588
- });
1589
- this.getAggregation("actionButtons")?.forEach(actionButton => this._getInsightsContainer()?.toggleActionButton(actionButton, bShow));
1590
- },
1591
1630
  /**
1592
1631
  * Retrieves the card container based on the device type.
1593
1632
  *
@@ -1595,23 +1634,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1595
1634
  * @returns {GridContainer | HeaderContainer} - The card container.
1596
1635
  *
1597
1636
  */
1598
- _getCardContainer: function _getCardContainer() {
1637
+ _getCardWrapperContainer: function _getCardWrapperContainer() {
1599
1638
  if (this.getDeviceType() === DeviceType.Mobile) {
1600
1639
  return this.cardsMobileContainer;
1601
1640
  }
1602
- return this.cardsContainer;
1603
- },
1604
- /**
1605
- * Sorts the menu items based on the provided order.
1606
- *
1607
- * @private
1608
- * @param {string[]} menuItems - The order of the menu items.
1609
- */
1610
- _sortMenuItems: function _sortMenuItems(menuItems) {
1611
- const panelMenuItems = this.getAggregation("menuItems");
1612
- let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
1613
- this.removeAllAggregation("menuItems");
1614
- sortedMenuItems?.forEach(menuItem => this.addAggregation("menuItems", menuItem));
1641
+ return this.cardsWrapperContainer;
1615
1642
  },
1616
1643
  /**
1617
1644
  * Shares the cards that are currently in the viewport by firing the "visibleCardsUpdated" event.
@@ -1637,11 +1664,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1637
1664
  exit: function _exit() {
1638
1665
  runtimeHostCreated = false;
1639
1666
  this.getAggregation("host")?.destroy();
1667
+ },
1668
+ /**
1669
+ * Initializes the CardHelper service promise.
1670
+ *
1671
+ * @private
1672
+ * @returns {Promise<ICardHelperInstance>} - card helper service.
1673
+ */
1674
+ getCardHelperService: function _getCardHelperService() {
1675
+ if (this.cardHelper === null) {
1676
+ this.cardHelper = CardHelper.getServiceAsync();
1677
+ }
1678
+ return this.cardHelper;
1679
+ },
1680
+ /**
1681
+ * Checks if insights service is enabled.
1682
+ *
1683
+ * @private
1684
+ * @returns {Promise<boolean>} - true if insights service is enabled else false.
1685
+ */
1686
+ isInsightsEnabled: function _isInsightsEnabled() {
1687
+ try {
1688
+ const _this22 = this;
1689
+ return Promise.resolve(_catch(function () {
1690
+ return Promise.resolve(_this22.getCardHelperService()).then(function (_this22$getCardHelper) {
1691
+ return _this22$getCardHelper !== null;
1692
+ });
1693
+ }, function (error) {
1694
+ Log.error(error instanceof Error ? error.message : String(error));
1695
+ return false;
1696
+ }));
1697
+ } catch (e) {
1698
+ return Promise.reject(e);
1699
+ }
1640
1700
  }
1641
1701
  });
1642
1702
  CardsPanel.cardsMenuItems = cardsMenuItems;
1643
- CardsPanel.cardsContainerMenuItems = cardsContainerMenuItems;
1644
- CardsPanel.cardsContainerActionButtons = cardsContainerActionButtons;
1703
+ CardsPanel.cardsActionButtons = cardsActionButtons;
1704
+ CardsPanel.errorPanelMenuItems = errorPanelMenuItems;
1645
1705
  return CardsPanel;
1646
1706
  });
1647
1707
  //# sourceMappingURL=CardsPanel.js.map