@sapui5/sap.cux.home 1.141.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.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +4 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +3 -2
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +6 -6
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -6
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +6 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +7 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +48 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +362 -265
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +374 -254
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +33 -18
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +32 -15
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +8 -2
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +10 -3
- package/src/sap/cux/home/BaseContainer.d.ts +9 -1
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +36 -6
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +33 -6
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +7 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/BasePanel.d.ts +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +20 -0
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +16 -0
- package/src/sap/cux/home/CardsContainer.d.ts +108 -0
- package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/CardsContainer.js +207 -0
- package/src/sap/cux/home/CardsContainer.js.map +1 -0
- package/src/sap/cux/home/CardsContainer.ts +202 -0
- package/src/sap/cux/home/CardsPanel.d.ts +47 -59
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +405 -326
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +223 -201
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +17 -7
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +18 -6
- package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
- package/src/sap/cux/home/ErrorPanel.js +11 -16
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +7 -19
- package/src/sap/cux/home/FavAppPanel.d.ts +1 -12
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +354 -414
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +21 -66
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +11 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +22 -8
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +22 -7
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts +8 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js +15 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.ts +11 -0
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +287 -57
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/Layout.d.ts +3 -1
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +49 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +59 -8
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +379 -63
- package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -18
- package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
- package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
- package/src/sap/cux/home/NewsContainer.js.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +31 -120
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +100 -69
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +61 -36
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +216 -81
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- package/src/sap/cux/home/PagePanel.d.ts +1 -1
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +19 -11
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +26 -20
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- package/src/sap/cux/home/PagesContainer.d.ts +72 -0
- package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
- package/src/sap/cux/home/PagesContainer.js +333 -0
- package/src/sap/cux/home/PagesContainer.js.map +1 -0
- package/src/sap/cux/home/PagesContainer.ts +179 -0
- package/src/sap/cux/home/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +11 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +11 -0
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js +67 -133
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +70 -152
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +19 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +17 -2
- package/src/sap/cux/home/TilesContainer.d.ts +111 -0
- package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/TilesContainer.js +218 -0
- package/src/sap/cux/home/TilesContainer.js.map +1 -0
- package/src/sap/cux/home/TilesContainer.ts +216 -0
- package/src/sap/cux/home/TilesPanel.d.ts +22 -52
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +194 -168
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +167 -157
- package/src/sap/cux/home/ToDoPanel.d.ts +1 -0
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +64 -68
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +48 -36
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +4 -4
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.ts +3 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +5 -5
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +30 -3
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +23 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +29 -19
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.js +78 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.ts +81 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +32 -12
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +19 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +23 -7
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +20 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +18 -2
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +6 -1
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts +27 -4
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.js.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.ts +23 -4
- package/src/sap/cux/home/interface/LayoutInterface.d.ts +7 -0
- package/src/sap/cux/home/interface/LayoutInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.js.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.ts +7 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +7 -4
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +10 -5
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +22 -0
- package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +4 -45
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +10 -18
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1 -1
- package/src/sap/cux/home/themes/base/SettingsDialog.less +4 -0
- package/src/sap/cux/home/themes/base/TilesContainer.less +65 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +4 -0
- package/src/sap/cux/home/themes/base/library.source.less +2 -1
- package/src/sap/cux/home/utils/BatchHelper.d.ts +1 -0
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +7 -2
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +8 -1
- package/src/sap/cux/home/utils/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +150 -151
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
- package/ui5.yaml +1 -0
- package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
- package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
- package/src/sap/cux/home/InsightsContainer.js +0 -459
- package/src/sap/cux/home/InsightsContainer.js.map +0 -1
- package/src/sap/cux/home/InsightsContainer.ts +0 -489
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
- 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"];
|
|
@@ -42,8 +43,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
42
43
|
const fetchElementProperties = ___utils_Device["fetchElementProperties"];
|
|
43
44
|
const focusDraggedItem = ___utils_DragDropUtils["focusDraggedItem"];
|
|
44
45
|
const addFESRId = ___utils_FESRUtil["addFESRId"];
|
|
45
|
-
const
|
|
46
|
-
const
|
|
46
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
47
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
48
|
+
const getAssociatedFullScreenButton = ___utils_InsightsUtils["getAssociatedFullScreenButton"];
|
|
47
49
|
const getAssociatedFullScreenMenuItem = ___utils_InsightsUtils["getAssociatedFullScreenMenuItem"];
|
|
48
50
|
const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
|
|
49
51
|
const targetsAreEqual = ___utils_InsightsUtils["targetsAreEqual"];
|
|
@@ -52,21 +54,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
52
54
|
var cardsMenuItems = /*#__PURE__*/function (cardsMenuItems) {
|
|
53
55
|
cardsMenuItems["REFRESH"] = "cards-refresh";
|
|
54
56
|
cardsMenuItems["EDIT_CARDS"] = "cards-editCards";
|
|
55
|
-
cardsMenuItems["AI_INSIGHT_CARD"] = "cards-addAIInsightCard";
|
|
56
57
|
return cardsMenuItems;
|
|
57
58
|
}(cardsMenuItems || {});
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return cardsContainerActionButtons;
|
|
68
|
-
}(cardsContainerActionButtons || {});
|
|
69
|
-
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"];
|
|
70
68
|
const Constants = {
|
|
71
69
|
PLACEHOLDER_CARD_COUNT: 10,
|
|
72
70
|
CARDS_GAP: 16
|
|
@@ -171,7 +169,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
171
169
|
this.aVisibleCardInstances = [];
|
|
172
170
|
this.cardsInViewport = [];
|
|
173
171
|
this._appSwitched = false;
|
|
174
|
-
this.
|
|
172
|
+
this.cardHelper = null;
|
|
175
173
|
},
|
|
176
174
|
/**
|
|
177
175
|
* Initializes the Cards Panel.
|
|
@@ -182,6 +180,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
182
180
|
init: function _init() {
|
|
183
181
|
const _this = this;
|
|
184
182
|
BasePanel.prototype.init.call(this);
|
|
183
|
+
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")}`);
|
|
185
184
|
this.setProperty("key", "cards");
|
|
186
185
|
this.setProperty("enableFullScreen", true);
|
|
187
186
|
this.cardWidth = "19rem";
|
|
@@ -207,9 +206,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
207
206
|
this.oEventBus.subscribe("importChannel", "cardsImport", function (sChannelId, sEventId, oData) {
|
|
208
207
|
try {
|
|
209
208
|
return Promise.resolve(_this._createCards(oData)).then(function () {
|
|
210
|
-
|
|
211
|
-
_this._importdone();
|
|
212
|
-
});
|
|
209
|
+
_this._importdone();
|
|
213
210
|
});
|
|
214
211
|
} catch (e) {
|
|
215
212
|
return Promise.reject(e);
|
|
@@ -266,8 +263,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
266
263
|
_createCards: function _createCards(aCards) {
|
|
267
264
|
try {
|
|
268
265
|
const _this3 = this;
|
|
269
|
-
return Promise.resolve(_this3.
|
|
270
|
-
return
|
|
266
|
+
return Promise.resolve(_this3.getCardHelper()).then(function (cardHelper) {
|
|
267
|
+
return Promise.resolve(cardHelper?._createCards(aCards)).then(function () {
|
|
268
|
+
return _this3.rerenderCards();
|
|
269
|
+
});
|
|
271
270
|
});
|
|
272
271
|
} catch (e) {
|
|
273
272
|
return Promise.reject(e);
|
|
@@ -313,8 +312,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
313
312
|
try {
|
|
314
313
|
const sType = oEvent.getParameter("type");
|
|
315
314
|
let oParameters = oEvent.getParameter("parameters") || {};
|
|
316
|
-
const
|
|
315
|
+
const _temp5 = function () {
|
|
317
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
|
+
}
|
|
318
332
|
oEvent.preventDefault();
|
|
319
333
|
const oCard = oEvent.getParameter("card") || {},
|
|
320
334
|
oIntegrationCardManifest = oCard?.getManifestEntry("sap.card") || {},
|
|
@@ -326,23 +340,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
326
340
|
if (oIntegrationCardManifest?.configuration?.parameters?._semanticDateRangeSetting?.value) {
|
|
327
341
|
oCheckSemanticProperty = JSON.parse(oIntegrationCardManifest.configuration.parameters._semanticDateRangeSetting.value);
|
|
328
342
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
338
|
-
return Promise.resolve(navigationService.navigate({
|
|
339
|
-
target: oParameters.ibnTarget,
|
|
340
|
-
params: oParameters.ibnParams
|
|
341
|
-
})).then(function () {});
|
|
342
|
-
});
|
|
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);
|
|
343
351
|
}
|
|
344
352
|
}();
|
|
345
|
-
return Promise.resolve(
|
|
353
|
+
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
|
|
346
354
|
} catch (e) {
|
|
347
355
|
return Promise.reject(e);
|
|
348
356
|
}
|
|
@@ -404,25 +412,27 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
404
412
|
return Promise.resolve(_this7._getManifestEntryFromCard(oCard, "sap.insights").then(function (oEntry) {
|
|
405
413
|
try {
|
|
406
414
|
if (oEntry) {
|
|
407
|
-
return Promise.resolve(_this7.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
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
|
+
});
|
|
421
431
|
});
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}
|
|
432
|
+
} else {
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
426
436
|
});
|
|
427
437
|
} else {
|
|
428
438
|
return Promise.resolve(false);
|
|
@@ -437,16 +447,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
437
447
|
},
|
|
438
448
|
action: function (oCard) {
|
|
439
449
|
try {
|
|
440
|
-
return Promise.resolve(_this8.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
return Promise.resolve(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
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
|
+
});
|
|
463
|
+
});
|
|
450
464
|
});
|
|
451
465
|
});
|
|
452
466
|
} catch (e) {
|
|
@@ -548,7 +562,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
548
562
|
refreshData: function _refreshData() {
|
|
549
563
|
try {
|
|
550
564
|
const _this9 = this;
|
|
551
|
-
const
|
|
565
|
+
const _temp6 = _catch(function () {
|
|
552
566
|
return Promise.resolve(CardHelper.getServiceAsync()).then(function (_getServiceAsync) {
|
|
553
567
|
_this9.cardHelperInstance = _getServiceAsync;
|
|
554
568
|
return Promise.resolve(_this9.cardHelperInstance._refreshUserCards(false)).then(function () {
|
|
@@ -558,39 +572,75 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
558
572
|
}, function (error) {
|
|
559
573
|
Log.error("Failed to refresh cards: ", error instanceof Error ? error.message : error);
|
|
560
574
|
});
|
|
561
|
-
return Promise.resolve(
|
|
575
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
562
576
|
} catch (e) {
|
|
563
577
|
return Promise.reject(e);
|
|
564
578
|
}
|
|
565
579
|
},
|
|
566
580
|
/**
|
|
567
|
-
*
|
|
581
|
+
* Retrieves the Card Helper instance.
|
|
568
582
|
*
|
|
569
583
|
* @private
|
|
570
|
-
* @returns {Promise<
|
|
584
|
+
* @returns {Promise<ICardHelperInstance>} A promise that resolves with the Card Helper instance.
|
|
571
585
|
*/
|
|
572
|
-
|
|
586
|
+
getCardHelper: function _getCardHelper() {
|
|
573
587
|
try {
|
|
574
588
|
const _this0 = this;
|
|
575
|
-
function
|
|
576
|
-
return
|
|
577
|
-
_this0.fireEvent("loaded");
|
|
578
|
-
});
|
|
589
|
+
function _temp8() {
|
|
590
|
+
return _this0.cardHelperInstance;
|
|
579
591
|
}
|
|
580
|
-
const
|
|
592
|
+
const _temp7 = function () {
|
|
581
593
|
if (!_this0.cardHelperInstance) {
|
|
582
594
|
_this0.pageManagerInstance = _this0.pageManagerInstance || getPageManagerInstance(_this0);
|
|
583
|
-
return Promise.resolve(Promise.all([
|
|
595
|
+
return Promise.resolve(Promise.all([_this0.getCardHelperService(), _this0.pageManagerInstance.hasCustomSpace()])).then(function ([cardHelperInstance, hasCustomSpace]) {
|
|
584
596
|
_this0.cardHelperInstance = cardHelperInstance;
|
|
585
597
|
_this0.hasCustomSpace = hasCustomSpace;
|
|
586
598
|
});
|
|
587
599
|
}
|
|
588
600
|
}();
|
|
589
|
-
return Promise.resolve(
|
|
601
|
+
return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
|
|
602
|
+
} catch (e) {
|
|
603
|
+
return Promise.reject(e);
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
/**
|
|
607
|
+
* Renders the panel.
|
|
608
|
+
*
|
|
609
|
+
* @private
|
|
610
|
+
* @returns {Promise<void>} A promise that resolves when the panel is rendered.
|
|
611
|
+
*/
|
|
612
|
+
renderPanel: function _renderPanel() {
|
|
613
|
+
try {
|
|
614
|
+
const _this1 = this;
|
|
615
|
+
const _temp9 = _catch(function () {
|
|
616
|
+
return Promise.resolve(_this1.rerenderCards()).then(function () {
|
|
617
|
+
_this1.fireEvent("loaded");
|
|
618
|
+
});
|
|
619
|
+
}, function (error) {
|
|
620
|
+
Log.error(error instanceof Error ? error.message : String(error));
|
|
621
|
+
});
|
|
622
|
+
return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
|
|
590
623
|
} catch (e) {
|
|
591
624
|
return Promise.reject(e);
|
|
592
625
|
}
|
|
593
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
|
+
},
|
|
594
644
|
/**
|
|
595
645
|
* Rerenders the cards.
|
|
596
646
|
*
|
|
@@ -599,103 +649,172 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
599
649
|
*/
|
|
600
650
|
rerenderCards: function _rerenderCards(skipRecommendation = false) {
|
|
601
651
|
try {
|
|
602
|
-
const
|
|
603
|
-
if (!
|
|
604
|
-
|
|
652
|
+
const _this10 = this;
|
|
653
|
+
if (!_this10._cardsRendered) {
|
|
654
|
+
_this10._cardsRendered = new Promise((resolve, reject) => {
|
|
605
655
|
void function () {
|
|
606
656
|
try {
|
|
607
|
-
const
|
|
657
|
+
const _temp13 = _catch(function () {
|
|
608
658
|
// Enable placeholders after updating/rerendering cards
|
|
609
|
-
const sDefaultAggreName =
|
|
610
|
-
|
|
611
|
-
|
|
659
|
+
const sDefaultAggreName = _this10._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
660
|
+
_this10._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
661
|
+
_this10._showPlaceHolders();
|
|
612
662
|
// Fetch Cards from insights service
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
listBinding
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return Promise.resolve(_this1.getPersonalisationProperty(RECOMMENDATION_PATH)).then(function (showRecommendation) {
|
|
636
|
-
function _temp1() {
|
|
637
|
-
_this1._cardsRendered = undefined;
|
|
638
|
-
resolve();
|
|
639
|
-
}
|
|
640
|
-
const _temp0 = function () {
|
|
641
|
-
if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
|
|
642
|
-
return Promise.resolve(_this1._getRecommendationCards()).then(function () {});
|
|
643
|
-
} else {
|
|
644
|
-
const _temp9 = function () {
|
|
645
|
-
if (aCards.length) {
|
|
646
|
-
function _temp8() {
|
|
647
|
-
// from available cards, check for old recommended cards and update it if present,
|
|
648
|
-
// else show available visible cards
|
|
649
|
-
return Promise.resolve(_this1.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();
|
|
650
685
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
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();
|
|
662
697
|
}
|
|
663
|
-
|
|
664
|
-
|
|
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
|
+
});
|
|
665
739
|
});
|
|
666
740
|
});
|
|
667
741
|
}, function (error) {
|
|
668
|
-
|
|
669
|
-
|
|
742
|
+
_this10.fireHandleHidePanel();
|
|
743
|
+
_this10._addErrorPanel(false);
|
|
744
|
+
_this10._cardsRendered = undefined;
|
|
670
745
|
if (error instanceof Error) {
|
|
671
746
|
Log.error(error.message);
|
|
672
747
|
reject(error);
|
|
673
748
|
}
|
|
674
749
|
});
|
|
675
|
-
return Promise.resolve(
|
|
750
|
+
return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
|
|
676
751
|
} catch (e) {
|
|
677
752
|
return Promise.reject(e);
|
|
678
753
|
}
|
|
679
754
|
}();
|
|
680
755
|
});
|
|
681
756
|
}
|
|
682
|
-
return Promise.resolve(
|
|
757
|
+
return Promise.resolve(_this10._cardsRendered);
|
|
683
758
|
} catch (e) {
|
|
684
759
|
return Promise.reject(e);
|
|
685
760
|
}
|
|
686
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
|
+
},
|
|
687
804
|
/**
|
|
688
805
|
* Sets the new visible cards in the model and updates the UI.
|
|
689
806
|
* @private
|
|
690
807
|
*/
|
|
691
808
|
setNewVisibleCards: function _setNewVisibleCards() {
|
|
692
809
|
try {
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
810
|
+
const _this11 = this;
|
|
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
|
+
});
|
|
699
818
|
});
|
|
700
819
|
} catch (e) {
|
|
701
820
|
return Promise.reject(e);
|
|
@@ -715,7 +834,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
715
834
|
*/
|
|
716
835
|
checkForRecommendedCards: function _checkForRecommendedCards(aCards) {
|
|
717
836
|
try {
|
|
718
|
-
const
|
|
837
|
+
const _this12 = this;
|
|
719
838
|
let manifestIds = [];
|
|
720
839
|
aCards.forEach((oVisCard, idx) => {
|
|
721
840
|
let oCard = oVisCard.descriptorContent;
|
|
@@ -731,24 +850,26 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
731
850
|
});
|
|
732
851
|
return Promise.resolve(function () {
|
|
733
852
|
if (manifestIds.length) {
|
|
734
|
-
const uniqueManifestDetails =
|
|
735
|
-
return Promise.resolve(
|
|
853
|
+
const uniqueManifestDetails = _this12.getUniqueManifestDetails(manifestIds);
|
|
854
|
+
return Promise.resolve(_this12.regenerateCards(uniqueManifestDetails, manifestIds)).then(function (aUpdatedCards) {
|
|
736
855
|
let _exit2 = false;
|
|
737
|
-
function
|
|
738
|
-
return _exit2 ? _result2 : Promise.resolve(
|
|
856
|
+
function _temp15(_result2) {
|
|
857
|
+
return _exit2 ? _result2 : Promise.resolve(_this12.setNewVisibleCards()).then(function () {});
|
|
739
858
|
}
|
|
740
|
-
const
|
|
859
|
+
const _temp14 = function () {
|
|
741
860
|
if (aUpdatedCards?.length) {
|
|
742
861
|
// Update the model with updated cards
|
|
743
|
-
return Promise.resolve(
|
|
862
|
+
return Promise.resolve(_this12.getCardHelper()).then(function (cardHelper) {
|
|
863
|
+
return Promise.resolve(cardHelper?._updateCards(aUpdatedCards.map(oCard => oCard?.newManifest?.descriptorContent))).then(function () {});
|
|
864
|
+
});
|
|
744
865
|
} else {
|
|
745
866
|
_exit2 = true;
|
|
746
867
|
}
|
|
747
868
|
}();
|
|
748
|
-
return
|
|
869
|
+
return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
|
|
749
870
|
});
|
|
750
871
|
} else {
|
|
751
|
-
|
|
872
|
+
_this12._showCards(aCards);
|
|
752
873
|
}
|
|
753
874
|
}());
|
|
754
875
|
} catch (e) {
|
|
@@ -789,9 +910,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
789
910
|
*/
|
|
790
911
|
_getManifests: function _getManifests(manifestIds) {
|
|
791
912
|
try {
|
|
792
|
-
const
|
|
913
|
+
const _this13 = this;
|
|
793
914
|
// from the provided manifestIds which are unique generate new recommended card manifests
|
|
794
|
-
return Promise.resolve(
|
|
915
|
+
return Promise.resolve(_this13.appManagerInstance._getCardManifest(undefined, manifestIds)).then(function (aManifests) {
|
|
795
916
|
if (aManifests?.length) {
|
|
796
917
|
let aRegeneratedCards = aManifests.map(function (oCard) {
|
|
797
918
|
if (oCard?.["sap.card"]) {
|
|
@@ -803,7 +924,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
803
924
|
};
|
|
804
925
|
});
|
|
805
926
|
// sometimes same card is recommended more than once, hence remove such duplicates
|
|
806
|
-
let mappedResults =
|
|
927
|
+
let mappedResults = _this13._removeDuplicateRegeneratedCards(aRegeneratedCards, manifestIds);
|
|
807
928
|
return mappedResults;
|
|
808
929
|
} else {
|
|
809
930
|
return [];
|
|
@@ -830,9 +951,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
830
951
|
*/
|
|
831
952
|
regenerateCards: function _regenerateCards(manifestIds, allManifestIds) {
|
|
832
953
|
try {
|
|
833
|
-
const
|
|
954
|
+
const _this14 = this;
|
|
834
955
|
return Promise.resolve(_catch(function () {
|
|
835
|
-
return Promise.resolve(
|
|
956
|
+
return Promise.resolve(_this14._getManifests(manifestIds)).then(function (aMappedManifest) {
|
|
836
957
|
// create unique identifier for each card based on its id and target properties.
|
|
837
958
|
const createUniqueKey = item => {
|
|
838
959
|
if (item?.target?.semanticObject && item?.target?.action) {
|
|
@@ -939,20 +1060,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
939
1060
|
*/
|
|
940
1061
|
_getPersonalizationData: function _getPersonalizationData() {
|
|
941
1062
|
try {
|
|
942
|
-
const
|
|
943
|
-
function
|
|
944
|
-
return Promise.resolve(
|
|
1063
|
+
const _this15 = this;
|
|
1064
|
+
function _temp17() {
|
|
1065
|
+
return Promise.resolve(_this15.oPersonalizer.read()).then(function (oPersData) {
|
|
945
1066
|
return oPersData || {};
|
|
946
1067
|
});
|
|
947
1068
|
}
|
|
948
|
-
const
|
|
949
|
-
if (!
|
|
950
|
-
return Promise.resolve(
|
|
951
|
-
|
|
1069
|
+
const _temp16 = function () {
|
|
1070
|
+
if (!_this15.oPersonalizer) {
|
|
1071
|
+
return Promise.resolve(_this15._getPersonalization()).then(function (_this15$_getPersonali) {
|
|
1072
|
+
_this15.oPersonalizer = _this15$_getPersonali;
|
|
952
1073
|
});
|
|
953
1074
|
}
|
|
954
1075
|
}();
|
|
955
|
-
return Promise.resolve(
|
|
1076
|
+
return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16));
|
|
956
1077
|
} catch (e) {
|
|
957
1078
|
return Promise.reject(e);
|
|
958
1079
|
}
|
|
@@ -960,8 +1081,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
960
1081
|
// Fetch personalization data property value
|
|
961
1082
|
getPersonalisationProperty: function _getPersonalisationProperty(propertyKey) {
|
|
962
1083
|
try {
|
|
963
|
-
const
|
|
964
|
-
return Promise.resolve(
|
|
1084
|
+
const _this16 = this;
|
|
1085
|
+
return Promise.resolve(_this16._getPersonalizationData()).then(function (oPersData) {
|
|
965
1086
|
return oPersData?.[propertyKey];
|
|
966
1087
|
});
|
|
967
1088
|
} catch (e) {
|
|
@@ -976,12 +1097,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
976
1097
|
*/
|
|
977
1098
|
_getRecommendationCards: function _getRecommendationCards() {
|
|
978
1099
|
try {
|
|
979
|
-
const
|
|
980
|
-
return Promise.resolve(
|
|
1100
|
+
const _this17 = this;
|
|
1101
|
+
return Promise.resolve(_this17.appManagerInstance.getRecommenedCards()).then(function (aRecommendedCards) {
|
|
981
1102
|
if (aRecommendedCards?.length) {
|
|
982
|
-
return
|
|
1103
|
+
return _this17._handleRecommendationCards(aRecommendedCards);
|
|
983
1104
|
}
|
|
984
|
-
|
|
1105
|
+
_this17.fireHandleHidePanel();
|
|
985
1106
|
});
|
|
986
1107
|
} catch (e) {
|
|
987
1108
|
return Promise.reject(e);
|
|
@@ -994,11 +1115,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
994
1115
|
*/
|
|
995
1116
|
_handleRecommendationCards: function _handleRecommendationCards(aRecommendedCards) {
|
|
996
1117
|
try {
|
|
997
|
-
const
|
|
1118
|
+
const _this18 = this;
|
|
998
1119
|
const cardManifests = aRecommendedCards.map(oCard => oCard.descriptorContent);
|
|
999
|
-
return Promise.resolve(
|
|
1000
|
-
return Promise.resolve(
|
|
1001
|
-
return
|
|
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
|
+
});
|
|
1002
1125
|
});
|
|
1003
1126
|
});
|
|
1004
1127
|
} catch (e) {
|
|
@@ -1033,12 +1156,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1033
1156
|
rowSize: this.cardHeight,
|
|
1034
1157
|
gap: "1rem"
|
|
1035
1158
|
});
|
|
1036
|
-
this.
|
|
1159
|
+
this.cardsWrapperContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
|
|
1037
1160
|
visible: "{= !${/isPhone}}"
|
|
1038
1161
|
}).addStyleClass("sapUiSmallMarginTop").setLayout(this.cardsContainerSettings);
|
|
1039
|
-
this.
|
|
1040
|
-
this.addDragDropConfigTo(this.
|
|
1041
|
-
return this.
|
|
1162
|
+
this.cardsWrapperContainer.setModel(this._controlModel);
|
|
1163
|
+
this.addDragDropConfigTo(this.cardsWrapperContainer, oEvent => this._handleCardsDnd(oEvent));
|
|
1164
|
+
return this.cardsWrapperContainer;
|
|
1042
1165
|
},
|
|
1043
1166
|
/**
|
|
1044
1167
|
* Creates the mobile card container.
|
|
@@ -1054,7 +1177,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1054
1177
|
scrollTime: 1000,
|
|
1055
1178
|
showDividers: false,
|
|
1056
1179
|
visible: "{/isPhone}"
|
|
1057
|
-
});
|
|
1180
|
+
}).addStyleClass("sapCuxInsightsMobileCardsContainer");
|
|
1058
1181
|
this.cardsMobileContainer.setModel(this._controlModel);
|
|
1059
1182
|
this.addDragDropConfigTo(this.cardsMobileContainer, oEvent => this._handleCardsDnd(oEvent));
|
|
1060
1183
|
return this.cardsMobileContainer;
|
|
@@ -1085,9 +1208,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1085
1208
|
});
|
|
1086
1209
|
|
|
1087
1210
|
// add HBox as item to GridList
|
|
1088
|
-
const sDefaultAggreName = this.
|
|
1211
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1089
1212
|
if (sDefaultAggreName) {
|
|
1090
|
-
this.
|
|
1213
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
|
|
1091
1214
|
}
|
|
1092
1215
|
},
|
|
1093
1216
|
/**
|
|
@@ -1097,7 +1220,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1097
1220
|
* @returns {number} The number of placeholder cards that should be displayed. Defaults to 1 if no valid count is determined.
|
|
1098
1221
|
*/
|
|
1099
1222
|
_calculatePlaceholderCardCount: function _calculatePlaceholderCardCount() {
|
|
1100
|
-
const layoutDomRef = this.
|
|
1223
|
+
const layoutDomRef = this._getCardsContainer()?._getLayout()?.getDomRef();
|
|
1101
1224
|
let count = 0;
|
|
1102
1225
|
if (layoutDomRef) {
|
|
1103
1226
|
const sectionDomRef = layoutDomRef.childNodes[0];
|
|
@@ -1125,14 +1248,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1125
1248
|
* @param {ICard[]} aCards - The cards to display.
|
|
1126
1249
|
*/
|
|
1127
1250
|
_showCards: function _showCards(aCards) {
|
|
1128
|
-
const
|
|
1251
|
+
const parentContainer = this._getCardsContainer();
|
|
1252
|
+
parentContainer.removeContent(this._errorPanel);
|
|
1129
1253
|
this.fireHandleUnhidePanel();
|
|
1130
|
-
this.
|
|
1131
|
-
|
|
1132
|
-
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
|
|
1133
|
-
}
|
|
1134
|
-
const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
|
|
1135
|
-
this._getCardContainer().removeAllAggregation(sDefaultAggreName);
|
|
1254
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1255
|
+
this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
1136
1256
|
this.aVisibleCardInstances = [];
|
|
1137
1257
|
this.cardsInViewport = [];
|
|
1138
1258
|
|
|
@@ -1176,8 +1296,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1176
1296
|
});
|
|
1177
1297
|
|
|
1178
1298
|
// add VBox as item to GridList
|
|
1179
|
-
const sDefaultAggreName = this.
|
|
1180
|
-
this.
|
|
1299
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1300
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
|
|
1181
1301
|
});
|
|
1182
1302
|
},
|
|
1183
1303
|
/**
|
|
@@ -1187,34 +1307,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1187
1307
|
* @param {Event} event - The event object.
|
|
1188
1308
|
*/
|
|
1189
1309
|
_handleEditCards: function _handleEditCards(event) {
|
|
1190
|
-
/* If called from Panel Header event.source() will return TilesPanel, if called from
|
|
1310
|
+
/* If called from Panel Header event.source() will return TilesPanel, if called from cards Container event.source() will return cardsContainer.
|
|
1191
1311
|
_getLayout is available at Container Level*/
|
|
1192
1312
|
let parent = event.getSource().getParent() || this;
|
|
1193
|
-
if (parent instanceof CardsPanel) {
|
|
1313
|
+
if (parent instanceof CardsPanel || parent instanceof ErrorPanel) {
|
|
1194
1314
|
parent = parent.getParent();
|
|
1195
1315
|
}
|
|
1196
1316
|
parent?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
|
|
1197
1317
|
},
|
|
1198
|
-
/**
|
|
1199
|
-
* Hides the header of the cards panel.
|
|
1200
|
-
*
|
|
1201
|
-
* @private
|
|
1202
|
-
*/
|
|
1203
|
-
handleHideHeader: function _handleHideHeader() {
|
|
1204
|
-
this._headerVisible = false;
|
|
1205
|
-
this.setProperty("title", "");
|
|
1206
|
-
this._toggleHeaderActions(false);
|
|
1207
|
-
},
|
|
1208
|
-
/**
|
|
1209
|
-
* Adds the header to the cards panel.
|
|
1210
|
-
*
|
|
1211
|
-
* @private
|
|
1212
|
-
*/
|
|
1213
|
-
handleAddHeader: function _handleAddHeader() {
|
|
1214
|
-
this._headerVisible = true;
|
|
1215
|
-
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${this._controlModel.getProperty("/userVisibleCards")?.length})`);
|
|
1216
|
-
this._toggleHeaderActions(true);
|
|
1217
|
-
},
|
|
1218
1318
|
/**
|
|
1219
1319
|
* Refreshes the cards.
|
|
1220
1320
|
*
|
|
@@ -1232,43 +1332,45 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1232
1332
|
*/
|
|
1233
1333
|
_handleCardsDnd: function _handleCardsDnd(oEvent) {
|
|
1234
1334
|
try {
|
|
1235
|
-
const
|
|
1335
|
+
const _this19 = this;
|
|
1236
1336
|
const sInsertPosition = oEvent.getParameter("dropPosition"),
|
|
1237
1337
|
oDragItem = oEvent.getParameter("draggedControl"),
|
|
1238
1338
|
iDragItemIndex = oDragItem.getParent()?.indexOfItem(oDragItem),
|
|
1239
1339
|
oDropItem = oEvent.getParameter("droppedControl"),
|
|
1240
1340
|
iDropItemIndex = oDragItem.getParent().indexOfItem(oDropItem);
|
|
1241
|
-
|
|
1341
|
+
_this19._cardsFlexWrapper?.setBusy(true);
|
|
1242
1342
|
// take the moved item from dragIndex and add to dropindex
|
|
1243
|
-
const
|
|
1343
|
+
const _temp20 = _finallyRethrows(function () {
|
|
1244
1344
|
return _catch(function () {
|
|
1245
|
-
function
|
|
1345
|
+
function _temp19() {
|
|
1246
1346
|
setTimeout(() => {
|
|
1247
|
-
focusDraggedItem(
|
|
1347
|
+
focusDraggedItem(_this19._getCardWrapperContainer(), iDropItemIndex);
|
|
1248
1348
|
}, 0);
|
|
1249
1349
|
}
|
|
1250
|
-
const
|
|
1251
|
-
if (!
|
|
1252
|
-
return Promise.resolve(
|
|
1253
|
-
|
|
1254
|
-
|
|
1350
|
+
const _temp18 = function () {
|
|
1351
|
+
if (!_this19._controlModel.getProperty("/userAllCards").length) {
|
|
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
|
+
});
|
|
1255
1357
|
});
|
|
1256
1358
|
} else {
|
|
1257
|
-
return Promise.resolve(
|
|
1359
|
+
return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
|
|
1258
1360
|
}
|
|
1259
1361
|
}();
|
|
1260
|
-
return
|
|
1362
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
|
1261
1363
|
}, function (error) {
|
|
1262
1364
|
if (error instanceof Error) {
|
|
1263
1365
|
Log.error(error.message);
|
|
1264
1366
|
}
|
|
1265
1367
|
});
|
|
1266
1368
|
}, function (_wasThrown, _result3) {
|
|
1267
|
-
|
|
1369
|
+
_this19._cardsFlexWrapper?.setBusy(false);
|
|
1268
1370
|
if (_wasThrown) throw _result3;
|
|
1269
1371
|
return _result3;
|
|
1270
1372
|
});
|
|
1271
|
-
return Promise.resolve(
|
|
1373
|
+
return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(function () {}) : void 0);
|
|
1272
1374
|
} catch (e) {
|
|
1273
1375
|
return Promise.reject(e);
|
|
1274
1376
|
}
|
|
@@ -1284,9 +1386,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1284
1386
|
*/
|
|
1285
1387
|
updateCardList: function _updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex) {
|
|
1286
1388
|
try {
|
|
1287
|
-
const
|
|
1288
|
-
const aUserVisibleCards =
|
|
1289
|
-
aUserAllCards =
|
|
1389
|
+
const _this20 = this;
|
|
1390
|
+
const aUserVisibleCards = _this20._controlModel.getProperty("/userVisibleCards"),
|
|
1391
|
+
aUserAllCards = _this20._controlModel.getProperty("/userAllCards"),
|
|
1290
1392
|
sDragedPositionRank = aUserVisibleCards[iDragItemIndex]?.rank,
|
|
1291
1393
|
sDropedPositionRank = aUserVisibleCards[iDropItemIndex]?.rank;
|
|
1292
1394
|
let iUpdatedDragItemIndex = aUserAllCards.findIndex(oCard => oCard.rank === sDragedPositionRank),
|
|
@@ -1299,18 +1401,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1299
1401
|
} else if (sInsertPosition === "After" && iUpdatedDragItemIndex > iUpdatedDropItemIndex) {
|
|
1300
1402
|
iUpdatedDropItemIndex++;
|
|
1301
1403
|
}
|
|
1302
|
-
const
|
|
1404
|
+
const _temp21 = function () {
|
|
1303
1405
|
if (iUpdatedDragItemIndex !== iUpdatedDropItemIndex) {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
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
|
+
});
|
|
1310
1414
|
});
|
|
1311
1415
|
}
|
|
1312
1416
|
}();
|
|
1313
|
-
return Promise.resolve(
|
|
1417
|
+
return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
|
|
1314
1418
|
} catch (e) {
|
|
1315
1419
|
return Promise.reject(e);
|
|
1316
1420
|
}
|
|
@@ -1351,10 +1455,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1351
1455
|
*/
|
|
1352
1456
|
_updateRecommendationStatus: function _updateRecommendationStatus() {
|
|
1353
1457
|
try {
|
|
1354
|
-
const
|
|
1355
|
-
return Promise.resolve(
|
|
1458
|
+
const _this21 = this;
|
|
1459
|
+
return Promise.resolve(_this21._getPersonalizationData()).then(function (oPersData) {
|
|
1356
1460
|
oPersData[RECOMMENDATION_PATH] = true;
|
|
1357
|
-
return
|
|
1461
|
+
return _this21.oPersonalizer.write(oPersData);
|
|
1358
1462
|
});
|
|
1359
1463
|
} catch (e) {
|
|
1360
1464
|
return Promise.reject(e);
|
|
@@ -1367,7 +1471,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1367
1471
|
* @returns {number} - The number of visible cards.
|
|
1368
1472
|
*/
|
|
1369
1473
|
_calculateVisibleCardCount: function _calculateVisibleCardCount() {
|
|
1370
|
-
const layout = this.
|
|
1474
|
+
const layout = this._getCardsContainer()._getLayout();
|
|
1371
1475
|
const pageDomRef = layout.getDomRef();
|
|
1372
1476
|
const deviceType = this.getDeviceType();
|
|
1373
1477
|
let count = 1;
|
|
@@ -1403,7 +1507,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1403
1507
|
* @override
|
|
1404
1508
|
*/
|
|
1405
1509
|
_adjustLayout: function _adjustLayout() {
|
|
1406
|
-
const layout = this.
|
|
1510
|
+
const layout = this._getCardsContainer()?._getLayout();
|
|
1407
1511
|
let cardWidth = this.cardWidth;
|
|
1408
1512
|
const isMobileDevice = this.getDeviceType() === DeviceType.Mobile;
|
|
1409
1513
|
if (layout && this.aVisibleCardInstances?.length > 0) {
|
|
@@ -1420,8 +1524,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1420
1524
|
// update cards in viewport
|
|
1421
1525
|
if (cardCount !== this.cardsInViewport.length) {
|
|
1422
1526
|
this.cardsInViewport = this.aVisibleCardInstances.slice(0, cardCount);
|
|
1423
|
-
const sDefaultAggreName = this.
|
|
1424
|
-
this.
|
|
1527
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1528
|
+
this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
1425
1529
|
this.cardsInViewport.forEach(card => {
|
|
1426
1530
|
const manifest = card.getManifest();
|
|
1427
1531
|
const sType = manifest["sap.card"]?.type;
|
|
@@ -1444,22 +1548,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1444
1548
|
if (overlayHBoxWrapper) {
|
|
1445
1549
|
cardWrapper.addItem(overlayHBoxWrapper);
|
|
1446
1550
|
}
|
|
1447
|
-
const sDefaultAggreName = this.
|
|
1448
|
-
this.
|
|
1551
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1552
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, cardWrapper);
|
|
1449
1553
|
});
|
|
1450
1554
|
this.shareCardsInViewport();
|
|
1451
1555
|
}
|
|
1452
|
-
|
|
1453
|
-
// show/hide Full Screen Button if available
|
|
1556
|
+
// show/hide full screen button
|
|
1454
1557
|
const showFullScreenButton = isElementExpanded || this.aVisibleCardInstances.length > cardCount;
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
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);
|
|
1463
1566
|
} else {
|
|
1464
1567
|
this.cardWidth = this.getDeviceType() === DeviceType.Mobile ? "19rem" : "22rem";
|
|
1465
1568
|
}
|
|
@@ -1470,50 +1573,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1470
1573
|
this.cardsContainerSettings?.setColumnSize(this.cardWidth);
|
|
1471
1574
|
}
|
|
1472
1575
|
},
|
|
1473
|
-
/**
|
|
1474
|
-
* Retrieves the menu items for the container.
|
|
1475
|
-
*
|
|
1476
|
-
* @private
|
|
1477
|
-
* @returns {MenuItem[]} An array of MenuItem instances.
|
|
1478
|
-
*/
|
|
1479
|
-
getContainerMenuItems: function _getContainerMenuItems() {
|
|
1480
|
-
if (!this._containerMenuItems) {
|
|
1481
|
-
const containerRefreshMenuItem = this._createRefreshMenuItem(cardsContainerMenuItems.REFRESH, "containerCardsRefresh");
|
|
1482
|
-
const containerEditCardsMenuItem = this._createEditCardsMenuItem(cardsContainerMenuItems.EDIT_CARDS, "containerManageCards");
|
|
1483
|
-
const containerShowMoreMenuItem = createShowMoreMenuItem(this, cardsContainerMenuItems.SHOW_MORE, "containerCardsShowMore");
|
|
1484
|
-
this._controlMap.set(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`, containerShowMoreMenuItem);
|
|
1485
|
-
this._containerMenuItems = [containerRefreshMenuItem, containerEditCardsMenuItem, containerShowMoreMenuItem];
|
|
1486
|
-
}
|
|
1487
|
-
return this._containerMenuItems;
|
|
1488
|
-
},
|
|
1489
|
-
/**
|
|
1490
|
-
* Retrieves the action buttons for the container.
|
|
1491
|
-
*
|
|
1492
|
-
* @private
|
|
1493
|
-
* @returns {Button[]} An array of Button instances.
|
|
1494
|
-
*/
|
|
1495
|
-
getContainerActionButtons: function _getContainerActionButtons() {
|
|
1496
|
-
if (!this._containerActionButtons) {
|
|
1497
|
-
this._containerActionButtons = [];
|
|
1498
|
-
const actionButton = createShowMoreActionButton(this, cardsContainerActionButtons.SHOW_MORE, "containerCardsShowMore");
|
|
1499
|
-
if (actionButton) {
|
|
1500
|
-
this._controlMap.set(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`, actionButton);
|
|
1501
|
-
this._containerActionButtons.push(actionButton);
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
return this._containerActionButtons;
|
|
1505
|
-
},
|
|
1506
1576
|
/**
|
|
1507
1577
|
* Retrieves the insights container.
|
|
1508
1578
|
*
|
|
1509
1579
|
* @private
|
|
1510
|
-
* @returns {
|
|
1580
|
+
* @returns {CardsContainer} - The cards container.
|
|
1511
1581
|
*/
|
|
1512
|
-
|
|
1513
|
-
if (!this.
|
|
1514
|
-
this.
|
|
1582
|
+
_getCardsContainer: function _getCardsContainer() {
|
|
1583
|
+
if (!this.cardsContainer) {
|
|
1584
|
+
this.cardsContainer = this.getParent();
|
|
1515
1585
|
}
|
|
1516
|
-
return this.
|
|
1586
|
+
return this.cardsContainer;
|
|
1517
1587
|
},
|
|
1518
1588
|
/**
|
|
1519
1589
|
* Creates the refresh menu item.
|
|
@@ -1557,18 +1627,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1557
1627
|
}
|
|
1558
1628
|
return menuItem;
|
|
1559
1629
|
},
|
|
1560
|
-
/**
|
|
1561
|
-
* Toggles the visibility of the header actions.
|
|
1562
|
-
*
|
|
1563
|
-
* @param {boolean} bShow - Whether to show or hide the header actions.
|
|
1564
|
-
* @private
|
|
1565
|
-
*/
|
|
1566
|
-
_toggleHeaderActions: function _toggleHeaderActions(bShow) {
|
|
1567
|
-
this.getAggregation("menuItems")?.forEach(menuItem => {
|
|
1568
|
-
this._getInsightsContainer()?.toggleMenuListItem(menuItem, bShow);
|
|
1569
|
-
});
|
|
1570
|
-
this.getAggregation("actionButtons")?.forEach(actionButton => this._getInsightsContainer()?.toggleActionButton(actionButton, bShow));
|
|
1571
|
-
},
|
|
1572
1630
|
/**
|
|
1573
1631
|
* Retrieves the card container based on the device type.
|
|
1574
1632
|
*
|
|
@@ -1576,23 +1634,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1576
1634
|
* @returns {GridContainer | HeaderContainer} - The card container.
|
|
1577
1635
|
*
|
|
1578
1636
|
*/
|
|
1579
|
-
|
|
1637
|
+
_getCardWrapperContainer: function _getCardWrapperContainer() {
|
|
1580
1638
|
if (this.getDeviceType() === DeviceType.Mobile) {
|
|
1581
1639
|
return this.cardsMobileContainer;
|
|
1582
1640
|
}
|
|
1583
|
-
return this.
|
|
1584
|
-
},
|
|
1585
|
-
/**
|
|
1586
|
-
* Sorts the menu items based on the provided order.
|
|
1587
|
-
*
|
|
1588
|
-
* @private
|
|
1589
|
-
* @param {string[]} menuItems - The order of the menu items.
|
|
1590
|
-
*/
|
|
1591
|
-
_sortMenuItems: function _sortMenuItems(menuItems) {
|
|
1592
|
-
const panelMenuItems = this.getAggregation("menuItems");
|
|
1593
|
-
let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
|
|
1594
|
-
this.removeAllAggregation("menuItems");
|
|
1595
|
-
sortedMenuItems?.forEach(menuItem => this.addAggregation("menuItems", menuItem));
|
|
1641
|
+
return this.cardsWrapperContainer;
|
|
1596
1642
|
},
|
|
1597
1643
|
/**
|
|
1598
1644
|
* Shares the cards that are currently in the viewport by firing the "visibleCardsUpdated" event.
|
|
@@ -1618,11 +1664,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1618
1664
|
exit: function _exit() {
|
|
1619
1665
|
runtimeHostCreated = false;
|
|
1620
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
|
+
}
|
|
1621
1700
|
}
|
|
1622
1701
|
});
|
|
1623
1702
|
CardsPanel.cardsMenuItems = cardsMenuItems;
|
|
1624
|
-
CardsPanel.
|
|
1625
|
-
CardsPanel.
|
|
1703
|
+
CardsPanel.cardsActionButtons = cardsActionButtons;
|
|
1704
|
+
CardsPanel.errorPanelMenuItems = errorPanelMenuItems;
|
|
1626
1705
|
return CardsPanel;
|
|
1627
1706
|
});
|
|
1628
1707
|
//# sourceMappingURL=CardsPanel.js.map
|