@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
|
@@ -3,24 +3,30 @@
|
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import Localization from "sap/base/i18n/Localization";
|
|
6
7
|
import Log from "sap/base/Log";
|
|
7
8
|
import Button from "sap/m/Button";
|
|
8
9
|
import CustomListItem from "sap/m/CustomListItem";
|
|
9
10
|
import ExpandableText from "sap/m/ExpandableText";
|
|
10
11
|
import FlexBox from "sap/m/FlexBox";
|
|
12
|
+
import FlexItemData from "sap/m/FlexItemData";
|
|
11
13
|
import GenericTile, { GenericTile$PressEvent } from "sap/m/GenericTile";
|
|
12
14
|
import HBox from "sap/m/HBox";
|
|
15
|
+
import IllustratedMessage from "sap/m/IllustratedMessage";
|
|
13
16
|
import Label from "sap/m/Label";
|
|
14
|
-
import { ButtonType, URLHelper } from "sap/m/library";
|
|
17
|
+
import { ButtonType, FlexAlignItems, FlexDirection, FlexJustifyContent, FlexRendertype, URLHelper } from "sap/m/library";
|
|
15
18
|
import List from "sap/m/List";
|
|
16
19
|
import { ListBase$SelectionChangeEvent } from "sap/m/ListBase";
|
|
17
20
|
import MessageToast from "sap/m/MessageToast";
|
|
18
|
-
import
|
|
21
|
+
import ObjectStatus from "sap/m/ObjectStatus";
|
|
22
|
+
import SegmentedButton from "sap/m/SegmentedButton";
|
|
23
|
+
import SegmentedButtonItem from "sap/m/SegmentedButtonItem";
|
|
19
24
|
import TextArea, { TextArea$LiveChangeEvent } from "sap/m/TextArea";
|
|
25
|
+
import Title from "sap/m/Title";
|
|
20
26
|
import VBox from "sap/m/VBox";
|
|
21
27
|
import Control from "sap/ui/core/Control";
|
|
22
28
|
import Fragment from "sap/ui/core/Fragment";
|
|
23
|
-
import { ValueState } from "sap/ui/core/library";
|
|
29
|
+
import { TitleLevel, ValueState } from "sap/ui/core/library";
|
|
24
30
|
import ChangeReason from "sap/ui/model/ChangeReason";
|
|
25
31
|
import Context from "sap/ui/model/Context";
|
|
26
32
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
@@ -35,8 +41,8 @@ import BaseLayout from "./BaseLayout";
|
|
|
35
41
|
import BaseSettingsPanel from "./BaseSettingsPanel";
|
|
36
42
|
import ContentAdditionDialog from "./ContentAdditionDialog";
|
|
37
43
|
import FavAppPanel from "./FavAppPanel";
|
|
38
|
-
import InsightsContainer from "./InsightsContainer";
|
|
39
44
|
import { ICustomVisualization, ICustomVizInstance, IVisualization } from "./interface/AppsInterface";
|
|
45
|
+
import TilesContainer from "./TilesContainer";
|
|
40
46
|
import AppManager from "./utils/AppManager";
|
|
41
47
|
import {
|
|
42
48
|
AI_APP_FINDER_API,
|
|
@@ -50,11 +56,13 @@ import {
|
|
|
50
56
|
import { recycleId } from "./utils/DataFormatUtils";
|
|
51
57
|
import { isNavigationSupportedForFeature } from "./utils/FeatureUtils";
|
|
52
58
|
import { addFESRSemanticStepName, FESR_EVENTS } from "./utils/FESRUtil";
|
|
59
|
+
import { triggerPXIntegration } from "./utils/PXFeedback";
|
|
53
60
|
|
|
54
61
|
const Constants = {
|
|
55
62
|
DeprecatedInfoText: "deprecated",
|
|
56
63
|
MinQueryLength: 2,
|
|
57
|
-
|
|
64
|
+
MaxQueryLength: 2000,
|
|
65
|
+
MaxDescriptionLength: 300
|
|
58
66
|
};
|
|
59
67
|
|
|
60
68
|
enum SearchStatus {
|
|
@@ -69,7 +77,8 @@ enum ErrorType {
|
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
enum TileType {
|
|
72
|
-
Static = "STATIC"
|
|
80
|
+
Static = "STATIC",
|
|
81
|
+
Dynamic = "DYNAMIC"
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
interface RawAppData {
|
|
@@ -81,16 +90,17 @@ interface RawAppData {
|
|
|
81
90
|
iconUrl: string;
|
|
82
91
|
configuration: string;
|
|
83
92
|
}
|
|
84
|
-
interface SuggestedApp {
|
|
93
|
+
export interface SuggestedApp {
|
|
85
94
|
icon: string;
|
|
86
95
|
title: string;
|
|
87
96
|
chipID: string;
|
|
88
|
-
status: string[];
|
|
89
97
|
subTitle: string;
|
|
90
98
|
description: string;
|
|
91
99
|
isStaticApp: boolean;
|
|
92
|
-
|
|
100
|
+
addedToApps?: boolean;
|
|
101
|
+
addedToInsights?: boolean;
|
|
93
102
|
vizData?: IVisualization;
|
|
103
|
+
isDeprecated?: boolean;
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
interface QueryResponse {
|
|
@@ -200,89 +210,95 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
200
210
|
this.vizInstantiationService = await Container.getServiceAsync<VisualizationInstantiation>("VisualizationInstantiation");
|
|
201
211
|
|
|
202
212
|
//load ui fragment
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
sampleQueries: [
|
|
228
|
-
{
|
|
229
|
-
index: 1,
|
|
230
|
-
query: this._i18nBundle.getText("sampleQuery_1") as string
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
index: 2,
|
|
234
|
-
query: this._i18nBundle.getText("sampleQuery_2") as string
|
|
213
|
+
try {
|
|
214
|
+
const panelContent = (await Fragment.load({
|
|
215
|
+
id: recycleId(`${this.getId()}-content`),
|
|
216
|
+
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
217
|
+
controller: this
|
|
218
|
+
})) as Control;
|
|
219
|
+
this.addAggregation("content", panelContent);
|
|
220
|
+
|
|
221
|
+
//initialize ui model
|
|
222
|
+
this.model = new JSONModel({
|
|
223
|
+
query: "",
|
|
224
|
+
hasError: false,
|
|
225
|
+
errorType: ErrorType.NoResultsFound,
|
|
226
|
+
errorDescription: "",
|
|
227
|
+
searchStatus: SearchStatus.Idle,
|
|
228
|
+
loadingAnimations: this._generateSearchingAnimations(),
|
|
229
|
+
suggestedAppsCount: 0,
|
|
230
|
+
userSelectedApps: [],
|
|
231
|
+
suggestedApps: [],
|
|
232
|
+
aiPolicyText: this._generateAIPolicyText(),
|
|
233
|
+
invalidQuery: true,
|
|
234
|
+
feedback: {
|
|
235
|
+
thumbsUp: false,
|
|
236
|
+
thumbsDown: false
|
|
235
237
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
factory: this._generateListItem.bind(this),
|
|
252
|
-
sorter: new Sorter({
|
|
253
|
-
path: "status",
|
|
254
|
-
comparator: (firstApp: string[], secondApp: string[]) => {
|
|
255
|
-
const getPriority = (statusArray: string[]) => {
|
|
256
|
-
if (statusArray.length === 0) return 0; // Empty array has highest priority
|
|
257
|
-
|
|
258
|
-
const hasAlreadyAdded = statusArray.includes(this._i18nBundle.getText("alreadyAddedApp") as string);
|
|
259
|
-
const hasDeprecated = statusArray.includes(this._i18nBundle.getText("deprecatedApp") as string);
|
|
260
|
-
|
|
261
|
-
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
262
|
-
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
263
|
-
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
264
|
-
|
|
265
|
-
return 4; // Any other combination (fallback)
|
|
266
|
-
};
|
|
238
|
+
sampleQueries: [
|
|
239
|
+
{
|
|
240
|
+
index: 1,
|
|
241
|
+
query: this._i18nBundle.getText("sampleQuery_1") as string
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
index: 2,
|
|
245
|
+
query: this._i18nBundle.getText("sampleQuery_2") as string
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
index: 3,
|
|
249
|
+
query: this._i18nBundle.getText("sampleQuery_3") as string
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
});
|
|
267
253
|
|
|
268
|
-
|
|
269
|
-
|
|
254
|
+
panelContent.setModel(this.model);
|
|
255
|
+
panelContent.setModel(new ResourceModel({ bundleName: "sap.cux.home.i18n.messagebundle" }), "i18n");
|
|
256
|
+
this.addAppsButton.setModel(this.model);
|
|
257
|
+
|
|
258
|
+
//bind suggested apps list
|
|
259
|
+
this.appSuggestionList = Fragment.byId(`${this.getId()}-content`, "appsList") as List;
|
|
260
|
+
this.appSuggestionList.bindAggregation("items", {
|
|
261
|
+
path: "/suggestedApps",
|
|
262
|
+
factory: this._generateListItem.bind(this),
|
|
263
|
+
sorter: new Sorter({
|
|
264
|
+
path: "",
|
|
265
|
+
comparator: (firstApp: SuggestedApp, secondApp: SuggestedApp) => {
|
|
266
|
+
const getPriority = (app: SuggestedApp) => {
|
|
267
|
+
const hasAlreadyAdded = app.isStaticApp ? app.addedToApps : app.addedToInsights;
|
|
268
|
+
const hasDeprecated = app.isDeprecated;
|
|
269
|
+
|
|
270
|
+
if (!hasAlreadyAdded && !hasDeprecated) return 0; // Neither status - highest priority
|
|
271
|
+
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
272
|
+
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
273
|
+
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
274
|
+
|
|
275
|
+
return 4; // Any other combination (fallback)
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const firstPriority = getPriority(firstApp);
|
|
279
|
+
const secondPriority = getPriority(secondApp);
|
|
280
|
+
|
|
281
|
+
return firstPriority - secondPriority;
|
|
282
|
+
}
|
|
283
|
+
})
|
|
284
|
+
});
|
|
270
285
|
|
|
271
|
-
|
|
286
|
+
//focus on the first item when the list is updated
|
|
287
|
+
this.appSuggestionList.attachUpdateFinished(() => {
|
|
288
|
+
if (
|
|
289
|
+
this.model.getProperty("/suggestedAppsCount") > 0 &&
|
|
290
|
+
this.model.getProperty("/searchStatus") === SearchStatus.Complete
|
|
291
|
+
) {
|
|
292
|
+
this.appSuggestionList.getItems()?.[0]?.focus();
|
|
272
293
|
}
|
|
273
|
-
})
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
//focus on the first item when the list is updated
|
|
277
|
-
this.appSuggestionList.attachUpdateFinished(() => {
|
|
278
|
-
if (this.model.getProperty("/suggestedAppsCount") > 0 && this.model.getProperty("/searchStatus") === SearchStatus.Complete) {
|
|
279
|
-
this.appSuggestionList.getItems()?.[0]?.focus();
|
|
280
|
-
}
|
|
281
|
-
});
|
|
294
|
+
});
|
|
282
295
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
296
|
+
//bind search field
|
|
297
|
+
const searchTextArea = Fragment.byId(`${this.getId()}-content`, "searchTextArea") as TextArea;
|
|
298
|
+
searchTextArea.onsapenter = this.onPressGo.bind(this);
|
|
299
|
+
} catch (error) {
|
|
300
|
+
Log.error("Failed to load panel content for AppsAdditionPanel:", error as Error);
|
|
301
|
+
}
|
|
286
302
|
}
|
|
287
303
|
|
|
288
304
|
/**
|
|
@@ -294,25 +310,54 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
294
310
|
* @returns {CustomListItem} The generated list item control.
|
|
295
311
|
*/
|
|
296
312
|
private _generateListItem(id: string, context: Context): CustomListItem {
|
|
313
|
+
const langTag = Localization.getLanguageTag();
|
|
314
|
+
const currentLanguage = langTag.language.toLowerCase();
|
|
315
|
+
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
297
316
|
const listItem = new CustomListItem(id, {
|
|
298
|
-
|
|
317
|
+
//when toggled b/w app and tile view, the selection should update according to whether the app is already added to selected section
|
|
318
|
+
selected: {
|
|
319
|
+
path: "selectedView",
|
|
320
|
+
formatter: () => {
|
|
321
|
+
const isAppAlreadyAdded = this.isAppAlreadyAdded(context);
|
|
322
|
+
//bind associated checkbox to disable it when the app is already added
|
|
323
|
+
listItem.getMultiSelectControl(true).setEnabled(!isAppAlreadyAdded);
|
|
324
|
+
// if app is already added or if user has selected the app, mark it as selected
|
|
325
|
+
return isAppAlreadyAdded || this.userSelectedApps.has(listItem);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
299
328
|
content: [
|
|
300
329
|
new FlexBox(recycleId(`${id}-result-container`), {
|
|
301
|
-
renderType:
|
|
302
|
-
direction:
|
|
303
|
-
|
|
304
|
-
items: [this.
|
|
305
|
-
}).addStyleClass("sapUiSmallMargin")
|
|
330
|
+
renderType: FlexRendertype.Bare,
|
|
331
|
+
direction: FlexDirection.Row,
|
|
332
|
+
gap: "1.5rem",
|
|
333
|
+
items: [this._getAppDetailsContainer(id, context, isEnglishLanguage), this._getAppPreviewContainer(id, context)]
|
|
334
|
+
}).addStyleClass("sapUiSmallMargin sapUiTinyMarginBegin")
|
|
306
335
|
]
|
|
307
336
|
});
|
|
308
337
|
|
|
309
|
-
//bind associated checkbox to disable it when the app is already added to home page
|
|
310
|
-
listItem.getMultiSelectControl(true).setEnabled(!context.getProperty("addedToHomePage"));
|
|
311
|
-
|
|
312
338
|
return listItem;
|
|
313
339
|
}
|
|
314
340
|
|
|
315
341
|
/**
|
|
342
|
+
* Cleans up resources when exiting the panel.
|
|
343
|
+
*
|
|
344
|
+
* @public
|
|
345
|
+
* @override
|
|
346
|
+
*/
|
|
347
|
+
public exit(): void {
|
|
348
|
+
// Destroy fragments if they exist
|
|
349
|
+
const dialogId = `${this.getId()}-content`;
|
|
350
|
+
|
|
351
|
+
["number", "query", "searchingAnimation"].forEach((elementId) => {
|
|
352
|
+
const element = Fragment.byId(dialogId, elementId);
|
|
353
|
+
element?.destroy();
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
super.exit();
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
|
|
316
361
|
* Creates a preview container for the suggested app.
|
|
317
362
|
*
|
|
318
363
|
* @private
|
|
@@ -322,37 +367,45 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
322
367
|
*/
|
|
323
368
|
private _getAppPreviewContainer(id: string, context: Context): HBox {
|
|
324
369
|
const container = new HBox(recycleId(`${id}-suggestedAppContainer`), {
|
|
325
|
-
renderType:
|
|
370
|
+
renderType: FlexRendertype.Bare,
|
|
371
|
+
width: "19rem",
|
|
372
|
+
layoutData: new FlexItemData({
|
|
373
|
+
growFactor: 0,
|
|
374
|
+
shrinkFactor: 0,
|
|
375
|
+
alignSelf: FlexAlignItems.Center
|
|
376
|
+
}),
|
|
377
|
+
justifyContent: FlexJustifyContent.Center
|
|
326
378
|
});
|
|
379
|
+
container.addItem(
|
|
380
|
+
new GenericTile(recycleId(`${id}-staticApp`), {
|
|
381
|
+
mode: "IconMode",
|
|
382
|
+
frameType: "TwoByHalf",
|
|
383
|
+
width: "19rem",
|
|
384
|
+
header: context.getProperty("title") as string,
|
|
385
|
+
subheader: context.getProperty("subTitle") as string,
|
|
386
|
+
tileIcon: (context.getProperty("icon") as string) || DEFAULT_APP_ICON,
|
|
387
|
+
visible: "{= ${selectedView} === 'STATIC'}",
|
|
388
|
+
url: context.getProperty("url") as string,
|
|
389
|
+
press: (event: GenericTile$PressEvent) => {
|
|
390
|
+
this._persistDialog(this.getParent() as ContentAdditionDialog);
|
|
391
|
+
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
392
|
+
}
|
|
393
|
+
}).addStyleClass("suggestedTile")
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
const vizData = context.getProperty("vizData") as IVisualization;
|
|
397
|
+
// instantiate visualization for dynamic app
|
|
398
|
+
const vizInstance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;
|
|
399
|
+
vizInstance?.setActive(true);
|
|
400
|
+
vizInstance?.setProperty("sizeBehavior", "Small", true);
|
|
401
|
+
vizInstance?.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));
|
|
402
|
+
vizInstance.bindProperty("visible", {
|
|
403
|
+
parts: ["selectedView"],
|
|
404
|
+
formatter: (selectedView: TileType) => selectedView !== TileType.Static
|
|
405
|
+
});
|
|
406
|
+
container.addItem(vizInstance);
|
|
327
407
|
|
|
328
|
-
|
|
329
|
-
// create generic tile for static app
|
|
330
|
-
container.addItem(
|
|
331
|
-
new GenericTile(recycleId(`${id}-staticApp`), {
|
|
332
|
-
mode: "IconMode",
|
|
333
|
-
frameType: "TwoByHalf",
|
|
334
|
-
width: "19rem",
|
|
335
|
-
header: context.getProperty("title") as string,
|
|
336
|
-
subheader: context.getProperty("subTitle") as string,
|
|
337
|
-
tileIcon: (context.getProperty("icon") as string) || DEFAULT_APP_ICON,
|
|
338
|
-
visible: context.getProperty("isStaticApp") as boolean,
|
|
339
|
-
url: context.getProperty("url") as string,
|
|
340
|
-
press: (event: GenericTile$PressEvent) => {
|
|
341
|
-
this._persistDialog(this.getParent() as ContentAdditionDialog);
|
|
342
|
-
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
343
|
-
}
|
|
344
|
-
}).addStyleClass("suggestedTile")
|
|
345
|
-
);
|
|
346
|
-
} else {
|
|
347
|
-
// create custom visualization for other apps
|
|
348
|
-
const vizData = context.getProperty("vizData") as ICustomVisualization;
|
|
349
|
-
const instance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;
|
|
350
|
-
instance?.setActive(true);
|
|
351
|
-
instance?.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));
|
|
352
|
-
container.addItem(instance);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return container;
|
|
408
|
+
return container.addStyleClass("suggestedAppPreviewContainer");
|
|
356
409
|
}
|
|
357
410
|
|
|
358
411
|
/**
|
|
@@ -361,33 +414,66 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
361
414
|
* @private
|
|
362
415
|
* @param {string} id - The unique ID for the container.
|
|
363
416
|
* @param {Context} context - The binding context for the app.
|
|
417
|
+
* @param {boolean} isEnglishLanguage - Flag indicating if the language is english.
|
|
364
418
|
* @returns {VBox} The app details container.
|
|
365
419
|
*/
|
|
366
|
-
private _getAppDetailsContainer(id: string, context: Context): VBox {
|
|
420
|
+
private _getAppDetailsContainer(id: string, context: Context, isEnglishLanguage: boolean): VBox {
|
|
421
|
+
let description = isEnglishLanguage
|
|
422
|
+
? (context.getProperty("description") as string)
|
|
423
|
+
: (this._i18nBundle.getText("NoDescriptionAvailable") as string);
|
|
367
424
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
368
|
-
renderType:
|
|
369
|
-
gap: "
|
|
425
|
+
renderType: FlexRendertype.Bare,
|
|
426
|
+
gap: "1rem",
|
|
427
|
+
layoutData: new FlexItemData({
|
|
428
|
+
growFactor: 1
|
|
429
|
+
}),
|
|
370
430
|
items: [
|
|
431
|
+
new HBox(recycleId(`${id}-title-container`), {
|
|
432
|
+
gap: "0.5rem",
|
|
433
|
+
alignItems: FlexAlignItems.Center,
|
|
434
|
+
renderType: FlexRendertype.Bare,
|
|
435
|
+
items: [
|
|
436
|
+
new Title(recycleId(`${id}-app-title`), {
|
|
437
|
+
text: context.getProperty("title") as string,
|
|
438
|
+
titleStyle: TitleLevel.H6
|
|
439
|
+
}),
|
|
440
|
+
new ObjectStatus(recycleId(`${id}-deprecatedApp`), {
|
|
441
|
+
text: this._i18nBundle.getText("deprecatedApp") as string,
|
|
442
|
+
icon: "sap-icon://alert",
|
|
443
|
+
state: ValueState.Warning,
|
|
444
|
+
visible: context.getProperty("isDeprecated") as boolean
|
|
445
|
+
})
|
|
446
|
+
]
|
|
447
|
+
}),
|
|
371
448
|
new ExpandableText(recycleId(`${id}-description`), {
|
|
372
|
-
text:
|
|
373
|
-
maxCharacters: Constants.MaxDescriptionLength
|
|
449
|
+
text: description,
|
|
450
|
+
maxCharacters: Constants.MaxDescriptionLength,
|
|
451
|
+
layoutData: new FlexItemData({
|
|
452
|
+
growFactor: 1
|
|
453
|
+
})
|
|
374
454
|
}),
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
455
|
+
// app actions container
|
|
456
|
+
new HBox(recycleId(`${id}-app-actions-container`), {
|
|
457
|
+
renderType: FlexRendertype.Bare,
|
|
458
|
+
gap: "1.5rem",
|
|
459
|
+
alignItems: FlexAlignItems.Center,
|
|
378
460
|
items: [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
461
|
+
this.getAppViewTypeAction(id),
|
|
462
|
+
new ObjectStatus(recycleId(`${id}-alreadyAddedStatus`), {
|
|
463
|
+
text: "{i18n>alreadyAddedApp}",
|
|
464
|
+
icon: "sap-icon://sys-enter-2",
|
|
465
|
+
state: "Success",
|
|
466
|
+
visible: {
|
|
467
|
+
parts: ["selectedView"],
|
|
468
|
+
formatter: () => {
|
|
469
|
+
return this.isAppAlreadyAdded(context);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
})
|
|
387
473
|
]
|
|
388
474
|
})
|
|
389
475
|
]
|
|
390
|
-
})
|
|
476
|
+
});
|
|
391
477
|
}
|
|
392
478
|
|
|
393
479
|
/**
|
|
@@ -458,15 +544,19 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
458
544
|
`<svg height="167" fill="none">
|
|
459
545
|
${loadingShimmer}
|
|
460
546
|
<rect x="16" y="75" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
461
|
-
<rect x="48" y="16" width="
|
|
462
|
-
<rect x="48" y="
|
|
547
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
548
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
549
|
+
<rect x="48" y="130" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
550
|
+
<rect x="600" y="50" width="303" height="70" rx="16" fill="url(#loadingShimmer)"/>
|
|
463
551
|
</svg>`,
|
|
464
552
|
`<svg height="180" fill="none">
|
|
465
553
|
${loadingShimmer}
|
|
466
554
|
<rect x="16" y="82" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
467
|
-
<rect x="48" y="16" width="
|
|
468
|
-
<rect x="
|
|
469
|
-
<rect x="
|
|
555
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
556
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
557
|
+
<rect x="48" y="140" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
558
|
+
<rect x="210" y="140" width="10%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
559
|
+
<rect x="675" y="16" width="148" height="148" rx="16" fill="url(#loadingShimmer)"/>
|
|
470
560
|
</svg>`
|
|
471
561
|
];
|
|
472
562
|
}
|
|
@@ -511,6 +601,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
511
601
|
this.userSelectedApps?.clear();
|
|
512
602
|
}
|
|
513
603
|
|
|
604
|
+
public setIllustrationSize(): void {
|
|
605
|
+
const containerDom = (Fragment.byId(`${this.getId()}-content`, "container") as VBox)?.getDomRef() as HTMLElement;
|
|
606
|
+
if (containerDom) {
|
|
607
|
+
const clientHeight = containerDom.clientHeight;
|
|
608
|
+
const illustratedMessage = Fragment.byId(`${this.getId()}-content`, "beforeSearch") as IllustratedMessage;
|
|
609
|
+
if (clientHeight <= 500) {
|
|
610
|
+
illustratedMessage.setIllustrationSize("ExtraSmall");
|
|
611
|
+
} else if (500 < clientHeight && clientHeight < 650) {
|
|
612
|
+
illustratedMessage.setIllustrationSize("Small");
|
|
613
|
+
} else {
|
|
614
|
+
illustratedMessage.setIllustrationSize("Medium");
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
514
619
|
/**
|
|
515
620
|
* Handles the "Go" button press event for searching suggested apps.
|
|
516
621
|
*
|
|
@@ -534,7 +639,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
534
639
|
const insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText("insights") as string);
|
|
535
640
|
|
|
536
641
|
// generate suggested apps
|
|
537
|
-
const apps = this._generateApps(rawApps, allVisualizations,
|
|
642
|
+
const apps = this._generateApps(rawApps, allVisualizations, favoriteApps, insightsApps);
|
|
538
643
|
const suggestedApps = await this._filterUnsupportedApps(apps);
|
|
539
644
|
|
|
540
645
|
if (suggestedApps.length === 0 && !this.model.getProperty("/hasError")) {
|
|
@@ -547,8 +652,9 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
547
652
|
}
|
|
548
653
|
}
|
|
549
654
|
} catch (err) {
|
|
550
|
-
|
|
551
|
-
|
|
655
|
+
const message = (err as Error).message || "";
|
|
656
|
+
Log.error(message);
|
|
657
|
+
this._handleError(message);
|
|
552
658
|
} finally {
|
|
553
659
|
// update search status only if search is not cancelled
|
|
554
660
|
if (this.model.getProperty("/searchStatus") === SearchStatus.Searching) {
|
|
@@ -579,17 +685,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
579
685
|
* @private
|
|
580
686
|
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
581
687
|
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
582
|
-
* @param {ICustomVisualization[]}
|
|
688
|
+
* @param {ICustomVisualization[]} favoriteApps - Favorite apps available in homepage.
|
|
689
|
+
* @param {ICustomVisualization[]} insightsApps - Insights apps available in homepage.
|
|
583
690
|
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
584
691
|
*/
|
|
585
692
|
private _generateApps(
|
|
586
693
|
rawApps: RawAppData[],
|
|
587
694
|
allVisualizations: IVisualization[],
|
|
588
|
-
|
|
695
|
+
favoriteApps: ICustomVisualization[],
|
|
696
|
+
insightsApps: ICustomVisualization[]
|
|
589
697
|
): SuggestedApp[] {
|
|
590
698
|
return rawApps.map((app) => {
|
|
591
699
|
const vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);
|
|
592
|
-
const
|
|
700
|
+
const addedToApps = favoriteApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
701
|
+
const addedToInsights = insightsApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
702
|
+
const tileConfig = this.parseTileConfiguration(app.configuration);
|
|
593
703
|
return {
|
|
594
704
|
title: app.title,
|
|
595
705
|
chipID: app.chipID,
|
|
@@ -597,10 +707,12 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
597
707
|
description: app.appDescription,
|
|
598
708
|
icon: app.iconUrl,
|
|
599
709
|
vizData,
|
|
600
|
-
|
|
710
|
+
addedToApps,
|
|
711
|
+
addedToInsights,
|
|
601
712
|
isStaticApp: app.tileType === TileType.Static,
|
|
602
|
-
|
|
603
|
-
|
|
713
|
+
url: vizData?.targetURL || "",
|
|
714
|
+
isDeprecated: (tileConfig?.display_info_text || "").toLowerCase() === Constants.DeprecatedInfoText,
|
|
715
|
+
selectedView: app.tileType === TileType.Static ? TileType.Static : TileType.Dynamic
|
|
604
716
|
};
|
|
605
717
|
}) as SuggestedApp[];
|
|
606
718
|
}
|
|
@@ -614,7 +726,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
614
726
|
*/
|
|
615
727
|
private isValidQuery(query: string = ""): boolean {
|
|
616
728
|
query = query?.trim();
|
|
617
|
-
return query.length >= Constants.MinQueryLength && query.length <= Constants.
|
|
729
|
+
return query.length >= Constants.MinQueryLength && query.length <= Constants.MaxQueryLength;
|
|
618
730
|
}
|
|
619
731
|
|
|
620
732
|
/**
|
|
@@ -662,97 +774,26 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
662
774
|
* @returns {Promise<RawAppData[]>} A promise that resolves to the list of raw app data.
|
|
663
775
|
*/
|
|
664
776
|
private async fetchAppsFromSearch(query: string): Promise<RawAppData[]> {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
const response = await fetch(AI_APP_FINDER_API, {
|
|
673
|
-
method: "POST",
|
|
674
|
-
headers,
|
|
675
|
-
body: JSON.stringify({ UserInput: query })
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
// handle error responses
|
|
679
|
-
if (!response.ok) {
|
|
680
|
-
const errorResponse = (await response.json()) as ErrorResponse;
|
|
681
|
-
this._handleError(errorResponse.error?.message || "");
|
|
682
|
-
return [];
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
const queryResult = (await response.json()) as QueryResponse;
|
|
686
|
-
return queryResult.value || [];
|
|
687
|
-
} catch (error) {
|
|
688
|
-
Log.error((error as Error).message);
|
|
689
|
-
this._handleError();
|
|
690
|
-
return [];
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Retrieves status texts for an app based on its configuration and homepage status.
|
|
696
|
-
*
|
|
697
|
-
* @private
|
|
698
|
-
* @param {string} configuration - The app's configuration string.
|
|
699
|
-
* @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.
|
|
700
|
-
* @returns {string[]} An array of status texts for the app.
|
|
701
|
-
*/
|
|
702
|
-
private getAppStatusTexts(configuration: string, addedToHomePage: boolean): string[] {
|
|
703
|
-
let statusTexts = [];
|
|
704
|
-
|
|
705
|
-
if (configuration) {
|
|
706
|
-
try {
|
|
707
|
-
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
708
|
-
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
709
|
-
const infoText = (tileConfig?.display_info_text || "").toLowerCase();
|
|
710
|
-
if (infoText === Constants.DeprecatedInfoText) {
|
|
711
|
-
statusTexts.push(this._i18nBundle.getText("deprecatedApp") as string);
|
|
712
|
-
}
|
|
713
|
-
} catch (error: unknown) {
|
|
714
|
-
Log.warning((error as Error).message);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
if (addedToHomePage) {
|
|
719
|
-
statusTexts.push(this._i18nBundle.getText("alreadyAddedApp") as string);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
return statusTexts;
|
|
723
|
-
}
|
|
777
|
+
const token = await this._fetchCSRFToken();
|
|
778
|
+
const headers = {
|
|
779
|
+
"Content-Type": "application/json",
|
|
780
|
+
...(token && { "X-CSRF-Token": token })
|
|
781
|
+
};
|
|
724
782
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
* @param {string} id - The id of the list item.
|
|
730
|
-
* @param {string[]} stausTexts - The list of status texts.
|
|
731
|
-
* @returns {Text[]} An array of Text controls with applied styles.
|
|
732
|
-
*/
|
|
733
|
-
private _generateStatusTexts(id: string, stausTexts: string[]): Text[] {
|
|
734
|
-
return stausTexts.map((status, index) => {
|
|
735
|
-
return new Text(recycleId(`${id}-statusText-${index}`), {
|
|
736
|
-
text: status
|
|
737
|
-
}).addStyleClass(this.applyStatusClass(status));
|
|
783
|
+
const response = await fetch(AI_APP_FINDER_API, {
|
|
784
|
+
method: "POST",
|
|
785
|
+
headers,
|
|
786
|
+
body: JSON.stringify({ UserInput: query })
|
|
738
787
|
});
|
|
739
|
-
}
|
|
740
788
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
* @param {string} status - The status text to classify.
|
|
746
|
-
* @returns {string} The CSS class for the status text.
|
|
747
|
-
*/
|
|
748
|
-
public applyStatusClass(status: string): string {
|
|
749
|
-
if (status === this._i18nBundle.getText("alreadyAddedApp")) {
|
|
750
|
-
return "addedAppStatusText";
|
|
751
|
-
} else if (status === this._i18nBundle.getText("deprecatedApp")) {
|
|
752
|
-
return "deprecatedAppStatusText";
|
|
753
|
-
} else {
|
|
754
|
-
return "";
|
|
789
|
+
// handle error responses
|
|
790
|
+
if (!response.ok) {
|
|
791
|
+
const errorResponse = (await response.json()) as ErrorResponse;
|
|
792
|
+
throw new Error(errorResponse.error?.message || "");
|
|
755
793
|
}
|
|
794
|
+
|
|
795
|
+
const queryResult = (await response.json()) as QueryResponse;
|
|
796
|
+
return queryResult.value || [];
|
|
756
797
|
}
|
|
757
798
|
|
|
758
799
|
/**
|
|
@@ -762,12 +803,13 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
762
803
|
* @async
|
|
763
804
|
*/
|
|
764
805
|
private async onPressAddApps(): Promise<void> {
|
|
806
|
+
triggerPXIntegration("addAppsButton");
|
|
765
807
|
const userSelectedApps = this.model.getProperty("/userSelectedApps") as CustomListItem[];
|
|
766
808
|
let staticAppsPresent = false;
|
|
767
809
|
let dynamicAppsPresent = false;
|
|
768
810
|
|
|
769
811
|
for (const app of userSelectedApps) {
|
|
770
|
-
const isStaticApp = app.getBindingContext()?.getProperty("
|
|
812
|
+
const isStaticApp = app.getBindingContext()?.getProperty("selectedView") === TileType.Static;
|
|
771
813
|
if (isStaticApp) staticAppsPresent = true;
|
|
772
814
|
else dynamicAppsPresent = true;
|
|
773
815
|
|
|
@@ -840,25 +882,25 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
840
882
|
}
|
|
841
883
|
|
|
842
884
|
/**
|
|
843
|
-
* Retrieves the
|
|
885
|
+
* Retrieves the TilesContainer instance from the parent layout.
|
|
844
886
|
*
|
|
845
887
|
* @private
|
|
846
|
-
* @returns {
|
|
888
|
+
* @returns {TilesContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
847
889
|
*/
|
|
848
|
-
private
|
|
890
|
+
private getTilesContainer(): TilesContainer | undefined {
|
|
849
891
|
return this.getLayout()
|
|
850
892
|
?.getItems()
|
|
851
|
-
.find((container) => container instanceof
|
|
893
|
+
.find((container) => container instanceof TilesContainer);
|
|
852
894
|
}
|
|
853
895
|
|
|
854
896
|
/**
|
|
855
|
-
* Refreshes the Insights tiles panel in the
|
|
897
|
+
* Refreshes the Insights tiles panel in the TilesContainer.
|
|
856
898
|
*
|
|
857
899
|
* @private
|
|
858
900
|
* @async
|
|
859
901
|
*/
|
|
860
902
|
private async refreshInsightsApps(): Promise<void> {
|
|
861
|
-
await this.
|
|
903
|
+
await this.getTilesContainer()?.refreshData("tiles");
|
|
862
904
|
}
|
|
863
905
|
|
|
864
906
|
/**
|
|
@@ -874,8 +916,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
874
916
|
if (!selected) this.userSelectedApps.delete(listItem);
|
|
875
917
|
else {
|
|
876
918
|
const context = listItem.getBindingContext();
|
|
877
|
-
|
|
878
|
-
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
919
|
+
if (context && !this.isAppAlreadyAdded(context)) this.userSelectedApps.add(listItem);
|
|
879
920
|
}
|
|
880
921
|
|
|
881
922
|
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
@@ -925,7 +966,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
925
966
|
if (query.length !== 0 && query.length < Constants.MinQueryLength) {
|
|
926
967
|
textArea.setValueState(ValueState.Information);
|
|
927
968
|
textArea.setValueStateText(this._i18nBundle.getText("minLengthRequired"));
|
|
928
|
-
} else if (query.length > Constants.
|
|
969
|
+
} else if (query.length > Constants.MaxQueryLength) {
|
|
929
970
|
textArea.setValueState(ValueState.Warning);
|
|
930
971
|
textArea.setValueStateText(this._i18nBundle.getText("maxLengthExceeded"));
|
|
931
972
|
} else {
|
|
@@ -967,8 +1008,87 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
967
1008
|
public sendFeedback(feedbackType: string): void {
|
|
968
1009
|
this.resetFeedback();
|
|
969
1010
|
this.model.setProperty(`/feedback/${feedbackType}`, true);
|
|
1011
|
+
triggerPXIntegration(feedbackType);
|
|
970
1012
|
MessageToast.show(this._i18nBundle.getText("feedBackSent") as string, {
|
|
971
1013
|
width: "20em"
|
|
972
1014
|
});
|
|
973
1015
|
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Creates the action to change view type (App / Tile) for suggested app.
|
|
1019
|
+
*
|
|
1020
|
+
* @private
|
|
1021
|
+
* @param {string} id - The unique ID for the container.
|
|
1022
|
+
* @returns {HBox} The app view action container.
|
|
1023
|
+
*/
|
|
1024
|
+
private getAppViewTypeAction(id: string): HBox {
|
|
1025
|
+
const appViewToggleButton = new SegmentedButton(recycleId(`${id}-app-addAs-segmentedBtn`), {
|
|
1026
|
+
selectedKey: "{selectedView}",
|
|
1027
|
+
items: [
|
|
1028
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-app`), {
|
|
1029
|
+
key: TileType.Static,
|
|
1030
|
+
text: this._i18nBundle.getText("addAsApp")
|
|
1031
|
+
}),
|
|
1032
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-tile`), {
|
|
1033
|
+
key: TileType.Dynamic,
|
|
1034
|
+
text: this._i18nBundle.getText("addAsTile")
|
|
1035
|
+
})
|
|
1036
|
+
]
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
const appViewLabel = new Label(recycleId(`${id}-addAsLabel`), {
|
|
1040
|
+
text: this._i18nBundle.getText("addAs"),
|
|
1041
|
+
showColon: true
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
try {
|
|
1045
|
+
appViewToggleButton.setProperty("contentMode", "ContentFit");
|
|
1046
|
+
appViewLabel.setWidth("100%");
|
|
1047
|
+
} catch (error) {
|
|
1048
|
+
Log.error(error instanceof Error ? error.message : (error as string));
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
return new HBox(recycleId(`${id}-app-addAs-container`), {
|
|
1052
|
+
renderType: FlexRendertype.Bare,
|
|
1053
|
+
alignItems: FlexAlignItems.Center,
|
|
1054
|
+
gap: "0.25rem",
|
|
1055
|
+
items: [appViewLabel, appViewToggleButton]
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Determines if an app is already added to the appropriate section based on its type and selected view.
|
|
1061
|
+
* For static apps or apps with Static view selected, checks if added to favorites apps section.
|
|
1062
|
+
* For dynamic apps with Dynamic view selected, checks if added to insights section.
|
|
1063
|
+
*
|
|
1064
|
+
* @private
|
|
1065
|
+
* @param {Context} context - The binding context for the app to check.
|
|
1066
|
+
* @returns {boolean} True if the app is already added to the corresponding section, false otherwise.
|
|
1067
|
+
*/
|
|
1068
|
+
private isAppAlreadyAdded(context: Context): boolean {
|
|
1069
|
+
const selectedAppView = context.getProperty("selectedView") as TileType;
|
|
1070
|
+
return (
|
|
1071
|
+
selectedAppView === TileType.Static ? context.getProperty("addedToApps") : context.getProperty("addedToInsights")
|
|
1072
|
+
) as boolean;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Parses the tile configuration string from raw app configuration.
|
|
1077
|
+
*
|
|
1078
|
+
* @private
|
|
1079
|
+
* @param {string} configuration - The raw app configuration string containing tile settings.
|
|
1080
|
+
* @returns {TileConfig | null} The parsed tile configuration object or null if parsing fails.
|
|
1081
|
+
*/
|
|
1082
|
+
private parseTileConfiguration(configuration: string): TileConfig | null {
|
|
1083
|
+
if (configuration) {
|
|
1084
|
+
try {
|
|
1085
|
+
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
1086
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
1087
|
+
return tileConfig;
|
|
1088
|
+
} catch (error: unknown) {
|
|
1089
|
+
Log.warning((error as Error).message);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return null;
|
|
1093
|
+
}
|
|
974
1094
|
}
|