@sapui5/sap.cux.home 1.142.0 → 1.143.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/.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/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +3 -0
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +3 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +74 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +344 -146
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +367 -149
- package/src/sap/cux/home/AppsContainer.js +2 -1
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +2 -2
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +9 -1
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +6 -2
- 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/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +3 -2
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +2 -1
- 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 +25 -59
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +157 -155
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +152 -175
- 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 +18 -14
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +4 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +10 -9
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +9 -8
- 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 +3 -3
- 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 +288 -58
- 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 +45 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +55 -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 +380 -64
- 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.js +2 -2
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +3 -3
- package/src/sap/cux/home/NewsSettingsPanel.js +3 -3
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +4 -4
- 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/SettingsDialog.d.ts +7 -0
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +18 -10
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +20 -13
- 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 +14 -12
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +17 -15
- 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.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +30 -58
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +29 -28
- 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 +33 -13
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_da.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_de.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_el.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_en.properties +9 -5
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +14 -6
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +14 -6
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_es.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_et.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_id.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_it.properties +10 -6
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_no.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_th.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +8 -4
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +8 -4
- package/src/sap/cux/home/interface/AppsInterface.d.ts +1 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +1 -0
- 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/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +2 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +2 -2
- 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 +155 -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
|
@@ -9,19 +9,25 @@ import Button from "sap/m/Button";
|
|
|
9
9
|
import CustomListItem from "sap/m/CustomListItem";
|
|
10
10
|
import ExpandableText from "sap/m/ExpandableText";
|
|
11
11
|
import FlexBox from "sap/m/FlexBox";
|
|
12
|
+
import FlexItemData from "sap/m/FlexItemData";
|
|
12
13
|
import GenericTile, { GenericTile$PressEvent } from "sap/m/GenericTile";
|
|
13
14
|
import HBox from "sap/m/HBox";
|
|
15
|
+
import IllustratedMessage from "sap/m/IllustratedMessage";
|
|
14
16
|
import Label from "sap/m/Label";
|
|
15
|
-
import { ButtonType, URLHelper } from "sap/m/library";
|
|
17
|
+
import { ButtonType, FlexAlignItems, FlexDirection, FlexJustifyContent, FlexRendertype, URLHelper } from "sap/m/library";
|
|
16
18
|
import List from "sap/m/List";
|
|
17
19
|
import { ListBase$SelectionChangeEvent } from "sap/m/ListBase";
|
|
18
20
|
import MessageToast from "sap/m/MessageToast";
|
|
19
|
-
import
|
|
21
|
+
import ObjectStatus from "sap/m/ObjectStatus";
|
|
22
|
+
import SegmentedButton from "sap/m/SegmentedButton";
|
|
23
|
+
import SegmentedButtonItem from "sap/m/SegmentedButtonItem";
|
|
24
|
+
import Switch, { Switch$ChangeEvent } from "sap/m/Switch";
|
|
20
25
|
import TextArea, { TextArea$LiveChangeEvent } from "sap/m/TextArea";
|
|
26
|
+
import Title from "sap/m/Title";
|
|
21
27
|
import VBox from "sap/m/VBox";
|
|
22
28
|
import Control from "sap/ui/core/Control";
|
|
23
29
|
import Fragment from "sap/ui/core/Fragment";
|
|
24
|
-
import { ValueState } from "sap/ui/core/library";
|
|
30
|
+
import { TitleLevel, ValueState } from "sap/ui/core/library";
|
|
25
31
|
import ChangeReason from "sap/ui/model/ChangeReason";
|
|
26
32
|
import Context from "sap/ui/model/Context";
|
|
27
33
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
@@ -36,9 +42,10 @@ import BaseLayout from "./BaseLayout";
|
|
|
36
42
|
import BaseSettingsPanel from "./BaseSettingsPanel";
|
|
37
43
|
import ContentAdditionDialog from "./ContentAdditionDialog";
|
|
38
44
|
import FavAppPanel from "./FavAppPanel";
|
|
39
|
-
import InsightsContainer from "./InsightsContainer";
|
|
40
45
|
import { ICustomVisualization, ICustomVizInstance, IVisualization } from "./interface/AppsInterface";
|
|
41
|
-
import
|
|
46
|
+
import TilesContainer from "./TilesContainer";
|
|
47
|
+
import { DisplayFormat } from "./TilesPanel";
|
|
48
|
+
import AppManager, { _isSmartBusinessTile } from "./utils/AppManager";
|
|
42
49
|
import {
|
|
43
50
|
AI_APP_FINDER_API,
|
|
44
51
|
AI_APP_FINDER_BASE_URL,
|
|
@@ -46,6 +53,7 @@ import {
|
|
|
46
53
|
DEFAULT_APP_ICON,
|
|
47
54
|
FEATURE_TOGGLES,
|
|
48
55
|
FESR_IDS,
|
|
56
|
+
MYHOME_PAGE_ID,
|
|
49
57
|
MYINSIGHT_SECTION_ID
|
|
50
58
|
} from "./utils/Constants";
|
|
51
59
|
import { recycleId } from "./utils/DataFormatUtils";
|
|
@@ -56,7 +64,8 @@ import { triggerPXIntegration } from "./utils/PXFeedback";
|
|
|
56
64
|
const Constants = {
|
|
57
65
|
DeprecatedInfoText: "deprecated",
|
|
58
66
|
MinQueryLength: 2,
|
|
59
|
-
|
|
67
|
+
MaxQueryLength: 2000,
|
|
68
|
+
MaxDescriptionLength: 300
|
|
60
69
|
};
|
|
61
70
|
|
|
62
71
|
enum SearchStatus {
|
|
@@ -71,7 +80,8 @@ enum ErrorType {
|
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
enum TileType {
|
|
74
|
-
Static = "STATIC"
|
|
83
|
+
Static = "STATIC",
|
|
84
|
+
Dynamic = "DYNAMIC"
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
interface RawAppData {
|
|
@@ -83,16 +93,17 @@ interface RawAppData {
|
|
|
83
93
|
iconUrl: string;
|
|
84
94
|
configuration: string;
|
|
85
95
|
}
|
|
86
|
-
interface SuggestedApp {
|
|
96
|
+
export interface SuggestedApp {
|
|
87
97
|
icon: string;
|
|
88
98
|
title: string;
|
|
89
99
|
chipID: string;
|
|
90
|
-
status: string[];
|
|
91
100
|
subTitle: string;
|
|
92
101
|
description: string;
|
|
93
102
|
isStaticApp: boolean;
|
|
94
|
-
|
|
103
|
+
addedToApps?: boolean;
|
|
104
|
+
addedToInsights?: boolean;
|
|
95
105
|
vizData?: IVisualization;
|
|
106
|
+
isDeprecated?: boolean;
|
|
96
107
|
}
|
|
97
108
|
|
|
98
109
|
interface QueryResponse {
|
|
@@ -203,7 +214,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
203
214
|
|
|
204
215
|
//load ui fragment
|
|
205
216
|
const panelContent = (await Fragment.load({
|
|
206
|
-
id: `${this.getId()}-content
|
|
217
|
+
id: recycleId(`${this.getId()}-content`),
|
|
207
218
|
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
208
219
|
controller: this
|
|
209
220
|
})) as Control;
|
|
@@ -252,14 +263,13 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
252
263
|
path: "/suggestedApps",
|
|
253
264
|
factory: this._generateListItem.bind(this),
|
|
254
265
|
sorter: new Sorter({
|
|
255
|
-
path: "
|
|
256
|
-
comparator: (firstApp:
|
|
257
|
-
const getPriority = (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const hasAlreadyAdded = statusArray.includes(this._i18nBundle.getText("alreadyAddedApp") as string);
|
|
261
|
-
const hasDeprecated = statusArray.includes(this._i18nBundle.getText("deprecatedApp") as string);
|
|
266
|
+
path: "",
|
|
267
|
+
comparator: (firstApp: SuggestedApp, secondApp: SuggestedApp) => {
|
|
268
|
+
const getPriority = (app: SuggestedApp) => {
|
|
269
|
+
const hasAlreadyAdded = app.isStaticApp ? app.addedToApps : app.addedToInsights;
|
|
270
|
+
const hasDeprecated = app.isDeprecated;
|
|
262
271
|
|
|
272
|
+
if (!hasAlreadyAdded && !hasDeprecated) return 0; // Neither status - highest priority
|
|
263
273
|
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
264
274
|
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
265
275
|
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
@@ -296,25 +306,31 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
296
306
|
* @returns {CustomListItem} The generated list item control.
|
|
297
307
|
*/
|
|
298
308
|
private _generateListItem(id: string, context: Context): CustomListItem {
|
|
299
|
-
const isStaticApp = context.getProperty("isStaticApp") as boolean;
|
|
300
309
|
const langTag = Localization.getLanguageTag();
|
|
301
310
|
const currentLanguage = langTag.language.toLowerCase();
|
|
302
311
|
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
303
312
|
const listItem = new CustomListItem(id, {
|
|
304
|
-
|
|
313
|
+
//when toggled b/w app and tile view, the selection should update according to whether the app is already added to selected section
|
|
314
|
+
selected: {
|
|
315
|
+
path: "selectedView",
|
|
316
|
+
formatter: () => {
|
|
317
|
+
const isAppAlreadyAdded = this.isAppAlreadyAdded(context);
|
|
318
|
+
//bind associated checkbox to disable it when the app is already added
|
|
319
|
+
listItem.getMultiSelectControl(true).setEnabled(!isAppAlreadyAdded);
|
|
320
|
+
// if app is already added or if user has selected the app, mark it as selected
|
|
321
|
+
return isAppAlreadyAdded || this.userSelectedApps.has(listItem);
|
|
322
|
+
}
|
|
323
|
+
},
|
|
305
324
|
content: [
|
|
306
325
|
new FlexBox(recycleId(`${id}-result-container`), {
|
|
307
|
-
renderType:
|
|
308
|
-
direction:
|
|
309
|
-
|
|
310
|
-
items: [this.
|
|
326
|
+
renderType: FlexRendertype.Bare,
|
|
327
|
+
direction: FlexDirection.Row,
|
|
328
|
+
gap: "1rem",
|
|
329
|
+
items: [this._getAppDetailsContainer(id, context, isEnglishLanguage), this._getAppPreviewContainer(id, context)]
|
|
311
330
|
}).addStyleClass("sapUiSmallMargin")
|
|
312
331
|
]
|
|
313
332
|
});
|
|
314
333
|
|
|
315
|
-
//bind associated checkbox to disable it when the app is already added to home page
|
|
316
|
-
listItem.getMultiSelectControl(true).setEnabled(!context.getProperty("addedToHomePage"));
|
|
317
|
-
|
|
318
334
|
return listItem;
|
|
319
335
|
}
|
|
320
336
|
|
|
@@ -328,37 +344,69 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
328
344
|
*/
|
|
329
345
|
private _getAppPreviewContainer(id: string, context: Context): HBox {
|
|
330
346
|
const container = new HBox(recycleId(`${id}-suggestedAppContainer`), {
|
|
331
|
-
renderType:
|
|
347
|
+
renderType: FlexRendertype.Bare,
|
|
348
|
+
width: "19rem",
|
|
349
|
+
layoutData: new FlexItemData({
|
|
350
|
+
growFactor: 0,
|
|
351
|
+
shrinkFactor: 0,
|
|
352
|
+
alignSelf: FlexAlignItems.Center
|
|
353
|
+
}),
|
|
354
|
+
justifyContent: FlexJustifyContent.Center
|
|
332
355
|
});
|
|
356
|
+
container.addItem(
|
|
357
|
+
new GenericTile(recycleId(`${id}-staticApp`), {
|
|
358
|
+
mode: "IconMode",
|
|
359
|
+
frameType: "TwoByHalf",
|
|
360
|
+
width: "19rem",
|
|
361
|
+
header: context.getProperty("title") as string,
|
|
362
|
+
subheader: context.getProperty("subTitle") as string,
|
|
363
|
+
tileIcon: (context.getProperty("icon") as string) || DEFAULT_APP_ICON,
|
|
364
|
+
visible: "{= ${selectedView} === 'STATIC' || ${isStaticApp} }",
|
|
365
|
+
url: context.getProperty("url") as string,
|
|
366
|
+
press: (event: GenericTile$PressEvent) => {
|
|
367
|
+
this._persistDialog(this.getParent() as ContentAdditionDialog);
|
|
368
|
+
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
369
|
+
}
|
|
370
|
+
}).addStyleClass("suggestedTile")
|
|
371
|
+
);
|
|
333
372
|
|
|
334
|
-
if (context.getProperty("isStaticApp") as boolean) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
373
|
+
if (!(context.getProperty("isStaticApp") as boolean)) {
|
|
374
|
+
const vizData = context.getProperty("vizData") as IVisualization;
|
|
375
|
+
const supportedDisplayFormatVizs = [
|
|
376
|
+
{
|
|
377
|
+
...vizData,
|
|
378
|
+
displayFormatHint: DisplayFormat.Standard
|
|
379
|
+
}
|
|
380
|
+
];
|
|
381
|
+
if (this.isWideTileSupported(context)) {
|
|
382
|
+
supportedDisplayFormatVizs.push({
|
|
383
|
+
...vizData,
|
|
384
|
+
displayFormatHint: DisplayFormat.StandardWide
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
supportedDisplayFormatVizs.forEach((vizData) => {
|
|
389
|
+
// instantiate visualization for dynamic app
|
|
390
|
+
const vizInstance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;
|
|
391
|
+
vizInstance?.setActive(true);
|
|
392
|
+
vizInstance?.setProperty("sizeBehavior", "Small", true);
|
|
393
|
+
vizInstance?.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));
|
|
394
|
+
vizInstance.bindProperty("visible", {
|
|
395
|
+
parts: ["selectedDisplayFormat", "selectedView"],
|
|
396
|
+
formatter: (selectedDisplayFormat: DisplayFormat, selectedView: TileType) => {
|
|
397
|
+
if (selectedView && selectedView === TileType.Static) {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
return vizData.displayFormatHint === DisplayFormat.StandardWide
|
|
401
|
+
? selectedDisplayFormat === DisplayFormat.StandardWide
|
|
402
|
+
: selectedDisplayFormat !== DisplayFormat.StandardWide;
|
|
349
403
|
}
|
|
350
|
-
})
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
// create custom visualization for other apps
|
|
354
|
-
const vizData = context.getProperty("vizData") as ICustomVisualization;
|
|
355
|
-
const instance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;
|
|
356
|
-
instance?.setActive(true);
|
|
357
|
-
instance?.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));
|
|
358
|
-
container.addItem(instance);
|
|
404
|
+
});
|
|
405
|
+
container.addItem(vizInstance);
|
|
406
|
+
});
|
|
359
407
|
}
|
|
360
408
|
|
|
361
|
-
return container;
|
|
409
|
+
return container.addStyleClass("suggestedAppPreviewContainer");
|
|
362
410
|
}
|
|
363
411
|
|
|
364
412
|
/**
|
|
@@ -375,29 +423,62 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
375
423
|
? (context.getProperty("description") as string)
|
|
376
424
|
: (this._i18nBundle.getText("NoDescriptionAvailable") as string);
|
|
377
425
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
378
|
-
renderType:
|
|
426
|
+
renderType: FlexRendertype.Bare,
|
|
379
427
|
gap: "0.5rem",
|
|
428
|
+
layoutData: new FlexItemData({
|
|
429
|
+
growFactor: 1
|
|
430
|
+
}),
|
|
380
431
|
items: [
|
|
432
|
+
new HBox(recycleId(`${id}-title-container`), {
|
|
433
|
+
gap: "1rem",
|
|
434
|
+
alignItems: FlexAlignItems.Center,
|
|
435
|
+
renderType: FlexRendertype.Bare,
|
|
436
|
+
items: [
|
|
437
|
+
new Title(recycleId(`${id}-app-title`), {
|
|
438
|
+
text: context.getProperty("title") as string,
|
|
439
|
+
titleStyle: TitleLevel.H6
|
|
440
|
+
}),
|
|
441
|
+
new ObjectStatus(recycleId(`${id}-deprecatedApp`), {
|
|
442
|
+
text: this._i18nBundle.getText("deprecatedApp") as string,
|
|
443
|
+
icon: "sap-icon://alert",
|
|
444
|
+
state: ValueState.Warning,
|
|
445
|
+
visible: context.getProperty("isDeprecated") as boolean
|
|
446
|
+
})
|
|
447
|
+
]
|
|
448
|
+
}),
|
|
381
449
|
new ExpandableText(recycleId(`${id}-description`), {
|
|
382
450
|
text: description,
|
|
383
451
|
maxCharacters: Constants.MaxDescriptionLength
|
|
384
452
|
}),
|
|
453
|
+
// app actions container
|
|
454
|
+
new HBox(recycleId(`${id}-app-actions-container`), {
|
|
455
|
+
renderType: FlexRendertype.Bare,
|
|
456
|
+
gap: "1.5rem",
|
|
457
|
+
visible: !context.getProperty("isStaticApp"),
|
|
458
|
+
items: [this.getAppViewTypeAction(id), this.getDisplayFormatAction(id, context)]
|
|
459
|
+
}),
|
|
385
460
|
new HBox(recycleId(`${id}-app-status-container`), {
|
|
386
|
-
renderType:
|
|
387
|
-
visible:
|
|
461
|
+
renderType: FlexRendertype.Bare,
|
|
462
|
+
visible: {
|
|
463
|
+
parts: ["selectedView"],
|
|
464
|
+
formatter: () => {
|
|
465
|
+
return this.isAppAlreadyAdded(context);
|
|
466
|
+
}
|
|
467
|
+
},
|
|
388
468
|
items: [
|
|
389
469
|
new Label(recycleId(`${id}-appStatusLabel`), {
|
|
390
470
|
text: this._i18nBundle.getText("appStatus"),
|
|
391
471
|
showColon: true
|
|
392
472
|
}),
|
|
393
|
-
new
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
473
|
+
new ObjectStatus(recycleId(`${id}-alreadyAddedStatus`), {
|
|
474
|
+
text: "{= (${isStaticApp} || ${selectedView} === 'STATIC') ? ${i18n>alreadyAddedApp} : ${i18n>alreadyAddedTile} }",
|
|
475
|
+
icon: "sap-icon://sys-enter-2",
|
|
476
|
+
state: "Success"
|
|
477
|
+
}).addStyleClass("sapUiTinyMarginBegin")
|
|
397
478
|
]
|
|
398
|
-
})
|
|
479
|
+
}).addStyleClass("sapUiTinyMarginTop")
|
|
399
480
|
]
|
|
400
|
-
})
|
|
481
|
+
});
|
|
401
482
|
}
|
|
402
483
|
|
|
403
484
|
/**
|
|
@@ -468,15 +549,16 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
468
549
|
`<svg height="167" fill="none">
|
|
469
550
|
${loadingShimmer}
|
|
470
551
|
<rect x="16" y="75" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
471
|
-
<rect x="48" y="
|
|
472
|
-
<rect x="48" y="
|
|
552
|
+
<rect x="48" y="54" width="59%" height="48" rx="4" fill="url(#loadingShimmer)"/>
|
|
553
|
+
<rect x="48" y="110" width="13%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
554
|
+
<rect x="600" y="40" width="303" height="70" rx="16" fill="url(#loadingShimmer)"/>
|
|
473
555
|
</svg>`,
|
|
474
556
|
`<svg height="180" fill="none">
|
|
475
557
|
${loadingShimmer}
|
|
476
558
|
<rect x="16" y="82" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
477
|
-
<rect x="48" y="
|
|
478
|
-
<rect x="
|
|
479
|
-
<rect x="
|
|
559
|
+
<rect x="48" y="54" width="58%" height="48" rx="4" fill="url(#loadingShimmer)"/>
|
|
560
|
+
<rect x="48" y="110" width="13%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
561
|
+
<rect x="675" y="16" width="148" height="148" rx="16" fill="url(#loadingShimmer)"/>
|
|
480
562
|
</svg>`
|
|
481
563
|
];
|
|
482
564
|
}
|
|
@@ -521,6 +603,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
521
603
|
this.userSelectedApps?.clear();
|
|
522
604
|
}
|
|
523
605
|
|
|
606
|
+
public setIllustrationSize(): void {
|
|
607
|
+
const containerDom = (Fragment.byId(`${this.getId()}-content`, "container") as VBox)?.getDomRef() as HTMLElement;
|
|
608
|
+
if (containerDom) {
|
|
609
|
+
const clientHeight = containerDom.clientHeight;
|
|
610
|
+
const illustratedMessage = Fragment.byId(`${this.getId()}-content`, "beforeSearch") as IllustratedMessage;
|
|
611
|
+
if (clientHeight <= 500) {
|
|
612
|
+
illustratedMessage.setIllustrationSize("ExtraSmall");
|
|
613
|
+
} else if (500 < clientHeight && clientHeight < 650) {
|
|
614
|
+
illustratedMessage.setIllustrationSize("Small");
|
|
615
|
+
} else {
|
|
616
|
+
illustratedMessage.setIllustrationSize("Medium");
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
524
621
|
/**
|
|
525
622
|
* Handles the "Go" button press event for searching suggested apps.
|
|
526
623
|
*
|
|
@@ -544,7 +641,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
544
641
|
const insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText("insights") as string);
|
|
545
642
|
|
|
546
643
|
// generate suggested apps
|
|
547
|
-
const apps = this._generateApps(rawApps, allVisualizations,
|
|
644
|
+
const apps = this._generateApps(rawApps, allVisualizations, favoriteApps, insightsApps);
|
|
548
645
|
const suggestedApps = await this._filterUnsupportedApps(apps);
|
|
549
646
|
|
|
550
647
|
if (suggestedApps.length === 0 && !this.model.getProperty("/hasError")) {
|
|
@@ -590,17 +687,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
590
687
|
* @private
|
|
591
688
|
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
592
689
|
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
593
|
-
* @param {ICustomVisualization[]}
|
|
690
|
+
* @param {ICustomVisualization[]} favoriteApps - Favorite apps available in homepage.
|
|
691
|
+
* @param {ICustomVisualization[]} insightsApps - Insights apps available in homepage.
|
|
594
692
|
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
595
693
|
*/
|
|
596
694
|
private _generateApps(
|
|
597
695
|
rawApps: RawAppData[],
|
|
598
696
|
allVisualizations: IVisualization[],
|
|
599
|
-
|
|
697
|
+
favoriteApps: ICustomVisualization[],
|
|
698
|
+
insightsApps: ICustomVisualization[]
|
|
600
699
|
): SuggestedApp[] {
|
|
601
700
|
return rawApps.map((app) => {
|
|
602
701
|
const vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);
|
|
603
|
-
const
|
|
702
|
+
const addedToApps = favoriteApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
703
|
+
const addedToInsights = insightsApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
704
|
+
const tileConfig = this.parseTileConfiguration(app.configuration);
|
|
604
705
|
return {
|
|
605
706
|
title: app.title,
|
|
606
707
|
chipID: app.chipID,
|
|
@@ -608,10 +709,12 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
608
709
|
description: app.appDescription,
|
|
609
710
|
icon: app.iconUrl,
|
|
610
711
|
vizData,
|
|
611
|
-
|
|
712
|
+
addedToApps,
|
|
713
|
+
addedToInsights,
|
|
612
714
|
isStaticApp: app.tileType === TileType.Static,
|
|
613
|
-
|
|
614
|
-
|
|
715
|
+
url: vizData?.targetURL || "",
|
|
716
|
+
isDeprecated: (tileConfig?.display_info_text || "").toLowerCase() === Constants.DeprecatedInfoText,
|
|
717
|
+
selectedView: app.tileType === TileType.Static ? TileType.Static : TileType.Dynamic
|
|
615
718
|
};
|
|
616
719
|
}) as SuggestedApp[];
|
|
617
720
|
}
|
|
@@ -625,7 +728,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
625
728
|
*/
|
|
626
729
|
private isValidQuery(query: string = ""): boolean {
|
|
627
730
|
query = query?.trim();
|
|
628
|
-
return query.length >= Constants.MinQueryLength && query.length <= Constants.
|
|
731
|
+
return query.length >= Constants.MinQueryLength && query.length <= Constants.MaxQueryLength;
|
|
629
732
|
}
|
|
630
733
|
|
|
631
734
|
/**
|
|
@@ -695,70 +798,6 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
695
798
|
return queryResult.value || [];
|
|
696
799
|
}
|
|
697
800
|
|
|
698
|
-
/**
|
|
699
|
-
* Retrieves status texts for an app based on its configuration and homepage status.
|
|
700
|
-
*
|
|
701
|
-
* @private
|
|
702
|
-
* @param {string} configuration - The app's configuration string.
|
|
703
|
-
* @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.
|
|
704
|
-
* @returns {string[]} An array of status texts for the app.
|
|
705
|
-
*/
|
|
706
|
-
private getAppStatusTexts(configuration: string, addedToHomePage: boolean): string[] {
|
|
707
|
-
let statusTexts = [];
|
|
708
|
-
|
|
709
|
-
if (configuration) {
|
|
710
|
-
try {
|
|
711
|
-
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
712
|
-
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
713
|
-
const infoText = (tileConfig?.display_info_text || "").toLowerCase();
|
|
714
|
-
if (infoText === Constants.DeprecatedInfoText) {
|
|
715
|
-
statusTexts.push(this._i18nBundle.getText("deprecatedApp") as string);
|
|
716
|
-
}
|
|
717
|
-
} catch (error: unknown) {
|
|
718
|
-
Log.warning((error as Error).message);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
if (addedToHomePage) {
|
|
723
|
-
statusTexts.push(this._i18nBundle.getText("alreadyAddedApp") as string);
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
return statusTexts;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* Generates status text controls for the provided status texts.
|
|
731
|
-
*
|
|
732
|
-
* @private
|
|
733
|
-
* @param {string} id - The id of the list item.
|
|
734
|
-
* @param {string[]} stausTexts - The list of status texts.
|
|
735
|
-
* @returns {Text[]} An array of Text controls with applied styles.
|
|
736
|
-
*/
|
|
737
|
-
private _generateStatusTexts(id: string, stausTexts: string[]): Text[] {
|
|
738
|
-
return stausTexts.map((status, index) => {
|
|
739
|
-
return new Text(recycleId(`${id}-statusText-${index}`), {
|
|
740
|
-
text: status
|
|
741
|
-
}).addStyleClass(this.applyStatusClass(status));
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* Applies a CSS class to the status text based on its type.
|
|
747
|
-
*
|
|
748
|
-
* @private
|
|
749
|
-
* @param {string} status - The status text to classify.
|
|
750
|
-
* @returns {string} The CSS class for the status text.
|
|
751
|
-
*/
|
|
752
|
-
public applyStatusClass(status: string): string {
|
|
753
|
-
if (status === this._i18nBundle.getText("alreadyAddedApp")) {
|
|
754
|
-
return "addedAppStatusText";
|
|
755
|
-
} else if (status === this._i18nBundle.getText("deprecatedApp")) {
|
|
756
|
-
return "deprecatedAppStatusText";
|
|
757
|
-
} else {
|
|
758
|
-
return "";
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
|
|
762
801
|
/**
|
|
763
802
|
* Handles the "Add Apps" button press event to add selected apps to favorites.
|
|
764
803
|
*
|
|
@@ -772,12 +811,23 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
772
811
|
let dynamicAppsPresent = false;
|
|
773
812
|
|
|
774
813
|
for (const app of userSelectedApps) {
|
|
775
|
-
const isStaticApp =
|
|
814
|
+
const isStaticApp =
|
|
815
|
+
(app.getBindingContext()?.getProperty("isStaticApp") as boolean) ||
|
|
816
|
+
app.getBindingContext()?.getProperty("selectedView") === TileType.Static;
|
|
817
|
+
const displayFormatHint = (app.getBindingContext()?.getProperty("vizData") as IVisualization)
|
|
818
|
+
?.displayFormatHint as DisplayFormat;
|
|
819
|
+
const selectedDisplayFormat = app.getBindingContext()?.getProperty("selectedDisplayFormat") as DisplayFormat;
|
|
776
820
|
if (isStaticApp) staticAppsPresent = true;
|
|
777
821
|
else dynamicAppsPresent = true;
|
|
778
822
|
|
|
779
823
|
const vizId = app.getBindingContext()?.getProperty("chipID") as string;
|
|
780
824
|
await this.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID);
|
|
825
|
+
// for dynamic app, if display format is changed, update it
|
|
826
|
+
if (!isStaticApp && selectedDisplayFormat && displayFormatHint !== selectedDisplayFormat) {
|
|
827
|
+
// TODO: Check if addVisualization method in SpaceContent service can expose 'displayFormat' parameter to avoid this extra call
|
|
828
|
+
// since the internal Pages service method already supports it
|
|
829
|
+
await this.updateDisplayFormat(vizId, selectedDisplayFormat);
|
|
830
|
+
}
|
|
781
831
|
}
|
|
782
832
|
|
|
783
833
|
if (staticAppsPresent) {
|
|
@@ -845,25 +895,25 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
845
895
|
}
|
|
846
896
|
|
|
847
897
|
/**
|
|
848
|
-
* Retrieves the
|
|
898
|
+
* Retrieves the TilesContainer instance from the parent layout.
|
|
849
899
|
*
|
|
850
900
|
* @private
|
|
851
|
-
* @returns {
|
|
901
|
+
* @returns {TilesContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
852
902
|
*/
|
|
853
|
-
private
|
|
903
|
+
private getTilesContainer(): TilesContainer | undefined {
|
|
854
904
|
return this.getLayout()
|
|
855
905
|
?.getItems()
|
|
856
|
-
.find((container) => container instanceof
|
|
906
|
+
.find((container) => container instanceof TilesContainer);
|
|
857
907
|
}
|
|
858
908
|
|
|
859
909
|
/**
|
|
860
|
-
* Refreshes the Insights tiles panel in the
|
|
910
|
+
* Refreshes the Insights tiles panel in the TilesContainer.
|
|
861
911
|
*
|
|
862
912
|
* @private
|
|
863
913
|
* @async
|
|
864
914
|
*/
|
|
865
915
|
private async refreshInsightsApps(): Promise<void> {
|
|
866
|
-
await this.
|
|
916
|
+
await this.getTilesContainer()?.refreshData("tiles");
|
|
867
917
|
}
|
|
868
918
|
|
|
869
919
|
/**
|
|
@@ -879,8 +929,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
879
929
|
if (!selected) this.userSelectedApps.delete(listItem);
|
|
880
930
|
else {
|
|
881
931
|
const context = listItem.getBindingContext();
|
|
882
|
-
|
|
883
|
-
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
932
|
+
if (context && !this.isAppAlreadyAdded(context)) this.userSelectedApps.add(listItem);
|
|
884
933
|
}
|
|
885
934
|
|
|
886
935
|
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
@@ -930,7 +979,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
930
979
|
if (query.length !== 0 && query.length < Constants.MinQueryLength) {
|
|
931
980
|
textArea.setValueState(ValueState.Information);
|
|
932
981
|
textArea.setValueStateText(this._i18nBundle.getText("minLengthRequired"));
|
|
933
|
-
} else if (query.length > Constants.
|
|
982
|
+
} else if (query.length > Constants.MaxQueryLength) {
|
|
934
983
|
textArea.setValueState(ValueState.Warning);
|
|
935
984
|
textArea.setValueStateText(this._i18nBundle.getText("maxLengthExceeded"));
|
|
936
985
|
} else {
|
|
@@ -977,4 +1026,173 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
977
1026
|
width: "20em"
|
|
978
1027
|
});
|
|
979
1028
|
}
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Creates the action to change view type (App / Tile) for suggested app.
|
|
1032
|
+
*
|
|
1033
|
+
* @private
|
|
1034
|
+
* @param {string} id - The unique ID for the container.
|
|
1035
|
+
* @returns {HBox} The app view action container.
|
|
1036
|
+
*/
|
|
1037
|
+
private getAppViewTypeAction(id: string): HBox {
|
|
1038
|
+
const appViewToggleButton = new SegmentedButton(recycleId(`${id}-app-addAs-segmentedBtn`), {
|
|
1039
|
+
selectedKey: "{selectedView}",
|
|
1040
|
+
items: [
|
|
1041
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-app`), {
|
|
1042
|
+
key: TileType.Static,
|
|
1043
|
+
text: this._i18nBundle.getText("addAsApp")
|
|
1044
|
+
}),
|
|
1045
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-tile`), {
|
|
1046
|
+
key: TileType.Dynamic,
|
|
1047
|
+
text: this._i18nBundle.getText("addAsTile")
|
|
1048
|
+
})
|
|
1049
|
+
]
|
|
1050
|
+
}).addStyleClass("sapUiTinyMarginBegin");
|
|
1051
|
+
|
|
1052
|
+
const appViewLabel = new Label(recycleId(`${id}-addAsLabel`), {
|
|
1053
|
+
text: this._i18nBundle.getText("addAs"),
|
|
1054
|
+
showColon: true
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
try {
|
|
1058
|
+
appViewToggleButton.setProperty("contentMode", "ContentFit");
|
|
1059
|
+
appViewLabel.setWidth("100%");
|
|
1060
|
+
} catch (error) {
|
|
1061
|
+
Log.error(error instanceof Error ? error.message : (error as string));
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
return new HBox(recycleId(`${id}-app-addAs-container`), {
|
|
1065
|
+
renderType: FlexRendertype.Bare,
|
|
1066
|
+
alignItems: FlexAlignItems.Center,
|
|
1067
|
+
items: [appViewLabel, appViewToggleButton]
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Creates the action to change display format (standard / wide) for suggested tile.
|
|
1073
|
+
*
|
|
1074
|
+
* @private
|
|
1075
|
+
* @param {string} id - The unique ID for the container.
|
|
1076
|
+
* @param {Context} context - The binding context for the app.
|
|
1077
|
+
* @returns {HBox} The display format action container.
|
|
1078
|
+
*/
|
|
1079
|
+
private getDisplayFormatAction(id: string, context: Context): HBox {
|
|
1080
|
+
return new HBox(recycleId(`${id}-app-displayFormatSwitch-container`), {
|
|
1081
|
+
renderType: FlexRendertype.Bare,
|
|
1082
|
+
alignItems: FlexAlignItems.Center,
|
|
1083
|
+
visible: {
|
|
1084
|
+
parts: ["selectedView"],
|
|
1085
|
+
formatter: (selectedView: TileType) => {
|
|
1086
|
+
return selectedView !== TileType.Static && this.isWideTileSupported(context);
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
items: [
|
|
1090
|
+
new Label(recycleId(`${id}-displayFormatSwitchLabel`), {
|
|
1091
|
+
text: this._i18nBundle.getText("wide"),
|
|
1092
|
+
showColon: true
|
|
1093
|
+
}),
|
|
1094
|
+
new Switch({
|
|
1095
|
+
id: `${id}-displayFormatSwitch`,
|
|
1096
|
+
state: (context.getProperty("vizData") as IVisualization)?.displayFormatHint !== DisplayFormat.Standard,
|
|
1097
|
+
customTextOn: " ",
|
|
1098
|
+
customTextOff: " ",
|
|
1099
|
+
change: (event) => this.toggleDisplayFormat(event, context)
|
|
1100
|
+
}).addStyleClass("sapUiTinyMarginBegin")
|
|
1101
|
+
]
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Checks if the visualization supports wide tile conversion.
|
|
1107
|
+
*
|
|
1108
|
+
* @private
|
|
1109
|
+
* @param {Context} context - The binding context for the app.
|
|
1110
|
+
* @returns {boolean} True if wide display format is supported, false otherwise.
|
|
1111
|
+
*/
|
|
1112
|
+
private isWideTileSupported(context: Context): boolean {
|
|
1113
|
+
const vizData = context.getProperty("vizData") as IVisualization;
|
|
1114
|
+
const supportedDisplayFormats = vizData?.supportedDisplayFormats || ([] as string[]);
|
|
1115
|
+
return (
|
|
1116
|
+
vizData &&
|
|
1117
|
+
(vizData.indicatorDataSource || _isSmartBusinessTile(vizData)) &&
|
|
1118
|
+
supportedDisplayFormats.includes(DisplayFormat.Standard) &&
|
|
1119
|
+
supportedDisplayFormats.includes(DisplayFormat.StandardWide)
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Handler to switch between standard and wide format for tile.
|
|
1125
|
+
*
|
|
1126
|
+
* @private
|
|
1127
|
+
* @param {Switch$ChangeEvent} event - The switch change event.
|
|
1128
|
+
* @param {Context} context - The binding context for the app being modified.
|
|
1129
|
+
* @returns {void}
|
|
1130
|
+
*/
|
|
1131
|
+
private toggleDisplayFormat(event: Switch$ChangeEvent, context: Context): void {
|
|
1132
|
+
const switchToWideTile = event.getParameter("state") as boolean;
|
|
1133
|
+
const displayFormatHint = switchToWideTile ? DisplayFormat.StandardWide : DisplayFormat.Standard;
|
|
1134
|
+
const path = context.getPath();
|
|
1135
|
+
this.model.setProperty(`${path}/selectedDisplayFormat`, displayFormatHint);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Updates the display format of a visualization in the insights section.
|
|
1140
|
+
*
|
|
1141
|
+
* @private
|
|
1142
|
+
* @param {string} vizId - Id of the visualization for which display format has to be updated.
|
|
1143
|
+
* @param {DisplayFormat} displayFormatHint - The new display format to apply.
|
|
1144
|
+
* @returns {Promise<void>} A promise that resolves when the display format is updated.
|
|
1145
|
+
*/
|
|
1146
|
+
private async updateDisplayFormat(vizId: string, displayFormatHint: DisplayFormat): Promise<void> {
|
|
1147
|
+
const insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText("insights") as string);
|
|
1148
|
+
const viz = insightsApps.find((insightApp) => insightApp.visualization?.vizId === vizId);
|
|
1149
|
+
if (viz) {
|
|
1150
|
+
const updateConfig = {
|
|
1151
|
+
pageId: MYHOME_PAGE_ID,
|
|
1152
|
+
sourceSectionIndex: viz.persConfig?.sectionIndex as number,
|
|
1153
|
+
sourceVisualizationIndex: viz.persConfig?.visualizationIndex as number,
|
|
1154
|
+
oVisualizationData: {
|
|
1155
|
+
displayFormatHint
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
await this.appManagerInstance.updateVisualizations(updateConfig);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Determines if an app is already added to the appropriate section based on its type and selected view.
|
|
1164
|
+
* For static apps or apps with Static view selected, checks if added to favorites apps section.
|
|
1165
|
+
* For dynamic apps with Dynamic view selected, checks if added to insights section.
|
|
1166
|
+
*
|
|
1167
|
+
* @private
|
|
1168
|
+
* @param {Context} context - The binding context for the app to check.
|
|
1169
|
+
* @returns {boolean} True if the app is already added to the corresponding section, false otherwise.
|
|
1170
|
+
*/
|
|
1171
|
+
private isAppAlreadyAdded(context: Context): boolean {
|
|
1172
|
+
const isStaticApp = context.getProperty("isStaticApp") as boolean;
|
|
1173
|
+
const selectedAppView = context.getProperty("selectedView") as TileType;
|
|
1174
|
+
return (
|
|
1175
|
+
isStaticApp || selectedAppView === TileType.Static ? context.getProperty("addedToApps") : context.getProperty("addedToInsights")
|
|
1176
|
+
) as boolean;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Parses the tile configuration string from raw app configuration.
|
|
1181
|
+
*
|
|
1182
|
+
* @private
|
|
1183
|
+
* @param {string} configuration - The raw app configuration string containing tile settings.
|
|
1184
|
+
* @returns {TileConfig | null} The parsed tile configuration object or null if parsing fails.
|
|
1185
|
+
*/
|
|
1186
|
+
private parseTileConfiguration(configuration: string): TileConfig | null {
|
|
1187
|
+
if (configuration) {
|
|
1188
|
+
try {
|
|
1189
|
+
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
1190
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
1191
|
+
return tileConfig;
|
|
1192
|
+
} catch (error: unknown) {
|
|
1193
|
+
Log.warning((error as Error).message);
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
return null;
|
|
1197
|
+
}
|
|
980
1198
|
}
|