@sapui5/sap.cux.home 1.141.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 +0 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +0 -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 +59 -58
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +39 -33
- 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 +30 -16
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +29 -13
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +2 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +4 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +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/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/CardsPanel.d.ts +7 -0
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +130 -111
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +17 -6
- 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/FavAppPanel.d.ts +0 -10
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +258 -313
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +7 -56
- 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/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 +90 -57
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +50 -22
- 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 +1 -1
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +2 -6
- 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/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +11 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +11 -0
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.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 +12 -6
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +1 -1
- 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/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/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/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) {
|
|
@@ -204,7 +204,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
204
204
|
const recycleId = ___utils_DataFormatUtils["recycleId"];
|
|
205
205
|
const DeviceType = ___utils_Device["DeviceType"];
|
|
206
206
|
const addFESRId = ___utils_FESRUtil["addFESRId"];
|
|
207
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
207
208
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
209
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
208
210
|
const sortMenuItems = ___utils_InsightsUtils["sortMenuItems"];
|
|
209
211
|
const _showAddApps = () => {
|
|
210
212
|
return Config.last("/core/shell/enablePersonalization") || Config.last("/core/catalog/enabled");
|
|
@@ -308,15 +310,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
308
310
|
};
|
|
309
311
|
},
|
|
310
312
|
init: function _init() {
|
|
311
|
-
const _this = this
|
|
312
|
-
_this2 = this;
|
|
313
|
+
const _this = this;
|
|
313
314
|
BaseAppPersPanel.prototype.init.call(this);
|
|
314
315
|
//Configure Header
|
|
315
316
|
this.setProperty("key", "favApps");
|
|
316
317
|
this.setProperty("title", this._i18nBundle.getText("favoritesTab"));
|
|
317
318
|
this.setProperty("tooltip", this._i18nBundle.getText("favAppsInfo"));
|
|
318
319
|
//Setup Action Buttons
|
|
319
|
-
|
|
320
|
+
this._createActionButtons();
|
|
320
321
|
//Setup Menu Items
|
|
321
322
|
this._createHeaderMenuItems();
|
|
322
323
|
//add drag and drop config
|
|
@@ -338,13 +339,6 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
338
339
|
return Promise.reject(e);
|
|
339
340
|
}
|
|
340
341
|
}, this);
|
|
341
|
-
this.oEventBus.subscribe("importChannel", "resetImported", function () {
|
|
342
|
-
try {
|
|
343
|
-
return Promise.resolve(_this2.setImportButtonVisibility(true)).then(function () {});
|
|
344
|
-
} catch (e) {
|
|
345
|
-
return Promise.reject(e);
|
|
346
|
-
}
|
|
347
|
-
}, this);
|
|
348
342
|
this.attachPersistDialog(() => {
|
|
349
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.
|
|
350
344
|
if (this._selectedGroupId) {
|
|
@@ -353,6 +347,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
353
347
|
});
|
|
354
348
|
document.addEventListener("click", event => this._resetCutElement(event));
|
|
355
349
|
document.addEventListener("keydown", event => this._resetCutElement(event));
|
|
350
|
+
this.additionalInfo = {
|
|
351
|
+
fesrSource: FESRNavigationSource.Favorite
|
|
352
|
+
};
|
|
356
353
|
},
|
|
357
354
|
_importdone: function _importdone() {
|
|
358
355
|
const stateData = {
|
|
@@ -366,16 +363,16 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
366
363
|
*/
|
|
367
364
|
addAppsAndSections: function _addAppsAndSections(sections, importedPersonalizations) {
|
|
368
365
|
try {
|
|
369
|
-
const
|
|
366
|
+
const _this2 = this;
|
|
370
367
|
let aPromise = [];
|
|
371
|
-
return Promise.resolve(
|
|
368
|
+
return Promise.resolve(_this2._getAppPersonalization()).then(function (aPersonalization) {
|
|
372
369
|
function _temp5() {
|
|
373
370
|
//update personalization
|
|
374
|
-
return Promise.resolve(
|
|
371
|
+
return Promise.resolve(_this2.setFavAppsPersonalization(aPersonalization)).then(function () {
|
|
375
372
|
return aPromise.reduce((chain, current) => {
|
|
376
373
|
return chain.then(() => current());
|
|
377
374
|
}, Promise.resolve()).then(() => {
|
|
378
|
-
return
|
|
375
|
+
return _this2.updateDefaultSectionPersonalization(aPersonalization);
|
|
379
376
|
});
|
|
380
377
|
});
|
|
381
378
|
}
|
|
@@ -384,25 +381,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
384
381
|
const _temp3 = function () {
|
|
385
382
|
if (sectionViz?.length) {
|
|
386
383
|
function _temp2() {
|
|
387
|
-
const filteredPersonalizations =
|
|
384
|
+
const filteredPersonalizations = _this2.filterPersonalizations(importedPersonalizations, section);
|
|
388
385
|
aPersonalization = aPersonalization.concat(filteredPersonalizations);
|
|
389
386
|
}
|
|
390
387
|
const _temp = function () {
|
|
391
388
|
if (section.default || section.id === MYAPPS_SECTION_ID) {
|
|
392
389
|
aPromise.push(() => {
|
|
393
|
-
return section.default ?
|
|
390
|
+
return section.default ? _this2.addSectionViz(sectionViz) : _this2.addSectionViz(sectionViz, MYAPPS_SECTION_ID);
|
|
394
391
|
});
|
|
395
392
|
} else {
|
|
396
|
-
return Promise.resolve(
|
|
393
|
+
return Promise.resolve(_this2.appManagerInstance._getSections(true)).then(function (sections) {
|
|
397
394
|
// If Section exists, add visualization to existing section else create a new section with same sectionId
|
|
398
395
|
const sectionIndex = sections.findIndex(n => n.id === section.id);
|
|
399
396
|
if (sectionIndex > -1) {
|
|
400
397
|
aPromise.push(() => {
|
|
401
|
-
return
|
|
398
|
+
return _this2.addSectionViz(sectionViz, section.id);
|
|
402
399
|
});
|
|
403
400
|
} else {
|
|
404
401
|
aPromise.push(() => {
|
|
405
|
-
return
|
|
402
|
+
return _this2.appManagerInstance.addSection({
|
|
406
403
|
sectionIndex: sections.length,
|
|
407
404
|
sectionProperties: {
|
|
408
405
|
id: section.id,
|
|
@@ -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
|
});
|
|
@@ -491,19 +488,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
491
488
|
*/
|
|
492
489
|
addSectionViz: function _addSectionViz(sectionsViz, sSectionId) {
|
|
493
490
|
try {
|
|
494
|
-
const
|
|
491
|
+
const _this4 = this;
|
|
495
492
|
return Promise.resolve(sectionsViz.reduce((promiseChain, oViz) => {
|
|
496
493
|
return promiseChain.then(function () {
|
|
497
494
|
try {
|
|
498
495
|
let _exit = false;
|
|
499
496
|
function _temp7(_result) {
|
|
500
|
-
return _exit ? _result :
|
|
497
|
+
return _exit ? _result : _this4._addVisualization({
|
|
501
498
|
visualization: oViz
|
|
502
499
|
}, sSectionId);
|
|
503
500
|
}
|
|
504
501
|
const _temp6 = function () {
|
|
505
502
|
if (oViz.isBookmark && sSectionId) {
|
|
506
|
-
return Promise.resolve(
|
|
503
|
+
return Promise.resolve(_this4.appManagerInstance._getSections()).then(function (sections) {
|
|
507
504
|
const defaultSection = sections.find(section => section.default);
|
|
508
505
|
const targetSection = sections.find(section => section.id === sSectionId);
|
|
509
506
|
if (defaultSection && targetSection) {
|
|
@@ -513,11 +510,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
513
510
|
targetSectionIndex: sections.indexOf(targetSection),
|
|
514
511
|
targetVisualizationIndex: targetSection.visualizations.length
|
|
515
512
|
};
|
|
516
|
-
const
|
|
513
|
+
const _this4$_addVisualizat = _this4._addVisualization({
|
|
517
514
|
visualization: oViz
|
|
518
515
|
}, sSectionId, moveConfig);
|
|
519
516
|
_exit = true;
|
|
520
|
-
return
|
|
517
|
+
return _this4$_addVisualizat;
|
|
521
518
|
}
|
|
522
519
|
});
|
|
523
520
|
}
|
|
@@ -539,45 +536,45 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
539
536
|
*/
|
|
540
537
|
loadApps: function _loadApps() {
|
|
541
538
|
try {
|
|
542
|
-
const
|
|
543
|
-
return Promise.resolve(
|
|
539
|
+
const _this5 = this;
|
|
540
|
+
return Promise.resolve(_this5.appManagerInstance.fetchFavVizs(true, false)).then(function (favoriteVisualizations) {
|
|
544
541
|
function _temp9() {
|
|
545
542
|
if (checkPanelExists(container, insightsConatinerlName, tilesPanelName)) {
|
|
546
|
-
|
|
543
|
+
_this5._createAddFromInsTilesMenuItem(favouritesMenuItems.ADD_FROM_INSIGHTS);
|
|
547
544
|
}
|
|
548
545
|
//updating header once the visibility for createGrp menu item is set according to the no. of apps
|
|
549
546
|
container._updateContainerHeader(container);
|
|
550
547
|
}
|
|
551
|
-
const isPhone =
|
|
548
|
+
const isPhone = _this5.getDeviceType() === DeviceType.Mobile;
|
|
552
549
|
//Create groups
|
|
553
|
-
|
|
550
|
+
_this5.destroyAggregation("groups", true);
|
|
554
551
|
const groupVisualizations = favoriteVisualizations.filter(visualization => visualization.isSection).map(groupVisualization => {
|
|
555
552
|
return {
|
|
556
553
|
...groupVisualization,
|
|
557
|
-
menuItems:
|
|
554
|
+
menuItems: _this5._getGroupActions(groupVisualization)
|
|
558
555
|
};
|
|
559
556
|
});
|
|
560
|
-
const groups =
|
|
561
|
-
|
|
557
|
+
const groups = _this5._generateGroups(groupVisualizations);
|
|
558
|
+
_this5._setGroups(groups);
|
|
562
559
|
|
|
563
560
|
//Create apps
|
|
564
|
-
|
|
561
|
+
_this5.destroyAggregation("apps", true);
|
|
565
562
|
const appVisualizations = favoriteVisualizations.filter(visualization => !visualization.isSection).map((appVisualization, index) => {
|
|
566
563
|
return {
|
|
567
564
|
...appVisualization,
|
|
568
|
-
menuItems:
|
|
565
|
+
menuItems: _this5._getAppActions(undefined, index, appVisualization)
|
|
569
566
|
};
|
|
570
567
|
});
|
|
571
|
-
const apps =
|
|
572
|
-
|
|
573
|
-
if (
|
|
574
|
-
void
|
|
568
|
+
const apps = _this5.generateApps(appVisualizations);
|
|
569
|
+
_this5.setApps(apps);
|
|
570
|
+
if (_this5._selectedGroupId) {
|
|
571
|
+
void _this5._setGroupDetailDialogApps(_this5._selectedGroupId);
|
|
575
572
|
}
|
|
576
|
-
const container =
|
|
577
|
-
container.toggleMenuListItem(
|
|
573
|
+
const container = _this5.getParent();
|
|
574
|
+
container.toggleMenuListItem(_this5._createGroupMenuItem, _this5.getApps().length > 0);
|
|
578
575
|
const _temp8 = function () {
|
|
579
576
|
if (!isPhone) {
|
|
580
|
-
return Promise.resolve(
|
|
577
|
+
return Promise.resolve(_this5._switchToRecommendedIfNoFavApps(apps, groups)).then(function () {});
|
|
581
578
|
}
|
|
582
579
|
}();
|
|
583
580
|
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
@@ -596,15 +593,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
596
593
|
*/
|
|
597
594
|
_switchToRecommendedIfNoFavApps: function _switchToRecommendedIfNoFavApps(apps, groups) {
|
|
598
595
|
try {
|
|
599
|
-
const
|
|
596
|
+
const _this6 = this;
|
|
600
597
|
function _temp1() {
|
|
601
|
-
|
|
598
|
+
_this6._isInitialLoad = false;
|
|
602
599
|
}
|
|
603
|
-
const container =
|
|
600
|
+
const container = _this6.getParent();
|
|
604
601
|
const panels = container.getContent();
|
|
605
602
|
const recommendedPanel = panels ? panels.find(panel => panel instanceof RecommendedAppPanel) : null;
|
|
606
603
|
const _temp0 = function () {
|
|
607
|
-
if (
|
|
604
|
+
if (_this6._isInitialLoad && [...apps, ...groups].length === 0 && recommendedPanel?.isSupported()) {
|
|
608
605
|
container.setProperty?.("selectedKey", "recommendedApps");
|
|
609
606
|
return Promise.resolve(container.refreshPanel(recommendedPanel)).then(function () {});
|
|
610
607
|
}
|
|
@@ -790,57 +787,24 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
790
787
|
* @private
|
|
791
788
|
*/
|
|
792
789
|
_createActionButtons: function _createActionButtons() {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
if (
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
addFESRId(addAppsBtn, "addAppsBtn");
|
|
807
|
-
_this8._actionButtons.push(addAppsBtn);
|
|
808
|
-
}
|
|
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);
|
|
809
803
|
}
|
|
810
|
-
_this8._actionButtons.forEach(actionButton => {
|
|
811
|
-
_this8.addAggregation("actionButtons", actionButton);
|
|
812
|
-
});
|
|
813
|
-
return Promise.resolve(_this8._validateAppsMigration()).then(function (isImportEnabled) {
|
|
814
|
-
if (isImportEnabled) {
|
|
815
|
-
_this8._createImportButton();
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
|
-
} catch (e) {
|
|
819
|
-
return Promise.reject(e);
|
|
820
|
-
}
|
|
821
|
-
},
|
|
822
|
-
_createImportButton: function _createImportButton() {
|
|
823
|
-
if (!this._importButton) {
|
|
824
|
-
this._importButton = new Button(`${this.getId()}-importAppsBtn`, {
|
|
825
|
-
tooltip: this._i18nBundle.getText("importAppsNow"),
|
|
826
|
-
text: this._i18nBundle.getText("importAppsNow"),
|
|
827
|
-
press: this._openImportAppsDialog.bind(this)
|
|
828
|
-
});
|
|
829
|
-
addFESRId(this._importButton, "importAppsDialog");
|
|
830
|
-
this._actionButtons.push(this._importButton);
|
|
831
|
-
this.insertAggregation("actionButtons", this._importButton, 0);
|
|
832
|
-
}
|
|
833
|
-
return this._importButton;
|
|
834
|
-
},
|
|
835
|
-
setImportButtonVisibility: function _setImportButtonVisibility(bVisible) {
|
|
836
|
-
try {
|
|
837
|
-
const _this9 = this;
|
|
838
|
-
return Promise.resolve(MyHomeImport.setImportEnabled(bVisible)).then(function () {
|
|
839
|
-
_this9._createImportButton().setVisible(bVisible);
|
|
840
|
-
});
|
|
841
|
-
} catch (e) {
|
|
842
|
-
return Promise.reject(e);
|
|
843
804
|
}
|
|
805
|
+
this._actionButtons.forEach(actionButton => {
|
|
806
|
+
this.addAggregation("actionButtons", actionButton);
|
|
807
|
+
});
|
|
844
808
|
},
|
|
845
809
|
/**
|
|
846
810
|
* Creates menu items for panel header.
|
|
@@ -883,15 +847,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
883
847
|
*/
|
|
884
848
|
_getDragDropInfo: function _getDragDropInfo(event, appGroupId) {
|
|
885
849
|
try {
|
|
886
|
-
const
|
|
850
|
+
const _this7 = this;
|
|
887
851
|
const dragTile = event.getParameter?.("draggedControl"),
|
|
888
852
|
dropTile = event.getParameter?.("droppedControl"),
|
|
889
853
|
dropPosition = event.getParameter?.("dropPosition"),
|
|
890
854
|
dropControl = dragTile.getParent(),
|
|
891
855
|
dragItemIndex = dropControl.indexOfItem(dragTile),
|
|
892
856
|
dropItemIndex = dropControl.indexOfItem(dropTile),
|
|
893
|
-
dragItem =
|
|
894
|
-
dropItem =
|
|
857
|
+
dragItem = _this7._getTileItem(dragTile, appGroupId),
|
|
858
|
+
dropItem = _this7._getTileItem(dropTile, appGroupId);
|
|
895
859
|
const dragDropInfo = {
|
|
896
860
|
dragItem: dragItem,
|
|
897
861
|
dropItem: dropItem,
|
|
@@ -905,11 +869,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
905
869
|
if (dragItemIndex !== dropItemIndex) {
|
|
906
870
|
const _temp11 = function () {
|
|
907
871
|
if (!(dragItem instanceof Group) && !(dropItem instanceof Group)) {
|
|
908
|
-
return Promise.resolve(
|
|
872
|
+
return Promise.resolve(_this7._adjustAppDragDropInfo(dragDropInfo, appGroupId)).then(function () {});
|
|
909
873
|
} else {
|
|
910
874
|
const _temp10 = function () {
|
|
911
875
|
if (dragItem instanceof Group) {
|
|
912
|
-
return Promise.resolve(
|
|
876
|
+
return Promise.resolve(_this7._adjustGroupDragDropInfo(dragDropInfo)).then(function () {});
|
|
913
877
|
}
|
|
914
878
|
}();
|
|
915
879
|
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
@@ -933,11 +897,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
933
897
|
*/
|
|
934
898
|
_adjustAppDragDropInfo: function _adjustAppDragDropInfo(dragDropInfo, appGroupId) {
|
|
935
899
|
try {
|
|
936
|
-
const
|
|
900
|
+
const _this8 = this;
|
|
937
901
|
let isUpdated = false;
|
|
938
902
|
const dragApp = dragDropInfo.dragItem;
|
|
939
903
|
const dropApp = dragDropInfo.dropItem;
|
|
940
|
-
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]) {
|
|
941
905
|
if (dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before) {
|
|
942
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
|
|
943
907
|
if (dragDropInfo.dragItemIndex === dragDropInfo.dropItemIndex - 1) {
|
|
@@ -958,7 +922,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
958
922
|
}
|
|
959
923
|
if (isUpdated) {
|
|
960
924
|
const tile = dragDropInfo.dropControl.getItems()[dragDropInfo.dropItemIndex];
|
|
961
|
-
const app =
|
|
925
|
+
const app = _this8._getTileItem(tile, appGroupId);
|
|
962
926
|
if (app) {
|
|
963
927
|
dragDropInfo.dropItem = app;
|
|
964
928
|
}
|
|
@@ -987,14 +951,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
987
951
|
*/
|
|
988
952
|
_adjustGroupDragDropInfo: function _adjustGroupDragDropInfo(dragDropInfo) {
|
|
989
953
|
try {
|
|
990
|
-
const
|
|
991
|
-
return Promise.resolve(
|
|
954
|
+
const _this9 = this;
|
|
955
|
+
return Promise.resolve(_this9.appManagerInstance._getSections()).then(function (sections) {
|
|
992
956
|
let dropGroupIndex;
|
|
993
957
|
dragDropInfo.dragItemIndex = sections.findIndex(section => section.id === dragDropInfo.dragItem.getGroupId());
|
|
994
958
|
|
|
995
959
|
//If dropped app is the first ungrouped app, put the group at the end
|
|
996
960
|
if (!(dragDropInfo.dropItem instanceof Group)) {
|
|
997
|
-
const lastGroupIndex =
|
|
961
|
+
const lastGroupIndex = _this9.getAggregation("groups").length;
|
|
998
962
|
dragDropInfo.dropItemIndex = dragDropInfo.dropPosition === dnd.RelativeDropPosition.Before && dragDropInfo.dropItemIndex === lastGroupIndex && dragDropInfo.dragItemIndex !== lastGroupIndex ? lastGroupIndex + 1 : dragDropInfo.dragItemIndex;
|
|
999
963
|
} else {
|
|
1000
964
|
dropGroupIndex = sections.findIndex(section => section.id === dragDropInfo.dropItem.getGroupId());
|
|
@@ -1021,9 +985,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1021
985
|
*/
|
|
1022
986
|
_onFavItemDrop: function _onFavItemDrop(event, appGroupId) {
|
|
1023
987
|
try {
|
|
1024
|
-
const
|
|
988
|
+
const _this0 = this;
|
|
1025
989
|
const dragTile = event.getParameter?.("draggedControl");
|
|
1026
|
-
return Promise.resolve(
|
|
990
|
+
return Promise.resolve(_this0._getDragDropInfo(event, appGroupId)).then(function (dragDropInfo) {
|
|
1027
991
|
function _temp15() {
|
|
1028
992
|
dragTile.removeStyleClass("sapMGTPressActive");
|
|
1029
993
|
}
|
|
@@ -1037,19 +1001,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1037
1001
|
if (dragItemIndex === dropItemIndex) return;
|
|
1038
1002
|
const _temp14 = function () {
|
|
1039
1003
|
if (dropPosition === dnd.RelativeDropPosition.On) {
|
|
1040
|
-
return Promise.resolve(
|
|
1041
|
-
void
|
|
1004
|
+
return Promise.resolve(_this0._handleOnItemDrop(dragItem, dropItem)).then(function () {
|
|
1005
|
+
void _this0.refresh();
|
|
1042
1006
|
});
|
|
1043
1007
|
} else {
|
|
1044
1008
|
const _temp13 = function () {
|
|
1045
1009
|
if (dropPosition === dnd.RelativeDropPosition.After || dropPosition === dnd.RelativeDropPosition.Before) {
|
|
1046
|
-
|
|
1047
|
-
return Promise.resolve(
|
|
1048
|
-
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 () {
|
|
1049
1013
|
if (appGroupId) {
|
|
1050
|
-
void
|
|
1014
|
+
void _this0._setGroupDetailDialogApps(appGroupId);
|
|
1051
1015
|
}
|
|
1052
|
-
|
|
1016
|
+
_this0._setBusy(false);
|
|
1053
1017
|
});
|
|
1054
1018
|
});
|
|
1055
1019
|
}
|
|
@@ -1074,21 +1038,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1074
1038
|
*/
|
|
1075
1039
|
_handleOnItemDrop: function _handleOnItemDrop(dragItem, dropItem) {
|
|
1076
1040
|
try {
|
|
1077
|
-
const
|
|
1041
|
+
const _this1 = this;
|
|
1078
1042
|
if (dragItem instanceof Group) return Promise.resolve();
|
|
1079
1043
|
const _temp16 = function () {
|
|
1080
1044
|
if (!(dropItem instanceof Group)) {
|
|
1081
1045
|
//if both dragged and dropped items are apps, create group dialog is opened.
|
|
1082
1046
|
const dragApp = dragItem;
|
|
1083
1047
|
const dropApp = dropItem;
|
|
1084
|
-
|
|
1085
|
-
|
|
1048
|
+
_this1._selectedApps = [dragApp, dropApp];
|
|
1049
|
+
_this1._openCreateGroupDialog(true);
|
|
1086
1050
|
} else {
|
|
1087
1051
|
//if dragged item is an app and dropped item is a group, app should be moved into that group.
|
|
1088
1052
|
const targetGroupId = dropItem.getGroupId();
|
|
1089
|
-
|
|
1090
|
-
return Promise.resolve(
|
|
1091
|
-
|
|
1053
|
+
_this1._setBusy(true);
|
|
1054
|
+
return Promise.resolve(_this1._handleMoveToGroup(dragItem, undefined, targetGroupId)).then(function () {
|
|
1055
|
+
_this1._setBusy(false);
|
|
1092
1056
|
});
|
|
1093
1057
|
}
|
|
1094
1058
|
}();
|
|
@@ -1105,7 +1069,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1105
1069
|
*/
|
|
1106
1070
|
_handleItemsReorder: function _handleItemsReorder(dragDropInfo, appGroupId) {
|
|
1107
1071
|
try {
|
|
1108
|
-
const
|
|
1072
|
+
const _this10 = this;
|
|
1109
1073
|
const {
|
|
1110
1074
|
dragItem,
|
|
1111
1075
|
dropItem,
|
|
@@ -1118,8 +1082,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1118
1082
|
if (!isDragItemGroup && !isDropItemGroup) {
|
|
1119
1083
|
const drapApp = dragItem;
|
|
1120
1084
|
const dropApp = dropItem;
|
|
1121
|
-
return Promise.resolve(Promise.all([
|
|
1122
|
-
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({
|
|
1123
1087
|
sourceSectionIndex: dragVisualization?.persConfig?.sectionIndex,
|
|
1124
1088
|
sourceVisualizationIndex: dragVisualization?.persConfig?.visualizationIndex,
|
|
1125
1089
|
targetSectionIndex: dropVisualization?.persConfig?.sectionIndex,
|
|
@@ -1129,7 +1093,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1129
1093
|
} else {
|
|
1130
1094
|
const _temp17 = function () {
|
|
1131
1095
|
if (isDragItemGroup && isDropItemGroup) {
|
|
1132
|
-
return Promise.resolve(
|
|
1096
|
+
return Promise.resolve(_this10.appManagerInstance.moveSection(dragItemIndex, dropItemIndex)).then(function () {});
|
|
1133
1097
|
}
|
|
1134
1098
|
}();
|
|
1135
1099
|
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
|
@@ -1159,33 +1123,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1159
1123
|
target: {
|
|
1160
1124
|
shellHash: `Shell-appfinder?&/catalog/${JSON.stringify(navigationObject)}`
|
|
1161
1125
|
}
|
|
1162
|
-
})).then(function () {
|
|
1126
|
+
})).then(function () {
|
|
1127
|
+
addFESRNavigationSource(FESRNavigationSource.AppFinder);
|
|
1128
|
+
});
|
|
1163
1129
|
});
|
|
1164
1130
|
} catch (e) {
|
|
1165
1131
|
return Promise.reject(e);
|
|
1166
1132
|
}
|
|
1167
1133
|
},
|
|
1168
|
-
/**
|
|
1169
|
-
* Validates if import apps is enabled
|
|
1170
|
-
*
|
|
1171
|
-
*@returns {Promise} - resolves to boolean value (import is enabled/disabled)
|
|
1172
|
-
*/
|
|
1173
|
-
_validateAppsMigration: function _validateAppsMigration() {
|
|
1174
|
-
try {
|
|
1175
|
-
return Promise.resolve(_catch(function () {
|
|
1176
|
-
return Promise.resolve(MyHomeImport.isImportEnabled());
|
|
1177
|
-
}, function (error) {
|
|
1178
|
-
Log.warning(error instanceof Error ? error.message : "Error while checking if import apps is enabled");
|
|
1179
|
-
return false;
|
|
1180
|
-
}));
|
|
1181
|
-
} catch (e) {
|
|
1182
|
-
return Promise.reject(e);
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
|
-
_openImportAppsDialog: function _openImportAppsDialog() {
|
|
1186
|
-
const pageRuntime = new PageRuntime();
|
|
1187
|
-
pageRuntime.onImportDialogPress();
|
|
1188
|
-
},
|
|
1189
1134
|
/**
|
|
1190
1135
|
* Opens the create group dialog.
|
|
1191
1136
|
* @private
|
|
@@ -1559,43 +1504,43 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1559
1504
|
*/
|
|
1560
1505
|
_onPressGroupCreate: function _onPressGroupCreate() {
|
|
1561
1506
|
try {
|
|
1562
|
-
const
|
|
1563
|
-
const groupNameInput =
|
|
1507
|
+
const _this11 = this;
|
|
1508
|
+
const groupNameInput = _this11._controlMap.get(`${_this11.getId()}-createGroupDialog-mainPage-form-groupName-input`);
|
|
1564
1509
|
const _temp21 = function () {
|
|
1565
|
-
if (
|
|
1510
|
+
if (_this11._validateGroupName()) {
|
|
1566
1511
|
const _temp20 = function () {
|
|
1567
|
-
if (
|
|
1568
|
-
|
|
1512
|
+
if (_this11._selectedApps?.length) {
|
|
1513
|
+
_this11._setBusy(true);
|
|
1569
1514
|
const _temp19 = _finallyRethrows(function () {
|
|
1570
1515
|
return _catch(function () {
|
|
1571
|
-
return Promise.resolve(
|
|
1572
|
-
selectedApps:
|
|
1516
|
+
return Promise.resolve(_this11._createGroup({
|
|
1517
|
+
selectedApps: _this11._selectedApps,
|
|
1573
1518
|
groupName: groupNameInput.getValue(),
|
|
1574
|
-
groupColor:
|
|
1519
|
+
groupColor: _this11._getGroupColor()
|
|
1575
1520
|
})).then(function () {
|
|
1576
|
-
return Promise.resolve(
|
|
1521
|
+
return Promise.resolve(_this11.refresh()).then(function () {
|
|
1577
1522
|
// Show toast message after successful group creation
|
|
1578
|
-
MessageToast.show(
|
|
1579
|
-
of:
|
|
1523
|
+
MessageToast.show(_this11._i18nBundle.getText("newGroupCreated"), {
|
|
1524
|
+
of: _this11._controlMap.get(`${_this11.getId()}-createGroupDialog`),
|
|
1580
1525
|
offset: "0 80"
|
|
1581
1526
|
});
|
|
1582
|
-
const groups =
|
|
1583
|
-
void
|
|
1527
|
+
const groups = _this11.getAggregation("groups") || [];
|
|
1528
|
+
void _this11._showGroupDetailDialog(groups[0]?.getGroupId());
|
|
1584
1529
|
});
|
|
1585
1530
|
});
|
|
1586
1531
|
}, function (err) {
|
|
1587
1532
|
Log.error(err);
|
|
1588
|
-
MessageToast.show(
|
|
1533
|
+
MessageToast.show(_this11._i18nBundle.getText("unableToCreateGroup"));
|
|
1589
1534
|
});
|
|
1590
1535
|
}, function (_wasThrown, _result2) {
|
|
1591
|
-
|
|
1592
|
-
|
|
1536
|
+
_this11._setBusy(false);
|
|
1537
|
+
_this11._closeCreateGroupDialog();
|
|
1593
1538
|
if (_wasThrown) throw _result2;
|
|
1594
1539
|
return _result2;
|
|
1595
1540
|
});
|
|
1596
1541
|
if (_temp19 && _temp19.then) return _temp19.then(function () {});
|
|
1597
1542
|
} else {
|
|
1598
|
-
|
|
1543
|
+
_this11._setNoAppsSelectedError(true);
|
|
1599
1544
|
}
|
|
1600
1545
|
}();
|
|
1601
1546
|
if (_temp20 && _temp20.then) return _temp20.then(function () {});
|
|
@@ -1616,13 +1561,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1616
1561
|
*/
|
|
1617
1562
|
_createGroup: function _createGroup(params) {
|
|
1618
1563
|
try {
|
|
1619
|
-
const
|
|
1564
|
+
const _this12 = this;
|
|
1620
1565
|
const {
|
|
1621
1566
|
selectedApps,
|
|
1622
1567
|
groupName,
|
|
1623
1568
|
groupColor
|
|
1624
1569
|
} = params;
|
|
1625
|
-
return Promise.resolve(
|
|
1570
|
+
return Promise.resolve(_this12.appManagerInstance.getSectionVisualizations()).then(function (sectionVisualizations) {
|
|
1626
1571
|
const visualizations = selectedApps.reduce((selectedVisualizations, oApp) => {
|
|
1627
1572
|
const sectionVisualization = sectionVisualizations.find(oSectionViz => oSectionViz.url === oApp.getUrl());
|
|
1628
1573
|
if (sectionVisualization) {
|
|
@@ -1631,10 +1576,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1631
1576
|
return selectedVisualizations;
|
|
1632
1577
|
}, []);
|
|
1633
1578
|
const sectionId = visualizations[0].persConfig.sectionId;
|
|
1634
|
-
return Promise.resolve(
|
|
1579
|
+
return Promise.resolve(_this12.appManagerInstance.addSection({
|
|
1635
1580
|
sectionIndex: 1,
|
|
1636
1581
|
sectionProperties: {
|
|
1637
|
-
title: groupName ||
|
|
1582
|
+
title: groupName || _this12._i18nBundle.getText("newGroup"),
|
|
1638
1583
|
visible: true,
|
|
1639
1584
|
visualizations: visualizations.map(viz => viz.visualization)
|
|
1640
1585
|
}
|
|
@@ -1646,21 +1591,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1646
1591
|
}
|
|
1647
1592
|
return visualizationsToBeDeleted;
|
|
1648
1593
|
}, []);
|
|
1649
|
-
return Promise.resolve(
|
|
1594
|
+
return Promise.resolve(_this12.appManagerInstance.removeVisualizations({
|
|
1650
1595
|
sectionId,
|
|
1651
1596
|
vizIds: visualizationsToBeDeleted
|
|
1652
1597
|
})).then(function () {
|
|
1653
|
-
return Promise.resolve(
|
|
1598
|
+
return Promise.resolve(_this12.appManagerInstance._getSections(true)).then(function (sections) {
|
|
1654
1599
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
1655
1600
|
const targetGroupId = sections[defaultSection ? 1 : 0]?.id;
|
|
1656
1601
|
//update personalization
|
|
1657
|
-
return Promise.resolve(
|
|
1602
|
+
return Promise.resolve(_this12._updateAppPersonalization(visualizations.map(oViz => {
|
|
1658
1603
|
return {
|
|
1659
1604
|
visualization: oViz,
|
|
1660
1605
|
targetGroupId
|
|
1661
1606
|
};
|
|
1662
1607
|
}))).then(function () {
|
|
1663
|
-
return Promise.resolve(
|
|
1608
|
+
return Promise.resolve(_this12._updateGroupPersonalization(targetGroupId, groupColor)).then(function () {});
|
|
1664
1609
|
});
|
|
1665
1610
|
});
|
|
1666
1611
|
});
|
|
@@ -1720,25 +1665,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1720
1665
|
*/
|
|
1721
1666
|
_handleColorSelect: function _handleColorSelect(item, color) {
|
|
1722
1667
|
try {
|
|
1723
|
-
const
|
|
1668
|
+
const _this13 = this;
|
|
1724
1669
|
function _temp23() {
|
|
1725
|
-
|
|
1670
|
+
_this13.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1726
1671
|
item,
|
|
1727
1672
|
color
|
|
1728
1673
|
});
|
|
1729
1674
|
}
|
|
1730
|
-
const selectedColor =
|
|
1675
|
+
const selectedColor = _this13._getLegendColor(color).key;
|
|
1731
1676
|
item.setProperty("bgColor", selectedColor, true);
|
|
1732
1677
|
const groupId = item instanceof Group ? item.getGroupId() : null;
|
|
1733
1678
|
const isGroupedApp = !groupId && item.getParent() instanceof Group;
|
|
1734
1679
|
|
|
1735
1680
|
//update tile color
|
|
1736
1681
|
if (isGroupedApp) {
|
|
1737
|
-
|
|
1682
|
+
_this13._refreshGroupDetailDialog(item, false);
|
|
1738
1683
|
} else {
|
|
1739
1684
|
//if ungroup app or group
|
|
1740
|
-
|
|
1741
|
-
|
|
1685
|
+
_this13._applyUngroupedTileColor(item, color);
|
|
1686
|
+
_this13.oEventBus.publish("appsChannel", "favAppColorChanged", {
|
|
1742
1687
|
item,
|
|
1743
1688
|
color
|
|
1744
1689
|
});
|
|
@@ -1748,16 +1693,16 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1748
1693
|
const _temp22 = function () {
|
|
1749
1694
|
if (groupId) {
|
|
1750
1695
|
//if group
|
|
1751
|
-
void
|
|
1752
|
-
const groupIconControl =
|
|
1696
|
+
void _this13._updateGroupPersonalization(groupId, selectedColor);
|
|
1697
|
+
const groupIconControl = _this13._controlMap.get(`${_this13.getId()}-detailDialog-toolbar-color`);
|
|
1753
1698
|
groupIconControl?.setColor(color);
|
|
1754
1699
|
} else {
|
|
1755
1700
|
//if app
|
|
1756
1701
|
const app = item;
|
|
1757
1702
|
const groupId = isGroupedApp ? app.getParent().getGroupId() : undefined;
|
|
1758
|
-
return Promise.resolve(
|
|
1703
|
+
return Promise.resolve(_this13.appManagerInstance.getVisualization(app.getUrl(), groupId)).then(function (visualization) {
|
|
1759
1704
|
if (visualization) {
|
|
1760
|
-
void
|
|
1705
|
+
void _this13._updateAppPersonalization([{
|
|
1761
1706
|
visualization,
|
|
1762
1707
|
color: selectedColor
|
|
1763
1708
|
}]);
|
|
@@ -1839,7 +1784,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1839
1784
|
* @private
|
|
1840
1785
|
*/
|
|
1841
1786
|
_handleRemove: function _handleRemove(app, group) {
|
|
1842
|
-
const
|
|
1787
|
+
const _this14 = this;
|
|
1843
1788
|
const lastAppInGroup = group?.getApps()?.length === 1;
|
|
1844
1789
|
let message = this._i18nBundle.getText("removeAppMessage", [app.getTitle()]),
|
|
1845
1790
|
title = this._i18nBundle.getText("remove"),
|
|
@@ -1860,25 +1805,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1860
1805
|
try {
|
|
1861
1806
|
const _temp25 = function () {
|
|
1862
1807
|
if (action === actionText) {
|
|
1863
|
-
|
|
1808
|
+
_this14._setBusy(true);
|
|
1864
1809
|
const _temp24 = _finallyRethrows(function () {
|
|
1865
1810
|
return _catch(function () {
|
|
1866
|
-
return Promise.resolve(
|
|
1811
|
+
return Promise.resolve(_this14._removeApp(app, group)).then(function () {
|
|
1867
1812
|
if (lastAppInGroup) {
|
|
1868
|
-
|
|
1813
|
+
_this14._closeGroupDetailDialog();
|
|
1869
1814
|
} else if (group) {
|
|
1870
|
-
|
|
1815
|
+
_this14._refreshGroupDetailDialog(app);
|
|
1871
1816
|
}
|
|
1872
|
-
return Promise.resolve(
|
|
1873
|
-
MessageToast.show(
|
|
1817
|
+
return Promise.resolve(_this14.getParent()._refreshAllPanels()).then(function () {
|
|
1818
|
+
MessageToast.show(_this14._i18nBundle.getText("appRemoved"));
|
|
1874
1819
|
});
|
|
1875
1820
|
});
|
|
1876
1821
|
}, function (err) {
|
|
1877
1822
|
Log.error(err);
|
|
1878
|
-
MessageToast.show(
|
|
1823
|
+
MessageToast.show(_this14._i18nBundle.getText("unableToRemoveApp"));
|
|
1879
1824
|
});
|
|
1880
1825
|
}, function (_wasThrown2, _result3) {
|
|
1881
|
-
|
|
1826
|
+
_this14._setBusy(false);
|
|
1882
1827
|
if (_wasThrown2) throw _result3;
|
|
1883
1828
|
return _result3;
|
|
1884
1829
|
});
|
|
@@ -1903,15 +1848,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1903
1848
|
*/
|
|
1904
1849
|
_removeApp: function _removeApp(app, group) {
|
|
1905
1850
|
try {
|
|
1906
|
-
const
|
|
1851
|
+
const _this15 = this;
|
|
1907
1852
|
const lastAppInGroup = group?.getApps()?.length === 1,
|
|
1908
1853
|
groupId = group?.getGroupId(),
|
|
1909
1854
|
appId = app.getUrl();
|
|
1910
|
-
return Promise.resolve(
|
|
1855
|
+
return Promise.resolve(_this15.appManagerInstance.getVisualization(appId, groupId)).then(function (viz) {
|
|
1911
1856
|
const _temp27 = function () {
|
|
1912
1857
|
if (lastAppInGroup) {
|
|
1913
1858
|
//if last app in group, then delete the group as well
|
|
1914
|
-
return Promise.resolve(
|
|
1859
|
+
return Promise.resolve(_this15._deleteGroup(groupId)).then(function () {});
|
|
1915
1860
|
} else {
|
|
1916
1861
|
let visualizationsToBeDeleted = [viz?.visualization?.id];
|
|
1917
1862
|
if (!groupId) {
|
|
@@ -1920,11 +1865,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1920
1865
|
}
|
|
1921
1866
|
const _temp26 = function () {
|
|
1922
1867
|
if (viz?.persConfig?.sectionId && visualizationsToBeDeleted.length > 0) {
|
|
1923
|
-
return Promise.resolve(
|
|
1868
|
+
return Promise.resolve(_this15.appManagerInstance.removeVisualizations({
|
|
1924
1869
|
sectionId: viz.persConfig.sectionId,
|
|
1925
1870
|
vizIds: visualizationsToBeDeleted
|
|
1926
1871
|
})).then(function () {
|
|
1927
|
-
void
|
|
1872
|
+
void _this15._deletePersonalization({
|
|
1928
1873
|
appId: appId,
|
|
1929
1874
|
oldAppId: viz?.oldAppId,
|
|
1930
1875
|
sectionId: viz?.persConfig?.sectionId,
|
|
@@ -1951,13 +1896,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1951
1896
|
*/
|
|
1952
1897
|
_handleMoveToGroup: function _handleMoveToGroup(app, sourceGroupId, targetGroupId) {
|
|
1953
1898
|
try {
|
|
1954
|
-
const
|
|
1955
|
-
const sourceGroup = sourceGroupId ?
|
|
1899
|
+
const _this16 = this;
|
|
1900
|
+
const sourceGroup = sourceGroupId ? _this16._getGroup(sourceGroupId) : undefined,
|
|
1956
1901
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1957
1902
|
const _temp28 = function () {
|
|
1958
1903
|
if (isLastAppInGroup) {
|
|
1959
|
-
const confirmationMessage =
|
|
1960
|
-
const confirmationTitle =
|
|
1904
|
+
const confirmationMessage = _this16._i18nBundle.getText("moveAppMessage", [app.getTitle()]);
|
|
1905
|
+
const confirmationTitle = _this16._i18nBundle.getText("delete");
|
|
1961
1906
|
MessageBox.show(confirmationMessage, {
|
|
1962
1907
|
icon: MessageBox.Icon.WARNING,
|
|
1963
1908
|
title: confirmationTitle,
|
|
@@ -1965,12 +1910,12 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1965
1910
|
emphasizedAction: confirmationTitle,
|
|
1966
1911
|
onClose: action => {
|
|
1967
1912
|
if (action === confirmationTitle) {
|
|
1968
|
-
void
|
|
1913
|
+
void _this16._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId);
|
|
1969
1914
|
}
|
|
1970
1915
|
}
|
|
1971
1916
|
});
|
|
1972
1917
|
} else {
|
|
1973
|
-
return Promise.resolve(
|
|
1918
|
+
return Promise.resolve(_this16._moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId)).then(function () {});
|
|
1974
1919
|
}
|
|
1975
1920
|
}();
|
|
1976
1921
|
return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(function () {}) : void 0);
|
|
@@ -1988,27 +1933,27 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
1988
1933
|
*/
|
|
1989
1934
|
_moveAppAndHandleGroupChanges: function _moveAppAndHandleGroupChanges(app, sourceGroupId, targetGroupId) {
|
|
1990
1935
|
try {
|
|
1991
|
-
const
|
|
1992
|
-
const sourceGroup = sourceGroupId ?
|
|
1993
|
-
targetGroup = targetGroupId ?
|
|
1936
|
+
const _this17 = this;
|
|
1937
|
+
const sourceGroup = sourceGroupId ? _this17._getGroup(sourceGroupId) : null,
|
|
1938
|
+
targetGroup = targetGroupId ? _this17._getGroup(targetGroupId) : null,
|
|
1994
1939
|
sTargetGroupTile = targetGroup?.getTitle(),
|
|
1995
1940
|
isLastAppInGroup = sourceGroup?.getApps()?.length === 1;
|
|
1996
1941
|
const _temp31 = _finallyRethrows(function () {
|
|
1997
1942
|
return _catch(function () {
|
|
1998
|
-
|
|
1999
|
-
return Promise.resolve(
|
|
1943
|
+
_this17._setBusy(true);
|
|
1944
|
+
return Promise.resolve(_this17._moveAppToGroup(app, sourceGroupId, targetGroupId)).then(function () {
|
|
2000
1945
|
function _temp30() {
|
|
2001
|
-
const sMsg = sTargetGroupTile ?
|
|
1946
|
+
const sMsg = sTargetGroupTile ? _this17._i18nBundle.getText("appMoved", [sTargetGroupTile]) : _this17._i18nBundle.getText("appUngrouped");
|
|
2002
1947
|
MessageToast.show(sMsg);
|
|
2003
|
-
return Promise.resolve(
|
|
1948
|
+
return Promise.resolve(_this17.refresh()).then(function () {});
|
|
2004
1949
|
}
|
|
2005
1950
|
const _temp29 = function () {
|
|
2006
1951
|
if (isLastAppInGroup) {
|
|
2007
|
-
return Promise.resolve(
|
|
2008
|
-
|
|
1952
|
+
return Promise.resolve(_this17._deleteGroup(sourceGroupId)).then(function () {
|
|
1953
|
+
_this17._closeGroupDetailDialog();
|
|
2009
1954
|
});
|
|
2010
1955
|
} else if (sourceGroupId) {
|
|
2011
|
-
|
|
1956
|
+
_this17._refreshGroupDetailDialog(app);
|
|
2012
1957
|
}
|
|
2013
1958
|
}();
|
|
2014
1959
|
//delete group, if it is the last app in the group
|
|
@@ -2018,7 +1963,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2018
1963
|
Log.error(error);
|
|
2019
1964
|
});
|
|
2020
1965
|
}, function (_wasThrown3, _result4) {
|
|
2021
|
-
|
|
1966
|
+
_this17._setBusy(false);
|
|
2022
1967
|
if (_wasThrown3) throw _result4;
|
|
2023
1968
|
return _result4;
|
|
2024
1969
|
});
|
|
@@ -2066,9 +2011,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2066
2011
|
*/
|
|
2067
2012
|
_moveAppToGroup: function _moveAppToGroup(app, sourceGroupId, targetGroupId) {
|
|
2068
2013
|
try {
|
|
2069
|
-
const
|
|
2014
|
+
const _this18 = this;
|
|
2070
2015
|
const appId = app.getUrl();
|
|
2071
|
-
return Promise.resolve(Promise.all([
|
|
2016
|
+
return Promise.resolve(Promise.all([_this18.appManagerInstance.getSectionVisualizations(sourceGroupId), _this18.appManagerInstance._getSections()])).then(function ([visualizations, sections]) {
|
|
2072
2017
|
const sourceVisualization = visualizations.find(oViz => oViz.url === appId),
|
|
2073
2018
|
sourceVisualizationIndex = sourceVisualization?.persConfig?.visualizationIndex ?? -1,
|
|
2074
2019
|
sourceSectionIndex = sourceVisualization?.persConfig?.sectionIndex;
|
|
@@ -2078,9 +2023,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2078
2023
|
const _temp36 = function () {
|
|
2079
2024
|
if (sourceVisualization) {
|
|
2080
2025
|
function _temp35() {
|
|
2081
|
-
return Promise.resolve(
|
|
2026
|
+
return Promise.resolve(_this18.appManagerInstance._getSections(true)).then(function (sections) {
|
|
2082
2027
|
const defaultSection = sections.find(oSection => oSection.default);
|
|
2083
|
-
return Promise.resolve(
|
|
2028
|
+
return Promise.resolve(_this18._updateAppPersonalization([{
|
|
2084
2029
|
visualization: sourceVisualization,
|
|
2085
2030
|
targetGroupId: targetGroupId ?? defaultSection?.id,
|
|
2086
2031
|
isTargetGroupDefault
|
|
@@ -2089,10 +2034,10 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2089
2034
|
}
|
|
2090
2035
|
const _temp34 = function () {
|
|
2091
2036
|
if (isTargetGroupDefault) {
|
|
2092
|
-
return Promise.resolve(
|
|
2037
|
+
return Promise.resolve(_this18._moveAppToDefaultGroup(sourceVisualization)).then(function () {});
|
|
2093
2038
|
} else {
|
|
2094
2039
|
function _temp33() {
|
|
2095
|
-
return Promise.resolve(
|
|
2040
|
+
return Promise.resolve(_this18.appManagerInstance.moveVisualization({
|
|
2096
2041
|
sourceSectionIndex: sourceSectionIndex,
|
|
2097
2042
|
sourceVisualizationIndex: sourceVisualizationIndex,
|
|
2098
2043
|
targetSectionIndex: targetSectionIndex,
|
|
@@ -2102,7 +2047,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2102
2047
|
const _temp32 = function () {
|
|
2103
2048
|
if (isSourceGroupDefault) {
|
|
2104
2049
|
//remove duplicate apps
|
|
2105
|
-
return Promise.resolve(
|
|
2050
|
+
return Promise.resolve(_this18._removeDuplicateVisualizations(sourceVisualization)).then(function () {});
|
|
2106
2051
|
}
|
|
2107
2052
|
}();
|
|
2108
2053
|
return _temp32 && _temp32.then ? _temp32.then(_temp33) : _temp33(_temp32);
|
|
@@ -2125,11 +2070,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2125
2070
|
*/
|
|
2126
2071
|
_moveAppToDefaultGroup: function _moveAppToDefaultGroup(visualization) {
|
|
2127
2072
|
try {
|
|
2128
|
-
const
|
|
2129
|
-
return Promise.resolve(
|
|
2073
|
+
const _this19 = this;
|
|
2074
|
+
return Promise.resolve(_this19._addVisualization(visualization)).then(function () {
|
|
2130
2075
|
const _temp37 = function () {
|
|
2131
2076
|
if (visualization.persConfig?.sectionId && visualization.visualization?.id) {
|
|
2132
|
-
return Promise.resolve(
|
|
2077
|
+
return Promise.resolve(_this19.appManagerInstance.removeVisualizations({
|
|
2133
2078
|
sectionId: visualization.persConfig?.sectionId,
|
|
2134
2079
|
vizIds: [visualization.visualization?.id]
|
|
2135
2080
|
})).then(function () {});
|
|
@@ -2149,11 +2094,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2149
2094
|
*/
|
|
2150
2095
|
_removeDuplicateVisualizations: function _removeDuplicateVisualizations(visualization) {
|
|
2151
2096
|
try {
|
|
2152
|
-
const
|
|
2097
|
+
const _this20 = this;
|
|
2153
2098
|
const vizIdsToBeDeleted = visualization?.persConfig?.duplicateApps?.map(oViz => oViz.visualization?.id) || [];
|
|
2154
2099
|
const _temp38 = function () {
|
|
2155
2100
|
if (visualization.persConfig?.sectionId && vizIdsToBeDeleted.length > 0) {
|
|
2156
|
-
return Promise.resolve(
|
|
2101
|
+
return Promise.resolve(_this20.appManagerInstance.removeVisualizations({
|
|
2157
2102
|
sectionId: visualization.persConfig?.sectionId,
|
|
2158
2103
|
vizIds: vizIdsToBeDeleted
|
|
2159
2104
|
})).then(function () {});
|
|
@@ -2202,7 +2147,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2202
2147
|
* @param {sap.ui.base.Event} event - The event object.
|
|
2203
2148
|
*/
|
|
2204
2149
|
_onDeleteGroup: function _onDeleteGroup(event) {
|
|
2205
|
-
const
|
|
2150
|
+
const _this21 = this;
|
|
2206
2151
|
const group = event.getSource()?.getParent(),
|
|
2207
2152
|
message = this._i18nBundle.getText("deleteGroupMessage", [group.getTitle()]),
|
|
2208
2153
|
title = this._i18nBundle.getText("delete"),
|
|
@@ -2217,15 +2162,15 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2217
2162
|
try {
|
|
2218
2163
|
const _temp39 = function () {
|
|
2219
2164
|
if (action === deleteAction) {
|
|
2220
|
-
|
|
2221
|
-
return Promise.resolve(
|
|
2222
|
-
MessageToast.show(
|
|
2223
|
-
void
|
|
2224
|
-
|
|
2225
|
-
|
|
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);
|
|
2226
2171
|
});
|
|
2227
2172
|
} else if (action === moveAppAction) {
|
|
2228
|
-
void
|
|
2173
|
+
void _this21._ungroupApps(group.getGroupId());
|
|
2229
2174
|
}
|
|
2230
2175
|
}();
|
|
2231
2176
|
return Promise.resolve(_temp39 && _temp39.then ? _temp39.then(function () {}) : void 0);
|
|
@@ -2244,19 +2189,19 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2244
2189
|
*/
|
|
2245
2190
|
_ungroupApps: function _ungroupApps(groupId) {
|
|
2246
2191
|
try {
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2192
|
+
const _this22 = this;
|
|
2193
|
+
_this22._setBusy(true);
|
|
2249
2194
|
const _temp42 = _finallyRethrows(function () {
|
|
2250
2195
|
return _catch(function () {
|
|
2251
|
-
return Promise.resolve(
|
|
2252
|
-
return Promise.resolve(
|
|
2196
|
+
return Promise.resolve(_this22.appManagerInstance.getSectionVisualizations(groupId)).then(function (visualizations) {
|
|
2197
|
+
return Promise.resolve(_this22.appManagerInstance._getSections()).then(function (sections) {
|
|
2253
2198
|
const section = sections.find(oSection => oSection.id === groupId);
|
|
2254
|
-
return Promise.resolve(Promise.all(visualizations.map(oViz =>
|
|
2255
|
-
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) {
|
|
2256
2201
|
const defaultSection = updatedSections.find(oSection => oSection.default);
|
|
2257
2202
|
//update personalization
|
|
2258
2203
|
//if preset section, then section shouldn't be deleted, instead remove visualizations inside section
|
|
2259
|
-
return Promise.resolve(
|
|
2204
|
+
return Promise.resolve(_this22._updateAppPersonalization(visualizations.map(oViz => {
|
|
2260
2205
|
return {
|
|
2261
2206
|
visualization: oViz,
|
|
2262
2207
|
targetGroupId: defaultSection?.id,
|
|
@@ -2264,17 +2209,17 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2264
2209
|
};
|
|
2265
2210
|
}))).then(function () {
|
|
2266
2211
|
function _temp41() {
|
|
2267
|
-
MessageToast.show(
|
|
2268
|
-
return Promise.resolve(
|
|
2212
|
+
MessageToast.show(_this22._i18nBundle.getText("appsUngrouped") ?? "");
|
|
2213
|
+
return Promise.resolve(_this22.refresh()).then(function () {});
|
|
2269
2214
|
}
|
|
2270
2215
|
const _temp40 = function () {
|
|
2271
2216
|
if (section?.preset) {
|
|
2272
|
-
return Promise.resolve(
|
|
2217
|
+
return Promise.resolve(_this22.appManagerInstance.removeVisualizations({
|
|
2273
2218
|
sectionId: groupId,
|
|
2274
2219
|
vizIds: visualizations.map(oViz => oViz.visualization?.id)
|
|
2275
2220
|
})).then(function () {});
|
|
2276
2221
|
} else {
|
|
2277
|
-
return Promise.resolve(
|
|
2222
|
+
return Promise.resolve(_this22._deleteGroup(groupId)).then(function () {});
|
|
2278
2223
|
}
|
|
2279
2224
|
}();
|
|
2280
2225
|
return _temp40 && _temp40.then ? _temp40.then(_temp41) : _temp41(_temp40);
|
|
@@ -2285,11 +2230,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2285
2230
|
});
|
|
2286
2231
|
}, function (error) {
|
|
2287
2232
|
Log.error(error);
|
|
2288
|
-
MessageToast.show(
|
|
2233
|
+
MessageToast.show(_this22._i18nBundle.getText("unableToUngroupApps") ?? "");
|
|
2289
2234
|
});
|
|
2290
2235
|
}, function (_wasThrown4, _result5) {
|
|
2291
|
-
|
|
2292
|
-
|
|
2236
|
+
_this22._setBusy(false);
|
|
2237
|
+
_this22._closeGroupDetailDialog();
|
|
2293
2238
|
if (_wasThrown4) throw _result5;
|
|
2294
2239
|
return _result5;
|
|
2295
2240
|
});
|
|
@@ -2307,23 +2252,23 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2307
2252
|
*/
|
|
2308
2253
|
_showGroupDetailDialog: function _showGroupDetailDialog(groupId, editMode = false) {
|
|
2309
2254
|
try {
|
|
2310
|
-
const
|
|
2311
|
-
const group =
|
|
2255
|
+
const _this23 = this;
|
|
2256
|
+
const group = _this23._getGroup(groupId);
|
|
2312
2257
|
if (!group) {
|
|
2313
2258
|
return Promise.resolve();
|
|
2314
2259
|
}
|
|
2315
|
-
|
|
2316
|
-
const dialog =
|
|
2260
|
+
_this23._selectedGroupId = groupId;
|
|
2261
|
+
const dialog = _this23._generateGroupDetailDialog();
|
|
2317
2262
|
//set group icon
|
|
2318
|
-
const groupIconControl =
|
|
2263
|
+
const groupIconControl = _this23._controlMap.get(`${_this23.getId()}-detailDialog-toolbar-color`);
|
|
2319
2264
|
groupIconControl.setColor(Parameters.get({
|
|
2320
2265
|
name: group.getBgColor()
|
|
2321
2266
|
}));
|
|
2322
2267
|
//set group apps
|
|
2323
|
-
return Promise.resolve(
|
|
2268
|
+
return Promise.resolve(_this23._setGroupDetailDialogApps(groupId)).then(function () {
|
|
2324
2269
|
dialog.open();
|
|
2325
2270
|
//set group title
|
|
2326
|
-
|
|
2271
|
+
_this23._setGroupNameControl(group.getTitle(), editMode);
|
|
2327
2272
|
});
|
|
2328
2273
|
} catch (e) {
|
|
2329
2274
|
return Promise.reject(e);
|
|
@@ -2338,25 +2283,25 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2338
2283
|
*/
|
|
2339
2284
|
_setGroupDetailDialogApps: function _setGroupDetailDialogApps(groupId) {
|
|
2340
2285
|
try {
|
|
2341
|
-
const
|
|
2342
|
-
const group =
|
|
2286
|
+
const _this24 = this;
|
|
2287
|
+
const group = _this24._getGroup(groupId);
|
|
2343
2288
|
const _temp43 = function () {
|
|
2344
2289
|
if (group) {
|
|
2345
|
-
return Promise.resolve(
|
|
2290
|
+
return Promise.resolve(_this24.appManagerInstance.getSectionVisualizations(groupId, false)).then(function (appVisualizations) {
|
|
2346
2291
|
group.destroyAggregation("apps", true);
|
|
2347
2292
|
appVisualizations = appVisualizations.map((appVisualization, index) => {
|
|
2348
2293
|
return {
|
|
2349
2294
|
...appVisualization,
|
|
2350
|
-
menuItems:
|
|
2295
|
+
menuItems: _this24._getAppActions(group, index, appVisualization) //add actions to show in group
|
|
2351
2296
|
};
|
|
2352
2297
|
});
|
|
2353
|
-
const apps =
|
|
2354
|
-
const appsWrapper =
|
|
2355
|
-
|
|
2298
|
+
const apps = _this24.generateApps(appVisualizations);
|
|
2299
|
+
const appsWrapper = _this24._controlMap.get(`${_this24.getId()}-detailDialog-apps`);
|
|
2300
|
+
_this24._setAggregation(group, apps, "apps");
|
|
2356
2301
|
appsWrapper.destroyItems();
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2302
|
+
_this24._setAggregation(appsWrapper, group.getApps().map(app => _this24.getParent()._getAppTile(app)));
|
|
2303
|
+
_this24._applyGroupedAppsPersonalization(groupId);
|
|
2304
|
+
_this24._dispatchAppsLoadedEvent(apps);
|
|
2360
2305
|
});
|
|
2361
2306
|
}
|
|
2362
2307
|
}();
|
|
@@ -2491,21 +2436,21 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2491
2436
|
*/
|
|
2492
2437
|
_onGroupEditName: function _onGroupEditName(updatedTitle) {
|
|
2493
2438
|
try {
|
|
2494
|
-
const
|
|
2439
|
+
const _this25 = this;
|
|
2495
2440
|
function _temp45() {
|
|
2496
|
-
|
|
2497
|
-
|
|
2441
|
+
_this25._setGroupNameControl(updatedTitle, false);
|
|
2442
|
+
_this25._setBusy(false);
|
|
2498
2443
|
}
|
|
2499
|
-
|
|
2500
|
-
const groupId =
|
|
2501
|
-
group =
|
|
2444
|
+
_this25._setBusy(true);
|
|
2445
|
+
const groupId = _this25._selectedGroupId,
|
|
2446
|
+
group = _this25._getGroup(groupId),
|
|
2502
2447
|
oldTitle = group?.getTitle();
|
|
2503
2448
|
const _temp44 = function () {
|
|
2504
2449
|
if (updatedTitle && updatedTitle !== oldTitle) {
|
|
2505
|
-
return Promise.resolve(
|
|
2450
|
+
return Promise.resolve(_this25._renameGroup(groupId, updatedTitle)).then(function () {
|
|
2506
2451
|
group?.setProperty("title", updatedTitle, true);
|
|
2507
|
-
void
|
|
2508
|
-
MessageToast.show(
|
|
2452
|
+
void _this25.refresh();
|
|
2453
|
+
MessageToast.show(_this25._i18nBundle.getText("groupNameChanged") || "");
|
|
2509
2454
|
});
|
|
2510
2455
|
}
|
|
2511
2456
|
}();
|
|
@@ -2647,11 +2592,11 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2647
2592
|
*/
|
|
2648
2593
|
_handleAddFromInsights: function _handleAddFromInsights() {
|
|
2649
2594
|
try {
|
|
2650
|
-
const
|
|
2651
|
-
return Promise.resolve(
|
|
2652
|
-
const dialog =
|
|
2653
|
-
|
|
2654
|
-
|
|
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);
|
|
2655
2600
|
dialog.open();
|
|
2656
2601
|
});
|
|
2657
2602
|
} catch (e) {
|
|
@@ -2702,8 +2647,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2702
2647
|
*/
|
|
2703
2648
|
_getInsightTilesToAdd: function _getInsightTilesToAdd() {
|
|
2704
2649
|
try {
|
|
2705
|
-
const
|
|
2706
|
-
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]) {
|
|
2707
2652
|
//check force refresh true?
|
|
2708
2653
|
//find the visualizations that are present in insight tile but not in favorite apps
|
|
2709
2654
|
const appsToAdd = insightsApps.reduce((appsToAdd, insightsApp) => {
|
|
@@ -2716,7 +2661,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2716
2661
|
}
|
|
2717
2662
|
return appsToAdd;
|
|
2718
2663
|
}, []);
|
|
2719
|
-
return
|
|
2664
|
+
return _this27.appManagerInstance._filterDuplicateVizs(appsToAdd, false);
|
|
2720
2665
|
});
|
|
2721
2666
|
} catch (e) {
|
|
2722
2667
|
return Promise.reject(e);
|
|
@@ -2748,18 +2693,18 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2748
2693
|
*/
|
|
2749
2694
|
_addFromInsights: function _addFromInsights() {
|
|
2750
2695
|
try {
|
|
2751
|
-
const
|
|
2696
|
+
const _this28 = this;
|
|
2752
2697
|
function _temp48() {
|
|
2753
|
-
|
|
2754
|
-
MessageToast.show(
|
|
2755
|
-
return Promise.resolve(
|
|
2756
|
-
|
|
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);
|
|
2757
2702
|
});
|
|
2758
2703
|
}
|
|
2759
|
-
|
|
2760
|
-
const selectedItems =
|
|
2704
|
+
_this28._setBusy(true);
|
|
2705
|
+
const selectedItems = _this28._getSelectedInsights();
|
|
2761
2706
|
const _temp47 = _forOf(selectedItems, function (selectedItem) {
|
|
2762
|
-
return Promise.resolve(
|
|
2707
|
+
return Promise.resolve(_this28.appManagerInstance.addVisualization(selectedItem.data("vizId"))).then(function () {});
|
|
2763
2708
|
});
|
|
2764
2709
|
return Promise.resolve(_temp47 && _temp47.then ? _temp47.then(_temp48) : _temp48(_temp47));
|
|
2765
2710
|
} catch (e) {
|
|
@@ -2779,8 +2724,8 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2779
2724
|
*/
|
|
2780
2725
|
_updateAppPersonalization: function _updateAppPersonalization(updateConfigs) {
|
|
2781
2726
|
try {
|
|
2782
|
-
const
|
|
2783
|
-
return Promise.resolve(
|
|
2727
|
+
const _this29 = this;
|
|
2728
|
+
return Promise.resolve(_this29._getAppPersonalization()).then(function (personalizations) {
|
|
2784
2729
|
for (const updateConfig of updateConfigs) {
|
|
2785
2730
|
const {
|
|
2786
2731
|
visualization
|
|
@@ -2792,13 +2737,13 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2792
2737
|
const targetGroupId = updateConfig.targetGroupId ?? sourceGroupId;
|
|
2793
2738
|
if (sourceGroupId !== targetGroupId) {
|
|
2794
2739
|
//move app scenario
|
|
2795
|
-
|
|
2740
|
+
_this29._updateMoveAppPersonalization(personalizations, updateConfig);
|
|
2796
2741
|
} else {
|
|
2797
2742
|
//only color is updated
|
|
2798
|
-
|
|
2743
|
+
_this29._updateAppColorPersonalization(personalizations, updateConfig);
|
|
2799
2744
|
}
|
|
2800
2745
|
}
|
|
2801
|
-
return Promise.resolve(
|
|
2746
|
+
return Promise.resolve(_this29.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2802
2747
|
});
|
|
2803
2748
|
} catch (e) {
|
|
2804
2749
|
return Promise.reject(e);
|
|
@@ -2867,9 +2812,9 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2867
2812
|
*/
|
|
2868
2813
|
_updateGroupPersonalization: function _updateGroupPersonalization(groupId, selectedColor) {
|
|
2869
2814
|
try {
|
|
2870
|
-
const
|
|
2871
|
-
return Promise.resolve(
|
|
2872
|
-
const personalizationIndex =
|
|
2815
|
+
const _this30 = this;
|
|
2816
|
+
return Promise.resolve(_this30._getAppPersonalization()).then(function (personalizations) {
|
|
2817
|
+
const personalizationIndex = _this30._getPersonalizationIndex(personalizations, {
|
|
2873
2818
|
isSection: true,
|
|
2874
2819
|
sectionId: groupId
|
|
2875
2820
|
});
|
|
@@ -2885,7 +2830,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2885
2830
|
} else {
|
|
2886
2831
|
personalizations.push(updatedPersonalization);
|
|
2887
2832
|
}
|
|
2888
|
-
return Promise.resolve(
|
|
2833
|
+
return Promise.resolve(_this30.setFavAppsPersonalization(personalizations)).then(function () {});
|
|
2889
2834
|
});
|
|
2890
2835
|
} catch (e) {
|
|
2891
2836
|
return Promise.reject(e);
|
|
@@ -2945,7 +2890,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2945
2890
|
*/
|
|
2946
2891
|
_deleteGroup: function _deleteGroup(groupId) {
|
|
2947
2892
|
try {
|
|
2948
|
-
const
|
|
2893
|
+
const _this31 = this;
|
|
2949
2894
|
return Promise.resolve(Container.getServiceAsync("Pages")).then(function (pagesService) {
|
|
2950
2895
|
const pageIndex = pagesService.getPageIndex(MYHOME_PAGE_ID),
|
|
2951
2896
|
groups = pagesService.getModel().getProperty(`/pages/${pageIndex}/sections/`),
|
|
@@ -2953,7 +2898,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2953
2898
|
const _temp49 = function () {
|
|
2954
2899
|
if (groupIndex > -1) {
|
|
2955
2900
|
return Promise.resolve(pagesService.deleteSection(pageIndex, groupIndex)).then(function () {
|
|
2956
|
-
void
|
|
2901
|
+
void _this31._deletePersonalization({
|
|
2957
2902
|
sectionId: groupId,
|
|
2958
2903
|
isSection: true
|
|
2959
2904
|
});
|
|
@@ -2979,14 +2924,14 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2979
2924
|
*/
|
|
2980
2925
|
_deletePersonalization: function _deletePersonalization(personalizationConfig) {
|
|
2981
2926
|
try {
|
|
2982
|
-
const
|
|
2927
|
+
const _this32 = this;
|
|
2983
2928
|
const {
|
|
2984
2929
|
isSection,
|
|
2985
2930
|
sectionId
|
|
2986
2931
|
} = personalizationConfig;
|
|
2987
|
-
return Promise.resolve(
|
|
2932
|
+
return Promise.resolve(_this32._getAppPersonalization()).then(function (personalizations) {
|
|
2988
2933
|
if (!isSection) {
|
|
2989
|
-
const personalizationIndex =
|
|
2934
|
+
const personalizationIndex = _this32._getPersonalizationIndex(personalizations, personalizationConfig);
|
|
2990
2935
|
if (personalizationIndex > -1) {
|
|
2991
2936
|
personalizations.splice(personalizationIndex, 1);
|
|
2992
2937
|
}
|
|
@@ -2994,7 +2939,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
2994
2939
|
// Delete personalizations for all associated apps if a group is deleted
|
|
2995
2940
|
personalizations = personalizations.filter(personalization => personalization.sectionId !== sectionId);
|
|
2996
2941
|
}
|
|
2997
|
-
void
|
|
2942
|
+
void _this32.setFavAppsPersonalization(personalizations);
|
|
2998
2943
|
});
|
|
2999
2944
|
} catch (e) {
|
|
3000
2945
|
return Promise.reject(e);
|
|
@@ -3024,26 +2969,26 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
3024
2969
|
*/
|
|
3025
2970
|
_handleKeyboardMoveApp: function _handleKeyboardMoveApp(event, appGroupId) {
|
|
3026
2971
|
try {
|
|
3027
|
-
const
|
|
2972
|
+
const _this33 = this;
|
|
3028
2973
|
const currentItem = Element.closestTo(event.target.firstElementChild);
|
|
3029
2974
|
const container = currentItem.getParent();
|
|
3030
2975
|
const _temp51 = function () {
|
|
3031
2976
|
if (event.metaKey || event.ctrlKey) {
|
|
3032
2977
|
// ctrl(windows)/cmd (mac) + x, sets app to be moved to a group, or to create a group
|
|
3033
|
-
if (event.key === "x" && !currentItem.data("groupId") && !
|
|
2978
|
+
if (event.key === "x" && !currentItem.data("groupId") && !_this33._cutApp && !appGroupId) {
|
|
3034
2979
|
currentItem.$().css("opacity", 0.6);
|
|
3035
2980
|
currentItem._oMoreIcon.setEnabled(false);
|
|
3036
|
-
|
|
2981
|
+
_this33._cutApp = currentItem;
|
|
3037
2982
|
}
|
|
3038
2983
|
const _temp50 = function () {
|
|
3039
|
-
if (event.key === "v" &&
|
|
2984
|
+
if (event.key === "v" && _this33._cutApp && !appGroupId) {
|
|
3040
2985
|
const dragDropEvent = new Event("keyboardDragDropEvent", container, {
|
|
3041
|
-
draggedControl:
|
|
2986
|
+
draggedControl: _this33._cutApp,
|
|
3042
2987
|
droppedControl: currentItem,
|
|
3043
2988
|
dropPosition: dnd.RelativeDropPosition.On
|
|
3044
2989
|
});
|
|
3045
|
-
return Promise.resolve(
|
|
3046
|
-
|
|
2990
|
+
return Promise.resolve(_this33._onFavItemDrop(dragDropEvent)).then(function () {
|
|
2991
|
+
_this33._cutApp = undefined;
|
|
3047
2992
|
});
|
|
3048
2993
|
}
|
|
3049
2994
|
}();
|