@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
|
@@ -9,19 +9,24 @@ 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";
|
|
20
24
|
import TextArea, { TextArea$LiveChangeEvent } from "sap/m/TextArea";
|
|
25
|
+
import Title from "sap/m/Title";
|
|
21
26
|
import VBox from "sap/m/VBox";
|
|
22
27
|
import Control from "sap/ui/core/Control";
|
|
23
28
|
import Fragment from "sap/ui/core/Fragment";
|
|
24
|
-
import { ValueState } from "sap/ui/core/library";
|
|
29
|
+
import { TitleLevel, ValueState } from "sap/ui/core/library";
|
|
25
30
|
import ChangeReason from "sap/ui/model/ChangeReason";
|
|
26
31
|
import Context from "sap/ui/model/Context";
|
|
27
32
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
@@ -36,8 +41,8 @@ import BaseLayout from "./BaseLayout";
|
|
|
36
41
|
import BaseSettingsPanel from "./BaseSettingsPanel";
|
|
37
42
|
import ContentAdditionDialog from "./ContentAdditionDialog";
|
|
38
43
|
import FavAppPanel from "./FavAppPanel";
|
|
39
|
-
import InsightsContainer from "./InsightsContainer";
|
|
40
44
|
import { ICustomVisualization, ICustomVizInstance, IVisualization } from "./interface/AppsInterface";
|
|
45
|
+
import TilesContainer from "./TilesContainer";
|
|
41
46
|
import AppManager from "./utils/AppManager";
|
|
42
47
|
import {
|
|
43
48
|
AI_APP_FINDER_API,
|
|
@@ -56,7 +61,8 @@ import { triggerPXIntegration } from "./utils/PXFeedback";
|
|
|
56
61
|
const Constants = {
|
|
57
62
|
DeprecatedInfoText: "deprecated",
|
|
58
63
|
MinQueryLength: 2,
|
|
59
|
-
|
|
64
|
+
MaxQueryLength: 2000,
|
|
65
|
+
MaxDescriptionLength: 300
|
|
60
66
|
};
|
|
61
67
|
|
|
62
68
|
enum SearchStatus {
|
|
@@ -71,7 +77,8 @@ enum ErrorType {
|
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
enum TileType {
|
|
74
|
-
Static = "STATIC"
|
|
80
|
+
Static = "STATIC",
|
|
81
|
+
Dynamic = "DYNAMIC"
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
interface RawAppData {
|
|
@@ -83,16 +90,17 @@ interface RawAppData {
|
|
|
83
90
|
iconUrl: string;
|
|
84
91
|
configuration: string;
|
|
85
92
|
}
|
|
86
|
-
interface SuggestedApp {
|
|
93
|
+
export interface SuggestedApp {
|
|
87
94
|
icon: string;
|
|
88
95
|
title: string;
|
|
89
96
|
chipID: string;
|
|
90
|
-
status: string[];
|
|
91
97
|
subTitle: string;
|
|
92
98
|
description: string;
|
|
93
99
|
isStaticApp: boolean;
|
|
94
|
-
|
|
100
|
+
addedToApps?: boolean;
|
|
101
|
+
addedToInsights?: boolean;
|
|
95
102
|
vizData?: IVisualization;
|
|
103
|
+
isDeprecated?: boolean;
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
interface QueryResponse {
|
|
@@ -202,89 +210,95 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
202
210
|
this.vizInstantiationService = await Container.getServiceAsync<VisualizationInstantiation>("VisualizationInstantiation");
|
|
203
211
|
|
|
204
212
|
//load ui fragment
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
sampleQueries: [
|
|
230
|
-
{
|
|
231
|
-
index: 1,
|
|
232
|
-
query: this._i18nBundle.getText("sampleQuery_1") as string
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
index: 2,
|
|
236
|
-
query: this._i18nBundle.getText("sampleQuery_2") as string
|
|
213
|
+
try {
|
|
214
|
+
const panelContent = (await Fragment.load({
|
|
215
|
+
id: recycleId(`${this.getId()}-content`),
|
|
216
|
+
name: "sap.cux.home.utils.fragment.appsAdditionContent",
|
|
217
|
+
controller: this
|
|
218
|
+
})) as Control;
|
|
219
|
+
this.addAggregation("content", panelContent);
|
|
220
|
+
|
|
221
|
+
//initialize ui model
|
|
222
|
+
this.model = new JSONModel({
|
|
223
|
+
query: "",
|
|
224
|
+
hasError: false,
|
|
225
|
+
errorType: ErrorType.NoResultsFound,
|
|
226
|
+
errorDescription: "",
|
|
227
|
+
searchStatus: SearchStatus.Idle,
|
|
228
|
+
loadingAnimations: this._generateSearchingAnimations(),
|
|
229
|
+
suggestedAppsCount: 0,
|
|
230
|
+
userSelectedApps: [],
|
|
231
|
+
suggestedApps: [],
|
|
232
|
+
aiPolicyText: this._generateAIPolicyText(),
|
|
233
|
+
invalidQuery: true,
|
|
234
|
+
feedback: {
|
|
235
|
+
thumbsUp: false,
|
|
236
|
+
thumbsDown: false
|
|
237
237
|
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
238
|
+
sampleQueries: [
|
|
239
|
+
{
|
|
240
|
+
index: 1,
|
|
241
|
+
query: this._i18nBundle.getText("sampleQuery_1") as string
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
index: 2,
|
|
245
|
+
query: this._i18nBundle.getText("sampleQuery_2") as string
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
index: 3,
|
|
249
|
+
query: this._i18nBundle.getText("sampleQuery_3") as string
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
panelContent.setModel(this.model);
|
|
255
|
+
panelContent.setModel(new ResourceModel({ bundleName: "sap.cux.home.i18n.messagebundle" }), "i18n");
|
|
256
|
+
this.addAppsButton.setModel(this.model);
|
|
257
|
+
|
|
258
|
+
//bind suggested apps list
|
|
259
|
+
this.appSuggestionList = Fragment.byId(`${this.getId()}-content`, "appsList") as List;
|
|
260
|
+
this.appSuggestionList.bindAggregation("items", {
|
|
261
|
+
path: "/suggestedApps",
|
|
262
|
+
factory: this._generateListItem.bind(this),
|
|
263
|
+
sorter: new Sorter({
|
|
264
|
+
path: "",
|
|
265
|
+
comparator: (firstApp: SuggestedApp, secondApp: SuggestedApp) => {
|
|
266
|
+
const getPriority = (app: SuggestedApp) => {
|
|
267
|
+
const hasAlreadyAdded = app.isStaticApp ? app.addedToApps : app.addedToInsights;
|
|
268
|
+
const hasDeprecated = app.isDeprecated;
|
|
269
|
+
|
|
270
|
+
if (!hasAlreadyAdded && !hasDeprecated) return 0; // Neither status - highest priority
|
|
271
|
+
if (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority
|
|
272
|
+
if (hasAlreadyAdded) return 1; // Only "Already Added"
|
|
273
|
+
if (hasDeprecated) return 2; // Only "Deprecated"
|
|
274
|
+
|
|
275
|
+
return 4; // Any other combination (fallback)
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const firstPriority = getPriority(firstApp);
|
|
279
|
+
const secondPriority = getPriority(secondApp);
|
|
280
|
+
|
|
281
|
+
return firstPriority - secondPriority;
|
|
282
|
+
}
|
|
283
|
+
})
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
//focus on the first item when the list is updated
|
|
287
|
+
this.appSuggestionList.attachUpdateFinished(() => {
|
|
288
|
+
if (
|
|
289
|
+
this.model.getProperty("/suggestedAppsCount") > 0 &&
|
|
290
|
+
this.model.getProperty("/searchStatus") === SearchStatus.Complete
|
|
291
|
+
) {
|
|
292
|
+
this.appSuggestionList.getItems()?.[0]?.focus();
|
|
274
293
|
}
|
|
275
|
-
})
|
|
276
|
-
});
|
|
294
|
+
});
|
|
277
295
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
//bind search field
|
|
286
|
-
const searchTextArea = Fragment.byId(`${this.getId()}-content`, "searchTextArea") as TextArea;
|
|
287
|
-
searchTextArea.onsapenter = this.onPressGo.bind(this);
|
|
296
|
+
//bind search field
|
|
297
|
+
const searchTextArea = Fragment.byId(`${this.getId()}-content`, "searchTextArea") as TextArea;
|
|
298
|
+
searchTextArea.onsapenter = this.onPressGo.bind(this);
|
|
299
|
+
} catch (error) {
|
|
300
|
+
Log.error("Failed to load panel content for AppsAdditionPanel:", error as Error);
|
|
301
|
+
}
|
|
288
302
|
}
|
|
289
303
|
|
|
290
304
|
/**
|
|
@@ -296,29 +310,54 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
296
310
|
* @returns {CustomListItem} The generated list item control.
|
|
297
311
|
*/
|
|
298
312
|
private _generateListItem(id: string, context: Context): CustomListItem {
|
|
299
|
-
const isStaticApp = context.getProperty("isStaticApp") as boolean;
|
|
300
313
|
const langTag = Localization.getLanguageTag();
|
|
301
314
|
const currentLanguage = langTag.language.toLowerCase();
|
|
302
315
|
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
303
316
|
const listItem = new CustomListItem(id, {
|
|
304
|
-
|
|
317
|
+
//when toggled b/w app and tile view, the selection should update according to whether the app is already added to selected section
|
|
318
|
+
selected: {
|
|
319
|
+
path: "selectedView",
|
|
320
|
+
formatter: () => {
|
|
321
|
+
const isAppAlreadyAdded = this.isAppAlreadyAdded(context);
|
|
322
|
+
//bind associated checkbox to disable it when the app is already added
|
|
323
|
+
listItem.getMultiSelectControl(true).setEnabled(!isAppAlreadyAdded);
|
|
324
|
+
// if app is already added or if user has selected the app, mark it as selected
|
|
325
|
+
return isAppAlreadyAdded || this.userSelectedApps.has(listItem);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
305
328
|
content: [
|
|
306
329
|
new FlexBox(recycleId(`${id}-result-container`), {
|
|
307
|
-
renderType:
|
|
308
|
-
direction:
|
|
309
|
-
|
|
310
|
-
items: [this.
|
|
311
|
-
}).addStyleClass("sapUiSmallMargin")
|
|
330
|
+
renderType: FlexRendertype.Bare,
|
|
331
|
+
direction: FlexDirection.Row,
|
|
332
|
+
gap: "1.5rem",
|
|
333
|
+
items: [this._getAppDetailsContainer(id, context, isEnglishLanguage), this._getAppPreviewContainer(id, context)]
|
|
334
|
+
}).addStyleClass("sapUiSmallMargin sapUiTinyMarginBegin")
|
|
312
335
|
]
|
|
313
336
|
});
|
|
314
337
|
|
|
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
338
|
return listItem;
|
|
319
339
|
}
|
|
320
340
|
|
|
321
341
|
/**
|
|
342
|
+
* Cleans up resources when exiting the panel.
|
|
343
|
+
*
|
|
344
|
+
* @public
|
|
345
|
+
* @override
|
|
346
|
+
*/
|
|
347
|
+
public exit(): void {
|
|
348
|
+
// Destroy fragments if they exist
|
|
349
|
+
const dialogId = `${this.getId()}-content`;
|
|
350
|
+
|
|
351
|
+
["number", "query", "searchingAnimation"].forEach((elementId) => {
|
|
352
|
+
const element = Fragment.byId(dialogId, elementId);
|
|
353
|
+
element?.destroy();
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
super.exit();
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
|
|
322
361
|
* Creates a preview container for the suggested app.
|
|
323
362
|
*
|
|
324
363
|
* @private
|
|
@@ -328,37 +367,45 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
328
367
|
*/
|
|
329
368
|
private _getAppPreviewContainer(id: string, context: Context): HBox {
|
|
330
369
|
const container = new HBox(recycleId(`${id}-suggestedAppContainer`), {
|
|
331
|
-
renderType:
|
|
370
|
+
renderType: FlexRendertype.Bare,
|
|
371
|
+
width: "19rem",
|
|
372
|
+
layoutData: new FlexItemData({
|
|
373
|
+
growFactor: 0,
|
|
374
|
+
shrinkFactor: 0,
|
|
375
|
+
alignSelf: FlexAlignItems.Center
|
|
376
|
+
}),
|
|
377
|
+
justifyContent: FlexJustifyContent.Center
|
|
332
378
|
});
|
|
379
|
+
container.addItem(
|
|
380
|
+
new GenericTile(recycleId(`${id}-staticApp`), {
|
|
381
|
+
mode: "IconMode",
|
|
382
|
+
frameType: "TwoByHalf",
|
|
383
|
+
width: "19rem",
|
|
384
|
+
header: context.getProperty("title") as string,
|
|
385
|
+
subheader: context.getProperty("subTitle") as string,
|
|
386
|
+
tileIcon: (context.getProperty("icon") as string) || DEFAULT_APP_ICON,
|
|
387
|
+
visible: "{= ${selectedView} === 'STATIC'}",
|
|
388
|
+
url: context.getProperty("url") as string,
|
|
389
|
+
press: (event: GenericTile$PressEvent) => {
|
|
390
|
+
this._persistDialog(this.getParent() as ContentAdditionDialog);
|
|
391
|
+
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
392
|
+
}
|
|
393
|
+
}).addStyleClass("suggestedTile")
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
const vizData = context.getProperty("vizData") as IVisualization;
|
|
397
|
+
// instantiate visualization for dynamic app
|
|
398
|
+
const vizInstance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;
|
|
399
|
+
vizInstance?.setActive(true);
|
|
400
|
+
vizInstance?.setProperty("sizeBehavior", "Small", true);
|
|
401
|
+
vizInstance?.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));
|
|
402
|
+
vizInstance.bindProperty("visible", {
|
|
403
|
+
parts: ["selectedView"],
|
|
404
|
+
formatter: (selectedView: TileType) => selectedView !== TileType.Static
|
|
405
|
+
});
|
|
406
|
+
container.addItem(vizInstance);
|
|
333
407
|
|
|
334
|
-
|
|
335
|
-
// create generic tile for static app
|
|
336
|
-
container.addItem(
|
|
337
|
-
new GenericTile(recycleId(`${id}-staticApp`), {
|
|
338
|
-
mode: "IconMode",
|
|
339
|
-
frameType: "TwoByHalf",
|
|
340
|
-
width: "19rem",
|
|
341
|
-
header: context.getProperty("title") as string,
|
|
342
|
-
subheader: context.getProperty("subTitle") as string,
|
|
343
|
-
tileIcon: (context.getProperty("icon") as string) || DEFAULT_APP_ICON,
|
|
344
|
-
visible: context.getProperty("isStaticApp") as boolean,
|
|
345
|
-
url: context.getProperty("url") as string,
|
|
346
|
-
press: (event: GenericTile$PressEvent) => {
|
|
347
|
-
this._persistDialog(this.getParent() as ContentAdditionDialog);
|
|
348
|
-
URLHelper.redirect(event.getSource()?.getUrl(), false);
|
|
349
|
-
}
|
|
350
|
-
}).addStyleClass("suggestedTile")
|
|
351
|
-
);
|
|
352
|
-
} else {
|
|
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);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
return container;
|
|
408
|
+
return container.addStyleClass("suggestedAppPreviewContainer");
|
|
362
409
|
}
|
|
363
410
|
|
|
364
411
|
/**
|
|
@@ -375,29 +422,58 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
375
422
|
? (context.getProperty("description") as string)
|
|
376
423
|
: (this._i18nBundle.getText("NoDescriptionAvailable") as string);
|
|
377
424
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
378
|
-
renderType:
|
|
379
|
-
gap: "
|
|
425
|
+
renderType: FlexRendertype.Bare,
|
|
426
|
+
gap: "1rem",
|
|
427
|
+
layoutData: new FlexItemData({
|
|
428
|
+
growFactor: 1
|
|
429
|
+
}),
|
|
380
430
|
items: [
|
|
431
|
+
new HBox(recycleId(`${id}-title-container`), {
|
|
432
|
+
gap: "0.5rem",
|
|
433
|
+
alignItems: FlexAlignItems.Center,
|
|
434
|
+
renderType: FlexRendertype.Bare,
|
|
435
|
+
items: [
|
|
436
|
+
new Title(recycleId(`${id}-app-title`), {
|
|
437
|
+
text: context.getProperty("title") as string,
|
|
438
|
+
titleStyle: TitleLevel.H6
|
|
439
|
+
}),
|
|
440
|
+
new ObjectStatus(recycleId(`${id}-deprecatedApp`), {
|
|
441
|
+
text: this._i18nBundle.getText("deprecatedApp") as string,
|
|
442
|
+
icon: "sap-icon://alert",
|
|
443
|
+
state: ValueState.Warning,
|
|
444
|
+
visible: context.getProperty("isDeprecated") as boolean
|
|
445
|
+
})
|
|
446
|
+
]
|
|
447
|
+
}),
|
|
381
448
|
new ExpandableText(recycleId(`${id}-description`), {
|
|
382
449
|
text: description,
|
|
383
|
-
maxCharacters: Constants.MaxDescriptionLength
|
|
450
|
+
maxCharacters: Constants.MaxDescriptionLength,
|
|
451
|
+
layoutData: new FlexItemData({
|
|
452
|
+
growFactor: 1
|
|
453
|
+
})
|
|
384
454
|
}),
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
455
|
+
// app actions container
|
|
456
|
+
new HBox(recycleId(`${id}-app-actions-container`), {
|
|
457
|
+
renderType: FlexRendertype.Bare,
|
|
458
|
+
gap: "1.5rem",
|
|
459
|
+
alignItems: FlexAlignItems.Center,
|
|
388
460
|
items: [
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
461
|
+
this.getAppViewTypeAction(id),
|
|
462
|
+
new ObjectStatus(recycleId(`${id}-alreadyAddedStatus`), {
|
|
463
|
+
text: "{i18n>alreadyAddedApp}",
|
|
464
|
+
icon: "sap-icon://sys-enter-2",
|
|
465
|
+
state: "Success",
|
|
466
|
+
visible: {
|
|
467
|
+
parts: ["selectedView"],
|
|
468
|
+
formatter: () => {
|
|
469
|
+
return this.isAppAlreadyAdded(context);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
})
|
|
397
473
|
]
|
|
398
474
|
})
|
|
399
475
|
]
|
|
400
|
-
})
|
|
476
|
+
});
|
|
401
477
|
}
|
|
402
478
|
|
|
403
479
|
/**
|
|
@@ -468,15 +544,19 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
468
544
|
`<svg height="167" fill="none">
|
|
469
545
|
${loadingShimmer}
|
|
470
546
|
<rect x="16" y="75" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
471
|
-
<rect x="48" y="16" width="
|
|
472
|
-
<rect x="48" y="
|
|
547
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
548
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
549
|
+
<rect x="48" y="130" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
550
|
+
<rect x="600" y="50" width="303" height="70" rx="16" fill="url(#loadingShimmer)"/>
|
|
473
551
|
</svg>`,
|
|
474
552
|
`<svg height="180" fill="none">
|
|
475
553
|
${loadingShimmer}
|
|
476
554
|
<rect x="16" y="82" width="16" height="16" rx="4" fill="var(--sapContent_Placeholderloading_Background)"/>
|
|
477
|
-
<rect x="48" y="16" width="
|
|
478
|
-
<rect x="
|
|
479
|
-
<rect x="
|
|
555
|
+
<rect x="48" y="16" width="30%" height="16" rx="4" fill="url(#loadingShimmer)"/>
|
|
556
|
+
<rect x="48" y="54" width="57%" height="64" rx="4" fill="url(#loadingShimmer)"/>
|
|
557
|
+
<rect x="48" y="140" width="16%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
558
|
+
<rect x="210" y="140" width="10%" height="24" rx="4" fill="url(#loadingShimmer)"/>
|
|
559
|
+
<rect x="675" y="16" width="148" height="148" rx="16" fill="url(#loadingShimmer)"/>
|
|
480
560
|
</svg>`
|
|
481
561
|
];
|
|
482
562
|
}
|
|
@@ -521,6 +601,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
521
601
|
this.userSelectedApps?.clear();
|
|
522
602
|
}
|
|
523
603
|
|
|
604
|
+
public setIllustrationSize(): void {
|
|
605
|
+
const containerDom = (Fragment.byId(`${this.getId()}-content`, "container") as VBox)?.getDomRef() as HTMLElement;
|
|
606
|
+
if (containerDom) {
|
|
607
|
+
const clientHeight = containerDom.clientHeight;
|
|
608
|
+
const illustratedMessage = Fragment.byId(`${this.getId()}-content`, "beforeSearch") as IllustratedMessage;
|
|
609
|
+
if (clientHeight <= 500) {
|
|
610
|
+
illustratedMessage.setIllustrationSize("ExtraSmall");
|
|
611
|
+
} else if (500 < clientHeight && clientHeight < 650) {
|
|
612
|
+
illustratedMessage.setIllustrationSize("Small");
|
|
613
|
+
} else {
|
|
614
|
+
illustratedMessage.setIllustrationSize("Medium");
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
524
619
|
/**
|
|
525
620
|
* Handles the "Go" button press event for searching suggested apps.
|
|
526
621
|
*
|
|
@@ -544,7 +639,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
544
639
|
const insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText("insights") as string);
|
|
545
640
|
|
|
546
641
|
// generate suggested apps
|
|
547
|
-
const apps = this._generateApps(rawApps, allVisualizations,
|
|
642
|
+
const apps = this._generateApps(rawApps, allVisualizations, favoriteApps, insightsApps);
|
|
548
643
|
const suggestedApps = await this._filterUnsupportedApps(apps);
|
|
549
644
|
|
|
550
645
|
if (suggestedApps.length === 0 && !this.model.getProperty("/hasError")) {
|
|
@@ -590,17 +685,21 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
590
685
|
* @private
|
|
591
686
|
* @param {RawAppData[]} rawApps - The raw app data to process.
|
|
592
687
|
* @param {IVisualization[]} allVisualizations - All available visualizations.
|
|
593
|
-
* @param {ICustomVisualization[]}
|
|
688
|
+
* @param {ICustomVisualization[]} favoriteApps - Favorite apps available in homepage.
|
|
689
|
+
* @param {ICustomVisualization[]} insightsApps - Insights apps available in homepage.
|
|
594
690
|
* @returns {SuggestedApp[]} The list of suggested apps.
|
|
595
691
|
*/
|
|
596
692
|
private _generateApps(
|
|
597
693
|
rawApps: RawAppData[],
|
|
598
694
|
allVisualizations: IVisualization[],
|
|
599
|
-
|
|
695
|
+
favoriteApps: ICustomVisualization[],
|
|
696
|
+
insightsApps: ICustomVisualization[]
|
|
600
697
|
): SuggestedApp[] {
|
|
601
698
|
return rawApps.map((app) => {
|
|
602
699
|
const vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);
|
|
603
|
-
const
|
|
700
|
+
const addedToApps = favoriteApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
701
|
+
const addedToInsights = insightsApps.some((viz) => viz.visualization?.vizId === app.chipID);
|
|
702
|
+
const tileConfig = this.parseTileConfiguration(app.configuration);
|
|
604
703
|
return {
|
|
605
704
|
title: app.title,
|
|
606
705
|
chipID: app.chipID,
|
|
@@ -608,10 +707,12 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
608
707
|
description: app.appDescription,
|
|
609
708
|
icon: app.iconUrl,
|
|
610
709
|
vizData,
|
|
611
|
-
|
|
710
|
+
addedToApps,
|
|
711
|
+
addedToInsights,
|
|
612
712
|
isStaticApp: app.tileType === TileType.Static,
|
|
613
|
-
|
|
614
|
-
|
|
713
|
+
url: vizData?.targetURL || "",
|
|
714
|
+
isDeprecated: (tileConfig?.display_info_text || "").toLowerCase() === Constants.DeprecatedInfoText,
|
|
715
|
+
selectedView: app.tileType === TileType.Static ? TileType.Static : TileType.Dynamic
|
|
615
716
|
};
|
|
616
717
|
}) as SuggestedApp[];
|
|
617
718
|
}
|
|
@@ -625,7 +726,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
625
726
|
*/
|
|
626
727
|
private isValidQuery(query: string = ""): boolean {
|
|
627
728
|
query = query?.trim();
|
|
628
|
-
return query.length >= Constants.MinQueryLength && query.length <= Constants.
|
|
729
|
+
return query.length >= Constants.MinQueryLength && query.length <= Constants.MaxQueryLength;
|
|
629
730
|
}
|
|
630
731
|
|
|
631
732
|
/**
|
|
@@ -695,70 +796,6 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
695
796
|
return queryResult.value || [];
|
|
696
797
|
}
|
|
697
798
|
|
|
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
799
|
/**
|
|
763
800
|
* Handles the "Add Apps" button press event to add selected apps to favorites.
|
|
764
801
|
*
|
|
@@ -772,7 +809,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
772
809
|
let dynamicAppsPresent = false;
|
|
773
810
|
|
|
774
811
|
for (const app of userSelectedApps) {
|
|
775
|
-
const isStaticApp = app.getBindingContext()?.getProperty("
|
|
812
|
+
const isStaticApp = app.getBindingContext()?.getProperty("selectedView") === TileType.Static;
|
|
776
813
|
if (isStaticApp) staticAppsPresent = true;
|
|
777
814
|
else dynamicAppsPresent = true;
|
|
778
815
|
|
|
@@ -845,25 +882,25 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
845
882
|
}
|
|
846
883
|
|
|
847
884
|
/**
|
|
848
|
-
* Retrieves the
|
|
885
|
+
* Retrieves the TilesContainer instance from the parent layout.
|
|
849
886
|
*
|
|
850
887
|
* @private
|
|
851
|
-
* @returns {
|
|
888
|
+
* @returns {TilesContainer | undefined} The AppsContainer instance or undefined if not found.
|
|
852
889
|
*/
|
|
853
|
-
private
|
|
890
|
+
private getTilesContainer(): TilesContainer | undefined {
|
|
854
891
|
return this.getLayout()
|
|
855
892
|
?.getItems()
|
|
856
|
-
.find((container) => container instanceof
|
|
893
|
+
.find((container) => container instanceof TilesContainer);
|
|
857
894
|
}
|
|
858
895
|
|
|
859
896
|
/**
|
|
860
|
-
* Refreshes the Insights tiles panel in the
|
|
897
|
+
* Refreshes the Insights tiles panel in the TilesContainer.
|
|
861
898
|
*
|
|
862
899
|
* @private
|
|
863
900
|
* @async
|
|
864
901
|
*/
|
|
865
902
|
private async refreshInsightsApps(): Promise<void> {
|
|
866
|
-
await this.
|
|
903
|
+
await this.getTilesContainer()?.refreshData("tiles");
|
|
867
904
|
}
|
|
868
905
|
|
|
869
906
|
/**
|
|
@@ -879,8 +916,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
879
916
|
if (!selected) this.userSelectedApps.delete(listItem);
|
|
880
917
|
else {
|
|
881
918
|
const context = listItem.getBindingContext();
|
|
882
|
-
|
|
883
|
-
if (!addedToHomePage) this.userSelectedApps.add(listItem);
|
|
919
|
+
if (context && !this.isAppAlreadyAdded(context)) this.userSelectedApps.add(listItem);
|
|
884
920
|
}
|
|
885
921
|
|
|
886
922
|
this.model.setProperty("/userSelectedApps", Array.from(this.userSelectedApps));
|
|
@@ -930,7 +966,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
930
966
|
if (query.length !== 0 && query.length < Constants.MinQueryLength) {
|
|
931
967
|
textArea.setValueState(ValueState.Information);
|
|
932
968
|
textArea.setValueStateText(this._i18nBundle.getText("minLengthRequired"));
|
|
933
|
-
} else if (query.length > Constants.
|
|
969
|
+
} else if (query.length > Constants.MaxQueryLength) {
|
|
934
970
|
textArea.setValueState(ValueState.Warning);
|
|
935
971
|
textArea.setValueStateText(this._i18nBundle.getText("maxLengthExceeded"));
|
|
936
972
|
} else {
|
|
@@ -977,4 +1013,82 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
|
|
|
977
1013
|
width: "20em"
|
|
978
1014
|
});
|
|
979
1015
|
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Creates the action to change view type (App / Tile) for suggested app.
|
|
1019
|
+
*
|
|
1020
|
+
* @private
|
|
1021
|
+
* @param {string} id - The unique ID for the container.
|
|
1022
|
+
* @returns {HBox} The app view action container.
|
|
1023
|
+
*/
|
|
1024
|
+
private getAppViewTypeAction(id: string): HBox {
|
|
1025
|
+
const appViewToggleButton = new SegmentedButton(recycleId(`${id}-app-addAs-segmentedBtn`), {
|
|
1026
|
+
selectedKey: "{selectedView}",
|
|
1027
|
+
items: [
|
|
1028
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-app`), {
|
|
1029
|
+
key: TileType.Static,
|
|
1030
|
+
text: this._i18nBundle.getText("addAsApp")
|
|
1031
|
+
}),
|
|
1032
|
+
new SegmentedButtonItem(recycleId(`${id}-addAs-tile`), {
|
|
1033
|
+
key: TileType.Dynamic,
|
|
1034
|
+
text: this._i18nBundle.getText("addAsTile")
|
|
1035
|
+
})
|
|
1036
|
+
]
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
const appViewLabel = new Label(recycleId(`${id}-addAsLabel`), {
|
|
1040
|
+
text: this._i18nBundle.getText("addAs"),
|
|
1041
|
+
showColon: true
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
try {
|
|
1045
|
+
appViewToggleButton.setProperty("contentMode", "ContentFit");
|
|
1046
|
+
appViewLabel.setWidth("100%");
|
|
1047
|
+
} catch (error) {
|
|
1048
|
+
Log.error(error instanceof Error ? error.message : (error as string));
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
return new HBox(recycleId(`${id}-app-addAs-container`), {
|
|
1052
|
+
renderType: FlexRendertype.Bare,
|
|
1053
|
+
alignItems: FlexAlignItems.Center,
|
|
1054
|
+
gap: "0.25rem",
|
|
1055
|
+
items: [appViewLabel, appViewToggleButton]
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Determines if an app is already added to the appropriate section based on its type and selected view.
|
|
1061
|
+
* For static apps or apps with Static view selected, checks if added to favorites apps section.
|
|
1062
|
+
* For dynamic apps with Dynamic view selected, checks if added to insights section.
|
|
1063
|
+
*
|
|
1064
|
+
* @private
|
|
1065
|
+
* @param {Context} context - The binding context for the app to check.
|
|
1066
|
+
* @returns {boolean} True if the app is already added to the corresponding section, false otherwise.
|
|
1067
|
+
*/
|
|
1068
|
+
private isAppAlreadyAdded(context: Context): boolean {
|
|
1069
|
+
const selectedAppView = context.getProperty("selectedView") as TileType;
|
|
1070
|
+
return (
|
|
1071
|
+
selectedAppView === TileType.Static ? context.getProperty("addedToApps") : context.getProperty("addedToInsights")
|
|
1072
|
+
) as boolean;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Parses the tile configuration string from raw app configuration.
|
|
1077
|
+
*
|
|
1078
|
+
* @private
|
|
1079
|
+
* @param {string} configuration - The raw app configuration string containing tile settings.
|
|
1080
|
+
* @returns {TileConfig | null} The parsed tile configuration object or null if parsing fails.
|
|
1081
|
+
*/
|
|
1082
|
+
private parseTileConfiguration(configuration: string): TileConfig | null {
|
|
1083
|
+
if (configuration) {
|
|
1084
|
+
try {
|
|
1085
|
+
const parsedConfig = JSON.parse(configuration) as Configuration;
|
|
1086
|
+
const tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;
|
|
1087
|
+
return tileConfig;
|
|
1088
|
+
} catch (error: unknown) {
|
|
1089
|
+
Log.warning((error as Error).message);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return null;
|
|
1093
|
+
}
|
|
980
1094
|
}
|