@sapui5/sap.cux.home 1.140.0 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +3 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +3 -1
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +6 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +7 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +64 -59
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +44 -34
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +44 -37
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +43 -33
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +3 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +5 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +26 -4
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +26 -3
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +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 +2 -2
- package/src/sap/cux/home/BasePanel.d.ts +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +20 -0
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +16 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +9 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js +13 -0
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +15 -0
- package/src/sap/cux/home/CardsPanel.d.ts +7 -0
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +132 -113
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +19 -8
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +6 -2
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +5 -1
- package/src/sap/cux/home/ErrorPanel.js +2 -2
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +2 -2
- package/src/sap/cux/home/FavAppPanel.d.ts +4 -10
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +432 -446
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +56 -84
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +3 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +2 -0
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +2 -2
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +0 -4
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +2 -2
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +4 -4
- package/src/sap/cux/home/NewsPanel.d.ts +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +100 -68
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +60 -33
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +215 -80
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +5 -2
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +8 -8
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- package/src/sap/cux/home/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- package/src/sap/cux/home/SettingsDialog.d.ts +1 -0
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +13 -6
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +14 -6
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +12 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +13 -1
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.js +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +1 -1
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +3 -0
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +2 -1
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +10 -3
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +7 -3
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +29 -8
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +19 -8
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +13 -7
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_th.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +0 -2
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +6 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +1 -0
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +1 -0
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
- package/src/sap/cux/home/themes/base/InsightsContainer.less +4 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +4 -0
- package/src/sap/cux/home/utils/AppManager.d.ts +7 -6
- 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 +9 -10
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +4 -1
- package/src/sap/cux/home/utils/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- package/src/sap/cux/home/utils/UshellPersonalizer.js +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +1 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/m/Button", "sap/m/ColorPalette", "sap/m/ColorPalettePopover", "sap/m/CustomListItem", "sap/m/Dialog", "sap/m/HBox", "sap/m/IllustratedMessage", "sap/m/IllustratedMessageSize", "sap/m/IllustratedMessageType", "sap/m/Input", "sap/m/Label", "sap/m/List", "sap/m/MessageBox", "sap/m/MessageStrip", "sap/m/MessageToast", "sap/m/NavContainer", "sap/m/ObjectIdentifier", "sap/m/Page", "sap/m/Popover", "sap/m/ScrollContainer", "sap/m/SearchField", "sap/m/StandardListItem", "sap/m/Text", "sap/m/Title", "sap/m/Toolbar", "sap/m/ToolbarSpacer", "sap/m/VBox", "sap/m/library", "sap/ui/base/Event", "sap/ui/core/Element", "sap/ui/core/EventBus", "sap/ui/core/Icon", "sap/ui/core/library", "sap/ui/core/message/MessageType", "sap/ui/core/theming/Parameters", "sap/ui/layout/form/SimpleForm", "sap/ui/layout/library", "sap/ushell/Config", "sap/ushell/Container", "
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettings", "sap/m/Button", "sap/m/ColorPalette", "sap/m/ColorPalettePopover", "sap/m/CustomListItem", "sap/m/Dialog", "sap/m/HBox", "sap/m/IllustratedMessage", "sap/m/IllustratedMessageSize", "sap/m/IllustratedMessageType", "sap/m/Input", "sap/m/Label", "sap/m/List", "sap/m/MessageBox", "sap/m/MessageStrip", "sap/m/MessageToast", "sap/m/NavContainer", "sap/m/ObjectIdentifier", "sap/m/Page", "sap/m/Popover", "sap/m/ScrollContainer", "sap/m/SearchField", "sap/m/StandardListItem", "sap/m/Text", "sap/m/Title", "sap/m/Toolbar", "sap/m/ToolbarSpacer", "sap/m/VBox", "sap/m/library", "sap/ui/base/Event", "sap/ui/core/Element", "sap/ui/core/EventBus", "sap/ui/core/Icon", "sap/ui/core/library", "sap/ui/core/message/MessageType", "sap/ui/core/theming/Parameters", "sap/ui/layout/form/SimpleForm", "sap/ui/layout/library", "sap/ushell/Config", "sap/ushell/Container", "./BaseApp", "./BaseAppPersPanel", "./Group", "./MenuItem", "./RecommendedAppPanel", "./utils/Accessibility", "./utils/Constants", "./utils/DataFormatUtils", "./utils/Device", "./utils/FESRUtil", "./utils/InsightsUtils"], function (Log, GridContainer, GridContainerSettings, Button, ColorPalette, ColorPalettePopover, CustomListItem, Dialog, HBox, IllustratedMessage, IllustratedMessageSize, IllustratedMessageType, Input, Label, List, MessageBox, MessageStrip, MessageToast, NavContainer, ObjectIdentifier, Page, Popover, ScrollContainer, SearchField, StandardListItem, Text, Title, Toolbar, ToolbarSpacer, VBox, sap_m_library, Event, Element, EventBus, Icon, sap_ui_core_library, MessageType, Parameters, SimpleForm, sap_ui_layout_library, Config, Container, ___BaseApp, __BaseAppPersPanel, __Group, __MenuItem, __RecommendedAppPanel, ___utils_Accessibility, ___utils_Constants, ___utils_DataFormatUtils, ___utils_Device, ___utils_FESRUtil, ___utils_InsightsUtils) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -202,8 +202,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
202
202
|
const MYHOME_PAGE_ID = ___utils_Constants["MYHOME_PAGE_ID"];
|
|
203
203
|
const getLeanURL = ___utils_DataFormatUtils["getLeanURL"];
|
|
204
204
|
const recycleId = ___utils_DataFormatUtils["recycleId"];
|
|
205
|
+
const DeviceType = ___utils_Device["DeviceType"];
|
|
205
206
|
const addFESRId = ___utils_FESRUtil["addFESRId"];
|
|
207
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
206
208
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
209
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
207
210
|
const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
|
|
208
211
|
const _showAddApps = () => {
|
|
209
212
|
return Config.last("/core/shell/enablePersonalization") || Config.last("/core/catalog/enabled");
|
|
@@ -307,15 +310,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
307
310
|
};
|
|
308
311
|
},
|
|
309
312
|
init: function _init() {
|
|
310
|
-
const _this = this
|
|
311
|
-
_this2 = this;
|
|
313
|
+
const _this = this;
|
|
312
314
|
BaseAppPersPanel.prototype.init.call(this);
|
|
313
315
|
//Configure Header
|
|
314
316
|
this.setProperty("key", "favApps");
|
|
315
317
|
this.setProperty("title", this._i18nBundle.getText("favoritesTab"));
|
|
316
318
|
this.setProperty("tooltip", this._i18nBundle.getText("favAppsInfo"));
|
|
317
319
|
//Setup Action Buttons
|
|
318
|
-
|
|
320
|
+
this._createActionButtons();
|
|
319
321
|
//Setup Menu Items
|
|
320
322
|
this._createHeaderMenuItems();
|
|
321
323
|
//add drag and drop config
|
|
@@ -337,13 +339,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
337
339
|
return Promise.reject(e);
|
|
338
340
|
}
|
|
339
341
|
}, this);
|
|
340
|
-
this.oEventBus.subscribe("importChannel", "resetImported", function () {
|
|
341
|
-
try {
|
|
342
|
-
return Promise.resolve(_this2.setImportButtonVisibility(true)).then(function () {});
|
|
343
|
-
} catch (e) {
|
|
344
|
-
return Promise.reject(e);
|
|
345
|
-
}
|
|
346
|
-
}, this);
|
|
347
342
|
this.attachPersistDialog(() => {
|
|
348
343
|
// if while navigating to different page, a group detail dialog was open, then while navigating back group detail dialog should be in open state.
|
|
349
344
|
if (this._selectedGroupId) {
|
|
@@ -352,6 +347,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
352
347
|
});
|
|
353
348
|
document.addEventListener("click", event => this._resetCutElement(event));
|
|
354
349
|
document.addEventListener("keydown", event => this._resetCutElement(event));
|
|
350
|
+
this.additionalInfo = {
|
|
351
|
+
fesrSource: FESRNavigationSource.Favorite
|
|
352
|
+
};
|
|
355
353
|
},
|
|
356
354
|
_importdone: function _importdone() {
|
|
357
355
|
const stateData = {
|
|
@@ -365,63 +363,62 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
365
363
|
*/
|
|
366
364
|
addAppsAndSections: function _addAppsAndSections(sections, importedPersonalizations) {
|
|
367
365
|
try {
|
|
368
|
-
const
|
|
366
|
+
const _this2 = this;
|
|
369
367
|
let aPromise = [];
|
|
370
|
-
return Promise.resolve(
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
return
|
|
375
|
-
return
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return _this3.updateDefaultSectionPersonalization(aPersonalization);
|
|
379
|
-
});
|
|
368
|
+
return Promise.resolve(_this2._getAppPersonalization()).then(function (aPersonalization) {
|
|
369
|
+
function _temp5() {
|
|
370
|
+
//update personalization
|
|
371
|
+
return Promise.resolve(_this2.setFavAppsPersonalization(aPersonalization)).then(function () {
|
|
372
|
+
return aPromise.reduce((chain, current) => {
|
|
373
|
+
return chain.then(() => current());
|
|
374
|
+
}, Promise.resolve()).then(() => {
|
|
375
|
+
return _this2.updateDefaultSectionPersonalization(aPersonalization);
|
|
380
376
|
});
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
return
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
const _temp4 = _forOf(sections, function (section) {
|
|
380
|
+
const sectionViz = section.visualizations;
|
|
381
|
+
const _temp3 = function () {
|
|
382
|
+
if (sectionViz?.length) {
|
|
383
|
+
function _temp2() {
|
|
384
|
+
const filteredPersonalizations = _this2.filterPersonalizations(importedPersonalizations, section);
|
|
385
|
+
aPersonalization = aPersonalization.concat(filteredPersonalizations);
|
|
386
|
+
}
|
|
387
|
+
const _temp = function () {
|
|
388
|
+
if (section.default || section.id === MYAPPS_SECTION_ID) {
|
|
389
|
+
aPromise.push(() => {
|
|
390
|
+
return section.default ? _this2.addSectionViz(sectionViz) : _this2.addSectionViz(sectionViz, MYAPPS_SECTION_ID);
|
|
391
|
+
});
|
|
392
|
+
} else {
|
|
393
|
+
return Promise.resolve(_this2.appManagerInstance._getSections(true)).then(function (sections) {
|
|
394
|
+
// If Section exists, add visualization to existing section else create a new section with same sectionId
|
|
395
|
+
const sectionIndex = sections.findIndex(n => n.id === section.id);
|
|
396
|
+
if (sectionIndex > -1) {
|
|
400
397
|
aPromise.push(() => {
|
|
401
|
-
return
|
|
398
|
+
return _this2.addSectionViz(sectionViz, section.id);
|
|
399
|
+
});
|
|
400
|
+
} else {
|
|
401
|
+
aPromise.push(() => {
|
|
402
|
+
return _this2.appManagerInstance.addSection({
|
|
402
403
|
sectionIndex: sections.length,
|
|
403
404
|
sectionProperties: {
|
|
404
|
-
id:
|
|
405
|
+
id: section.id,
|
|
405
406
|
title: section.title,
|
|
406
407
|
visible: true,
|
|
407
|
-
visualizations: sectionViz
|
|
408
|
-
//check if this generate id can be replaced with any exposed method
|
|
409
|
-
oViz.id = pagesService._generateId(MYHOME_PAGE_ID);
|
|
410
|
-
return oViz;
|
|
411
|
-
})
|
|
408
|
+
visualizations: sectionViz
|
|
412
409
|
}
|
|
413
410
|
});
|
|
414
411
|
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
});
|
|
423
|
-
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}();
|
|
416
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
417
|
+
}
|
|
418
|
+
}();
|
|
419
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
424
420
|
});
|
|
421
|
+
return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
|
|
425
422
|
});
|
|
426
423
|
} catch (e) {
|
|
427
424
|
return Promise.reject(e);
|
|
@@ -462,9 +459,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
462
459
|
*/
|
|
463
460
|
updateDefaultSectionPersonalization: function _updateDefaultSectionPersonalization(aPersonalization) {
|
|
464
461
|
try {
|
|
465
|
-
const
|
|
462
|
+
const _this3 = this;
|
|
466
463
|
//update recently added app section id in personalization
|
|
467
|
-
return Promise.resolve(
|
|
464
|
+
return Promise.resolve(_this3.appManagerInstance._getSections(true)).then(function (sections) {
|
|
468
465
|
let defaultSection = sections.find(oSection => {
|
|
469
466
|
return oSection.default;
|
|
470
467
|
});
|
|
@@ -486,16 +483,47 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
486
483
|
*
|
|
487
484
|
* @param {Array} sectionsViz - array of section visualizations
|
|
488
485
|
* @param {String} sSectionId - section id for which visualizations needs to be added
|
|
486
|
+
* @param {Array} sections - array of sections
|
|
489
487
|
* @returns {String} resolves to visualizations being added to given section
|
|
490
488
|
*/
|
|
491
489
|
addSectionViz: function _addSectionViz(sectionsViz, sSectionId) {
|
|
492
490
|
try {
|
|
493
|
-
const
|
|
491
|
+
const _this4 = this;
|
|
494
492
|
return Promise.resolve(sectionsViz.reduce((promiseChain, oViz) => {
|
|
495
|
-
return promiseChain.then(()
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
493
|
+
return promiseChain.then(function () {
|
|
494
|
+
try {
|
|
495
|
+
let _exit = false;
|
|
496
|
+
function _temp7(_result) {
|
|
497
|
+
return _exit ? _result : _this4._addVisualization({
|
|
498
|
+
visualization: oViz
|
|
499
|
+
}, sSectionId);
|
|
500
|
+
}
|
|
501
|
+
const _temp6 = function () {
|
|
502
|
+
if (oViz.isBookmark && sSectionId) {
|
|
503
|
+
return Promise.resolve(_this4.appManagerInstance._getSections()).then(function (sections) {
|
|
504
|
+
const defaultSection = sections.find(section => section.default);
|
|
505
|
+
const targetSection = sections.find(section => section.id === sSectionId);
|
|
506
|
+
if (defaultSection && targetSection) {
|
|
507
|
+
const moveConfig = {
|
|
508
|
+
sourceSectionIndex: sections.indexOf(defaultSection),
|
|
509
|
+
sourceVisualizationIndex: defaultSection.visualizations.length,
|
|
510
|
+
targetSectionIndex: sections.indexOf(targetSection),
|
|
511
|
+
targetVisualizationIndex: targetSection.visualizations.length
|
|
512
|
+
};
|
|
513
|
+
const _this4$_addVisualizat = _this4._addVisualization({
|
|
514
|
+
visualization: oViz
|
|
515
|
+
}, sSectionId, moveConfig);
|
|
516
|
+
_exit = true;
|
|
517
|
+
return _this4$_addVisualizat;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
}();
|
|
522
|
+
// in case of bookmark, move the viz to target section
|
|
523
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
|
524
|
+
} catch (e) {
|
|
525
|
+
return Promise.reject(e);
|
|
526
|
+
}
|
|
499
527
|
});
|
|
500
528
|
}, Promise.resolve()));
|
|
501
529
|
} catch (e) {
|
|
@@ -508,41 +536,48 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
508
536
|
*/
|
|
509
537
|
loadApps: function _loadApps() {
|
|
510
538
|
try {
|
|
511
|
-
const
|
|
512
|
-
return Promise.resolve(
|
|
539
|
+
const _this5 = this;
|
|
540
|
+
return Promise.resolve(_this5.appManagerInstance.fetchFavVizs(true, false)).then(function (favoriteVisualizations) {
|
|
541
|
+
function _temp9() {
|
|
542
|
+
if (checkPanelExists(container, insightsConatinerlName, tilesPanelName)) {
|
|
543
|
+
_this5._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
544
|
+
}
|
|
545
|
+
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
546
|
+
container._updateContainerHeader(container);
|
|
547
|
+
}
|
|
548
|
+
const isPhone = _this5.getDeviceType() === DeviceType.Mobile;
|
|
513
549
|
//Create groups
|
|
514
|
-
|
|
550
|
+
_this5.destroyAggregation("groups", true);
|
|
515
551
|
const groupVisualizations = favoriteVisualizations.filter(visualization => visualization.isSection).map(groupVisualization => {
|
|
516
552
|
return {
|
|
517
553
|
...groupVisualization,
|
|
518
|
-
menuItems:
|
|
554
|
+
menuItems: _this5._getGroupActions(groupVisualization)
|
|
519
555
|
};
|
|
520
556
|
});
|
|
521
|
-
const groups =
|
|
522
|
-
|
|
557
|
+
const groups = _this5._generateGroups(groupVisualizations);
|
|
558
|
+
_this5._setGroups(groups);
|
|
523
559
|
|
|
524
560
|
//Create apps
|
|
525
|
-
|
|
561
|
+
_this5.destroyAggregation("apps", true);
|
|
526
562
|
const appVisualizations = favoriteVisualizations.filter(visualization => !visualization.isSection).map((appVisualization, index) => {
|
|
527
563
|
return {
|
|
528
564
|
...appVisualization,
|
|
529
|
-
menuItems:
|
|
565
|
+
menuItems: _this5._getAppActions(undefined, index, appVisualization)
|
|
530
566
|
};
|
|
531
567
|
});
|
|
532
|
-
const apps =
|
|
533
|
-
|
|
534
|
-
if (
|
|
535
|
-
void
|
|
568
|
+
const apps = _this5.generateApps(appVisualizations);
|
|
569
|
+
_this5.setApps(apps);
|
|
570
|
+
if (_this5._selectedGroupId) {
|
|
571
|
+
void _this5._setGroupDetailDialogApps(_this5._selectedGroupId);
|
|
536
572
|
}
|
|
537
|
-
const container =
|
|
538
|
-
container.toggleMenuListItem(
|
|
539
|
-
|
|
540
|
-
if (
|
|
541
|
-
|
|
573
|
+
const container = _this5.getParent();
|
|
574
|
+
container.toggleMenuListItem(_this5._createGroupMenuItem, _this5.getApps().length > 0);
|
|
575
|
+
const _temp8 = function () {
|
|
576
|
+
if (!isPhone) {
|
|
577
|
+
return Promise.resolve(_this5._switchToRecommendedIfNoFavApps(apps, groups)).then(function () {});
|
|
542
578
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
});
|
|
579
|
+
}();
|
|
580
|
+
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
546
581
|
});
|
|
547
582
|
} catch (e) {
|
|
548
583
|
return Promise.reject(e);
|
|
@@ -558,20 +593,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
558
593
|
*/
|
|
559
594
|
_switchToRecommendedIfNoFavApps: function _switchToRecommendedIfNoFavApps(apps, groups) {
|
|
560
595
|
try {
|
|
561
|
-
const
|
|
562
|
-
function
|
|
563
|
-
|
|
596
|
+
const _this6 = this;
|
|
597
|
+
function _temp1() {
|
|
598
|
+
_this6._isInitialLoad = false;
|
|
564
599
|
}
|
|
565
|
-
const container =
|
|
600
|
+
const container = _this6.getParent();
|
|
566
601
|
const panels = container.getContent();
|
|
567
602
|
const recommendedPanel = panels ? panels.find(panel => panel instanceof RecommendedAppPanel) : null;
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
603
|
+
const _temp0 = function () {
|
|
604
|
+
if (_this6._isInitialLoad && [...apps, ...groups].length === 0 && recommendedPanel?.isSupported()) {
|
|
570
605
|
container.setProperty?.("selectedKey", "recommendedApps");
|
|
571
606
|
return Promise.resolve(container.refreshPanel(recommendedPanel)).then(function () {});
|
|
572
607
|
}
|
|
573
608
|
}();
|
|
574
|
-
return Promise.resolve(
|
|
609
|
+
return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
|
|
575
610
|
} catch (e) {
|
|
576
611
|
return Promise.reject(e);
|
|
577
612
|
}
|
|
@@ -752,57 +787,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
752
787
|
* @private
|
|
753
788
|
*/
|
|
754
789
|
_createActionButtons: function _createActionButtons() {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
if (
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
addFESRId(addAppsBtn, "addAppsBtn");
|
|
769
|
-
_this8._actionButtons.push(addAppsBtn);
|
|
770
|
-
}
|
|
790
|
+
if (!this._actionButtons) {
|
|
791
|
+
this._actionButtons = [];
|
|
792
|
+
if (_showAddApps()) {
|
|
793
|
+
const addAppsBtn = new Button(`${this.getId()}-addAppsBtn`, {
|
|
794
|
+
icon: "sap-icon://action",
|
|
795
|
+
tooltip: this._i18nBundle.getText("addAppsTooltip"),
|
|
796
|
+
text: this._i18nBundle.getText("addApps"),
|
|
797
|
+
press: () => {
|
|
798
|
+
void this.navigateToAppFinder();
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
addFESRId(addAppsBtn, "addAppsBtn");
|
|
802
|
+
this._actionButtons.push(addAppsBtn);
|
|
771
803
|
}
|
|
772
|
-
_this8._actionButtons.forEach(actionButton => {
|
|
773
|
-
_this8.addAggregation("actionButtons", actionButton);
|
|
774
|
-
});
|
|
775
|
-
return Promise.resolve(_this8._validateAppsMigration()).then(function (isImportEnabled) {
|
|
776
|
-
if (isImportEnabled) {
|
|
777
|
-
_this8._createImportButton();
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
} catch (e) {
|
|
781
|
-
return Promise.reject(e);
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
_createImportButton: function _createImportButton() {
|
|
785
|
-
if (!this._importButton) {
|
|
786
|
-
this._importButton = new Button(`${this.getId()}-importAppsBtn`, {
|
|
787
|
-
tooltip: this._i18nBundle.getText("importAppsNow"),
|
|
788
|
-
text: this._i18nBundle.getText("importAppsNow"),
|
|
789
|
-
press: this._openImportAppsDialog.bind(this)
|
|
790
|
-
});
|
|
791
|
-
addFESRId(this._importButton, "importAppsDialog");
|
|
792
|
-
this._actionButtons.push(this._importButton);
|
|
793
|
-
this.insertAggregation("actionButtons", this._importButton, 0);
|
|
794
|
-
}
|
|
795
|
-
return this._importButton;
|
|
796
|
-
},
|
|
797
|
-
setImportButtonVisibility: function _setImportButtonVisibility(bVisible) {
|
|
798
|
-
try {
|
|
799
|
-
const _this9 = this;
|
|
800
|
-
return Promise.resolve(MyHomeImport.setImportEnabled(bVisible)).then(function () {
|
|
801
|
-
_this9._createImportButton().setVisible(bVisible);
|
|
802
|
-
});
|
|
803
|
-
} catch (e) {
|
|
804
|
-
return Promise.reject(e);
|
|
805
804
|
}
|
|
805
|
+
this._actionButtons.forEach(actionButton => {
|
|
806
|
+
this.addAggregation("actionButtons", actionButton);
|
|
807
|
+
});
|
|
806
808
|
},
|
|
807
809
|
/**
|
|
808
810
|
* Creates menu items for panel header.
|
|
@@ -845,15 +847,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
845
847
|
*/
|
|
846
848
|
_getDragDropInfo: function _getDragDropInfo(event, appGroupId) {
|
|
847
849
|
try {
|
|
848
|
-
const
|
|
850
|
+
const _this7 = this;
|
|
849
851
|
const dragTile = event.getParameter?.("draggedControl"),
|
|
850
852
|
dropTile = event.getParameter?.("droppedControl"),
|
|
851
853
|
dropPosition = event.getParameter?.("dropPosition"),
|
|
852
854
|
dropControl = dragTile.getParent(),
|
|
853
855
|
dragItemIndex = dropControl.indexOfItem(dragTile),
|
|
854
856
|
dropItemIndex = dropControl.indexOfItem(dropTile),
|
|
855
|
-
dragItem =
|
|
856
|
-
dropItem =
|
|
857
|
+
dragItem = _this7._getTileItem(dragTile, appGroupId),
|
|
858
|
+
dropItem = _this7._getTileItem(dropTile, appGroupId);
|
|
857
859
|
const dragDropInfo = {
|
|
858
860
|
dragItem: dragItem,
|
|
859
861
|
dropItem: dropItem,
|
|
@@ -863,24 +865,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
863
865
|
dropItemIndex
|
|
864
866
|
};
|
|
865
867
|
//adjust drap drop info
|
|
866
|
-
const
|
|
868
|
+
const _temp12 = function () {
|
|
867
869
|
if (dragItemIndex !== dropItemIndex) {
|
|
868
|
-
const
|
|
870
|
+
const _temp11 = function () {
|
|
869
871
|
if (!(dragItem instanceof Group) && !(dropItem instanceof Group)) {
|
|
870
|
-
return Promise.resolve(
|
|
872
|
+
return Promise.resolve(_this7._adjustAppDragDropInfo(dragDropInfo, appGroupId)).then(function () {});
|
|
871
873
|
} else {
|
|
872
|
-
const
|
|
874
|
+
const _temp10 = function () {
|
|
873
875
|
if (dragItem instanceof Group) {
|
|
874
|
-
return Promise.resolve(
|
|
876
|
+
return Promise.resolve(_this7._adjustGroupDragDropInfo(dragDropInfo)).then(function () {});
|
|
875
877
|
}
|
|
876
878
|
}();
|
|
877
|
-
if (
|
|
879
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
878
880
|
}
|
|
879
881
|
}();
|
|
880
|
-
if (
|
|
882
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
|
881
883
|
}
|
|
882
884
|
}();
|
|
883
|
-
return Promise.resolve(
|
|
885
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {
|
|
884
886
|
return dragDropInfo;
|
|
885
887
|
}) : dragDropInfo);
|
|
886
888
|
} catch (e) {
|
|
@@ -895,11 +897,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
895
897
|
*/
|
|
896
898
|
_adjustAppDragDropInfo: function _adjustAppDragDropInfo(dragDropInfo, appGroupId) {
|
|
897
899
|
try {
|
|
898
|
-
const
|
|
900
|
+
const _this8 = this;
|
|
899
901
|
let isUpdated = false;
|
|
900
902
|
const dragApp = dragDropInfo.dragItem;
|
|
901
903
|
const dropApp = dragDropInfo.dropItem;
|
|
902
|
-
return Promise.resolve(Promise.all([
|
|
904
|
+
return Promise.resolve(Promise.all([_this8.appManagerInstance.getVisualization(dragApp.getUrl(), appGroupId), _this8.appManagerInstance.getVisualization(dropApp.getUrl(), appGroupId)])).then(function ([dragVisualization, dropVisualization]) {
|
|
903
905
|
if (dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before) {
|
|
904
906
|
//let's say there are two apps a1, a2, if a1 is moved before a2, that essentailly means the drop item index is same as current item index, adjust the dropItemIndex accordingly
|
|
905
907
|
if (dragDropInfo.dragItemIndex === dragDropInfo.dropItemIndex - 1) {
|
|
@@ -920,7 +922,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
920
922
|
}
|
|
921
923
|
if (isUpdated) {
|
|
922
924
|
const tile = dragDropInfo.dropControl.getItems()[dragDropInfo.dropItemIndex];
|
|
923
|
-
const app =
|
|
925
|
+
const app = _this8._getTileItem(tile, appGroupId);
|
|
924
926
|
if (app) {
|
|
925
927
|
dragDropInfo.dropItem = app;
|
|
926
928
|
}
|
|
@@ -949,14 +951,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
949
951
|
*/
|
|
950
952
|
_adjustGroupDragDropInfo: function _adjustGroupDragDropInfo(dragDropInfo) {
|
|
951
953
|
try {
|
|
952
|
-
const
|
|
953
|
-
return Promise.resolve(
|
|
954
|
+
const _this9 = this;
|
|
955
|
+
return Promise.resolve(_this9.appManagerInstance._getSections()).then(function (sections) {
|
|
954
956
|
let dropGroupIndex;
|
|
955
957
|
dragDropInfo.dragItemIndex = sections.findIndex(section => section.id === dragDropInfo.dragItem.getGroupId());
|
|
956
958
|
|
|
957
959
|
//If dropped app is the first ungrouped app, put the group at the end
|
|
958
960
|
if (!(dragDropInfo.dropItem instanceof Group)) {
|
|
959
|
-
const lastGroupIndex =
|
|
961
|
+
const lastGroupIndex = _this9.getAggregation("groups").length;
|
|
960
962
|
dragDropInfo.dropItemIndex = dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before && dragDropInfo.dropItemIndex === lastGroupIndex && dragDropInfo.dragItemIndex !== lastGroupIndex ? lastGroupIndex + 1 : dragDropInfo.dragItemIndex;
|
|
961
963
|
} else {
|
|
962
964
|
dropGroupIndex = sections.findIndex(section => section.id === dragDropInfo.dropItem.getGroupId());
|
|
@@ -983,10 +985,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
983
985
|
*/
|
|
984
986
|
_onFavItemDrop: function _onFavItemDrop(event, appGroupId) {
|
|
985
987
|
try {
|
|
986
|
-
const
|
|
988
|
+
const _this0 = this;
|
|
987
989
|
const dragTile = event.getParameter?.("draggedControl");
|
|
988
|
-
return Promise.resolve(
|
|
989
|
-
function
|
|
990
|
+
return Promise.resolve(_this0._getDragDropInfo(event, appGroupId)).then(function (dragDropInfo) {
|
|
991
|
+
function _temp15() {
|
|
990
992
|
dragTile.removeStyleClass("sapMGTPressActive");
|
|
991
993
|
}
|
|
992
994
|
const {
|
|
@@ -997,29 +999,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
997
999
|
dropItem
|
|
998
1000
|
} = dragDropInfo;
|
|
999
1001
|
if (dragItemIndex === dropItemIndex) return;
|
|
1000
|
-
const
|
|
1002
|
+
const _temp14 = function () {
|
|
1001
1003
|
if (dropPosition === dnd.RelativeDropPosition.On) {
|
|
1002
|
-
return Promise.resolve(
|
|
1003
|
-
void
|
|
1004
|
+
return Promise.resolve(_this0._handleOnItemDrop(dragItem, dropItem)).then(function () {
|
|
1005
|
+
void _this0.refresh();
|
|
1004
1006
|
});
|
|
1005
1007
|
} else {
|
|
1006
|
-
const
|
|
1008
|
+
const _temp13 = function () {
|
|
1007
1009
|
if (dropPosition === dnd.RelativeDropPosition.After || dropPosition === dnd.RelativeDropPosition.Before) {
|
|
1008
|
-
|
|
1009
|
-
return Promise.resolve(
|
|
1010
|
-
return Promise.resolve(
|
|
1010
|
+
_this0._setBusy(true);
|
|
1011
|
+
return Promise.resolve(_this0._handleItemsReorder(dragDropInfo, appGroupId)).then(function () {
|
|
1012
|
+
return Promise.resolve(_this0.refresh()).then(function () {
|
|
1011
1013
|
if (appGroupId) {
|
|
1012
|
-
void
|
|
1014
|
+
void _this0._setGroupDetailDialogApps(appGroupId);
|
|
1013
1015
|
}
|
|
1014
|
-
|
|
1016
|
+
_this0._setBusy(false);
|
|
1015
1017
|
});
|
|
1016
1018
|
});
|
|
1017
1019
|
}
|
|
1018
1020
|
}();
|
|
1019
|
-
if (
|
|
1021
|
+
if (_temp13 && _temp13.then) return _temp13.then(function () {});
|
|
1020
1022
|
}
|
|
1021
1023
|
}();
|
|
1022
|
-
return
|
|
1024
|
+
return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
|
|
1023
1025
|
});
|
|
1024
1026
|
} catch (e) {
|
|
1025
1027
|
return Promise.reject(e);
|
|
@@ -1036,25 +1038,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1036
1038
|
*/
|
|
1037
1039
|
_handleOnItemDrop: function _handleOnItemDrop(dragItem, dropItem) {
|
|
1038
1040
|
try {
|
|
1039
|
-
const
|
|
1041
|
+
const _this1 = this;
|
|
1040
1042
|
if (dragItem instanceof Group) return Promise.resolve();
|
|
1041
|
-
const
|
|
1043
|
+
const _temp16 = function () {
|
|
1042
1044
|
if (!(dropItem instanceof Group)) {
|
|
1043
1045
|
//if both dragged and dropped items are apps, create group dialog is opened.
|
|
1044
1046
|
const dragApp = dragItem;
|
|
1045
1047
|
const dropApp = dropItem;
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
+
_this1._selectedApps = [dragApp, dropApp];
|
|
1049
|
+
_this1._openCreateGroupDialog(true);
|
|
1048
1050
|
} else {
|
|
1049
1051
|
//if dragged item is an app and dropped item is a group, app should be moved into that group.
|
|
1050
1052
|
const targetGroupId = dropItem.getGroupId();
|
|
1051
|
-
|
|
1052
|
-
return Promise.resolve(
|
|
1053
|
-
|
|
1053
|
+
_this1._setBusy(true);
|
|
1054
|
+
return Promise.resolve(_this1._handleMoveToGroup(dragItem, undefined, targetGroupId)).then(function () {
|
|
1055
|
+
_this1._setBusy(false);
|
|
1054
1056
|
});
|
|
1055
1057
|
}
|
|
1056
1058
|
}();
|
|
1057
|
-
return Promise.resolve(
|
|
1059
|
+
return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(function () {}) : void 0);
|
|
1058
1060
|
} catch (e) {
|
|
1059
1061
|
return Promise.reject(e);
|
|
1060
1062
|
}
|
|
@@ -1067,7 +1069,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1067
1069
|
*/
|
|
1068
1070
|
_handleItemsReorder: function _handleItemsReorder(dragDropInfo, appGroupId) {
|
|
1069
1071
|
try {
|
|
1070
|
-
const
|
|
1072
|
+
const _this10 = this;
|
|
1071
1073
|
const {
|
|
1072
1074
|
dragItem,
|
|
1073
1075
|
dropItem,
|
|
@@ -1076,12 +1078,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1076
1078
|
} = dragDropInfo;
|
|
1077
1079
|
const isDragItemGroup = dragItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1078
1080
|
const isDropItemGroup = dropItem.getMetadata()?.getName() === "sap.cux.home.Group";
|
|
1079
|
-
const
|
|
1081
|
+
const _temp18 = function () {
|
|
1080
1082
|
if (!isDragItemGroup && !isDropItemGroup) {
|
|
1081
1083
|
const drapApp = dragItem;
|
|
1082
1084
|
const dropApp = dropItem;
|
|
1083
|
-
return Promise.resolve(Promise.all([
|
|
1084
|
-
return Promise.resolve(
|
|
1085
|
+
return Promise.resolve(Promise.all([_this10.appManagerInstance.getVisualization(drapApp.getUrl(), appGroupId), _this10.appManagerInstance.getVisualization(dropApp.getUrl(), appGroupId)])).then(function ([dragVisualization, dropVisualization]) {
|
|
1086
|
+
return Promise.resolve(_this10.appManagerInstance.moveVisualization({
|
|
1085
1087
|
sourceSectionIndex: dragVisualization?.persConfig?.sectionIndex,
|
|
1086
1088
|
sourceVisualizationIndex: dragVisualization?.persConfig?.visualizationIndex,
|
|
1087
1089
|
targetSectionIndex: dropVisualization?.persConfig?.sectionIndex,
|
|
@@ -1089,15 +1091,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1089
1091
|
})).then(function () {});
|
|
1090
1092
|
});
|
|
1091
1093
|
} else {
|
|
1092
|
-
const
|
|
1094
|
+
const _temp17 = function () {
|
|
1093
1095
|
if (isDragItemGroup && isDropItemGroup) {
|
|
1094
|
-
return Promise.resolve(
|
|
1096
|
+
return Promise.resolve(_this10.appManagerInstance.moveSection(dragItemIndex, dropItemIndex)).then(function () {});
|
|
1095
1097
|
}
|
|
1096
1098
|
}();
|
|
1097
|
-
if (
|
|
1099
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
|
1098
1100
|
}
|
|
1099
1101
|
}();
|
|
1100
|
-
return Promise.resolve(
|
|
1102
|
+
return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(function () {}) : void 0);
|
|
1101
1103
|
} catch (e) {
|
|
1102
1104
|
return Promise.reject(e);
|
|
1103
1105
|
}
|
|
@@ -1121,33 +1123,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1121
1123
|
target: {
|
|
1122
1124
|
shellHash: `Shell-appfinder?&/catalog/${JSON.stringify(navigationObject)}`
|
|
1123
1125
|
}
|
|
1124
|
-
})).then(function () {
|
|
1126
|
+
})).then(function () {
|
|
1127
|
+
addFESRNavigationSource(FESRNavigationSource.AppFinder);
|
|
1128
|
+
});
|
|
1125
1129
|
});
|
|
1126
1130
|
} catch (e) {
|
|
1127
1131
|
return Promise.reject(e);
|
|
1128
1132
|
}
|
|
1129
1133
|
},
|
|
1130
|
-
/**
|
|
1131
|
-
* Validates if import apps is enabled
|
|
1132
|
-
*
|
|
1133
|
-
*@returns {Promise} - resolves to boolean value (import is enabled/disabled)
|
|
1134
|
-
*/
|
|
1135
|
-
_validateAppsMigration: function _validateAppsMigration() {
|
|
1136
|
-
try {
|
|
1137
|
-
return Promise.resolve(_catch(function () {
|
|
1138
|
-
return Promise.resolve(MyHomeImport.isImportEnabled());
|
|
1139
|
-
}, function (error) {
|
|
1140
|
-
Log.warning(error instanceof Error ? error.message : "Error while checking if import apps is enabled");
|
|
1141
|
-
return false;
|
|
1142
|
-
}));
|
|
1143
|
-
} catch (e) {
|
|
1144
|
-
return Promise.reject(e);
|
|
1145
|
-
}
|
|
1146
|
-
},
|
|
1147
|
-
_openImportAppsDialog: function _openImportAppsDialog() {
|
|
1148
|
-
const pageRuntime = new PageRuntime();
|
|
1149
|
-
pageRuntime.onImportDialogPress();
|
|
1150
|
-
},
|
|
1151
1134
|
/**
|
|
1152
1135
|
* Opens the create group dialog.
|
|
1153
1136
|
* @private
|
|
@@ -1521,49 +1504,49 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1521
1504
|
*/
|
|
1522
1505
|
_onPressGroupCreate: function _onPressGroupCreate() {
|
|
1523
1506
|
try {
|
|
1524
|
-
const
|
|
1525
|
-
const groupNameInput =
|
|
1526
|
-
const
|
|
1527
|
-
if (
|
|
1528
|
-
const
|
|
1529
|
-
if (
|
|
1530
|
-
|
|
1531
|
-
const
|
|
1507
|
+
const _this11 = this;
|
|
1508
|
+
const groupNameInput = _this11._controlMap.get(`${_this11.getId()}-createGroupDialog-mainPage-form-groupName-input`);
|
|
1509
|
+
const _temp21 = function () {
|
|
1510
|
+
if (_this11._validateGroupName()) {
|
|
1511
|
+
const _temp20 = function () {
|
|
1512
|
+
if (_this11._selectedApps?.length) {
|
|
1513
|
+
_this11._setBusy(true);
|
|
1514
|
+
const _temp19 = _finallyRethrows(function () {
|
|
1532
1515
|
return _catch(function () {
|
|
1533
|
-
return Promise.resolve(
|
|
1534
|
-
selectedApps:
|
|
1516
|
+
return Promise.resolve(_this11._createGroup({
|
|
1517
|
+
selectedApps: _this11._selectedApps,
|
|
1535
1518
|
groupName: groupNameInput.getValue(),
|
|
1536
|
-
groupColor:
|
|
1519
|
+
groupColor: _this11._getGroupColor()
|
|
1537
1520
|
})).then(function () {
|
|
1538
|
-
return Promise.resolve(
|
|
1521
|
+
return Promise.resolve(_this11.refresh()).then(function () {
|
|
1539
1522
|
// Show toast message after successful group creation
|
|
1540
|
-
MessageToast.show(
|
|
1541
|
-
of:
|
|
1523
|
+
MessageToast.show(_this11._i18nBundle.getText("newGroupCreated"), {
|
|
1524
|
+
of: _this11._controlMap.get(`${_this11.getId()}-createGroupDialog`),
|
|
1542
1525
|
offset: "0 80"
|
|
1543
1526
|
});
|
|
1544
|
-
const groups =
|
|
1545
|
-
void
|
|
1527
|
+
const groups = _this11.getAggregation("groups") || [];
|
|
1528
|
+
void _this11._showGroupDetailDialog(groups[0]?.getGroupId());
|
|
1546
1529
|
});
|
|
1547
1530
|
});
|
|
1548
1531
|
}, function (err) {
|
|
1549
1532
|
Log.error(err);
|
|
1550
|
-
MessageToast.show(
|
|
1533
|
+
MessageToast.show(_this11._i18nBundle.getText("unableToCreateGroup"));
|
|
1551
1534
|
});
|
|
1552
|
-
}, function (_wasThrown,
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
if (_wasThrown) throw
|
|
1556
|
-
return
|
|
1535
|
+
}, function (_wasThrown, _result2) {
|
|
1536
|
+
_this11._setBusy(false);
|
|
1537
|
+
_this11._closeCreateGroupDialog();
|
|
1538
|
+
if (_wasThrown) throw _result2;
|
|
1539
|
+
return _result2;
|
|
1557
1540
|
});
|
|
1558
|
-
if (
|
|
1541
|
+
if (_temp19 && _temp19.then) return _temp19.then(function () {});
|
|
1559
1542
|
} else {
|
|
1560
|
-
|
|
1543
|
+
_this11._setNoAppsSelectedError(true);
|
|
1561
1544
|
}
|
|
1562
1545
|
}();
|
|
1563
|
-
if (
|
|
1546
|
+
if (_temp20 && _temp20.then) return _temp20.then(function () {});
|
|
1564
1547
|
}
|
|
1565
1548
|
}();
|
|
1566
|
-
return Promise.resolve(
|
|
1549
|
+
return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
|
|
1567
1550
|
} catch (e) {
|
|
1568
1551
|
return Promise.reject(e);
|
|
1569
1552
|
}
|
|
@@ -1578,13 +1561,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1578
1561
|
*/
|
|
1579
1562
|
_createGroup: function _createGroup(params) {
|
|
1580
1563
|
try {
|
|
1581
|
-
const
|
|
1564
|
+
const _this12 = this;
|
|
1582
1565
|
const {
|
|
1583
1566
|
selectedApps,
|
|
1584
1567
|
groupName,
|
|
1585
1568
|
groupColor
|
|
1586
1569
|
} = params;
|
|
1587
|
-
return Promise.resolve(
|
|
1570
|
+
return Promise.resolve(_this12.appManagerInstance.getSectionVisualizations()).then(function (sectionVisualizations) {
|
|
1588
1571
|
const visualizations = selectedApps.reduce((selectedVisualizations, oApp) => {
|
|
1589
1572
|
const sectionVisualization = sectionVisualizations.find(oSectionViz => oSectionViz.url === oApp.getUrl());
|
|
1590
1573
|
if (sectionVisualization) {
|
|
@@ -1593,10 +1576,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1593
1576
|
return selectedVisualizations;
|
|
1594
1577
|
}, []);
|
|
1595
1578
|
const sectionId = visualizations[0].persConfig.sectionId;
|
|
1596
|
-
return Promise.resolve(
|
|
1579
|
+
return Promise.resolve(_this12.appManagerInstance.addSection({
|
|
1597
1580
|
sectionIndex: 1,
|
|
1598
1581
|
sectionProperties: {
|
|
1599
|
-
title: groupName ||
|
|
1582
|
+
title: groupName || _this12._i18nBundle.getText("newGroup"),
|
|
1600
1583
|
visible: true,
|
|
1601
1584
|
visualizations: visualizations.map(viz => viz.visualization)
|
|
1602
1585
|
}
|
|
@@ -1608,21 +1591,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1608
1591
|
}
|
|
1609
1592
|
return visualizationsToBeDeleted;
|
|
1610
1593
|
}, []);
|
|
1611
|
-
return Promise.resolve(
|
|
1594
|
+
return Promise.resolve(_this12.appManagerInstance.removeVisualizations({
|
|
1612
1595
|
sectionId,
|
|
1613
1596
|
vizIds: visualizationsToBeDeleted
|
|
1614
1597
|
})).then(function () {
|
|
1615
|
-
return Promise.resolve(
|
|
1598
|
+
return Promise.resolve(_this12.appManagerInstance._getSections(true)).then(function (sections) {
|
|
1616
1599
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
1617
1600
|
const targetGroupId = sections[defaultSection ? 1 : 0]?.id;
|
|
1618
1601
|
//update personalization
|
|
1619
|
-
return Promise.resolve(
|
|
1602
|
+
return Promise.resolve(_this12._updateAppPersonalization(visualizations.map(oViz => {
|
|
1620
1603
|
return {
|
|
1621
1604
|
visualization: oViz,
|
|
1622
1605
|
targetGroupId
|
|
1623
1606
|
};
|
|
1624
1607
|
}))).then(function () {
|
|
1625
|
-
return Promise.resolve(
|
|
1608
|
+
return Promise.resolve(_this12._updateGroupPersonalization(targetGroupId, groupColor)).then(function () {});
|
|
1626
1609
|
});
|
|
1627
1610
|
});
|
|
1628
1611
|
});
|
|
@@ -1682,44 +1665,44 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1682
1665
|
*/
|
|
1683
1666
|
_handleColorSelect: function _handleColorSelect(item, color) {
|
|
1684
1667
|
try {
|
|
1685
|
-
const
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1668
|
+
const _this13 = this;
|
|
1669
|
+
function _temp23() {
|
|
1670
|
+
_this13.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1688
1671
|
item,
|
|
1689
1672
|
color
|
|
1690
1673
|
});
|
|
1691
1674
|
}
|
|
1692
|
-
const selectedColor =
|
|
1675
|
+
const selectedColor = _this13._getLegendColor(color).key;
|
|
1693
1676
|
item.setProperty("bgColor", selectedColor, true);
|
|
1694
1677
|
const groupId = item instanceof Group ? item.getGroupId() : null;
|
|
1695
1678
|
const isGroupedApp = !groupId && item.getParent() instanceof Group;
|
|
1696
1679
|
|
|
1697
1680
|
//update tile color
|
|
1698
1681
|
if (isGroupedApp) {
|
|
1699
|
-
|
|
1682
|
+
_this13._refreshGroupDetailDialog(item, false);
|
|
1700
1683
|
} else {
|
|
1701
1684
|
//if ungroup app or group
|
|
1702
|
-
|
|
1703
|
-
|
|
1685
|
+
_this13._applyUngroupedTileColor(item, color);
|
|
1686
|
+
_this13.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1704
1687
|
item,
|
|
1705
1688
|
color
|
|
1706
1689
|
});
|
|
1707
1690
|
}
|
|
1708
1691
|
|
|
1709
1692
|
//update personalization
|
|
1710
|
-
const
|
|
1693
|
+
const _temp22 = function () {
|
|
1711
1694
|
if (groupId) {
|
|
1712
1695
|
//if group
|
|
1713
|
-
void
|
|
1714
|
-
const groupIconControl =
|
|
1696
|
+
void _this13._updateGroupPersonalization(groupId, selectedColor);
|
|
1697
|
+
const groupIconControl = _this13._controlMap.get(`${_this13.getId()}-detailDialog-toolbar-color`);
|
|
1715
1698
|
groupIconControl?.setColor(color);
|
|
1716
1699
|
} else {
|
|
1717
1700
|
//if app
|
|
1718
1701
|
const app = item;
|
|
1719
1702
|
const groupId = isGroupedApp ? app.getParent().getGroupId() : undefined;
|
|
1720
|
-
return Promise.resolve(
|
|
1703
|
+
return Promise.resolve(_this13.appManagerInstance.getVisualization(app.getUrl(), groupId)).then(function (visualization) {
|
|
1721
1704
|
if (visualization) {
|
|
1722
|
-
void
|
|
1705
|
+
void _this13._updateAppPersonalization([{
|
|
1723
1706
|
visualization,
|
|
1724
1707
|
color: selectedColor
|
|
1725
1708
|
}]);
|
|
@@ -1727,7 +1710,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1727
1710
|
});
|
|
1728
1711
|
}
|
|
1729
1712
|
}();
|
|
1730
|
-
return Promise.resolve(
|
|
1713
|
+
return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22));
|
|
1731
1714
|
} catch (e) {
|
|
1732
1715
|
return Promise.reject(e);
|
|
1733
1716
|
}
|
|
@@ -1801,7 +1784,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1801
1784
|
* @private
|
|
1802
1785
|
*/
|
|
1803
1786
|
_handleRemove: function _handleRemove(app, group) {
|
|
1804
|
-
const
|
|
1787
|
+
const _this14 = this;
|
|
1805
1788
|
const lastAppInGroup = group?.getApps()?.length === 1;
|
|
1806
1789
|
let message = this._i18nBundle.getText("removeAppMessage", [app.getTitle()]),
|
|
1807
1790
|
title = this._i18nBundle.getText("remove"),
|
|
@@ -1820,34 +1803,34 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1820
1803
|
emphasizedAction: actionText,
|
|
1821
1804
|
onClose: function (action) {
|
|
1822
1805
|
try {
|
|
1823
|
-
const
|
|
1806
|
+
const _temp25 = function () {
|
|
1824
1807
|
if (action === actionText) {
|
|
1825
|
-
|
|
1826
|
-
const
|
|
1808
|
+
_this14._setBusy(true);
|
|
1809
|
+
const _temp24 = _finallyRethrows(function () {
|
|
1827
1810
|
return _catch(function () {
|
|
1828
|
-
return Promise.resolve(
|
|
1811
|
+
return Promise.resolve(_this14._removeApp(app, group)).then(function () {
|
|
1829
1812
|
if (lastAppInGroup) {
|
|
1830
|
-
|
|
1813
|
+
_this14._closeGroupDetailDialog();
|
|
1831
1814
|
} else if (group) {
|
|
1832
|
-
|
|
1815
|
+
_this14._refreshGroupDetailDialog(app);
|
|
1833
1816
|
}
|
|
1834
|
-
return Promise.resolve(
|
|
1835
|
-
MessageToast.show(
|
|
1817
|
+
return Promise.resolve(_this14.getParent()._refreshAllPanels()).then(function () {
|
|
1818
|
+
MessageToast.show(_this14._i18nBundle.getText("appRemoved"));
|
|
1836
1819
|
});
|
|
1837
1820
|
});
|
|
1838
1821
|
}, function (err) {
|
|
1839
1822
|
Log.error(err);
|
|
1840
|
-
MessageToast.show(
|
|
1823
|
+
MessageToast.show(_this14._i18nBundle.getText("unableToRemoveApp"));
|
|
1841
1824
|
});
|
|
1842
|
-
}, function (_wasThrown2,
|
|
1843
|
-
|
|
1844
|
-
if (_wasThrown2) throw
|
|
1845
|
-
return
|
|
1825
|
+
}, function (_wasThrown2, _result3) {
|
|
1826
|
+
_this14._setBusy(false);
|
|
1827
|
+
if (_wasThrown2) throw _result3;
|
|
1828
|
+
return _result3;
|
|
1846
1829
|
});
|
|
1847
|
-
if (
|
|
1830
|
+
if (_temp24 && _temp24.then) return _temp24.then(function () {});
|
|
1848
1831
|
}
|
|
1849
1832
|
}();
|
|
1850
|
-
return Promise.resolve(
|
|
1833
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(function () {}) : void 0);
|
|
1851
1834
|
} catch (e) {
|
|
1852
1835
|
return Promise.reject(e);
|
|
1853
1836
|
}
|
|
@@ -1865,28 +1848,28 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1865
1848
|
*/
|
|
1866
1849
|
_removeApp: function _removeApp(app, group) {
|
|
1867
1850
|
try {
|
|
1868
|
-
const
|
|
1851
|
+
const _this15 = this;
|
|
1869
1852
|
const lastAppInGroup = group?.getApps()?.length === 1,
|
|
1870
1853
|
groupId = group?.getGroupId(),
|
|
1871
1854
|
appId = app.getUrl();
|
|
1872
|
-
return Promise.resolve(
|
|
1873
|
-
const
|
|
1855
|
+
return Promise.resolve(_this15.appManagerInstance.getVisualization(appId, groupId)).then(function (viz) {
|
|
1856
|
+
const _temp27 = function () {
|
|
1874
1857
|
if (lastAppInGroup) {
|
|
1875
1858
|
//if last app in group, then delete the group as well
|
|
1876
|
-
return Promise.resolve(
|
|
1859
|
+
return Promise.resolve(_this15._deleteGroup(groupId)).then(function () {});
|
|
1877
1860
|
} else {
|
|
1878
1861
|
let visualizationsToBeDeleted = [viz?.visualization?.id];
|
|
1879
1862
|
if (!groupId) {
|
|
1880
1863
|
//for apps outside group i.e. for favorite apps delete duplicate apps as well
|
|
1881
1864
|
visualizationsToBeDeleted = visualizationsToBeDeleted.concat(viz?.persConfig?.duplicateApps?.map(viz => viz.visualization?.id));
|
|
1882
1865
|
}
|
|
1883
|
-
const
|
|
1866
|
+
const _temp26 = function () {
|
|
1884
1867
|
if (viz?.persConfig?.sectionId && visualizationsToBeDeleted.length > 0) {
|
|
1885
|
-
return Promise.resolve(
|
|
1868
|
+
return Promise.resolve(_this15.appManagerInstance.removeVisualizations({
|
|
1886
1869
|
sectionId: viz.persConfig.sectionId,
|
|
1887
1870
|
vizIds: visualizationsToBeDeleted
|
|
1888
1871
|
})).then(function () {
|
|
1889
|
-
void
|
|
1872
|
+
void _this15._deletePersonalization({
|
|
1890
1873
|
appId: appId,
|
|
1891
1874
|
oldAppId: viz?.oldAppId,
|
|
1892
1875
|
sectionId: viz?.persConfig?.sectionId,
|
|
@@ -1895,10 +1878,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1895
1878
|
});
|
|
1896
1879
|
}
|
|
1897
1880
|
}();
|
|
1898
|
-
if (
|
|
1881
|
+
if (_temp26 && _temp26.then) return _temp26.then(function () {});
|
|
1899
1882
|
}
|
|
1900
1883
|
}();
|
|
1901
|
-
if (
|
|
1884
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
|
1902
1885
|
});
|
|
1903
1886
|
} catch (e) {
|
|
1904
1887
|
return Promise.reject(e);
|
|
@@ -1913,13 +1896,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1913
1896
|
*/
|
|
1914
1897
|
_handleMoveToGroup: function _handleMoveToGroup(app, sourceGroupId, targetGroupId) {
|
|
1915
1898
|
try {
|
|
1916
|
-
const
|
|
1917
|
-
const sourceGroup = sourceGroupId ?
|
|
1899
|
+
const _this16 = this;
|
|
1900
|
+
const sourceGroup = sourceGroupId ? _this16._getGroup(sourceGroupId) : undefined,
|
|
1918
1901
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1919
|
-
const
|
|
1902
|
+
const _temp28 = function () {
|
|
1920
1903
|
if (isLastAppInGroup) {
|
|
1921
|
-
const confirmationMessage =
|
|
1922
|
-
const confirmationTitle =
|
|
1904
|
+
const confirmationMessage = _this16._i18nBundle.getText("moveAppMessage", [app.getTitle()]);
|
|
1905
|
+
const confirmationTitle = _this16._i18nBundle.getText("delete");
|
|
1923
1906
|
MessageBox.show(confirmationMessage, {
|
|
1924
1907
|
icon: MessageBox.Icon.WARNING,
|
|
1925
1908
|
title: confirmationTitle,
|
|
@@ -1927,15 +1910,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1927
1910
|
emphasizedAction: confirmationTitle,
|
|
1928
1911
|
onClose: action => {
|
|
1929
1912
|
if (action === confirmationTitle) {
|
|
1930
|
-
void
|
|
1913
|
+
void _this16._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId);
|
|
1931
1914
|
}
|
|
1932
1915
|
}
|
|
1933
1916
|
});
|
|
1934
1917
|
} else {
|
|
1935
|
-
return Promise.resolve(
|
|
1918
|
+
return Promise.resolve(_this16._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId)).then(function () {});
|
|
1936
1919
|
}
|
|
1937
1920
|
}();
|
|
1938
|
-
return Promise.resolve(
|
|
1921
|
+
return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(function () {}) : void 0);
|
|
1939
1922
|
} catch (e) {
|
|
1940
1923
|
return Promise.reject(e);
|
|
1941
1924
|
}
|
|
@@ -1950,41 +1933,41 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1950
1933
|
*/
|
|
1951
1934
|
_moveAppAndHandleGroupChanges: function _moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId) {
|
|
1952
1935
|
try {
|
|
1953
|
-
const
|
|
1954
|
-
const sourceGroup = sourceGroupId ?
|
|
1955
|
-
targetGroup = targetGroupId ?
|
|
1936
|
+
const _this17 = this;
|
|
1937
|
+
const sourceGroup = sourceGroupId ? _this17._getGroup(sourceGroupId) : null,
|
|
1938
|
+
targetGroup = targetGroupId ? _this17._getGroup(targetGroupId) : null,
|
|
1956
1939
|
sTargetGroupTile = targetGroup?.getTitle(),
|
|
1957
1940
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1958
|
-
const
|
|
1941
|
+
const _temp31 = _finallyRethrows(function () {
|
|
1959
1942
|
return _catch(function () {
|
|
1960
|
-
|
|
1961
|
-
return Promise.resolve(
|
|
1962
|
-
function
|
|
1963
|
-
const sMsg = sTargetGroupTile ?
|
|
1943
|
+
_this17._setBusy(true);
|
|
1944
|
+
return Promise.resolve(_this17._moveAppToGroup(app, sourceGroupId, targetGroupId)).then(function () {
|
|
1945
|
+
function _temp30() {
|
|
1946
|
+
const sMsg = sTargetGroupTile ? _this17._i18nBundle.getText("appMoved", [sTargetGroupTile]) : _this17._i18nBundle.getText("appUngrouped");
|
|
1964
1947
|
MessageToast.show(sMsg);
|
|
1965
|
-
return Promise.resolve(
|
|
1948
|
+
return Promise.resolve(_this17.refresh()).then(function () {});
|
|
1966
1949
|
}
|
|
1967
|
-
const
|
|
1950
|
+
const _temp29 = function () {
|
|
1968
1951
|
if (isLastAppInGroup) {
|
|
1969
|
-
return Promise.resolve(
|
|
1970
|
-
|
|
1952
|
+
return Promise.resolve(_this17._deleteGroup(sourceGroupId)).then(function () {
|
|
1953
|
+
_this17._closeGroupDetailDialog();
|
|
1971
1954
|
});
|
|
1972
1955
|
} else if (sourceGroupId) {
|
|
1973
|
-
|
|
1956
|
+
_this17._refreshGroupDetailDialog(app);
|
|
1974
1957
|
}
|
|
1975
1958
|
}();
|
|
1976
1959
|
//delete group, if it is the last app in the group
|
|
1977
|
-
return
|
|
1960
|
+
return _temp29 && _temp29.then ? _temp29.then(_temp30) : _temp30(_temp29);
|
|
1978
1961
|
});
|
|
1979
1962
|
}, function (error) {
|
|
1980
1963
|
Log.error(error);
|
|
1981
1964
|
});
|
|
1982
|
-
}, function (_wasThrown3,
|
|
1983
|
-
|
|
1984
|
-
if (_wasThrown3) throw
|
|
1985
|
-
return
|
|
1965
|
+
}, function (_wasThrown3, _result4) {
|
|
1966
|
+
_this17._setBusy(false);
|
|
1967
|
+
if (_wasThrown3) throw _result4;
|
|
1968
|
+
return _result4;
|
|
1986
1969
|
});
|
|
1987
|
-
return Promise.resolve(
|
|
1970
|
+
return Promise.resolve(_temp31 && _temp31.then ? _temp31.then(function () {}) : void 0);
|
|
1988
1971
|
} catch (e) {
|
|
1989
1972
|
return Promise.reject(e);
|
|
1990
1973
|
}
|
|
@@ -2028,52 +2011,52 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2028
2011
|
*/
|
|
2029
2012
|
_moveAppToGroup: function _moveAppToGroup(app, sourceGroupId, targetGroupId) {
|
|
2030
2013
|
try {
|
|
2031
|
-
const
|
|
2014
|
+
const _this18 = this;
|
|
2032
2015
|
const appId = app.getUrl();
|
|
2033
|
-
return Promise.resolve(Promise.all([
|
|
2016
|
+
return Promise.resolve(Promise.all([_this18.appManagerInstance.getSectionVisualizations(sourceGroupId), _this18.appManagerInstance._getSections()])).then(function ([visualizations, sections]) {
|
|
2034
2017
|
const sourceVisualization = visualizations.find(oViz => oViz.url === appId),
|
|
2035
2018
|
sourceVisualizationIndex = sourceVisualization?.persConfig?.visualizationIndex ?? -1,
|
|
2036
2019
|
sourceSectionIndex = sourceVisualization?.persConfig?.sectionIndex;
|
|
2037
2020
|
const isTargetGroupDefault = !targetGroupId; //if group id is not passed, then we consider it as default section
|
|
2038
2021
|
const isSourceGroupDefault = !sourceGroupId;
|
|
2039
2022
|
const targetSectionIndex = sections.findIndex(section => !targetGroupId ? section.default : section.id === targetGroupId);
|
|
2040
|
-
const
|
|
2023
|
+
const _temp36 = function () {
|
|
2041
2024
|
if (sourceVisualization) {
|
|
2042
|
-
function
|
|
2043
|
-
return Promise.resolve(
|
|
2025
|
+
function _temp35() {
|
|
2026
|
+
return Promise.resolve(_this18.appManagerInstance._getSections(true)).then(function (sections) {
|
|
2044
2027
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
2045
|
-
return Promise.resolve(
|
|
2028
|
+
return Promise.resolve(_this18._updateAppPersonalization([{
|
|
2046
2029
|
visualization: sourceVisualization,
|
|
2047
2030
|
targetGroupId: targetGroupId ?? defaultSection?.id,
|
|
2048
2031
|
isTargetGroupDefault
|
|
2049
2032
|
}])).then(function () {});
|
|
2050
2033
|
});
|
|
2051
2034
|
}
|
|
2052
|
-
const
|
|
2035
|
+
const _temp34 = function () {
|
|
2053
2036
|
if (isTargetGroupDefault) {
|
|
2054
|
-
return Promise.resolve(
|
|
2037
|
+
return Promise.resolve(_this18._moveAppToDefaultGroup(sourceVisualization)).then(function () {});
|
|
2055
2038
|
} else {
|
|
2056
|
-
function
|
|
2057
|
-
return Promise.resolve(
|
|
2039
|
+
function _temp33() {
|
|
2040
|
+
return Promise.resolve(_this18.appManagerInstance.moveVisualization({
|
|
2058
2041
|
sourceSectionIndex: sourceSectionIndex,
|
|
2059
2042
|
sourceVisualizationIndex: sourceVisualizationIndex,
|
|
2060
2043
|
targetSectionIndex: targetSectionIndex,
|
|
2061
2044
|
targetVisualizationIndex: -1
|
|
2062
2045
|
})).then(function () {});
|
|
2063
2046
|
}
|
|
2064
|
-
const
|
|
2047
|
+
const _temp32 = function () {
|
|
2065
2048
|
if (isSourceGroupDefault) {
|
|
2066
2049
|
//remove duplicate apps
|
|
2067
|
-
return Promise.resolve(
|
|
2050
|
+
return Promise.resolve(_this18._removeDuplicateVisualizations(sourceVisualization)).then(function () {});
|
|
2068
2051
|
}
|
|
2069
2052
|
}();
|
|
2070
|
-
return
|
|
2053
|
+
return _temp32 && _temp32.then ? _temp32.then(_temp33) : _temp33(_temp32);
|
|
2071
2054
|
}
|
|
2072
2055
|
}();
|
|
2073
|
-
return
|
|
2056
|
+
return _temp34 && _temp34.then ? _temp34.then(_temp35) : _temp35(_temp34);
|
|
2074
2057
|
}
|
|
2075
2058
|
}();
|
|
2076
|
-
if (
|
|
2059
|
+
if (_temp36 && _temp36.then) return _temp36.then(function () {});
|
|
2077
2060
|
});
|
|
2078
2061
|
} catch (e) {
|
|
2079
2062
|
return Promise.reject(e);
|
|
@@ -2087,17 +2070,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2087
2070
|
*/
|
|
2088
2071
|
_moveAppToDefaultGroup: function _moveAppToDefaultGroup(visualization) {
|
|
2089
2072
|
try {
|
|
2090
|
-
const
|
|
2091
|
-
return Promise.resolve(
|
|
2092
|
-
const
|
|
2073
|
+
const _this19 = this;
|
|
2074
|
+
return Promise.resolve(_this19._addVisualization(visualization)).then(function () {
|
|
2075
|
+
const _temp37 = function () {
|
|
2093
2076
|
if (visualization.persConfig?.sectionId && visualization.visualization?.id) {
|
|
2094
|
-
return Promise.resolve(
|
|
2077
|
+
return Promise.resolve(_this19.appManagerInstance.removeVisualizations({
|
|
2095
2078
|
sectionId: visualization.persConfig?.sectionId,
|
|
2096
2079
|
vizIds: [visualization.visualization?.id]
|
|
2097
2080
|
})).then(function () {});
|
|
2098
2081
|
}
|
|
2099
2082
|
}();
|
|
2100
|
-
if (
|
|
2083
|
+
if (_temp37 && _temp37.then) return _temp37.then(function () {});
|
|
2101
2084
|
});
|
|
2102
2085
|
} catch (e) {
|
|
2103
2086
|
return Promise.reject(e);
|
|
@@ -2111,17 +2094,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2111
2094
|
*/
|
|
2112
2095
|
_removeDuplicateVisualizations: function _removeDuplicateVisualizations(visualization) {
|
|
2113
2096
|
try {
|
|
2114
|
-
const
|
|
2097
|
+
const _this20 = this;
|
|
2115
2098
|
const vizIdsToBeDeleted = visualization?.persConfig?.duplicateApps?.map(oViz => oViz.visualization?.id) || [];
|
|
2116
|
-
const
|
|
2099
|
+
const _temp38 = function () {
|
|
2117
2100
|
if (visualization.persConfig?.sectionId && vizIdsToBeDeleted.length > 0) {
|
|
2118
|
-
return Promise.resolve(
|
|
2101
|
+
return Promise.resolve(_this20.appManagerInstance.removeVisualizations({
|
|
2119
2102
|
sectionId: visualization.persConfig?.sectionId,
|
|
2120
2103
|
vizIds: vizIdsToBeDeleted
|
|
2121
2104
|
})).then(function () {});
|
|
2122
2105
|
}
|
|
2123
2106
|
}();
|
|
2124
|
-
return Promise.resolve(
|
|
2107
|
+
return Promise.resolve(_temp38 && _temp38.then ? _temp38.then(function () {}) : void 0);
|
|
2125
2108
|
} catch (e) {
|
|
2126
2109
|
return Promise.reject(e);
|
|
2127
2110
|
}
|
|
@@ -2164,7 +2147,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2164
2147
|
* @param {sap.ui.base.Event} event - The event object.
|
|
2165
2148
|
*/
|
|
2166
2149
|
_onDeleteGroup: function _onDeleteGroup(event) {
|
|
2167
|
-
const
|
|
2150
|
+
const _this21 = this;
|
|
2168
2151
|
const group = event.getSource()?.getParent(),
|
|
2169
2152
|
message = this._i18nBundle.getText("deleteGroupMessage", [group.getTitle()]),
|
|
2170
2153
|
title = this._i18nBundle.getText("delete"),
|
|
@@ -2177,20 +2160,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2177
2160
|
emphasizedAction: deleteAction,
|
|
2178
2161
|
onClose: function (action) {
|
|
2179
2162
|
try {
|
|
2180
|
-
const
|
|
2163
|
+
const _temp39 = function () {
|
|
2181
2164
|
if (action === deleteAction) {
|
|
2182
|
-
|
|
2183
|
-
return Promise.resolve(
|
|
2184
|
-
MessageToast.show(
|
|
2185
|
-
void
|
|
2186
|
-
|
|
2187
|
-
|
|
2165
|
+
_this21._setBusy(true);
|
|
2166
|
+
return Promise.resolve(_this21._deleteGroup(group.getGroupId())).then(function () {
|
|
2167
|
+
MessageToast.show(_this21._i18nBundle.getText("groupDeleted"));
|
|
2168
|
+
void _this21.refresh();
|
|
2169
|
+
_this21._closeGroupDetailDialog();
|
|
2170
|
+
_this21._setBusy(false);
|
|
2188
2171
|
});
|
|
2189
2172
|
} else if (action === moveAppAction) {
|
|
2190
|
-
void
|
|
2173
|
+
void _this21._ungroupApps(group.getGroupId());
|
|
2191
2174
|
}
|
|
2192
2175
|
}();
|
|
2193
|
-
return Promise.resolve(
|
|
2176
|
+
return Promise.resolve(_temp39 && _temp39.then ? _temp39.then(function () {}) : void 0);
|
|
2194
2177
|
} catch (e) {
|
|
2195
2178
|
return Promise.reject(e);
|
|
2196
2179
|
}
|
|
@@ -2206,40 +2189,40 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2206
2189
|
*/
|
|
2207
2190
|
_ungroupApps: function _ungroupApps(groupId) {
|
|
2208
2191
|
try {
|
|
2209
|
-
const
|
|
2210
|
-
|
|
2211
|
-
const
|
|
2192
|
+
const _this22 = this;
|
|
2193
|
+
_this22._setBusy(true);
|
|
2194
|
+
const _temp42 = _finallyRethrows(function () {
|
|
2212
2195
|
return _catch(function () {
|
|
2213
|
-
return Promise.resolve(
|
|
2214
|
-
return Promise.resolve(
|
|
2196
|
+
return Promise.resolve(_this22.appManagerInstance.getSectionVisualizations(groupId)).then(function (visualizations) {
|
|
2197
|
+
return Promise.resolve(_this22.appManagerInstance._getSections()).then(function (sections) {
|
|
2215
2198
|
const section = sections.find(oSection => oSection.id === groupId);
|
|
2216
|
-
return Promise.resolve(Promise.all(visualizations.map(oViz =>
|
|
2217
|
-
return Promise.resolve(
|
|
2199
|
+
return Promise.resolve(Promise.all(visualizations.map(oViz => _this22._addVisualization(oViz)))).then(function () {
|
|
2200
|
+
return Promise.resolve(_this22.appManagerInstance._getSections(true)).then(function (updatedSections) {
|
|
2218
2201
|
const defaultSection = updatedSections.find(oSection => oSection.default);
|
|
2219
2202
|
//update personalization
|
|
2220
2203
|
//if preset section, then section shouldn't be deleted, instead remove visualizations inside section
|
|
2221
|
-
return Promise.resolve(
|
|
2204
|
+
return Promise.resolve(_this22._updateAppPersonalization(visualizations.map(oViz => {
|
|
2222
2205
|
return {
|
|
2223
2206
|
visualization: oViz,
|
|
2224
2207
|
targetGroupId: defaultSection?.id,
|
|
2225
2208
|
isTargetGroupDefault: true
|
|
2226
2209
|
};
|
|
2227
2210
|
}))).then(function () {
|
|
2228
|
-
function
|
|
2229
|
-
MessageToast.show(
|
|
2230
|
-
return Promise.resolve(
|
|
2211
|
+
function _temp41() {
|
|
2212
|
+
MessageToast.show(_this22._i18nBundle.getText("appsUngrouped") ?? "");
|
|
2213
|
+
return Promise.resolve(_this22.refresh()).then(function () {});
|
|
2231
2214
|
}
|
|
2232
|
-
const
|
|
2215
|
+
const _temp40 = function () {
|
|
2233
2216
|
if (section?.preset) {
|
|
2234
|
-
return Promise.resolve(
|
|
2217
|
+
return Promise.resolve(_this22.appManagerInstance.removeVisualizations({
|
|
2235
2218
|
sectionId: groupId,
|
|
2236
2219
|
vizIds: visualizations.map(oViz => oViz.visualization?.id)
|
|
2237
2220
|
})).then(function () {});
|
|
2238
2221
|
} else {
|
|
2239
|
-
return Promise.resolve(
|
|
2222
|
+
return Promise.resolve(_this22._deleteGroup(groupId)).then(function () {});
|
|
2240
2223
|
}
|
|
2241
2224
|
}();
|
|
2242
|
-
return
|
|
2225
|
+
return _temp40 && _temp40.then ? _temp40.then(_temp41) : _temp41(_temp40);
|
|
2243
2226
|
});
|
|
2244
2227
|
});
|
|
2245
2228
|
});
|
|
@@ -2247,15 +2230,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2247
2230
|
});
|
|
2248
2231
|
}, function (error) {
|
|
2249
2232
|
Log.error(error);
|
|
2250
|
-
MessageToast.show(
|
|
2233
|
+
MessageToast.show(_this22._i18nBundle.getText("unableToUngroupApps") ?? "");
|
|
2251
2234
|
});
|
|
2252
|
-
}, function (_wasThrown4,
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
if (_wasThrown4) throw
|
|
2256
|
-
return
|
|
2235
|
+
}, function (_wasThrown4, _result5) {
|
|
2236
|
+
_this22._setBusy(false);
|
|
2237
|
+
_this22._closeGroupDetailDialog();
|
|
2238
|
+
if (_wasThrown4) throw _result5;
|
|
2239
|
+
return _result5;
|
|
2257
2240
|
});
|
|
2258
|
-
return Promise.resolve(
|
|
2241
|
+
return Promise.resolve(_temp42 && _temp42.then ? _temp42.then(function () {}) : void 0);
|
|
2259
2242
|
} catch (e) {
|
|
2260
2243
|
return Promise.reject(e);
|
|
2261
2244
|
}
|
|
@@ -2269,23 +2252,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2269
2252
|
*/
|
|
2270
2253
|
_showGroupDetailDialog: function _showGroupDetailDialog(groupId, editMode = false) {
|
|
2271
2254
|
try {
|
|
2272
|
-
const
|
|
2273
|
-
const group =
|
|
2255
|
+
const _this23 = this;
|
|
2256
|
+
const group = _this23._getGroup(groupId);
|
|
2274
2257
|
if (!group) {
|
|
2275
2258
|
return Promise.resolve();
|
|
2276
2259
|
}
|
|
2277
|
-
|
|
2278
|
-
const dialog =
|
|
2260
|
+
_this23._selectedGroupId = groupId;
|
|
2261
|
+
const dialog = _this23._generateGroupDetailDialog();
|
|
2279
2262
|
//set group icon
|
|
2280
|
-
const groupIconControl =
|
|
2263
|
+
const groupIconControl = _this23._controlMap.get(`${_this23.getId()}-detailDialog-toolbar-color`);
|
|
2281
2264
|
groupIconControl.setColor(Parameters.get({
|
|
2282
2265
|
name: group.getBgColor()
|
|
2283
2266
|
}));
|
|
2284
2267
|
//set group apps
|
|
2285
|
-
return Promise.resolve(
|
|
2268
|
+
return Promise.resolve(_this23._setGroupDetailDialogApps(groupId)).then(function () {
|
|
2286
2269
|
dialog.open();
|
|
2287
2270
|
//set group title
|
|
2288
|
-
|
|
2271
|
+
_this23._setGroupNameControl(group.getTitle(), editMode);
|
|
2289
2272
|
});
|
|
2290
2273
|
} catch (e) {
|
|
2291
2274
|
return Promise.reject(e);
|
|
@@ -2300,29 +2283,29 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2300
2283
|
*/
|
|
2301
2284
|
_setGroupDetailDialogApps: function _setGroupDetailDialogApps(groupId) {
|
|
2302
2285
|
try {
|
|
2303
|
-
const
|
|
2304
|
-
const group =
|
|
2305
|
-
const
|
|
2286
|
+
const _this24 = this;
|
|
2287
|
+
const group = _this24._getGroup(groupId);
|
|
2288
|
+
const _temp43 = function () {
|
|
2306
2289
|
if (group) {
|
|
2307
|
-
return Promise.resolve(
|
|
2290
|
+
return Promise.resolve(_this24.appManagerInstance.getSectionVisualizations(groupId, false)).then(function (appVisualizations) {
|
|
2308
2291
|
group.destroyAggregation("apps", true);
|
|
2309
2292
|
appVisualizations = appVisualizations.map((appVisualization, index) => {
|
|
2310
2293
|
return {
|
|
2311
2294
|
...appVisualization,
|
|
2312
|
-
menuItems:
|
|
2295
|
+
menuItems: _this24._getAppActions(group, index, appVisualization) //add actions to show in group
|
|
2313
2296
|
};
|
|
2314
2297
|
});
|
|
2315
|
-
const apps =
|
|
2316
|
-
const appsWrapper =
|
|
2317
|
-
|
|
2298
|
+
const apps = _this24.generateApps(appVisualizations);
|
|
2299
|
+
const appsWrapper = _this24._controlMap.get(`${_this24.getId()}-detailDialog-apps`);
|
|
2300
|
+
_this24._setAggregation(group, apps, "apps");
|
|
2318
2301
|
appsWrapper.destroyItems();
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2302
|
+
_this24._setAggregation(appsWrapper, group.getApps().map(app => _this24.getParent()._getAppTile(app)));
|
|
2303
|
+
_this24._applyGroupedAppsPersonalization(groupId);
|
|
2304
|
+
_this24._dispatchAppsLoadedEvent(apps);
|
|
2322
2305
|
});
|
|
2323
2306
|
}
|
|
2324
2307
|
}();
|
|
2325
|
-
return Promise.resolve(
|
|
2308
|
+
return Promise.resolve(_temp43 && _temp43.then ? _temp43.then(function () {}) : void 0);
|
|
2326
2309
|
} catch (e) {
|
|
2327
2310
|
return Promise.reject(e);
|
|
2328
2311
|
}
|
|
@@ -2453,25 +2436,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2453
2436
|
*/
|
|
2454
2437
|
_onGroupEditName: function _onGroupEditName(updatedTitle) {
|
|
2455
2438
|
try {
|
|
2456
|
-
const
|
|
2457
|
-
function
|
|
2458
|
-
|
|
2459
|
-
|
|
2439
|
+
const _this25 = this;
|
|
2440
|
+
function _temp45() {
|
|
2441
|
+
_this25._setGroupNameControl(updatedTitle, false);
|
|
2442
|
+
_this25._setBusy(false);
|
|
2460
2443
|
}
|
|
2461
|
-
|
|
2462
|
-
const groupId =
|
|
2463
|
-
group =
|
|
2444
|
+
_this25._setBusy(true);
|
|
2445
|
+
const groupId = _this25._selectedGroupId,
|
|
2446
|
+
group = _this25._getGroup(groupId),
|
|
2464
2447
|
oldTitle = group?.getTitle();
|
|
2465
|
-
const
|
|
2448
|
+
const _temp44 = function () {
|
|
2466
2449
|
if (updatedTitle && updatedTitle !== oldTitle) {
|
|
2467
|
-
return Promise.resolve(
|
|
2450
|
+
return Promise.resolve(_this25._renameGroup(groupId, updatedTitle)).then(function () {
|
|
2468
2451
|
group?.setProperty("title", updatedTitle, true);
|
|
2469
|
-
void
|
|
2470
|
-
MessageToast.show(
|
|
2452
|
+
void _this25.refresh();
|
|
2453
|
+
MessageToast.show(_this25._i18nBundle.getText("groupNameChanged") || "");
|
|
2471
2454
|
});
|
|
2472
2455
|
}
|
|
2473
2456
|
}();
|
|
2474
|
-
return Promise.resolve(
|
|
2457
|
+
return Promise.resolve(_temp44 && _temp44.then ? _temp44.then(_temp45) : _temp45(_temp44));
|
|
2475
2458
|
} catch (e) {
|
|
2476
2459
|
return Promise.reject(e);
|
|
2477
2460
|
}
|
|
@@ -2489,12 +2472,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2489
2472
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2490
2473
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2491
2474
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2492
|
-
const
|
|
2475
|
+
const _temp46 = function () {
|
|
2493
2476
|
if (groupIndex > -1) {
|
|
2494
2477
|
return Promise.resolve(pagesService.renameSection(pageIndex, groupIndex, updatedTitle)).then(function () {});
|
|
2495
2478
|
}
|
|
2496
2479
|
}();
|
|
2497
|
-
if (
|
|
2480
|
+
if (_temp46 && _temp46.then) return _temp46.then(function () {});
|
|
2498
2481
|
});
|
|
2499
2482
|
} catch (e) {
|
|
2500
2483
|
return Promise.reject(e);
|
|
@@ -2609,11 +2592,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2609
2592
|
*/
|
|
2610
2593
|
_handleAddFromInsights: function _handleAddFromInsights() {
|
|
2611
2594
|
try {
|
|
2612
|
-
const
|
|
2613
|
-
return Promise.resolve(
|
|
2614
|
-
const dialog =
|
|
2615
|
-
|
|
2616
|
-
|
|
2595
|
+
const _this26 = this;
|
|
2596
|
+
return Promise.resolve(_this26._getInsightTilesToAdd()).then(function (appsToAdd) {
|
|
2597
|
+
const dialog = _this26._generateAddFromInsightsDialog();
|
|
2598
|
+
_this26._controlMap.get(`${_this26.getId()}-addFromInsightsDialog-errorMessage`)?.setVisible(appsToAdd.length === 0);
|
|
2599
|
+
_this26._generateInsightListItems(appsToAdd);
|
|
2617
2600
|
dialog.open();
|
|
2618
2601
|
});
|
|
2619
2602
|
} catch (e) {
|
|
@@ -2664,8 +2647,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2664
2647
|
*/
|
|
2665
2648
|
_getInsightTilesToAdd: function _getInsightTilesToAdd() {
|
|
2666
2649
|
try {
|
|
2667
|
-
const
|
|
2668
|
-
return Promise.resolve(Promise.all([
|
|
2650
|
+
const _this27 = this;
|
|
2651
|
+
return Promise.resolve(Promise.all([_this27.appManagerInstance.fetchInsightApps(true, _this27._i18nBundle.getText("insights")), _this27.appManagerInstance.fetchFavVizs(false, true)])).then(function ([insightsApps, favoriteApps]) {
|
|
2669
2652
|
//check force refresh true?
|
|
2670
2653
|
//find the visualizations that are present in insight tile but not in favorite apps
|
|
2671
2654
|
const appsToAdd = insightsApps.reduce((appsToAdd, insightsApp) => {
|
|
@@ -2678,7 +2661,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2678
2661
|
}
|
|
2679
2662
|
return appsToAdd;
|
|
2680
2663
|
}, []);
|
|
2681
|
-
return
|
|
2664
|
+
return _this27.appManagerInstance._filterDuplicateVizs(appsToAdd, false);
|
|
2682
2665
|
});
|
|
2683
2666
|
} catch (e) {
|
|
2684
2667
|
return Promise.reject(e);
|
|
@@ -2710,20 +2693,20 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2710
2693
|
*/
|
|
2711
2694
|
_addFromInsights: function _addFromInsights() {
|
|
2712
2695
|
try {
|
|
2713
|
-
const
|
|
2714
|
-
function
|
|
2715
|
-
|
|
2716
|
-
MessageToast.show(
|
|
2717
|
-
return Promise.resolve(
|
|
2718
|
-
|
|
2696
|
+
const _this28 = this;
|
|
2697
|
+
function _temp48() {
|
|
2698
|
+
_this28._closeAddFromInsightsDialog();
|
|
2699
|
+
MessageToast.show(_this28._i18nBundle.getText(selectedItems.length === 1 ? "addFromInsightTileSuccess" : "addFromInsightTilesSuccess", [selectedItems.length]));
|
|
2700
|
+
return Promise.resolve(_this28.getParent()._refreshAllPanels()).then(function () {
|
|
2701
|
+
_this28._setBusy(false);
|
|
2719
2702
|
});
|
|
2720
2703
|
}
|
|
2721
|
-
|
|
2722
|
-
const selectedItems =
|
|
2723
|
-
const
|
|
2724
|
-
return Promise.resolve(
|
|
2704
|
+
_this28._setBusy(true);
|
|
2705
|
+
const selectedItems = _this28._getSelectedInsights();
|
|
2706
|
+
const _temp47 = _forOf(selectedItems, function (selectedItem) {
|
|
2707
|
+
return Promise.resolve(_this28.appManagerInstance.addVisualization(selectedItem.data("vizId"))).then(function () {});
|
|
2725
2708
|
});
|
|
2726
|
-
return Promise.resolve(
|
|
2709
|
+
return Promise.resolve(_temp47 && _temp47.then ? _temp47.then(_temp48) : _temp48(_temp47));
|
|
2727
2710
|
} catch (e) {
|
|
2728
2711
|
return Promise.reject(e);
|
|
2729
2712
|
}
|
|
@@ -2741,8 +2724,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2741
2724
|
*/
|
|
2742
2725
|
_updateAppPersonalization: function _updateAppPersonalization(updateConfigs) {
|
|
2743
2726
|
try {
|
|
2744
|
-
const
|
|
2745
|
-
return Promise.resolve(
|
|
2727
|
+
const _this29 = this;
|
|
2728
|
+
return Promise.resolve(_this29._getAppPersonalization()).then(function (personalizations) {
|
|
2746
2729
|
for (const updateConfig of updateConfigs) {
|
|
2747
2730
|
const {
|
|
2748
2731
|
visualization
|
|
@@ -2754,13 +2737,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2754
2737
|
const targetGroupId = updateConfig.targetGroupId ?? sourceGroupId;
|
|
2755
2738
|
if (sourceGroupId !== targetGroupId) {
|
|
2756
2739
|
//move app scenario
|
|
2757
|
-
|
|
2740
|
+
_this29._updateMoveAppPersonalization(personalizations, updateConfig);
|
|
2758
2741
|
} else {
|
|
2759
2742
|
//only color is updated
|
|
2760
|
-
|
|
2743
|
+
_this29._updateAppColorPersonalization(personalizations, updateConfig);
|
|
2761
2744
|
}
|
|
2762
2745
|
}
|
|
2763
|
-
return Promise.resolve(
|
|
2746
|
+
return Promise.resolve(_this29.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2764
2747
|
});
|
|
2765
2748
|
} catch (e) {
|
|
2766
2749
|
return Promise.reject(e);
|
|
@@ -2829,9 +2812,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2829
2812
|
*/
|
|
2830
2813
|
_updateGroupPersonalization: function _updateGroupPersonalization(groupId, selectedColor) {
|
|
2831
2814
|
try {
|
|
2832
|
-
const
|
|
2833
|
-
return Promise.resolve(
|
|
2834
|
-
const personalizationIndex =
|
|
2815
|
+
const _this30 = this;
|
|
2816
|
+
return Promise.resolve(_this30._getAppPersonalization()).then(function (personalizations) {
|
|
2817
|
+
const personalizationIndex = _this30._getPersonalizationIndex(personalizations, {
|
|
2835
2818
|
isSection: true,
|
|
2836
2819
|
sectionId: groupId
|
|
2837
2820
|
});
|
|
@@ -2847,7 +2830,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2847
2830
|
} else {
|
|
2848
2831
|
personalizations.push(updatedPersonalization);
|
|
2849
2832
|
}
|
|
2850
|
-
return Promise.resolve(
|
|
2833
|
+
return Promise.resolve(_this30.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2851
2834
|
});
|
|
2852
2835
|
} catch (e) {
|
|
2853
2836
|
return Promise.reject(e);
|
|
@@ -2887,12 +2870,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2887
2870
|
* @param {object} oViz.visualization - The visualization object.
|
|
2888
2871
|
* @param {boolean} [oViz.visualization.isBookmark=false] - Indicates if the visualization is a bookmark.
|
|
2889
2872
|
* @param {string} [oViz.visualization.vizId] - The ID of the visualization if it's not a bookmark.
|
|
2873
|
+
* @param {string} [sSectionId] - The ID of the section (group) to which the visualization should be added.
|
|
2874
|
+
* If not provided, the visualization will be added to the default section.
|
|
2875
|
+
* @param {IMoveConfig} [moveConfig] - Configuration for moving the visualization.
|
|
2890
2876
|
* @returns {Promise<void>} A promise that resolves to void after the visualization is added.
|
|
2891
2877
|
* @private
|
|
2892
2878
|
*/
|
|
2893
|
-
_addVisualization: function _addVisualization(viz, sSectionId) {
|
|
2879
|
+
_addVisualization: function _addVisualization(viz, sSectionId, moveConfig) {
|
|
2894
2880
|
if (viz.visualization) {
|
|
2895
|
-
return viz.visualization.isBookmark ? this.appManagerInstance.addBookMark(viz.visualization) : this.appManagerInstance.addVisualization(viz.visualization.vizId, sSectionId);
|
|
2881
|
+
return viz.visualization.isBookmark ? this.appManagerInstance.addBookMark(viz.visualization, moveConfig) : this.appManagerInstance.addVisualization(viz.visualization.vizId, sSectionId);
|
|
2896
2882
|
}
|
|
2897
2883
|
return Promise.reject(new Error("No visualization provided to add"));
|
|
2898
2884
|
},
|
|
@@ -2904,22 +2890,22 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2904
2890
|
*/
|
|
2905
2891
|
_deleteGroup: function _deleteGroup(groupId) {
|
|
2906
2892
|
try {
|
|
2907
|
-
const
|
|
2893
|
+
const _this31 = this;
|
|
2908
2894
|
return Promise.resolve(Container.getServiceAsync("Pages")).then(function (pagesService) {
|
|
2909
2895
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2910
2896
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
2911
2897
|
groupIndex = groups.findIndex(group => group.id === groupId);
|
|
2912
|
-
const
|
|
2898
|
+
const _temp49 = function () {
|
|
2913
2899
|
if (groupIndex > -1) {
|
|
2914
2900
|
return Promise.resolve(pagesService.deleteSection(pageIndex, groupIndex)).then(function () {
|
|
2915
|
-
void
|
|
2901
|
+
void _this31._deletePersonalization({
|
|
2916
2902
|
sectionId: groupId,
|
|
2917
2903
|
isSection: true
|
|
2918
2904
|
});
|
|
2919
2905
|
});
|
|
2920
2906
|
}
|
|
2921
2907
|
}();
|
|
2922
|
-
if (
|
|
2908
|
+
if (_temp49 && _temp49.then) return _temp49.then(function () {});
|
|
2923
2909
|
});
|
|
2924
2910
|
} catch (e) {
|
|
2925
2911
|
return Promise.reject(e);
|
|
@@ -2938,14 +2924,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2938
2924
|
*/
|
|
2939
2925
|
_deletePersonalization: function _deletePersonalization(personalizationConfig) {
|
|
2940
2926
|
try {
|
|
2941
|
-
const
|
|
2927
|
+
const _this32 = this;
|
|
2942
2928
|
const {
|
|
2943
2929
|
isSection,
|
|
2944
2930
|
sectionId
|
|
2945
2931
|
} = personalizationConfig;
|
|
2946
|
-
return Promise.resolve(
|
|
2932
|
+
return Promise.resolve(_this32._getAppPersonalization()).then(function (personalizations) {
|
|
2947
2933
|
if (!isSection) {
|
|
2948
|
-
const personalizationIndex =
|
|
2934
|
+
const personalizationIndex = _this32._getPersonalizationIndex(personalizations, personalizationConfig);
|
|
2949
2935
|
if (personalizationIndex > -1) {
|
|
2950
2936
|
personalizations.splice(personalizationIndex, 1);
|
|
2951
2937
|
}
|
|
@@ -2953,7 +2939,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2953
2939
|
// Delete personalizations for all associated apps if a group is deleted
|
|
2954
2940
|
personalizations = personalizations.filter(personalization => personalization.sectionId !== sectionId);
|
|
2955
2941
|
}
|
|
2956
|
-
void
|
|
2942
|
+
void _this32.setFavAppsPersonalization(personalizations);
|
|
2957
2943
|
});
|
|
2958
2944
|
} catch (e) {
|
|
2959
2945
|
return Promise.reject(e);
|
|
@@ -2983,33 +2969,33 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2983
2969
|
*/
|
|
2984
2970
|
_handleKeyboardMoveApp: function _handleKeyboardMoveApp(event, appGroupId) {
|
|
2985
2971
|
try {
|
|
2986
|
-
const
|
|
2972
|
+
const _this33 = this;
|
|
2987
2973
|
const currentItem = Element.closestTo(event.target.firstElementChild);
|
|
2988
2974
|
const container = currentItem.getParent();
|
|
2989
|
-
const
|
|
2975
|
+
const _temp51 = function () {
|
|
2990
2976
|
if (event.metaKey || event.ctrlKey) {
|
|
2991
2977
|
// ctrl(windows)/cmd (mac) + x, sets app to be moved to a group, or to create a group
|
|
2992
|
-
if (event.key === "x" && !currentItem.data("groupId") && !
|
|
2978
|
+
if (event.key === "x" && !currentItem.data("groupId") && !_this33._cutApp && !appGroupId) {
|
|
2993
2979
|
currentItem.$().css("opacity", 0.6);
|
|
2994
2980
|
currentItem._oMoreIcon.setEnabled(false);
|
|
2995
|
-
|
|
2981
|
+
_this33._cutApp = currentItem;
|
|
2996
2982
|
}
|
|
2997
|
-
const
|
|
2998
|
-
if (event.key === "v" &&
|
|
2983
|
+
const _temp50 = function () {
|
|
2984
|
+
if (event.key === "v" && _this33._cutApp && !appGroupId) {
|
|
2999
2985
|
const dragDropEvent = new Event("keyboardDragDropEvent", container, {
|
|
3000
|
-
draggedControl:
|
|
2986
|
+
draggedControl: _this33._cutApp,
|
|
3001
2987
|
droppedControl: currentItem,
|
|
3002
2988
|
dropPosition: dnd.RelativeDropPosition.On
|
|
3003
2989
|
});
|
|
3004
|
-
return Promise.resolve(
|
|
3005
|
-
|
|
2990
|
+
return Promise.resolve(_this33._onFavItemDrop(dragDropEvent)).then(function () {
|
|
2991
|
+
_this33._cutApp = undefined;
|
|
3006
2992
|
});
|
|
3007
2993
|
}
|
|
3008
2994
|
}();
|
|
3009
|
-
if (
|
|
2995
|
+
if (_temp50 && _temp50.then) return _temp50.then(function () {});
|
|
3010
2996
|
}
|
|
3011
2997
|
}();
|
|
3012
|
-
return Promise.resolve(
|
|
2998
|
+
return Promise.resolve(_temp51 && _temp51.then ? _temp51.then(function () {}) : void 0);
|
|
3013
2999
|
} catch (e) {
|
|
3014
3000
|
return Promise.reject(e);
|
|
3015
3001
|
}
|