@sapui5/sap.cux.home 1.135.0 → 1.136.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/AdvancedSettingsPanel-dbg.js +23 -5
- package/src/sap/cux/home/AdvancedSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +7 -0
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +24 -5
- package/src/sap/cux/home/AppsAdditionPanel-dbg.js +919 -0
- package/src/sap/cux/home/AppsAdditionPanel-dbg.js.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +293 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.js +6 -0
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.ts +757 -0
- package/src/sap/cux/home/AppsContainer-dbg.js +42 -28
- package/src/sap/cux/home/AppsContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.d.ts +17 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +1 -1
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +27 -6
- package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js +261 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/AppsContainerGenericPlaceholder.ts +251 -0
- package/src/sap/cux/home/BaseAppPanel-dbg.js +4 -5
- package/src/sap/cux/home/BaseAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +1 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +3 -5
- package/src/sap/cux/home/BaseAppPersPanel-dbg.js +2 -1
- package/src/sap/cux/home/BaseAppPersPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.js +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPersPanel.ts +2 -1
- package/src/sap/cux/home/BaseContainer-dbg.js +24 -3
- package/src/sap/cux/home/BaseContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.d.ts +10 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +1 -1
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +24 -2
- package/src/sap/cux/home/BaseContainerRenderer-dbg.js +18 -1
- package/src/sap/cux/home/BaseContainerRenderer-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.d.ts +4 -4
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +25 -4
- package/src/sap/cux/home/BaseLayout-dbg.js +22 -2
- package/src/sap/cux/home/BaseLayout-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseLayout.d.ts +6 -0
- package/src/sap/cux/home/BaseLayout.d.ts.map +1 -1
- package/src/sap/cux/home/BaseLayout.js +1 -1
- package/src/sap/cux/home/BaseLayout.js.map +1 -1
- package/src/sap/cux/home/BaseLayout.ts +23 -2
- package/src/sap/cux/home/BaseNewsItem-dbg.js +3 -3
- package/src/sap/cux/home/BaseNewsItem-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseNewsItem.js +1 -1
- package/src/sap/cux/home/BaseNewsItem.js.map +1 -1
- package/src/sap/cux/home/BaseNewsItem.ts +3 -3
- package/src/sap/cux/home/BaseNewsPanel-dbg.js +4 -5
- package/src/sap/cux/home/BaseNewsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +5 -4
- package/src/sap/cux/home/BasePanel-dbg.js +1 -1
- package/src/sap/cux/home/BasePanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BasePanel.js +1 -1
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +1 -1
- package/src/sap/cux/home/BaseSettingsDialog-dbg.js +11 -0
- package/src/sap/cux/home/BaseSettingsDialog-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.js +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsDialog.ts +12 -0
- package/src/sap/cux/home/BaseSettingsPanel-dbg.js +67 -2
- package/src/sap/cux/home/BaseSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +42 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.gen.d.ts +75 -0
- package/src/sap/cux/home/BaseSettingsPanel.js +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +70 -2
- package/src/sap/cux/home/CardsPanel-dbg.js +548 -168
- package/src/sap/cux/home/CardsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.d.ts +121 -15
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.gen.d.ts +78 -0
- package/src/sap/cux/home/CardsPanel.js +1 -1
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +450 -97
- package/src/sap/cux/home/ContentAdditionDialog-dbg.js +353 -0
- package/src/sap/cux/home/ContentAdditionDialog-dbg.js.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +82 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.js +6 -0
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -0
- package/src/sap/cux/home/ContentAdditionDialog.ts +214 -0
- package/src/sap/cux/home/ErrorPanel-dbg.js +3 -3
- package/src/sap/cux/home/ErrorPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.js +1 -1
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +4 -2
- package/src/sap/cux/home/FavAppPanel-dbg.js +352 -333
- package/src/sap/cux/home/FavAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +1 -1
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +63 -54
- package/src/sap/cux/home/InsightsAdditionPanel-dbg.js +97 -0
- package/src/sap/cux/home/InsightsAdditionPanel-dbg.js.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +57 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.js +6 -0
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -0
- package/src/sap/cux/home/InsightsAdditionPanel.ts +94 -0
- package/src/sap/cux/home/InsightsContainer-dbg.js +22 -2
- package/src/sap/cux/home/InsightsContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.d.ts +14 -0
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +1 -1
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +22 -1
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js +401 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/InsightsContainerGenericPlaceholder.ts +391 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js +10 -9
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +9 -8
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js +2 -2
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js +6 -6
- package/src/sap/cux/home/KeyUserPagesSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +6 -6
- package/src/sap/cux/home/Layout-dbg.js +58 -33
- package/src/sap/cux/home/Layout-dbg.js.map +1 -1
- package/src/sap/cux/home/Layout.d.ts +13 -0
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +1 -1
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +48 -20
- package/src/sap/cux/home/LayoutSettingsPanel-dbg.js +1 -10
- package/src/sap/cux/home/LayoutSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +2 -10
- package/src/sap/cux/home/NewsAndPagesContainer-dbg.js +35 -17
- package/src/sap/cux/home/NewsAndPagesContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +7 -0
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +40 -16
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js +164 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/NewsAndPagesContainerGenericPlaceholder.ts +154 -0
- package/src/sap/cux/home/NewsGroup-dbg.js +112 -79
- package/src/sap/cux/home/NewsGroup-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.d.ts +1 -0
- package/src/sap/cux/home/NewsGroup.d.ts.map +1 -1
- package/src/sap/cux/home/NewsGroup.js +1 -1
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +136 -100
- package/src/sap/cux/home/NewsPanel-dbg.js +541 -173
- package/src/sap/cux/home/NewsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts +156 -16
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +1 -1
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +452 -82
- package/src/sap/cux/home/NewsSettingsPanel-dbg.js +61 -20
- package/src/sap/cux/home/NewsSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +14 -0
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +75 -21
- package/src/sap/cux/home/NoDataContainer-dbg.js +3 -3
- package/src/sap/cux/home/NoDataContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/NoDataContainer.d.ts +1 -0
- package/src/sap/cux/home/NoDataContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NoDataContainer.js +1 -1
- package/src/sap/cux/home/NoDataContainer.js.map +1 -1
- package/src/sap/cux/home/NoDataContainer.ts +4 -2
- package/src/sap/cux/home/PagePanel-dbg.js +86 -75
- package/src/sap/cux/home/PagePanel-dbg.js.map +1 -1
- package/src/sap/cux/home/PagePanel.d.ts +25 -3
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +1 -1
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +91 -76
- package/src/sap/cux/home/PageSettingsPanel-dbg.js +16 -15
- package/src/sap/cux/home/PageSettingsPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +15 -14
- package/src/sap/cux/home/RecentAppPanel-dbg.js +2 -2
- package/src/sap/cux/home/RecentAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +1 -1
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +2 -2
- package/src/sap/cux/home/RecommendedAppPanel-dbg.js +4 -3
- package/src/sap/cux/home/RecommendedAppPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +4 -2
- package/src/sap/cux/home/SettingsDialog-dbg.js +4 -3
- package/src/sap/cux/home/SettingsDialog-dbg.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +1 -1
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +4 -2
- package/src/sap/cux/home/TaskPanel-dbg.js +16 -12
- package/src/sap/cux/home/TaskPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.d.ts +1 -2
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +1 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +19 -12
- package/src/sap/cux/home/TilesPanel-dbg.js +9 -8
- package/src/sap/cux/home/TilesPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +1 -1
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +15 -8
- package/src/sap/cux/home/ToDoPanel-dbg.js +34 -25
- package/src/sap/cux/home/ToDoPanel-dbg.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.d.ts +0 -7
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +1 -1
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +27 -29
- package/src/sap/cux/home/ToDosContainer-dbg.js +27 -18
- package/src/sap/cux/home/ToDosContainer-dbg.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.d.ts +7 -0
- package/src/sap/cux/home/ToDosContainer.d.ts.map +1 -1
- package/src/sap/cux/home/ToDosContainer.js +1 -1
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +10 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js +84 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder-dbg.js.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js +6 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.js.map +1 -0
- package/src/sap/cux/home/ToDosContainerGenericPlaceholder.ts +74 -0
- package/src/sap/cux/home/i18n/messagebundle.properties +63 -1
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_da.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_de.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_el.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +43 -246
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +31 -1
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_es.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_et.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_id.properties +47 -5
- package/src/sap/cux/home/i18n/messagebundle_it.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_no.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +44 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_th.properties +43 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +42 -1
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +43 -1
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +42 -1
- package/src/sap/cux/home/interface/AppsInterface-dbg.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -3
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +5 -3
- package/src/sap/cux/home/interface/CardsInterface-dbg.js +32 -0
- package/src/sap/cux/home/interface/CardsInterface-dbg.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.d.ts +320 -55
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js +5 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +359 -55
- package/src/sap/cux/home/library-preload.js +88 -45
- package/src/sap/cux/home/library-preload.js.map +1 -1
- package/src/sap/cux/home/manifest.json +4 -4
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +1 -0
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +69 -0
- package/src/sap/cux/home/themes/base/NewsAndPagesContainer.less +37 -12
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1374 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +1 -1
- package/src/sap/cux/home/themes/base/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/base/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/base/library.css +2 -2
- package/src/sap/cux/home/themes/base/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_fiori_3/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_dark/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcb/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.css +2 -2
- package/src/sap/cux/home/themes/sap_fiori_3_hcw/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_horizon/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_dark/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_dark/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_dark/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_horizon_hcb/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_hcb/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcb/library.source.less +2 -0
- package/src/sap/cux/home/themes/sap_horizon_hcw/AppsContainer.less +1 -0
- package/src/sap/cux/home/themes/sap_horizon_hcw/library-RTL.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcw/library-parameters.json +1 -1
- package/src/sap/cux/home/themes/sap_horizon_hcw/library.css +2 -2
- package/src/sap/cux/home/themes/sap_horizon_hcw/library.source.less +2 -0
- package/src/sap/cux/home/utils/AppManager-dbg.js +405 -440
- package/src/sap/cux/home/utils/AppManager-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.d.ts +88 -124
- package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +1 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +351 -542
- package/src/sap/cux/home/utils/Constants-dbg.js +25 -1
- package/src/sap/cux/home/utils/Constants-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/Constants.d.ts +17 -0
- package/src/sap/cux/home/utils/Constants.d.ts.map +1 -1
- package/src/sap/cux/home/utils/Constants.js +1 -1
- package/src/sap/cux/home/utils/Constants.js.map +1 -1
- package/src/sap/cux/home/utils/Constants.ts +20 -1
- package/src/sap/cux/home/utils/Device-dbg.js +49 -1
- package/src/sap/cux/home/utils/Device-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/Device.d.ts +13 -0
- package/src/sap/cux/home/utils/Device.d.ts.map +1 -1
- package/src/sap/cux/home/utils/Device.js +1 -1
- package/src/sap/cux/home/utils/Device.js.map +1 -1
- package/src/sap/cux/home/utils/Device.ts +58 -1
- package/src/sap/cux/home/utils/InsightsUtils-dbg.js +25 -0
- package/src/sap/cux/home/utils/InsightsUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.d.ts +14 -0
- package/src/sap/cux/home/utils/InsightsUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.js +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.js.map +1 -1
- package/src/sap/cux/home/utils/InsightsUtils.ts +25 -0
- package/src/sap/cux/home/utils/PerformanceUtils-dbg.js +5 -2
- package/src/sap/cux/home/utils/PerformanceUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +1 -0
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +5 -1
- package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js +1599 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil-dbg.js.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts +534 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.d.ts.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.js +6 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.js.map +1 -0
- package/src/sap/cux/home/utils/RecommendedCardUtil.ts +1945 -0
- package/src/sap/cux/home/utils/SituationUtils-dbg.js +1 -1
- package/src/sap/cux/home/utils/SituationUtils-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/SituationUtils.js +1 -1
- package/src/sap/cux/home/utils/SituationUtils.js.map +1 -1
- package/src/sap/cux/home/utils/SituationUtils.ts +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer-dbg.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts +4 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.d.ts.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +2 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +126 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/FavAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,0BAA0B,CAAC;IAgB1C,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"FavAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/FavAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,0BAA0B,CAAC;IAgB1C,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;IAuB1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;IAqB5D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;IAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;IAGjE,OAAO,EAQN,cAAc,EACd,MAAM,2BAA2B,CAAC;IAMnC,MAAM,YAAY,QACoF,OACrG,CAAC;IAEF,KAAY,mBAAmB;QAC9B,YAAY,qBAAqB;QACjC,QAAQ,mBAAmB;QAC3B,iBAAiB,uBAAuB;KACxC;IAED,MAAM,cAAc,EAAE,MAAkC,CAAC;IACzD,MAAM,sBAAsB,EAAE,MAAyC,CAAC;IACxE,MAAM,eAAe,EAAE,CAAC,mBAAmB,GAAG,MAAM,CAAC,EAKpD,CAAC;IAEF;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,gBAAgB;QACxD,OAAO,CAAC,aAAa,CAAa;QAClC,OAAO,CAAC,mBAAmB,CAAqB;QAChD,OAAO,CAAC,gBAAgB,CAAqB;QAC7C,OAAO,CAAC,YAAY,CAAe;QACnC,OAAO,CAAC,OAAO,CAA0B;QACzC,OAAO,CAAC,SAAS,CAAY;QAC7B,OAAO,CAAC,aAAa,CAAU;QAC/B,OAAO,CAAC,oBAAoB,CAAY;QACxC,OAAO,CAAC,cAAc,CAAQ;QAE9B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAavC;QAEF;;;;;WAKG;oBACgB,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,kBAAkB;QAItD,IAAI;QAuDX,OAAO,CAAC,WAAW;QAKnB;;;WAGG;gBACW,kBAAkB;QAoDhC;;;;;;;;WAQG;QACH,OAAO,CAAC,sBAAsB;QAkB9B;;;;;;WAMG;gBACW,mCAAmC;QAgBjD;;;;;;WAMG;QACU,aAAa,CAAC,WAAW,EAAE,cAAc,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM;QAQ7E;;;WAGG;QACU,QAAQ;QAwCrB;;;;;;;WAOG;gBACW,+BAA+B;QAS7C;;;;;;WAMG;QACH,OAAO,CAAC,8BAA8B;QAiBtC;;;;;WAKG;QACH,OAAO,CAAC,cAAc;QAOtB;;;;;WAKG;QACH,OAAO,CAAC,eAAe;QAsBvB;;;;WAIG;QACH,OAAO,CAAC,UAAU;QAMlB;;;;;WAKG;QACH,OAAO,CAAC,cAAc;QA2EtB;;;;;WAKG;QACH,OAAO,CAAC,gBAAgB;QA6BxB;;;WAGG;gBACW,oBAAoB;QAyBlC,OAAO,CAAC,mBAAmB;gBAcb,yBAAyB;QAKvC;;;WAGG;QACH,OAAO,CAAC,sBAAsB;QAgC9B;;;;;WAKG;gBACW,gBAAgB;QA6B9B;;;;;WAKG;gBACW,sBAAsB;QA0CpC,OAAO,CAAC,YAAY;QAYpB;;;;;WAKG;gBACW,wBAAwB;QAkCtC;;;;;WAKG;gBACW,cAAc;QAuB5B;;;;;;;;WAQG;gBACW,iBAAiB;QAkB/B;;;;;WAKG;gBACW,mBAAmB;QAsBjC;;;;;WAKG;gBACW,mBAAmB;QAejC;;;;WAIG;gBACW,sBAAsB;QASpC,OAAO,CAAC,qBAAqB;QAK7B;;;;WAIG;QACH,OAAO,CAAC,sBAAsB;QAgB9B;;;WAGG;QACH,OAAO,CAAC,uBAAuB;QAO/B;;;WAGG;QACH,OAAO,CAAC,uBAAuB;QAY/B;;;;;WAKG;QACH,OAAO,CAAC,0BAA0B;QAqFlC;;;;;WAKG;QACH,OAAO,CAAC,aAAa;QAoBrB;;;;WAIG;QACH,OAAO,CAAC,4BAA4B;QA2BpC;;;WAGG;QACH,OAAO,CAAC,uBAAuB;QAO/B;;;;WAIG;QACH,OAAO,CAAC,gCAAgC;QAcxC;;;;WAIG;QACH,OAAO,CAAC,4BAA4B;QA4DpC;;;;WAIG;QACH,OAAO,CAAC,4BAA4B;QA8DpC;;;;WAIG;QACH,OAAO,CAAC,4BAA4B;QAiBpC;;;;WAIG;QACH,OAAO,CAAC,cAAc;QAItB;;;;;WAKG;QACH,OAAO,CAAC,eAAe;QAIvB;;;;WAIG;QACH,OAAO,CAAC,uBAAuB;QAK/B;;;;WAIG;QACH,OAAO,CAAC,kBAAkB;QAS1B;;;WAGG;QACH,OAAO,CAAC,sBAAsB;QAY9B;;;;WAIG;QACH,OAAO,CAAC,kBAAkB;QAc1B;;;WAGG;gBACW,mBAAmB;QAiCjC;;;;;;;WAOG;gBACW,YAAY;QA4C1B;;;;WAIG;QACH,OAAO,CAAC,cAAc;QAQtB;;;;WAIG;QACH,OAAO,CAAC,iBAAiB;QAyBzB;;;;;;WAMG;gBACW,kBAAkB;QAiChC;;;;;WAKG;QACH,OAAO,CAAC,qBAAqB;QAQ7B;;;;WAIG;QACH,OAAO,CAAC,QAAQ;QAShB;;;;;WAKG;QACH,OAAO,CAAC,uBAAuB;QAwC/B;;;;;;WAMG;QACH,OAAO,CAAC,aAAa;QA2CrB;;;;;;;;WAQG;gBACW,UAAU;QA+BxB;;;;;;WAMG;gBACW,kBAAkB;QAuBhC;;;;;;;WAOG;gBACW,6BAA6B;QA2B3C;;;;;WAKG;QACH,OAAO,CAAC,yBAAyB;QAyBjC;;;;;;WAMG;gBACW,eAAe;QAwC7B;;;;;WAKG;gBACW,sBAAsB;QAUpC;;;;;WAKG;gBACW,8BAA8B;QAU5C;;;;;WAKG;QACH,OAAO,CAAC,cAAc;QAKtB;;;;WAIG;QACH,OAAO,CAAC,kBAAkB;QAiB1B;;;;;WAKG;QACH,OAAO,CAAC,cAAc;QA0BtB;;;;;;WAMG;gBACW,YAAY;QAyC1B;;;;;;WAMG;gBACW,sBAAsB;QAiBpC;;;;;;WAMG;gBACW,yBAAyB;QAwBvC;;;;WAIG;QACH,OAAO,CAAC,gCAAgC;QAMxC;;;;WAIG;QACH,OAAO,CAAC,wBAAwB;QAMhC;;;;WAIG;QACH,OAAO,CAAC,0BAA0B;QAkGlC;;;WAGG;QACH,OAAO,CAAC,uBAAuB;QAQ/B;;;;;;WAMG;gBACW,gBAAgB;QAe9B;;;;;;WAMG;gBACW,YAAY;QAU1B;;;;;;WAMG;QACH,OAAO,CAAC,oBAAoB;QAc5B;;;;WAIG;QACH,OAAO,CAAC,8BAA8B;QAuGtC;;;;WAIG;gBACW,sBAAsB;QAUpC;;;;WAIG;QACH,OAAO,CAAC,yBAAyB;QAwCjC;;;;WAIG;gBACW,qBAAqB;QAsBnC;;;WAGG;QACH,OAAO,CAAC,2BAA2B;QAOnC;;;;WAIG;QACH,OAAO,CAAC,oBAAoB;QAK5B;;;;WAIG;gBACW,gBAAgB;QAgB9B;;;;;;;;;;WAUG;gBACW,yBAAyB;QAoBvC;;;;;;WAMG;QACH,OAAO,CAAC,8BAA8B,CAsBpC;QAEF;;;;;;WAMG;QACH,OAAO,CAAC,6BAA6B;QA0CrC;;;;;;WAMG;gBACW,2BAA2B;QAqBzC;;;;;;;;;;;WAWG;QACH,OAAO,CAAC,wBAAwB;QAahC;;;;;;;;WAQG;QACH,OAAO,CAAC,iBAAiB;QASzB;;;;;WAKG;gBACW,YAAY;QAW1B;;;;;;;;;;WAUG;gBACW,sBAAsB;QAiBpC;;;;WAIG;QACH,OAAO,CAAC,iBAAiB;QAOzB;;;;;;;;;;WAUG;gBACW,sBAAsB;QAyBpC;;;;WAIG;QACH,OAAO,CAAC,gBAAgB;QAQxB;;;;;WAKG;QACH,SAAS,CAAC,0BAA0B;KAoBpC;CAEA"}
|
|
@@ -2,5 +2,5 @@
|
|
|
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/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","sap/ushell/components/pages/MyHomeImport","sap/ushell/components/pages/controller/PageRuntime.controller","./BaseApp","./BaseAppPersPanel","./Group","./MenuItem","./utils/Accessibility","./utils/Constants","./utils/DataFormatUtils","./utils/FESRUtil","./utils/InsightsUtils"],function(e,t,n,o,i,s,r,a,l,p,c,u,d,g,h,f,m,_,I,v,A,P,C,M,G,y,x,B,D,T,S,$,w,b,z,E,F,N,V,U,R,j,L,H,k,O,K,W,Y,q,J){"use strict";function Q(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}const X=typeof Symbol!=="undefined"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Z(e,t,n){if(!e.s){if(n instanceof ee){if(n.s){if(t&1){t=n.s}n=n.v}else{n.o=Z.bind(null,e,t);return}}if(n&&n.then){n.then(Z.bind(null,e,t),Z.bind(null,e,2));return}e.s=t;e.v=n;const o=e.o;if(o){o(e)}}}const ee=function(){function e(){}e.prototype.then=function(t,n){const o=new e;const i=this.s;if(i){const e=i&1?t:n;if(e){try{Z(o,1,e(this.v))}catch(e){Z(o,2,e)}return o}else{return this}}this.o=function(e){try{const i=e.v;if(e.s&1){Z(o,1,t?t(i):i)}else if(n){Z(o,1,n(i))}else{Z(o,2,i)}}catch(e){Z(o,2,e)}};return o};return e}();function te(e){return e instanceof ee&&e.s&1}function ne(e,t,n){var o=-1,i,s;function r(a){try{while(++o<e.length&&(!n||!n())){a=t(o);if(a&&a.then){if(te(a)){a=a.v}else{a.then(r,s||(s=Z.bind(null,i=new ee,2)));return}}}if(i){Z(i,1,a)}else{i=a}}catch(e){Z(i||(i=new ee),2,e)}}r();return i}const oe=D["ButtonType"];function ie(e,t,n){if(typeof e[X]==="function"){var o=e[X](),i,s,r;function c(e){try{while(!(i=o.next()).done&&(!n||!n())){e=t(i.value);if(e&&e.then){if(te(e)){e=e.v}else{e.then(c,r||(r=Z.bind(null,s=new ee,2)));return}}}if(s){Z(s,1,e)}else{s=e}}catch(e){Z(s||(s=new ee),2,e)}}c();if(o.return){var a=function(e){try{if(!i.done){o.return()}}catch(e){}return e};if(s&&s.then){return s.then(a,function(e){throw a(e)})}a()}return s}if(!("length"in e)){throw new TypeError("Object is not iterable")}var l=[];for(var p=0;p<e.length;p++){l.push(e[p])}return ne(l,function(e){return t(l[e])},n)}const se=D["ListType"];function re(e,t){try{var n=e()}catch(e){return t(e)}if(n&&n.then){return n.then(void 0,t)}return n}const ae=D["PlacementType"];function le(e,t){try{var n=e()}catch(e){return t(true,e)}if(n&&n.then){return n.then(t.bind(null,false),t.bind(null,true))}return t(false,n)}const pe=b["dnd"];const ce=N["form"];const ue=L["ActionsPopover"];const de=Q(H);const ge=Q(k);const he=Q(O);const fe=K["checkPanelExists"];const me=W["DEFAULT_BG_COLOR"];const _e=W["END_USER_COLORS"];const Ie=W["MYAPPS_SECTION_ID"];const ve=W["MYHOME_PAGE_ID"];const Ae=Y["getLeanURL"];const Pe=q["addFESRId"];const Ce=q["addFESRSemanticStepName"];const Me=J["sortMenuItems"];const Ge=()=>V.last("/core/shell/enablePersonalization")||V.last("/core/catalog/enabled");var ye=function(e){e["CREATE_GROUP"]="createGrpMenuBtn";e["ADD_APPS"]="addAppsMenuBtn";e["ADD_FROM_INSIGHTS"]="addInsightsMenuBtn";return e}(ye||{});const xe="sap.cux.home.TilesPanel";const Be="sap.cux.home.InsightsContainer";const De=[ye.CREATE_GROUP,ye.ADD_APPS,ye.ADD_FROM_INSIGHTS,"settings"];const Te=de.extend("sap.cux.home.FavAppPanel",{metadata:{library:"sap.cux.home",defaultAggregation:"apps",aggregations:{apps:{type:"sap.cux.home.App",singularName:"app",multiple:true,visibility:"hidden"},groups:{type:"sap.cux.home.Group",singularName:"group",multiple:true,visibility:"hidden"}}},constructor:function e(t,n){de.prototype.constructor.call(this,t,n);this._selectedApps=[];this._isInitialLoad=true;this._updateAppColorPersonalization=(e,t)=>{const{visualization:n,color:o}=t;const{appId:i,oldAppId:s,persConfig:r}=n;const a=r?.sectionId;const l=r?.isDefaultSection;const p=this._getPersonalizationIndex(e,{appId:i,oldAppId:s,sectionId:a,isRecentlyAddedApp:l});if(p>-1){e[p].BGColor=o}else{e.push({BGColor:o,sectionId:a,isRecentlyAddedApp:l,appId:i,isSection:false})}}},init:function e(){const t=this,n=this;de.prototype.init.call(this);this.setProperty("key","favApps");this.setProperty("title",this._i18nBundle.getText("favoritesTab"));this.setProperty("tooltip",this._i18nBundle.getText("favAppsInfo"));void this._createActionButtons();this._createHeaderMenuItems();const o=this._generateAppsWrapper();if(o){this.addDragDropConfigTo(o,e=>this._onFavItemDrop(e),e=>this._handleKeyboardMoveApp(e),pe.DropPosition.OnOrBetween)}this.oEventBus=$.getInstance();this.oEventBus.subscribe("importChannel","appsImport",function(e,n,o){try{const e=o?.apps||[];const n=o?.groupInfo||[];return Promise.resolve(t.addAppsAndSections(e,n)).then(function(){t._importdone();return Promise.resolve(t.getParent()._refreshAllPanels()).then(function(){})})}catch(e){return Promise.reject(e)}},this);this.oEventBus.subscribe("importChannel","resetImported",function(){try{return Promise.resolve(n.setImportButtonVisibility(true)).then(function(){})}catch(e){return Promise.reject(e)}},this);this.attachPersistDialog(()=>{if(this._selectedGroupId){void this._showGroupDetailDialog(this._selectedGroupId)}});document.addEventListener("click",e=>this._resetCutElement(e));document.addEventListener("keydown",e=>this._resetCutElement(e))},_importdone:function e(){const t={status:true};this.oEventBus.publish("importChannel","appsImported",t)},addAppsAndSections:function e(t,n){try{const e=this;let o=[];return Promise.resolve(e._getAppPersonalization()).then(function(i){return Promise.resolve(U.getServiceAsync("Pages")).then(function(s){function r(){return Promise.resolve(e.setFavAppsPersonalization(i)).then(function(){return o.reduce((e,t)=>e.then(()=>t()),Promise.resolve()).then(()=>e.updateDefaultSectionPersonalization(i))})}const a=ie(t,function(t){const r=t.visualizations;const a=function(){if(r?.length){const a=function(){if(t.default||t.id===Ie){const s=e.filterPersonalizations(n,t);i=i.concat(s);o.push(()=>t.default?e.addSectionViz(r):e.addSectionViz(r,Ie))}else{return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(a){const l=s._generateId(ve);const p=e.filterPersonalizations(n,t,l);i=i.concat(p);o.push(()=>e.appManagerInstance.addSection({sectionIndex:a.length,sectionProperties:{id:l,title:t.title,visible:true,visualizations:r?.map(e=>{e.id=s._generateId(ve);return e})}}))})}}();if(a&&a.then)return a.then(function(){})}}();if(a&&a.then)return a.then(function(){})});return a&&a.then?a.then(r):r(a)})})}catch(e){return Promise.reject(e)}},filterPersonalizations:function e(t,n,o){const i=t.reduce(function(e,t){if(t.sectionId===n.id){const i=n.visualizations;const s=i?.find(e=>e.targetURL===t.appId);if(s||t.isSection){t.sectionId=o||n.id;e.push(t)}}return e},[]);return i},updateDefaultSectionPersonalization:function e(t){try{const e=this;return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(e){let n=e.find(e=>e.default);if(n){t.forEach(e=>{if(e.isRecentlyAddedApp){e.sectionId=n.id}})}return t})}catch(e){return Promise.reject(e)}},addSectionViz:function e(t,n){try{const e=this;return Promise.resolve(t.reduce((t,o)=>t.then(()=>e._addVisualization({visualization:o},n)),Promise.resolve()))}catch(e){return Promise.reject(e)}},loadApps:function e(){try{const e=this;return Promise.resolve(e.appManagerInstance.fetchFavVizs(true,false)).then(function(t){e.destroyAggregation("groups",true);const n=t.filter(e=>e.isSection).map(t=>({...t,menuItems:e._getGroupActions(t)}));const o=e._generateGroups(n);e._setGroups(o);e.destroyAggregation("apps",true);const i=t.filter(e=>!e.isSection).map((t,n)=>({...t,menuItems:e._getAppActions(undefined,n,t)}));const s=e.generateApps(i);e.setApps(s);if(e._selectedGroupId){void e._setGroupDetailDialogApps(e._selectedGroupId)}const r=e.getParent();r.toggleMenuListItem(e._createGroupMenuItem,e.getApps().length>0);e._switchToRecommendedIfNoFavApps(s,o);if(fe(r,Be,xe)){e._createAddFromInsTilesMenuItem(ye.ADD_FROM_INSIGHTS)}r._updateContainerHeader(r)})}catch(e){return Promise.reject(e)}},_switchToRecommendedIfNoFavApps:function e(t,n){const o=this.getParent();if(this._isInitialLoad&&[...t,...n].length===0){o.setProperty?.("selectedKey","recommendedApps")}this._isInitialLoad=false},_createAddFromInsTilesMenuItem:function e(t){const n=`${this.getId()}-${t}`;if(!this._controlMap.get(n)){const e=new he(n,{title:this._i18nBundle.getText("addFromInsights"),icon:"sap-icon://duplicate",press:()=>void this._handleAddFromInsights()});Pe(e,"staticTilesDialog");this._menuItems.push(e);this.addAggregation("menuItems",e);this._sortMenuItems(De);this._controlMap.set(n,e)}return this._controlMap.get(n)},_sortMenuItems:function e(t){const n=this.getAggregation("menuItems");let o=Me(t,n);this.removeAllAggregation("menuItems");o?.forEach(e=>this.addAggregation("menuItems",e))},_generateGroups:function e(t){return t.map((e,t)=>{const n=new ge(`${this.getId()}-group-${t}`,{title:e.title,bgColor:e.BGColor,status:e.status,icon:e.icon,number:e.badge,groupId:e.id,press:this._handleGroupPress.bind(this)});e.menuItems?.forEach(e=>{n.addAggregation("menuItems",e)});return n})},_setGroups:function e(t){t.forEach(e=>{this.addAggregation("groups",e,true)})},_getAppActions:function e(t,n,o){const i=t?.getGroupId();const s=o?.persConfig?.isDefaultSection;const r=!i;const a=[];const l=new he({id:i&&!s?`${i}--selectColorGroupAppMenuItem--${n}`:`${this.getKey()}--selectColorAppMenuItem--${n}`,title:this._i18nBundle.getText("selectColor"),type:se.Navigation,press:this._openColorPopover.bind(this)});a.push(l);Pe(l,"changeColor");if(this._getAllowedMoveGroups(i)?.length>=1){const e=new he({id:i&&!s?`${i}--moveToGroupAppMenuItem--${n}`:`${this.getKey()}--moveToMenuItem--${n}`,title:this._i18nBundle.getText("moveTo"),type:se.Navigation,press:e=>this._openMoveToGroupPopover(e,t)});a.push(e);Pe(e,"moveToGroup")}if(r){const e=new he(`${this.getKey()}--createGroupMenuItem--${n}`,{title:this._i18nBundle.getText("createGroup"),press:e=>{const t=e.getSource();const n=t.getParent();this._selectedApps=[n];this._openCreateGroupDialog()}});a.push(e);Pe(e,"createGroupDialog")}const p=new he({id:i&&!s?`${i}--removeFromMyHomeGroupAppMenuItem--${n}`:`${this.getKey()}--removeFromMyHomeMenuItem--${n}`,title:this._i18nBundle.getText("removeFromMyHome"),press:e=>{const n=e.getSource();const o=n.getParent();this._handleRemove(o,t)}});a.push(p);Pe(p,"removeFromMyHome");if(!r){const e=new he(`${this.getKey()}--removeFromGroupMenuItem--${n}`,{title:this._i18nBundle.getText("removeFromGroup"),press:e=>{const t=e.getSource();const n=t.getParent();void this._handleMoveToGroup(n,i)}});a.push(e);Pe(e,"ungroupApp")}return a},_getGroupActions:function e(t){const n=new he(`id-${t.id}-renameGroup`,{title:this._i18nBundle.getText("renameGroup"),press:this._onRenameGroup.bind(this)});Pe(n,"renameGroup");const o=new he(`id-${t.id}-selectColor`,{title:this._i18nBundle.getText("selectColor"),type:se.Navigation,press:this._openColorPopover.bind(this)});Pe(o,"changeColor");const i=new he(`id-${t.id}-removeAllApps`,{title:this._i18nBundle.getText("removeAllApps"),press:this._handleUngroupApps.bind(this,t)});Pe(i,"removeAllApps");const s=[n,o,i];if(!t.isPresetSection){const e=new he(`id-${t.id}-delete`,{title:this._i18nBundle.getText("delete"),press:this._onDeleteGroup.bind(this)});Pe(e,"deleteGroup");s.push(e)}return s},_createActionButtons:function e(){try{const e=this;if(!e._actionButtons){e._actionButtons=[];if(Ge()){const t=new o(`${e.getId()}-addAppsBtn`,{icon:"sap-icon://action",tooltip:e._i18nBundle.getText("addAppsTooltip"),text:e._i18nBundle.getText("addApps"),press:()=>{void e.navigateToAppFinder()}});Pe(t,"addAppsBtn");e._actionButtons.push(t)}}e._actionButtons.forEach(t=>{e.addAggregation("actionButtons",t)});return Promise.resolve(e._validateAppsMigration()).then(function(t){if(t){e._createImportButton()}})}catch(e){return Promise.reject(e)}},_createImportButton:function e(){if(!this._importButton){this._importButton=new o(`${this.getId()}-importAppsBtn`,{tooltip:this._i18nBundle.getText("importAppsNow"),text:this._i18nBundle.getText("importAppsNow"),press:this._openImportAppsDialog.bind(this)});Pe(this._importButton,"importAppsDialog");this._actionButtons.push(this._importButton);this.insertAggregation("actionButtons",this._importButton,0)}return this._importButton},setImportButtonVisibility:function e(t){try{const e=this;return Promise.resolve(R.setImportEnabled(t)).then(function(){e._createImportButton().setVisible(t)})}catch(e){return Promise.reject(e)}},_createHeaderMenuItems:function e(){if(!this._menuItems){this._createGroupMenuItem=new he(`${this.getId()}-${ye.CREATE_GROUP}`,{title:this._i18nBundle.getText("createGroup"),icon:"sap-icon://add",press:()=>this._openCreateGroupDialog()});this._menuItems=[this._createGroupMenuItem];if(Ge()){this._menuItems.push(new he(`${this.getId()}-${ye.ADD_APPS}`,{title:this._i18nBundle.getText("addApps"),icon:"sap-icon://action",press:()=>{void this.navigateToAppFinder()}}))}Pe(this._createGroupMenuItem,"createGroupDialog");const e=this._menuItems.find(e=>e.getId()===`${this.getId()}-${ye.ADD_APPS}`);if(e){Pe(e,"appsAppFinder")}this._menuItems.forEach(e=>{this.addAggregation("menuItems",e,true)});this._sortMenuItems(De)}},_getDragDropInfo:function e(t,n){try{const e=this;const o=t.getParameter?.("draggedControl"),i=t.getParameter?.("droppedControl"),s=t.getParameter?.("dropPosition"),r=o.getParent(),a=r.indexOfItem(o),l=r.indexOfItem(i),p=e._getTileItem(o,n),c=e._getTileItem(i,n);const u={dragItem:p,dropItem:c,dropPosition:s,dropControl:r,dragItemIndex:a,dropItemIndex:l};const d=function(){if(a!==l){const t=function(){if(!p?.isA("sap.cux.home.Group")&&!c?.isA("sap.cux.home.Group")){return Promise.resolve(e._adjustAppDragDropInfo(u,n)).then(function(){})}else{const t=function(){if(p?.isA("sap.cux.home.Group")){return Promise.resolve(e._adjustGroupDragDropInfo(u)).then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(d&&d.then?d.then(function(){return u}):u)}catch(e){return Promise.reject(e)}},_adjustAppDragDropInfo:function e(t,n){try{const e=this;let o=false;const i=t.dragItem;const s=t.dropItem;return Promise.resolve(Promise.all([e.appManagerInstance.getVisualization(i.getUrl(),n),e.appManagerInstance.getVisualization(s.getUrl(),n)])).then(function(i){let[s,r]=i;if(t.dropPosition===pe.RelativeDropPosition.Before){if(t.dragItemIndex===t.dropItemIndex-1){t.dropItemIndex--}if(t.dragItemIndex<t.dropItemIndex&&s?.persConfig?.sectionIndex===r?.persConfig?.sectionIndex){t.dropItemIndex--;o=true}}else if(t.dropPosition===pe.RelativeDropPosition.After){if(t.dragItemIndex===t.dropItemIndex+1){t.dropItemIndex++}if(t.dragItemIndex>t.dropItemIndex&&s?.persConfig?.sectionIndex===r?.persConfig?.sectionIndex){t.dropItemIndex++;o=true}}if(o){const o=t.dropControl.getItems()[t.dropItemIndex];const i=e._getTileItem(o,n);if(i){t.dropItem=i}}})}catch(e){return Promise.reject(e)}},_getTileItem:function e(t,n){const o=t.data("groupId");if(o){return this._getGroup(o)}else{const e=n?this._getGroup(n):null;const o=e?e.getApps():this.getApps();return o.find(e=>Ae(e.getUrl())===t.getUrl())}},_adjustGroupDragDropInfo:function e(t){try{const e=this;return Promise.resolve(e.appManagerInstance._getSections()).then(function(n){let o;t.dragItemIndex=n.findIndex(e=>e.id===t.dragItem.getGroupId());if(!t.dropItem.isA("sap.cux.home.Group")){const n=e.getAggregation("groups").length;t.dropItemIndex=t.dropPosition===pe.RelativeDropPosition.Before&&t.dropItemIndex===n&&t.dragItemIndex!==n?n+1:t.dragItemIndex}else{o=n.findIndex(e=>e.id===t.dropItem.getGroupId());t.dropItemIndex=o}if(t.dropPosition===pe.RelativeDropPosition.Before&&t.dragItemIndex===t.dropItemIndex-1){t.dropItemIndex--}else if(t.dropPosition===pe.RelativeDropPosition.After&&(t.dragItemIndex!==t.dropItemIndex||o&&t.dropItemIndex>=o)){t.dropItemIndex++}})}catch(e){return Promise.reject(e)}},_onFavItemDrop:function e(t,n){try{const e=this;const o=t.getParameter?.("draggedControl");return Promise.resolve(e._getDragDropInfo(t,n)).then(function(t){function i(){o.removeStyleClass("sapMGTPressActive")}const{dragItemIndex:s,dropItemIndex:r,dropPosition:a,dragItem:l,dropItem:p}=t;if(s===r)return;const c=function(){if(a===pe.RelativeDropPosition.On){return Promise.resolve(e._handleOnItemDrop(l,p)).then(function(){void e.refresh()})}else{const o=function(){if(a===pe.RelativeDropPosition.After||a===pe.RelativeDropPosition.Before){e._setBusy(true);return Promise.resolve(e._handleItemsReorder(t,n)).then(function(){return Promise.resolve(e.refresh()).then(function(){if(n){void e._setGroupDetailDialogApps(n)}e._setBusy(false)})})}}();if(o&&o.then)return o.then(function(){})}}();return c&&c.then?c.then(i):i(c)})}catch(e){return Promise.reject(e)}},_handleOnItemDrop:function e(t,n){try{const e=this;if(t.isA("sap.cux.home.Group"))return Promise.resolve();const o=function(){if(!n.isA("sap.cux.home.Group")){const o=t;const i=n;e._selectedApps=[o,i];e._openCreateGroupDialog(true)}else{const o=n.getGroupId();e._setBusy(true);return Promise.resolve(e._handleMoveToGroup(t,undefined,o)).then(function(){e._setBusy(false)})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_handleItemsReorder:function e(t,n){try{const e=this;const{dragItem:o,dropItem:i,dragItemIndex:s,dropItemIndex:r}=t;const a=o.isA("sap.cux.home.Group");const l=i.isA("sap.cux.home.Group");const p=function(){if(!a&&!l){const t=o;const s=i;return Promise.resolve(Promise.all([e.appManagerInstance.getVisualization(t.getUrl(),n),e.appManagerInstance.getVisualization(s.getUrl(),n)])).then(function(t){let[n,o]=t;return Promise.resolve(e.appManagerInstance.moveVisualization({sourceSectionIndex:n?.persConfig?.sectionIndex,sourceVisualizationIndex:n?.persConfig?.visualizationIndex,targetSectionIndex:o?.persConfig?.sectionIndex,targetVisualizationIndex:o?.persConfig?.visualizationIndex})).then(function(){})})}else{const t=function(){if(a&&l){return Promise.resolve(e.appManagerInstance.moveSection(s,r)).then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(p&&p.then?p.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},navigateToAppFinder:function e(t){try{return Promise.resolve(U.getServiceAsync("Navigation")).then(function(e){const n={pageID:ve};if(t){n.sectionID=t}return Promise.resolve(e.navigate({target:{shellHash:`Shell-appfinder?&/catalog/${JSON.stringify(n)}`}})).then(function(){})})}catch(e){return Promise.reject(e)}},_validateAppsMigration:function t(){try{return Promise.resolve(re(function(){return Promise.resolve(R.isImportEnabled())},function(t){e.warning(t instanceof Error?t.message:"Error while checking if import apps is enabled");return false}))}catch(e){return Promise.reject(e)}},_openImportAppsDialog:function e(){const t=new j;t.onImportDialogPress()},_openCreateGroupDialog:function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;const n=this._generateCreateGroupDialog(t);const o=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`);o.destroyItems();const i=[...this.getApps()].map(e=>{const t=e.clone();t._onPress=e=>this._highlightApp(e,t);return this.getParent()._getAppTile(t)});this._setAggregation(o,i);let s=this.getApps();this.getParent().fireEvent("appsLoaded",{apps:s,tiles:i});this._updateSelectedAppCount();n.open()},_closeCreateGroupDialog:function e(){const t=this._generateCreateGroupDialog();t?.close();this._resetCreateGroupDialog()},_resetCreateGroupDialog:function e(){const t=this._generateCreateGroupNavContainer();const n=this._controlMap.get(`${this.getId()}-createGroupDialog-mainPage-form-groupName-input`);const o=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-search`);n.setValue("");t.to(t.getInitialPage());this._selectedApps=[];o.setValue("");this._setNoAppsSelectedError(false);this._selectedGroupColor=undefined},_generateCreateGroupDialog:function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;const n=`${this.getId()}-createGroupDialog`;const i=this._generateCreateGroupNavContainer();const s=e=>{const t=this._controlMap.get(`${n}-nextBtn`);const o=this._controlMap.get(`${n}-backBtn`);const s=this._controlMap.get(`${n}-createBtn`);const r=i.indexOfPage(i.getCurrentPage());t.setVisible(r!==i.getPages().length-1&&!e);o.setVisible(r!==0&&!e);s.setVisible(r===i.getPages().length-1||e)};if(!this._controlMap.get(n)){this._controlMap.set(`${n}-nextBtn`,new o({id:`${n}-nextBtn`,text:this._i18nBundle.getText("nextButton"),press:()=>{if(this._validateGroupName()){i.to(this._generateCreateGroupAppsPage());s(t);this._highlightSelectedApps()}},type:"Emphasized"}));const e=this._controlMap.get(`${n}-nextBtn`);Ce(e,"press","createGroupNextBtn");this._controlMap.set(`${n}-backBtn`,new o({id:`${n}-backBtn`,text:this._i18nBundle.getText("backButton"),press:()=>{i.back();s(t)}}));const r=this._controlMap.get(`${n}-backBtn`);Ce(r,"press","createGroupBackBtn");this._controlMap.set(`${n}-createBtn`,new o({id:`${n}-createBtn`,text:this._i18nBundle.getText("createButton"),press:()=>{void this._onPressGroupCreate()},type:"Emphasized"}));const l=this._controlMap.get(`${n}-createBtn`);Ce(l,"press","addCreateGroup");this._controlMap.set(n,new a(n,{title:this._i18nBundle.getText("createGroup"),content:i,escapeHandler:this._closeCreateGroupDialog.bind(this),contentHeight:"25rem",contentWidth:"41.75rem",buttons:[e,r,l,new o({id:`${n}-cancelBtn`,text:this._i18nBundle.getText("cancelBtn"),press:this._closeCreateGroupDialog.bind(this)})]}).addStyleClass("sapCuxCreateGroupDialog sapContrastPlus"))}s(t);return this._controlMap.get(n)},_highlightApp:function e(t,n){const o=t.getSource(),i=!o.hasStyleClass("sapCuxHighlightApp"),s=this._generateAppsScrollContainer();this._selectedApps=this._selectedApps||[];if(i){this._selectedApps.push(n)}else{this._selectedApps.splice(this._selectedApps.findIndex(e=>n.getUrl()===e.getUrl()),1)}this._updateSelectedAppCount();o.toggleStyleClass("sapCuxHighlightApp",i);this._setNoAppsSelectedError(this._selectedApps.length<1);s.setHeight(this._selectedApps.length<1?"15.3rem":"17.5rem")},_generateAppsScrollContainer:function e(){const o=`${this.getId()}-createGroupDialog-appsPage-scrollContainer`;if(!this._controlMap.get(o)){this._controlMap.set(`${o}-apps`,new t({id:`${o}-apps`,layout:new n(`${o}--appsContainerSettings`,{columnSize:"19rem",gap:"0.5rem"})}).addStyleClass("sapCuxAppsGridContainerPadding"));this._controlMap.set(o,new A(o,{id:o,vertical:true,visible:true,height:"17.5rem",content:[this._controlMap.get(`${o}-apps`)]}).addStyleClass("sapUiSmallMarginBeginEnd"))}return this._controlMap.get(o)},_updateSelectedAppCount:function e(){const t=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-headerContainer-count`);t.setText(this._i18nBundle.getText("selectedAppsCount",[this._selectedApps?.length||this._i18nBundle.getText("noAppSelected")]))},_generateCreateGroupNavContainer:function e(){const t=`${this.getId()}-createGroupDialog-wrapper`;if(!this._controlMap.get(t)){this._controlMap.set(t,new m(t,{initialPage:`${this.getId()}-createGroupDialog-mainPage`,pages:[this._generateCreateGroupMainPage(),this._generateCreateGroupAppsPage()]}))}return this._controlMap.get(t)},_generateCreateGroupMainPage:function e(){const t=`${this.getId()}-createGroupDialog-mainPage`;if(!this._controlMap.get(t)){this._controlMap.set(`${t}-form-groupName-input`,new c({id:`${t}-form-groupName-input`,width:"13.75rem",required:true,liveChange:this._validateGroupName.bind(this)}));this._controlMap.set(t,new I({id:t,showHeader:false,enableScrolling:false,backgroundDesign:"List",content:[new B({id:`${t}-headerContainer`,items:[new G({id:`${t}-title`,text:this._i18nBundle.getText("settings")}),new M({id:`${t}-description`,text:this._i18nBundle.getText("settingsDescription")})]}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBeginEnd sapUiTinyMarginBottom"),new F(`${t}-form`,{layout:ce.SimpleFormLayout.ResponsiveGridLayout,labelSpanS:4,labelSpanM:4,content:[new u({id:`${t}-form-groupName-label`,text:this._i18nBundle.getText("groupNameLbl")}).addStyleClass("sapUiTinyMarginTop"),this._controlMap.get(`${t}-form-groupName-input`),new u({id:`${t}-form-groupColor-label`,text:this._i18nBundle.getText("groupColorLbl")}).addStyleClass("sapUiTinyMarginTop"),new i(`${t}-form-groupColor-pallet`,{colors:_e().map(e=>e.value),colorSelect:this._onColorSelect.bind(this)}).addStyleClass("adjustSelectedColorPalette")]}).addStyleClass("sapUiMediumMarginTop")]}))}return this._controlMap.get(t)},_generateCreateGroupAppsPage:function e(){const t=`${this.getId()}-createGroupDialog-appsPage`;if(!this._controlMap.get(t)){this._controlMap.set(`${t}-search`,new P({id:`${t}-search`,liveChange:this._onCreateAppSearch.bind(this)}).addStyleClass("sapUiTinyMarginTopBottom"));this._controlMap.set(`${t}-errorMessageStrip`,new h(`${t}-errorMessageStrip`,{id:`${t}-errorMessageStrip`,type:z.Error,showIcon:true,text:this._i18nBundle.getText("selectionErrorMessage"),visible:false}));this._controlMap.set(`${t}-headerContainer-count`,new M({id:`${t}-headerContainer-count`}));this._controlMap.set(t,new I(t,{showHeader:false,backgroundDesign:"List",enableScrolling:false,content:[new B(`${t}-headerContainer`,{items:[new l(`${t}-headerContainer-titleCount`,{id:`${t}-headerContainer-titleCount`,items:[new G({id:`${t}-headerContainer-title`,text:this._i18nBundle.getText("selectedAppsTitle")}).addStyleClass("sapUiTinyMarginEnd"),this._controlMap.get(`${t}-headerContainer-count`)]}),new M({id:`${t}-description`,text:this._i18nBundle.getText("appsSelectionDescription")}).addStyleClass("sapUiTinyMarginBottom"),this._controlMap.get(`${t}-search`),this._controlMap.get(`${t}-errorMessageStrip`)]}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBeginEnd sapUiTinyMarginBottom"),this._generateAppsScrollContainer(),this._generateCreateGroupErrorMsg()]}))}return this._controlMap.get(t)},_generateCreateGroupErrorMsg:function e(){const t=`${this.getId()}-createGroupDialog-appsPage-noFilterApps`;if(!this._controlMap.get(t)){this._controlMap.set(t,new p({id:t,illustrationSize:"Spot",illustrationType:"sapIllus-SearchFolder",title:this._i18nBundle.getText("noSearchedAppTitle"),description:this._i18nBundle.getText("noSearchedAppDes"),visible:false}))}return this._controlMap.get(t)},_onColorSelect:function e(t){this._selectedGroupColor=this._getLegendColor(t.getParameter("value")).key},_getLegendColor:function e(t){return _e().find(e=>e.value===t)||me()},_setNoAppsSelectedError:function e(t){const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-errorMessageStrip`);n.setVisible(t)},_validateGroupName:function e(){const t=this._controlMap.get(`${this.getId()}-createGroupDialog-mainPage-form-groupName-input`);const n=t.getValue().trim();t.setValueState(n?"None":"Error");t.setValueStateText(n?"":this._i18nBundle.getText("invalidGroupName"));return n?true:false},_highlightSelectedApps:function e(){const t=this._selectedApps||[];const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`);const o=n.getItems()||[];o.forEach(e=>{e.toggleStyleClass("sapCuxHighlightApp",t.some(t=>Ae(t.getUrl())===e.getUrl()))})},_onCreateAppSearch:function e(t){const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`),o=t.getSource().getValue(),i=n.getItems()||[],s=new RegExp(o,"i");i.forEach(e=>{e.setVisible(s.test(e.getHeader()))});const r=i.filter(e=>e.getVisible());const a=r.length>0;this._generateAppsScrollContainer()?.setVisible(a);this._generateCreateGroupErrorMsg()?.setVisible(!a)},_onPressGroupCreate:function t(){try{const t=this;const n=t._controlMap.get(`${t.getId()}-createGroupDialog-mainPage-form-groupName-input`);const o=function(){if(t._validateGroupName()){const o=function(){if(t._selectedApps?.length){t._setBusy(true);const o=le(function(){return re(function(){return Promise.resolve(t._createGroup({selectedApps:t._selectedApps,groupName:n.getValue(),groupColor:t._getGroupColor()})).then(function(){return Promise.resolve(t.refresh()).then(function(){f.show(t._i18nBundle.getText("newGroupCreated"),{of:t._controlMap.get(`${t.getId()}-createGroupDialog`),offset:"0 80"});const e=t.getAggregation("groups")||[];void t._showGroupDetailDialog(e[0]?.getGroupId())})})},function(n){e.error(n);f.show(t._i18nBundle.getText("unableToCreateGroup"))})},function(e,n){t._setBusy(false);t._closeCreateGroupDialog();if(e)throw n;return n});if(o&&o.then)return o.then(function(){})}else{t._setNoAppsSelectedError(true)}}();if(o&&o.then)return o.then(function(){})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_createGroup:function e(t){try{const e=this;const{selectedApps:n,groupName:o,groupColor:i}=t;return Promise.resolve(e.appManagerInstance.getSectionVisualizations()).then(function(t){const s=n.reduce((e,n)=>{const o=t.find(e=>e.url===n.getUrl());if(o){e.push(o)}return e},[]);const r=s[0].persConfig.sectionId;return Promise.resolve(e.appManagerInstance.addSection({sectionIndex:1,sectionProperties:{title:o||e._i18nBundle.getText("newGroup"),visible:true,visualizations:s.map(e=>e.visualization)}})).then(function(){const t=s.reduce((e,t)=>{if(t.visualization?.id){const n=(t.persConfig?.duplicateApps||[]).map(e=>e.visualization?.id);e=e.concat([t.visualization?.id],n)}return e},[]);return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:r,vizIds:t})).then(function(){return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(t){const n=t.find(e=>e.default);const o=t[n?1:0]?.id;return Promise.resolve(e._updateAppPersonalization(s.map(e=>({visualization:e,targetGroupId:o})))).then(function(){return Promise.resolve(e._updateGroupPersonalization(o,i)).then(function(){})})})})})})}catch(e){return Promise.reject(e)}},_getGroupColor:function e(){const t=me().key;const n=this._selectedApps[0];const o=this._selectedApps.some(e=>e.getBgColor()!==n.getBgColor());return this._selectedGroupColor||(o?t:n.getBgColor())},_openColorPopover:function e(t){const n=`${this.getId()}-colorPopover`,o=_e().map(e=>e.value);const i=t.getSource();this._currentItem=i.getParent();let r=this._controlMap.get(n);if(!r){r=new s(n,{id:n,colors:o,showDefaultColorButton:false,showMoreColorsButton:false,showRecentColorsSection:false,colorSelect:e=>{ue._closeActionsPopover();const t=e.getParameter("value");void this._handleColorSelect(this._currentItem,t)}}).addStyleClass("sapContrastPlus");r._oPopover.setPlacement(ae.HorizontalPreferredRight);this._controlMap.set(n,r)}r.openBy(t.getParameter("listItem"))},_handleColorSelect:function e(t,n){try{const o=this;function i(){o.oEventBus.publish("appsChannel","favAppColorChanged",{item:t,color:n})}const s=o._getLegendColor(n).key;t.setProperty("bgColor",s,true);const r=t.isA("sap.cux.home.Group")?t.getGroupId():null;const a=!r&&t.getParent()?.isA("sap.cux.home.Group");if(a){o._refreshGroupDetailDialog(t,false)}else{o._applyUngroupedTileColor(t,n);o.oEventBus.publish("appsChannel","favAppColorChanged",{item:t,color:n})}const l=function(){if(r){void o._updateGroupPersonalization(r,s);const e=o._controlMap.get(`${o.getId()}-detailDialog-toolbar-color`);e?.setColor(n)}else{const e=t;const n=a?e.getParent().getGroupId():undefined;return Promise.resolve(o.appManagerInstance.getVisualization(e.getUrl(),n)).then(function(e){if(e){void o._updateAppPersonalization([{visualization:e,color:s}])}})}}();return Promise.resolve(l&&l.then?l.then(i):i(l))}catch(p){return Promise.reject(p)}},_getAllowedMoveGroups:function e(t){let n=this.getAggregation("groups")||[];if(t){n=n.filter(e=>e.getGroupId()!==t)}return n},_setBusy:function e(t){[this._generateGroupDetailDialog(),this._generateCreateGroupDialog(),this._generateAddFromInsightsDialog()].forEach(e=>{e.setBusy(t)});de.prototype.setBusy.call(this,t)},_openMoveToGroupPopover:function e(t,n){const o=`${this.getId()}-moveToGroupPopover`,i=t?.getSource(),s=i?.getParent(),r=n?.getGroupId();let a=this._controlMap.get(`${o}-list`),l=this._controlMap.get(o);if(!l){a=new d({id:`${o}-list`,itemPress:()=>ue._closeActionsPopover()});this._controlMap.set(`${o}-list`,a);l=new v({id:o,showHeader:false,placement:ae.HorizontalPreferredRight,content:[a]}).addStyleClass("sapContrastPlus");this._controlMap.set(o,l)}a.removeAllItems();this._getAllowedMoveGroups(r).forEach(e=>a.addItem(new C({title:e.getTitle(),type:"Active",press:()=>{void this._handleMoveToGroup(s,r,e.getGroupId())}})));l.openBy(t.getParameter("listItem"))},_handleRemove:function t(n,o){const i=this;const s=o?.getApps()?.length===1;let r=this._i18nBundle.getText("removeAppMessage",[n.getTitle()]),a=this._i18nBundle.getText("remove"),l=this._i18nBundle.getText("remove"),p=g.Icon.QUESTION;if(s){r=this._i18nBundle.getText("removeFromMyHomeMessage",[n.getTitle()]);a=this._i18nBundle.getText("delete");l=this._i18nBundle.getText("delete");p=g.Icon.WARNING}g.show(r,{icon:p,title:a,actions:[l,g.Action.CANCEL],emphasizedAction:l,onClose:function(t){try{const r=function(){if(t===l){i._setBusy(true);const t=le(function(){return re(function(){return Promise.resolve(i._removeApp(n,o)).then(function(){if(s){i._closeGroupDetailDialog()}if(o){i._refreshGroupDetailDialog(n)}return Promise.resolve(i.getParent()._refreshAllPanels()).then(function(){f.show(i._i18nBundle.getText("appRemoved"))})})},function(t){e.error(t);f.show(i._i18nBundle.getText("unableToRemoveApp"))})},function(e,t){i._setBusy(false);if(e)throw t;return t});if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}})},_removeApp:function e(t,n){try{const e=this;const o=n?.getApps()?.length===1,i=n?.getGroupId(),s=t.getUrl();return Promise.resolve(e.appManagerInstance.getVisualization(s,i)).then(function(t){const n=function(){if(o){return Promise.resolve(e._deleteGroup(i)).then(function(){})}else{let n=[t?.visualization?.id];if(!i){n=n.concat(t?.persConfig?.duplicateApps?.map(e=>e.visualization?.id))}const o=function(){if(t?.persConfig?.sectionId&&n.length>0){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig.sectionId,vizIds:n})).then(function(){void e._deletePersonalization({appId:s,oldAppId:t?.oldAppId,sectionId:t?.persConfig?.sectionId,isRecentlyAddedApp:t?.persConfig?.isDefaultSection})})}}();if(o&&o.then)return o.then(function(){})}}();if(n&&n.then)return n.then(function(){})})}catch(e){return Promise.reject(e)}},_handleMoveToGroup:function e(t,n,o){try{const e=this;const i=n?e._getGroup(n):undefined,s=i?.getApps()?.length===1;const r=function(){if(s){const i=e._i18nBundle.getText("moveAppMessage",[t.getTitle()]);const s=e._i18nBundle.getText("delete");g.show(i,{icon:g.Icon.WARNING,title:s,actions:[s,g.Action.CANCEL],emphasizedAction:s,onClose:i=>{if(i===s){void e._moveAppAndHandleGroupChanges(t,n,o)}}})}else{return Promise.resolve(e._moveAppAndHandleGroupChanges(t,n,o)).then(function(){})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_moveAppAndHandleGroupChanges:function t(n,o,i){try{const t=this;const s=o?t._getGroup(o):null,r=i?t._getGroup(i):null,a=r?.getTitle(),l=s?.getApps()?.length===1;const p=le(function(){return re(function(){t._setBusy(true);return Promise.resolve(t._moveAppToGroup(n,o,i)).then(function(){function e(){if(o){t._refreshGroupDetailDialog(n)}const e=a?t._i18nBundle.getText("appMoved",[a]):t._i18nBundle.getText("appUngrouped");f.show(e);return Promise.resolve(t.refresh()).then(function(){})}const i=function(){if(l&&o){return Promise.resolve(t._deleteGroup(o)).then(function(){t._closeGroupDetailDialog()})}}();return i&&i.then?i.then(e):e(i)})},function(t){e.error(t)})},function(e,n){t._setBusy(false);if(e)throw n;return n});return Promise.resolve(p&&p.then?p.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_refreshGroupDetailDialog:function e(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;const o=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const i=o.getItems();const s=t.getParent();const r=s.getApps();if(n){const e=r.findIndex(e=>e.getUrl()===t.getUrl());r[e].destroy(true);i[e].destroy(true)}else{r.forEach((e,n)=>{if(e.getUrl()===t.getUrl()){e.setProperty("bgColor",t.getBgColor(),true);i[n].setBackgroundColor(t.getBgColor())}})}},_moveAppToGroup:function e(t,n,o){try{const e=this;const i=t.getUrl();return Promise.resolve(Promise.all([e.appManagerInstance.getSectionVisualizations(n),e.appManagerInstance._getSections()])).then(function(t){let[s,r]=t;const a=s.find(e=>e.url===i),l=a?.persConfig?.visualizationIndex??-1,p=a?.persConfig?.sectionIndex;const c=!o;const u=!n;const d=r.findIndex(e=>!o?e.default:e.id===o);const g=l>-1?s[l]:null;const h=function(){if(g!==null){function t(){return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(t){const n=t.find(e=>e.default);return Promise.resolve(e._updateAppPersonalization([{visualization:g,targetGroupId:o??n?.id,isTargetGroupDefault:c}])).then(function(){})})}const n=function(){if(c){return Promise.resolve(e._moveAppToDefaultGroup(g)).then(function(){})}else{function t(){return Promise.resolve(e.appManagerInstance.moveVisualization({sourceSectionIndex:p,sourceVisualizationIndex:l,targetSectionIndex:d,targetVisualizationIndex:-1})).then(function(){})}const n=function(){if(u){return Promise.resolve(e._removeDuplicateVisualizations(g)).then(function(){})}}();return n&&n.then?n.then(t):t(n)}}();return n&&n.then?n.then(t):t(n)}}();if(h&&h.then)return h.then(function(){})})}catch(e){return Promise.reject(e)}},_moveAppToDefaultGroup:function e(t){try{const e=this;return Promise.resolve(e._addVisualization(t)).then(function(){const n=function(){if(t.persConfig?.sectionId&&t.visualization?.id){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig?.sectionId,vizIds:[t.visualization?.id]})).then(function(){})}}();if(n&&n.then)return n.then(function(){})})}catch(e){return Promise.reject(e)}},_removeDuplicateVisualizations:function e(t){try{const e=this;const n=t?.persConfig?.duplicateApps?.map(e=>e.visualization?.id)||[];const o=function(){if(t.persConfig?.sectionId&&n.length>0){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig?.sectionId,vizIds:n})).then(function(){})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_onRenameGroup:function e(t){const n=t.getSource()?.getParent();void this._showGroupDetailDialog(n.getGroupId(),true)},_handleUngroupApps:function e(t){const n=this._i18nBundle.getText("ungroupAppsMessage",[t.title]),o=this._i18nBundle.getText("delete"),i=this._i18nBundle.getText("delete");g.show(n,{icon:g.Icon.WARNING,title:o,actions:[i,g.Action.CANCEL],emphasizedAction:i,onClose:e=>{if(e===i){void this._ungroupApps(t.id)}}})},_onDeleteGroup:function e(t){const n=this;const o=t.getSource()?.getParent(),i=this._i18nBundle.getText("deleteGroupMessage",[o.getTitle()]),s=this._i18nBundle.getText("delete"),r=this._i18nBundle.getText("delete"),a=this._i18nBundle.getText("moveApps");g.show(i,{icon:g.Icon.WARNING,title:s,actions:[r,this._i18nBundle.getText("moveApps"),g.Action.CANCEL],emphasizedAction:r,onClose:function(e){try{const t=function(){if(e===r){n._setBusy(true);return Promise.resolve(n._deleteGroup(o.getGroupId())).then(function(){f.show(n._i18nBundle.getText("groupDeleted"));void n.refresh();n._closeGroupDetailDialog();n._setBusy(false)})}else if(e===a){void n._ungroupApps(o.getGroupId())}}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}})},_ungroupApps:function t(n){try{const t=this;t._setBusy(true);const o=le(function(){return re(function(){return Promise.resolve(t.appManagerInstance.getSectionVisualizations(n)).then(function(e){return Promise.resolve(t.appManagerInstance._getSections()).then(function(o){const i=o.find(e=>e.id===n);return Promise.resolve(Promise.all(e.map(e=>t._addVisualization(e)))).then(function(){return Promise.resolve(t.appManagerInstance._getSections(true)).then(function(o){const s=o.find(e=>e.default);return Promise.resolve(t._updateAppPersonalization(e.map(e=>({visualization:e,targetGroupId:s?.id,isTargetGroupDefault:true})))).then(function(){function o(){f.show(t._i18nBundle.getText("appsUngrouped")??"");return Promise.resolve(t.refresh()).then(function(){})}const s=function(){if(i?.preset){return Promise.resolve(t.appManagerInstance.removeVisualizations({sectionId:n,vizIds:e.map(e=>e.visualization?.id)})).then(function(){})}else{return Promise.resolve(t._deleteGroup(n)).then(function(){})}}();return s&&s.then?s.then(o):o(s)})})})})})},function(n){e.error(n);f.show(t._i18nBundle.getText("unableToUngroupApps")??"")})},function(e,n){t._setBusy(false);t._closeGroupDetailDialog();if(e)throw n;return n});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_showGroupDetailDialog:function e(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;try{const e=this;const o=e._getGroup(t);if(!o){return Promise.resolve()}e._selectedGroupId=t;const i=e._generateGroupDetailDialog();const s=e._controlMap.get(`${e.getId()}-detailDialog-toolbar-color`);s.setColor(E.get({name:o.getBgColor()}));return Promise.resolve(e._setGroupDetailDialogApps(t)).then(function(){i.open();e._setGroupNameControl(o.getTitle(),n)})}catch(e){return Promise.reject(e)}},_setGroupDetailDialogApps:function e(t){try{const e=this;const n=e._getGroup(t);const o=function(){if(n){return Promise.resolve(e.appManagerInstance.getSectionVisualizations(t,false)).then(function(o){n.destroyAggregation("apps",true);o=o.map((t,o)=>({...t,menuItems:e._getAppActions(n,o,t)}));const i=e.generateApps(o);const s=e._controlMap.get(`${e.getId()}-detailDialog-apps`);e._setAggregation(n,i,"apps");s.destroyItems();e._setAggregation(s,n.getApps().map(t=>e.getParent()._getAppTile(t)));e._applyGroupedAppsPersonalization(t);e._dispatchAppsLoadedEvent(i)})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_applyGroupedAppsPersonalization:function e(t){const n=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const o=n?.getItems()||[];void this._applyTilesPersonalization(o,t,false)},_dispatchAppsLoadedEvent:function e(t){const n=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const o=n?.getItems()||[];this.getParent().fireEvent("appsLoaded",{apps:t,tiles:o})},_generateGroupDetailDialog:function e(){const i=`${this.getId()}-detailDialog`;if(!this._controlMap.get(i)){this._controlMap.set(`${i}-toolbar-color`,new w({id:`${i}-toolbar-color`,src:"sap-icon://color-fill",size:"1.25rem"}).addStyleClass("sapUiTinyMarginEnd"));this._controlMap.set(`${i}-toolbar-title`,new G({id:`${i}-toolbar-title`,visible:true}));const e=new c({id:`${i}-toolbar-title-edit`,width:"13.75rem",visible:false});this._controlMap.set(`${i}-toolbar-title-edit`,e);e.onsapfocusleave=()=>{void this._onGroupEditName(e.getValue())};const s=new t({id:`${i}-apps`,layout:new n(`${i}-appsLayout`,{columnSize:"19rem",gap:"0.5rem"})}).addStyleClass("sapCuxAppsContainerBorder sapCuxAppsDetailContainerPadding");this.addDragDropConfigTo(s,e=>this._onFavItemDrop(e,this._selectedGroupId));this._controlMap.set(`${i}-apps`,s);this._controlMap.set(`${i}-addAppsBtn`,new o(`${i}-addAppsBtn`,{text:this._i18nBundle.getText("addApps"),icon:"sap-icon://action",visible:Ge(),press:()=>{const e=this._selectedGroupId;this._closeGroupDetailDialog();this._selectedGroupId=e;void this.navigateToAppFinder(e)}}));this._controlMap.set(i,new a(i,{content:this._controlMap.get(`${i}-apps`),contentWidth:"60.75rem",endButton:new o({id:`${i}-groupDetailCloseBtn`,text:this._i18nBundle.getText("closeBtn"),press:this._closeGroupDetailDialog.bind(this)}),escapeHandler:this._closeGroupDetailDialog.bind(this),customHeader:new y(`${this.getId()}-toolbar`,{content:[this._controlMap.get(`${i}-toolbar-color`),this._controlMap.get(`${i}-toolbar-title`),this._controlMap.get(`${i}-toolbar-title-edit`),new x({id:`${this.getId()}-toolbarSpacer`}),this._controlMap.get(`${i}-addAppsBtn`),new o({id:"overflowBtn",icon:"sap-icon://overflow",type:"Transparent",press:e=>{const t=e.getSource();const n=this._selectedGroupId?this._getGroup(this._selectedGroupId):null;const o=n?.getAggregation("menuItems");const i=ue.get(o);i.openBy(t)}})]})}).addStyleClass("sapCuxGroupDetailDialog"))}return this._controlMap.get(i)},_closeGroupDetailDialog:function e(){const t=this._controlMap.get(`${this.getId()}-detailDialog`);const n=this._getGroup(this._selectedGroupId);n?.destroyApps();this._selectedGroupId=undefined;t?.close()},_onGroupEditName:function e(t){try{const n=this;function o(){n._setGroupNameControl(t,false);n._setBusy(false)}n._setBusy(true);const i=n._selectedGroupId,s=n._getGroup(i),r=s?.getTitle();const a=function(){if(t&&t!==r){return Promise.resolve(n._renameGroup(i,t)).then(function(){s?.setProperty("title",t,true);void n.refresh();f.show(n._i18nBundle.getText("groupNameChanged")||"")})}}();return Promise.resolve(a&&a.then?a.then(o):o(a))}catch(l){return Promise.reject(l)}},_renameGroup:function e(t,n){try{return Promise.resolve(U.getServiceAsync("Pages")).then(function(e){const o=e.getPageIndex(ve),i=e.getModel().getProperty(`/pages/${o}/sections/`),s=i.findIndex(e=>e.id===t);const r=function(){if(s>-1){return Promise.resolve(e.renameSection(o,s,n)).then(function(){})}}();if(r&&r.then)return r.then(function(){})})}catch(e){return Promise.reject(e)}},_setGroupNameControl:function e(t,n){const o=this._controlMap.get(`${this.getId()}-detailDialog`);const i=this._controlMap.get(`${this.getId()}-detailDialog-toolbar-title`);const s=this._controlMap.get(`${this.getId()}-detailDialog-toolbar-title-edit`);s.setValue(t);i.setText(t);s?.setVisible(n);i?.setVisible(!n);if(n){o.setInitialFocus(s)}},_generateAddFromInsightsDialog:function e(){const t=`${this.getId()}-addFromInsightsDialog`;const n=()=>{const e=this._getSelectedInsights();this._controlMap.get(`${t}-addBtn`).setEnabled(e.length>0)};if(!this._controlMap.get(t)){const e=(e,t)=>{const n=new o(e,{icon:"sap-icon://action",text:this._i18nBundle.getText("appFinderBtn"),press:()=>{this._closeAddFromInsightsDialog();void this.navigateToAppFinder()},visible:Ge(),type:t||oe.Default});Ce(n,"press","appsAppFinder");return n};this._controlMap.set(`${t}-list`,new d({id:`${t}-list`,mode:"MultiSelect",selectionChange:n}));this._controlMap.set(`${t}-addBtn`,new o({id:`${t}-addBtn`,text:this._i18nBundle.getText("addFromInsightsDialogBtn"),type:"Emphasized",press:()=>{void this._addFromInsights()},enabled:false}));const i=this._controlMap.get(`${t}-addBtn`);Ce(i,"press","addStaticTiles");this._controlMap.set(`${t}-errorMessage`,new p({id:`${t}-errorMessage`,illustrationSize:"Spot",illustrationType:"sapIllus-AddColumn",title:this._i18nBundle.getText("noAppsTitle"),description:this._i18nBundle.getText("noDataMsgInsightTiles"),visible:true}).addStyleClass("sapUiLargeMarginTop"));this._controlMap.set(t,new a(t,{title:this._i18nBundle.getText("addFromInsights"),content:[new u({id:`${t}-label`,text:this._i18nBundle.getText("addFromInsightsDialogLabel"),wrapping:true}).addStyleClass("sapMTitleAlign sapUiTinyMarginTopBottom sapUiSmallMarginBeginEnd"),new l({id:`${t}-textContainer`,justifyContent:"SpaceBetween",alignItems:"Center",items:[new G({id:`${t}-text`,text:this._i18nBundle.getText("addFromInsightsDialogTitle")}),e(`${t}-addAppsBtn`,oe.Transparent)]}).addStyleClass("sapUiTinyMarginTop dialogHeader sapUiSmallMarginBeginEnd"),this._controlMap.get(`${t}-list`),this._controlMap.get(`${t}-errorMessage`)],contentWidth:"42.75rem",contentHeight:"32.5rem",endButton:new o({id:`${t}-addFromInsightsCloseBtn`,text:this._i18nBundle.getText("closeBtn"),press:this._closeAddFromInsightsDialog.bind(this)}),escapeHandler:this._closeAddFromInsightsDialog.bind(this),buttons:[this._controlMap.get(`${t}-addBtn`),new o({id:`${t}-cancelBtn`,text:this._i18nBundle.getText("cancelBtn"),press:this._closeAddFromInsightsDialog.bind(this)})]}).addStyleClass("sapContrastPlus sapCuxAddFromInsightsDialog"))}n();return this._controlMap.get(t)},_handleAddFromInsights:function e(){try{const e=this;return Promise.resolve(e._getInsightTilesToAdd()).then(function(t){const n=e._generateAddFromInsightsDialog();e._controlMap.get(`${e.getId()}-addFromInsightsDialog-errorMessage`)?.setVisible(t.length===0);e._generateInsightListItems(t);n.open()})}catch(e){return Promise.reject(e)}},_generateInsightListItems:function e(t){const n=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);if(t.length){n.destroyItems();const e=t.map((e,t)=>new r({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}`,content:[new l({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content`,alignItems:"Center",items:[new w({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content-icon`,src:e.icon,backgroundColor:this._getLegendColor(e.BGColor||"").value,color:"white",width:"2.25rem",height:"2.25rem",size:"1.25rem"}).addStyleClass("sapUiRoundedBorder sapUiTinyMargin"),new _({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content-identifier`,title:e.title,text:e.subtitle,tooltip:e.title}).addStyleClass("sapUiTinyMargin")]})]}).addStyleClass("sapUiContentPadding").data("vizId",e.visualization?.vizId));this._setAggregation(n,e)}n?.setVisible(t.length!==0)},_getInsightTilesToAdd:function e(){try{const e=this;return Promise.resolve(Promise.all([e.appManagerInstance.fetchInsightApps(true,e._i18nBundle.getText("insights")),e.appManagerInstance.fetchFavVizs(false,true)])).then(function(t){let[n,o]=t;const i=n.reduce((e,t)=>{if(!t.isCount&&!t.isSmartBusinessTile){const n=o.findIndex(e=>e.visualization?.vizId===t.visualization?.vizId||e.appId===t.appId);if(n===-1){e.push(t)}}return e},[]);return e.appManagerInstance._filterDuplicateVizs(i,false)})}catch(e){return Promise.reject(e)}},_closeAddFromInsightsDialog:function e(){const t=this._generateAddFromInsightsDialog();const n=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);n.removeSelections();t?.close()},_getSelectedInsights:function e(){const t=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);return t.getSelectedItems()||[]},_addFromInsights:function e(){try{const t=this;function n(){t._closeAddFromInsightsDialog();f.show(t._i18nBundle.getText(o.length===1?"addFromInsightTileSuccess":"addFromInsightTilesSuccess",[o.length]));return Promise.resolve(t.getParent()._refreshAllPanels()).then(function(){t._setBusy(false)})}t._setBusy(true);const o=t._getSelectedInsights();const i=ie(o,function(e){return Promise.resolve(t.appManagerInstance.addVisualization(e.data("vizId"))).then(function(){})});return Promise.resolve(i&&i.then?i.then(n):n(i))}catch(s){return Promise.reject(s)}},_updateAppPersonalization:function e(t){try{const e=this;return Promise.resolve(e._getAppPersonalization()).then(function(n){for(const o of t){const{visualization:t}=o;const{persConfig:i}=t;const s=i?.sectionId;const r=o.targetGroupId??s;if(s!==r){e._updateMoveAppPersonalization(n,o)}else{e._updateAppColorPersonalization(n,o)}}return Promise.resolve(e.setFavAppsPersonalization(n)).then(function(){})})}catch(e){return Promise.reject(e)}},_updateMoveAppPersonalization:function e(t,n){const{visualization:o,isTargetGroupDefault:i}=n;const{appId:s,oldAppId:r,persConfig:a}=o;const l=a?.sectionId;const p=a?.isDefaultSection;const c=a?.duplicateApps||[];const u=n.targetGroupId??l;const d=this._getPersonalizationIndex(t,{appId:s,oldAppId:r,sectionId:l,isRecentlyAddedApp:p});if(d>-1){const e={...t[d],sectionId:u,isRecentlyAddedApp:i,isSection:false};if(c.length===0){t.splice(d,1)}const n=this._getPersonalizationIndex(t,{appId:s,oldAppId:r,sectionId:u,isRecentlyAddedApp:i});if(n>-1){t.splice(n,1)}t.push(e)}},_updateGroupPersonalization:function e(t,n){try{const e=this;return Promise.resolve(e._getAppPersonalization()).then(function(o){const i=e._getPersonalizationIndex(o,{isSection:true,sectionId:t});const s={BGColor:n,isSection:true,sectionId:t,isRecentlyAddedApp:false};if(i>-1){o[i]=s}else{o.push(s)}return Promise.resolve(e.setFavAppsPersonalization(o)).then(function(){})})}catch(e){return Promise.reject(e)}},_getPersonalizationIndex:function e(t,n){const{appId:o,oldAppId:i,sectionId:s,isSection:r,isRecentlyAddedApp:a}=n;return t.findIndex(e=>{if(r){return e.sectionId===s&&e.isSection}else{return a?(e.appId===o||e.appId===i)&&e.isRecentlyAddedApp:(e.appId===o||e.appId===i)&&e.sectionId===s}})},_addVisualization:function e(t,n){if(t.visualization){return t.visualization.isBookmark?this.appManagerInstance.addBookMark(t.visualization):this.appManagerInstance.addVisualization(t.visualization.vizId,n)}return Promise.reject(new Error("No visualization provided to add"))},_deleteGroup:function e(t){try{const e=this;return Promise.resolve(U.getServiceAsync("Pages")).then(function(n){const o=n.getPageIndex(ve),i=n.getModel().getProperty(`/pages/${o}/sections/`),s=i.findIndex(e=>e.id===t);const r=function(){if(s>-1){return Promise.resolve(n.deleteSection(o,s)).then(function(){void e._deletePersonalization({sectionId:t,isSection:true})})}}();if(r&&r.then)return r.then(function(){})})}catch(e){return Promise.reject(e)}},_deletePersonalization:function e(t){try{const e=this;const{isSection:n,sectionId:o}=t;return Promise.resolve(e._getAppPersonalization()).then(function(i){if(!n){const n=e._getPersonalizationIndex(i,t);if(n>-1){i.splice(n,1)}}else{i=i.filter(e=>e.sectionId!==o)}void e.setFavAppsPersonalization(i)})}catch(e){return Promise.reject(e)}},_handleGroupPress:function e(t){const n=t.getParameter("groupId");if(n){void this._showGroupDetailDialog(n)}},_handleKeyboardMoveApp:function e(t,n){try{const e=this;const o=S.closestTo(t.target.firstElementChild);const i=o.getParent();const s=function(){if(t.metaKey||t.ctrlKey){if(t.key==="x"&&!o.data("groupId")&&!e._cutApp&&!n){o.$().css("opacity",.6);o._oMoreIcon.setEnabled(false);e._cutApp=o}const s=function(){if(t.key==="v"&&e._cutApp&&!n){const t=new T("keyboardDragDropEvent",i,{draggedControl:e._cutApp,droppedControl:o,dropPosition:pe.RelativeDropPosition.On});return Promise.resolve(e._onFavItemDrop(t)).then(function(){e._cutApp=undefined})}}();if(s&&s.then)return s.then(function(){})}}();return Promise.resolve(s&&s.then?s.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_resetCutElement:function e(t){const n=this._generateAppsWrapper().getId();if(!t.target.id.includes(n)){this._cutApp?.$().css("opacity","");this._cutApp=undefined}},generateIllustratedMessage:function e(){const t=de.prototype.generateIllustratedMessage.call(this);t.setDescription(this._i18nBundle.getText("noFavAppsDescription"));t.addAdditionalContent(new o(`${this.getId()}-errorMessage-addApps`,{text:this._i18nBundle.getText("addApps"),tooltip:this._i18nBundle.getText("addAppsTooltip"),icon:"sap-icon://action",visible:Ge(),press:()=>{void this.navigateToAppFinder()},type:"Emphasized"}));return t}});Te.favouritesMenuItems=ye;return Te});
|
|
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","sap/ushell/components/pages/MyHomeImport","sap/ushell/components/pages/controller/PageRuntime.controller","./BaseApp","./BaseAppPersPanel","./Group","./MenuItem","./utils/Accessibility","./utils/Constants","./utils/DataFormatUtils","./utils/FESRUtil","./utils/InsightsUtils"],function(e,t,n,o,i,s,r,a,l,p,c,u,d,g,h,f,m,_,I,v,P,A,C,M,G,y,B,x,D,T,S,$,w,b,z,E,F,N,V,U,R,j,L,H,k,O,K,W,Y,q,J,Q,X){"use strict";function Z(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}const ee=typeof Symbol!=="undefined"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function te(e,t,n){if(!e.s){if(n instanceof ne){if(n.s){if(t&1){t=n.s}n=n.v}else{n.o=te.bind(null,e,t);return}}if(n&&n.then){n.then(te.bind(null,e,t),te.bind(null,e,2));return}e.s=t;e.v=n;const o=e.o;if(o){o(e)}}}const ne=function(){function e(){}e.prototype.then=function(t,n){const o=new e;const i=this.s;if(i){const e=i&1?t:n;if(e){try{te(o,1,e(this.v))}catch(e){te(o,2,e)}return o}else{return this}}this.o=function(e){try{const i=e.v;if(e.s&1){te(o,1,t?t(i):i)}else if(n){te(o,1,n(i))}else{te(o,2,i)}}catch(e){te(o,2,e)}};return o};return e}();function oe(e){return e instanceof ne&&e.s&1}function ie(e,t,n){var o=-1,i,s;function r(a){try{while(++o<e.length&&(!n||!n())){a=t(o);if(a&&a.then){if(oe(a)){a=a.v}else{a.then(r,s||(s=te.bind(null,i=new ne,2)));return}}}if(i){te(i,1,a)}else{i=a}}catch(e){te(i||(i=new ne),2,e)}}r();return i}const se=S["ButtonType"];function re(e,t,n){if(typeof e[ee]==="function"){var o=e[ee](),i,s,r;function c(e){try{while(!(i=o.next()).done&&(!n||!n())){e=t(i.value);if(e&&e.then){if(oe(e)){e=e.v}else{e.then(c,r||(r=te.bind(null,s=new ne,2)));return}}}if(s){te(s,1,e)}else{s=e}}catch(e){te(s||(s=new ne),2,e)}}c();if(o.return){var a=function(e){try{if(!i.done){o.return()}}catch(e){}return e};if(s&&s.then){return s.then(a,function(e){throw a(e)})}a()}return s}if(!("length"in e)){throw new TypeError("Object is not iterable")}var l=[];for(var p=0;p<e.length;p++){l.push(e[p])}return ie(l,function(e){return t(l[e])},n)}const ae=S["ListType"];function le(e,t){try{var n=e()}catch(e){return t(e)}if(n&&n.then){return n.then(void 0,t)}return n}const pe=S["PlacementType"];function ce(e,t){try{var n=e()}catch(e){return t(true,e)}if(n&&n.then){return n.then(t.bind(null,false),t.bind(null,true))}return t(false,n)}const ue=E["dnd"];const de=U["form"];const ge=k["ActionsPopover"];const he=Z(O);const fe=Z(K);const me=Z(W);const _e=Y["checkPanelExists"];const Ie=q["DEFAULT_BG_COLOR"];const ve=q["END_USER_COLORS"];const Pe=q["MYAPPS_SECTION_ID"];const Ae=q["MYHOME_PAGE_ID"];const Ce=J["getLeanURL"];const Me=J["recycleId"];const Ge=Q["addFESRId"];const ye=Q["addFESRSemanticStepName"];const Be=X["sortMenuItems"];const xe=()=>R.last("/core/shell/enablePersonalization")||R.last("/core/catalog/enabled");var De=function(e){e["CREATE_GROUP"]="createGrpMenuBtn";e["ADD_APPS"]="addAppsMenuBtn";e["ADD_FROM_INSIGHTS"]="addInsightsMenuBtn";return e}(De||{});const Te="sap.cux.home.TilesPanel";const Se="sap.cux.home.InsightsContainer";const $e=[De.CREATE_GROUP,De.ADD_APPS,De.ADD_FROM_INSIGHTS,"settings"];const we=he.extend("sap.cux.home.FavAppPanel",{metadata:{library:"sap.cux.home",defaultAggregation:"apps",aggregations:{apps:{type:"sap.cux.home.App",singularName:"app",multiple:true,visibility:"hidden"},groups:{type:"sap.cux.home.Group",singularName:"group",multiple:true,visibility:"hidden"}}},constructor:function e(t,n){he.prototype.constructor.call(this,t,n);this._selectedApps=[];this._isInitialLoad=true;this._updateAppColorPersonalization=(e,t)=>{const{visualization:n,color:o}=t;const{appId:i,oldAppId:s,persConfig:r}=n;const a=r?.sectionId;const l=r?.isDefaultSection;const p=this._getPersonalizationIndex(e,{appId:i,oldAppId:s,sectionId:a,isRecentlyAddedApp:l});if(p>-1){e[p].BGColor=o}else{e.push({BGColor:o,sectionId:a,isRecentlyAddedApp:l,appId:i,isSection:false})}}},init:function e(){const t=this,n=this;he.prototype.init.call(this);this.setProperty("key","favApps");this.setProperty("title",this._i18nBundle.getText("favoritesTab"));this.setProperty("tooltip",this._i18nBundle.getText("favAppsInfo"));void this._createActionButtons();this._createHeaderMenuItems();const o=this._generateAppsWrapper();if(o){this.addDragDropConfigTo(o,e=>this._onFavItemDrop(e),e=>this._handleKeyboardMoveApp(e),ue.DropPosition.OnOrBetween)}this.oEventBus=b.getInstance();this.oEventBus.subscribe("importChannel","appsImport",function(e,n,o){try{const e=o?.apps||[];const n=o?.groupInfo||[];return Promise.resolve(t.addAppsAndSections(e,n)).then(function(){t._importdone();return Promise.resolve(t.getParent()._refreshAllPanels()).then(function(){})})}catch(e){return Promise.reject(e)}},this);this.oEventBus.subscribe("importChannel","resetImported",function(){try{return Promise.resolve(n.setImportButtonVisibility(true)).then(function(){})}catch(e){return Promise.reject(e)}},this);this.attachPersistDialog(()=>{if(this._selectedGroupId){void this._showGroupDetailDialog(this._selectedGroupId)}});document.addEventListener("click",e=>this._resetCutElement(e));document.addEventListener("keydown",e=>this._resetCutElement(e))},_importdone:function e(){const t={status:true};this.oEventBus.publish("importChannel","appsImported",t)},addAppsAndSections:function e(t,n){try{const e=this;let o=[];return Promise.resolve(e._getAppPersonalization()).then(function(i){return Promise.resolve(j.getServiceAsync("Pages")).then(function(s){function r(){return Promise.resolve(e.setFavAppsPersonalization(i)).then(function(){return o.reduce((e,t)=>e.then(()=>t()),Promise.resolve()).then(()=>e.updateDefaultSectionPersonalization(i))})}const a=re(t,function(t){const r=t.visualizations;const a=function(){if(r?.length){const a=function(){if(t.default||t.id===Pe){const s=e.filterPersonalizations(n,t);i=i.concat(s);o.push(()=>t.default?e.addSectionViz(r):e.addSectionViz(r,Pe))}else{return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(a){const l=s._generateId(Ae);const p=e.filterPersonalizations(n,t,l);i=i.concat(p);o.push(()=>e.appManagerInstance.addSection({sectionIndex:a.length,sectionProperties:{id:l,title:t.title,visible:true,visualizations:r?.map(e=>{e.id=s._generateId(Ae);return e})}}))})}}();if(a&&a.then)return a.then(function(){})}}();if(a&&a.then)return a.then(function(){})});return a&&a.then?a.then(r):r(a)})})}catch(e){return Promise.reject(e)}},filterPersonalizations:function e(t,n,o){const i=t.reduce(function(e,t){if(t.sectionId===n.id){const i=n.visualizations;const s=i?.find(e=>e.targetURL===t.appId);if(s||t.isSection){t.sectionId=o||n.id;e.push(t)}}return e},[]);return i},updateDefaultSectionPersonalization:function e(t){try{const e=this;return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(e){let n=e.find(e=>e.default);if(n){t.forEach(e=>{if(e.isRecentlyAddedApp){e.sectionId=n.id}})}return t})}catch(e){return Promise.reject(e)}},addSectionViz:function e(t,n){try{const e=this;return Promise.resolve(t.reduce((t,o)=>t.then(()=>e._addVisualization({visualization:o},n)),Promise.resolve()))}catch(e){return Promise.reject(e)}},loadApps:function e(){try{const e=this;return Promise.resolve(e.appManagerInstance.fetchFavVizs(true,false)).then(function(t){e.destroyAggregation("groups",true);const n=t.filter(e=>e.isSection).map(t=>({...t,menuItems:e._getGroupActions(t)}));const o=e._generateGroups(n);e._setGroups(o);e.destroyAggregation("apps",true);const i=t.filter(e=>!e.isSection).map((t,n)=>({...t,menuItems:e._getAppActions(undefined,n,t)}));const s=e.generateApps(i);e.setApps(s);if(e._selectedGroupId){void e._setGroupDetailDialogApps(e._selectedGroupId)}const r=e.getParent();r.toggleMenuListItem(e._createGroupMenuItem,e.getApps().length>0);return Promise.resolve(e._switchToRecommendedIfNoFavApps(s,o)).then(function(){if(_e(r,Se,Te)){e._createAddFromInsTilesMenuItem(De.ADD_FROM_INSIGHTS)}r._updateContainerHeader(r)})})}catch(e){return Promise.reject(e)}},_switchToRecommendedIfNoFavApps:function e(t,n){try{const o=this;function i(){o._isInitialLoad=false}const s=o.getParent();const r=function(){if(o._isInitialLoad&&[...t,...n].length===0){s.setProperty?.("selectedKey","recommendedApps");return Promise.resolve(s.load()).then(function(){})}}();return Promise.resolve(r&&r.then?r.then(i):i(r))}catch(a){return Promise.reject(a)}},_createAddFromInsTilesMenuItem:function e(t){const n=`${this.getId()}-${t}`;if(!this._controlMap.get(n)){const e=new me(n,{title:this._i18nBundle.getText("addFromInsights"),icon:"sap-icon://duplicate",press:()=>void this._handleAddFromInsights()});Ge(e,"staticTilesDialog");this._menuItems.push(e);this.addAggregation("menuItems",e);this._sortMenuItems($e);this._controlMap.set(n,e)}return this._controlMap.get(n)},_sortMenuItems:function e(t){const n=this.getAggregation("menuItems");let o=Be(t,n);this.removeAllAggregation("menuItems");o?.forEach(e=>this.addAggregation("menuItems",e))},_generateGroups:function e(t){return t.map((e,t)=>{const n=typeof e.BGColor==="object"&&"key"in e.BGColor?e.BGColor.key:e.BGColor;const o=new fe(`${this.getId()}-group-${t}`,{title:e.title,bgColor:n,status:e.status,icon:e.icon,number:e.badge,groupId:e.id,press:this._handleGroupPress.bind(this)});e.menuItems?.forEach(e=>{o.addAggregation("menuItems",e)});return o})},_setGroups:function e(t){t.forEach(e=>{this.addAggregation("groups",e,true)})},_getAppActions:function e(t,n,o){const i=t?.getGroupId();const s=o?.persConfig?.isDefaultSection;const r=!i;const a=[];const l=new me({id:i&&!s?`${i}--selectColorGroupAppMenuItem--${n}`:`${this.getKey()}--selectColorAppMenuItem--${n}`,title:this._i18nBundle.getText("selectColor"),type:ae.Navigation,press:this._openColorPopover.bind(this)});a.push(l);Ge(l,"changeColor");if(this._getAllowedMoveGroups(i)?.length>=1){const e=new me({id:i&&!s?`${i}--moveToGroupAppMenuItem--${n}`:`${this.getKey()}--moveToMenuItem--${n}`,title:this._i18nBundle.getText("moveTo"),type:ae.Navigation,press:e=>this._openMoveToGroupPopover(e,t)});a.push(e);Ge(e,"moveToGroup")}if(r){const e=new me(`${this.getKey()}--createGroupMenuItem--${n}`,{title:this._i18nBundle.getText("createGroup"),press:e=>{const t=e.getSource();const n=t.getParent();this._selectedApps=[n];this._openCreateGroupDialog()}});a.push(e);Ge(e,"createGroupDialog")}const p=new me({id:i&&!s?`${i}--removeFromMyHomeGroupAppMenuItem--${n}`:`${this.getKey()}--removeFromMyHomeMenuItem--${n}`,title:this._i18nBundle.getText("removeFromMyHome"),press:e=>{const n=e.getSource();const o=n.getParent();this._handleRemove(o,t)}});a.push(p);Ge(p,"removeFromMyHome");if(!r){const e=new me(`${this.getKey()}--removeFromGroupMenuItem--${n}`,{title:this._i18nBundle.getText("removeFromGroup"),press:e=>{const t=e.getSource();const n=t.getParent();void this._handleMoveToGroup(n,i)}});a.push(e);Ge(e,"ungroupApp")}return a},_getGroupActions:function e(t){const n=new me(`id-${t.id}-renameGroup`,{title:this._i18nBundle.getText("renameGroup"),press:this._onRenameGroup.bind(this)});Ge(n,"renameGroup");const o=new me(`id-${t.id}-selectColor`,{title:this._i18nBundle.getText("selectColor"),type:ae.Navigation,press:this._openColorPopover.bind(this)});Ge(o,"changeColor");const i=new me(`id-${t.id}-removeAllApps`,{title:this._i18nBundle.getText("removeAllApps"),press:this._handleUngroupApps.bind(this,t)});Ge(i,"removeAllApps");const s=[n,o,i];if(!t.isPresetSection){const e=new me(`id-${t.id}-delete`,{title:this._i18nBundle.getText("delete"),press:this._onDeleteGroup.bind(this)});Ge(e,"deleteGroup");s.push(e)}return s},_createActionButtons:function e(){try{const e=this;if(!e._actionButtons){e._actionButtons=[];if(xe()){const t=new o(`${e.getId()}-addAppsBtn`,{icon:"sap-icon://action",tooltip:e._i18nBundle.getText("addAppsTooltip"),text:e._i18nBundle.getText("addApps"),press:()=>{void e.navigateToAppFinder()}});Ge(t,"addAppsBtn");e._actionButtons.push(t)}}e._actionButtons.forEach(t=>{e.addAggregation("actionButtons",t)});return Promise.resolve(e._validateAppsMigration()).then(function(t){if(t){e._createImportButton()}})}catch(e){return Promise.reject(e)}},_createImportButton:function e(){if(!this._importButton){this._importButton=new o(`${this.getId()}-importAppsBtn`,{tooltip:this._i18nBundle.getText("importAppsNow"),text:this._i18nBundle.getText("importAppsNow"),press:this._openImportAppsDialog.bind(this)});Ge(this._importButton,"importAppsDialog");this._actionButtons.push(this._importButton);this.insertAggregation("actionButtons",this._importButton,0)}return this._importButton},setImportButtonVisibility:function e(t){try{const e=this;return Promise.resolve(L.setImportEnabled(t)).then(function(){e._createImportButton().setVisible(t)})}catch(e){return Promise.reject(e)}},_createHeaderMenuItems:function e(){if(!this._menuItems){this._createGroupMenuItem=new me(`${this.getId()}-${De.CREATE_GROUP}`,{title:this._i18nBundle.getText("createGroup"),icon:"sap-icon://add",press:()=>this._openCreateGroupDialog()});this._menuItems=[this._createGroupMenuItem];if(xe()){this._menuItems.push(new me(`${this.getId()}-${De.ADD_APPS}`,{title:this._i18nBundle.getText("addApps"),icon:"sap-icon://action",press:()=>{void this.navigateToAppFinder()}}))}Ge(this._createGroupMenuItem,"createGroupDialog");const e=this._menuItems.find(e=>e.getId()===`${this.getId()}-${De.ADD_APPS}`);if(e){Ge(e,"appsAppFinder")}this._menuItems.forEach(e=>{this.addAggregation("menuItems",e,true)});this._sortMenuItems($e)}},_getDragDropInfo:function e(t,n){try{const e=this;const o=t.getParameter?.("draggedControl"),i=t.getParameter?.("droppedControl"),s=t.getParameter?.("dropPosition"),r=o.getParent(),a=r.indexOfItem(o),l=r.indexOfItem(i),p=e._getTileItem(o,n),c=e._getTileItem(i,n);const u={dragItem:p,dropItem:c,dropPosition:s,dropControl:r,dragItemIndex:a,dropItemIndex:l};const d=function(){if(a!==l){const t=function(){if(!p?.isA("sap.cux.home.Group")&&!c?.isA("sap.cux.home.Group")){return Promise.resolve(e._adjustAppDragDropInfo(u,n)).then(function(){})}else{const t=function(){if(p?.isA("sap.cux.home.Group")){return Promise.resolve(e._adjustGroupDragDropInfo(u)).then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(d&&d.then?d.then(function(){return u}):u)}catch(e){return Promise.reject(e)}},_adjustAppDragDropInfo:function e(t,n){try{const e=this;let o=false;const i=t.dragItem;const s=t.dropItem;return Promise.resolve(Promise.all([e.appManagerInstance.getVisualization(i.getUrl(),n),e.appManagerInstance.getVisualization(s.getUrl(),n)])).then(function(i){let[s,r]=i;if(t.dropPosition===ue.RelativeDropPosition.Before){if(t.dragItemIndex===t.dropItemIndex-1){t.dropItemIndex--}if(t.dragItemIndex<t.dropItemIndex&&s?.persConfig?.sectionIndex===r?.persConfig?.sectionIndex){t.dropItemIndex--;o=true}}else if(t.dropPosition===ue.RelativeDropPosition.After){if(t.dragItemIndex===t.dropItemIndex+1){t.dropItemIndex++}if(t.dragItemIndex>t.dropItemIndex&&s?.persConfig?.sectionIndex===r?.persConfig?.sectionIndex){t.dropItemIndex++;o=true}}if(o){const o=t.dropControl.getItems()[t.dropItemIndex];const i=e._getTileItem(o,n);if(i){t.dropItem=i}}})}catch(e){return Promise.reject(e)}},_getTileItem:function e(t,n){const o=t.data("groupId");if(o){return this._getGroup(o)}else{const e=n?this._getGroup(n):null;const o=e?e.getApps():this.getApps();return o.find(e=>Ce(e.getUrl())===t.getUrl())}},_adjustGroupDragDropInfo:function e(t){try{const e=this;return Promise.resolve(e.appManagerInstance._getSections()).then(function(n){let o;t.dragItemIndex=n.findIndex(e=>e.id===t.dragItem.getGroupId());if(!t.dropItem.isA("sap.cux.home.Group")){const n=e.getAggregation("groups").length;t.dropItemIndex=t.dropPosition===ue.RelativeDropPosition.Before&&t.dropItemIndex===n&&t.dragItemIndex!==n?n+1:t.dragItemIndex}else{o=n.findIndex(e=>e.id===t.dropItem.getGroupId());t.dropItemIndex=o}if(t.dropPosition===ue.RelativeDropPosition.Before&&t.dragItemIndex===t.dropItemIndex-1){t.dropItemIndex--}else if(t.dropPosition===ue.RelativeDropPosition.After&&(t.dragItemIndex!==t.dropItemIndex||o&&t.dropItemIndex>=o)){t.dropItemIndex++}})}catch(e){return Promise.reject(e)}},_onFavItemDrop:function e(t,n){try{const e=this;const o=t.getParameter?.("draggedControl");return Promise.resolve(e._getDragDropInfo(t,n)).then(function(t){function i(){o.removeStyleClass("sapMGTPressActive")}const{dragItemIndex:s,dropItemIndex:r,dropPosition:a,dragItem:l,dropItem:p}=t;if(s===r)return;const c=function(){if(a===ue.RelativeDropPosition.On){return Promise.resolve(e._handleOnItemDrop(l,p)).then(function(){void e.refresh()})}else{const o=function(){if(a===ue.RelativeDropPosition.After||a===ue.RelativeDropPosition.Before){e._setBusy(true);return Promise.resolve(e._handleItemsReorder(t,n)).then(function(){return Promise.resolve(e.refresh()).then(function(){if(n){void e._setGroupDetailDialogApps(n)}e._setBusy(false)})})}}();if(o&&o.then)return o.then(function(){})}}();return c&&c.then?c.then(i):i(c)})}catch(e){return Promise.reject(e)}},_handleOnItemDrop:function e(t,n){try{const e=this;if(t.isA("sap.cux.home.Group"))return Promise.resolve();const o=function(){if(!n.isA("sap.cux.home.Group")){const o=t;const i=n;e._selectedApps=[o,i];e._openCreateGroupDialog(true)}else{const o=n.getGroupId();e._setBusy(true);return Promise.resolve(e._handleMoveToGroup(t,undefined,o)).then(function(){e._setBusy(false)})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_handleItemsReorder:function e(t,n){try{const e=this;const{dragItem:o,dropItem:i,dragItemIndex:s,dropItemIndex:r}=t;const a=o.isA("sap.cux.home.Group");const l=i.isA("sap.cux.home.Group");const p=function(){if(!a&&!l){const t=o;const s=i;return Promise.resolve(Promise.all([e.appManagerInstance.getVisualization(t.getUrl(),n),e.appManagerInstance.getVisualization(s.getUrl(),n)])).then(function(t){let[n,o]=t;return Promise.resolve(e.appManagerInstance.moveVisualization({sourceSectionIndex:n?.persConfig?.sectionIndex,sourceVisualizationIndex:n?.persConfig?.visualizationIndex,targetSectionIndex:o?.persConfig?.sectionIndex,targetVisualizationIndex:o?.persConfig?.visualizationIndex})).then(function(){})})}else{const t=function(){if(a&&l){return Promise.resolve(e.appManagerInstance.moveSection(s,r)).then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(p&&p.then?p.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},navigateToAppFinder:function e(t){try{return Promise.resolve(j.getServiceAsync("Navigation")).then(function(e){const n={pageID:Ae};if(t){n.sectionID=t}return Promise.resolve(e.navigate({target:{shellHash:`Shell-appfinder?&/catalog/${JSON.stringify(n)}`}})).then(function(){})})}catch(e){return Promise.reject(e)}},_validateAppsMigration:function t(){try{return Promise.resolve(le(function(){return Promise.resolve(L.isImportEnabled())},function(t){e.warning(t instanceof Error?t.message:"Error while checking if import apps is enabled");return false}))}catch(e){return Promise.reject(e)}},_openImportAppsDialog:function e(){const t=new H;t.onImportDialogPress()},_openCreateGroupDialog:function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;const n=this._generateCreateGroupDialog(t);const o=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`);o.destroyItems();const i=[...this.getApps()].map(e=>{const t=e.clone();t._onPress=e=>this._highlightApp(e,t);return this.getParent()._getAppTile(t)});this._setAggregation(o,i);let s=this.getApps();this.getParent().fireEvent("appsLoaded",{apps:s,tiles:i});this._updateSelectedAppCount();n.open()},_closeCreateGroupDialog:function e(){const t=this._generateCreateGroupDialog();t?.close();this._resetCreateGroupDialog()},_resetCreateGroupDialog:function e(){const t=this._generateCreateGroupNavContainer();const n=this._controlMap.get(`${this.getId()}-createGroupDialog-mainPage-form-groupName-input`);const o=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-search`);n.setValue("");t.to(t.getInitialPage());this._selectedApps=[];o.setValue("");this._setNoAppsSelectedError(false);this._selectedGroupColor=undefined},_generateCreateGroupDialog:function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;const n=`${this.getId()}-createGroupDialog`;const i=this._generateCreateGroupNavContainer();const s=e=>{const t=this._controlMap.get(`${n}-nextBtn`);const o=this._controlMap.get(`${n}-backBtn`);const s=this._controlMap.get(`${n}-createBtn`);const r=i.indexOfPage(i.getCurrentPage());t.setVisible(r!==i.getPages().length-1&&!e);o.setVisible(r!==0&&!e);s.setVisible(r===i.getPages().length-1||e)};if(!this._controlMap.get(n)){this._controlMap.set(`${n}-nextBtn`,new o({id:`${n}-nextBtn`,text:this._i18nBundle.getText("nextButton"),press:()=>{if(this._validateGroupName()){i.to(this._generateCreateGroupAppsPage());s(t);this._highlightSelectedApps()}},type:"Emphasized"}));const e=this._controlMap.get(`${n}-nextBtn`);ye(e,"press","createGroupNextBtn");this._controlMap.set(`${n}-backBtn`,new o({id:`${n}-backBtn`,text:this._i18nBundle.getText("backButton"),press:()=>{i.back();s(t)}}));const r=this._controlMap.get(`${n}-backBtn`);ye(r,"press","createGroupBackBtn");this._controlMap.set(`${n}-createBtn`,new o({id:`${n}-createBtn`,text:this._i18nBundle.getText("createButton"),press:()=>{void this._onPressGroupCreate()},type:"Emphasized"}));const l=this._controlMap.get(`${n}-createBtn`);ye(l,"press","addCreateGroup");this._controlMap.set(n,new a(n,{title:this._i18nBundle.getText("createGroup"),content:i,escapeHandler:this._closeCreateGroupDialog.bind(this),contentHeight:"25rem",contentWidth:"41.75rem",buttons:[e,r,l,new o({id:`${n}-cancelBtn`,text:this._i18nBundle.getText("cancelBtn"),press:this._closeCreateGroupDialog.bind(this)})]}).addStyleClass("sapCuxCreateGroupDialog sapContrastPlus"))}s(t);return this._controlMap.get(n)},_highlightApp:function e(t,n){const o=t.getSource(),i=!o.hasStyleClass("sapCuxHighlightApp"),s=this._generateAppsScrollContainer();this._selectedApps=this._selectedApps||[];if(i){this._selectedApps.push(n)}else{this._selectedApps.splice(this._selectedApps.findIndex(e=>n.getUrl()===e.getUrl()),1)}this._updateSelectedAppCount();o.toggleStyleClass("sapCuxHighlightApp",i);this._setNoAppsSelectedError(this._selectedApps.length<1);s.setHeight(this._selectedApps.length<1?"15.3rem":"17.5rem")},_generateAppsScrollContainer:function e(){const o=`${this.getId()}-createGroupDialog-appsPage-scrollContainer`;if(!this._controlMap.get(o)){this._controlMap.set(`${o}-apps`,new t({id:`${o}-apps`,layout:new n(`${o}--appsContainerSettings`,{columnSize:"19rem",gap:"0.5rem"})}).addStyleClass("sapCuxAppsGridContainerPadding"));this._controlMap.set(o,new C(o,{id:o,vertical:true,visible:true,height:"17.5rem",content:[this._controlMap.get(`${o}-apps`)]}).addStyleClass("sapUiSmallMarginBeginEnd"))}return this._controlMap.get(o)},_updateSelectedAppCount:function e(){const t=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-headerContainer-count`);t.setText(this._i18nBundle.getText("selectedAppsCount",[this._selectedApps?.length||this._i18nBundle.getText("noAppSelected")]))},_generateCreateGroupNavContainer:function e(){const t=`${this.getId()}-createGroupDialog-wrapper`;if(!this._controlMap.get(t)){this._controlMap.set(t,new I(t,{initialPage:`${this.getId()}-createGroupDialog-mainPage`,pages:[this._generateCreateGroupMainPage(),this._generateCreateGroupAppsPage()]}))}return this._controlMap.get(t)},_generateCreateGroupMainPage:function e(){const t=`${this.getId()}-createGroupDialog-mainPage`;if(!this._controlMap.get(t)){this._controlMap.set(`${t}-form-groupName-input`,new d({id:`${t}-form-groupName-input`,width:"13.75rem",required:true,liveChange:this._validateGroupName.bind(this)}));this._controlMap.set(t,new P({id:t,showHeader:false,enableScrolling:false,backgroundDesign:"List",content:[new T({id:`${t}-headerContainer`,items:[new B({id:`${t}-title`,text:this._i18nBundle.getText("settings")}),new y({id:`${t}-description`,text:this._i18nBundle.getText("settingsDescription")})]}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBeginEnd sapUiTinyMarginBottom"),new V(`${t}-form`,{layout:de.SimpleFormLayout.ResponsiveGridLayout,labelSpanS:4,labelSpanM:4,content:[new g({id:`${t}-form-groupName-label`,text:this._i18nBundle.getText("groupNameLbl")}).addStyleClass("sapUiTinyMarginTop"),this._controlMap.get(`${t}-form-groupName-input`),new g({id:`${t}-form-groupColor-label`,text:this._i18nBundle.getText("groupColorLbl")}).addStyleClass("sapUiTinyMarginTop"),new i(`${t}-form-groupColor-pallet`,{colors:ve().map(e=>e.value),colorSelect:this._onColorSelect.bind(this)}).addStyleClass("adjustSelectedColorPalette")]}).addStyleClass("sapUiMediumMarginTop")]}))}return this._controlMap.get(t)},_generateCreateGroupAppsPage:function e(){const t=`${this.getId()}-createGroupDialog-appsPage`;if(!this._controlMap.get(t)){this._controlMap.set(`${t}-search`,new M({id:`${t}-search`,liveChange:this._onCreateAppSearch.bind(this)}).addStyleClass("sapUiTinyMarginTopBottom"));this._controlMap.set(`${t}-errorMessageStrip`,new m(`${t}-errorMessageStrip`,{id:`${t}-errorMessageStrip`,type:F.Error,showIcon:true,text:this._i18nBundle.getText("selectionErrorMessage"),visible:false}));this._controlMap.set(`${t}-headerContainer-count`,new y({id:`${t}-headerContainer-count`}));this._controlMap.set(t,new P(t,{showHeader:false,backgroundDesign:"List",enableScrolling:false,content:[new T(`${t}-headerContainer`,{items:[new l(`${t}-headerContainer-titleCount`,{id:`${t}-headerContainer-titleCount`,items:[new B({id:`${t}-headerContainer-title`,text:this._i18nBundle.getText("selectedAppsTitle")}).addStyleClass("sapUiTinyMarginEnd"),this._controlMap.get(`${t}-headerContainer-count`)]}),new y({id:`${t}-description`,text:this._i18nBundle.getText("appsSelectionDescription")}).addStyleClass("sapUiTinyMarginBottom"),this._controlMap.get(`${t}-search`),this._controlMap.get(`${t}-errorMessageStrip`)]}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBeginEnd sapUiTinyMarginBottom"),this._generateAppsScrollContainer(),this._generateCreateGroupErrorMsg()]}))}return this._controlMap.get(t)},_generateCreateGroupErrorMsg:function e(){const t=`${this.getId()}-createGroupDialog-appsPage-noFilterApps`;if(!this._controlMap.get(t)){this._controlMap.set(t,new p({id:t,illustrationSize:c.Base,title:this._i18nBundle.getText("noSearchedAppTitle"),description:this._i18nBundle.getText("noSearchedAppDes"),visible:false}).addStyleClass("sapUiLargeMarginTop"))}return this._controlMap.get(t)},_onColorSelect:function e(t){this._selectedGroupColor=this._getLegendColor(t.getParameter("value")).key},_getLegendColor:function e(t){return ve().find(e=>e.value===t)||Ie()},_setNoAppsSelectedError:function e(t){const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-errorMessageStrip`);n.setVisible(t)},_validateGroupName:function e(){const t=this._controlMap.get(`${this.getId()}-createGroupDialog-mainPage-form-groupName-input`);const n=t.getValue().trim();t.setValueState(n?"None":"Error");t.setValueStateText(n?"":this._i18nBundle.getText("invalidGroupName"));return n?true:false},_highlightSelectedApps:function e(){const t=this._selectedApps||[];const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`);const o=n.getItems()||[];o.forEach(e=>{e.toggleStyleClass("sapCuxHighlightApp",t.some(t=>Ce(t.getUrl())===e.getUrl()))})},_onCreateAppSearch:function e(t){const n=this._controlMap.get(`${this.getId()}-createGroupDialog-appsPage-scrollContainer-apps`),o=t.getSource().getValue(),i=n.getItems()||[],s=new RegExp(o,"i");i.forEach(e=>{e.setVisible(s.test(e.getHeader()))});const r=i.filter(e=>e.getVisible());const a=r.length>0;this._generateAppsScrollContainer()?.setVisible(a);this._generateCreateGroupErrorMsg()?.setVisible(!a)},_onPressGroupCreate:function t(){try{const t=this;const n=t._controlMap.get(`${t.getId()}-createGroupDialog-mainPage-form-groupName-input`);const o=function(){if(t._validateGroupName()){const o=function(){if(t._selectedApps?.length){t._setBusy(true);const o=ce(function(){return le(function(){return Promise.resolve(t._createGroup({selectedApps:t._selectedApps,groupName:n.getValue(),groupColor:t._getGroupColor()})).then(function(){return Promise.resolve(t.refresh()).then(function(){_.show(t._i18nBundle.getText("newGroupCreated"),{of:t._controlMap.get(`${t.getId()}-createGroupDialog`),offset:"0 80"});const e=t.getAggregation("groups")||[];void t._showGroupDetailDialog(e[0]?.getGroupId())})})},function(n){e.error(n);_.show(t._i18nBundle.getText("unableToCreateGroup"))})},function(e,n){t._setBusy(false);t._closeCreateGroupDialog();if(e)throw n;return n});if(o&&o.then)return o.then(function(){})}else{t._setNoAppsSelectedError(true)}}();if(o&&o.then)return o.then(function(){})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_createGroup:function e(t){try{const e=this;const{selectedApps:n,groupName:o,groupColor:i}=t;return Promise.resolve(e.appManagerInstance.getSectionVisualizations()).then(function(t){const s=n.reduce((e,n)=>{const o=t.find(e=>e.url===n.getUrl());if(o){e.push(o)}return e},[]);const r=s[0].persConfig.sectionId;return Promise.resolve(e.appManagerInstance.addSection({sectionIndex:1,sectionProperties:{title:o||e._i18nBundle.getText("newGroup"),visible:true,visualizations:s.map(e=>e.visualization)}})).then(function(){const t=s.reduce((e,t)=>{if(t.visualization?.id){const n=(t.persConfig?.duplicateApps||[]).map(e=>e.visualization?.id);e=e.concat([t.visualization?.id],n)}return e},[]);return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:r,vizIds:t})).then(function(){return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(t){const n=t.find(e=>e.default);const o=t[n?1:0]?.id;return Promise.resolve(e._updateAppPersonalization(s.map(e=>({visualization:e,targetGroupId:o})))).then(function(){return Promise.resolve(e._updateGroupPersonalization(o,i)).then(function(){})})})})})})}catch(e){return Promise.reject(e)}},_getGroupColor:function e(){const t=Ie().key;const n=this._selectedApps[0];const o=this._selectedApps.some(e=>e.getBgColor()!==n.getBgColor());return this._selectedGroupColor||(o?t:n.getBgColor())},_openColorPopover:function e(t){const n=`${this.getId()}-colorPopover`,o=ve().map(e=>e.value);const i=t.getSource();this._currentItem=i.getParent();let r=this._controlMap.get(n);if(!r){r=new s(n,{id:n,colors:o,showDefaultColorButton:false,showMoreColorsButton:false,showRecentColorsSection:false,colorSelect:e=>{ge._closeActionsPopover();const t=e.getParameter("value");void this._handleColorSelect(this._currentItem,t)}}).addStyleClass("sapContrastPlus");r._oPopover.setPlacement(pe.HorizontalPreferredRight);this._controlMap.set(n,r)}r.openBy(t.getParameter("listItem"))},_handleColorSelect:function e(t,n){try{const o=this;function i(){o.oEventBus.publish("appsChannel","favAppColorChanged",{item:t,color:n})}const s=o._getLegendColor(n).key;t.setProperty("bgColor",s,true);const r=t.isA("sap.cux.home.Group")?t.getGroupId():null;const a=!r&&t.getParent()?.isA("sap.cux.home.Group");if(a){o._refreshGroupDetailDialog(t,false)}else{o._applyUngroupedTileColor(t,n);o.oEventBus.publish("appsChannel","favAppColorChanged",{item:t,color:n})}const l=function(){if(r){void o._updateGroupPersonalization(r,s);const e=o._controlMap.get(`${o.getId()}-detailDialog-toolbar-color`);e?.setColor(n)}else{const e=t;const n=a?e.getParent().getGroupId():undefined;return Promise.resolve(o.appManagerInstance.getVisualization(e.getUrl(),n)).then(function(e){if(e){void o._updateAppPersonalization([{visualization:e,color:s}])}})}}();return Promise.resolve(l&&l.then?l.then(i):i(l))}catch(p){return Promise.reject(p)}},_getAllowedMoveGroups:function e(t){let n=this.getAggregation("groups")||[];if(t){n=n.filter(e=>e.getGroupId()!==t)}return n},_setBusy:function e(t){[this._generateGroupDetailDialog(),this._generateCreateGroupDialog(),this._generateAddFromInsightsDialog()].forEach(e=>{e.setBusy(t)});he.prototype.setBusy.call(this,t)},_openMoveToGroupPopover:function e(t,n){const o=`${this.getId()}-moveToGroupPopover`,i=t?.getSource(),s=i?.getParent(),r=n?.getGroupId();let a=this._controlMap.get(`${o}-list`),l=this._controlMap.get(o);if(!l){a=new h({id:`${o}-list`,itemPress:()=>ge._closeActionsPopover()});this._controlMap.set(`${o}-list`,a);l=new A({id:o,showHeader:false,placement:pe.HorizontalPreferredRight,content:[a]}).addStyleClass("sapContrastPlus");this._controlMap.set(o,l)}a.removeAllItems();this._getAllowedMoveGroups(r).forEach(e=>a.addItem(new G(Me(`${this.getId()}-moveTo-${s.getId()}`),{title:e.getTitle(),type:"Active",press:()=>{void this._handleMoveToGroup(s,r,e.getGroupId())}})));l.openBy(t.getParameter("listItem"))},_handleRemove:function t(n,o){const i=this;const s=o?.getApps()?.length===1;let r=this._i18nBundle.getText("removeAppMessage",[n.getTitle()]),a=this._i18nBundle.getText("remove"),l=this._i18nBundle.getText("remove"),p=f.Icon.QUESTION;if(s){r=this._i18nBundle.getText("removeFromMyHomeMessage",[n.getTitle()]);a=this._i18nBundle.getText("delete");l=this._i18nBundle.getText("delete");p=f.Icon.WARNING}f.show(r,{icon:p,title:a,actions:[l,f.Action.CANCEL],emphasizedAction:l,onClose:function(t){try{const r=function(){if(t===l){i._setBusy(true);const t=ce(function(){return le(function(){return Promise.resolve(i._removeApp(n,o)).then(function(){if(s){i._closeGroupDetailDialog()}else if(o){i._refreshGroupDetailDialog(n)}return Promise.resolve(i.getParent()._refreshAllPanels()).then(function(){_.show(i._i18nBundle.getText("appRemoved"))})})},function(t){e.error(t);_.show(i._i18nBundle.getText("unableToRemoveApp"))})},function(e,t){i._setBusy(false);if(e)throw t;return t});if(t&&t.then)return t.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}})},_removeApp:function e(t,n){try{const e=this;const o=n?.getApps()?.length===1,i=n?.getGroupId(),s=t.getUrl();return Promise.resolve(e.appManagerInstance.getVisualization(s,i)).then(function(t){const n=function(){if(o){return Promise.resolve(e._deleteGroup(i)).then(function(){})}else{let n=[t?.visualization?.id];if(!i){n=n.concat(t?.persConfig?.duplicateApps?.map(e=>e.visualization?.id))}const o=function(){if(t?.persConfig?.sectionId&&n.length>0){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig.sectionId,vizIds:n})).then(function(){void e._deletePersonalization({appId:s,oldAppId:t?.oldAppId,sectionId:t?.persConfig?.sectionId,isRecentlyAddedApp:t?.persConfig?.isDefaultSection})})}}();if(o&&o.then)return o.then(function(){})}}();if(n&&n.then)return n.then(function(){})})}catch(e){return Promise.reject(e)}},_handleMoveToGroup:function e(t,n,o){try{const e=this;const i=n?e._getGroup(n):undefined,s=i?.getApps()?.length===1;const r=function(){if(s){const i=e._i18nBundle.getText("moveAppMessage",[t.getTitle()]);const s=e._i18nBundle.getText("delete");f.show(i,{icon:f.Icon.WARNING,title:s,actions:[s,f.Action.CANCEL],emphasizedAction:s,onClose:i=>{if(i===s){void e._moveAppAndHandleGroupChanges(t,n,o)}}})}else{return Promise.resolve(e._moveAppAndHandleGroupChanges(t,n,o)).then(function(){})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_moveAppAndHandleGroupChanges:function t(n,o,i){try{const t=this;const s=o?t._getGroup(o):null,r=i?t._getGroup(i):null,a=r?.getTitle(),l=s?.getApps()?.length===1;const p=ce(function(){return le(function(){t._setBusy(true);return Promise.resolve(t._moveAppToGroup(n,o,i)).then(function(){function e(){const e=a?t._i18nBundle.getText("appMoved",[a]):t._i18nBundle.getText("appUngrouped");_.show(e);return Promise.resolve(t.refresh()).then(function(){})}const i=function(){if(l){return Promise.resolve(t._deleteGroup(o)).then(function(){t._closeGroupDetailDialog()})}else if(o){t._refreshGroupDetailDialog(n)}}();return i&&i.then?i.then(e):e(i)})},function(t){e.error(t)})},function(e,n){t._setBusy(false);if(e)throw n;return n});return Promise.resolve(p&&p.then?p.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_refreshGroupDetailDialog:function e(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;const o=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const i=o.getItems();const s=t.getParent();if(!s){return}const r=s.getApps();if(n){const e=r.findIndex(e=>e.getUrl()===t.getUrl());if(e>-1){r[e].destroy(true);i[e].destroy(true)}}else{r.forEach((e,n)=>{if(e.getUrl()===t.getUrl()){e.setProperty("bgColor",t.getBgColor(),true);i[n].setBackgroundColor(t.getBgColor())}})}},_moveAppToGroup:function e(t,n,o){try{const e=this;const i=t.getUrl();return Promise.resolve(Promise.all([e.appManagerInstance.getSectionVisualizations(n),e.appManagerInstance._getSections()])).then(function(t){let[s,r]=t;const a=s.find(e=>e.url===i),l=a?.persConfig?.visualizationIndex??-1,p=a?.persConfig?.sectionIndex;const c=!o;const u=!n;const d=r.findIndex(e=>!o?e.default:e.id===o);const g=function(){if(a){function t(){return Promise.resolve(e.appManagerInstance._getSections(true)).then(function(t){const n=t.find(e=>e.default);return Promise.resolve(e._updateAppPersonalization([{visualization:a,targetGroupId:o??n?.id,isTargetGroupDefault:c}])).then(function(){})})}const n=function(){if(c){return Promise.resolve(e._moveAppToDefaultGroup(a)).then(function(){})}else{function t(){return Promise.resolve(e.appManagerInstance.moveVisualization({sourceSectionIndex:p,sourceVisualizationIndex:l,targetSectionIndex:d,targetVisualizationIndex:-1})).then(function(){})}const n=function(){if(u){return Promise.resolve(e._removeDuplicateVisualizations(a)).then(function(){})}}();return n&&n.then?n.then(t):t(n)}}();return n&&n.then?n.then(t):t(n)}}();if(g&&g.then)return g.then(function(){})})}catch(e){return Promise.reject(e)}},_moveAppToDefaultGroup:function e(t){try{const e=this;return Promise.resolve(e._addVisualization(t)).then(function(){const n=function(){if(t.persConfig?.sectionId&&t.visualization?.id){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig?.sectionId,vizIds:[t.visualization?.id]})).then(function(){})}}();if(n&&n.then)return n.then(function(){})})}catch(e){return Promise.reject(e)}},_removeDuplicateVisualizations:function e(t){try{const e=this;const n=t?.persConfig?.duplicateApps?.map(e=>e.visualization?.id)||[];const o=function(){if(t.persConfig?.sectionId&&n.length>0){return Promise.resolve(e.appManagerInstance.removeVisualizations({sectionId:t.persConfig?.sectionId,vizIds:n})).then(function(){})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_onRenameGroup:function e(t){const n=t.getSource()?.getParent();void this._showGroupDetailDialog(n.getGroupId(),true)},_handleUngroupApps:function e(t){const n=this._i18nBundle.getText("ungroupAppsMessage",[t.title]),o=this._i18nBundle.getText("delete"),i=this._i18nBundle.getText("delete");f.show(n,{icon:f.Icon.WARNING,title:o,actions:[i,f.Action.CANCEL],emphasizedAction:i,onClose:e=>{if(e===i){void this._ungroupApps(t.id)}}})},_onDeleteGroup:function e(t){const n=this;const o=t.getSource()?.getParent(),i=this._i18nBundle.getText("deleteGroupMessage",[o.getTitle()]),s=this._i18nBundle.getText("delete"),r=this._i18nBundle.getText("delete"),a=this._i18nBundle.getText("moveApps");f.show(i,{icon:f.Icon.WARNING,title:s,actions:[r,this._i18nBundle.getText("moveApps"),f.Action.CANCEL],emphasizedAction:r,onClose:function(e){try{const t=function(){if(e===r){n._setBusy(true);return Promise.resolve(n._deleteGroup(o.getGroupId())).then(function(){_.show(n._i18nBundle.getText("groupDeleted"));void n.refresh();n._closeGroupDetailDialog();n._setBusy(false)})}else if(e===a){void n._ungroupApps(o.getGroupId())}}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}})},_ungroupApps:function t(n){try{const t=this;t._setBusy(true);const o=ce(function(){return le(function(){return Promise.resolve(t.appManagerInstance.getSectionVisualizations(n)).then(function(e){return Promise.resolve(t.appManagerInstance._getSections()).then(function(o){const i=o.find(e=>e.id===n);return Promise.resolve(Promise.all(e.map(e=>t._addVisualization(e)))).then(function(){return Promise.resolve(t.appManagerInstance._getSections(true)).then(function(o){const s=o.find(e=>e.default);return Promise.resolve(t._updateAppPersonalization(e.map(e=>({visualization:e,targetGroupId:s?.id,isTargetGroupDefault:true})))).then(function(){function o(){_.show(t._i18nBundle.getText("appsUngrouped")??"");return Promise.resolve(t.refresh()).then(function(){})}const s=function(){if(i?.preset){return Promise.resolve(t.appManagerInstance.removeVisualizations({sectionId:n,vizIds:e.map(e=>e.visualization?.id)})).then(function(){})}else{return Promise.resolve(t._deleteGroup(n)).then(function(){})}}();return s&&s.then?s.then(o):o(s)})})})})})},function(n){e.error(n);_.show(t._i18nBundle.getText("unableToUngroupApps")??"")})},function(e,n){t._setBusy(false);t._closeGroupDetailDialog();if(e)throw n;return n});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_showGroupDetailDialog:function e(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;try{const e=this;const o=e._getGroup(t);if(!o){return Promise.resolve()}e._selectedGroupId=t;const i=e._generateGroupDetailDialog();const s=e._controlMap.get(`${e.getId()}-detailDialog-toolbar-color`);s.setColor(N.get({name:o.getBgColor()}));return Promise.resolve(e._setGroupDetailDialogApps(t)).then(function(){i.open();e._setGroupNameControl(o.getTitle(),n)})}catch(e){return Promise.reject(e)}},_setGroupDetailDialogApps:function e(t){try{const e=this;const n=e._getGroup(t);const o=function(){if(n){return Promise.resolve(e.appManagerInstance.getSectionVisualizations(t,false)).then(function(o){n.destroyAggregation("apps",true);o=o.map((t,o)=>({...t,menuItems:e._getAppActions(n,o,t)}));const i=e.generateApps(o);const s=e._controlMap.get(`${e.getId()}-detailDialog-apps`);e._setAggregation(n,i,"apps");s.destroyItems();e._setAggregation(s,n.getApps().map(t=>e.getParent()._getAppTile(t)));e._applyGroupedAppsPersonalization(t);e._dispatchAppsLoadedEvent(i)})}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_applyGroupedAppsPersonalization:function e(t){const n=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const o=n?.getItems()||[];void this._applyTilesPersonalization(o,t,false)},_dispatchAppsLoadedEvent:function e(t){const n=this._controlMap.get(`${this.getId()}-detailDialog-apps`);const o=n?.getItems()||[];this.getParent().fireEvent("appsLoaded",{apps:t,tiles:o})},_generateGroupDetailDialog:function e(){const i=`${this.getId()}-detailDialog`;if(!this._controlMap.get(i)){this._controlMap.set(`${i}-toolbar-color`,new z({id:`${i}-toolbar-color`,src:"sap-icon://color-fill",size:"1.25rem"}).addStyleClass("sapUiTinyMarginEnd"));this._controlMap.set(`${i}-toolbar-title`,new B({id:`${i}-toolbar-title`,visible:true}));const e=new d({id:`${i}-toolbar-title-edit`,width:"13.75rem",visible:false});this._controlMap.set(`${i}-toolbar-title-edit`,e);e.onsapfocusleave=()=>{void this._onGroupEditName(e.getValue())};const s=new t({id:`${i}-apps`,layout:new n(`${i}-appsLayout`,{columnSize:"19rem",gap:"0.5rem"})}).addStyleClass("sapCuxAppsContainerBorder sapCuxAppsDetailContainerPadding");this.addDragDropConfigTo(s,e=>this._onFavItemDrop(e,this._selectedGroupId));this._controlMap.set(`${i}-apps`,s);this._controlMap.set(`${i}-addAppsBtn`,new o(`${i}-addAppsBtn`,{text:this._i18nBundle.getText("addApps"),icon:"sap-icon://action",visible:xe(),press:()=>{const e=this._selectedGroupId;this._closeGroupDetailDialog();this._selectedGroupId=e;void this.navigateToAppFinder(e)}}));this._controlMap.set(i,new a(i,{content:this._controlMap.get(`${i}-apps`),contentWidth:"60.75rem",endButton:new o({id:`${i}-groupDetailCloseBtn`,text:this._i18nBundle.getText("closeBtn"),press:this._closeGroupDetailDialog.bind(this)}),escapeHandler:this._closeGroupDetailDialog.bind(this),customHeader:new x(`${this.getId()}-toolbar`,{content:[this._controlMap.get(`${i}-toolbar-color`),this._controlMap.get(`${i}-toolbar-title`),this._controlMap.get(`${i}-toolbar-title-edit`),new D({id:`${this.getId()}-toolbarSpacer`}),this._controlMap.get(`${i}-addAppsBtn`),new o({id:"overflowBtn",icon:"sap-icon://overflow",type:"Transparent",press:e=>{const t=e.getSource();const n=this._selectedGroupId?this._getGroup(this._selectedGroupId):null;const o=n?.getAggregation("menuItems");const i=ge.get(o);i.openBy(t)}})]})}).addStyleClass("sapCuxGroupDetailDialog"))}return this._controlMap.get(i)},_closeGroupDetailDialog:function e(){const t=this._controlMap.get(`${this.getId()}-detailDialog`);const n=this._getGroup(this._selectedGroupId);n?.destroyApps();this._selectedGroupId=undefined;t?.close()},_onGroupEditName:function e(t){try{const n=this;function o(){n._setGroupNameControl(t,false);n._setBusy(false)}n._setBusy(true);const i=n._selectedGroupId,s=n._getGroup(i),r=s?.getTitle();const a=function(){if(t&&t!==r){return Promise.resolve(n._renameGroup(i,t)).then(function(){s?.setProperty("title",t,true);void n.refresh();_.show(n._i18nBundle.getText("groupNameChanged")||"")})}}();return Promise.resolve(a&&a.then?a.then(o):o(a))}catch(l){return Promise.reject(l)}},_renameGroup:function e(t,n){try{return Promise.resolve(j.getServiceAsync("Pages")).then(function(e){const o=e.getPageIndex(Ae),i=e.getModel().getProperty(`/pages/${o}/sections/`),s=i.findIndex(e=>e.id===t);const r=function(){if(s>-1){return Promise.resolve(e.renameSection(o,s,n)).then(function(){})}}();if(r&&r.then)return r.then(function(){})})}catch(e){return Promise.reject(e)}},_setGroupNameControl:function e(t,n){const o=this._controlMap.get(`${this.getId()}-detailDialog`);const i=this._controlMap.get(`${this.getId()}-detailDialog-toolbar-title`);const s=this._controlMap.get(`${this.getId()}-detailDialog-toolbar-title-edit`);s.setValue(t);i.setText(t);s?.setVisible(n);i?.setVisible(!n);if(n){o.setInitialFocus(s)}},_generateAddFromInsightsDialog:function e(){const t=`${this.getId()}-addFromInsightsDialog`;const n=()=>{const e=this._getSelectedInsights();this._controlMap.get(`${t}-addBtn`).setEnabled(e.length>0)};if(!this._controlMap.get(t)){const e=(e,t)=>{const n=new o(e,{icon:"sap-icon://action",text:this._i18nBundle.getText("appFinderBtn"),press:()=>{this._closeAddFromInsightsDialog();void this.navigateToAppFinder()},visible:xe(),type:t||se.Default});ye(n,"press","appsAppFinder");return n};this._controlMap.set(`${t}-list`,new h({id:`${t}-list`,mode:"MultiSelect",selectionChange:n}));this._controlMap.set(`${t}-addBtn`,new o({id:`${t}-addBtn`,text:this._i18nBundle.getText("addFromInsightsDialogBtn"),type:"Emphasized",press:()=>{void this._addFromInsights()},enabled:false}));const i=this._controlMap.get(`${t}-addBtn`);ye(i,"press","addStaticTiles");this._controlMap.set(`${t}-errorMessage`,new p({id:`${t}-errorMessage`,illustrationSize:c.Base,title:this._i18nBundle.getText("noAppsTitle"),description:this._i18nBundle.getText("noDataMsgInsightTiles"),visible:true}).addStyleClass("sapUiLargeMarginTop"));this._controlMap.set(t,new a(t,{title:this._i18nBundle.getText("addFromInsights"),content:[new g({id:`${t}-label`,text:this._i18nBundle.getText("addFromInsightsDialogLabel"),wrapping:true}).addStyleClass("sapMTitleAlign sapUiTinyMarginTopBottom sapUiSmallMarginBeginEnd"),new l({id:`${t}-textContainer`,justifyContent:"SpaceBetween",alignItems:"Center",items:[new B({id:`${t}-text`,text:this._i18nBundle.getText("addFromInsightsDialogTitle")}),e(`${t}-addAppsBtn`,se.Transparent)]}).addStyleClass("sapUiTinyMarginTop dialogHeader sapUiSmallMarginBeginEnd"),this._controlMap.get(`${t}-list`),this._controlMap.get(`${t}-errorMessage`)],contentWidth:"42.75rem",contentHeight:"32.5rem",endButton:new o({id:`${t}-addFromInsightsCloseBtn`,text:this._i18nBundle.getText("closeBtn"),press:this._closeAddFromInsightsDialog.bind(this)}),escapeHandler:this._closeAddFromInsightsDialog.bind(this),buttons:[this._controlMap.get(`${t}-addBtn`),new o({id:`${t}-cancelBtn`,text:this._i18nBundle.getText("cancelBtn"),press:this._closeAddFromInsightsDialog.bind(this)})]}).addStyleClass("sapContrastPlus sapCuxAddFromInsightsDialog"))}n();return this._controlMap.get(t)},_handleAddFromInsights:function e(){try{const e=this;return Promise.resolve(e._getInsightTilesToAdd()).then(function(t){const n=e._generateAddFromInsightsDialog();e._controlMap.get(`${e.getId()}-addFromInsightsDialog-errorMessage`)?.setVisible(t.length===0);e._generateInsightListItems(t);n.open()})}catch(e){return Promise.reject(e)}},_generateInsightListItems:function e(t){const n=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);if(t.length){n.destroyItems();const e=t.map((e,t)=>{const n=typeof e.BGColor==="object"&&"key"in e.BGColor?e.BGColor.key:e.BGColor;return new r({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}`,content:[new l({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content`,alignItems:"Center",items:[new z({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content-icon`,src:e.icon,backgroundColor:this._getLegendColor(n||"").value,color:"white",width:"2.25rem",height:"2.25rem",size:"1.25rem"}).addStyleClass("sapUiRoundedBorder sapUiTinyMargin"),new v({id:`${this.getId()}-addFromInsightsDialog-listItem-${t}-content-identifier`,title:e.title,text:e.subtitle,tooltip:e.title}).addStyleClass("sapUiTinyMargin")]})]}).addStyleClass("sapUiContentPadding").data("vizId",e.visualization?.vizId)});this._setAggregation(n,e)}n?.setVisible(t.length!==0)},_getInsightTilesToAdd:function e(){try{const e=this;return Promise.resolve(Promise.all([e.appManagerInstance.fetchInsightApps(true,e._i18nBundle.getText("insights")),e.appManagerInstance.fetchFavVizs(false,true)])).then(function(t){let[n,o]=t;const i=n.reduce((e,t)=>{if(!t.isCount&&!t.isSmartBusinessTile){const n=o.findIndex(e=>e.visualization?.vizId===t.visualization?.vizId||e.appId===t.appId);if(n===-1){e.push(t)}}return e},[]);return e.appManagerInstance._filterDuplicateVizs(i,false)})}catch(e){return Promise.reject(e)}},_closeAddFromInsightsDialog:function e(){const t=this._generateAddFromInsightsDialog();const n=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);n.removeSelections();t?.close()},_getSelectedInsights:function e(){const t=this._controlMap.get(`${this.getId()}-addFromInsightsDialog-list`);return t.getSelectedItems()||[]},_addFromInsights:function e(){try{const t=this;function n(){t._closeAddFromInsightsDialog();_.show(t._i18nBundle.getText(o.length===1?"addFromInsightTileSuccess":"addFromInsightTilesSuccess",[o.length]));return Promise.resolve(t.getParent()._refreshAllPanels()).then(function(){t._setBusy(false)})}t._setBusy(true);const o=t._getSelectedInsights();const i=re(o,function(e){return Promise.resolve(t.appManagerInstance.addVisualization(e.data("vizId"))).then(function(){})});return Promise.resolve(i&&i.then?i.then(n):n(i))}catch(s){return Promise.reject(s)}},_updateAppPersonalization:function e(t){try{const e=this;return Promise.resolve(e._getAppPersonalization()).then(function(n){for(const o of t){const{visualization:t}=o;const{persConfig:i}=t;const s=i?.sectionId;const r=o.targetGroupId??s;if(s!==r){e._updateMoveAppPersonalization(n,o)}else{e._updateAppColorPersonalization(n,o)}}return Promise.resolve(e.setFavAppsPersonalization(n)).then(function(){})})}catch(e){return Promise.reject(e)}},_updateMoveAppPersonalization:function e(t,n){const{visualization:o,isTargetGroupDefault:i}=n;const{appId:s,oldAppId:r,persConfig:a}=o;const l=a?.sectionId;const p=a?.isDefaultSection;const c=a?.duplicateApps||[];const u=n.targetGroupId??l;const d=this._getPersonalizationIndex(t,{appId:s,oldAppId:r,sectionId:l,isRecentlyAddedApp:p});if(d>-1){const e={...t[d],sectionId:u,isRecentlyAddedApp:i,isSection:false};if(c.length===0){t.splice(d,1)}const n=this._getPersonalizationIndex(t,{appId:s,oldAppId:r,sectionId:u,isRecentlyAddedApp:i});if(n>-1){t.splice(n,1)}t.push(e)}},_updateGroupPersonalization:function e(t,n){try{const e=this;return Promise.resolve(e._getAppPersonalization()).then(function(o){const i=e._getPersonalizationIndex(o,{isSection:true,sectionId:t});const s={BGColor:n,isSection:true,sectionId:t,isRecentlyAddedApp:false};if(i>-1){o[i]=s}else{o.push(s)}return Promise.resolve(e.setFavAppsPersonalization(o)).then(function(){})})}catch(e){return Promise.reject(e)}},_getPersonalizationIndex:function e(t,n){const{appId:o,oldAppId:i,sectionId:s,isSection:r,isRecentlyAddedApp:a}=n;return t.findIndex(e=>{if(r){return e.sectionId===s&&e.isSection}else{return a?(e.appId===o||e.appId===i)&&e.isRecentlyAddedApp:(e.appId===o||e.appId===i)&&e.sectionId===s}})},_addVisualization:function e(t,n){if(t.visualization){return t.visualization.isBookmark?this.appManagerInstance.addBookMark(t.visualization):this.appManagerInstance.addVisualization(t.visualization.vizId,n)}return Promise.reject(new Error("No visualization provided to add"))},_deleteGroup:function e(t){try{const e=this;return Promise.resolve(j.getServiceAsync("Pages")).then(function(n){const o=n.getPageIndex(Ae),i=n.getModel().getProperty(`/pages/${o}/sections/`),s=i.findIndex(e=>e.id===t);const r=function(){if(s>-1){return Promise.resolve(n.deleteSection(o,s)).then(function(){void e._deletePersonalization({sectionId:t,isSection:true})})}}();if(r&&r.then)return r.then(function(){})})}catch(e){return Promise.reject(e)}},_deletePersonalization:function e(t){try{const e=this;const{isSection:n,sectionId:o}=t;return Promise.resolve(e._getAppPersonalization()).then(function(i){if(!n){const n=e._getPersonalizationIndex(i,t);if(n>-1){i.splice(n,1)}}else{i=i.filter(e=>e.sectionId!==o)}void e.setFavAppsPersonalization(i)})}catch(e){return Promise.reject(e)}},_handleGroupPress:function e(t){const n=t.getParameter("groupId");if(n){void this._showGroupDetailDialog(n)}},_handleKeyboardMoveApp:function e(t,n){try{const e=this;const o=w.closestTo(t.target.firstElementChild);const i=o.getParent();const s=function(){if(t.metaKey||t.ctrlKey){if(t.key==="x"&&!o.data("groupId")&&!e._cutApp&&!n){o.$().css("opacity",.6);o._oMoreIcon.setEnabled(false);e._cutApp=o}const s=function(){if(t.key==="v"&&e._cutApp&&!n){const t=new $("keyboardDragDropEvent",i,{draggedControl:e._cutApp,droppedControl:o,dropPosition:ue.RelativeDropPosition.On});return Promise.resolve(e._onFavItemDrop(t)).then(function(){e._cutApp=undefined})}}();if(s&&s.then)return s.then(function(){})}}();return Promise.resolve(s&&s.then?s.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},_resetCutElement:function e(t){const n=this._generateAppsWrapper().getId();if(!t.target.id.includes(n)){this._cutApp?.$().css("opacity","");this._cutApp=undefined}},generateIllustratedMessage:function e(){const t=he.prototype.generateIllustratedMessage.call(this);t.setDescription(this._i18nBundle.getText("noFavAppsDescription"));t.setIllustrationSize(c.Small);t.setIllustrationType(u.AddingColumns);t.addAdditionalContent(new o(`${this.getId()}-errorMessage-addApps`,{text:this._i18nBundle.getText("addApps"),tooltip:this._i18nBundle.getText("addAppsTooltip"),icon:"sap-icon://action",visible:xe(),press:()=>{void this.navigateToAppFinder()},type:"Emphasized"}));return t}});we.favouritesMenuItems=De;return we});
|
|
6
6
|
//# sourceMappingURL=FavAppPanel.js.map
|