@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
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import Log from "sap/base/Log";
|
|
7
|
-
import Formatting from "sap/base/i18n/Formatting";
|
|
8
7
|
import ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
9
8
|
import VersionInfo from "sap/ui/VersionInfo";
|
|
10
9
|
import BaseObject from "sap/ui/base/Object";
|
|
11
|
-
import
|
|
12
|
-
import ODataMetaModel, { EntitySet, EntityType, Property } from "sap/ui/model/odata/ODataMetaModel";
|
|
10
|
+
import ODataMetaModel, { Property } from "sap/ui/model/odata/ODataMetaModel";
|
|
13
11
|
import ODataModelV2 from "sap/ui/model/odata/v2/ODataModel";
|
|
14
12
|
import Config from "sap/ushell/Config";
|
|
15
13
|
import Container from "sap/ushell/Container";
|
|
@@ -26,11 +24,24 @@ import {
|
|
|
26
24
|
ISectionAndVisualization,
|
|
27
25
|
IVisualization
|
|
28
26
|
} from "../interface/AppsInterface";
|
|
29
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
IAppInfo,
|
|
29
|
+
IAppInfoData,
|
|
30
|
+
IAppManifest,
|
|
31
|
+
ICard,
|
|
32
|
+
ICardDetails,
|
|
33
|
+
ICardManifest,
|
|
34
|
+
IEntitySet,
|
|
35
|
+
IEntityType,
|
|
36
|
+
IHeaderInfo,
|
|
37
|
+
IPageType,
|
|
38
|
+
IVersionInfo,
|
|
39
|
+
PageRecord
|
|
40
|
+
} from "../interface/CardsInterface";
|
|
30
41
|
import { IPage } from "../interface/PageSpaceInterface";
|
|
31
42
|
import { AnalyticalCardSkeleton } from "./AnalyticalCardSkeleton";
|
|
32
|
-
import { CardSkeleton } from "./CardSkeleton";
|
|
33
43
|
import {
|
|
44
|
+
COLUMN_LENGTH,
|
|
34
45
|
DEFAULT_BG_COLOR,
|
|
35
46
|
FALLBACK_ICON,
|
|
36
47
|
FEATURE_TOGGLES,
|
|
@@ -41,8 +52,9 @@ import {
|
|
|
41
52
|
RECOMMENDATION_SRVC_URL,
|
|
42
53
|
RECOMMENDED_CARD_LIMIT
|
|
43
54
|
} from "./Constants";
|
|
44
|
-
import { createBookMarkData, getLeanURL
|
|
55
|
+
import { createBookMarkData, getLeanURL } from "./DataFormatUtils";
|
|
45
56
|
import HttpHelper from "./HttpHelper";
|
|
57
|
+
import RecommendedCardUtil from "./RecommendedCardUtil";
|
|
46
58
|
|
|
47
59
|
const CONSTANTS = {
|
|
48
60
|
MUST_INCLUDE_RECOMMEDED_APPS: ["F0862", "F1823"] //My Inbox and Manage Timesheet apps
|
|
@@ -52,57 +64,14 @@ interface IFeatureToggles {
|
|
|
52
64
|
TASK_ACTIONS: string;
|
|
53
65
|
}
|
|
54
66
|
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
settings?: {
|
|
59
|
-
tableSettings?: {
|
|
60
|
-
addCardtoInsightsHidden?: boolean;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
entitySet?: IEntitySet;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface IEntitySet extends EntitySet {
|
|
68
|
-
"Org.OData.Capabilities.V1.FilterRestrictions"?: {
|
|
69
|
-
RequiredProperties?: Array<unknown>;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface IEntityType extends EntityType {
|
|
74
|
-
"com.sap.vocabularies.UI.v1.LineItem": Array<ILineItemContext>;
|
|
75
|
-
"sap:semantics": string;
|
|
76
|
-
"com.sap.vocabularies.Common.v1.SemanticKey": Array<{
|
|
77
|
-
PropertyPath: string;
|
|
78
|
-
}>;
|
|
79
|
-
"com.sap.vocabularies.UI.v1.TextArrangement": {
|
|
80
|
-
EnumMember: string;
|
|
81
|
-
};
|
|
82
|
-
"com.sap.vocabularies.Common.v1.Label": {
|
|
83
|
-
String: string;
|
|
84
|
-
};
|
|
85
|
-
property: Property[];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
interface ILineItemContext {
|
|
89
|
-
Value: {
|
|
90
|
-
Path: string;
|
|
91
|
-
};
|
|
92
|
-
"com.sap.vocabularies.UI.v1.Importance": string;
|
|
93
|
-
"com.sap.vocabularies.UI.v1.Hidden": {
|
|
94
|
-
Bool: boolean;
|
|
95
|
-
};
|
|
67
|
+
interface ICombinedManifestDetails {
|
|
68
|
+
manifest: IValidManifest;
|
|
69
|
+
metaModel: ODataMetaModel;
|
|
96
70
|
}
|
|
97
71
|
|
|
98
|
-
interface
|
|
99
|
-
cardTitle?: string;
|
|
100
|
-
subTitle: string;
|
|
72
|
+
interface IValidManifest {
|
|
101
73
|
url: string;
|
|
102
|
-
|
|
103
|
-
action: string;
|
|
104
|
-
id?: string;
|
|
105
|
-
columns: Array<unknown>;
|
|
74
|
+
manifest: IAppManifest;
|
|
106
75
|
}
|
|
107
76
|
|
|
108
77
|
const _parseSBParameters = (oParam: object | string | undefined): IParseSBParameters | undefined => {
|
|
@@ -228,6 +197,7 @@ const _isVisualizationAlreadyAdded = (visualization: ICustomVisualization, favor
|
|
|
228
197
|
*
|
|
229
198
|
* @alias sap.cux.home.util.AppManager
|
|
230
199
|
*/
|
|
200
|
+
|
|
231
201
|
export default class AppManager extends BaseObject {
|
|
232
202
|
private aRequestQueue: { pageId: string; pageLoadPromise: Promise<IPage> }[] = [];
|
|
233
203
|
private _oMoveAppsPromise!: Promise<void>;
|
|
@@ -235,18 +205,20 @@ export default class AppManager extends BaseObject {
|
|
|
235
205
|
public insightsSectionIndex!: number;
|
|
236
206
|
static Instance: AppManager;
|
|
237
207
|
private recommendedFioriIds!: string[];
|
|
238
|
-
private versionInfo!:
|
|
239
|
-
version: string;
|
|
240
|
-
buildTimestamp: string;
|
|
241
|
-
};
|
|
208
|
+
private versionInfo!: IVersionInfo;
|
|
242
209
|
private _RBManifestMap!: Record<string, ResourceBundle>;
|
|
243
210
|
private _recommendedVisualizations!: ICustomVisualization[];
|
|
244
211
|
private vizDataModified: boolean = false;
|
|
245
212
|
private _oVizCacheData: { [key: string]: ICustomVizInstance } = {};
|
|
246
213
|
private _favPageVisualizations: ICustomVisualization[] = [];
|
|
214
|
+
private componentData: IAppInfo = {};
|
|
215
|
+
private fioriAppData: IAppInfo = {};
|
|
216
|
+
private recommendedUtilInstance: RecommendedCardUtil;
|
|
217
|
+
private catalogAppData!: Promise<AppData[]> | undefined;
|
|
247
218
|
|
|
248
219
|
private constructor() {
|
|
249
220
|
super();
|
|
221
|
+
this.recommendedUtilInstance = RecommendedCardUtil.getInstance();
|
|
250
222
|
}
|
|
251
223
|
|
|
252
224
|
static getInstance() {
|
|
@@ -766,6 +738,17 @@ export default class AppManager extends BaseObject {
|
|
|
766
738
|
}
|
|
767
739
|
}
|
|
768
740
|
|
|
741
|
+
/**
|
|
742
|
+
* Checks if a specific URL parameter is enabled (set to "true").
|
|
743
|
+
*
|
|
744
|
+
* @param {string} param - The name of the URL parameter to check.
|
|
745
|
+
* @returns {boolean} `true` if the URL parameter exists and is set to "true" (case-insensitive), otherwise `false`.
|
|
746
|
+
*/
|
|
747
|
+
public isURLParamEnabled(param: string): boolean {
|
|
748
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
749
|
+
return urlParams?.get(param)?.toLowerCase() === "true" || false;
|
|
750
|
+
}
|
|
751
|
+
|
|
769
752
|
/**
|
|
770
753
|
* Fetch Recommended Fiori IDs
|
|
771
754
|
*
|
|
@@ -798,24 +781,18 @@ export default class AppManager extends BaseObject {
|
|
|
798
781
|
* @private
|
|
799
782
|
*/
|
|
800
783
|
public async _getCatalogApps() {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
784
|
+
if (!this.catalogAppData) {
|
|
785
|
+
try {
|
|
786
|
+
const SearchableContent = await Container.getServiceAsync<SearchableContent>("SearchableContent");
|
|
787
|
+
this.catalogAppData = SearchableContent.getApps({ includeAppsWithoutVisualizations: false });
|
|
788
|
+
return this.catalogAppData;
|
|
789
|
+
} catch (error) {
|
|
790
|
+
this.catalogAppData = undefined;
|
|
791
|
+
Log.error(error instanceof Error ? "Error while fetching catalog apps:" + error.message : String(error));
|
|
792
|
+
return [];
|
|
793
|
+
}
|
|
807
794
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* Check If Page is List Report
|
|
812
|
-
*
|
|
813
|
-
* @param {object} page - page object
|
|
814
|
-
* @returns {boolean} returns boolean
|
|
815
|
-
* @private
|
|
816
|
-
*/
|
|
817
|
-
private _isListReport(page?: IGenericApp) {
|
|
818
|
-
return page?.component?.name === "sap.suite.ui.generic.template.ListReport";
|
|
795
|
+
return Promise.resolve(this.catalogAppData);
|
|
819
796
|
}
|
|
820
797
|
|
|
821
798
|
/**
|
|
@@ -824,8 +801,7 @@ export default class AppManager extends BaseObject {
|
|
|
824
801
|
* @returns {boolean} returns boolean
|
|
825
802
|
* @private
|
|
826
803
|
*/
|
|
827
|
-
|
|
828
|
-
private isAddCardToInsightsHidden(page?: IGenericApp) {
|
|
804
|
+
private isAddCardToInsightsHidden(page?: IPageType) {
|
|
829
805
|
return page?.component?.settings?.tableSettings?.addCardtoInsightsHidden;
|
|
830
806
|
}
|
|
831
807
|
|
|
@@ -836,22 +812,29 @@ export default class AppManager extends BaseObject {
|
|
|
836
812
|
* @private
|
|
837
813
|
*/
|
|
838
814
|
|
|
839
|
-
private _checkValidManifests(manifest:
|
|
840
|
-
const
|
|
815
|
+
private _checkValidManifests(manifest: IAppManifest): boolean {
|
|
816
|
+
const dataSources = manifest["sap.app"]?.dataSources;
|
|
817
|
+
|
|
818
|
+
// Ensure dataSources has the correct structure for `mainService`
|
|
819
|
+
const hasRequiredDataSource = manifest["sap.ui.generic.app"] && dataSources?.mainService;
|
|
820
|
+
|
|
841
821
|
if (!hasRequiredDataSource) {
|
|
842
822
|
return false;
|
|
843
823
|
}
|
|
844
824
|
|
|
845
|
-
const pages = manifest["sap.ui.generic.app"]?.pages
|
|
825
|
+
const pages = manifest["sap.ui.generic.app"]?.pages;
|
|
846
826
|
// if its not list report component or if listreport page settings has
|
|
847
827
|
// isAddCardToInsightsHidden as true, then do not recommend the card
|
|
848
828
|
if (Array.isArray(pages)) {
|
|
849
|
-
return this._isListReport(pages[0]) && !this.isAddCardToInsightsHidden(pages[0]);
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
829
|
+
return this.recommendedUtilInstance._isListReport(pages[0]) && !this.isAddCardToInsightsHidden(pages[0]);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
const pageValues = Object.values(pages as PageRecord);
|
|
833
|
+
if (pageValues.length > 0) {
|
|
834
|
+
return pageValues.some((page) => {
|
|
835
|
+
return (
|
|
836
|
+
typeof page === "object" && this.recommendedUtilInstance._isListReport(page) && !this.isAddCardToInsightsHidden(page)
|
|
837
|
+
);
|
|
855
838
|
});
|
|
856
839
|
}
|
|
857
840
|
return false;
|
|
@@ -861,22 +844,19 @@ export default class AppManager extends BaseObject {
|
|
|
861
844
|
* Get OData Model
|
|
862
845
|
*
|
|
863
846
|
* @param {object} manifest - manifest object
|
|
864
|
-
* @returns {
|
|
847
|
+
* @returns {ODataModelV2} returns OData Model
|
|
865
848
|
* @private
|
|
866
849
|
*/
|
|
867
|
-
private _getOdataModel(oManifest:
|
|
850
|
+
private _getOdataModel(oManifest: IAppManifest): Promise<ODataModelV2> {
|
|
868
851
|
return new Promise(function (resolve) {
|
|
869
852
|
const datasource = oManifest?.["sap.app"]?.dataSources;
|
|
870
853
|
const mainService = datasource?.mainService;
|
|
871
|
-
|
|
872
|
-
.map((
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
})
|
|
877
|
-
.filter((urls) => urls !== undefined);
|
|
854
|
+
let annotationUrls: string[] = (mainService?.settings?.annotations || [])
|
|
855
|
+
.map((name: string) => datasource?.[name]?.uri || "")
|
|
856
|
+
.filter(Boolean);
|
|
857
|
+
|
|
878
858
|
const oDataModel = new ODataModelV2(mainService?.uri as string, {
|
|
879
|
-
annotationURI: annotationUrls
|
|
859
|
+
annotationURI: annotationUrls,
|
|
880
860
|
loadAnnotationsJoined: true
|
|
881
861
|
});
|
|
882
862
|
oDataModel.attachMetadataLoaded(() => {
|
|
@@ -895,14 +875,14 @@ export default class AppManager extends BaseObject {
|
|
|
895
875
|
* @returns {string} returns entity set
|
|
896
876
|
* @private
|
|
897
877
|
*/
|
|
898
|
-
private _getEntitySet(manifest:
|
|
878
|
+
private _getEntitySet(manifest: IAppManifest): string | undefined {
|
|
899
879
|
const pages = manifest["sap.ui.generic.app"]?.pages;
|
|
900
880
|
if (Array.isArray(pages)) {
|
|
901
881
|
return pages[0].entitySet;
|
|
902
882
|
} else if (pages) {
|
|
903
|
-
for (const key in pages
|
|
904
|
-
const oApp = pages[key] as
|
|
905
|
-
if (
|
|
883
|
+
for (const key in pages) {
|
|
884
|
+
const oApp = pages[key] as IPageType;
|
|
885
|
+
if (this.recommendedUtilInstance._isListReport(oApp)) {
|
|
906
886
|
return oApp.entitySet;
|
|
907
887
|
}
|
|
908
888
|
}
|
|
@@ -910,273 +890,6 @@ export default class AppManager extends BaseObject {
|
|
|
910
890
|
return undefined;
|
|
911
891
|
}
|
|
912
892
|
|
|
913
|
-
/**
|
|
914
|
-
* function returns true if the passed entityset / properties have mandatory properties
|
|
915
|
-
*
|
|
916
|
-
* @param {EntitySet} oEntitySet - Entity set
|
|
917
|
-
* @param {Array} aProperties - Additional Properties
|
|
918
|
-
* @returns {boolean} returns boolean
|
|
919
|
-
* @private
|
|
920
|
-
*/
|
|
921
|
-
private _hasMandatoryProperties(oEntitySet: IEntitySet, aProperties?: Property[]) {
|
|
922
|
-
// if entityset has required properties in filter restrictions return true
|
|
923
|
-
if (oEntitySet?.["Org.OData.Capabilities.V1.FilterRestrictions"]?.["RequiredProperties"]?.length) {
|
|
924
|
-
return true;
|
|
925
|
-
} else if (aProperties?.length) {
|
|
926
|
-
// iterate through all properties and return true if any property is mandatory or sap:rquired-in-filter is true
|
|
927
|
-
return aProperties.some((oProperty: Record<string, string> | Property) => {
|
|
928
|
-
return (
|
|
929
|
-
Object.keys(oProperty).length &&
|
|
930
|
-
((oProperty as Record<string, string>)["sap:parameter"] === "mandatory" ||
|
|
931
|
-
(oProperty as Record<string, string>)["sap:required-in-filter"] === "true")
|
|
932
|
-
);
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Get Parametersised Entity Set Params
|
|
939
|
-
*
|
|
940
|
-
* @param {ODataMetaModel} oMetaModel - Meta Model
|
|
941
|
-
* @param {string} sEntitySet - Entity Set
|
|
942
|
-
* @param {boolean} bIsParamEntitySet - Is Param Entity Set
|
|
943
|
-
* @returns {object} returns entity set params
|
|
944
|
-
* @private
|
|
945
|
-
*/
|
|
946
|
-
private _getParametersisedEntitySetParams(oMetaModel: ODataMetaModel, sEntitySet: string, bInfoParams: boolean) {
|
|
947
|
-
if (!oMetaModel) {
|
|
948
|
-
throw new Error("OData Model needs to be passed as an argument");
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
const oResult: { entitySetName: string | undefined | null; parameters: Array<object | string>; navPropertyName: string | null } = {
|
|
952
|
-
entitySetName: null,
|
|
953
|
-
parameters: [],
|
|
954
|
-
navPropertyName: null
|
|
955
|
-
};
|
|
956
|
-
|
|
957
|
-
const oEntitySet = oMetaModel.getODataEntitySet(sEntitySet) as IEntitySet;
|
|
958
|
-
const oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType) as IEntityType;
|
|
959
|
-
const aNavigationProperties = oEntityType.navigationProperty;
|
|
960
|
-
|
|
961
|
-
if (!aNavigationProperties) {
|
|
962
|
-
return oResult;
|
|
963
|
-
}
|
|
964
|
-
// filter the parameter entityset for extracting it's key and it's entityset name
|
|
965
|
-
aNavigationProperties.forEach(function (oNavProperty) {
|
|
966
|
-
const oNavigationEntitySet = oMetaModel.getODataAssociationEnd(oEntityType, oNavProperty.name);
|
|
967
|
-
const oNavigationEntityType = oNavigationEntitySet && (oMetaModel.getODataEntityType(oNavigationEntitySet.type) as IEntityType);
|
|
968
|
-
if (oNavigationEntityType?.["sap:semantics"] !== "parameters" || !oNavigationEntityType.key) {
|
|
969
|
-
return;
|
|
970
|
-
}
|
|
971
|
-
oResult.entitySetName = oMetaModel.getODataAssociationSetEnd(oEntityType, oNavProperty.name)?.entitySet as string;
|
|
972
|
-
for (let value of oNavigationEntityType.key.propertyRef) {
|
|
973
|
-
if (bInfoParams) {
|
|
974
|
-
const navProp = oNavigationEntityType.property;
|
|
975
|
-
for (let navProperty of navProp) {
|
|
976
|
-
if (navProperty.name === value.name) {
|
|
977
|
-
oResult.parameters.push(navProperty);
|
|
978
|
-
oResult.entitySetName = oMetaModel.getODataAssociationSetEnd(oEntityType, oNavProperty.name)?.entitySet;
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
} else {
|
|
982
|
-
oResult.parameters.push(value.name);
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
const aSubNavigationProperties = oNavigationEntityType.navigationProperty;
|
|
986
|
-
// Parameter entityset must have association back to main entityset.
|
|
987
|
-
const bBackAssociationPresent = aSubNavigationProperties?.some(function (oSubNavigationProperty) {
|
|
988
|
-
const sSubNavigationEntityType = oMetaModel.getODataAssociationEnd(
|
|
989
|
-
oNavigationEntityType as EntityType,
|
|
990
|
-
oSubNavigationProperty.name
|
|
991
|
-
)?.type;
|
|
992
|
-
//if entityset.entitytype is same as subnavigation entitytype then it's a back association
|
|
993
|
-
oResult.navPropertyName = sSubNavigationEntityType === oEntitySet.entityType ? oSubNavigationProperty.name : null;
|
|
994
|
-
return oResult.navPropertyName;
|
|
995
|
-
});
|
|
996
|
-
return bBackAssociationPresent && oResult.navPropertyName && oResult.entitySetName;
|
|
997
|
-
});
|
|
998
|
-
return oResult;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Get Column Detail
|
|
1003
|
-
*
|
|
1004
|
-
* @param {object} oEntityType - entity type object
|
|
1005
|
-
* @param {object} oMetaModel - meta model object
|
|
1006
|
-
* @param {object} oColumn - column object
|
|
1007
|
-
* @returns {object} returns column detail
|
|
1008
|
-
* @private
|
|
1009
|
-
*/
|
|
1010
|
-
private _getColumnDetail(oEntityType: IEntityType, oMetaModel: ODataMetaModel, oLineItemContext: ILineItemContext) {
|
|
1011
|
-
let oProperty,
|
|
1012
|
-
oColumnObject: Record<string, unknown> = {};
|
|
1013
|
-
type oDataProprty = Record<
|
|
1014
|
-
string,
|
|
1015
|
-
{ Bool?: boolean; Path?: string; "com.sap.vocabularies.UI.v1.TextArrangement"?: { EnumMember: string } }
|
|
1016
|
-
>;
|
|
1017
|
-
if (oLineItemContext.Value?.Path) {
|
|
1018
|
-
oProperty = oMetaModel.getODataProperty(oEntityType, oLineItemContext.Value.Path) as oDataProprty | Property;
|
|
1019
|
-
}
|
|
1020
|
-
if (
|
|
1021
|
-
!oProperty ||
|
|
1022
|
-
(oProperty as oDataProprty)["com.sap.vocabularies.UI.v1.Hidden"]?.Bool ||
|
|
1023
|
-
oLineItemContext["com.sap.vocabularies.UI.v1.Hidden"]?.Bool
|
|
1024
|
-
) {
|
|
1025
|
-
return oColumnObject;
|
|
1026
|
-
}
|
|
1027
|
-
// if there is field control path binding then ignore the column
|
|
1028
|
-
if ((oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.FieldControl"]?.Path) {
|
|
1029
|
-
return undefined;
|
|
1030
|
-
}
|
|
1031
|
-
let sColumnKeyDescription = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]?.Path || "";
|
|
1032
|
-
sColumnKeyDescription = "{" + sColumnKeyDescription + "}";
|
|
1033
|
-
let sColumnValue = "{" + (oProperty.name as string) + "}";
|
|
1034
|
-
let sNavigation = ""; //need to improve
|
|
1035
|
-
const aSemKeyAnnotation = oEntityType["com.sap.vocabularies.Common.v1.SemanticKey"];
|
|
1036
|
-
const bIsPropertySemanticKey =
|
|
1037
|
-
!!aSemKeyAnnotation &&
|
|
1038
|
-
aSemKeyAnnotation.some(function (oAnnotation) {
|
|
1039
|
-
return oAnnotation.PropertyPath === (oProperty as oDataProprty).name;
|
|
1040
|
-
});
|
|
1041
|
-
|
|
1042
|
-
if ((oProperty as oDataProprty)["Org.OData.Measures.V1.ISOCurrency"]?.Path) {
|
|
1043
|
-
sColumnValue = sColumnValue.concat(
|
|
1044
|
-
" " + "{" + sNavigation + (oProperty as oDataProprty)["Org.OData.Measures.V1.ISOCurrency"].Path + "}"
|
|
1045
|
-
);
|
|
1046
|
-
}
|
|
1047
|
-
if ((oProperty as oDataProprty)["Org.OData.Measures.V1.Unit"]?.Path) {
|
|
1048
|
-
sColumnValue = sColumnValue.concat(
|
|
1049
|
-
" " + "{" + sNavigation + (oProperty as oDataProprty)["Org.OData.Measures.V1.Unit"].Path + "}"
|
|
1050
|
-
);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
if ((oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]?.Path) {
|
|
1054
|
-
let sTextArragement = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"][
|
|
1055
|
-
"com.sap.vocabularies.UI.v1.TextArrangement"
|
|
1056
|
-
];
|
|
1057
|
-
if (!sTextArragement) {
|
|
1058
|
-
sTextArragement = oEntityType["com.sap.vocabularies.UI.v1.TextArrangement"];
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
this._setColumnTextValue(sTextArragement, oColumnObject, sColumnKeyDescription, sColumnValue);
|
|
1062
|
-
} else {
|
|
1063
|
-
oColumnObject["value"] = sColumnValue;
|
|
1064
|
-
if (bIsPropertySemanticKey) {
|
|
1065
|
-
oColumnObject.identifier = bIsPropertySemanticKey;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
oColumnObject.path = (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"]
|
|
1069
|
-
? (oProperty as oDataProprty)["com.sap.vocabularies.Common.v1.Text"].Path
|
|
1070
|
-
: oProperty.name;
|
|
1071
|
-
oColumnObject.importance = oLineItemContext["com.sap.vocabularies.UI.v1.Importance"];
|
|
1072
|
-
oColumnObject.type = oProperty.type;
|
|
1073
|
-
return oColumnObject;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Sets display text format of column
|
|
1078
|
-
*
|
|
1079
|
-
* @private
|
|
1080
|
-
* @param {{EnumMember: string} | undefined} sTextArragement - sTextArragement object
|
|
1081
|
-
* @param {Record<string, unknown>} oColumnObject - Object containing column details
|
|
1082
|
-
* @param {string} sColumnKeyDescription - Description field to include in text value
|
|
1083
|
-
* @param {string} sColumnValue - The value to include in Text value
|
|
1084
|
-
*/
|
|
1085
|
-
private _setColumnTextValue(
|
|
1086
|
-
sTextArragement: { EnumMember: string } | undefined,
|
|
1087
|
-
oColumnObject: Record<string, unknown>,
|
|
1088
|
-
sColumnKeyDescription: string,
|
|
1089
|
-
sColumnValue: string
|
|
1090
|
-
) {
|
|
1091
|
-
const sTextArrangementType = sTextArragement?.EnumMember.split("/")[1];
|
|
1092
|
-
|
|
1093
|
-
if (sTextArrangementType === "TextOnly") {
|
|
1094
|
-
oColumnObject["value"] = "{= $" + sColumnKeyDescription + " === '' ? '' : $" + sColumnKeyDescription + "}";
|
|
1095
|
-
} else if (sTextArrangementType === "TextLast") {
|
|
1096
|
-
oColumnObject["value"] =
|
|
1097
|
-
"{= $" +
|
|
1098
|
-
sColumnValue +
|
|
1099
|
-
" === '' ? '' : $" +
|
|
1100
|
-
sColumnValue +
|
|
1101
|
-
"}" +
|
|
1102
|
-
"{= $" +
|
|
1103
|
-
sColumnKeyDescription +
|
|
1104
|
-
" === '' ? '' : ' (' + ($" +
|
|
1105
|
-
sColumnKeyDescription +
|
|
1106
|
-
") + ')'}";
|
|
1107
|
-
} else if (sTextArrangementType === "TextSeparate") {
|
|
1108
|
-
oColumnObject["value"] = "{= $" + sColumnValue + " === '' ? '' : $" + sColumnValue + "}";
|
|
1109
|
-
} else {
|
|
1110
|
-
// Default case
|
|
1111
|
-
oColumnObject["value"] =
|
|
1112
|
-
"{= $" +
|
|
1113
|
-
sColumnKeyDescription +
|
|
1114
|
-
" === '' ? '' : $" +
|
|
1115
|
-
sColumnKeyDescription +
|
|
1116
|
-
"}" +
|
|
1117
|
-
"{= $" +
|
|
1118
|
-
sColumnValue +
|
|
1119
|
-
" === '' ? '' : ' (' + ($" +
|
|
1120
|
-
sColumnValue +
|
|
1121
|
-
") + ')'}";
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* Get Manifest Card Data
|
|
1127
|
-
*
|
|
1128
|
-
* @param {object} manifest - manifest object
|
|
1129
|
-
* @param {object} entityType - entity type object
|
|
1130
|
-
* @param {object} lineItem - line item object
|
|
1131
|
-
* @param {string} entitySet - entity set
|
|
1132
|
-
* @param {object} parentApp - parent app object
|
|
1133
|
-
* @param {object} metaModel - meta model object
|
|
1134
|
-
* @returns {object} returns card data
|
|
1135
|
-
* @private
|
|
1136
|
-
*/
|
|
1137
|
-
private _getManifestCardData(
|
|
1138
|
-
manifest: ICardManifest,
|
|
1139
|
-
oEntityType: IEntityType,
|
|
1140
|
-
lineItem: Array<ILineItemContext>,
|
|
1141
|
-
entitySet: IEntitySet | string,
|
|
1142
|
-
oParentApp: unknown,
|
|
1143
|
-
oMetaModel: ODataMetaModel
|
|
1144
|
-
): IManifestCardData {
|
|
1145
|
-
const mainServiceUri = manifest?.["sap.app"]?.dataSources.mainService.uri;
|
|
1146
|
-
const serviceUrl =
|
|
1147
|
-
mainServiceUri?.[mainServiceUri.length - 1] === "/"
|
|
1148
|
-
? mainServiceUri + (entitySet as string)
|
|
1149
|
-
: mainServiceUri + "/" + (entitySet as string);
|
|
1150
|
-
|
|
1151
|
-
//get the column details for each of the lineitem columns
|
|
1152
|
-
const aColumns = lineItem
|
|
1153
|
-
?.map((oColumn) => {
|
|
1154
|
-
return this._getColumnDetail(oEntityType, oMetaModel, oColumn);
|
|
1155
|
-
})
|
|
1156
|
-
.filter(function (oItem) {
|
|
1157
|
-
// if no column or if path of column is complex path then filter it out
|
|
1158
|
-
return oItem !== undefined && (oItem as { path: string }).path.split("/").length <= 1;
|
|
1159
|
-
});
|
|
1160
|
-
//sort the column based on their importance and then splice the first 4 columns
|
|
1161
|
-
const aColumnSorted = sortCollectionByImportance(aColumns)
|
|
1162
|
-
.map((column) => {
|
|
1163
|
-
type prop = { path: string; type: string; value: string };
|
|
1164
|
-
return { path: (column as prop).path, type: (column as prop).type, value: (column as prop).value };
|
|
1165
|
-
})
|
|
1166
|
-
.splice(0, 4);
|
|
1167
|
-
return {
|
|
1168
|
-
cardTitle: manifest?.["sap.app"]?.title,
|
|
1169
|
-
subTitle: oEntityType["com.sap.vocabularies.Common.v1.Label"]
|
|
1170
|
-
? "Top 5 " + oEntityType["com.sap.vocabularies.Common.v1.Label"].String
|
|
1171
|
-
: "",
|
|
1172
|
-
url: serviceUrl + "?$top=5&skip=0",
|
|
1173
|
-
semanticObject: (oParentApp as { semanticObject: string }).semanticObject,
|
|
1174
|
-
action: (oParentApp as { action: string }).action,
|
|
1175
|
-
id: manifest?.["sap.app"]?.id,
|
|
1176
|
-
columns: aColumnSorted
|
|
1177
|
-
};
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
893
|
/**
|
|
1181
894
|
* Load I18n
|
|
1182
895
|
*
|
|
@@ -1185,9 +898,9 @@ export default class AppManager extends BaseObject {
|
|
|
1185
898
|
* @returns {object} returns resource bundle
|
|
1186
899
|
* @private
|
|
1187
900
|
*/
|
|
1188
|
-
private async loadI18n(manifest:
|
|
901
|
+
private async loadI18n(manifest: IAppManifest, manifestUrl: string) {
|
|
1189
902
|
// construct abslute url for properties file relative to manifest url
|
|
1190
|
-
const i18nBundleUrl = manifest?.["sap.app"]?.["i18n"]["bundleUrl"] as string;
|
|
903
|
+
const i18nBundleUrl = manifest?.["sap.app"]?.["i18n"]?.["bundleUrl"] as string;
|
|
1191
904
|
const absoluteUrl = new URL(i18nBundleUrl, manifestUrl).href;
|
|
1192
905
|
this._RBManifestMap = this._RBManifestMap || {};
|
|
1193
906
|
if (!this._RBManifestMap[absoluteUrl]) {
|
|
@@ -1195,7 +908,7 @@ export default class AppManager extends BaseObject {
|
|
|
1195
908
|
// specify url of the base .properties file
|
|
1196
909
|
bundleUrl: absoluteUrl,
|
|
1197
910
|
async: true,
|
|
1198
|
-
terminologies: manifest["sap.app"]?.["i18n"]["terminologies"]
|
|
911
|
+
terminologies: manifest["sap.app"]?.["i18n"]?.["terminologies"]
|
|
1199
912
|
});
|
|
1200
913
|
this._RBManifestMap[absoluteUrl] = oResourceBundle;
|
|
1201
914
|
}
|
|
@@ -1220,34 +933,6 @@ export default class AppManager extends BaseObject {
|
|
|
1220
933
|
return sPath ? oRB.getText(sPath) : sValue;
|
|
1221
934
|
}
|
|
1222
935
|
|
|
1223
|
-
/**
|
|
1224
|
-
* Get Attribute Value
|
|
1225
|
-
*
|
|
1226
|
-
* @param {object} oColumn - column object
|
|
1227
|
-
* @returns {string} returns attribute value
|
|
1228
|
-
* @private
|
|
1229
|
-
*/
|
|
1230
|
-
private _getAttributeValue(oAttribute: unknown) {
|
|
1231
|
-
type attribute = { value: string; path: string; type: string };
|
|
1232
|
-
let oAttributeValue = !(oAttribute as attribute).value.startsWith("{")
|
|
1233
|
-
? "{= extension.formatters.stringFormatter(${" + (oAttribute as attribute).path + "}) }"
|
|
1234
|
-
: (oAttribute as attribute).value;
|
|
1235
|
-
if ((oAttribute as attribute).type === "Edm.Date" || (oAttribute as attribute).type === "Edm.DateTime") {
|
|
1236
|
-
const oDateFormatOptions = JSON.stringify({
|
|
1237
|
-
pattern: Formatting.getDatePattern("short")
|
|
1238
|
-
});
|
|
1239
|
-
oAttributeValue =
|
|
1240
|
-
"{=${" +
|
|
1241
|
-
(oAttribute as attribute).path +
|
|
1242
|
-
"}?format.dateTime(${" +
|
|
1243
|
-
(oAttribute as attribute).path +
|
|
1244
|
-
"}, " +
|
|
1245
|
-
oDateFormatOptions +
|
|
1246
|
-
") : ''}";
|
|
1247
|
-
}
|
|
1248
|
-
return oAttributeValue;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
936
|
/**
|
|
1252
937
|
* Retrieves a copy of the analytical card manifest.
|
|
1253
938
|
*
|
|
@@ -1258,53 +943,171 @@ export default class AppManager extends BaseObject {
|
|
|
1258
943
|
public _getAnalyticalCardManifest() {
|
|
1259
944
|
return JSON.parse(JSON.stringify(AnalyticalCardSkeleton)) as ICardManifest;
|
|
1260
945
|
}
|
|
946
|
+
|
|
1261
947
|
/**
|
|
1262
|
-
*
|
|
948
|
+
* Processes the app manifest and generates a recommended card manifest if the app meets the required conditions.
|
|
1263
949
|
*
|
|
1264
|
-
* @param {
|
|
1265
|
-
* @
|
|
950
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
|
|
951
|
+
* @param {IValidManifest} manifestObj - An object containing the app manifest and its URL.
|
|
952
|
+
* @param {AppInfoData | undefined} parentApp - The parent app information, if available.
|
|
953
|
+
* @param {IVersionInfo} versionInfo - The version and build timestamp of the app.
|
|
954
|
+
* @returns {Promise<ICardManifest | undefined>} A promise that resolves to the generated card manifest if the app is eligible,
|
|
955
|
+
* or `undefined` if the app does not meet the required conditions.
|
|
1266
956
|
* @private
|
|
1267
957
|
*/
|
|
1268
|
-
private
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
958
|
+
private async getProcessedManifest(
|
|
959
|
+
metaModel: ODataMetaModel,
|
|
960
|
+
manifestObj: IValidManifest,
|
|
961
|
+
parentApp: IAppInfoData | undefined,
|
|
962
|
+
versionInfo: IVersionInfo
|
|
963
|
+
): Promise<ICardManifest | undefined> {
|
|
964
|
+
try {
|
|
965
|
+
const manifest = manifestObj.manifest;
|
|
966
|
+
const mainEntitySetName = this._getEntitySet(manifest);
|
|
967
|
+
if (!mainEntitySetName) {
|
|
968
|
+
return undefined;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
const mainEntitySet = metaModel.getODataEntitySet(mainEntitySetName) as IEntitySet;
|
|
972
|
+
const lineItemDetails = this.recommendedUtilInstance.getLineItemDetails(metaModel, manifest, mainEntitySetName);
|
|
973
|
+
|
|
974
|
+
if (!lineItemDetails?.lineItem) {
|
|
975
|
+
return undefined;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
const entitySetName = lineItemDetails.entitySet || mainEntitySetName;
|
|
979
|
+
const entitySet = (
|
|
980
|
+
entitySetName === mainEntitySetName ? mainEntitySet : metaModel.getODataEntitySet(entitySetName)
|
|
981
|
+
) as IEntitySet;
|
|
982
|
+
const entityType = metaModel.getODataEntityType(entitySet.entityType) as IEntityType;
|
|
983
|
+
const suppressRowNavigation = lineItemDetails?.lrSettings?.["bSupressCardRowNavigation"];
|
|
984
|
+
|
|
985
|
+
// Check for mandatory properties
|
|
986
|
+
if (this.recommendedUtilInstance.hasMandatoryProperties(entitySet, entityType?.property)) {
|
|
987
|
+
return undefined;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// Check for parameterized entity sets
|
|
991
|
+
const parameterDetails = this.recommendedUtilInstance._getParametersisedEntitySetParams(metaModel, entitySetName, true);
|
|
992
|
+
if (parameterDetails?.entitySetName && parameterDetails?.parameters?.length) {
|
|
993
|
+
const paramEntitySet = metaModel.getODataEntitySet(parameterDetails.entitySetName) as IEntitySet;
|
|
994
|
+
if (this.recommendedUtilInstance.hasMandatoryProperties(paramEntitySet, parameterDetails.parameters as Property[])) {
|
|
995
|
+
return undefined;
|
|
1294
996
|
}
|
|
1295
997
|
}
|
|
1296
|
-
];
|
|
1297
|
-
|
|
1298
|
-
cardSkeletonCopy["sap.insights"] = {
|
|
1299
|
-
parentAppId: oInput.id as string,
|
|
1300
|
-
cardType: "RT",
|
|
1301
|
-
versions: {
|
|
1302
|
-
ui5: this.versionInfo.version + "-" + this.versionInfo.buildTimestamp
|
|
1303
|
-
},
|
|
1304
|
-
visible: true
|
|
1305
|
-
};
|
|
1306
998
|
|
|
1307
|
-
|
|
999
|
+
const cardInput = this.recommendedUtilInstance._getManifestCardData(manifest, lineItemDetails, parentApp!, metaModel);
|
|
1000
|
+
|
|
1001
|
+
// Ensure the card has at least 3 columns
|
|
1002
|
+
if (cardInput.columns.length < COLUMN_LENGTH) {
|
|
1003
|
+
return undefined;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
// Resolve card title
|
|
1007
|
+
const headerInfo = lineItemDetails?.headerInfo as IHeaderInfo;
|
|
1008
|
+
const cardTitle = headerInfo.TypeNamePlural?.String || "";
|
|
1009
|
+
cardInput.cardTitle = cardTitle || cardInput.cardTitle;
|
|
1010
|
+
|
|
1011
|
+
// Resolve i18n title if necessary
|
|
1012
|
+
if (!cardTitle && manifest["sap.app"]?.i18n) {
|
|
1013
|
+
const i18nBundleUrl = manifest["sap.app"].i18n.bundleUrl;
|
|
1014
|
+
const appTitle = manifest["sap.app"].title;
|
|
1015
|
+
if (i18nBundleUrl && (appTitle.startsWith("i18n>") || appTitle.startsWith("{"))) {
|
|
1016
|
+
const i18nResourceBundle = await this.loadI18n(manifest, manifestObj.url);
|
|
1017
|
+
cardInput.cardTitle = this.getI18nValueOrDefaultString(cardInput.cardTitle!, i18nResourceBundle);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
return this.recommendedUtilInstance._createCardManifest(cardInput, versionInfo, manifest, suppressRowNavigation);
|
|
1022
|
+
} catch (oError: unknown) {
|
|
1023
|
+
Log.error("Error while processing manifest", oError instanceof Error ? oError.message : String(oError));
|
|
1024
|
+
return undefined;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Fetches the OData meta models for a given list of valid manifests.
|
|
1030
|
+
* @param {IValidManifest[]} validManifests - An array of valid manifest objects
|
|
1031
|
+
* @returns {Promise<(ODataMetaModel | undefined)[]>} A promise that resolves to an array of OData meta models.
|
|
1032
|
+
* Each element corresponds to a manifest in the input array, and may be `undefined` if the meta model could not be fetched.
|
|
1033
|
+
* @private
|
|
1034
|
+
*/
|
|
1035
|
+
private async fetchMetaModels(validManifests: IValidManifest[]): Promise<(ODataMetaModel | undefined)[]> {
|
|
1036
|
+
const odataPromises = validManifests.map(async (manifestObj) => {
|
|
1037
|
+
try {
|
|
1038
|
+
return (await this._getOdataModel(manifestObj.manifest))?.getMetaModel();
|
|
1039
|
+
} catch (oError: unknown) {
|
|
1040
|
+
Log.error("Error while fetching metamodel", oError instanceof Error ? oError.message : String(oError));
|
|
1041
|
+
return undefined;
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
|
|
1045
|
+
return await Promise.all(odataPromises);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Combines the valid manifests with their corresponding OData meta models.
|
|
1050
|
+
* @param {IValidManifest[]} validManifests - An array of valid manifest objects
|
|
1051
|
+
* @param {ODataMetaModel[]} aMetaModel - An array of OData meta models
|
|
1052
|
+
* @returns {ICombinedManifestDetails[]} An array of objects containing the manifest and the corresponding meta model.
|
|
1053
|
+
* @private
|
|
1054
|
+
*/
|
|
1055
|
+
private combineManifestsAndMetaModels(
|
|
1056
|
+
validManifests: IValidManifest[],
|
|
1057
|
+
aMetaModel: (ODataMetaModel | undefined)[]
|
|
1058
|
+
): ICombinedManifestDetails[] {
|
|
1059
|
+
return validManifests.reduce<ICombinedManifestDetails[]>((combined, manifestObj, index) => {
|
|
1060
|
+
const metaModel = aMetaModel[index];
|
|
1061
|
+
if (metaModel) {
|
|
1062
|
+
combined.push({ manifest: manifestObj, metaModel });
|
|
1063
|
+
}
|
|
1064
|
+
return combined;
|
|
1065
|
+
}, []);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Process the manifest and meta model to get the card manifest
|
|
1070
|
+
* @param {ICombinedManifestDetails[]} combinedDetails - An array of objects containing the manifest and the corresponding meta model.
|
|
1071
|
+
* @param {IAppInfoData[]} aCSTR - An array of app info data
|
|
1072
|
+
* @returns {Promise<(ICardManifest | undefined)[]>} A promise that resolves to an array of recommended card manifests.
|
|
1073
|
+
* @private
|
|
1074
|
+
*/
|
|
1075
|
+
private async processManifests(
|
|
1076
|
+
combinedDetails: ICombinedManifestDetails[],
|
|
1077
|
+
aCSTR: IAppInfoData[]
|
|
1078
|
+
): Promise<(ICardManifest | undefined)[]> {
|
|
1079
|
+
return Promise.all(
|
|
1080
|
+
combinedDetails.map((item) => {
|
|
1081
|
+
const parentApp = aCSTR.find((oApp) => oApp.resolutionResult?.ui5ComponentName === item.manifest.manifest?.["sap.app"]?.id);
|
|
1082
|
+
return this.getProcessedManifest(item.metaModel, item.manifest, parentApp, this.versionInfo);
|
|
1083
|
+
})
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* Processes the app list to generate a list of Fiori IDs.
|
|
1089
|
+
*
|
|
1090
|
+
* If `aList` is not provided, it uses `aAppComponentIds` and `aComponent` to generate the list of Fiori IDs.
|
|
1091
|
+
* It matches the `semanticObject` and `action` of each component in `aAppComponentIds` with the entries in `aComponent`.
|
|
1092
|
+
* If a match is found, the corresponding `fioriId` is added to the list.
|
|
1093
|
+
*
|
|
1094
|
+
* @param {string[]} [aList] - An optional array of Fiori IDs to return directly.
|
|
1095
|
+
* @param {ICardDetails[]} [aAppComponentIds] - An array of app component details to process.
|
|
1096
|
+
* @param {IAppInfo} [aComponent] - A mapping of component IDs to their corresponding data entries.
|
|
1097
|
+
* @returns {string[]} - A list of Fiori IDs.
|
|
1098
|
+
*/
|
|
1099
|
+
private processAppList(aList?: string[], aAppComponentIds?: ICardDetails[], aComponent?: IAppInfo): string[] {
|
|
1100
|
+
if (!aList && aAppComponentIds && aAppComponentIds.length) {
|
|
1101
|
+
return aAppComponentIds.reduce((list, oComponent) => {
|
|
1102
|
+
const oData: IAppInfoData[] = aComponent?.[oComponent.id] || [];
|
|
1103
|
+
const matchingData = oData.find(
|
|
1104
|
+
(entry) => entry.semanticObject === oComponent.target?.semanticObject && entry.action === oComponent.target?.action
|
|
1105
|
+
);
|
|
1106
|
+
|
|
1107
|
+
return matchingData ? [...list, matchingData.fioriId!] : list;
|
|
1108
|
+
}, [] as string[]);
|
|
1109
|
+
}
|
|
1110
|
+
return aList || [];
|
|
1308
1111
|
}
|
|
1309
1112
|
|
|
1310
1113
|
/**
|
|
@@ -1314,108 +1117,68 @@ export default class AppManager extends BaseObject {
|
|
|
1314
1117
|
* @returns {Promise} resolves to array of card manifest
|
|
1315
1118
|
* @private
|
|
1316
1119
|
*/
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
let aAppUrls = aAppIds
|
|
1322
|
-
.map((appId) => {
|
|
1323
|
-
const oApp = aInbounds.find((oItem) => {
|
|
1324
|
-
return oItem?.signature?.parameters?.["sap-fiori-id"]?.defaultValue?.value === appId;
|
|
1325
|
-
});
|
|
1326
|
-
|
|
1327
|
-
if (oApp) {
|
|
1328
|
-
const oViz = aCatalog.find((oCatalog) => {
|
|
1329
|
-
return oApp.semanticObject === oCatalog.target?.semanticObject && oApp.action === oCatalog.target?.action;
|
|
1330
|
-
});
|
|
1331
|
-
return (oViz && oApp?.resolutionResult?.applicationDependencies?.manifest) as string;
|
|
1332
|
-
}
|
|
1333
|
-
return undefined;
|
|
1334
|
-
})
|
|
1335
|
-
.filter((url) => {
|
|
1336
|
-
return url !== undefined;
|
|
1337
|
-
});
|
|
1120
|
+
public async _getCardManifest(aList?: string[], aAppComponentIds?: ICardDetails[]): Promise<ICardManifest[]> {
|
|
1121
|
+
try {
|
|
1122
|
+
const [aCatalog, aFioriData] = await Promise.all([this._getCatalogApps(), this.getFioriAppData()]);
|
|
1123
|
+
this.versionInfo = (await VersionInfo.load()) as IVersionInfo;
|
|
1338
1124
|
|
|
1339
|
-
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
manifest: manifest
|
|
1345
|
-
};
|
|
1346
|
-
});
|
|
1125
|
+
const aCSTR: IAppInfoData[] = Object.values(aFioriData).flat();
|
|
1126
|
+
const aComponent = this.componentData;
|
|
1127
|
+
// in case of replacing old recommended cards fioriIds are not available hence make use of componnetname
|
|
1128
|
+
// and semanticobject and action to find fioriId, and populate aList to recreate recommended card again
|
|
1129
|
+
const processedList = this.processAppList(aList, aAppComponentIds, aComponent);
|
|
1347
1130
|
|
|
1348
|
-
|
|
1131
|
+
const manifests = await this.fetchManifests(processedList, aFioriData, aCatalog);
|
|
1132
|
+
const validManifests = manifests.filter((manifestObj) => this._checkValidManifests(manifestObj.manifest));
|
|
1349
1133
|
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
});
|
|
1134
|
+
const aMetaModel = await this.fetchMetaModels(validManifests);
|
|
1135
|
+
const combinedDetails = this.combineManifestsAndMetaModels(validManifests, aMetaModel);
|
|
1353
1136
|
|
|
1354
|
-
|
|
1355
|
-
return
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1137
|
+
const cards = await this.processManifests(combinedDetails, aCSTR);
|
|
1138
|
+
return cards.filter((card) => card !== undefined);
|
|
1139
|
+
} catch (oError: unknown) {
|
|
1140
|
+
Log.error("Error while fetching card manifest", oError instanceof Error ? oError.message : String(oError));
|
|
1141
|
+
return [];
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1359
1144
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
const
|
|
1377
|
-
if (
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
oEntityType,
|
|
1387
|
-
oLineItem,
|
|
1388
|
-
entitySet as IEntitySet,
|
|
1389
|
-
oParentApp as unknown,
|
|
1390
|
-
oMetaModel
|
|
1391
|
-
);
|
|
1392
|
-
// if less than 3 columns are present in the card, then do not recommend the card
|
|
1393
|
-
if (cardInput.columns.length < 3) {
|
|
1394
|
-
return undefined;
|
|
1395
|
-
}
|
|
1396
|
-
if (typeof manifestObj?.manifest?.["sap.app"]?.i18n === "object") {
|
|
1397
|
-
const i18nBundleUrl = manifestObj.manifest["sap.app"].i18n.bundleUrl;
|
|
1398
|
-
//if manifest title is not resolved load the resource bundle of the parent app and get the text
|
|
1399
|
-
if (
|
|
1400
|
-
i18nBundleUrl &&
|
|
1401
|
-
(manifestObj.manifest["sap.app"].title.startsWith("i18n>") || manifestObj.manifest["sap.app"].title.startsWith("{"))
|
|
1402
|
-
) {
|
|
1403
|
-
const i18nResourceBundle = await this.loadI18n(manifestObj.manifest, manifestObj.url);
|
|
1404
|
-
cardInput.cardTitle = this.getI18nValueOrDefaultString(cardInput.cardTitle as string, i18nResourceBundle);
|
|
1405
|
-
return this._getListCardManifest(cardInput);
|
|
1145
|
+
/**
|
|
1146
|
+
* Fetch the app manifest for the given app ids
|
|
1147
|
+
* @param {string[]} appIdList - array of app ids
|
|
1148
|
+
* @param {AppInfo} fioriData - fiori data
|
|
1149
|
+
* @param {AppData[]} catalogData - catalog data
|
|
1150
|
+
* @returns {Promise} resolves to array of manifests
|
|
1151
|
+
* @private
|
|
1152
|
+
*/
|
|
1153
|
+
private async fetchManifests(appIdList: string[], fioriData: IAppInfo, catalogData: AppData[]): Promise<IValidManifest[]> {
|
|
1154
|
+
try {
|
|
1155
|
+
const appPromises = appIdList.map(async (appId) => {
|
|
1156
|
+
const aApp: IAppInfoData[] = fioriData[appId] || [];
|
|
1157
|
+
for (const oApp of aApp) {
|
|
1158
|
+
const oViz = catalogData.find(
|
|
1159
|
+
(catalog) => oApp.semanticObject === catalog.target?.semanticObject && oApp.action === catalog.target?.action
|
|
1160
|
+
);
|
|
1161
|
+
const manifestUrl = oApp?.resolutionResult?.applicationDependencies?.manifest;
|
|
1162
|
+
if (oViz && manifestUrl) {
|
|
1163
|
+
try {
|
|
1164
|
+
const response = await fetch(manifestUrl);
|
|
1165
|
+
const manifest = (await response.json()) as IAppManifest;
|
|
1166
|
+
return { url: response.url, manifest };
|
|
1167
|
+
} catch (error: unknown) {
|
|
1168
|
+
Log.error("Error while fetching manifest", error instanceof Error ? error.message : String(error));
|
|
1169
|
+
return undefined;
|
|
1170
|
+
}
|
|
1406
1171
|
}
|
|
1407
1172
|
}
|
|
1408
|
-
|
|
1409
|
-
} catch (error) {
|
|
1410
|
-
Log.error(error as string);
|
|
1173
|
+
// No valid manifest found in this appId's entries
|
|
1411
1174
|
return undefined;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
return
|
|
1418
|
-
}
|
|
1175
|
+
});
|
|
1176
|
+
const results = await Promise.all(appPromises);
|
|
1177
|
+
return results.filter((manifest): manifest is IValidManifest => manifest !== undefined);
|
|
1178
|
+
} catch (oError) {
|
|
1179
|
+
Log.error("Error while processing manifests", oError instanceof Error ? oError.message : String(oError));
|
|
1180
|
+
return [];
|
|
1181
|
+
}
|
|
1419
1182
|
}
|
|
1420
1183
|
|
|
1421
1184
|
/**
|
|
@@ -1425,8 +1188,8 @@ export default class AppManager extends BaseObject {
|
|
|
1425
1188
|
* @returns {object[]} returns array of cards
|
|
1426
1189
|
* @private
|
|
1427
1190
|
*/
|
|
1428
|
-
private _removeDuplicateCards(aCards: ICard[]) {
|
|
1429
|
-
const oCardDict: Record<string,
|
|
1191
|
+
private _removeDuplicateCards(aCards: ICard[]): ICard[] {
|
|
1192
|
+
const oCardDict: Record<string, boolean> = {};
|
|
1430
1193
|
const aResult: ICard[] = [];
|
|
1431
1194
|
aCards.forEach((oCard) => {
|
|
1432
1195
|
const sCardTitle = oCard?.descriptorContent?.["sap.card"]?.header?.title || "";
|
|
@@ -1441,19 +1204,19 @@ export default class AppManager extends BaseObject {
|
|
|
1441
1204
|
/**
|
|
1442
1205
|
* Fetch Recommended Cards
|
|
1443
1206
|
*
|
|
1444
|
-
* @returns {Promise} resolves to array of recommended cards
|
|
1207
|
+
* @returns {Promise<ICard[] | []> } resolves to array of recommended cards
|
|
1445
1208
|
* @private
|
|
1446
1209
|
*/
|
|
1447
|
-
public async getRecommenedCards() {
|
|
1210
|
+
public async getRecommenedCards(): Promise<ICard[] | []> {
|
|
1448
1211
|
try {
|
|
1449
1212
|
const aAppIds = await this._getRecommenedFioriIds();
|
|
1450
|
-
const aManifests = await this.
|
|
1451
|
-
const aRecManifests = aManifests
|
|
1452
|
-
const aRecommendedCards = aRecManifests
|
|
1213
|
+
const aManifests = await this._getCardManifest(aAppIds);
|
|
1214
|
+
const aRecManifests = aManifests?.slice(0, RECOMMENDED_CARD_LIMIT);
|
|
1215
|
+
const aRecommendedCards = aRecManifests?.map((manifest) => {
|
|
1453
1216
|
let id;
|
|
1454
|
-
if (manifest) {
|
|
1217
|
+
if (manifest?.["sap.card"]) {
|
|
1455
1218
|
manifest["sap.card"].rec = true;
|
|
1456
|
-
id = manifest["sap.app"]?.id
|
|
1219
|
+
id = manifest["sap.app"]?.id;
|
|
1457
1220
|
}
|
|
1458
1221
|
return {
|
|
1459
1222
|
id,
|
|
@@ -1462,7 +1225,7 @@ export default class AppManager extends BaseObject {
|
|
|
1462
1225
|
});
|
|
1463
1226
|
return this._removeDuplicateCards(aRecommendedCards as ICard[]);
|
|
1464
1227
|
} catch (error) {
|
|
1465
|
-
Log.error("Error while fetching recommended cards:
|
|
1228
|
+
Log.error("Error while fetching recommended cards:", error instanceof Error ? error.message : String(error));
|
|
1466
1229
|
return [];
|
|
1467
1230
|
}
|
|
1468
1231
|
}
|
|
@@ -1530,6 +1293,52 @@ export default class AppManager extends BaseObject {
|
|
|
1530
1293
|
}
|
|
1531
1294
|
}
|
|
1532
1295
|
|
|
1296
|
+
/**
|
|
1297
|
+
* Retrieves Fiori app data and stores it in the `fioriAppData` and `componentData` properties.
|
|
1298
|
+
*
|
|
1299
|
+
* This method fetches inbound applications using the `_getInboundApps` method and processes them to extract
|
|
1300
|
+
* Fiori app IDs (`sap-fiori-id`) and their associated semantic data. It also maps UI5 component names to their
|
|
1301
|
+
* corresponding Fiori app IDs for later use.
|
|
1302
|
+
*
|
|
1303
|
+
* @returns {Promise<IAppInfo>} A promise that resolves to an object containing Fiori app data
|
|
1304
|
+
* @private
|
|
1305
|
+
*/
|
|
1306
|
+
private async getFioriAppData(): Promise<IAppInfo> {
|
|
1307
|
+
try {
|
|
1308
|
+
if (!Object.keys(this.componentData).length) {
|
|
1309
|
+
this.componentData = {};
|
|
1310
|
+
this.fioriAppData = {};
|
|
1311
|
+
const inbounds = await this._getInboundApps();
|
|
1312
|
+
inbounds.forEach((oItem) => {
|
|
1313
|
+
const fioriId = oItem?.signature?.parameters?.["sap-fiori-id"]?.defaultValue?.value;
|
|
1314
|
+
const componentId = oItem?.resolutionResult?.ui5ComponentName;
|
|
1315
|
+
if (fioriId) {
|
|
1316
|
+
const semanticData: IAppInfoData = {
|
|
1317
|
+
action: oItem.action,
|
|
1318
|
+
semanticObject: oItem.semanticObject,
|
|
1319
|
+
resolutionResult: oItem.resolutionResult
|
|
1320
|
+
};
|
|
1321
|
+
this.fioriAppData[fioriId] = this.fioriAppData[fioriId] || [];
|
|
1322
|
+
this.fioriAppData[fioriId].push(semanticData);
|
|
1323
|
+
|
|
1324
|
+
// store data along with fioriId in componentData, this can be used later to find the
|
|
1325
|
+
// fioriId for those apps when only ui5ComponentName is known
|
|
1326
|
+
if (componentId) {
|
|
1327
|
+
const combinedData: IAppInfoData = { ...semanticData, fioriId };
|
|
1328
|
+
|
|
1329
|
+
this.componentData[componentId] = this.componentData[componentId] || [];
|
|
1330
|
+
this.componentData[componentId].push(combinedData);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
return this.fioriAppData;
|
|
1336
|
+
} catch (oError) {
|
|
1337
|
+
Log.error(oError instanceof Error ? oError.message : String(oError));
|
|
1338
|
+
return {};
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1533
1342
|
/**
|
|
1534
1343
|
* Retrieves visualizations based on a list of Fiori IDs.
|
|
1535
1344
|
*
|