@sapui5/sap.cux.home 1.141.0 → 1.142.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +4 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +3 -2
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +6 -6
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -6
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +6 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +7 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +48 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +362 -265
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +374 -254
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +33 -18
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +32 -15
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +8 -2
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +10 -3
- package/src/sap/cux/home/BaseContainer.d.ts +9 -1
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +36 -6
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +33 -6
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +7 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/BasePanel.d.ts +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +20 -0
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +16 -0
- package/src/sap/cux/home/CardsContainer.d.ts +108 -0
- package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/CardsContainer.js +207 -0
- package/src/sap/cux/home/CardsContainer.js.map +1 -0
- package/src/sap/cux/home/CardsContainer.ts +202 -0
- package/src/sap/cux/home/CardsPanel.d.ts +47 -59
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +405 -326
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +223 -201
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +17 -7
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +18 -6
- package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
- package/src/sap/cux/home/ErrorPanel.js +11 -16
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +7 -19
- package/src/sap/cux/home/FavAppPanel.d.ts +1 -12
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +354 -414
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +21 -66
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +11 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +22 -8
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +22 -7
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts +8 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js +15 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.ts +11 -0
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +287 -57
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/Layout.d.ts +3 -1
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +49 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +59 -8
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +379 -63
- package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -18
- package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
- package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
- package/src/sap/cux/home/NewsContainer.js.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +31 -120
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +100 -69
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +61 -36
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +216 -81
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- package/src/sap/cux/home/PagePanel.d.ts +1 -1
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +19 -11
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +26 -20
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- package/src/sap/cux/home/PagesContainer.d.ts +72 -0
- package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
- package/src/sap/cux/home/PagesContainer.js +333 -0
- package/src/sap/cux/home/PagesContainer.js.map +1 -0
- package/src/sap/cux/home/PagesContainer.ts +179 -0
- package/src/sap/cux/home/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +11 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +11 -0
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js +67 -133
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +70 -152
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +19 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +17 -2
- package/src/sap/cux/home/TilesContainer.d.ts +111 -0
- package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/TilesContainer.js +218 -0
- package/src/sap/cux/home/TilesContainer.js.map +1 -0
- package/src/sap/cux/home/TilesContainer.ts +216 -0
- package/src/sap/cux/home/TilesPanel.d.ts +22 -52
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +194 -168
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +167 -157
- package/src/sap/cux/home/ToDoPanel.d.ts +1 -0
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +64 -68
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +48 -36
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +4 -4
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.ts +3 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +5 -5
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +30 -3
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +23 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +29 -19
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.js +78 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.ts +81 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +32 -12
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +19 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +23 -7
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +20 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +18 -2
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +6 -1
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts +27 -4
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.js.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.ts +23 -4
- package/src/sap/cux/home/interface/LayoutInterface.d.ts +7 -0
- package/src/sap/cux/home/interface/LayoutInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.js.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.ts +7 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +7 -4
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +10 -5
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +22 -0
- package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +4 -45
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +10 -18
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1 -1
- package/src/sap/cux/home/themes/base/SettingsDialog.less +4 -0
- package/src/sap/cux/home/themes/base/TilesContainer.less +65 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +4 -0
- package/src/sap/cux/home/themes/base/library.source.less +2 -1
- package/src/sap/cux/home/utils/BatchHelper.d.ts +1 -0
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +7 -2
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +8 -1
- package/src/sap/cux/home/utils/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +150 -151
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
- package/ui5.yaml +1 -0
- package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
- package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
- package/src/sap/cux/home/InsightsContainer.js +0 -459
- package/src/sap/cux/home/InsightsContainer.js.map +0 -1
- package/src/sap/cux/home/InsightsContainer.ts +0 -489
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/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/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", "./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, Title, VBox, Fragment, sap_ui_core_library, ChangeReason, JSONModel, ResourceModel, Sorter, Container, __AppsContainer, __BaseSettingsPanel, __FavAppPanel, __TilesContainer, __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,10 +187,15 @@ 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);
|
|
194
199
|
const AppManager = _interopRequireDefault(__AppManager);
|
|
195
200
|
const AI_APP_FINDER_API = ___utils_Constants["AI_APP_FINDER_API"];
|
|
196
201
|
const AI_APP_FINDER_BASE_URL = ___utils_Constants["AI_APP_FINDER_BASE_URL"];
|
|
@@ -203,10 +208,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
203
208
|
const isNavigationSupportedForFeature = ___utils_FeatureUtils["isNavigationSupportedForFeature"];
|
|
204
209
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
205
210
|
const FESR_EVENTS = ___utils_FESRUtil["FESR_EVENTS"];
|
|
211
|
+
const triggerPXIntegration = ___utils_PXFeedback["triggerPXIntegration"];
|
|
206
212
|
const Constants = {
|
|
207
213
|
DeprecatedInfoText: "deprecated",
|
|
208
214
|
MinQueryLength: 2,
|
|
209
|
-
|
|
215
|
+
MaxQueryLength: 2000,
|
|
216
|
+
MaxDescriptionLength: 300
|
|
210
217
|
};
|
|
211
218
|
var SearchStatus = /*#__PURE__*/function (SearchStatus) {
|
|
212
219
|
SearchStatus["Idle"] = "idle";
|
|
@@ -221,6 +228,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
221
228
|
}(ErrorType || {});
|
|
222
229
|
var TileType = /*#__PURE__*/function (TileType) {
|
|
223
230
|
TileType["Static"] = "STATIC";
|
|
231
|
+
TileType["Dynamic"] = "DYNAMIC";
|
|
224
232
|
return TileType;
|
|
225
233
|
}(TileType || {});
|
|
226
234
|
/**
|
|
@@ -317,84 +325,87 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
317
325
|
const _this = this;
|
|
318
326
|
return Promise.resolve(Container.getServiceAsync("VisualizationInstantiation")).then(function (_Container$getService) {
|
|
319
327
|
_this.vizInstantiationService = _Container$getService;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
const _temp = _catch(function () {
|
|
329
|
+
return Promise.resolve(Fragment.load({
|
|
330
|
+
id: recycleId(`${_this.getId()}-content`),
|
|
331
|
+
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
332
|
+
controller: _this
|
|
333
|
+
})).then(function (_Fragment$load) {
|
|
334
|
+
const panelContent = _Fragment$load;
|
|
335
|
+
_this.addAggregation("content", panelContent);
|
|
328
336
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
337
|
+
//initialize ui model
|
|
338
|
+
//bind suggested apps list
|
|
339
|
+
//focus on the first item when the list is updated
|
|
340
|
+
//bind search field
|
|
341
|
+
_this.model = new JSONModel({
|
|
342
|
+
query: "",
|
|
343
|
+
hasError: false,
|
|
344
|
+
errorType: ErrorType.NoResultsFound,
|
|
345
|
+
errorDescription: "",
|
|
346
|
+
searchStatus: SearchStatus.Idle,
|
|
347
|
+
loadingAnimations: _this._generateSearchingAnimations(),
|
|
348
|
+
suggestedAppsCount: 0,
|
|
349
|
+
userSelectedApps: [],
|
|
350
|
+
suggestedApps: [],
|
|
351
|
+
aiPolicyText: _this._generateAIPolicyText(),
|
|
352
|
+
invalidQuery: true,
|
|
353
|
+
feedback: {
|
|
354
|
+
thumbsUp: false,
|
|
355
|
+
thumbsDown: false
|
|
356
|
+
},
|
|
357
|
+
sampleQueries: [{
|
|
358
|
+
index: 1,
|
|
359
|
+
query: _this._i18nBundle.getText("sampleQuery_1")
|
|
360
|
+
}, {
|
|
361
|
+
index: 2,
|
|
362
|
+
query: _this._i18nBundle.getText("sampleQuery_2")
|
|
363
|
+
}, {
|
|
364
|
+
index: 3,
|
|
365
|
+
query: _this._i18nBundle.getText("sampleQuery_3")
|
|
366
|
+
}]
|
|
367
|
+
});
|
|
368
|
+
panelContent.setModel(_this.model);
|
|
369
|
+
panelContent.setModel(new ResourceModel({
|
|
370
|
+
bundleName: "sap.cux.home.i18n.messagebundle"
|
|
371
|
+
}), "i18n");
|
|
372
|
+
_this.addAppsButton.setModel(_this.model);
|
|
373
|
+
_this.appSuggestionList = Fragment.byId(`${_this.getId()}-content`, "appsList");
|
|
374
|
+
_this.appSuggestionList.bindAggregation("items", {
|
|
375
|
+
path: "/suggestedApps",
|
|
376
|
+
factory: _this._generateListItem.bind(_this),
|
|
377
|
+
sorter: new Sorter({
|
|
378
|
+
path: "",
|
|
379
|
+
comparator: (firstApp, secondApp) => {
|
|
380
|
+
const getPriority = app => {
|
|
381
|
+
const hasAlreadyAdded = app.isStaticApp ? app.addedToApps : app.addedToInsights;
|
|
382
|
+
const hasDeprecated = app.isDeprecated;
|
|
383
|
+
if (!hasAlreadyAdded && !hasDeprecated) return 0; // Neither status - highest priority
|
|
384
|
+
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
385
|
+
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
386
|
+
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
380
387
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
388
|
+
return 4; // Any other combination (fallback)
|
|
389
|
+
};
|
|
390
|
+
const firstPriority = getPriority(firstApp);
|
|
391
|
+
const secondPriority = getPriority(secondApp);
|
|
392
|
+
return firstPriority - secondPriority;
|
|
393
|
+
}
|
|
394
|
+
})
|
|
395
|
+
});
|
|
396
|
+
_this.appSuggestionList.attachUpdateFinished(() => {
|
|
397
|
+
if (_this.model.getProperty("/suggestedAppsCount") > 0 && _this.model.getProperty("/searchStatus") === SearchStatus.Complete) {
|
|
398
|
+
_this.appSuggestionList.getItems()?.[0]?.focus();
|
|
386
399
|
}
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
if (_this.model.getProperty("/suggestedAppsCount") > 0 && _this.model.getProperty("/searchStatus") === SearchStatus.Complete) {
|
|
391
|
-
_this.appSuggestionList.getItems()?.[0]?.focus();
|
|
392
|
-
}
|
|
400
|
+
});
|
|
401
|
+
const searchTextArea = Fragment.byId(`${_this.getId()}-content`, "searchTextArea");
|
|
402
|
+
searchTextArea.onsapenter = _this.onPressGo.bind(_this);
|
|
393
403
|
});
|
|
394
|
-
|
|
395
|
-
|
|
404
|
+
}, function (error) {
|
|
405
|
+
Log.error("Failed to load panel content for AppsAdditionPanel:", error);
|
|
396
406
|
});
|
|
397
|
-
|
|
407
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
408
|
+
}); //load ui fragment
|
|
398
409
|
} catch (e) {
|
|
399
410
|
return Promise.reject(e);
|
|
400
411
|
}
|
|
@@ -408,22 +419,47 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
408
419
|
* @returns {CustomListItem} The generated list item control.
|
|
409
420
|
*/
|
|
410
421
|
_generateListItem: function _generateListItem(id, context) {
|
|
422
|
+
const langTag = Localization.getLanguageTag();
|
|
423
|
+
const currentLanguage = langTag.language.toLowerCase();
|
|
424
|
+
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
411
425
|
const listItem = new CustomListItem(id, {
|
|
412
|
-
selected
|
|
426
|
+
//when toggled b/w app and tile view, the selection should update according to whether the app is already added to selected section
|
|
427
|
+
selected: {
|
|
428
|
+
path: "selectedView",
|
|
429
|
+
formatter: () => {
|
|
430
|
+
const isAppAlreadyAdded = this.isAppAlreadyAdded(context);
|
|
431
|
+
//bind associated checkbox to disable it when the app is already added
|
|
432
|
+
listItem.getMultiSelectControl(true).setEnabled(!isAppAlreadyAdded);
|
|
433
|
+
// if app is already added or if user has selected the app, mark it as selected
|
|
434
|
+
return isAppAlreadyAdded || this.userSelectedApps.has(listItem);
|
|
435
|
+
}
|
|
436
|
+
},
|
|
413
437
|
content: [new FlexBox(recycleId(`${id}-result-container`), {
|
|
414
|
-
renderType:
|
|
415
|
-
direction:
|
|
416
|
-
|
|
417
|
-
items: [this.
|
|
418
|
-
}).addStyleClass("sapUiSmallMargin")]
|
|
438
|
+
renderType: FlexRendertype.Bare,
|
|
439
|
+
direction: FlexDirection.Row,
|
|
440
|
+
gap: "1.5rem",
|
|
441
|
+
items: [this._getAppDetailsContainer(id, context, isEnglishLanguage), this._getAppPreviewContainer(id, context)]
|
|
442
|
+
}).addStyleClass("sapUiSmallMargin sapUiTinyMarginBegin")]
|
|
419
443
|
});
|
|
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
444
|
return listItem;
|
|
424
445
|
},
|
|
425
446
|
/**
|
|
426
|
-
*
|
|
447
|
+
* Cleans up resources when exiting the panel.
|
|
448
|
+
*
|
|
449
|
+
* @public
|
|
450
|
+
* @override
|
|
451
|
+
*/
|
|
452
|
+
exit: function _exit() {
|
|
453
|
+
// Destroy fragments if they exist
|
|
454
|
+
const dialogId = `${this.getId()}-content`;
|
|
455
|
+
["number", "query", "searchingAnimation"].forEach(elementId => {
|
|
456
|
+
const element = Fragment.byId(dialogId, elementId);
|
|
457
|
+
element?.destroy();
|
|
458
|
+
});
|
|
459
|
+
BaseSettingsPanel.prototype.exit.call(this);
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Creates a preview container for the suggested app.
|
|
427
463
|
*
|
|
428
464
|
* @private
|
|
429
465
|
* @param {string} id - The unique ID for the container.
|
|
@@ -432,33 +468,41 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
432
468
|
*/
|
|
433
469
|
_getAppPreviewContainer: function _getAppPreviewContainer(id, context) {
|
|
434
470
|
const container = new HBox(recycleId(`${id}-suggestedAppContainer`), {
|
|
435
|
-
renderType:
|
|
471
|
+
renderType: FlexRendertype.Bare,
|
|
472
|
+
width: "19rem",
|
|
473
|
+
layoutData: new FlexItemData({
|
|
474
|
+
growFactor: 0,
|
|
475
|
+
shrinkFactor: 0,
|
|
476
|
+
alignSelf: FlexAlignItems.Center
|
|
477
|
+
}),
|
|
478
|
+
justifyContent: FlexJustifyContent.Center
|
|
436
479
|
});
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
480
|
+
container.addItem(new GenericTile(recycleId(`${id}-staticApp`), {
|
|
481
|
+
mode: "IconMode",
|
|
482
|
+
frameType: "TwoByHalf",
|
|
483
|
+
width: "19rem",
|
|
484
|
+
header: context.getProperty("title"),
|
|
485
|
+
subheader: context.getProperty("subTitle"),
|
|
486
|
+
tileIcon: context.getProperty("icon") || DEFAULT_APP_ICON,
|
|
487
|
+
visible: "{= ${selectedView} === 'STATIC'}",
|
|
488
|
+
url: context.getProperty("url"),
|
|
489
|
+
press: event => {
|
|
490
|
+
this._persistDialog(this.getParent());
|
|
491
|
+
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
492
|
+
}
|
|
493
|
+
}).addStyleClass("suggestedTile"));
|
|
494
|
+
const vizData = context.getProperty("vizData");
|
|
495
|
+
// instantiate visualization for dynamic app
|
|
496
|
+
const vizInstance = this.vizInstantiationService.instantiateVisualization(vizData);
|
|
497
|
+
vizInstance?.setActive(true);
|
|
498
|
+
vizInstance?.setProperty("sizeBehavior", "Small", true);
|
|
499
|
+
vizInstance?.attachPress(() => this._persistDialog(this.getParent()));
|
|
500
|
+
vizInstance.bindProperty("visible", {
|
|
501
|
+
parts: ["selectedView"],
|
|
502
|
+
formatter: selectedView => selectedView !== TileType.Static
|
|
503
|
+
});
|
|
504
|
+
container.addItem(vizInstance);
|
|
505
|
+
return container.addStyleClass("suggestedAppPreviewContainer");
|
|
462
506
|
},
|
|
463
507
|
/**
|
|
464
508
|
* Creates a details container for the suggested app.
|
|
@@ -466,27 +510,55 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
466
510
|
* @private
|
|
467
511
|
* @param {string} id - The unique ID for the container.
|
|
468
512
|
* @param {Context} context - The binding context for the app.
|
|
513
|
+
* @param {boolean} isEnglishLanguage - Flag indicating if the language is english.
|
|
469
514
|
* @returns {VBox} The app details container.
|
|
470
515
|
*/
|
|
471
|
-
_getAppDetailsContainer: function _getAppDetailsContainer(id, context) {
|
|
516
|
+
_getAppDetailsContainer: function _getAppDetailsContainer(id, context, isEnglishLanguage) {
|
|
517
|
+
let description = isEnglishLanguage ? context.getProperty("description") : this._i18nBundle.getText("NoDescriptionAvailable");
|
|
472
518
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
473
|
-
renderType:
|
|
474
|
-
gap: "
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
519
|
+
renderType: FlexRendertype.Bare,
|
|
520
|
+
gap: "1rem",
|
|
521
|
+
layoutData: new FlexItemData({
|
|
522
|
+
growFactor: 1
|
|
523
|
+
}),
|
|
524
|
+
items: [new HBox(recycleId(`${id}-title-container`), {
|
|
525
|
+
gap: "0.5rem",
|
|
526
|
+
alignItems: FlexAlignItems.Center,
|
|
527
|
+
renderType: FlexRendertype.Bare,
|
|
528
|
+
items: [new Title(recycleId(`${id}-app-title`), {
|
|
529
|
+
text: context.getProperty("title"),
|
|
530
|
+
titleStyle: TitleLevel.H6
|
|
531
|
+
}), new ObjectStatus(recycleId(`${id}-deprecatedApp`), {
|
|
532
|
+
text: this._i18nBundle.getText("deprecatedApp"),
|
|
533
|
+
icon: "sap-icon://alert",
|
|
534
|
+
state: ValueState.Warning,
|
|
535
|
+
visible: context.getProperty("isDeprecated")
|
|
536
|
+
})]
|
|
537
|
+
}), new ExpandableText(recycleId(`${id}-description`), {
|
|
538
|
+
text: description,
|
|
539
|
+
maxCharacters: Constants.MaxDescriptionLength,
|
|
540
|
+
layoutData: new FlexItemData({
|
|
541
|
+
growFactor: 1
|
|
542
|
+
})
|
|
543
|
+
}),
|
|
544
|
+
// app actions container
|
|
545
|
+
new HBox(recycleId(`${id}-app-actions-container`), {
|
|
546
|
+
renderType: FlexRendertype.Bare,
|
|
547
|
+
gap: "1.5rem",
|
|
548
|
+
alignItems: FlexAlignItems.Center,
|
|
549
|
+
items: [this.getAppViewTypeAction(id), new ObjectStatus(recycleId(`${id}-alreadyAddedStatus`), {
|
|
550
|
+
text: "{i18n>alreadyAddedApp}",
|
|
551
|
+
icon: "sap-icon://sys-enter-2",
|
|
552
|
+
state: "Success",
|
|
553
|
+
visible: {
|
|
554
|
+
parts: ["selectedView"],
|
|
555
|
+
formatter: () => {
|
|
556
|
+
return this.isAppAlreadyAdded(context);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
})]
|
|
488
560
|
})]
|
|
489
|
-
})
|
|
561
|
+
});
|
|
490
562
|
},
|
|
491
563
|
/**
|
|
492
564
|
* Checks if the Apps Addition Panel is supported. Internally, it checks if the
|
|
@@ -501,7 +573,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
501
573
|
isSupported: function _isSupported() {
|
|
502
574
|
try {
|
|
503
575
|
const _this2 = this;
|
|
504
|
-
function
|
|
576
|
+
function _temp4() {
|
|
505
577
|
//remove panel if it's not supported
|
|
506
578
|
if (!_this2.isPanelSupported) {
|
|
507
579
|
_this2.removeActionButton(_this2.addAppsButton);
|
|
@@ -517,20 +589,20 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
517
589
|
action: "propose"
|
|
518
590
|
}
|
|
519
591
|
};
|
|
520
|
-
const
|
|
592
|
+
const _temp3 = function () {
|
|
521
593
|
if (_this2.isPanelSupported === undefined) {
|
|
522
594
|
_this2.isPanelSupported = false;
|
|
523
|
-
const
|
|
595
|
+
const _temp2 = function () {
|
|
524
596
|
if (_this2.getFavAppPanel()) {
|
|
525
597
|
return Promise.resolve(isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_SMART_APPFINDER, appsIntent)).then(function (_isNavigationSupporte) {
|
|
526
598
|
_this2.isPanelSupported = _isNavigationSupporte;
|
|
527
599
|
});
|
|
528
600
|
}
|
|
529
601
|
}();
|
|
530
|
-
if (
|
|
602
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
531
603
|
}
|
|
532
604
|
}();
|
|
533
|
-
return Promise.resolve(
|
|
605
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3));
|
|
534
606
|
} catch (e) {
|
|
535
607
|
return Promise.reject(e);
|
|
536
608
|
}
|
|
@@ -565,14 +637,18 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
565
637
|
return [`<svg height="167" fill="none">
|
|
566
638
|
${loadingShimmer}
|
|
567
639
|
<rect x="16" y="75" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
568
|
-
<rect x="48" y="16" width="
|
|
569
|
-
<rect x="48" y="
|
|
640
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
641
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
642
|
+
<rect x="48" y="130" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
643
|
+
<rect x="600" y="50" width="303" height="70" rx="16" fill="url(#loadingShimmer)"/>
|
|
570
644
|
</svg>`, `<svg height="180" fill="none">
|
|
571
645
|
${loadingShimmer}
|
|
572
646
|
<rect x="16" y="82" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
573
|
-
<rect x="48" y="16" width="
|
|
574
|
-
<rect x="
|
|
575
|
-
<rect x="
|
|
647
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
648
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
649
|
+
<rect x="48" y="140" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
650
|
+
<rect x="210" y="140" width="10%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
651
|
+
<rect x="675" y="16" width="148" height="148" rx="16" fill="url(#loadingShimmer)"/>
|
|
576
652
|
</svg>`];
|
|
577
653
|
},
|
|
578
654
|
/**
|
|
@@ -600,6 +676,20 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
600
676
|
});
|
|
601
677
|
this.userSelectedApps?.clear();
|
|
602
678
|
},
|
|
679
|
+
setIllustrationSize: function _setIllustrationSize() {
|
|
680
|
+
const containerDom = Fragment.byId(`${this.getId()}-content`, "container")?.getDomRef();
|
|
681
|
+
if (containerDom) {
|
|
682
|
+
const clientHeight = containerDom.clientHeight;
|
|
683
|
+
const illustratedMessage = Fragment.byId(`${this.getId()}-content`, "beforeSearch");
|
|
684
|
+
if (clientHeight <= 500) {
|
|
685
|
+
illustratedMessage.setIllustrationSize("ExtraSmall");
|
|
686
|
+
} else if (500 < clientHeight && clientHeight < 650) {
|
|
687
|
+
illustratedMessage.setIllustrationSize("Small");
|
|
688
|
+
} else {
|
|
689
|
+
illustratedMessage.setIllustrationSize("Medium");
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
},
|
|
603
693
|
/**
|
|
604
694
|
* Handles the "Go" button press event for searching suggested apps.
|
|
605
695
|
*
|
|
@@ -612,18 +702,18 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
612
702
|
// validate query
|
|
613
703
|
const query = _this3.model.getProperty("/query");
|
|
614
704
|
if (!_this3.isValidQuery(query)) return Promise.resolve();
|
|
615
|
-
const
|
|
705
|
+
const _temp6 = _finallyRethrows(function () {
|
|
616
706
|
return _catch(function () {
|
|
617
707
|
// initiate search
|
|
618
708
|
_this3.resetSearch();
|
|
619
709
|
return Promise.resolve(_this3.fetchAppsFromSearch(query)).then(function (rawApps) {
|
|
620
|
-
const
|
|
710
|
+
const _temp5 = function () {
|
|
621
711
|
if (_this3.model.getProperty("/searchStatus") === SearchStatus.Searching) {
|
|
622
712
|
return Promise.resolve(_this3.fetchAllAvailableVisualizations()).then(function (allVisualizations) {
|
|
623
713
|
return Promise.resolve(_this3.appManagerInstance.fetchFavVizs(true, true)).then(function (favoriteApps) {
|
|
624
714
|
return Promise.resolve(_this3.appManagerInstance.fetchInsightApps(true, _this3._i18nBundle.getText("insights"))).then(function (insightsApps) {
|
|
625
715
|
// generate suggested apps
|
|
626
|
-
const apps = _this3._generateApps(rawApps, allVisualizations,
|
|
716
|
+
const apps = _this3._generateApps(rawApps, allVisualizations, favoriteApps, insightsApps);
|
|
627
717
|
return Promise.resolve(_this3._filterUnsupportedApps(apps)).then(function (suggestedApps) {
|
|
628
718
|
if (suggestedApps.length === 0 && !_this3.model.getProperty("/hasError")) {
|
|
629
719
|
_this3._handleError("", suggestedApps.length);
|
|
@@ -641,11 +731,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
641
731
|
});
|
|
642
732
|
}
|
|
643
733
|
}();
|
|
644
|
-
if (
|
|
734
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
645
735
|
}); // suggest apps if there are results and search is not cancelled
|
|
646
736
|
}, function (err) {
|
|
647
|
-
|
|
648
|
-
|
|
737
|
+
const message = err.message || "";
|
|
738
|
+
Log.error(message);
|
|
739
|
+
_this3._handleError(message);
|
|
649
740
|
});
|
|
650
741
|
}, function (_wasThrown, _result) {
|
|
651
742
|
// update search status only if search is not cancelled
|
|
@@ -655,7 +746,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
655
746
|
if (_wasThrown) throw _result;
|
|
656
747
|
return _result;
|
|
657
748
|
});
|
|
658
|
-
return Promise.resolve(
|
|
749
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
659
750
|
} catch (e) {
|
|
660
751
|
return Promise.reject(e);
|
|
661
752
|
}
|
|
@@ -686,13 +777,16 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
686
777
|
* @private
|
|
687
778
|
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
688
779
|
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
689
|
-
* @param {ICustomVisualization[]}
|
|
780
|
+
* @param {ICustomVisualization[]} favoriteApps - Favorite apps available in homepage.
|
|
781
|
+
* @param {ICustomVisualization[]} insightsApps - Insights apps available in homepage.
|
|
690
782
|
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
691
783
|
*/
|
|
692
|
-
_generateApps: function _generateApps(rawApps, allVisualizations,
|
|
784
|
+
_generateApps: function _generateApps(rawApps, allVisualizations, favoriteApps, insightsApps) {
|
|
693
785
|
return rawApps.map(app => {
|
|
694
786
|
const vizData = allVisualizations.find(viz => viz.vizId === app.chipID);
|
|
695
|
-
const
|
|
787
|
+
const addedToApps = favoriteApps.some(viz => viz.visualization?.vizId === app.chipID);
|
|
788
|
+
const addedToInsights = insightsApps.some(viz => viz.visualization?.vizId === app.chipID);
|
|
789
|
+
const tileConfig = this.parseTileConfiguration(app.configuration);
|
|
696
790
|
return {
|
|
697
791
|
title: app.title,
|
|
698
792
|
chipID: app.chipID,
|
|
@@ -700,10 +794,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
700
794
|
description: app.appDescription,
|
|
701
795
|
icon: app.iconUrl,
|
|
702
796
|
vizData,
|
|
703
|
-
|
|
797
|
+
addedToApps,
|
|
798
|
+
addedToInsights,
|
|
704
799
|
isStaticApp: app.tileType === TileType.Static,
|
|
705
|
-
|
|
706
|
-
|
|
800
|
+
url: vizData?.targetURL || "",
|
|
801
|
+
isDeprecated: (tileConfig?.display_info_text || "").toLowerCase() === Constants.DeprecatedInfoText,
|
|
802
|
+
selectedView: app.tileType === TileType.Static ? TileType.Static : TileType.Dynamic
|
|
707
803
|
};
|
|
708
804
|
});
|
|
709
805
|
},
|
|
@@ -716,7 +812,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
716
812
|
*/
|
|
717
813
|
isValidQuery: function _isValidQuery(query = "") {
|
|
718
814
|
query = query?.trim();
|
|
719
|
-
return query.length >= Constants.MinQueryLength && query.length <= Constants.
|
|
815
|
+
return query.length >= Constants.MinQueryLength && query.length <= Constants.MaxQueryLength;
|
|
720
816
|
},
|
|
721
817
|
/**
|
|
722
818
|
* Fetches all available visualizations for the user.
|
|
@@ -728,10 +824,10 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
728
824
|
fetchAllAvailableVisualizations: function _fetchAllAvailableVisualizations() {
|
|
729
825
|
try {
|
|
730
826
|
const _this4 = this;
|
|
731
|
-
function
|
|
827
|
+
function _temp8() {
|
|
732
828
|
return _this4.allAvailableVisualizations;
|
|
733
829
|
}
|
|
734
|
-
const
|
|
830
|
+
const _temp7 = function () {
|
|
735
831
|
if (!_this4.allAvailableVisualizations) {
|
|
736
832
|
return Promise.resolve(Container.getServiceAsync("SearchableContent")).then(function (searchableContentService) {
|
|
737
833
|
return Promise.resolve(searchableContentService.getApps({
|
|
@@ -744,7 +840,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
744
840
|
});
|
|
745
841
|
}
|
|
746
842
|
}();
|
|
747
|
-
return Promise.resolve(
|
|
843
|
+
return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
|
|
748
844
|
} catch (e) {
|
|
749
845
|
return Promise.reject(e);
|
|
750
846
|
}
|
|
@@ -786,110 +882,43 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
786
882
|
fetchAppsFromSearch: function _fetchAppsFromSearch(query) {
|
|
787
883
|
try {
|
|
788
884
|
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
|
-
|
|
885
|
+
return Promise.resolve(_this5._fetchCSRFToken()).then(function (token) {
|
|
886
|
+
const headers = {
|
|
887
|
+
"Content-Type": "application/json",
|
|
888
|
+
...(token && {
|
|
889
|
+
"X-CSRF-Token": token
|
|
890
|
+
})
|
|
891
|
+
};
|
|
892
|
+
return Promise.resolve(fetch(AI_APP_FINDER_API, {
|
|
893
|
+
method: "POST",
|
|
894
|
+
headers,
|
|
895
|
+
body: JSON.stringify({
|
|
896
|
+
UserInput: query
|
|
897
|
+
})
|
|
898
|
+
})).then(function (response) {
|
|
899
|
+
let _exit2 = false;
|
|
900
|
+
function _temp0(_result2) {
|
|
901
|
+
return _exit2 ? _result2 : Promise.resolve(response.json()).then(function (_response$json2) {
|
|
902
|
+
const queryResult = _response$json2;
|
|
903
|
+
return queryResult.value || [];
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
const _temp9 = function () {
|
|
907
|
+
if (!response.ok) {
|
|
908
|
+
return Promise.resolve(response.json()).then(function (_response$json) {
|
|
909
|
+
const errorResponse = _response$json;
|
|
910
|
+
throw new Error(errorResponse.error?.message || "");
|
|
809
911
|
});
|
|
810
912
|
}
|
|
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
|
-
});
|
|
913
|
+
}();
|
|
914
|
+
// handle error responses
|
|
915
|
+
return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
|
|
825
916
|
});
|
|
826
|
-
}
|
|
827
|
-
Log.error(error.message);
|
|
828
|
-
_this5._handleError();
|
|
829
|
-
return [];
|
|
830
|
-
}));
|
|
917
|
+
});
|
|
831
918
|
} catch (e) {
|
|
832
919
|
return Promise.reject(e);
|
|
833
920
|
}
|
|
834
921
|
},
|
|
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
922
|
/**
|
|
894
923
|
* Handles the "Add Apps" button press event to add selected apps to favorites.
|
|
895
924
|
*
|
|
@@ -927,11 +956,12 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
927
956
|
}();
|
|
928
957
|
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
929
958
|
}
|
|
959
|
+
triggerPXIntegration("addAppsButton");
|
|
930
960
|
const userSelectedApps = _this6.model.getProperty("/userSelectedApps");
|
|
931
961
|
let staticAppsPresent = false;
|
|
932
962
|
let dynamicAppsPresent = false;
|
|
933
963
|
const _temp13 = _forOf(userSelectedApps, function (app) {
|
|
934
|
-
const isStaticApp = app.getBindingContext()?.getProperty("
|
|
964
|
+
const isStaticApp = app.getBindingContext()?.getProperty("selectedView") === TileType.Static;
|
|
935
965
|
if (isStaticApp) staticAppsPresent = true;else dynamicAppsPresent = true;
|
|
936
966
|
const vizId = app.getBindingContext()?.getProperty("chipID");
|
|
937
967
|
return Promise.resolve(_this6.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID)).then(function () {});
|
|
@@ -983,16 +1013,16 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
983
1013
|
}
|
|
984
1014
|
},
|
|
985
1015
|
/**
|
|
986
|
-
* Retrieves the
|
|
1016
|
+
* Retrieves the TilesContainer instance from the parent layout.
|
|
987
1017
|
*
|
|
988
1018
|
* @private
|
|
989
|
-
* @returns {
|
|
1019
|
+
* @returns {TilesContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
990
1020
|
*/
|
|
991
|
-
|
|
992
|
-
return this.getLayout()?.getItems().find(container => container instanceof
|
|
1021
|
+
getTilesContainer: function _getTilesContainer() {
|
|
1022
|
+
return this.getLayout()?.getItems().find(container => container instanceof TilesContainer);
|
|
993
1023
|
},
|
|
994
1024
|
/**
|
|
995
|
-
* Refreshes the Insights tiles panel in the
|
|
1025
|
+
* Refreshes the Insights tiles panel in the TilesContainer.
|
|
996
1026
|
*
|
|
997
1027
|
* @private
|
|
998
1028
|
* @async
|
|
@@ -1000,7 +1030,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1000
1030
|
refreshInsightsApps: function _refreshInsightsApps() {
|
|
1001
1031
|
try {
|
|
1002
1032
|
const _this8 = this;
|
|
1003
|
-
return Promise.resolve(_this8.
|
|
1033
|
+
return Promise.resolve(_this8.getTilesContainer()?.refreshData("tiles")).then(function () {});
|
|
1004
1034
|
} catch (e) {
|
|
1005
1035
|
return Promise.reject(e);
|
|
1006
1036
|
}
|
|
@@ -1016,8 +1046,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1016
1046
|
const selected = event.getParameter("selected");
|
|
1017
1047
|
if (!selected) this.userSelectedApps.delete(listItem);else {
|
|
1018
1048
|
const context = listItem.getBindingContext();
|
|
1019
|
-
|
|
1020
|
-
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
1049
|
+
if (context && !this.isAppAlreadyAdded(context)) this.userSelectedApps.add(listItem);
|
|
1021
1050
|
}
|
|
1022
1051
|
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
1023
1052
|
},
|
|
@@ -1062,7 +1091,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1062
1091
|
if (query.length !== 0 && query.length < Constants.MinQueryLength) {
|
|
1063
1092
|
textArea.setValueState(ValueState.Information);
|
|
1064
1093
|
textArea.setValueStateText(this._i18nBundle.getText("minLengthRequired"));
|
|
1065
|
-
} else if (query.length > Constants.
|
|
1094
|
+
} else if (query.length > Constants.MaxQueryLength) {
|
|
1066
1095
|
textArea.setValueState(ValueState.Warning);
|
|
1067
1096
|
textArea.setValueStateText(this._i18nBundle.getText("maxLengthExceeded"));
|
|
1068
1097
|
} else {
|
|
@@ -1100,9 +1129,77 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1100
1129
|
sendFeedback: function _sendFeedback(feedbackType) {
|
|
1101
1130
|
this.resetFeedback();
|
|
1102
1131
|
this.model.setProperty(`/feedback/${feedbackType}`, true);
|
|
1132
|
+
triggerPXIntegration(feedbackType);
|
|
1103
1133
|
MessageToast.show(this._i18nBundle.getText("feedBackSent"), {
|
|
1104
1134
|
width: "20em"
|
|
1105
1135
|
});
|
|
1136
|
+
},
|
|
1137
|
+
/**
|
|
1138
|
+
* Creates the action to change view type (App / Tile) for suggested app.
|
|
1139
|
+
*
|
|
1140
|
+
* @private
|
|
1141
|
+
* @param {string} id - The unique ID for the container.
|
|
1142
|
+
* @returns {HBox} The app view action container.
|
|
1143
|
+
*/
|
|
1144
|
+
getAppViewTypeAction: function _getAppViewTypeAction(id) {
|
|
1145
|
+
const appViewToggleButton = new SegmentedButton(recycleId(`${id}-app-addAs-segmentedBtn`), {
|
|
1146
|
+
selectedKey: "{selectedView}",
|
|
1147
|
+
items: [new SegmentedButtonItem(recycleId(`${id}-addAs-app`), {
|
|
1148
|
+
key: TileType.Static,
|
|
1149
|
+
text: this._i18nBundle.getText("addAsApp")
|
|
1150
|
+
}), new SegmentedButtonItem(recycleId(`${id}-addAs-tile`), {
|
|
1151
|
+
key: TileType.Dynamic,
|
|
1152
|
+
text: this._i18nBundle.getText("addAsTile")
|
|
1153
|
+
})]
|
|
1154
|
+
});
|
|
1155
|
+
const appViewLabel = new Label(recycleId(`${id}-addAsLabel`), {
|
|
1156
|
+
text: this._i18nBundle.getText("addAs"),
|
|
1157
|
+
showColon: true
|
|
1158
|
+
});
|
|
1159
|
+
try {
|
|
1160
|
+
appViewToggleButton.setProperty("contentMode", "ContentFit");
|
|
1161
|
+
appViewLabel.setWidth("100%");
|
|
1162
|
+
} catch (error) {
|
|
1163
|
+
Log.error(error instanceof Error ? error.message : error);
|
|
1164
|
+
}
|
|
1165
|
+
return new HBox(recycleId(`${id}-app-addAs-container`), {
|
|
1166
|
+
renderType: FlexRendertype.Bare,
|
|
1167
|
+
alignItems: FlexAlignItems.Center,
|
|
1168
|
+
gap: "0.25rem",
|
|
1169
|
+
items: [appViewLabel, appViewToggleButton]
|
|
1170
|
+
});
|
|
1171
|
+
},
|
|
1172
|
+
/**
|
|
1173
|
+
* Determines if an app is already added to the appropriate section based on its type and selected view.
|
|
1174
|
+
* For static apps or apps with Static view selected, checks if added to favorites apps section.
|
|
1175
|
+
* For dynamic apps with Dynamic view selected, checks if added to insights section.
|
|
1176
|
+
*
|
|
1177
|
+
* @private
|
|
1178
|
+
* @param {Context} context - The binding context for the app to check.
|
|
1179
|
+
* @returns {boolean} True if the app is already added to the corresponding section, false otherwise.
|
|
1180
|
+
*/
|
|
1181
|
+
isAppAlreadyAdded: function _isAppAlreadyAdded(context) {
|
|
1182
|
+
const selectedAppView = context.getProperty("selectedView");
|
|
1183
|
+
return selectedAppView === TileType.Static ? context.getProperty("addedToApps") : context.getProperty("addedToInsights");
|
|
1184
|
+
},
|
|
1185
|
+
/**
|
|
1186
|
+
* Parses the tile configuration string from raw app configuration.
|
|
1187
|
+
*
|
|
1188
|
+
* @private
|
|
1189
|
+
* @param {string} configuration - The raw app configuration string containing tile settings.
|
|
1190
|
+
* @returns {TileConfig | null} The parsed tile configuration object or null if parsing fails.
|
|
1191
|
+
*/
|
|
1192
|
+
parseTileConfiguration: function _parseTileConfiguration(configuration) {
|
|
1193
|
+
if (configuration) {
|
|
1194
|
+
try {
|
|
1195
|
+
const parsedConfig = JSON.parse(configuration);
|
|
1196
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration);
|
|
1197
|
+
return tileConfig;
|
|
1198
|
+
} catch (error) {
|
|
1199
|
+
Log.warning(error.message);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
return null;
|
|
1106
1203
|
}
|
|
1107
1204
|
});
|
|
1108
1205
|
return AppsAdditionPanel;
|