@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/ExpandableText", "sap/m/FlexBox", "sap/m/GenericTile", "sap/m/HBox", "sap/m/Label", "sap/m/library", "sap/m/MessageToast", "sap/m/
|
|
5
|
+
sap.ui.define(["sap/base/i18n/Localization", "sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/ExpandableText", "sap/m/FlexBox", "sap/m/FlexItemData", "sap/m/GenericTile", "sap/m/HBox", "sap/m/Label", "sap/m/library", "sap/m/MessageToast", "sap/m/ObjectStatus", "sap/m/SegmentedButton", "sap/m/SegmentedButtonItem", "sap/m/Switch", "sap/m/Title", "sap/m/VBox", "sap/ui/core/Fragment", "sap/ui/core/library", "sap/ui/model/ChangeReason", "sap/ui/model/json/JSONModel", "sap/ui/model/resource/ResourceModel", "sap/ui/model/Sorter", "sap/ushell/Container", "./AppsContainer", "./BaseSettingsPanel", "./FavAppPanel", "./TilesContainer", "./TilesPanel", "./utils/AppManager", "./utils/Constants", "./utils/DataFormatUtils", "./utils/FeatureUtils", "./utils/FESRUtil", "./utils/PXFeedback"], function (Localization, Log, Button, CustomListItem, ExpandableText, FlexBox, FlexItemData, GenericTile, HBox, Label, sap_m_library, MessageToast, ObjectStatus, SegmentedButton, SegmentedButtonItem, Switch, Title, VBox, Fragment, sap_ui_core_library, ChangeReason, JSONModel, ResourceModel, Sorter, Container, __AppsContainer, __BaseSettingsPanel, __FavAppPanel, __TilesContainer, ___TilesPanel, __AppManager, ___utils_Constants, ___utils_DataFormatUtils, ___utils_FeatureUtils, ___utils_FESRUtil, ___utils_PXFeedback) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -31,7 +31,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
31
31
|
}
|
|
32
32
|
return finalizer(false, result);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const FlexAlignItems = sap_m_library["FlexAlignItems"];
|
|
35
35
|
const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
36
36
|
function _settle(pact, state, value) {
|
|
37
37
|
if (!pact.s) {
|
|
@@ -126,7 +126,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
126
126
|
_cycle();
|
|
127
127
|
return pact;
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const FlexDirection = sap_m_library["FlexDirection"];
|
|
130
130
|
function _forOf(target, body, check) {
|
|
131
131
|
if (typeof target[_iteratorSymbol] === "function") {
|
|
132
132
|
var iterator = target[_iteratorSymbol](),
|
|
@@ -187,26 +187,36 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
187
187
|
return body(values[i]);
|
|
188
188
|
}, check);
|
|
189
189
|
}
|
|
190
|
+
const FlexJustifyContent = sap_m_library["FlexJustifyContent"];
|
|
191
|
+
const FlexRendertype = sap_m_library["FlexRendertype"];
|
|
192
|
+
const URLHelper = sap_m_library["URLHelper"];
|
|
193
|
+
const TitleLevel = sap_ui_core_library["TitleLevel"];
|
|
194
|
+
const ValueState = sap_ui_core_library["ValueState"];
|
|
190
195
|
const AppsContainer = _interopRequireDefault(__AppsContainer);
|
|
191
196
|
const BaseSettingsPanel = _interopRequireDefault(__BaseSettingsPanel);
|
|
192
197
|
const FavAppPanel = _interopRequireDefault(__FavAppPanel);
|
|
193
|
-
const
|
|
198
|
+
const TilesContainer = _interopRequireDefault(__TilesContainer);
|
|
199
|
+
const DisplayFormat = ___TilesPanel["DisplayFormat"];
|
|
194
200
|
const AppManager = _interopRequireDefault(__AppManager);
|
|
201
|
+
const _isSmartBusinessTile = __AppManager["_isSmartBusinessTile"];
|
|
195
202
|
const AI_APP_FINDER_API = ___utils_Constants["AI_APP_FINDER_API"];
|
|
196
203
|
const AI_APP_FINDER_BASE_URL = ___utils_Constants["AI_APP_FINDER_BASE_URL"];
|
|
197
204
|
const CONTENT_ADDITION_PANEL_TYPES = ___utils_Constants["CONTENT_ADDITION_PANEL_TYPES"];
|
|
198
205
|
const DEFAULT_APP_ICON = ___utils_Constants["DEFAULT_APP_ICON"];
|
|
199
206
|
const FEATURE_TOGGLES = ___utils_Constants["FEATURE_TOGGLES"];
|
|
200
207
|
const FESR_IDS = ___utils_Constants["FESR_IDS"];
|
|
208
|
+
const MYHOME_PAGE_ID = ___utils_Constants["MYHOME_PAGE_ID"];
|
|
201
209
|
const MYINSIGHT_SECTION_ID = ___utils_Constants["MYINSIGHT_SECTION_ID"];
|
|
202
210
|
const recycleId = ___utils_DataFormatUtils["recycleId"];
|
|
203
211
|
const isNavigationSupportedForFeature = ___utils_FeatureUtils["isNavigationSupportedForFeature"];
|
|
204
212
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
205
213
|
const FESR_EVENTS = ___utils_FESRUtil["FESR_EVENTS"];
|
|
214
|
+
const triggerPXIntegration = ___utils_PXFeedback["triggerPXIntegration"];
|
|
206
215
|
const Constants = {
|
|
207
216
|
DeprecatedInfoText: "deprecated",
|
|
208
217
|
MinQueryLength: 2,
|
|
209
|
-
|
|
218
|
+
MaxQueryLength: 2000,
|
|
219
|
+
MaxDescriptionLength: 300
|
|
210
220
|
};
|
|
211
221
|
var SearchStatus = /*#__PURE__*/function (SearchStatus) {
|
|
212
222
|
SearchStatus["Idle"] = "idle";
|
|
@@ -221,6 +231,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
221
231
|
}(ErrorType || {});
|
|
222
232
|
var TileType = /*#__PURE__*/function (TileType) {
|
|
223
233
|
TileType["Static"] = "STATIC";
|
|
234
|
+
TileType["Dynamic"] = "DYNAMIC";
|
|
224
235
|
return TileType;
|
|
225
236
|
}(TileType || {});
|
|
226
237
|
/**
|
|
@@ -319,7 +330,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
319
330
|
_this.vizInstantiationService = _Container$getService;
|
|
320
331
|
//load ui fragment
|
|
321
332
|
return Promise.resolve(Fragment.load({
|
|
322
|
-
id: `${_this.getId()}-content
|
|
333
|
+
id: recycleId(`${_this.getId()}-content`),
|
|
323
334
|
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
324
335
|
controller: _this
|
|
325
336
|
})).then(function (_Fragment$load) {
|
|
@@ -367,13 +378,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
367
378
|
path: "/suggestedApps",
|
|
368
379
|
factory: _this._generateListItem.bind(_this),
|
|
369
380
|
sorter: new Sorter({
|
|
370
|
-
path: "
|
|
381
|
+
path: "",
|
|
371
382
|
comparator: (firstApp, secondApp) => {
|
|
372
|
-
const getPriority =
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const hasDeprecated = statusArray.includes(_this._i18nBundle.getText("deprecatedApp"));
|
|
383
|
+
const getPriority = app => {
|
|
384
|
+
const hasAlreadyAdded = app.isStaticApp ? app.addedToApps : app.addedToInsights;
|
|
385
|
+
const hasDeprecated = app.isDeprecated;
|
|
386
|
+
if (!hasAlreadyAdded && !hasDeprecated) return 0; // Neither status - highest priority
|
|
377
387
|
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
378
388
|
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
379
389
|
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
@@ -408,18 +418,28 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
408
418
|
* @returns {CustomListItem} The generated list item control.
|
|
409
419
|
*/
|
|
410
420
|
_generateListItem: function _generateListItem(id, context) {
|
|
421
|
+
const langTag = Localization.getLanguageTag();
|
|
422
|
+
const currentLanguage = langTag.language.toLowerCase();
|
|
423
|
+
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
411
424
|
const listItem = new CustomListItem(id, {
|
|
412
|
-
selected
|
|
425
|
+
//when toggled b/w app and tile view, the selection should update according to whether the app is already added to selected section
|
|
426
|
+
selected: {
|
|
427
|
+
path: "selectedView",
|
|
428
|
+
formatter: () => {
|
|
429
|
+
const isAppAlreadyAdded = this.isAppAlreadyAdded(context);
|
|
430
|
+
//bind associated checkbox to disable it when the app is already added
|
|
431
|
+
listItem.getMultiSelectControl(true).setEnabled(!isAppAlreadyAdded);
|
|
432
|
+
// if app is already added or if user has selected the app, mark it as selected
|
|
433
|
+
return isAppAlreadyAdded || this.userSelectedApps.has(listItem);
|
|
434
|
+
}
|
|
435
|
+
},
|
|
413
436
|
content: [new FlexBox(recycleId(`${id}-result-container`), {
|
|
414
|
-
renderType:
|
|
415
|
-
direction:
|
|
416
|
-
|
|
417
|
-
items: [this.
|
|
437
|
+
renderType: FlexRendertype.Bare,
|
|
438
|
+
direction: FlexDirection.Row,
|
|
439
|
+
gap: "1rem",
|
|
440
|
+
items: [this._getAppDetailsContainer(id, context, isEnglishLanguage), this._getAppPreviewContainer(id, context)]
|
|
418
441
|
}).addStyleClass("sapUiSmallMargin")]
|
|
419
442
|
});
|
|
420
|
-
|
|
421
|
-
//bind associated checkbox to disable it when the app is already added to home page
|
|
422
|
-
listItem.getMultiSelectControl(true).setEnabled(!context.getProperty("addedToHomePage"));
|
|
423
443
|
return listItem;
|
|
424
444
|
},
|
|
425
445
|
/**
|
|
@@ -432,33 +452,60 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
432
452
|
*/
|
|
433
453
|
_getAppPreviewContainer: function _getAppPreviewContainer(id, context) {
|
|
434
454
|
const container = new HBox(recycleId(`${id}-suggestedAppContainer`), {
|
|
435
|
-
renderType:
|
|
455
|
+
renderType: FlexRendertype.Bare,
|
|
456
|
+
width: "19rem",
|
|
457
|
+
layoutData: new FlexItemData({
|
|
458
|
+
growFactor: 0,
|
|
459
|
+
shrinkFactor: 0,
|
|
460
|
+
alignSelf: FlexAlignItems.Center
|
|
461
|
+
}),
|
|
462
|
+
justifyContent: FlexJustifyContent.Center
|
|
436
463
|
});
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}).addStyleClass("suggestedTile"));
|
|
453
|
-
} else {
|
|
454
|
-
// create custom visualization for other apps
|
|
464
|
+
container.addItem(new GenericTile(recycleId(`${id}-staticApp`), {
|
|
465
|
+
mode: "IconMode",
|
|
466
|
+
frameType: "TwoByHalf",
|
|
467
|
+
width: "19rem",
|
|
468
|
+
header: context.getProperty("title"),
|
|
469
|
+
subheader: context.getProperty("subTitle"),
|
|
470
|
+
tileIcon: context.getProperty("icon") || DEFAULT_APP_ICON,
|
|
471
|
+
visible: "{= ${selectedView} === 'STATIC' || ${isStaticApp} }",
|
|
472
|
+
url: context.getProperty("url"),
|
|
473
|
+
press: event => {
|
|
474
|
+
this._persistDialog(this.getParent());
|
|
475
|
+
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
476
|
+
}
|
|
477
|
+
}).addStyleClass("suggestedTile"));
|
|
478
|
+
if (!context.getProperty("isStaticApp")) {
|
|
455
479
|
const vizData = context.getProperty("vizData");
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
480
|
+
const supportedDisplayFormatVizs = [{
|
|
481
|
+
...vizData,
|
|
482
|
+
displayFormatHint: DisplayFormat.Standard
|
|
483
|
+
}];
|
|
484
|
+
if (this.isWideTileSupported(context)) {
|
|
485
|
+
supportedDisplayFormatVizs.push({
|
|
486
|
+
...vizData,
|
|
487
|
+
displayFormatHint: DisplayFormat.StandardWide
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
supportedDisplayFormatVizs.forEach(vizData => {
|
|
491
|
+
// instantiate visualization for dynamic app
|
|
492
|
+
const vizInstance = this.vizInstantiationService.instantiateVisualization(vizData);
|
|
493
|
+
vizInstance?.setActive(true);
|
|
494
|
+
vizInstance?.setProperty("sizeBehavior", "Small", true);
|
|
495
|
+
vizInstance?.attachPress(() => this._persistDialog(this.getParent()));
|
|
496
|
+
vizInstance.bindProperty("visible", {
|
|
497
|
+
parts: ["selectedDisplayFormat", "selectedView"],
|
|
498
|
+
formatter: (selectedDisplayFormat, selectedView) => {
|
|
499
|
+
if (selectedView && selectedView === TileType.Static) {
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
502
|
+
return vizData.displayFormatHint === DisplayFormat.StandardWide ? selectedDisplayFormat === DisplayFormat.StandardWide : selectedDisplayFormat !== DisplayFormat.StandardWide;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
container.addItem(vizInstance);
|
|
506
|
+
});
|
|
460
507
|
}
|
|
461
|
-
return container;
|
|
508
|
+
return container.addStyleClass("suggestedAppPreviewContainer");
|
|
462
509
|
},
|
|
463
510
|
/**
|
|
464
511
|
* Creates a details container for the suggested app.
|
|
@@ -466,27 +513,58 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
466
513
|
* @private
|
|
467
514
|
* @param {string} id - The unique ID for the container.
|
|
468
515
|
* @param {Context} context - The binding context for the app.
|
|
516
|
+
* @param {boolean} isEnglishLanguage - Flag indicating if the language is english.
|
|
469
517
|
* @returns {VBox} The app details container.
|
|
470
518
|
*/
|
|
471
|
-
_getAppDetailsContainer: function _getAppDetailsContainer(id, context) {
|
|
519
|
+
_getAppDetailsContainer: function _getAppDetailsContainer(id, context, isEnglishLanguage) {
|
|
520
|
+
let description = isEnglishLanguage ? context.getProperty("description") : this._i18nBundle.getText("NoDescriptionAvailable");
|
|
472
521
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
473
|
-
renderType:
|
|
522
|
+
renderType: FlexRendertype.Bare,
|
|
474
523
|
gap: "0.5rem",
|
|
475
|
-
|
|
476
|
-
|
|
524
|
+
layoutData: new FlexItemData({
|
|
525
|
+
growFactor: 1
|
|
526
|
+
}),
|
|
527
|
+
items: [new HBox(recycleId(`${id}-title-container`), {
|
|
528
|
+
gap: "1rem",
|
|
529
|
+
alignItems: FlexAlignItems.Center,
|
|
530
|
+
renderType: FlexRendertype.Bare,
|
|
531
|
+
items: [new Title(recycleId(`${id}-app-title`), {
|
|
532
|
+
text: context.getProperty("title"),
|
|
533
|
+
titleStyle: TitleLevel.H6
|
|
534
|
+
}), new ObjectStatus(recycleId(`${id}-deprecatedApp`), {
|
|
535
|
+
text: this._i18nBundle.getText("deprecatedApp"),
|
|
536
|
+
icon: "sap-icon://alert",
|
|
537
|
+
state: ValueState.Warning,
|
|
538
|
+
visible: context.getProperty("isDeprecated")
|
|
539
|
+
})]
|
|
540
|
+
}), new ExpandableText(recycleId(`${id}-description`), {
|
|
541
|
+
text: description,
|
|
477
542
|
maxCharacters: Constants.MaxDescriptionLength
|
|
543
|
+
}),
|
|
544
|
+
// app actions container
|
|
545
|
+
new HBox(recycleId(`${id}-app-actions-container`), {
|
|
546
|
+
renderType: FlexRendertype.Bare,
|
|
547
|
+
gap: "1.5rem",
|
|
548
|
+
visible: !context.getProperty("isStaticApp"),
|
|
549
|
+
items: [this.getAppViewTypeAction(id), this.getDisplayFormatAction(id, context)]
|
|
478
550
|
}), new HBox(recycleId(`${id}-app-status-container`), {
|
|
479
|
-
renderType:
|
|
480
|
-
visible:
|
|
551
|
+
renderType: FlexRendertype.Bare,
|
|
552
|
+
visible: {
|
|
553
|
+
parts: ["selectedView"],
|
|
554
|
+
formatter: () => {
|
|
555
|
+
return this.isAppAlreadyAdded(context);
|
|
556
|
+
}
|
|
557
|
+
},
|
|
481
558
|
items: [new Label(recycleId(`${id}-appStatusLabel`), {
|
|
482
559
|
text: this._i18nBundle.getText("appStatus"),
|
|
483
560
|
showColon: true
|
|
484
|
-
}), new
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
561
|
+
}), new ObjectStatus(recycleId(`${id}-alreadyAddedStatus`), {
|
|
562
|
+
text: "{= (${isStaticApp} || ${selectedView} === 'STATIC') ? ${i18n>alreadyAddedApp} : ${i18n>alreadyAddedTile} }",
|
|
563
|
+
icon: "sap-icon://sys-enter-2",
|
|
564
|
+
state: "Success"
|
|
565
|
+
}).addStyleClass("sapUiTinyMarginBegin")]
|
|
566
|
+
}).addStyleClass("sapUiTinyMarginTop")]
|
|
567
|
+
});
|
|
490
568
|
},
|
|
491
569
|
/**
|
|
492
570
|
* Checks if the Apps Addition Panel is supported. Internally, it checks if the
|
|
@@ -565,14 +643,15 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
565
643
|
return [`<svg height="167" fill="none">
|
|
566
644
|
${loadingShimmer}
|
|
567
645
|
<rect x="16" y="75" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
568
|
-
<rect x="48" y="
|
|
569
|
-
<rect x="48" y="
|
|
646
|
+
<rect x="48" y="54" width="59%" height="48" rx="4" fill="url(#loadingShimmer)"/>
|
|
647
|
+
<rect x="48" y="110" width="13%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
648
|
+
<rect x="600" y="40" width="303" height="70" rx="16" fill="url(#loadingShimmer)"/>
|
|
570
649
|
</svg>`, `<svg height="180" fill="none">
|
|
571
650
|
${loadingShimmer}
|
|
572
651
|
<rect x="16" y="82" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
573
|
-
<rect x="48" y="
|
|
574
|
-
<rect x="
|
|
575
|
-
<rect x="
|
|
652
|
+
<rect x="48" y="54" width="58%" height="48" rx="4" fill="url(#loadingShimmer)"/>
|
|
653
|
+
<rect x="48" y="110" width="13%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
654
|
+
<rect x="675" y="16" width="148" height="148" rx="16" fill="url(#loadingShimmer)"/>
|
|
576
655
|
</svg>`];
|
|
577
656
|
},
|
|
578
657
|
/**
|
|
@@ -600,6 +679,20 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
600
679
|
});
|
|
601
680
|
this.userSelectedApps?.clear();
|
|
602
681
|
},
|
|
682
|
+
setIllustrationSize: function _setIllustrationSize() {
|
|
683
|
+
const containerDom = Fragment.byId(`${this.getId()}-content`, "container")?.getDomRef();
|
|
684
|
+
if (containerDom) {
|
|
685
|
+
const clientHeight = containerDom.clientHeight;
|
|
686
|
+
const illustratedMessage = Fragment.byId(`${this.getId()}-content`, "beforeSearch");
|
|
687
|
+
if (clientHeight <= 500) {
|
|
688
|
+
illustratedMessage.setIllustrationSize("ExtraSmall");
|
|
689
|
+
} else if (500 < clientHeight && clientHeight < 650) {
|
|
690
|
+
illustratedMessage.setIllustrationSize("Small");
|
|
691
|
+
} else {
|
|
692
|
+
illustratedMessage.setIllustrationSize("Medium");
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
603
696
|
/**
|
|
604
697
|
* Handles the "Go" button press event for searching suggested apps.
|
|
605
698
|
*
|
|
@@ -623,7 +716,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
623
716
|
return Promise.resolve(_this3.appManagerInstance.fetchFavVizs(true, true)).then(function (favoriteApps) {
|
|
624
717
|
return Promise.resolve(_this3.appManagerInstance.fetchInsightApps(true, _this3._i18nBundle.getText("insights"))).then(function (insightsApps) {
|
|
625
718
|
// generate suggested apps
|
|
626
|
-
const apps = _this3._generateApps(rawApps, allVisualizations,
|
|
719
|
+
const apps = _this3._generateApps(rawApps, allVisualizations, favoriteApps, insightsApps);
|
|
627
720
|
return Promise.resolve(_this3._filterUnsupportedApps(apps)).then(function (suggestedApps) {
|
|
628
721
|
if (suggestedApps.length === 0 && !_this3.model.getProperty("/hasError")) {
|
|
629
722
|
_this3._handleError("", suggestedApps.length);
|
|
@@ -644,8 +737,9 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
644
737
|
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
645
738
|
}); // suggest apps if there are results and search is not cancelled
|
|
646
739
|
}, function (err) {
|
|
647
|
-
|
|
648
|
-
|
|
740
|
+
const message = err.message || "";
|
|
741
|
+
Log.error(message);
|
|
742
|
+
_this3._handleError(message);
|
|
649
743
|
});
|
|
650
744
|
}, function (_wasThrown, _result) {
|
|
651
745
|
// update search status only if search is not cancelled
|
|
@@ -686,13 +780,16 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
686
780
|
* @private
|
|
687
781
|
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
688
782
|
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
689
|
-
* @param {ICustomVisualization[]}
|
|
783
|
+
* @param {ICustomVisualization[]} favoriteApps - Favorite apps available in homepage.
|
|
784
|
+
* @param {ICustomVisualization[]} insightsApps - Insights apps available in homepage.
|
|
690
785
|
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
691
786
|
*/
|
|
692
|
-
_generateApps: function _generateApps(rawApps, allVisualizations,
|
|
787
|
+
_generateApps: function _generateApps(rawApps, allVisualizations, favoriteApps, insightsApps) {
|
|
693
788
|
return rawApps.map(app => {
|
|
694
789
|
const vizData = allVisualizations.find(viz => viz.vizId === app.chipID);
|
|
695
|
-
const
|
|
790
|
+
const addedToApps = favoriteApps.some(viz => viz.visualization?.vizId === app.chipID);
|
|
791
|
+
const addedToInsights = insightsApps.some(viz => viz.visualization?.vizId === app.chipID);
|
|
792
|
+
const tileConfig = this.parseTileConfiguration(app.configuration);
|
|
696
793
|
return {
|
|
697
794
|
title: app.title,
|
|
698
795
|
chipID: app.chipID,
|
|
@@ -700,10 +797,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
700
797
|
description: app.appDescription,
|
|
701
798
|
icon: app.iconUrl,
|
|
702
799
|
vizData,
|
|
703
|
-
|
|
800
|
+
addedToApps,
|
|
801
|
+
addedToInsights,
|
|
704
802
|
isStaticApp: app.tileType === TileType.Static,
|
|
705
|
-
|
|
706
|
-
|
|
803
|
+
url: vizData?.targetURL || "",
|
|
804
|
+
isDeprecated: (tileConfig?.display_info_text || "").toLowerCase() === Constants.DeprecatedInfoText,
|
|
805
|
+
selectedView: app.tileType === TileType.Static ? TileType.Static : TileType.Dynamic
|
|
707
806
|
};
|
|
708
807
|
});
|
|
709
808
|
},
|
|
@@ -716,7 +815,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
716
815
|
*/
|
|
717
816
|
isValidQuery: function _isValidQuery(query = "") {
|
|
718
817
|
query = query?.trim();
|
|
719
|
-
return query.length >= Constants.MinQueryLength && query.length <= Constants.
|
|
818
|
+
return query.length >= Constants.MinQueryLength && query.length <= Constants.MaxQueryLength;
|
|
720
819
|
},
|
|
721
820
|
/**
|
|
722
821
|
* Fetches all available visualizations for the user.
|
|
@@ -786,110 +885,43 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
786
885
|
fetchAppsFromSearch: function _fetchAppsFromSearch(query) {
|
|
787
886
|
try {
|
|
788
887
|
const _this5 = this;
|
|
789
|
-
return Promise.resolve(
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
function
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
888
|
+
return Promise.resolve(_this5._fetchCSRFToken()).then(function (token) {
|
|
889
|
+
const headers = {
|
|
890
|
+
"Content-Type": "application/json",
|
|
891
|
+
...(token && {
|
|
892
|
+
"X-CSRF-Token": token
|
|
893
|
+
})
|
|
894
|
+
};
|
|
895
|
+
return Promise.resolve(fetch(AI_APP_FINDER_API, {
|
|
896
|
+
method: "POST",
|
|
897
|
+
headers,
|
|
898
|
+
body: JSON.stringify({
|
|
899
|
+
UserInput: query
|
|
900
|
+
})
|
|
901
|
+
})).then(function (response) {
|
|
902
|
+
let _exit = false;
|
|
903
|
+
function _temp9(_result2) {
|
|
904
|
+
return _exit ? _result2 : Promise.resolve(response.json()).then(function (_response$json2) {
|
|
905
|
+
const queryResult = _response$json2;
|
|
906
|
+
return queryResult.value || [];
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
const _temp8 = function () {
|
|
910
|
+
if (!response.ok) {
|
|
911
|
+
return Promise.resolve(response.json()).then(function (_response$json) {
|
|
912
|
+
const errorResponse = _response$json;
|
|
913
|
+
throw new Error(errorResponse.error?.message || "");
|
|
809
914
|
});
|
|
810
915
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
const errorResponse = _response$json;
|
|
815
|
-
_this5._handleError(errorResponse.error?.message || "");
|
|
816
|
-
const _temp8 = [];
|
|
817
|
-
_exit = true;
|
|
818
|
-
return _temp8;
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
}();
|
|
822
|
-
// handle error responses
|
|
823
|
-
return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
|
|
824
|
-
});
|
|
916
|
+
}();
|
|
917
|
+
// handle error responses
|
|
918
|
+
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
825
919
|
});
|
|
826
|
-
}
|
|
827
|
-
Log.error(error.message);
|
|
828
|
-
_this5._handleError();
|
|
829
|
-
return [];
|
|
830
|
-
}));
|
|
920
|
+
});
|
|
831
921
|
} catch (e) {
|
|
832
922
|
return Promise.reject(e);
|
|
833
923
|
}
|
|
834
924
|
},
|
|
835
|
-
/**
|
|
836
|
-
* Retrieves status texts for an app based on its configuration and homepage status.
|
|
837
|
-
*
|
|
838
|
-
* @private
|
|
839
|
-
* @param {string} configuration - The app's configuration string.
|
|
840
|
-
* @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.
|
|
841
|
-
* @returns {string[]} An array of status texts for the app.
|
|
842
|
-
*/
|
|
843
|
-
getAppStatusTexts: function _getAppStatusTexts(configuration, addedToHomePage) {
|
|
844
|
-
let statusTexts = [];
|
|
845
|
-
if (configuration) {
|
|
846
|
-
try {
|
|
847
|
-
const parsedConfig = JSON.parse(configuration);
|
|
848
|
-
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration);
|
|
849
|
-
const infoText = (tileConfig?.display_info_text || "").toLowerCase();
|
|
850
|
-
if (infoText === Constants.DeprecatedInfoText) {
|
|
851
|
-
statusTexts.push(this._i18nBundle.getText("deprecatedApp"));
|
|
852
|
-
}
|
|
853
|
-
} catch (error) {
|
|
854
|
-
Log.warning(error.message);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
if (addedToHomePage) {
|
|
858
|
-
statusTexts.push(this._i18nBundle.getText("alreadyAddedApp"));
|
|
859
|
-
}
|
|
860
|
-
return statusTexts;
|
|
861
|
-
},
|
|
862
|
-
/**
|
|
863
|
-
* Generates status text controls for the provided status texts.
|
|
864
|
-
*
|
|
865
|
-
* @private
|
|
866
|
-
* @param {string} id - The id of the list item.
|
|
867
|
-
* @param {string[]} stausTexts - The list of status texts.
|
|
868
|
-
* @returns {Text[]} An array of Text controls with applied styles.
|
|
869
|
-
*/
|
|
870
|
-
_generateStatusTexts: function _generateStatusTexts(id, stausTexts) {
|
|
871
|
-
return stausTexts.map((status, index) => {
|
|
872
|
-
return new Text(recycleId(`${id}-statusText-${index}`), {
|
|
873
|
-
text: status
|
|
874
|
-
}).addStyleClass(this.applyStatusClass(status));
|
|
875
|
-
});
|
|
876
|
-
},
|
|
877
|
-
/**
|
|
878
|
-
* Applies a CSS class to the status text based on its type.
|
|
879
|
-
*
|
|
880
|
-
* @private
|
|
881
|
-
* @param {string} status - The status text to classify.
|
|
882
|
-
* @returns {string} The CSS class for the status text.
|
|
883
|
-
*/
|
|
884
|
-
applyStatusClass: function _applyStatusClass(status) {
|
|
885
|
-
if (status === this._i18nBundle.getText("alreadyAddedApp")) {
|
|
886
|
-
return "addedAppStatusText";
|
|
887
|
-
} else if (status === this._i18nBundle.getText("deprecatedApp")) {
|
|
888
|
-
return "deprecatedAppStatusText";
|
|
889
|
-
} else {
|
|
890
|
-
return "";
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
925
|
/**
|
|
894
926
|
* Handles the "Add Apps" button press event to add selected apps to favorites.
|
|
895
927
|
*
|
|
@@ -927,14 +959,26 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
927
959
|
}();
|
|
928
960
|
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
929
961
|
}
|
|
962
|
+
triggerPXIntegration("addAppsButton");
|
|
930
963
|
const userSelectedApps = _this6.model.getProperty("/userSelectedApps");
|
|
931
964
|
let staticAppsPresent = false;
|
|
932
965
|
let dynamicAppsPresent = false;
|
|
933
966
|
const _temp13 = _forOf(userSelectedApps, function (app) {
|
|
934
|
-
const isStaticApp = app.getBindingContext()?.getProperty("isStaticApp");
|
|
967
|
+
const isStaticApp = app.getBindingContext()?.getProperty("isStaticApp") || app.getBindingContext()?.getProperty("selectedView") === TileType.Static;
|
|
968
|
+
const displayFormatHint = app.getBindingContext()?.getProperty("vizData")?.displayFormatHint;
|
|
969
|
+
const selectedDisplayFormat = app.getBindingContext()?.getProperty("selectedDisplayFormat");
|
|
935
970
|
if (isStaticApp) staticAppsPresent = true;else dynamicAppsPresent = true;
|
|
936
971
|
const vizId = app.getBindingContext()?.getProperty("chipID");
|
|
937
|
-
return Promise.resolve(_this6.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID)).then(function () {
|
|
972
|
+
return Promise.resolve(_this6.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID)).then(function () {
|
|
973
|
+
const _temp0 = function () {
|
|
974
|
+
if (!isStaticApp && selectedDisplayFormat && displayFormatHint !== selectedDisplayFormat) {
|
|
975
|
+
// TODO: Check if addVisualization method in SpaceContent service can expose 'displayFormat' parameter to avoid this extra call
|
|
976
|
+
// since the internal Pages service method already supports it
|
|
977
|
+
return Promise.resolve(_this6.updateDisplayFormat(vizId, selectedDisplayFormat)).then(function () {});
|
|
978
|
+
}
|
|
979
|
+
}();
|
|
980
|
+
if (_temp0 && _temp0.then) return _temp0.then(function () {});
|
|
981
|
+
}); // for dynamic app, if display format is changed, update it
|
|
938
982
|
});
|
|
939
983
|
return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13));
|
|
940
984
|
} catch (e) {
|
|
@@ -983,16 +1027,16 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
983
1027
|
}
|
|
984
1028
|
},
|
|
985
1029
|
/**
|
|
986
|
-
* Retrieves the
|
|
1030
|
+
* Retrieves the TilesContainer instance from the parent layout.
|
|
987
1031
|
*
|
|
988
1032
|
* @private
|
|
989
|
-
* @returns {
|
|
1033
|
+
* @returns {TilesContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
990
1034
|
*/
|
|
991
|
-
|
|
992
|
-
return this.getLayout()?.getItems().find(container => container instanceof
|
|
1035
|
+
getTilesContainer: function _getTilesContainer() {
|
|
1036
|
+
return this.getLayout()?.getItems().find(container => container instanceof TilesContainer);
|
|
993
1037
|
},
|
|
994
1038
|
/**
|
|
995
|
-
* Refreshes the Insights tiles panel in the
|
|
1039
|
+
* Refreshes the Insights tiles panel in the TilesContainer.
|
|
996
1040
|
*
|
|
997
1041
|
* @private
|
|
998
1042
|
* @async
|
|
@@ -1000,7 +1044,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1000
1044
|
refreshInsightsApps: function _refreshInsightsApps() {
|
|
1001
1045
|
try {
|
|
1002
1046
|
const _this8 = this;
|
|
1003
|
-
return Promise.resolve(_this8.
|
|
1047
|
+
return Promise.resolve(_this8.getTilesContainer()?.refreshData("tiles")).then(function () {});
|
|
1004
1048
|
} catch (e) {
|
|
1005
1049
|
return Promise.reject(e);
|
|
1006
1050
|
}
|
|
@@ -1016,8 +1060,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1016
1060
|
const selected = event.getParameter("selected");
|
|
1017
1061
|
if (!selected) this.userSelectedApps.delete(listItem);else {
|
|
1018
1062
|
const context = listItem.getBindingContext();
|
|
1019
|
-
|
|
1020
|
-
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
1063
|
+
if (context && !this.isAppAlreadyAdded(context)) this.userSelectedApps.add(listItem);
|
|
1021
1064
|
}
|
|
1022
1065
|
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
1023
1066
|
},
|
|
@@ -1062,7 +1105,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1062
1105
|
if (query.length !== 0 && query.length < Constants.MinQueryLength) {
|
|
1063
1106
|
textArea.setValueState(ValueState.Information);
|
|
1064
1107
|
textArea.setValueStateText(this._i18nBundle.getText("minLengthRequired"));
|
|
1065
|
-
} else if (query.length > Constants.
|
|
1108
|
+
} else if (query.length > Constants.MaxQueryLength) {
|
|
1066
1109
|
textArea.setValueState(ValueState.Warning);
|
|
1067
1110
|
textArea.setValueStateText(this._i18nBundle.getText("maxLengthExceeded"));
|
|
1068
1111
|
} else {
|
|
@@ -1100,9 +1143,165 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1100
1143
|
sendFeedback: function _sendFeedback(feedbackType) {
|
|
1101
1144
|
this.resetFeedback();
|
|
1102
1145
|
this.model.setProperty(`/feedback/${feedbackType}`, true);
|
|
1146
|
+
triggerPXIntegration(feedbackType);
|
|
1103
1147
|
MessageToast.show(this._i18nBundle.getText("feedBackSent"), {
|
|
1104
1148
|
width: "20em"
|
|
1105
1149
|
});
|
|
1150
|
+
},
|
|
1151
|
+
/**
|
|
1152
|
+
* Creates the action to change view type (App / Tile) for suggested app.
|
|
1153
|
+
*
|
|
1154
|
+
* @private
|
|
1155
|
+
* @param {string} id - The unique ID for the container.
|
|
1156
|
+
* @returns {HBox} The app view action container.
|
|
1157
|
+
*/
|
|
1158
|
+
getAppViewTypeAction: function _getAppViewTypeAction(id) {
|
|
1159
|
+
const appViewToggleButton = new SegmentedButton(recycleId(`${id}-app-addAs-segmentedBtn`), {
|
|
1160
|
+
selectedKey: "{selectedView}",
|
|
1161
|
+
items: [new SegmentedButtonItem(recycleId(`${id}-addAs-app`), {
|
|
1162
|
+
key: TileType.Static,
|
|
1163
|
+
text: this._i18nBundle.getText("addAsApp")
|
|
1164
|
+
}), new SegmentedButtonItem(recycleId(`${id}-addAs-tile`), {
|
|
1165
|
+
key: TileType.Dynamic,
|
|
1166
|
+
text: this._i18nBundle.getText("addAsTile")
|
|
1167
|
+
})]
|
|
1168
|
+
}).addStyleClass("sapUiTinyMarginBegin");
|
|
1169
|
+
const appViewLabel = new Label(recycleId(`${id}-addAsLabel`), {
|
|
1170
|
+
text: this._i18nBundle.getText("addAs"),
|
|
1171
|
+
showColon: true
|
|
1172
|
+
});
|
|
1173
|
+
try {
|
|
1174
|
+
appViewToggleButton.setProperty("contentMode", "ContentFit");
|
|
1175
|
+
appViewLabel.setWidth("100%");
|
|
1176
|
+
} catch (error) {
|
|
1177
|
+
Log.error(error instanceof Error ? error.message : error);
|
|
1178
|
+
}
|
|
1179
|
+
return new HBox(recycleId(`${id}-app-addAs-container`), {
|
|
1180
|
+
renderType: FlexRendertype.Bare,
|
|
1181
|
+
alignItems: FlexAlignItems.Center,
|
|
1182
|
+
items: [appViewLabel, appViewToggleButton]
|
|
1183
|
+
});
|
|
1184
|
+
},
|
|
1185
|
+
/**
|
|
1186
|
+
* Creates the action to change display format (standard / wide) for suggested tile.
|
|
1187
|
+
*
|
|
1188
|
+
* @private
|
|
1189
|
+
* @param {string} id - The unique ID for the container.
|
|
1190
|
+
* @param {Context} context - The binding context for the app.
|
|
1191
|
+
* @returns {HBox} The display format action container.
|
|
1192
|
+
*/
|
|
1193
|
+
getDisplayFormatAction: function _getDisplayFormatAction(id, context) {
|
|
1194
|
+
return new HBox(recycleId(`${id}-app-displayFormatSwitch-container`), {
|
|
1195
|
+
renderType: FlexRendertype.Bare,
|
|
1196
|
+
alignItems: FlexAlignItems.Center,
|
|
1197
|
+
visible: {
|
|
1198
|
+
parts: ["selectedView"],
|
|
1199
|
+
formatter: selectedView => {
|
|
1200
|
+
return selectedView !== TileType.Static && this.isWideTileSupported(context);
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
items: [new Label(recycleId(`${id}-displayFormatSwitchLabel`), {
|
|
1204
|
+
text: this._i18nBundle.getText("wide"),
|
|
1205
|
+
showColon: true
|
|
1206
|
+
}), new Switch({
|
|
1207
|
+
id: `${id}-displayFormatSwitch`,
|
|
1208
|
+
state: context.getProperty("vizData")?.displayFormatHint !== DisplayFormat.Standard,
|
|
1209
|
+
customTextOn: " ",
|
|
1210
|
+
customTextOff: " ",
|
|
1211
|
+
change: event => this.toggleDisplayFormat(event, context)
|
|
1212
|
+
}).addStyleClass("sapUiTinyMarginBegin")]
|
|
1213
|
+
});
|
|
1214
|
+
},
|
|
1215
|
+
/**
|
|
1216
|
+
* Checks if the visualization supports wide tile conversion.
|
|
1217
|
+
*
|
|
1218
|
+
* @private
|
|
1219
|
+
* @param {Context} context - The binding context for the app.
|
|
1220
|
+
* @returns {boolean} True if wide display format is supported, false otherwise.
|
|
1221
|
+
*/
|
|
1222
|
+
isWideTileSupported: function _isWideTileSupported(context) {
|
|
1223
|
+
const vizData = context.getProperty("vizData");
|
|
1224
|
+
const supportedDisplayFormats = vizData?.supportedDisplayFormats || [];
|
|
1225
|
+
return vizData && (vizData.indicatorDataSource || _isSmartBusinessTile(vizData)) && supportedDisplayFormats.includes(DisplayFormat.Standard) && supportedDisplayFormats.includes(DisplayFormat.StandardWide);
|
|
1226
|
+
},
|
|
1227
|
+
/**
|
|
1228
|
+
* Handler to switch between standard and wide format for tile.
|
|
1229
|
+
*
|
|
1230
|
+
* @private
|
|
1231
|
+
* @param {Switch$ChangeEvent} event - The switch change event.
|
|
1232
|
+
* @param {Context} context - The binding context for the app being modified.
|
|
1233
|
+
* @returns {void}
|
|
1234
|
+
*/
|
|
1235
|
+
toggleDisplayFormat: function _toggleDisplayFormat(event, context) {
|
|
1236
|
+
const switchToWideTile = event.getParameter("state");
|
|
1237
|
+
const displayFormatHint = switchToWideTile ? DisplayFormat.StandardWide : DisplayFormat.Standard;
|
|
1238
|
+
const path = context.getPath();
|
|
1239
|
+
this.model.setProperty(`${path}/selectedDisplayFormat`, displayFormatHint);
|
|
1240
|
+
},
|
|
1241
|
+
/**
|
|
1242
|
+
* Updates the display format of a visualization in the insights section.
|
|
1243
|
+
*
|
|
1244
|
+
* @private
|
|
1245
|
+
* @param {string} vizId - Id of the visualization for which display format has to be updated.
|
|
1246
|
+
* @param {DisplayFormat} displayFormatHint - The new display format to apply.
|
|
1247
|
+
* @returns {Promise<void>} A promise that resolves when the display format is updated.
|
|
1248
|
+
*/
|
|
1249
|
+
updateDisplayFormat: function _updateDisplayFormat(vizId, displayFormatHint) {
|
|
1250
|
+
try {
|
|
1251
|
+
const _this9 = this;
|
|
1252
|
+
return Promise.resolve(_this9.appManagerInstance.fetchInsightApps(true, _this9._i18nBundle.getText("insights"))).then(function (insightsApps) {
|
|
1253
|
+
const viz = insightsApps.find(insightApp => insightApp.visualization?.vizId === vizId);
|
|
1254
|
+
const _temp15 = function () {
|
|
1255
|
+
if (viz) {
|
|
1256
|
+
const updateConfig = {
|
|
1257
|
+
pageId: MYHOME_PAGE_ID,
|
|
1258
|
+
sourceSectionIndex: viz.persConfig?.sectionIndex,
|
|
1259
|
+
sourceVisualizationIndex: viz.persConfig?.visualizationIndex,
|
|
1260
|
+
oVisualizationData: {
|
|
1261
|
+
displayFormatHint
|
|
1262
|
+
}
|
|
1263
|
+
};
|
|
1264
|
+
return Promise.resolve(_this9.appManagerInstance.updateVisualizations(updateConfig)).then(function () {});
|
|
1265
|
+
}
|
|
1266
|
+
}();
|
|
1267
|
+
if (_temp15 && _temp15.then) return _temp15.then(function () {});
|
|
1268
|
+
});
|
|
1269
|
+
} catch (e) {
|
|
1270
|
+
return Promise.reject(e);
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
/**
|
|
1274
|
+
* Determines if an app is already added to the appropriate section based on its type and selected view.
|
|
1275
|
+
* For static apps or apps with Static view selected, checks if added to favorites apps section.
|
|
1276
|
+
* For dynamic apps with Dynamic view selected, checks if added to insights section.
|
|
1277
|
+
*
|
|
1278
|
+
* @private
|
|
1279
|
+
* @param {Context} context - The binding context for the app to check.
|
|
1280
|
+
* @returns {boolean} True if the app is already added to the corresponding section, false otherwise.
|
|
1281
|
+
*/
|
|
1282
|
+
isAppAlreadyAdded: function _isAppAlreadyAdded(context) {
|
|
1283
|
+
const isStaticApp = context.getProperty("isStaticApp");
|
|
1284
|
+
const selectedAppView = context.getProperty("selectedView");
|
|
1285
|
+
return isStaticApp || selectedAppView === TileType.Static ? context.getProperty("addedToApps") : context.getProperty("addedToInsights");
|
|
1286
|
+
},
|
|
1287
|
+
/**
|
|
1288
|
+
* Parses the tile configuration string from raw app configuration.
|
|
1289
|
+
*
|
|
1290
|
+
* @private
|
|
1291
|
+
* @param {string} configuration - The raw app configuration string containing tile settings.
|
|
1292
|
+
* @returns {TileConfig | null} The parsed tile configuration object or null if parsing fails.
|
|
1293
|
+
*/
|
|
1294
|
+
parseTileConfiguration: function _parseTileConfiguration(configuration) {
|
|
1295
|
+
if (configuration) {
|
|
1296
|
+
try {
|
|
1297
|
+
const parsedConfig = JSON.parse(configuration);
|
|
1298
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration);
|
|
1299
|
+
return tileConfig;
|
|
1300
|
+
} catch (error) {
|
|
1301
|
+
Log.warning(error.message);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
return null;
|
|
1106
1305
|
}
|
|
1107
1306
|
});
|
|
1108
1307
|
return AppsAdditionPanel;
|