@sapui5/sap.cux.home 1.138.0 → 1.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +7 -0
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +113 -64
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +47 -15
- package/src/sap/cux/home/App.d.ts +2 -2
- package/src/sap/cux/home/App.js +2 -2
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +2 -2
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +17 -10
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +19 -12
- package/src/sap/cux/home/AppsContainer.d.ts +2 -3
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +6 -10
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +5 -10
- package/src/sap/cux/home/BaseApp.d.ts +2 -2
- package/src/sap/cux/home/BaseApp.js +2 -2
- package/src/sap/cux/home/BaseApp.js.map +1 -1
- package/src/sap/cux/home/BaseApp.ts +2 -2
- package/src/sap/cux/home/BaseAppPanel.d.ts +10 -0
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +22 -3
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +16 -3
- package/src/sap/cux/home/BaseContainer.d.ts +10 -27
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.gen.d.ts +61 -0
- package/src/sap/cux/home/BaseContainer.js +39 -71
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +33 -77
- package/src/sap/cux/home/BaseContainerRenderer.d.ts +6 -4
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +47 -21
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +58 -25
- package/src/sap/cux/home/BaseLayout.d.ts +2 -2
- package/src/sap/cux/home/BaseLayout.d.ts.map +1 -1
- package/src/sap/cux/home/BaseLayout.js +5 -4
- package/src/sap/cux/home/BaseLayout.js.map +1 -1
- package/src/sap/cux/home/BaseLayout.ts +5 -4
- package/src/sap/cux/home/BaseNewsItem.d.ts +2 -2
- package/src/sap/cux/home/BaseNewsItem.js +2 -2
- package/src/sap/cux/home/BaseNewsItem.js.map +1 -1
- package/src/sap/cux/home/BaseNewsItem.ts +2 -2
- package/src/sap/cux/home/BaseNewsPanel.d.ts +4 -3
- package/src/sap/cux/home/BaseNewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js +14 -3
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +10 -4
- package/src/sap/cux/home/BasePagePanel.d.ts +2 -2
- package/src/sap/cux/home/BasePagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePagePanel.js +10 -2
- package/src/sap/cux/home/BasePagePanel.js.map +1 -1
- package/src/sap/cux/home/BasePagePanel.ts +6 -2
- package/src/sap/cux/home/BasePanel.d.ts +2 -21
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.gen.d.ts +109 -0
- package/src/sap/cux/home/BasePanel.js +15 -31
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +11 -34
- package/src/sap/cux/home/BaseSettingsDialog.d.ts +2 -2
- package/src/sap/cux/home/BaseSettingsDialog.js +2 -2
- package/src/sap/cux/home/BaseSettingsDialog.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.ts +2 -2
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +3 -3
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js +4 -3
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +6 -4
- package/src/sap/cux/home/CardsPanel.d.ts +2 -2
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +15 -7
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +11 -10
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +1 -2
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +1 -2
- package/src/sap/cux/home/ErrorPanel.d.ts +2 -2
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.js +13 -3
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +9 -3
- package/src/sap/cux/home/FavAppPanel.d.ts +2 -2
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +7 -6
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +10 -9
- package/src/sap/cux/home/FrequentAppPanel.d.ts +2 -2
- package/src/sap/cux/home/FrequentAppPanel.js +2 -2
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +2 -2
- package/src/sap/cux/home/Group.d.ts +2 -2
- package/src/sap/cux/home/Group.js +2 -2
- package/src/sap/cux/home/Group.js.map +1 -1
- package/src/sap/cux/home/Group.ts +2 -2
- package/src/sap/cux/home/IToDoPanel.d.ts +2 -2
- package/src/sap/cux/home/IToDoPanel.js.map +1 -1
- package/src/sap/cux/home/IToDoPanel.ts +2 -2
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +4 -7
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +6 -8
- package/src/sap/cux/home/InsightsContainer.d.ts +4 -5
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +10 -15
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +17 -16
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +7 -5
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +6 -5
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.d.ts +11 -5
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +161 -83
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +167 -83
- package/src/sap/cux/home/KeyUserSettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserSettingsDialog.js +18 -12
- package/src/sap/cux/home/KeyUserSettingsDialog.js.map +1 -1
- package/src/sap/cux/home/KeyUserSettingsDialog.ts +9 -5
- package/src/sap/cux/home/Layout.d.ts +2 -4
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +35 -43
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +15 -21
- package/src/sap/cux/home/MenuItem.d.ts +2 -2
- package/src/sap/cux/home/MenuItem.js +2 -2
- package/src/sap/cux/home/MenuItem.js.map +1 -1
- package/src/sap/cux/home/MenuItem.ts +2 -2
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +28 -3
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +63 -39
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +68 -41
- package/src/sap/cux/home/NewsGroup.d.ts.map +1 -1
- package/src/sap/cux/home/NewsGroup.js +11 -6
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +11 -8
- package/src/sap/cux/home/NewsPanel.d.ts +44 -7
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.gen.d.ts +0 -91
- package/src/sap/cux/home/NewsPanel.js +303 -214
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +190 -117
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +11 -7
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +14 -8
- package/src/sap/cux/home/NoDataContainer.d.ts +2 -3
- package/src/sap/cux/home/NoDataContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NoDataContainer.js +3 -3
- package/src/sap/cux/home/NoDataContainer.js.map +1 -1
- package/src/sap/cux/home/NoDataContainer.ts +3 -3
- package/src/sap/cux/home/PagePanel.d.ts +11 -3
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +17 -6
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +17 -7
- package/src/sap/cux/home/RecentAppPanel.d.ts +2 -2
- package/src/sap/cux/home/RecentAppPanel.js +2 -2
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +2 -2
- package/src/sap/cux/home/RecommendedAppPanel.d.ts +2 -2
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +15 -9
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +11 -6
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +48 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.gen.d.ts +33 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.js +83 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +87 -0
- package/src/sap/cux/home/SituationPanel.d.ts +2 -2
- package/src/sap/cux/home/SituationPanel.js +2 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -2
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts +2 -2
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js +15 -4
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +11 -4
- package/src/sap/cux/home/SpacePanel.d.ts +2 -2
- package/src/sap/cux/home/SpacePanel.js +2 -2
- package/src/sap/cux/home/SpacePanel.js.map +1 -1
- package/src/sap/cux/home/SpacePanel.ts +2 -2
- package/src/sap/cux/home/TaskPanel.d.ts +2 -2
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +6 -11
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +6 -11
- package/src/sap/cux/home/TilesPanel.d.ts +2 -3
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +93 -63
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +97 -80
- package/src/sap/cux/home/ToDoPanel.d.ts +2 -2
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +15 -20
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +11 -21
- package/src/sap/cux/home/ToDosContainer.d.ts +2 -4
- package/src/sap/cux/home/ToDosContainer.d.ts.map +1 -1
- package/src/sap/cux/home/ToDosContainer.js +5 -10
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +3 -10
- package/src/sap/cux/home/changeHandler/LayoutHandler.d.ts +1 -2
- package/src/sap/cux/home/changeHandler/LayoutHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/LayoutHandler.js +0 -3
- package/src/sap/cux/home/changeHandler/LayoutHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/LayoutHandler.ts +2 -6
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +0 -3
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +0 -3
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -3
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +1 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +0 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +0 -3
- package/src/sap/cux/home/designtime/Layout.designtime.d.ts +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +4 -3
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +3 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +0 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.js +0 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.ts +0 -2
- package/src/sap/cux/home/i18n/messagebundle.properties +18 -9
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_da.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_de.properties +26 -20
- package/src/sap/cux/home/i18n/messagebundle_el.properties +22 -16
- package/src/sap/cux/home/i18n/messagebundle_en.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +13 -7
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +13 -7
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_es.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_et.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -12
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_id.properties +21 -15
- package/src/sap/cux/home/i18n/messagebundle_it.properties +17 -11
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +20 -14
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_no.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +26 -20
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +17 -11
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -12
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +17 -11
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +16 -10
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +16 -10
- package/src/sap/cux/home/interface/CardsInterface.d.ts +1 -5
- 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 +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts +2 -0
- 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 +2 -0
- package/src/sap/cux/home/library.d.ts +26 -15
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +26 -15
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +27 -15
- package/src/sap/cux/home/themes/base/BaseContainer.less +31 -0
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +0 -8
- package/src/sap/cux/home/themes/base/KeyUserSettingsDialog.less +5 -0
- package/src/sap/cux/home/themes/base/NewsAndPagesContainer.less +4 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +2 -5
- package/src/sap/cux/home/utils/CommonUtils.d.ts +1 -1
- package/src/sap/cux/home/utils/CommonUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/CommonUtils.js.map +1 -1
- package/src/sap/cux/home/utils/CommonUtils.ts +5 -2
- package/src/sap/cux/home/utils/FeatureUtils.js +0 -2
- package/src/sap/cux/home/utils/FeatureUtils.js.map +1 -1
- package/src/sap/cux/home/utils/FeatureUtils.ts +3 -3
- package/src/sap/cux/home/utils/HttpHelper.js.map +1 -1
- package/src/sap/cux/home/utils/HttpHelper.ts +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts +0 -4
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +0 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +9 -4
- package/src/sap/cux/home/{AppsContainerGenericPlaceholder.d.ts → utils/placeholder/AppsPlaceholder.d.ts} +2 -2
- package/src/sap/cux/home/utils/placeholder/AppsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/{AppsContainerGenericPlaceholder.js → utils/placeholder/AppsPlaceholder.js} +1 -1
- package/src/sap/cux/home/utils/placeholder/AppsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/{InsightsContainerGenericPlaceholder.js → utils/placeholder/InsightsPlaceholder.js} +1 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/{InsightsContainerGenericPlaceholder.d.ts → utils/placeholder/NewsAndPagesPlaceholder.d.ts} +3 -3
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainerGenericPlaceholder.js → utils/placeholder/NewsAndPagesPlaceholder.js} +1 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/{ToDosContainerGenericPlaceholder.d.ts → utils/placeholder/ToDosPlaceholder.d.ts} +2 -2
- package/src/sap/cux/home/utils/placeholder/ToDosPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/{ToDosContainerGenericPlaceholder.js → utils/placeholder/ToDosPlaceholder.js} +1 -1
- package/src/sap/cux/home/utils/placeholder/ToDosPlaceholder.js.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.js.map +0 -1
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js.map +0 -1
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js.map +0 -1
- package/src/sap/cux/home/utils/KeyUserPersonalization.d.ts +0 -19
- package/src/sap/cux/home/utils/KeyUserPersonalization.d.ts.map +0 -1
- package/src/sap/cux/home/utils/KeyUserPersonalization.js +0 -127
- package/src/sap/cux/home/utils/KeyUserPersonalization.js.map +0 -1
- package/src/sap/cux/home/utils/KeyUserPersonalization.ts +0 -94
- /package/src/sap/cux/home/{AppsContainerGenericPlaceholder.ts → utils/placeholder/AppsPlaceholder.ts} +0 -0
- /package/src/sap/cux/home/{InsightsContainerGenericPlaceholder.ts → utils/placeholder/InsightsPlaceholder.ts} +0 -0
- /package/src/sap/cux/home/{NewsAndPagesContainerGenericPlaceholder.ts → utils/placeholder/NewsAndPagesPlaceholder.ts} +0 -0
- /package/src/sap/cux/home/{ToDosContainerGenericPlaceholder.ts → utils/placeholder/ToDosPlaceholder.ts} +0 -0
|
@@ -175,7 +175,6 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
175
175
|
const NewsGroup = _interopRequireDefault(__NewsGroup);
|
|
176
176
|
const NewsItem = _interopRequireDefault(__NewsItem);
|
|
177
177
|
const NewsType = ___library["NewsType"];
|
|
178
|
-
const DEFAULT_NEWS_BASE_URL = ___utils_Constants["DEFAULT_NEWS_BASE_URL"];
|
|
179
178
|
const DEFAULT_NEWS_PLACEHOLDER = ___utils_Constants["DEFAULT_NEWS_PLACEHOLDER"];
|
|
180
179
|
const DEFAULT_NEWS_URL = ___utils_Constants["DEFAULT_NEWS_URL"];
|
|
181
180
|
const recycleId = ___utils_DataFormatUtils["recycleId"];
|
|
@@ -188,6 +187,13 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
188
187
|
NEWS_FEED_READ_API = BASE_URL + "insights_read_srv/0001/" + "NEWS_FEED",
|
|
189
188
|
NEWS_FEED_TRANSLATION_API = BASE_URL + "insights_read_srv/0001/" + "NewsFeedColumnTranslation",
|
|
190
189
|
DEFAULT_FEED_COUNT = 7,
|
|
190
|
+
NEWS_HEIGHT = {
|
|
191
|
+
LargeDesktop: "17rem",
|
|
192
|
+
XLargeDesktop: "17rem",
|
|
193
|
+
Desktop: "17rem",
|
|
194
|
+
Tablet: "14rem",
|
|
195
|
+
Mobile: "11rem"
|
|
196
|
+
},
|
|
191
197
|
fnImagePlaceholder = function (sPath, N) {
|
|
192
198
|
return Array.from({
|
|
193
199
|
length: N
|
|
@@ -228,8 +234,8 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
228
234
|
* @version 0.0.1
|
|
229
235
|
* @since 1.121
|
|
230
236
|
*
|
|
231
|
-
* @
|
|
232
|
-
* @
|
|
237
|
+
* @private
|
|
238
|
+
* @ui5-restricted ux.eng.s4producthomes1
|
|
233
239
|
*
|
|
234
240
|
* @alias sap.cux.home.NewsPanel
|
|
235
241
|
*/
|
|
@@ -251,13 +257,13 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
251
257
|
/**
|
|
252
258
|
* Type of the news item.
|
|
253
259
|
*
|
|
254
|
-
* @
|
|
260
|
+
* @private
|
|
255
261
|
*/
|
|
256
262
|
type: {
|
|
257
263
|
type: "sap.cux.home.NewsType",
|
|
258
264
|
group: "Misc",
|
|
259
|
-
visibility: "
|
|
260
|
-
defaultValue: NewsType.
|
|
265
|
+
visibility: "hidden",
|
|
266
|
+
defaultValue: NewsType.Default
|
|
261
267
|
},
|
|
262
268
|
/**
|
|
263
269
|
* The key of custom news feed.
|
|
@@ -280,26 +286,6 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
280
286
|
group: "Misc",
|
|
281
287
|
defaultValue: ""
|
|
282
288
|
},
|
|
283
|
-
/**
|
|
284
|
-
* The flag for custom news feed is checked or not.
|
|
285
|
-
*
|
|
286
|
-
* @private
|
|
287
|
-
*/
|
|
288
|
-
showCustom: {
|
|
289
|
-
type: "boolean",
|
|
290
|
-
group: "Misc",
|
|
291
|
-
defaultValue: false
|
|
292
|
-
},
|
|
293
|
-
/**
|
|
294
|
-
* Property to set default News.
|
|
295
|
-
*
|
|
296
|
-
* @private
|
|
297
|
-
*/
|
|
298
|
-
showDefault: {
|
|
299
|
-
type: "boolean",
|
|
300
|
-
group: "Misc",
|
|
301
|
-
defaultValue: false
|
|
302
|
-
},
|
|
303
289
|
/**
|
|
304
290
|
* The flag to determine rss feed will load or not.
|
|
305
291
|
*
|
|
@@ -344,6 +330,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
344
330
|
constructor: function _constructor(id, settings) {
|
|
345
331
|
BaseNewsPanel.prototype.constructor.call(this, id, settings);
|
|
346
332
|
this._defaultNewsPromise = null;
|
|
333
|
+
this._noUpdatesNewsFeed = false;
|
|
347
334
|
this.customNewsFeedCache = new Map();
|
|
348
335
|
},
|
|
349
336
|
/**
|
|
@@ -354,10 +341,11 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
354
341
|
*/
|
|
355
342
|
init: function _init() {
|
|
356
343
|
BaseNewsPanel.prototype.init.call(this);
|
|
344
|
+
const deviceType = this.getDeviceType();
|
|
357
345
|
this.oNewsTile = new SlideTile(this.getId() + "--idNewsSlide", {
|
|
358
346
|
displayTime: 20000,
|
|
359
347
|
width: "100%",
|
|
360
|
-
height:
|
|
348
|
+
height: NEWS_HEIGHT[deviceType],
|
|
361
349
|
tiles: [new GenericTile(this.getId() + "--placeholder", {
|
|
362
350
|
state: "Loading",
|
|
363
351
|
mode: "ArticleMode",
|
|
@@ -386,72 +374,100 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
386
374
|
*/
|
|
387
375
|
getData: function _getData() {
|
|
388
376
|
try {
|
|
377
|
+
let _exit = false;
|
|
389
378
|
const _this = this;
|
|
390
|
-
function
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
379
|
+
function _temp9(_result) {
|
|
380
|
+
if (_exit) return _result;
|
|
381
|
+
_this.fireEvent("loaded");
|
|
382
|
+
_this.adjustLayout();
|
|
383
|
+
}
|
|
384
|
+
let sUrl = _this.getUrl();
|
|
385
|
+
let showCustom = _this.getProperty("type") === NewsType.Custom;
|
|
386
|
+
let showDefault = _this.getProperty("type") === NewsType.Default;
|
|
387
|
+
let showRssAtom = _this.getProperty("type") === NewsType.NewsUrl;
|
|
388
|
+
_this.mandatoryNewsFeed = [];
|
|
389
|
+
if (_this.fetchedFeedUrl && _this.fetchedFeedUrl === sUrl) {
|
|
390
|
+
return Promise.resolve();
|
|
391
|
+
}
|
|
392
|
+
const endUserChange = _this.getParent().getIsEndUserChange();
|
|
393
|
+
const _temp8 = function () {
|
|
394
|
+
if (endUserChange.isEndUser) {
|
|
395
|
+
//url scenario (developer side)
|
|
396
|
+
return Promise.resolve(fetch(sUrl)).then(function (response) {
|
|
397
|
+
if (!response.ok) {
|
|
398
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
399
|
+
}
|
|
400
|
+
const contentType = response.headers.get("content-type");
|
|
401
|
+
const _temp = function () {
|
|
402
|
+
if (contentType && contentType.includes("application/json")) {
|
|
403
|
+
return Promise.resolve(response.json()).then(function (_response$json) {
|
|
404
|
+
_this._endUserResponse = _response$json;
|
|
405
|
+
return Promise.resolve(_this.setNewsFeedFromUrl(_this._endUserResponse?.value)).then(function () {});
|
|
406
|
+
});
|
|
407
|
+
} else {
|
|
408
|
+
endUserChange.newsType = NewsType.NewsUrl;
|
|
409
|
+
return Promise.resolve(_this.initializeXmlModel(sUrl)).then(function (_this$initializeXmlMo) {
|
|
410
|
+
_this.oNewsModel = _this$initializeXmlMo;
|
|
411
|
+
_this.oNewsTile.setModel(_this.oNewsModel);
|
|
412
|
+
_this.oManageMenuItem.setVisible(false);
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}();
|
|
416
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
417
|
+
});
|
|
418
|
+
} else {
|
|
419
|
+
function _temp7() {
|
|
420
|
+
const _temp5 = function () {
|
|
421
|
+
if (showDefault) {
|
|
422
|
+
//default news scenario
|
|
409
423
|
_this.bNewsLoad = _this.bNewsLoad || false;
|
|
410
|
-
return Promise.resolve(_this.setDefaultNews(
|
|
424
|
+
return Promise.resolve(_this.setDefaultNews()).then(function () {});
|
|
411
425
|
} else {
|
|
412
|
-
const
|
|
413
|
-
if (
|
|
414
|
-
//
|
|
415
|
-
_this.
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
426
|
+
const _temp4 = function () {
|
|
427
|
+
if (sUrl && showRssAtom) {
|
|
428
|
+
//rss feed scenario
|
|
429
|
+
return Promise.resolve(_this.initializeXmlModel(sUrl)).then(function (_this$initializeXmlMo2) {
|
|
430
|
+
_this.oNewsModel = _this$initializeXmlMo2;
|
|
431
|
+
_this.oNewsTile.setModel(_this.oNewsModel);
|
|
432
|
+
_this.oManageMenuItem.setVisible(false);
|
|
433
|
+
});
|
|
434
|
+
} else {
|
|
435
|
+
const _temp3 = function () {
|
|
436
|
+
if (showCustom) {
|
|
437
|
+
//custom news scenario
|
|
438
|
+
_this.bNewsLoad = _this.bNewsLoad || false;
|
|
439
|
+
_this.oManageMenuItem.setVisible(true);
|
|
440
|
+
const sCustomNewsFeedKey = _this.getCustomFeedKey();
|
|
441
|
+
const _temp2 = function () {
|
|
442
|
+
if (sCustomNewsFeedKey) {
|
|
443
|
+
return Promise.resolve(_this.setCustomNewsFeed(sCustomNewsFeedKey)).then(function () {});
|
|
444
|
+
} else {
|
|
445
|
+
_this.handleFeedError();
|
|
446
|
+
}
|
|
447
|
+
}();
|
|
448
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
421
449
|
} else {
|
|
422
450
|
_this.handleFeedError();
|
|
423
451
|
}
|
|
424
452
|
}();
|
|
425
|
-
if (
|
|
426
|
-
} else {
|
|
427
|
-
_this.handleFeedError();
|
|
453
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
428
454
|
}
|
|
429
455
|
}();
|
|
430
|
-
if (
|
|
456
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
431
457
|
}
|
|
432
458
|
}();
|
|
433
|
-
if (
|
|
459
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
434
460
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
_this.setProperty("showDefault", true);
|
|
443
|
-
}
|
|
444
|
-
let showDefault = _this.getProperty("showDefault");
|
|
445
|
-
_this.mandatoryNewsFeed = [];
|
|
446
|
-
if (_this.fetchedFeedUrl && _this.fetchedFeedUrl === sUrl) {
|
|
447
|
-
return Promise.resolve();
|
|
448
|
-
}
|
|
449
|
-
const _temp6 = function () {
|
|
450
|
-
if (!_this.persDataNewsFeed) {
|
|
451
|
-
return Promise.resolve(_this.setPersDataNewsFeed(showDefault)).then(function () {});
|
|
461
|
+
const _temp6 = function () {
|
|
462
|
+
if (!_this.persDataNewsFeed) {
|
|
463
|
+
return Promise.resolve(_this.setPersDataNewsFeed(showDefault)).then(function () {});
|
|
464
|
+
}
|
|
465
|
+
}();
|
|
466
|
+
//key user scenarios
|
|
467
|
+
return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
|
|
452
468
|
}
|
|
453
469
|
}();
|
|
454
|
-
return Promise.resolve(
|
|
470
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8));
|
|
455
471
|
} catch (e) {
|
|
456
472
|
return Promise.reject(e);
|
|
457
473
|
}
|
|
@@ -462,27 +478,20 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
462
478
|
* @param {boolean} [isKeyUserChange=false] - Indicates if the change is made by a key user.
|
|
463
479
|
* @private
|
|
464
480
|
*/
|
|
465
|
-
setDefaultNews: function _setDefaultNews(
|
|
481
|
+
setDefaultNews: function _setDefaultNews() {
|
|
466
482
|
try {
|
|
467
483
|
const _this2 = this;
|
|
468
|
-
// default news scenario, if url property is passed
|
|
469
|
-
// check if url contains default news base url
|
|
484
|
+
// default news scenario, if url property is passed or showDefault is true
|
|
470
485
|
|
|
471
486
|
let sUrl = _this2.getUrl();
|
|
472
|
-
|
|
487
|
+
const isEndUser = _this2.getParent().getIsEndUserChange().isEndUser;
|
|
488
|
+
_this2.defaultUrl = isEndUser ? sUrl : DEFAULT_NEWS_URL;
|
|
473
489
|
_this2.fetchedFeedUrl = _this2.defaultUrl;
|
|
474
|
-
_this2.setProperty("showDefault", showDefault);
|
|
475
490
|
|
|
476
491
|
//reset properties
|
|
477
|
-
_this2.setProperty("showCustom", false);
|
|
478
492
|
_this2.setProperty("newsAvailable", true);
|
|
479
|
-
// if user specifically set defaultNews true,
|
|
480
|
-
// then even though url is available in key user settings url input, preference goes to showDefault
|
|
481
|
-
if (isKeyUserChange) {
|
|
482
|
-
_this2.setProperty("url", "");
|
|
483
|
-
}
|
|
484
493
|
_this2.generateErrorMessage().setVisible(false);
|
|
485
|
-
|
|
494
|
+
_this2.setVisible(true);
|
|
486
495
|
_this2.oManageMenuItem.setVisible(true);
|
|
487
496
|
_this2.setManageNewsItemVisibility(true);
|
|
488
497
|
return Promise.resolve(_this2.setCustomNewsFeed("")).then(function () {});
|
|
@@ -522,14 +531,30 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
522
531
|
const newsGroups = this.getAggregation("newsGroup");
|
|
523
532
|
if (!Array.isArray(newsGroups)) return;
|
|
524
533
|
|
|
525
|
-
//
|
|
534
|
+
// Build groupDetailsMap for group details to avoid multiple iterations and clean up descriptions by removing inline styles if any
|
|
526
535
|
const groupDetailsMap = {};
|
|
536
|
+
const groupHasDescription = {};
|
|
527
537
|
(this._defaultNewsResponse.value || []).forEach(group => {
|
|
538
|
+
// Clean group description
|
|
539
|
+
if (group?.description && group.description.trim().length > 0) {
|
|
540
|
+
group.description = this.removeInlineStylesFromDescription(group.description);
|
|
541
|
+
}
|
|
528
542
|
if (group?.group_id) {
|
|
529
|
-
|
|
543
|
+
const articles = group._group_to_article || [];
|
|
544
|
+
// Clean article descriptions and check if any article has a valid description
|
|
545
|
+
let hasDescription = false;
|
|
546
|
+
articles.forEach(article => {
|
|
547
|
+
if (article?.description && article.description.trim().length > 0) {
|
|
548
|
+
article.description = this.removeInlineStylesFromDescription(article.description);
|
|
549
|
+
hasDescription = true;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
groupDetailsMap[group.group_id] = articles;
|
|
553
|
+
groupHasDescription[group.group_id] = hasDescription;
|
|
530
554
|
}
|
|
531
555
|
});
|
|
532
556
|
const newsGroupMap = {};
|
|
557
|
+
// Iterate through the news groups and map group IDs to NewsGroup instances
|
|
533
558
|
newsGroups.filter(group => group instanceof NewsGroup).forEach(group => {
|
|
534
559
|
const groupId = this.getCurrentNewsGroup(group.getId())?.group_id;
|
|
535
560
|
if (groupId) {
|
|
@@ -537,22 +562,24 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
537
562
|
}
|
|
538
563
|
});
|
|
539
564
|
|
|
540
|
-
//
|
|
565
|
+
// If no description is found in any of the articles within the group,
|
|
566
|
+
// disable the pressEnabled property for the news group to prevent user interaction.
|
|
541
567
|
feeds.forEach(feed => {
|
|
542
568
|
if (!feed.group_id) return;
|
|
543
|
-
const groupArticles = groupDetailsMap[feed.group_id];
|
|
544
569
|
const newsGroup = newsGroupMap[feed.group_id];
|
|
545
|
-
if (
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
// If no description is found in any of the articles within the group,
|
|
549
|
-
// disable the pressEnabled property for the news group to prevent user interaction.
|
|
550
|
-
if (!hasDescription) {
|
|
551
|
-
newsGroup.getTile()?.setProperty("pressEnabled", false);
|
|
552
|
-
}
|
|
570
|
+
if (newsGroup && !groupHasDescription[feed.group_id]) {
|
|
571
|
+
newsGroup.getTile()?.setProperty("pressEnabled", false);
|
|
553
572
|
}
|
|
554
573
|
});
|
|
555
574
|
},
|
|
575
|
+
/**
|
|
576
|
+
*
|
|
577
|
+
* @param description - The description from which inline styles need to be removed.
|
|
578
|
+
* @returns {string} The description with inline styles removed.
|
|
579
|
+
*/
|
|
580
|
+
removeInlineStylesFromDescription: function _removeInlineStylesFromDescription(description) {
|
|
581
|
+
return description.replace(/\s*style\s*=\s*(['"])[\s\S]*?\1/gi, "");
|
|
582
|
+
},
|
|
556
583
|
/**
|
|
557
584
|
* Retrieves the current news group data based on the provided id.
|
|
558
585
|
*
|
|
@@ -654,7 +681,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
654
681
|
loadNewsFeed: function _loadNewsFeed(oDocument, noOfFeeds) {
|
|
655
682
|
try {
|
|
656
683
|
const _this4 = this;
|
|
657
|
-
function
|
|
684
|
+
function _temp1() {
|
|
658
685
|
if (!!oDocument?.querySelector("rss") && !!oDocument?.querySelector("item")) {
|
|
659
686
|
oBindingInfo = {
|
|
660
687
|
path: "/channel/item/",
|
|
@@ -678,12 +705,12 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
678
705
|
_this4.bindNewsTile(_this4.oNewsTile, oBindingInfo);
|
|
679
706
|
}
|
|
680
707
|
let oBindingInfo;
|
|
681
|
-
const
|
|
708
|
+
const _temp0 = function () {
|
|
682
709
|
if (!oDocument?.querySelector("customFeed") && !oDocument?.querySelector("defaultFeed")) {
|
|
683
710
|
return Promise.resolve(_this4.extractAllImageUrls(oDocument, noOfFeeds || DEFAULT_FEED_COUNT)).then(function () {});
|
|
684
711
|
}
|
|
685
712
|
}();
|
|
686
|
-
return Promise.resolve(
|
|
713
|
+
return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
|
|
687
714
|
} catch (e) {
|
|
688
715
|
return Promise.reject(e);
|
|
689
716
|
}
|
|
@@ -693,25 +720,33 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
693
720
|
* @returns {void}
|
|
694
721
|
*/
|
|
695
722
|
handleFeedError: function _handleFeedError() {
|
|
696
|
-
if (this.
|
|
723
|
+
if (this.getNewsType() === NewsType.Custom || this.getNewsType() === NewsType.Default) {
|
|
697
724
|
this.generateErrorMessage().setVisible(true);
|
|
698
725
|
if (!this.isParentBaseLayout()) {
|
|
699
726
|
this.setManageNewsButtonVisibility(false);
|
|
700
727
|
}
|
|
701
728
|
this.oNewsTile.setVisible(false);
|
|
702
729
|
} else {
|
|
703
|
-
|
|
730
|
+
this.setVisible(false);
|
|
704
731
|
this.setProperty("newsAvailable", false);
|
|
705
732
|
this.oManageMenuItem.setVisible(false);
|
|
706
733
|
}
|
|
707
734
|
},
|
|
735
|
+
/**
|
|
736
|
+
* Sets the URL for the news tile and triggers data fetch.
|
|
737
|
+
*
|
|
738
|
+
* @param {string} url - The news URL to be set.
|
|
739
|
+
* @returns {Promise<void>} A promise that resolves once data fetching is complete.
|
|
740
|
+
*
|
|
741
|
+
* @private
|
|
742
|
+
*/
|
|
708
743
|
setURL: function _setURL(url) {
|
|
709
744
|
try {
|
|
710
745
|
const _this5 = this;
|
|
711
|
-
_this5.setProperty("
|
|
746
|
+
_this5.setProperty("type", NewsType.NewsUrl);
|
|
712
747
|
_this5.setProperty("newsAvailable", true);
|
|
713
748
|
_this5.generateErrorMessage().setVisible(false);
|
|
714
|
-
|
|
749
|
+
_this5.setVisible(true);
|
|
715
750
|
_this5.oNewsTile.setVisible(true);
|
|
716
751
|
_this5.setProperty("url", url);
|
|
717
752
|
return Promise.resolve(_this5.getData()).then(function () {});
|
|
@@ -725,14 +760,14 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
725
760
|
* @private
|
|
726
761
|
*/
|
|
727
762
|
adjustLayout: function _adjustLayout() {
|
|
728
|
-
|
|
729
|
-
|
|
763
|
+
const deviceType = this.getDeviceType();
|
|
764
|
+
this.oNewsTile.setHeight(NEWS_HEIGHT[deviceType]);
|
|
765
|
+
if (deviceType === DeviceType.Mobile) {
|
|
730
766
|
this.generateErrorMessage().setWidth("100%");
|
|
731
767
|
this.oNewsTile.removeStyleClass("sapUiSmallMarginTop");
|
|
732
768
|
} else {
|
|
733
|
-
this.oNewsTile.setHeight("17rem");
|
|
734
769
|
this.oNewsTile.addStyleClass("sapUiSmallMarginTop");
|
|
735
|
-
|
|
770
|
+
this.getNewsWrapper().setWidth("100%");
|
|
736
771
|
}
|
|
737
772
|
},
|
|
738
773
|
/**
|
|
@@ -751,11 +786,11 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
751
786
|
let oTile;
|
|
752
787
|
if (newsInfo.getElementsByTagName("link").length > 0) {
|
|
753
788
|
oTile = new NewsItem(recycleId(`${sId}-news-item`), {
|
|
754
|
-
url: this.getPropertyValue(newsInfo, "link"),
|
|
755
|
-
title: this.getPropertyValue(newsInfo, "title"),
|
|
756
|
-
subTitle: this.getPropertyValue(newsInfo, "description"),
|
|
757
|
-
imageUrl: this.getPropertyValue(newsInfo, "imageUrl"),
|
|
758
|
-
footer: this.formatDate(this.getPropertyValue(newsInfo, "pubDate"))
|
|
789
|
+
url: String(this.getPropertyValue(newsInfo, "link")),
|
|
790
|
+
title: String(this.getPropertyValue(newsInfo, "title")),
|
|
791
|
+
subTitle: String(this.getPropertyValue(newsInfo, "description")),
|
|
792
|
+
imageUrl: String(this.getPropertyValue(newsInfo, "imageUrl")),
|
|
793
|
+
footer: this.formatDate(String(this.getPropertyValue(newsInfo, "pubDate")))
|
|
759
794
|
});
|
|
760
795
|
this.addAggregation("newsItems", oTile, true);
|
|
761
796
|
} else {
|
|
@@ -763,12 +798,12 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
763
798
|
let newsId = sGroupId && sGroupId.trim() ? `${sId}-newsgroup-${sGroupId}` : `${sId}-newsgroup`;
|
|
764
799
|
let subTitleNews = this.getPropertyValue(newsInfo, "subTitle") ?? "";
|
|
765
800
|
oTile = new NewsGroup(recycleId(newsId), {
|
|
766
|
-
title: this.getPropertyValue(newsInfo, "title"),
|
|
801
|
+
title: String(this.getPropertyValue(newsInfo, "title")),
|
|
767
802
|
subTitle: subTitleNews || this._i18nBundle.getText("newsFeedDescription"),
|
|
768
|
-
imageUrl: this.getPropertyValue(newsInfo, "imageUrl"),
|
|
769
|
-
footer: this.getPropertyValue(newsInfo, "footer"),
|
|
803
|
+
imageUrl: String(this.getPropertyValue(newsInfo, "imageUrl")),
|
|
804
|
+
footer: String(this.getPropertyValue(newsInfo, "footer")),
|
|
770
805
|
priority: this.getPropertyValue(newsInfo, "priority"),
|
|
771
|
-
priorityText: this.getPropertyValue(newsInfo, "priorityText")
|
|
806
|
+
priorityText: String(this.getPropertyValue(newsInfo, "priorityText"))
|
|
772
807
|
});
|
|
773
808
|
this.addAggregation("newsGroup", oTile, true);
|
|
774
809
|
}
|
|
@@ -789,19 +824,19 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
789
824
|
try {
|
|
790
825
|
const _this6 = this;
|
|
791
826
|
let i = 0;
|
|
792
|
-
const
|
|
827
|
+
const _temp10 = _for(function () {
|
|
793
828
|
return i < noOfFeeds;
|
|
794
829
|
}, function () {
|
|
795
830
|
return i++;
|
|
796
831
|
}, function () {
|
|
797
832
|
const oItemElement = oDocument?.getElementsByTagName("item")[i];
|
|
798
|
-
return Promise.resolve(_this6.extractImage(oItemElement.getElementsByTagName("link")[0].textContent)).then(function (sUrl) {
|
|
833
|
+
return Promise.resolve(_this6.extractImage(String(oItemElement.getElementsByTagName("link")[0].textContent))).then(function (sUrl) {
|
|
799
834
|
const oImageUrl = oDocument.createElement("imageUrl");
|
|
800
835
|
oImageUrl.textContent = sUrl;
|
|
801
836
|
oItemElement.appendChild(oImageUrl);
|
|
802
837
|
});
|
|
803
838
|
});
|
|
804
|
-
return Promise.resolve(
|
|
839
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
|
|
805
840
|
} catch (e) {
|
|
806
841
|
return Promise.reject(e);
|
|
807
842
|
}
|
|
@@ -844,6 +879,9 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
844
879
|
return Array.isArray(aMatches) && aMatches[1] ? aMatches[1] : fnLoadPlaceholderImage();
|
|
845
880
|
}).catch(fnLoadPlaceholderImage);
|
|
846
881
|
},
|
|
882
|
+
getNewsType: function _getNewsType() {
|
|
883
|
+
return this.getParent()?.getIsEndUserChange?.()?.newsType || this.getProperty("type");
|
|
884
|
+
},
|
|
847
885
|
/**
|
|
848
886
|
* Checks if the custom file format is CSV based on the custom file name.
|
|
849
887
|
*
|
|
@@ -874,6 +912,38 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
874
912
|
return Promise.reject(e);
|
|
875
913
|
}
|
|
876
914
|
},
|
|
915
|
+
/**
|
|
916
|
+
* Sets the news feed type (Default or Custom) based on the provided data structure.
|
|
917
|
+
*
|
|
918
|
+
* @param {INewsFeed[]} data - News feed data from the URL.
|
|
919
|
+
* @returns {Promise<void>} Resolves after setting the appropriate feed.
|
|
920
|
+
*/
|
|
921
|
+
setNewsFeedFromUrl: function _setNewsFeedFromUrl(data) {
|
|
922
|
+
try {
|
|
923
|
+
const _this8 = this;
|
|
924
|
+
const item = data?.[0];
|
|
925
|
+
const _temp12 = function () {
|
|
926
|
+
if (item && "group_id" in item && "title" in item) {
|
|
927
|
+
_this8.getParent().getIsEndUserChange().newsType = NewsType.Default;
|
|
928
|
+
return Promise.resolve(_this8.setDefaultNews()).then(function () {});
|
|
929
|
+
} else {
|
|
930
|
+
const _temp11 = function () {
|
|
931
|
+
if (item && "LineOfBusiness" in item) {
|
|
932
|
+
_this8.getParent().getIsEndUserChange().newsType = NewsType.Custom;
|
|
933
|
+
_this8.oManageMenuItem.setVisible(true);
|
|
934
|
+
return Promise.resolve(_this8.setCustomNewsFeed("")).then(function () {});
|
|
935
|
+
} else {
|
|
936
|
+
_this8.handleFeedError();
|
|
937
|
+
}
|
|
938
|
+
}();
|
|
939
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
|
940
|
+
}
|
|
941
|
+
}();
|
|
942
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
|
|
943
|
+
} catch (e) {
|
|
944
|
+
return Promise.reject(e);
|
|
945
|
+
}
|
|
946
|
+
},
|
|
877
947
|
/**
|
|
878
948
|
* This method retrieves the count and feeds of the custom news feed asynchronously.
|
|
879
949
|
* If the count is not zero, it loads the custom news feed data and returns the feeds.
|
|
@@ -883,29 +953,30 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
883
953
|
*/
|
|
884
954
|
setCustomNewsFeed: function _setCustomNewsFeed(sFeedId) {
|
|
885
955
|
try {
|
|
886
|
-
const
|
|
956
|
+
const _this9 = this;
|
|
887
957
|
return Promise.resolve(_catch(function () {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
|
|
958
|
+
_this9.oNewsTile.setVisible(true);
|
|
959
|
+
_this9.generateErrorMessage().setVisible(false);
|
|
960
|
+
const feedType = _this9.getNewsType();
|
|
961
|
+
const isDefaultNews = feedType === NewsType.Default;
|
|
962
|
+
return Promise.resolve(_this9.setPersDataNewsFeed(isDefaultNews)).then(function () {
|
|
963
|
+
const customFileName = _this9.getProperty("customFileName");
|
|
964
|
+
const showAllPrepRequired = _this9.isCSVFileFormat(customFileName) ? false : _this9.persDataNewsFeed?.showAllPreparationRequired ?? true;
|
|
965
|
+
if (_this9.isCSVFileFormat(customFileName)) {
|
|
895
966
|
CUSTOM_NEWS_FEED.EXCLUDE_FIELDS.push("PreparationRequired");
|
|
896
967
|
}
|
|
897
968
|
const showPrep = isDefaultNews ? true : showAllPrepRequired;
|
|
898
|
-
return Promise.resolve(
|
|
969
|
+
return Promise.resolve(_this9.getCustomOrDefaultNewsFeed(sFeedId || "", showPrep)).then(function (newsFeeds) {
|
|
899
970
|
if (newsFeeds.length === 0) {
|
|
900
971
|
throw new Error("Error: No news feed available");
|
|
901
972
|
}
|
|
902
|
-
const selectedItems =
|
|
973
|
+
const selectedItems = _this9.persDataNewsFeed?.items;
|
|
903
974
|
|
|
904
975
|
// Handle no favorite feed case
|
|
905
976
|
// Filter feeds based on personalization
|
|
906
977
|
const isSelectedEmpty = selectedItems?.length === 0;
|
|
907
978
|
if (!isDefaultNews && isSelectedEmpty) {
|
|
908
|
-
|
|
979
|
+
_this9.getParent()?.panelLoadedFn("News", {
|
|
909
980
|
loaded: true,
|
|
910
981
|
count: 0
|
|
911
982
|
});
|
|
@@ -916,34 +987,34 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
916
987
|
// if its defaultNews then we show everything except the group ids present inside persDataNewsFeed items
|
|
917
988
|
// if the group id is mandatory then we show it
|
|
918
989
|
if (isDefaultNews) {
|
|
919
|
-
return !selectedItems.includes(feed.group_id) ||
|
|
990
|
+
return !selectedItems.includes(feed.group_id) || _this9.mandatoryNewsFeed.includes(feed.group_id);
|
|
920
991
|
} else {
|
|
921
992
|
// if its customNews we show only the groups that is present in persDataNewsFeed items
|
|
922
993
|
return selectedItems.includes(feed.title);
|
|
923
994
|
}
|
|
924
995
|
});
|
|
925
996
|
if (newsFeeds.length === 0) {
|
|
926
|
-
|
|
997
|
+
_this9.getParent()?.panelLoadedFn("News", {
|
|
927
998
|
loaded: true,
|
|
928
999
|
count: 0
|
|
929
1000
|
});
|
|
930
1001
|
throw new Error("Error: No news feed available after filtering");
|
|
931
1002
|
}
|
|
932
1003
|
}
|
|
933
|
-
return Promise.resolve(
|
|
1004
|
+
return Promise.resolve(_this9.loadCustomNewsFeed(newsFeeds, sFeedId ? "customFeed" : "defaultFeed")).then(function () {
|
|
934
1005
|
if (isDefaultNews) {
|
|
935
|
-
|
|
1006
|
+
_this9.fetchedFeedUrl = _this9.defaultUrl;
|
|
936
1007
|
// If no description is found in any of the articles within a group, the pressEnabled property is set to false
|
|
937
|
-
|
|
1008
|
+
_this9.setPressEnabledForNewsGroup(newsFeeds);
|
|
938
1009
|
} else {
|
|
939
|
-
|
|
1010
|
+
_this9.fetchedFeedUrl = "";
|
|
940
1011
|
}
|
|
941
1012
|
});
|
|
942
1013
|
});
|
|
943
1014
|
});
|
|
944
1015
|
}, function (err) {
|
|
945
1016
|
Log.error(err);
|
|
946
|
-
|
|
1017
|
+
_this9.handleFeedError();
|
|
947
1018
|
}));
|
|
948
1019
|
} catch (e) {
|
|
949
1020
|
return Promise.reject(e);
|
|
@@ -1010,12 +1081,12 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1010
1081
|
subTitle = feed.subTitle || feed.description || "";
|
|
1011
1082
|
defaultNews.push({
|
|
1012
1083
|
title: title,
|
|
1013
|
-
footer: feed
|
|
1084
|
+
footer: feed?.footer_text,
|
|
1014
1085
|
imageUrl: this.getDefaultFeedImage(feed),
|
|
1015
1086
|
group_id: feed.group_id,
|
|
1016
1087
|
subTitle: subTitle,
|
|
1017
|
-
priority: feed
|
|
1018
|
-
priorityText: feed
|
|
1088
|
+
priority: feed?.priority == "1" ? Priority.Medium : Priority.None,
|
|
1089
|
+
priorityText: feed?.priority == "1" ? this._i18nBundle.getText("criticalNews") : ""
|
|
1019
1090
|
});
|
|
1020
1091
|
defaultFeedDict[title] = title;
|
|
1021
1092
|
}
|
|
@@ -1050,10 +1121,10 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1050
1121
|
},
|
|
1051
1122
|
/**
|
|
1052
1123
|
*
|
|
1053
|
-
* @returns {ODataResponse} The placeholder news group with enriched titles and descriptions
|
|
1124
|
+
* @returns {ODataResponse} The no update placeholder news group with enriched titles and descriptions to show when there are no updates
|
|
1054
1125
|
* @private
|
|
1055
1126
|
*/
|
|
1056
|
-
|
|
1127
|
+
getNoUpdatesPlaceholder: function _getNoUpdatesPlaceholder() {
|
|
1057
1128
|
const placeholderTitle = this._i18nBundle.getText("placeholderNewsTitle");
|
|
1058
1129
|
const placeholderDescription = this._i18nBundle.getText("placeholderNewsDescription");
|
|
1059
1130
|
const enrichedNewsPlaceholder = {
|
|
@@ -1065,12 +1136,20 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1065
1136
|
_group_to_article: group._group_to_article.map(article => ({
|
|
1066
1137
|
...article,
|
|
1067
1138
|
title: placeholderTitle,
|
|
1068
|
-
description:
|
|
1139
|
+
description: ""
|
|
1069
1140
|
}))
|
|
1070
1141
|
}))
|
|
1071
1142
|
};
|
|
1072
1143
|
return enrichedNewsPlaceholder;
|
|
1073
1144
|
},
|
|
1145
|
+
/**
|
|
1146
|
+
* Returns if its a no updates new feed group or not
|
|
1147
|
+
* This indicates whether the news feed is a static no updates placeholder news feed.
|
|
1148
|
+
* @private
|
|
1149
|
+
*/
|
|
1150
|
+
isNoUpdatesNewsFeed: function _isNoUpdatesNewsFeed() {
|
|
1151
|
+
return this._noUpdatesNewsFeed;
|
|
1152
|
+
},
|
|
1074
1153
|
/**
|
|
1075
1154
|
* Fetches the default news data from the server.
|
|
1076
1155
|
* @returns {Promise<ODataResponse>} A promise that resolves to the fetched news data
|
|
@@ -1079,7 +1158,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1079
1158
|
*/
|
|
1080
1159
|
fetchDefaultNews: function _fetchDefaultNews() {
|
|
1081
1160
|
try {
|
|
1082
|
-
const
|
|
1161
|
+
const _this0 = this;
|
|
1083
1162
|
return Promise.resolve(_catch(function () {
|
|
1084
1163
|
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
1085
1164
|
return Promise.resolve(navigationService.isNavigationSupported([{
|
|
@@ -1090,33 +1169,40 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1090
1169
|
}])).then(function ([{
|
|
1091
1170
|
supported
|
|
1092
1171
|
}]) {
|
|
1093
|
-
let
|
|
1094
|
-
function
|
|
1095
|
-
if (
|
|
1172
|
+
let _exit2 = false;
|
|
1173
|
+
function _temp14(_result4) {
|
|
1174
|
+
if (_exit2) return _result4;
|
|
1096
1175
|
// If the response is not supported or empty, set the default news response to placeholder news
|
|
1097
|
-
if (!supported || !
|
|
1098
|
-
|
|
1099
|
-
|
|
1176
|
+
if (!supported || !_this0._defaultNewsResponse?.value?.length) {
|
|
1177
|
+
_this0._defaultNewsResponse = _this0.getNoUpdatesPlaceholder();
|
|
1178
|
+
_this0._noUpdatesNewsFeed = true;
|
|
1179
|
+
_this0.oManageMenuItem.setVisible(false);
|
|
1100
1180
|
}
|
|
1101
|
-
return
|
|
1181
|
+
return _this0._defaultNewsResponse;
|
|
1102
1182
|
}
|
|
1103
|
-
const
|
|
1183
|
+
const _temp13 = function () {
|
|
1104
1184
|
if (supported) {
|
|
1105
|
-
return
|
|
1106
|
-
if (
|
|
1107
|
-
|
|
1185
|
+
return function () {
|
|
1186
|
+
if (_this0._endUserResponse) {
|
|
1187
|
+
_this0._defaultNewsResponse = _this0._endUserResponse;
|
|
1188
|
+
} else {
|
|
1189
|
+
return Promise.resolve(fetch(_this0.defaultUrl || DEFAULT_NEWS_URL)).then(function (response) {
|
|
1190
|
+
if (!response.ok) {
|
|
1191
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
1192
|
+
}
|
|
1193
|
+
return Promise.resolve(response.json()).then(function (_response$json2) {
|
|
1194
|
+
_this0._defaultNewsResponse = _response$json2;
|
|
1195
|
+
});
|
|
1196
|
+
});
|
|
1108
1197
|
}
|
|
1109
|
-
|
|
1110
|
-
_this9._defaultNewsResponse = _response$json;
|
|
1111
|
-
});
|
|
1112
|
-
});
|
|
1198
|
+
}();
|
|
1113
1199
|
}
|
|
1114
1200
|
}();
|
|
1115
|
-
return
|
|
1201
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
|
1116
1202
|
});
|
|
1117
1203
|
});
|
|
1118
1204
|
}, function (error) {
|
|
1119
|
-
|
|
1205
|
+
_this0._defaultNewsPromise = null;
|
|
1120
1206
|
Log.error(error);
|
|
1121
1207
|
throw error;
|
|
1122
1208
|
}));
|
|
@@ -1133,17 +1219,18 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1133
1219
|
* @returns {Promise<INewsFeed[]>} A promise that resolves to an array of custom news feed items.
|
|
1134
1220
|
* @private
|
|
1135
1221
|
*/
|
|
1136
|
-
|
|
1222
|
+
getCustomOrDefaultNewsFeed: function _getCustomOrDefaultNewsFeed(sFeedId, showAllPreparationRequired) {
|
|
1137
1223
|
try {
|
|
1138
|
-
const
|
|
1139
|
-
const
|
|
1224
|
+
const _this1 = this;
|
|
1225
|
+
const feedType = _this1.getNewsType();
|
|
1226
|
+
const isDefaultNews = feedType === NewsType.Default;
|
|
1140
1227
|
if (isDefaultNews) {
|
|
1141
|
-
return Promise.resolve(
|
|
1142
|
-
let aDefaultgroups =
|
|
1228
|
+
return Promise.resolve(_this1.getDefaultNewsResponse()).then(function () {
|
|
1229
|
+
let aDefaultgroups = _this1.getDefaultNewsFeedDetails(_this1._defaultNewsResponse);
|
|
1143
1230
|
return aDefaultgroups;
|
|
1144
1231
|
});
|
|
1145
1232
|
} else {
|
|
1146
|
-
return Promise.resolve(
|
|
1233
|
+
return Promise.resolve(_this1.getCustomFeedData(sFeedId, showAllPreparationRequired));
|
|
1147
1234
|
}
|
|
1148
1235
|
} catch (e) {
|
|
1149
1236
|
return Promise.reject(e);
|
|
@@ -1159,17 +1246,19 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1159
1246
|
*/
|
|
1160
1247
|
getCustomFeedData: function _getCustomFeedData(sFeedId, showAllPreparationRequired) {
|
|
1161
1248
|
try {
|
|
1162
|
-
const
|
|
1249
|
+
const _this10 = this;
|
|
1163
1250
|
return Promise.resolve(_catch(function () {
|
|
1164
|
-
|
|
1251
|
+
let newsDetailUrl;
|
|
1252
|
+
const isEnduser = _this10.getParent().getIsEndUserChange().isEndUser;
|
|
1253
|
+
newsDetailUrl = isEnduser ? _this10.getUrl() : _this10.getNewsFeedDetailsUrl({
|
|
1165
1254
|
changeId: sFeedId,
|
|
1166
1255
|
showAllPreparationRequired
|
|
1167
1256
|
});
|
|
1168
|
-
if (!
|
|
1169
|
-
|
|
1257
|
+
if (!_this10.customNewsFeedCache.has(newsDetailUrl)) {
|
|
1258
|
+
_this10.customNewsFeedCache.set(newsDetailUrl, _this10.getAuthNewsFeed(newsDetailUrl));
|
|
1170
1259
|
}
|
|
1171
|
-
return Promise.resolve(
|
|
1172
|
-
const authorizedNewsFeeds =
|
|
1260
|
+
return Promise.resolve(_this10.customNewsFeedCache.get(newsDetailUrl)).then(function (_this10$customNewsFee) {
|
|
1261
|
+
const authorizedNewsFeeds = _this10$customNewsFee;
|
|
1173
1262
|
const oFeedDict = {};
|
|
1174
1263
|
const aFeeds = [];
|
|
1175
1264
|
if (authorizedNewsFeeds?.length > 0) {
|
|
@@ -1178,8 +1267,8 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1178
1267
|
if (!oFeedDict[title.value]) {
|
|
1179
1268
|
aFeeds.push({
|
|
1180
1269
|
title: title.value,
|
|
1181
|
-
footer: oFeed[CUSTOM_NEWS_FEED.VALIDITY]
|
|
1182
|
-
imageUrl:
|
|
1270
|
+
footer: oFeed[CUSTOM_NEWS_FEED.VALIDITY]?.value,
|
|
1271
|
+
imageUrl: _this10.getCustomFeedImage(title.value)
|
|
1183
1272
|
});
|
|
1184
1273
|
oFeedDict[title.value] = title.value;
|
|
1185
1274
|
}
|
|
@@ -1218,10 +1307,10 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1218
1307
|
*/
|
|
1219
1308
|
getAuthNewsFeed: function _getAuthNewsFeed(sNewsUrl, newsTitle) {
|
|
1220
1309
|
try {
|
|
1221
|
-
const
|
|
1310
|
+
const _this11 = this;
|
|
1222
1311
|
return Promise.resolve(_catch(function () {
|
|
1223
|
-
return Promise.resolve(Promise.all([
|
|
1224
|
-
return aAvailableApps.length === 0 ? aNewsFeed :
|
|
1312
|
+
return Promise.resolve(Promise.all([_this11.getAllAvailableApps(), _this11.getNewsFeedDetails(sNewsUrl, newsTitle)])).then(function ([aAvailableApps, aNewsFeed]) {
|
|
1313
|
+
return aAvailableApps.length === 0 ? aNewsFeed : _this11.arrangeNewsFeeds(aNewsFeed, aAvailableApps);
|
|
1225
1314
|
});
|
|
1226
1315
|
}, function (err) {
|
|
1227
1316
|
Log.error(err);
|
|
@@ -1302,15 +1391,15 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1302
1391
|
*/
|
|
1303
1392
|
getNewsFeedDetails: function _getNewsFeedDetails(sUrl, newsTitle) {
|
|
1304
1393
|
try {
|
|
1305
|
-
let
|
|
1306
|
-
const
|
|
1307
|
-
function
|
|
1308
|
-
if (
|
|
1394
|
+
let _exit3 = false;
|
|
1395
|
+
const _this12 = this;
|
|
1396
|
+
function _temp16(_result6) {
|
|
1397
|
+
if (_exit3) return _result6;
|
|
1309
1398
|
const fnFormattedLabel = sLabel => sLabel.replace(/([a-z0-9])([A-Z])/g, "$1 $2");
|
|
1310
|
-
return Promise.resolve(Promise.all([HttpHelper.GetJSON(sUrl),
|
|
1399
|
+
return Promise.resolve(Promise.all([_this12._endUserResponse ? Promise.resolve(_this12._endUserResponse) : HttpHelper.GetJSON(sUrl), _this12.getTranslatedText(_this12.getCustomFeedKey())])).then(function ([newsResponse, translationResponse]) {
|
|
1311
1400
|
let aNews = JSON.parse(JSON.stringify(newsResponse.value || []));
|
|
1312
1401
|
const aTranslation = JSON.parse(JSON.stringify(translationResponse.value || []));
|
|
1313
|
-
aNews =
|
|
1402
|
+
aNews = _this12.filterNewsOnTitle(aNews, newsTitle);
|
|
1314
1403
|
return aNews.map(oNews => {
|
|
1315
1404
|
const aFields = Object.keys(oNews);
|
|
1316
1405
|
const aExpandFields = [];
|
|
@@ -1326,7 +1415,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1326
1415
|
}
|
|
1327
1416
|
});
|
|
1328
1417
|
oNews.Link = {
|
|
1329
|
-
label:
|
|
1418
|
+
label: _this12._i18nBundle.getText("readMoreLink"),
|
|
1330
1419
|
value: oNews[CUSTOM_NEWS_FEED.LINK],
|
|
1331
1420
|
text: "Link"
|
|
1332
1421
|
};
|
|
@@ -1336,16 +1425,16 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1336
1425
|
});
|
|
1337
1426
|
});
|
|
1338
1427
|
}
|
|
1339
|
-
const
|
|
1340
|
-
if (
|
|
1341
|
-
return Promise.resolve(
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
return
|
|
1428
|
+
const _temp15 = function () {
|
|
1429
|
+
if (_this12.customNewsFeedCache.has(sUrl)) {
|
|
1430
|
+
return Promise.resolve(_this12.customNewsFeedCache.get(sUrl)).then(function (newsFeedDetails) {
|
|
1431
|
+
const _this12$filterNewsOnT = _this12.filterNewsOnTitle(newsFeedDetails, newsTitle);
|
|
1432
|
+
_exit3 = true;
|
|
1433
|
+
return _this12$filterNewsOnT;
|
|
1345
1434
|
});
|
|
1346
1435
|
}
|
|
1347
1436
|
}();
|
|
1348
|
-
return Promise.resolve(
|
|
1437
|
+
return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15));
|
|
1349
1438
|
} catch (e) {
|
|
1350
1439
|
return Promise.reject(e);
|
|
1351
1440
|
}
|
|
@@ -1391,25 +1480,25 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1391
1480
|
*/
|
|
1392
1481
|
loadCustomNewsFeed: function _loadCustomNewsFeed(feeds, feedType) {
|
|
1393
1482
|
try {
|
|
1394
|
-
const
|
|
1395
|
-
const oXMLResponse =
|
|
1396
|
-
const oParent =
|
|
1397
|
-
if (!
|
|
1398
|
-
|
|
1399
|
-
if (!
|
|
1483
|
+
const _this13 = this;
|
|
1484
|
+
const oXMLResponse = _this13.parseJsonToXml(JSON.parse(JSON.stringify(feeds)), feedType);
|
|
1485
|
+
const oParent = _this13.getParent();
|
|
1486
|
+
if (!_this13.oNewsModel) {
|
|
1487
|
+
_this13.oNewsModel = new XMLModel(oXMLResponse);
|
|
1488
|
+
if (!_this13.bNewsLoad) {
|
|
1400
1489
|
oParent?.panelLoadedFn("News", {
|
|
1401
1490
|
loaded: true,
|
|
1402
1491
|
count: DEFAULT_FEED_COUNT
|
|
1403
1492
|
});
|
|
1404
|
-
|
|
1493
|
+
_this13.bNewsLoad = true;
|
|
1405
1494
|
}
|
|
1406
|
-
|
|
1495
|
+
_this13.oNewsTile.setModel(_this13.oNewsModel);
|
|
1407
1496
|
} else {
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1497
|
+
_this13.oNewsTile.unbindAggregation("tiles", false); // Unbind the bound aggregation
|
|
1498
|
+
_this13.oNewsTile.destroyAggregation("tiles"); // Removes old tiles
|
|
1499
|
+
_this13.oNewsModel.setData(oXMLResponse);
|
|
1411
1500
|
}
|
|
1412
|
-
return Promise.resolve(
|
|
1501
|
+
return Promise.resolve(_this13.loadNewsFeed(oXMLResponse, feeds.length)).then(function () {});
|
|
1413
1502
|
} catch (e) {
|
|
1414
1503
|
return Promise.reject(e);
|
|
1415
1504
|
}
|
|
@@ -1482,11 +1571,11 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/SlideTile", "sap/m/li
|
|
|
1482
1571
|
const random = Math.floor(Math.random() * 15) + 1;
|
|
1483
1572
|
return `${sPrefix}/${random}.jpg`;
|
|
1484
1573
|
};
|
|
1485
|
-
if (!groupImg || groupImg
|
|
1574
|
+
if (!groupImg || groupImg?.image_id !== imgId || !groupImg?.bg_image) {
|
|
1486
1575
|
return getRandomDefaultImage();
|
|
1487
1576
|
}
|
|
1488
|
-
let mimeType = groupImg
|
|
1489
|
-
const groupBgImg = groupImg
|
|
1577
|
+
let mimeType = groupImg?.mime_type;
|
|
1578
|
+
const groupBgImg = groupImg?.bg_image;
|
|
1490
1579
|
if (mimeType === "application/octet-stream") {
|
|
1491
1580
|
mimeType = "image/jpeg";
|
|
1492
1581
|
}
|