@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
|
@@ -50,15 +50,13 @@ import SimpleForm from "sap/ui/layout/form/SimpleForm";
|
|
|
50
50
|
import { form } from "sap/ui/layout/library";
|
|
51
51
|
import Config from "sap/ushell/Config";
|
|
52
52
|
import Container from "sap/ushell/Container";
|
|
53
|
-
import MyHomeImport from "sap/ushell/components/pages/MyHomeImport";
|
|
54
|
-
import PageRuntime from "sap/ushell/components/pages/controller/PageRuntime.controller";
|
|
55
53
|
import Navigation from "sap/ushell/services/Navigation";
|
|
56
54
|
import Pages from "sap/ushell/services/Pages";
|
|
57
55
|
import { IExportData } from "./AdvancedSettingsPanel";
|
|
58
56
|
import App from "./App";
|
|
59
57
|
import AppsContainer from "./AppsContainer";
|
|
60
58
|
import { ActionsPopover } from "./BaseApp";
|
|
61
|
-
import BaseAppPanel from "./BaseAppPanel";
|
|
59
|
+
import BaseAppPanel, { BaseAppPanel$SupportedEvent } from "./BaseAppPanel";
|
|
62
60
|
import BaseAppPersPanel from "./BaseAppPersPanel";
|
|
63
61
|
import BaseContainer from "./BaseContainer";
|
|
64
62
|
import type { $BasePanelSettings } from "./BasePanel";
|
|
@@ -80,7 +78,7 @@ import { IMoveConfig } from "./utils/AppManager";
|
|
|
80
78
|
import { DEFAULT_BG_COLOR, END_USER_COLORS, MYAPPS_SECTION_ID, MYHOME_PAGE_ID } from "./utils/Constants";
|
|
81
79
|
import { getLeanURL, recycleId } from "./utils/DataFormatUtils";
|
|
82
80
|
import { DeviceType } from "./utils/Device";
|
|
83
|
-
import { addFESRId, addFESRSemanticStepName } from "./utils/FESRUtil";
|
|
81
|
+
import { addFESRId, addFESRNavigationSource, addFESRSemanticStepName, FESRNavigationSource } from "./utils/FESRUtil";
|
|
84
82
|
import { sortMenuItems } from "./utils/InsightsUtils";
|
|
85
83
|
const _showAddApps = () => {
|
|
86
84
|
return (Config.last("/core/shell/enablePersonalization") || Config.last("/core/catalog/enabled")) as boolean;
|
|
@@ -93,7 +91,7 @@ export enum favouritesMenuItems {
|
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
const tilesPanelName: string = "sap.cux.home.TilesPanel";
|
|
96
|
-
const
|
|
94
|
+
const tilesContainerName: string = "sap.cux.home.TilesContainer";
|
|
97
95
|
const sortedMenuItems: (favouritesMenuItems | string)[] = [
|
|
98
96
|
favouritesMenuItems.CREATE_GROUP,
|
|
99
97
|
favouritesMenuItems.ADD_APPS,
|
|
@@ -123,9 +121,7 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
123
121
|
private _currentItem!: App | Group;
|
|
124
122
|
private _cutApp: GenericTile | undefined;
|
|
125
123
|
private oEventBus!: EventBus;
|
|
126
|
-
private _importButton!: Button;
|
|
127
124
|
private _createGroupMenuItem!: MenuItem;
|
|
128
|
-
private _isInitialLoad = true;
|
|
129
125
|
|
|
130
126
|
static readonly metadata: MetadataOptions = {
|
|
131
127
|
library: "sap.cux.home",
|
|
@@ -159,7 +155,7 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
159
155
|
this.setProperty("title", this._i18nBundle.getText("favoritesTab"));
|
|
160
156
|
this.setProperty("tooltip", this._i18nBundle.getText("favAppsInfo"));
|
|
161
157
|
//Setup Action Buttons
|
|
162
|
-
|
|
158
|
+
this._createActionButtons();
|
|
163
159
|
//Setup Menu Items
|
|
164
160
|
this._createHeaderMenuItems();
|
|
165
161
|
//add drag and drop config
|
|
@@ -188,14 +184,6 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
188
184
|
},
|
|
189
185
|
this
|
|
190
186
|
);
|
|
191
|
-
this.oEventBus.subscribe(
|
|
192
|
-
"importChannel",
|
|
193
|
-
"resetImported",
|
|
194
|
-
async () => {
|
|
195
|
-
await this.setImportButtonVisibility(true);
|
|
196
|
-
},
|
|
197
|
-
this
|
|
198
|
-
);
|
|
199
187
|
this.attachPersistDialog(() => {
|
|
200
188
|
// if while navigating to different page, a group detail dialog was open, then while navigating back group detail dialog should be in open state.
|
|
201
189
|
if (this._selectedGroupId) {
|
|
@@ -205,6 +193,9 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
205
193
|
|
|
206
194
|
document.addEventListener("click", (event) => this._resetCutElement(event));
|
|
207
195
|
document.addEventListener("keydown", (event) => this._resetCutElement(event));
|
|
196
|
+
this.additionalInfo = {
|
|
197
|
+
fesrSource: FESRNavigationSource.Favorite
|
|
198
|
+
};
|
|
208
199
|
}
|
|
209
200
|
|
|
210
201
|
private _importdone() {
|
|
@@ -384,9 +375,9 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
384
375
|
const container = this.getParent() as BaseContainer;
|
|
385
376
|
container.toggleMenuListItem(this._createGroupMenuItem, this.getApps().length > 0);
|
|
386
377
|
if (!isPhone) {
|
|
387
|
-
|
|
378
|
+
this._switchToRecommendedIfNoFavApps(apps, groups);
|
|
388
379
|
}
|
|
389
|
-
if (checkPanelExists(container,
|
|
380
|
+
if (checkPanelExists(container, tilesContainerName, tilesPanelName)) {
|
|
390
381
|
this._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
391
382
|
}
|
|
392
383
|
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
@@ -401,15 +392,20 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
401
392
|
* @param {App[]} apps - The list of favorite apps.
|
|
402
393
|
* @param {Group[]} groups - The list of favorite app groups.
|
|
403
394
|
*/
|
|
404
|
-
private
|
|
395
|
+
private _switchToRecommendedIfNoFavApps(apps: App[], groups: Group[]): void {
|
|
405
396
|
const container = this.getParent() as AppsContainer;
|
|
406
397
|
const panels = container.getContent() as BaseAppPanel[];
|
|
407
398
|
const recommendedPanel = panels ? panels.find((panel) => panel instanceof RecommendedAppPanel) : null;
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
399
|
+
|
|
400
|
+
if (recommendedPanel) {
|
|
401
|
+
recommendedPanel.attachEventOnce("supported", async (event: BaseAppPanel$SupportedEvent) => {
|
|
402
|
+
const isSupported = event.getParameter("isSupported") as boolean;
|
|
403
|
+
if ([...apps, ...groups].length === 0 && isSupported) {
|
|
404
|
+
container.setProperty?.("selectedKey", "recommendedApps");
|
|
405
|
+
await container.refreshPanel(recommendedPanel);
|
|
406
|
+
}
|
|
407
|
+
});
|
|
411
408
|
}
|
|
412
|
-
this._isInitialLoad = false;
|
|
413
409
|
}
|
|
414
410
|
|
|
415
411
|
/**
|
|
@@ -609,7 +605,7 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
609
605
|
* Creates actions buttons for panel.
|
|
610
606
|
* @private
|
|
611
607
|
*/
|
|
612
|
-
private
|
|
608
|
+
private _createActionButtons() {
|
|
613
609
|
if (!this._actionButtons) {
|
|
614
610
|
this._actionButtons = [];
|
|
615
611
|
if (_showAddApps()) {
|
|
@@ -628,29 +624,6 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
628
624
|
this._actionButtons.forEach((actionButton) => {
|
|
629
625
|
this.addAggregation("actionButtons", actionButton);
|
|
630
626
|
});
|
|
631
|
-
const isImportEnabled = await this._validateAppsMigration();
|
|
632
|
-
if (isImportEnabled) {
|
|
633
|
-
this._createImportButton();
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
private _createImportButton(): Button {
|
|
638
|
-
if (!this._importButton) {
|
|
639
|
-
this._importButton = new Button(`${this.getId()}-importAppsBtn`, {
|
|
640
|
-
tooltip: this._i18nBundle.getText("importAppsNow"),
|
|
641
|
-
text: this._i18nBundle.getText("importAppsNow"),
|
|
642
|
-
press: this._openImportAppsDialog.bind(this)
|
|
643
|
-
});
|
|
644
|
-
addFESRId(this._importButton, "importAppsDialog");
|
|
645
|
-
this._actionButtons.push(this._importButton);
|
|
646
|
-
this.insertAggregation("actionButtons", this._importButton, 0);
|
|
647
|
-
}
|
|
648
|
-
return this._importButton;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
private async setImportButtonVisibility(bVisible: boolean): Promise<void> {
|
|
652
|
-
await MyHomeImport.setImportEnabled(bVisible);
|
|
653
|
-
this._createImportButton().setVisible(bVisible);
|
|
654
627
|
}
|
|
655
628
|
|
|
656
629
|
/**
|
|
@@ -927,25 +900,7 @@ export default class FavAppPanel extends BaseAppPersPanel {
|
|
|
927
900
|
shellHash: `Shell-appfinder?&/catalog/${JSON.stringify(navigationObject)}`
|
|
928
901
|
}
|
|
929
902
|
});
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* Validates if import apps is enabled
|
|
934
|
-
*
|
|
935
|
-
*@returns {Promise} - resolves to boolean value (import is enabled/disabled)
|
|
936
|
-
*/
|
|
937
|
-
private async _validateAppsMigration() {
|
|
938
|
-
try {
|
|
939
|
-
return await MyHomeImport.isImportEnabled();
|
|
940
|
-
} catch (error: unknown) {
|
|
941
|
-
Log.warning(error instanceof Error ? error.message : "Error while checking if import apps is enabled");
|
|
942
|
-
return false;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
private _openImportAppsDialog() {
|
|
947
|
-
const pageRuntime = new PageRuntime();
|
|
948
|
-
pageRuntime.onImportDialogPress();
|
|
903
|
+
addFESRNavigationSource(FESRNavigationSource.AppFinder);
|
|
949
904
|
}
|
|
950
905
|
|
|
951
906
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrequentAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/FrequentAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+BAA+B,CAAC;IAO/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAM3D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;IAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"FrequentAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/FrequentAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+BAA+B,CAAC;IAO/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAM3D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;IAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;IAMjE;;;;;;;;;;;;;;OAcG;IAEH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,gBAAgB;QAC7D,OAAO,CAAC,SAAS,CAAY;QAC7B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CASvC;QAEF;;;;;WAKG;oBACgB,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,kBAAkB;QAKtD,IAAI;QA0BX;;;WAGG;QACU,QAAQ;QAcrB;;;;WAIG;gBACW,0BAA0B;QAaxC;;;;;WAKG;QACH,OAAO,CAAC,WAAW;QAgBnB;;;;;WAKG;QACH,SAAS,CAAC,0BAA0B;KAMpC;CAEA"}
|
|
@@ -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/ui/core/EventBus", "sap/ushell/Container", "sap/ushell/EventHub", "./BaseAppPersPanel", "./MenuItem"], function (Log, EventBus, Container, EventHub, __BaseAppPersPanel, __MenuItem) {
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/ui/core/EventBus", "sap/ushell/Container", "sap/ushell/EventHub", "./BaseAppPersPanel", "./MenuItem", "./utils/FESRUtil"], function (Log, EventBus, Container, EventHub, __BaseAppPersPanel, __MenuItem, ___utils_FESRUtil) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -21,6 +21,7 @@ sap.ui.define(["sap/base/Log", "sap/ui/core/EventBus", "sap/ushell/Container", "
|
|
|
21
21
|
}
|
|
22
22
|
const BaseAppPersPanel = _interopRequireDefault(__BaseAppPersPanel);
|
|
23
23
|
const MenuItem = _interopRequireDefault(__MenuItem);
|
|
24
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
24
25
|
/**
|
|
25
26
|
*
|
|
26
27
|
* Provides the class for managing frequent apps.
|
|
@@ -80,6 +81,9 @@ sap.ui.define(["sap/base/Log", "sap/ui/core/EventBus", "sap/ushell/Container", "
|
|
|
80
81
|
//update color of the app in most used apps
|
|
81
82
|
this._applyUngroupedTileColor(item, color);
|
|
82
83
|
}, this);
|
|
84
|
+
this.additionalInfo = {
|
|
85
|
+
fesrSource: FESRNavigationSource.FrequentlyUsed
|
|
86
|
+
};
|
|
83
87
|
},
|
|
84
88
|
/**
|
|
85
89
|
* Fetch frequent apps and set apps aggregation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrequentAppPanel.js","names":["sap","ui","define","Log","EventBus","Container","EventHub","__BaseAppPersPanel","__MenuItem","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BaseAppPersPanel","MenuItem","FrequentAppPanel","extend","metadata","library","defaultAggregation","aggregations","apps","type","singularName","multiple","visibility","constructor","_constructor","id","settings","BaseAppPersPanel.prototype.constructor.call","setSupported","init","_init","BaseAppPersPanel.prototype.init.call","setProperty","_i18nBundle","getText","_attachUserActivityTracking","on","do","refresh","oEventBus","getInstance","subscribe","channelId","eventId","data","item","color","_applyUngroupedTileColor","loadApps","_loadApps","_this","Promise","resolve","_getFrequentVisualizations","frequentVisualizations","destroyAggregation","map","visualization","index","menuItems","_getActions","addedInFavorites","frequentApps","generateApps","setApps","reject","_this2","getServiceAsync","UserRecentsService","getFrequentActivity","frequentActivities","convertActivitiesToVisualizations","error","isAppAddedInFavorite","action","push","getKey","title","icon","press","event","_addAppToFavorites","generateIllustratedMessage","_generateIllustratedMessage","illustratedMessage","BaseAppPersPanel.prototype.generateIllustratedMessage.call","setDescription"],"sources":["FrequentAppPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport EventBus from \"sap/ui/core/EventBus\";\nimport Container from \"sap/ushell/Container\";\nimport EventHub from \"sap/ushell/EventHub\";\nimport UserRecents from \"sap/ushell/services/UserRecents\";\nimport App from \"./App\";\nimport BaseAppPersPanel from \"./BaseAppPersPanel\";\nimport type { $BasePanelSettings } from \"./BasePanel\";\nimport Group from \"./Group\";\nimport { IActivity } from \"./interface/AppsInterface\";\nimport MenuItem from \"./MenuItem\";\n\n/**\n *\n * Provides the class for managing frequent apps.\n *\n * @extends sap.cux.home.BaseAppPersPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121.0\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.FrequentAppPanel\n */\n\nexport default class FrequentAppPanel extends BaseAppPersPanel {\n\tprivate oEventBus!: EventBus;\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tdefaultAggregation: \"apps\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Apps aggregation for Frequent apps\n\t\t\t */\n\t\t\tapps: { type: \"sap.cux.home.App\", singularName: \"app\", multiple: true, visibility: \"hidden\" }\n\t\t}\n\t};\n\n\t/**\n\t * Constructor for a new frequent app 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\tthis.setSupported(false);\n\t}\n\n\tpublic init() {\n\t\tsuper.init();\n\t\tthis.setProperty(\"key\", \"frequentApps\");\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"frequentlyUsedTab\"));\n\t\tthis.setProperty(\"tooltip\", this._i18nBundle.getText(\"frequentlyUsedTabInfo\"));\n\t\tthis._attachUserActivityTracking();\n\t\tEventHub.on(\"userRecentsCleared\").do(() => {\n\t\t\tvoid this.refresh();\n\t\t});\n\n\t\tthis.oEventBus = EventBus.getInstance();\n\t\tthis.oEventBus.subscribe(\n\t\t\t\"appsChannel\",\n\t\t\t\"favAppColorChanged\",\n\t\t\t(channelId?: string, eventId?: string, data?) => {\n\t\t\t\tconst { item, color } = data as { item: App | Group; color: string };\n\t\t\t\t//update color of the app in most used apps\n\t\t\t\tthis._applyUngroupedTileColor(item, color);\n\t\t\t},\n\t\t\tthis\n\t\t);\n\t}\n\n\t/**\n\t * Fetch frequent apps and set apps aggregation\n\t * @private\n\t */\n\tpublic async loadApps() {\n\t\tlet frequentVisualizations = await this._getFrequentVisualizations();\n\t\tthis.destroyAggregation(\"apps\", true);\n\t\tfrequentVisualizations = frequentVisualizations.map((visualization, index) => {\n\t\t\treturn {\n\t\t\t\t...visualization,\n\t\t\t\tmenuItems: this._getActions(visualization.addedInFavorites, index)\n\t\t\t};\n\t\t});\n\t\t//convert apps objects array to apps instances\n\t\tconst frequentApps = this.generateApps(frequentVisualizations);\n\t\tthis.setApps(frequentApps);\n\t}\n\n\t/**\n\t * Returns list of frequent apps\n\t * @private\n\t * @returns {object[]} - Array of frequent apps.\n\t */\n\tprivate async _getFrequentVisualizations() {\n\t\ttry {\n\t\t\tconst UserRecentsService = await Container.getServiceAsync<UserRecents>(\"UserRecents\");\n\t\t\tconst frequentActivities: IActivity[] = (await UserRecentsService?.getFrequentActivity()) || [];\n\t\t\t//convert activity to apps\n\t\t\tconst frequentVisualizations = await this.convertActivitiesToVisualizations(frequentActivities);\n\t\t\treturn frequentVisualizations;\n\t\t} catch (error) {\n\t\t\tLog.error(error as string);\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns list of actions available for selected app\n\t * @private\n\t * @param {boolean} isAppAddedInFavorite - true if app is already present in favorite, false otherwise.\n\t * @returns {sap.cux.home.MenuItem[]} - Array of list items.\n\t */\n\tprivate _getActions(isAppAddedInFavorite: boolean = false, index?: number) {\n\t\tconst action = [];\n\t\tif (!isAppAddedInFavorite) {\n\t\t\taction.push(\n\t\t\t\tnew MenuItem(`${this.getKey()}--addToFavorites--${index}`, {\n\t\t\t\t\ttitle: this._i18nBundle.getText(\"addToFavorites\"),\n\t\t\t\t\ticon: \"sap-icon://add-favorite\",\n\t\t\t\t\tpress: (event) => {\n\t\t\t\t\t\tvoid this._addAppToFavorites(event);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t\treturn action;\n\t}\n\n\t/**\n\t * Generates illustrated message for frequent apps panel.\n\t * @private\n\t * @override\n\t * @returns {sap.m.IllustratedMessage} Illustrated error message.\n\t */\n\tprotected generateIllustratedMessage() {\n\t\tconst illustratedMessage = super.generateIllustratedMessage();\n\t\t//override the default description\n\t\tillustratedMessage.setDescription(this._i18nBundle.getText(\"noFreqAppsDescription\"));\n\t\treturn illustratedMessage;\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wIAAAC,GAAA,EAAAC,QAAA,EAAAC,SAAA,EAAAC,QAAA,EAAAC,kBAAA,EAAAC,UAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAkjBO,SAAAG,OAAgBC,IAAI,EAAEC,OAAO,EAAE;IACrC,IAAI;MACH,IAAIC,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAMG,CAAC,EAAE;MACV,OAAOF,OAAO,CAACE,CAAC,CAAC;IAClB;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IACpC;IACA,OAAOC,MAAM;EACd;EAAC,MAhjBMG,g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BAAmB,CAAC,CAAC,EAAA5D,IAAA,WAAlF6D,kBAA+B;cACrC;cAAA,OAAAnB,OAAA,CAAAC,OAAA,CACqCc,MAAA,CAAKK,iCAAiC,CAACD,kBAAkB,CAAC;YAAA;UAAA;QAEhG,CAAC,YAAQE,KAAK,EAAE;UACf9E,GAAG,CAAC8E,KAAK,CAACA,KAAe,CAAC;UAC1B,OAAO,EAAE;QACV,CAAC;MACF,CAAC,QAAAhE,CAAA;QAAA,OAAA2C,OAAA,CAAAc,MAAA,CAAAzD,CAAA;MAAA;IAAA;IAED;AACD;AACA;AACA;AACA;AACA;IACSoD,WAAW,WAAAA,YAACa,oBAA6B,GAAG,KAAK,EAAEf,KAAc,EAAE;MAC1E,MAAMgB,MAAM,GAAG,EAAE;MACjB,IAAI,CAACD,oBAAoB,EAAE;QAC1BC,MAAM,CAACC,IAAI,CACV,IAAIhE,QAAQ,CAAC,GAAG,IAAI,CAACiE,MAAM,CAAC,CAAC,qBAAqBlB,KAAK,EAAE,EAAE;UAC1DmB,KAAK,EAAE,IAAI,CAAC5C,WAAW,CAACC,OAAO,CAAC,gBAAgB,CAAC;UACjD4C,IAAI,EAAE,yBAAyB;UAC/BC,KAAK,EAAGC,KAAK,IAAK;YACjB,KAAK,IAAI,CAACC,kBAAkB,CAACD,KAAK,CAAC;UACpC;QACD,CAAC,CACF,CAAC;MACF;MACA,OAAON,MAAM;IACd,CAAC;IAED;AACD;AACA;AACA;AACA;AACA;IACWQ,0BAA0B,WAAAC,4BAAA,EAAG;MACtC,MAAMC,kBAAkB,GAAAC,0DAAA,MAAqC;MAC7D;MACAD,kBAAkB,CAACE,cAAc,CAAC,IAAI,CAACrD,WAAW,CAACC,OAAO,CAAC,uBAAuB,CAAC,CAAC;MACpF,OAAOkD,kBAAkB;IAC1B;EAAC;EAAA,OApHmBxE,gBAAgB;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"FrequentAppPanel.js","names":["sap","ui","define","Log","EventBus","Container","EventHub","__BaseAppPersPanel","__MenuItem","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BaseAppPersPanel","MenuItem","FESRNavigationSource","FrequentAppPanel","extend","metadata","library","defaultAggregation","aggregations","apps","type","singularName","multiple","visibility","constructor","_constructor","id","settings","BaseAppPersPanel.prototype.constructor.call","setSupported","init","_init","BaseAppPersPanel.prototype.init.call","setProperty","_i18nBundle","getText","_attachUserActivityTracking","on","do","refresh","oEventBus","getInstance","subscribe","channelId","eventId","data","item","color","_applyUngroupedTileColor","additionalInfo","fesrSource","FrequentlyUsed","loadApps","_loadApps","_this","Promise","resolve","_getFrequentVisualizations","frequentVisualizations","destroyAggregation","map","visualization","index","menuItems","_getActions","addedInFavorites","frequentApps","generateApps","setApps","reject","_this2","getServiceAsync","UserRecentsService","getFrequentActivity","frequentActivities","convertActivitiesToVisualizations","error","isAppAddedInFavorite","action","push","getKey","title","icon","press","event","_addAppToFavorites","generateIllustratedMessage","_generateIllustratedMessage","illustratedMessage","BaseAppPersPanel.prototype.generateIllustratedMessage.call","setDescription"],"sources":["FrequentAppPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport EventBus from \"sap/ui/core/EventBus\";\nimport Container from \"sap/ushell/Container\";\nimport EventHub from \"sap/ushell/EventHub\";\nimport UserRecents from \"sap/ushell/services/UserRecents\";\nimport App from \"./App\";\nimport BaseAppPersPanel from \"./BaseAppPersPanel\";\nimport type { $BasePanelSettings } from \"./BasePanel\";\nimport Group from \"./Group\";\nimport { IActivity } from \"./interface/AppsInterface\";\nimport MenuItem from \"./MenuItem\";\nimport { FESRNavigationSource } from \"./utils/FESRUtil\";\n\n/**\n *\n * Provides the class for managing frequent apps.\n *\n * @extends sap.cux.home.BaseAppPersPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121.0\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.FrequentAppPanel\n */\n\nexport default class FrequentAppPanel extends BaseAppPersPanel {\n\tprivate oEventBus!: EventBus;\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tdefaultAggregation: \"apps\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Apps aggregation for Frequent apps\n\t\t\t */\n\t\t\tapps: { type: \"sap.cux.home.App\", singularName: \"app\", multiple: true, visibility: \"hidden\" }\n\t\t}\n\t};\n\n\t/**\n\t * Constructor for a new frequent app 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\tthis.setSupported(false);\n\t}\n\n\tpublic init() {\n\t\tsuper.init();\n\t\tthis.setProperty(\"key\", \"frequentApps\");\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"frequentlyUsedTab\"));\n\t\tthis.setProperty(\"tooltip\", this._i18nBundle.getText(\"frequentlyUsedTabInfo\"));\n\t\tthis._attachUserActivityTracking();\n\t\tEventHub.on(\"userRecentsCleared\").do(() => {\n\t\t\tvoid this.refresh();\n\t\t});\n\n\t\tthis.oEventBus = EventBus.getInstance();\n\t\tthis.oEventBus.subscribe(\n\t\t\t\"appsChannel\",\n\t\t\t\"favAppColorChanged\",\n\t\t\t(channelId?: string, eventId?: string, data?) => {\n\t\t\t\tconst { item, color } = data as { item: App | Group; color: string };\n\t\t\t\t//update color of the app in most used apps\n\t\t\t\tthis._applyUngroupedTileColor(item, color);\n\t\t\t},\n\t\t\tthis\n\t\t);\n\t\tthis.additionalInfo = {\n\t\t\tfesrSource: FESRNavigationSource.FrequentlyUsed\n\t\t};\n\t}\n\n\t/**\n\t * Fetch frequent apps and set apps aggregation\n\t * @private\n\t */\n\tpublic async loadApps() {\n\t\tlet frequentVisualizations = await this._getFrequentVisualizations();\n\t\tthis.destroyAggregation(\"apps\", true);\n\t\tfrequentVisualizations = frequentVisualizations.map((visualization, index) => {\n\t\t\treturn {\n\t\t\t\t...visualization,\n\t\t\t\tmenuItems: this._getActions(visualization.addedInFavorites, index)\n\t\t\t};\n\t\t});\n\t\t//convert apps objects array to apps instances\n\t\tconst frequentApps = this.generateApps(frequentVisualizations);\n\t\tthis.setApps(frequentApps);\n\t}\n\n\t/**\n\t * Returns list of frequent apps\n\t * @private\n\t * @returns {object[]} - Array of frequent apps.\n\t */\n\tprivate async _getFrequentVisualizations() {\n\t\ttry {\n\t\t\tconst UserRecentsService = await Container.getServiceAsync<UserRecents>(\"UserRecents\");\n\t\t\tconst frequentActivities: IActivity[] = (await UserRecentsService?.getFrequentActivity()) || [];\n\t\t\t//convert activity to apps\n\t\t\tconst frequentVisualizations = await this.convertActivitiesToVisualizations(frequentActivities);\n\t\t\treturn frequentVisualizations;\n\t\t} catch (error) {\n\t\t\tLog.error(error as string);\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns list of actions available for selected app\n\t * @private\n\t * @param {boolean} isAppAddedInFavorite - true if app is already present in favorite, false otherwise.\n\t * @returns {sap.cux.home.MenuItem[]} - Array of list items.\n\t */\n\tprivate _getActions(isAppAddedInFavorite: boolean = false, index?: number) {\n\t\tconst action = [];\n\t\tif (!isAppAddedInFavorite) {\n\t\t\taction.push(\n\t\t\t\tnew MenuItem(`${this.getKey()}--addToFavorites--${index}`, {\n\t\t\t\t\ttitle: this._i18nBundle.getText(\"addToFavorites\"),\n\t\t\t\t\ticon: \"sap-icon://add-favorite\",\n\t\t\t\t\tpress: (event) => {\n\t\t\t\t\t\tvoid this._addAppToFavorites(event);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t\treturn action;\n\t}\n\n\t/**\n\t * Generates illustrated message for frequent apps panel.\n\t * @private\n\t * @override\n\t * @returns {sap.m.IllustratedMessage} Illustrated error message.\n\t */\n\tprotected generateIllustratedMessage() {\n\t\tconst illustratedMessage = super.generateIllustratedMessage();\n\t\t//override the default description\n\t\tillustratedMessage.setDescription(this._i18nBundle.getText(\"noFreqAppsDescription\"));\n\t\treturn illustratedMessage;\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,4JAAAC,GAAA,EAAAC,QAAA,EAAAC,SAAA,EAAAC,QAAA,EAAAC,kBAAA,EAAAC,UAAA,EAAAC,iBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAkjBO,SAAAG,OAAgBC,IAAI,EAAEC,OAAO,EAAE;IACrC,IAAI;MACH,IAAIC,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAMG,CAAC,EAAE;MACV,OAAOF,OAAO,CAACE,CAAC,CAAC;IAClB;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IACpC;IACA,OAAOC,MAAM;EACd;EAAC,MAhjBMG,gBAAgB,GAAAV,sBAAA,CAAAH,kBAAA;EAAA,MAIhBc,QAAQ,GAAAX,sBAAA,CAAAF,UAAA;EAAA,MACNc,oBAAoB,GAAAb,iBAAA;EAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAdA,MAgBqBc,gBAAgB,GAASH,gBAAgB,CAAAI,MAAA;IAE7CC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,kBAAkB,EAAE,MAAM;MAC1BC,YAAY,EAAE;QACb;AACH;AACA;QACGC,IAAI,EAA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MACF,CAAC,QAAApE,CAAA;QAAA,OAAA+C,OAAA,CAAAc,MAAA,CAAA7D,CAAA;MAAA;IAAA;IAED;AACD;AACA;AACA;AACA;AACA;IACSwD,WAAW,WAAAA,YAACa,oBAA6B,GAAG,KAAK,EAAEf,KAAc,EAAE;MAC1E,MAAMgB,MAAM,GAAG,EAAE;MACjB,IAAI,CAACD,oBAAoB,EAAE;QAC1BC,MAAM,CAACC,IAAI,CACV,IAAIpE,QAAQ,CAAC,GAAG,IAAI,CAACqE,MAAM,CAAC,CAAC,qBAAqBlB,KAAK,EAAE,EAAE;UAC1DmB,KAAK,EAAE,IAAI,CAAC/C,WAAW,CAACC,OAAO,CAAC,gBAAgB,CAAC;UACjD+C,IAAI,EAAE,yBAAyB;UAC/BC,KAAK,EAAGC,KAAK,IAAK;YACjB,KAAK,IAAI,CAACC,kBAAkB,CAACD,KAAK,CAAC;UACpC;QACD,CAAC,CACF,CAAC;MACF;MACA,OAAON,MAAM;IACd,CAAC;IAED;AACD;AACA;AACA;AACA;AACA;IACWQ,0BAA0B,WAAAC,4BAAA,EAAG;MACtC,MAAMC,kBAAkB,GAAAC,0DAAA,MAAqC;MAC7D;MACAD,kBAAkB,CAACE,cAAc,CAAC,IAAI,CAACxD,WAAW,CAACC,OAAO,CAAC,uBAAuB,CAAC,CAAC;MACpF,OAAOqD,kBAAkB;IAC1B;EAAC;EAAA,OAvHmB3E,gBAAgB;AAAA","ignoreList":[]}
|
|
@@ -15,6 +15,7 @@ import type { $BasePanelSettings } from "./BasePanel";
|
|
|
15
15
|
import Group from "./Group";
|
|
16
16
|
import { IActivity } from "./interface/AppsInterface";
|
|
17
17
|
import MenuItem from "./MenuItem";
|
|
18
|
+
import { FESRNavigationSource } from "./utils/FESRUtil";
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
*
|
|
@@ -77,6 +78,9 @@ export default class FrequentAppPanel extends BaseAppPersPanel {
|
|
|
77
78
|
},
|
|
78
79
|
this
|
|
79
80
|
);
|
|
81
|
+
this.additionalInfo = {
|
|
82
|
+
fesrSource: FESRNavigationSource.FrequentlyUsed
|
|
83
|
+
};
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
/**
|
|
@@ -51,12 +51,19 @@ declare module "sap/cux/home/InsightsAdditionPanel" {
|
|
|
51
51
|
*/
|
|
52
52
|
private _fetchAddCardDialogContent;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Cleans up the CardHelper instance when exiting the panel.
|
|
55
|
+
*
|
|
56
|
+
* @public
|
|
57
|
+
* @override
|
|
58
|
+
*/
|
|
59
|
+
exit(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves the CardsContainer instance from the parent layout.
|
|
55
62
|
*
|
|
56
63
|
* @private
|
|
57
|
-
* @returns {
|
|
64
|
+
* @returns {CardsContainer | undefined} The CardsContainer instance or undefined if not found.
|
|
58
65
|
*/
|
|
59
|
-
private
|
|
66
|
+
private getCardsContainer;
|
|
60
67
|
/**
|
|
61
68
|
* Checks if the Insights Addition Panel is supported.
|
|
62
69
|
*
|
|
@@ -66,7 +73,7 @@ declare module "sap/cux/home/InsightsAdditionPanel" {
|
|
|
66
73
|
*/
|
|
67
74
|
isSupported(): Promise<boolean>;
|
|
68
75
|
/**
|
|
69
|
-
* Retrieves the `CardsPanel` instance from the `
|
|
76
|
+
* Retrieves the `CardsPanel` instance from the `CardsContainer`.
|
|
70
77
|
*
|
|
71
78
|
* @private
|
|
72
79
|
* @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsAdditionPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/InsightsAdditionPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oCAAoC,CAAC;IAgBpD,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightsAdditionPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/InsightsAdditionPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oCAAoC,CAAC;IAgBpD,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;IAU/D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,iBAAiB;QACnE,OAAO,CAAC,cAAc,CAAU;QAChC,OAAO,CAAC,kBAAkB,CAAuB;QACjD,OAAO,CAAC,gBAAgB,CAAW;QACnC,OAAO,CAAC,wBAAwB,CAAiB;QACjD;;;;;WAKG;QACI,IAAI;QAqBX;;;;WAIG;QACH,OAAO,CAAC,eAAe;QAIvB;;;;;;;;;WASG;gBACW,aAAa;QAgB3B;;;;;;WAMG;gBACW,0BAA0B;QASxC;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAOnB;;;;;WAKG;QACH,OAAO,CAAC,iBAAiB;QAKzB;;;;;;WAMG;QACU,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;QAqB5C;;;;;WAKG;QACH,OAAO,CAAC,gBAAgB;QAMxB;;;;;;;;;;WAUG;gBACW,eAAe;QAyB7B;;;;;WAKG;QACH,OAAO,CAAC,wBAAwB;KAIhC;CAEA"}
|
|
@@ -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/insights/CardHelper", "sap/m/Button", "sap/m/library", "sap/m/MessageBox", "sap/m/MessageToast", "sap/m/VBox", "./BaseSettingsPanel", "./
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m/library", "sap/m/MessageBox", "sap/m/MessageToast", "sap/m/VBox", "./BaseSettingsPanel", "./CardsContainer", "./CardsPanel", "./utils/Constants", "./utils/FeatureUtils", "./utils/FESRUtil", "./utils/PXFeedback"], function (Log, CardHelper, Button, sap_m_library, MessageBox, MessageToast, VBox, __BaseSettingsPanel, __CardsContainer, __CardsPanel, ___utils_Constants, ___utils_FeatureUtils, ___utils_FESRUtil, ___utils_PXFeedback) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -33,14 +33,15 @@ sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m
|
|
|
33
33
|
}
|
|
34
34
|
const ButtonType = sap_m_library["ButtonType"];
|
|
35
35
|
const BaseSettingsPanel = _interopRequireDefault(__BaseSettingsPanel);
|
|
36
|
+
const CardsContainer = _interopRequireDefault(__CardsContainer);
|
|
36
37
|
const CardsPanel = _interopRequireDefault(__CardsPanel);
|
|
37
|
-
const InsightsContainer = _interopRequireDefault(__InsightsContainer);
|
|
38
38
|
const CONTENT_ADDITION_PANEL_TYPES = ___utils_Constants["CONTENT_ADDITION_PANEL_TYPES"];
|
|
39
39
|
const FEATURE_TOGGLES = ___utils_Constants["FEATURE_TOGGLES"];
|
|
40
40
|
const FESR_IDS = ___utils_Constants["FESR_IDS"];
|
|
41
41
|
const isNavigationSupportedForFeature = ___utils_FeatureUtils["isNavigationSupportedForFeature"];
|
|
42
42
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
43
43
|
const FESR_EVENTS = ___utils_FESRUtil["FESR_EVENTS"];
|
|
44
|
+
const triggerPXIntegration = ___utils_PXFeedback["triggerPXIntegration"];
|
|
44
45
|
/**
|
|
45
46
|
*
|
|
46
47
|
* Class for Apps Addition Panel in MyHome.
|
|
@@ -144,14 +145,26 @@ sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m
|
|
|
144
145
|
}
|
|
145
146
|
},
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Cleans up the CardHelper instance when exiting the panel.
|
|
149
|
+
*
|
|
150
|
+
* @public
|
|
151
|
+
* @override
|
|
152
|
+
*/
|
|
153
|
+
exit: function _exit() {
|
|
154
|
+
BaseSettingsPanel.prototype.exit.call(this);
|
|
155
|
+
if (this.cardHelperInstance) {
|
|
156
|
+
this.cardHelperInstance.oManageAddInsightsCardWithSearchDialog = undefined;
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* Retrieves the CardsContainer instance from the parent layout.
|
|
148
161
|
*
|
|
149
162
|
* @private
|
|
150
|
-
* @returns {
|
|
163
|
+
* @returns {CardsContainer | undefined} The CardsContainer instance or undefined if not found.
|
|
151
164
|
*/
|
|
152
|
-
|
|
165
|
+
getCardsContainer: function _getCardsContainer() {
|
|
153
166
|
const layout = this.getParent()?.getParent();
|
|
154
|
-
return layout.getContent().find(container => container instanceof
|
|
167
|
+
return layout.getContent().find(container => container instanceof CardsContainer);
|
|
155
168
|
},
|
|
156
169
|
/**
|
|
157
170
|
* Checks if the Insights Addition Panel is supported.
|
|
@@ -193,13 +206,13 @@ sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m
|
|
|
193
206
|
}
|
|
194
207
|
},
|
|
195
208
|
/**
|
|
196
|
-
* Retrieves the `CardsPanel` instance from the `
|
|
209
|
+
* Retrieves the `CardsPanel` instance from the `CardsContainer`.
|
|
197
210
|
*
|
|
198
211
|
* @private
|
|
199
212
|
* @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.
|
|
200
213
|
*/
|
|
201
214
|
_fetchCardsPanel: function _fetchCardsPanel() {
|
|
202
|
-
return this.
|
|
215
|
+
return this.getCardsContainer()?.getContent().find(panel => panel instanceof CardsPanel);
|
|
203
216
|
},
|
|
204
217
|
/**
|
|
205
218
|
* Handles the logic for creating and adding a new insight card to cards Panel.
|
|
@@ -215,6 +228,7 @@ sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m
|
|
|
215
228
|
onPressAddCards: function _onPressAddCards() {
|
|
216
229
|
try {
|
|
217
230
|
const _this4 = this;
|
|
231
|
+
triggerPXIntegration("addCardsButton");
|
|
218
232
|
const addContentDialog = _this4.getParent();
|
|
219
233
|
const _temp4 = _finallyRethrows(function () {
|
|
220
234
|
return _catch(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsAdditionPanel.js","names":["sap","ui","define","Log","CardHelper","Button","sap_m_library","MessageBox","MessageToast","VBox","__BaseSettingsPanel","__CardsPanel","__InsightsContainer","___utils_Constants","___utils_FeatureUtils","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","_finallyRethrows","finalizer","bind","ButtonType","BaseSettingsPanel","CardsPanel","InsightsContainer","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","InsightsAdditionPanel","extend","init","_init","BaseSettingsPanel.prototype.init.call","setProperty","AI_INSIGHTS_CARDS","_i18nBundle","getText","addCardsButton","getId","text","type","Emphasized","enabled","press","onPressAddCards","PRESS","ADD_AI_CARD","addActionButton","_setupContent","attachEvent","resetAddCardInnerContent","enableAddButton","_enableAddButton","action","setEnabled","_this","_temp","Promise","resolve","_fetchAddCardDialogContent","dialogContent","wrapperVBox","items","backgroundDesign","Solid","height","addAggregation","error","message","reject","_this2","getServiceAsync","_getServiceAsync","cardHelperInstance","fetchAddCardInnerContent","event","_latestGeneratedManifest","getParameters","isValidManifest","Object","keys","length","getInsightsContainer","_getInsightsContainer","layout","getParent","getContent","find","container","isSupported","_isSupported","_this3","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","removePanel","updateActionButtons","insightsCardIntent","target","semanticObject","_temp2","undefined","AI_GENERATED_CARD","_isNavigationSupporte","_fetchCardsPanel","panel","_onPressAddCards","_this4","addContentDialog","_temp4","setBusy","_createCard","createdCardResponse","cardTitle","header","title","show","close","visible","information","styleClass","cardsPanel","refreshData","_wasThrown","_result","_resetAddCardInnerContent"],"sources":["InsightsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport CardHelper from \"sap/insights/CardHelper\";\nimport Button from \"sap/m/Button\";\nimport { BackgroundDesign, ButtonType } from \"sap/m/library\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport { Target } from \"sap/ushell/services/Navigation\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport CardsPanel from \"./CardsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport InsightsContainer from \"./InsightsContainer\";\nimport { ICardHelper, ICardHelperInstance, ICardManifest } from \"./interface/CardsInterface\";\nimport { CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES, FESR_IDS } from \"./utils/Constants\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n * @private\n *\n * @alias sap.cux.home.InsightsAdditionPanel\n */\nexport default class InsightsAdditionPanel extends BaseSettingsPanel {\n\tprivate addCardsButton!: Button;\n\tprivate cardHelperInstance!: ICardHelperInstance;\n\tprivate isPanelSupported!: boolean;\n\tprivate _latestGeneratedManifest!: ICardManifest;\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init() {\n\t\tsuper.init();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_INSIGHTS_CARDS);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"insightsCards\"));\n\n\t\t//setup actions\n\t\tthis.addCardsButton = new Button(`${this.getId()}-add-cards-btn`, {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tenabled: false,\n\t\t\tpress: this.onPressAddCards.bind(this)\n\t\t});\n\t\taddFESRSemanticStepName(this.addCardsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_CARD);\n\t\tthis.addActionButton(this.addCardsButton);\n\t\t//setup content\n\t\tvoid this._setupContent();\n\t\tthis.attachEvent(\"onDialogClose\", this.resetAddCardInnerContent.bind(this));\n\t}\n\n\t/**\n\t * Enables or disables the \"Add Cards\" button.\n\t *\n\t * @param {boolean} action - If true, the button is enabled; if false, it is disabled.\n\t */\n\tprivate enableAddButton(action: boolean) {\n\t\tthis.addCardsButton.setEnabled(action);\n\t}\n\n\t/**\n\t * It sets up the content for the \"Insights card\" dialog.\n\t * It fetches the inner dialog content for adding a card.\n\t * Adds the VBox to the panel's content aggregation.\n\t *\n\t * This also enables the \"Add\" button once content is fetched.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when setup is complete.\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\ttry {\n\t\t\tconst dialogContent = await this._fetchAddCardDialogContent();\n\t\t\tif (dialogContent) {\n\t\t\t\tconst wrapperVBox = new VBox(`${this.getId()}-wrapperVBox`, {\n\t\t\t\t\titems: dialogContent,\n\t\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t});\n\t\t\t\tthis.addAggregation(\"content\", wrapperVBox);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the dialog content for adding a new card and sets up the callback\n\t * to handle the card generation event, storing the generated manifest and enabling the add button.\n\t *\n\t * @private\n\t * @returns {Promise<Control[]>} A promise that resolves with an array of dialog content controls.\n\t */\n\tprivate async _fetchAddCardDialogContent(): Promise<Control[]> {\n\t\tthis.cardHelperInstance = await (CardHelper as ICardHelper).getServiceAsync();\n\t\treturn this.cardHelperInstance.fetchAddCardInnerContent((event) => {\n\t\t\tthis._latestGeneratedManifest = event.getParameters();\n\t\t\tconst isValidManifest = Object.keys(this._latestGeneratedManifest).length > 1;\n\t\t\tthis.enableAddButton(isValidManifest);\n\t\t});\n\t}\n\n\t/**\n\t * Retrieves the InsightsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {InsightsContainer | undefined} The InsightsContainer instance or undefined if not found.\n\t */\n\tprivate getInsightsContainer(): InsightsContainer | undefined {\n\t\tconst layout = this.getParent()?.getParent() as BaseLayout;\n\t\treturn layout.getContent().find((container) => container instanceof InsightsContainer);\n\t}\n\n\t/**\n\t * Checks if the Insights Addition Panel is supported.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst insightsCardIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"personalize\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_GENERATED_CARD, insightsCardIntent);\n\t\t}\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addCardsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog.removePanel(this);\n\t\t\tcontentAdditionDialog.updateActionButtons();\n\t\t}\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Retrieves the `CardsPanel` instance from the `InsightsContainer`.\n\t *\n\t * @private\n\t * @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.\n\t */\n\tprivate _fetchCardsPanel(): CardsPanel | undefined {\n\t\treturn this.getInsightsContainer()\n\t\t\t?.getContent()\n\t\t\t.find((panel): panel is CardsPanel => panel instanceof CardsPanel);\n\t}\n\n\t/**\n\t * Handles the logic for creating and adding a new insight card to cards Panel.\n\t *\n\t * - Sets the dialog to busy while the card creation is in progress.\n\t * - It adds a new card using the latest generated manifest.\n\t * - On success, shows a message toast and closes the dialog.\n\t * - Refreshes the insights cards panel data.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when the card creation flow completes.\n\t */\n\tprivate async onPressAddCards() {\n\t\tconst addContentDialog = this.getParent() as ContentAdditionDialog;\n\t\ttry {\n\t\t\taddContentDialog.setBusy(true);\n\n\t\t\tconst createdCardResponse = await this.cardHelperInstance._createCard(this._latestGeneratedManifest);\n\t\t\tconst cardTitle = createdCardResponse[\"sap.card\"]?.header?.title;\n\t\t\tMessageToast.show(this._i18nBundle.getText(\"Card_Created\", [cardTitle]) as string);\n\t\t\taddContentDialog.close();\n\t\t\tif (!createdCardResponse?.[\"sap.insights\"]?.visible) {\n\t\t\t\tMessageBox.information(this._i18nBundle.getText(\"INT_CARD_LIMIT_MESSAGEBOX\") as string, {\n\t\t\t\t\tstyleClass: \"msgBoxAlign\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst cardsPanel = this._fetchCardsPanel();\n\t\t\tawait cardsPanel?.refreshData();\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t} finally {\n\t\t\taddContentDialog.setBusy(false);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the internal content related to card addition.\n\t * Disables the \"Add\" button.\n\t *\n\t * @private\n\t */\n\tprivate resetAddCardInnerContent() {\n\t\tthis.cardHelperInstance?.resetAddCardInnerContent();\n\t\tthis.enableAddButton(false);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,gRAAAC,GAAA,EAAAC,UAAA,EAAAC,MAAA,EAAAC,aA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AA,OAlLmBvB,qBAAqB;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"InsightsAdditionPanel.js","names":["sap","ui","define","Log","CardHelper","Button","sap_m_library","MessageBox","MessageToast","VBox","__BaseSettingsPanel","__CardsContainer","__CardsPanel","___utils_Constants","___utils_FeatureUtils","___utils_FESRUtil","___utils_PXFeedback","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","_finallyRethrows","finalizer","bind","ButtonType","BaseSettingsPanel","CardsContainer","CardsPanel","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","triggerPXIntegration","InsightsAdditionPanel","extend","init","_init","BaseSettingsPanel.prototype.init.call","setProperty","AI_INSIGHTS_CARDS","_i18nBundle","getText","addCardsButton","getId","text","type","Emphasized","enabled","press","onPressAddCards","PRESS","ADD_AI_CARD","addActionButton","_setupContent","attachEvent","resetAddCardInnerContent","enableAddButton","_enableAddButton","action","setEnabled","_this","_temp","Promise","resolve","_fetchAddCardDialogContent","dialogContent","wrapperVBox","items","backgroundDesign","Solid","height","addAggregation","error","message","reject","_this2","getServiceAsync","_getServiceAsync","cardHelperInstance","fetchAddCardInnerContent","event","_latestGeneratedManifest","getParameters","isValidManifest","Object","keys","length","exit","_exit","BaseSettingsPanel.prototype.exit.call","oManageAddInsightsCardWithSearchDialog","undefined","getCardsContainer","_getCardsContainer","layout","getParent","getContent","find","container","isSupported","_isSupported","_this3","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","removePanel","updateActionButtons","insightsCardIntent","target","semanticObject","_temp2","AI_GENERATED_CARD","_isNavigationSupporte","_fetchCardsPanel","panel","_onPressAddCards","_this4","addContentDialog","_temp4","setBusy","_createCard","createdCardResponse","cardTitle","header","title","show","close","visible","information","styleClass","cardsPanel","refreshData","_wasThrown","_result","_resetAddCardInnerContent"],"sources":["InsightsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport CardHelper from \"sap/insights/CardHelper\";\nimport Button from \"sap/m/Button\";\nimport { BackgroundDesign, ButtonType } from \"sap/m/library\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport { Target } from \"sap/ushell/services/Navigation\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport CardsContainer from \"./CardsContainer\";\nimport CardsPanel from \"./CardsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport { ICardHelper, ICardHelperInstance, ICardManifest } from \"./interface/CardsInterface\";\nimport { CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES, FESR_IDS } from \"./utils/Constants\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\nimport { triggerPXIntegration } from \"./utils/PXFeedback\";\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n * @private\n *\n * @alias sap.cux.home.InsightsAdditionPanel\n */\nexport default class InsightsAdditionPanel extends BaseSettingsPanel {\n\tprivate addCardsButton!: Button;\n\tprivate cardHelperInstance!: ICardHelperInstance;\n\tprivate isPanelSupported!: boolean;\n\tprivate _latestGeneratedManifest!: ICardManifest;\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init() {\n\t\tsuper.init();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_INSIGHTS_CARDS);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"insightsCards\"));\n\n\t\t//setup actions\n\t\tthis.addCardsButton = new Button(`${this.getId()}-add-cards-btn`, {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tenabled: false,\n\t\t\tpress: this.onPressAddCards.bind(this)\n\t\t});\n\t\taddFESRSemanticStepName(this.addCardsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_CARD);\n\t\tthis.addActionButton(this.addCardsButton);\n\t\t//setup content\n\t\tvoid this._setupContent();\n\t\tthis.attachEvent(\"onDialogClose\", this.resetAddCardInnerContent.bind(this));\n\t}\n\n\t/**\n\t * Enables or disables the \"Add Cards\" button.\n\t *\n\t * @param {boolean} action - If true, the button is enabled; if false, it is disabled.\n\t */\n\tprivate enableAddButton(action: boolean) {\n\t\tthis.addCardsButton.setEnabled(action);\n\t}\n\n\t/**\n\t * It sets up the content for the \"Insights card\" dialog.\n\t * It fetches the inner dialog content for adding a card.\n\t * Adds the VBox to the panel's content aggregation.\n\t *\n\t * This also enables the \"Add\" button once content is fetched.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when setup is complete.\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\ttry {\n\t\t\tconst dialogContent = await this._fetchAddCardDialogContent();\n\t\t\tif (dialogContent) {\n\t\t\t\tconst wrapperVBox = new VBox(`${this.getId()}-wrapperVBox`, {\n\t\t\t\t\titems: dialogContent,\n\t\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t});\n\t\t\t\tthis.addAggregation(\"content\", wrapperVBox);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the dialog content for adding a new card and sets up the callback\n\t * to handle the card generation event, storing the generated manifest and enabling the add button.\n\t *\n\t * @private\n\t * @returns {Promise<Control[]>} A promise that resolves with an array of dialog content controls.\n\t */\n\tprivate async _fetchAddCardDialogContent(): Promise<Control[]> {\n\t\tthis.cardHelperInstance = await (CardHelper as ICardHelper).getServiceAsync();\n\t\treturn this.cardHelperInstance.fetchAddCardInnerContent((event) => {\n\t\t\tthis._latestGeneratedManifest = event.getParameters();\n\t\t\tconst isValidManifest = Object.keys(this._latestGeneratedManifest).length > 1;\n\t\t\tthis.enableAddButton(isValidManifest);\n\t\t});\n\t}\n\n\t/**\n\t * Cleans up the CardHelper instance when exiting the panel.\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic exit(): void {\n\t\tsuper.exit();\n\t\tif (this.cardHelperInstance) {\n\t\t\tthis.cardHelperInstance.oManageAddInsightsCardWithSearchDialog = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Retrieves the CardsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {CardsContainer | undefined} The CardsContainer instance or undefined if not found.\n\t */\n\tprivate getCardsContainer(): CardsContainer | undefined {\n\t\tconst layout = this.getParent()?.getParent() as BaseLayout;\n\t\treturn layout.getContent().find((container) => container instanceof CardsContainer);\n\t}\n\n\t/**\n\t * Checks if the Insights Addition Panel is supported.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst insightsCardIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"personalize\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_GENERATED_CARD, insightsCardIntent);\n\t\t}\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addCardsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog.removePanel(this);\n\t\t\tcontentAdditionDialog.updateActionButtons();\n\t\t}\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Retrieves the `CardsPanel` instance from the `CardsContainer`.\n\t *\n\t * @private\n\t * @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.\n\t */\n\tprivate _fetchCardsPanel(): CardsPanel | undefined {\n\t\treturn this.getCardsContainer()\n\t\t\t?.getContent()\n\t\t\t.find((panel): panel is CardsPanel => panel instanceof CardsPanel);\n\t}\n\n\t/**\n\t * Handles the logic for creating and adding a new insight card to cards Panel.\n\t *\n\t * - Sets the dialog to busy while the card creation is in progress.\n\t * - It adds a new card using the latest generated manifest.\n\t * - On success, shows a message toast and closes the dialog.\n\t * - Refreshes the insights cards panel data.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when the card creation flow completes.\n\t */\n\tprivate async onPressAddCards() {\n\t\ttriggerPXIntegration(\"addCardsButton\");\n\t\tconst addContentDialog = this.getParent() as ContentAdditionDialog;\n\t\ttry {\n\t\t\taddContentDialog.setBusy(true);\n\n\t\t\tconst createdCardResponse = await this.cardHelperInstance._createCard(this._latestGeneratedManifest);\n\t\t\tconst cardTitle = createdCardResponse[\"sap.card\"]?.header?.title;\n\t\t\tMessageToast.show(this._i18nBundle.getText(\"Card_Created\", [cardTitle]) as string);\n\t\t\taddContentDialog.close();\n\t\t\tif (!createdCardResponse?.[\"sap.insights\"]?.visible) {\n\t\t\t\tMessageBox.information(this._i18nBundle.getText(\"INT_CARD_LIMIT_MESSAGEBOX\") as string, {\n\t\t\t\t\tstyleClass: \"msgBoxAlign\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst cardsPanel = this._fetchCardsPanel();\n\t\t\tawait cardsPanel?.refreshData();\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t} finally {\n\t\t\taddContentDialog.setBusy(false);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the internal content related to card addition.\n\t * Disables the \"Add\" button.\n\t *\n\t * @private\n\t */\n\tprivate resetAddCardInnerContent() {\n\t\tthis.cardHelperInstance?.resetAddCardInnerContent();\n\t\tthis.enableAddButton(false);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,mSAAAC,GAAA,EAAAC,UAAA,EAAAC,MAAA,EAAAC,aAAA,EAAAC,UAAA,EAAAC,YAAA,EAAAC,IAAA,EAAAC,mBAAA,EAAAC,gBAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,qBAAA,EAAAC,iBAAA,EAAAC,mBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAkjBO,SAAAG,OAAgBC,IAAI,EAAEC,OAAO,EAAE;IACrC,IAAI;MACH,IAAIC,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAMG,CAAC,EAAE;MACV,OAAOF,OAAO,CAACE,CAAC,CAAC;IAClB;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IACpC;IACA,OAAOC,MAAM;EACd;EAAC,MApjBQG,gBAAgB,GAAArB,aAAA;EAujBlB,SAASsB,gBAAgBA,CAACN,IAAI,EAAEO,SAAS,EAAE;IACjD,IAAI;MACH,IAAIL,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACX,OAAOI,SAAS,CAAC,IAAI,EAAEJ,CAAC,CAAC;IAC1B;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI,CAACG,SAAS,CAACC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAED,SA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,UAAA,EAAAC,OAAA;UACAhB,gBAAgB,CAACE,OAAO,CAAC,KAAK,CAAC;UAAC,IAAAa,UAAA,QAAAC,OAAA;UAAA,OAAAA,OAAA;QAAA;QAAA,OAAAxE,OAAA,CAAAC,OAAA,CAAAwD,MAAA,IAAAA,MAAA,CAAAtG,IAAA,GAAAsG,MAAA,CAAAtG,IAAA;MAElC,CAAC,QAAAD,CAAA;QAAA,OAAA8C,OAAA,CAAAY,MAAA,CAAA1D,CAAA;MAAA;IAAA;IAED;AACD;AACA;AACA;AACA;AACA;IACSuC,wBAAwB,WAAAgF,0BAAA,EAAG;MAClC,IAAI,CAACzD,kBAAkB,EAAEvB,wBAAwB,CAAC,CAAC;MACnD,IAAI,CAACC,eAAe,CAAC,KAAK,CAAC;IAC5B;EAAC;EAAA,OAhMmBvB,qBAAqB;AAAA","ignoreList":[]}
|
|
@@ -14,13 +14,14 @@ import Control from "sap/ui/core/Control";
|
|
|
14
14
|
import { Target } from "sap/ushell/services/Navigation";
|
|
15
15
|
import BaseLayout from "./BaseLayout";
|
|
16
16
|
import BaseSettingsPanel from "./BaseSettingsPanel";
|
|
17
|
+
import CardsContainer from "./CardsContainer";
|
|
17
18
|
import CardsPanel from "./CardsPanel";
|
|
18
19
|
import ContentAdditionDialog from "./ContentAdditionDialog";
|
|
19
|
-
import InsightsContainer from "./InsightsContainer";
|
|
20
20
|
import { ICardHelper, ICardHelperInstance, ICardManifest } from "./interface/CardsInterface";
|
|
21
21
|
import { CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES, FESR_IDS } from "./utils/Constants";
|
|
22
22
|
import { isNavigationSupportedForFeature } from "./utils/FeatureUtils";
|
|
23
23
|
import { addFESRSemanticStepName, FESR_EVENTS } from "./utils/FESRUtil";
|
|
24
|
+
import { triggerPXIntegration } from "./utils/PXFeedback";
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
*
|
|
@@ -119,14 +120,27 @@ export default class InsightsAdditionPanel extends BaseSettingsPanel {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
/**
|
|
122
|
-
*
|
|
123
|
+
* Cleans up the CardHelper instance when exiting the panel.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
* @override
|
|
127
|
+
*/
|
|
128
|
+
public exit(): void {
|
|
129
|
+
super.exit();
|
|
130
|
+
if (this.cardHelperInstance) {
|
|
131
|
+
this.cardHelperInstance.oManageAddInsightsCardWithSearchDialog = undefined;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves the CardsContainer instance from the parent layout.
|
|
123
137
|
*
|
|
124
138
|
* @private
|
|
125
|
-
* @returns {
|
|
139
|
+
* @returns {CardsContainer | undefined} The CardsContainer instance or undefined if not found.
|
|
126
140
|
*/
|
|
127
|
-
private
|
|
141
|
+
private getCardsContainer(): CardsContainer | undefined {
|
|
128
142
|
const layout = this.getParent()?.getParent() as BaseLayout;
|
|
129
|
-
return layout.getContent().find((container) => container instanceof
|
|
143
|
+
return layout.getContent().find((container) => container instanceof CardsContainer);
|
|
130
144
|
}
|
|
131
145
|
|
|
132
146
|
/**
|
|
@@ -158,13 +172,13 @@ export default class InsightsAdditionPanel extends BaseSettingsPanel {
|
|
|
158
172
|
}
|
|
159
173
|
|
|
160
174
|
/**
|
|
161
|
-
* Retrieves the `CardsPanel` instance from the `
|
|
175
|
+
* Retrieves the `CardsPanel` instance from the `CardsContainer`.
|
|
162
176
|
*
|
|
163
177
|
* @private
|
|
164
178
|
* @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.
|
|
165
179
|
*/
|
|
166
180
|
private _fetchCardsPanel(): CardsPanel | undefined {
|
|
167
|
-
return this.
|
|
181
|
+
return this.getCardsContainer()
|
|
168
182
|
?.getContent()
|
|
169
183
|
.find((panel): panel is CardsPanel => panel instanceof CardsPanel);
|
|
170
184
|
}
|
|
@@ -181,6 +195,7 @@ export default class InsightsAdditionPanel extends BaseSettingsPanel {
|
|
|
181
195
|
* @returns {Promise<void>} A promise that resolves when the card creation flow completes.
|
|
182
196
|
*/
|
|
183
197
|
private async onPressAddCards() {
|
|
198
|
+
triggerPXIntegration("addCardsButton");
|
|
184
199
|
const addContentDialog = this.getParent() as ContentAdditionDialog;
|
|
185
200
|
try {
|
|
186
201
|
addContentDialog.setBusy(true);
|
|
@@ -33,6 +33,14 @@ declare module "sap/cux/home/InsightsCardsSettingsPanel" {
|
|
|
33
33
|
* @returns {Control} The control containing the Insights Cards Settings Panel content.
|
|
34
34
|
*/
|
|
35
35
|
private _getContent;
|
|
36
|
+
/**
|
|
37
|
+
* Returns true if the insights cards settings panel is supported.
|
|
38
|
+
*
|
|
39
|
+
* @private
|
|
40
|
+
* @async
|
|
41
|
+
* @returns {Promise<boolean>} A promise that resolves to true if the settings panel is supported.
|
|
42
|
+
*/
|
|
43
|
+
isSupported(): Promise<boolean>;
|
|
36
44
|
}
|
|
37
45
|
}
|
|
38
46
|
//# sourceMappingURL=InsightsCardsSettingsPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsCardsSettingsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/InsightsCardsSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yCAAyC,CAAC;IASzD,OAAO,iBAA4D,MAAM,gCAAgC,CAAC;IAI1G,UAAU,QAAQ;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,iBAAiB;QACxE,OAAO,CAAC,aAAa,CAAkB;QACvC,OAAO,CAAC,mBAAmB,CAAe;QAC1C;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAyBnB;;;;;WAKG;QACH,OAAO,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"InsightsCardsSettingsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/InsightsCardsSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yCAAyC,CAAC;IASzD,OAAO,iBAA4D,MAAM,gCAAgC,CAAC;IAI1G,UAAU,QAAQ;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,iBAAiB;QACxE,OAAO,CAAC,aAAa,CAAkB;QACvC,OAAO,CAAC,mBAAmB,CAAe;QAC1C;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAyBnB;;;;;WAKG;QACH,OAAO,CAAC,WAAW;QAOnB;;;;;;WAMG;QACU,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;KAG5C;CAEA"}
|
|
@@ -69,6 +69,21 @@ sap.ui.define(["sap/insights/ManageCards", "./BaseSettingsPanel", "./utils/Const
|
|
|
69
69
|
this.manageCardsInstance = new ManageCards();
|
|
70
70
|
}
|
|
71
71
|
return this.manageCardsInstance;
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* Returns true if the insights cards settings panel is supported.
|
|
75
|
+
*
|
|
76
|
+
* @private
|
|
77
|
+
* @async
|
|
78
|
+
* @returns {Promise<boolean>} A promise that resolves to true if the settings panel is supported.
|
|
79
|
+
*/
|
|
80
|
+
isSupported: function _isSupported() {
|
|
81
|
+
try {
|
|
82
|
+
const _this = this;
|
|
83
|
+
return Promise.resolve(_this._getPanel().isInsightsEnabled());
|
|
84
|
+
} catch (e) {
|
|
85
|
+
return Promise.reject(e);
|
|
86
|
+
}
|
|
72
87
|
}
|
|
73
88
|
});
|
|
74
89
|
return InsightsCardsSettingsPanel;
|