@sapui5/sap.cux.home 1.142.0 → 1.143.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) 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/App.d.ts.map +1 -1
  9. package/src/sap/cux/home/App.js +3 -0
  10. package/src/sap/cux/home/App.js.map +1 -1
  11. package/src/sap/cux/home/App.ts +3 -0
  12. package/src/sap/cux/home/AppsAdditionPanel.d.ts +74 -34
  13. package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
  14. package/src/sap/cux/home/AppsAdditionPanel.js +344 -146
  15. package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
  16. package/src/sap/cux/home/AppsAdditionPanel.ts +367 -149
  17. package/src/sap/cux/home/AppsContainer.js +2 -1
  18. package/src/sap/cux/home/AppsContainer.js.map +1 -1
  19. package/src/sap/cux/home/AppsContainer.ts +2 -2
  20. package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
  21. package/src/sap/cux/home/BaseContainer.js +9 -1
  22. package/src/sap/cux/home/BaseContainer.js.map +1 -1
  23. package/src/sap/cux/home/BaseContainer.ts +6 -2
  24. package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
  25. package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
  26. package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
  27. package/src/sap/cux/home/BaseContainerRenderer.ts +6 -0
  28. package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
  29. package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
  30. package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
  31. package/src/sap/cux/home/BasePanel.js +3 -2
  32. package/src/sap/cux/home/BasePanel.js.map +1 -1
  33. package/src/sap/cux/home/BasePanel.ts +2 -1
  34. package/src/sap/cux/home/CardsContainer.d.ts +108 -0
  35. package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
  36. package/src/sap/cux/home/CardsContainer.js +207 -0
  37. package/src/sap/cux/home/CardsContainer.js.map +1 -0
  38. package/src/sap/cux/home/CardsContainer.ts +202 -0
  39. package/src/sap/cux/home/CardsPanel.d.ts +25 -59
  40. package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
  41. package/src/sap/cux/home/CardsPanel.js +157 -155
  42. package/src/sap/cux/home/CardsPanel.js.map +1 -1
  43. package/src/sap/cux/home/CardsPanel.ts +152 -175
  44. package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
  45. package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
  46. package/src/sap/cux/home/ContentAdditionDialog.js +12 -6
  47. package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
  48. package/src/sap/cux/home/ContentAdditionDialog.ts +13 -5
  49. package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
  50. package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
  51. package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
  52. package/src/sap/cux/home/ErrorPanel.js +11 -16
  53. package/src/sap/cux/home/ErrorPanel.js.map +1 -1
  54. package/src/sap/cux/home/ErrorPanel.ts +7 -19
  55. package/src/sap/cux/home/FavAppPanel.d.ts +1 -2
  56. package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
  57. package/src/sap/cux/home/FavAppPanel.js +296 -301
  58. package/src/sap/cux/home/FavAppPanel.js.map +1 -1
  59. package/src/sap/cux/home/FavAppPanel.ts +18 -14
  60. package/src/sap/cux/home/InsightsAdditionPanel.d.ts +4 -4
  61. package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
  62. package/src/sap/cux/home/InsightsAdditionPanel.js +10 -9
  63. package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
  64. package/src/sap/cux/home/InsightsAdditionPanel.ts +9 -8
  65. package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
  66. package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
  67. package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +3 -3
  68. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
  69. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
  70. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
  71. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
  72. package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +288 -58
  73. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
  74. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
  75. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
  76. package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
  77. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
  78. package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
  79. package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
  80. package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
  81. package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
  82. package/src/sap/cux/home/Layout.d.ts +3 -1
  83. package/src/sap/cux/home/Layout.d.ts.map +1 -1
  84. package/src/sap/cux/home/Layout.js +45 -8
  85. package/src/sap/cux/home/Layout.js.map +1 -1
  86. package/src/sap/cux/home/Layout.ts +55 -8
  87. package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
  88. package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
  89. package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
  90. package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
  91. package/src/sap/cux/home/LayoutSettingsPanel.ts +380 -64
  92. package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -14
  93. package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
  94. package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
  95. package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
  96. package/src/sap/cux/home/NewsContainer.js.map +1 -0
  97. package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +29 -118
  98. package/src/sap/cux/home/NewsGroup.js.map +1 -1
  99. package/src/sap/cux/home/NewsGroup.ts +1 -1
  100. package/src/sap/cux/home/NewsPanel.js +2 -2
  101. package/src/sap/cux/home/NewsPanel.js.map +1 -1
  102. package/src/sap/cux/home/NewsPanel.ts +3 -3
  103. package/src/sap/cux/home/NewsSettingsPanel.js +3 -3
  104. package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
  105. package/src/sap/cux/home/NewsSettingsPanel.ts +4 -4
  106. package/src/sap/cux/home/PagePanel.d.ts +1 -1
  107. package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
  108. package/src/sap/cux/home/PagePanel.js +18 -10
  109. package/src/sap/cux/home/PagePanel.js.map +1 -1
  110. package/src/sap/cux/home/PagePanel.ts +25 -15
  111. package/src/sap/cux/home/PagesContainer.d.ts +72 -0
  112. package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
  113. package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
  114. package/src/sap/cux/home/PagesContainer.js +333 -0
  115. package/src/sap/cux/home/PagesContainer.js.map +1 -0
  116. package/src/sap/cux/home/PagesContainer.ts +179 -0
  117. package/src/sap/cux/home/SettingsDialog.d.ts +7 -0
  118. package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
  119. package/src/sap/cux/home/SettingsDialog.js +18 -10
  120. package/src/sap/cux/home/SettingsDialog.js.map +1 -1
  121. package/src/sap/cux/home/SettingsDialog.ts +20 -13
  122. package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
  123. package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
  124. package/src/sap/cux/home/SpaceInsightsPanel.js +66 -132
  125. package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
  126. package/src/sap/cux/home/SpaceInsightsPanel.ts +69 -151
  127. package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
  128. package/src/sap/cux/home/TaskPanel.js +14 -12
  129. package/src/sap/cux/home/TaskPanel.js.map +1 -1
  130. package/src/sap/cux/home/TaskPanel.ts +17 -15
  131. package/src/sap/cux/home/TilesContainer.d.ts +111 -0
  132. package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
  133. package/src/sap/cux/home/TilesContainer.js +218 -0
  134. package/src/sap/cux/home/TilesContainer.js.map +1 -0
  135. package/src/sap/cux/home/TilesContainer.ts +216 -0
  136. package/src/sap/cux/home/TilesPanel.d.ts +22 -52
  137. package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
  138. package/src/sap/cux/home/TilesPanel.js +184 -165
  139. package/src/sap/cux/home/TilesPanel.js.map +1 -1
  140. package/src/sap/cux/home/TilesPanel.ts +160 -154
  141. package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
  142. package/src/sap/cux/home/ToDoPanel.js +30 -58
  143. package/src/sap/cux/home/ToDoPanel.js.map +1 -1
  144. package/src/sap/cux/home/ToDoPanel.ts +29 -28
  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 +33 -13
  175. package/src/sap/cux/home/i18n/messagebundle_ar.properties +8 -4
  176. package/src/sap/cux/home/i18n/messagebundle_bg.properties +8 -4
  177. package/src/sap/cux/home/i18n/messagebundle_ca.properties +8 -4
  178. package/src/sap/cux/home/i18n/messagebundle_cnr.properties +8 -4
  179. package/src/sap/cux/home/i18n/messagebundle_cs.properties +8 -4
  180. package/src/sap/cux/home/i18n/messagebundle_cy.properties +8 -4
  181. package/src/sap/cux/home/i18n/messagebundle_da.properties +8 -4
  182. package/src/sap/cux/home/i18n/messagebundle_de.properties +8 -4
  183. package/src/sap/cux/home/i18n/messagebundle_el.properties +8 -4
  184. package/src/sap/cux/home/i18n/messagebundle_en.properties +9 -5
  185. package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +8 -4
  186. package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +14 -6
  187. package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +14 -6
  188. package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +8 -4
  189. package/src/sap/cux/home/i18n/messagebundle_es.properties +8 -4
  190. package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +8 -4
  191. package/src/sap/cux/home/i18n/messagebundle_et.properties +8 -4
  192. package/src/sap/cux/home/i18n/messagebundle_fi.properties +8 -4
  193. package/src/sap/cux/home/i18n/messagebundle_fr.properties +8 -4
  194. package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +8 -4
  195. package/src/sap/cux/home/i18n/messagebundle_hi.properties +8 -4
  196. package/src/sap/cux/home/i18n/messagebundle_hr.properties +8 -4
  197. package/src/sap/cux/home/i18n/messagebundle_hu.properties +8 -4
  198. package/src/sap/cux/home/i18n/messagebundle_id.properties +8 -4
  199. package/src/sap/cux/home/i18n/messagebundle_it.properties +10 -6
  200. package/src/sap/cux/home/i18n/messagebundle_iw.properties +8 -4
  201. package/src/sap/cux/home/i18n/messagebundle_ja.properties +8 -4
  202. package/src/sap/cux/home/i18n/messagebundle_kk.properties +8 -4
  203. package/src/sap/cux/home/i18n/messagebundle_ko.properties +8 -4
  204. package/src/sap/cux/home/i18n/messagebundle_lt.properties +8 -4
  205. package/src/sap/cux/home/i18n/messagebundle_lv.properties +8 -4
  206. package/src/sap/cux/home/i18n/messagebundle_mk.properties +8 -4
  207. package/src/sap/cux/home/i18n/messagebundle_ms.properties +8 -4
  208. package/src/sap/cux/home/i18n/messagebundle_nl.properties +8 -4
  209. package/src/sap/cux/home/i18n/messagebundle_no.properties +8 -4
  210. package/src/sap/cux/home/i18n/messagebundle_pl.properties +8 -4
  211. package/src/sap/cux/home/i18n/messagebundle_pt.properties +8 -4
  212. package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +8 -4
  213. package/src/sap/cux/home/i18n/messagebundle_ro.properties +8 -4
  214. package/src/sap/cux/home/i18n/messagebundle_ru.properties +8 -4
  215. package/src/sap/cux/home/i18n/messagebundle_sh.properties +8 -4
  216. package/src/sap/cux/home/i18n/messagebundle_sk.properties +8 -4
  217. package/src/sap/cux/home/i18n/messagebundle_sl.properties +8 -4
  218. package/src/sap/cux/home/i18n/messagebundle_sr.properties +8 -4
  219. package/src/sap/cux/home/i18n/messagebundle_sv.properties +8 -4
  220. package/src/sap/cux/home/i18n/messagebundle_th.properties +8 -4
  221. package/src/sap/cux/home/i18n/messagebundle_tr.properties +8 -4
  222. package/src/sap/cux/home/i18n/messagebundle_uk.properties +8 -4
  223. package/src/sap/cux/home/i18n/messagebundle_vi.properties +8 -4
  224. package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +8 -4
  225. package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +8 -4
  226. package/src/sap/cux/home/interface/AppsInterface.d.ts +1 -0
  227. package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
  228. package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
  229. package/src/sap/cux/home/interface/AppsInterface.ts +1 -0
  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/AppManager.d.ts.map +1 -1
  251. package/src/sap/cux/home/utils/AppManager.js +2 -1
  252. package/src/sap/cux/home/utils/AppManager.js.map +1 -1
  253. package/src/sap/cux/home/utils/AppManager.ts +2 -2
  254. package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
  255. package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
  256. package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
  257. package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
  258. package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
  259. package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +155 -151
  260. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
  261. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
  262. package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
  263. package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
  264. package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
  265. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
  266. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
  267. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
  268. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
  269. package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
  270. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
  271. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
  272. package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
  273. package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
  274. package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
  275. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
  276. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
  277. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
  278. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
  279. package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
  280. package/ui5.yaml +1 -0
  281. package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
  282. package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
  283. package/src/sap/cux/home/InsightsContainer.js +0 -459
  284. package/src/sap/cux/home/InsightsContainer.js.map +0 -1
  285. package/src/sap/cux/home/InsightsContainer.ts +0 -489
  286. package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
  287. package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
  288. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
  289. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
  290. package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
  291. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
  292. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
  293. package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +0 -1
