@sapui5/sap.cux.home 1.141.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 -6
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -6
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +9 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +10 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +75 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +378 -179
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +399 -175
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +32 -17
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +31 -15
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +2 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +4 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +35 -5
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +32 -5
- 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 +7 -1
- 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 +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +23 -2
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +18 -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 +32 -59
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +270 -249
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +169 -181
- 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 +17 -7
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +18 -6
- 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 -12
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +354 -414
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +25 -70
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- 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 +12 -9
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +11 -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 -18
- 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} +31 -120
- 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 +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +90 -57
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +51 -23
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +216 -81
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- 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 +19 -11
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +26 -20
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- 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/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- 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/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +11 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +11 -0
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -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 +67 -133
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +70 -152
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +17 -12
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +19 -16
- 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 +194 -168
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +167 -157
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +59 -66
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +46 -34
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- 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 +40 -14
- 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 +9 -5
- 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 +6 -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 +7 -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/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +22 -0
- package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +4 -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/ToDosContainer.less +4 -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/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/m/Button", "sap/m/ColorPalette", "sap/m/ColorPalettePopover", "sap/m/CustomListItem", "sap/m/Dialog", "sap/m/HBox", "sap/m/IllustratedMessage", "sap/m/IllustratedMessageSize", "sap/m/IllustratedMessageType", "sap/m/Input", "sap/m/Label", "sap/m/List", "sap/m/MessageBox", "sap/m/MessageStrip", "sap/m/MessageToast", "sap/m/NavContainer", "sap/m/ObjectIdentifier", "sap/m/Page", "sap/m/Popover", "sap/m/ScrollContainer", "sap/m/SearchField", "sap/m/StandardListItem", "sap/m/Text", "sap/m/Title", "sap/m/Toolbar", "sap/m/ToolbarSpacer", "sap/m/VBox", "sap/m/library", "sap/ui/base/Event", "sap/ui/core/Element", "sap/ui/core/EventBus", "sap/ui/core/Icon", "sap/ui/core/library", "sap/ui/core/message/MessageType", "sap/ui/core/theming/Parameters", "sap/ui/layout/form/SimpleForm", "sap/ui/layout/library", "sap/ushell/Config", "sap/ushell/Container", "
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/m/Button", "sap/m/ColorPalette", "sap/m/ColorPalettePopover", "sap/m/CustomListItem", "sap/m/Dialog", "sap/m/HBox", "sap/m/IllustratedMessage", "sap/m/IllustratedMessageSize", "sap/m/IllustratedMessageType", "sap/m/Input", "sap/m/Label", "sap/m/List", "sap/m/MessageBox", "sap/m/MessageStrip", "sap/m/MessageToast", "sap/m/NavContainer", "sap/m/ObjectIdentifier", "sap/m/Page", "sap/m/Popover", "sap/m/ScrollContainer", "sap/m/SearchField", "sap/m/StandardListItem", "sap/m/Text", "sap/m/Title", "sap/m/Toolbar", "sap/m/ToolbarSpacer", "sap/m/VBox", "sap/m/library", "sap/ui/base/Event", "sap/ui/core/Element", "sap/ui/core/EventBus", "sap/ui/core/Icon", "sap/ui/core/library", "sap/ui/core/message/MessageType", "sap/ui/core/theming/Parameters", "sap/ui/layout/form/SimpleForm", "sap/ui/layout/library", "sap/ushell/Config", "sap/ushell/Container", "./BaseApp", "./BaseAppPersPanel", "./Group", "./MenuItem", "./RecommendedAppPanel", "./utils/Accessibility", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/FESRUtil", "./utils/InsightsUtils"], function (Log, GridContainer, GridContainerSettings, Button, ColorPalette, ColorPalettePopover, CustomListItem, Dialog, HBox, IllustratedMessage, IllustratedMessageSize, IllustratedMessageType, Input, Label, List, MessageBox, MessageStrip, MessageToast, NavContainer, ObjectIdentifier, Page, Popover, ScrollContainer, SearchField, StandardListItem, Text, Title, Toolbar, ToolbarSpacer, VBox, sap_m_library, Event, Element, EventBus, Icon, sap_ui_core_library, MessageType, Parameters, SimpleForm, sap_ui_layout_library, Config, Container, ___BaseApp, __BaseAppPersPanel, __Group, __MenuItem, __RecommendedAppPanel, ___utils_Accessibility, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_FESRUtil, ___utils_InsightsUtils) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -204,7 +204,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
204
204
|
const recycleId = ___utils_DataFormatUtils["recycleId"];
|
|
205
205
|
const DeviceType = ___utils_Device["DeviceType"];
|
|
206
206
|
const addFESRId = ___utils_FESRUtil["addFESRId"];
|
|
207
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
207
208
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
209
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
208
210
|
const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
|
|
209
211
|
const _showAddApps = () => {
|
|
210
212
|
return Config.last("/core/shell/enablePersonalization") || Config.last("/core/catalog/enabled");
|
|
@@ -216,7 +218,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
216
218
|
return favouritesMenuItems;
|
|
217
219
|
}(favouritesMenuItems || {});
|
|
218
220
|
const tilesPanelName = "sap.cux.home.TilesPanel";
|
|
219
|
-
const
|
|
221
|
+
const tilesContainerName = "sap.cux.home.TilesContainer";
|
|
220
222
|
const sortedMenuItems = [favouritesMenuItems.CREATE_GROUP, favouritesMenuItems.ADD_APPS, favouritesMenuItems.ADD_FROM_INSIGHTS, "settings"];
|
|
221
223
|
|
|
222
224
|
/**
|
|
@@ -268,7 +270,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
268
270
|
constructor: function _constructor(id, settings) {
|
|
269
271
|
BaseAppPersPanel.prototype.constructor.call(this, id, settings);
|
|
270
272
|
this._selectedApps = [];
|
|
271
|
-
this._isInitialLoad = true;
|
|
272
273
|
/**
|
|
273
274
|
* Updates the color personalization for an app.
|
|
274
275
|
* @param {IAppPersonalization[]} personalizations - The array of app personalizations.
|
|
@@ -308,15 +309,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
308
309
|
};
|
|
309
310
|
},
|
|
310
311
|
init: function _init() {
|
|
311
|
-
const _this = this
|
|
312
|
-
_this2 = this;
|
|
312
|
+
const _this = this;
|
|
313
313
|
BaseAppPersPanel.prototype.init.call(this);
|
|
314
314
|
//Configure Header
|
|
315
315
|
this.setProperty("key", "favApps");
|
|
316
316
|
this.setProperty("title", this._i18nBundle.getText("favoritesTab"));
|
|
317
317
|
this.setProperty("tooltip", this._i18nBundle.getText("favAppsInfo"));
|
|
318
318
|
//Setup Action Buttons
|
|
319
|
-
|
|
319
|
+
this._createActionButtons();
|
|
320
320
|
//Setup Menu Items
|
|
321
321
|
this._createHeaderMenuItems();
|
|
322
322
|
//add drag and drop config
|
|
@@ -338,13 +338,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
338
338
|
return Promise.reject(e);
|
|
339
339
|
}
|
|
340
340
|
}, this);
|
|
341
|
-
this.oEventBus.subscribe("importChannel", "resetImported", function () {
|
|
342
|
-
try {
|
|
343
|
-
return Promise.resolve(_this2.setImportButtonVisibility(true)).then(function () {});
|
|
344
|
-
} catch (e) {
|
|
345
|
-
return Promise.reject(e);
|
|
346
|
-
}
|
|
347
|
-
}, this);
|
|
348
341
|
this.attachPersistDialog(() => {
|
|
349
342
|
// if while navigating to different page, a group detail dialog was open, then while navigating back group detail dialog should be in open state.
|
|
350
343
|
if (this._selectedGroupId) {
|
|
@@ -353,6 +346,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
353
346
|
});
|
|
354
347
|
document.addEventListener("click", event => this._resetCutElement(event));
|
|
355
348
|
document.addEventListener("keydown", event => this._resetCutElement(event));
|
|
349
|
+
this.additionalInfo = {
|
|
350
|
+
fesrSource: FESRNavigationSource.Favorite
|
|
351
|
+
};
|
|
356
352
|
},
|
|
357
353
|
_importdone: function _importdone() {
|
|
358
354
|
const stateData = {
|
|
@@ -366,16 +362,16 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
366
362
|
*/
|
|
367
363
|
addAppsAndSections: function _addAppsAndSections(sections, importedPersonalizations) {
|
|
368
364
|
try {
|
|
369
|
-
const
|
|
365
|
+
const _this2 = this;
|
|
370
366
|
let aPromise = [];
|
|
371
|
-
return Promise.resolve(
|
|
367
|
+
return Promise.resolve(_this2._getAppPersonalization()).then(function (aPersonalization) {
|
|
372
368
|
function _temp5() {
|
|
373
369
|
//update personalization
|
|
374
|
-
return Promise.resolve(
|
|
370
|
+
return Promise.resolve(_this2.setFavAppsPersonalization(aPersonalization)).then(function () {
|
|
375
371
|
return aPromise.reduce((chain, current) => {
|
|
376
372
|
return chain.then(() => current());
|
|
377
373
|
}, Promise.resolve()).then(() => {
|
|
378
|
-
return
|
|
374
|
+
return _this2.updateDefaultSectionPersonalization(aPersonalization);
|
|
379
375
|
});
|
|
380
376
|
});
|
|
381
377
|
}
|
|
@@ -384,25 +380,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
384
380
|
const _temp3 = function () {
|
|
385
381
|
if (sectionViz?.length) {
|
|
386
382
|
function _temp2() {
|
|
387
|
-
const filteredPersonalizations =
|
|
383
|
+
const filteredPersonalizations = _this2.filterPersonalizations(importedPersonalizations, section);
|
|
388
384
|
aPersonalization = aPersonalization.concat(filteredPersonalizations);
|
|
389
385
|
}
|
|
390
386
|
const _temp = function () {
|
|
391
387
|
if (section.default || section.id === MYAPPS_SECTION_ID) {
|
|
392
388
|
aPromise.push(() => {
|
|
393
|
-
return section.default ?
|
|
389
|
+
return section.default ? _this2.addSectionViz(sectionViz) : _this2.addSectionViz(sectionViz, MYAPPS_SECTION_ID);
|
|
394
390
|
});
|
|
395
391
|
} else {
|
|
396
|
-
return Promise.resolve(
|
|
392
|
+
return Promise.resolve(_this2.appManagerInstance._getSections(true)).then(function (sections) {
|
|
397
393
|
// If Section exists, add visualization to existing section else create a new section with same sectionId
|
|
398
394
|
const sectionIndex = sections.findIndex(n => n.id === section.id);
|
|
399
395
|
if (sectionIndex > -1) {
|
|
400
396
|
aPromise.push(() => {
|
|
401
|
-
return
|
|
397
|
+
return _this2.addSectionViz(sectionViz, section.id);
|
|
402
398
|
});
|
|
403
399
|
} else {
|
|
404
400
|
aPromise.push(() => {
|
|
405
|
-
return
|
|
401
|
+
return _this2.appManagerInstance.addSection({
|
|
406
402
|
sectionIndex: sections.length,
|
|
407
403
|
sectionProperties: {
|
|
408
404
|
id: section.id,
|
|
@@ -462,9 +458,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
462
458
|
*/
|
|
463
459
|
updateDefaultSectionPersonalization: function _updateDefaultSectionPersonalization(aPersonalization) {
|
|
464
460
|
try {
|
|
465
|
-
const
|
|
461
|
+
const _this3 = this;
|
|
466
462
|
//update recently added app section id in personalization
|
|
467
|
-
return Promise.resolve(
|
|
463
|
+
return Promise.resolve(_this3.appManagerInstance._getSections(true)).then(function (sections) {
|
|
468
464
|
let defaultSection = sections.find(oSection => {
|
|
469
465
|
return oSection.default;
|
|
470
466
|
});
|
|
@@ -491,19 +487,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
491
487
|
*/
|
|
492
488
|
addSectionViz: function _addSectionViz(sectionsViz, sSectionId) {
|
|
493
489
|
try {
|
|
494
|
-
const
|
|
490
|
+
const _this4 = this;
|
|
495
491
|
return Promise.resolve(sectionsViz.reduce((promiseChain, oViz) => {
|
|
496
492
|
return promiseChain.then(function () {
|
|
497
493
|
try {
|
|
498
494
|
let _exit = false;
|
|
499
495
|
function _temp7(_result) {
|
|
500
|
-
return _exit ? _result :
|
|
496
|
+
return _exit ? _result : _this4._addVisualization({
|
|
501
497
|
visualization: oViz
|
|
502
498
|
}, sSectionId);
|
|
503
499
|
}
|
|
504
500
|
const _temp6 = function () {
|
|
505
501
|
if (oViz.isBookmark && sSectionId) {
|
|
506
|
-
return Promise.resolve(
|
|
502
|
+
return Promise.resolve(_this4.appManagerInstance._getSections()).then(function (sections) {
|
|
507
503
|
const defaultSection = sections.find(section => section.default);
|
|
508
504
|
const targetSection = sections.find(section => section.id === sSectionId);
|
|
509
505
|
if (defaultSection && targetSection) {
|
|
@@ -513,11 +509,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
513
509
|
targetSectionIndex: sections.indexOf(targetSection),
|
|
514
510
|
targetVisualizationIndex: targetSection.visualizations.length
|
|
515
511
|
};
|
|
516
|
-
const
|
|
512
|
+
const _this4$_addVisualizat = _this4._addVisualization({
|
|
517
513
|
visualization: oViz
|
|
518
514
|
}, sSectionId, moveConfig);
|
|
519
515
|
_exit = true;
|
|
520
|
-
return
|
|
516
|
+
return _this4$_addVisualizat;
|
|
521
517
|
}
|
|
522
518
|
});
|
|
523
519
|
}
|
|
@@ -539,48 +535,43 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
539
535
|
*/
|
|
540
536
|
loadApps: function _loadApps() {
|
|
541
537
|
try {
|
|
542
|
-
const
|
|
543
|
-
return Promise.resolve(
|
|
544
|
-
|
|
545
|
-
if (checkPanelExists(container, insightsConatinerlName, tilesPanelName)) {
|
|
546
|
-
_this6._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
547
|
-
}
|
|
548
|
-
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
549
|
-
container._updateContainerHeader(container);
|
|
550
|
-
}
|
|
551
|
-
const isPhone = _this6.getDeviceType() === DeviceType.Mobile;
|
|
538
|
+
const _this5 = this;
|
|
539
|
+
return Promise.resolve(_this5.appManagerInstance.fetchFavVizs(true, false)).then(function (favoriteVisualizations) {
|
|
540
|
+
const isPhone = _this5.getDeviceType() === DeviceType.Mobile;
|
|
552
541
|
//Create groups
|
|
553
|
-
|
|
542
|
+
_this5.destroyAggregation("groups", true);
|
|
554
543
|
const groupVisualizations = favoriteVisualizations.filter(visualization => visualization.isSection).map(groupVisualization => {
|
|
555
544
|
return {
|
|
556
545
|
...groupVisualization,
|
|
557
|
-
menuItems:
|
|
546
|
+
menuItems: _this5._getGroupActions(groupVisualization)
|
|
558
547
|
};
|
|
559
548
|
});
|
|
560
|
-
const groups =
|
|
561
|
-
|
|
549
|
+
const groups = _this5._generateGroups(groupVisualizations);
|
|
550
|
+
_this5._setGroups(groups);
|
|
562
551
|
|
|
563
552
|
//Create apps
|
|
564
|
-
|
|
553
|
+
_this5.destroyAggregation("apps", true);
|
|
565
554
|
const appVisualizations = favoriteVisualizations.filter(visualization => !visualization.isSection).map((appVisualization, index) => {
|
|
566
555
|
return {
|
|
567
556
|
...appVisualization,
|
|
568
|
-
menuItems:
|
|
557
|
+
menuItems: _this5._getAppActions(undefined, index, appVisualization)
|
|
569
558
|
};
|
|
570
559
|
});
|
|
571
|
-
const apps =
|
|
572
|
-
|
|
573
|
-
if (
|
|
574
|
-
void
|
|
560
|
+
const apps = _this5.generateApps(appVisualizations);
|
|
561
|
+
_this5.setApps(apps);
|
|
562
|
+
if (_this5._selectedGroupId) {
|
|
563
|
+
void _this5._setGroupDetailDialogApps(_this5._selectedGroupId);
|
|
575
564
|
}
|
|
576
|
-
const container =
|
|
577
|
-
container.toggleMenuListItem(
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
565
|
+
const container = _this5.getParent();
|
|
566
|
+
container.toggleMenuListItem(_this5._createGroupMenuItem, _this5.getApps().length > 0);
|
|
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);
|
|
584
575
|
});
|
|
585
576
|
} catch (e) {
|
|
586
577
|
return Promise.reject(e);
|
|
@@ -595,23 +586,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
595
586
|
* @param {Group[]} groups - The list of favorite app groups.
|
|
596
587
|
*/
|
|
597
588
|
_switchToRecommendedIfNoFavApps: function _switchToRecommendedIfNoFavApps(apps, groups) {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
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);
|
|
610
605
|
}
|
|
611
|
-
}
|
|
612
|
-
return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
|
|
613
|
-
} catch (e) {
|
|
614
|
-
return Promise.reject(e);
|
|
606
|
+
});
|
|
615
607
|
}
|
|
616
608
|
},
|
|
617
609
|
/**
|
|
@@ -790,57 +782,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
790
782
|
* @private
|
|
791
783
|
*/
|
|
792
784
|
_createActionButtons: function _createActionButtons() {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
if (
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
addFESRId(addAppsBtn, "addAppsBtn");
|
|
807
|
-
_this8._actionButtons.push(addAppsBtn);
|
|
808
|
-
}
|
|
785
|
+
if (!this._actionButtons) {
|
|
786
|
+
this._actionButtons = [];
|
|
787
|
+
if (_showAddApps()) {
|
|
788
|
+
const addAppsBtn = new Button(`${this.getId()}-addAppsBtn`, {
|
|
789
|
+
icon: "sap-icon://action",
|
|
790
|
+
tooltip: this._i18nBundle.getText("addAppsTooltip"),
|
|
791
|
+
text: this._i18nBundle.getText("addApps"),
|
|
792
|
+
press: () => {
|
|
793
|
+
void this.navigateToAppFinder();
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
addFESRId(addAppsBtn, "addAppsBtn");
|
|
797
|
+
this._actionButtons.push(addAppsBtn);
|
|
809
798
|
}
|
|
810
|
-
_this8._actionButtons.forEach(actionButton => {
|
|
811
|
-
_this8.addAggregation("actionButtons", actionButton);
|
|
812
|
-
});
|
|
813
|
-
return Promise.resolve(_this8._validateAppsMigration()).then(function (isImportEnabled) {
|
|
814
|
-
if (isImportEnabled) {
|
|
815
|
-
_this8._createImportButton();
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
|
-
} catch (e) {
|
|
819
|
-
return Promise.reject(e);
|
|
820
|
-
}
|
|
821
|
-
},
|
|
822
|
-
_createImportButton: function _createImportButton() {
|
|
823
|
-
if (!this._importButton) {
|
|
824
|
-
this._importButton = new Button(`${this.getId()}-importAppsBtn`, {
|
|
825
|
-
tooltip: this._i18nBundle.getText("importAppsNow"),
|
|
826
|
-
text: this._i18nBundle.getText("importAppsNow"),
|
|
827
|
-
press: this._openImportAppsDialog.bind(this)
|
|
828
|
-
});
|
|
829
|
-
addFESRId(this._importButton, "importAppsDialog");
|
|
830
|
-
this._actionButtons.push(this._importButton);
|
|
831
|
-
this.insertAggregation("actionButtons", this._importButton, 0);
|
|
832
|
-
}
|
|
833
|
-
return this._importButton;
|
|
834
|
-
},
|
|
835
|
-
setImportButtonVisibility: function _setImportButtonVisibility(bVisible) {
|
|
836
|
-
try {
|
|
837
|
-
const _this9 = this;
|
|
838
|
-
return Promise.resolve(MyHomeImport.setImportEnabled(bVisible)).then(function () {
|
|
839
|
-
_this9._createImportButton().setVisible(bVisible);
|
|
840
|
-
});
|
|
841
|
-
} catch (e) {
|
|
842
|
-
return Promise.reject(e);
|
|
843
799
|
}
|
|
800
|
+
this._actionButtons.forEach(actionButton => {
|
|
801
|
+
this.addAggregation("actionButtons", actionButton);
|
|
802
|
+
});
|
|
844
803
|
},
|
|
845
804
|
/**
|
|
846
805
|
* Creates menu items for panel header.
|
|
@@ -883,15 +842,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
883
842
|
*/
|
|
884
843
|
_getDragDropInfo: function _getDragDropInfo(event, appGroupId) {
|
|
885
844
|
try {
|
|
886
|
-
const
|
|
845
|
+
const _this6 = this;
|
|
887
846
|
const dragTile = event.getParameter?.("draggedControl"),
|
|
888
847
|
dropTile = event.getParameter?.("droppedControl"),
|
|
889
848
|
dropPosition = event.getParameter?.("dropPosition"),
|
|
890
849
|
dropControl = dragTile.getParent(),
|
|
891
850
|
dragItemIndex = dropControl.indexOfItem(dragTile),
|
|
892
851
|
dropItemIndex = dropControl.indexOfItem(dropTile),
|
|
893
|
-
dragItem =
|
|
894
|
-
dropItem =
|
|
852
|
+
dragItem = _this6._getTileItem(dragTile, appGroupId),
|
|
853
|
+
dropItem = _this6._getTileItem(dropTile, appGroupId);
|
|
895
854
|
const dragDropInfo = {
|
|
896
855
|
dragItem: dragItem,
|
|
897
856
|
dropItem: dropItem,
|
|
@@ -901,24 +860,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
901
860
|
dropItemIndex
|
|
902
861
|
};
|
|
903
862
|
//adjust drap drop info
|
|
904
|
-
const
|
|
863
|
+
const _temp1 = function () {
|
|
905
864
|
if (dragItemIndex !== dropItemIndex) {
|
|
906
|
-
const
|
|
865
|
+
const _temp0 = function () {
|
|
907
866
|
if (!(dragItem instanceof Group) && !(dropItem instanceof Group)) {
|
|
908
|
-
return Promise.resolve(
|
|
867
|
+
return Promise.resolve(_this6._adjustAppDragDropInfo(dragDropInfo, appGroupId)).then(function () {});
|
|
909
868
|
} else {
|
|
910
|
-
const
|
|
869
|
+
const _temp9 = function () {
|
|
911
870
|
if (dragItem instanceof Group) {
|
|
912
|
-
return Promise.resolve(
|
|
871
|
+
return Promise.resolve(_this6._adjustGroupDragDropInfo(dragDropInfo)).then(function () {});
|
|
913
872
|
}
|
|
914
873
|
}();
|
|
915
|
-
if (
|
|
874
|
+
if (_temp9 && _temp9.then) return _temp9.then(function () {});
|
|
916
875
|
}
|
|
917
876
|
}();
|
|
918
|
-
if (
|
|
877
|
+
if (_temp0 && _temp0.then) return _temp0.then(function () {});
|
|
919
878
|
}
|
|
920
879
|
}();
|
|
921
|
-
return Promise.resolve(
|
|
880
|
+
return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {
|
|
922
881
|
return dragDropInfo;
|
|
923
882
|
}) : dragDropInfo);
|
|
924
883
|
} catch (e) {
|
|
@@ -933,11 +892,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
933
892
|
*/
|
|
934
893
|
_adjustAppDragDropInfo: function _adjustAppDragDropInfo(dragDropInfo, appGroupId) {
|
|
935
894
|
try {
|
|
936
|
-
const
|
|
895
|
+
const _this7 = this;
|
|
937
896
|
let isUpdated = false;
|
|
938
897
|
const dragApp = dragDropInfo.dragItem;
|
|
939
898
|
const dropApp = dragDropInfo.dropItem;
|
|
940
|
-
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]) {
|
|
941
900
|
if (dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before) {
|
|
942
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
|
|
943
902
|
if (dragDropInfo.dragItemIndex === dragDropInfo.dropItemIndex - 1) {
|
|
@@ -958,7 +917,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
958
917
|
}
|
|
959
918
|
if (isUpdated) {
|
|
960
919
|
const tile = dragDropInfo.dropControl.getItems()[dragDropInfo.dropItemIndex];
|
|
961
|
-
const app =
|
|
920
|
+
const app = _this7._getTileItem(tile, appGroupId);
|
|
962
921
|
if (app) {
|
|
963
922
|
dragDropInfo.dropItem = app;
|
|
964
923
|
}
|
|
@@ -987,14 +946,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
987
946
|
*/
|
|
988
947
|
_adjustGroupDragDropInfo: function _adjustGroupDragDropInfo(dragDropInfo) {
|
|
989
948
|
try {
|
|
990
|
-
const
|
|
991
|
-
return Promise.resolve(
|
|
949
|
+
const _this8 = this;
|
|
950
|
+
return Promise.resolve(_this8.appManagerInstance._getSections()).then(function (sections) {
|
|
992
951
|
let dropGroupIndex;
|
|
993
952
|
dragDropInfo.dragItemIndex = sections.findIndex(section => section.id === dragDropInfo.dragItem.getGroupId());
|
|
994
953
|
|
|
995
954
|
//If dropped app is the first ungrouped app, put the group at the end
|
|
996
955
|
if (!(dragDropInfo.dropItem instanceof Group)) {
|
|
997
|
-
const lastGroupIndex =
|
|
956
|
+
const lastGroupIndex = _this8.getAggregation("groups").length;
|
|
998
957
|
dragDropInfo.dropItemIndex = dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before && dragDropInfo.dropItemIndex === lastGroupIndex && dragDropInfo.dragItemIndex !== lastGroupIndex ? lastGroupIndex + 1 : dragDropInfo.dragItemIndex;
|
|
999
958
|
} else {
|
|
1000
959
|
dropGroupIndex = sections.findIndex(section => section.id === dragDropInfo.dropItem.getGroupId());
|
|
@@ -1021,10 +980,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1021
980
|
*/
|
|
1022
981
|
_onFavItemDrop: function _onFavItemDrop(event, appGroupId) {
|
|
1023
982
|
try {
|
|
1024
|
-
const
|
|
983
|
+
const _this9 = this;
|
|
1025
984
|
const dragTile = event.getParameter?.("draggedControl");
|
|
1026
|
-
return Promise.resolve(
|
|
1027
|
-
function
|
|
985
|
+
return Promise.resolve(_this9._getDragDropInfo(event, appGroupId)).then(function (dragDropInfo) {
|
|
986
|
+
function _temp12() {
|
|
1028
987
|
dragTile.removeStyleClass("sapMGTPressActive");
|
|
1029
988
|
}
|
|
1030
989
|
const {
|
|
@@ -1035,29 +994,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1035
994
|
dropItem
|
|
1036
995
|
} = dragDropInfo;
|
|
1037
996
|
if (dragItemIndex === dropItemIndex) return;
|
|
1038
|
-
const
|
|
997
|
+
const _temp11 = function () {
|
|
1039
998
|
if (dropPosition === dnd.RelativeDropPosition.On) {
|
|
1040
|
-
return Promise.resolve(
|
|
1041
|
-
void
|
|
999
|
+
return Promise.resolve(_this9._handleOnItemDrop(dragItem, dropItem)).then(function () {
|
|
1000
|
+
void _this9.refresh();
|
|
1042
1001
|
});
|
|
1043
1002
|
} else {
|
|
1044
|
-
const
|
|
1003
|
+
const _temp10 = function () {
|
|
1045
1004
|
if (dropPosition === dnd.RelativeDropPosition.After || dropPosition === dnd.RelativeDropPosition.Before) {
|
|
1046
|
-
|
|
1047
|
-
return Promise.resolve(
|
|
1048
|
-
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 () {
|
|
1049
1008
|
if (appGroupId) {
|
|
1050
|
-
void
|
|
1009
|
+
void _this9._setGroupDetailDialogApps(appGroupId);
|
|
1051
1010
|
}
|
|
1052
|
-
|
|
1011
|
+
_this9._setBusy(false);
|
|
1053
1012
|
});
|
|
1054
1013
|
});
|
|
1055
1014
|
}
|
|
1056
1015
|
}();
|
|
1057
|
-
if (
|
|
1016
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
1058
1017
|
}
|
|
1059
1018
|
}();
|
|
1060
|
-
return
|
|
1019
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
1061
1020
|
});
|
|
1062
1021
|
} catch (e) {
|
|
1063
1022
|
return Promise.reject(e);
|
|
@@ -1074,25 +1033,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1074
1033
|
*/
|
|
1075
1034
|
_handleOnItemDrop: function _handleOnItemDrop(dragItem, dropItem) {
|
|
1076
1035
|
try {
|
|
1077
|
-
const
|
|
1036
|
+
const _this0 = this;
|
|
1078
1037
|
if (dragItem instanceof Group) return Promise.resolve();
|
|
1079
|
-
const
|
|
1038
|
+
const _temp13 = function () {
|
|
1080
1039
|
if (!(dropItem instanceof Group)) {
|
|
1081
1040
|
//if both dragged and dropped items are apps, create group dialog is opened.
|
|
1082
1041
|
const dragApp = dragItem;
|
|
1083
1042
|
const dropApp = dropItem;
|
|
1084
|
-
|
|
1085
|
-
|
|
1043
|
+
_this0._selectedApps = [dragApp, dropApp];
|
|
1044
|
+
_this0._openCreateGroupDialog(true);
|
|
1086
1045
|
} else {
|
|
1087
1046
|
//if dragged item is an app and dropped item is a group, app should be moved into that group.
|
|
1088
1047
|
const targetGroupId = dropItem.getGroupId();
|
|
1089
|
-
|
|
1090
|
-
return Promise.resolve(
|
|
1091
|
-
|
|
1048
|
+
_this0._setBusy(true);
|
|
1049
|
+
return Promise.resolve(_this0._handleMoveToGroup(dragItem, undefined, targetGroupId)).then(function () {
|
|
1050
|
+
_this0._setBusy(false);
|
|
1092
1051
|
});
|
|
1093
1052
|
}
|
|
1094
1053
|
}();
|
|
1095
|
-
return Promise.resolve(
|
|
1054
|
+
return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
|
|
1096
1055
|
} catch (e) {
|
|
1097
1056
|
return Promise.reject(e);
|
|
1098
1057
|
}
|
|
@@ -1105,7 +1064,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1105
1064
|
*/
|
|
1106
1065
|
_handleItemsReorder: function _handleItemsReorder(dragDropInfo, appGroupId) {
|
|
1107
1066
|
try {
|
|
1108
|
-
const
|
|
1067
|
+
const _this1 = this;
|
|
1109
1068
|
const {
|
|
1110
1069
|
dragItem,
|
|
1111
1070
|
dropItem,
|
|
@@ -1114,12 +1073,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1114
1073
|
} = dragDropInfo;
|
|
1115
1074
|
const isDragItemGroup = dragItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1116
1075
|
const isDropItemGroup = dropItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1117
|
-
const
|
|
1076
|
+
const _temp15 = function () {
|
|
1118
1077
|
if (!isDragItemGroup && !isDropItemGroup) {
|
|
1119
1078
|
const drapApp = dragItem;
|
|
1120
1079
|
const dropApp = dropItem;
|
|
1121
|
-
return Promise.resolve(Promise.all([
|
|
1122
|
-
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({
|
|
1123
1082
|
sourceSectionIndex: dragVisualization?.persConfig?.sectionIndex,
|
|
1124
1083
|
sourceVisualizationIndex: dragVisualization?.persConfig?.visualizationIndex,
|
|
1125
1084
|
targetSectionIndex: dropVisualization?.persConfig?.sectionIndex,
|
|
@@ -1127,15 +1086,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1127
1086
|
})).then(function () {});
|
|
1128
1087
|
});
|
|
1129
1088
|
} else {
|
|
1130
|
-
const
|
|
1089
|
+
const _temp14 = function () {
|
|
1131
1090
|
if (isDragItemGroup && isDropItemGroup) {
|
|
1132
|
-
return Promise.resolve(
|
|
1091
|
+
return Promise.resolve(_this1.appManagerInstance.moveSection(dragItemIndex, dropItemIndex)).then(function () {});
|
|
1133
1092
|
}
|
|
1134
1093
|
}();
|
|
1135
|
-
if (
|
|
1094
|
+
if (_temp14 && _temp14.then) return _temp14.then(function () {});
|
|
1136
1095
|
}
|
|
1137
1096
|
}();
|
|
1138
|
-
return Promise.resolve(
|
|
1097
|
+
return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
|
|
1139
1098
|
} catch (e) {
|
|
1140
1099
|
return Promise.reject(e);
|
|
1141
1100
|
}
|
|
@@ -1159,33 +1118,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1159
1118
|
target: {
|
|
1160
1119
|
shellHash: `Shell-appfinder?&/catalog/${JSON.stringify(navigationObject)}`
|
|
1161
1120
|
}
|
|
1162
|
-
})).then(function () {
|
|
1121
|
+
})).then(function () {
|
|
1122
|
+
addFESRNavigationSource(FESRNavigationSource.AppFinder);
|
|
1123
|
+
});
|
|
1163
1124
|
});
|
|
1164
1125
|
} catch (e) {
|
|
1165
1126
|
return Promise.reject(e);
|
|
1166
1127
|
}
|
|
1167
1128
|
},
|
|
1168
|
-
/**
|
|
1169
|
-
* Validates if import apps is enabled
|
|
1170
|
-
*
|
|
1171
|
-
*@returns {Promise} - resolves to boolean value (import is enabled/disabled)
|
|
1172
|
-
*/
|
|
1173
|
-
_validateAppsMigration: function _validateAppsMigration() {
|
|
1174
|
-
try {
|
|
1175
|
-
return Promise.resolve(_catch(function () {
|
|
1176
|
-
return Promise.resolve(MyHomeImport.isImportEnabled());
|
|
1177
|
-
}, function (error) {
|
|
1178
|
-
Log.warning(error instanceof Error ? error.message : "Error while checking if import apps is enabled");
|
|
1179
|
-
return false;
|
|
1180
|
-
}));
|
|
1181
|
-
} catch (e) {
|
|
1182
|
-
return Promise.reject(e);
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
|
-
_openImportAppsDialog: function _openImportAppsDialog() {
|
|
1186
|
-
const pageRuntime = new PageRuntime();
|
|
1187
|
-
pageRuntime.onImportDialogPress();
|
|
1188
|
-
},
|
|
1189
1129
|
/**
|
|
1190
1130
|
* Opens the create group dialog.
|
|
1191
1131
|
* @private
|
|
@@ -1559,49 +1499,49 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1559
1499
|
*/
|
|
1560
1500
|
_onPressGroupCreate: function _onPressGroupCreate() {
|
|
1561
1501
|
try {
|
|
1562
|
-
const
|
|
1563
|
-
const groupNameInput =
|
|
1564
|
-
const
|
|
1565
|
-
if (
|
|
1566
|
-
const
|
|
1567
|
-
if (
|
|
1568
|
-
|
|
1569
|
-
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 () {
|
|
1570
1510
|
return _catch(function () {
|
|
1571
|
-
return Promise.resolve(
|
|
1572
|
-
selectedApps:
|
|
1511
|
+
return Promise.resolve(_this10._createGroup({
|
|
1512
|
+
selectedApps: _this10._selectedApps,
|
|
1573
1513
|
groupName: groupNameInput.getValue(),
|
|
1574
|
-
groupColor:
|
|
1514
|
+
groupColor: _this10._getGroupColor()
|
|
1575
1515
|
})).then(function () {
|
|
1576
|
-
return Promise.resolve(
|
|
1516
|
+
return Promise.resolve(_this10.refresh()).then(function () {
|
|
1577
1517
|
// Show toast message after successful group creation
|
|
1578
|
-
MessageToast.show(
|
|
1579
|
-
of:
|
|
1518
|
+
MessageToast.show(_this10._i18nBundle.getText("newGroupCreated"), {
|
|
1519
|
+
of: _this10._controlMap.get(`${_this10.getId()}-createGroupDialog`),
|
|
1580
1520
|
offset: "0 80"
|
|
1581
1521
|
});
|
|
1582
|
-
const groups =
|
|
1583
|
-
void
|
|
1522
|
+
const groups = _this10.getAggregation("groups") || [];
|
|
1523
|
+
void _this10._showGroupDetailDialog(groups[0]?.getGroupId());
|
|
1584
1524
|
});
|
|
1585
1525
|
});
|
|
1586
1526
|
}, function (err) {
|
|
1587
1527
|
Log.error(err);
|
|
1588
|
-
MessageToast.show(
|
|
1528
|
+
MessageToast.show(_this10._i18nBundle.getText("unableToCreateGroup"));
|
|
1589
1529
|
});
|
|
1590
1530
|
}, function (_wasThrown, _result2) {
|
|
1591
|
-
|
|
1592
|
-
|
|
1531
|
+
_this10._setBusy(false);
|
|
1532
|
+
_this10._closeCreateGroupDialog();
|
|
1593
1533
|
if (_wasThrown) throw _result2;
|
|
1594
1534
|
return _result2;
|
|
1595
1535
|
});
|
|
1596
|
-
if (
|
|
1536
|
+
if (_temp16 && _temp16.then) return _temp16.then(function () {});
|
|
1597
1537
|
} else {
|
|
1598
|
-
|
|
1538
|
+
_this10._setNoAppsSelectedError(true);
|
|
1599
1539
|
}
|
|
1600
1540
|
}();
|
|
1601
|
-
if (
|
|
1541
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
|
1602
1542
|
}
|
|
1603
1543
|
}();
|
|
1604
|
-
return Promise.resolve(
|
|
1544
|
+
return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(function () {}) : void 0);
|
|
1605
1545
|
} catch (e) {
|
|
1606
1546
|
return Promise.reject(e);
|
|
1607
1547
|
}
|
|
@@ -1616,13 +1556,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1616
1556
|
*/
|
|
1617
1557
|
_createGroup: function _createGroup(params) {
|
|
1618
1558
|
try {
|
|
1619
|
-
const
|
|
1559
|
+
const _this11 = this;
|
|
1620
1560
|
const {
|
|
1621
1561
|
selectedApps,
|
|
1622
1562
|
groupName,
|
|
1623
1563
|
groupColor
|
|
1624
1564
|
} = params;
|
|
1625
|
-
return Promise.resolve(
|
|
1565
|
+
return Promise.resolve(_this11.appManagerInstance.getSectionVisualizations()).then(function (sectionVisualizations) {
|
|
1626
1566
|
const visualizations = selectedApps.reduce((selectedVisualizations, oApp) => {
|
|
1627
1567
|
const sectionVisualization = sectionVisualizations.find(oSectionViz => oSectionViz.url === oApp.getUrl());
|
|
1628
1568
|
if (sectionVisualization) {
|
|
@@ -1631,10 +1571,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1631
1571
|
return selectedVisualizations;
|
|
1632
1572
|
}, []);
|
|
1633
1573
|
const sectionId = visualizations[0].persConfig.sectionId;
|
|
1634
|
-
return Promise.resolve(
|
|
1574
|
+
return Promise.resolve(_this11.appManagerInstance.addSection({
|
|
1635
1575
|
sectionIndex: 1,
|
|
1636
1576
|
sectionProperties: {
|
|
1637
|
-
title: groupName ||
|
|
1577
|
+
title: groupName || _this11._i18nBundle.getText("newGroup"),
|
|
1638
1578
|
visible: true,
|
|
1639
1579
|
visualizations: visualizations.map(viz => viz.visualization)
|
|
1640
1580
|
}
|
|
@@ -1646,21 +1586,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1646
1586
|
}
|
|
1647
1587
|
return visualizationsToBeDeleted;
|
|
1648
1588
|
}, []);
|
|
1649
|
-
return Promise.resolve(
|
|
1589
|
+
return Promise.resolve(_this11.appManagerInstance.removeVisualizations({
|
|
1650
1590
|
sectionId,
|
|
1651
1591
|
vizIds: visualizationsToBeDeleted
|
|
1652
1592
|
})).then(function () {
|
|
1653
|
-
return Promise.resolve(
|
|
1593
|
+
return Promise.resolve(_this11.appManagerInstance._getSections(true)).then(function (sections) {
|
|
1654
1594
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
1655
1595
|
const targetGroupId = sections[defaultSection ? 1 : 0]?.id;
|
|
1656
1596
|
//update personalization
|
|
1657
|
-
return Promise.resolve(
|
|
1597
|
+
return Promise.resolve(_this11._updateAppPersonalization(visualizations.map(oViz => {
|
|
1658
1598
|
return {
|
|
1659
1599
|
visualization: oViz,
|
|
1660
1600
|
targetGroupId
|
|
1661
1601
|
};
|
|
1662
1602
|
}))).then(function () {
|
|
1663
|
-
return Promise.resolve(
|
|
1603
|
+
return Promise.resolve(_this11._updateGroupPersonalization(targetGroupId, groupColor)).then(function () {});
|
|
1664
1604
|
});
|
|
1665
1605
|
});
|
|
1666
1606
|
});
|
|
@@ -1720,44 +1660,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1720
1660
|
*/
|
|
1721
1661
|
_handleColorSelect: function _handleColorSelect(item, color) {
|
|
1722
1662
|
try {
|
|
1723
|
-
const
|
|
1724
|
-
function
|
|
1725
|
-
|
|
1663
|
+
const _this12 = this;
|
|
1664
|
+
function _temp20() {
|
|
1665
|
+
_this12.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1726
1666
|
item,
|
|
1727
1667
|
color
|
|
1728
1668
|
});
|
|
1729
1669
|
}
|
|
1730
|
-
const selectedColor =
|
|
1670
|
+
const selectedColor = _this12._getLegendColor(color).key;
|
|
1731
1671
|
item.setProperty("bgColor", selectedColor, true);
|
|
1732
1672
|
const groupId = item instanceof Group ? item.getGroupId() : null;
|
|
1733
1673
|
const isGroupedApp = !groupId && item.getParent() instanceof Group;
|
|
1734
1674
|
|
|
1735
1675
|
//update tile color
|
|
1736
1676
|
if (isGroupedApp) {
|
|
1737
|
-
|
|
1677
|
+
_this12._refreshGroupDetailDialog(item, false);
|
|
1738
1678
|
} else {
|
|
1739
1679
|
//if ungroup app or group
|
|
1740
|
-
|
|
1741
|
-
|
|
1680
|
+
_this12._applyUngroupedTileColor(item, color);
|
|
1681
|
+
_this12.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1742
1682
|
item,
|
|
1743
1683
|
color
|
|
1744
1684
|
});
|
|
1745
1685
|
}
|
|
1746
1686
|
|
|
1747
1687
|
//update personalization
|
|
1748
|
-
const
|
|
1688
|
+
const _temp19 = function () {
|
|
1749
1689
|
if (groupId) {
|
|
1750
1690
|
//if group
|
|
1751
|
-
void
|
|
1752
|
-
const groupIconControl =
|
|
1691
|
+
void _this12._updateGroupPersonalization(groupId, selectedColor);
|
|
1692
|
+
const groupIconControl = _this12._controlMap.get(`${_this12.getId()}-detailDialog-toolbar-color`);
|
|
1753
1693
|
groupIconControl?.setColor(color);
|
|
1754
1694
|
} else {
|
|
1755
1695
|
//if app
|
|
1756
1696
|
const app = item;
|
|
1757
1697
|
const groupId = isGroupedApp ? app.getParent().getGroupId() : undefined;
|
|
1758
|
-
return Promise.resolve(
|
|
1698
|
+
return Promise.resolve(_this12.appManagerInstance.getVisualization(app.getUrl(), groupId)).then(function (visualization) {
|
|
1759
1699
|
if (visualization) {
|
|
1760
|
-
void
|
|
1700
|
+
void _this12._updateAppPersonalization([{
|
|
1761
1701
|
visualization,
|
|
1762
1702
|
color: selectedColor
|
|
1763
1703
|
}]);
|
|
@@ -1765,7 +1705,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1765
1705
|
});
|
|
1766
1706
|
}
|
|
1767
1707
|
}();
|
|
1768
|
-
return Promise.resolve(
|
|
1708
|
+
return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
|
|
1769
1709
|
} catch (e) {
|
|
1770
1710
|
return Promise.reject(e);
|
|
1771
1711
|
}
|
|
@@ -1839,7 +1779,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1839
1779
|
* @private
|
|
1840
1780
|
*/
|
|
1841
1781
|
_handleRemove: function _handleRemove(app, group) {
|
|
1842
|
-
const
|
|
1782
|
+
const _this13 = this;
|
|
1843
1783
|
const lastAppInGroup = group?.getApps()?.length === 1;
|
|
1844
1784
|
let message = this._i18nBundle.getText("removeAppMessage", [app.getTitle()]),
|
|
1845
1785
|
title = this._i18nBundle.getText("remove"),
|
|
@@ -1858,34 +1798,34 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1858
1798
|
emphasizedAction: actionText,
|
|
1859
1799
|
onClose: function (action) {
|
|
1860
1800
|
try {
|
|
1861
|
-
const
|
|
1801
|
+
const _temp22 = function () {
|
|
1862
1802
|
if (action === actionText) {
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1803
|
+
_this13._setBusy(true);
|
|
1804
|
+
const _temp21 = _finallyRethrows(function () {
|
|
1865
1805
|
return _catch(function () {
|
|
1866
|
-
return Promise.resolve(
|
|
1806
|
+
return Promise.resolve(_this13._removeApp(app, group)).then(function () {
|
|
1867
1807
|
if (lastAppInGroup) {
|
|
1868
|
-
|
|
1808
|
+
_this13._closeGroupDetailDialog();
|
|
1869
1809
|
} else if (group) {
|
|
1870
|
-
|
|
1810
|
+
_this13._refreshGroupDetailDialog(app);
|
|
1871
1811
|
}
|
|
1872
|
-
return Promise.resolve(
|
|
1873
|
-
MessageToast.show(
|
|
1812
|
+
return Promise.resolve(_this13.getParent()._refreshAllPanels()).then(function () {
|
|
1813
|
+
MessageToast.show(_this13._i18nBundle.getText("appRemoved"));
|
|
1874
1814
|
});
|
|
1875
1815
|
});
|
|
1876
1816
|
}, function (err) {
|
|
1877
1817
|
Log.error(err);
|
|
1878
|
-
MessageToast.show(
|
|
1818
|
+
MessageToast.show(_this13._i18nBundle.getText("unableToRemoveApp"));
|
|
1879
1819
|
});
|
|
1880
1820
|
}, function (_wasThrown2, _result3) {
|
|
1881
|
-
|
|
1821
|
+
_this13._setBusy(false);
|
|
1882
1822
|
if (_wasThrown2) throw _result3;
|
|
1883
1823
|
return _result3;
|
|
1884
1824
|
});
|
|
1885
|
-
if (
|
|
1825
|
+
if (_temp21 && _temp21.then) return _temp21.then(function () {});
|
|
1886
1826
|
}
|
|
1887
1827
|
}();
|
|
1888
|
-
return Promise.resolve(
|
|
1828
|
+
return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(function () {}) : void 0);
|
|
1889
1829
|
} catch (e) {
|
|
1890
1830
|
return Promise.reject(e);
|
|
1891
1831
|
}
|
|
@@ -1903,28 +1843,28 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1903
1843
|
*/
|
|
1904
1844
|
_removeApp: function _removeApp(app, group) {
|
|
1905
1845
|
try {
|
|
1906
|
-
const
|
|
1846
|
+
const _this14 = this;
|
|
1907
1847
|
const lastAppInGroup = group?.getApps()?.length === 1,
|
|
1908
1848
|
groupId = group?.getGroupId(),
|
|
1909
1849
|
appId = app.getUrl();
|
|
1910
|
-
return Promise.resolve(
|
|
1911
|
-
const
|
|
1850
|
+
return Promise.resolve(_this14.appManagerInstance.getVisualization(appId, groupId)).then(function (viz) {
|
|
1851
|
+
const _temp24 = function () {
|
|
1912
1852
|
if (lastAppInGroup) {
|
|
1913
1853
|
//if last app in group, then delete the group as well
|
|
1914
|
-
return Promise.resolve(
|
|
1854
|
+
return Promise.resolve(_this14._deleteGroup(groupId)).then(function () {});
|
|
1915
1855
|
} else {
|
|
1916
1856
|
let visualizationsToBeDeleted = [viz?.visualization?.id];
|
|
1917
1857
|
if (!groupId) {
|
|
1918
1858
|
//for apps outside group i.e. for favorite apps delete duplicate apps as well
|
|
1919
1859
|
visualizationsToBeDeleted = visualizationsToBeDeleted.concat(viz?.persConfig?.duplicateApps?.map(viz => viz.visualization?.id));
|
|
1920
1860
|
}
|
|
1921
|
-
const
|
|
1861
|
+
const _temp23 = function () {
|
|
1922
1862
|
if (viz?.persConfig?.sectionId && visualizationsToBeDeleted.length > 0) {
|
|
1923
|
-
return Promise.resolve(
|
|
1863
|
+
return Promise.resolve(_this14.appManagerInstance.removeVisualizations({
|
|
1924
1864
|
sectionId: viz.persConfig.sectionId,
|
|
1925
1865
|
vizIds: visualizationsToBeDeleted
|
|
1926
1866
|
})).then(function () {
|
|
1927
|
-
void
|
|
1867
|
+
void _this14._deletePersonalization({
|
|
1928
1868
|
appId: appId,
|
|
1929
1869
|
oldAppId: viz?.oldAppId,
|
|
1930
1870
|
sectionId: viz?.persConfig?.sectionId,
|
|
@@ -1933,10 +1873,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1933
1873
|
});
|
|
1934
1874
|
}
|
|
1935
1875
|
}();
|
|
1936
|
-
if (
|
|
1876
|
+
if (_temp23 && _temp23.then) return _temp23.then(function () {});
|
|
1937
1877
|
}
|
|
1938
1878
|
}();
|
|
1939
|
-
if (
|
|
1879
|
+
if (_temp24 && _temp24.then) return _temp24.then(function () {});
|
|
1940
1880
|
});
|
|
1941
1881
|
} catch (e) {
|
|
1942
1882
|
return Promise.reject(e);
|
|
@@ -1951,13 +1891,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1951
1891
|
*/
|
|
1952
1892
|
_handleMoveToGroup: function _handleMoveToGroup(app, sourceGroupId, targetGroupId) {
|
|
1953
1893
|
try {
|
|
1954
|
-
const
|
|
1955
|
-
const sourceGroup = sourceGroupId ?
|
|
1894
|
+
const _this15 = this;
|
|
1895
|
+
const sourceGroup = sourceGroupId ? _this15._getGroup(sourceGroupId) : undefined,
|
|
1956
1896
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1957
|
-
const
|
|
1897
|
+
const _temp25 = function () {
|
|
1958
1898
|
if (isLastAppInGroup) {
|
|
1959
|
-
const confirmationMessage =
|
|
1960
|
-
const confirmationTitle =
|
|
1899
|
+
const confirmationMessage = _this15._i18nBundle.getText("moveAppMessage", [app.getTitle()]);
|
|
1900
|
+
const confirmationTitle = _this15._i18nBundle.getText("delete");
|
|
1961
1901
|
MessageBox.show(confirmationMessage, {
|
|
1962
1902
|
icon: MessageBox.Icon.WARNING,
|
|
1963
1903
|
title: confirmationTitle,
|
|
@@ -1965,15 +1905,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1965
1905
|
emphasizedAction: confirmationTitle,
|
|
1966
1906
|
onClose: action => {
|
|
1967
1907
|
if (action === confirmationTitle) {
|
|
1968
|
-
void
|
|
1908
|
+
void _this15._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId);
|
|
1969
1909
|
}
|
|
1970
1910
|
}
|
|
1971
1911
|
});
|
|
1972
1912
|
} else {
|
|
1973
|
-
return Promise.resolve(
|
|
1913
|
+
return Promise.resolve(_this15._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId)).then(function () {});
|
|
1974
1914
|
}
|
|
1975
1915
|
}();
|
|
1976
|
-
return Promise.resolve(
|
|
1916
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(function () {}) : void 0);
|
|
1977
1917
|
} catch (e) {
|
|
1978
1918
|
return Promise.reject(e);
|
|
1979
1919
|
}
|
|
@@ -1988,41 +1928,41 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1988
1928
|
*/
|
|
1989
1929
|
_moveAppAndHandleGroupChanges: function _moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId) {
|
|
1990
1930
|
try {
|
|
1991
|
-
const
|
|
1992
|
-
const sourceGroup = sourceGroupId ?
|
|
1993
|
-
targetGroup = targetGroupId ?
|
|
1931
|
+
const _this16 = this;
|
|
1932
|
+
const sourceGroup = sourceGroupId ? _this16._getGroup(sourceGroupId) : null,
|
|
1933
|
+
targetGroup = targetGroupId ? _this16._getGroup(targetGroupId) : null,
|
|
1994
1934
|
sTargetGroupTile = targetGroup?.getTitle(),
|
|
1995
1935
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1996
|
-
const
|
|
1936
|
+
const _temp28 = _finallyRethrows(function () {
|
|
1997
1937
|
return _catch(function () {
|
|
1998
|
-
|
|
1999
|
-
return Promise.resolve(
|
|
2000
|
-
function
|
|
2001
|
-
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");
|
|
2002
1942
|
MessageToast.show(sMsg);
|
|
2003
|
-
return Promise.resolve(
|
|
1943
|
+
return Promise.resolve(_this16.refresh()).then(function () {});
|
|
2004
1944
|
}
|
|
2005
|
-
const
|
|
1945
|
+
const _temp26 = function () {
|
|
2006
1946
|
if (isLastAppInGroup) {
|
|
2007
|
-
return Promise.resolve(
|
|
2008
|
-
|
|
1947
|
+
return Promise.resolve(_this16._deleteGroup(sourceGroupId)).then(function () {
|
|
1948
|
+
_this16._closeGroupDetailDialog();
|
|
2009
1949
|
});
|
|
2010
1950
|
} else if (sourceGroupId) {
|
|
2011
|
-
|
|
1951
|
+
_this16._refreshGroupDetailDialog(app);
|
|
2012
1952
|
}
|
|
2013
1953
|
}();
|
|
2014
1954
|
//delete group, if it is the last app in the group
|
|
2015
|
-
return
|
|
1955
|
+
return _temp26 && _temp26.then ? _temp26.then(_temp27) : _temp27(_temp26);
|
|
2016
1956
|
});
|
|
2017
1957
|
}, function (error) {
|
|
2018
1958
|
Log.error(error);
|
|
2019
1959
|
});
|
|
2020
1960
|
}, function (_wasThrown3, _result4) {
|
|
2021
|
-
|
|
1961
|
+
_this16._setBusy(false);
|
|
2022
1962
|
if (_wasThrown3) throw _result4;
|
|
2023
1963
|
return _result4;
|
|
2024
1964
|
});
|
|
2025
|
-
return Promise.resolve(
|
|
1965
|
+
return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(function () {}) : void 0);
|
|
2026
1966
|
} catch (e) {
|
|
2027
1967
|
return Promise.reject(e);
|
|
2028
1968
|
}
|
|
@@ -2066,52 +2006,52 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2066
2006
|
*/
|
|
2067
2007
|
_moveAppToGroup: function _moveAppToGroup(app, sourceGroupId, targetGroupId) {
|
|
2068
2008
|
try {
|
|
2069
|
-
const
|
|
2009
|
+
const _this17 = this;
|
|
2070
2010
|
const appId = app.getUrl();
|
|
2071
|
-
return Promise.resolve(Promise.all([
|
|
2011
|
+
return Promise.resolve(Promise.all([_this17.appManagerInstance.getSectionVisualizations(sourceGroupId), _this17.appManagerInstance._getSections()])).then(function ([visualizations, sections]) {
|
|
2072
2012
|
const sourceVisualization = visualizations.find(oViz => oViz.url === appId),
|
|
2073
2013
|
sourceVisualizationIndex = sourceVisualization?.persConfig?.visualizationIndex ?? -1,
|
|
2074
2014
|
sourceSectionIndex = sourceVisualization?.persConfig?.sectionIndex;
|
|
2075
2015
|
const isTargetGroupDefault = !targetGroupId; //if group id is not passed, then we consider it as default section
|
|
2076
2016
|
const isSourceGroupDefault = !sourceGroupId;
|
|
2077
2017
|
const targetSectionIndex = sections.findIndex(section => !targetGroupId ? section.default : section.id === targetGroupId);
|
|
2078
|
-
const
|
|
2018
|
+
const _temp33 = function () {
|
|
2079
2019
|
if (sourceVisualization) {
|
|
2080
|
-
function
|
|
2081
|
-
return Promise.resolve(
|
|
2020
|
+
function _temp32() {
|
|
2021
|
+
return Promise.resolve(_this17.appManagerInstance._getSections(true)).then(function (sections) {
|
|
2082
2022
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
2083
|
-
return Promise.resolve(
|
|
2023
|
+
return Promise.resolve(_this17._updateAppPersonalization([{
|
|
2084
2024
|
visualization: sourceVisualization,
|
|
2085
2025
|
targetGroupId: targetGroupId ?? defaultSection?.id,
|
|
2086
2026
|
isTargetGroupDefault
|
|
2087
2027
|
}])).then(function () {});
|
|
2088
2028
|
});
|
|
2089
2029
|
}
|
|
2090
|
-
const
|
|
2030
|
+
const _temp31 = function () {
|
|
2091
2031
|
if (isTargetGroupDefault) {
|
|
2092
|
-
return Promise.resolve(
|
|
2032
|
+
return Promise.resolve(_this17._moveAppToDefaultGroup(sourceVisualization)).then(function () {});
|
|
2093
2033
|
} else {
|
|
2094
|
-
function
|
|
2095
|
-
return Promise.resolve(
|
|
2034
|
+
function _temp30() {
|
|
2035
|
+
return Promise.resolve(_this17.appManagerInstance.moveVisualization({
|
|
2096
2036
|
sourceSectionIndex: sourceSectionIndex,
|
|
2097
2037
|
sourceVisualizationIndex: sourceVisualizationIndex,
|
|
2098
2038
|
targetSectionIndex: targetSectionIndex,
|
|
2099
2039
|
targetVisualizationIndex: -1
|
|
2100
2040
|
})).then(function () {});
|
|
2101
2041
|
}
|
|
2102
|
-
const
|
|
2042
|
+
const _temp29 = function () {
|
|
2103
2043
|
if (isSourceGroupDefault) {
|
|
2104
2044
|
//remove duplicate apps
|
|
2105
|
-
return Promise.resolve(
|
|
2045
|
+
return Promise.resolve(_this17._removeDuplicateVisualizations(sourceVisualization)).then(function () {});
|
|
2106
2046
|
}
|
|
2107
2047
|
}();
|
|
2108
|
-
return
|
|
2048
|
+
return _temp29 && _temp29.then ? _temp29.then(_temp30) : _temp30(_temp29);
|
|
2109
2049
|
}
|
|
2110
2050
|
}();
|
|
2111
|
-
return
|
|
2051
|
+
return _temp31 && _temp31.then ? _temp31.then(_temp32) : _temp32(_temp31);
|
|
2112
2052
|
}
|
|
2113
2053
|
}();
|
|
2114
|
-
if (
|
|
2054
|
+
if (_temp33 && _temp33.then) return _temp33.then(function () {});
|
|
2115
2055
|
});
|
|
2116
2056
|
} catch (e) {
|
|
2117
2057
|
return Promise.reject(e);
|
|
@@ -2125,17 +2065,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2125
2065
|
*/
|
|
2126
2066
|
_moveAppToDefaultGroup: function _moveAppToDefaultGroup(visualization) {
|
|
2127
2067
|
try {
|
|
2128
|
-
const
|
|
2129
|
-
return Promise.resolve(
|
|
2130
|
-
const
|
|
2068
|
+
const _this18 = this;
|
|
2069
|
+
return Promise.resolve(_this18._addVisualization(visualization)).then(function () {
|
|
2070
|
+
const _temp34 = function () {
|
|
2131
2071
|
if (visualization.persConfig?.sectionId && visualization.visualization?.id) {
|
|
2132
|
-
return Promise.resolve(
|
|
2072
|
+
return Promise.resolve(_this18.appManagerInstance.removeVisualizations({
|
|
2133
2073
|
sectionId: visualization.persConfig?.sectionId,
|
|
2134
2074
|
vizIds: [visualization.visualization?.id]
|
|
2135
2075
|
})).then(function () {});
|
|
2136
2076
|
}
|
|
2137
2077
|
}();
|
|
2138
|
-
if (
|
|
2078
|
+
if (_temp34 && _temp34.then) return _temp34.then(function () {});
|
|
2139
2079
|
});
|
|
2140
2080
|
} catch (e) {
|
|
2141
2081
|
return Promise.reject(e);
|
|
@@ -2149,17 +2089,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2149
2089
|
*/
|
|
2150
2090
|
_removeDuplicateVisualizations: function _removeDuplicateVisualizations(visualization) {
|
|
2151
2091
|
try {
|
|
2152
|
-
const
|
|
2092
|
+
const _this19 = this;
|
|
2153
2093
|
const vizIdsToBeDeleted = visualization?.persConfig?.duplicateApps?.map(oViz => oViz.visualization?.id) || [];
|
|
2154
|
-
const
|
|
2094
|
+
const _temp35 = function () {
|
|
2155
2095
|
if (visualization.persConfig?.sectionId && vizIdsToBeDeleted.length > 0) {
|
|
2156
|
-
return Promise.resolve(
|
|
2096
|
+
return Promise.resolve(_this19.appManagerInstance.removeVisualizations({
|
|
2157
2097
|
sectionId: visualization.persConfig?.sectionId,
|
|
2158
2098
|
vizIds: vizIdsToBeDeleted
|
|
2159
2099
|
})).then(function () {});
|
|
2160
2100
|
}
|
|
2161
2101
|
}();
|
|
2162
|
-
return Promise.resolve(
|
|
2102
|
+
return Promise.resolve(_temp35 && _temp35.then ? _temp35.then(function () {}) : void 0);
|
|
2163
2103
|
} catch (e) {
|
|
2164
2104
|
return Promise.reject(e);
|
|
2165
2105
|
}
|
|
@@ -2202,7 +2142,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2202
2142
|
* @param {sap.ui.base.Event} event - The event object.
|
|
2203
2143
|
*/
|
|
2204
2144
|
_onDeleteGroup: function _onDeleteGroup(event) {
|
|
2205
|
-
const
|
|
2145
|
+
const _this20 = this;
|
|
2206
2146
|
const group = event.getSource()?.getParent(),
|
|
2207
2147
|
message = this._i18nBundle.getText("deleteGroupMessage", [group.getTitle()]),
|
|
2208
2148
|
title = this._i18nBundle.getText("delete"),
|
|
@@ -2215,20 +2155,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2215
2155
|
emphasizedAction: deleteAction,
|
|
2216
2156
|
onClose: function (action) {
|
|
2217
2157
|
try {
|
|
2218
|
-
const
|
|
2158
|
+
const _temp36 = function () {
|
|
2219
2159
|
if (action === deleteAction) {
|
|
2220
|
-
|
|
2221
|
-
return Promise.resolve(
|
|
2222
|
-
MessageToast.show(
|
|
2223
|
-
void
|
|
2224
|
-
|
|
2225
|
-
|
|
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);
|
|
2226
2166
|
});
|
|
2227
2167
|
} else if (action === moveAppAction) {
|
|
2228
|
-
void
|
|
2168
|
+
void _this20._ungroupApps(group.getGroupId());
|
|
2229
2169
|
}
|
|
2230
2170
|
}();
|
|
2231
|
-
return Promise.resolve(
|
|
2171
|
+
return Promise.resolve(_temp36 && _temp36.then ? _temp36.then(function () {}) : void 0);
|
|
2232
2172
|
} catch (e) {
|
|
2233
2173
|
return Promise.reject(e);
|
|
2234
2174
|
}
|
|
@@ -2244,40 +2184,40 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2244
2184
|
*/
|
|
2245
2185
|
_ungroupApps: function _ungroupApps(groupId) {
|
|
2246
2186
|
try {
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2249
|
-
const
|
|
2187
|
+
const _this21 = this;
|
|
2188
|
+
_this21._setBusy(true);
|
|
2189
|
+
const _temp39 = _finallyRethrows(function () {
|
|
2250
2190
|
return _catch(function () {
|
|
2251
|
-
return Promise.resolve(
|
|
2252
|
-
return Promise.resolve(
|
|
2191
|
+
return Promise.resolve(_this21.appManagerInstance.getSectionVisualizations(groupId)).then(function (visualizations) {
|
|
2192
|
+
return Promise.resolve(_this21.appManagerInstance._getSections()).then(function (sections) {
|
|
2253
2193
|
const section = sections.find(oSection => oSection.id === groupId);
|
|
2254
|
-
return Promise.resolve(Promise.all(visualizations.map(oViz =>
|
|
2255
|
-
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) {
|
|
2256
2196
|
const defaultSection = updatedSections.find(oSection => oSection.default);
|
|
2257
2197
|
//update personalization
|
|
2258
2198
|
//if preset section, then section shouldn't be deleted, instead remove visualizations inside section
|
|
2259
|
-
return Promise.resolve(
|
|
2199
|
+
return Promise.resolve(_this21._updateAppPersonalization(visualizations.map(oViz => {
|
|
2260
2200
|
return {
|
|
2261
2201
|
visualization: oViz,
|
|
2262
2202
|
targetGroupId: defaultSection?.id,
|
|
2263
2203
|
isTargetGroupDefault: true
|
|
2264
2204
|
};
|
|
2265
2205
|
}))).then(function () {
|
|
2266
|
-
function
|
|
2267
|
-
MessageToast.show(
|
|
2268
|
-
return Promise.resolve(
|
|
2206
|
+
function _temp38() {
|
|
2207
|
+
MessageToast.show(_this21._i18nBundle.getText("appsUngrouped") ?? "");
|
|
2208
|
+
return Promise.resolve(_this21.refresh()).then(function () {});
|
|
2269
2209
|
}
|
|
2270
|
-
const
|
|
2210
|
+
const _temp37 = function () {
|
|
2271
2211
|
if (section?.preset) {
|
|
2272
|
-
return Promise.resolve(
|
|
2212
|
+
return Promise.resolve(_this21.appManagerInstance.removeVisualizations({
|
|
2273
2213
|
sectionId: groupId,
|
|
2274
2214
|
vizIds: visualizations.map(oViz => oViz.visualization?.id)
|
|
2275
2215
|
})).then(function () {});
|
|
2276
2216
|
} else {
|
|
2277
|
-
return Promise.resolve(
|
|
2217
|
+
return Promise.resolve(_this21._deleteGroup(groupId)).then(function () {});
|
|
2278
2218
|
}
|
|
2279
2219
|
}();
|
|
2280
|
-
return
|
|
2220
|
+
return _temp37 && _temp37.then ? _temp37.then(_temp38) : _temp38(_temp37);
|
|
2281
2221
|
});
|
|
2282
2222
|
});
|
|
2283
2223
|
});
|
|
@@ -2285,15 +2225,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2285
2225
|
});
|
|
2286
2226
|
}, function (error) {
|
|
2287
2227
|
Log.error(error);
|
|
2288
|
-
MessageToast.show(
|
|
2228
|
+
MessageToast.show(_this21._i18nBundle.getText("unableToUngroupApps") ?? "");
|
|
2289
2229
|
});
|
|
2290
2230
|
}, function (_wasThrown4, _result5) {
|
|
2291
|
-
|
|
2292
|
-
|
|
2231
|
+
_this21._setBusy(false);
|
|
2232
|
+
_this21._closeGroupDetailDialog();
|
|
2293
2233
|
if (_wasThrown4) throw _result5;
|
|
2294
2234
|
return _result5;
|
|
2295
2235
|
});
|
|
2296
|
-
return Promise.resolve(
|
|
2236
|
+
return Promise.resolve(_temp39 && _temp39.then ? _temp39.then(function () {}) : void 0);
|
|
2297
2237
|
} catch (e) {
|
|
2298
2238
|
return Promise.reject(e);
|
|
2299
2239
|
}
|
|
@@ -2307,23 +2247,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2307
2247
|
*/
|
|
2308
2248
|
_showGroupDetailDialog: function _showGroupDetailDialog(groupId, editMode = false) {
|
|
2309
2249
|
try {
|
|
2310
|
-
const
|
|
2311
|
-
const group =
|
|
2250
|
+
const _this22 = this;
|
|
2251
|
+
const group = _this22._getGroup(groupId);
|
|
2312
2252
|
if (!group) {
|
|
2313
2253
|
return Promise.resolve();
|
|
2314
2254
|
}
|
|
2315
|
-
|
|
2316
|
-
const dialog =
|
|
2255
|
+
_this22._selectedGroupId = groupId;
|
|
2256
|
+
const dialog = _this22._generateGroupDetailDialog();
|
|
2317
2257
|
//set group icon
|
|
2318
|
-
const groupIconControl =
|
|
2258
|
+
const groupIconControl = _this22._controlMap.get(`${_this22.getId()}-detailDialog-toolbar-color`);
|
|
2319
2259
|
groupIconControl.setColor(Parameters.get({
|
|
2320
2260
|
name: group.getBgColor()
|
|
2321
2261
|
}));
|
|
2322
2262
|
//set group apps
|
|
2323
|
-
return Promise.resolve(
|
|
2263
|
+
return Promise.resolve(_this22._setGroupDetailDialogApps(groupId)).then(function () {
|
|
2324
2264
|
dialog.open();
|
|
2325
2265
|
//set group title
|
|
2326
|
-
|
|
2266
|
+
_this22._setGroupNameControl(group.getTitle(), editMode);
|
|
2327
2267
|
});
|
|
2328
2268
|
} catch (e) {
|
|
2329
2269
|
return Promise.reject(e);
|
|
@@ -2338,29 +2278,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2338
2278
|
*/
|
|
2339
2279
|
_setGroupDetailDialogApps: function _setGroupDetailDialogApps(groupId) {
|
|
2340
2280
|
try {
|
|
2341
|
-
const
|
|
2342
|
-
const group =
|
|
2343
|
-
const
|
|
2281
|
+
const _this23 = this;
|
|
2282
|
+
const group = _this23._getGroup(groupId);
|
|
2283
|
+
const _temp40 = function () {
|
|
2344
2284
|
if (group) {
|
|
2345
|
-
return Promise.resolve(
|
|
2285
|
+
return Promise.resolve(_this23.appManagerInstance.getSectionVisualizations(groupId, false)).then(function (appVisualizations) {
|
|
2346
2286
|
group.destroyAggregation("apps", true);
|
|
2347
2287
|
appVisualizations = appVisualizations.map((appVisualization, index) => {
|
|
2348
2288
|
return {
|
|
2349
2289
|
...appVisualization,
|
|
2350
|
-
menuItems:
|
|
2290
|
+
menuItems: _this23._getAppActions(group, index, appVisualization) //add actions to show in group
|
|
2351
2291
|
};
|
|
2352
2292
|
});
|
|
2353
|
-
const apps =
|
|
2354
|
-
const appsWrapper =
|
|
2355
|
-
|
|
2293
|
+
const apps = _this23.generateApps(appVisualizations);
|
|
2294
|
+
const appsWrapper = _this23._controlMap.get(`${_this23.getId()}-detailDialog-apps`);
|
|
2295
|
+
_this23._setAggregation(group, apps, "apps");
|
|
2356
2296
|
appsWrapper.destroyItems();
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2297
|
+
_this23._setAggregation(appsWrapper, group.getApps().map(app => _this23.getParent()._getAppTile(app)));
|
|
2298
|
+
_this23._applyGroupedAppsPersonalization(groupId);
|
|
2299
|
+
_this23._dispatchAppsLoadedEvent(apps);
|
|
2360
2300
|
});
|
|
2361
2301
|
}
|
|
2362
2302
|
}();
|
|
2363
|
-
return Promise.resolve(
|
|
2303
|
+
return Promise.resolve(_temp40 && _temp40.then ? _temp40.then(function () {}) : void 0);
|
|
2364
2304
|
} catch (e) {
|
|
2365
2305
|
return Promise.reject(e);
|
|
2366
2306
|
}
|
|
@@ -2491,25 +2431,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2491
2431
|
*/
|
|
2492
2432
|
_onGroupEditName: function _onGroupEditName(updatedTitle) {
|
|
2493
2433
|
try {
|
|
2494
|
-
const
|
|
2495
|
-
function
|
|
2496
|
-
|
|
2497
|
-
|
|
2434
|
+
const _this24 = this;
|
|
2435
|
+
function _temp42() {
|
|
2436
|
+
_this24._setGroupNameControl(updatedTitle, false);
|
|
2437
|
+
_this24._setBusy(false);
|
|
2498
2438
|
}
|
|
2499
|
-
|
|
2500
|
-
const groupId =
|
|
2501
|
-
group =
|
|
2439
|
+
_this24._setBusy(true);
|
|
2440
|
+
const groupId = _this24._selectedGroupId,
|
|
2441
|
+
group = _this24._getGroup(groupId),
|
|
2502
2442
|
oldTitle = group?.getTitle();
|
|
2503
|
-
const
|
|
2443
|
+
const _temp41 = function () {
|
|
2504
2444
|
if (updatedTitle && updatedTitle !== oldTitle) {
|
|
2505
|
-
return Promise.resolve(
|
|
2445
|
+
return Promise.resolve(_this24._renameGroup(groupId, updatedTitle)).then(function () {
|
|
2506
2446
|
group?.setProperty("title", updatedTitle, true);
|
|
2507
|
-
void
|
|
2508
|
-
MessageToast.show(
|
|
2447
|
+
void _this24.refresh();
|
|
2448
|
+
MessageToast.show(_this24._i18nBundle.getText("groupNameChanged") || "");
|
|
2509
2449
|
});
|
|
2510
2450
|
}
|
|
2511
2451
|
}();
|
|
2512
|
-
return Promise.resolve(
|
|
2452
|
+
return Promise.resolve(_temp41 && _temp41.then ? _temp41.then(_temp42) : _temp42(_temp41));
|
|
2513
2453
|
} catch (e) {
|
|
2514
2454
|
return Promise.reject(e);
|
|
2515
2455
|
}
|
|
@@ -2527,12 +2467,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2527
2467
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2528
2468
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2529
2469
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2530
|
-
const
|
|
2470
|
+
const _temp43 = function () {
|
|
2531
2471
|
if (groupIndex > -1) {
|
|
2532
2472
|
return Promise.resolve(pagesService.renameSection(pageIndex, groupIndex, updatedTitle)).then(function () {});
|
|
2533
2473
|
}
|
|
2534
2474
|
}();
|
|
2535
|
-
if (
|
|
2475
|
+
if (_temp43 && _temp43.then) return _temp43.then(function () {});
|
|
2536
2476
|
});
|
|
2537
2477
|
} catch (e) {
|
|
2538
2478
|
return Promise.reject(e);
|
|
@@ -2647,11 +2587,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2647
2587
|
*/
|
|
2648
2588
|
_handleAddFromInsights: function _handleAddFromInsights() {
|
|
2649
2589
|
try {
|
|
2650
|
-
const
|
|
2651
|
-
return Promise.resolve(
|
|
2652
|
-
const dialog =
|
|
2653
|
-
|
|
2654
|
-
|
|
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);
|
|
2655
2595
|
dialog.open();
|
|
2656
2596
|
});
|
|
2657
2597
|
} catch (e) {
|
|
@@ -2702,8 +2642,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2702
2642
|
*/
|
|
2703
2643
|
_getInsightTilesToAdd: function _getInsightTilesToAdd() {
|
|
2704
2644
|
try {
|
|
2705
|
-
const
|
|
2706
|
-
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]) {
|
|
2707
2647
|
//check force refresh true?
|
|
2708
2648
|
//find the visualizations that are present in insight tile but not in favorite apps
|
|
2709
2649
|
const appsToAdd = insightsApps.reduce((appsToAdd, insightsApp) => {
|
|
@@ -2716,7 +2656,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2716
2656
|
}
|
|
2717
2657
|
return appsToAdd;
|
|
2718
2658
|
}, []);
|
|
2719
|
-
return
|
|
2659
|
+
return _this26.appManagerInstance._filterDuplicateVizs(appsToAdd, false);
|
|
2720
2660
|
});
|
|
2721
2661
|
} catch (e) {
|
|
2722
2662
|
return Promise.reject(e);
|
|
@@ -2748,20 +2688,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2748
2688
|
*/
|
|
2749
2689
|
_addFromInsights: function _addFromInsights() {
|
|
2750
2690
|
try {
|
|
2751
|
-
const
|
|
2752
|
-
function
|
|
2753
|
-
|
|
2754
|
-
MessageToast.show(
|
|
2755
|
-
return Promise.resolve(
|
|
2756
|
-
|
|
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);
|
|
2757
2697
|
});
|
|
2758
2698
|
}
|
|
2759
|
-
|
|
2760
|
-
const selectedItems =
|
|
2761
|
-
const
|
|
2762
|
-
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 () {});
|
|
2763
2703
|
});
|
|
2764
|
-
return Promise.resolve(
|
|
2704
|
+
return Promise.resolve(_temp44 && _temp44.then ? _temp44.then(_temp45) : _temp45(_temp44));
|
|
2765
2705
|
} catch (e) {
|
|
2766
2706
|
return Promise.reject(e);
|
|
2767
2707
|
}
|
|
@@ -2779,8 +2719,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2779
2719
|
*/
|
|
2780
2720
|
_updateAppPersonalization: function _updateAppPersonalization(updateConfigs) {
|
|
2781
2721
|
try {
|
|
2782
|
-
const
|
|
2783
|
-
return Promise.resolve(
|
|
2722
|
+
const _this28 = this;
|
|
2723
|
+
return Promise.resolve(_this28._getAppPersonalization()).then(function (personalizations) {
|
|
2784
2724
|
for (const updateConfig of updateConfigs) {
|
|
2785
2725
|
const {
|
|
2786
2726
|
visualization
|
|
@@ -2792,13 +2732,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2792
2732
|
const targetGroupId = updateConfig.targetGroupId ?? sourceGroupId;
|
|
2793
2733
|
if (sourceGroupId !== targetGroupId) {
|
|
2794
2734
|
//move app scenario
|
|
2795
|
-
|
|
2735
|
+
_this28._updateMoveAppPersonalization(personalizations, updateConfig);
|
|
2796
2736
|
} else {
|
|
2797
2737
|
//only color is updated
|
|
2798
|
-
|
|
2738
|
+
_this28._updateAppColorPersonalization(personalizations, updateConfig);
|
|
2799
2739
|
}
|
|
2800
2740
|
}
|
|
2801
|
-
return Promise.resolve(
|
|
2741
|
+
return Promise.resolve(_this28.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2802
2742
|
});
|
|
2803
2743
|
} catch (e) {
|
|
2804
2744
|
return Promise.reject(e);
|
|
@@ -2867,9 +2807,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2867
2807
|
*/
|
|
2868
2808
|
_updateGroupPersonalization: function _updateGroupPersonalization(groupId, selectedColor) {
|
|
2869
2809
|
try {
|
|
2870
|
-
const
|
|
2871
|
-
return Promise.resolve(
|
|
2872
|
-
const personalizationIndex =
|
|
2810
|
+
const _this29 = this;
|
|
2811
|
+
return Promise.resolve(_this29._getAppPersonalization()).then(function (personalizations) {
|
|
2812
|
+
const personalizationIndex = _this29._getPersonalizationIndex(personalizations, {
|
|
2873
2813
|
isSection: true,
|
|
2874
2814
|
sectionId: groupId
|
|
2875
2815
|
});
|
|
@@ -2885,7 +2825,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2885
2825
|
} else {
|
|
2886
2826
|
personalizations.push(updatedPersonalization);
|
|
2887
2827
|
}
|
|
2888
|
-
return Promise.resolve(
|
|
2828
|
+
return Promise.resolve(_this29.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2889
2829
|
});
|
|
2890
2830
|
} catch (e) {
|
|
2891
2831
|
return Promise.reject(e);
|
|
@@ -2945,22 +2885,22 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2945
2885
|
*/
|
|
2946
2886
|
_deleteGroup: function _deleteGroup(groupId) {
|
|
2947
2887
|
try {
|
|
2948
|
-
const
|
|
2888
|
+
const _this30 = this;
|
|
2949
2889
|
return Promise.resolve(Container.getServiceAsync("Pages")).then(function (pagesService) {
|
|
2950
2890
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2951
2891
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2952
2892
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2953
|
-
const
|
|
2893
|
+
const _temp46 = function () {
|
|
2954
2894
|
if (groupIndex > -1) {
|
|
2955
2895
|
return Promise.resolve(pagesService.deleteSection(pageIndex, groupIndex)).then(function () {
|
|
2956
|
-
void
|
|
2896
|
+
void _this30._deletePersonalization({
|
|
2957
2897
|
sectionId: groupId,
|
|
2958
2898
|
isSection: true
|
|
2959
2899
|
});
|
|
2960
2900
|
});
|
|
2961
2901
|
}
|
|
2962
2902
|
}();
|
|
2963
|
-
if (
|
|
2903
|
+
if (_temp46 && _temp46.then) return _temp46.then(function () {});
|
|
2964
2904
|
});
|
|
2965
2905
|
} catch (e) {
|
|
2966
2906
|
return Promise.reject(e);
|
|
@@ -2979,14 +2919,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2979
2919
|
*/
|
|
2980
2920
|
_deletePersonalization: function _deletePersonalization(personalizationConfig) {
|
|
2981
2921
|
try {
|
|
2982
|
-
const
|
|
2922
|
+
const _this31 = this;
|
|
2983
2923
|
const {
|
|
2984
2924
|
isSection,
|
|
2985
2925
|
sectionId
|
|
2986
2926
|
} = personalizationConfig;
|
|
2987
|
-
return Promise.resolve(
|
|
2927
|
+
return Promise.resolve(_this31._getAppPersonalization()).then(function (personalizations) {
|
|
2988
2928
|
if (!isSection) {
|
|
2989
|
-
const personalizationIndex =
|
|
2929
|
+
const personalizationIndex = _this31._getPersonalizationIndex(personalizations, personalizationConfig);
|
|
2990
2930
|
if (personalizationIndex > -1) {
|
|
2991
2931
|
personalizations.splice(personalizationIndex, 1);
|
|
2992
2932
|
}
|
|
@@ -2994,7 +2934,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2994
2934
|
// Delete personalizations for all associated apps if a group is deleted
|
|
2995
2935
|
personalizations = personalizations.filter(personalization => personalization.sectionId !== sectionId);
|
|
2996
2936
|
}
|
|
2997
|
-
void
|
|
2937
|
+
void _this31.setFavAppsPersonalization(personalizations);
|
|
2998
2938
|
});
|
|
2999
2939
|
} catch (e) {
|
|
3000
2940
|
return Promise.reject(e);
|
|
@@ -3024,33 +2964,33 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
3024
2964
|
*/
|
|
3025
2965
|
_handleKeyboardMoveApp: function _handleKeyboardMoveApp(event, appGroupId) {
|
|
3026
2966
|
try {
|
|
3027
|
-
const
|
|
2967
|
+
const _this32 = this;
|
|
3028
2968
|
const currentItem = Element.closestTo(event.target.firstElementChild);
|
|
3029
2969
|
const container = currentItem.getParent();
|
|
3030
|
-
const
|
|
2970
|
+
const _temp48 = function () {
|
|
3031
2971
|
if (event.metaKey || event.ctrlKey) {
|
|
3032
2972
|
// ctrl(windows)/cmd (mac) + x, sets app to be moved to a group, or to create a group
|
|
3033
|
-
if (event.key === "x" && !currentItem.data("groupId") && !
|
|
2973
|
+
if (event.key === "x" && !currentItem.data("groupId") && !_this32._cutApp && !appGroupId) {
|
|
3034
2974
|
currentItem.$().css("opacity", 0.6);
|
|
3035
2975
|
currentItem._oMoreIcon.setEnabled(false);
|
|
3036
|
-
|
|
2976
|
+
_this32._cutApp = currentItem;
|
|
3037
2977
|
}
|
|
3038
|
-
const
|
|
3039
|
-
if (event.key === "v" &&
|
|
2978
|
+
const _temp47 = function () {
|
|
2979
|
+
if (event.key === "v" && _this32._cutApp && !appGroupId) {
|
|
3040
2980
|
const dragDropEvent = new Event("keyboardDragDropEvent", container, {
|
|
3041
|
-
draggedControl:
|
|
2981
|
+
draggedControl: _this32._cutApp,
|
|
3042
2982
|
droppedControl: currentItem,
|
|
3043
2983
|
dropPosition: dnd.RelativeDropPosition.On
|
|
3044
2984
|
});
|
|
3045
|
-
return Promise.resolve(
|
|
3046
|
-
|
|
2985
|
+
return Promise.resolve(_this32._onFavItemDrop(dragDropEvent)).then(function () {
|
|
2986
|
+
_this32._cutApp = undefined;
|
|
3047
2987
|
});
|
|
3048
2988
|
}
|
|
3049
2989
|
}();
|
|
3050
|
-
if (
|
|
2990
|
+
if (_temp47 && _temp47.then) return _temp47.then(function () {});
|
|
3051
2991
|
}
|
|
3052
2992
|
}();
|
|
3053
|
-
return Promise.resolve(
|
|
2993
|
+
return Promise.resolve(_temp48 && _temp48.then ? _temp48.then(function () {}) : void 0);
|
|
3054
2994
|
} catch (e) {
|
|
3055
2995
|
return Promise.reject(e);
|
|
3056
2996
|
}
|