@sapui5/sap.cux.home 1.141.0 → 1.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +9 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +10 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +75 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +378 -179
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +399 -175
- 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 +32 -17
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +31 -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 +2 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +4 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +35 -5
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +32 -5
- 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 +23 -2
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +18 -1
- 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 +32 -59
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +270 -249
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +169 -181
- 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 +25 -70
- 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 +4 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +12 -9
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +11 -8
- 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 +3 -3
- 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 +288 -58
- 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 +45 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +55 -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 +380 -64
- 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 +90 -57
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +51 -23
- 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/SettingsDialog.d.ts +7 -0
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +18 -10
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +20 -13
- 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 +17 -12
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +19 -16
- 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.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +59 -66
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +46 -34
- 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 +40 -14
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_da.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_de.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_el.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_en.properties +9 -5
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +14 -6
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +14 -6
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_es.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_et.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_id.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_it.properties +10 -6
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_no.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +9 -5
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_th.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +8 -4
- package/src/sap/cux/home/interface/AppsInterface.d.ts +6 -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 +7 -0
- 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/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +2 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +2 -2
- 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 +155 -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
|
@@ -19,7 +19,7 @@ import BaseLayout from "./BaseLayout";
|
|
|
19
19
|
import type { $BaseNewsPanelSettings } from "./BaseNewsPanel";
|
|
20
20
|
import BaseNewsPanel from "./BaseNewsPanel";
|
|
21
21
|
import MenuItem from "./MenuItem";
|
|
22
|
-
import NewsAndPagesContainer from "./
|
|
22
|
+
import NewsAndPagesContainer from "./NewsContainer";
|
|
23
23
|
import NewsGroup from "./NewsGroup";
|
|
24
24
|
import NewsItem from "./NewsItem";
|
|
25
25
|
import { NewsType } from "./library";
|
|
@@ -209,6 +209,7 @@ export default class NewsPanel extends BaseNewsPanel {
|
|
|
209
209
|
private defaultUrl!: string;
|
|
210
210
|
private _noUpdatesNewsFeed: boolean = false; // flag to check if no updates news tile is shown or not
|
|
211
211
|
private _endUserResponse!: ODataResponse;
|
|
212
|
+
private defaultNewsItems?: INewsFeed[] | null;
|
|
212
213
|
|
|
213
214
|
static readonly metadata: MetadataOptions = {
|
|
214
215
|
library: "sap.cux.home",
|
|
@@ -933,30 +934,43 @@ export default class NewsPanel extends BaseNewsPanel {
|
|
|
933
934
|
* @private
|
|
934
935
|
*/
|
|
935
936
|
private getDefaultNewsFeedDetails(newsResponse: ODataResponse) {
|
|
936
|
-
|
|
937
|
-
const defaultNews: INewsFeed[] = [];
|
|
938
|
-
const defaultFeedDict = {} as Record<string, string>;
|
|
937
|
+
const newsFeedItems: INewsFeed[] = JSON.parse(JSON.stringify(newsResponse.value || [])) as INewsFeed[];
|
|
939
938
|
this.mandatoryNewsFeed = [];
|
|
940
939
|
if (newsFeedItems?.length > 0) {
|
|
941
940
|
this.mandatoryNewsFeed = this.filterMandatoryNews(newsFeedItems).map((oFeed) => oFeed.group_id || "");
|
|
942
941
|
this.markGroupsWithCriticalArticles(newsFeedItems);
|
|
942
|
+
}
|
|
943
|
+
return newsFeedItems;
|
|
944
|
+
}
|
|
943
945
|
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
946
|
+
/**
|
|
947
|
+
* Removes expired article groups from the provided news feed items.
|
|
948
|
+
* An article group is considered expired if it has no associated articles in _group_to_article
|
|
949
|
+
*
|
|
950
|
+
* @param {INewsFeed[]} newsFeedItems - An array of news feed items to filter.
|
|
951
|
+
* @returns {INewsFeed[]} An array of news feed items that have associated articles.
|
|
952
|
+
* @private
|
|
953
|
+
*/
|
|
954
|
+
private removeExpiredArticleGroup(newsFeedItems: INewsFeed[] = []): INewsFeed[] {
|
|
955
|
+
const defaultNews: INewsFeed[] = [];
|
|
956
|
+
const defaultFeedSet = new Set<string>();
|
|
957
|
+
for (const feed of newsFeedItems) {
|
|
958
|
+
const title = feed.title;
|
|
959
|
+
const group_id = feed.group_id;
|
|
960
|
+
let subTitle = "";
|
|
961
|
+
const hasArticles = (feed._group_to_article?.length ?? 0) > 0;
|
|
962
|
+
if (group_id && !defaultFeedSet.has(group_id) && hasArticles) {
|
|
963
|
+
subTitle = feed.subTitle || feed.description || "";
|
|
964
|
+
defaultNews.push({
|
|
965
|
+
title: title,
|
|
966
|
+
footer: feed?.footer_text,
|
|
967
|
+
imageUrl: this.getDefaultFeedImage(feed),
|
|
968
|
+
group_id: feed.group_id,
|
|
969
|
+
subTitle: subTitle,
|
|
970
|
+
priority: feed?.priority == "1" ? Priority.Medium : Priority.None,
|
|
971
|
+
priorityText: feed?.priority == "1" ? this._i18nBundle.getText("criticalNews") : ""
|
|
972
|
+
});
|
|
973
|
+
defaultFeedSet.add(group_id);
|
|
960
974
|
}
|
|
961
975
|
}
|
|
962
976
|
return defaultNews;
|
|
@@ -1042,6 +1056,7 @@ export default class NewsPanel extends BaseNewsPanel {
|
|
|
1042
1056
|
}
|
|
1043
1057
|
}
|
|
1044
1058
|
]);
|
|
1059
|
+
|
|
1045
1060
|
if (supported) {
|
|
1046
1061
|
if (this._endUserResponse) {
|
|
1047
1062
|
this._defaultNewsResponse = this._endUserResponse;
|
|
@@ -1082,14 +1097,27 @@ export default class NewsPanel extends BaseNewsPanel {
|
|
|
1082
1097
|
const feedType = this.getNewsType();
|
|
1083
1098
|
const isDefaultNews = feedType === NewsType.Default;
|
|
1084
1099
|
if (isDefaultNews) {
|
|
1085
|
-
await this.
|
|
1086
|
-
|
|
1087
|
-
return aDefaultgroups;
|
|
1100
|
+
let aDefaultNewsItems = this.defaultNewsItems ? this.defaultNewsItems : await this.getDefaultNewsData();
|
|
1101
|
+
return this.removeExpiredArticleGroup(aDefaultNewsItems);
|
|
1088
1102
|
} else {
|
|
1089
1103
|
return this.getCustomFeedData(sFeedId, showAllPreparationRequired);
|
|
1090
1104
|
}
|
|
1091
1105
|
}
|
|
1092
1106
|
|
|
1107
|
+
/**
|
|
1108
|
+
* Get the default news feed items.
|
|
1109
|
+
* This method fetches the default news response and processes it to extract the news feed details.
|
|
1110
|
+
* @returns {Promise<INewsFeed[]>} A promise that resolves to an array of default news feed items.
|
|
1111
|
+
* @private
|
|
1112
|
+
*/
|
|
1113
|
+
public async getDefaultNewsData(): Promise<INewsFeed[]> {
|
|
1114
|
+
await this.getDefaultNewsResponse();
|
|
1115
|
+
if (!this.defaultNewsItems) {
|
|
1116
|
+
this.defaultNewsItems = this.getDefaultNewsFeedDetails(this._defaultNewsResponse);
|
|
1117
|
+
}
|
|
1118
|
+
return this.defaultNewsItems;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1093
1121
|
/**
|
|
1094
1122
|
* Retrieves custom news feed items identified by the provided feed ID and settings.
|
|
1095
1123
|
* It processes the response data and returns an array of custom news feed items.
|
|
@@ -27,6 +27,9 @@ declare module "sap/cux/home/NewsSettingsPanel" {
|
|
|
27
27
|
private deselectedDefaultFeeds;
|
|
28
28
|
private headerText;
|
|
29
29
|
private title;
|
|
30
|
+
private groupTable;
|
|
31
|
+
private newsListVBox;
|
|
32
|
+
private _resetActionButton;
|
|
30
33
|
/**
|
|
31
34
|
* Init lifecycle method
|
|
32
35
|
*
|
|
@@ -60,12 +63,18 @@ declare module "sap/cux/home/NewsSettingsPanel" {
|
|
|
60
63
|
*/
|
|
61
64
|
private setTitleMessage;
|
|
62
65
|
/**
|
|
63
|
-
* Returns the content for the news List
|
|
66
|
+
* Returns the content for the news List for custom news feed
|
|
64
67
|
*
|
|
65
68
|
* @private
|
|
66
69
|
* @returns {sap.ui.core.Control} The control containing the News Settings Panel's List
|
|
67
70
|
*/
|
|
68
|
-
private
|
|
71
|
+
private createCustomNewsList;
|
|
72
|
+
/**
|
|
73
|
+
* Creates and returns a table for managing default news group settings.
|
|
74
|
+
* @returns {Table} Table for news groups for default manage news feed
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
private createNewsGroupTable;
|
|
69
78
|
/**
|
|
70
79
|
* Checks if the custom file format is CSV based on the custom file name.
|
|
71
80
|
*
|
|
@@ -80,17 +89,31 @@ declare module "sap/cux/home/NewsSettingsPanel" {
|
|
|
80
89
|
* @private
|
|
81
90
|
*/
|
|
82
91
|
private saveNewsFeedSettings;
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
92
|
+
/**
|
|
93
|
+
* Collect selected custom feed titles from the list
|
|
94
|
+
* @returns {string[]} Array of selected custom feed titles
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
private collectSelectedCustomFeedTitles;
|
|
98
|
+
/**
|
|
99
|
+
* Collect deselected default group IDs from the table
|
|
100
|
+
* @returns {string[]} Array of deselected default group IDs from the table
|
|
101
|
+
* @private
|
|
102
|
+
*/
|
|
103
|
+
private collectDeselectedDefaultGroupIds;
|
|
104
|
+
/**
|
|
105
|
+
* Get groupId info for the default NewsList
|
|
106
|
+
* @param {HBox | ColumnListItem} contentBox, content Hbox or ColumnListItem
|
|
85
107
|
* @returns {string} groupId
|
|
86
108
|
* @private
|
|
87
109
|
*/
|
|
88
110
|
private getDefaultGroupId;
|
|
89
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Set items for the NewsList for custom news feed
|
|
90
113
|
* @param {Array} [aItems] news items to be set as items aggregation
|
|
91
114
|
* @private
|
|
92
115
|
*/
|
|
93
|
-
private
|
|
116
|
+
private setCustomNewsItems;
|
|
94
117
|
/**
|
|
95
118
|
* Loads news feed settings
|
|
96
119
|
*
|
|
@@ -108,6 +131,12 @@ declare module "sap/cux/home/NewsSettingsPanel" {
|
|
|
108
131
|
* If no news feed is provided, it returns undefined.
|
|
109
132
|
*/
|
|
110
133
|
private _handleDefaultNewsFeed;
|
|
134
|
+
/**
|
|
135
|
+
* This method populates the column list items in the group table for the default news feed settings.
|
|
136
|
+
* @param aItems Array of news feed items
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
private setColumnListItems;
|
|
111
140
|
/**
|
|
112
141
|
* @param {INewsFeed[]} aNewsFeed
|
|
113
142
|
* @param aPersNewsFeed
|
|
@@ -120,6 +149,13 @@ declare module "sap/cux/home/NewsSettingsPanel" {
|
|
|
120
149
|
* It also sets the state of the show switch based on the `showAllPreparationRequired` parameter.
|
|
121
150
|
*/
|
|
122
151
|
private _handleCustomNewsFeed;
|
|
152
|
+
/**
|
|
153
|
+
* Resets the default manage news' news settings to default by clearing
|
|
154
|
+
* the personalization data and updating the news panel.
|
|
155
|
+
* @private
|
|
156
|
+
* @returns {Promise<INewsFeed[] | undefined>} A promise that resolves to the updated news feed items or undefined.
|
|
157
|
+
*/
|
|
158
|
+
private resetDefaultNewsSettings;
|
|
123
159
|
/**
|
|
124
160
|
* Checks if the News Settings Panel is supported based on the properties of the News Panel.
|
|
125
161
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewsSettingsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/NewsSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"NewsSettingsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/NewsSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;IAsBhD,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;IAU/D,UAAU,YAAY;QACrB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,0BAA0B,CAAC,EAAE,OAAO,CAAC;KACrC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,iBAAiB;QAC/D,OAAO,CAAC,WAAW,CAAU;QAC7B,OAAO,CAAC,wBAAwB,CAAQ;QACxC,OAAO,CAAC,KAAK,CAAQ;QACrB,OAAO,CAAC,aAAa,CAAsB;QAC3C,OAAO,CAAC,UAAU,CAAa;QAC/B,OAAO,CAAC,YAAY,CAA0B;QAC9C,OAAO,CAAC,sBAAsB,CAAY;QAC1C,OAAO,CAAC,UAAU,CAAQ;QAC1B,OAAO,CAAC,KAAK,CAAS;QACtB,OAAO,CAAC,UAAU,CAAS;QAC3B,OAAO,CAAC,YAAY,CAAQ;QAC5B,OAAO,CAAC,kBAAkB,CAAU;QAEpC;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QA2BnB;;;;;WAKG;QACH,OAAO,CAAC,UAAU;QAWlB;;WAEG;gBACW,kBAAkB;QAUhC;;;;;WAKG;QACH,OAAO,CAAC,SAAS;QAYjB;;;;;WAKG;QACH,OAAO,CAAC,eAAe;QAkBvB;;;;;WAKG;QACH,OAAO,CAAC,oBAAoB;QA8C5B;;;;WAIG;QACH,OAAO,CAAC,oBAAoB;QA8B5B;;;;;WAKG;QACH,OAAO,CAAC,eAAe;QAIvB;;;;;WAKG;gBACW,oBAAoB;QAoClC;;;;WAIG;QACH,OAAO,CAAC,+BAA+B;QAYvC;;;;WAIG;QACH,OAAO,CAAC,gCAAgC;QAYxC;;;;;WAKG;QACH,OAAO,CAAC,iBAAiB;QAKzB;;;;WAIG;QACH,OAAO,CAAC,kBAAkB;QA2B1B;;;;WAIG;gBACW,oBAAoB;QA6BlC;;;;;;;;;WASG;QACH,OAAO,CAAC,sBAAsB;QAkC9B;;;;WAIG;QACH,OAAO,CAAC,kBAAkB;QA2B1B;;;;;;;;;;WAUG;QACH,OAAO,CAAC,qBAAqB;QA4B7B;;;;;WAKG;gBACW,wBAAwB;QAWtC;;;;WAIG;QACU,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;KAW5C;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/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/Label", "sap/m/List", "sap/m/Switch", "sap/m/Text", "sap/m/Title", "sap/m/VBox", "sap/ui/core/CustomData", "./BaseSettingsPanel", "./library", "./utils/Accessibility", "./utils/Constants", "./utils/FESRUtil", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (CheckBox, CustomListItem, HBox, Label, List, Switch, Text, Title, VBox, CustomData, __BaseSettingsPanel, ___library, ___utils_Accessibility, ___utils_Constants, ___utils_FESRUtil, __PersonalisationUtils, __UshellPersonalizer) {
|
|
5
|
+
sap.ui.define(["sap/m/Button", "sap/m/CheckBox", "sap/m/Column", "sap/m/ColumnListItem", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/Label", "sap/m/List", "sap/m/Switch", "sap/m/Table", "sap/m/Text", "sap/m/Title", "sap/m/VBox", "sap/ui/core/CustomData", "./BaseSettingsPanel", "./library", "./utils/Accessibility", "./utils/Constants", "./utils/FESRUtil", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (Button, CheckBox, Column, ColumnListItem, CustomListItem, HBox, Label, List, Switch, Table, Text, Title, VBox, CustomData, __BaseSettingsPanel, ___library, ___utils_Accessibility, ___utils_Constants, ___utils_FESRUtil, __PersonalisationUtils, __UshellPersonalizer) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -43,7 +43,15 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
43
43
|
this.setProperty("key", SETTINGS_PANELS_KEYS.NEWS);
|
|
44
44
|
this.setProperty("title", this._i18nBundle.getText("news"));
|
|
45
45
|
this.setProperty("icon", "sap-icon://newspaper");
|
|
46
|
-
|
|
46
|
+
this._resetActionButton = new Button({
|
|
47
|
+
id: `${this.getId()}-newsResetBtn`,
|
|
48
|
+
visible: false,
|
|
49
|
+
enabled: false,
|
|
50
|
+
text: this._i18nBundle.getText("resetDefaultButton"),
|
|
51
|
+
press: () => this.resetDefaultNewsSettings()
|
|
52
|
+
});
|
|
53
|
+
// Add button to actionButtons aggregation
|
|
54
|
+
this.addActionButton(this._resetActionButton);
|
|
47
55
|
//setup layout content
|
|
48
56
|
this.addAggregation("content", this.getContent());
|
|
49
57
|
|
|
@@ -65,7 +73,7 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
65
73
|
const oContentVBox = new VBox(this.getId() + "--idNewsPageOuterVBoX", {
|
|
66
74
|
alignItems: "Start",
|
|
67
75
|
justifyContent: "SpaceBetween",
|
|
68
|
-
items: [oHeader, oTitle, this.
|
|
76
|
+
items: [oHeader, oTitle, this.createCustomNewsList(), this.createNewsGroupTable()]
|
|
69
77
|
});
|
|
70
78
|
return oContentVBox;
|
|
71
79
|
},
|
|
@@ -131,49 +139,85 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
131
139
|
return oTitleVBox;
|
|
132
140
|
},
|
|
133
141
|
/**
|
|
134
|
-
* Returns the content for the news List
|
|
142
|
+
* Returns the content for the news List for custom news feed
|
|
135
143
|
*
|
|
136
144
|
* @private
|
|
137
145
|
* @returns {sap.ui.core.Control} The control containing the News Settings Panel's List
|
|
138
146
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
147
|
+
createCustomNewsList: function _createCustomNewsList() {
|
|
148
|
+
if (!this.newsListVBox) {
|
|
149
|
+
//showAllPrepRequired Switch
|
|
150
|
+
const oShowSwitchLabel = new Label(this.getId() + "--idShowAllCustNewsSwitchLabel", {
|
|
151
|
+
text: this._i18nBundle.getText("showAllPreparationRequiredSwitchLabel")
|
|
152
|
+
});
|
|
153
|
+
this.oShowSwitch = new Switch(`${this.getId()}-showSwitch`, {
|
|
154
|
+
customTextOn: " ",
|
|
155
|
+
customTextOff: " ",
|
|
156
|
+
change: () => {
|
|
157
|
+
void this.saveNewsFeedSettings();
|
|
158
|
+
},
|
|
159
|
+
state: false,
|
|
160
|
+
ariaLabelledBy: [`${this.getId()}--idShowAllCustNewsSwitchLabel`]
|
|
161
|
+
});
|
|
162
|
+
addFESRSemanticStepName(this.oShowSwitch, FESR_EVENTS.CHANGE, "showPrepRequire");
|
|
163
|
+
this.oCustNewsSwitchContainer = new HBox(this.getId() + "--idShowAllCustNewsSwitchContainer", {
|
|
164
|
+
alignItems: "Center",
|
|
165
|
+
items: [oShowSwitchLabel, this.oShowSwitch],
|
|
166
|
+
width: "94%"
|
|
167
|
+
}).addStyleClass("sapUiSmallMarginTop");
|
|
168
|
+
const oShowAllPrep = new VBox(this.getId() + "--idShowAllCustNewsSwitchVBox", {
|
|
169
|
+
items: [this.oCustNewsSwitchContainer],
|
|
170
|
+
width: "94%"
|
|
171
|
+
}).addStyleClass("sapUiSmallMarginTop");
|
|
172
|
+
const oInvisibleText = getInvisibleText(`${this.getId()}--newsTitleText`, this._i18nBundle.getText("newsTitle"));
|
|
173
|
+
//List of news items
|
|
174
|
+
this.oList = new List(this.getId() + "--idCustNewsFeedList", {
|
|
175
|
+
ariaLabelledBy: [oInvisibleText.getId(), `${this.getId()}--idCustNewsFeedSettingsText`, `${this.getId()}--idCustNewsFeedSettignsTitle`]
|
|
176
|
+
});
|
|
177
|
+
//Outer VBox
|
|
178
|
+
this.newsListVBox = new VBox(this.getId() + "--idCustNewsFeedListContainer", {
|
|
179
|
+
direction: "Column",
|
|
180
|
+
visible: false,
|
|
181
|
+
items: [this.oList, oShowAllPrep, oInvisibleText],
|
|
182
|
+
width: "96%"
|
|
183
|
+
}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBegin");
|
|
184
|
+
}
|
|
185
|
+
return this.newsListVBox;
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* Creates and returns a table for managing default news group settings.
|
|
189
|
+
* @returns {Table} Table for news groups for default manage news feed
|
|
190
|
+
* @private
|
|
191
|
+
*/
|
|
192
|
+
createNewsGroupTable: function _createNewsGroupTable() {
|
|
193
|
+
//Table for news groups
|
|
194
|
+
if (!this.groupTable) {
|
|
195
|
+
this.groupTable = new Table(this.getId() + "--idNewsGroupTbl", {
|
|
196
|
+
includeItemInSelection: true,
|
|
197
|
+
visible: false
|
|
198
|
+
}).addStyleClass("sapUiTinyMarginBegin");
|
|
199
|
+
const placeHolderCol = new Column(this.getId() + "--idNewsGroupPlaceHolder", {
|
|
200
|
+
width: "15%"
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
//title column
|
|
204
|
+
const titleCol = new Column(this.getId() + "--idNewsGroupTitle", {
|
|
205
|
+
header: new Label(this.getId() + "--idNewsGroupTitleLbl", {
|
|
206
|
+
text: this._i18nBundle.getText("defaultNewsSettingsHeading")
|
|
207
|
+
}),
|
|
208
|
+
width: "45%"
|
|
209
|
+
});
|
|
210
|
+
const articleCount = new Column(this.getId() + "--idNewsGroupCount", {
|
|
211
|
+
header: new Label(this.getId() + "--idNewsGroupCountLbl", {
|
|
212
|
+
text: this._i18nBundle.getText("articleCount")
|
|
213
|
+
}),
|
|
214
|
+
width: "40%"
|
|
215
|
+
});
|
|
216
|
+
this.groupTable.addColumn(placeHolderCol);
|
|
217
|
+
this.groupTable.addColumn(titleCol);
|
|
218
|
+
this.groupTable.addColumn(articleCount);
|
|
219
|
+
}
|
|
220
|
+
return this.groupTable;
|
|
177
221
|
},
|
|
178
222
|
/**
|
|
179
223
|
* Checks if the custom file format is CSV based on the custom file name.
|
|
@@ -199,20 +243,11 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
199
243
|
const showDefault = newsType === NewsType.Default;
|
|
200
244
|
const customFileName = _this2.oNewsPanel.getProperty("customFileName");
|
|
201
245
|
const feedKey = _this2.oNewsPanel.getCustomFeedKey();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if (showDefault) {
|
|
208
|
-
const groupId = _this2.getDefaultGroupId(newsListHBox);
|
|
209
|
-
if (!isSelected && groupId) {
|
|
210
|
-
deselectedDefaultFeeds.push(groupId);
|
|
211
|
-
}
|
|
212
|
-
} else if (isSelected) {
|
|
213
|
-
selectedFeeds.push(label.getText());
|
|
214
|
-
}
|
|
215
|
-
});
|
|
246
|
+
if (showDefault) {
|
|
247
|
+
deselectedDefaultFeeds.push(..._this2.collectDeselectedDefaultGroupIds());
|
|
248
|
+
} else {
|
|
249
|
+
selectedFeeds.push(..._this2.collectSelectedCustomFeedTitles());
|
|
250
|
+
}
|
|
216
251
|
return Promise.resolve(_this2.getPersonalization()).then(function (personalizer) {
|
|
217
252
|
return Promise.resolve(personalizer.read()).then(function (personalizationData) {
|
|
218
253
|
if (showDefault) {
|
|
@@ -229,6 +264,8 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
229
264
|
// get the latest value of switch and set the state
|
|
230
265
|
if (!showDefault) {
|
|
231
266
|
_this2.oShowSwitch.setState(personalizationData.favNewsFeed?.showAllPreparationRequired);
|
|
267
|
+
} else {
|
|
268
|
+
_this2._resetActionButton.setEnabled(!!(deselectedDefaultFeeds.length > 0));
|
|
232
269
|
}
|
|
233
270
|
return Promise.resolve(_this2.oNewsPanel.setCustomNewsFeed(showDefault ? "" : feedKey)).then(function () {});
|
|
234
271
|
});
|
|
@@ -238,8 +275,41 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
238
275
|
return Promise.reject(e);
|
|
239
276
|
}
|
|
240
277
|
},
|
|
241
|
-
/**
|
|
242
|
-
*
|
|
278
|
+
/**
|
|
279
|
+
* Collect selected custom feed titles from the list
|
|
280
|
+
* @returns {string[]} Array of selected custom feed titles
|
|
281
|
+
* @private
|
|
282
|
+
*/
|
|
283
|
+
collectSelectedCustomFeedTitles: function _collectSelectedCustomFeedTitles() {
|
|
284
|
+
const items = this.oList?.getItems() ?? [];
|
|
285
|
+
if (!items.length) return [];
|
|
286
|
+
return items.flatMap(item => {
|
|
287
|
+
const content = item.getAggregation("content");
|
|
288
|
+
const hBox = content?.[0];
|
|
289
|
+
if (!hBox) return [];
|
|
290
|
+
const [checkBox, text] = hBox.getItems();
|
|
291
|
+
return checkBox.getSelected() ? [text.getText()] : [];
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
* Collect deselected default group IDs from the table
|
|
296
|
+
* @returns {string[]} Array of deselected default group IDs from the table
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
collectDeselectedDefaultGroupIds: function _collectDeselectedDefaultGroupIds() {
|
|
300
|
+
const rows = this.groupTable?.getItems() ?? [];
|
|
301
|
+
if (!rows.length) return [];
|
|
302
|
+
return rows.flatMap(row => {
|
|
303
|
+
const cells = row.getCells();
|
|
304
|
+
const checkBox = cells[0];
|
|
305
|
+
if (checkBox.getSelected()) return [];
|
|
306
|
+
const groupId = this.getDefaultGroupId(row);
|
|
307
|
+
return groupId ? [groupId] : [];
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
/**
|
|
311
|
+
* Get groupId info for the default NewsList
|
|
312
|
+
* @param {HBox | ColumnListItem} contentBox, content Hbox or ColumnListItem
|
|
243
313
|
* @returns {string} groupId
|
|
244
314
|
* @private
|
|
245
315
|
*/
|
|
@@ -247,14 +317,13 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
247
317
|
const customData = contentBox.getCustomData();
|
|
248
318
|
return customData?.length ? customData[0].getValue() : "";
|
|
249
319
|
},
|
|
250
|
-
/**
|
|
320
|
+
/**
|
|
321
|
+
* Set items for the NewsList for custom news feed
|
|
251
322
|
* @param {Array} [aItems] news items to be set as items aggregation
|
|
252
323
|
* @private
|
|
253
324
|
*/
|
|
254
|
-
|
|
325
|
+
setCustomNewsItems: function _setCustomNewsItems(aItems) {
|
|
255
326
|
this.oList.destroyAggregation("items", true);
|
|
256
|
-
const newsType = this.oNewsPanel?.getNewsType();
|
|
257
|
-
let showDefault = newsType === NewsType.Default;
|
|
258
327
|
(aItems || []).forEach((oItem, i) => {
|
|
259
328
|
let oNewsListItemHbox = new HBox({
|
|
260
329
|
id: `${this.getId()}--idCustNewsFeedItemContent--${i}`,
|
|
@@ -270,13 +339,6 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
270
339
|
})],
|
|
271
340
|
width: "100%"
|
|
272
341
|
});
|
|
273
|
-
if (showDefault) {
|
|
274
|
-
// if showDefault is true, add group_id as custom data to the item
|
|
275
|
-
oNewsListItemHbox.addCustomData(new CustomData({
|
|
276
|
-
key: "newsGroupId",
|
|
277
|
-
value: oItem.group_id
|
|
278
|
-
}));
|
|
279
|
-
}
|
|
280
342
|
const customListItem = new CustomListItem({
|
|
281
343
|
id: `${this.getId()}--idCustNewsFeedItem--${i}`,
|
|
282
344
|
content: [oNewsListItemHbox]
|
|
@@ -304,13 +366,21 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
304
366
|
return Promise.resolve(oPersonalizer.read()).then(function (oPersData) {
|
|
305
367
|
const aPersNewsFeed = showDefaultNewsFeed ? oPersData?.["defaultNewsFeed"] : oPersData?.["favNewsFeed"];
|
|
306
368
|
const showAllPreparationRequired = aPersNewsFeed?.showAllPreparationRequired ?? !aPersNewsFeed;
|
|
307
|
-
|
|
308
|
-
|
|
369
|
+
let aNewsFeed;
|
|
370
|
+
if (showDefaultNewsFeed) {
|
|
371
|
+
_this3._resetActionButton.setVisible(true);
|
|
372
|
+
_this3._resetActionButton.setEnabled(!!(aPersNewsFeed?.items?.length > 0));
|
|
373
|
+
return Promise.resolve(_this3.oNewsPanel.getDefaultNewsData()).then(function (_this3$oNewsPanel$get) {
|
|
374
|
+
aNewsFeed = _this3$oNewsPanel$get;
|
|
309
375
|
return _this3._handleDefaultNewsFeed(aNewsFeed, aPersNewsFeed);
|
|
310
|
-
}
|
|
376
|
+
});
|
|
377
|
+
} else {
|
|
378
|
+
_this3._resetActionButton.setVisible(false);
|
|
379
|
+
return Promise.resolve(_this3.oNewsPanel.getCustomOrDefaultNewsFeed(showDefaultNewsFeed ? "" : sFeedKey, false)).then(function (_this3$oNewsPanel$get2) {
|
|
380
|
+
aNewsFeed = _this3$oNewsPanel$get2;
|
|
311
381
|
return _this3._handleCustomNewsFeed(aNewsFeed, aPersNewsFeed, showAllPreparationRequired);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
314
384
|
});
|
|
315
385
|
});
|
|
316
386
|
} catch (e) {
|
|
@@ -328,8 +398,10 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
328
398
|
* If no news feed is provided, it returns undefined.
|
|
329
399
|
*/
|
|
330
400
|
_handleDefaultNewsFeed: function _handleDefaultNewsFeed(aNewsFeed, aPersNewsFeed) {
|
|
331
|
-
this.headerText.setText(this._i18nBundle.getText("defaultNewsSettingsText"));
|
|
332
|
-
this.title.
|
|
401
|
+
this.headerText.setText(this._i18nBundle.getText("defaultNewsSettingsText") + "\n" + this._i18nBundle.getText("defaultNewsSettingsSubText"));
|
|
402
|
+
this.title.setVisible(false);
|
|
403
|
+
this.newsListVBox.setVisible(false);
|
|
404
|
+
this.oShowSwitch.setState(false);
|
|
333
405
|
const mandatoryNewsFeed = this.oNewsPanel.getMandatoryDefaultNewsFeed();
|
|
334
406
|
this.deselectedDefaultFeeds = aPersNewsFeed?.items || [];
|
|
335
407
|
if (!aNewsFeed || aNewsFeed.length === 0) {
|
|
@@ -346,10 +418,45 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
346
418
|
}
|
|
347
419
|
return oNewsFeed;
|
|
348
420
|
});
|
|
349
|
-
this.
|
|
350
|
-
this.
|
|
421
|
+
this.groupTable.setVisible(true);
|
|
422
|
+
this.setColumnListItems(aNewsFeed);
|
|
351
423
|
return aNewsFeed;
|
|
352
424
|
},
|
|
425
|
+
/**
|
|
426
|
+
* This method populates the column list items in the group table for the default news feed settings.
|
|
427
|
+
* @param aItems Array of news feed items
|
|
428
|
+
* @private
|
|
429
|
+
*/
|
|
430
|
+
setColumnListItems: function _setColumnListItems(aItems) {
|
|
431
|
+
this.groupTable.destroyItems();
|
|
432
|
+
//add column list item, title and article count
|
|
433
|
+
(aItems || []).forEach((oItem, i) => {
|
|
434
|
+
const colListItem = new ColumnListItem({
|
|
435
|
+
id: `${this.getId()}--idNewsGroupColListItem--${i}`,
|
|
436
|
+
selected: oItem.selected,
|
|
437
|
+
type: "Active",
|
|
438
|
+
cells: [new CheckBox({
|
|
439
|
+
id: `${this.getId()}--idNewsGroupCheckBox--${i}`,
|
|
440
|
+
selected: oItem.selected,
|
|
441
|
+
enabled: !oItem.disabled,
|
|
442
|
+
select: () => {
|
|
443
|
+
void this.saveNewsFeedSettings();
|
|
444
|
+
}
|
|
445
|
+
}), new Text({
|
|
446
|
+
text: oItem.title
|
|
447
|
+
}), new Text({
|
|
448
|
+
text: String(oItem._group_to_article?.length ?? 0)
|
|
449
|
+
})]
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
// if showDefault is true, add group_id as custom data to the item
|
|
453
|
+
colListItem.addCustomData(new CustomData({
|
|
454
|
+
key: "newsGroupId",
|
|
455
|
+
value: oItem.group_id
|
|
456
|
+
}));
|
|
457
|
+
this.groupTable.addItem(colListItem);
|
|
458
|
+
});
|
|
459
|
+
},
|
|
353
460
|
/**
|
|
354
461
|
* @param {INewsFeed[]} aNewsFeed
|
|
355
462
|
* @param aPersNewsFeed
|
|
@@ -362,8 +469,11 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
362
469
|
* It also sets the state of the show switch based on the `showAllPreparationRequired` parameter.
|
|
363
470
|
*/
|
|
364
471
|
_handleCustomNewsFeed: function _handleCustomNewsFeed(aNewsFeed, aPersNewsFeed, showAllPreparationRequired) {
|
|
472
|
+
this.groupTable.setVisible(false);
|
|
365
473
|
this.headerText.setText(this._i18nBundle.getText("newsFeedSettingsText"));
|
|
366
474
|
this.title.setText(this._i18nBundle.getText("newsFeedSettingsHeading"));
|
|
475
|
+
this.title.setVisible(true);
|
|
476
|
+
this.newsListVBox.setVisible(true);
|
|
367
477
|
if (!aNewsFeed || aNewsFeed.length === 0) {
|
|
368
478
|
return;
|
|
369
479
|
}
|
|
@@ -374,10 +484,38 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
374
484
|
return oNewsFeed;
|
|
375
485
|
});
|
|
376
486
|
this.aFavNewsFeed = aNewsFeed;
|
|
377
|
-
this.
|
|
487
|
+
this.setCustomNewsItems(this.aFavNewsFeed);
|
|
378
488
|
this.oShowSwitch.setState(!!showAllPreparationRequired);
|
|
379
489
|
return aNewsFeed;
|
|
380
490
|
},
|
|
491
|
+
/**
|
|
492
|
+
* Resets the default manage news' news settings to default by clearing
|
|
493
|
+
* the personalization data and updating the news panel.
|
|
494
|
+
* @private
|
|
495
|
+
* @returns {Promise<INewsFeed[] | undefined>} A promise that resolves to the updated news feed items or undefined.
|
|
496
|
+
*/
|
|
497
|
+
resetDefaultNewsSettings: function _resetDefaultNewsSettings() {
|
|
498
|
+
try {
|
|
499
|
+
const _this4 = this;
|
|
500
|
+
return Promise.resolve(_this4.getPersonalization()).then(function (personalizer) {
|
|
501
|
+
return Promise.resolve(personalizer.read()).then(function (personalizationData) {
|
|
502
|
+
personalizationData.defaultNewsFeed = {
|
|
503
|
+
items: []
|
|
504
|
+
};
|
|
505
|
+
return Promise.resolve(personalizer.write(personalizationData)).then(function () {
|
|
506
|
+
return Promise.resolve(_this4.oNewsPanel.setCustomNewsFeed("")).then(function () {
|
|
507
|
+
return Promise.resolve(_this4.oNewsPanel.getDefaultNewsData()).then(function (aNewsFeed) {
|
|
508
|
+
_this4._resetActionButton.setEnabled(false);
|
|
509
|
+
return _this4._handleDefaultNewsFeed(aNewsFeed, personalizationData.defaultNewsFeed);
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
} catch (e) {
|
|
516
|
+
return Promise.reject(e);
|
|
517
|
+
}
|
|
518
|
+
},
|
|
381
519
|
/**
|
|
382
520
|
* Checks if the News Settings Panel is supported based on the properties of the News Panel.
|
|
383
521
|
*
|
|
@@ -385,8 +523,8 @@ sap.ui.define(["sap/m/CheckBox", "sap/m/CustomListItem", "sap/m/HBox", "sap/m/La
|
|
|
385
523
|
*/
|
|
386
524
|
isSupported: function _isSupported() {
|
|
387
525
|
try {
|
|
388
|
-
const
|
|
389
|
-
const newsPanel =
|
|
526
|
+
const _this5 = this;
|
|
527
|
+
const newsPanel = _this5._getPanel();
|
|
390
528
|
if (!newsPanel || !(newsPanel?.getParent()).getProperty("newsFeedVisibility")) {
|
|
391
529
|
return Promise.resolve(false);
|
|
392
530
|
}
|