@@ -2,10 +2,11 @@
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/ui/core/dnd/DragDropInfo", "sap/ui/core/Element", "sap/ui/core/Lib", "sap/ui/core/library", "./utils/Device", "./utils/DragDropUtils"], function (DragDropInfo, Element, Lib, sap_ui_core_library, ___utils_Device, ___utils_DragDropUtils) {
5
+ sap.ui.define(["sap/ui/core/dnd/DragDropInfo", "sap/ui/core/Element", "sap/ui/core/Lib", "sap/ui/core/library", "./utils/DataFormatUtils", "./utils/Device", "./utils/DragDropUtils"], function (DragDropInfo, Element, Lib, sap_ui_core_library, ___utils_DataFormatUtils, ___utils_Device, ___utils_DragDropUtils) {
6
6
  "use strict";
7
7
 
8
8
  const dnd = sap_ui_core_library["dnd"];
9
+ const recycleId = ___utils_DataFormatUtils["recycleId"];
9
10
  const calculateDeviceType = ___utils_Device["calculateDeviceType"];
10
11
  const attachKeyboardHandler = ___utils_DragDropUtils["attachKeyboardHandler"];
11
12
  /**
@@ -207,7 +208,7 @@ sap.ui.define(["sap/ui/core/dnd/DragDropInfo", "sap/ui/core/Element", "sap/ui/co
207
208
  return container ? container.getDeviceType() : calculateDeviceType();
208
209
  },
209
210
  addDragDropConfigTo: function _addDragDropConfigTo(container, dropHandler, keyboardHandler, dropPositionType = dnd.DropPosition.Between) {
210
- container.addDragDropConfig(new DragDropInfo(`${container.getId()}--addDragDropConfig`, {
211
+ container.addDragDropConfig(new DragDropInfo(recycleId(`${container.getId()}--addDragDropConfig`), {
211
212
  sourceAggregation: "items",
212
213
  targetAggregation: "items",
213
214
  dropPosition: dropPositionType,
@@ -1 +1 @@
1
- {"version":3,"file":"BasePanel.js","names":["sap","ui","define","DragDropInfo","Element","Lib","sap_ui_core_library","___utils_Device","___utils_DragDropUtils","dnd","calculateDeviceType","attachKeyboardHandler","BasePanel","extend","metadata","library","properties","title","type","group","defaultValue","key","visible","showBadge","visibility","tooltip","enableSettings","enableKeyUserSettings","enableFullScreen","fullScreenName","defaultAggregation","aggregations","content","multiple","singularName","actionButtons","menuItems","events","onExpand","loaded","associations","fullScreenButton","constructor","_constructor","id","settings","Element.prototype.constructor.call","init","_init","_i18nBundle","getResourceBundleFor","getProperty","setProperty","getId","_setCount","count","getParent","_setPanelCount","_showBadge","show","_setPanelBadge","getDeviceType","_getDeviceType","container","addDragDropConfigTo","_addDragDropConfigTo","dropHandler","keyboardHandler","dropPositionType","DropPosition","Between","addDragDropConfig","sourceAggregation","targetAggregation","dropPosition","dropLayout","DropLayout","Horizontal","drop","attachBrowserEvent","event","disableNavigation","metaKey","ctrlKey","dragDropEvent"],"sources":["BasePanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport GridContainer from \"sap/f/GridContainer\";\nimport FlexBox from \"sap/m/FlexBox\";\nimport HeaderContainer from \"sap/m/HeaderContainer\";\nimport DragDropInfo from \"sap/ui/core/dnd/DragDropInfo\";\nimport { DropInfo$DropEvent } from \"sap/ui/core/dnd/DropInfo\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Element from \"sap/ui/core/Element\";\nimport Lib from \"sap/ui/core/Lib\";\nimport { dnd } from \"sap/ui/core/library\";\nimport BaseContainer from \"./BaseContainer\";\nimport { $BasePanelSettings } from \"./BasePanel\";\nimport { DeviceType, calculateDeviceType } from \"./utils/Device\";\nimport { attachKeyboardHandler } from \"./utils/DragDropUtils\";\n\n/**\n *\n * Abstract base class for all panels placed in {@link sap.cux.home.BaseContainer}.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BasePanel\n */\nexport default abstract class BasePanel extends Element {\n\tprotected _i18nBundle!: ResourceBundle;\n\n\tconstructor(id?: string | $BasePanelSettings);\n\tconstructor(id?: string, settings?: $BasePanelSettings);\n\t/**\n\t * Constructor for a new Base Panel.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $BasePanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Title for the panel.\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Key for the panel.\n\t\t\t */\n\t\t\tkey: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Specifies whether the panel should be visible.\n\t\t\t */\n\t\t\tvisible: { type: \"boolean\", group: \"Misc\", defaultValue: true },\n\t\t\t/**\n\t\t\t * Specifies whether the badge should be shown on the panel.\n\t\t\t * Applicable only for Side-by-Side orientation.\n\t\t\t */\n\t\t\tshowBadge: { type: \"boolean\", group: \"Misc\", defaultValue: false, visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Tooltip for the panel.\n\t\t\t */\n\t\t\ttooltip: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies whether settings should be enabled for the panel.\n\t\t\t */\n\t\t\tenableSettings: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies whether key user settings should be enabled for the panel.\n\t\t\t */\n\t\t\tenableKeyUserSettings: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\", defaultValue: true },\n\t\t\t/**\n\t\t\t * Indicates whether full screen is enabled for this control.\n\t\t\t */\n\t\t\tenableFullScreen: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * The name of the URL parameter used to expand the container into full-screen mode.\n\t\t\t * This property specifies the parameter key expected in the URL query string\n\t\t\t * to identify the container to be expanded.\n\t\t\t */\n\t\t\tfullScreenName: { type: \"string\", group: \"Misc\", visibility: \"hidden\" }\n\t\t},\n\t\tdefaultAggregation: \"content\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Specifies the content aggregation of the panel.\n\t\t\t */\n\t\t\tcontent: { multiple: true, singularName: \"content\" },\n\t\t\t/**\n\t\t\t * Specifies the actions to be shown within the panel.\n\t\t\t */\n\t\t\tactionButtons: { type: \"sap.m.Button\", multiple: true, singularName: \"actionButton\" },\n\t\t\t/**\n\t\t\t * Specifies the items that are shown within the dropdown menu of the panel.\n\t\t\t */\n\t\t\tmenuItems: { type: \"sap.cux.home.MenuItem\", multiple: true, singularName: \"menuItem\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Event is fired before the container is expanded.\n\t\t\t */\n\t\t\tonExpand: {},\n\t\t\t/**\n\t\t\t * Event is fired after the panel is loaded.\n\t\t\t */\n\t\t\tloaded: {}\n\t\t},\n\t\tassociations: {\n\t\t\tfullScreenButton: { type: \"sap.m.Button\", multiple: false, singularName: \"fullScreenButton\", visibility: \"hidden\" }\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tthis._i18nBundle = Lib.getResourceBundleFor(\"sap.cux.home.i18n\") as ResourceBundle;\n\n\t\t// set default key if not provided\n\t\tif (!this.getProperty(\"key\")) {\n\t\t\tthis.setProperty(\"key\", this.getId());\n\t\t}\n\t}\n\n\t/**\n\t * Updates the count information of IconTabFilter of IconTabBar inner control\n\t * in case of SideBySide layout\n\t *\n\t * @private\n\t * @param {string} count - updated count information\n\t */\n\tpublic _setCount(count?: string): void {\n\t\t(this.getParent() as BaseContainer)?._setPanelCount(this, count);\n\t}\n\n\t/**\n\t * Shows or hides the badge on the IconTabFilter of IconTabBar inner control\n\t *\n\t * @private\n\t * @param show - whether to show the badge\n\t */\n\tpublic _showBadge(show?: boolean): void {\n\t\tthis.setProperty(\"showBadge\", show, true);\n\t\t(this.getParent() as BaseContainer)?._setPanelBadge(this, show);\n\t}\n\n\t/**\n\t * Retrieves the device type for the current panel.\n\t *\n\t * @private\n\t * @returns {DeviceType} - The device type of the parent container if it exists,\n\t * otherwise calculates and returns the device type based on the current device width.\n\t */\n\tprotected getDeviceType(): DeviceType {\n\t\tconst container = this.getParent() as BaseContainer;\n\t\treturn container ? container.getDeviceType() : calculateDeviceType();\n\t}\n\n\tprotected addDragDropConfigTo(\n\t\tcontainer: GridContainer | FlexBox | HeaderContainer,\n\t\tdropHandler: (event: DropInfo$DropEvent) => void,\n\t\tkeyboardHandler?: (event: KeyboardEvent) => void,\n\t\tdropPositionType: dnd.DropPosition = dnd.DropPosition.Between\n\t): void {\n\t\tcontainer\n\t\t\t.addDragDropConfig(\n\t\t\t\tnew DragDropInfo(`${container.getId()}--addDragDropConfig`, {\n\t\t\t\t\tsourceAggregation: \"items\",\n\t\t\t\t\ttargetAggregation: \"items\",\n\t\t\t\t\tdropPosition: dropPositionType,\n\t\t\t\t\tdropLayout: dnd.DropLayout.Horizontal,\n\t\t\t\t\tdrop: dropHandler\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attachBrowserEvent(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tconst disableNavigation = event.metaKey || event.ctrlKey;\n\t\t\t\tvoid attachKeyboardHandler(event, disableNavigation, (dragDropEvent: DropInfo$DropEvent) => {\n\t\t\t\t\tdropHandler(dragDropEvent);\n\t\t\t\t});\n\t\t\t});\n\t\tif (keyboardHandler) {\n\t\t\tcontainer.attachBrowserEvent(\"keydown\", keyboardHandler);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,yJAAAC,YAAA,EAAAC,OAAA,EAAAC,GAAA,EAAAC,mBAAA,EAAAC,eAAA,EAAAC,sBAAA;EAAA;;EAAA,MAcSC,GAAG,GAAAH,mBAAA;EAAA,MAGSI,mBAAmB,GAAAH,eAAA;EAAA,MAC/BI,qBAAqB,GAAAH,sBAAA;EAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAfA,MAgB8BI,SAAS,GAASR,OAAO,CAAAS,MAAA;IAetCC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,UAAU,EAAE;QACX;AACH;AACA;QACGC,KAAK,EAAE;UAAEC,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QAC1D;AACH;AACA;QACGC,GAAG,EAAE;UAAEH,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QACxD;AACH;AACA;QACGE,OAAO,EAAE;UAAEJ,IAAI,EAAE,SAAS;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAK,CAAC;QAC/D;AACH;AACA;AACA;QACGG,SAAS,EAAE;UAAE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;IAESsD,mBAAmB,WAAAC,qBAC5BF,SAAoD,EACpDG,WAAgD,EAChDC,eAAgD,EAChDC,gBAAkC,GAAG3D,GAAG,CAAC4D,YAAY,CAACC,OAAO,EACtD;MACPP,SAAS,CACPQ,iBAAiB,CACjB,IAAIpE,YAAY,CAAC,GAAG4D,SAAS,CAACV,KAAK,CAAC,CAAC,qBAAqB,EAAE;QAC3DmB,iBAAiB,EAAE,OAAO;QAC1BC,iBAAiB,EAAE,OAAO;QAC1BC,YAAY,EAAEN,gBAAgB;QAC9BO,UAAU,EAAElE,GAAG,CAACmE,UAAU,CAACC,UAAU;QACrCC,IAAI,EAAEZ;MACP,CAAC,CACF,CAAC,CACAa,kBAAkB,CAAC,SAAS,EAAGC,KAAoB,IAAK;QACxD,MAAMC,iBAAiB,GAAGD,KAAK,CAACE,OAAO,IAAIF,KAAK,CAACG,OAAO;QACxD,KAAKxE,qBAAqB,CAACqE,KAAK,EAAEC,iBAAiB,EAAGG,aAAiC,IAAK;UAC3FlB,WAAW,CAACkB,aAAa,CAAC;QAC3B,CAAC,CAAC;MACH,CAAC,CAAC;MACH,IAAIjB,eAAe,EAAE;QACpBJ,SAAS,CAACgB,kBAAkB,CAAC,SAAS,EAAEZ,eAAe,CAAC;MACzD;IACD;EAAC;EAAA,OAlK4BvD,SAAS;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"BasePanel.js","names":["sap","ui","define","DragDropInfo","Element","Lib","sap_ui_core_library","___utils_DataFormatUtils","___utils_Device","___utils_DragDropUtils","dnd","recycleId","calculateDeviceType","attachKeyboardHandler","BasePanel","extend","metadata","library","properties","title","type","group","defaultValue","key","visible","showBadge","visibility","tooltip","enableSettings","enableKeyUserSettings","enableFullScreen","fullScreenName","defaultAggregation","aggregations","content","multiple","singularName","actionButtons","menuItems","events","onExpand","loaded","associations","fullScreenButton","constructor","_constructor","id","settings","Element.prototype.constructor.call","init","_init","_i18nBundle","getResourceBundleFor","getProperty","setProperty","getId","_setCount","count","getParent","_setPanelCount","_showBadge","show","_setPanelBadge","getDeviceType","_getDeviceType","container","addDragDropConfigTo","_addDragDropConfigTo","dropHandler","keyboardHandler","dropPositionType","DropPosition","Between","addDragDropConfig","sourceAggregation","targetAggregation","dropPosition","dropLayout","DropLayout","Horizontal","drop","attachBrowserEvent","event","disableNavigation","metaKey","ctrlKey","dragDropEvent"],"sources":["BasePanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport GridContainer from \"sap/f/GridContainer\";\nimport FlexBox from \"sap/m/FlexBox\";\nimport HeaderContainer from \"sap/m/HeaderContainer\";\nimport DragDropInfo from \"sap/ui/core/dnd/DragDropInfo\";\nimport { DropInfo$DropEvent } from \"sap/ui/core/dnd/DropInfo\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Element from \"sap/ui/core/Element\";\nimport Lib from \"sap/ui/core/Lib\";\nimport { dnd } from \"sap/ui/core/library\";\nimport BaseContainer from \"./BaseContainer\";\nimport { $BasePanelSettings } from \"./BasePanel\";\nimport { recycleId } from \"./utils/DataFormatUtils\";\nimport { DeviceType, calculateDeviceType } from \"./utils/Device\";\nimport { attachKeyboardHandler } from \"./utils/DragDropUtils\";\n\n/**\n *\n * Abstract base class for all panels placed in {@link sap.cux.home.BaseContainer}.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BasePanel\n */\nexport default abstract class BasePanel extends Element {\n\tprotected _i18nBundle!: ResourceBundle;\n\n\tconstructor(id?: string | $BasePanelSettings);\n\tconstructor(id?: string, settings?: $BasePanelSettings);\n\t/**\n\t * Constructor for a new Base Panel.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $BasePanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Title for the panel.\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Key for the panel.\n\t\t\t */\n\t\t\tkey: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Specifies whether the panel should be visible.\n\t\t\t */\n\t\t\tvisible: { type: \"boolean\", group: \"Misc\", defaultValue: true },\n\t\t\t/**\n\t\t\t * Specifies whether the badge should be shown on the panel.\n\t\t\t * Applicable only for Side-by-Side orientation.\n\t\t\t */\n\t\t\tshowBadge: { type: \"boolean\", group: \"Misc\", defaultValue: false, visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Tooltip for the panel.\n\t\t\t */\n\t\t\ttooltip: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies whether settings should be enabled for the panel.\n\t\t\t */\n\t\t\tenableSettings: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies whether key user settings should be enabled for the panel.\n\t\t\t */\n\t\t\tenableKeyUserSettings: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\", defaultValue: true },\n\t\t\t/**\n\t\t\t * Indicates whether full screen is enabled for this control.\n\t\t\t */\n\t\t\tenableFullScreen: { type: \"boolean\", group: \"Misc\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * The name of the URL parameter used to expand the container into full-screen mode.\n\t\t\t * This property specifies the parameter key expected in the URL query string\n\t\t\t * to identify the container to be expanded.\n\t\t\t */\n\t\t\tfullScreenName: { type: \"string\", group: \"Misc\", visibility: \"hidden\" }\n\t\t},\n\t\tdefaultAggregation: \"content\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Specifies the content aggregation of the panel.\n\t\t\t */\n\t\t\tcontent: { multiple: true, singularName: \"content\" },\n\t\t\t/**\n\t\t\t * Specifies the actions to be shown within the panel.\n\t\t\t */\n\t\t\tactionButtons: { type: \"sap.m.Button\", multiple: true, singularName: \"actionButton\" },\n\t\t\t/**\n\t\t\t * Specifies the items that are shown within the dropdown menu of the panel.\n\t\t\t */\n\t\t\tmenuItems: { type: \"sap.cux.home.MenuItem\", multiple: true, singularName: \"menuItem\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Event is fired before the container is expanded.\n\t\t\t */\n\t\t\tonExpand: {},\n\t\t\t/**\n\t\t\t * Event is fired after the panel is loaded.\n\t\t\t */\n\t\t\tloaded: {}\n\t\t},\n\t\tassociations: {\n\t\t\tfullScreenButton: { type: \"sap.m.Button\", multiple: false, singularName: \"fullScreenButton\", visibility: \"hidden\" }\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tthis._i18nBundle = Lib.getResourceBundleFor(\"sap.cux.home.i18n\") as ResourceBundle;\n\n\t\t// set default key if not provided\n\t\tif (!this.getProperty(\"key\")) {\n\t\t\tthis.setProperty(\"key\", this.getId());\n\t\t}\n\t}\n\n\t/**\n\t * Updates the count information of IconTabFilter of IconTabBar inner control\n\t * in case of SideBySide layout\n\t *\n\t * @private\n\t * @param {string} count - updated count information\n\t */\n\tpublic _setCount(count?: string): void {\n\t\t(this.getParent() as BaseContainer)?._setPanelCount(this, count);\n\t}\n\n\t/**\n\t * Shows or hides the badge on the IconTabFilter of IconTabBar inner control\n\t *\n\t * @private\n\t * @param show - whether to show the badge\n\t */\n\tpublic _showBadge(show?: boolean): void {\n\t\tthis.setProperty(\"showBadge\", show, true);\n\t\t(this.getParent() as BaseContainer)?._setPanelBadge(this, show);\n\t}\n\n\t/**\n\t * Retrieves the device type for the current panel.\n\t *\n\t * @private\n\t * @returns {DeviceType} - The device type of the parent container if it exists,\n\t * otherwise calculates and returns the device type based on the current device width.\n\t */\n\tprotected getDeviceType(): DeviceType {\n\t\tconst container = this.getParent() as BaseContainer;\n\t\treturn container ? container.getDeviceType() : calculateDeviceType();\n\t}\n\n\tprotected addDragDropConfigTo(\n\t\tcontainer: GridContainer | FlexBox | HeaderContainer,\n\t\tdropHandler: (event: DropInfo$DropEvent) => void,\n\t\tkeyboardHandler?: (event: KeyboardEvent) => void,\n\t\tdropPositionType: dnd.DropPosition = dnd.DropPosition.Between\n\t): void {\n\t\tcontainer\n\t\t\t.addDragDropConfig(\n\t\t\t\tnew DragDropInfo(recycleId(`${container.getId()}--addDragDropConfig`), {\n\t\t\t\t\tsourceAggregation: \"items\",\n\t\t\t\t\ttargetAggregation: \"items\",\n\t\t\t\t\tdropPosition: dropPositionType,\n\t\t\t\t\tdropLayout: dnd.DropLayout.Horizontal,\n\t\t\t\t\tdrop: dropHandler\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attachBrowserEvent(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tconst disableNavigation = event.metaKey || event.ctrlKey;\n\t\t\t\tvoid attachKeyboardHandler(event, disableNavigation, (dragDropEvent: DropInfo$DropEvent) => {\n\t\t\t\t\tdropHandler(dragDropEvent);\n\t\t\t\t});\n\t\t\t});\n\t\tif (keyboardHandler) {\n\t\t\tcontainer.attachBrowserEvent(\"keydown\", keyboardHandler);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,oLAAAC,YAAA,EAAAC,OAAA,EAAAC,GAAA,EAAAC,mBAAA,EAAAC,wBAAA,EAAAC,eAAA,EAAAC,sBAAA;EAAA;;EAAA,MAcSC,GAAG,GAAAJ,mBAAA;EAAA,MAGHK,SAAS,GAAAJ,wBAAA;EAAA,MACGK,mBAAmB,GAAAJ,eAAA;EAAA,MAC/BK,qBAAqB,G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AAK;UAC3FlB,WAAW,CAACkB,aAAa,CAAC;QAC3B,CAAC,CAAC;MACH,CAAC,CAAC;MACH,IAAIjB,eAAe,EAAE;QACpBJ,SAAS,CAACgB,kBAAkB,CAAC,SAAS,EAAEZ,eAAe,CAAC;MACzD;IACD;EAAC;EAAA,OAlK4BvD,SAAS;AAAA","ignoreList":[]}
@@ -15,6 +15,7 @@ import Lib from "sap/ui/core/Lib";
15
15
  import { dnd } from "sap/ui/core/library";
16
16
  import BaseContainer from "./BaseContainer";
17
17
  import { $BasePanelSettings } from "./BasePanel";
18
+ import { recycleId } from "./utils/DataFormatUtils";
18
19
  import { DeviceType, calculateDeviceType } from "./utils/Device";
19
20
  import { attachKeyboardHandler } from "./utils/DragDropUtils";
20
21
 
@@ -179,7 +180,7 @@ export default abstract class BasePanel extends Element {
179
180
  ): void {
180
181
  container
181
182
  .addDragDropConfig(
182
- new DragDropInfo(`${container.getId()}--addDragDropConfig`, {
183
+ new DragDropInfo(recycleId(`${container.getId()}--addDragDropConfig`), {
183
184
  sourceAggregation: "items",
184
185
  targetAggregation: "items",
185
186
  dropPosition: dropPositionType,
@@ -0,0 +1,108 @@
1
+ declare module "sap/cux/home/CardsContainer" {
2
+ /*!
3
+ * SAP UI development toolkit for HTML5 (SAPUI5)
4
+ * * (c) Copyright 2009-2025 SAP SE. All rights reserved
5
+ */
6
+ import BaseContainer, { $BaseContainerSettings } from "sap/cux/home/BaseContainer";
7
+ import BasePanel from "sap/cux/home/BasePanel";
8
+ import CardsPanel from "sap/cux/home/CardsPanel";
9
+ const cardsPanelName: string;
10
+ interface IpanelLoaded {
11
+ [key: string]: {
12
+ loaded: boolean | undefined;
13
+ count: number;
14
+ };
15
+ }
16
+ interface IpanelContext {
17
+ [key: string]: CardsPanel;
18
+ }
19
+ /**
20
+ *
21
+ * Container class for managing and storing Insights Cards.
22
+ *
23
+ * @extends sap.cux.home.BaseContainer
24
+ *
25
+ * @author SAP SE
26
+ * @version 0.0.1
27
+ * @since 1.142
28
+ *
29
+ * @private
30
+ * @ui5-restricted ux.eng.s4producthomes1
31
+ *
32
+ * @alias sap.cux.home.CardsContainer
33
+ */
34
+ export default class CardsContainer extends BaseContainer {
35
+ private panelLoaded;
36
+ private panelContext;
37
+ private _isInitialRender;
38
+ static readonly renderer: {
39
+ apiVersion: number;
40
+ render: (rm: import("sap/ui/core/RenderManager").default, control: BaseContainer) => void;
41
+ renderContent: (rm: import("sap/ui/core/RenderManager").default, control: BaseContainer) => void;
42
+ };
43
+ constructor(id?: string | $BaseContainerSettings);
44
+ constructor(id?: string, settings?: $BaseContainerSettings);
45
+ /**
46
+ * Init lifecycle method
47
+ *
48
+ * @private
49
+ * @override
50
+ */
51
+ init(): void;
52
+ /**
53
+ * Loads the Insights section.
54
+ * Overrides the load method of the BaseContainer.
55
+ *
56
+ * @private
57
+ * @override
58
+ */
59
+ load(): void;
60
+ /**
61
+ * Handles the hiding of a panel by removing its content, updating the panel load status,
62
+ * and managing the display of the container header and error panel.
63
+ *
64
+ * @param {BasePanel} panel - The panel to be hidden.
65
+ * @private
66
+ */
67
+ handleHidePanel(panel: BasePanel): void;
68
+ /**
69
+ * Unhides the specified panel if it is hidden.
70
+ *
71
+ * @param {CardsPanel} panel - The panel to unhide.
72
+ */
73
+ unhidePanelIfHidden(panel: CardsPanel): void;
74
+ /**
75
+ * Adjusts the layout of the container.
76
+ *
77
+ * @private
78
+ * @override
79
+ */
80
+ adjustLayout(): void;
81
+ /**
82
+ * Handles the loading of a panel.
83
+ *
84
+ * @param {string} panelName - The name of the panel.
85
+ * @param {object} oVal - The load status and count of the panel.
86
+ * @param {boolean} oVal.loaded - The load status of the panel.
87
+ * @param {number} oVal.count - The count of items in the panel.
88
+ */
89
+ handlePanelLoad(panelName: string, oVal: {
90
+ loaded: boolean;
91
+ count: number;
92
+ }): void;
93
+ /**
94
+ * Retrieves the generic placeholder content for the Cards container.
95
+ *
96
+ * @returns {string} The HTML string representing the cards container's placeholder content.
97
+ */
98
+ protected getGenericPlaceholderContent(): string;
99
+ /**
100
+ * Refreshes the data for a specific panel based on its key.
101
+ *
102
+ * @private
103
+ * @param {string} key - The key of the panel to refresh.
104
+ */
105
+ refreshData(key: string): Promise<void>;
106
+ }
107
+ }
108
+ //# sourceMappingURL=CardsContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardsContainer.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/CardsContainer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,6BAA6B,CAAC;IAC7C;;;OAGG;IACH,OAAO,aAAa,EAAE,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;IACnF,OAAO,SAAS,MAAM,wBAAwB,CAAC;IAC/C,OAAO,UAAU,MAAM,yBAAyB,CAAC;IAGjD,MAAM,cAAc,EAAE,MAAkC,CAAC;IAEzD,UAAU,YAAY;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9D;IACD,UAAU,aAAa;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;KAC1B;IACD;;;;;;;;;;;;;;OAcG;IAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa;QACxD,OAAO,CAAC,WAAW,CAAgB;QACnC,OAAO,CAAC,YAAY,CAAiB;QACrC,OAAO,CAAC,gBAAgB,CAAiB;QACzC,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;UAGtB;oBACU,EAAE,CAAC,EAAE,MAAM,GAAG,sBAAsB;oBACpC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB;QAW1D;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAoBnB;;;;;;WAMG;QACI,IAAI;QAkBX;;;;;;WAMG;QACI,eAAe,CAAC,KAAK,EAAE,SAAS;QAMvC;;;;WAIG;QACI,mBAAmB,CAAC,KAAK,EAAE,UAAU;QAkC5C;;;;;WAKG;QACI,YAAY;QAKnB;;;;;;;WAOG;QACI,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;QAOlF;;;;WAIG;QACH,SAAS,CAAC,4BAA4B,IAAI,MAAM;QAIhD;;;;;WAKG;QACU,WAAW,CAAC,GAAG,EAAE,MAAM;KAIpC;CAEA"}
@@ -0,0 +1,207 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ * * (c) Copyright 2009-2025 SAP SE. All rights reserved
4
+ */
5
+ sap.ui.define(["./BaseContainer", "./CardsPanel", "./utils/placeholder/CardsPlaceholder"], function (__BaseContainer, __CardsPanel, ___utils_placeholder_CardsPlaceholder) {
6
+ "use strict";
7
+
8
+ function _interopRequireDefault(obj) {
9
+ return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
10
+ }
11
+ const BaseContainer = _interopRequireDefault(__BaseContainer);
12
+ const CardsPanel = _interopRequireDefault(__CardsPanel);
13
+ const getCardsPlaceholder = ___utils_placeholder_CardsPlaceholder["getCardsPlaceholder"];
14
+ const cardsPanelName = "sap.cux.home.CardsPanel";
15
+ /**
16
+ *
17
+ * Container class for managing and storing Insights Cards.
18
+ *
19
+ * @extends sap.cux.home.BaseContainer
20
+ *
21
+ * @author SAP SE
22
+ * @version 0.0.1
23
+ * @since 1.142
24
+ *
25
+ * @private
26
+ * @ui5-restricted ux.eng.s4producthomes1
27
+ *
28
+ * @alias sap.cux.home.CardsContainer
29
+ */
30
+ const CardsContainer = BaseContainer.extend("sap.cux.home.CardsContainer", {
31
+ renderer: {
32
+ ...BaseContainer.renderer,
33
+ apiVersion: 2
34
+ },
35
+ /**
36
+ * Constructor for a new Cards container.
37
+ *
38
+ * @param {string} [id] ID for the new control, generated automatically if an ID is not provided
39
+ * @param {object} [settings] Initial settings for the new control
40
+ */
41
+ constructor: function _constructor(id, settings) {
42
+ BaseContainer.prototype.constructor.call(this, id, settings);
43
+ this._isInitialRender = true;
44
+ },
45
+ /**
46
+ * Init lifecycle method
47
+ *
48
+ * @private
49
+ * @override
50
+ */
51
+ init: function _init() {
52
+ BaseContainer.prototype.init.call(this);
53
+ /* As Container Level default value for enableSettings is false,
54
+ this needs to be added from container level.
55
+ (default value cannot be true as News & Page Container header should be hidden)
56
+ */
57
+ this.setProperty("enableSettings", false);
58
+ this.setProperty("orientation", "Vertical");
59
+ this.setProperty("compositeId", "Insights");
60
+ this.panelLoaded = {
61
+ [cardsPanelName]: {
62
+ loaded: undefined,
63
+ count: 0
64
+ }
65
+ };
66
+ this.panelContext = {};
67
+ this.addCustomSetting("title", this._i18nBundle.getText("insightsCards"));
68
+ this.addCustomSetting("groupTitle", this._i18nBundle.getText("insights"));
69
+ this.setTooltip(String(this._i18nBundle.getText("insightsCards")));
70
+ //remove aggregation menuItems and actionButtons as they will be added from individual panels
71
+ this.removeAllAggregation("menuItems");
72
+ this.removeAllAggregation("actionButtons");
73
+ },
74
+ /**
75
+ * Loads the Insights section.
76
+ * Overrides the load method of the BaseContainer.
77
+ *
78
+ * @private
79
+ * @override
80
+ */
81
+ load: function _load() {
82
+ if (this._isInitialRender) {
83
+ const aContent = this.getContent();
84
+ aContent.forEach(oContent => {
85
+ this.panelContext[oContent.getMetadata().getName()] = oContent;
86
+ });
87
+
88
+ // Render individual panels
89
+ aContent.forEach(content => {
90
+ const panel = content;
91
+ panel.attachHandleHidePanel(() => this.handleHidePanel(panel));
92
+ panel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));
93
+ void panel.renderPanel();
94
+ });
95
+ this._isInitialRender = false;
96
+ }
97
+ },
98
+ /**
99
+ * Handles the hiding of a panel by removing its content, updating the panel load status,
100
+ * and managing the display of the container header and error panel.
101
+ *
102
+ * @param {BasePanel} panel - The panel to be hidden.
103
+ * @private
104
+ */
105
+ handleHidePanel: function _handleHidePanel(panel) {
106
+ this.removeContent(panel);
107
+ const panelName = panel.getMetadata().getName();
108
+ this.handlePanelLoad(panelName, {
109
+ loaded: false,
110
+ count: 0
111
+ });
112
+ },
113
+ /**
114
+ * Unhides the specified panel if it is hidden.
115
+ *
116
+ * @param {CardsPanel} panel - The panel to unhide.
117
+ */
118
+ unhidePanelIfHidden: function _unhidePanelIfHidden(panel) {
119
+ const layout = this._getLayout();
120
+ const panelExpandedName = layout._getCurrentExpandedElementName();
121
+ // Function to handle panel content insertion
122
+ const processPanelVisibility = (panelName, insertContentFn) => {
123
+ if (!panelExpandedName || panelExpandedName === panel.getProperty("fullScreenName")) {
124
+ /**
125
+ loaded value can be false or undefined, false being hidden and undefined being loading
126
+ if the panel is hidden then only unhide it
127
+ */
128
+ if (this.panelLoaded[panelName].loaded === false) {
129
+ insertContentFn();
130
+ // Remove hidden class if applied
131
+ panel.setVisible(true);
132
+ }
133
+ this.handlePanelLoad(panelName, {
134
+ loaded: true,
135
+ count: this.panelLoaded[panelName].count
136
+ });
137
+ } else {
138
+ const listener = () => {
139
+ insertContentFn();
140
+ // Remove hidden class if applied
141
+ panel.setVisible(true);
142
+ layout.detachOnCollapse(listener); // Remove the listener after execution
143
+ };
144
+ this.handlePanelLoad(panelName, {
145
+ loaded: true,
146
+ count: this.panelLoaded[panelName].count
147
+ });
148
+ layout.attachOnCollapse(listener);
149
+ }
150
+ };
151
+
152
+ // Handling CardsPanel
153
+ if (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {
154
+ processPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));
155
+ }
156
+ },
157
+ /**
158
+ * Adjusts the layout of the container.
159
+ *
160
+ * @private
161
+ * @override
162
+ */
163
+ adjustLayout: function _adjustLayout() {
164
+ //adjust layout of all panels
165
+ this.getContent().forEach(panel => panel._adjustLayout?.());
166
+ },
167
+ /**
168
+ * Handles the loading of a panel.
169
+ *
170
+ * @param {string} panelName - The name of the panel.
171
+ * @param {object} oVal - The load status and count of the panel.
172
+ * @param {boolean} oVal.loaded - The load status of the panel.
173
+ * @param {number} oVal.count - The count of items in the panel.
174
+ */
175
+ handlePanelLoad: function _handlePanelLoad(panelName, oVal) {
176
+ if (this.panelLoaded[panelName].loaded !== oVal.loaded) {
177
+ this.panelLoaded[panelName] = oVal;
178
+ }
179
+ this.adjustLayout();
180
+ },
181
+ /**
182
+ * Retrieves the generic placeholder content for the Cards container.
183
+ *
184
+ * @returns {string} The HTML string representing the cards container's placeholder content.
185
+ */
186
+ getGenericPlaceholderContent: function _getGenericPlaceholderContent() {
187
+ return getCardsPlaceholder();
188
+ },
189
+ /**
190
+ * Refreshes the data for a specific panel based on its key.
191
+ *
192
+ * @private
193
+ * @param {string} key - The key of the panel to refresh.
194
+ */
195
+ refreshData: function _refreshData(key) {
196
+ try {
197
+ const _this = this;
198
+ const panel = Object.values(_this.panelContext).find(panel => panel.getKey() === key);
199
+ return Promise.resolve(panel?.refreshData?.()).then(function () {});
200
+ } catch (e) {
201
+ return Promise.reject(e);
202
+ }
203
+ }
204
+ });
205
+ return CardsContainer;
206
+ });
207
+ //# sourceMappingURL=CardsContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardsContainer.js","names":["sap","ui","define","__BaseContainer","__CardsPanel","___utils_placeholder_CardsPlaceholder","_interopRequireDefault","obj","__esModule","default","BaseContainer","CardsPanel","getCardsPlaceholder","cardsPanelName","CardsContainer","extend","renderer","apiVersion","constructor","_constructor","id","settings","BaseContainer.prototype.constructor.call","_isInitialRender","init","_init","BaseContainer.prototype.init.call","setProperty","panelLoaded","loaded","undefined","count","panelContext","addCustomSetting","_i18nBundle","getText","setTooltip","String","removeAllAggregation","load","_load","aContent","getContent","forEach","oContent","getMetadata","getName","content","panel","attachHandleHidePanel","handleHidePanel","attachHandleUnhidePanel","unhidePanelIfHidden","renderPanel","_handleHidePanel","removeContent","panelName","handlePanelLoad","_unhidePanelIfHidden","layout","_getLayout","panelExpandedName","_getCurrentExpandedElementName","processPanelVisibility","insertContentFn","getProperty","setVisible","listener","detachOnCollapse","attachOnCollapse","addContent","adjustLayout","_adjustLayout","_handlePanelLoad","oVal","getGenericPlaceholderContent","_getGenericPlaceholderContent","refreshData","_refreshData","key","_this","Object","values","find","getKey","Promise","resolve","then","e","reject"],"sources":["CardsContainer.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\nimport BaseContainer, { $BaseContainerSettings } from \"./BaseContainer\";\nimport BasePanel from \"./BasePanel\";\nimport CardsPanel from \"./CardsPanel\";\nimport { getCardsPlaceholder } from \"./utils/placeholder/CardsPlaceholder\";\n\nconst cardsPanelName: string = \"sap.cux.home.CardsPanel\";\n\ninterface IpanelLoaded {\n\t[key: string]: { loaded: boolean | undefined; count: number };\n}\ninterface IpanelContext {\n\t[key: string]: CardsPanel;\n}\n/**\n *\n * Container class for managing and storing Insights Cards.\n *\n * @extends sap.cux.home.BaseContainer\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.142\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.CardsContainer\n */\n\nexport default class CardsContainer extends BaseContainer {\n\tprivate panelLoaded!: IpanelLoaded;\n\tprivate panelContext!: IpanelContext;\n\tprivate _isInitialRender: boolean = true;\n\tstatic readonly renderer = {\n\t\t...BaseContainer.renderer,\n\t\tapiVersion: 2\n\t};\n\tconstructor(id?: string | $BaseContainerSettings);\n\tconstructor(id?: string, settings?: $BaseContainerSettings);\n\t/**\n\t * Constructor for a new Cards container.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $BaseContainerSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\t\t/* As Container Level default value for enableSettings is false,\n\t\t\tthis needs to be added from container level.\n\t\t\t(default value cannot be true as News & Page Container header should be hidden)\n\t\t*/\n\t\tthis.setProperty(\"enableSettings\", false);\n\t\tthis.setProperty(\"orientation\", \"Vertical\");\n\t\tthis.setProperty(\"compositeId\", \"Insights\");\n\t\tthis.panelLoaded = {\n\t\t\t[cardsPanelName]: { loaded: undefined, count: 0 }\n\t\t};\n\t\tthis.panelContext = {};\n\t\tthis.addCustomSetting(\"title\", this._i18nBundle.getText(\"insightsCards\") as string);\n\t\tthis.addCustomSetting(\"groupTitle\", this._i18nBundle.getText(\"insights\") as string);\n\t\tthis.setTooltip(String(this._i18nBundle.getText(\"insightsCards\")));\n\t\t//remove aggregation menuItems and actionButtons as they will be added from individual panels\n\t\tthis.removeAllAggregation(\"menuItems\");\n\t\tthis.removeAllAggregation(\"actionButtons\");\n\t}\n\t/**\n\t * Loads the Insights section.\n\t * Overrides the load method of the BaseContainer.\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic load() {\n\t\tif (this._isInitialRender) {\n\t\t\tconst aContent = this.getContent();\n\t\t\taContent.forEach((oContent) => {\n\t\t\t\tthis.panelContext[oContent.getMetadata().getName()] = oContent as CardsPanel;\n\t\t\t});\n\n\t\t\t// Render individual panels\n\t\t\taContent.forEach((content) => {\n\t\t\t\tconst panel = content as CardsPanel;\n\t\t\t\tpanel.attachHandleHidePanel(() => this.handleHidePanel(panel));\n\t\t\t\tpanel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));\n\t\t\t\tvoid panel.renderPanel();\n\t\t\t});\n\t\t\tthis._isInitialRender = false;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the hiding of a panel by removing its content, updating the panel load status,\n\t * and managing the display of the container header and error panel.\n\t *\n\t * @param {BasePanel} panel - The panel to be hidden.\n\t * @private\n\t */\n\tpublic handleHidePanel(panel: BasePanel) {\n\t\tthis.removeContent(panel);\n\t\tconst panelName = panel.getMetadata().getName();\n\t\tthis.handlePanelLoad(panelName, { loaded: false, count: 0 });\n\t}\n\n\t/**\n\t * Unhides the specified panel if it is hidden.\n\t *\n\t * @param {CardsPanel} panel - The panel to unhide.\n\t */\n\tpublic unhidePanelIfHidden(panel: CardsPanel) {\n\t\tconst layout = this._getLayout();\n\t\tconst panelExpandedName = layout._getCurrentExpandedElementName();\n\t\t// Function to handle panel content insertion\n\t\tconst processPanelVisibility = (panelName: string, insertContentFn: () => void) => {\n\t\t\tif (!panelExpandedName || panelExpandedName === panel.getProperty(\"fullScreenName\")) {\n\t\t\t\t/**\n loaded value can be false or undefined, false being hidden and undefined being loading\n if the panel is hidden then only unhide it\n */\n\t\t\t\tif (this.panelLoaded[panelName].loaded === false) {\n\t\t\t\t\tinsertContentFn();\n\t\t\t\t\t// Remove hidden class if applied\n\t\t\t\t\tpanel.setVisible(true);\n\t\t\t\t}\n\t\t\t\tthis.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });\n\t\t\t} else {\n\t\t\t\tconst listener = () => {\n\t\t\t\t\tinsertContentFn();\n\t\t\t\t\t// Remove hidden class if applied\n\t\t\t\t\tpanel.setVisible(true);\n\t\t\t\t\tlayout.detachOnCollapse(listener); // Remove the listener after execution\n\t\t\t\t};\n\t\t\t\tthis.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });\n\t\t\t\tlayout.attachOnCollapse(listener);\n\t\t\t}\n\t\t};\n\n\t\t// Handling CardsPanel\n\t\tif (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {\n\t\t\tprocessPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));\n\t\t}\n\t}\n\n\t/**\n\t * Adjusts the layout of the container.\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic adjustLayout() {\n\t\t//adjust layout of all panels\n\t\t(this.getContent() as CardsPanel[]).forEach((panel) => panel._adjustLayout?.());\n\t}\n\n\t/**\n\t * Handles the loading of a panel.\n\t *\n\t * @param {string} panelName - The name of the panel.\n\t * @param {object} oVal - The load status and count of the panel.\n\t * @param {boolean} oVal.loaded - The load status of the panel.\n\t * @param {number} oVal.count - The count of items in the panel.\n\t */\n\tpublic handlePanelLoad(panelName: string, oVal: { loaded: boolean; count: number }) {\n\t\tif (this.panelLoaded[panelName].loaded !== oVal.loaded) {\n\t\t\tthis.panelLoaded[panelName] = oVal;\n\t\t}\n\t\tthis.adjustLayout();\n\t}\n\n\t/**\n\t * Retrieves the generic placeholder content for the Cards container.\n\t *\n\t * @returns {string} The HTML string representing the cards container's placeholder content.\n\t */\n\tprotected getGenericPlaceholderContent(): string {\n\t\treturn getCardsPlaceholder();\n\t}\n\n\t/**\n\t * Refreshes the data for a specific panel based on its key.\n\t *\n\t * @private\n\t * @param {string} key - The key of the panel to refresh.\n\t */\n\tpublic async refreshData(key: string) {\n\t\tconst panel = Object.values(this.panelContext).find((panel) => panel.getKey() === key);\n\t\tawait panel?.refreshData?.();\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wFAAAC,eAAA,EAAAC,YAAA,EAAAC,qCAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAAA,MAIOG,aAAa,GAAAJ,sBAAA,CAAAH,eAAA;EAAA,MAEbQ,UAAU,GAAAL,sBAAA,CAAAF,YAAA;EAAA,MACRQ,mBAAmB,GAAAP,qCAAA;EAE5B,MAAMQ,cAAsB,GAAG,yBAAyB;EAQxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAdA,MAgBqBC,cAAc,GAASJ,aAAa,CAAAK,MAAA;IAIxCC,QAAQ,EAAG;MAC1B,GAAGN,aAAa,CAACM,QAAQ;MACzBC,UAAU,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AAI,CAAC9C,WAAW,CAAC4B,SAAS,CAAC,CAAC3B,MAAM,KAAK6C,IAAI,CAAC7C,MAAM,EAAE;QACvD,IAAI,CAACD,WAAW,CAAC4B,SAAS,CAAC,GAAGkB,IAAI;MACnC;MACA,IAAI,CAACH,YAAY,CAAC,CAAC;IACpB,CAAC;IAED;AACD;AACA;AACA;AACA;IACWI,4BAA4B,WAAAC,8BAAA,EAAW;MAChD,OAAOhE,mBAAmB,CAAC,CAAC;IAC7B,CAAC;IAED;AACD;AACA;AACA;AACA;AACA;IACciE,WAAW,WAAAC,aAACC,GAAW;MAAA,IAAE;QAAA,MAAAC,KAAA,GACT,IAAI;QAAhC,MAAMhC,KAAK,GAAGiC,MAAM,CAACC,MAAM,CAACF,KAAA,CAAKhD,YAAY,CAAC,CAACmD,IAAI,CAAEnC,KAAK,IAAKA,KAAK,CAACoC,MAAM,CAAC,CAAC,KAAKL,GAAG,CAAC;QAAC,OAAAM,OAAA,CAAAC,OAAA,CACjFtC,KAAK,EAAE6B,WAAW,GAAG,CAAC,EAAAU,IAAA;MAC7B,CAAC,QAAAC,CAAA;QAAA,OAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OAvKmB1E,cAAc;AAAA","ignoreList":[]}
@@ -0,0 +1,202 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ * * (c) Copyright 2009-2025 SAP SE. All rights reserved
4
+ */
5
+ import BaseContainer, { $BaseContainerSettings } from "./BaseContainer";
6
+ import BasePanel from "./BasePanel";
7
+ import CardsPanel from "./CardsPanel";
8
+ import { getCardsPlaceholder } from "./utils/placeholder/CardsPlaceholder";
9
+
10
+ const cardsPanelName: string = "sap.cux.home.CardsPanel";
11
+
12
+ interface IpanelLoaded {
13
+ [key: string]: { loaded: boolean | undefined; count: number };
14
+ }
15
+ interface IpanelContext {
16
+ [key: string]: CardsPanel;
17
+ }
18
+ /**
19
+ *
20
+ * Container class for managing and storing Insights Cards.
21
+ *
22
+ * @extends sap.cux.home.BaseContainer
23
+ *
24
+ * @author SAP SE
25
+ * @version 0.0.1
26
+ * @since 1.142
27
+ *
28
+ * @private
29
+ * @ui5-restricted ux.eng.s4producthomes1
30
+ *
31
+ * @alias sap.cux.home.CardsContainer
32
+ */
33
+
34
+ export default class CardsContainer extends BaseContainer {
35
+ private panelLoaded!: IpanelLoaded;
36
+ private panelContext!: IpanelContext;
37
+ private _isInitialRender: boolean = true;
38
+ static readonly renderer = {
39
+ ...BaseContainer.renderer,
40
+ apiVersion: 2
41
+ };
42
+ constructor(id?: string | $BaseContainerSettings);
43
+ constructor(id?: string, settings?: $BaseContainerSettings);
44
+ /**
45
+ * Constructor for a new Cards container.
46
+ *
47
+ * @param {string} [id] ID for the new control, generated automatically if an ID is not provided
48
+ * @param {object} [settings] Initial settings for the new control
49
+ */
50
+ public constructor(id?: string, settings?: $BaseContainerSettings) {
51
+ super(id, settings);
52
+ }
53
+
54
+ /**
55
+ * Init lifecycle method
56
+ *
57
+ * @private
58
+ * @override
59
+ */
60
+ public init(): void {
61
+ super.init();
62
+ /* As Container Level default value for enableSettings is false,
63
+ this needs to be added from container level.
64
+ (default value cannot be true as News & Page Container header should be hidden)
65
+ */
66
+ this.setProperty("enableSettings", false);
67
+ this.setProperty("orientation", "Vertical");
68
+ this.setProperty("compositeId", "Insights");
69
+ this.panelLoaded = {
70
+ [cardsPanelName]: { loaded: undefined, count: 0 }
71
+ };
72
+ this.panelContext = {};
73
+ this.addCustomSetting("title", this._i18nBundle.getText("insightsCards") as string);
74
+ this.addCustomSetting("groupTitle", this._i18nBundle.getText("insights") as string);
75
+ this.setTooltip(String(this._i18nBundle.getText("insightsCards")));
76
+ //remove aggregation menuItems and actionButtons as they will be added from individual panels
77
+ this.removeAllAggregation("menuItems");
78
+ this.removeAllAggregation("actionButtons");
79
+ }
80
+ /**
81
+ * Loads the Insights section.
82
+ * Overrides the load method of the BaseContainer.
83
+ *
84
+ * @private
85
+ * @override
86
+ */
87
+ public load() {
88
+ if (this._isInitialRender) {
89
+ const aContent = this.getContent();
90
+ aContent.forEach((oContent) => {
91
+ this.panelContext[oContent.getMetadata().getName()] = oContent as CardsPanel;
92
+ });
93
+
94
+ // Render individual panels
95
+ aContent.forEach((content) => {
96
+ const panel = content as CardsPanel;
97
+ panel.attachHandleHidePanel(() => this.handleHidePanel(panel));
98
+ panel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));
99
+ void panel.renderPanel();
100
+ });
101
+ this._isInitialRender = false;
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Handles the hiding of a panel by removing its content, updating the panel load status,
107
+ * and managing the display of the container header and error panel.
108
+ *
109
+ * @param {BasePanel} panel - The panel to be hidden.
110
+ * @private
111
+ */
112
+ public handleHidePanel(panel: BasePanel) {
113
+ this.removeContent(panel);
114
+ const panelName = panel.getMetadata().getName();
115
+ this.handlePanelLoad(panelName, { loaded: false, count: 0 });
116
+ }
117
+
118
+ /**
119
+ * Unhides the specified panel if it is hidden.
120
+ *
121
+ * @param {CardsPanel} panel - The panel to unhide.
122
+ */
123
+ public unhidePanelIfHidden(panel: CardsPanel) {
124
+ const layout = this._getLayout();
125
+ const panelExpandedName = layout._getCurrentExpandedElementName();
126
+ // Function to handle panel content insertion
127
+ const processPanelVisibility = (panelName: string, insertContentFn: () => void) => {
128
+ if (!panelExpandedName || panelExpandedName === panel.getProperty("fullScreenName")) {
129
+ /**
130
+ loaded value can be false or undefined, false being hidden and undefined being loading
131
+ if the panel is hidden then only unhide it
132
+ */
133
+ if (this.panelLoaded[panelName].loaded === false) {
134
+ insertContentFn();
135
+ // Remove hidden class if applied
136
+ panel.setVisible(true);
137
+ }
138
+ this.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });
139
+ } else {
140
+ const listener = () => {
141
+ insertContentFn();
142
+ // Remove hidden class if applied
143
+ panel.setVisible(true);
144
+ layout.detachOnCollapse(listener); // Remove the listener after execution
145
+ };
146
+ this.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });
147
+ layout.attachOnCollapse(listener);
148
+ }
149
+ };
150
+
151
+ // Handling CardsPanel
152
+ if (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {
153
+ processPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Adjusts the layout of the container.
159
+ *
160
+ * @private
161
+ * @override
162
+ */
163
+ public adjustLayout() {
164
+ //adjust layout of all panels
165
+ (this.getContent() as CardsPanel[]).forEach((panel) => panel._adjustLayout?.());
166
+ }
167
+
168
+ /**
169
+ * Handles the loading of a panel.
170
+ *
171
+ * @param {string} panelName - The name of the panel.
172
+ * @param {object} oVal - The load status and count of the panel.
173
+ * @param {boolean} oVal.loaded - The load status of the panel.
174
+ * @param {number} oVal.count - The count of items in the panel.
175
+ */
176
+ public handlePanelLoad(panelName: string, oVal: { loaded: boolean; count: number }) {
177
+ if (this.panelLoaded[panelName].loaded !== oVal.loaded) {
178
+ this.panelLoaded[panelName] = oVal;
179
+ }
180
+ this.adjustLayout();
181
+ }
182
+
183
+ /**
184
+ * Retrieves the generic placeholder content for the Cards container.
185
+ *
186
+ * @returns {string} The HTML string representing the cards container's placeholder content.
187
+ */
188
+ protected getGenericPlaceholderContent(): string {
189
+ return getCardsPlaceholder();
190
+ }
191
+
192
+ /**
193
+ * Refreshes the data for a specific panel based on its key.
194
+ *
195
+ * @private
196
+ * @param {string} key - The key of the panel to refresh.
197
+ */
198
+ public async refreshData(key: string) {
199
+ const panel = Object.values(this.panelContext).find((panel) => panel.getKey() === key);
200
+ await panel?.refreshData?.();
201
+ }
202
+ }