@sapui5/sap.cux.home 1.135.0 → 1.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js +23 -5
- package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +7 -0
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +24 -5
- package/src/sap/cux/home/AppsAdditionPanel-dbg.js +919 -0
- package/src/sap/cux/home/AppsAdditionPanel-dbg.js.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +293 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.js +6 -0
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.ts +757 -0
- package/src/sap/cux/home/AppsContainer-dbg.js +42 -28
- package/src/sap/cux/home/AppsContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.d.ts +17 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +1 -1
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +27 -6
- package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js +261 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.ts +251 -0
- package/src/sap/cux/home/BaseAppPanel-dbg.js +4 -5
- package/src/sap/cux/home/BaseAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +1 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +3 -5
- package/src/sap/cux/home/BaseAppPersPanel-dbg.js +2 -1
- package/src/sap/cux/home/BaseAppPersPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.js +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.ts +2 -1
- package/src/sap/cux/home/BaseContainer-dbg.js +24 -3
- package/src/sap/cux/home/BaseContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.d.ts +10 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +1 -1
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +24 -2
- package/src/sap/cux/home/BaseContainerRenderer-dbg.js +18 -1
- package/src/sap/cux/home/BaseContainerRenderer-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.d.ts +4 -4
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +25 -4
- package/src/sap/cux/home/BaseLayout-dbg.js +22 -2
- package/src/sap/cux/home/BaseLayout-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseLayout.d.ts +6 -0
- package/src/sap/cux/home/BaseLayout.d.ts.map +1 -1
- package/src/sap/cux/home/BaseLayout.js +1 -1
- package/src/sap/cux/home/BaseLayout.js.map +1 -1
- package/src/sap/cux/home/BaseLayout.ts +23 -2
- package/src/sap/cux/home/BaseNewsItem-dbg.js +3 -3
- package/src/sap/cux/home/BaseNewsItem-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseNewsItem.js +1 -1
- package/src/sap/cux/home/BaseNewsItem.js.map +1 -1
- package/src/sap/cux/home/BaseNewsItem.ts +3 -3
- package/src/sap/cux/home/BaseNewsPanel-dbg.js +4 -5
- package/src/sap/cux/home/BaseNewsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +5 -4
- package/src/sap/cux/home/BasePanel-dbg.js +1 -1
- package/src/sap/cux/home/BasePanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BasePanel.js +1 -1
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +1 -1
- package/src/sap/cux/home/BaseSettingsDialog-dbg.js +11 -0
- package/src/sap/cux/home/BaseSettingsDialog-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.js +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.ts +12 -0
- package/src/sap/cux/home/BaseSettingsPanel-dbg.js +67 -2
- package/src/sap/cux/home/BaseSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +42 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.gen.d.ts +75 -0
- package/src/sap/cux/home/BaseSettingsPanel.js +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +70 -2
- package/src/sap/cux/home/CardsPanel-dbg.js +548 -168
- package/src/sap/cux/home/CardsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.d.ts +121 -15
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.gen.d.ts +78 -0
- package/src/sap/cux/home/CardsPanel.js +1 -1
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +450 -97
- package/src/sap/cux/home/ContentAdditionDialog-dbg.js +353 -0
- package/src/sap/cux/home/ContentAdditionDialog-dbg.js.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +82 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.js +6 -0
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.ts +214 -0
- package/src/sap/cux/home/ErrorPanel-dbg.js +3 -3
- package/src/sap/cux/home/ErrorPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.js +1 -1
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +4 -2
- package/src/sap/cux/home/FavAppPanel-dbg.js +352 -333
- package/src/sap/cux/home/FavAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +1 -1
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +63 -54
- package/src/sap/cux/home/InsightsAdditionPanel-dbg.js +97 -0
- package/src/sap/cux/home/InsightsAdditionPanel-dbg.js.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +57 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.js +6 -0
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.ts +94 -0
- package/src/sap/cux/home/InsightsContainer-dbg.js +22 -2
- package/src/sap/cux/home/InsightsContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.d.ts +14 -0
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +1 -1
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +22 -1
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js +401 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.ts +391 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js +10 -9
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +9 -8
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js +2 -2
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js +6 -6
- package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +6 -6
- package/src/sap/cux/home/Layout-dbg.js +58 -33
- package/src/sap/cux/home/Layout-dbg.js.map +1 -1
- package/src/sap/cux/home/Layout.d.ts +13 -0
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +1 -1
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +48 -20
- package/src/sap/cux/home/LayoutSettingsPanel-dbg.js +1 -10
- package/src/sap/cux/home/LayoutSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +2 -10
- package/src/sap/cux/home/NewsAndPagesContainer-dbg.js +35 -17
- package/src/sap/cux/home/NewsAndPagesContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +7 -0
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +40 -16
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js +164 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.ts +154 -0
- package/src/sap/cux/home/NewsGroup-dbg.js +112 -79
- package/src/sap/cux/home/NewsGroup-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.d.ts +1 -0
- package/src/sap/cux/home/NewsGroup.d.ts.map +1 -1
- package/src/sap/cux/home/NewsGroup.js +1 -1
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +136 -100
- package/src/sap/cux/home/NewsPanel-dbg.js +541 -173
- package/src/sap/cux/home/NewsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts +156 -16
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +1 -1
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +452 -82
- package/src/sap/cux/home/NewsSettingsPanel-dbg.js +61 -20
- package/src/sap/cux/home/NewsSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +14 -0
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +75 -21
- package/src/sap/cux/home/NoDataContainer-dbg.js +3 -3
- package/src/sap/cux/home/NoDataContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/NoDataContainer.d.ts +1 -0
- package/src/sap/cux/home/NoDataContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NoDataContainer.js +1 -1
- package/src/sap/cux/home/NoDataContainer.js.map +1 -1
- package/src/sap/cux/home/NoDataContainer.ts +4 -2
- package/src/sap/cux/home/PagePanel-dbg.js +86 -75
- package/src/sap/cux/home/PagePanel-dbg.js.map +1 -1
- package/src/sap/cux/home/PagePanel.d.ts +25 -3
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +1 -1
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +91 -76
- package/src/sap/cux/home/PageSettingsPanel-dbg.js +16 -15
- package/src/sap/cux/home/PageSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +15 -14
- package/src/sap/cux/home/RecentAppPanel-dbg.js +2 -2
- package/src/sap/cux/home/RecentAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +1 -1
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +2 -2
- package/src/sap/cux/home/RecommendedAppPanel-dbg.js +4 -3
- package/src/sap/cux/home/RecommendedAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +4 -2
- package/src/sap/cux/home/SettingsDialog-dbg.js +4 -3
- package/src/sap/cux/home/SettingsDialog-dbg.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +1 -1
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +4 -2
- package/src/sap/cux/home/TaskPanel-dbg.js +16 -12
- package/src/sap/cux/home/TaskPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.d.ts +1 -2
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +1 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +19 -12
- package/src/sap/cux/home/TilesPanel-dbg.js +9 -8
- package/src/sap/cux/home/TilesPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +1 -1
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +15 -8
- package/src/sap/cux/home/ToDoPanel-dbg.js +34 -25
- package/src/sap/cux/home/ToDoPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.d.ts +0 -7
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +1 -1
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +27 -29
- package/src/sap/cux/home/ToDosContainer-dbg.js +27 -18
- package/src/sap/cux/home/ToDosContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.d.ts +7 -0
- package/src/sap/cux/home/ToDosContainer.d.ts.map +1 -1
- package/src/sap/cux/home/ToDosContainer.js +1 -1
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +10 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js +84 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.ts +74 -0
- package/src/sap/cux/home/i18n/messagebundle.properties +63 -1
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_da.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_de.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_el.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +43 -246
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +31 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_es.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_et.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_id.properties +47 -5
- package/src/sap/cux/home/i18n/messagebundle_it.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_no.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_th.properties +43 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +42 -1
- package/src/sap/cux/home/interface/AppsInterface-dbg.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -3
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +5 -3
- package/src/sap/cux/home/interface/CardsInterface-dbg.js +32 -0
- package/src/sap/cux/home/interface/CardsInterface-dbg.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.d.ts +320 -55
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js +5 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +359 -55
- package/src/sap/cux/home/library-preload.js +88 -45
- package/src/sap/cux/home/library-preload.js.map +1 -1
- package/src/sap/cux/home/manifest.json +4 -4
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +1 -0
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +69 -0
- package/src/sap/cux/home/themes/base/NewsAndPagesContainer.less +37 -12
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1374 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +1 -1
- package/src/sap/cux/home/themes/base/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/base/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/base/library.css +2 -2
- package/src/sap/cux/home/themes/base/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_fiori_3/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_horizon/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_dark/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_dark/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_dark/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_horizon_hcb/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_hcb/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_horizon_hcw/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_horizon_hcw/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcw/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_hcw/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcw/library.source.less +2 -0
- package/src/sap/cux/home/utils/AppManager-dbg.js +405 -440
- package/src/sap/cux/home/utils/AppManager-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.d.ts +88 -124
- package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +1 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +351 -542
- package/src/sap/cux/home/utils/Constants-dbg.js +25 -1
- package/src/sap/cux/home/utils/Constants-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/Constants.d.ts +17 -0
- package/src/sap/cux/home/utils/Constants.d.ts.map +1 -1
- package/src/sap/cux/home/utils/Constants.js +1 -1
- package/src/sap/cux/home/utils/Constants.js.map +1 -1
- package/src/sap/cux/home/utils/Constants.ts +20 -1
- package/src/sap/cux/home/utils/Device-dbg.js +49 -1
- package/src/sap/cux/home/utils/Device-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/Device.d.ts +13 -0
- package/src/sap/cux/home/utils/Device.d.ts.map +1 -1
- package/src/sap/cux/home/utils/Device.js +1 -1
- package/src/sap/cux/home/utils/Device.js.map +1 -1
- package/src/sap/cux/home/utils/Device.ts +58 -1
- package/src/sap/cux/home/utils/InsightsUtils-dbg.js +25 -0
- package/src/sap/cux/home/utils/InsightsUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.d.ts +14 -0
- package/src/sap/cux/home/utils/InsightsUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.js +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.js.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.ts +25 -0
- package/src/sap/cux/home/utils/PerformanceUtils-dbg.js +5 -2
- package/src/sap/cux/home/utils/PerformanceUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +1 -0
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +5 -1
- package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js +1599 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts +534 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.js +6 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.js.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.ts +1945 -0
- package/src/sap/cux/home/utils/SituationUtils-dbg.js +1 -1
- package/src/sap/cux/home/utils/SituationUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/SituationUtils.js +1 -1
- package/src/sap/cux/home/utils/SituationUtils.js.map +1 -1
- package/src/sap/cux/home/utils/SituationUtils.ts +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts +4 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +2 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +126 -0
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Log from "sap/base/Log";
|
|
7
|
+
import Button from "sap/m/Button";
|
|
8
|
+
import CustomListItem from "sap/m/CustomListItem";
|
|
9
|
+
import ExpandableText from "sap/m/ExpandableText";
|
|
10
|
+
import FlexBox from "sap/m/FlexBox";
|
|
11
|
+
import GenericTile from "sap/m/GenericTile";
|
|
12
|
+
import HBox from "sap/m/HBox";
|
|
13
|
+
import Label from "sap/m/Label";
|
|
14
|
+
import { ButtonType } from "sap/m/library";
|
|
15
|
+
import List from "sap/m/List";
|
|
16
|
+
import { ListBase$SelectionChangeEvent } from "sap/m/ListBase";
|
|
17
|
+
import MessageToast from "sap/m/MessageToast";
|
|
18
|
+
import { SearchField$SearchEvent } from "sap/m/SearchField";
|
|
19
|
+
import Text from "sap/m/Text";
|
|
20
|
+
import VBox from "sap/m/VBox";
|
|
21
|
+
import Control from "sap/ui/core/Control";
|
|
22
|
+
import Fragment from "sap/ui/core/Fragment";
|
|
23
|
+
import Context from "sap/ui/model/Context";
|
|
24
|
+
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
25
|
+
import ResourceModel from "sap/ui/model/resource/ResourceModel";
|
|
26
|
+
import Container from "sap/ushell/Container";
|
|
27
|
+
import Navigation, { Target } from "sap/ushell/services/Navigation";
|
|
28
|
+
import SearchableContent, { AppData } from "sap/ushell/services/SearchableContent";
|
|
29
|
+
import VisualizationInstantiation from "sap/ushell/services/VisualizationInstantiation";
|
|
30
|
+
import AppsContainer from "./AppsContainer";
|
|
31
|
+
import BaseLayout from "./BaseLayout";
|
|
32
|
+
import BaseSettingsPanel from "./BaseSettingsPanel";
|
|
33
|
+
import ContentAdditionDialog from "./ContentAdditionDialog";
|
|
34
|
+
import FavAppPanel from "./FavAppPanel";
|
|
35
|
+
import { ICustomVisualization, ICustomVizInstance, IVisualization } from "./interface/AppsInterface";
|
|
36
|
+
import AppManager from "./utils/AppManager";
|
|
37
|
+
import { AI_APP_FINDER_API, AI_APP_FINDER_BASE_URL, CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES } from "./utils/Constants";
|
|
38
|
+
|
|
39
|
+
const Constants = {
|
|
40
|
+
DeprecatedInfoText: "deprecated",
|
|
41
|
+
MinQueryLength: 5,
|
|
42
|
+
MaxDescriptionLength: 400
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
enum SearchStatus {
|
|
46
|
+
Idle = "idle",
|
|
47
|
+
Searching = "searching",
|
|
48
|
+
Complete = "complete"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
enum ErrorType {
|
|
52
|
+
NoResultsFound = "noResultsFound",
|
|
53
|
+
ServiceError = "serviceError",
|
|
54
|
+
ValidationError = "validationError",
|
|
55
|
+
DefaultError = "defaultError"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
enum TileType {
|
|
59
|
+
Static = "STATIC"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface RawAppData {
|
|
63
|
+
title: string;
|
|
64
|
+
subTitle: string;
|
|
65
|
+
appDescription: string;
|
|
66
|
+
chipID: string;
|
|
67
|
+
tileType: TileType;
|
|
68
|
+
iconUrl: string;
|
|
69
|
+
configuration: string;
|
|
70
|
+
}
|
|
71
|
+
interface SuggestedApp {
|
|
72
|
+
icon: string;
|
|
73
|
+
title: string;
|
|
74
|
+
chipID: string;
|
|
75
|
+
status: string[];
|
|
76
|
+
subTitle: string;
|
|
77
|
+
description: string;
|
|
78
|
+
isStaticApp: boolean;
|
|
79
|
+
addedToHomePage: boolean;
|
|
80
|
+
vizData?: IVisualization;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface QueryResponse {
|
|
84
|
+
value: RawAppData[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface ErrorResponse {
|
|
88
|
+
error: {
|
|
89
|
+
code: string;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface Configuration {
|
|
95
|
+
tileConfiguration: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface TileConfig {
|
|
99
|
+
display_info_text: string;
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* Class for Apps Addition Panel in MyHome.
|
|
106
|
+
*
|
|
107
|
+
* @extends BaseSettingsPanel
|
|
108
|
+
*
|
|
109
|
+
* @author SAP SE
|
|
110
|
+
* @version 0.0.1
|
|
111
|
+
* @since 1.136
|
|
112
|
+
*
|
|
113
|
+
* @internal
|
|
114
|
+
* @experimental Since 1.136
|
|
115
|
+
* @private
|
|
116
|
+
*
|
|
117
|
+
* @alias sap.cux.home.AppsAdditionPanel
|
|
118
|
+
*/
|
|
119
|
+
export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
120
|
+
private appManagerInstance: AppManager = AppManager.getInstance();
|
|
121
|
+
private vizInstantiationService!: VisualizationInstantiation;
|
|
122
|
+
private allAvailableVisualizations!: IVisualization[];
|
|
123
|
+
private userSelectedApps!: Set<CustomListItem>;
|
|
124
|
+
private appSuggestionList!: List;
|
|
125
|
+
private model!: JSONModel;
|
|
126
|
+
private addAppsButton!: Button;
|
|
127
|
+
private isPanelSupported!: boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Init lifecycle method
|
|
131
|
+
*
|
|
132
|
+
* @public
|
|
133
|
+
* @override
|
|
134
|
+
*/
|
|
135
|
+
public init(): void {
|
|
136
|
+
super.init();
|
|
137
|
+
this.userSelectedApps = new Set<CustomListItem>();
|
|
138
|
+
|
|
139
|
+
//setup panel
|
|
140
|
+
this.setProperty("key", CONTENT_ADDITION_PANEL_TYPES.AI_APP_FINDER);
|
|
141
|
+
this.setProperty("title", this._i18nBundle.getText("addAppsAndTile"));
|
|
142
|
+
|
|
143
|
+
//setup actions
|
|
144
|
+
this._setupActions();
|
|
145
|
+
|
|
146
|
+
//setup content
|
|
147
|
+
void this._setupContent();
|
|
148
|
+
|
|
149
|
+
//setup events
|
|
150
|
+
this.attachEvent("onDialogClose", this.resetPanel.bind(this));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Sets up the actions for the Apps Addition Panel.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
private _setupActions(): void {
|
|
159
|
+
this.addAppsButton = new Button(`${this.getId()}-add-app-btn`, {
|
|
160
|
+
text: this._i18nBundle.getText("addFromInsightsDialogBtn"),
|
|
161
|
+
type: ButtonType.Emphasized,
|
|
162
|
+
press: () => {
|
|
163
|
+
void this.onPressAddApps();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
this.addAppsButton.bindProperty("enabled", {
|
|
168
|
+
parts: ["/hasError", "/searchStatus", "/userSelectedApps"],
|
|
169
|
+
formatter: (hasError: boolean, searchStatus: SearchStatus, userSelectedApps: string[]) => {
|
|
170
|
+
return !hasError && searchStatus === SearchStatus.Complete && userSelectedApps.length > 0;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
this.addActionButton(this.addAppsButton);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Sets up the content for the Apps Addition Panel.
|
|
179
|
+
*
|
|
180
|
+
* @private
|
|
181
|
+
* @async
|
|
182
|
+
*/
|
|
183
|
+
private async _setupContent(): Promise<void> {
|
|
184
|
+
this.vizInstantiationService = await Container.getServiceAsync<VisualizationInstantiation>("VisualizationInstantiation");
|
|
185
|
+
|
|
186
|
+
//load ui fragment
|
|
187
|
+
const panelContent = (await Fragment.load({
|
|
188
|
+
id: `${this.getId()}-content`,
|
|
189
|
+
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
190
|
+
controller: this
|
|
191
|
+
})) as Control;
|
|
192
|
+
this.addAggregation("content", panelContent);
|
|
193
|
+
|
|
194
|
+
//initialize ui model
|
|
195
|
+
this.model = new JSONModel({
|
|
196
|
+
query: "",
|
|
197
|
+
hasError: false,
|
|
198
|
+
errorType: ErrorType.DefaultError,
|
|
199
|
+
errorDescription: "",
|
|
200
|
+
searchStatus: SearchStatus.Idle,
|
|
201
|
+
loadingAnimation: this._generateSearchingAnimation(),
|
|
202
|
+
suggestedAppsCount: 0,
|
|
203
|
+
userSelectedApps: [],
|
|
204
|
+
suggestedApps: []
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
panelContent.setModel(this.model);
|
|
208
|
+
panelContent.setModel(new ResourceModel({ bundleName: "sap.cux.home.i18n.messagebundle" }), "i18n");
|
|
209
|
+
this.addAppsButton.setModel(this.model);
|
|
210
|
+
|
|
211
|
+
//bind suggested apps list
|
|
212
|
+
this.appSuggestionList = Fragment.byId(`${this.getId()}-content`, "appsList") as List;
|
|
213
|
+
this.appSuggestionList.bindAggregation("items", {
|
|
214
|
+
path: "/suggestedApps",
|
|
215
|
+
factory: this._generateListItem.bind(this)
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Generates a list item for the Apps Addition Panel.
|
|
221
|
+
*
|
|
222
|
+
* @private
|
|
223
|
+
* @param {string} id - The unique ID for the list item.
|
|
224
|
+
* @param {Context} context - The binding context for the list item.
|
|
225
|
+
* @returns {CustomListItem} The generated list item control.
|
|
226
|
+
*/
|
|
227
|
+
private _generateListItem(id: string, context: Context): CustomListItem {
|
|
228
|
+
const listItem = new CustomListItem(id, {
|
|
229
|
+
selected: context.getProperty("addedToHomePage") as boolean,
|
|
230
|
+
content: [
|
|
231
|
+
new FlexBox(`${id}-result-container`, {
|
|
232
|
+
renderType: "Bare",
|
|
233
|
+
wrap: "Wrap",
|
|
234
|
+
direction: context.getProperty("isStaticApp") ? "Column" : "Row",
|
|
235
|
+
alignItems: context.getProperty("isStaticApp") ? "Start" : "Center",
|
|
236
|
+
items: [this._getAppPreviewContainer(id, context), this._getAppDetailsContainer(id, context)]
|
|
237
|
+
}).addStyleClass("sapUiSmallMargin")
|
|
238
|
+
]
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
//bind associated checkbox to disable it when the app is already added to home page
|
|
242
|
+
listItem.getMultiSelectControl(true).setEnabled(!context.getProperty("addedToHomePage"));
|
|
243
|
+
|
|
244
|
+
return listItem;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Creates a preview container for the suggested app.
|
|
249
|
+
*
|
|
250
|
+
* @private
|
|
251
|
+
* @param {string} id - The unique ID for the container.
|
|
252
|
+
* @param {Context} context - The binding context for the app.
|
|
253
|
+
* @returns {HBox} The app preview container.
|
|
254
|
+
*/
|
|
255
|
+
private _getAppPreviewContainer(id: string, context: Context): HBox {
|
|
256
|
+
const container = new HBox(`${id}-suggestedAppContainer`, {
|
|
257
|
+
renderType: "Bare"
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
if (context.getProperty("isStaticApp") as boolean) {
|
|
261
|
+
// create generic tile for static app
|
|
262
|
+
container.addItem(
|
|
263
|
+
new GenericTile(`${id}-staticApp`, {
|
|
264
|
+
mode: "IconMode",
|
|
265
|
+
frameType: "TwoByHalf",
|
|
266
|
+
header: context.getProperty("title") as string,
|
|
267
|
+
subheader: context.getProperty("subTitle") as string,
|
|
268
|
+
tileIcon: context.getProperty("icon") as string,
|
|
269
|
+
visible: context.getProperty("isStaticApp") as boolean
|
|
270
|
+
}).addStyleClass("suggestedTile")
|
|
271
|
+
);
|
|
272
|
+
} else {
|
|
273
|
+
// create custom visualization for other apps
|
|
274
|
+
const instance = this.vizInstantiationService.instantiateVisualization(
|
|
275
|
+
context.getProperty("vizData") as ICustomVisualization
|
|
276
|
+
) as ICustomVizInstance;
|
|
277
|
+
instance?.setActive(true);
|
|
278
|
+
instance.setClickable(false);
|
|
279
|
+
container.addItem(instance);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return container;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Creates a details container for the suggested app.
|
|
287
|
+
*
|
|
288
|
+
* @private
|
|
289
|
+
* @param {string} id - The unique ID for the container.
|
|
290
|
+
* @param {Context} context - The binding context for the app.
|
|
291
|
+
* @returns {VBox} The app details container.
|
|
292
|
+
*/
|
|
293
|
+
private _getAppDetailsContainer(id: string, context: Context): VBox {
|
|
294
|
+
return new VBox(`${id}-app-details-container`, {
|
|
295
|
+
renderType: "Bare",
|
|
296
|
+
gap: "0.5rem",
|
|
297
|
+
items: [
|
|
298
|
+
new Label(`${id}-descriptionLabel`, {
|
|
299
|
+
text: this._i18nBundle.getText("appDescription"),
|
|
300
|
+
showColon: true
|
|
301
|
+
}),
|
|
302
|
+
new ExpandableText(`${id}-description`, {
|
|
303
|
+
text: context.getProperty("description") as string,
|
|
304
|
+
maxCharacters: Constants.MaxDescriptionLength
|
|
305
|
+
}),
|
|
306
|
+
new HBox(`${id}-app-status-container`, {
|
|
307
|
+
renderType: "Bare",
|
|
308
|
+
visible: (context.getProperty("status") as string[]).length > 0,
|
|
309
|
+
items: [
|
|
310
|
+
new Label(`${id}-appStatusLabel`, {
|
|
311
|
+
text: this._i18nBundle.getText("appStatus"),
|
|
312
|
+
showColon: true
|
|
313
|
+
}),
|
|
314
|
+
new HBox(`${id}-app-status-texts`, {
|
|
315
|
+
renderType: "Bare",
|
|
316
|
+
items: this._generateStatusTexts(context.getProperty("status") as string[])
|
|
317
|
+
}).addStyleClass("sapUiTinyMarginBegin statusTextsContainer")
|
|
318
|
+
]
|
|
319
|
+
})
|
|
320
|
+
]
|
|
321
|
+
}).addStyleClass((context.getProperty("isStaticApp") as boolean) ? "sapUiSmallMarginTop" : "sapUiSmallMarginBegin");
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Checks if the Apps Addition Panel is supported. Internally, it checks if the
|
|
326
|
+
* AI Smart App Finder feature toggle is enabled and if the associated application
|
|
327
|
+
* is accessible for the user.
|
|
328
|
+
*
|
|
329
|
+
* @public
|
|
330
|
+
* @override
|
|
331
|
+
* @async
|
|
332
|
+
* @returns {Promise<boolean>} A promise that resolves to a boolean indicating support.
|
|
333
|
+
*/
|
|
334
|
+
public async isSupported(): Promise<boolean> {
|
|
335
|
+
if (this.isPanelSupported === undefined) {
|
|
336
|
+
this.isPanelSupported = false;
|
|
337
|
+
|
|
338
|
+
if (this.getFavAppPanel()) {
|
|
339
|
+
try {
|
|
340
|
+
const isFeatureEnabled = await this.appManagerInstance.isFeatureEnabled(FEATURE_TOGGLES.AI_SMART_APPFINDER);
|
|
341
|
+
if (isFeatureEnabled) {
|
|
342
|
+
const navigationService = await Container.getServiceAsync<Navigation>("Navigation");
|
|
343
|
+
const [{ supported }] = await navigationService.isNavigationSupported([
|
|
344
|
+
{
|
|
345
|
+
target: {
|
|
346
|
+
semanticObject: "IntelligentPrompt",
|
|
347
|
+
action: "propose"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
]);
|
|
351
|
+
|
|
352
|
+
this.isPanelSupported = supported;
|
|
353
|
+
}
|
|
354
|
+
} catch (error) {
|
|
355
|
+
Log.error((error as Error).message);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
//remove panel if it's not supported
|
|
361
|
+
if (!this.isPanelSupported) {
|
|
362
|
+
this.removeActionButton(this.addAppsButton);
|
|
363
|
+
const contentAdditionDialog = this.getParent() as ContentAdditionDialog;
|
|
364
|
+
contentAdditionDialog.removePanel(this);
|
|
365
|
+
contentAdditionDialog.updateActionButtons();
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return this.isPanelSupported;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Generates the searching animation SVG as a string.
|
|
373
|
+
*
|
|
374
|
+
* @private
|
|
375
|
+
* @returns {string} The SVG string for the loading animation.
|
|
376
|
+
*/
|
|
377
|
+
private _generateSearchingAnimation(): string {
|
|
378
|
+
return `<svg height="210" fill="none">
|
|
379
|
+
<g>
|
|
380
|
+
<rect height="210" rx="4" fill="white"/>
|
|
381
|
+
<rect x="16" y="143" width="90%" height="8" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
382
|
+
<rect x="16" y="103" width="84%" height="32" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
383
|
+
<rect x="16" y="33" width="90%" height="8" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
384
|
+
<rect x="16" y="16" width="96%" height="12" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
385
|
+
</g>
|
|
386
|
+
</svg>`;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Resets the panel to its default state.
|
|
391
|
+
*
|
|
392
|
+
* @private
|
|
393
|
+
*/
|
|
394
|
+
public resetPanel(): void {
|
|
395
|
+
const defaultModelProperties = {
|
|
396
|
+
query: "",
|
|
397
|
+
hasError: false,
|
|
398
|
+
searchStatus: SearchStatus.Idle,
|
|
399
|
+
suggestedAppsCount: 0,
|
|
400
|
+
userSelectedApps: [],
|
|
401
|
+
suggestedApps: []
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
this.model.setData({ ...this.model.getData(), ...defaultModelProperties } as object);
|
|
405
|
+
this.userSelectedApps.clear();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Handles the "Go" button press event for searching suggested apps.
|
|
410
|
+
*
|
|
411
|
+
* @private
|
|
412
|
+
* @async
|
|
413
|
+
* @param {SearchField$SearchEvent} event - The search event triggered by the user.
|
|
414
|
+
*/
|
|
415
|
+
public async onPressGo(event: SearchField$SearchEvent): Promise<void> {
|
|
416
|
+
// reset panel if clear button is pressed
|
|
417
|
+
if (event.getParameter("clearButtonPressed")) {
|
|
418
|
+
this.resetPanel();
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// validate query
|
|
423
|
+
const query = this.model.getProperty("/query") as string;
|
|
424
|
+
if (!this.isValidQuery(query)) return;
|
|
425
|
+
|
|
426
|
+
try {
|
|
427
|
+
// initiate search
|
|
428
|
+
this.model.setProperty("/hasError", false);
|
|
429
|
+
this.model.setProperty("/searchStatus", SearchStatus.Searching);
|
|
430
|
+
this.appSuggestionList.removeSelections(true);
|
|
431
|
+
|
|
432
|
+
const rawApps = await this.fetchAppsFromSearch(query);
|
|
433
|
+
// suggest apps if there are results and search is not cancelled
|
|
434
|
+
if (rawApps.length > 0 && this.model.getProperty("/searchStatus") === SearchStatus.Searching) {
|
|
435
|
+
const allVisualizations = await this.fetchAllAvailableVisualizations();
|
|
436
|
+
const favoriteApps = await this.appManagerInstance.fetchFavVizs(true, true);
|
|
437
|
+
const insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText("insights") as string);
|
|
438
|
+
|
|
439
|
+
// generate suggested apps
|
|
440
|
+
const apps = this._generateApps(rawApps, allVisualizations, [...favoriteApps, ...insightsApps]);
|
|
441
|
+
const suggestedApps = await this._filterUnsupportedApps(apps);
|
|
442
|
+
|
|
443
|
+
// update model with filtered apps
|
|
444
|
+
this.model.setProperty("/suggestedApps", suggestedApps);
|
|
445
|
+
this.model.setProperty("/suggestedAppsCount", suggestedApps.length);
|
|
446
|
+
}
|
|
447
|
+
} catch (err) {
|
|
448
|
+
Log.error((err as Error).message);
|
|
449
|
+
this._handleError();
|
|
450
|
+
} finally {
|
|
451
|
+
// update search status only if search is not cancelled
|
|
452
|
+
if (this.model.getProperty("/searchStatus") === SearchStatus.Searching) {
|
|
453
|
+
this.model.setProperty("/searchStatus", SearchStatus.Complete);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Filters out unsupported apps based on accessibility.
|
|
460
|
+
*
|
|
461
|
+
* @private
|
|
462
|
+
* @param {SuggestedApp[]} apps - The list of suggested apps to filter.
|
|
463
|
+
* @returns {Promise<SuggestedApp[]>} A promise that resolves to the filtered list of supported apps.
|
|
464
|
+
*/
|
|
465
|
+
private async _filterUnsupportedApps(apps: SuggestedApp[]): Promise<SuggestedApp[]> {
|
|
466
|
+
const intents = apps.map((app) => app.vizData?.target) || [];
|
|
467
|
+
const navigationService = await Container.getServiceAsync<Navigation>("Navigation");
|
|
468
|
+
const supportedAppIndices = await navigationService.isNavigationSupported(intents as Target[]);
|
|
469
|
+
|
|
470
|
+
return apps.filter((_, index) => supportedAppIndices[index]);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Generates suggested apps from raw app data and visualizations.
|
|
475
|
+
*
|
|
476
|
+
* @private
|
|
477
|
+
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
478
|
+
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
479
|
+
* @param {ICustomVisualization[]} homePageVisualizations - Visualizations available in homepage.
|
|
480
|
+
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
481
|
+
*/
|
|
482
|
+
private _generateApps(
|
|
483
|
+
rawApps: RawAppData[],
|
|
484
|
+
allVisualizations: IVisualization[],
|
|
485
|
+
homePageVisualizations: ICustomVisualization[]
|
|
486
|
+
): SuggestedApp[] {
|
|
487
|
+
return rawApps.map((app) => {
|
|
488
|
+
const vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);
|
|
489
|
+
const addedToHomePage = homePageVisualizations.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
490
|
+
return {
|
|
491
|
+
title: app.title,
|
|
492
|
+
chipID: app.chipID,
|
|
493
|
+
subTitle: app.subTitle,
|
|
494
|
+
description: app.appDescription,
|
|
495
|
+
icon: app.iconUrl,
|
|
496
|
+
vizData,
|
|
497
|
+
addedToHomePage,
|
|
498
|
+
isStaticApp: app.tileType === TileType.Static,
|
|
499
|
+
status: this.getAppStatusTexts(app.configuration, addedToHomePage)
|
|
500
|
+
};
|
|
501
|
+
}) as SuggestedApp[];
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Validates the query string based on minimum length.
|
|
506
|
+
*
|
|
507
|
+
* @private
|
|
508
|
+
* @param {string} query - The query string to validate.
|
|
509
|
+
* @returns {boolean} True if the query is valid, otherwise false.
|
|
510
|
+
*/
|
|
511
|
+
private isValidQuery(query: string): boolean {
|
|
512
|
+
return Boolean(query?.trim() && query.trim().length >= Constants.MinQueryLength);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Fetches all available visualizations for the user.
|
|
517
|
+
*
|
|
518
|
+
* @private
|
|
519
|
+
* @async
|
|
520
|
+
* @returns {Promise<IVisualization[]>} A promise that resolves to the list of visualizations.
|
|
521
|
+
*/
|
|
522
|
+
private async fetchAllAvailableVisualizations(): Promise<IVisualization[]> {
|
|
523
|
+
if (!this.allAvailableVisualizations) {
|
|
524
|
+
const searchableContentService = await Container.getServiceAsync<SearchableContent>("SearchableContent");
|
|
525
|
+
const allAvailableApps = await searchableContentService.getApps({ enableVisualizationPreview: false });
|
|
526
|
+
this.allAvailableVisualizations = allAvailableApps.reduce((visualizations: IVisualization[], currentApp: AppData) => {
|
|
527
|
+
return visualizations.concat(currentApp.visualizations);
|
|
528
|
+
}, []);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return this.allAvailableVisualizations;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Fetches a CSRF token for secure API requests.
|
|
536
|
+
*
|
|
537
|
+
* @private
|
|
538
|
+
* @async
|
|
539
|
+
* @returns {Promise<string | null>} A promise that resolves to the CSRF token or null if fetching fails.
|
|
540
|
+
*/
|
|
541
|
+
private async _fetchCSRFToken(): Promise<string | null> {
|
|
542
|
+
try {
|
|
543
|
+
const response = await fetch(AI_APP_FINDER_BASE_URL, { method: "GET", headers: { "X-CSRF-Token": "Fetch" } });
|
|
544
|
+
return response.headers.get("X-CSRF-Token");
|
|
545
|
+
} catch (error) {
|
|
546
|
+
Log.error("Failed to fetch CSRF token", error as Error);
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Fetches apps from the search API based on the query.
|
|
553
|
+
*
|
|
554
|
+
* @private
|
|
555
|
+
* @async
|
|
556
|
+
* @param {string} query - The search query string.
|
|
557
|
+
* @returns {Promise<RawAppData[]>} A promise that resolves to the list of raw app data.
|
|
558
|
+
*/
|
|
559
|
+
private async fetchAppsFromSearch(query: string): Promise<RawAppData[]> {
|
|
560
|
+
try {
|
|
561
|
+
const token = await this._fetchCSRFToken();
|
|
562
|
+
const headers = {
|
|
563
|
+
"Content-Type": "application/json",
|
|
564
|
+
...(token && { "X-CSRF-Token": token })
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
const response = await fetch(AI_APP_FINDER_API, {
|
|
568
|
+
method: "POST",
|
|
569
|
+
headers,
|
|
570
|
+
body: JSON.stringify({ UserInput: query })
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
// handle error responses
|
|
574
|
+
if (!response.ok) {
|
|
575
|
+
const errorResponse = (await response.json()) as ErrorResponse;
|
|
576
|
+
this._handleError(errorResponse.error?.message || "");
|
|
577
|
+
return [];
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
const queryResult = (await response.json()) as QueryResponse;
|
|
581
|
+
return queryResult.value || [];
|
|
582
|
+
} catch (error) {
|
|
583
|
+
Log.error((error as Error).message);
|
|
584
|
+
this._handleError();
|
|
585
|
+
return [];
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Retrieves status texts for an app based on its configuration and homepage status.
|
|
591
|
+
*
|
|
592
|
+
* @private
|
|
593
|
+
* @param {string} configuration - The app's configuration string.
|
|
594
|
+
* @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.
|
|
595
|
+
* @returns {string[]} An array of status texts for the app.
|
|
596
|
+
*/
|
|
597
|
+
private getAppStatusTexts(configuration: string, addedToHomePage: boolean): string[] {
|
|
598
|
+
let statusTexts = [];
|
|
599
|
+
|
|
600
|
+
if (addedToHomePage) {
|
|
601
|
+
statusTexts.push(this._i18nBundle.getText("alreadyAddedApp") as string);
|
|
602
|
+
}
|
|
603
|
+
if (configuration) {
|
|
604
|
+
try {
|
|
605
|
+
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
606
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
607
|
+
const infoText = (tileConfig?.display_info_text || "").toLowerCase();
|
|
608
|
+
if (infoText === Constants.DeprecatedInfoText) {
|
|
609
|
+
statusTexts.push(this._i18nBundle.getText("deprecatedApp") as string);
|
|
610
|
+
}
|
|
611
|
+
} catch (error: unknown) {
|
|
612
|
+
Log.warning((error as Error).message);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
return statusTexts;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Generates status text controls for the provided status texts.
|
|
621
|
+
*
|
|
622
|
+
* @private
|
|
623
|
+
* @param {string[]} stausTexts - The list of status texts.
|
|
624
|
+
* @returns {Text[]} An array of Text controls with applied styles.
|
|
625
|
+
*/
|
|
626
|
+
private _generateStatusTexts(stausTexts: string[]): Text[] {
|
|
627
|
+
return stausTexts.map((status) => {
|
|
628
|
+
return new Text({
|
|
629
|
+
text: this._i18nBundle.getText(status)
|
|
630
|
+
}).addStyleClass(this.applyStatusClass(status));
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Applies a CSS class to the status text based on its type.
|
|
636
|
+
*
|
|
637
|
+
* @private
|
|
638
|
+
* @param {string} status - The status text to classify.
|
|
639
|
+
* @returns {string} The CSS class for the status text.
|
|
640
|
+
*/
|
|
641
|
+
public applyStatusClass(status: string): string {
|
|
642
|
+
if (status === this._i18nBundle.getText("alreadyAddedApp")) {
|
|
643
|
+
return "addedAppStatusText";
|
|
644
|
+
} else if (status === this._i18nBundle.getText("deprecatedApp")) {
|
|
645
|
+
return "deprecatedAppStatusText";
|
|
646
|
+
} else {
|
|
647
|
+
return "";
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Handles the "Add Apps" button press event to add selected apps to favorites.
|
|
653
|
+
*
|
|
654
|
+
* @private
|
|
655
|
+
* @async
|
|
656
|
+
*/
|
|
657
|
+
private async onPressAddApps(): Promise<void> {
|
|
658
|
+
const userSelectedApps = this.model.getProperty("/userSelectedApps") as CustomListItem[];
|
|
659
|
+
const vizIds = userSelectedApps.map((item) => item.getBindingContext()?.getProperty("chipID") as string);
|
|
660
|
+
for (const vizId of vizIds) {
|
|
661
|
+
await this.appManagerInstance.addVisualization(vizId);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// refresh the favorite apps panel
|
|
665
|
+
await this.refreshFavoriteApps();
|
|
666
|
+
(this.getParent() as ContentAdditionDialog).close();
|
|
667
|
+
MessageToast.show(this._i18nBundle.getText("appAddedToFavorites") as string);
|
|
668
|
+
this.resetPanel();
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Retrieves the AppsContainer instance from the parent layout.
|
|
673
|
+
*
|
|
674
|
+
* @private
|
|
675
|
+
* @returns {AppsContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
676
|
+
*/
|
|
677
|
+
private getAppsContainer(): AppsContainer | undefined {
|
|
678
|
+
const layout = this.getParent()?.getParent() as BaseLayout;
|
|
679
|
+
return layout.getContent().find((container) => container instanceof AppsContainer) as AppsContainer | undefined;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Retrieves the favorite apps panel from the AppsContainer.
|
|
684
|
+
*
|
|
685
|
+
* @private
|
|
686
|
+
* @returns {FavAppPanel | undefined} The favorite apps panel or undefined if not found.
|
|
687
|
+
*/
|
|
688
|
+
private getFavAppPanel(): FavAppPanel | undefined {
|
|
689
|
+
return this.getAppsContainer()
|
|
690
|
+
?.getContent()
|
|
691
|
+
.find((panel) => panel instanceof FavAppPanel);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Refreshes the favorite apps panel in the AppsContainer.
|
|
696
|
+
*
|
|
697
|
+
* @private
|
|
698
|
+
* @async
|
|
699
|
+
*/
|
|
700
|
+
private async refreshFavoriteApps(): Promise<void> {
|
|
701
|
+
await this.getAppsContainer()?.refreshPanel(this.getFavAppPanel() as FavAppPanel);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Handles the selection change event for the suggested apps list.
|
|
706
|
+
*
|
|
707
|
+
* @public
|
|
708
|
+
* @param {ListBase$SelectionChangeEvent} event - The selection change event.
|
|
709
|
+
*/
|
|
710
|
+
public onListSelectionChange(event: ListBase$SelectionChangeEvent): void {
|
|
711
|
+
const listItem = event.getParameter("listItem") as CustomListItem;
|
|
712
|
+
const selected = event.getParameter("selected") as boolean;
|
|
713
|
+
|
|
714
|
+
if (!selected) this.userSelectedApps.delete(listItem);
|
|
715
|
+
else {
|
|
716
|
+
const context = listItem.getBindingContext();
|
|
717
|
+
const addedToHomePage = context?.getProperty("addedToHomePage") as boolean;
|
|
718
|
+
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Handles errors by updating the model with error details.
|
|
726
|
+
*
|
|
727
|
+
* @private
|
|
728
|
+
* @param {string} [message=""] - The error message to process.
|
|
729
|
+
*/
|
|
730
|
+
private _handleError(message: string = ""): void {
|
|
731
|
+
const [, errorCode, errorDescription] = message.match(/\((\d{2})\d*\)\s*(.*)/) || [];
|
|
732
|
+
this.model.setProperty("/hasError", true);
|
|
733
|
+
this.model.setProperty("/errorType", this._getErrorType(errorCode));
|
|
734
|
+
this.model.setProperty("/errorDescription", errorDescription || "");
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Determines the error type based on the provided error code.
|
|
739
|
+
*
|
|
740
|
+
* @private
|
|
741
|
+
* @param {string} [errorCode=""] - The error code to evaluate.
|
|
742
|
+
* @returns {ErrorType} The corresponding error type.
|
|
743
|
+
*/
|
|
744
|
+
private _getErrorType(errorCode: string = ""): ErrorType {
|
|
745
|
+
switch (errorCode) {
|
|
746
|
+
case "10":
|
|
747
|
+
return ErrorType.ServiceError;
|
|
748
|
+
case "20":
|
|
749
|
+
case "40":
|
|
750
|
+
return ErrorType.NoResultsFound;
|
|
751
|
+
case "30":
|
|
752
|
+
return ErrorType.ValidationError;
|
|
753
|
+
default:
|
|
754
|
+
return ErrorType.DefaultError;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|