@sapui5/sap.cux.home 1.142.0 → 1.142.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +4 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +3 -2
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +6 -5
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -5
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +47 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +333 -237
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +344 -230
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +3 -2
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +3 -2
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +6 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +6 -1
- package/src/sap/cux/home/BaseContainer.d.ts +1 -1
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +10 -2
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +7 -3
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +6 -0
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/CardsContainer.d.ts +108 -0
- package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/CardsContainer.js +207 -0
- package/src/sap/cux/home/CardsContainer.js.map +1 -0
- package/src/sap/cux/home/CardsContainer.ts +202 -0
- package/src/sap/cux/home/CardsPanel.d.ts +43 -62
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +345 -285
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +211 -200
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +12 -6
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +13 -5
- package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
- package/src/sap/cux/home/ErrorPanel.js +11 -16
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +7 -19
- package/src/sap/cux/home/FavAppPanel.d.ts +1 -2
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +296 -301
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +14 -10
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +11 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +20 -8
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +20 -7
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts +8 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js +15 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.ts +11 -0
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +287 -57
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/Layout.d.ts +3 -1
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +49 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +59 -8
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +379 -63
- package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -14
- package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
- package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
- package/src/sap/cux/home/NewsContainer.js.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +29 -118
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +12 -14
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +13 -16
- package/src/sap/cux/home/NewsSettingsPanel.js +4 -4
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +5 -5
- package/src/sap/cux/home/PagePanel.d.ts +1 -1
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +18 -10
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +25 -15
- package/src/sap/cux/home/PagesContainer.d.ts +72 -0
- package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
- package/src/sap/cux/home/PagesContainer.js +333 -0
- package/src/sap/cux/home/PagesContainer.js.map +1 -0
- package/src/sap/cux/home/PagesContainer.ts +179 -0
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js +66 -132
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +69 -151
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +16 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +15 -1
- package/src/sap/cux/home/TilesContainer.d.ts +111 -0
- package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/TilesContainer.js +218 -0
- package/src/sap/cux/home/TilesContainer.js.map +1 -0
- package/src/sap/cux/home/TilesContainer.ts +216 -0
- package/src/sap/cux/home/TilesPanel.d.ts +22 -52
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +184 -165
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +160 -154
- package/src/sap/cux/home/ToDoPanel.d.ts +1 -0
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +38 -63
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +32 -31
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +4 -4
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.ts +3 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +5 -5
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +30 -3
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +23 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +29 -19
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.js +78 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.ts +81 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +26 -12
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +19 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +23 -7
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +20 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +18 -2
- package/src/sap/cux/home/interface/CardsInterface.d.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +6 -1
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts +27 -4
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.js.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.ts +23 -4
- package/src/sap/cux/home/interface/LayoutInterface.d.ts +7 -0
- package/src/sap/cux/home/interface/LayoutInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.js.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.ts +7 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +7 -4
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +10 -5
- package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
- package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +0 -45
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +10 -18
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1 -1
- package/src/sap/cux/home/themes/base/SettingsDialog.less +4 -0
- package/src/sap/cux/home/themes/base/TilesContainer.less +65 -0
- package/src/sap/cux/home/themes/base/library.source.less +2 -1
- package/src/sap/cux/home/utils/BatchHelper.d.ts +1 -0
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +7 -2
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +8 -1
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +150 -151
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
- package/ui5.yaml +1 -0
- package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
- package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
- package/src/sap/cux/home/InsightsContainer.js +0 -459
- package/src/sap/cux/home/InsightsContainer.js.map +0 -1
- package/src/sap/cux/home/InsightsContainer.ts +0 -489
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/fe/navigation/SelectionVariant", "sap/insights/CardHelper", "sap/insights/base/InMemoryCachingHost", "sap/m/HBox", "sap/m/HeaderContainer", "sap/m/VBox", "sap/ui/core/EventBus", "sap/ui/integration/widgets/Card", "sap/ui/model/json/JSONModel", "sap/ushell/Container", "sap/ushell/api/S4MyHome", "./BasePanel", "./MenuItem", "./utils/AppManager", "./utils/CommonUtils", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/DragDropUtils", "./utils/FESRUtil", "./utils/InsightsUtils", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (Log, GridContainer, GridContainerSettings, SelectionVariant, CardHelper, InsightsInMemoryCachingHost, HBox, HeaderContainer, VBox, EventBus, Card, JSONModel, Container, S4MyHome, __BasePanel, __MenuItem, __AppManager, ___utils_CommonUtils, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_DragDropUtils, ___utils_FESRUtil, ___utils_InsightsUtils, __PersonalisationUtils, __UShellPersonalizer) {
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/fe/navigation/SelectionVariant", "sap/insights/CardHelper", "sap/insights/base/InMemoryCachingHost", "sap/m/Button", "sap/m/HBox", "sap/m/HeaderContainer", "sap/m/VBox", "sap/ui/core/EventBus", "sap/ui/integration/widgets/Card", "sap/ui/model/json/JSONModel", "sap/ushell/Container", "sap/ushell/api/S4MyHome", "./BasePanel", "./ErrorPanel", "./MenuItem", "./utils/AppManager", "./utils/CommonUtils", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/DragDropUtils", "./utils/FESRUtil", "./utils/InsightsUtils", "./utils/PersonalisationUtils", "./utils/UshellPersonalizer"], function (Log, GridContainer, GridContainerSettings, SelectionVariant, CardHelper, InsightsInMemoryCachingHost, Button, HBox, HeaderContainer, VBox, EventBus, Card, JSONModel, Container, S4MyHome, __BasePanel, __ErrorPanel, __MenuItem, __AppManager, ___utils_CommonUtils, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_DragDropUtils, ___utils_FESRUtil, ___utils_InsightsUtils, __PersonalisationUtils, __UShellPersonalizer) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -31,6 +31,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
31
31
|
}
|
|
32
32
|
return finalizer(false, result);
|
|
33
33
|
}
|
|
34
|
+
const ErrorPanel = _interopRequireDefault(__ErrorPanel);
|
|
34
35
|
const MenuItem = _interopRequireDefault(__MenuItem);
|
|
35
36
|
const AppManager = _interopRequireDefault(__AppManager);
|
|
36
37
|
const getPageManagerInstance = ___utils_CommonUtils["getPageManagerInstance"];
|
|
@@ -44,8 +45,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
44
45
|
const addFESRId = ___utils_FESRUtil["addFESRId"];
|
|
45
46
|
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
46
47
|
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
47
|
-
const
|
|
48
|
-
const createShowMoreMenuItem = ___utils_InsightsUtils["createShowMoreMenuItem"];
|
|
48
|
+
const getAssociatedFullScreenButton = ___utils_InsightsUtils["getAssociatedFullScreenButton"];
|
|
49
49
|
const getAssociatedFullScreenMenuItem = ___utils_InsightsUtils["getAssociatedFullScreenMenuItem"];
|
|
50
50
|
const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
|
|
51
51
|
const targetsAreEqual = ___utils_InsightsUtils["targetsAreEqual"];
|
|
@@ -54,21 +54,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
54
54
|
var cardsMenuItems = /*#__PURE__*/function (cardsMenuItems) {
|
|
55
55
|
cardsMenuItems["REFRESH"] = "cards-refresh";
|
|
56
56
|
cardsMenuItems["EDIT_CARDS"] = "cards-editCards";
|
|
57
|
-
cardsMenuItems["AI_INSIGHT_CARD"] = "cards-addAIInsightCard";
|
|
58
57
|
return cardsMenuItems;
|
|
59
58
|
}(cardsMenuItems || {});
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return cardsContainerActionButtons;
|
|
70
|
-
}(cardsContainerActionButtons || {});
|
|
71
|
-
const sortedMenuItems = [cardsMenuItems.REFRESH, cardsMenuItems.EDIT_CARDS, cardsMenuItems.AI_INSIGHT_CARD, "showMore", "settings"];
|
|
59
|
+
var cardsActionButtons = /*#__PURE__*/function (cardsActionButtons) {
|
|
60
|
+
cardsActionButtons["SHOW_MORE"] = "fullScreen";
|
|
61
|
+
return cardsActionButtons;
|
|
62
|
+
}(cardsActionButtons || {});
|
|
63
|
+
var errorPanelMenuItems = /*#__PURE__*/function (errorPanelMenuItems) {
|
|
64
|
+
errorPanelMenuItems["EDIT_CARDS"] = "cards-errorPanel-editCards";
|
|
65
|
+
return errorPanelMenuItems;
|
|
66
|
+
}(errorPanelMenuItems || {});
|
|
67
|
+
const sortedMenuItems = [cardsMenuItems.REFRESH, cardsMenuItems.EDIT_CARDS, "showMore", "settings"];
|
|
72
68
|
const Constants = {
|
|
73
69
|
PLACEHOLDER_CARD_COUNT: 10,
|
|
74
70
|
CARDS_GAP: 16
|
|
@@ -173,7 +169,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
173
169
|
this.aVisibleCardInstances = [];
|
|
174
170
|
this.cardsInViewport = [];
|
|
175
171
|
this._appSwitched = false;
|
|
176
|
-
this.
|
|
172
|
+
this.cardHelper = null;
|
|
177
173
|
},
|
|
178
174
|
/**
|
|
179
175
|
* Initializes the Cards Panel.
|
|
@@ -184,6 +180,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
184
180
|
init: function _init() {
|
|
185
181
|
const _this = this;
|
|
186
182
|
BasePanel.prototype.init.call(this);
|
|
183
|
+
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")}`);
|
|
187
184
|
this.setProperty("key", "cards");
|
|
188
185
|
this.setProperty("enableFullScreen", true);
|
|
189
186
|
this.cardWidth = "19rem";
|
|
@@ -208,10 +205,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
208
205
|
// Subscribe to the event
|
|
209
206
|
this.oEventBus.subscribe("importChannel", "cardsImport", function (sChannelId, sEventId, oData) {
|
|
210
207
|
try {
|
|
211
|
-
return Promise.resolve(_this.
|
|
212
|
-
|
|
213
|
-
_this._importdone();
|
|
214
|
-
});
|
|
208
|
+
return Promise.resolve(_this._createCards(oData)).then(function () {
|
|
209
|
+
_this._importdone();
|
|
215
210
|
});
|
|
216
211
|
} catch (e) {
|
|
217
212
|
return Promise.reject(e);
|
|
@@ -268,8 +263,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
268
263
|
_createCards: function _createCards(aCards) {
|
|
269
264
|
try {
|
|
270
265
|
const _this3 = this;
|
|
271
|
-
return Promise.resolve(_this3.
|
|
272
|
-
return
|
|
266
|
+
return Promise.resolve(_this3.getCardHelper()).then(function (cardHelper) {
|
|
267
|
+
return Promise.resolve(cardHelper?._createCards(aCards)).then(function () {
|
|
268
|
+
return _this3.rerenderCards();
|
|
269
|
+
});
|
|
273
270
|
});
|
|
274
271
|
} catch (e) {
|
|
275
272
|
return Promise.reject(e);
|
|
@@ -315,8 +312,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
315
312
|
try {
|
|
316
313
|
const sType = oEvent.getParameter("type");
|
|
317
314
|
let oParameters = oEvent.getParameter("parameters") || {};
|
|
318
|
-
const
|
|
315
|
+
const _temp5 = function () {
|
|
319
316
|
if (sType === "Navigation" && oParameters.ibnTarget) {
|
|
317
|
+
function _temp4() {
|
|
318
|
+
let aContentActions = _this4.getContentActions(oIntegrationCardManifest);
|
|
319
|
+
const oHeaderAction = aHeaderActions[0] || {},
|
|
320
|
+
oContentAction = aContentActions[0] || {};
|
|
321
|
+
const bOldCardExtension = !!(oHeaderAction?.parameters && typeof oHeaderAction.parameters === "string" && oHeaderAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1 || oContentAction?.parameters && typeof oContentAction.parameters === "string" && oContentAction.parameters.indexOf("{= extension.formatters.addPropertyValueToAppState") > -1);
|
|
322
|
+
_this4._manageOldCardExtension(bOldCardExtension, oEvent, oParameters);
|
|
323
|
+
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
324
|
+
return Promise.resolve(navigationService.navigate({
|
|
325
|
+
target: oParameters.ibnTarget,
|
|
326
|
+
params: oParameters.ibnParams
|
|
327
|
+
})).then(function () {
|
|
328
|
+
addFESRNavigationSource(FESRNavigationSource.Cards);
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
}
|
|
320
332
|
oEvent.preventDefault();
|
|
321
333
|
const oCard = oEvent.getParameter("card") || {},
|
|
322
334
|
oIntegrationCardManifest = oCard?.getManifestEntry("sap.card") || {},
|
|
@@ -328,25 +340,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
328
340
|
if (oIntegrationCardManifest?.configuration?.parameters?._semanticDateRangeSetting?.value) {
|
|
329
341
|
oCheckSemanticProperty = JSON.parse(oIntegrationCardManifest.configuration.parameters._semanticDateRangeSetting.value);
|
|
330
342
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
340
|
-
return Promise.resolve(navigationService.navigate({
|
|
341
|
-
target: oParameters.ibnTarget,
|
|
342
|
-
params: oParameters.ibnParams
|
|
343
|
-
})).then(function () {
|
|
344
|
-
addFESRNavigationSource(FESRNavigationSource.Cards);
|
|
345
|
-
});
|
|
346
|
-
});
|
|
343
|
+
const _temp3 = function () {
|
|
344
|
+
if (oCheckSemanticProperty && Object.keys(oCheckSemanticProperty).length) {
|
|
345
|
+
return Promise.resolve(_this4.getCardHelper()).then(function (cardHelper) {
|
|
346
|
+
oParameters = cardHelper?.processSemanticDate(oParameters, oIntegrationCardManifest);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}();
|
|
350
|
+
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
347
351
|
}
|
|
348
352
|
}();
|
|
349
|
-
return Promise.resolve(
|
|
353
|
+
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
|
|
350
354
|
} catch (e) {
|
|
351
355
|
return Promise.reject(e);
|
|
352
356
|
}
|
|
@@ -408,25 +412,27 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
408
412
|
return Promise.resolve(_this7._getManifestEntryFromCard(oCard, "sap.insights").then(function (oEntry) {
|
|
409
413
|
try {
|
|
410
414
|
if (oEntry) {
|
|
411
|
-
return Promise.resolve(_this7.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
415
|
+
return Promise.resolve(_this7.getCardHelper()).then(function (cardHelper) {
|
|
416
|
+
return Promise.resolve(cardHelper?.getParentAppDetails({
|
|
417
|
+
descriptorContent: oCard.getManifestEntry("/")
|
|
418
|
+
})).then(function (parentApp) {
|
|
419
|
+
if (parentApp.semanticObject && parentApp.action) {
|
|
420
|
+
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
421
|
+
const intents = [{
|
|
422
|
+
target: {
|
|
423
|
+
semanticObject: parentApp.semanticObject,
|
|
424
|
+
action: parentApp.action
|
|
425
|
+
}
|
|
426
|
+
}];
|
|
427
|
+
return Promise.resolve(navigationService.isNavigationSupported(intents)).then(function (_navigationService$is) {
|
|
428
|
+
const aResponses = _navigationService$is;
|
|
429
|
+
return aResponses[0].supported || false;
|
|
430
|
+
});
|
|
425
431
|
});
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
432
|
+
} else {
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
430
436
|
});
|
|
431
437
|
} else {
|
|
432
438
|
return Promise.resolve(false);
|
|
@@ -441,17 +447,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
441
447
|
},
|
|
442
448
|
action: function (oCard) {
|
|
443
449
|
try {
|
|
444
|
-
return Promise.resolve(_this8.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return Promise.resolve(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
450
|
+
return Promise.resolve(_this8.getCardHelper()).then(function (cardHelper) {
|
|
451
|
+
return Promise.resolve(cardHelper?.getParentAppDetails({
|
|
452
|
+
descriptorContent: oCard.getManifestEntry("/")
|
|
453
|
+
})).then(function (parentApp) {
|
|
454
|
+
const sShellHash = parentApp.semanticURL || parentApp.semanticObject;
|
|
455
|
+
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
456
|
+
return Promise.resolve(navigationService.navigate({
|
|
457
|
+
target: {
|
|
458
|
+
shellHash: sShellHash
|
|
459
|
+
}
|
|
460
|
+
})).then(function () {
|
|
461
|
+
addFESRNavigationSource(FESRNavigationSource.Cards);
|
|
462
|
+
});
|
|
455
463
|
});
|
|
456
464
|
});
|
|
457
465
|
});
|
|
@@ -554,7 +562,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
554
562
|
refreshData: function _refreshData() {
|
|
555
563
|
try {
|
|
556
564
|
const _this9 = this;
|
|
557
|
-
const
|
|
565
|
+
const _temp6 = _catch(function () {
|
|
558
566
|
return Promise.resolve(CardHelper.getServiceAsync()).then(function (_getServiceAsync) {
|
|
559
567
|
_this9.cardHelperInstance = _getServiceAsync;
|
|
560
568
|
return Promise.resolve(_this9.cardHelperInstance._refreshUserCards(false)).then(function () {
|
|
@@ -564,30 +572,33 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
564
572
|
}, function (error) {
|
|
565
573
|
Log.error("Failed to refresh cards: ", error instanceof Error ? error.message : error);
|
|
566
574
|
});
|
|
567
|
-
return Promise.resolve(
|
|
575
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
568
576
|
} catch (e) {
|
|
569
577
|
return Promise.reject(e);
|
|
570
578
|
}
|
|
571
579
|
},
|
|
572
580
|
/**
|
|
573
|
-
*
|
|
581
|
+
* Retrieves the Card Helper instance.
|
|
574
582
|
*
|
|
575
583
|
* @private
|
|
576
|
-
* @returns {Promise<
|
|
584
|
+
* @returns {Promise<ICardHelperInstance>} A promise that resolves with the Card Helper instance.
|
|
577
585
|
*/
|
|
578
|
-
|
|
586
|
+
getCardHelper: function _getCardHelper() {
|
|
579
587
|
try {
|
|
580
588
|
const _this0 = this;
|
|
581
|
-
|
|
589
|
+
function _temp8() {
|
|
590
|
+
return _this0.cardHelperInstance;
|
|
591
|
+
}
|
|
592
|
+
const _temp7 = function () {
|
|
582
593
|
if (!_this0.cardHelperInstance) {
|
|
583
594
|
_this0.pageManagerInstance = _this0.pageManagerInstance || getPageManagerInstance(_this0);
|
|
584
|
-
return Promise.resolve(Promise.all([
|
|
595
|
+
return Promise.resolve(Promise.all([_this0.getCardHelperService(), _this0.pageManagerInstance.hasCustomSpace()])).then(function ([cardHelperInstance, hasCustomSpace]) {
|
|
585
596
|
_this0.cardHelperInstance = cardHelperInstance;
|
|
586
597
|
_this0.hasCustomSpace = hasCustomSpace;
|
|
587
598
|
});
|
|
588
599
|
}
|
|
589
600
|
}();
|
|
590
|
-
return Promise.resolve(
|
|
601
|
+
return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
|
|
591
602
|
} catch (e) {
|
|
592
603
|
return Promise.reject(e);
|
|
593
604
|
}
|
|
@@ -601,15 +612,35 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
601
612
|
renderPanel: function _renderPanel() {
|
|
602
613
|
try {
|
|
603
614
|
const _this1 = this;
|
|
604
|
-
|
|
615
|
+
const _temp9 = _catch(function () {
|
|
605
616
|
return Promise.resolve(_this1.rerenderCards()).then(function () {
|
|
606
617
|
_this1.fireEvent("loaded");
|
|
607
618
|
});
|
|
619
|
+
}, function (error) {
|
|
620
|
+
Log.error(error instanceof Error ? error.message : String(error));
|
|
608
621
|
});
|
|
622
|
+
return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
|
|
609
623
|
} catch (e) {
|
|
610
624
|
return Promise.reject(e);
|
|
611
625
|
}
|
|
612
626
|
},
|
|
627
|
+
/**
|
|
628
|
+
* Sorts the menu items based on the provided order.
|
|
629
|
+
*
|
|
630
|
+
* @private
|
|
631
|
+
* @param {string[]} menuItems - The order of the menu items.
|
|
632
|
+
*/
|
|
633
|
+
_sortMenuItems: function _sortMenuItems(menuItems) {
|
|
634
|
+
const panelMenuItems = this.getAggregation("menuItems");
|
|
635
|
+
let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
|
|
636
|
+
this.removeAllAggregation("menuItems");
|
|
637
|
+
sortedMenuItems?.forEach(menuItem => this.addAggregation("menuItems", menuItem));
|
|
638
|
+
},
|
|
639
|
+
_setMenuItemsVisibility: function _setMenuItemsVisibility(menuItem, bVisible) {
|
|
640
|
+
if (menuItem && (menuItem.getId().includes(cardsMenuItems.REFRESH) || menuItem.getId().includes(cardsMenuItems.EDIT_CARDS) || menuItem.getId().includes("showMore"))) {
|
|
641
|
+
menuItem.setVisible(bVisible);
|
|
642
|
+
}
|
|
643
|
+
},
|
|
613
644
|
/**
|
|
614
645
|
* Rerenders the cards.
|
|
615
646
|
*
|
|
@@ -623,75 +654,100 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
623
654
|
_this10._cardsRendered = new Promise((resolve, reject) => {
|
|
624
655
|
void function () {
|
|
625
656
|
try {
|
|
626
|
-
const
|
|
657
|
+
const _temp13 = _catch(function () {
|
|
627
658
|
// Enable placeholders after updating/rerendering cards
|
|
628
|
-
const sDefaultAggreName = _this10.
|
|
629
|
-
_this10.
|
|
659
|
+
const sDefaultAggreName = _this10._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
660
|
+
_this10._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
630
661
|
_this10._showPlaceHolders();
|
|
631
662
|
// Fetch Cards from insights service
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
listBinding
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
_this10.
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
return Promise.resolve(_this10.getPersonalisationProperty(RECOMMENDATION_PATH)).then(function (showRecommendation) {
|
|
655
|
-
function _temp0() {
|
|
656
|
-
_this10._cardsRendered = undefined;
|
|
657
|
-
resolve();
|
|
658
|
-
}
|
|
659
|
-
const _temp9 = function () {
|
|
660
|
-
if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
|
|
661
|
-
return Promise.resolve(_this10._getRecommendationCards()).then(function () {});
|
|
662
|
-
} else {
|
|
663
|
-
const _temp8 = function () {
|
|
664
|
-
if (aCards.length) {
|
|
665
|
-
function _temp7() {
|
|
666
|
-
// from available cards, check for old recommended cards and update it if present,
|
|
667
|
-
// else show available visible cards
|
|
668
|
-
return Promise.resolve(_this10.checkForRecommendedCards(aCards)).then(function () {});
|
|
663
|
+
return Promise.resolve(_this10.getCardHelper()).then(function (cardHelper) {
|
|
664
|
+
const preferedCardIDs = _this10.hasCustomSpace ? PREFERED_CARDS : [];
|
|
665
|
+
return Promise.resolve(cardHelper._getUserVisibleCardModel(preferedCardIDs)).then(function (userVisibleCardModel) {
|
|
666
|
+
const aCards = userVisibleCardModel.getProperty("/cards");
|
|
667
|
+
const listBinding = userVisibleCardModel?.bindList("/cards");
|
|
668
|
+
if (!listBinding.hasListeners("change")) {
|
|
669
|
+
listBinding?.enableExtendedChangeDetection(true, "/cards", {});
|
|
670
|
+
listBinding?.attachChange(function () {
|
|
671
|
+
try {
|
|
672
|
+
return Promise.resolve(_this10._cardsRendered ?? Promise.resolve()).then(function () {
|
|
673
|
+
const visibleCards = userVisibleCardModel.getProperty("/cards");
|
|
674
|
+
if (visibleCards.length !== _this10.aVisibleCardInstances.length && visibleCards.length > 0) {
|
|
675
|
+
// Show cards in UI
|
|
676
|
+
_this10._showCards(visibleCards);
|
|
677
|
+
} else if (!visibleCards.length) {
|
|
678
|
+
//if there are no tiles, hide the panel and show the error panel
|
|
679
|
+
_this10.setProperty("title", `${_this10._i18nBundle?.getText("insightsCards")}`);
|
|
680
|
+
_this10.getMenuItems().forEach(item => {
|
|
681
|
+
_this10._setMenuItemsVisibility(item, false);
|
|
682
|
+
});
|
|
683
|
+
_this10.fireHandleHidePanel();
|
|
684
|
+
_this10._addErrorPanel();
|
|
669
685
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
686
|
+
});
|
|
687
|
+
} catch (e) {
|
|
688
|
+
return Promise.reject(e);
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
_this10._controlModel.setProperty("/userVisibleCards", aCards);
|
|
693
|
+
return Promise.resolve(_this10.getPersonalisationProperty(RECOMMENDATION_PATH)).then(function (showRecommendation) {
|
|
694
|
+
function _temp12() {
|
|
695
|
+
_this10._cardsRendered = undefined;
|
|
696
|
+
resolve();
|
|
681
697
|
}
|
|
682
|
-
|
|
683
|
-
|
|
698
|
+
const _temp11 = function () {
|
|
699
|
+
if (aCards.length === 0 && showRecommendation === undefined && !skipRecommendation) {
|
|
700
|
+
return Promise.resolve(_this10._getRecommendationCards()).then(function () {});
|
|
701
|
+
} else {
|
|
702
|
+
const _temp10 = function () {
|
|
703
|
+
if (aCards.length) {
|
|
704
|
+
function _temp1() {
|
|
705
|
+
// from available cards, check for old recommended cards and update it if present,
|
|
706
|
+
// else show available visible cards
|
|
707
|
+
return Promise.resolve(_this10.checkForRecommendedCards(aCards)).then(function () {});
|
|
708
|
+
}
|
|
709
|
+
_this10._errorPanel?.setVisible(false);
|
|
710
|
+
//Update the panel title with the number of cards
|
|
711
|
+
_this10.setProperty("title", `${_this10._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
|
|
712
|
+
//if the panel has been loaded and has cards, update the visibility of header elements of the panel
|
|
713
|
+
_this10.getMenuItems().forEach(item => {
|
|
714
|
+
_this10._setMenuItemsVisibility(item, true);
|
|
715
|
+
});
|
|
716
|
+
const _temp0 = function () {
|
|
717
|
+
if (showRecommendation === undefined) {
|
|
718
|
+
return Promise.resolve(_this10._updateRecommendationStatus()).then(function () {});
|
|
719
|
+
}
|
|
720
|
+
}();
|
|
721
|
+
return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
|
|
722
|
+
} else {
|
|
723
|
+
_this10.fireHandleHidePanel();
|
|
724
|
+
_this10._addErrorPanel();
|
|
725
|
+
const layout = _this10._getCardsContainer()?._getLayout();
|
|
726
|
+
if (layout.getProperty("expanded")) {
|
|
727
|
+
_this10.cardsContainer.addContent(_this10);
|
|
728
|
+
layout?.toggleFullScreen(_this10);
|
|
729
|
+
//remove the cards panel from the cards container
|
|
730
|
+
_this10.cardsContainer.removeContent(_this10);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}();
|
|
734
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
735
|
+
}
|
|
736
|
+
}();
|
|
737
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
738
|
+
});
|
|
684
739
|
});
|
|
685
740
|
});
|
|
686
741
|
}, function (error) {
|
|
687
742
|
_this10.fireHandleHidePanel();
|
|
743
|
+
_this10._addErrorPanel(false);
|
|
688
744
|
_this10._cardsRendered = undefined;
|
|
689
745
|
if (error instanceof Error) {
|
|
690
746
|
Log.error(error.message);
|
|
691
747
|
reject(error);
|
|
692
748
|
}
|
|
693
749
|
});
|
|
694
|
-
return Promise.resolve(
|
|
750
|
+
return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
|
|
695
751
|
} catch (e) {
|
|
696
752
|
return Promise.reject(e);
|
|
697
753
|
}
|
|
@@ -703,6 +759,48 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
703
759
|
return Promise.reject(e);
|
|
704
760
|
}
|
|
705
761
|
},
|
|
762
|
+
/**
|
|
763
|
+
* Adds an error panel when no cards are available.
|
|
764
|
+
*
|
|
765
|
+
* @private
|
|
766
|
+
*/
|
|
767
|
+
_addErrorPanel: function _addErrorPanel(showActions = true) {
|
|
768
|
+
const parentContainer = this._getCardsContainer();
|
|
769
|
+
//set the visibility of cards panel to false
|
|
770
|
+
this.setVisible(false);
|
|
771
|
+
if (!this._errorPanel) {
|
|
772
|
+
this._errorPanel = new ErrorPanel(`${this.getId()}-errorCardsPanel`, {
|
|
773
|
+
additionalData: [new Button(`${this.getId()}-addInsightsCardsBtn`, {
|
|
774
|
+
text: this._i18nBundle.getText("addInsightsCardBtn"),
|
|
775
|
+
type: "Emphasized",
|
|
776
|
+
press: () => {
|
|
777
|
+
this._getCardsContainer()?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
|
|
778
|
+
}
|
|
779
|
+
})],
|
|
780
|
+
messageTitle: this._i18nBundle.getText("noAppsTitle"),
|
|
781
|
+
messageDescription: this._i18nBundle.getText("noInsightsCardsMsg")
|
|
782
|
+
});
|
|
783
|
+
this._errorPanel.getData();
|
|
784
|
+
//Add the menu items and action buttons to the error panel
|
|
785
|
+
const editCardsMenuItem = this._createEditCardsMenuItem(errorPanelMenuItems.EDIT_CARDS, "manageCards");
|
|
786
|
+
this._errorPanel.addAggregation("menuItems", editCardsMenuItem);
|
|
787
|
+
this._sortMenuItems(sortedMenuItems);
|
|
788
|
+
this._errorPanel.setProperty("enableSettings", true);
|
|
789
|
+
}
|
|
790
|
+
this._errorPanel.getProperty("additionalData").forEach(control => control.setVisible(showActions));
|
|
791
|
+
//Add the title to the error panel
|
|
792
|
+
this._errorPanel.setProperty("title", this._i18nBundle?.getText("insightsCards"));
|
|
793
|
+
this._errorPanel.setVisible(true);
|
|
794
|
+
parentContainer.addAggregation("content", this._errorPanel);
|
|
795
|
+
//set the visibility of header elements of the error panel
|
|
796
|
+
this._errorPanel.getMenuItems().forEach(item => {
|
|
797
|
+
if (item.getId().includes(errorPanelMenuItems.EDIT_CARDS) && showActions || item.getId().includes("settings")) {
|
|
798
|
+
item.setVisible(true);
|
|
799
|
+
} else {
|
|
800
|
+
item.setVisible(false);
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
},
|
|
706
804
|
/**
|
|
707
805
|
* Sets the new visible cards in the model and updates the UI.
|
|
708
806
|
* @private
|
|
@@ -710,11 +808,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
710
808
|
setNewVisibleCards: function _setNewVisibleCards() {
|
|
711
809
|
try {
|
|
712
810
|
const _this11 = this;
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
811
|
+
return Promise.resolve(_this11.getCardHelper()).then(function (cardHelper) {
|
|
812
|
+
const preferedCardIDs = _this11.hasCustomSpace ? PREFERED_CARDS : [];
|
|
813
|
+
return Promise.resolve(cardHelper?._getUserVisibleCardModel(preferedCardIDs)).then(function (visibleCardModel) {
|
|
814
|
+
const aNewCards = visibleCardModel.getProperty("/cards");
|
|
815
|
+
_this11._controlModel.setProperty("/userVisibleCards", aNewCards);
|
|
816
|
+
_this11._showCards(aNewCards);
|
|
817
|
+
});
|
|
718
818
|
});
|
|
719
819
|
} catch (e) {
|
|
720
820
|
return Promise.reject(e);
|
|
@@ -753,18 +853,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
753
853
|
const uniqueManifestDetails = _this12.getUniqueManifestDetails(manifestIds);
|
|
754
854
|
return Promise.resolve(_this12.regenerateCards(uniqueManifestDetails, manifestIds)).then(function (aUpdatedCards) {
|
|
755
855
|
let _exit2 = false;
|
|
756
|
-
function
|
|
856
|
+
function _temp15(_result2) {
|
|
757
857
|
return _exit2 ? _result2 : Promise.resolve(_this12.setNewVisibleCards()).then(function () {});
|
|
758
858
|
}
|
|
759
|
-
const
|
|
859
|
+
const _temp14 = function () {
|
|
760
860
|
if (aUpdatedCards?.length) {
|
|
761
861
|
// Update the model with updated cards
|
|
762
|
-
return Promise.resolve(_this12.
|
|
862
|
+
return Promise.resolve(_this12.getCardHelper()).then(function (cardHelper) {
|
|
863
|
+
return Promise.resolve(cardHelper?._updateCards(aUpdatedCards.map(oCard => oCard?.newManifest?.descriptorContent))).then(function () {});
|
|
864
|
+
});
|
|
763
865
|
} else {
|
|
764
866
|
_exit2 = true;
|
|
765
867
|
}
|
|
766
868
|
}();
|
|
767
|
-
return
|
|
869
|
+
return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
|
|
768
870
|
});
|
|
769
871
|
} else {
|
|
770
872
|
_this12._showCards(aCards);
|
|
@@ -959,19 +1061,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
959
1061
|
_getPersonalizationData: function _getPersonalizationData() {
|
|
960
1062
|
try {
|
|
961
1063
|
const _this15 = this;
|
|
962
|
-
function
|
|
1064
|
+
function _temp17() {
|
|
963
1065
|
return Promise.resolve(_this15.oPersonalizer.read()).then(function (oPersData) {
|
|
964
1066
|
return oPersData || {};
|
|
965
1067
|
});
|
|
966
1068
|
}
|
|
967
|
-
const
|
|
1069
|
+
const _temp16 = function () {
|
|
968
1070
|
if (!_this15.oPersonalizer) {
|
|
969
1071
|
return Promise.resolve(_this15._getPersonalization()).then(function (_this15$_getPersonali) {
|
|
970
1072
|
_this15.oPersonalizer = _this15$_getPersonali;
|
|
971
1073
|
});
|
|
972
1074
|
}
|
|
973
1075
|
}();
|
|
974
|
-
return Promise.resolve(
|
|
1076
|
+
return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16));
|
|
975
1077
|
} catch (e) {
|
|
976
1078
|
return Promise.reject(e);
|
|
977
1079
|
}
|
|
@@ -1015,9 +1117,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1015
1117
|
try {
|
|
1016
1118
|
const _this18 = this;
|
|
1017
1119
|
const cardManifests = aRecommendedCards.map(oCard => oCard.descriptorContent);
|
|
1018
|
-
return Promise.resolve(_this18.
|
|
1019
|
-
return Promise.resolve(
|
|
1020
|
-
return _this18.
|
|
1120
|
+
return Promise.resolve(_this18.getCardHelper()).then(function (cardHelper) {
|
|
1121
|
+
return Promise.resolve(cardHelper?._createCards(cardManifests)).then(function () {
|
|
1122
|
+
return Promise.resolve(_this18._updateRecommendationStatus()).then(function () {
|
|
1123
|
+
return _this18.setNewVisibleCards();
|
|
1124
|
+
});
|
|
1021
1125
|
});
|
|
1022
1126
|
});
|
|
1023
1127
|
} catch (e) {
|
|
@@ -1052,12 +1156,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1052
1156
|
rowSize: this.cardHeight,
|
|
1053
1157
|
gap: "1rem"
|
|
1054
1158
|
});
|
|
1055
|
-
this.
|
|
1159
|
+
this.cardsWrapperContainer = new GridContainer(`${this.getId()}-insightsCardsFlexBox`, {
|
|
1056
1160
|
visible: "{= !${/isPhone}}"
|
|
1057
1161
|
}).addStyleClass("sapUiSmallMarginTop").setLayout(this.cardsContainerSettings);
|
|
1058
|
-
this.
|
|
1059
|
-
this.addDragDropConfigTo(this.
|
|
1060
|
-
return this.
|
|
1162
|
+
this.cardsWrapperContainer.setModel(this._controlModel);
|
|
1163
|
+
this.addDragDropConfigTo(this.cardsWrapperContainer, oEvent => this._handleCardsDnd(oEvent));
|
|
1164
|
+
return this.cardsWrapperContainer;
|
|
1061
1165
|
},
|
|
1062
1166
|
/**
|
|
1063
1167
|
* Creates the mobile card container.
|
|
@@ -1104,9 +1208,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1104
1208
|
});
|
|
1105
1209
|
|
|
1106
1210
|
// add HBox as item to GridList
|
|
1107
|
-
const sDefaultAggreName = this.
|
|
1211
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1108
1212
|
if (sDefaultAggreName) {
|
|
1109
|
-
this.
|
|
1213
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewHBox);
|
|
1110
1214
|
}
|
|
1111
1215
|
},
|
|
1112
1216
|
/**
|
|
@@ -1116,7 +1220,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1116
1220
|
* @returns {number} The number of placeholder cards that should be displayed. Defaults to 1 if no valid count is determined.
|
|
1117
1221
|
*/
|
|
1118
1222
|
_calculatePlaceholderCardCount: function _calculatePlaceholderCardCount() {
|
|
1119
|
-
const layoutDomRef = this.
|
|
1223
|
+
const layoutDomRef = this._getCardsContainer()?._getLayout()?.getDomRef();
|
|
1120
1224
|
let count = 0;
|
|
1121
1225
|
if (layoutDomRef) {
|
|
1122
1226
|
const sectionDomRef = layoutDomRef.childNodes[0];
|
|
@@ -1144,14 +1248,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1144
1248
|
* @param {ICard[]} aCards - The cards to display.
|
|
1145
1249
|
*/
|
|
1146
1250
|
_showCards: function _showCards(aCards) {
|
|
1147
|
-
const
|
|
1251
|
+
const parentContainer = this._getCardsContainer();
|
|
1252
|
+
parentContainer.removeContent(this._errorPanel);
|
|
1148
1253
|
this.fireHandleUnhidePanel();
|
|
1149
|
-
this.
|
|
1150
|
-
|
|
1151
|
-
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${aCards.length})`);
|
|
1152
|
-
}
|
|
1153
|
-
const sDefaultAggreName = this._getCardContainer().getMetadata().getDefaultAggregationName();
|
|
1154
|
-
this._getCardContainer().removeAllAggregation(sDefaultAggreName);
|
|
1254
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1255
|
+
this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
1155
1256
|
this.aVisibleCardInstances = [];
|
|
1156
1257
|
this.cardsInViewport = [];
|
|
1157
1258
|
|
|
@@ -1195,8 +1296,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1195
1296
|
});
|
|
1196
1297
|
|
|
1197
1298
|
// add VBox as item to GridList
|
|
1198
|
-
const sDefaultAggreName = this.
|
|
1199
|
-
this.
|
|
1299
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1300
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, oPreviewVBox);
|
|
1200
1301
|
});
|
|
1201
1302
|
},
|
|
1202
1303
|
/**
|
|
@@ -1206,34 +1307,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1206
1307
|
* @param {Event} event - The event object.
|
|
1207
1308
|
*/
|
|
1208
1309
|
_handleEditCards: function _handleEditCards(event) {
|
|
1209
|
-
/* If called from Panel Header event.source() will return TilesPanel, if called from
|
|
1310
|
+
/* If called from Panel Header event.source() will return TilesPanel, if called from cards Container event.source() will return cardsContainer.
|
|
1210
1311
|
_getLayout is available at Container Level*/
|
|
1211
1312
|
let parent = event.getSource().getParent() || this;
|
|
1212
|
-
if (parent instanceof CardsPanel) {
|
|
1313
|
+
if (parent instanceof CardsPanel || parent instanceof ErrorPanel) {
|
|
1213
1314
|
parent = parent.getParent();
|
|
1214
1315
|
}
|
|
1215
1316
|
parent?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.INSIGHTS_CARDS);
|
|
1216
1317
|
},
|
|
1217
|
-
/**
|
|
1218
|
-
* Hides the header of the cards panel.
|
|
1219
|
-
*
|
|
1220
|
-
* @private
|
|
1221
|
-
*/
|
|
1222
|
-
handleHideHeader: function _handleHideHeader() {
|
|
1223
|
-
this._headerVisible = false;
|
|
1224
|
-
this.setProperty("title", "");
|
|
1225
|
-
this._toggleHeaderActions(false);
|
|
1226
|
-
},
|
|
1227
|
-
/**
|
|
1228
|
-
* Adds the header to the cards panel.
|
|
1229
|
-
*
|
|
1230
|
-
* @private
|
|
1231
|
-
*/
|
|
1232
|
-
handleAddHeader: function _handleAddHeader() {
|
|
1233
|
-
this._headerVisible = true;
|
|
1234
|
-
this.setProperty("title", `${this._i18nBundle?.getText("insightsCards")} (${this._controlModel.getProperty("/userVisibleCards")?.length})`);
|
|
1235
|
-
this._toggleHeaderActions(true);
|
|
1236
|
-
},
|
|
1237
1318
|
/**
|
|
1238
1319
|
* Refreshes the cards.
|
|
1239
1320
|
*
|
|
@@ -1259,24 +1340,26 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1259
1340
|
iDropItemIndex = oDragItem.getParent().indexOfItem(oDropItem);
|
|
1260
1341
|
_this19._cardsFlexWrapper?.setBusy(true);
|
|
1261
1342
|
// take the moved item from dragIndex and add to dropindex
|
|
1262
|
-
const
|
|
1343
|
+
const _temp20 = _finallyRethrows(function () {
|
|
1263
1344
|
return _catch(function () {
|
|
1264
|
-
function
|
|
1345
|
+
function _temp19() {
|
|
1265
1346
|
setTimeout(() => {
|
|
1266
|
-
focusDraggedItem(_this19.
|
|
1347
|
+
focusDraggedItem(_this19._getCardWrapperContainer(), iDropItemIndex);
|
|
1267
1348
|
}, 0);
|
|
1268
1349
|
}
|
|
1269
|
-
const
|
|
1350
|
+
const _temp18 = function () {
|
|
1270
1351
|
if (!_this19._controlModel.getProperty("/userAllCards").length) {
|
|
1271
|
-
return Promise.resolve(_this19.
|
|
1272
|
-
|
|
1273
|
-
|
|
1352
|
+
return Promise.resolve(_this19.getCardHelper()).then(function (cardHelper) {
|
|
1353
|
+
return Promise.resolve(cardHelper?._getUserAllCardModel()).then(function (userAllCardsModel) {
|
|
1354
|
+
_this19._controlModel.setProperty("/userAllCards", userAllCardsModel.getProperty("/cards"));
|
|
1355
|
+
return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
|
|
1356
|
+
});
|
|
1274
1357
|
});
|
|
1275
1358
|
} else {
|
|
1276
1359
|
return Promise.resolve(_this19.updateCardList(sInsertPosition, iDropItemIndex, iDragItemIndex)).then(function () {});
|
|
1277
1360
|
}
|
|
1278
1361
|
}();
|
|
1279
|
-
return
|
|
1362
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
|
1280
1363
|
}, function (error) {
|
|
1281
1364
|
if (error instanceof Error) {
|
|
1282
1365
|
Log.error(error.message);
|
|
@@ -1287,7 +1370,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1287
1370
|
if (_wasThrown) throw _result3;
|
|
1288
1371
|
return _result3;
|
|
1289
1372
|
});
|
|
1290
|
-
return Promise.resolve(
|
|
1373
|
+
return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(function () {}) : void 0);
|
|
1291
1374
|
} catch (e) {
|
|
1292
1375
|
return Promise.reject(e);
|
|
1293
1376
|
}
|
|
@@ -1318,18 +1401,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1318
1401
|
} else if (sInsertPosition === "After" && iUpdatedDragItemIndex > iUpdatedDropItemIndex) {
|
|
1319
1402
|
iUpdatedDropItemIndex++;
|
|
1320
1403
|
}
|
|
1321
|
-
const
|
|
1404
|
+
const _temp21 = function () {
|
|
1322
1405
|
if (iUpdatedDragItemIndex !== iUpdatedDropItemIndex) {
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1406
|
+
return Promise.resolve(_this20.getCardHelper()).then(function (cardHelper) {
|
|
1407
|
+
const aUpdatedCards = cardHelper?.handleDndCardsRanking(iUpdatedDragItemIndex, iUpdatedDropItemIndex, aUserAllCards);
|
|
1408
|
+
return Promise.resolve(cardHelper?._updateMultipleCards(aUpdatedCards, "PUT")).then(function () {
|
|
1409
|
+
_this20._sortCardsOnRank(aUserAllCards);
|
|
1410
|
+
_this20._controlModel.setProperty("/userAllCards", aUserAllCards);
|
|
1411
|
+
_this20._controlModel.setProperty("/userVisibleCards", aUserAllCards.filter(oCard => oCard.visibility));
|
|
1412
|
+
return Promise.resolve(_this20.rerenderCards()).then(function () {});
|
|
1413
|
+
});
|
|
1329
1414
|
});
|
|
1330
1415
|
}
|
|
1331
1416
|
}();
|
|
1332
|
-
return Promise.resolve(
|
|
1417
|
+
return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
|
|
1333
1418
|
} catch (e) {
|
|
1334
1419
|
return Promise.reject(e);
|
|
1335
1420
|
}
|
|
@@ -1386,7 +1471,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1386
1471
|
* @returns {number} - The number of visible cards.
|
|
1387
1472
|
*/
|
|
1388
1473
|
_calculateVisibleCardCount: function _calculateVisibleCardCount() {
|
|
1389
|
-
const layout = this.
|
|
1474
|
+
const layout = this._getCardsContainer()._getLayout();
|
|
1390
1475
|
const pageDomRef = layout.getDomRef();
|
|
1391
1476
|
const deviceType = this.getDeviceType();
|
|
1392
1477
|
let count = 1;
|
|
@@ -1422,7 +1507,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1422
1507
|
* @override
|
|
1423
1508
|
*/
|
|
1424
1509
|
_adjustLayout: function _adjustLayout() {
|
|
1425
|
-
const layout = this.
|
|
1510
|
+
const layout = this._getCardsContainer()?._getLayout();
|
|
1426
1511
|
let cardWidth = this.cardWidth;
|
|
1427
1512
|
const isMobileDevice = this.getDeviceType() === DeviceType.Mobile;
|
|
1428
1513
|
if (layout && this.aVisibleCardInstances?.length > 0) {
|
|
@@ -1439,8 +1524,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1439
1524
|
// update cards in viewport
|
|
1440
1525
|
if (cardCount !== this.cardsInViewport.length) {
|
|
1441
1526
|
this.cardsInViewport = this.aVisibleCardInstances.slice(0, cardCount);
|
|
1442
|
-
const sDefaultAggreName = this.
|
|
1443
|
-
this.
|
|
1527
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1528
|
+
this._getCardWrapperContainer().removeAllAggregation(sDefaultAggreName);
|
|
1444
1529
|
this.cardsInViewport.forEach(card => {
|
|
1445
1530
|
const manifest = card.getManifest();
|
|
1446
1531
|
const sType = manifest["sap.card"]?.type;
|
|
@@ -1463,22 +1548,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1463
1548
|
if (overlayHBoxWrapper) {
|
|
1464
1549
|
cardWrapper.addItem(overlayHBoxWrapper);
|
|
1465
1550
|
}
|
|
1466
|
-
const sDefaultAggreName = this.
|
|
1467
|
-
this.
|
|
1551
|
+
const sDefaultAggreName = this._getCardWrapperContainer().getMetadata().getDefaultAggregationName();
|
|
1552
|
+
this._getCardWrapperContainer().addAggregation(sDefaultAggreName, cardWrapper);
|
|
1468
1553
|
});
|
|
1469
1554
|
this.shareCardsInViewport();
|
|
1470
1555
|
}
|
|
1471
|
-
|
|
1472
|
-
// show/hide Full Screen Button if available
|
|
1556
|
+
// show/hide full screen button
|
|
1473
1557
|
const showFullScreenButton = isElementExpanded || this.aVisibleCardInstances.length > cardCount;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1558
|
+
const fullScreenButton = getAssociatedFullScreenMenuItem(this);
|
|
1559
|
+
const fullScreenText = fullScreenButton.getTitle();
|
|
1560
|
+
//update the panel menu-item show more button and show more action button in panel header
|
|
1561
|
+
fullScreenButton?.setVisible(showFullScreenButton);
|
|
1562
|
+
fullScreenButton?.setTitle(fullScreenText);
|
|
1563
|
+
const fullScreenActionButton = getAssociatedFullScreenButton(this);
|
|
1564
|
+
fullScreenActionButton?.setVisible(showFullScreenButton);
|
|
1565
|
+
fullScreenActionButton?.setText(fullScreenText);
|
|
1482
1566
|
} else {
|
|
1483
1567
|
this.cardWidth = this.getDeviceType() === DeviceType.Mobile ? "19rem" : "22rem";
|
|
1484
1568
|
}
|
|
@@ -1489,50 +1573,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1489
1573
|
this.cardsContainerSettings?.setColumnSize(this.cardWidth);
|
|
1490
1574
|
}
|
|
1491
1575
|
},
|
|
1492
|
-
/**
|
|
1493
|
-
* Retrieves the menu items for the container.
|
|
1494
|
-
*
|
|
1495
|
-
* @private
|
|
1496
|
-
* @returns {MenuItem[]} An array of MenuItem instances.
|
|
1497
|
-
*/
|
|
1498
|
-
getContainerMenuItems: function _getContainerMenuItems() {
|
|
1499
|
-
if (!this._containerMenuItems) {
|
|
1500
|
-
const containerRefreshMenuItem = this._createRefreshMenuItem(cardsContainerMenuItems.REFRESH, "containerCardsRefresh");
|
|
1501
|
-
const containerEditCardsMenuItem = this._createEditCardsMenuItem(cardsContainerMenuItems.EDIT_CARDS, "containerManageCards");
|
|
1502
|
-
const containerShowMoreMenuItem = createShowMoreMenuItem(this, cardsContainerMenuItems.SHOW_MORE, "containerCardsShowMore");
|
|
1503
|
-
this._controlMap.set(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`, containerShowMoreMenuItem);
|
|
1504
|
-
this._containerMenuItems = [containerRefreshMenuItem, containerEditCardsMenuItem, containerShowMoreMenuItem];
|
|
1505
|
-
}
|
|
1506
|
-
return this._containerMenuItems;
|
|
1507
|
-
},
|
|
1508
|
-
/**
|
|
1509
|
-
* Retrieves the action buttons for the container.
|
|
1510
|
-
*
|
|
1511
|
-
* @private
|
|
1512
|
-
* @returns {Button[]} An array of Button instances.
|
|
1513
|
-
*/
|
|
1514
|
-
getContainerActionButtons: function _getContainerActionButtons() {
|
|
1515
|
-
if (!this._containerActionButtons) {
|
|
1516
|
-
this._containerActionButtons = [];
|
|
1517
|
-
const actionButton = createShowMoreActionButton(this, cardsContainerActionButtons.SHOW_MORE, "containerCardsShowMore");
|
|
1518
|
-
if (actionButton) {
|
|
1519
|
-
this._controlMap.set(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`, actionButton);
|
|
1520
|
-
this._containerActionButtons.push(actionButton);
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
return this._containerActionButtons;
|
|
1524
|
-
},
|
|
1525
1576
|
/**
|
|
1526
1577
|
* Retrieves the insights container.
|
|
1527
1578
|
*
|
|
1528
1579
|
* @private
|
|
1529
|
-
* @returns {
|
|
1580
|
+
* @returns {CardsContainer} - The cards container.
|
|
1530
1581
|
*/
|
|
1531
|
-
|
|
1532
|
-
if (!this.
|
|
1533
|
-
this.
|
|
1582
|
+
_getCardsContainer: function _getCardsContainer() {
|
|
1583
|
+
if (!this.cardsContainer) {
|
|
1584
|
+
this.cardsContainer = this.getParent();
|
|
1534
1585
|
}
|
|
1535
|
-
return this.
|
|
1586
|
+
return this.cardsContainer;
|
|
1536
1587
|
},
|
|
1537
1588
|
/**
|
|
1538
1589
|
* Creates the refresh menu item.
|
|
@@ -1576,18 +1627,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1576
1627
|
}
|
|
1577
1628
|
return menuItem;
|
|
1578
1629
|
},
|
|
1579
|
-
/**
|
|
1580
|
-
* Toggles the visibility of the header actions.
|
|
1581
|
-
*
|
|
1582
|
-
* @param {boolean} bShow - Whether to show or hide the header actions.
|
|
1583
|
-
* @private
|
|
1584
|
-
*/
|
|
1585
|
-
_toggleHeaderActions: function _toggleHeaderActions(bShow) {
|
|
1586
|
-
this.getAggregation("menuItems")?.forEach(menuItem => {
|
|
1587
|
-
this._getInsightsContainer()?.toggleMenuListItem(menuItem, bShow);
|
|
1588
|
-
});
|
|
1589
|
-
this.getAggregation("actionButtons")?.forEach(actionButton => this._getInsightsContainer()?.toggleActionButton(actionButton, bShow));
|
|
1590
|
-
},
|
|
1591
1630
|
/**
|
|
1592
1631
|
* Retrieves the card container based on the device type.
|
|
1593
1632
|
*
|
|
@@ -1595,23 +1634,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1595
1634
|
* @returns {GridContainer | HeaderContainer} - The card container.
|
|
1596
1635
|
*
|
|
1597
1636
|
*/
|
|
1598
|
-
|
|
1637
|
+
_getCardWrapperContainer: function _getCardWrapperContainer() {
|
|
1599
1638
|
if (this.getDeviceType() === DeviceType.Mobile) {
|
|
1600
1639
|
return this.cardsMobileContainer;
|
|
1601
1640
|
}
|
|
1602
|
-
return this.
|
|
1603
|
-
},
|
|
1604
|
-
/**
|
|
1605
|
-
* Sorts the menu items based on the provided order.
|
|
1606
|
-
*
|
|
1607
|
-
* @private
|
|
1608
|
-
* @param {string[]} menuItems - The order of the menu items.
|
|
1609
|
-
*/
|
|
1610
|
-
_sortMenuItems: function _sortMenuItems(menuItems) {
|
|
1611
|
-
const panelMenuItems = this.getAggregation("menuItems");
|
|
1612
|
-
let sortedMenuItems = sortMenuItems(menuItems, panelMenuItems);
|
|
1613
|
-
this.removeAllAggregation("menuItems");
|
|
1614
|
-
sortedMenuItems?.forEach(menuItem => this.addAggregation("menuItems", menuItem));
|
|
1641
|
+
return this.cardsWrapperContainer;
|
|
1615
1642
|
},
|
|
1616
1643
|
/**
|
|
1617
1644
|
* Shares the cards that are currently in the viewport by firing the "visibleCardsUpdated" event.
|
|
@@ -1637,11 +1664,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1637
1664
|
exit: function _exit() {
|
|
1638
1665
|
runtimeHostCreated = false;
|
|
1639
1666
|
this.getAggregation("host")?.destroy();
|
|
1667
|
+
},
|
|
1668
|
+
/**
|
|
1669
|
+
* Initializes the CardHelper service promise.
|
|
1670
|
+
*
|
|
1671
|
+
* @private
|
|
1672
|
+
* @returns {Promise<ICardHelperInstance>} - card helper service.
|
|
1673
|
+
*/
|
|
1674
|
+
getCardHelperService: function _getCardHelperService() {
|
|
1675
|
+
if (this.cardHelper === null) {
|
|
1676
|
+
this.cardHelper = CardHelper.getServiceAsync();
|
|
1677
|
+
}
|
|
1678
|
+
return this.cardHelper;
|
|
1679
|
+
},
|
|
1680
|
+
/**
|
|
1681
|
+
* Checks if insights service is enabled.
|
|
1682
|
+
*
|
|
1683
|
+
* @private
|
|
1684
|
+
* @returns {Promise<boolean>} - true if insights service is enabled else false.
|
|
1685
|
+
*/
|
|
1686
|
+
isInsightsEnabled: function _isInsightsEnabled() {
|
|
1687
|
+
try {
|
|
1688
|
+
const _this22 = this;
|
|
1689
|
+
return Promise.resolve(_catch(function () {
|
|
1690
|
+
return Promise.resolve(_this22.getCardHelperService()).then(function (_this22$getCardHelper) {
|
|
1691
|
+
return _this22$getCardHelper !== null;
|
|
1692
|
+
});
|
|
1693
|
+
}, function (error) {
|
|
1694
|
+
Log.error(error instanceof Error ? error.message : String(error));
|
|
1695
|
+
return false;
|
|
1696
|
+
}));
|
|
1697
|
+
} catch (e) {
|
|
1698
|
+
return Promise.reject(e);
|
|
1699
|
+
}
|
|
1640
1700
|
}
|
|
1641
1701
|
});
|
|
1642
1702
|
CardsPanel.cardsMenuItems = cardsMenuItems;
|
|
1643
|
-
CardsPanel.
|
|
1644
|
-
CardsPanel.
|
|
1703
|
+
CardsPanel.cardsActionButtons = cardsActionButtons;
|
|
1704
|
+
CardsPanel.errorPanelMenuItems = errorPanelMenuItems;
|
|
1645
1705
|
return CardsPanel;
|
|
1646
1706
|
});
|
|
1647
1707
|
//# sourceMappingURL=CardsPanel.js.map
|