@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
|
@@ -218,7 +218,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
218
218
|
return favouritesMenuItems;
|
|
219
219
|
}(favouritesMenuItems || {});
|
|
220
220
|
const tilesPanelName = "sap.cux.home.TilesPanel";
|
|
221
|
-
const
|
|
221
|
+
const tilesContainerName = "sap.cux.home.TilesContainer";
|
|
222
222
|
const sortedMenuItems = [favouritesMenuItems.CREATE_GROUP, favouritesMenuItems.ADD_APPS, favouritesMenuItems.ADD_FROM_INSIGHTS, "settings"];
|
|
223
223
|
|
|
224
224
|
/**
|
|
@@ -270,7 +270,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
270
270
|
constructor: function _constructor(id, settings) {
|
|
271
271
|
BaseAppPersPanel.prototype.constructor.call(this, id, settings);
|
|
272
272
|
this._selectedApps = [];
|
|
273
|
-
this._isInitialLoad = true;
|
|
274
273
|
/**
|
|
275
274
|
* Updates the color personalization for an app.
|
|
276
275
|
* @param {IAppPersonalization[]} personalizations - The array of app personalizations.
|
|
@@ -538,13 +537,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
538
537
|
try {
|
|
539
538
|
const _this5 = this;
|
|
540
539
|
return Promise.resolve(_this5.appManagerInstance.fetchFavVizs(true, false)).then(function (favoriteVisualizations) {
|
|
541
|
-
function _temp9() {
|
|
542
|
-
if (checkPanelExists(container, insightsConatinerlName, tilesPanelName)) {
|
|
543
|
-
_this5._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
544
|
-
}
|
|
545
|
-
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
546
|
-
container._updateContainerHeader(container);
|
|
547
|
-
}
|
|
548
540
|
const isPhone = _this5.getDeviceType() === DeviceType.Mobile;
|
|
549
541
|
//Create groups
|
|
550
542
|
_this5.destroyAggregation("groups", true);
|
|
@@ -572,12 +564,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
572
564
|
}
|
|
573
565
|
const container = _this5.getParent();
|
|
574
566
|
container.toggleMenuListItem(_this5._createGroupMenuItem, _this5.getApps().length > 0);
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
567
|
+
if (!isPhone) {
|
|
568
|
+
_this5._switchToRecommendedIfNoFavApps(apps, groups);
|
|
569
|
+
}
|
|
570
|
+
if (checkPanelExists(container, tilesContainerName, tilesPanelName)) {
|
|
571
|
+
_this5._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
572
|
+
}
|
|
573
|
+
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
574
|
+
container._updateContainerHeader(container);
|
|
581
575
|
});
|
|
582
576
|
} catch (e) {
|
|
583
577
|
return Promise.reject(e);
|
|
@@ -592,23 +586,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
592
586
|
* @param {Group[]} groups - The list of favorite app groups.
|
|
593
587
|
*/
|
|
594
588
|
_switchToRecommendedIfNoFavApps: function _switchToRecommendedIfNoFavApps(apps, groups) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
589
|
+
const container = this.getParent();
|
|
590
|
+
const panels = container.getContent();
|
|
591
|
+
const recommendedPanel = panels ? panels.find(panel => panel instanceof RecommendedAppPanel) : null;
|
|
592
|
+
if (recommendedPanel) {
|
|
593
|
+
recommendedPanel.attachEventOnce("supported", function (event) {
|
|
594
|
+
try {
|
|
595
|
+
const isSupported = event.getParameter("isSupported");
|
|
596
|
+
const _temp8 = function () {
|
|
597
|
+
if ([...apps, ...groups].length === 0 && isSupported) {
|
|
598
|
+
container.setProperty?.("selectedKey", "recommendedApps");
|
|
599
|
+
return Promise.resolve(container.refreshPanel(recommendedPanel)).then(function () {});
|
|
600
|
+
}
|
|
601
|
+
}();
|
|
602
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
|
|
603
|
+
} catch (e) {
|
|
604
|
+
return Promise.reject(e);
|
|
607
605
|
}
|
|
608
|
-
}
|
|
609
|
-
return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
|
|
610
|
-
} catch (e) {
|
|
611
|
-
return Promise.reject(e);
|
|
606
|
+
});
|
|
612
607
|
}
|
|
613
608
|
},
|
|
614
609
|
/**
|
|
@@ -847,15 +842,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
847
842
|
*/
|
|
848
843
|
_getDragDropInfo: function _getDragDropInfo(event, appGroupId) {
|
|
849
844
|
try {
|
|
850
|
-
const
|
|
845
|
+
const _this6 = this;
|
|
851
846
|
const dragTile = event.getParameter?.("draggedControl"),
|
|
852
847
|
dropTile = event.getParameter?.("droppedControl"),
|
|
853
848
|
dropPosition = event.getParameter?.("dropPosition"),
|
|
854
849
|
dropControl = dragTile.getParent(),
|
|
855
850
|
dragItemIndex = dropControl.indexOfItem(dragTile),
|
|
856
851
|
dropItemIndex = dropControl.indexOfItem(dropTile),
|
|
857
|
-
dragItem =
|
|
858
|
-
dropItem =
|
|
852
|
+
dragItem = _this6._getTileItem(dragTile, appGroupId),
|
|
853
|
+
dropItem = _this6._getTileItem(dropTile, appGroupId);
|
|
859
854
|
const dragDropInfo = {
|
|
860
855
|
dragItem: dragItem,
|
|
861
856
|
dropItem: dropItem,
|
|
@@ -865,24 +860,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
865
860
|
dropItemIndex
|
|
866
861
|
};
|
|
867
862
|
//adjust drap drop info
|
|
868
|
-
const
|
|
863
|
+
const _temp1 = function () {
|
|
869
864
|
if (dragItemIndex !== dropItemIndex) {
|
|
870
|
-
const
|
|
865
|
+
const _temp0 = function () {
|
|
871
866
|
if (!(dragItem instanceof Group) && !(dropItem instanceof Group)) {
|
|
872
|
-
return Promise.resolve(
|
|
867
|
+
return Promise.resolve(_this6._adjustAppDragDropInfo(dragDropInfo, appGroupId)).then(function () {});
|
|
873
868
|
} else {
|
|
874
|
-
const
|
|
869
|
+
const _temp9 = function () {
|
|
875
870
|
if (dragItem instanceof Group) {
|
|
876
|
-
return Promise.resolve(
|
|
871
|
+
return Promise.resolve(_this6._adjustGroupDragDropInfo(dragDropInfo)).then(function () {});
|
|
877
872
|
}
|
|
878
873
|
}();
|
|
879
|
-
if (
|
|
874
|
+
if (_temp9 && _temp9.then) return _temp9.then(function () {});
|
|
880
875
|
}
|
|
881
876
|
}();
|
|
882
|
-
if (
|
|
877
|
+
if (_temp0 && _temp0.then) return _temp0.then(function () {});
|
|
883
878
|
}
|
|
884
879
|
}();
|
|
885
|
-
return Promise.resolve(
|
|
880
|
+
return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {
|
|
886
881
|
return dragDropInfo;
|
|
887
882
|
}) : dragDropInfo);
|
|
888
883
|
} catch (e) {
|
|
@@ -897,11 +892,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
897
892
|
*/
|
|
898
893
|
_adjustAppDragDropInfo: function _adjustAppDragDropInfo(dragDropInfo, appGroupId) {
|
|
899
894
|
try {
|
|
900
|
-
const
|
|
895
|
+
const _this7 = this;
|
|
901
896
|
let isUpdated = false;
|
|
902
897
|
const dragApp = dragDropInfo.dragItem;
|
|
903
898
|
const dropApp = dragDropInfo.dropItem;
|
|
904
|
-
return Promise.resolve(Promise.all([
|
|
899
|
+
return Promise.resolve(Promise.all([_this7.appManagerInstance.getVisualization(dragApp.getUrl(), appGroupId), _this7.appManagerInstance.getVisualization(dropApp.getUrl(), appGroupId)])).then(function ([dragVisualization, dropVisualization]) {
|
|
905
900
|
if (dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before) {
|
|
906
901
|
//let's say there are two apps a1, a2, if a1 is moved before a2, that essentailly means the drop item index is same as current item index, adjust the dropItemIndex accordingly
|
|
907
902
|
if (dragDropInfo.dragItemIndex === dragDropInfo.dropItemIndex - 1) {
|
|
@@ -922,7 +917,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
922
917
|
}
|
|
923
918
|
if (isUpdated) {
|
|
924
919
|
const tile = dragDropInfo.dropControl.getItems()[dragDropInfo.dropItemIndex];
|
|
925
|
-
const app =
|
|
920
|
+
const app = _this7._getTileItem(tile, appGroupId);
|
|
926
921
|
if (app) {
|
|
927
922
|
dragDropInfo.dropItem = app;
|
|
928
923
|
}
|
|
@@ -951,14 +946,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
951
946
|
*/
|
|
952
947
|
_adjustGroupDragDropInfo: function _adjustGroupDragDropInfo(dragDropInfo) {
|
|
953
948
|
try {
|
|
954
|
-
const
|
|
955
|
-
return Promise.resolve(
|
|
949
|
+
const _this8 = this;
|
|
950
|
+
return Promise.resolve(_this8.appManagerInstance._getSections()).then(function (sections) {
|
|
956
951
|
let dropGroupIndex;
|
|
957
952
|
dragDropInfo.dragItemIndex = sections.findIndex(section => section.id === dragDropInfo.dragItem.getGroupId());
|
|
958
953
|
|
|
959
954
|
//If dropped app is the first ungrouped app, put the group at the end
|
|
960
955
|
if (!(dragDropInfo.dropItem instanceof Group)) {
|
|
961
|
-
const lastGroupIndex =
|
|
956
|
+
const lastGroupIndex = _this8.getAggregation("groups").length;
|
|
962
957
|
dragDropInfo.dropItemIndex = dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before && dragDropInfo.dropItemIndex === lastGroupIndex && dragDropInfo.dragItemIndex !== lastGroupIndex ? lastGroupIndex + 1 : dragDropInfo.dragItemIndex;
|
|
963
958
|
} else {
|
|
964
959
|
dropGroupIndex = sections.findIndex(section => section.id === dragDropInfo.dropItem.getGroupId());
|
|
@@ -985,10 +980,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
985
980
|
*/
|
|
986
981
|
_onFavItemDrop: function _onFavItemDrop(event, appGroupId) {
|
|
987
982
|
try {
|
|
988
|
-
const
|
|
983
|
+
const _this9 = this;
|
|
989
984
|
const dragTile = event.getParameter?.("draggedControl");
|
|
990
|
-
return Promise.resolve(
|
|
991
|
-
function
|
|
985
|
+
return Promise.resolve(_this9._getDragDropInfo(event, appGroupId)).then(function (dragDropInfo) {
|
|
986
|
+
function _temp12() {
|
|
992
987
|
dragTile.removeStyleClass("sapMGTPressActive");
|
|
993
988
|
}
|
|
994
989
|
const {
|
|
@@ -999,29 +994,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
999
994
|
dropItem
|
|
1000
995
|
} = dragDropInfo;
|
|
1001
996
|
if (dragItemIndex === dropItemIndex) return;
|
|
1002
|
-
const
|
|
997
|
+
const _temp11 = function () {
|
|
1003
998
|
if (dropPosition === dnd.RelativeDropPosition.On) {
|
|
1004
|
-
return Promise.resolve(
|
|
1005
|
-
void
|
|
999
|
+
return Promise.resolve(_this9._handleOnItemDrop(dragItem, dropItem)).then(function () {
|
|
1000
|
+
void _this9.refresh();
|
|
1006
1001
|
});
|
|
1007
1002
|
} else {
|
|
1008
|
-
const
|
|
1003
|
+
const _temp10 = function () {
|
|
1009
1004
|
if (dropPosition === dnd.RelativeDropPosition.After || dropPosition === dnd.RelativeDropPosition.Before) {
|
|
1010
|
-
|
|
1011
|
-
return Promise.resolve(
|
|
1012
|
-
return Promise.resolve(
|
|
1005
|
+
_this9._setBusy(true);
|
|
1006
|
+
return Promise.resolve(_this9._handleItemsReorder(dragDropInfo, appGroupId)).then(function () {
|
|
1007
|
+
return Promise.resolve(_this9.refresh()).then(function () {
|
|
1013
1008
|
if (appGroupId) {
|
|
1014
|
-
void
|
|
1009
|
+
void _this9._setGroupDetailDialogApps(appGroupId);
|
|
1015
1010
|
}
|
|
1016
|
-
|
|
1011
|
+
_this9._setBusy(false);
|
|
1017
1012
|
});
|
|
1018
1013
|
});
|
|
1019
1014
|
}
|
|
1020
1015
|
}();
|
|
1021
|
-
if (
|
|
1016
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
1022
1017
|
}
|
|
1023
1018
|
}();
|
|
1024
|
-
return
|
|
1019
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
1025
1020
|
});
|
|
1026
1021
|
} catch (e) {
|
|
1027
1022
|
return Promise.reject(e);
|
|
@@ -1038,25 +1033,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1038
1033
|
*/
|
|
1039
1034
|
_handleOnItemDrop: function _handleOnItemDrop(dragItem, dropItem) {
|
|
1040
1035
|
try {
|
|
1041
|
-
const
|
|
1036
|
+
const _this0 = this;
|
|
1042
1037
|
if (dragItem instanceof Group) return Promise.resolve();
|
|
1043
|
-
const
|
|
1038
|
+
const _temp13 = function () {
|
|
1044
1039
|
if (!(dropItem instanceof Group)) {
|
|
1045
1040
|
//if both dragged and dropped items are apps, create group dialog is opened.
|
|
1046
1041
|
const dragApp = dragItem;
|
|
1047
1042
|
const dropApp = dropItem;
|
|
1048
|
-
|
|
1049
|
-
|
|
1043
|
+
_this0._selectedApps = [dragApp, dropApp];
|
|
1044
|
+
_this0._openCreateGroupDialog(true);
|
|
1050
1045
|
} else {
|
|
1051
1046
|
//if dragged item is an app and dropped item is a group, app should be moved into that group.
|
|
1052
1047
|
const targetGroupId = dropItem.getGroupId();
|
|
1053
|
-
|
|
1054
|
-
return Promise.resolve(
|
|
1055
|
-
|
|
1048
|
+
_this0._setBusy(true);
|
|
1049
|
+
return Promise.resolve(_this0._handleMoveToGroup(dragItem, undefined, targetGroupId)).then(function () {
|
|
1050
|
+
_this0._setBusy(false);
|
|
1056
1051
|
});
|
|
1057
1052
|
}
|
|
1058
1053
|
}();
|
|
1059
|
-
return Promise.resolve(
|
|
1054
|
+
return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
|
|
1060
1055
|
} catch (e) {
|
|
1061
1056
|
return Promise.reject(e);
|
|
1062
1057
|
}
|
|
@@ -1069,7 +1064,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1069
1064
|
*/
|
|
1070
1065
|
_handleItemsReorder: function _handleItemsReorder(dragDropInfo, appGroupId) {
|
|
1071
1066
|
try {
|
|
1072
|
-
const
|
|
1067
|
+
const _this1 = this;
|
|
1073
1068
|
const {
|
|
1074
1069
|
dragItem,
|
|
1075
1070
|
dropItem,
|
|
@@ -1078,12 +1073,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1078
1073
|
} = dragDropInfo;
|
|
1079
1074
|
const isDragItemGroup = dragItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1080
1075
|
const isDropItemGroup = dropItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1081
|
-
const
|
|
1076
|
+
const _temp15 = function () {
|
|
1082
1077
|
if (!isDragItemGroup && !isDropItemGroup) {
|
|
1083
1078
|
const drapApp = dragItem;
|
|
1084
1079
|
const dropApp = dropItem;
|
|
1085
|
-
return Promise.resolve(Promise.all([
|
|
1086
|
-
return Promise.resolve(
|
|
1080
|
+
return Promise.resolve(Promise.all([_this1.appManagerInstance.getVisualization(drapApp.getUrl(), appGroupId), _this1.appManagerInstance.getVisualization(dropApp.getUrl(), appGroupId)])).then(function ([dragVisualization, dropVisualization]) {
|
|
1081
|
+
return Promise.resolve(_this1.appManagerInstance.moveVisualization({
|
|
1087
1082
|
sourceSectionIndex: dragVisualization?.persConfig?.sectionIndex,
|
|
1088
1083
|
sourceVisualizationIndex: dragVisualization?.persConfig?.visualizationIndex,
|
|
1089
1084
|
targetSectionIndex: dropVisualization?.persConfig?.sectionIndex,
|
|
@@ -1091,15 +1086,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1091
1086
|
})).then(function () {});
|
|
1092
1087
|
});
|
|
1093
1088
|
} else {
|
|
1094
|
-
const
|
|
1089
|
+
const _temp14 = function () {
|
|
1095
1090
|
if (isDragItemGroup && isDropItemGroup) {
|
|
1096
|
-
return Promise.resolve(
|
|
1091
|
+
return Promise.resolve(_this1.appManagerInstance.moveSection(dragItemIndex, dropItemIndex)).then(function () {});
|
|
1097
1092
|
}
|
|
1098
1093
|
}();
|
|
1099
|
-
if (
|
|
1094
|
+
if (_temp14 && _temp14.then) return _temp14.then(function () {});
|
|
1100
1095
|
}
|
|
1101
1096
|
}();
|
|
1102
|
-
return Promise.resolve(
|
|
1097
|
+
return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
|
|
1103
1098
|
} catch (e) {
|
|
1104
1099
|
return Promise.reject(e);
|
|
1105
1100
|
}
|
|
@@ -1504,49 +1499,49 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1504
1499
|
*/
|
|
1505
1500
|
_onPressGroupCreate: function _onPressGroupCreate() {
|
|
1506
1501
|
try {
|
|
1507
|
-
const
|
|
1508
|
-
const groupNameInput =
|
|
1509
|
-
const
|
|
1510
|
-
if (
|
|
1511
|
-
const
|
|
1512
|
-
if (
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1502
|
+
const _this10 = this;
|
|
1503
|
+
const groupNameInput = _this10._controlMap.get(`${_this10.getId()}-createGroupDialog-mainPage-form-groupName-input`);
|
|
1504
|
+
const _temp18 = function () {
|
|
1505
|
+
if (_this10._validateGroupName()) {
|
|
1506
|
+
const _temp17 = function () {
|
|
1507
|
+
if (_this10._selectedApps?.length) {
|
|
1508
|
+
_this10._setBusy(true);
|
|
1509
|
+
const _temp16 = _finallyRethrows(function () {
|
|
1515
1510
|
return _catch(function () {
|
|
1516
|
-
return Promise.resolve(
|
|
1517
|
-
selectedApps:
|
|
1511
|
+
return Promise.resolve(_this10._createGroup({
|
|
1512
|
+
selectedApps: _this10._selectedApps,
|
|
1518
1513
|
groupName: groupNameInput.getValue(),
|
|
1519
|
-
groupColor:
|
|
1514
|
+
groupColor: _this10._getGroupColor()
|
|
1520
1515
|
})).then(function () {
|
|
1521
|
-
return Promise.resolve(
|
|
1516
|
+
return Promise.resolve(_this10.refresh()).then(function () {
|
|
1522
1517
|
// Show toast message after successful group creation
|
|
1523
|
-
MessageToast.show(
|
|
1524
|
-
of:
|
|
1518
|
+
MessageToast.show(_this10._i18nBundle.getText("newGroupCreated"), {
|
|
1519
|
+
of: _this10._controlMap.get(`${_this10.getId()}-createGroupDialog`),
|
|
1525
1520
|
offset: "0 80"
|
|
1526
1521
|
});
|
|
1527
|
-
const groups =
|
|
1528
|
-
void
|
|
1522
|
+
const groups = _this10.getAggregation("groups") || [];
|
|
1523
|
+
void _this10._showGroupDetailDialog(groups[0]?.getGroupId());
|
|
1529
1524
|
});
|
|
1530
1525
|
});
|
|
1531
1526
|
}, function (err) {
|
|
1532
1527
|
Log.error(err);
|
|
1533
|
-
MessageToast.show(
|
|
1528
|
+
MessageToast.show(_this10._i18nBundle.getText("unableToCreateGroup"));
|
|
1534
1529
|
});
|
|
1535
1530
|
}, function (_wasThrown, _result2) {
|
|
1536
|
-
|
|
1537
|
-
|
|
1531
|
+
_this10._setBusy(false);
|
|
1532
|
+
_this10._closeCreateGroupDialog();
|
|
1538
1533
|
if (_wasThrown) throw _result2;
|
|
1539
1534
|
return _result2;
|
|
1540
1535
|
});
|
|
1541
|
-
if (
|
|
1536
|
+
if (_temp16 && _temp16.then) return _temp16.then(function () {});
|
|
1542
1537
|
} else {
|
|
1543
|
-
|
|
1538
|
+
_this10._setNoAppsSelectedError(true);
|
|
1544
1539
|
}
|
|
1545
1540
|
}();
|
|
1546
|
-
if (
|
|
1541
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
|
1547
1542
|
}
|
|
1548
1543
|
}();
|
|
1549
|
-
return Promise.resolve(
|
|
1544
|
+
return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(function () {}) : void 0);
|
|
1550
1545
|
} catch (e) {
|
|
1551
1546
|
return Promise.reject(e);
|
|
1552
1547
|
}
|
|
@@ -1561,13 +1556,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1561
1556
|
*/
|
|
1562
1557
|
_createGroup: function _createGroup(params) {
|
|
1563
1558
|
try {
|
|
1564
|
-
const
|
|
1559
|
+
const _this11 = this;
|
|
1565
1560
|
const {
|
|
1566
1561
|
selectedApps,
|
|
1567
1562
|
groupName,
|
|
1568
1563
|
groupColor
|
|
1569
1564
|
} = params;
|
|
1570
|
-
return Promise.resolve(
|
|
1565
|
+
return Promise.resolve(_this11.appManagerInstance.getSectionVisualizations()).then(function (sectionVisualizations) {
|
|
1571
1566
|
const visualizations = selectedApps.reduce((selectedVisualizations, oApp) => {
|
|
1572
1567
|
const sectionVisualization = sectionVisualizations.find(oSectionViz => oSectionViz.url === oApp.getUrl());
|
|
1573
1568
|
if (sectionVisualization) {
|
|
@@ -1576,10 +1571,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1576
1571
|
return selectedVisualizations;
|
|
1577
1572
|
}, []);
|
|
1578
1573
|
const sectionId = visualizations[0].persConfig.sectionId;
|
|
1579
|
-
return Promise.resolve(
|
|
1574
|
+
return Promise.resolve(_this11.appManagerInstance.addSection({
|
|
1580
1575
|
sectionIndex: 1,
|
|
1581
1576
|
sectionProperties: {
|
|
1582
|
-
title: groupName ||
|
|
1577
|
+
title: groupName || _this11._i18nBundle.getText("newGroup"),
|
|
1583
1578
|
visible: true,
|
|
1584
1579
|
visualizations: visualizations.map(viz => viz.visualization)
|
|
1585
1580
|
}
|
|
@@ -1591,21 +1586,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1591
1586
|
}
|
|
1592
1587
|
return visualizationsToBeDeleted;
|
|
1593
1588
|
}, []);
|
|
1594
|
-
return Promise.resolve(
|
|
1589
|
+
return Promise.resolve(_this11.appManagerInstance.removeVisualizations({
|
|
1595
1590
|
sectionId,
|
|
1596
1591
|
vizIds: visualizationsToBeDeleted
|
|
1597
1592
|
})).then(function () {
|
|
1598
|
-
return Promise.resolve(
|
|
1593
|
+
return Promise.resolve(_this11.appManagerInstance._getSections(true)).then(function (sections) {
|
|
1599
1594
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
1600
1595
|
const targetGroupId = sections[defaultSection ? 1 : 0]?.id;
|
|
1601
1596
|
//update personalization
|
|
1602
|
-
return Promise.resolve(
|
|
1597
|
+
return Promise.resolve(_this11._updateAppPersonalization(visualizations.map(oViz => {
|
|
1603
1598
|
return {
|
|
1604
1599
|
visualization: oViz,
|
|
1605
1600
|
targetGroupId
|
|
1606
1601
|
};
|
|
1607
1602
|
}))).then(function () {
|
|
1608
|
-
return Promise.resolve(
|
|
1603
|
+
return Promise.resolve(_this11._updateGroupPersonalization(targetGroupId, groupColor)).then(function () {});
|
|
1609
1604
|
});
|
|
1610
1605
|
});
|
|
1611
1606
|
});
|
|
@@ -1665,44 +1660,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1665
1660
|
*/
|
|
1666
1661
|
_handleColorSelect: function _handleColorSelect(item, color) {
|
|
1667
1662
|
try {
|
|
1668
|
-
const
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1663
|
+
const _this12 = this;
|
|
1664
|
+
function _temp20() {
|
|
1665
|
+
_this12.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1671
1666
|
item,
|
|
1672
1667
|
color
|
|
1673
1668
|
});
|
|
1674
1669
|
}
|
|
1675
|
-
const selectedColor =
|
|
1670
|
+
const selectedColor = _this12._getLegendColor(color).key;
|
|
1676
1671
|
item.setProperty("bgColor", selectedColor, true);
|
|
1677
1672
|
const groupId = item instanceof Group ? item.getGroupId() : null;
|
|
1678
1673
|
const isGroupedApp = !groupId && item.getParent() instanceof Group;
|
|
1679
1674
|
|
|
1680
1675
|
//update tile color
|
|
1681
1676
|
if (isGroupedApp) {
|
|
1682
|
-
|
|
1677
|
+
_this12._refreshGroupDetailDialog(item, false);
|
|
1683
1678
|
} else {
|
|
1684
1679
|
//if ungroup app or group
|
|
1685
|
-
|
|
1686
|
-
|
|
1680
|
+
_this12._applyUngroupedTileColor(item, color);
|
|
1681
|
+
_this12.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1687
1682
|
item,
|
|
1688
1683
|
color
|
|
1689
1684
|
});
|
|
1690
1685
|
}
|
|
1691
1686
|
|
|
1692
1687
|
//update personalization
|
|
1693
|
-
const
|
|
1688
|
+
const _temp19 = function () {
|
|
1694
1689
|
if (groupId) {
|
|
1695
1690
|
//if group
|
|
1696
|
-
void
|
|
1697
|
-
const groupIconControl =
|
|
1691
|
+
void _this12._updateGroupPersonalization(groupId, selectedColor);
|
|
1692
|
+
const groupIconControl = _this12._controlMap.get(`${_this12.getId()}-detailDialog-toolbar-color`);
|
|
1698
1693
|
groupIconControl?.setColor(color);
|
|
1699
1694
|
} else {
|
|
1700
1695
|
//if app
|
|
1701
1696
|
const app = item;
|
|
1702
1697
|
const groupId = isGroupedApp ? app.getParent().getGroupId() : undefined;
|
|
1703
|
-
return Promise.resolve(
|
|
1698
|
+
return Promise.resolve(_this12.appManagerInstance.getVisualization(app.getUrl(), groupId)).then(function (visualization) {
|
|
1704
1699
|
if (visualization) {
|
|
1705
|
-
void
|
|
1700
|
+
void _this12._updateAppPersonalization([{
|
|
1706
1701
|
visualization,
|
|
1707
1702
|
color: selectedColor
|
|
1708
1703
|
}]);
|
|
@@ -1710,7 +1705,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1710
1705
|
});
|
|
1711
1706
|
}
|
|
1712
1707
|
}();
|
|
1713
|
-
return Promise.resolve(
|
|
1708
|
+
return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
|
|
1714
1709
|
} catch (e) {
|
|
1715
1710
|
return Promise.reject(e);
|
|
1716
1711
|
}
|
|
@@ -1784,7 +1779,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1784
1779
|
* @private
|
|
1785
1780
|
*/
|
|
1786
1781
|
_handleRemove: function _handleRemove(app, group) {
|
|
1787
|
-
const
|
|
1782
|
+
const _this13 = this;
|
|
1788
1783
|
const lastAppInGroup = group?.getApps()?.length === 1;
|
|
1789
1784
|
let message = this._i18nBundle.getText("removeAppMessage", [app.getTitle()]),
|
|
1790
1785
|
title = this._i18nBundle.getText("remove"),
|
|
@@ -1803,34 +1798,34 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1803
1798
|
emphasizedAction: actionText,
|
|
1804
1799
|
onClose: function (action) {
|
|
1805
1800
|
try {
|
|
1806
|
-
const
|
|
1801
|
+
const _temp22 = function () {
|
|
1807
1802
|
if (action === actionText) {
|
|
1808
|
-
|
|
1809
|
-
const
|
|
1803
|
+
_this13._setBusy(true);
|
|
1804
|
+
const _temp21 = _finallyRethrows(function () {
|
|
1810
1805
|
return _catch(function () {
|
|
1811
|
-
return Promise.resolve(
|
|
1806
|
+
return Promise.resolve(_this13._removeApp(app, group)).then(function () {
|
|
1812
1807
|
if (lastAppInGroup) {
|
|
1813
|
-
|
|
1808
|
+
_this13._closeGroupDetailDialog();
|
|
1814
1809
|
} else if (group) {
|
|
1815
|
-
|
|
1810
|
+
_this13._refreshGroupDetailDialog(app);
|
|
1816
1811
|
}
|
|
1817
|
-
return Promise.resolve(
|
|
1818
|
-
MessageToast.show(
|
|
1812
|
+
return Promise.resolve(_this13.getParent()._refreshAllPanels()).then(function () {
|
|
1813
|
+
MessageToast.show(_this13._i18nBundle.getText("appRemoved"));
|
|
1819
1814
|
});
|
|
1820
1815
|
});
|
|
1821
1816
|
}, function (err) {
|
|
1822
1817
|
Log.error(err);
|
|
1823
|
-
MessageToast.show(
|
|
1818
|
+
MessageToast.show(_this13._i18nBundle.getText("unableToRemoveApp"));
|
|
1824
1819
|
});
|
|
1825
1820
|
}, function (_wasThrown2, _result3) {
|
|
1826
|
-
|
|
1821
|
+
_this13._setBusy(false);
|
|
1827
1822
|
if (_wasThrown2) throw _result3;
|
|
1828
1823
|
return _result3;
|
|
1829
1824
|
});
|
|
1830
|
-
if (
|
|
1825
|
+
if (_temp21 && _temp21.then) return _temp21.then(function () {});
|
|
1831
1826
|
}
|
|
1832
1827
|
}();
|
|
1833
|
-
return Promise.resolve(
|
|
1828
|
+
return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(function () {}) : void 0);
|
|
1834
1829
|
} catch (e) {
|
|
1835
1830
|
return Promise.reject(e);
|
|
1836
1831
|
}
|
|
@@ -1848,28 +1843,28 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1848
1843
|
*/
|
|
1849
1844
|
_removeApp: function _removeApp(app, group) {
|
|
1850
1845
|
try {
|
|
1851
|
-
const
|
|
1846
|
+
const _this14 = this;
|
|
1852
1847
|
const lastAppInGroup = group?.getApps()?.length === 1,
|
|
1853
1848
|
groupId = group?.getGroupId(),
|
|
1854
1849
|
appId = app.getUrl();
|
|
1855
|
-
return Promise.resolve(
|
|
1856
|
-
const
|
|
1850
|
+
return Promise.resolve(_this14.appManagerInstance.getVisualization(appId, groupId)).then(function (viz) {
|
|
1851
|
+
const _temp24 = function () {
|
|
1857
1852
|
if (lastAppInGroup) {
|
|
1858
1853
|
//if last app in group, then delete the group as well
|
|
1859
|
-
return Promise.resolve(
|
|
1854
|
+
return Promise.resolve(_this14._deleteGroup(groupId)).then(function () {});
|
|
1860
1855
|
} else {
|
|
1861
1856
|
let visualizationsToBeDeleted = [viz?.visualization?.id];
|
|
1862
1857
|
if (!groupId) {
|
|
1863
1858
|
//for apps outside group i.e. for favorite apps delete duplicate apps as well
|
|
1864
1859
|
visualizationsToBeDeleted = visualizationsToBeDeleted.concat(viz?.persConfig?.duplicateApps?.map(viz => viz.visualization?.id));
|
|
1865
1860
|
}
|
|
1866
|
-
const
|
|
1861
|
+
const _temp23 = function () {
|
|
1867
1862
|
if (viz?.persConfig?.sectionId && visualizationsToBeDeleted.length > 0) {
|
|
1868
|
-
return Promise.resolve(
|
|
1863
|
+
return Promise.resolve(_this14.appManagerInstance.removeVisualizations({
|
|
1869
1864
|
sectionId: viz.persConfig.sectionId,
|
|
1870
1865
|
vizIds: visualizationsToBeDeleted
|
|
1871
1866
|
})).then(function () {
|
|
1872
|
-
void
|
|
1867
|
+
void _this14._deletePersonalization({
|
|
1873
1868
|
appId: appId,
|
|
1874
1869
|
oldAppId: viz?.oldAppId,
|
|
1875
1870
|
sectionId: viz?.persConfig?.sectionId,
|
|
@@ -1878,10 +1873,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1878
1873
|
});
|
|
1879
1874
|
}
|
|
1880
1875
|
}();
|
|
1881
|
-
if (
|
|
1876
|
+
if (_temp23 && _temp23.then) return _temp23.then(function () {});
|
|
1882
1877
|
}
|
|
1883
1878
|
}();
|
|
1884
|
-
if (
|
|
1879
|
+
if (_temp24 && _temp24.then) return _temp24.then(function () {});
|
|
1885
1880
|
});
|
|
1886
1881
|
} catch (e) {
|
|
1887
1882
|
return Promise.reject(e);
|
|
@@ -1896,13 +1891,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1896
1891
|
*/
|
|
1897
1892
|
_handleMoveToGroup: function _handleMoveToGroup(app, sourceGroupId, targetGroupId) {
|
|
1898
1893
|
try {
|
|
1899
|
-
const
|
|
1900
|
-
const sourceGroup = sourceGroupId ?
|
|
1894
|
+
const _this15 = this;
|
|
1895
|
+
const sourceGroup = sourceGroupId ? _this15._getGroup(sourceGroupId) : undefined,
|
|
1901
1896
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1902
|
-
const
|
|
1897
|
+
const _temp25 = function () {
|
|
1903
1898
|
if (isLastAppInGroup) {
|
|
1904
|
-
const confirmationMessage =
|
|
1905
|
-
const confirmationTitle =
|
|
1899
|
+
const confirmationMessage = _this15._i18nBundle.getText("moveAppMessage", [app.getTitle()]);
|
|
1900
|
+
const confirmationTitle = _this15._i18nBundle.getText("delete");
|
|
1906
1901
|
MessageBox.show(confirmationMessage, {
|
|
1907
1902
|
icon: MessageBox.Icon.WARNING,
|
|
1908
1903
|
title: confirmationTitle,
|
|
@@ -1910,15 +1905,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1910
1905
|
emphasizedAction: confirmationTitle,
|
|
1911
1906
|
onClose: action => {
|
|
1912
1907
|
if (action === confirmationTitle) {
|
|
1913
|
-
void
|
|
1908
|
+
void _this15._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId);
|
|
1914
1909
|
}
|
|
1915
1910
|
}
|
|
1916
1911
|
});
|
|
1917
1912
|
} else {
|
|
1918
|
-
return Promise.resolve(
|
|
1913
|
+
return Promise.resolve(_this15._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId)).then(function () {});
|
|
1919
1914
|
}
|
|
1920
1915
|
}();
|
|
1921
|
-
return Promise.resolve(
|
|
1916
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(function () {}) : void 0);
|
|
1922
1917
|
} catch (e) {
|
|
1923
1918
|
return Promise.reject(e);
|
|
1924
1919
|
}
|
|
@@ -1933,41 +1928,41 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1933
1928
|
*/
|
|
1934
1929
|
_moveAppAndHandleGroupChanges: function _moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId) {
|
|
1935
1930
|
try {
|
|
1936
|
-
const
|
|
1937
|
-
const sourceGroup = sourceGroupId ?
|
|
1938
|
-
targetGroup = targetGroupId ?
|
|
1931
|
+
const _this16 = this;
|
|
1932
|
+
const sourceGroup = sourceGroupId ? _this16._getGroup(sourceGroupId) : null,
|
|
1933
|
+
targetGroup = targetGroupId ? _this16._getGroup(targetGroupId) : null,
|
|
1939
1934
|
sTargetGroupTile = targetGroup?.getTitle(),
|
|
1940
1935
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1941
|
-
const
|
|
1936
|
+
const _temp28 = _finallyRethrows(function () {
|
|
1942
1937
|
return _catch(function () {
|
|
1943
|
-
|
|
1944
|
-
return Promise.resolve(
|
|
1945
|
-
function
|
|
1946
|
-
const sMsg = sTargetGroupTile ?
|
|
1938
|
+
_this16._setBusy(true);
|
|
1939
|
+
return Promise.resolve(_this16._moveAppToGroup(app, sourceGroupId, targetGroupId)).then(function () {
|
|
1940
|
+
function _temp27() {
|
|
1941
|
+
const sMsg = sTargetGroupTile ? _this16._i18nBundle.getText("appMoved", [sTargetGroupTile]) : _this16._i18nBundle.getText("appUngrouped");
|
|
1947
1942
|
MessageToast.show(sMsg);
|
|
1948
|
-
return Promise.resolve(
|
|
1943
|
+
return Promise.resolve(_this16.refresh()).then(function () {});
|
|
1949
1944
|
}
|
|
1950
|
-
const
|
|
1945
|
+
const _temp26 = function () {
|
|
1951
1946
|
if (isLastAppInGroup) {
|
|
1952
|
-
return Promise.resolve(
|
|
1953
|
-
|
|
1947
|
+
return Promise.resolve(_this16._deleteGroup(sourceGroupId)).then(function () {
|
|
1948
|
+
_this16._closeGroupDetailDialog();
|
|
1954
1949
|
});
|
|
1955
1950
|
} else if (sourceGroupId) {
|
|
1956
|
-
|
|
1951
|
+
_this16._refreshGroupDetailDialog(app);
|
|
1957
1952
|
}
|
|
1958
1953
|
}();
|
|
1959
1954
|
//delete group, if it is the last app in the group
|
|
1960
|
-
return
|
|
1955
|
+
return _temp26 && _temp26.then ? _temp26.then(_temp27) : _temp27(_temp26);
|
|
1961
1956
|
});
|
|
1962
1957
|
}, function (error) {
|
|
1963
1958
|
Log.error(error);
|
|
1964
1959
|
});
|
|
1965
1960
|
}, function (_wasThrown3, _result4) {
|
|
1966
|
-
|
|
1961
|
+
_this16._setBusy(false);
|
|
1967
1962
|
if (_wasThrown3) throw _result4;
|
|
1968
1963
|
return _result4;
|
|
1969
1964
|
});
|
|
1970
|
-
return Promise.resolve(
|
|
1965
|
+
return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(function () {}) : void 0);
|
|
1971
1966
|
} catch (e) {
|
|
1972
1967
|
return Promise.reject(e);
|
|
1973
1968
|
}
|
|
@@ -2011,52 +2006,52 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2011
2006
|
*/
|
|
2012
2007
|
_moveAppToGroup: function _moveAppToGroup(app, sourceGroupId, targetGroupId) {
|
|
2013
2008
|
try {
|
|
2014
|
-
const
|
|
2009
|
+
const _this17 = this;
|
|
2015
2010
|
const appId = app.getUrl();
|
|
2016
|
-
return Promise.resolve(Promise.all([
|
|
2011
|
+
return Promise.resolve(Promise.all([_this17.appManagerInstance.getSectionVisualizations(sourceGroupId), _this17.appManagerInstance._getSections()])).then(function ([visualizations, sections]) {
|
|
2017
2012
|
const sourceVisualization = visualizations.find(oViz => oViz.url === appId),
|
|
2018
2013
|
sourceVisualizationIndex = sourceVisualization?.persConfig?.visualizationIndex ?? -1,
|
|
2019
2014
|
sourceSectionIndex = sourceVisualization?.persConfig?.sectionIndex;
|
|
2020
2015
|
const isTargetGroupDefault = !targetGroupId; //if group id is not passed, then we consider it as default section
|
|
2021
2016
|
const isSourceGroupDefault = !sourceGroupId;
|
|
2022
2017
|
const targetSectionIndex = sections.findIndex(section => !targetGroupId ? section.default : section.id === targetGroupId);
|
|
2023
|
-
const
|
|
2018
|
+
const _temp33 = function () {
|
|
2024
2019
|
if (sourceVisualization) {
|
|
2025
|
-
function
|
|
2026
|
-
return Promise.resolve(
|
|
2020
|
+
function _temp32() {
|
|
2021
|
+
return Promise.resolve(_this17.appManagerInstance._getSections(true)).then(function (sections) {
|
|
2027
2022
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
2028
|
-
return Promise.resolve(
|
|
2023
|
+
return Promise.resolve(_this17._updateAppPersonalization([{
|
|
2029
2024
|
visualization: sourceVisualization,
|
|
2030
2025
|
targetGroupId: targetGroupId ?? defaultSection?.id,
|
|
2031
2026
|
isTargetGroupDefault
|
|
2032
2027
|
}])).then(function () {});
|
|
2033
2028
|
});
|
|
2034
2029
|
}
|
|
2035
|
-
const
|
|
2030
|
+
const _temp31 = function () {
|
|
2036
2031
|
if (isTargetGroupDefault) {
|
|
2037
|
-
return Promise.resolve(
|
|
2032
|
+
return Promise.resolve(_this17._moveAppToDefaultGroup(sourceVisualization)).then(function () {});
|
|
2038
2033
|
} else {
|
|
2039
|
-
function
|
|
2040
|
-
return Promise.resolve(
|
|
2034
|
+
function _temp30() {
|
|
2035
|
+
return Promise.resolve(_this17.appManagerInstance.moveVisualization({
|
|
2041
2036
|
sourceSectionIndex: sourceSectionIndex,
|
|
2042
2037
|
sourceVisualizationIndex: sourceVisualizationIndex,
|
|
2043
2038
|
targetSectionIndex: targetSectionIndex,
|
|
2044
2039
|
targetVisualizationIndex: -1
|
|
2045
2040
|
})).then(function () {});
|
|
2046
2041
|
}
|
|
2047
|
-
const
|
|
2042
|
+
const _temp29 = function () {
|
|
2048
2043
|
if (isSourceGroupDefault) {
|
|
2049
2044
|
//remove duplicate apps
|
|
2050
|
-
return Promise.resolve(
|
|
2045
|
+
return Promise.resolve(_this17._removeDuplicateVisualizations(sourceVisualization)).then(function () {});
|
|
2051
2046
|
}
|
|
2052
2047
|
}();
|
|
2053
|
-
return
|
|
2048
|
+
return _temp29 && _temp29.then ? _temp29.then(_temp30) : _temp30(_temp29);
|
|
2054
2049
|
}
|
|
2055
2050
|
}();
|
|
2056
|
-
return
|
|
2051
|
+
return _temp31 && _temp31.then ? _temp31.then(_temp32) : _temp32(_temp31);
|
|
2057
2052
|
}
|
|
2058
2053
|
}();
|
|
2059
|
-
if (
|
|
2054
|
+
if (_temp33 && _temp33.then) return _temp33.then(function () {});
|
|
2060
2055
|
});
|
|
2061
2056
|
} catch (e) {
|
|
2062
2057
|
return Promise.reject(e);
|
|
@@ -2070,17 +2065,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2070
2065
|
*/
|
|
2071
2066
|
_moveAppToDefaultGroup: function _moveAppToDefaultGroup(visualization) {
|
|
2072
2067
|
try {
|
|
2073
|
-
const
|
|
2074
|
-
return Promise.resolve(
|
|
2075
|
-
const
|
|
2068
|
+
const _this18 = this;
|
|
2069
|
+
return Promise.resolve(_this18._addVisualization(visualization)).then(function () {
|
|
2070
|
+
const _temp34 = function () {
|
|
2076
2071
|
if (visualization.persConfig?.sectionId && visualization.visualization?.id) {
|
|
2077
|
-
return Promise.resolve(
|
|
2072
|
+
return Promise.resolve(_this18.appManagerInstance.removeVisualizations({
|
|
2078
2073
|
sectionId: visualization.persConfig?.sectionId,
|
|
2079
2074
|
vizIds: [visualization.visualization?.id]
|
|
2080
2075
|
})).then(function () {});
|
|
2081
2076
|
}
|
|
2082
2077
|
}();
|
|
2083
|
-
if (
|
|
2078
|
+
if (_temp34 && _temp34.then) return _temp34.then(function () {});
|
|
2084
2079
|
});
|
|
2085
2080
|
} catch (e) {
|
|
2086
2081
|
return Promise.reject(e);
|
|
@@ -2094,17 +2089,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2094
2089
|
*/
|
|
2095
2090
|
_removeDuplicateVisualizations: function _removeDuplicateVisualizations(visualization) {
|
|
2096
2091
|
try {
|
|
2097
|
-
const
|
|
2092
|
+
const _this19 = this;
|
|
2098
2093
|
const vizIdsToBeDeleted = visualization?.persConfig?.duplicateApps?.map(oViz => oViz.visualization?.id) || [];
|
|
2099
|
-
const
|
|
2094
|
+
const _temp35 = function () {
|
|
2100
2095
|
if (visualization.persConfig?.sectionId && vizIdsToBeDeleted.length > 0) {
|
|
2101
|
-
return Promise.resolve(
|
|
2096
|
+
return Promise.resolve(_this19.appManagerInstance.removeVisualizations({
|
|
2102
2097
|
sectionId: visualization.persConfig?.sectionId,
|
|
2103
2098
|
vizIds: vizIdsToBeDeleted
|
|
2104
2099
|
})).then(function () {});
|
|
2105
2100
|
}
|
|
2106
2101
|
}();
|
|
2107
|
-
return Promise.resolve(
|
|
2102
|
+
return Promise.resolve(_temp35 && _temp35.then ? _temp35.then(function () {}) : void 0);
|
|
2108
2103
|
} catch (e) {
|
|
2109
2104
|
return Promise.reject(e);
|
|
2110
2105
|
}
|
|
@@ -2147,7 +2142,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2147
2142
|
* @param {sap.ui.base.Event} event - The event object.
|
|
2148
2143
|
*/
|
|
2149
2144
|
_onDeleteGroup: function _onDeleteGroup(event) {
|
|
2150
|
-
const
|
|
2145
|
+
const _this20 = this;
|
|
2151
2146
|
const group = event.getSource()?.getParent(),
|
|
2152
2147
|
message = this._i18nBundle.getText("deleteGroupMessage", [group.getTitle()]),
|
|
2153
2148
|
title = this._i18nBundle.getText("delete"),
|
|
@@ -2160,20 +2155,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2160
2155
|
emphasizedAction: deleteAction,
|
|
2161
2156
|
onClose: function (action) {
|
|
2162
2157
|
try {
|
|
2163
|
-
const
|
|
2158
|
+
const _temp36 = function () {
|
|
2164
2159
|
if (action === deleteAction) {
|
|
2165
|
-
|
|
2166
|
-
return Promise.resolve(
|
|
2167
|
-
MessageToast.show(
|
|
2168
|
-
void
|
|
2169
|
-
|
|
2170
|
-
|
|
2160
|
+
_this20._setBusy(true);
|
|
2161
|
+
return Promise.resolve(_this20._deleteGroup(group.getGroupId())).then(function () {
|
|
2162
|
+
MessageToast.show(_this20._i18nBundle.getText("groupDeleted"));
|
|
2163
|
+
void _this20.refresh();
|
|
2164
|
+
_this20._closeGroupDetailDialog();
|
|
2165
|
+
_this20._setBusy(false);
|
|
2171
2166
|
});
|
|
2172
2167
|
} else if (action === moveAppAction) {
|
|
2173
|
-
void
|
|
2168
|
+
void _this20._ungroupApps(group.getGroupId());
|
|
2174
2169
|
}
|
|
2175
2170
|
}();
|
|
2176
|
-
return Promise.resolve(
|
|
2171
|
+
return Promise.resolve(_temp36 && _temp36.then ? _temp36.then(function () {}) : void 0);
|
|
2177
2172
|
} catch (e) {
|
|
2178
2173
|
return Promise.reject(e);
|
|
2179
2174
|
}
|
|
@@ -2189,40 +2184,40 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2189
2184
|
*/
|
|
2190
2185
|
_ungroupApps: function _ungroupApps(groupId) {
|
|
2191
2186
|
try {
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2187
|
+
const _this21 = this;
|
|
2188
|
+
_this21._setBusy(true);
|
|
2189
|
+
const _temp39 = _finallyRethrows(function () {
|
|
2195
2190
|
return _catch(function () {
|
|
2196
|
-
return Promise.resolve(
|
|
2197
|
-
return Promise.resolve(
|
|
2191
|
+
return Promise.resolve(_this21.appManagerInstance.getSectionVisualizations(groupId)).then(function (visualizations) {
|
|
2192
|
+
return Promise.resolve(_this21.appManagerInstance._getSections()).then(function (sections) {
|
|
2198
2193
|
const section = sections.find(oSection => oSection.id === groupId);
|
|
2199
|
-
return Promise.resolve(Promise.all(visualizations.map(oViz =>
|
|
2200
|
-
return Promise.resolve(
|
|
2194
|
+
return Promise.resolve(Promise.all(visualizations.map(oViz => _this21._addVisualization(oViz)))).then(function () {
|
|
2195
|
+
return Promise.resolve(_this21.appManagerInstance._getSections(true)).then(function (updatedSections) {
|
|
2201
2196
|
const defaultSection = updatedSections.find(oSection => oSection.default);
|
|
2202
2197
|
//update personalization
|
|
2203
2198
|
//if preset section, then section shouldn't be deleted, instead remove visualizations inside section
|
|
2204
|
-
return Promise.resolve(
|
|
2199
|
+
return Promise.resolve(_this21._updateAppPersonalization(visualizations.map(oViz => {
|
|
2205
2200
|
return {
|
|
2206
2201
|
visualization: oViz,
|
|
2207
2202
|
targetGroupId: defaultSection?.id,
|
|
2208
2203
|
isTargetGroupDefault: true
|
|
2209
2204
|
};
|
|
2210
2205
|
}))).then(function () {
|
|
2211
|
-
function
|
|
2212
|
-
MessageToast.show(
|
|
2213
|
-
return Promise.resolve(
|
|
2206
|
+
function _temp38() {
|
|
2207
|
+
MessageToast.show(_this21._i18nBundle.getText("appsUngrouped") ?? "");
|
|
2208
|
+
return Promise.resolve(_this21.refresh()).then(function () {});
|
|
2214
2209
|
}
|
|
2215
|
-
const
|
|
2210
|
+
const _temp37 = function () {
|
|
2216
2211
|
if (section?.preset) {
|
|
2217
|
-
return Promise.resolve(
|
|
2212
|
+
return Promise.resolve(_this21.appManagerInstance.removeVisualizations({
|
|
2218
2213
|
sectionId: groupId,
|
|
2219
2214
|
vizIds: visualizations.map(oViz => oViz.visualization?.id)
|
|
2220
2215
|
})).then(function () {});
|
|
2221
2216
|
} else {
|
|
2222
|
-
return Promise.resolve(
|
|
2217
|
+
return Promise.resolve(_this21._deleteGroup(groupId)).then(function () {});
|
|
2223
2218
|
}
|
|
2224
2219
|
}();
|
|
2225
|
-
return
|
|
2220
|
+
return _temp37 && _temp37.then ? _temp37.then(_temp38) : _temp38(_temp37);
|
|
2226
2221
|
});
|
|
2227
2222
|
});
|
|
2228
2223
|
});
|
|
@@ -2230,15 +2225,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2230
2225
|
});
|
|
2231
2226
|
}, function (error) {
|
|
2232
2227
|
Log.error(error);
|
|
2233
|
-
MessageToast.show(
|
|
2228
|
+
MessageToast.show(_this21._i18nBundle.getText("unableToUngroupApps") ?? "");
|
|
2234
2229
|
});
|
|
2235
2230
|
}, function (_wasThrown4, _result5) {
|
|
2236
|
-
|
|
2237
|
-
|
|
2231
|
+
_this21._setBusy(false);
|
|
2232
|
+
_this21._closeGroupDetailDialog();
|
|
2238
2233
|
if (_wasThrown4) throw _result5;
|
|
2239
2234
|
return _result5;
|
|
2240
2235
|
});
|
|
2241
|
-
return Promise.resolve(
|
|
2236
|
+
return Promise.resolve(_temp39 && _temp39.then ? _temp39.then(function () {}) : void 0);
|
|
2242
2237
|
} catch (e) {
|
|
2243
2238
|
return Promise.reject(e);
|
|
2244
2239
|
}
|
|
@@ -2252,23 +2247,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2252
2247
|
*/
|
|
2253
2248
|
_showGroupDetailDialog: function _showGroupDetailDialog(groupId, editMode = false) {
|
|
2254
2249
|
try {
|
|
2255
|
-
const
|
|
2256
|
-
const group =
|
|
2250
|
+
const _this22 = this;
|
|
2251
|
+
const group = _this22._getGroup(groupId);
|
|
2257
2252
|
if (!group) {
|
|
2258
2253
|
return Promise.resolve();
|
|
2259
2254
|
}
|
|
2260
|
-
|
|
2261
|
-
const dialog =
|
|
2255
|
+
_this22._selectedGroupId = groupId;
|
|
2256
|
+
const dialog = _this22._generateGroupDetailDialog();
|
|
2262
2257
|
//set group icon
|
|
2263
|
-
const groupIconControl =
|
|
2258
|
+
const groupIconControl = _this22._controlMap.get(`${_this22.getId()}-detailDialog-toolbar-color`);
|
|
2264
2259
|
groupIconControl.setColor(Parameters.get({
|
|
2265
2260
|
name: group.getBgColor()
|
|
2266
2261
|
}));
|
|
2267
2262
|
//set group apps
|
|
2268
|
-
return Promise.resolve(
|
|
2263
|
+
return Promise.resolve(_this22._setGroupDetailDialogApps(groupId)).then(function () {
|
|
2269
2264
|
dialog.open();
|
|
2270
2265
|
//set group title
|
|
2271
|
-
|
|
2266
|
+
_this22._setGroupNameControl(group.getTitle(), editMode);
|
|
2272
2267
|
});
|
|
2273
2268
|
} catch (e) {
|
|
2274
2269
|
return Promise.reject(e);
|
|
@@ -2283,29 +2278,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2283
2278
|
*/
|
|
2284
2279
|
_setGroupDetailDialogApps: function _setGroupDetailDialogApps(groupId) {
|
|
2285
2280
|
try {
|
|
2286
|
-
const
|
|
2287
|
-
const group =
|
|
2288
|
-
const
|
|
2281
|
+
const _this23 = this;
|
|
2282
|
+
const group = _this23._getGroup(groupId);
|
|
2283
|
+
const _temp40 = function () {
|
|
2289
2284
|
if (group) {
|
|
2290
|
-
return Promise.resolve(
|
|
2285
|
+
return Promise.resolve(_this23.appManagerInstance.getSectionVisualizations(groupId, false)).then(function (appVisualizations) {
|
|
2291
2286
|
group.destroyAggregation("apps", true);
|
|
2292
2287
|
appVisualizations = appVisualizations.map((appVisualization, index) => {
|
|
2293
2288
|
return {
|
|
2294
2289
|
...appVisualization,
|
|
2295
|
-
menuItems:
|
|
2290
|
+
menuItems: _this23._getAppActions(group, index, appVisualization) //add actions to show in group
|
|
2296
2291
|
};
|
|
2297
2292
|
});
|
|
2298
|
-
const apps =
|
|
2299
|
-
const appsWrapper =
|
|
2300
|
-
|
|
2293
|
+
const apps = _this23.generateApps(appVisualizations);
|
|
2294
|
+
const appsWrapper = _this23._controlMap.get(`${_this23.getId()}-detailDialog-apps`);
|
|
2295
|
+
_this23._setAggregation(group, apps, "apps");
|
|
2301
2296
|
appsWrapper.destroyItems();
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2297
|
+
_this23._setAggregation(appsWrapper, group.getApps().map(app => _this23.getParent()._getAppTile(app)));
|
|
2298
|
+
_this23._applyGroupedAppsPersonalization(groupId);
|
|
2299
|
+
_this23._dispatchAppsLoadedEvent(apps);
|
|
2305
2300
|
});
|
|
2306
2301
|
}
|
|
2307
2302
|
}();
|
|
2308
|
-
return Promise.resolve(
|
|
2303
|
+
return Promise.resolve(_temp40 && _temp40.then ? _temp40.then(function () {}) : void 0);
|
|
2309
2304
|
} catch (e) {
|
|
2310
2305
|
return Promise.reject(e);
|
|
2311
2306
|
}
|
|
@@ -2436,25 +2431,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2436
2431
|
*/
|
|
2437
2432
|
_onGroupEditName: function _onGroupEditName(updatedTitle) {
|
|
2438
2433
|
try {
|
|
2439
|
-
const
|
|
2440
|
-
function
|
|
2441
|
-
|
|
2442
|
-
|
|
2434
|
+
const _this24 = this;
|
|
2435
|
+
function _temp42() {
|
|
2436
|
+
_this24._setGroupNameControl(updatedTitle, false);
|
|
2437
|
+
_this24._setBusy(false);
|
|
2443
2438
|
}
|
|
2444
|
-
|
|
2445
|
-
const groupId =
|
|
2446
|
-
group =
|
|
2439
|
+
_this24._setBusy(true);
|
|
2440
|
+
const groupId = _this24._selectedGroupId,
|
|
2441
|
+
group = _this24._getGroup(groupId),
|
|
2447
2442
|
oldTitle = group?.getTitle();
|
|
2448
|
-
const
|
|
2443
|
+
const _temp41 = function () {
|
|
2449
2444
|
if (updatedTitle && updatedTitle !== oldTitle) {
|
|
2450
|
-
return Promise.resolve(
|
|
2445
|
+
return Promise.resolve(_this24._renameGroup(groupId, updatedTitle)).then(function () {
|
|
2451
2446
|
group?.setProperty("title", updatedTitle, true);
|
|
2452
|
-
void
|
|
2453
|
-
MessageToast.show(
|
|
2447
|
+
void _this24.refresh();
|
|
2448
|
+
MessageToast.show(_this24._i18nBundle.getText("groupNameChanged") || "");
|
|
2454
2449
|
});
|
|
2455
2450
|
}
|
|
2456
2451
|
}();
|
|
2457
|
-
return Promise.resolve(
|
|
2452
|
+
return Promise.resolve(_temp41 && _temp41.then ? _temp41.then(_temp42) : _temp42(_temp41));
|
|
2458
2453
|
} catch (e) {
|
|
2459
2454
|
return Promise.reject(e);
|
|
2460
2455
|
}
|
|
@@ -2472,12 +2467,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2472
2467
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2473
2468
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2474
2469
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2475
|
-
const
|
|
2470
|
+
const _temp43 = function () {
|
|
2476
2471
|
if (groupIndex > -1) {
|
|
2477
2472
|
return Promise.resolve(pagesService.renameSection(pageIndex, groupIndex, updatedTitle)).then(function () {});
|
|
2478
2473
|
}
|
|
2479
2474
|
}();
|
|
2480
|
-
if (
|
|
2475
|
+
if (_temp43 && _temp43.then) return _temp43.then(function () {});
|
|
2481
2476
|
});
|
|
2482
2477
|
} catch (e) {
|
|
2483
2478
|
return Promise.reject(e);
|
|
@@ -2592,11 +2587,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2592
2587
|
*/
|
|
2593
2588
|
_handleAddFromInsights: function _handleAddFromInsights() {
|
|
2594
2589
|
try {
|
|
2595
|
-
const
|
|
2596
|
-
return Promise.resolve(
|
|
2597
|
-
const dialog =
|
|
2598
|
-
|
|
2599
|
-
|
|
2590
|
+
const _this25 = this;
|
|
2591
|
+
return Promise.resolve(_this25._getInsightTilesToAdd()).then(function (appsToAdd) {
|
|
2592
|
+
const dialog = _this25._generateAddFromInsightsDialog();
|
|
2593
|
+
_this25._controlMap.get(`${_this25.getId()}-addFromInsightsDialog-errorMessage`)?.setVisible(appsToAdd.length === 0);
|
|
2594
|
+
_this25._generateInsightListItems(appsToAdd);
|
|
2600
2595
|
dialog.open();
|
|
2601
2596
|
});
|
|
2602
2597
|
} catch (e) {
|
|
@@ -2647,8 +2642,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2647
2642
|
*/
|
|
2648
2643
|
_getInsightTilesToAdd: function _getInsightTilesToAdd() {
|
|
2649
2644
|
try {
|
|
2650
|
-
const
|
|
2651
|
-
return Promise.resolve(Promise.all([
|
|
2645
|
+
const _this26 = this;
|
|
2646
|
+
return Promise.resolve(Promise.all([_this26.appManagerInstance.fetchInsightApps(true, _this26._i18nBundle.getText("insights")), _this26.appManagerInstance.fetchFavVizs(false, true)])).then(function ([insightsApps, favoriteApps]) {
|
|
2652
2647
|
//check force refresh true?
|
|
2653
2648
|
//find the visualizations that are present in insight tile but not in favorite apps
|
|
2654
2649
|
const appsToAdd = insightsApps.reduce((appsToAdd, insightsApp) => {
|
|
@@ -2661,7 +2656,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2661
2656
|
}
|
|
2662
2657
|
return appsToAdd;
|
|
2663
2658
|
}, []);
|
|
2664
|
-
return
|
|
2659
|
+
return _this26.appManagerInstance._filterDuplicateVizs(appsToAdd, false);
|
|
2665
2660
|
});
|
|
2666
2661
|
} catch (e) {
|
|
2667
2662
|
return Promise.reject(e);
|
|
@@ -2693,20 +2688,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2693
2688
|
*/
|
|
2694
2689
|
_addFromInsights: function _addFromInsights() {
|
|
2695
2690
|
try {
|
|
2696
|
-
const
|
|
2697
|
-
function
|
|
2698
|
-
|
|
2699
|
-
MessageToast.show(
|
|
2700
|
-
return Promise.resolve(
|
|
2701
|
-
|
|
2691
|
+
const _this27 = this;
|
|
2692
|
+
function _temp45() {
|
|
2693
|
+
_this27._closeAddFromInsightsDialog();
|
|
2694
|
+
MessageToast.show(_this27._i18nBundle.getText(selectedItems.length === 1 ? "addFromInsightTileSuccess" : "addFromInsightTilesSuccess", [selectedItems.length]));
|
|
2695
|
+
return Promise.resolve(_this27.getParent()._refreshAllPanels()).then(function () {
|
|
2696
|
+
_this27._setBusy(false);
|
|
2702
2697
|
});
|
|
2703
2698
|
}
|
|
2704
|
-
|
|
2705
|
-
const selectedItems =
|
|
2706
|
-
const
|
|
2707
|
-
return Promise.resolve(
|
|
2699
|
+
_this27._setBusy(true);
|
|
2700
|
+
const selectedItems = _this27._getSelectedInsights();
|
|
2701
|
+
const _temp44 = _forOf(selectedItems, function (selectedItem) {
|
|
2702
|
+
return Promise.resolve(_this27.appManagerInstance.addVisualization(selectedItem.data("vizId"))).then(function () {});
|
|
2708
2703
|
});
|
|
2709
|
-
return Promise.resolve(
|
|
2704
|
+
return Promise.resolve(_temp44 && _temp44.then ? _temp44.then(_temp45) : _temp45(_temp44));
|
|
2710
2705
|
} catch (e) {
|
|
2711
2706
|
return Promise.reject(e);
|
|
2712
2707
|
}
|
|
@@ -2724,8 +2719,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2724
2719
|
*/
|
|
2725
2720
|
_updateAppPersonalization: function _updateAppPersonalization(updateConfigs) {
|
|
2726
2721
|
try {
|
|
2727
|
-
const
|
|
2728
|
-
return Promise.resolve(
|
|
2722
|
+
const _this28 = this;
|
|
2723
|
+
return Promise.resolve(_this28._getAppPersonalization()).then(function (personalizations) {
|
|
2729
2724
|
for (const updateConfig of updateConfigs) {
|
|
2730
2725
|
const {
|
|
2731
2726
|
visualization
|
|
@@ -2737,13 +2732,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2737
2732
|
const targetGroupId = updateConfig.targetGroupId ?? sourceGroupId;
|
|
2738
2733
|
if (sourceGroupId !== targetGroupId) {
|
|
2739
2734
|
//move app scenario
|
|
2740
|
-
|
|
2735
|
+
_this28._updateMoveAppPersonalization(personalizations, updateConfig);
|
|
2741
2736
|
} else {
|
|
2742
2737
|
//only color is updated
|
|
2743
|
-
|
|
2738
|
+
_this28._updateAppColorPersonalization(personalizations, updateConfig);
|
|
2744
2739
|
}
|
|
2745
2740
|
}
|
|
2746
|
-
return Promise.resolve(
|
|
2741
|
+
return Promise.resolve(_this28.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2747
2742
|
});
|
|
2748
2743
|
} catch (e) {
|
|
2749
2744
|
return Promise.reject(e);
|
|
@@ -2812,9 +2807,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2812
2807
|
*/
|
|
2813
2808
|
_updateGroupPersonalization: function _updateGroupPersonalization(groupId, selectedColor) {
|
|
2814
2809
|
try {
|
|
2815
|
-
const
|
|
2816
|
-
return Promise.resolve(
|
|
2817
|
-
const personalizationIndex =
|
|
2810
|
+
const _this29 = this;
|
|
2811
|
+
return Promise.resolve(_this29._getAppPersonalization()).then(function (personalizations) {
|
|
2812
|
+
const personalizationIndex = _this29._getPersonalizationIndex(personalizations, {
|
|
2818
2813
|
isSection: true,
|
|
2819
2814
|
sectionId: groupId
|
|
2820
2815
|
});
|
|
@@ -2830,7 +2825,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2830
2825
|
} else {
|
|
2831
2826
|
personalizations.push(updatedPersonalization);
|
|
2832
2827
|
}
|
|
2833
|
-
return Promise.resolve(
|
|
2828
|
+
return Promise.resolve(_this29.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2834
2829
|
});
|
|
2835
2830
|
} catch (e) {
|
|
2836
2831
|
return Promise.reject(e);
|
|
@@ -2890,22 +2885,22 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2890
2885
|
*/
|
|
2891
2886
|
_deleteGroup: function _deleteGroup(groupId) {
|
|
2892
2887
|
try {
|
|
2893
|
-
const
|
|
2888
|
+
const _this30 = this;
|
|
2894
2889
|
return Promise.resolve(Container.getServiceAsync("Pages")).then(function (pagesService) {
|
|
2895
2890
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2896
2891
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2897
2892
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2898
|
-
const
|
|
2893
|
+
const _temp46 = function () {
|
|
2899
2894
|
if (groupIndex > -1) {
|
|
2900
2895
|
return Promise.resolve(pagesService.deleteSection(pageIndex, groupIndex)).then(function () {
|
|
2901
|
-
void
|
|
2896
|
+
void _this30._deletePersonalization({
|
|
2902
2897
|
sectionId: groupId,
|
|
2903
2898
|
isSection: true
|
|
2904
2899
|
});
|
|
2905
2900
|
});
|
|
2906
2901
|
}
|
|
2907
2902
|
}();
|
|
2908
|
-
if (
|
|
2903
|
+
if (_temp46 && _temp46.then) return _temp46.then(function () {});
|
|
2909
2904
|
});
|
|
2910
2905
|
} catch (e) {
|
|
2911
2906
|
return Promise.reject(e);
|
|
@@ -2924,14 +2919,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2924
2919
|
*/
|
|
2925
2920
|
_deletePersonalization: function _deletePersonalization(personalizationConfig) {
|
|
2926
2921
|
try {
|
|
2927
|
-
const
|
|
2922
|
+
const _this31 = this;
|
|
2928
2923
|
const {
|
|
2929
2924
|
isSection,
|
|
2930
2925
|
sectionId
|
|
2931
2926
|
} = personalizationConfig;
|
|
2932
|
-
return Promise.resolve(
|
|
2927
|
+
return Promise.resolve(_this31._getAppPersonalization()).then(function (personalizations) {
|
|
2933
2928
|
if (!isSection) {
|
|
2934
|
-
const personalizationIndex =
|
|
2929
|
+
const personalizationIndex = _this31._getPersonalizationIndex(personalizations, personalizationConfig);
|
|
2935
2930
|
if (personalizationIndex > -1) {
|
|
2936
2931
|
personalizations.splice(personalizationIndex, 1);
|
|
2937
2932
|
}
|
|
@@ -2939,7 +2934,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2939
2934
|
// Delete personalizations for all associated apps if a group is deleted
|
|
2940
2935
|
personalizations = personalizations.filter(personalization => personalization.sectionId !== sectionId);
|
|
2941
2936
|
}
|
|
2942
|
-
void
|
|
2937
|
+
void _this31.setFavAppsPersonalization(personalizations);
|
|
2943
2938
|
});
|
|
2944
2939
|
} catch (e) {
|
|
2945
2940
|
return Promise.reject(e);
|
|
@@ -2969,33 +2964,33 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2969
2964
|
*/
|
|
2970
2965
|
_handleKeyboardMoveApp: function _handleKeyboardMoveApp(event, appGroupId) {
|
|
2971
2966
|
try {
|
|
2972
|
-
const
|
|
2967
|
+
const _this32 = this;
|
|
2973
2968
|
const currentItem = Element.closestTo(event.target.firstElementChild);
|
|
2974
2969
|
const container = currentItem.getParent();
|
|
2975
|
-
const
|
|
2970
|
+
const _temp48 = function () {
|
|
2976
2971
|
if (event.metaKey || event.ctrlKey) {
|
|
2977
2972
|
// ctrl(windows)/cmd (mac) + x, sets app to be moved to a group, or to create a group
|
|
2978
|
-
if (event.key === "x" && !currentItem.data("groupId") && !
|
|
2973
|
+
if (event.key === "x" && !currentItem.data("groupId") && !_this32._cutApp && !appGroupId) {
|
|
2979
2974
|
currentItem.$().css("opacity", 0.6);
|
|
2980
2975
|
currentItem._oMoreIcon.setEnabled(false);
|
|
2981
|
-
|
|
2976
|
+
_this32._cutApp = currentItem;
|
|
2982
2977
|
}
|
|
2983
|
-
const
|
|
2984
|
-
if (event.key === "v" &&
|
|
2978
|
+
const _temp47 = function () {
|
|
2979
|
+
if (event.key === "v" && _this32._cutApp && !appGroupId) {
|
|
2985
2980
|
const dragDropEvent = new Event("keyboardDragDropEvent", container, {
|
|
2986
|
-
draggedControl:
|
|
2981
|
+
draggedControl: _this32._cutApp,
|
|
2987
2982
|
droppedControl: currentItem,
|
|
2988
2983
|
dropPosition: dnd.RelativeDropPosition.On
|
|
2989
2984
|
});
|
|
2990
|
-
return Promise.resolve(
|
|
2991
|
-
|
|
2985
|
+
return Promise.resolve(_this32._onFavItemDrop(dragDropEvent)).then(function () {
|
|
2986
|
+
_this32._cutApp = undefined;
|
|
2992
2987
|
});
|
|
2993
2988
|
}
|
|
2994
2989
|
}();
|
|
2995
|
-
if (
|
|
2990
|
+
if (_temp47 && _temp47.then) return _temp47.then(function () {});
|
|
2996
2991
|
}
|
|
2997
2992
|
}();
|
|
2998
|
-
return Promise.resolve(
|
|
2993
|
+
return Promise.resolve(_temp48 && _temp48.then ? _temp48.then(function () {}) : void 0);
|
|
2999
2994
|
} catch (e) {
|
|
3000
2995
|
return Promise.reject(e);
|
|
3001
2996
|
}
|