@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,534 @@
|
|
|
1
|
+
declare module "sap/cux/home/utils/RecommendedCardUtil" {
|
|
2
|
+
import BaseObject from "sap/ui/base/Object";
|
|
3
|
+
import ODataMetaModel, { NavigationProperty, Property } from "sap/ui/model/odata/ODataMetaModel";
|
|
4
|
+
import { IAppInfoData, IAppManifest, ICardManifest, IColumnData, IEntitySet, ILineItem, ILineItemContextValue, ILineItemDetails, IManifestCardData, IPageType, IPresentationVariant, IUIVisualizations, IVariantSetting, IVersionInfo } from "../interface/CardsInterface";
|
|
5
|
+
const COLUMN_LENGTH = 3;
|
|
6
|
+
const ValueState: any;
|
|
7
|
+
interface VariantInfo {
|
|
8
|
+
lineItem?: ILineItem[] | string;
|
|
9
|
+
presentationVariant?: IPresentationVariant;
|
|
10
|
+
qualifierPath?: string;
|
|
11
|
+
PresentationVariant?: IPresentationVariant;
|
|
12
|
+
Visualizations?: IUIVisualizations[];
|
|
13
|
+
}
|
|
14
|
+
interface NonChartDetail {
|
|
15
|
+
firstAvailableKey: string | null;
|
|
16
|
+
sEntitySet: string;
|
|
17
|
+
oVariant: IVariantSetting;
|
|
18
|
+
}
|
|
19
|
+
interface SelectExpand {
|
|
20
|
+
select: string[];
|
|
21
|
+
expand: string[];
|
|
22
|
+
}
|
|
23
|
+
type SelectExpandDetail = {
|
|
24
|
+
select?: string;
|
|
25
|
+
expand?: string;
|
|
26
|
+
};
|
|
27
|
+
type RequestAtleastFieldType = {
|
|
28
|
+
String?: string | undefined;
|
|
29
|
+
PropertyPath?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
interface ParameterisedEntity {
|
|
32
|
+
entitySetName?: string | null;
|
|
33
|
+
parameters: Array<object | string>;
|
|
34
|
+
navPropertyName: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface ColumnObjectData extends Partial<IColumnData> {
|
|
37
|
+
leadingProperty?: string;
|
|
38
|
+
additionalProperty?: string;
|
|
39
|
+
navigationProperty?: string;
|
|
40
|
+
columnKey?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
interface NavigationPropertiesMap {
|
|
44
|
+
[entitySetName: string]: {
|
|
45
|
+
[navigationPropertyName: string]: NavigationProperty;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface ExtendedLineItemContextValue extends ILineItemContextValue {
|
|
49
|
+
Path: string;
|
|
50
|
+
Apply: {
|
|
51
|
+
Name: string;
|
|
52
|
+
Parameters: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
enum FieldAnnotationsType {
|
|
58
|
+
DataField = "com.sap.vocabularies.UI.v1.DataField",
|
|
59
|
+
Importance = "com.sap.vocabularies.UI.v1.Importance",
|
|
60
|
+
DataFieldWithNavigationPath = "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath",
|
|
61
|
+
DataFieldWithIntentBasedNavigation = "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation",
|
|
62
|
+
DataFieldForIntentBasedNavigation = "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation",
|
|
63
|
+
Chart = "@com.sap.vocabularies.UI.v1.Chart",
|
|
64
|
+
FieldGroup = "@com.sap.vocabularies.UI.v1.FieldGroup",
|
|
65
|
+
DataPoint = "@com.sap.vocabularies.UI.v1.DataPoint",
|
|
66
|
+
Contact = "@com.sap.vocabularies.Communication.v1.Contact",
|
|
67
|
+
DataFieldForAction = "com.sap.vocabularies.UI.v1.DataFieldForAction",
|
|
68
|
+
DataFieldForAnnotation = "com.sap.vocabularies.UI.v1.DataFieldForAnnotation",
|
|
69
|
+
DataFieldWithUrl = "com.sap.vocabularies.UI.v1.DataFieldWithUrl",
|
|
70
|
+
CriticalityRepresentationTypeWithoutIcon = "com.sap.vocabularies.UI.v1.CriticalityRepresentationType/WithoutIcon",
|
|
71
|
+
FieldControlHiddenType = "com.sap.vocabularies.Common.v1.FieldControlType/Hidden"
|
|
72
|
+
}
|
|
73
|
+
enum FieldTypes {
|
|
74
|
+
DataFieldWithNavigationPath = "DataFieldWithNavigationPath",
|
|
75
|
+
DataFieldWithIntentBasedNavigation = "DataFieldWithIntentBasedNavigation",
|
|
76
|
+
DataFieldForIntentBasedNavigation = "DataFieldForIntentBasedNavigation",
|
|
77
|
+
DataFieldForAction = "DataFieldForAction",
|
|
78
|
+
DataFieldForAnnotation = "DataFieldForAnnotation"
|
|
79
|
+
}
|
|
80
|
+
type Attribute = {
|
|
81
|
+
value: string;
|
|
82
|
+
path: string;
|
|
83
|
+
type: string;
|
|
84
|
+
};
|
|
85
|
+
type SelectionProperties = Array<string | {
|
|
86
|
+
PropertyPath?: string;
|
|
87
|
+
String?: string;
|
|
88
|
+
}>;
|
|
89
|
+
export default class RecommendedCardUtil extends BaseObject {
|
|
90
|
+
static Instance: RecommendedCardUtil;
|
|
91
|
+
static getInstance(): RecommendedCardUtil;
|
|
92
|
+
/**
|
|
93
|
+
* @param {object} metaModel - metamodel object
|
|
94
|
+
* @param {object} originalManifest - manifest of original app
|
|
95
|
+
* @param {string} leadingEntitySet - main entitySet of the application as in manifest
|
|
96
|
+
* @returns {object} - returns the lineItem details for the application based on manifest, annotations and metadata
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
getLineItemDetails(metaModel: ODataMetaModel, originalManifest: IAppManifest, leadingEntitySet: string): ILineItemDetails | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Finds the first non-smart chart variant from the provided variants.
|
|
102
|
+
*
|
|
103
|
+
* This method iterates through the given variants to identify the first variant that is not a smart chart.
|
|
104
|
+
* It also determines the associated entity set and updates the variant's metadata to indicate whether it is a smart chart.
|
|
105
|
+
*
|
|
106
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
|
|
107
|
+
* @param {Record<string, IVariantSetting>} oVariants - A record of variants, where each key represents a variant and its associated metadata.
|
|
108
|
+
* @param {string} leadingEntitySet - The name of the leading entity set for the application.
|
|
109
|
+
* @returns {NonChartDetail}
|
|
110
|
+
}
|
|
111
|
+
* An object containing:
|
|
112
|
+
* - `firstAvailableKey`: The key of the first non-smart chart variant, or `null` if none is found.
|
|
113
|
+
* - `sEntitySet`: The entity set associated with the first non-smart chart variant.
|
|
114
|
+
* - `oVariant`: The metadata of the first non-smart chart variant.
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
private findFirstNonSmartChartVariant;
|
|
118
|
+
/**
|
|
119
|
+
* Validates the responsive table type for a given variant and updates the List Report (LR) settings.
|
|
120
|
+
*
|
|
121
|
+
* @param {ILrSettings} lrSettings - The settings object for the List Report, including table settings and configurations.
|
|
122
|
+
* @param {IVariantSetting} oVariant - The variant object containing table settings and metadata.
|
|
123
|
+
* @param {string | null} firstAvailableKey - The key of the first available variant, used for logging errors.
|
|
124
|
+
* @returns {void}
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
private validateResponsiveTable;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* This method generates the default configuration for line item details, including table settings,
|
|
131
|
+
* responsive table type, and request-at-least fields based on the provided metadata, variant information,
|
|
132
|
+
* and settings.
|
|
133
|
+
*
|
|
134
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
|
|
135
|
+
* @param {VariantInfo} variantInfo - The variant information containing presentation variant and line item details.
|
|
136
|
+
* @param {ILrSettings} lrSettings - The settings object for the List Report, including table settings and other configurations.
|
|
137
|
+
* @param {string} leadingEntitySet - The name of the leading entity set for the application.
|
|
138
|
+
* @param {ILineItem[] | string | undefined} lineItemDefault - The default line item details, which can be an array of line items, a string, or undefined.
|
|
139
|
+
* @returns {ILineItemDetails} The default line item details object, including quick variant, settings, line item, entity set, and header info.
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
private createDefaultLineItemDetails;
|
|
143
|
+
/**
|
|
144
|
+
* @param {object} oMetaModel - metamodel object
|
|
145
|
+
* @param {string} entityType - entity type of the application
|
|
146
|
+
* @param {string} qualifier - qualifier of the variant
|
|
147
|
+
* @returns {object} - returns the lineItem, presentationVariant, qualifierPath from the variant for the application based on manifest, annotations and metadata
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
private getLineItemFromVariant;
|
|
151
|
+
private getAnnotation;
|
|
152
|
+
/**
|
|
153
|
+
* This method determines the presentation variant based on the provided selection presentation variant.
|
|
154
|
+
* If the presentation variant is defined via a `Path`, it resolves the path to retrieve the corresponding object
|
|
155
|
+
* from the OData meta model. If the presentation variant is defined inline (i.e., without a `Path`), it directly
|
|
156
|
+
* returns the inline object.
|
|
157
|
+
*
|
|
158
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
|
|
159
|
+
* @param {string} entityTypeData - The entity type for which the presentation variant is to be retrieved.
|
|
160
|
+
* @param {IPresentationVariant} selectionPresentationVariant -
|
|
161
|
+
* The selection presentation variant object, which may contain a `Path` or an inline `PresentationVariant`.
|
|
162
|
+
* @returns {IPresentationVariant} The resolved presentation variant object.
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
private getPresentationVariant;
|
|
166
|
+
/**
|
|
167
|
+
* Retrieves the line item annotation details for a given entity type and presentation variant.
|
|
168
|
+
*
|
|
169
|
+
* This method searches for the `com.sap.vocabularies.UI.v1.LineItem` annotation within the visualizations
|
|
170
|
+
* of the provided presentation variant. If found, it returns the line item details, including the annotation path
|
|
171
|
+
* and qualifier.
|
|
172
|
+
*
|
|
173
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about the entity type.
|
|
174
|
+
* @param {string} entityTypeData - The entity type for which the line item annotation is to be retrieved.
|
|
175
|
+
* @param {IPresentationVariant} presentationVariantData - The presentation variant containing visualizations.
|
|
176
|
+
* @returns { IUIVisualizations | IUIVisualizations[] | null}
|
|
177
|
+
* - An object containing the line item details, annotation path, and qualifier if the annotation is found.
|
|
178
|
+
* - An array of UI annotations if applicable.
|
|
179
|
+
* - `null` if no valid line item annotation is found.
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
private getLineItem;
|
|
183
|
+
/**
|
|
184
|
+
* Extracts relevant column paths for `$select` and `$expand` OData query options.
|
|
185
|
+
*
|
|
186
|
+
* This method processes the provided column definitions to extract paths for the `$select` and `$expand` query options.
|
|
187
|
+
* It ensures that paths are unique and properly formatted for OData requests.
|
|
188
|
+
*
|
|
189
|
+
* @param {Array<Record<string,unknown>>} columns - An array of column definitions.
|
|
190
|
+
* Each column definition may include properties like `leadingProperty`, `additionalProperty`, and `navigationProperty`.
|
|
191
|
+
* @returns {SelectExpand} An object containing two arrays:
|
|
192
|
+
* - `select`: An array of unique paths for the `$select` query option.
|
|
193
|
+
* - `expand`: An array of unique paths for the `$expand` query option.
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
private _getRelevantColumnPaths;
|
|
197
|
+
/**
|
|
198
|
+
* Extracts and inserts unique paths into the provided array.
|
|
199
|
+
*
|
|
200
|
+
* This method splits the given path string by commas, iterates through the resulting paths,
|
|
201
|
+
* and adds each unique path to the provided array. Duplicate paths are ignored.
|
|
202
|
+
*
|
|
203
|
+
* @param {string} sPath - A comma-separated string of paths to be processed.
|
|
204
|
+
* @param {Set<string>} - The array to which unique paths will be added.
|
|
205
|
+
* @private
|
|
206
|
+
*/
|
|
207
|
+
private extractPathAndInsertToSet;
|
|
208
|
+
/**
|
|
209
|
+
* Expands navigation properties for the given entity set and selected properties.
|
|
210
|
+
*
|
|
211
|
+
* This method processes the provided `selects` array to identify navigation properties
|
|
212
|
+
* that need to be expanded. If a navigation property is found, it is added to the `expands` array.
|
|
213
|
+
*
|
|
214
|
+
* @param {string} entitySetName - The name of the entity set being processed.
|
|
215
|
+
* @param {string[]} selects - An array of selected property paths to be checked for navigation properties.
|
|
216
|
+
* @param {string[]} expands - An array to which navigation properties requiring expansion will be added.
|
|
217
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
private extractAndExpandNavigationProperty;
|
|
221
|
+
private getNavigationProperty;
|
|
222
|
+
private _addNecessaryFields;
|
|
223
|
+
/**
|
|
224
|
+
* Collects the paths for field controls based on the selected properties.
|
|
225
|
+
* This function iterates over the given selection of properties, aSelects, retrieves the corresponding
|
|
226
|
+
* property metadata from the OData model, and if a field control annotation exists for a property,
|
|
227
|
+
* it adds the path of this field control to the provided array of properties.
|
|
228
|
+
* @param {string[]} selects - An array of property names to be checked for field control paths.
|
|
229
|
+
* @param {object} metaModel - The OData meta model instance used to retrieve property metadata.
|
|
230
|
+
* @param {object} entityType - The entity type from the OData model that contains the properties.
|
|
231
|
+
* @param {string[]} aProperties - An array to which the field control paths will be added.
|
|
232
|
+
* @private
|
|
233
|
+
*/
|
|
234
|
+
private getFieldControlsPath;
|
|
235
|
+
/**
|
|
236
|
+
* Handling for DataFieldWithNavigationPath and DataFieldWithIntentBasedNavigation
|
|
237
|
+
* @param {object} lineItem - LineItem object
|
|
238
|
+
* @param {object} metaModel - OData metamodel
|
|
239
|
+
* @param {object} entityType - EntityType object
|
|
240
|
+
* @returns {Array} - Array of properties to be selected in case field type is DataFieldWithNavigationPath or DataFieldWithIntentBasedNavigation
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
private getDataFieldsWithNavigation;
|
|
244
|
+
private getParameters;
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @param {Array} aSelects , select parameters
|
|
248
|
+
* @param {SelectionProperties} alwaysSelectField, all the fields that are marked as requestAtLeastFields
|
|
249
|
+
* @returns {Array} aSelects, updated select parameters
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
private _ensureSelectionProperties;
|
|
253
|
+
/**
|
|
254
|
+
* Handles the mandatory selection fields for the given entity set and properties.
|
|
255
|
+
*
|
|
256
|
+
* @param {object} entitySet - The entity set object.
|
|
257
|
+
* @param {array} aSelects - The array of properties.
|
|
258
|
+
* @returns {boolean} True if the entity set or properties have mandatory fields, false otherwise.
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
private _handleMandatorySelectionFields;
|
|
262
|
+
private ensureSelectionProperty;
|
|
263
|
+
/**
|
|
264
|
+
* Creates a card manifest for a recommended card.
|
|
265
|
+
*
|
|
266
|
+
* This method generates a new card manifest based on the provided input data, version information, and app manifest.
|
|
267
|
+
* It also processes the columns to set attributes or titles for the card content and handles row navigation suppression if required.
|
|
268
|
+
*
|
|
269
|
+
* @param {IManifestCardData} oInput - The input data for the card, including card title, subtitle, columns, and entity set.
|
|
270
|
+
* @param {IVersionInfo} oVersionInfo - The version information, including the version and build timestamp.
|
|
271
|
+
* @param {IAppManifest} manifest - The original app manifest.
|
|
272
|
+
* @param {boolean} [bSuppressRowNavigation] - Optional flag to suppress row navigation actions in the card content.
|
|
273
|
+
* @returns {ICardManifest} The generated card manifest object.
|
|
274
|
+
* @private
|
|
275
|
+
*/
|
|
276
|
+
_createCardManifest(oInput: IManifestCardData, oVersionInfo: IVersionInfo, manifest: IAppManifest, bSuppressRowNavigation?: boolean): ICardManifest;
|
|
277
|
+
/**
|
|
278
|
+
* Get Attribute Value
|
|
279
|
+
*
|
|
280
|
+
* @param {object} attributeData - column object
|
|
281
|
+
* @returns {string} returns attribute value
|
|
282
|
+
* @private
|
|
283
|
+
*/
|
|
284
|
+
private _getAttributeValue;
|
|
285
|
+
private createManifestSapApp;
|
|
286
|
+
/**
|
|
287
|
+
* Creates the manifest's SAP card object, sap.card based on the input card details.
|
|
288
|
+
*
|
|
289
|
+
* @param {oIAppManifestbject} manifest - The original manifest object of the application.
|
|
290
|
+
* @param {IManifestCardData} oInput - The input object containing card details.
|
|
291
|
+
* @returns {ISapCard} The SAP card configuration object.
|
|
292
|
+
*/
|
|
293
|
+
private createManifestSapCard;
|
|
294
|
+
/**
|
|
295
|
+
* Sets the card actions for the given SAP card.
|
|
296
|
+
*
|
|
297
|
+
* @param {object} sapCard - The SAP card object to set the actions on.
|
|
298
|
+
* @param {string} semObj - The semantic object for the navigation target.
|
|
299
|
+
* @param {string} semanticAction - The semantic action for the navigation target.
|
|
300
|
+
*/
|
|
301
|
+
private addCardActions;
|
|
302
|
+
/**
|
|
303
|
+
* Creates the manifest sap card configuration object.
|
|
304
|
+
*
|
|
305
|
+
* @param {string} sServiceUrl - The service URL to be used in the request.
|
|
306
|
+
* @param {string} entitySetName - The name of the entity set.
|
|
307
|
+
* @returns {object} The SAP card configuration object.
|
|
308
|
+
*/
|
|
309
|
+
private createManifestSapCardConfig;
|
|
310
|
+
private createSapui5;
|
|
311
|
+
/**
|
|
312
|
+
* Creates the manifest data for an SAP card.
|
|
313
|
+
*
|
|
314
|
+
* @param {string} sServiceUrl - The service URL to be used in the request.
|
|
315
|
+
* @param {string} urlExpand - The URL to expand in the batch request.
|
|
316
|
+
* @returns {IRequestData} The SAP card data object containing the request configuration.
|
|
317
|
+
*/
|
|
318
|
+
private createManifestSapCardData;
|
|
319
|
+
/**
|
|
320
|
+
* This function returns card details required for the recommended card manifest
|
|
321
|
+
* based on app manifest and annotations
|
|
322
|
+
* @param {object} manifest - The original app manifest
|
|
323
|
+
* @param {object} oInfo - The object containing details of lineitem, entityset, settings etc
|
|
324
|
+
* @param {object} oParentApp - The parent app object
|
|
325
|
+
* @param {object} oMetaModel - The OData metamodel
|
|
326
|
+
* @returns {object} The card data object with title, subtitle, url, semanticObject, action, id and column details
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
_getManifestCardData(manifest: IAppManifest, oInfo: ILineItemDetails, oParentApp: IAppInfoData, oMetaModel: ODataMetaModel): IManifestCardData;
|
|
330
|
+
/**
|
|
331
|
+
* This function returns the column detail object for the given column's context
|
|
332
|
+
* @param {string} entitySet - - The entity set name
|
|
333
|
+
* @param {object} oMetaModel - OData metamodel
|
|
334
|
+
* @param {object} lineItemContext - The line item column context object
|
|
335
|
+
* @returns {object} The column detail containing value, path, importance and type
|
|
336
|
+
* @private
|
|
337
|
+
*/
|
|
338
|
+
private _getColumnDetail;
|
|
339
|
+
/**
|
|
340
|
+
* Retrieves the column object details based on the provided property and entity type.
|
|
341
|
+
*
|
|
342
|
+
* @param {object} columnDataObject - The column information object to be populated.
|
|
343
|
+
* @param {object} propertyDetails - The property object containing metadata about the column.
|
|
344
|
+
* @param {object} entityType - The entity type object containing metadata about the entity.
|
|
345
|
+
* @param {object} dataField - The data field object containing the lineitem column context object
|
|
346
|
+
* @returns {object} The populated column information object.
|
|
347
|
+
* @private
|
|
348
|
+
*/
|
|
349
|
+
private getColumnObjectDetails;
|
|
350
|
+
/**
|
|
351
|
+
* Build expression for the criticality annotation, kept same as the one used in LROP
|
|
352
|
+
* @param {object} criticalityAnnotation - The criticality annotation object
|
|
353
|
+
* @returns {string} The expression for the criticality color
|
|
354
|
+
* @private
|
|
355
|
+
*/
|
|
356
|
+
private buildExpressionForCriticalityColor;
|
|
357
|
+
/**
|
|
358
|
+
* Sets display text format of column
|
|
359
|
+
*
|
|
360
|
+
* @private
|
|
361
|
+
* @param {{EnumMember: string} | undefined} sTextArragement - sTextArragement object
|
|
362
|
+
* @param { ColumnObjectData} columnDataObject - Object containing column details
|
|
363
|
+
* @param {string} sColumnKeyDescription - Description field to include in text value
|
|
364
|
+
* @param {string} sColumnValue - The value to include in Text value
|
|
365
|
+
*/
|
|
366
|
+
private _setColumnTextValue;
|
|
367
|
+
private _getRequestAtLeastFields;
|
|
368
|
+
/**
|
|
369
|
+
* Creates a query string with custom parameters for OData requests.
|
|
370
|
+
*
|
|
371
|
+
* This method generates a query string containing `$expand` and `$select` parameters
|
|
372
|
+
* based on the provided input object. The values are URL-encoded to ensure proper formatting.
|
|
373
|
+
*
|
|
374
|
+
* @param {object} mParameters - An object containing the parameters for the query string.
|
|
375
|
+
* @param {string | undefined} mParameters.expand - The value for the `$expand` parameter, if any.
|
|
376
|
+
* @param {string | undefined} mParameters.select - The value for the `$select` parameter, if any.
|
|
377
|
+
* @returns {string} A query string containing the `$expand` and `$select` parameters, joined by `&`.
|
|
378
|
+
* @private
|
|
379
|
+
*/
|
|
380
|
+
private createCustomParams;
|
|
381
|
+
/**
|
|
382
|
+
* Retrieves an object from the OData meta model based on the given entity type and path.
|
|
383
|
+
*
|
|
384
|
+
* This method resolves the provided path to an absolute path if it is relative, using the entity type as the base.
|
|
385
|
+
* It then retrieves the corresponding object from the meta model. Any "@" characters in the path are removed
|
|
386
|
+
* to match the meta model's structure.
|
|
387
|
+
*
|
|
388
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and annotations.
|
|
389
|
+
* @param {string} entityTypeName - The entity type used as the base for resolving relative paths.
|
|
390
|
+
* @param {string} path - The path to the object in the meta model. Can be relative or absolute.
|
|
391
|
+
* @returns {IPresentationVariant | ILineItem[]} The object retrieved from the meta model, which can be a presentation variant or an array of nested objects.
|
|
392
|
+
* @private
|
|
393
|
+
*/
|
|
394
|
+
private getObject;
|
|
395
|
+
/**
|
|
396
|
+
* Check If Page is List Report
|
|
397
|
+
*
|
|
398
|
+
* @param {object} page - page object
|
|
399
|
+
* @returns {boolean} returns boolean
|
|
400
|
+
* @private
|
|
401
|
+
*/
|
|
402
|
+
_isListReport(page?: IPageType): boolean;
|
|
403
|
+
/**
|
|
404
|
+
* @param {IPageType[] | PageRecord} pages - pages object from manifest
|
|
405
|
+
* @returns {ILrSettings} - returns the settings object for the ListReport
|
|
406
|
+
*/
|
|
407
|
+
private getSettingsForPage;
|
|
408
|
+
/**
|
|
409
|
+
* Determines whether card row navigation should be suppressed for the card
|
|
410
|
+
*
|
|
411
|
+
* @param {IPageType} page - The ListReport page object from the manifest.
|
|
412
|
+
* @returns {boolean} True if card row navigation should be suppressed
|
|
413
|
+
*/
|
|
414
|
+
private shouldSuppressCardRowNavigation;
|
|
415
|
+
/**
|
|
416
|
+
* @param {object} metaModel - metamodel object
|
|
417
|
+
* @param {ILrSettings} ILrSettings - settings object from the manifest
|
|
418
|
+
* @param {string} entitySetName - entity set of the application
|
|
419
|
+
* @returns {object} - returns the normalized table settings
|
|
420
|
+
* @private
|
|
421
|
+
*/
|
|
422
|
+
private getNormalizedTableSettings;
|
|
423
|
+
/**
|
|
424
|
+
* @param {object} metaModel - metamodel object
|
|
425
|
+
* @param {string} entitySetName - entity set of the application
|
|
426
|
+
* @param {object} tabItem - details of the variant tab
|
|
427
|
+
* @returns {boolean} - returns true if the variant is a smart chart
|
|
428
|
+
*/
|
|
429
|
+
private checkIfSmartChart;
|
|
430
|
+
/**
|
|
431
|
+
* function returns true if the passed entityset / properties have mandatory properties
|
|
432
|
+
*
|
|
433
|
+
* @param {EntitySet} entitySetData - Entity set
|
|
434
|
+
* @param {Array} propertiesSet - Additional Properties
|
|
435
|
+
* @returns {boolean} returns boolean
|
|
436
|
+
* @private
|
|
437
|
+
*/
|
|
438
|
+
hasMandatoryProperties(entitySetData?: IEntitySet, propertiesSet?: Property[]): boolean;
|
|
439
|
+
/**
|
|
440
|
+
* Check if sEntitySet has association with parameterised entityset and if it has give parametersised entityset parameters
|
|
441
|
+
* @param {object} metaModel OData MetaModel
|
|
442
|
+
* @param {string} entitySetName of the EntitySet which has Parameter Entityset in association.
|
|
443
|
+
* @param {boolean} infoParamsRequired If the full info of parameters is needed or only the name of params is needed.
|
|
444
|
+
* @return {ParameterisedEntity} Contains name of Parameter EntitySet, keys of Parameter EntitySet and Name of Navigation property.
|
|
445
|
+
* @private
|
|
446
|
+
*/
|
|
447
|
+
_getParametersisedEntitySetParams(metaModel: ODataMetaModel, entitySetName: string, infoParamsRequired: boolean): ParameterisedEntity;
|
|
448
|
+
/**
|
|
449
|
+
* This function check if a lineitem annotation column is visible or not
|
|
450
|
+
* @param {object} lineItemAnnotations - The column details object
|
|
451
|
+
* @returns {Boolean} The column visibility status {true/false}
|
|
452
|
+
* @private
|
|
453
|
+
*/
|
|
454
|
+
private isPropertyHidden;
|
|
455
|
+
/**
|
|
456
|
+
* Creates a P13N string for a given entity set, property, and line item column.
|
|
457
|
+
*
|
|
458
|
+
* @param {Object} contextSet - The entity set object.
|
|
459
|
+
* @param {Object} contextProp - The property details from metadata.
|
|
460
|
+
* @param {Object} columnDataField - The line item column data field.
|
|
461
|
+
* @param {Object} metaModel - The metadata model object.
|
|
462
|
+
* @returns {string} The P13N string for the specified entity set and property.
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
private createP13N;
|
|
466
|
+
private processDataFieldWithUrl;
|
|
467
|
+
/**
|
|
468
|
+
* Creates a personalized column key based on the provided data field.
|
|
469
|
+
* @param {Object} oDataField - The data field object containing metadata for generating the column key.
|
|
470
|
+
* @returns {string} The generated column key based on the data field.
|
|
471
|
+
*/
|
|
472
|
+
private createP13NColumnKey;
|
|
473
|
+
/**
|
|
474
|
+
* Retrieves the navigation prefix path for a given entity type and value path.
|
|
475
|
+
*
|
|
476
|
+
* @param {object} oMetaModel - The meta model object.
|
|
477
|
+
* @param {object} oContextSet - The context set object containing the entity type.
|
|
478
|
+
* @param {string} sPath - The value path for which the navigation prefix is needed.
|
|
479
|
+
* @returns {string} The navigation prefix path.
|
|
480
|
+
*/
|
|
481
|
+
private getNavigationPrefixPath;
|
|
482
|
+
/**
|
|
483
|
+
* Retrieves the navigation prefix for a given property within an entity type.
|
|
484
|
+
* @param {Object} metaModel - The metadata model object.
|
|
485
|
+
* @param {Object} entityTypeData - The entity type object.
|
|
486
|
+
* @param {string} propertyName - The property path for which the navigation prefix is to be determined.
|
|
487
|
+
* @returns {string} The navigation prefix for the specified property.
|
|
488
|
+
*/
|
|
489
|
+
private _getNavigationPrefix;
|
|
490
|
+
/**
|
|
491
|
+
* Processes additional properties for a given context property and data field.
|
|
492
|
+
*
|
|
493
|
+
* This method analyzes the provided context property and data field to extract additional properties
|
|
494
|
+
* such as criticality, text annotations, unit annotations, and field control paths. It also determines
|
|
495
|
+
* the type of the property (e.g., date, string) and appends this information to the P13N string.
|
|
496
|
+
*
|
|
497
|
+
* @param {UIAnnotationValue} oContextProp - The context property object containing metadata about the property.
|
|
498
|
+
* @param {ILineItemContext} oDataField - The data field object containing line item metadata.
|
|
499
|
+
* @param {string} sNavigationPath - The navigation path to be prefixed to certain properties.
|
|
500
|
+
* @param {string[]} aAdditionalProperties - An array to which additional property paths will be added.
|
|
501
|
+
* @returns {string} A P13N string containing additional property details such as type and unit.
|
|
502
|
+
* @private
|
|
503
|
+
*/
|
|
504
|
+
private processAdditionalProperties;
|
|
505
|
+
/**
|
|
506
|
+
* Determines whether a column is supported for card creation.
|
|
507
|
+
*
|
|
508
|
+
* This method checks conditions to determine if a column is eligible for inclusion in a card,
|
|
509
|
+
* conditions are kept similar to RT cards restrictions in V2 LR.
|
|
510
|
+
*
|
|
511
|
+
* @param {Record<string, string>} columnDataObject - The column data object containing metadata about the column.
|
|
512
|
+
* @param {ILineItemContext} dataFieldDetails - The data field object containing line item metadata.
|
|
513
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing metadata about entities and properties.
|
|
514
|
+
* @param {IEntitySet} entitySetData - The entity set to which the column belongs.
|
|
515
|
+
* @returns {boolean} `true` if the column is supported for card creation, otherwise `false`.
|
|
516
|
+
* @private
|
|
517
|
+
*/
|
|
518
|
+
private isSupportedColumn;
|
|
519
|
+
/**
|
|
520
|
+
* Checks the multiplicity of a data field's association in the OData model.
|
|
521
|
+
*
|
|
522
|
+
* This method verifies whether the association for a given data field has a multiplicity of `*` (many).
|
|
523
|
+
* It traverses the navigation path of the data field to determine the multiplicity of the associated entity.
|
|
524
|
+
*
|
|
525
|
+
* @param {ODataMetaModel} metaModel - The OData meta model containing entity and association metadata.
|
|
526
|
+
* @param {IEntitySet} entitySetData - The entity set to which the data field belongs.
|
|
527
|
+
* @param {ILineItemContext} dataFieldValue - The data field whose association multiplicity is to be checked.
|
|
528
|
+
* @returns {boolean} `true` if the association has a multiplicity of `*`, otherwise `false`.
|
|
529
|
+
* @private
|
|
530
|
+
*/
|
|
531
|
+
private checkMultiplicityForDataFieldAssociation;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
//# sourceMappingURL=RecommendedCardUtil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendedCardUtil.d.ts","sourceRoot":"../../../../../..","sources":["src/sap/cux/home/utils/RecommendedCardUtil.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
sap.ui.define(["sap/base/i18n/Formatting","sap/base/Log","sap/base/security/encodeURL","sap/base/strings/formatMessage","sap/base/util/deepExtend","sap/ui/base/Object","sap/ui/core/library","../interface/CardsInterface","./Constants","./DataFormatUtils"],function(t,e,a,i,n,r,s,o,l,c){"use strict";const p=o["UIAnnotations"];const u=l["TABLE_TYPES"];const d=c["sortCollectionByImportance"];const f=3;const h=s.ValueState;var g=function(t){t["DataField"]="com.sap.vocabularies.UI.v1.DataField";t["Importance"]="com.sap.vocabularies.UI.v1.Importance";t["DataFieldWithNavigationPath"]="com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath";t["DataFieldWithIntentBasedNavigation"]="com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation";t["DataFieldForIntentBasedNavigation"]="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation";t["Chart"]="@com.sap.vocabularies.UI.v1.Chart";t["FieldGroup"]="@com.sap.vocabularies.UI.v1.FieldGroup";t["DataPoint"]="@com.sap.vocabularies.UI.v1.DataPoint";t["Contact"]="@com.sap.vocabularies.Communication.v1.Contact";t["DataFieldForAction"]="com.sap.vocabularies.UI.v1.DataFieldForAction";t["DataFieldForAnnotation"]="com.sap.vocabularies.UI.v1.DataFieldForAnnotation";t["DataFieldWithUrl"]="com.sap.vocabularies.UI.v1.DataFieldWithUrl";t["CriticalityRepresentationTypeWithoutIcon"]="com.sap.vocabularies.UI.v1.CriticalityRepresentationType/WithoutIcon";t["FieldControlHiddenType"]="com.sap.vocabularies.Common.v1.FieldControlType/Hidden";return t}(g||{});var y=function(t){t["DataFieldWithNavigationPath"]="DataFieldWithNavigationPath";t["DataFieldWithIntentBasedNavigation"]="DataFieldWithIntentBasedNavigation";t["DataFieldForIntentBasedNavigation"]="DataFieldForIntentBasedNavigation";t["DataFieldForAction"]="DataFieldForAction";t["DataFieldForAnnotation"]="DataFieldForAnnotation";return t}(y||{});class m extends r{static getInstance(){if(!m.Instance){m.Instance=new m}return m.Instance}getLineItemDetails(t,e,a){const i=t.getODataEntitySet(a);const n=this.getLineItemFromVariant(t,i.entityType);const r=n.lineItem;const s=e["sap.ui.generic.app"]?.pages;const o=this.getSettingsForPage(s);if(!o.quickVariantSelectionX){return this.createDefaultLineItemDetails(t,n,o,a,r)}const l=o.quickVariantSelectionX.variants||{};const{firstAvailableKey:c,sEntitySet:p,oVariant:u}=this.findFirstNonSmartChartVariant(t,l,a);if(u.isSmartChart){return this.createDefaultLineItemDetails(t,n,o,a,r)}delete o.requestAtLeastFields;const d=this.getNormalizedTableSettings(t,o,a);const f=t?.getODataEntitySet(p);const h=this.getLineItemFromVariant(t,f.entityType,u.annotationPath?.split("#")[1]);const g=h.lineItem;const y=h.presentationVariant;o.requestAtLeastFields=y?.RequestAtLeast?.length?y.RequestAtLeast:this._getRequestAtLeastFields(y);u.tableSettings=this.getNormalizedTableSettings(t,{...u,tableSettings:u.tableSettings||d},p);this.validateResponsiveTable(o,u,c);delete o.tableSettings;o.isResponsiveTable=o.isResponsiveTable===undefined||o.isResponsiveTable;const m={quickVariant:u,lrSettings:o,lineItem:g,entitySet:p,headerInfo:u?.tableSettings?.headerInfo||""};return g?m:this.createDefaultLineItemDetails(t,n,o,a,r)}findFirstNonSmartChartVariant(t,e,a){let i=null;let n=a;let r={};for(const s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;r=e[s];n=r.entitySet||a;const o=t.getODataEntitySet(n);if(o){r.isSmartChart=this.checkIfSmartChart(t,n,r);if(!r.isSmartChart){i=s;break}}else{r.isSmartChart=true}}return{firstAvailableKey:i,sEntitySet:n,oVariant:r}}validateResponsiveTable(t,a,i){const n=a.tableSettings?.type===u.RESPONSIVE;if(t.isResponsiveTable===undefined){t.isResponsiveTable=n}else if(t.isResponsiveTable!==n){e.error(`Variant with key ${i} resulted in invalid Table Type combination.`)}}createDefaultLineItemDetails(t,e,a,i,n){a.tableSettings=this.getNormalizedTableSettings(t,a,i);a.isResponsiveTable=a.tableSettings.type===u.RESPONSIVE;if(e?.presentationVariant?.RequestAtLeast?.length){a.requestAtLeastFields=e.presentationVariant.RequestAtLeast}return{quickVariant:{},lrSettings:a,lineItem:n,entitySet:i,headerInfo:a?.tableSettings?.headerInfo||""}}getLineItemFromVariant(t,e,a){const i=this.getAnnotation(t,e,p.UISelectionPresentationVariant,a);let n;if(i?.PresentationVariant){n=this.getPresentationVariant(t,e,i.PresentationVariant)}else{n=this.getAnnotation(t,e,p.UIPresentationVariant,a)}const r=n?this.getLineItem(t,e,n):null;const s=r?.lineItem||this.getAnnotation(t,e,p.UILineItem,"");return{presentationVariant:n,lineItem:s,qualifierPath:r?.annotationPath||""}}getAnnotation(t,e,a,i){const n=`${a}${i?`#${i}`:""}`;const r=t.getODataEntityType(e);return r?.[n]}getPresentationVariant(t,e,a){const i=a?.PresentationVariant;if(i?.Path){return this.getObject(t,e,i.Path)}return i}getLineItem(t,e,a){let i=a.Visualizations?.find(function(t){return t.AnnotationPath?.includes(p.UILineItem)});return i?{lineItem:this.getObject(t,e,i.AnnotationPath),annotationPath:i.AnnotationPath,sQualifier:i.AnnotationPath?.split("#")[1]}:null}_getRelevantColumnPaths(t){t=Array.isArray(t)?t:[];const e=new Set;const a=new Set;t.forEach(t=>{if(t){const i=t["leadingProperty"];const n=t["additionalProperty"];const r=t["navigationProperty"];if(i){e.add(i)}this.extractPathAndInsertToSet(n,e);this.extractPathAndInsertToSet(r,a)}});return{select:Array.from(e),expand:Array.from(a)}}extractPathAndInsertToSet(t,e){t?.split(",").forEach(t=>{if(t){e.add(t)}})}extractAndExpandNavigationProperty(t,e,a,i){const n={};for(const r of e){let e=r.lastIndexOf("/");let s;if(e<0){if(!this.getNavigationProperty(t,r,i,n)){continue}s=r}else{s=r.substring(0,e)}if(!a.includes(s)){a.push(s)}}}getNavigationProperty(t,e,a,i){let n=i?.[t];if(!n){n={};i[t]=n;const e=a.getODataEntitySet(t);if(e){const t=a.getODataEntityType(e.entityType);if(t){const e=t.navigationProperty||[];e.forEach(t=>{const e=t.name;n[e]=t})}}}return n?.[e]||undefined}_addNecessaryFields(t,e,a){let i=a.getODataEntitySet(e.entitySet);let n=a.getODataEntityType(i.entityType);let r=[];if(t.length>0){if(e.lineItem&&typeof e.lineItem!=="string"){e.lineItem.forEach(t=>{if(t.RecordType===g.DataFieldWithIntentBasedNavigation||t.RecordType===g.DataFieldWithNavigationPath){const e=this.getDataFieldsWithNavigation(t,a,n);if(e?.length){r=r.concat(e)}}})}this.getFieldControlsPath(t,a,n,r)}r.forEach(e=>{this.ensureSelectionProperty(e,t)})}getFieldControlsPath(t,e,a,i){t.forEach(t=>{if(t){let n=e.getODataProperty(a,t)||{};if(p.CommonFieldControl in n){let t=n[p.CommonFieldControl];if(t?.Path){i.push(t.Path)}}}})}getDataFieldsWithNavigation(t,e,a){const i=[];const n=t.Value?.Path;if(n){const t=e.getODataProperty(a,n);const r=t?.[p.CommonText]?.Path;const s=t?.["sap:text"];i.push(s||r||n)}if(t.SemanticObject?.Path){i.push(t.SemanticObject.Path)}if(t.Action?.Path){i.push(t.Action.Path)}return i}getParameters(t,e,a,i){let n=i.select||[];let r=i.expand||[];let s=t?.lrSettings?.requestAtLeastFields||[];if(s.length>0){n=this._ensureSelectionProperties(n,s)}this._handleMandatorySelectionFields(a,n,e);this._addNecessaryFields(n,t,e);this.extractAndExpandNavigationProperty(a,n,r,e);return{expand:r.join(",")||undefined,select:n.join(",")||undefined}}_ensureSelectionProperties(t,e){for(const a of e){if(typeof a==="object"&&a?.PropertyPath&&!t.includes(a.PropertyPath)){t.push(a.PropertyPath)}}return t}_handleMandatorySelectionFields(t,e,a){const i=a.getODataEntitySet(t,false);const n=a.getODataEntityType(i.entityType,false);n.key.propertyRef.forEach(t=>{this.ensureSelectionProperty(t.name,e)})}ensureSelectionProperty(t,e){t?.split(",").forEach(function(t){if(t&&!e.includes(t)){e.push(t)}})}_createCardManifest(t,e,a,i){let n=a["sap.ui"];let r=a["sap.app"];let s=0;if(r?.["crossNavigation"]){delete r["crossNavigation"]}if(r){Object.assign(r,{type:"card",id:`user.${t.id}.${Date.now()}`,title:t.cardTitle||"",subTitle:t.subTitle})}let o={"sap.ui":n,"sap.app":this.createManifestSapApp(r),"sap.card":this.createManifestSapCard(a,t),"sap.ui5":this.createSapui5()};const l=o?.["sap.card"]?.content;t.columns.slice(0,f).forEach(t=>{const e=this._getAttributeValue(t);if(t.identifier&&l?.item){l.item.title={value:e,identifier:true}}else if(l?.item?.attributes){l.item.attributes[s]={value:e,visible:true,...t.state&&{state:t.state,showStateIcon:t.showStateIcon}};s++}});if(i&&l?.item){l.item.actions=[]}return{...o,"sap.insights":{parentAppId:t.id,cardType:"RT",versions:{ui5:`${e.version}-${e.buildTimestamp}`},visible:true}}}_getAttributeValue(e){let a=!e.value.startsWith("{")?"{= extension.formatters.stringFormatter(${"+e.path+"}) }":e.value;if(e.type==="Edm.Date"||e.type==="Edm.DateTime"){const i=JSON.stringify({pattern:t.getDatePattern("short")});a="{=${"+e.path+"}?format.dateTime(${"+e.path+"}, "+i+") : ''}"}return a}createManifestSapApp(t){const e=n({},t);if(e?.dataSources?.mainService){e.dataSources["filterService"]=e.dataSources.mainService;if(e.dataSources["filterService"]?.settings){e.dataSources["filterService"].settings["odataVersion"]="2.0"}}return e}createManifestSapCard(t,e){const a=t["sap.app"]?.dataSources;const i=a?.mainService?.uri;const n=e.entitySet;const r="__count";const s={text:"{= ${"+r+"} === '0' ? '' : ${"+r+"} }"};let o={type:"List"};o["configuration"]=this.createManifestSapCardConfig(i||"",n);o["data"]=this.createManifestSapCardData(i||"",e.url);o["header"]={title:e.cardTitle,subTitle:"",actions:[],status:s,data:{path:"/content/d"}};o["extension"]="module:sap/insights/CardExtension";o["content"]={data:{path:"/content/d/results"},maxItems:5,item:{actions:[],attributesLayoutType:"OneColumn",attributes:[]}};this.addCardActions(o,e.semanticObject,e.action);return o}addCardActions(t,e,a){let i={ibnTarget:{semanticObject:e,action:a},sensitiveProps:[],ibnParams:{}};let n=[{type:"Navigation",parameters:"{= extension.formatters.getNavigationContext(${parameters>/headerState/value})}"}];let r=JSON.parse(JSON.stringify(i));let s=[{type:"Navigation",parameters:"{= extension.formatters.getNavigationContext(${parameters>/contentState/value}, ${})}"}];if(t.configuration?.parameters){t.configuration.parameters.headerState={value:JSON.stringify(i)};t.configuration.parameters.contentState={value:JSON.stringify(r)}}if(t.header){t.header.actions=n}if(t?.content?.item){t.content.item.actions=s}}createManifestSapCardConfig(t,e){const a={parameters:{_relevantODataFilters:{value:[]},_relevantODataParameters:{value:[]},_entitySet:{value:e},_urlSuffix:{value:"/Results"}},destinations:{service:{name:"(default)",defaultUrl:"/"}},csrfTokens:{token1:{data:{request:{url:"{{destinations.service}}"+t,method:"HEAD",headers:{"X-CSRF-Token":"Fetch"}}}}}};return a}createSapui5(){return{_version:"1.1.0",contentDensities:{compact:true,cozy:true},dependencies:{libs:{"sap.insights":{lazy:false}}}}}createManifestSapCardData(t,e){const a={content:{method:"GET",url:e,headers:{Accept:"application/json"}}};const i={request:{url:"{{destinations.service}}"+t+"/$batch",method:"POST",headers:{"X-CSRF-Token":"{{csrfTokens.token1}}"},batch:a}};return i}_getManifestCardData(t,e,a,i){const n=t["sap.app"];const r=n?.dataSources;const s=r?.mainService?.uri||"";const o=e.lineItem;const l=e.entitySet;const c=i.getODataEntitySet(l);const u=i.getODataEntityType(c?.entityType);const f=`${s.replace(/\/$/,"")}/${l}`;const h=o?.map(t=>this._getColumnDetail(l,i,t)).filter(t=>t!==undefined);const g=this._getRelevantColumnPaths(h);const y=this.getParameters(e,i,l,g);const m=this.createCustomParams(y);const S=m?`${f}?$top=5&skip=0&${m}&$inlinecount=allpages`:`${f}?$top=5&skip=0`;const P=d(h).map(t=>({path:t?.path,type:t?.type,value:t?.value,identifier:t?.identifier,state:t?.state,showStateIcon:t?.showStateIcon})).slice(0,4);return{cardTitle:t?.["sap.app"]?.title,subTitle:u[p.CommonLabel]?`Top 5 ${u[p.CommonLabel].String}`:"",url:S,semanticObject:a?.semanticObject||"",action:a?.action||"",id:t?.["sap.app"]?.id,columns:P,entitySet:l}}_getColumnDetail(t,e,a){let i;let n=e.getODataEntitySet(t);let r=e.getODataEntityType(n.entityType);if(a.Value?.Path){i=e.getODataProperty(r,a.Value.Path);let t=i[p.UIHidden];if(t?.Bool==="true"||t?.Bool===true){return undefined}if(this.isPropertyHidden(a)||!i||Object.keys(i).length===0){return undefined}}let s=this.createP13N(n,i,a,e);s=s.replace(/\\/g,"");let o=s?JSON.parse(s):{};if(!this.isSupportedColumn(o,a,e,n)){return undefined}if(i){o=this.getColumnObjectDetails(o,i,r,a);if(a?.[g.Importance]!==undefined){const t=a[g.Importance];o.importance=t}}return o}getColumnObjectDetails(t,e,a,i){let n=e[p.CommonText]?.Path||"";n="{"+n+"}";let r=e.name?"{"+e.name+"}":"";let s="";const o=a[p.CommonSemanticKey];const l=!!o&&o.some(function(t){return t.PropertyPath===e.name});let c=false;let u=undefined;if((i?.Criticality&&i?.Value?.Path)===e.name){u=i;c=true}if(e[p.MeasuresISOCurrency]?.Path){r=r.concat(" "+"{"+s+e[p.MeasuresISOCurrency]?.Path+"}")}if(e[p.MeasuresUnit]?.Path){r=r.concat(" "+"{"+s+e[p.MeasuresUnit]?.Path+"}")}if(e[p.CommonText]?.Path){let i=e[p.CommonText]?.[p.UITextArrangement];if(!i){i=a[p.UITextArrangement]}this._setColumnTextValue(i,t,n,r)}else{t["value"]=r;if(l){t["identifier"]=l}}if(c){t["state"]=this.buildExpressionForCriticalityColor(u);t["showStateIcon"]=u?.CriticalityRepresentation?.EnumMember!==g.CriticalityRepresentationTypeWithoutIcon||true}t["path"]=e[p.CommonText]?.Path||e.name;t["type"]=e.type;return t}buildExpressionForCriticalityColor(t){let a=h.None;let n;let r=t?.Criticality;let s=function(t){t["Negative"]="com.sap.vocabularies.UI.v1.CriticalityType/Negative";t["Critical"]="com.sap.vocabularies.UI.v1.CriticalityType/Critical";t["Positive"]="com.sap.vocabularies.UI.v1.CriticalityType/Positive";return t}({});if(r){n="'{'= ({0} === ''"+s.Negative+"'') || ({0} === ''1'') || ({0} === 1) ? ''"+h.Error+"'' : "+"({0} === ''"+s.Critical+"'') || ({0} === ''2'') || ({0} === 2) ? ''"+h.Warning+"'' : "+"({0} === ''"+s.Positive+"'') || ({0} === ''3'') || ({0} === 3) ? ''"+h.Success+"'' : "+"''"+h.None+"'' '}'";if(r?.Path){const t="${"+r.Path+"}";a=i(n,[t])}else if(r?.EnumMember){const t="'"+r.EnumMember+"'";a=i(n,[t])}else{e.warning("Case not supported, returning the default sap.ui.core.ValueState.None")}}else{e.warning("Case not supported, returning the default sap.ui.core.ValueState.None")}return a}_setColumnTextValue(t,e,a,i){let n=function(t){t["TextOnly"]="TextOnly";t["TextLast"]="TextLast";t["TextSeparate"]="TextSeparate";return t}({});const r=t?.EnumMember?.split("/")[1];let s;switch(r){case n.TextOnly:s=`{= $${a} === '' ? '' : $${a} }`;break;case n.TextLast:s=`{= $${i} === '' ? '' : $${i} }`+`{= $${a} === '' ? '' : ' (' + ($${a}) + ')' }`;break;case n.TextSeparate:s=`{= $${i} === '' ? '' : $${i} }`;break;default:s=`{= $${a} === '' ? '' : $${a} }`+`{= $${i} === '' ? '' : ' (' + ($${i}) + ')' }`;break}e["value"]=s}_getRequestAtLeastFields(t){return t&&Array.isArray(t.requestAtLeastFields)?t.requestAtLeastFields:[]}createCustomParams(t){const e=[];if(t?.expand){e.push("$expand="+a(t["expand"]))}if(t?.select){e.push("$select="+a(t["select"]))}return e.join("&")}getObject(t,e,a){if(a[0]!=="/"){a=t.getODataEntityType(e,true)+"/"+a}return t.getObject(a.replace(/@/g,""))}_isListReport(t){return t?.component?.name==="sap.suite.ui.generic.template.ListReport"}getSettingsForPage(t){if(!t){return{}}let e={};if(Array.isArray(t)&&this._isListReport(t[0])){const a=t[0];if(a?.component){const t=a.component;e=t?.settings||{};e.bSupressCardRowNavigation=this.shouldSuppressCardRowNavigation(a)}}else if(Object.keys(t).length){const a=Object.keys(t).find(e=>this._isListReport(t[e]));if(a){const i=t[a];if(i?.component){const t=i.component;e=t?.settings??{};e.bSupressCardRowNavigation=this.shouldSuppressCardRowNavigation(i)}}}return e}shouldSuppressCardRowNavigation(t){if(t.pages){if(Array.isArray(t.pages)){if(t.pages.length===0||t.pages[0]?.navigation){return true}}else{const e=Object.keys(t.pages);if(e.length===0||e.length&&t.pages[e[0]]?.navigation){return true}}}else{return true}if(t?.component?.settings?.quickVariantSelectionX){return true}return false}getNormalizedTableSettings(t,e,a){const i=n({},e);if(i&&!i.tableType){if(i.gridTable){i.tableType=u.GRID}else if(i.treeTable){i.tableType=u.TREE}}i.tableSettings=i.tableSettings||{};i.tableSettings.type=i.tableSettings.type||i.tableType;const r=t.getODataEntitySet(a);const s=t.getODataEntityType(r.entityType);if(i.tableSettings.type!==u.STANDARD_LIST&&i.tableSettings.type!==u.OBJECT_LIST&&a){i.tableSettings.type=i.tableSettings.type||(s[p.SapSemantics]==="aggregate"?u.ANALYTICAL:u.RESPONSIVE);if(i.tableSettings.type===u.ANALYTICAL&&!(s[p.SapSemantics]==="aggregate")){i.tableSettings.type=u.GRID}}if(s[p.UIHeaderInfo]){i.tableSettings.headerInfo=s[p.UIHeaderInfo]}delete i.gridTable;delete i.treeTable;delete i.tableType;return i.tableSettings}checkIfSmartChart(t,e,a){let i=t.getODataEntitySet(e);let n=t.getODataEntityType(i.entityType);let r,s,o;s=a.annotationPath;o=s?n[s]:undefined;if(o?.PresentationVariant){if(o.PresentationVariant.Visualizations){r=o.PresentationVariant.Visualizations[0].AnnotationPath}else if(o.PresentationVariant.Path){let t=o.PresentationVariant.Path.split("@")[1];let e=t&&n[t];r=e?e?.Visualizations?.[0].AnnotationPath:""}}else if(o?.Visualizations){r=o.Visualizations[0].AnnotationPath}return!!((r??"").indexOf(p.UIChart)>-1)}hasMandatoryProperties(t,e){if(t?.["Org.OData.Capabilities.V1.FilterRestrictions"]?.["RequiredProperties"]?.length){return true}else if(e?.length){return e.some(t=>Object.keys(t).length&&(t["sap:parameter"]==="mandatory"||t["sap:required-in-filter"]==="true"))}return false}_getParametersisedEntitySetParams(t,e,a){if(!t){throw new Error("OData Model needs to be passed as an argument")}const i={entitySetName:null,parameters:[],navPropertyName:null};const n=t.getODataEntitySet(e);const r=t.getODataEntityType(n.entityType);const s=r.navigationProperty;if(!s){return i}s.forEach(function(e){const s=t.getODataAssociationEnd(r,e.name);const o=s&&t.getODataEntityType(s.type);if(o?.[p.SapSemantics]!=="parameters"||!o.key){return false}i.entitySetName=t.getODataAssociationSetEnd(r,e.name)?.entitySet;for(let t of o.key.propertyRef){if(a){const e=o.property;for(let a of e){if(a.name===t.name){i.parameters.push(a)}}}else{i.parameters.push(t.name)}}const l=o.navigationProperty;const c=l?.some(function(e){const a=t.getODataAssociationEnd(o,e?.name)?.type;i.navPropertyName=a===n.entityType?e?.name:null;return i.navPropertyName});return c&&i.navPropertyName&&i.entitySetName});return i}isPropertyHidden(t){let e=t[p.CommonFieldControl];let a=t[p.UIHidden];if(e?.EnumMember===g.FieldControlHiddenType){return true}if(a){if(Object.prototype.hasOwnProperty.call(a,"Bool")){return a?.Bool==="true"}else if(Object.prototype.hasOwnProperty.call(a,"Path")){return false}else{return true}}return false}createP13N(t,e,a,i){let n="";let r=[];let s="";let o=a?.RecordType;let l=a?.Value;let c=l?.Path||"";if(o===g.DataField||o===g.DataFieldForAnnotation||o===g.DataFieldWithUrl){if(c){let e=this.createP13NColumnKey(a);n='\\{"columnKey":"'+e+'", "leadingProperty":"'+c;s=this.getNavigationPrefixPath(i,t,c)}else if(l?.Apply?.Name==="odata.concat"){l?.Apply?.Parameters.forEach(function(t){if(t.Type==="Path"){if(!n){n='\\{"columnKey":"'+t?.Value+'", "leadingProperty":"'+t?.Value}else{r.push(t.Value)}}})}n+=this.processAdditionalProperties(e,a,s,r);if(o===g.DataFieldWithUrl&&a?.Url){this.processDataFieldWithUrl(a,r)}if(n&&r.length){n+='", "additionalProperty":"'+r.join()}if(n){n+='"\\}'}}return n}processDataFieldWithUrl(t,e){const a=t.Url;if(a?.Apply?.Parameters){a.Apply.Parameters.forEach(t=>{if(t.Type==="LabeledElement"&&t.Value?.Path){e.push(t.Value.Path)}})}if(a?.Path){e.push(a.Path)}}createP13NColumnKey(t){let e="",a="template",i="::";let n=t.RecordType;let r=t?.Value;let s=t.SemanticObject?.String||"";let o=t.Action?.String||"";let l=r?.Path||"";let c="",p=null;let u=function(t){return a+i+t.join(i)};switch(n){case g.DataField:e=l;break;case g.DataFieldWithIntentBasedNavigation:e=u([y.DataFieldWithIntentBasedNavigation,s,o,l]);break;case g.DataFieldWithNavigationPath:e=u([y.DataFieldWithNavigationPath,l]);break;case g.DataFieldForIntentBasedNavigation:e=u([y.DataFieldForIntentBasedNavigation,s,o]);break;case g.DataFieldForAction:e=u([y.DataFieldForAction,o]);break;case g.DataFieldForAnnotation:c=t.Target?.AnnotationPath;p=c&&(c.indexOf(g.Contact)>=0||c.indexOf(g.DataPoint)>=0||c.indexOf(g.FieldGroup)>=0||c.indexOf(g.Chart)>=0);if(p){e=u([y.DataFieldForAnnotation,c]);e=e.replace("@","")}break;default:e="";break}return e}getNavigationPrefixPath(t,e,a){let i="";if(t){let n=t.getODataEntityType(e.entityType);if(n){i=this._getNavigationPrefix(t,n,a);if(i){i+="/"}}}return i}_getNavigationPrefix(t,e,a){let i="";let n=a.split("/");if(n.length>1){for(let a=0;a<n.length-1;a++){let r=t.getODataAssociationEnd(e,n[a]);if(!r){return i}if(r){e=t.getODataEntityType(r.type);i+=(i?"/":"")+n[a]}}}return i}processAdditionalProperties(t,e,a,i){let n="";if(t?.type==="Edm.DateTime"&&t?.["sap:display-format"]==="Date"){n+='", "type":"date'}else if(t?.type==="Edm.String"){n+='", "type":"string'}if(e?.Criticality?.Path){i.push(e?.Criticality.Path)}let r=t?.[p.CommonText];if(r?.Path){i.push(a+r?.Path)}const s=t?t[p.MeasuresISOCurrency]||t[p.MeasuresUnit]:null;if(s?.Path){i.push(s.Path);n+='", "unit":"'+s.Path}if(t?.[p.CommonFieldControl]?.Path){i.push(a+t[p.CommonFieldControl].Path)}return n}isSupportedColumn(t,e,a,i){let n=e.RecordType;if(n===g.DataFieldForAnnotation||n===g.DataFieldForAction||n===g.DataFieldForIntentBasedNavigation||!t){return false}let r=a.getODataEntityType(i.entityType);let s=a.getODataProperty(r,t.leadingProperty);let o=t.columnKey;if(this.checkMultiplicityForDataFieldAssociation(a,i,e)||o&&(o.indexOf(y.DataFieldForAnnotation)>-1||o.indexOf(y.DataFieldForAction)>-1||o.indexOf(y.DataFieldForIntentBasedNavigation)>-1||s?.[p.UIIsImageURL]?.Bool==="true")){return false}return true}checkMultiplicityForDataFieldAssociation(t,e,a){if(a?.Value?.Path){let i=a.Value.Path;let n=t&&t.getODataEntityType(e.entityType);let r;if(!(i.indexOf("/")>-1)||!n){return false}while(i.indexOf("/")>-1){let e=i.split("/")[0];i=i.split("/").slice(1).join("/");n=t.getODataEntityType(r?.type)||n;r=t.getODataAssociationEnd(n,e)}if(r&&r.multiplicity==="*"){return true}}return false}}m.FieldTypes=y;return m});
|
|
6
|
+
//# sourceMappingURL=RecommendedCardUtil.js.map
|